@vxrn/utils 2.22.0 → 2.23.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.
@@ -0,0 +1,17 @@
1
+ // dist/cjs/metroTypes.js
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
9
+ get: () => from[key],
10
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
+ });
12
+ }
13
+ return to;
14
+ };
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var metroTypes_exports = {};
17
+ module.exports = __toCommonJS(metroTypes_exports);
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ // dist/cjs/metroTypes.native.js
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
11
+ get: () => from[key],
12
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
13
+ });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var metroTypes_exports = {};
19
+ module.exports = __toCommonJS(metroTypes_exports);
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ // dist/cjs/metroTypes.native.js
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
11
+ get: () => from[key],
12
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
13
+ });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var metroTypes_exports = {};
19
+ module.exports = __toCommonJS(metroTypes_exports);
20
+
21
+ //# sourceMappingURL=metroTypes.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metroTypes.native.js","names":[],"sources":["cjs/metroTypes.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar metroTypes_exports = {};\nmodule.exports = __toCommonJS(metroTypes_exports);\n//# sourceMappingURL=metroTypes.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,qBAAqB,CAAC;AAC1B,OAAO,UAAU,aAAa,kBAAkB"}
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vxrn/utils",
3
- "version": "2.22.0",
3
+ "version": "2.23.0",
4
4
  "sideEffects": false,
5
5
  "type": "module",
6
6
  "types": "./types/index.d.ts",
@@ -37,6 +37,11 @@
37
37
  "types": "./types/nativeAppManifest.d.ts",
38
38
  "import": "./dist/esm/nativeAppManifest.mjs",
39
39
  "require": "./dist/cjs/nativeAppManifest.cjs"
40
+ },
41
+ "./metroTypes": {
42
+ "types": "./types/metroTypes.d.ts",
43
+ "import": "./dist/esm/metroTypes.mjs",
44
+ "require": "./dist/cjs/metroTypes.cjs"
40
45
  }
41
46
  },
42
47
  "files": [
@@ -56,8 +61,8 @@
56
61
  "typecheck": "tsc --noEmit"
57
62
  },
58
63
  "dependencies": {
59
- "@vxrn/debug": "2.22.0",
60
- "@vxrn/resolve": "2.22.0",
64
+ "@vxrn/debug": "2.23.0",
65
+ "@vxrn/resolve": "2.23.0",
61
66
  "ws": "^8.21.0"
62
67
  },
63
68
  "devDependencies": {
@@ -68,7 +73,7 @@
68
73
  "publishConfig": {
69
74
  "access": "public"
70
75
  },
71
- "releaseSourceCommit": "c669037337cc0f99d6c0bd9a16fe2cef7afea94f",
76
+ "releaseSourceCommit": "b195e081da46417c0c3744e87041625412822424",
72
77
  "repository": {
73
78
  "type": "git",
74
79
  "url": "git+https://github.com/onejs/one.git",
@@ -0,0 +1,68 @@
1
+ export type MetroPluginOptions = {
2
+ argv?: Record<string, any>
3
+ defaultConfigOverrides?:
4
+ | Record<string, any>
5
+ | ((defaultConfig: Record<string, any> | undefined) => Record<string, any> | undefined)
6
+ /**
7
+ * Shorthand for setting `useWatchman` in Metro's resolver config.
8
+ * When true, enables Watchman for file watching. When false, disables it.
9
+ */
10
+ watchman?: boolean
11
+ /**
12
+ * Array of module names or glob patterns that should be resolved to an empty module.
13
+ * This is useful for excluding modules that break the React Native build.
14
+ *
15
+ * Supports glob patterns via micromatch:
16
+ * - Exact match: `'jsonwebtoken'`
17
+ * - Wildcard: `'@aws-sdk/*'`
18
+ * - Multiple wildcards: `'@aws-sdk/**'`
19
+ *
20
+ * Example: `['node:http2', 'jsonwebtoken', '@aws-sdk/*']`
21
+ */
22
+ excludeModules?: string[]
23
+ /** Consider using babelConfigOverrides instead */
24
+ babelConfig?: Record<string, any>
25
+ babelConfigOverrides?: (defaultConfig: Record<string, any>) => Record<string, any>
26
+ /**
27
+ * Module ids of transforms to run on the native transform path (the
28
+ * default), which runs no babel at all. Each module
29
+ * default-exports a `NativeTransform`: `(code, ctx) => string | null`. They
30
+ * run in order, on the original source, before one's own ports — the same
31
+ * view of the file a babel plugin gets.
32
+ *
33
+ * This is how a babel plugin that has no native port gets replaced rather
34
+ * than dropped. The worker refuses to build when it sees a babel plugin it
35
+ * cannot run, so porting it here is the way through.
36
+ */
37
+ nativeTransformModules?: string[]
38
+ /**
39
+ * internal marker used by one's babel preset to avoid double-applying its
40
+ * plugin chain when one already supplied the vite metro babel config.
41
+ */
42
+ oneViteMetroBabelConfig?: boolean
43
+ /**
44
+ * Overrides the main module name which is normally defined as the `main` field in `package.json`.
45
+ *
46
+ * Changes the React Native entry point without requiring a `main` field in
47
+ * `package.json`.
48
+ */
49
+ mainModuleName?: string
50
+ /**
51
+ * Controls when Metro bundler starts:
52
+ * - 'eager' (default): Start Metro as soon as Vite server is listening
53
+ * - 'lazy': Defer Metro startup until a bundle request or simulator connection is detected
54
+ *
55
+ * Use 'lazy' to speed up dev server startup when you don't always need Metro.
56
+ */
57
+ startup?: 'eager' | 'lazy'
58
+ /**
59
+ * Run Metro's transforms through the oxc worker, which uses no babel at all.
60
+ *
61
+ * On by default. The worker refuses to build when it sees a babel plugin it
62
+ * has no port for, so a plugin is never silently dropped: port it and list it
63
+ * in `nativeTransformModules`, or set this to `false` to go back to babel.
64
+ *
65
+ * `ONE_METRO_NATIVE_TRANSFORMS=0` turns it off for one run.
66
+ */
67
+ nativeTransforms?: boolean
68
+ }
@@ -0,0 +1,67 @@
1
+ export type MetroPluginOptions = {
2
+ argv?: Record<string, any>;
3
+ defaultConfigOverrides?: Record<string, any> | ((defaultConfig: Record<string, any> | undefined) => Record<string, any> | undefined);
4
+ /**
5
+ * Shorthand for setting `useWatchman` in Metro's resolver config.
6
+ * When true, enables Watchman for file watching. When false, disables it.
7
+ */
8
+ watchman?: boolean;
9
+ /**
10
+ * Array of module names or glob patterns that should be resolved to an empty module.
11
+ * This is useful for excluding modules that break the React Native build.
12
+ *
13
+ * Supports glob patterns via micromatch:
14
+ * - Exact match: `'jsonwebtoken'`
15
+ * - Wildcard: `'@aws-sdk/*'`
16
+ * - Multiple wildcards: `'@aws-sdk/**'`
17
+ *
18
+ * Example: `['node:http2', 'jsonwebtoken', '@aws-sdk/*']`
19
+ */
20
+ excludeModules?: string[];
21
+ /** Consider using babelConfigOverrides instead */
22
+ babelConfig?: Record<string, any>;
23
+ babelConfigOverrides?: (defaultConfig: Record<string, any>) => Record<string, any>;
24
+ /**
25
+ * Module ids of transforms to run on the native transform path (the
26
+ * default), which runs no babel at all. Each module
27
+ * default-exports a `NativeTransform`: `(code, ctx) => string | null`. They
28
+ * run in order, on the original source, before one's own ports — the same
29
+ * view of the file a babel plugin gets.
30
+ *
31
+ * This is how a babel plugin that has no native port gets replaced rather
32
+ * than dropped. The worker refuses to build when it sees a babel plugin it
33
+ * cannot run, so porting it here is the way through.
34
+ */
35
+ nativeTransformModules?: string[];
36
+ /**
37
+ * internal marker used by one's babel preset to avoid double-applying its
38
+ * plugin chain when one already supplied the vite metro babel config.
39
+ */
40
+ oneViteMetroBabelConfig?: boolean;
41
+ /**
42
+ * Overrides the main module name which is normally defined as the `main` field in `package.json`.
43
+ *
44
+ * Changes the React Native entry point without requiring a `main` field in
45
+ * `package.json`.
46
+ */
47
+ mainModuleName?: string;
48
+ /**
49
+ * Controls when Metro bundler starts:
50
+ * - 'eager' (default): Start Metro as soon as Vite server is listening
51
+ * - 'lazy': Defer Metro startup until a bundle request or simulator connection is detected
52
+ *
53
+ * Use 'lazy' to speed up dev server startup when you don't always need Metro.
54
+ */
55
+ startup?: 'eager' | 'lazy';
56
+ /**
57
+ * Run Metro's transforms through the oxc worker, which uses no babel at all.
58
+ *
59
+ * On by default. The worker refuses to build when it sees a babel plugin it
60
+ * has no port for, so a plugin is never silently dropped: port it and list it
61
+ * in `nativeTransformModules`, or set this to `false` to go back to babel.
62
+ *
63
+ * `ONE_METRO_NATIVE_TRANSFORMS=0` turns it off for one run.
64
+ */
65
+ nativeTransforms?: boolean;
66
+ };
67
+ //# sourceMappingURL=metroTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metroTypes.d.ts","sourceRoot":"","sources":["../src/metroTypes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,sBAAsB,CAAC,EACnB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACnB,CAAC,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC,CAAA;IACzF;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;IACzB,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACjC,oBAAoB,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAClF;;;;;;;;;;OAUG;IACH,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAA;IACjC;;;OAGG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC1B;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA"}