amis-rpc-design/node_modules/@react-native-community/cli-config/build/schema.js.map

1 line
12 KiB
Plaintext
Raw Normal View History

2023-10-07 19:42:30 +08:00
{"version":3,"names":["map","key","value","t","object","unknown","pattern","command","name","string","required","description","usage","func","options","array","items","parse","default","alternatives","try","bool","number","allow","rename","ignoreUndefined","examples","desc","cmd","healthCheck","label","healthchecks","isRequired","getDiagnostics","win32AutomaticFix","darwinAutomaticFix","linuxAutomaticFix","runAutomaticFix","dependencyConfig","dependency","platforms","any","keys","ios","scriptPhases","configurations","android","sourceDir","manifestPath","packageName","packageImportPath","packageInstance","dependencyConfiguration","buildTypes","libraryName","componentDescriptors","cmakeListsPath","npmPackageName","optional","projectConfig","linkConfig","commands","healthChecks","dependencies","root","podspecPath","reactNativePath","project","unstable_reactLegacyComponentNames","appName","assets"],"sources":["../src/schema.ts"],"sourcesContent":["/**\n * This schema is used by `cli-config` to validate the structure. Make sure\n * this file stays up to date with `cli-types` package.\n *\n * In the future, it would be great to generate this file automatically from the\n * Typescript types.\n */\nimport t, {SchemaLike} from 'joi';\n\nconst map = (key: RegExp | SchemaLike, value: SchemaLike) =>\n t.object().unknown(true).pattern(key, value);\n\n/**\n * Schema for CommandT\n */\nconst command = t.object({\n name: t.string().required(),\n description: t.string(),\n usage: t.string(),\n func: t.func().required(),\n options: t.array().items(\n t\n .object({\n name: t.string().required(),\n description: t.string(),\n parse: t.func(),\n default: t\n .alternatives()\n .try(t.bool(), t.number(), t.string().allow(''), t.func()),\n })\n .rename('command', 'name', {ignoreUndefined: true}),\n ),\n examples: t.array().items(\n t.object({\n desc: t.string().required(),\n cmd: t.string().required(),\n }),\n ),\n});\n\n/**\n * Schema for HealthChecksT\n */\nconst healthCheck = t.object({\n label: t.string().required(),\n healthchecks: t.array().items(\n t.object({\n label: t.string().required(),\n isRequired: t.bool(),\n description: t.string(),\n getDiagnostics: t.func(),\n win32AutomaticFix: t.func(),\n darwinAutomaticFix: t.func(),\n linuxAutomaticFix: t.func(),\n runAutomaticFix: t.func().required(),\n }),\n ),\n});\n\n/**\n * Schema for UserDependencyConfig\n */\nexport const dependencyConfig = t\n .object({\n dependency: t\n .object({\n platforms: map(t.string(), t.any())\n .keys({\n ios: t\n // IOSDependencyParams\n .object({\n scriptPhases: t.array().items(t.object()),\n configurations: t.array().items(t.string()).default([]),\n })\n .allow(null),\n android: t\n // AndroidDependencyParams\n .object({\n sourceDir: t.string(),\n manifestPath: t.string(),\n packageName: t.string(),\n packageImportPath: t.string(),\n packageInstance: t.string(),\n dependencyConfiguration: t.string(),\n buildTypes: t.array().items(t.string()).default([]),\n libraryName: t.string().allow(null),\n componentDescriptors: t.array().items(t.string()).allow(null),\n cmakeListsPath: t.string().allow(null),\n })\n .allow(null),\n })\n .default(),\n })\n .default(),\n platforms: map(\n t.string(),\n t.object({\n npmPackageName: t.string().optional(),\n dependencyConfig: t.func(),\n projectConfig: t.func(),\n linkConfig: t.func(),\n }),\n ).default({}),\n commands: t.array().items(command).default([]),\n healthChecks: t.array().items(healthCheck).default([]),\n })\n .unknown(true)\n .default();\n\n/**\n * Schema for Projec