@assistant-ui/metro 0.0.1 → 0.0.3
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/dist/index.cjs.map +1 -1
- package/dist/transformer.cjs +59 -50
- package/dist/transformer.cjs.map +1 -1
- package/package.json +6 -6
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["require"],"sources":["../src/index.ts"],"sourcesContent":["import { createRequire } from \"node:module\";\n\nconst require = createRequire(import.meta.url);\n\n/**\n * The shape of a Metro / Expo config `withAui` accepts. Typed loosely so this\n * package needs no hard dependency on `metro` or `expo`; the input shape is\n * preserved and only `transformer.babelTransformerPath` is augmented.\n */\nexport type MetroConfigLike = {\n transformer?:\n | {\n babelTransformerPath?: string | undefined;\n [key: string]: unknown;\n }\n | undefined;\n [key: string]: unknown;\n};\n\n/**\n * Env var the transformer reads to delegate to the project's existing\n * (Expo / React Native) babel transformer. Metro forks its transform workers\n * after `metro.config` is evaluated, so they inherit this value.\n */\nexport const UPSTREAM_TRANSFORMER_ENV = \"AUI_METRO_UPSTREAM_TRANSFORMER\";\n\n/**\n * Wraps a Metro (or Expo) config so assistant-ui `\"use generative\"` modules are\n * compiled. Such a file colocates a tool's schema, its `execute`, and its\n * `render` via {@link https://www.assistant-ui.com/docs/tools/defining-tools | defineToolkit}.\n *\n * It points Metro's `babelTransformerPath` at this package's transformer, which\n * runs the `\"use generative\"` compiler and then delegates to your project's\n * existing transformer. The device (client) build keeps each tool's `render`\n * and any frontend `execute`; a server build (an Expo Router `+api` route)\n * keeps a server `execute` instead.\n *\n * ```js\n * // metro.config.js\n * const { getDefaultConfig } = require(\"expo/metro-config\");\n * const { withAui } = require(\"@assistant-ui/metro\");\n *\n * module.exports = withAui(getDefaultConfig(__dirname));\n * ```\n *\n * Authoring is identical to the web: a `\"use generative\"` file whose default\n * export is `defineToolkit({ ... })`, registered with `Tools({ toolkit })`.\n */\nexport function withAui<T extends MetroConfigLike>(config: T): T {\n const self = require.resolve(\"@assistant-ui/metro/transformer\");\n const upstream = config.transformer?.babelTransformerPath;\n\n // Guard against a double-wrap (`withAui(withAui(config))`, or a shared config\n // already wrapped): if it already points at our transformer, keep the real\n // upstream captured earlier rather than overwriting it with our own path,\n // which would make `resolveUpstream()` return this transformer and recurse.\n if (upstream && upstream !== self) {\n process.env[UPSTREAM_TRANSFORMER_ENV] = upstream;\n }\n\n return {\n ...config,\n transformer: {\n ...config.transformer,\n babelTransformerPath: self,\n },\n };\n}\n"],"mappings":";;AAEA,MAAMA,aAAAA,wBAAAA,
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["require"],"sources":["../src/index.ts"],"sourcesContent":["import { createRequire } from \"node:module\";\n\nconst require = createRequire(import.meta.url);\n\n/**\n * The shape of a Metro / Expo config `withAui` accepts. Typed loosely so this\n * package needs no hard dependency on `metro` or `expo`; the input shape is\n * preserved and only `transformer.babelTransformerPath` is augmented.\n */\nexport type MetroConfigLike = {\n transformer?:\n | {\n babelTransformerPath?: string | undefined;\n [key: string]: unknown;\n }\n | undefined;\n [key: string]: unknown;\n};\n\n/**\n * Env var the transformer reads to delegate to the project's existing\n * (Expo / React Native) babel transformer. Metro forks its transform workers\n * after `metro.config` is evaluated, so they inherit this value.\n */\nexport const UPSTREAM_TRANSFORMER_ENV = \"AUI_METRO_UPSTREAM_TRANSFORMER\";\n\n/**\n * Wraps a Metro (or Expo) config so assistant-ui `\"use generative\"` modules are\n * compiled. Such a file colocates a tool's schema, its `execute`, and its\n * `render` via {@link https://www.assistant-ui.com/docs/tools/defining-tools | defineToolkit}.\n *\n * It points Metro's `babelTransformerPath` at this package's transformer, which\n * runs the `\"use generative\"` compiler and then delegates to your project's\n * existing transformer. The device (client) build keeps each tool's `render`\n * and any frontend `execute`; a server build (an Expo Router `+api` route)\n * keeps a server `execute` instead.\n *\n * ```js\n * // metro.config.js\n * const { getDefaultConfig } = require(\"expo/metro-config\");\n * const { withAui } = require(\"@assistant-ui/metro\");\n *\n * module.exports = withAui(getDefaultConfig(__dirname));\n * ```\n *\n * Authoring is identical to the web: a `\"use generative\"` file whose default\n * export is `defineToolkit({ ... })`, registered with `Tools({ toolkit })`.\n */\nexport function withAui<T extends MetroConfigLike>(config: T): T {\n const self = require.resolve(\"@assistant-ui/metro/transformer\");\n const upstream = config.transformer?.babelTransformerPath;\n\n // Guard against a double-wrap (`withAui(withAui(config))`, or a shared config\n // already wrapped): if it already points at our transformer, keep the real\n // upstream captured earlier rather than overwriting it with our own path,\n // which would make `resolveUpstream()` return this transformer and recurse.\n if (upstream && upstream !== self) {\n process.env[UPSTREAM_TRANSFORMER_ENV] = upstream;\n }\n\n return {\n ...config,\n transformer: {\n ...config.transformer,\n babelTransformerPath: self,\n },\n };\n}\n"],"mappings":";;AAEA,MAAMA,aAAAA,wBAAAA,CAAAA,CAAAA,cAAAA,CAAAA,QAAAA,KAAAA,CAAAA,CAAAA,cAAAA,UAAAA,CAAAA,CAAAA,IAAuC;;;;;;AAsB7C,MAAa,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;AAwBxC,SAAgB,QAAmC,QAAc;CAC/D,MAAM,OAAOA,UAAQ,QAAQ,iCAAiC;CAC9D,MAAM,WAAW,OAAO,aAAa;CAMrC,IAAI,YAAY,aAAa,MAC3B,QAAQ,IAAI,4BAA4B;CAG1C,OAAO;EACL,GAAG;EACH,aAAa;GACX,GAAG,OAAO;GACV,sBAAsB;EACxB;CACF;AACF"}
|
package/dist/transformer.cjs
CHANGED
|
@@ -40,9 +40,9 @@ _babel_types = __toESM(_babel_types, 1);
|
|
|
40
40
|
const DIRECTIVE = "use generative";
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region ../x-generative-compiler/dist/package.js
|
|
43
|
-
var version = "0.0.
|
|
43
|
+
var version = "0.0.5";
|
|
44
44
|
//#endregion
|
|
45
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
45
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/constants.js
|
|
46
46
|
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
47
47
|
const SEMVER_SPEC_VERSION = "2.0.0";
|
|
48
48
|
const MAX_LENGTH = 256;
|
|
@@ -67,12 +67,12 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
67
67
|
};
|
|
68
68
|
}));
|
|
69
69
|
//#endregion
|
|
70
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
70
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/debug.js
|
|
71
71
|
var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
72
72
|
module.exports = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
|
|
73
73
|
}));
|
|
74
74
|
//#endregion
|
|
75
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
75
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/re.js
|
|
76
76
|
var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
77
77
|
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();
|
|
78
78
|
const debug = require_debug();
|
|
@@ -151,7 +151,7 @@ var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
151
151
|
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
152
152
|
}));
|
|
153
153
|
//#endregion
|
|
154
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
154
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/parse-options.js
|
|
155
155
|
var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
156
156
|
const looseOption = Object.freeze({ loose: true });
|
|
157
157
|
const emptyOpts = Object.freeze({});
|
|
@@ -163,7 +163,7 @@ var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
163
163
|
module.exports = parseOptions;
|
|
164
164
|
}));
|
|
165
165
|
//#endregion
|
|
166
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
166
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/identifiers.js
|
|
167
167
|
var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
168
168
|
const numeric = /^[0-9]+$/;
|
|
169
169
|
const compareIdentifiers = (a, b) => {
|
|
@@ -183,13 +183,19 @@ var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
183
183
|
};
|
|
184
184
|
}));
|
|
185
185
|
//#endregion
|
|
186
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
186
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/classes/semver.js
|
|
187
187
|
var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
188
188
|
const debug = require_debug();
|
|
189
189
|
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
190
190
|
const { safeRe: re, t } = require_re();
|
|
191
191
|
const parseOptions = require_parse_options();
|
|
192
192
|
const { compareIdentifiers } = require_identifiers();
|
|
193
|
+
const isPrereleaseIdentifier = (prerelease, identifier) => {
|
|
194
|
+
const identifiers = identifier.split(".");
|
|
195
|
+
if (identifiers.length > prerelease.length) return false;
|
|
196
|
+
for (let i = 0; i < identifiers.length; i++) if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) return false;
|
|
197
|
+
return true;
|
|
198
|
+
};
|
|
193
199
|
module.exports = class SemVer {
|
|
194
200
|
constructor(version, options) {
|
|
195
201
|
options = parseOptions(options);
|
|
@@ -346,8 +352,9 @@ var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
346
352
|
if (identifier) {
|
|
347
353
|
let prerelease = [identifier, base];
|
|
348
354
|
if (identifierBase === false) prerelease = [identifier];
|
|
349
|
-
if (
|
|
350
|
-
|
|
355
|
+
if (isPrereleaseIdentifier(this.prerelease, identifier)) {
|
|
356
|
+
const prereleaseBase = this.prerelease[identifier.split(".").length];
|
|
357
|
+
if (isNaN(prereleaseBase)) this.prerelease = prerelease;
|
|
351
358
|
} else this.prerelease = prerelease;
|
|
352
359
|
}
|
|
353
360
|
break;
|
|
@@ -361,7 +368,7 @@ var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
361
368
|
};
|
|
362
369
|
}));
|
|
363
370
|
//#endregion
|
|
364
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
371
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/parse.js
|
|
365
372
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
366
373
|
const SemVer = require_semver$1();
|
|
367
374
|
const parse = (version, options, throwErrors = false) => {
|
|
@@ -376,7 +383,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
376
383
|
module.exports = parse;
|
|
377
384
|
}));
|
|
378
385
|
//#endregion
|
|
379
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
386
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/valid.js
|
|
380
387
|
var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
381
388
|
const parse = require_parse();
|
|
382
389
|
const valid = (version, options) => {
|
|
@@ -386,7 +393,7 @@ var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
386
393
|
module.exports = valid;
|
|
387
394
|
}));
|
|
388
395
|
//#endregion
|
|
389
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
396
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/clean.js
|
|
390
397
|
var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
391
398
|
const parse = require_parse();
|
|
392
399
|
const clean = (version, options) => {
|
|
@@ -396,7 +403,7 @@ var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
396
403
|
module.exports = clean;
|
|
397
404
|
}));
|
|
398
405
|
//#endregion
|
|
399
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
406
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/inc.js
|
|
400
407
|
var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
401
408
|
const SemVer = require_semver$1();
|
|
402
409
|
const inc = (version, release, options, identifier, identifierBase) => {
|
|
@@ -414,7 +421,7 @@ var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
414
421
|
module.exports = inc;
|
|
415
422
|
}));
|
|
416
423
|
//#endregion
|
|
417
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
424
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/diff.js
|
|
418
425
|
var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
419
426
|
const parse = require_parse();
|
|
420
427
|
const diff = (version1, version2) => {
|
|
@@ -442,28 +449,28 @@ var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
442
449
|
module.exports = diff;
|
|
443
450
|
}));
|
|
444
451
|
//#endregion
|
|
445
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
452
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/major.js
|
|
446
453
|
var require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
447
454
|
const SemVer = require_semver$1();
|
|
448
455
|
const major = (a, loose) => new SemVer(a, loose).major;
|
|
449
456
|
module.exports = major;
|
|
450
457
|
}));
|
|
451
458
|
//#endregion
|
|
452
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
459
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/minor.js
|
|
453
460
|
var require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
454
461
|
const SemVer = require_semver$1();
|
|
455
462
|
const minor = (a, loose) => new SemVer(a, loose).minor;
|
|
456
463
|
module.exports = minor;
|
|
457
464
|
}));
|
|
458
465
|
//#endregion
|
|
459
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
466
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/patch.js
|
|
460
467
|
var require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
461
468
|
const SemVer = require_semver$1();
|
|
462
469
|
const patch = (a, loose) => new SemVer(a, loose).patch;
|
|
463
470
|
module.exports = patch;
|
|
464
471
|
}));
|
|
465
472
|
//#endregion
|
|
466
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
473
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/prerelease.js
|
|
467
474
|
var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
468
475
|
const parse = require_parse();
|
|
469
476
|
const prerelease = (version, options) => {
|
|
@@ -473,28 +480,28 @@ var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
473
480
|
module.exports = prerelease;
|
|
474
481
|
}));
|
|
475
482
|
//#endregion
|
|
476
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
483
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/compare.js
|
|
477
484
|
var require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
478
485
|
const SemVer = require_semver$1();
|
|
479
486
|
const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
480
487
|
module.exports = compare;
|
|
481
488
|
}));
|
|
482
489
|
//#endregion
|
|
483
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
490
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/rcompare.js
|
|
484
491
|
var require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
485
492
|
const compare = require_compare();
|
|
486
493
|
const rcompare = (a, b, loose) => compare(b, a, loose);
|
|
487
494
|
module.exports = rcompare;
|
|
488
495
|
}));
|
|
489
496
|
//#endregion
|
|
490
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
497
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/compare-loose.js
|
|
491
498
|
var require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
492
499
|
const compare = require_compare();
|
|
493
500
|
const compareLoose = (a, b) => compare(a, b, true);
|
|
494
501
|
module.exports = compareLoose;
|
|
495
502
|
}));
|
|
496
503
|
//#endregion
|
|
497
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
504
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/compare-build.js
|
|
498
505
|
var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
499
506
|
const SemVer = require_semver$1();
|
|
500
507
|
const compareBuild = (a, b, loose) => {
|
|
@@ -505,63 +512,63 @@ var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
505
512
|
module.exports = compareBuild;
|
|
506
513
|
}));
|
|
507
514
|
//#endregion
|
|
508
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
515
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/sort.js
|
|
509
516
|
var require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
510
517
|
const compareBuild = require_compare_build();
|
|
511
518
|
const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
|
|
512
519
|
module.exports = sort;
|
|
513
520
|
}));
|
|
514
521
|
//#endregion
|
|
515
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
522
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/rsort.js
|
|
516
523
|
var require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
517
524
|
const compareBuild = require_compare_build();
|
|
518
525
|
const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
|
|
519
526
|
module.exports = rsort;
|
|
520
527
|
}));
|
|
521
528
|
//#endregion
|
|
522
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
529
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/gt.js
|
|
523
530
|
var require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
524
531
|
const compare = require_compare();
|
|
525
532
|
const gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
526
533
|
module.exports = gt;
|
|
527
534
|
}));
|
|
528
535
|
//#endregion
|
|
529
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
536
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/lt.js
|
|
530
537
|
var require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
531
538
|
const compare = require_compare();
|
|
532
539
|
const lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
533
540
|
module.exports = lt;
|
|
534
541
|
}));
|
|
535
542
|
//#endregion
|
|
536
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
543
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/eq.js
|
|
537
544
|
var require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
538
545
|
const compare = require_compare();
|
|
539
546
|
const eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
540
547
|
module.exports = eq;
|
|
541
548
|
}));
|
|
542
549
|
//#endregion
|
|
543
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
550
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/neq.js
|
|
544
551
|
var require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
545
552
|
const compare = require_compare();
|
|
546
553
|
const neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
547
554
|
module.exports = neq;
|
|
548
555
|
}));
|
|
549
556
|
//#endregion
|
|
550
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
557
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/gte.js
|
|
551
558
|
var require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
552
559
|
const compare = require_compare();
|
|
553
560
|
const gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
554
561
|
module.exports = gte;
|
|
555
562
|
}));
|
|
556
563
|
//#endregion
|
|
557
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
564
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/lte.js
|
|
558
565
|
var require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
559
566
|
const compare = require_compare();
|
|
560
567
|
const lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
561
568
|
module.exports = lte;
|
|
562
569
|
}));
|
|
563
570
|
//#endregion
|
|
564
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
571
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/cmp.js
|
|
565
572
|
var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
566
573
|
const eq = require_eq();
|
|
567
574
|
const neq = require_neq();
|
|
@@ -593,7 +600,7 @@ var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
593
600
|
module.exports = cmp;
|
|
594
601
|
}));
|
|
595
602
|
//#endregion
|
|
596
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
603
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/coerce.js
|
|
597
604
|
var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
598
605
|
const SemVer = require_semver$1();
|
|
599
606
|
const parse = require_parse();
|
|
@@ -621,7 +628,7 @@ var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
621
628
|
module.exports = coerce;
|
|
622
629
|
}));
|
|
623
630
|
//#endregion
|
|
624
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
631
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/truncate.js
|
|
625
632
|
var require_truncate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
626
633
|
const parse = require_parse();
|
|
627
634
|
const constants = require_constants();
|
|
@@ -654,7 +661,7 @@ var require_truncate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
654
661
|
module.exports = truncate;
|
|
655
662
|
}));
|
|
656
663
|
//#endregion
|
|
657
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
664
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/lrucache.js
|
|
658
665
|
var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
659
666
|
var LRUCache = class {
|
|
660
667
|
constructor() {
|
|
@@ -687,7 +694,7 @@ var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
687
694
|
module.exports = LRUCache;
|
|
688
695
|
}));
|
|
689
696
|
//#endregion
|
|
690
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
697
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/classes/range.js
|
|
691
698
|
var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
692
699
|
const SPACE_CHARACTERS = /\s+/g;
|
|
693
700
|
module.exports = class Range {
|
|
@@ -831,6 +838,7 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
831
838
|
return comp;
|
|
832
839
|
};
|
|
833
840
|
const isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
841
|
+
const invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p);
|
|
834
842
|
const replaceTildes = (comp, options) => {
|
|
835
843
|
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
836
844
|
};
|
|
@@ -871,8 +879,8 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
871
879
|
else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
872
880
|
} else {
|
|
873
881
|
debug("no pr");
|
|
874
|
-
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}
|
|
875
|
-
else ret = `>=${M}.${m}.${p}
|
|
882
|
+
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
|
|
883
|
+
else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
876
884
|
else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
877
885
|
}
|
|
878
886
|
debug("caret return", ret);
|
|
@@ -888,6 +896,7 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
888
896
|
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
889
897
|
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
890
898
|
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
899
|
+
if (invalidXRangeOrder(M, m, p)) return comp;
|
|
891
900
|
const xM = isX(M);
|
|
892
901
|
const xm = xM || isX(m);
|
|
893
902
|
const xp = xm || isX(p);
|
|
@@ -961,7 +970,7 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
961
970
|
};
|
|
962
971
|
}));
|
|
963
972
|
//#endregion
|
|
964
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
973
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/classes/comparator.js
|
|
965
974
|
var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
966
975
|
const ANY = Symbol("SemVer ANY");
|
|
967
976
|
module.exports = class Comparator {
|
|
@@ -1031,7 +1040,7 @@ var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1031
1040
|
const Range = require_range();
|
|
1032
1041
|
}));
|
|
1033
1042
|
//#endregion
|
|
1034
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
1043
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/satisfies.js
|
|
1035
1044
|
var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1036
1045
|
const Range = require_range();
|
|
1037
1046
|
const satisfies = (version, range, options) => {
|
|
@@ -1045,14 +1054,14 @@ var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1045
1054
|
module.exports = satisfies;
|
|
1046
1055
|
}));
|
|
1047
1056
|
//#endregion
|
|
1048
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
1057
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/to-comparators.js
|
|
1049
1058
|
var require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1050
1059
|
const Range = require_range();
|
|
1051
1060
|
const toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
1052
1061
|
module.exports = toComparators;
|
|
1053
1062
|
}));
|
|
1054
1063
|
//#endregion
|
|
1055
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
1064
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/max-satisfying.js
|
|
1056
1065
|
var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1057
1066
|
const SemVer = require_semver$1();
|
|
1058
1067
|
const Range = require_range();
|
|
@@ -1078,7 +1087,7 @@ var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
1078
1087
|
module.exports = maxSatisfying;
|
|
1079
1088
|
}));
|
|
1080
1089
|
//#endregion
|
|
1081
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
1090
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/min-satisfying.js
|
|
1082
1091
|
var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1083
1092
|
const SemVer = require_semver$1();
|
|
1084
1093
|
const Range = require_range();
|
|
@@ -1104,7 +1113,7 @@ var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
1104
1113
|
module.exports = minSatisfying;
|
|
1105
1114
|
}));
|
|
1106
1115
|
//#endregion
|
|
1107
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
1116
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/min-version.js
|
|
1108
1117
|
var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1109
1118
|
const SemVer = require_semver$1();
|
|
1110
1119
|
const Range = require_range();
|
|
@@ -1144,7 +1153,7 @@ var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1144
1153
|
module.exports = minVersion;
|
|
1145
1154
|
}));
|
|
1146
1155
|
//#endregion
|
|
1147
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
1156
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/valid.js
|
|
1148
1157
|
var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1149
1158
|
const Range = require_range();
|
|
1150
1159
|
const validRange = (range, options) => {
|
|
@@ -1157,7 +1166,7 @@ var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1157
1166
|
module.exports = validRange;
|
|
1158
1167
|
}));
|
|
1159
1168
|
//#endregion
|
|
1160
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
1169
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/outside.js
|
|
1161
1170
|
var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1162
1171
|
const SemVer = require_semver$1();
|
|
1163
1172
|
const Comparator = require_comparator();
|
|
@@ -1210,21 +1219,21 @@ var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1210
1219
|
module.exports = outside;
|
|
1211
1220
|
}));
|
|
1212
1221
|
//#endregion
|
|
1213
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
1222
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/gtr.js
|
|
1214
1223
|
var require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1215
1224
|
const outside = require_outside();
|
|
1216
1225
|
const gtr = (version, range, options) => outside(version, range, ">", options);
|
|
1217
1226
|
module.exports = gtr;
|
|
1218
1227
|
}));
|
|
1219
1228
|
//#endregion
|
|
1220
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
1229
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/ltr.js
|
|
1221
1230
|
var require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1222
1231
|
const outside = require_outside();
|
|
1223
1232
|
const ltr = (version, range, options) => outside(version, range, "<", options);
|
|
1224
1233
|
module.exports = ltr;
|
|
1225
1234
|
}));
|
|
1226
1235
|
//#endregion
|
|
1227
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
1236
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/intersects.js
|
|
1228
1237
|
var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1229
1238
|
const Range = require_range();
|
|
1230
1239
|
const intersects = (r1, r2, options) => {
|
|
@@ -1235,7 +1244,7 @@ var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1235
1244
|
module.exports = intersects;
|
|
1236
1245
|
}));
|
|
1237
1246
|
//#endregion
|
|
1238
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
1247
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/simplify.js
|
|
1239
1248
|
var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1240
1249
|
const satisfies = require_satisfies();
|
|
1241
1250
|
const compare = require_compare();
|
|
@@ -1265,7 +1274,7 @@ var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1265
1274
|
};
|
|
1266
1275
|
}));
|
|
1267
1276
|
//#endregion
|
|
1268
|
-
//#region ../../node_modules/.pnpm/semver@7.8.
|
|
1277
|
+
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/subset.js
|
|
1269
1278
|
var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1270
1279
|
const Range = require_range();
|
|
1271
1280
|
const Comparator = require_comparator();
|