react-native-macos 0.75.9 → 0.75.10
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/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/local-cli/runMacOS/runMacOS.js +95 -59
- package/package.json +1 -1
- package/react-native.config.js +1 -1
package/React/Base/RCTVersion.m
CHANGED
|
@@ -37,11 +37,10 @@ const {logger, CLIError, getDefaultUserTerminal} = (() => {
|
|
|
37
37
|
})();
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
* @param {string[]} _
|
|
41
|
-
* @param {Record<string, unknown>} _ctx
|
|
42
40
|
* @param {Options} args
|
|
41
|
+
* @returns {{ xcodeProject: XcodeProject, scheme: string }}
|
|
43
42
|
*/
|
|
44
|
-
function
|
|
43
|
+
function parseArgs(args) {
|
|
45
44
|
if (!fs.existsSync(args.projectPath)) {
|
|
46
45
|
throw new CLIError(
|
|
47
46
|
'macOS project folder not found. Are you sure this is a React Native project?',
|
|
@@ -78,6 +77,26 @@ function runMacOS(_, _ctx, args) {
|
|
|
78
77
|
} "${chalk.bold(xcodeProject.name)}"`,
|
|
79
78
|
);
|
|
80
79
|
|
|
80
|
+
return {xcodeProject, scheme};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @param {string[]} _
|
|
85
|
+
* @param {Record<string, unknown>} _ctx
|
|
86
|
+
* @param {Options} args
|
|
87
|
+
*/
|
|
88
|
+
function buildMacOS(_, _ctx, args) {
|
|
89
|
+
const {xcodeProject, scheme} = parseArgs(args);
|
|
90
|
+
return buildProject(xcodeProject, scheme, {...args, packager: false});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @param {string[]} _
|
|
95
|
+
* @param {Record<string, unknown>} _ctx
|
|
96
|
+
* @param {Options} args
|
|
97
|
+
*/
|
|
98
|
+
function runMacOS(_, _ctx, args) {
|
|
99
|
+
const {xcodeProject, scheme} = parseArgs(args);
|
|
81
100
|
return run(xcodeProject, scheme, args);
|
|
82
101
|
}
|
|
83
102
|
|
|
@@ -113,7 +132,7 @@ async function run(xcodeProject, scheme, args) {
|
|
|
113
132
|
|
|
114
133
|
child_process.exec(
|
|
115
134
|
'open -b ' + bundleID + ' -a ' + '"' + appPath + '"',
|
|
116
|
-
(error,
|
|
135
|
+
(error, _stdout, stderr) => {
|
|
117
136
|
if (error) {
|
|
118
137
|
logger.error('Failed to launch the app', stderr);
|
|
119
138
|
} else {
|
|
@@ -272,58 +291,75 @@ function getProcessOptions({packager, terminal, port}) {
|
|
|
272
291
|
};
|
|
273
292
|
}
|
|
274
293
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
'
|
|
306
|
-
'
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
294
|
+
const commonOptions = [
|
|
295
|
+
{
|
|
296
|
+
name: '--mode [string]',
|
|
297
|
+
description:
|
|
298
|
+
'Explicitly set the scheme configuration to use, corresponds to `--configuration` in `xcodebuild` command, e.g. Debug, Release.',
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
name: '--scheme [string]',
|
|
302
|
+
description:
|
|
303
|
+
'Explicitly set Xcode scheme to use, corresponds to `--scheme` in `xcodebuild` command.',
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
name: '--project-path [string]',
|
|
307
|
+
description:
|
|
308
|
+
'Path relative to project root where the Xcode project (.xcodeproj) lives.',
|
|
309
|
+
default: 'macos',
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
name: '--verbose',
|
|
313
|
+
description: 'Do not use xcpretty even if installed',
|
|
314
|
+
},
|
|
315
|
+
];
|
|
316
|
+
|
|
317
|
+
module.exports = [
|
|
318
|
+
{
|
|
319
|
+
name: 'build-macos',
|
|
320
|
+
description: 'builds your app',
|
|
321
|
+
func: buildMacOS,
|
|
322
|
+
examples: [
|
|
323
|
+
{
|
|
324
|
+
desc: 'Build the macOS app',
|
|
325
|
+
cmd: 'react-native build-macos',
|
|
326
|
+
},
|
|
327
|
+
],
|
|
328
|
+
options: commonOptions,
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
name: 'run-macos',
|
|
332
|
+
description: 'builds your app and starts it',
|
|
333
|
+
func: runMacOS,
|
|
334
|
+
examples: [
|
|
335
|
+
{
|
|
336
|
+
desc: 'Run the macOS app',
|
|
337
|
+
cmd: 'react-native run-macos',
|
|
338
|
+
},
|
|
339
|
+
],
|
|
340
|
+
options: [
|
|
341
|
+
{
|
|
342
|
+
name: '--configuration [string]',
|
|
343
|
+
description:
|
|
344
|
+
'[Deprecated] Explicitly set the scheme configuration to use',
|
|
345
|
+
default: 'Debug',
|
|
346
|
+
},
|
|
347
|
+
...commonOptions,
|
|
348
|
+
{
|
|
349
|
+
name: '--no-packager',
|
|
350
|
+
description: 'Do not launch packager while building',
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
name: '--port [number]',
|
|
354
|
+
default: process.env.RCT_METRO_PORT || 8081,
|
|
355
|
+
parse: val => Number(val),
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
name: '--terminal [string]',
|
|
359
|
+
description:
|
|
360
|
+
'Launches the Metro Bundler in a new window using the specified terminal path.',
|
|
361
|
+
default: getDefaultUserTerminal,
|
|
362
|
+
},
|
|
363
|
+
],
|
|
364
|
+
},
|
|
365
|
+
];
|
package/package.json
CHANGED
package/react-native.config.js
CHANGED