@rnx-kit/cli 0.17.5 → 0.17.7
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/build/android.js +3 -1
- package/lib/build/ios.js +5 -2
- package/lib/build/macos.js +3 -1
- package/lib/index.d.ts +14 -1
- package/lib/index.js +5 -5
- package/package.json +3 -3
- package/lib/align-deps.d.ts +0 -14
- package/lib/align-deps.js +0 -76
package/lib/build/android.js
CHANGED
|
@@ -4,13 +4,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.buildAndroid = buildAndroid;
|
|
7
|
+
const cache_1 = require("@rnx-kit/tools-react-native/cache");
|
|
7
8
|
const ora_1 = __importDefault(require("ora"));
|
|
8
9
|
const watcher_1 = require("./watcher");
|
|
9
10
|
function buildAndroid(config, buildParams, logger = (0, ora_1.default)()) {
|
|
10
11
|
const { sourceDir } = config.project.android ?? {};
|
|
11
12
|
if (!sourceDir) {
|
|
12
|
-
|
|
13
|
+
(0, cache_1.invalidateState)();
|
|
13
14
|
process.exitCode = 1;
|
|
15
|
+
logger.fail("No Android project was found");
|
|
14
16
|
return Promise.resolve(null);
|
|
15
17
|
}
|
|
16
18
|
return import("@rnx-kit/tools-android").then(({ assemble }) => {
|
package/lib/build/ios.js
CHANGED
|
@@ -27,6 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.buildIOS = buildIOS;
|
|
30
|
+
const cache_1 = require("@rnx-kit/tools-react-native/cache");
|
|
30
31
|
const path = __importStar(require("node:path"));
|
|
31
32
|
const ora_1 = __importDefault(require("ora"));
|
|
32
33
|
const apple_1 = require("./apple");
|
|
@@ -34,15 +35,17 @@ function buildIOS(config, buildParams, logger = (0, ora_1.default)()) {
|
|
|
34
35
|
const { platform } = buildParams;
|
|
35
36
|
const { sourceDir, xcodeProject } = config.project[platform] ?? {};
|
|
36
37
|
if (!sourceDir || !xcodeProject) {
|
|
38
|
+
(0, cache_1.invalidateState)();
|
|
39
|
+
process.exitCode = 1;
|
|
37
40
|
const root = platform.substring(0, platform.length - 2);
|
|
38
41
|
logger.fail(`No ${root}OS project was found; did you forget to run 'pod install'?`);
|
|
39
|
-
process.exitCode = 1;
|
|
40
42
|
return Promise.resolve(1);
|
|
41
43
|
}
|
|
42
44
|
const { name, path: projectDir } = xcodeProject;
|
|
43
45
|
if (!name?.endsWith(".xcworkspace")) {
|
|
44
|
-
|
|
46
|
+
(0, cache_1.invalidateState)();
|
|
45
47
|
process.exitCode = 1;
|
|
48
|
+
logger.fail("No Xcode workspaces were found; did you forget to run `pod install`?");
|
|
46
49
|
return Promise.resolve(1);
|
|
47
50
|
}
|
|
48
51
|
const xcworkspace = projectDir
|
package/lib/build/macos.js
CHANGED
|
@@ -27,6 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.buildMacOS = buildMacOS;
|
|
30
|
+
const cache_1 = require("@rnx-kit/tools-react-native/cache");
|
|
30
31
|
const fs = __importStar(require("node:fs"));
|
|
31
32
|
const path = __importStar(require("node:path"));
|
|
32
33
|
const ora_1 = __importDefault(require("ora"));
|
|
@@ -43,8 +44,9 @@ function buildMacOS(_config, { workspace, ...buildParams }, logger = (0, ora_1.d
|
|
|
43
44
|
const sourceDir = "macos";
|
|
44
45
|
const workspaces = findXcodeWorkspaces(sourceDir);
|
|
45
46
|
if (workspaces.length === 0) {
|
|
46
|
-
|
|
47
|
+
(0, cache_1.invalidateState)();
|
|
47
48
|
process.exitCode = 1;
|
|
49
|
+
logger.fail("No Xcode workspaces were found; specify an Xcode workspace with `--workspace`");
|
|
48
50
|
return Promise.resolve(1);
|
|
49
51
|
}
|
|
50
52
|
if (workspaces.length > 1) {
|
package/lib/index.d.ts
CHANGED
|
@@ -2,7 +2,20 @@ import type { Command } from "@react-native-community/cli-types";
|
|
|
2
2
|
export declare const reactNativeConfig: {
|
|
3
3
|
commands: Command<false>[];
|
|
4
4
|
};
|
|
5
|
-
export
|
|
5
|
+
export declare const rnxAlignDeps: (_argv: string[], _config: import("@react-native-community/cli-types").Config, args: {
|
|
6
|
+
[x: string]: string | number | boolean | undefined;
|
|
7
|
+
}) => void;
|
|
8
|
+
export declare const rnxAlignDepsCommand: {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
func: (_argv: string[], _config: import("@react-native-community/cli-types").Config, args: {
|
|
12
|
+
[x: string]: string | number | boolean | undefined;
|
|
13
|
+
}) => void;
|
|
14
|
+
readonly options: {
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
}[];
|
|
18
|
+
};
|
|
6
19
|
export { rnxBuild, rnxBuildCommand } from "./build";
|
|
7
20
|
export { rnxBundle, rnxBundleCommand } from "./bundle";
|
|
8
21
|
export { rnxClean, rnxCleanCommand } from "./clean";
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.rnxWriteThirdPartyNoticesCommand = exports.rnxWriteThirdPartyNotices = exports.rnxTestCommand = exports.rnxTest = exports.rnxStartCommand = exports.rnxStart = exports.rnxRunCommand = exports.rnxRun = exports.rnxRamBundleCommand = exports.rnxRamBundle = exports.rnxCopyAssetsCommand = exports.copyProjectAssets = exports.rnxCleanCommand = exports.rnxClean = exports.rnxBundleCommand = exports.rnxBundle = exports.rnxBuildCommand = exports.rnxBuild = exports.rnxAlignDepsCommand = exports.rnxAlignDeps = exports.reactNativeConfig = void 0;
|
|
4
|
-
const align_deps_1 = require("
|
|
4
|
+
const align_deps_1 = require("@rnx-kit/align-deps");
|
|
5
5
|
const build_1 = require("./build");
|
|
6
6
|
const bundle_1 = require("./bundle");
|
|
7
7
|
const clean_1 = require("./clean");
|
|
@@ -19,15 +19,15 @@ exports.reactNativeConfig = {
|
|
|
19
19
|
build_1.rnxBuildCommand,
|
|
20
20
|
run_1.rnxRunCommand,
|
|
21
21
|
copy_assets_1.rnxCopyAssetsCommand,
|
|
22
|
-
align_deps_1.
|
|
22
|
+
align_deps_1.alignDepsCommand,
|
|
23
23
|
test_1.rnxTestCommand,
|
|
24
24
|
write_third_party_notices_1.rnxWriteThirdPartyNoticesCommand,
|
|
25
25
|
clean_1.rnxCleanCommand,
|
|
26
26
|
],
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
// @rnx-kit/align-deps
|
|
29
|
+
exports.rnxAlignDeps = align_deps_1.alignDepsCommand.func;
|
|
30
|
+
exports.rnxAlignDepsCommand = align_deps_1.alignDepsCommand;
|
|
31
31
|
var build_2 = require("./build");
|
|
32
32
|
Object.defineProperty(exports, "rnxBuild", { enumerable: true, get: function () { return build_2.rnxBuild; } });
|
|
33
33
|
Object.defineProperty(exports, "rnxBuildCommand", { enumerable: true, get: function () { return build_2.rnxBuildCommand; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rnx-kit/cli",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.7",
|
|
4
4
|
"description": "Command-line interface for working with kit packages in your repo",
|
|
5
5
|
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/cli#readme",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"test": "rnx-kit-scripts test"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@rnx-kit/align-deps": "^2.5.
|
|
43
|
+
"@rnx-kit/align-deps": "^2.5.5",
|
|
44
44
|
"@rnx-kit/config": "^0.6.6",
|
|
45
45
|
"@rnx-kit/console": "^1.1.0",
|
|
46
46
|
"@rnx-kit/metro-plugin-cyclic-dependencies-detector": "^1.1.1",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@rnx-kit/tools-apple": "^0.1.2",
|
|
55
55
|
"@rnx-kit/tools-language": "^2.0.0",
|
|
56
56
|
"@rnx-kit/tools-node": "^2.1.1",
|
|
57
|
-
"@rnx-kit/tools-react-native": "^1.4.
|
|
57
|
+
"@rnx-kit/tools-react-native": "^1.4.2",
|
|
58
58
|
"commander": "^11.1.0",
|
|
59
59
|
"ora": "^5.4.1",
|
|
60
60
|
"qrcode": "^1.5.0"
|
package/lib/align-deps.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Config as CLIConfig } from "@react-native-community/cli-types";
|
|
2
|
-
type CLIArgs = Record<string, string | number | boolean | undefined>;
|
|
3
|
-
export declare function rnxAlignDeps(_argv: string[], _config: CLIConfig, args: CLIArgs): void;
|
|
4
|
-
export declare const rnxAlignDepsCommand: {
|
|
5
|
-
name: string;
|
|
6
|
-
description: string;
|
|
7
|
-
func: typeof rnxAlignDeps;
|
|
8
|
-
options: {
|
|
9
|
-
name: string;
|
|
10
|
-
description: string;
|
|
11
|
-
}[];
|
|
12
|
-
};
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=align-deps.d.ts.map
|
package/lib/align-deps.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.rnxAlignDepsCommand = void 0;
|
|
4
|
-
exports.rnxAlignDeps = rnxAlignDeps;
|
|
5
|
-
const align_deps_1 = require("@rnx-kit/align-deps");
|
|
6
|
-
const properties_1 = require("@rnx-kit/tools-language/properties");
|
|
7
|
-
const optionsMap = {
|
|
8
|
-
"exclude-packages": "excludePackages",
|
|
9
|
-
init: "init",
|
|
10
|
-
presets: "presets",
|
|
11
|
-
requirements: "requirements",
|
|
12
|
-
"set-version": "setVersion",
|
|
13
|
-
};
|
|
14
|
-
function rnxAlignDeps(_argv, _config, args) {
|
|
15
|
-
(0, align_deps_1.cli)({
|
|
16
|
-
...(0, properties_1.pickValues)(args, Object.values(optionsMap), Object.keys(optionsMap)),
|
|
17
|
-
"diff-mode": args.diffMode?.toString(),
|
|
18
|
-
loose: Boolean(args.loose),
|
|
19
|
-
"migrate-config": Boolean(args.migrateConfig),
|
|
20
|
-
"no-unmanaged": Boolean(args.noUnmanaged),
|
|
21
|
-
verbose: Boolean(args.verbose),
|
|
22
|
-
write: Boolean(args.write),
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
exports.rnxAlignDepsCommand = {
|
|
26
|
-
name: "rnx-align-deps",
|
|
27
|
-
description: "Manage dependencies within a repository and across many repositories",
|
|
28
|
-
func: rnxAlignDeps,
|
|
29
|
-
options: [
|
|
30
|
-
{
|
|
31
|
-
name: `--diff-mode <${align_deps_1.cliOptions["diff-mode"].choices.join("|")}>`,
|
|
32
|
-
description: align_deps_1.cliOptions["diff-mode"].description,
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: "--exclude-packages <packages>",
|
|
36
|
-
description: align_deps_1.cliOptions["exclude-packages"].description,
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: `--init <${align_deps_1.cliOptions.init.choices?.join("|")}>`,
|
|
40
|
-
description: align_deps_1.cliOptions.init.description,
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: "--loose",
|
|
44
|
-
description: align_deps_1.cliOptions.loose.description,
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
name: "--migrate-config",
|
|
48
|
-
description: align_deps_1.cliOptions["migrate-config"].description,
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
name: "--no-unmanaged",
|
|
52
|
-
description: align_deps_1.cliOptions["no-unmanaged"].description,
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
name: "--presets <presets>",
|
|
56
|
-
description: align_deps_1.cliOptions.presets.description,
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
name: "--requirements <requirements>",
|
|
60
|
-
description: align_deps_1.cliOptions.requirements.description,
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
name: "--set-version [versions]",
|
|
64
|
-
description: align_deps_1.cliOptions["set-version"].description,
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
name: "--verbose",
|
|
68
|
-
description: align_deps_1.cliOptions.verbose.description,
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
name: "--write",
|
|
72
|
-
description: align_deps_1.cliOptions.write.description,
|
|
73
|
-
},
|
|
74
|
-
],
|
|
75
|
-
};
|
|
76
|
-
//# sourceMappingURL=align-deps.js.map
|