@react-native-community/cli-config 7.0.1 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/build/commands/config.d.ts.map +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/config.js.map +1 -1
- package/build/loadConfig.d.ts.map +1 -1
- package/build/loadConfig.js +1 -11
- package/build/loadConfig.js.map +1 -1
- package/build/readConfigFromDisk.js +1 -4
- package/build/readConfigFromDisk.js.map +1 -1
- package/build/schema.d.ts +9 -2
- package/build/schema.d.ts.map +1 -1
- package/build/schema.js +29 -49
- package/build/schema.js.map +1 -1
- package/package.json +7 -6
- package/build/findAssets.d.ts +0 -8
- package/build/findAssets.d.ts.map +0 -1
- package/build/findAssets.js +0 -53
- package/build/findAssets.js.map +0 -1
- package/src/__tests__/__snapshots__/index-test.ts.snap +0 -185
- package/src/__tests__/findAssets-test.ts +0 -51
- package/src/__tests__/findDependencies-test.ts +0 -23
- package/src/__tests__/index-test.ts +0 -350
- package/src/assign.ts +0 -27
- package/src/commands/config.ts +0 -30
- package/src/errors.ts +0 -31
- package/src/findAssets.ts +0 -28
- package/src/findDependencies.ts +0 -24
- package/src/index.ts +0 -5
- package/src/loadConfig.ts +0 -157
- package/src/merge.ts +0 -12
- package/src/readConfigFromDisk.ts +0 -68
- package/src/resolveReactNativePath.ts +0 -25
- package/src/schema.ts +0 -201
- package/tsconfig.json +0 -8
- package/tsconfig.tsbuildinfo +0 -1957
package/src/errors.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import {CLIError} from '@react-native-community/cli-tools';
|
|
2
|
-
import {ValidationError} from 'joi';
|
|
3
|
-
|
|
4
|
-
export class JoiError extends CLIError {
|
|
5
|
-
constructor(joiError: ValidationError) {
|
|
6
|
-
const message = joiError.details
|
|
7
|
-
.map((error) => {
|
|
8
|
-
const name = error.path.join('.');
|
|
9
|
-
switch (error.type) {
|
|
10
|
-
case 'object.allowUnknown': {
|
|
11
|
-
const value = JSON.stringify(error.context && error.context.value);
|
|
12
|
-
return `
|
|
13
|
-
Unknown option ${name} with value "${value}" was found.
|
|
14
|
-
This is either a typing error or a user mistake. Fixing it will remove this message.
|
|
15
|
-
`;
|
|
16
|
-
}
|
|
17
|
-
default:
|
|
18
|
-
return error.message;
|
|
19
|
-
}
|
|
20
|
-
})
|
|
21
|
-
.join()
|
|
22
|
-
.trim();
|
|
23
|
-
|
|
24
|
-
super(message);
|
|
25
|
-
this.name = 'Config Validation Error';
|
|
26
|
-
|
|
27
|
-
if (Error.captureStackTrace) {
|
|
28
|
-
Error.captureStackTrace(this, JoiError);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
package/src/findAssets.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import glob from 'glob';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
|
|
4
|
-
const findAssetsInFolder = (folder: string): string[] => {
|
|
5
|
-
const assets = glob.sync(path.join(folder, '**'), {nodir: true});
|
|
6
|
-
if (process.platform === 'win32') {
|
|
7
|
-
return assets.map((asset) => asset.split('/').join('\\'));
|
|
8
|
-
}
|
|
9
|
-
return assets;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Given an array of assets folders, e.g. ['Fonts', 'Images'],
|
|
14
|
-
* it globs in them to find all files that can be copied.
|
|
15
|
-
*
|
|
16
|
-
* It returns an array of absolute paths to files found.
|
|
17
|
-
*/
|
|
18
|
-
export default function findAssets(
|
|
19
|
-
folder: string,
|
|
20
|
-
assets: Array<string>,
|
|
21
|
-
): Array<string> {
|
|
22
|
-
return (assets || [])
|
|
23
|
-
.map((asset) => path.join(folder, asset))
|
|
24
|
-
.reduce(
|
|
25
|
-
(acc, assetPath) => acc.concat(findAssetsInFolder(assetPath)),
|
|
26
|
-
[] as string[],
|
|
27
|
-
);
|
|
28
|
-
}
|
package/src/findDependencies.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Returns an array of dependencies from project's package.json
|
|
6
|
-
*/
|
|
7
|
-
export default function findDependencies(root: string): Array<string> {
|
|
8
|
-
let pjson;
|
|
9
|
-
|
|
10
|
-
try {
|
|
11
|
-
pjson = JSON.parse(
|
|
12
|
-
fs.readFileSync(path.join(root, 'package.json'), 'UTF-8'),
|
|
13
|
-
);
|
|
14
|
-
} catch (e) {
|
|
15
|
-
return [];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const deps = [
|
|
19
|
-
...Object.keys(pjson.dependencies || {}),
|
|
20
|
-
...Object.keys(pjson.devDependencies || {}),
|
|
21
|
-
];
|
|
22
|
-
|
|
23
|
-
return deps;
|
|
24
|
-
}
|
package/src/index.ts
DELETED
package/src/loadConfig.ts
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
import {
|
|
4
|
-
UserDependencyConfig,
|
|
5
|
-
ProjectConfig,
|
|
6
|
-
Dependency,
|
|
7
|
-
UserConfig,
|
|
8
|
-
Config,
|
|
9
|
-
} from '@react-native-community/cli-types';
|
|
10
|
-
import {
|
|
11
|
-
logger,
|
|
12
|
-
inlineString,
|
|
13
|
-
findProjectRoot,
|
|
14
|
-
resolveNodeModuleDir,
|
|
15
|
-
} from '@react-native-community/cli-tools';
|
|
16
|
-
import findDependencies from './findDependencies';
|
|
17
|
-
import resolveReactNativePath from './resolveReactNativePath';
|
|
18
|
-
import findAssets from './findAssets';
|
|
19
|
-
import {
|
|
20
|
-
readConfigFromDisk,
|
|
21
|
-
readDependencyConfigFromDisk,
|
|
22
|
-
} from './readConfigFromDisk';
|
|
23
|
-
import assign from './assign';
|
|
24
|
-
import merge from './merge';
|
|
25
|
-
|
|
26
|
-
function getDependencyConfig(
|
|
27
|
-
root: string,
|
|
28
|
-
dependencyName: string,
|
|
29
|
-
finalConfig: Config,
|
|
30
|
-
config: UserDependencyConfig,
|
|
31
|
-
userConfig: UserConfig,
|
|
32
|
-
isPlatform: boolean,
|
|
33
|
-
): Dependency {
|
|
34
|
-
return merge(
|
|
35
|
-
{
|
|
36
|
-
root,
|
|
37
|
-
name: dependencyName,
|
|
38
|
-
platforms: Object.keys(finalConfig.platforms).reduce(
|
|
39
|
-
(dependency, platform) => {
|
|
40
|
-
const platformConfig = finalConfig.platforms[platform];
|
|
41
|
-
dependency[platform] =
|
|
42
|
-
// Linking platforms is not supported
|
|
43
|
-
isPlatform || !platformConfig
|
|
44
|
-
? null
|
|
45
|
-
: platformConfig.dependencyConfig(
|
|
46
|
-
root,
|
|
47
|
-
config.dependency.platforms[platform],
|
|
48
|
-
);
|
|
49
|
-
return dependency;
|
|
50
|
-
},
|
|
51
|
-
{} as Config['platforms'],
|
|
52
|
-
),
|
|
53
|
-
assets: findAssets(root, config.dependency.assets),
|
|
54
|
-
hooks: config.dependency.hooks,
|
|
55
|
-
params: config.dependency.params,
|
|
56
|
-
},
|
|
57
|
-
userConfig.dependencies[dependencyName] || {},
|
|
58
|
-
) as Dependency;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Loads CLI configuration
|
|
63
|
-
*/
|
|
64
|
-
function loadConfig(projectRoot: string = findProjectRoot()): Config {
|
|
65
|
-
let lazyProject: ProjectConfig;
|
|
66
|
-
const userConfig = readConfigFromDisk(projectRoot);
|
|
67
|
-
|
|
68
|
-
const initialConfig: Config = {
|
|
69
|
-
root: projectRoot,
|
|
70
|
-
get reactNativePath() {
|
|
71
|
-
return userConfig.reactNativePath
|
|
72
|
-
? path.resolve(projectRoot, userConfig.reactNativePath)
|
|
73
|
-
: resolveReactNativePath(projectRoot);
|
|
74
|
-
},
|
|
75
|
-
dependencies: userConfig.dependencies,
|
|
76
|
-
commands: userConfig.commands,
|
|
77
|
-
get assets() {
|
|
78
|
-
return findAssets(projectRoot, userConfig.assets);
|
|
79
|
-
},
|
|
80
|
-
healthChecks: [],
|
|
81
|
-
platforms: userConfig.platforms,
|
|
82
|
-
get project() {
|
|
83
|
-
if (lazyProject) {
|
|
84
|
-
return lazyProject;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
lazyProject = {};
|
|
88
|
-
for (const platform in finalConfig.platforms) {
|
|
89
|
-
const platformConfig = finalConfig.platforms[platform];
|
|
90
|
-
if (platformConfig) {
|
|
91
|
-
lazyProject[platform] = platformConfig.projectConfig(
|
|
92
|
-
projectRoot,
|
|
93
|
-
userConfig.project[platform] || {},
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
return lazyProject;
|
|
99
|
-
},
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
const finalConfig = Array.from(
|
|
103
|
-
new Set([
|
|
104
|
-
...Object.keys(userConfig.dependencies),
|
|
105
|
-
...findDependencies(projectRoot),
|
|
106
|
-
]),
|
|
107
|
-
).reduce((acc: Config, dependencyName) => {
|
|
108
|
-
const localDependencyRoot =
|
|
109
|
-
userConfig.dependencies[dependencyName] &&
|
|
110
|
-
userConfig.dependencies[dependencyName].root;
|
|
111
|
-
let root: string;
|
|
112
|
-
let config: UserDependencyConfig;
|
|
113
|
-
try {
|
|
114
|
-
root =
|
|
115
|
-
localDependencyRoot ||
|
|
116
|
-
resolveNodeModuleDir(projectRoot, dependencyName);
|
|
117
|
-
config = readDependencyConfigFromDisk(root);
|
|
118
|
-
} catch (error) {
|
|
119
|
-
logger.warn(
|
|
120
|
-
inlineString(`
|
|
121
|
-
Package ${chalk.bold(
|
|
122
|
-
dependencyName,
|
|
123
|
-
)} has been ignored because it contains invalid configuration.
|
|
124
|
-
|
|
125
|
-
Reason: ${chalk.dim(error.message)}`),
|
|
126
|
-
);
|
|
127
|
-
return acc;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
const isPlatform = Object.keys(config.platforms).length > 0;
|
|
131
|
-
|
|
132
|
-
return assign({}, acc, {
|
|
133
|
-
dependencies: assign({}, acc.dependencies, {
|
|
134
|
-
get [dependencyName](): Dependency {
|
|
135
|
-
return getDependencyConfig(
|
|
136
|
-
root,
|
|
137
|
-
dependencyName,
|
|
138
|
-
finalConfig,
|
|
139
|
-
config,
|
|
140
|
-
userConfig,
|
|
141
|
-
isPlatform,
|
|
142
|
-
);
|
|
143
|
-
},
|
|
144
|
-
}),
|
|
145
|
-
commands: [...acc.commands, ...config.commands],
|
|
146
|
-
platforms: {
|
|
147
|
-
...acc.platforms,
|
|
148
|
-
...config.platforms,
|
|
149
|
-
},
|
|
150
|
-
healthChecks: [...acc.healthChecks, ...config.healthChecks],
|
|
151
|
-
}) as Config;
|
|
152
|
-
}, initialConfig);
|
|
153
|
-
|
|
154
|
-
return finalConfig;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
export default loadConfig;
|
package/src/merge.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import deepmerge from 'deepmerge';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* `deepmerge` concatenates arrays by default instead of overwriting them.
|
|
5
|
-
* We define custom merging function for arrays to change that behaviour
|
|
6
|
-
*/
|
|
7
|
-
export default function merge<X, Y>(x: X, y: Y) {
|
|
8
|
-
return deepmerge(x, y, {
|
|
9
|
-
arrayMerge: (_destinationArray: any[], sourceArray: any[]): any[] =>
|
|
10
|
-
sourceArray,
|
|
11
|
-
});
|
|
12
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import cosmiconfig from 'cosmiconfig';
|
|
2
|
-
import {JoiError} from './errors';
|
|
3
|
-
import * as schema from './schema';
|
|
4
|
-
import {
|
|
5
|
-
UserConfig,
|
|
6
|
-
UserDependencyConfig,
|
|
7
|
-
} from '@react-native-community/cli-types';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Places to look for the configuration file.
|
|
11
|
-
*/
|
|
12
|
-
const searchPlaces = ['react-native.config.js'];
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Reads a project configuration as defined by the user in the current
|
|
16
|
-
* workspace.
|
|
17
|
-
*/
|
|
18
|
-
export function readConfigFromDisk(rootFolder: string): UserConfig {
|
|
19
|
-
const explorer = cosmiconfig('react-native', {
|
|
20
|
-
searchPlaces,
|
|
21
|
-
stopDir: rootFolder,
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
const searchResult = explorer.searchSync(rootFolder);
|
|
25
|
-
const config = searchResult ? searchResult.config : undefined;
|
|
26
|
-
const result = schema.projectConfig.validate(config);
|
|
27
|
-
|
|
28
|
-
if (result.error) {
|
|
29
|
-
throw new JoiError(result.error);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return result.value as UserConfig;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Reads a dependency configuration as defined by the developer
|
|
37
|
-
* inside `node_modules`.
|
|
38
|
-
*/
|
|
39
|
-
export function readDependencyConfigFromDisk(
|
|
40
|
-
rootFolder: string,
|
|
41
|
-
): UserDependencyConfig {
|
|
42
|
-
const explorer = cosmiconfig('react-native', {
|
|
43
|
-
stopDir: rootFolder,
|
|
44
|
-
searchPlaces,
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
const searchResult = explorer.searchSync(rootFolder);
|
|
48
|
-
const config = searchResult ? searchResult.config : emptyDependencyConfig;
|
|
49
|
-
|
|
50
|
-
const result = schema.dependencyConfig.validate(config);
|
|
51
|
-
|
|
52
|
-
if (result.error) {
|
|
53
|
-
throw new JoiError(result.error);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return result.value as UserDependencyConfig;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const emptyDependencyConfig = {
|
|
60
|
-
dependency: {
|
|
61
|
-
platforms: {},
|
|
62
|
-
assets: [],
|
|
63
|
-
hooks: {},
|
|
64
|
-
params: [],
|
|
65
|
-
},
|
|
66
|
-
commands: [],
|
|
67
|
-
platforms: {},
|
|
68
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CLIError,
|
|
3
|
-
resolveNodeModuleDir,
|
|
4
|
-
} from '@react-native-community/cli-tools';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Finds path to React Native inside `node_modules` or throws
|
|
8
|
-
* an error otherwise.
|
|
9
|
-
*/
|
|
10
|
-
export default function resolveReactNativePath(root: string) {
|
|
11
|
-
try {
|
|
12
|
-
return resolveNodeModuleDir(root, 'react-native');
|
|
13
|
-
} catch (_ignored) {
|
|
14
|
-
throw new CLIError(`
|
|
15
|
-
Unable to find React Native files looking up from ${root}. Make sure "react-native" module is installed
|
|
16
|
-
in your project dependencies.
|
|
17
|
-
|
|
18
|
-
If you are using React Native from a non-standard location, consider setting:
|
|
19
|
-
{
|
|
20
|
-
reactNativePath: "./path/to/react-native"
|
|
21
|
-
}
|
|
22
|
-
in your \`react-native.config.js\`.
|
|
23
|
-
`);
|
|
24
|
-
}
|
|
25
|
-
}
|
package/src/schema.ts
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import t, {SchemaLike} from 'joi';
|
|
2
|
-
|
|
3
|
-
const map = (key: RegExp | SchemaLike, value: SchemaLike) =>
|
|
4
|
-
t.object().unknown(true).pattern(key, value);
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Schema for CommandT
|
|
8
|
-
*/
|
|
9
|
-
const command = t.object({
|
|
10
|
-
name: t.string().required(),
|
|
11
|
-
description: t.string(),
|
|
12
|
-
usage: t.string(),
|
|
13
|
-
func: t.func().required(),
|
|
14
|
-
options: t.array().items(
|
|
15
|
-
t
|
|
16
|
-
.object({
|
|
17
|
-
name: t.string().required(),
|
|
18
|
-
description: t.string(),
|
|
19
|
-
parse: t.func(),
|
|
20
|
-
default: t
|
|
21
|
-
.alternatives()
|
|
22
|
-
.try(t.bool(), t.number(), t.string().allow(''), t.func()),
|
|
23
|
-
})
|
|
24
|
-
.rename('command', 'name', {ignoreUndefined: true}),
|
|
25
|
-
),
|
|
26
|
-
examples: t.array().items(
|
|
27
|
-
t.object({
|
|
28
|
-
desc: t.string().required(),
|
|
29
|
-
cmd: t.string().required(),
|
|
30
|
-
}),
|
|
31
|
-
),
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Schema for HealthChecksT
|
|
36
|
-
*/
|
|
37
|
-
const healthCheck = t.object({
|
|
38
|
-
label: t.string().required(),
|
|
39
|
-
healthchecks: t.array().items(
|
|
40
|
-
t.object({
|
|
41
|
-
label: t.string().required(),
|
|
42
|
-
isRequired: t.bool(),
|
|
43
|
-
description: t.string(),
|
|
44
|
-
getDiagnostics: t.func(),
|
|
45
|
-
win32AutomaticFix: t.func(),
|
|
46
|
-
darwinAutomaticFix: t.func(),
|
|
47
|
-
linuxAutomaticFix: t.func(),
|
|
48
|
-
runAutomaticFix: t.func().required(),
|
|
49
|
-
}),
|
|
50
|
-
),
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Schema for UserDependencyConfigT
|
|
55
|
-
*/
|
|
56
|
-
export const dependencyConfig = t
|
|
57
|
-
.object({
|
|
58
|
-
dependency: t
|
|
59
|
-
.object({
|
|
60
|
-
platforms: map(t.string(), t.any())
|
|
61
|
-
.keys({
|
|
62
|
-
ios: t
|
|
63
|
-
.object({
|
|
64
|
-
project: t.string(),
|
|
65
|
-
podspecPath: t.string(),
|
|
66
|
-
sharedLibraries: t.array().items(t.string()),
|
|
67
|
-
libraryFolder: t.string(),
|
|
68
|
-
scriptPhases: t.array().items(t.object()),
|
|
69
|
-
configurations: t.array().items(t.string()).default([]),
|
|
70
|
-
})
|
|
71
|
-
.default({}),
|
|
72
|
-
android: t
|
|
73
|
-
.object({
|
|
74
|
-
sourceDir: t.string(),
|
|
75
|
-
manifestPath: t.string(),
|
|
76
|
-
packageImportPath: t.string(),
|
|
77
|
-
packageInstance: t.string(),
|
|
78
|
-
dependencyConfiguration: t.string(),
|
|
79
|
-
buildTypes: t.array().items(t.string()).default([]),
|
|
80
|
-
})
|
|
81
|
-
.default({}),
|
|
82
|
-
})
|
|
83
|
-
.default(),
|
|
84
|
-
assets: t.array().items(t.string()).default([]),
|
|
85
|
-
hooks: map(t.string(), t.string()).default({}),
|
|
86
|
-
params: t
|
|
87
|
-
.array()
|
|
88
|
-
.items(
|
|
89
|
-
t.object({
|
|
90
|
-
name: t.string(),
|
|
91
|
-
type: t.string(),
|
|
92
|
-
message: t.string(),
|
|
93
|
-
}),
|
|
94
|
-
)
|
|
95
|
-
.default([]),
|
|
96
|
-
})
|
|
97
|
-
.default(),
|
|
98
|
-
platforms: map(
|
|
99
|
-
t.string(),
|
|
100
|
-
t.object({
|
|
101
|
-
npmPackageName: t.string().optional(),
|
|
102
|
-
dependencyConfig: t.func(),
|
|
103
|
-
projectConfig: t.func(),
|
|
104
|
-
linkConfig: t.func(),
|
|
105
|
-
}),
|
|
106
|
-
).default({}),
|
|
107
|
-
commands: t.array().items(command).default([]),
|
|
108
|
-
healthChecks: t.array().items(healthCheck).default([]),
|
|
109
|
-
})
|
|
110
|
-
.unknown(true)
|
|
111
|
-
.default();
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Schema for ProjectConfigT
|
|
115
|
-
*/
|
|
116
|
-
export const projectConfig = t
|
|
117
|
-
.object({
|
|
118
|
-
dependencies: map(
|
|
119
|
-
t.string(),
|
|
120
|
-
t
|
|
121
|
-
.object({
|
|
122
|
-
root: t.string(),
|
|
123
|
-
platforms: map(t.string(), t.any()).keys({
|
|
124
|
-
ios: t
|
|
125
|
-
.object({
|
|
126
|
-
sourceDir: t.string(),
|
|
127
|
-
folder: t.string(),
|
|
128
|
-
pbxprojPath: t.string(),
|
|
129
|
-
podfile: t.string(),
|
|
130
|
-
podspecPath: t.string(),
|
|
131
|
-
projectPath: t.string(),
|
|
132
|
-
projectName: t.string(),
|
|
133
|
-
libraryFolder: t.string(),
|
|
134
|
-
sharedLibraries: t.array().items(t.string()),
|
|
135
|
-
configurations: t.array().items(t.string()).default([]),
|
|
136
|
-
})
|
|
137
|
-
.allow(null),
|
|
138
|
-
android: t
|
|
139
|
-
.object({
|
|
140
|
-
sourceDir: t.string(),
|
|
141
|
-
folder: t.string(),
|
|
142
|
-
packageImportPath: t.string(),
|
|
143
|
-
packageInstance: t.string(),
|
|
144
|
-
dependencyConfiguration: t.string(),
|
|
145
|
-
buildTypes: t.array().items(t.string()).default([]),
|
|
146
|
-
})
|
|
147
|
-
.allow(null),
|
|
148
|
-
}),
|
|
149
|
-
assets: t.array().items(t.string()),
|
|
150
|
-
hooks: map(t.string(), t.string()),
|
|
151
|
-
params: t.array().items(
|
|
152
|
-
t.object({
|
|
153
|
-
name: t.string(),
|
|
154
|
-
type: t.string(),
|
|
155
|
-
message: t.string(),
|
|
156
|
-
}),
|
|
157
|
-
),
|
|
158
|
-
})
|
|
159
|
-
.allow(null),
|
|
160
|
-
).default({}),
|
|
161
|
-
reactNativePath: t.string(),
|
|
162
|
-
project: map(t.string(), t.any())
|
|
163
|
-
.keys({
|
|
164
|
-
ios: t
|
|
165
|
-
.object({
|
|
166
|
-
project: t.string(),
|
|
167
|
-
sharedLibraries: t.array().items(t.string()),
|
|
168
|
-
libraryFolder: t.string(),
|
|
169
|
-
})
|
|
170
|
-
.default({}),
|
|
171
|
-
android: t
|
|
172
|
-
.object({
|
|
173
|
-
sourceDir: t.string(),
|
|
174
|
-
manifestPath: t.string(),
|
|
175
|
-
packageName: t.string(),
|
|
176
|
-
packageFolder: t.string(),
|
|
177
|
-
mainFilePath: t.string(),
|
|
178
|
-
stringsPath: t.string(),
|
|
179
|
-
settingsGradlePath: t.string(),
|
|
180
|
-
assetsPath: t.string(),
|
|
181
|
-
buildGradlePath: t.string(),
|
|
182
|
-
appName: t.string(),
|
|
183
|
-
dependencyConfiguration: t.string(),
|
|
184
|
-
})
|
|
185
|
-
.default({}),
|
|
186
|
-
})
|
|
187
|
-
.default(),
|
|
188
|
-
assets: t.array().items(t.string()).default([]),
|
|
189
|
-
commands: t.array().items(command).default([]),
|
|
190
|
-
platforms: map(
|
|
191
|
-
t.string(),
|
|
192
|
-
t.object({
|
|
193
|
-
npmPackageName: t.string().optional(),
|
|
194
|
-
dependencyConfig: t.func(),
|
|
195
|
-
projectConfig: t.func(),
|
|
196
|
-
linkConfig: t.func(),
|
|
197
|
-
}),
|
|
198
|
-
).default({}),
|
|
199
|
-
})
|
|
200
|
-
.unknown(true)
|
|
201
|
-
.default();
|