Socket
Socket
Sign inDemoInstall

@react-native-community/cli-config

Package Overview
Dependencies
5
Maintainers
41
Versions
114
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.0.1 to 8.0.0-alpha.0

2

build/commands/config.js

@@ -9,3 +9,3 @@ "use strict";

function isValidRNDependency(config) {
return Object.keys(config.platforms).filter(key => Boolean(config.platforms[key])).length !== 0 || config.hooks && Object.keys(config.hooks).length !== 0 || config.assets && config.assets.length !== 0 || config.params && config.params.length !== 0;
return Object.keys(config.platforms).filter(key => Boolean(config.platforms[key])).length !== 0;
}

@@ -12,0 +12,0 @@

@@ -42,4 +42,2 @@ "use strict";

var _findAssets = _interopRequireDefault(require("./findAssets"));
var _readConfigFromDisk = require("./readConfigFromDisk");

@@ -62,6 +60,3 @@

return dependency;
}, {}),
assets: (0, _findAssets.default)(root, config.dependency.assets),
hooks: config.dependency.hooks,
params: config.dependency.params
}, {})
}, userConfig.dependencies[dependencyName] || {});

@@ -86,7 +81,2 @@ }

commands: userConfig.commands,
get assets() {
return (0, _findAssets.default)(projectRoot, userConfig.assets);
},
healthChecks: [],

@@ -93,0 +83,0 @@ platforms: userConfig.platforms,

@@ -77,6 +77,3 @@ "use strict";

dependency: {
platforms: {},
assets: [],
hooks: {},
params: []
platforms: {}
},

@@ -83,0 +80,0 @@ commands: [],

@@ -0,10 +1,17 @@

/**
* This schema is used by `cli-config` to validate the structure. Make sure
* this file stays up to date with `cli-types` package.
*
* In the future, it would be great to generate this file automatically from the
* Typescript types.
*/
import t from 'joi';
/**
* Schema for UserDependencyConfigT
* Schema for UserDependencyConfig
*/
export declare const dependencyConfig: t.ObjectSchema<any>;
/**
* Schema for ProjectConfigT
* Schema for ProjectConfig
*/
export declare const projectConfig: t.ObjectSchema<any>;
//# sourceMappingURL=schema.d.ts.map

@@ -20,2 +20,9 @@ "use strict";

/**
* This schema is used by `cli-config` to validate the structure. Make sure
* this file stays up to date with `cli-types` package.
*
* In the future, it would be great to generate this file automatically from the
* Typescript types.
*/
const map = (key, value) => _joi().default.object().unknown(true).pattern(key, value);

@@ -64,3 +71,3 @@ /**

/**
* Schema for UserDependencyConfigT
* Schema for UserDependencyConfig
*/

@@ -72,13 +79,12 @@

platforms: map(_joi().default.string(), _joi().default.any()).keys({
ios: _joi().default.object({
project: _joi().default.string(),
podspecPath: _joi().default.string(),
sharedLibraries: _joi().default.array().items(_joi().default.string()),
libraryFolder: _joi().default.string(),
scriptPhases: _joi().default.array().items(_joi().default.object()),
ios: _joi().default // IOSDependencyParams
.object({
scriptPhases: _joi().default.array().items(_joi().default.string()),
configurations: _joi().default.array().items(_joi().default.string()).default([])
}).default({}),
android: _joi().default.object({
android: _joi().default // AndroidDependencyParams
.object({
sourceDir: _joi().default.string(),
manifestPath: _joi().default.string(),
packageName: _joi().default.string(),
packageImportPath: _joi().default.string(),

@@ -89,10 +95,3 @@ packageInstance: _joi().default.string(),

}).default({})
}).default(),
assets: _joi().default.array().items(_joi().default.string()).default([]),
hooks: map(_joi().default.string(), _joi().default.string()).default({}),
params: _joi().default.array().items(_joi().default.object({
name: _joi().default.string(),
type: _joi().default.string(),
message: _joi().default.string()
})).default([])
}).default()
}).default(),

@@ -109,3 +108,3 @@ platforms: map(_joi().default.string(), _joi().default.object({

/**
* Schema for ProjectConfigT
* Schema for ProjectConfig
*/

@@ -120,17 +119,11 @@

platforms: map(_joi().default.string(), _joi().default.any()).keys({
ios: _joi().default.object({
sourceDir: _joi().default.string(),
folder: _joi().default.string(),
pbxprojPath: _joi().default.string(),
podfile: _joi().default.string(),
ios: _joi().default // IOSDependencyConfig
.object({
podspecPath: _joi().default.string(),
projectPath: _joi().default.string(),
projectName: _joi().default.string(),
libraryFolder: _joi().default.string(),
sharedLibraries: _joi().default.array().items(_joi().default.string()),
configurations: _joi().default.array().items(_joi().default.string()).default([])
configurations: _joi().default.array().items(_joi().default.string()).default([]),
scriptPhases: _joi().default.array().items(_joi().default.string()).default([])
}).allow(null),
android: _joi().default.object({
android: _joi().default // AndroidDependencyConfig
.object({
sourceDir: _joi().default.string(),
folder: _joi().default.string(),
packageImportPath: _joi().default.string(),

@@ -141,29 +134,16 @@ packageInstance: _joi().default.string(),

}).allow(null)
}),
assets: _joi().default.array().items(_joi().default.string()),
hooks: map(_joi().default.string(), _joi().default.string()),
params: _joi().default.array().items(_joi().default.object({
name: _joi().default.string(),
type: _joi().default.string(),
message: _joi().default.string()
}))
})
}).allow(null)).default({}),
reactNativePath: _joi().default.string(),
project: map(_joi().default.string(), _joi().default.any()).keys({
ios: _joi().default.object({
project: _joi().default.string(),
sharedLibraries: _joi().default.array().items(_joi().default.string()),
libraryFolder: _joi().default.string()
ios: _joi().default // IOSProjectParams
.object({
sourceDir: _joi().default.string()
}).default({}),
android: _joi().default.object({
android: _joi().default // AndroidProjectParams
.object({
sourceDir: _joi().default.string(),
appName: _joi().default.string(),
manifestPath: _joi().default.string(),
packageName: _joi().default.string(),
packageFolder: _joi().default.string(),
mainFilePath: _joi().default.string(),
stringsPath: _joi().default.string(),
settingsGradlePath: _joi().default.string(),
assetsPath: _joi().default.string(),
buildGradlePath: _joi().default.string(),
appName: _joi().default.string(),
dependencyConfiguration: _joi().default.string()

@@ -170,0 +150,0 @@ }).default({})

{
"name": "@react-native-community/cli-config",
"version": "7.0.1",
"version": "8.0.0-alpha.0",
"license": "MIT",

@@ -11,7 +11,7 @@ "main": "build/index.js",

"dependencies": {
"@react-native-community/cli-tools": "^8.0.0-alpha.0",
"cosmiconfig": "^5.1.0",
"deepmerge": "^3.2.0",
"@react-native-community/cli-tools": "^7.0.1",
"joi": "^17.2.1",
"glob": "^7.1.3"
"glob": "^7.1.3",
"joi": "^17.2.1"
},

@@ -24,4 +24,4 @@ "files": [

"devDependencies": {
"@react-native-community/cli-types": "^8.0.0-alpha.0",
"@types/cosmiconfig": "^5.0.3",
"@react-native-community/cli-types": "^7.0.1",
"@types/glob": "^7.1.1"

@@ -28,0 +28,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc