yeet
This commit is contained in:
57
node_modules/@react-native-community/cli/build/tools/config/errors.js
generated
vendored
Normal file
57
node_modules/@react-native-community/cli/build/tools/config/errors.js
generated
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.JoiError = void 0;
|
||||
|
||||
function _cliTools() {
|
||||
const data = require("@react-native-community/cli-tools");
|
||||
|
||||
_cliTools = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
class JoiError extends _cliTools().CLIError {
|
||||
constructor(joiError) {
|
||||
super(joiError.details.map(error => {
|
||||
const name = error.path.join('.');
|
||||
|
||||
switch (error.type) {
|
||||
case 'object.allowUnknown':
|
||||
{
|
||||
const value = JSON.stringify(error.context && error.context.value);
|
||||
return `
|
||||
Unknown option ${name} with value "${value}" was found.
|
||||
This is either a typing error or a user mistake. Fixing it will remove this message.
|
||||
`;
|
||||
}
|
||||
|
||||
case 'object.base':
|
||||
case 'string.base':
|
||||
{
|
||||
const expectedType = error.type.replace('.base', '');
|
||||
const actualType = typeof (error.context && error.context.value);
|
||||
return `
|
||||
Option ${name} must be a ${expectedType}, instead got ${actualType}
|
||||
`;
|
||||
}
|
||||
|
||||
default:
|
||||
return error.message;
|
||||
}
|
||||
}).join());
|
||||
|
||||
if (Error.captureStackTrace) {
|
||||
Error.captureStackTrace(this, JoiError);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.JoiError = JoiError;
|
||||
|
||||
//# sourceMappingURL=errors.js.map
|
53
node_modules/@react-native-community/cli/build/tools/config/findAssets.js
generated
vendored
Normal file
53
node_modules/@react-native-community/cli/build/tools/config/findAssets.js
generated
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = findAssets;
|
||||
|
||||
function _glob() {
|
||||
const data = _interopRequireDefault(require("glob"));
|
||||
|
||||
_glob = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _path() {
|
||||
const data = _interopRequireDefault(require("path"));
|
||||
|
||||
_path = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
const findAssetsInFolder = folder => {
|
||||
const assets = _glob().default.sync(_path().default.join(folder, '**'), {
|
||||
nodir: true
|
||||
});
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
return assets.map(asset => asset.split('/').join('\\'));
|
||||
}
|
||||
|
||||
return assets;
|
||||
};
|
||||
/**
|
||||
* Given an array of assets folders, e.g. ['Fonts', 'Images'],
|
||||
* it globs in them to find all files that can be copied.
|
||||
*
|
||||
* It returns an array of absolute paths to files found.
|
||||
*/
|
||||
|
||||
|
||||
function findAssets(folder, assets) {
|
||||
return (assets || []).map(asset => _path().default.join(folder, asset)).reduce((acc, assetPath) => acc.concat(findAssetsInFolder(assetPath)), []);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=findAssets.js.map
|
46
node_modules/@react-native-community/cli/build/tools/config/findDependencies.js
generated
vendored
Normal file
46
node_modules/@react-native-community/cli/build/tools/config/findDependencies.js
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = findDependencies;
|
||||
|
||||
function _path() {
|
||||
const data = _interopRequireDefault(require("path"));
|
||||
|
||||
_path = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _fs() {
|
||||
const data = _interopRequireDefault(require("fs"));
|
||||
|
||||
_fs = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/**
|
||||
* Returns an array of dependencies from project's package.json
|
||||
*/
|
||||
function findDependencies(root) {
|
||||
let pjson;
|
||||
|
||||
try {
|
||||
pjson = JSON.parse(_fs().default.readFileSync(_path().default.join(root, 'package.json'), 'UTF-8'));
|
||||
} catch (e) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const deps = [...Object.keys(pjson.dependencies || {}), ...Object.keys(pjson.devDependencies || {})];
|
||||
return deps;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=findDependencies.js.map
|
66
node_modules/@react-native-community/cli/build/tools/config/findProjectRoot.js
generated
vendored
Normal file
66
node_modules/@react-native-community/cli/build/tools/config/findProjectRoot.js
generated
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = findProjectRoot;
|
||||
|
||||
function _findUp() {
|
||||
const data = _interopRequireDefault(require("find-up"));
|
||||
|
||||
_findUp = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _path() {
|
||||
const data = _interopRequireDefault(require("path"));
|
||||
|
||||
_path = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _cliTools() {
|
||||
const data = require("@react-native-community/cli-tools");
|
||||
|
||||
_cliTools = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/**
|
||||
* Finds project root by looking for a closest `package.json`.
|
||||
*/
|
||||
function findProjectRoot(cwd = process.cwd()) {
|
||||
const packageLocation = _findUp().default.sync('package.json', {
|
||||
cwd
|
||||
});
|
||||
/**
|
||||
* It is possible that `package.json` doesn't exist
|
||||
* in the tree. In that case, we want to throw an error.
|
||||
*
|
||||
* When executing via `npx`, this will never happen as `npm`
|
||||
* requires that file to be present in order to run.
|
||||
*/
|
||||
|
||||
|
||||
if (!packageLocation) {
|
||||
throw new (_cliTools().CLIError)(`
|
||||
We couldn't find a package.json in your project.
|
||||
Are you sure you are running it inside a React Native project?
|
||||
`);
|
||||
}
|
||||
|
||||
return _path().default.dirname(packageLocation);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=findProjectRoot.js.map
|
151
node_modules/@react-native-community/cli/build/tools/config/index.js
generated
vendored
Normal file
151
node_modules/@react-native-community/cli/build/tools/config/index.js
generated
vendored
Normal file
@ -0,0 +1,151 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _path() {
|
||||
const data = _interopRequireDefault(require("path"));
|
||||
|
||||
_path = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require("chalk"));
|
||||
|
||||
_chalk = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _cliTools() {
|
||||
const data = require("@react-native-community/cli-tools");
|
||||
|
||||
_cliTools = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var _findDependencies = _interopRequireDefault(require("./findDependencies"));
|
||||
|
||||
var _findProjectRoot = _interopRequireDefault(require("./findProjectRoot"));
|
||||
|
||||
var _resolveReactNativePath = _interopRequireDefault(require("./resolveReactNativePath"));
|
||||
|
||||
var _findAssets = _interopRequireDefault(require("./findAssets"));
|
||||
|
||||
var _readConfigFromDisk = require("./readConfigFromDisk");
|
||||
|
||||
var _assign = _interopRequireDefault(require("../assign"));
|
||||
|
||||
var _merge = _interopRequireDefault(require("../merge"));
|
||||
|
||||
var _resolveNodeModuleDir = _interopRequireDefault(require("./resolveNodeModuleDir"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function getDependencyConfig(root, dependencyName, finalConfig, config, userConfig, isPlatform) {
|
||||
return (0, _merge.default)({
|
||||
root,
|
||||
name: dependencyName,
|
||||
platforms: Object.keys(finalConfig.platforms).reduce((dependency, platform) => {
|
||||
const platformConfig = finalConfig.platforms[platform];
|
||||
dependency[platform] = // Linking platforms is not supported
|
||||
isPlatform || !platformConfig ? null : platformConfig.dependencyConfig(root, config.dependency.platforms[platform]);
|
||||
return dependency;
|
||||
}, {}),
|
||||
assets: (0, _findAssets.default)(root, config.dependency.assets),
|
||||
hooks: config.dependency.hooks,
|
||||
params: config.dependency.params
|
||||
}, userConfig.dependencies[dependencyName] || {});
|
||||
}
|
||||
/**
|
||||
* Loads CLI configuration
|
||||
*/
|
||||
|
||||
|
||||
function loadConfig(projectRoot = (0, _findProjectRoot.default)()) {
|
||||
let lazyProject;
|
||||
const userConfig = (0, _readConfigFromDisk.readConfigFromDisk)(projectRoot);
|
||||
const initialConfig = {
|
||||
root: projectRoot,
|
||||
|
||||
get reactNativePath() {
|
||||
return userConfig.reactNativePath ? _path().default.resolve(projectRoot, userConfig.reactNativePath) : (0, _resolveReactNativePath.default)(projectRoot);
|
||||
},
|
||||
|
||||
dependencies: userConfig.dependencies,
|
||||
commands: userConfig.commands,
|
||||
|
||||
get assets() {
|
||||
return (0, _findAssets.default)(projectRoot, userConfig.assets);
|
||||
},
|
||||
|
||||
platforms: userConfig.platforms,
|
||||
|
||||
get project() {
|
||||
if (lazyProject) {
|
||||
return lazyProject;
|
||||
}
|
||||
|
||||
lazyProject = {};
|
||||
|
||||
for (const platform in finalConfig.platforms) {
|
||||
const platformConfig = finalConfig.platforms[platform];
|
||||
|
||||
if (platformConfig) {
|
||||
lazyProject[platform] = platformConfig.projectConfig(projectRoot, userConfig.project[platform] || {});
|
||||
}
|
||||
}
|
||||
|
||||
return lazyProject;
|
||||
}
|
||||
|
||||
};
|
||||
const finalConfig = Array.from(new Set([...Object.keys(userConfig.dependencies), ...(0, _findDependencies.default)(projectRoot)])).reduce((acc, dependencyName) => {
|
||||
const localDependencyRoot = userConfig.dependencies[dependencyName] && userConfig.dependencies[dependencyName].root;
|
||||
let root;
|
||||
let config;
|
||||
|
||||
try {
|
||||
root = localDependencyRoot || (0, _resolveNodeModuleDir.default)(projectRoot, dependencyName);
|
||||
config = (0, _readConfigFromDisk.readDependencyConfigFromDisk)(root);
|
||||
} catch (error) {
|
||||
_cliTools().logger.warn((0, _cliTools().inlineString)(`
|
||||
Package ${_chalk().default.bold(dependencyName)} has been ignored because it contains invalid configuration.
|
||||
|
||||
Reason: ${_chalk().default.dim(error.message)}`));
|
||||
|
||||
return acc;
|
||||
}
|
||||
|
||||
const isPlatform = Object.keys(config.platforms).length > 0;
|
||||
return (0, _assign.default)({}, acc, {
|
||||
dependencies: (0, _assign.default)({}, acc.dependencies, {
|
||||
get [dependencyName]() {
|
||||
return getDependencyConfig(root, dependencyName, finalConfig, config, userConfig, isPlatform);
|
||||
}
|
||||
|
||||
}),
|
||||
commands: [...acc.commands, ...config.commands],
|
||||
platforms: { ...acc.platforms,
|
||||
...config.platforms
|
||||
}
|
||||
});
|
||||
}, initialConfig);
|
||||
return finalConfig;
|
||||
}
|
||||
|
||||
var _default = loadConfig;
|
||||
exports.default = _default;
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
98
node_modules/@react-native-community/cli/build/tools/config/readConfigFromDisk.js
generated
vendored
Normal file
98
node_modules/@react-native-community/cli/build/tools/config/readConfigFromDisk.js
generated
vendored
Normal file
@ -0,0 +1,98 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.readConfigFromDisk = readConfigFromDisk;
|
||||
exports.readDependencyConfigFromDisk = readDependencyConfigFromDisk;
|
||||
|
||||
function _joi() {
|
||||
const data = _interopRequireDefault(require("@hapi/joi"));
|
||||
|
||||
_joi = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _cosmiconfig() {
|
||||
const data = _interopRequireDefault(require("cosmiconfig"));
|
||||
|
||||
_cosmiconfig = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var _errors = require("./errors");
|
||||
|
||||
var schema = _interopRequireWildcard(require("./schema"));
|
||||
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/**
|
||||
* Places to look for the configuration file.
|
||||
*/
|
||||
const searchPlaces = ['react-native.config.js'];
|
||||
/**
|
||||
* Reads a project configuration as defined by the user in the current
|
||||
* workspace.
|
||||
*/
|
||||
|
||||
function readConfigFromDisk(rootFolder) {
|
||||
const explorer = (0, _cosmiconfig().default)('react-native', {
|
||||
searchPlaces,
|
||||
stopDir: rootFolder
|
||||
});
|
||||
const searchResult = explorer.searchSync(rootFolder);
|
||||
const config = searchResult ? searchResult.config : undefined;
|
||||
|
||||
const result = _joi().default.validate(config, schema.projectConfig);
|
||||
|
||||
if (result.error) {
|
||||
throw new _errors.JoiError(result.error);
|
||||
}
|
||||
|
||||
return result.value;
|
||||
}
|
||||
/**
|
||||
* Reads a dependency configuration as defined by the developer
|
||||
* inside `node_modules`.
|
||||
*/
|
||||
|
||||
|
||||
function readDependencyConfigFromDisk(rootFolder) {
|
||||
const explorer = (0, _cosmiconfig().default)('react-native', {
|
||||
stopDir: rootFolder,
|
||||
searchPlaces
|
||||
});
|
||||
const searchResult = explorer.searchSync(rootFolder);
|
||||
const config = searchResult ? searchResult.config : emptyDependencyConfig;
|
||||
|
||||
const result = _joi().default.validate(config, schema.dependencyConfig);
|
||||
|
||||
if (result.error) {
|
||||
throw new _errors.JoiError(result.error);
|
||||
}
|
||||
|
||||
return result.value;
|
||||
}
|
||||
|
||||
const emptyDependencyConfig = {
|
||||
dependency: {
|
||||
platforms: {},
|
||||
assets: [],
|
||||
hooks: {},
|
||||
params: []
|
||||
},
|
||||
commands: [],
|
||||
platforms: {}
|
||||
};
|
||||
|
||||
//# sourceMappingURL=readConfigFromDisk.js.map
|
29
node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
generated
vendored
Normal file
29
node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = resolveNodeModuleDir;
|
||||
|
||||
function _path() {
|
||||
const data = _interopRequireDefault(require("path"));
|
||||
|
||||
_path = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/**
|
||||
* Finds a path inside `node_modules`
|
||||
*/
|
||||
function resolveNodeModuleDir(root, packageName) {
|
||||
return _path().default.dirname(require.resolve(_path().default.join(packageName, 'package.json'), {
|
||||
paths: [root]
|
||||
}));
|
||||
}
|
||||
|
||||
//# sourceMappingURL=resolveNodeModuleDir.js.map
|
43
node_modules/@react-native-community/cli/build/tools/config/resolveReactNativePath.js
generated
vendored
Normal file
43
node_modules/@react-native-community/cli/build/tools/config/resolveReactNativePath.js
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = resolveReactNativePath;
|
||||
|
||||
function _cliTools() {
|
||||
const data = require("@react-native-community/cli-tools");
|
||||
|
||||
_cliTools = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var _resolveNodeModuleDir = _interopRequireDefault(require("./resolveNodeModuleDir"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/**
|
||||
* Finds path to React Native inside `node_modules` or throws
|
||||
* an error otherwise.
|
||||
*/
|
||||
function resolveReactNativePath(root) {
|
||||
try {
|
||||
return (0, _resolveNodeModuleDir.default)(root, 'react-native');
|
||||
} catch (_ignored) {
|
||||
throw new (_cliTools().CLIError)(`
|
||||
Unable to find React Native files looking up from ${root}. Make sure "react-native" module is installed
|
||||
in your project dependencies.
|
||||
|
||||
If you are using React Native from a non-standard location, consider setting:
|
||||
{
|
||||
reactNativePath: "./path/to/react-native"
|
||||
}
|
||||
in your \`react-native.config.js\`.
|
||||
`);
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=resolveReactNativePath.js.map
|
149
node_modules/@react-native-community/cli/build/tools/config/schema.js
generated
vendored
Normal file
149
node_modules/@react-native-community/cli/build/tools/config/schema.js
generated
vendored
Normal file
@ -0,0 +1,149 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.projectConfig = exports.dependencyConfig = void 0;
|
||||
|
||||
function t() {
|
||||
const data = _interopRequireWildcard(require("@hapi/joi"));
|
||||
|
||||
t = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
const map = (key, value) => t().object().unknown(true).pattern(key, value);
|
||||
/**
|
||||
* Schema for CommandT
|
||||
*/
|
||||
|
||||
|
||||
const command = t().object({
|
||||
name: t().string().required(),
|
||||
description: t().string(),
|
||||
usage: t().string(),
|
||||
func: t().func().required(),
|
||||
options: t().array().items(t().object({
|
||||
name: t().string().required(),
|
||||
description: t().string(),
|
||||
parse: t().func(),
|
||||
default: t().alternatives().try([t().bool(), t().number(), t().string().allow(''), t().func()])
|
||||
}).rename('command', 'name', {
|
||||
ignoreUndefined: true
|
||||
})),
|
||||
examples: t().array().items(t().object({
|
||||
desc: t().string().required(),
|
||||
cmd: t().string().required()
|
||||
}))
|
||||
});
|
||||
/**
|
||||
* Schema for UserDependencyConfigT
|
||||
*/
|
||||
|
||||
const dependencyConfig = t().object({
|
||||
dependency: t().object({
|
||||
platforms: map(t().string(), t().any()).keys({
|
||||
ios: t().object({
|
||||
project: t().string(),
|
||||
podspecPath: t().string(),
|
||||
sharedLibraries: t().array().items(t().string()),
|
||||
libraryFolder: t().string(),
|
||||
scriptPhases: t().array().items(t().object())
|
||||
}).default({}),
|
||||
android: t().object({
|
||||
sourceDir: t().string(),
|
||||
manifestPath: t().string(),
|
||||
packageImportPath: t().string(),
|
||||
packageInstance: t().string()
|
||||
}).default({})
|
||||
}).default(),
|
||||
assets: t().array().items(t().string()).default([]),
|
||||
hooks: map(t().string(), t().string()).default({}),
|
||||
params: t().array().items(t().object({
|
||||
name: t().string(),
|
||||
type: t().string(),
|
||||
message: t().string()
|
||||
})).default([])
|
||||
}).default(),
|
||||
platforms: map(t().string(), t().object({
|
||||
npmPackageName: t().string().optional(),
|
||||
dependencyConfig: t().func(),
|
||||
projectConfig: t().func(),
|
||||
linkConfig: t().func()
|
||||
})).default({}),
|
||||
commands: t().array().items(command).default([])
|
||||
}).unknown(true).default();
|
||||
/**
|
||||
* Schema for ProjectConfigT
|
||||
*/
|
||||
|
||||
exports.dependencyConfig = dependencyConfig;
|
||||
const projectConfig = t().object({
|
||||
dependencies: map(t().string(), t().object({
|
||||
root: t().string(),
|
||||
platforms: map(t().string(), t().any()).keys({
|
||||
ios: t().object({
|
||||
sourceDir: t().string(),
|
||||
folder: t().string(),
|
||||
pbxprojPath: t().string(),
|
||||
podfile: t().string(),
|
||||
podspecPath: t().string(),
|
||||
projectPath: t().string(),
|
||||
projectName: t().string(),
|
||||
libraryFolder: t().string(),
|
||||
sharedLibraries: t().array().items(t().string())
|
||||
}).allow(null),
|
||||
android: t().object({
|
||||
sourceDir: t().string(),
|
||||
folder: t().string(),
|
||||
packageImportPath: t().string(),
|
||||
packageInstance: t().string()
|
||||
}).allow(null)
|
||||
}),
|
||||
assets: t().array().items(t().string()),
|
||||
hooks: map(t().string(), t().string()),
|
||||
params: t().array().items(t().object({
|
||||
name: t().string(),
|
||||
type: t().string(),
|
||||
message: t().string()
|
||||
}))
|
||||
}).allow(null)).default({}),
|
||||
reactNativePath: t().string(),
|
||||
project: map(t().string(), t().any()).keys({
|
||||
ios: t().object({
|
||||
project: t().string(),
|
||||
sharedLibraries: t().array().items(t().string()),
|
||||
libraryFolder: t().string()
|
||||
}).default({}),
|
||||
android: t().object({
|
||||
sourceDir: t().string(),
|
||||
manifestPath: t().string(),
|
||||
packageName: t().string(),
|
||||
packageFolder: t().string(),
|
||||
mainFilePath: t().string(),
|
||||
stringsPath: t().string(),
|
||||
settingsGradlePath: t().string(),
|
||||
assetsPath: t().string(),
|
||||
buildGradlePath: t().string(),
|
||||
appName: t().string()
|
||||
}).default({})
|
||||
}).default(),
|
||||
assets: t().array().items(t().string()).default([]),
|
||||
commands: t().array().items(command).default([]),
|
||||
platforms: map(t().string(), t().object({
|
||||
npmPackageName: t().string().optional(),
|
||||
dependencyConfig: t().func(),
|
||||
projectConfig: t().func(),
|
||||
linkConfig: t().func()
|
||||
})).default({})
|
||||
}).unknown(true).default();
|
||||
exports.projectConfig = projectConfig;
|
||||
|
||||
//# sourceMappingURL=schema.js.map
|
Reference in New Issue
Block a user