@rnx-kit/cli 0.12.7 → 0.14.0

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.
Files changed (83) hide show
  1. package/CHANGELOG.md +104 -0
  2. package/README.md +90 -65
  3. package/coverage/clover.xml +92 -104
  4. package/coverage/coverage-final.json +7 -6
  5. package/coverage/lcov-report/index.html +29 -29
  6. package/coverage/lcov-report/src/bundle/index.html +29 -29
  7. package/coverage/lcov-report/src/bundle/kit-config.ts.html +63 -117
  8. package/coverage/lcov-report/src/bundle/metro.ts.html +40 -163
  9. package/coverage/lcov-report/src/bundle/overrides.ts.html +28 -58
  10. package/coverage/lcov-report/src/bundler-plugin-defaults.ts.html +115 -0
  11. package/coverage/lcov-report/src/copy-assets.ts.html +1 -1
  12. package/coverage/lcov-report/src/index.html +26 -11
  13. package/coverage/lcov-report/src/metro-config.ts.html +49 -31
  14. package/coverage/lcov-report/src/typescript/index.html +1 -1
  15. package/coverage/lcov-report/src/typescript/project-cache.ts.html +5 -5
  16. package/coverage/lcov.info +173 -193
  17. package/lib/bundle/kit-config.d.ts +9 -15
  18. package/lib/bundle/kit-config.d.ts.map +1 -1
  19. package/lib/bundle/kit-config.js +29 -43
  20. package/lib/bundle/kit-config.js.map +1 -1
  21. package/lib/bundle/metro.d.ts +7 -11
  22. package/lib/bundle/metro.d.ts.map +1 -1
  23. package/lib/bundle/metro.js +10 -40
  24. package/lib/bundle/metro.js.map +1 -1
  25. package/lib/bundle/overrides.d.ts +11 -9
  26. package/lib/bundle/overrides.d.ts.map +1 -1
  27. package/lib/bundle/overrides.js +10 -18
  28. package/lib/bundle/overrides.js.map +1 -1
  29. package/lib/bundle/types.d.ts +4 -17
  30. package/lib/bundle/types.d.ts.map +1 -1
  31. package/lib/bundle.d.ts +8 -7
  32. package/lib/bundle.d.ts.map +1 -1
  33. package/lib/bundle.js +3 -19
  34. package/lib/bundle.js.map +1 -1
  35. package/lib/bundler-plugin-defaults.d.ts +3 -0
  36. package/lib/bundler-plugin-defaults.d.ts.map +1 -0
  37. package/lib/bundler-plugin-defaults.js +13 -0
  38. package/lib/bundler-plugin-defaults.js.map +1 -0
  39. package/lib/index.d.ts +1 -1
  40. package/lib/index.d.ts.map +1 -1
  41. package/lib/index.js +2 -1
  42. package/lib/index.js.map +1 -1
  43. package/lib/metro-config.d.ts +3 -2
  44. package/lib/metro-config.d.ts.map +1 -1
  45. package/lib/metro-config.js +7 -5
  46. package/lib/metro-config.js.map +1 -1
  47. package/lib/parsers.d.ts +2 -0
  48. package/lib/parsers.d.ts.map +1 -1
  49. package/lib/parsers.js +16 -1
  50. package/lib/parsers.js.map +1 -1
  51. package/lib/serve/kit-config.d.ts +6 -5
  52. package/lib/serve/kit-config.d.ts.map +1 -1
  53. package/lib/serve/kit-config.js +16 -6
  54. package/lib/serve/kit-config.js.map +1 -1
  55. package/lib/start.d.ts +2 -2
  56. package/lib/start.d.ts.map +1 -1
  57. package/lib/start.js +3 -9
  58. package/lib/start.js.map +1 -1
  59. package/package.json +8 -6
  60. package/react-native.config.js +66 -59
  61. package/src/bundle/kit-config.ts +42 -60
  62. package/src/bundle/metro.ts +15 -56
  63. package/src/bundle/overrides.ts +24 -34
  64. package/src/bundle/types.ts +17 -23
  65. package/src/bundle.ts +18 -36
  66. package/src/bundler-plugin-defaults.ts +10 -0
  67. package/src/index.ts +1 -1
  68. package/src/metro-config.ts +12 -6
  69. package/src/parsers.ts +19 -0
  70. package/src/serve/kit-config.ts +23 -11
  71. package/src/start.ts +7 -13
  72. package/test/bundle/__mocks__/@rnx-kit/config.js +2 -3
  73. package/test/bundle/__mocks__/@rnx-kit/console.js +1 -0
  74. package/test/bundle/__mocks__/@rnx-kit/metro-service.js +1 -0
  75. package/test/bundle/kit-config.test.ts +102 -100
  76. package/test/bundle/metro.test.ts +58 -98
  77. package/test/bundle/overrides.test.ts +29 -25
  78. package/test/copy-assets/assembleAarBundle.test.ts +1 -0
  79. package/lib/types.d.ts +0 -5
  80. package/lib/types.d.ts.map +0 -1
  81. package/lib/types.js +0 -3
  82. package/lib/types.js.map +0 -1
  83. package/src/types.ts +0 -4
@@ -14,10 +14,11 @@ const project_cache_1 = require("./typescript/project-cache");
14
14
  * Source file in node_modules (external packages) are ignored.
15
15
  *
16
16
  * @param options TypeScript validation options
17
+ * @param print Optional function to use when printing status messages to the Metro console
17
18
  * @returns Hook function
18
19
  */
19
- function createSerializerHook(options) {
20
- const projectCache = (0, project_cache_1.createProjectCache)(options.print);
20
+ function createSerializerHook(options, print) {
21
+ const projectCache = (0, project_cache_1.createProjectCache)(print);
21
22
  const patternNodeModules = /[/\\]node_modules[/\\]/;
22
23
  const excludeNodeModules = (p) => !patternNodeModules.test(p);
23
24
  const hook = (graph, delta) => {
@@ -83,8 +84,9 @@ const emptySerializerHook = (_graph, _delta) => {
83
84
  * @param detectDuplicateDependencies When true, duplicate dependency checking is enabled with a default set of options. Otherwise, the object allows for fine-grained control over the detection process.
84
85
  * @param typescriptValidation When true, TypeScript type-checking is enabled with a default set of options. Otherwise, the object allows for fine-grained control over the type-checking process.
85
86
  * @param treeShake When true, tree shaking is enabled.
87
+ * @param print Optional function to use when printing status messages to the Metro console
86
88
  */
87
- function customizeMetroConfig(metroConfigReadonly, detectCyclicDependencies, detectDuplicateDependencies, typescriptValidation, treeShake) {
89
+ function customizeMetroConfig(metroConfigReadonly, detectCyclicDependencies, detectDuplicateDependencies, typescriptValidation, treeShake, print) {
88
90
  // We will be making changes to the Metro configuration. Coerce from a
89
91
  // type with readonly props to a type where the props are writeable.
90
92
  const metroConfig = metroConfigReadonly;
@@ -123,10 +125,10 @@ function customizeMetroConfig(metroConfigReadonly, detectCyclicDependencies, det
123
125
  }
124
126
  let hook = emptySerializerHook;
125
127
  if (typeof typescriptValidation === "object") {
126
- hook = createSerializerHook(typescriptValidation);
128
+ hook = createSerializerHook(typescriptValidation, print);
127
129
  }
128
130
  else if (typescriptValidation !== false) {
129
- hook = createSerializerHook({});
131
+ hook = createSerializerHook({}, print);
130
132
  }
131
133
  metroConfig.serializer.experimentalSerializerHook = hook;
132
134
  }
@@ -1 +1 @@
1
- {"version":3,"file":"metro-config.js","sourceRoot":"","sources":["../src/metro-config.ts"],"names":[],"mappings":";;;AAAA,kHAG4D;AAC5D,8FAGkD;AAClD,gEAAyE;AACzE,gFAG2C;AAI3C,8DAAgE;AAMhE;;;;;;;;;GASG;AACH,SAAS,oBAAoB,CAAC,OAAoC;IAChE,MAAM,YAAY,GAAG,IAAA,kCAAkB,EAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAEvD,MAAM,kBAAkB,GAAG,wBAAwB,CAAC;IACpD,MAAM,kBAAkB,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAEtE,MAAM,IAAI,GAAG,CAAC,KAAY,EAAE,KAAkB,EAAQ,EAAE;QACtD,MAAM,QAAQ,GAAG,KAAK,CAAC,gBAAgB,CAAC,QAAwB,CAAC;QACjE,IAAI,QAAQ,EAAE;YACZ,IAAI,KAAK,CAAC,KAAK,EAAE;gBACf,oEAAoE;gBACpE,oEAAoE;gBACpE,gCAAgC;gBAChC,YAAY,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;aACtC;YAED,uEAAuE;YACvE,8DAA8D;YAC9D,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CACrB,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,EACpB,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CACxB,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;YAE7B,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CACxB,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,EACvB,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CACxB,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;YAE7B,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI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B,KAAK,QAAQ,EAAE;QAChD,OAAO,CAAC,IAAI,CAAC,IAAA,8DAAkB,EAAC,wBAAwB,CAAC,CAAC,CAAC;KAC5D;SAAM,IAAI,wBAAwB,KAAK,KAAK,EAAE;QAC7C,OAAO,CAAC,IAAI,CAAC,IAAA,8DAAkB,GAAE,CAAC,CAAC;KACpC;IAED,IAAI,SAAS,EAAE;QACb,WAAW,CAAC,UAAU,CAAC,gBAAgB,GAAG,IAAA,0CAAsB,EAAC,OAAO,CAAC,CAAC;QAC1E,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,WAAW,EAAE,mDAAwB,CAAC,CAAC;KAClE;SAAM,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;QAC7B,qEAAqE;QACrE,oEAAoE;QACpE,gDAAgD;QAChD,EAAE;QACF,kEAAkE;QAClE,sEAAsE;QACtE,mCAAmC;QACnC,EAAE;QACF,kEAAkE;QAClE,wCAAwC;QACxC,WAAW,CAAC,UAAU,CAAC,gBAAgB,GAAG,IAAA,kCAAe,EACvD,OAAO,CACiC,CAAC;KAC5C;SAAM;QACL,OAAO,WAAW,CAAC,UAAU,CAAC,gBAAgB,CAAC;KAChD;IAED,IAAI,IAAI,GAAG,mBAAmB,CAAC;IAC/B,IAAI,OAAO,oBAAoB,KAAK,QAAQ,EAAE;QAC5C,IAAI,GAAG,oBAAoB,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;KAC1D;SAAM,IAAI,oBAAoB,KAAK,KAAK,EAAE;QACzC,IAAI,GAAG,oBAAoB,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;KACxC;IACD,WAAW,CAAC,UAAU,CAAC,0BAA0B,GAAG,IAAI,CAAC;AAC3D,CAAC;AApDD,oDAoDC"}
package/lib/parsers.d.ts CHANGED
@@ -1,2 +1,4 @@
1
+ import type { TransformProfile } from "metro-babel-transformer";
1
2
  export declare function parseBoolean(val: string): boolean;
3
+ export declare function parseTransformProfile(val: string): TransformProfile;
2
4
  //# sourceMappingURL=parsers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAUjD"}
1
+ {"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAUjD;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAenE"}
package/lib/parsers.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseBoolean = void 0;
3
+ exports.parseTransformProfile = exports.parseBoolean = void 0;
4
4
  function parseBoolean(val) {
5
5
  if (val === "false") {
6
6
  return false;
@@ -11,4 +11,19 @@ function parseBoolean(val) {
11
11
  throw new Error("Invalid boolean value '" + val + "' -- must be true or false");
12
12
  }
13
13
  exports.parseBoolean = parseBoolean;
14
+ function parseTransformProfile(val) {
15
+ const allowedProfiles = [
16
+ "hermes-stable",
17
+ "hermes-canary",
18
+ "default",
19
+ ];
20
+ if (val in allowedProfiles) {
21
+ return val;
22
+ }
23
+ throw new Error("Invalid transform profile '" +
24
+ val +
25
+ "' -- must be one of " +
26
+ allowedProfiles.join(", "));
27
+ }
28
+ exports.parseTransformProfile = parseTransformProfile;
14
29
  //# sourceMappingURL=parsers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parsers.js","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":";;;AAAA,SAAgB,YAAY,CAAC,GAAW;IACtC,IAAI,GAAG,KAAK,OAAO,EAAE;QACnB,OAAO,KAAK,CAAC;KACd;IACD,IAAI,GAAG,KAAK,MAAM,EAAE;QAClB,OAAO,IAAI,CAAC;KACb;IACD,MAAM,IAAI,KAAK,CACb,yBAAyB,GAAG,GAAG,GAAG,4BAA4B,CAC/D,CAAC;AACJ,CAAC;AAVD,oCAUC"}
1
+ {"version":3,"file":"parsers.js","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":";;;AAEA,SAAgB,YAAY,CAAC,GAAW;IACtC,IAAI,GAAG,KAAK,OAAO,EAAE;QACnB,OAAO,KAAK,CAAC;KACd;IACD,IAAI,GAAG,KAAK,MAAM,EAAE;QAClB,OAAO,IAAI,CAAC;KACb;IACD,MAAM,IAAI,KAAK,CACb,yBAAyB,GAAG,GAAG,GAAG,4BAA4B,CAC/D,CAAC;AACJ,CAAC;AAVD,oCAUC;AAED,SAAgB,qBAAqB,CAAC,GAAW;IAC/C,MAAM,eAAe,GAAuB;QAC1C,eAAe;QACf,eAAe;QACf,SAAS;KACV,CAAC;IACF,IAAI,GAAG,IAAI,eAAe,EAAE;QAC1B,OAAO,GAAuB,CAAC;KAChC;IACD,MAAM,IAAI,KAAK,CACb,6BAA6B;QAC3B,GAAG;QACH,sBAAsB;QACtB,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAC7B,CAAC;AACJ,CAAC;AAfD,sDAeC"}
@@ -1,14 +1,15 @@
1
- import type { ServerWithRequiredParameters } from "@rnx-kit/config";
1
+ import type { ServerConfig, BundlerPlugins } from "@rnx-kit/config";
2
2
  export declare type ServerConfigOverrides = {
3
3
  projectRoot?: string;
4
4
  assetPlugins?: string[];
5
5
  sourceExts?: string[];
6
6
  };
7
+ export declare type CliServerConfig = ServerConfig & Required<BundlerPlugins>;
7
8
  /**
8
- * Get the kit's server configuration. Apply any overrides.
9
+ * Get the server configuration from the rnx-kit configuration. Apply any overrides.
9
10
  *
10
- * @param overrides Overrides to apply to the output server configuration. These take precedence over the values in the kit config.
11
- * @returns Overridden server configuration
11
+ * @param overrides Overrides to apply. These take precedence over the values in the rnx-kit configuration.
12
+ * @returns Server configuration
12
13
  */
13
- export declare function getKitServerConfig(overrides: ServerConfigOverrides): ServerWithRequiredParameters;
14
+ export declare function getKitServerConfig(overrides: ServerConfigOverrides): CliServerConfig;
14
15
  //# sourceMappingURL=kit-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"kit-config.d.ts","sourceRoot":"","sources":["../../src/serve/kit-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAIpE,oBAAY,qBAAqB,GAAG;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,qBAAqB,GAC/B,4BAA4B,CAY9B"}
1
+ {"version":3,"file":"kit-config.d.ts","sourceRoot":"","sources":["../../src/serve/kit-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAKpE,oBAAY,qBAAqB,GAAG;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,oBAAY,eAAe,GAAG,YAAY,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC;AAEtE;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,qBAAqB,GAC/B,eAAe,CAqBjB"}
@@ -2,19 +2,29 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getKitServerConfig = void 0;
4
4
  const config_1 = require("@rnx-kit/config");
5
+ const bundler_plugin_defaults_1 = require("../bundler-plugin-defaults");
5
6
  const properties_1 = require("@rnx-kit/tools-language/properties");
6
7
  /**
7
- * Get the kit's server configuration. Apply any overrides.
8
+ * Get the server configuration from the rnx-kit configuration. Apply any overrides.
8
9
  *
9
- * @param overrides Overrides to apply to the output server configuration. These take precedence over the values in the kit config.
10
- * @returns Overridden server configuration
10
+ * @param overrides Overrides to apply. These take precedence over the values in the rnx-kit configuration.
11
+ * @returns Server configuration
11
12
  */
12
13
  function getKitServerConfig(overrides) {
13
14
  const kitConfig = (0, config_1.getKitConfig)();
14
- if (!kitConfig) {
15
- throw new Error("No kit configuration found for this react-native experience");
15
+ let serverConfig = kitConfig === null || kitConfig === void 0 ? void 0 : kitConfig.server;
16
+ if (!serverConfig && kitConfig) {
17
+ const maybeBundleConfig = (0, config_1.getBundleConfig)(kitConfig);
18
+ if (maybeBundleConfig) {
19
+ serverConfig = (0, properties_1.pickValues)(maybeBundleConfig, [
20
+ "detectCyclicDependencies",
21
+ "detectDuplicateDependencies",
22
+ "typescriptValidation",
23
+ //"treeShake", // don't pull in treeShake yet, since it doesn't work with the server
24
+ ]);
25
+ }
16
26
  }
17
- return Object.assign(Object.assign({}, (0, config_1.getServerConfig)(kitConfig)), (0, properties_1.pickValues)(overrides, ["projectRoot", "assetPlugins", "sourceExts"]));
27
+ return Object.assign(Object.assign(Object.assign(Object.assign({}, (0, bundler_plugin_defaults_1.getDefaultBundlerPlugins)()), serverConfig), { treeShake: false }), (0, properties_1.pickValues)(overrides, ["projectRoot", "assetPlugins", "sourceExts"]));
18
28
  }
19
29
  exports.getKitServerConfig = getKitServerConfig;
20
30
  //# sourceMappingURL=kit-config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"kit-config.js","sourceRoot":"","sources":["../../src/serve/kit-config.ts"],"names":[],"mappings":";;;AACA,4CAAgE;AAChE,mEAAgE;AAQhE;;;;;GAKG;AACH,SAAgB,kBAAkB,CAChC,SAAgC;IAEhC,MAAM,SAAS,GAAG,IAAA,qBAAY,GAAE,CAAC;IACjC,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,KAAK,CACb,6DAA6D,CAC9D,CAAC;KACH;IAED,uCACK,IAAA,wBAAe,EAAC,SAAS,CAAC,GAC1B,IAAA,uBAAU,EAAC,SAAS,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC,EACvE;AACJ,CAAC;AAdD,gDAcC"}
1
+ {"version":3,"file":"kit-config.js","sourceRoot":"","sources":["../../src/serve/kit-config.ts"],"names":[],"mappings":";;;AACA,4CAAgE;AAChE,wEAAsE;AACtE,mEAAgE;AAUhE;;;;;GAKG;AACH,SAAgB,kBAAkB,CAChC,SAAgC;IAEhC,MAAM,SAAS,GAAG,IAAA,qBAAY,GAAE,CAAC;IACjC,IAAI,YAAY,GAAG,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,MAAM,CAAC;IACrC,IAAI,CAAC,YAAY,IAAI,SAAS,EAAE;QAC9B,MAAM,iBAAiB,GAAG,IAAA,wBAAe,EAAC,SAAS,CAAC,CAAC;QACrD,IAAI,iBAAiB,EAAE;YACrB,YAAY,GAAG,IAAA,uBAAU,EAAC,iBAAiB,EAAE;gBAC3C,0BAA0B;gBAC1B,6BAA6B;gBAC7B,sBAAsB;gBACtB,qFAAqF;aACtF,CAAC,CAAC;SACJ;KACF;IAED,mEACK,IAAA,kDAAwB,GAAE,GAC1B,YAAY,KACf,SAAS,EAAE,KAAK,KACb,IAAA,uBAAU,EAAC,SAAS,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC,EACvE;AACJ,CAAC;AAvBD,gDAuBC"}
package/lib/start.d.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  import type { Config as CLIConfig } from "@react-native-community/cli-types";
2
2
  export declare type CLIStartOptions = {
3
- host: string;
4
3
  port: number;
4
+ host: string;
5
5
  projectRoot?: string;
6
6
  watchFolders?: string[];
7
7
  assetPlugins?: string[];
8
8
  sourceExts?: string[];
9
9
  maxWorkers?: number;
10
+ resetCache?: boolean;
10
11
  customLogReporterPath?: string;
11
12
  https?: boolean;
12
13
  key?: string;
13
14
  cert?: string;
14
- resetCache?: boolean;
15
15
  config?: string;
16
16
  interactive: boolean;
17
17
  };
@@ -1 +1 @@
1
- {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../src/start.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AA+B7E,oBAAY,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAkBF,wBAAsB,QAAQ,CAC5B,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EACpB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,eAAe,GAC1B,OAAO,CAAC,IAAI,CAAC,CAyMf"}
1
+ {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../src/start.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AA8B7E,oBAAY,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAkBF,wBAAsB,QAAQ,CAC5B,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EACpB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,eAAe,GAC1B,OAAO,CAAC,IAAI,CAAC,CAoMf"}
package/lib/start.js CHANGED
@@ -35,9 +35,6 @@ function hasWebsocketEndpoints(devServer) {
35
35
  function rnxStart(_argv, cliConfig, cliOptions) {
36
36
  return __awaiter(this, void 0, void 0, function* () {
37
37
  const serverConfig = (0, kit_config_1.getKitServerConfig)(cliOptions);
38
- if (!serverConfig) {
39
- return Promise.resolve();
40
- }
41
38
  const { createDevServerMiddleware, indexPageMiddleware } = friendlyRequire("@react-native-community/cli-server-api");
42
39
  // interactive mode requires raw access to stdin
43
40
  let interactive = cliOptions.interactive;
@@ -84,12 +81,9 @@ function rnxStart(_argv, cliConfig, cliOptions) {
84
81
  }
85
82
  : undefined)));
86
83
  // customize the metro config to include plugins, presets, etc.
87
- const typescriptValidationOptions = {
88
- print: (message) => {
89
- terminal.log(message);
90
- },
91
- };
92
- (0, metro_config_1.customizeMetroConfig)(metroConfig, serverConfig.detectCyclicDependencies, serverConfig.detectDuplicateDependencies, serverConfig.typescriptValidation ? typescriptValidationOptions : false, serverConfig.treeShake);
84
+ (0, metro_config_1.customizeMetroConfig)(metroConfig, serverConfig.detectCyclicDependencies, serverConfig.detectDuplicateDependencies, serverConfig.typescriptValidation, serverConfig.treeShake, (message) => {
85
+ terminal.log(message);
86
+ });
93
87
  // create middleware -- a collection of plugins which handle incoming
94
88
  // http(s) requests, routing them to static pages or JS functions.
95
89
  const devServer = createDevServerMiddleware({
package/lib/start.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"start.js","sourceRoot":"","sources":["../src/start.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,0DAIgC;AAChC,kDAA0B;AAI1B,4CAAoB;AACpB,gDAAwB;AACxB,oDAA4B;AAC5B,wDAAgC;AAChC,iDAAsD;AACtD,mDAAwD;AAiCxD,SAAS,eAAe,CAAI,MAAc;IACxC,IAAI;QACF,OAAO,OAAO,CAAC,MAAM,CAAM,CAAC;KAC7B;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,IAAI,KAAK,CACb,uBAAuB,MAAM,iTAAiT,CAC/U,CAAC;KACH;AACH,CAAC;AAED,SAAS,qBAAqB,CAC5B,SAAqD;IAErD,OAAO,CAAC,CAAC,gBAAgB,IAAI,SAAS,CAAC,CAAC;AAC1C,CAAC;AAED,SAAsB,QAAQ,CAC5B,KAAoB,EACpB,SAAoB,EACpB,UAA2B;;QAE3B,MAAM,YAAY,GAAG,IAAA,+BAAkB,EAAC,UAAU,CAAC,CAAC;QACpD,IAAI,CAAC,YAAY,EAAE;YACjB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;SAC1B;QAED,MAAM,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,GAAG,eAAe,CAExE,wCAAwC,CAAC,CAAC;QAE5C,gDAAgD;QAChD,IAAI,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;QACzC,IAAI,WAAW,EAAE;YACf,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;YAClC,IAAI,CAAC,WAAW,EAAE;gBAChB,OAAO,CAAC,IAAI,CACV,eAAK,CAAC,MAAM,CACV,6DAA6D,CAC9D,CACF,CAAC;aACH;SACF;QAED,kEAAkE;QAClE,MAAM,E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CAAC,CAAC;4BACnB,CAAC,CAAC,CAAC;4BACH,MAAM;yBACP;wBAED,KAAK,GAAG;4BACN,QAAQ,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC,CAAC;4BACvD,qBAAqB,CAAC,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;4BACtD,MAAM;wBAER,KAAK,GAAG;4BACN,QAAQ,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC;4BAC9C,qBAAqB,CAAC,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;4BACrD,MAAM;qBACT;iBACF;YACH,CAAC,CAAC,CAAC;SACJ;IACH,CAAC;CAAA;AAxMD,4BAwMC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rnx-kit/cli",
3
- "version": "0.12.7",
3
+ "version": "0.14.0",
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",
6
6
  "license": "MIT",
@@ -19,14 +19,14 @@
19
19
  "test": "rnx-kit-scripts test"
20
20
  },
21
21
  "dependencies": {
22
- "@rnx-kit/config": "^0.4.21",
22
+ "@rnx-kit/config": "^0.5.0",
23
23
  "@rnx-kit/console": "^1.0.11",
24
24
  "@rnx-kit/dep-check": "^1.12.0",
25
25
  "@rnx-kit/metro-plugin-cyclic-dependencies-detector": "^1.0.21",
26
26
  "@rnx-kit/metro-plugin-duplicates-checker": "^1.2.15",
27
27
  "@rnx-kit/metro-serializer": "^1.0.11",
28
28
  "@rnx-kit/metro-serializer-esbuild": "^0.1.0",
29
- "@rnx-kit/metro-service": "^1.1.13",
29
+ "@rnx-kit/metro-service": "^2.0.0",
30
30
  "@rnx-kit/third-party-notices": "^1.2.13",
31
31
  "@rnx-kit/tools-language": "^1.3.0",
32
32
  "@rnx-kit/tools-node": "^1.2.7",
@@ -53,17 +53,19 @@
53
53
  "@react-native-community/cli-types": "^6.0.0",
54
54
  "@rnx-kit/scripts": "*",
55
55
  "@types/metro": "^0.66.0",
56
+ "@types/metro-babel-transformer": "^0.66.0",
56
57
  "@types/metro-config": "^0.66.0",
57
58
  "@types/qrcode": "^1.4.2",
58
- "jest-extended": "^0.11.5",
59
+ "jest-extended": "^2.0.0",
59
60
  "memfs": "^3.4.1",
61
+ "metro-config": "^0.66.2",
60
62
  "typescript": "^4.0.0"
61
63
  },
62
64
  "depcheck": {
63
65
  "ignoreMatches": [
64
66
  "@react-native-community/cli-clean",
65
67
  "metro",
66
- "metro-config",
68
+ "metro-babel-transformer",
67
69
  "readline"
68
70
  ]
69
71
  },
@@ -73,7 +75,7 @@
73
75
  "jest": {
74
76
  "preset": "@rnx-kit/scripts",
75
77
  "setupFilesAfterEnv": [
76
- "jest-extended"
78
+ "jest-extended/all"
77
79
  ]
78
80
  }
79
81
  }
@@ -2,6 +2,7 @@ const { parsePlatform } = require("@rnx-kit/tools-react-native/platform");
2
2
  const path = require("path");
3
3
  const {
4
4
  parseBoolean,
5
+ parseTransformProfile,
5
6
  rnxBundle,
6
7
  rnxCopyAssetsCommand,
7
8
  rnxStart,
@@ -15,83 +16,87 @@ module.exports = {
15
16
  commands: [
16
17
  {
17
18
  name: "rnx-bundle",
18
- description: "Bundle your react-native experience for offline use",
19
+ description:
20
+ "Bundle your rnx-kit package for offline use. See https://aka.ms/rnx-kit.",
19
21
  func: rnxBundle,
20
22
  options: [
21
23
  {
22
24
  name: "--id [id]",
23
25
  description:
24
- "Target bundle definition. This is only needed when the kit configuration has multiple bundle definitions.",
26
+ "Target bundle definition. This is only needed when the rnx-kit configuration has multiple bundle definitions.",
25
27
  },
26
28
  {
27
- name: "--platform [ios|android|windows|win32|macos]",
29
+ name: "--entry-file [path]",
28
30
  description:
29
- "Target platform. When not given, all platforms in the kit configuration are bundled.",
30
- parse: parsePlatform,
31
+ "Path to the root JavaScript or TypeScript file, either absolute or relative to the package.",
31
32
  },
32
33
  {
33
- name: "--entry-path [file]",
34
+ name: "--platform [ios|android|windows|win32|macos]",
34
35
  description:
35
- "Path to the root JavaScript file, either absolute or relative to the kit package.",
36
+ "Target platform. When not given, all platforms in the rnx-kit configuration are bundled.",
37
+ parse: parsePlatform,
36
38
  },
37
39
  {
38
- name: "--dist-path [path]",
40
+ name: "--dev [boolean]",
39
41
  description:
40
- "Path where the bundle is written, either absolute or relative to the kit package.",
42
+ "If false, warnings are disabled and the bundle is minified.",
43
+ default: true,
44
+ parse: parseBoolean,
41
45
  },
42
46
  {
43
- name: "--assets-path [path]",
47
+ name: "--minify [boolean]",
44
48
  description:
45
- "Path where bundle assets like images are written, either absolute or relative to the kit package.",
49
+ "Controls whether or not the bundle is minified. Disabling minification is useful for test builds.",
50
+ parse: parseBoolean,
46
51
  },
47
52
  {
48
- name: "--bundle-prefix [prefix]",
53
+ name: "--bundle-output [string]",
49
54
  description:
50
- "Bundle file prefix. This is followed by the platform and bundle file extension.",
55
+ "Path to the output bundle file, either absolute or relative to the package.",
51
56
  },
52
57
  {
53
58
  name: "--bundle-encoding [utf8|utf16le|ascii]",
54
59
  description:
55
60
  "Character encoding to use when writing the bundle file.",
61
+ default: "utf8",
56
62
  },
57
63
  {
58
- name: "--dev [boolean]",
64
+ name: "--max-workers [number]",
59
65
  description:
60
- "If false, warnings are disabled and the bundle is minified.",
61
- default: true,
62
- parse: parseBoolean,
66
+ "Specifies the maximum number of parallel worker threads to use for transforming files. This defaults to the number of cores available on your machine.",
67
+ parse: parseInt,
63
68
  },
64
69
  {
65
- name: "--minify [boolean]",
70
+ name: "--sourcemap-output [string]",
66
71
  description:
67
- "Controls whether or not the bundle is minified. Disabling minification is useful for test builds.",
68
- parse: parseBoolean,
72
+ "Path where the bundle source map is written, either absolute or relative to the package.",
69
73
  },
70
74
  {
71
- name: "--experimental-tree-shake [boolean]",
72
- description: "Deprecated. Use --tree-shake [boolean] instead.",
73
- parse: parseBoolean,
75
+ name: "--sourcemap-sources-root [string]",
76
+ description:
77
+ "Path to use when relativizing file entries in the bundle source map.",
74
78
  },
75
79
  {
76
- name: "--tree-shake [boolean]",
77
- description: "Enable tree shaking.",
78
- parse: parseBoolean,
80
+ name: "--sourcemap-use-absolute-path",
81
+ description: "Report SourceMapURL using its full path",
79
82
  },
80
83
  {
81
- name: "--max-workers [number]",
84
+ name: "--assets-dest [path]",
82
85
  description:
83
- "Specifies the maximum number of parallel worker threads to use for transforming files. This defaults to the number of cores available on your machine.",
84
- parse: parseInt,
86
+ "Path where bundle assets like images are written, either absolute or relative to the package. If not given, assets are ignored.",
85
87
  },
86
88
  {
87
- name: "--sourcemap-output [string]",
89
+ name: "--tree-shake [boolean]",
88
90
  description:
89
- "Path where the bundle source map is written, either absolute or relative to the dist-path.",
91
+ "Enable tree shaking to remove unused code and reduce the bundle size.",
92
+ parse: parseBoolean,
93
+ default: false,
90
94
  },
91
95
  {
92
- name: "--sourcemap-sources-root [string]",
96
+ name: "--unstable-transform-profile [string]",
93
97
  description:
94
- "Path to use when relativizing file entries in the bundle source map.",
98
+ "Experimental, transform JS for a specific JS engine. Currently supported: hermes, hermes-canary, default",
99
+ parse: parseTransformProfile,
95
100
  },
96
101
  {
97
102
  name: "--reset-cache",
@@ -109,12 +114,6 @@ module.exports = {
109
114
  description:
110
115
  "Start a bundle-server to host your react-native experience during development",
111
116
  options: [
112
- {
113
- name: "--host [string]",
114
- description:
115
- "Host name or address to bind when listening for incoming server requests. When not given, requests from all addresses are accepted.",
116
- default: "",
117
- },
118
117
  {
119
118
  name: "--port [number]",
120
119
  description:
@@ -123,25 +122,31 @@ module.exports = {
123
122
  default: 8081,
124
123
  },
125
124
  {
126
- name: "--project-root [path]",
125
+ name: "--host [string]",
127
126
  description:
128
- "Path to the root of your react-native experience project. The bundle server uses this root path to resolve all web requests.",
127
+ "Host name or address to bind when listening for incoming server requests. When not given, requests from all addresses are accepted.",
128
+ default: "",
129
+ },
130
+ {
131
+ name: "--projectRoot [path]",
132
+ description:
133
+ "Path to the root of your react-native project. The bundle server uses this root path to resolve all web requests.",
129
134
  parse: (val) => path.resolve(val),
130
135
  },
131
136
  {
132
- name: "--watch-folders [paths]",
137
+ name: "--watchFolders [paths]",
133
138
  description:
134
- "Additional folders which will be added to the file-watch list. Comma-separated. By default, Metro watches all project files, and triggers a bundle-reload when anything changes.",
139
+ "Additional folders which will be added to the file-watch list. Comma-separated. By default, Metro watches all project files.",
135
140
  parse: (val) => val.split(",").map((folder) => path.resolve(folder)),
136
141
  },
137
142
  {
138
- name: "--asset-plugins [list]",
143
+ name: "--assetPlugins [list]",
139
144
  description:
140
- "Additional asset plugins to be used by the Metro Babel transformer. Comma-separated list containing plugin modules and/or absolute paths to plugin packages.",
145
+ "Additional asset plugins to be used by the Metro Babel transformer. Comma-separated list containing plugin module names or absolute paths to plugin packages.",
141
146
  parse: (val) => val.split(","),
142
147
  },
143
148
  {
144
- name: "--source-exts [list]",
149
+ name: "--sourceExts [list]",
145
150
  description:
146
151
  "Additional source-file extensions to include when generating bundles. Comma-separated list, excluding the leading dot.",
147
152
  parse: (val) => val.split(","),
@@ -152,6 +157,10 @@ module.exports = {
152
157
  "Specifies the maximum number of parallel worker threads to use for transforming files. This defaults to the number of cores available on your machine.",
153
158
  parse: parseInt,
154
159
  },
160
+ {
161
+ name: "--reset-cache",
162
+ description: "Reset the Metro cache.",
163
+ },
155
164
  {
156
165
  name: "--custom-log-reporter-path [string]",
157
166
  description:
@@ -172,10 +181,6 @@ module.exports = {
172
181
  description:
173
182
  "Path to a custom SSL certificate file to use for secure (https) communication.",
174
183
  },
175
- {
176
- name: "--reset-cache",
177
- description: "Reset the Metro cache.",
178
- },
179
184
  {
180
185
  name: "--config [string]",
181
186
  description: "Path to the Metro configuration file.",
@@ -198,41 +203,43 @@ module.exports = {
198
203
  {
199
204
  name: "--root-path <path>",
200
205
  description:
201
- "The root of the repo where to start resolving modules from.",
206
+ "The root of the repo. This is the starting point for finding each module in the source map dependency graph.",
202
207
  },
203
208
  {
204
209
  name: "--source-map-file <file>",
205
- description: "The sourceMap file to generate licence contents for.",
210
+ description:
211
+ "The source map file associated with the package's entry file. This source map eventually leads to all package dependencies and their licenses.",
206
212
  },
207
213
  {
208
214
  name: "--json",
209
- description: "Output license information as a JSON",
215
+ description:
216
+ "Format the 3rd-party notice file as JSON instead of text.",
210
217
  default: false,
211
218
  parse: parseBoolean,
212
219
  },
213
220
  {
214
221
  name: "--output-file [file]",
215
- description: "The output file to write the licence file to.",
222
+ description:
223
+ "The path to use when writing the 3rd-party notice file.",
216
224
  },
217
225
  {
218
226
  name: "--ignore-scopes [string]",
219
227
  description:
220
- "Comma separated list of npm scopes to ignore and not emit licence information for",
228
+ "Comma-separated list of `npm` scopes to ignore when traversing the source map dependency graph.",
221
229
  },
222
230
  {
223
231
  name: "--ignore-modules [string]",
224
232
  description:
225
- "Comma separated list of modules (js packages) to not emit licence information for ",
233
+ "Comma-separated list of modules to ignore when traversing the source map dependency graph.",
226
234
  },
227
235
  {
228
236
  name: "--preamble-text [string]",
229
237
  description:
230
- "A string to prepend at the start of the generated licence file.",
238
+ "A string to prepend to the start of the 3rd-party notice.",
231
239
  },
232
240
  {
233
241
  name: "--additional-text [path]",
234
- description:
235
- "A string to append at the end of the generated licence file.",
242
+ description: "A string to append to the end of the 3rd-party notice.",
236
243
  },
237
244
  ],
238
245
  },