react-native-builder-bob 0.32.0 → 0.32.1
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/lib/utils/runRNCCli.js
CHANGED
|
@@ -9,10 +9,7 @@ var _nodePath = _interopRequireDefault(require("node:path"));
|
|
|
9
9
|
var _fsExtra = _interopRequireDefault(require("fs-extra"));
|
|
10
10
|
var _nodeAssert = _interopRequireDefault(require("node:assert"));
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
|
|
13
|
-
// XCode scripts don't have the node binary properly set
|
|
14
|
-
// We expose an env value for node instead.
|
|
15
|
-
const NODE_BINARY = process.env['NODE_BINARY'] || 'node';
|
|
12
|
+
const NODE_BINARY = 'node';
|
|
16
13
|
|
|
17
14
|
/**
|
|
18
15
|
* Runs the React Native Community CLI with the specified arguments
|
|
@@ -24,7 +21,7 @@ async function runRNCCli(args, options = {
|
|
|
24
21
|
const RNC_CLI_BINARY_PATH = _nodePath.default.resolve(process.cwd(),
|
|
25
22
|
// We are always expected to run in the library
|
|
26
23
|
'node_modules', '.bin', rncCliBinaryName);
|
|
27
|
-
return await (0, _spawn.spawn)(
|
|
24
|
+
return await (0, _spawn.spawn)(RNC_CLI_BINARY_PATH, args, options);
|
|
28
25
|
}
|
|
29
26
|
async function getCliBinaryName() {
|
|
30
27
|
const rncCliPackagePath = await (0, _spawn.spawn)(NODE_BINARY, ['-e', `console.log(require.resolve('@react-native-community/cli/package.json'))`]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runRNCCli.js","names":["_spawn","require","_nodePath","_interopRequireDefault","_fsExtra","_nodeAssert","e","__esModule","default","NODE_BINARY","
|
|
1
|
+
{"version":3,"file":"runRNCCli.js","names":["_spawn","require","_nodePath","_interopRequireDefault","_fsExtra","_nodeAssert","e","__esModule","default","NODE_BINARY","runRNCCli","args","options","stdio","rncCliBinaryName","getCliBinaryName","RNC_CLI_BINARY_PATH","path","resolve","process","cwd","spawn","rncCliPackagePath","rncCliPackage","fs","readJson","binProperty","bin","assert","binaries","Object","keys"],"sources":["../../src/utils/runRNCCli.ts"],"sourcesContent":["import { type SpawnOptions } from 'node:child_process';\nimport { spawn } from './spawn';\nimport path from 'node:path';\nimport fs from 'fs-extra';\nimport assert from 'node:assert';\n\nconst NODE_BINARY = 'node';\n\n/**\n * Runs the React Native Community CLI with the specified arguments\n */\nexport async function runRNCCli(\n args: string[],\n options: SpawnOptions = {\n stdio: 'ignore',\n }\n) {\n const rncCliBinaryName = await getCliBinaryName();\n\n const RNC_CLI_BINARY_PATH = path.resolve(\n process.cwd(), // We are always expected to run in the library\n 'node_modules',\n '.bin',\n rncCliBinaryName\n );\n\n return await spawn(RNC_CLI_BINARY_PATH, args, options);\n}\n\nasync function getCliBinaryName(): Promise<string> {\n const rncCliPackagePath = await spawn(NODE_BINARY, [\n '-e',\n `console.log(require.resolve('@react-native-community/cli/package.json'))`,\n ]);\n\n const rncCliPackage = await fs.readJson(rncCliPackagePath);\n const binProperty = rncCliPackage.bin as Record<string, string>;\n assert(\n typeof binProperty === 'object',\n \"React Native CLI doesn't specify proper binaries\"\n );\n\n const binaries = Object.keys(binProperty);\n const rncCliBinaryName = binaries[0] as string;\n assert(\n typeof rncCliBinaryName === 'string',\n \"React Native Community CLI doesn't have any binaries to run\"\n );\n\n return rncCliBinaryName;\n}\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,QAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,WAAA,GAAAF,sBAAA,CAAAF,OAAA;AAAiC,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEjC,MAAMG,WAAW,GAAG,MAAM;;AAE1B;AACA;AACA;AACO,eAAeC,SAASA,CAC7BC,IAAc,EACdC,OAAqB,GAAG;EACtBC,KAAK,EAAE;AACT,CAAC,EACD;EACA,MAAMC,gBAAgB,GAAG,MAAMC,gBAAgB,CAAC,CAAC;EAEjD,MAAMC,mBAAmB,GAAGC,iBAAI,CAACC,OAAO,CACtCC,OAAO,CAACC,GAAG,CAAC,CAAC;EAAE;EACf,cAAc,EACd,MAAM,EACNN,gBACF,CAAC;EAED,OAAO,MAAM,IAAAO,YAAK,EAACL,mBAAmB,EAAEL,IAAI,EAAEC,OAAO,CAAC;AACxD;AAEA,eAAeG,gBAAgBA,CAAA,EAAoB;EACjD,MAAMO,iBAAiB,GAAG,MAAM,IAAAD,YAAK,EAACZ,WAAW,EAAE,CACjD,IAAI,EACJ,0EAA0E,CAC3E,CAAC;EAEF,MAAMc,aAAa,GAAG,MAAMC,gBAAE,CAACC,QAAQ,CAACH,iBAAiB,CAAC;EAC1D,MAAMI,WAAW,GAAGH,aAAa,CAACI,GAA6B;EAC/D,IAAAC,mBAAM,EACJ,OAAOF,WAAW,KAAK,QAAQ,EAC/B,kDACF,CAAC;EAED,MAAMG,QAAQ,GAAGC,MAAM,CAACC,IAAI,CAACL,WAAW,CAAC;EACzC,MAAMZ,gBAAgB,GAAGe,QAAQ,CAAC,CAAC,CAAW;EAC9C,IAAAD,mBAAM,EACJ,OAAOd,gBAAgB,KAAK,QAAQ,EACpC,6DACF,CAAC;EAED,OAAOA,gBAAgB;AACzB","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-builder-bob",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.1",
|
|
4
4
|
"description": "CLI to build JavaScript files for React Native libraries",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"jest": "^29.7.0",
|
|
88
88
|
"mock-fs": "^5.2.0"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "f822763aca8b2043c39343c9443f6b1f4862366d"
|
|
91
91
|
}
|