@rnx-kit/cli 0.18.1 → 0.18.2
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/apple.js +9 -2
- package/lib/build/ccache.d.ts +3 -0
- package/lib/build/ccache.js +47 -0
- package/lib/build/watcher.js +1 -1
- package/lib/build.d.ts +6 -6
- package/lib/build.js +11 -0
- package/lib/run.d.ts +5 -5
- package/package.json +2 -2
package/lib/build/apple.js
CHANGED
|
@@ -3,10 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.runBuild = runBuild;
|
|
4
4
|
const watcher_1 = require("./watcher");
|
|
5
5
|
function runBuild(xcworkspace, buildParams, logger) {
|
|
6
|
-
return import("@rnx-kit/tools-apple").then(({ xcodebuild }) => {
|
|
6
|
+
return import("@rnx-kit/tools-apple").then(({ checkPodsManifestLock, xcodebuild }) => {
|
|
7
|
+
if (!checkPodsManifestLock(xcworkspace)) {
|
|
8
|
+
logger.fail("CocoaPods sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.");
|
|
9
|
+
return Promise.resolve(1);
|
|
10
|
+
}
|
|
7
11
|
const log = (message) => logger.info(message);
|
|
8
12
|
const build = xcodebuild(xcworkspace, buildParams, log);
|
|
9
|
-
return (0, watcher_1.watch)(build, logger, () => ({
|
|
13
|
+
return (0, watcher_1.watch)(build, logger, () => ({
|
|
14
|
+
xcworkspace,
|
|
15
|
+
args: build.spawnargs,
|
|
16
|
+
}));
|
|
10
17
|
});
|
|
11
18
|
}
|
|
12
19
|
//# sourceMappingURL=apple.js.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.setCcacheDir = setCcacheDir;
|
|
27
|
+
exports.setCcacheHome = setCcacheHome;
|
|
28
|
+
const fs = __importStar(require("node:fs"));
|
|
29
|
+
const path = __importStar(require("node:path"));
|
|
30
|
+
function setCcacheDir(dir) {
|
|
31
|
+
if (!fs.existsSync(dir)) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
process.env["CCACHE_DIR"] = dir;
|
|
35
|
+
return dir;
|
|
36
|
+
}
|
|
37
|
+
function setCcacheHome(dir) {
|
|
38
|
+
if (!fs.existsSync(dir)) {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
process.env["CC"] = path.join(dir, "libexec", "clang");
|
|
42
|
+
process.env["CXX"] = path.join(dir, "libexec", "clang++");
|
|
43
|
+
process.env["CMAKE_C_COMPILER_LAUNCHER"] = path.join(dir, "bin", "ccache");
|
|
44
|
+
process.env["CMAKE_CXX_COMPILER_LAUNCHER"] = path.join(dir, "bin", "ccache");
|
|
45
|
+
return dir;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=ccache.js.map
|
package/lib/build/watcher.js
CHANGED
package/lib/build.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Config } from "@react-native-community/cli-types";
|
|
2
|
+
import { setCcacheDir } from "./build/ccache";
|
|
2
3
|
import type { BuildConfiguration, DeviceType, InputParams } from "./build/types";
|
|
3
4
|
declare function asConfiguration(configuration: string): BuildConfiguration;
|
|
4
5
|
declare function asDestination(destination: string): DeviceType;
|
|
5
|
-
declare function asSupportedPlatform(platform: string): InputParams["platform"];
|
|
6
6
|
export declare function rnxBuild(_argv: string[], config: Config, buildParams: InputParams): Promise<import("./build/android").BuildResult> | Promise<import("./build/apple").BuildResult>;
|
|
7
7
|
export declare const rnxBuildCommand: {
|
|
8
8
|
name: string;
|
|
@@ -11,13 +11,8 @@ export declare const rnxBuildCommand: {
|
|
|
11
11
|
options: ({
|
|
12
12
|
name: string;
|
|
13
13
|
description: string;
|
|
14
|
-
parse: typeof asSupportedPlatform;
|
|
15
14
|
default?: undefined;
|
|
16
|
-
} | {
|
|
17
|
-
name: string;
|
|
18
|
-
description: string;
|
|
19
15
|
parse?: undefined;
|
|
20
|
-
default?: undefined;
|
|
21
16
|
} | {
|
|
22
17
|
name: string;
|
|
23
18
|
description: string;
|
|
@@ -28,6 +23,11 @@ export declare const rnxBuildCommand: {
|
|
|
28
23
|
description: string;
|
|
29
24
|
default: string;
|
|
30
25
|
parse: typeof asDestination;
|
|
26
|
+
} | {
|
|
27
|
+
name: string;
|
|
28
|
+
description: string;
|
|
29
|
+
parse: typeof setCcacheDir;
|
|
30
|
+
default?: undefined;
|
|
31
31
|
})[];
|
|
32
32
|
};
|
|
33
33
|
export {};
|
package/lib/build.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.rnxBuildCommand = void 0;
|
|
|
4
4
|
exports.rnxBuild = rnxBuild;
|
|
5
5
|
const commander_1 = require("commander");
|
|
6
6
|
const android_1 = require("./build/android");
|
|
7
|
+
const ccache_1 = require("./build/ccache");
|
|
7
8
|
const ios_1 = require("./build/ios");
|
|
8
9
|
const macos_1 = require("./build/macos");
|
|
9
10
|
function asConfiguration(configuration) {
|
|
@@ -77,6 +78,16 @@ exports.rnxBuildCommand = {
|
|
|
77
78
|
default: "simulator",
|
|
78
79
|
parse: asDestination,
|
|
79
80
|
},
|
|
81
|
+
{
|
|
82
|
+
name: "--ccache-dir <string>",
|
|
83
|
+
description: "Path to Ccache config",
|
|
84
|
+
parse: ccache_1.setCcacheDir,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "--ccache-home <string>",
|
|
88
|
+
description: "Path to Ccache installation",
|
|
89
|
+
parse: ccache_1.setCcacheHome,
|
|
90
|
+
},
|
|
80
91
|
],
|
|
81
92
|
};
|
|
82
93
|
//# sourceMappingURL=build.js.map
|
package/lib/run.d.ts
CHANGED
|
@@ -8,13 +8,8 @@ export declare const rnxRunCommand: {
|
|
|
8
8
|
options: ({
|
|
9
9
|
name: string;
|
|
10
10
|
description: string;
|
|
11
|
-
parse: (platform: string) => InputParams["platform"];
|
|
12
11
|
default?: undefined;
|
|
13
|
-
} | {
|
|
14
|
-
name: string;
|
|
15
|
-
description: string;
|
|
16
12
|
parse?: undefined;
|
|
17
|
-
default?: undefined;
|
|
18
13
|
} | {
|
|
19
14
|
name: string;
|
|
20
15
|
description: string;
|
|
@@ -25,6 +20,11 @@ export declare const rnxRunCommand: {
|
|
|
25
20
|
description: string;
|
|
26
21
|
default: string;
|
|
27
22
|
parse: (destination: string) => import("./build/types").DeviceType;
|
|
23
|
+
} | {
|
|
24
|
+
name: string;
|
|
25
|
+
description: string;
|
|
26
|
+
parse: typeof import("./build/ccache").setCcacheDir;
|
|
27
|
+
default?: undefined;
|
|
28
28
|
})[];
|
|
29
29
|
};
|
|
30
30
|
//# sourceMappingURL=run.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rnx-kit/cli",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.2",
|
|
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",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@rnx-kit/metro-service": "^4.0.1",
|
|
51
51
|
"@rnx-kit/third-party-notices": "^2.0.0",
|
|
52
52
|
"@rnx-kit/tools-android": "^0.2.0",
|
|
53
|
-
"@rnx-kit/tools-apple": "^0.2.
|
|
53
|
+
"@rnx-kit/tools-apple": "^0.2.1",
|
|
54
54
|
"@rnx-kit/tools-language": "^3.0.0",
|
|
55
55
|
"@rnx-kit/tools-node": "^3.0.0",
|
|
56
56
|
"@rnx-kit/tools-react-native": "^2.0.0",
|