@rnx-kit/cli 1.0.0 → 1.0.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.
@@ -1,5 +1,5 @@
1
1
  import type { ChildProcessWithoutNullStreams } from "node:child_process";
2
2
  import type { Ora } from "ora";
3
3
  export type ExitCode = number | null;
4
- export declare function watch<T>(subproc: ChildProcessWithoutNullStreams, logger: Ora, onSuccess: () => T): Promise<ExitCode | T>;
4
+ export declare function watch<T>(subproc: ChildProcessWithoutNullStreams, logger: Ora, onSuccess: () => T): Promise<T | ExitCode>;
5
5
  //# sourceMappingURL=watcher.d.ts.map
package/lib/build.d.ts CHANGED
@@ -4,7 +4,7 @@ import { setCcacheDir } from "./build/ccache.ts";
4
4
  import type { BuildConfiguration, DeviceType, InputParams } from "./build/types.ts";
5
5
  declare function asConfiguration(configuration: string): BuildConfiguration;
6
6
  declare function asDestination(destination: string): DeviceType;
7
- export declare function rnxBuild(argv: string[], config: Config, buildParams: InputParams): Promise<import("./build/android.ts").BuildResult> | Promise<import("./build/apple.ts").BuildResult> | Promise<import("./build/windows.ts").BuildResult>;
7
+ export declare function rnxBuild(argv: string[], config: Config, buildParams: InputParams): Promise<import("./build/android.ts").BuildResult> | Promise<import("./build/apple").BuildResult> | Promise<import("./build/windows.ts").BuildResult>;
8
8
  export declare const rnxBuildCommand: {
9
9
  [RNX_FAST_PATH]: boolean;
10
10
  name: string;
@@ -3,8 +3,8 @@ import { asBoolean, asNumber, asTransformProfile } from "../helpers/parsers.ts";
3
3
  export declare const commonBundleCommandOptions: ({
4
4
  name: string;
5
5
  description: string;
6
- parse?: undefined;
7
6
  default?: undefined;
7
+ parse?: undefined;
8
8
  } | {
9
9
  name: string;
10
10
  description: string;
@@ -26,14 +26,14 @@ export declare const commonBundleCommandOptions: ({
26
26
  default: string;
27
27
  parse?: undefined;
28
28
  } | {
29
+ default?: undefined;
29
30
  name: string;
30
31
  description: string;
31
32
  parse: typeof asNumber;
32
- default?: undefined;
33
33
  } | {
34
+ default?: undefined;
34
35
  name: string;
35
36
  description: string;
36
37
  parse: typeof asTransformProfile;
37
- default?: undefined;
38
38
  })[];
39
39
  //# sourceMappingURL=cliOptions.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { BundleParameters } from "@rnx-kit/config";
1
+ import type { BundleParameters } from "@rnx-kit/types-bundle-config";
2
2
  type DefaultPlugins = Pick<Required<BundleParameters>, "plugins" | "treeShake">;
3
3
  export declare function getDefaultBundlerPlugins(): DefaultPlugins;
4
4
  export {};
@@ -1,4 +1,4 @@
1
1
  import type { Config as CLIConfig } from "@react-native-community/cli-types";
2
- import type { HermesOptions } from "@rnx-kit/config";
2
+ import type { HermesOptions } from "@rnx-kit/types-bundle-config";
3
3
  export declare function emitBytecode(cliConfig: CLIConfig, input: string, sourcemap: string | undefined, options: HermesOptions): void;
4
4
  //# sourceMappingURL=hermes.d.ts.map
@@ -119,7 +119,7 @@ function emitBytecode(cliConfig, input, sourcemap, options) {
119
119
  const compilerSourcemap = JSON.parse(fs.readFileSync(outputMap, options));
120
120
  const { composeSourceMaps } = (0, metro_1.requireModuleFromMetro)("metro-source-map");
121
121
  const composed = composeSourceMaps([packagerSourcemap, compilerSourcemap]);
122
- (0, tools_filesystem_1.writeJSONFile)(outputMap, composed, 0);
122
+ (0, tools_filesystem_1.writeJSONFileSync)(outputMap, composed, 0);
123
123
  }
124
124
  }
125
125
  //# sourceMappingURL=hermes.js.map
@@ -1,4 +1,4 @@
1
- import type { AllPlatforms } from "@rnx-kit/tools-react-native/platform";
1
+ import type { AllPlatforms } from "@rnx-kit/types-bundle-config";
2
2
  import type { CliPlatformBundleConfig } from "./types.ts";
3
3
  /**
4
4
  * Get the list of target platforms for bundling.
@@ -19,5 +19,5 @@ export declare function getTargetPlatforms(overridePlatform?: AllPlatforms, targ
19
19
  * @param overridePlatform Override platform, typically from the command-line. When given, this overrides the list of target platforms.
20
20
  * @returns Array of platform-specific bundle configurations
21
21
  */
22
- export declare function getCliPlatformBundleConfigs(id?: string, overridePlatform?: AllPlatforms, kitConfig?: import("@rnx-kit/config").KitConfig | undefined): CliPlatformBundleConfig[];
22
+ export declare function getCliPlatformBundleConfigs(id?: string, overridePlatform?: AllPlatforms, kitConfig?: import("@rnx-kit/types-kit-config").KitConfig | undefined): CliPlatformBundleConfig[];
23
23
  //# sourceMappingURL=kit-config.d.ts.map
@@ -74,12 +74,12 @@ async function metroBundle(metroConfig, bundleConfig, dev, minify, output = metr
74
74
  minify,
75
75
  };
76
76
  // ensure all output directories exist
77
- (0, tools_filesystem_1.ensureDir)(path.dirname(metroBundleArgs.bundleOutput), fs);
77
+ (0, tools_filesystem_1.ensureDirSync)(path.dirname(metroBundleArgs.bundleOutput), fs);
78
78
  if (metroBundleArgs.sourcemapOutput) {
79
- (0, tools_filesystem_1.ensureDir)(path.dirname(metroBundleArgs.sourcemapOutput), fs);
79
+ (0, tools_filesystem_1.ensureDirSync)(path.dirname(metroBundleArgs.sourcemapOutput), fs);
80
80
  }
81
81
  if (metroBundleArgs.assetsDest) {
82
- (0, tools_filesystem_1.ensureDir)(metroBundleArgs.assetsDest, fs);
82
+ (0, tools_filesystem_1.ensureDirSync)(metroBundleArgs.assetsDest, fs);
83
83
  }
84
84
  // create the bundle
85
85
  await output(metroBundleArgs, metroConfig);
@@ -1,6 +1,5 @@
1
- import type { BundleParameters } from "@rnx-kit/config";
2
1
  import type { BundleArgs } from "@rnx-kit/metro-service";
3
- import type { AllPlatforms } from "@rnx-kit/tools-react-native/platform";
2
+ import type { AllPlatforms, BundleParameters } from "@rnx-kit/types-bundle-config";
4
3
  import type { TransformProfile } from "metro-babel-transformer";
5
4
  export type CLICommonBundleOptions = {
6
5
  id?: string;
package/lib/bundle.d.ts CHANGED
@@ -12,8 +12,8 @@ export declare const rnxBundleCommand: {
12
12
  options: ({
13
13
  name: string;
14
14
  description: string;
15
- parse?: undefined;
16
15
  default?: undefined;
16
+ parse?: undefined;
17
17
  } | {
18
18
  name: string;
19
19
  description: string;
package/lib/clean.d.ts CHANGED
@@ -11,20 +11,20 @@ export declare const rnxCleanCommand: {
11
11
  func: typeof rnxClean;
12
12
  description: string;
13
13
  options: ({
14
+ parse?: undefined;
14
15
  name: string;
15
16
  description: string;
16
17
  default: string;
17
- parse?: undefined;
18
18
  } | {
19
19
  name: string;
20
20
  description: string;
21
21
  default: string;
22
22
  parse: typeof asResolvedPath;
23
23
  } | {
24
+ parse?: undefined;
24
25
  name: string;
25
26
  description: string;
26
27
  default: boolean;
27
- parse?: undefined;
28
28
  })[];
29
29
  };
30
30
  export {};
@@ -1,7 +1,7 @@
1
1
  import type { Config as CLIConfig } from "@react-native-community/cli-types";
2
- import type { PackageManifest } from "@rnx-kit/tools-node/package";
3
- import type { AllPlatforms } from "@rnx-kit/tools-react-native";
4
2
  import { parsePlatform } from "@rnx-kit/tools-react-native";
3
+ import type { AllPlatforms } from "@rnx-kit/types-bundle-config";
4
+ import type { PackageManifest } from "@rnx-kit/types-node";
5
5
  import * as nodefs from "node:fs";
6
6
  export type AndroidArchive = {
7
7
  targetName?: string;
@@ -105,20 +105,20 @@ export declare const rnxCopyAssetsCommand: {
105
105
  description: string;
106
106
  func: (_argv: string[], config: CLIConfig, options: Options) => Promise<void>;
107
107
  options: ({
108
+ default?: undefined;
108
109
  name: string;
109
110
  description: string;
110
111
  parse: typeof parsePlatform;
111
- default?: undefined;
112
112
  } | {
113
+ default?: undefined;
114
+ parse?: undefined;
113
115
  name: string;
114
116
  description: string;
115
- parse?: undefined;
116
- default?: undefined;
117
117
  } | {
118
+ parse?: undefined;
118
119
  name: string;
119
120
  description: string;
120
121
  default: boolean;
121
- parse?: undefined;
122
122
  })[];
123
123
  };
124
124
  //# sourceMappingURL=copy-assets.d.ts.map
@@ -161,7 +161,7 @@ async function assembleAarBundle(context, packageName, { aar }, fs = nodefs) {
161
161
  ...customEnv,
162
162
  };
163
163
  const outputDir = path.join(context.options.assetsDest, "aar");
164
- (0, tools_filesystem_1.ensureDir)(outputDir);
164
+ (0, tools_filesystem_1.ensureDirSync)(outputDir, fs);
165
165
  const dest = path.join(outputDir, `${targetName}-${version}.aar`);
166
166
  const targets = [`:${targetName}:assembleRelease`];
167
167
  const targetsToCopy = [[output, dest]];
@@ -234,7 +234,7 @@ async function assembleAarBundle(context, packageName, { aar }, fs = nodefs) {
234
234
  `project(":${targetName}").projectDir = file(${JSON.stringify(androidProject)})`,
235
235
  "",
236
236
  ].join("\n");
237
- (0, tools_filesystem_1.ensureDir)(buildDir);
237
+ (0, tools_filesystem_1.ensureDirSync)(buildDir, fs);
238
238
  fs.writeFileSync(path.join(buildDir, "build.gradle"), buildGradle);
239
239
  fs.writeFileSync(path.join(buildDir, "gradle.properties"), gradleProperties);
240
240
  fs.writeFileSync(path.join(buildDir, "settings.gradle"), settingsGradle);
@@ -247,7 +247,7 @@ function copyFiles(files, destination, fs = nodefs) {
247
247
  if (!Array.isArray(files) || files.length === 0) {
248
248
  return [];
249
249
  }
250
- (0, tools_filesystem_1.ensureDir)(destination, fs);
250
+ (0, tools_filesystem_1.ensureDirSync)(destination, fs);
251
251
  return files.map((file) => {
252
252
  return cp_r(file, `${destination}/${path.basename(file)}`, fs);
253
253
  });
@@ -1,4 +1,4 @@
1
- import type { BundleParameters } from "@rnx-kit/config";
1
+ import type { BundleParameters } from "@rnx-kit/types-bundle-config";
2
2
  import type { ConfigT } from "metro-config";
3
3
  type MetroExtraParams = Pick<BundleParameters, "detectCyclicDependencies" | "detectDuplicateDependencies" | "typescriptValidation" | "plugins" | "treeShake">;
4
4
  /**
@@ -11,8 +11,8 @@ export declare const rnxRamBundleCommand: {
11
11
  options: ({
12
12
  name: string;
13
13
  description: string;
14
- parse?: undefined;
15
14
  default?: undefined;
15
+ parse?: undefined;
16
16
  } | {
17
17
  name: string;
18
18
  description: string;
@@ -22,11 +22,11 @@ export declare const rnxRamBundleCommand: {
22
22
  name: string;
23
23
  description: string;
24
24
  default: boolean;
25
- parse: typeof import("./helpers/parsers.ts").asBoolean;
25
+ parse: typeof import("./helpers/parsers").asBoolean;
26
26
  } | {
27
27
  name: string;
28
28
  description: string;
29
- parse: typeof import("./helpers/parsers.ts").asBoolean;
29
+ parse: typeof import("./helpers/parsers").asBoolean;
30
30
  default?: undefined;
31
31
  } | {
32
32
  name: string;
@@ -36,12 +36,12 @@ export declare const rnxRamBundleCommand: {
36
36
  } | {
37
37
  name: string;
38
38
  description: string;
39
- parse: typeof import("./helpers/parsers.ts").asNumber;
39
+ parse: typeof import("./helpers/parsers").asNumber;
40
40
  default?: undefined;
41
41
  } | {
42
42
  name: string;
43
43
  description: string;
44
- parse: typeof import("./helpers/parsers.ts").asTransformProfile;
44
+ parse: typeof import("./helpers/parsers").asTransformProfile;
45
45
  default?: undefined;
46
46
  })[];
47
47
  };
package/lib/run.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { Config } from "@react-native-community/cli-types";
2
2
  import { RNX_FAST_PATH } from "./bin/constants.ts";
3
3
  import type { InputParams } from "./build/types.ts";
4
- export declare function rnxRun(argv: string[], config: Config, buildParams: InputParams): Promise<import("./build/windows.ts").BuildResult> | Promise<void>;
4
+ export declare function rnxRun(argv: string[], config: Config, buildParams: InputParams): Promise<void> | Promise<import("./build/windows").BuildResult>;
5
5
  export declare const rnxRunCommand: {
6
6
  [RNX_FAST_PATH]: boolean;
7
7
  name: string;
@@ -25,7 +25,7 @@ export declare const rnxRunCommand: {
25
25
  } | {
26
26
  name: string;
27
27
  description: string;
28
- parse: typeof import("./build/ccache.ts").setCcacheDir;
28
+ parse: typeof import("./build/ccache").setCcacheDir;
29
29
  default?: undefined;
30
30
  })[];
31
31
  };
@@ -1,4 +1,4 @@
1
- import type { ServerConfig } from "@rnx-kit/config";
1
+ import type { ServerConfig } from "@rnx-kit/types-bundle-config";
2
2
  type ServerConfigOverrides = Pick<ServerConfig, "projectRoot" | "assetPlugins" | "sourceExts"> & {
3
3
  id?: string;
4
4
  };
package/lib/start.d.ts CHANGED
@@ -17,25 +17,25 @@ export declare const rnxStartCommand: {
17
17
  default: string;
18
18
  parse?: undefined;
19
19
  } | {
20
+ default?: undefined;
20
21
  name: string;
21
22
  description: string;
22
23
  parse: typeof asResolvedPath;
23
- default?: undefined;
24
24
  } | {
25
+ default?: undefined;
25
26
  name: string;
26
27
  description: string;
27
28
  parse: (val: string) => string[];
28
- default?: undefined;
29
29
  } | {
30
+ default?: undefined;
30
31
  name: string;
31
32
  description: string;
32
33
  parse: typeof asNumber;
33
- default?: undefined;
34
34
  } | {
35
+ default?: undefined;
36
+ parse?: undefined;
35
37
  name: string;
36
38
  description: string;
37
- parse?: undefined;
38
- default?: undefined;
39
39
  })[];
40
40
  };
41
41
  //# sourceMappingURL=start.d.ts.map
package/lib/test.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Config as CLIConfig } from "@react-native-community/cli-types";
2
- import type { AllPlatforms } from "@rnx-kit/tools-react-native/platform";
2
+ import type { AllPlatforms } from "@rnx-kit/types-bundle-config";
3
3
  type Args = {
4
4
  platform: AllPlatforms;
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rnx-kit/cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.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",
@@ -40,22 +40,25 @@
40
40
  "test": "rnx-kit-scripts test"
41
41
  },
42
42
  "dependencies": {
43
- "@rnx-kit/align-deps": "^3.3.3",
44
- "@rnx-kit/config": "^0.7.0",
43
+ "@rnx-kit/align-deps": "^3.4.2",
44
+ "@rnx-kit/config": "^0.7.5",
45
45
  "@rnx-kit/console": "^2.0.0",
46
- "@rnx-kit/metro-plugin-cyclic-dependencies-detector": "^2.0.0",
47
- "@rnx-kit/metro-plugin-duplicates-checker": "^3.0.0",
48
- "@rnx-kit/metro-plugin-typescript": "^0.5.3",
46
+ "@rnx-kit/metro-plugin-cyclic-dependencies-detector": "^2.0.3",
47
+ "@rnx-kit/metro-plugin-duplicates-checker": "^3.0.3",
48
+ "@rnx-kit/metro-plugin-typescript": "^0.5.4",
49
49
  "@rnx-kit/metro-serializer": "^2.0.0",
50
- "@rnx-kit/metro-serializer-esbuild": "^0.3.0",
50
+ "@rnx-kit/metro-serializer-esbuild": "^0.3.1",
51
51
  "@rnx-kit/metro-service": "^4.1.3",
52
52
  "@rnx-kit/third-party-notices": "^2.0.0",
53
53
  "@rnx-kit/tools-android": "^0.2.2",
54
54
  "@rnx-kit/tools-apple": "^0.2.2",
55
- "@rnx-kit/tools-filesystem": "^0.1.0",
55
+ "@rnx-kit/tools-filesystem": "^0.2.0",
56
56
  "@rnx-kit/tools-language": "^3.0.1",
57
- "@rnx-kit/tools-node": "^3.0.3",
58
- "@rnx-kit/tools-react-native": "^2.3.2",
57
+ "@rnx-kit/tools-node": "^3.0.4",
58
+ "@rnx-kit/tools-react-native": "^2.3.4",
59
+ "@rnx-kit/types-bundle-config": "^1.0.0",
60
+ "@rnx-kit/types-kit-config": "^1.0.0",
61
+ "@rnx-kit/types-node": "^1.0.0",
59
62
  "commander": "^11.1.0",
60
63
  "ora": "^5.4.1",
61
64
  "qrcode": "^1.5.0"
@@ -85,11 +88,12 @@
85
88
  "@types/node": "^24.0.0",
86
89
  "@types/qrcode": "^1.4.2",
87
90
  "markdown-table": "^3.0.0",
88
- "metro": "^0.83.1",
91
+ "memfs": "^4.56.10",
92
+ "metro": "^0.83.3",
89
93
  "metro-babel-transformer": "^0.83.1",
90
- "metro-config": "^0.83.1",
91
- "react": "19.1.0",
92
- "react-native": "^0.81.0",
94
+ "metro-config": "^0.83.3",
95
+ "react": "19.2.0",
96
+ "react-native": "^0.83.0",
93
97
  "type-fest": "^4.0.0"
94
98
  },
95
99
  "engines": {