@wise/wds-codemods 1.0.0-experimental-0695032 → 1.0.0-experimental-37647bf
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/{helpers-CgRlTy3U.js → helpers-BNLAPdMR.js} +160 -190
- package/dist/helpers-BNLAPdMR.js.map +1 -0
- package/dist/index.js +40 -71
- package/dist/index.js.map +1 -1
- package/dist/transforms/button/transformer.js +1 -2
- package/dist/transforms/button/transformer.js.map +1 -1
- package/package.json +4 -9
- package/dist/constants-CcE2TmzN.js +0 -59
- package/dist/constants-CcE2TmzN.js.map +0 -1
- package/dist/helpers-CgRlTy3U.js.map +0 -1
- package/dist/transformer-BHViIQiv.js +0 -490
- package/dist/transformer-BHViIQiv.js.map +0 -1
- package/dist/transforms/list-item/config.json +0 -6
- package/dist/transforms/list-item/transformer.js +0 -4
|
@@ -1,16 +1,41 @@
|
|
|
1
|
-
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
+
key = keys[i];
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
14
|
+
__defProp(to, key, {
|
|
15
|
+
get: ((k) => from[k]).bind(null, key),
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
+
value: mod,
|
|
25
|
+
enumerable: true
|
|
26
|
+
}) : target, mod));
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
2
29
|
let node_child_process = require("node:child_process");
|
|
3
30
|
let node_fs_promises = require("node:fs/promises");
|
|
4
|
-
node_fs_promises =
|
|
31
|
+
node_fs_promises = __toESM(node_fs_promises);
|
|
5
32
|
let node_path = require("node:path");
|
|
6
|
-
node_path =
|
|
33
|
+
node_path = __toESM(node_path);
|
|
7
34
|
let __inquirer_prompts = require("@inquirer/prompts");
|
|
8
35
|
let node_fs = require("node:fs");
|
|
9
|
-
node_fs = require_constants$1.__toESM(node_fs);
|
|
10
|
-
let node_util = require("node:util");
|
|
11
36
|
|
|
12
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
13
|
-
var require_constants = /* @__PURE__ */
|
|
37
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js
|
|
38
|
+
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14
39
|
const SEMVER_SPEC_VERSION = "2.0.0";
|
|
15
40
|
const MAX_LENGTH$2 = 256;
|
|
16
41
|
const MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || 9007199254740991;
|
|
@@ -38,15 +63,15 @@ var require_constants = /* @__PURE__ */ require_constants$1.__commonJSMin(((expo
|
|
|
38
63
|
}));
|
|
39
64
|
|
|
40
65
|
//#endregion
|
|
41
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
42
|
-
var require_debug = /* @__PURE__ */
|
|
66
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js
|
|
67
|
+
var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
43
68
|
const debug$4 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
|
|
44
69
|
module.exports = debug$4;
|
|
45
70
|
}));
|
|
46
71
|
|
|
47
72
|
//#endregion
|
|
48
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
49
|
-
var require_re = /* @__PURE__ */
|
|
73
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.js
|
|
74
|
+
var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
50
75
|
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH: MAX_LENGTH$1 } = require_constants();
|
|
51
76
|
const debug$3 = require_debug();
|
|
52
77
|
exports = module.exports = {};
|
|
@@ -125,8 +150,8 @@ var require_re = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, mo
|
|
|
125
150
|
}));
|
|
126
151
|
|
|
127
152
|
//#endregion
|
|
128
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
129
|
-
var require_parse_options = /* @__PURE__ */
|
|
153
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.js
|
|
154
|
+
var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
130
155
|
const looseOption = Object.freeze({ loose: true });
|
|
131
156
|
const emptyOpts = Object.freeze({});
|
|
132
157
|
const parseOptions$3 = (options) => {
|
|
@@ -138,10 +163,11 @@ var require_parse_options = /* @__PURE__ */ require_constants$1.__commonJSMin(((
|
|
|
138
163
|
}));
|
|
139
164
|
|
|
140
165
|
//#endregion
|
|
141
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
142
|
-
var require_identifiers = /* @__PURE__ */
|
|
166
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js
|
|
167
|
+
var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
143
168
|
const numeric = /^[0-9]+$/;
|
|
144
169
|
const compareIdentifiers$1 = (a, b) => {
|
|
170
|
+
if (typeof a === "number" && typeof b === "number") return a === b ? 0 : a < b ? -1 : 1;
|
|
145
171
|
const anum = numeric.test(a);
|
|
146
172
|
const bnum = numeric.test(b);
|
|
147
173
|
if (anum && bnum) {
|
|
@@ -158,8 +184,8 @@ var require_identifiers = /* @__PURE__ */ require_constants$1.__commonJSMin(((ex
|
|
|
158
184
|
}));
|
|
159
185
|
|
|
160
186
|
//#endregion
|
|
161
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
162
|
-
var require_semver$1 = /* @__PURE__ */
|
|
187
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.js
|
|
188
|
+
var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
163
189
|
const debug$2 = require_debug();
|
|
164
190
|
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
165
191
|
const { safeRe: re$3, t: t$3 } = require_re();
|
|
@@ -215,7 +241,13 @@ var require_semver$1 = /* @__PURE__ */ require_constants$1.__commonJSMin(((expor
|
|
|
215
241
|
}
|
|
216
242
|
compareMain(other) {
|
|
217
243
|
if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options);
|
|
218
|
-
|
|
244
|
+
if (this.major < other.major) return -1;
|
|
245
|
+
if (this.major > other.major) return 1;
|
|
246
|
+
if (this.minor < other.minor) return -1;
|
|
247
|
+
if (this.minor > other.minor) return 1;
|
|
248
|
+
if (this.patch < other.patch) return -1;
|
|
249
|
+
if (this.patch > other.patch) return 1;
|
|
250
|
+
return 0;
|
|
219
251
|
}
|
|
220
252
|
comparePre(other) {
|
|
221
253
|
if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options);
|
|
@@ -332,8 +364,8 @@ var require_semver$1 = /* @__PURE__ */ require_constants$1.__commonJSMin(((expor
|
|
|
332
364
|
}));
|
|
333
365
|
|
|
334
366
|
//#endregion
|
|
335
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
336
|
-
var require_parse = /* @__PURE__ */
|
|
367
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js
|
|
368
|
+
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
337
369
|
const SemVer$14 = require_semver$1();
|
|
338
370
|
const parse$6 = (version, options, throwErrors = false) => {
|
|
339
371
|
if (version instanceof SemVer$14) return version;
|
|
@@ -348,8 +380,8 @@ var require_parse = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports,
|
|
|
348
380
|
}));
|
|
349
381
|
|
|
350
382
|
//#endregion
|
|
351
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
352
|
-
var require_valid$1 = /* @__PURE__ */
|
|
383
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js
|
|
384
|
+
var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
353
385
|
const parse$5 = require_parse();
|
|
354
386
|
const valid$1 = (version, options) => {
|
|
355
387
|
const v = parse$5(version, options);
|
|
@@ -359,8 +391,8 @@ var require_valid$1 = /* @__PURE__ */ require_constants$1.__commonJSMin(((export
|
|
|
359
391
|
}));
|
|
360
392
|
|
|
361
393
|
//#endregion
|
|
362
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
363
|
-
var require_clean = /* @__PURE__ */
|
|
394
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js
|
|
395
|
+
var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
364
396
|
const parse$4 = require_parse();
|
|
365
397
|
const clean$1 = (version, options) => {
|
|
366
398
|
const s = parse$4(version.trim().replace(/^[=v]+/, ""), options);
|
|
@@ -370,8 +402,8 @@ var require_clean = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports,
|
|
|
370
402
|
}));
|
|
371
403
|
|
|
372
404
|
//#endregion
|
|
373
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
374
|
-
var require_inc = /* @__PURE__ */
|
|
405
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/inc.js
|
|
406
|
+
var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
375
407
|
const SemVer$13 = require_semver$1();
|
|
376
408
|
const inc$1 = (version, release, options, identifier, identifierBase) => {
|
|
377
409
|
if (typeof options === "string") {
|
|
@@ -389,8 +421,8 @@ var require_inc = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, m
|
|
|
389
421
|
}));
|
|
390
422
|
|
|
391
423
|
//#endregion
|
|
392
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
393
|
-
var require_diff = /* @__PURE__ */
|
|
424
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js
|
|
425
|
+
var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
394
426
|
const parse$3 = require_parse();
|
|
395
427
|
const diff$1 = (version1, version2) => {
|
|
396
428
|
const v1 = parse$3(version1, null, true);
|
|
@@ -418,32 +450,32 @@ var require_diff = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports,
|
|
|
418
450
|
}));
|
|
419
451
|
|
|
420
452
|
//#endregion
|
|
421
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
422
|
-
var require_major = /* @__PURE__ */
|
|
453
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/major.js
|
|
454
|
+
var require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
423
455
|
const SemVer$12 = require_semver$1();
|
|
424
456
|
const major$1 = (a, loose) => new SemVer$12(a, loose).major;
|
|
425
457
|
module.exports = major$1;
|
|
426
458
|
}));
|
|
427
459
|
|
|
428
460
|
//#endregion
|
|
429
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
430
|
-
var require_minor = /* @__PURE__ */
|
|
461
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/minor.js
|
|
462
|
+
var require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
431
463
|
const SemVer$11 = require_semver$1();
|
|
432
464
|
const minor$1 = (a, loose) => new SemVer$11(a, loose).minor;
|
|
433
465
|
module.exports = minor$1;
|
|
434
466
|
}));
|
|
435
467
|
|
|
436
468
|
//#endregion
|
|
437
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
438
|
-
var require_patch = /* @__PURE__ */
|
|
469
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/patch.js
|
|
470
|
+
var require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
439
471
|
const SemVer$10 = require_semver$1();
|
|
440
472
|
const patch$1 = (a, loose) => new SemVer$10(a, loose).patch;
|
|
441
473
|
module.exports = patch$1;
|
|
442
474
|
}));
|
|
443
475
|
|
|
444
476
|
//#endregion
|
|
445
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
446
|
-
var require_prerelease = /* @__PURE__ */
|
|
477
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js
|
|
478
|
+
var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
447
479
|
const parse$2 = require_parse();
|
|
448
480
|
const prerelease$1 = (version, options) => {
|
|
449
481
|
const parsed = parse$2(version, options);
|
|
@@ -453,32 +485,32 @@ var require_prerelease = /* @__PURE__ */ require_constants$1.__commonJSMin(((exp
|
|
|
453
485
|
}));
|
|
454
486
|
|
|
455
487
|
//#endregion
|
|
456
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
457
|
-
var require_compare = /* @__PURE__ */
|
|
488
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js
|
|
489
|
+
var require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
458
490
|
const SemVer$9 = require_semver$1();
|
|
459
491
|
const compare$11 = (a, b, loose) => new SemVer$9(a, loose).compare(new SemVer$9(b, loose));
|
|
460
492
|
module.exports = compare$11;
|
|
461
493
|
}));
|
|
462
494
|
|
|
463
495
|
//#endregion
|
|
464
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
465
|
-
var require_rcompare = /* @__PURE__ */
|
|
496
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rcompare.js
|
|
497
|
+
var require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
466
498
|
const compare$10 = require_compare();
|
|
467
499
|
const rcompare$1 = (a, b, loose) => compare$10(b, a, loose);
|
|
468
500
|
module.exports = rcompare$1;
|
|
469
501
|
}));
|
|
470
502
|
|
|
471
503
|
//#endregion
|
|
472
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
473
|
-
var require_compare_loose = /* @__PURE__ */
|
|
504
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-loose.js
|
|
505
|
+
var require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
474
506
|
const compare$9 = require_compare();
|
|
475
507
|
const compareLoose$1 = (a, b) => compare$9(a, b, true);
|
|
476
508
|
module.exports = compareLoose$1;
|
|
477
509
|
}));
|
|
478
510
|
|
|
479
511
|
//#endregion
|
|
480
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
481
|
-
var require_compare_build = /* @__PURE__ */
|
|
512
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-build.js
|
|
513
|
+
var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
482
514
|
const SemVer$8 = require_semver$1();
|
|
483
515
|
const compareBuild$3 = (a, b, loose) => {
|
|
484
516
|
const versionA = new SemVer$8(a, loose);
|
|
@@ -489,72 +521,72 @@ var require_compare_build = /* @__PURE__ */ require_constants$1.__commonJSMin(((
|
|
|
489
521
|
}));
|
|
490
522
|
|
|
491
523
|
//#endregion
|
|
492
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
493
|
-
var require_sort = /* @__PURE__ */
|
|
524
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/sort.js
|
|
525
|
+
var require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
494
526
|
const compareBuild$2 = require_compare_build();
|
|
495
527
|
const sort$1 = (list$1, loose) => list$1.sort((a, b) => compareBuild$2(a, b, loose));
|
|
496
528
|
module.exports = sort$1;
|
|
497
529
|
}));
|
|
498
530
|
|
|
499
531
|
//#endregion
|
|
500
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
501
|
-
var require_rsort = /* @__PURE__ */
|
|
532
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rsort.js
|
|
533
|
+
var require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
502
534
|
const compareBuild$1 = require_compare_build();
|
|
503
535
|
const rsort$1 = (list$1, loose) => list$1.sort((a, b) => compareBuild$1(b, a, loose));
|
|
504
536
|
module.exports = rsort$1;
|
|
505
537
|
}));
|
|
506
538
|
|
|
507
539
|
//#endregion
|
|
508
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
509
|
-
var require_gt = /* @__PURE__ */
|
|
540
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js
|
|
541
|
+
var require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
510
542
|
const compare$8 = require_compare();
|
|
511
543
|
const gt$4 = (a, b, loose) => compare$8(a, b, loose) > 0;
|
|
512
544
|
module.exports = gt$4;
|
|
513
545
|
}));
|
|
514
546
|
|
|
515
547
|
//#endregion
|
|
516
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
517
|
-
var require_lt = /* @__PURE__ */
|
|
548
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js
|
|
549
|
+
var require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
518
550
|
const compare$7 = require_compare();
|
|
519
551
|
const lt$3 = (a, b, loose) => compare$7(a, b, loose) < 0;
|
|
520
552
|
module.exports = lt$3;
|
|
521
553
|
}));
|
|
522
554
|
|
|
523
555
|
//#endregion
|
|
524
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
525
|
-
var require_eq = /* @__PURE__ */
|
|
556
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js
|
|
557
|
+
var require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
526
558
|
const compare$6 = require_compare();
|
|
527
559
|
const eq$2 = (a, b, loose) => compare$6(a, b, loose) === 0;
|
|
528
560
|
module.exports = eq$2;
|
|
529
561
|
}));
|
|
530
562
|
|
|
531
563
|
//#endregion
|
|
532
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
533
|
-
var require_neq = /* @__PURE__ */
|
|
564
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js
|
|
565
|
+
var require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
534
566
|
const compare$5 = require_compare();
|
|
535
567
|
const neq$2 = (a, b, loose) => compare$5(a, b, loose) !== 0;
|
|
536
568
|
module.exports = neq$2;
|
|
537
569
|
}));
|
|
538
570
|
|
|
539
571
|
//#endregion
|
|
540
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
541
|
-
var require_gte = /* @__PURE__ */
|
|
572
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js
|
|
573
|
+
var require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
542
574
|
const compare$4 = require_compare();
|
|
543
575
|
const gte$3 = (a, b, loose) => compare$4(a, b, loose) >= 0;
|
|
544
576
|
module.exports = gte$3;
|
|
545
577
|
}));
|
|
546
578
|
|
|
547
579
|
//#endregion
|
|
548
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
549
|
-
var require_lte = /* @__PURE__ */
|
|
580
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js
|
|
581
|
+
var require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
550
582
|
const compare$3 = require_compare();
|
|
551
583
|
const lte$3 = (a, b, loose) => compare$3(a, b, loose) <= 0;
|
|
552
584
|
module.exports = lte$3;
|
|
553
585
|
}));
|
|
554
586
|
|
|
555
587
|
//#endregion
|
|
556
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
557
|
-
var require_cmp = /* @__PURE__ */
|
|
588
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js
|
|
589
|
+
var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
558
590
|
const eq$1 = require_eq();
|
|
559
591
|
const neq$1 = require_neq();
|
|
560
592
|
const gt$3 = require_gt();
|
|
@@ -586,8 +618,8 @@ var require_cmp = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, m
|
|
|
586
618
|
}));
|
|
587
619
|
|
|
588
620
|
//#endregion
|
|
589
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
590
|
-
var require_coerce = /* @__PURE__ */
|
|
621
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js
|
|
622
|
+
var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
591
623
|
const SemVer$7 = require_semver$1();
|
|
592
624
|
const parse$1 = require_parse();
|
|
593
625
|
const { safeRe: re$2, t: t$2 } = require_re();
|
|
@@ -615,8 +647,8 @@ var require_coerce = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports
|
|
|
615
647
|
}));
|
|
616
648
|
|
|
617
649
|
//#endregion
|
|
618
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
619
|
-
var require_lrucache = /* @__PURE__ */
|
|
650
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js
|
|
651
|
+
var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
620
652
|
var LRUCache = class {
|
|
621
653
|
constructor() {
|
|
622
654
|
this.max = 1e3;
|
|
@@ -649,8 +681,8 @@ var require_lrucache = /* @__PURE__ */ require_constants$1.__commonJSMin(((expor
|
|
|
649
681
|
}));
|
|
650
682
|
|
|
651
683
|
//#endregion
|
|
652
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
653
|
-
var require_range = /* @__PURE__ */
|
|
684
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js
|
|
685
|
+
var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
654
686
|
const SPACE_CHARACTERS = /\s+/g;
|
|
655
687
|
var Range$11 = class Range$11 {
|
|
656
688
|
constructor(range, options) {
|
|
@@ -779,6 +811,7 @@ var require_range = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports,
|
|
|
779
811
|
return result;
|
|
780
812
|
};
|
|
781
813
|
const parseComparator = (comp, options) => {
|
|
814
|
+
comp = comp.replace(re$1[t$1.BUILD], "");
|
|
782
815
|
debug$1("comp", comp, options);
|
|
783
816
|
comp = replaceCarets(comp, options);
|
|
784
817
|
debug$1("caret", comp);
|
|
@@ -922,8 +955,8 @@ var require_range = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports,
|
|
|
922
955
|
}));
|
|
923
956
|
|
|
924
957
|
//#endregion
|
|
925
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
926
|
-
var require_comparator = /* @__PURE__ */
|
|
958
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js
|
|
959
|
+
var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
927
960
|
const ANY$2 = Symbol("SemVer ANY");
|
|
928
961
|
var Comparator$3 = class Comparator$3 {
|
|
929
962
|
static get ANY() {
|
|
@@ -994,8 +1027,8 @@ var require_comparator = /* @__PURE__ */ require_constants$1.__commonJSMin(((exp
|
|
|
994
1027
|
}));
|
|
995
1028
|
|
|
996
1029
|
//#endregion
|
|
997
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
998
|
-
var require_satisfies = /* @__PURE__ */
|
|
1030
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js
|
|
1031
|
+
var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
999
1032
|
const Range$9 = require_range();
|
|
1000
1033
|
const satisfies$4 = (version, range, options) => {
|
|
1001
1034
|
try {
|
|
@@ -1009,16 +1042,16 @@ var require_satisfies = /* @__PURE__ */ require_constants$1.__commonJSMin(((expo
|
|
|
1009
1042
|
}));
|
|
1010
1043
|
|
|
1011
1044
|
//#endregion
|
|
1012
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
1013
|
-
var require_to_comparators = /* @__PURE__ */
|
|
1045
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/to-comparators.js
|
|
1046
|
+
var require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1014
1047
|
const Range$8 = require_range();
|
|
1015
1048
|
const toComparators$1 = (range, options) => new Range$8(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
1016
1049
|
module.exports = toComparators$1;
|
|
1017
1050
|
}));
|
|
1018
1051
|
|
|
1019
1052
|
//#endregion
|
|
1020
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
1021
|
-
var require_max_satisfying = /* @__PURE__ */
|
|
1053
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/max-satisfying.js
|
|
1054
|
+
var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1022
1055
|
const SemVer$4 = require_semver$1();
|
|
1023
1056
|
const Range$7 = require_range();
|
|
1024
1057
|
const maxSatisfying$1 = (versions, range, options) => {
|
|
@@ -1044,8 +1077,8 @@ var require_max_satisfying = /* @__PURE__ */ require_constants$1.__commonJSMin((
|
|
|
1044
1077
|
}));
|
|
1045
1078
|
|
|
1046
1079
|
//#endregion
|
|
1047
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
1048
|
-
var require_min_satisfying = /* @__PURE__ */
|
|
1080
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-satisfying.js
|
|
1081
|
+
var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1049
1082
|
const SemVer$3 = require_semver$1();
|
|
1050
1083
|
const Range$6 = require_range();
|
|
1051
1084
|
const minSatisfying$1 = (versions, range, options) => {
|
|
@@ -1071,8 +1104,8 @@ var require_min_satisfying = /* @__PURE__ */ require_constants$1.__commonJSMin((
|
|
|
1071
1104
|
}));
|
|
1072
1105
|
|
|
1073
1106
|
//#endregion
|
|
1074
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
1075
|
-
var require_min_version = /* @__PURE__ */
|
|
1107
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-version.js
|
|
1108
|
+
var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1076
1109
|
const SemVer$2 = require_semver$1();
|
|
1077
1110
|
const Range$5 = require_range();
|
|
1078
1111
|
const gt$2 = require_gt();
|
|
@@ -1111,8 +1144,8 @@ var require_min_version = /* @__PURE__ */ require_constants$1.__commonJSMin(((ex
|
|
|
1111
1144
|
}));
|
|
1112
1145
|
|
|
1113
1146
|
//#endregion
|
|
1114
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
1115
|
-
var require_valid = /* @__PURE__ */
|
|
1147
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/valid.js
|
|
1148
|
+
var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1116
1149
|
const Range$4 = require_range();
|
|
1117
1150
|
const validRange$1 = (range, options) => {
|
|
1118
1151
|
try {
|
|
@@ -1125,8 +1158,8 @@ var require_valid = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports,
|
|
|
1125
1158
|
}));
|
|
1126
1159
|
|
|
1127
1160
|
//#endregion
|
|
1128
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
1129
|
-
var require_outside = /* @__PURE__ */
|
|
1161
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/outside.js
|
|
1162
|
+
var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1130
1163
|
const SemVer$1 = require_semver$1();
|
|
1131
1164
|
const Comparator$2 = require_comparator();
|
|
1132
1165
|
const { ANY: ANY$1 } = Comparator$2;
|
|
@@ -1179,24 +1212,24 @@ var require_outside = /* @__PURE__ */ require_constants$1.__commonJSMin(((export
|
|
|
1179
1212
|
}));
|
|
1180
1213
|
|
|
1181
1214
|
//#endregion
|
|
1182
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
1183
|
-
var require_gtr = /* @__PURE__ */
|
|
1215
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/gtr.js
|
|
1216
|
+
var require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1184
1217
|
const outside$2 = require_outside();
|
|
1185
1218
|
const gtr$1 = (version, range, options) => outside$2(version, range, ">", options);
|
|
1186
1219
|
module.exports = gtr$1;
|
|
1187
1220
|
}));
|
|
1188
1221
|
|
|
1189
1222
|
//#endregion
|
|
1190
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
1191
|
-
var require_ltr = /* @__PURE__ */
|
|
1223
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/ltr.js
|
|
1224
|
+
var require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1192
1225
|
const outside$1 = require_outside();
|
|
1193
1226
|
const ltr$1 = (version, range, options) => outside$1(version, range, "<", options);
|
|
1194
1227
|
module.exports = ltr$1;
|
|
1195
1228
|
}));
|
|
1196
1229
|
|
|
1197
1230
|
//#endregion
|
|
1198
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
1199
|
-
var require_intersects = /* @__PURE__ */
|
|
1231
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/intersects.js
|
|
1232
|
+
var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1200
1233
|
const Range$2 = require_range();
|
|
1201
1234
|
const intersects$1 = (r1, r2, options) => {
|
|
1202
1235
|
r1 = new Range$2(r1, options);
|
|
@@ -1207,8 +1240,8 @@ var require_intersects = /* @__PURE__ */ require_constants$1.__commonJSMin(((exp
|
|
|
1207
1240
|
}));
|
|
1208
1241
|
|
|
1209
1242
|
//#endregion
|
|
1210
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
1211
|
-
var require_simplify = /* @__PURE__ */
|
|
1243
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/simplify.js
|
|
1244
|
+
var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1212
1245
|
const satisfies$2 = require_satisfies();
|
|
1213
1246
|
const compare$2 = require_compare();
|
|
1214
1247
|
module.exports = (versions, range, options) => {
|
|
@@ -1238,8 +1271,8 @@ var require_simplify = /* @__PURE__ */ require_constants$1.__commonJSMin(((expor
|
|
|
1238
1271
|
}));
|
|
1239
1272
|
|
|
1240
1273
|
//#endregion
|
|
1241
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
1242
|
-
var require_subset = /* @__PURE__ */
|
|
1274
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/subset.js
|
|
1275
|
+
var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1243
1276
|
const Range$1 = require_range();
|
|
1244
1277
|
const Comparator$1 = require_comparator();
|
|
1245
1278
|
const { ANY } = Comparator$1;
|
|
@@ -1334,8 +1367,8 @@ var require_subset = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports
|
|
|
1334
1367
|
}));
|
|
1335
1368
|
|
|
1336
1369
|
//#endregion
|
|
1337
|
-
//#region node_modules/.pnpm/semver@7.7.
|
|
1338
|
-
var require_semver = /* @__PURE__ */
|
|
1370
|
+
//#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/index.js
|
|
1371
|
+
var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1339
1372
|
const internalRe = require_re();
|
|
1340
1373
|
const constants = require_constants();
|
|
1341
1374
|
const SemVer = require_semver$1();
|
|
@@ -1428,7 +1461,6 @@ var require_semver = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports
|
|
|
1428
1461
|
|
|
1429
1462
|
//#endregion
|
|
1430
1463
|
//#region src/controller/helpers/getCodemodConfig.ts
|
|
1431
|
-
/** Retrieves a JSON object from a file path, returning null if the file does not exist */
|
|
1432
1464
|
const getJsonFromPath = (baseDir, fileName) => {
|
|
1433
1465
|
const jsonPath = (0, node_path.join)(baseDir, fileName);
|
|
1434
1466
|
try {
|
|
@@ -1450,7 +1482,6 @@ function getCodemodConfig(codemodPath, options = {}) {
|
|
|
1450
1482
|
|
|
1451
1483
|
//#endregion
|
|
1452
1484
|
//#region src/controller/helpers/repository.ts
|
|
1453
|
-
const execAsync = (0, node_util.promisify)(node_child_process.exec);
|
|
1454
1485
|
/**
|
|
1455
1486
|
* Finds the root of the project by looking for the `.git` directory.
|
|
1456
1487
|
*/
|
|
@@ -1475,9 +1506,9 @@ function findProjectRoot() {
|
|
|
1475
1506
|
* the presence of `package.json` files and them optimistically
|
|
1476
1507
|
* containing a `@transferwise/components` string.
|
|
1477
1508
|
* */
|
|
1478
|
-
|
|
1509
|
+
function findPackages() {
|
|
1479
1510
|
try {
|
|
1480
|
-
const
|
|
1511
|
+
const packages = (0, node_child_process.execSync)([
|
|
1481
1512
|
"find ./",
|
|
1482
1513
|
"-type f",
|
|
1483
1514
|
"-name \"package.json\"",
|
|
@@ -1487,8 +1518,7 @@ async function findPackages() {
|
|
|
1487
1518
|
].join(" "), {
|
|
1488
1519
|
cwd: findProjectRoot(),
|
|
1489
1520
|
encoding: "utf8"
|
|
1490
|
-
});
|
|
1491
|
-
const packages = stdout.trim().split("\n").filter(Boolean).map(node_path.default.dirname);
|
|
1521
|
+
}).trim().split("\n").map(node_path.default.dirname);
|
|
1492
1522
|
if (packages.length === 0) throw new Error();
|
|
1493
1523
|
return packages;
|
|
1494
1524
|
} catch {
|
|
@@ -1541,7 +1571,7 @@ const renderTable = (data, indexHeading = "index") => {
|
|
|
1541
1571
|
|
|
1542
1572
|
//#endregion
|
|
1543
1573
|
//#region src/controller/helpers/dependencyChecks.ts
|
|
1544
|
-
var import_semver = /* @__PURE__ */
|
|
1574
|
+
var import_semver = /* @__PURE__ */ __toESM(require_semver());
|
|
1545
1575
|
/**
|
|
1546
1576
|
* Checks if the installed version satisfies the given version requirement.
|
|
1547
1577
|
*/
|
|
@@ -1580,20 +1610,22 @@ function findClosestPackageJson(currentPath) {
|
|
|
1580
1610
|
*/
|
|
1581
1611
|
const assessPrerequisites = (packagePath, codemodPath) => {
|
|
1582
1612
|
try {
|
|
1613
|
+
const SYMBOL = {
|
|
1614
|
+
OK: "\x1B[32m✔\x1B[0m",
|
|
1615
|
+
FAIL: "\x1B[31m✗\x1B[0m"
|
|
1616
|
+
};
|
|
1583
1617
|
const codemodConfig = getJsonFromPath((0, node_path.dirname)(codemodPath), "config.json");
|
|
1584
1618
|
const resolvedPackagePath = (0, node_path.resolve)(process.cwd(), packagePath);
|
|
1585
1619
|
const actualPackagePath = (0, node_fs.existsSync)((0, node_path.join)(resolvedPackagePath, "package.json")) ? resolvedPackagePath : findClosestPackageJson(resolvedPackagePath);
|
|
1586
1620
|
if (!actualPackagePath) {
|
|
1587
|
-
console.error(`${
|
|
1621
|
+
console.error(`${SYMBOL.FAIL} \x1b[1mCould not find a package.json in or above ${packagePath}\x1b[0m`);
|
|
1588
1622
|
return false;
|
|
1589
1623
|
}
|
|
1590
|
-
if (actualPackagePath !== resolvedPackagePath) console.info(
|
|
1591
|
-
const
|
|
1592
|
-
if (!packageJson) return false;
|
|
1593
|
-
const { dependencies = {}, peerDependencies = {} } = packageJson;
|
|
1624
|
+
if (actualPackagePath !== resolvedPackagePath) console.info(`Using package.json from ${actualPackagePath} for dependency checks`);
|
|
1625
|
+
const { dependencies = {}, peerDependencies = {} } = getJsonFromPath(actualPackagePath, "package.json");
|
|
1594
1626
|
const comparisons = {};
|
|
1595
1627
|
let isCompliant = true;
|
|
1596
|
-
if (codemodConfig
|
|
1628
|
+
if (codemodConfig.prerequisites) Object.entries(codemodConfig.prerequisites).forEach(([name, versionRequirement]) => {
|
|
1597
1629
|
const nodeModulesVersion = getVersionFromNodeModules(actualPackagePath, name);
|
|
1598
1630
|
const isDependencySatisfied = isVersionSatisfied(dependencies[name], versionRequirement);
|
|
1599
1631
|
const isPeerDependencySatisfied = isVersionSatisfied(peerDependencies[name], versionRequirement);
|
|
@@ -1602,14 +1634,14 @@ const assessPrerequisites = (packagePath, codemodPath) => {
|
|
|
1602
1634
|
isCompliant = false;
|
|
1603
1635
|
comparisons[name] = {
|
|
1604
1636
|
required: versionRequirement,
|
|
1605
|
-
dependencies: isDependencySatisfied ?
|
|
1606
|
-
peerDependencies: isPeerDependencySatisfied ?
|
|
1607
|
-
node_modules: isInstalledSatisfied ?
|
|
1637
|
+
dependencies: isDependencySatisfied ? SYMBOL.OK : `${SYMBOL.FAIL} ${dependencies[name] || "N/A"}`,
|
|
1638
|
+
peerDependencies: isPeerDependencySatisfied ? SYMBOL.OK : `${SYMBOL.FAIL} ${peerDependencies[name] || "N/A"}`,
|
|
1639
|
+
node_modules: isInstalledSatisfied ? SYMBOL.OK : `${SYMBOL.FAIL} ${nodeModulesVersion || "N/A"}`
|
|
1608
1640
|
};
|
|
1609
1641
|
}
|
|
1610
1642
|
});
|
|
1611
1643
|
if (!isCompliant) {
|
|
1612
|
-
console.info(`${
|
|
1644
|
+
console.info(`${SYMBOL.FAIL} \x1b[1mPrerequisite check failed.\x1b[0m`);
|
|
1613
1645
|
renderTable(comparisons, "package");
|
|
1614
1646
|
return false;
|
|
1615
1647
|
}
|
|
@@ -1619,53 +1651,6 @@ const assessPrerequisites = (packagePath, codemodPath) => {
|
|
|
1619
1651
|
return false;
|
|
1620
1652
|
}
|
|
1621
1653
|
};
|
|
1622
|
-
/**
|
|
1623
|
-
* Batch prerequisite assessment across multiple target paths.
|
|
1624
|
-
* - Resolves each target to its effective package root (closest package.json)
|
|
1625
|
-
* - Deduplicates by package root and checks each unique root once
|
|
1626
|
-
* - Logs a concise summary; detailed table is logged by assessPrerequisites on failure
|
|
1627
|
-
*/
|
|
1628
|
-
const assessPrerequisitesBatch = (targetPaths, codemodPath, spinnies) => {
|
|
1629
|
-
const packageRootToTargets = /* @__PURE__ */ new Map();
|
|
1630
|
-
const failedTargetsNoPackage = [];
|
|
1631
|
-
for (const target of targetPaths) {
|
|
1632
|
-
const resolved = (0, node_path.resolve)(process.cwd(), target);
|
|
1633
|
-
const actual = (0, node_fs.existsSync)((0, node_path.join)(resolved, "package.json")) ? resolved : findClosestPackageJson(resolved);
|
|
1634
|
-
if (actual) {
|
|
1635
|
-
const list$1 = packageRootToTargets.get(actual) ?? [];
|
|
1636
|
-
list$1.push(target);
|
|
1637
|
-
packageRootToTargets.set(target, list$1);
|
|
1638
|
-
} else failedTargetsNoPackage.push(target);
|
|
1639
|
-
}
|
|
1640
|
-
let allPassed = true;
|
|
1641
|
-
const results = /* @__PURE__ */ new Map();
|
|
1642
|
-
for (const [pkgRoot] of packageRootToTargets.entries()) {
|
|
1643
|
-
const passed = assessPrerequisites(pkgRoot, codemodPath);
|
|
1644
|
-
results.set(pkgRoot, passed);
|
|
1645
|
-
if (!passed) allPassed = false;
|
|
1646
|
-
}
|
|
1647
|
-
const totalTargets = targetPaths.length;
|
|
1648
|
-
const uniquePackages = packageRootToTargets.size;
|
|
1649
|
-
const passedCount = Array.from(results.values()).filter(Boolean).length;
|
|
1650
|
-
const failedCount = uniquePackages - passedCount;
|
|
1651
|
-
if (failedTargetsNoPackage.length || !passedCount) if (!passedCount) spinnies.fail("prerequisite-check", { text: "All targets failed prerequisite checks" });
|
|
1652
|
-
else {
|
|
1653
|
-
spinnies.fail("prerequisite-check", { text: `No package.json found for ${failedTargetsNoPackage.length} target${failedTargetsNoPackage.length !== 1 ? "s" : ""} (searching upwards to project root).` });
|
|
1654
|
-
failedTargetsNoPackage.forEach((t$5) => console.error(`- ${t$5}`));
|
|
1655
|
-
}
|
|
1656
|
-
else {
|
|
1657
|
-
const failedPart = failedCount > 0 ? `, \x1b[31m${failedCount} failed\x1b[0m` : "";
|
|
1658
|
-
spinnies.succeed("prerequisite-check", { text: `\x1b[0mChecked ${totalTargets} target${totalTargets !== 1 ? "s" : ""} across ${uniquePackages} package${uniquePackages !== 1 ? "s" : ""}:\x1b[0m \x1b[32m${passedCount} passed\x1b[0m${failedPart}` });
|
|
1659
|
-
}
|
|
1660
|
-
const failedPackageRoots = Array.from(results.entries()).filter(([, ok]) => !ok).map(([root]) => root);
|
|
1661
|
-
return {
|
|
1662
|
-
allPassed,
|
|
1663
|
-
results,
|
|
1664
|
-
packageRootToTargets,
|
|
1665
|
-
failedPackageRoots,
|
|
1666
|
-
failedTargetsNoPackage
|
|
1667
|
-
};
|
|
1668
|
-
};
|
|
1669
1654
|
|
|
1670
1655
|
//#endregion
|
|
1671
1656
|
//#region src/controller/helpers/getOptions.ts
|
|
@@ -1742,9 +1727,9 @@ const queryPackages = async (packages) => {
|
|
|
1742
1727
|
description: choice === "." ? "Target the entire project" : `Target ${choice} directory`
|
|
1743
1728
|
}));
|
|
1744
1729
|
},
|
|
1745
|
-
validate: (path$
|
|
1746
|
-
if (!path$
|
|
1747
|
-
const fullPath = (0, node_path.join)(process.cwd(), path$
|
|
1730
|
+
validate: (path$3) => {
|
|
1731
|
+
if (!path$3?.trim()) return "Path cannot be empty";
|
|
1732
|
+
const fullPath = (0, node_path.join)(process.cwd(), path$3);
|
|
1748
1733
|
if (!(0, node_fs.existsSync)(fullPath)) return "Folder does not exist";
|
|
1749
1734
|
if (!(0, node_fs.statSync)(fullPath).isDirectory()) return "Path must be a directory";
|
|
1750
1735
|
return true;
|
|
@@ -1869,21 +1854,20 @@ const determineGitIgnore = async (args) => {
|
|
|
1869
1854
|
async function getOptions({ transformFiles, packages, root, preselectedTransformFile }) {
|
|
1870
1855
|
const args = process.argv.slice(2);
|
|
1871
1856
|
if (preselectedTransformFile && args[0] === preselectedTransformFile) args.shift();
|
|
1872
|
-
const transformFile = preselectedTransformFile || await determineTransformer({
|
|
1873
|
-
candidate: args[0] ?? "",
|
|
1874
|
-
transformFiles
|
|
1875
|
-
});
|
|
1876
1857
|
return {
|
|
1877
|
-
transformFile
|
|
1858
|
+
transformFile: preselectedTransformFile || await determineTransformer({
|
|
1859
|
+
candidate: args[0] ?? "",
|
|
1860
|
+
transformFiles
|
|
1861
|
+
}),
|
|
1878
1862
|
targetPaths: await determinePaths({
|
|
1879
1863
|
candidate: preselectedTransformFile ? args[0] ?? "" : args[1] ?? "",
|
|
1880
1864
|
root,
|
|
1881
1865
|
packages
|
|
1882
1866
|
}),
|
|
1883
|
-
isDry:
|
|
1867
|
+
isDry: await determineIsDryMode(args),
|
|
1884
1868
|
isPrint: await determineIsPrint(args),
|
|
1885
|
-
ignorePatterns:
|
|
1886
|
-
useGitIgnore:
|
|
1869
|
+
ignorePatterns: await determineIgnorePatterns(args),
|
|
1870
|
+
useGitIgnore: await determineGitIgnore(args)
|
|
1887
1871
|
};
|
|
1888
1872
|
}
|
|
1889
1873
|
var getOptions_default = getOptions;
|
|
@@ -1971,24 +1955,16 @@ async function runTransformPrompts(codemodPath) {
|
|
|
1971
1955
|
}
|
|
1972
1956
|
|
|
1973
1957
|
//#endregion
|
|
1974
|
-
|
|
1975
|
-
const CLAUDE_SETTINGS_FILE = ".claude/settings.json";
|
|
1976
|
-
function validateClaudeConfig() {
|
|
1977
|
-
const claudeSettingsPath = node_path.default.resolve(process.env.HOME || "", CLAUDE_SETTINGS_FILE);
|
|
1978
|
-
if (!node_fs.default.existsSync(claudeSettingsPath)) throw new Error(`${require_constants$1.CONSOLE_ICONS.error} Claude Code is not configured. Expected settings file at: ${claudeSettingsPath}. Please follow the setup instructions:\n https://transferwise.atlassian.net/wiki/spaces/GenAIP/pages/3709765113/Configuring+Claude+Code\n`);
|
|
1979
|
-
}
|
|
1980
|
-
|
|
1981
|
-
//#endregion
|
|
1982
|
-
Object.defineProperty(exports, 'assessPrerequisites', {
|
|
1958
|
+
Object.defineProperty(exports, '__toESM', {
|
|
1983
1959
|
enumerable: true,
|
|
1984
1960
|
get: function () {
|
|
1985
|
-
return
|
|
1961
|
+
return __toESM;
|
|
1986
1962
|
}
|
|
1987
1963
|
});
|
|
1988
|
-
Object.defineProperty(exports, '
|
|
1964
|
+
Object.defineProperty(exports, 'assessPrerequisites', {
|
|
1989
1965
|
enumerable: true,
|
|
1990
1966
|
get: function () {
|
|
1991
|
-
return
|
|
1967
|
+
return assessPrerequisites;
|
|
1992
1968
|
}
|
|
1993
1969
|
});
|
|
1994
1970
|
Object.defineProperty(exports, 'findPackages', {
|
|
@@ -2033,10 +2009,4 @@ Object.defineProperty(exports, 'runTransformPrompts', {
|
|
|
2033
2009
|
return runTransformPrompts;
|
|
2034
2010
|
}
|
|
2035
2011
|
});
|
|
2036
|
-
|
|
2037
|
-
enumerable: true,
|
|
2038
|
-
get: function () {
|
|
2039
|
-
return validateClaudeConfig;
|
|
2040
|
-
}
|
|
2041
|
-
});
|
|
2042
|
-
//# sourceMappingURL=helpers-CgRlTy3U.js.map
|
|
2012
|
+
//# sourceMappingURL=helpers-BNLAPdMR.js.map
|