@lousy-agents/cli 5.8.0 → 5.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/copilot-with-fastify/.devcontainer/devcontainer.json +1 -1
- package/cli/copilot-with-citty/.devcontainer/devcontainer.json +1 -1
- package/cli/copilot-with-citty/package.json +1 -1
- package/dist/316.js +2961 -0
- package/dist/316.js.map +1 -0
- package/dist/511.js +1260 -0
- package/dist/511.js.map +1 -0
- package/dist/index.js +930 -916
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/ui/copilot-with-react/.devcontainer/devcontainer.json +1 -1
- package/dist/433.js +0 -1740
- package/dist/433.js.map +0 -1
- package/dist/696.js +0 -13
- package/dist/696.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -594,50 +594,18 @@ module.exports = __rspack_createRequire_require("events");
|
|
|
594
594
|
9896(module) {
|
|
595
595
|
module.exports = __rspack_createRequire_require("fs");
|
|
596
596
|
|
|
597
|
-
},
|
|
598
|
-
8611(module) {
|
|
599
|
-
module.exports = __rspack_createRequire_require("http");
|
|
600
|
-
|
|
601
|
-
},
|
|
602
|
-
5692(module) {
|
|
603
|
-
module.exports = __rspack_createRequire_require("https");
|
|
604
|
-
|
|
605
|
-
},
|
|
606
|
-
9278(module) {
|
|
607
|
-
module.exports = __rspack_createRequire_require("net");
|
|
608
|
-
|
|
609
597
|
},
|
|
610
598
|
4589(module) {
|
|
611
599
|
module.exports = __rspack_createRequire_require("node:assert");
|
|
612
600
|
|
|
613
|
-
},
|
|
614
|
-
6698(module) {
|
|
615
|
-
module.exports = __rspack_createRequire_require("node:async_hooks");
|
|
616
|
-
|
|
617
|
-
},
|
|
618
|
-
4573(module) {
|
|
619
|
-
module.exports = __rspack_createRequire_require("node:buffer");
|
|
620
|
-
|
|
621
601
|
},
|
|
622
602
|
1421(module) {
|
|
623
603
|
module.exports = __rspack_createRequire_require("node:child_process");
|
|
624
604
|
|
|
625
|
-
},
|
|
626
|
-
7540(module) {
|
|
627
|
-
module.exports = __rspack_createRequire_require("node:console");
|
|
628
|
-
|
|
629
605
|
},
|
|
630
606
|
7598(module) {
|
|
631
607
|
module.exports = __rspack_createRequire_require("node:crypto");
|
|
632
608
|
|
|
633
|
-
},
|
|
634
|
-
3053(module) {
|
|
635
|
-
module.exports = __rspack_createRequire_require("node:diagnostics_channel");
|
|
636
|
-
|
|
637
|
-
},
|
|
638
|
-
610(module) {
|
|
639
|
-
module.exports = __rspack_createRequire_require("node:dns");
|
|
640
|
-
|
|
641
609
|
},
|
|
642
610
|
8474(module) {
|
|
643
611
|
module.exports = __rspack_createRequire_require("node:events");
|
|
@@ -650,26 +618,10 @@ module.exports = __rspack_createRequire_require("node:fs");
|
|
|
650
618
|
1455(module) {
|
|
651
619
|
module.exports = __rspack_createRequire_require("node:fs/promises");
|
|
652
620
|
|
|
653
|
-
},
|
|
654
|
-
7067(module) {
|
|
655
|
-
module.exports = __rspack_createRequire_require("node:http");
|
|
656
|
-
|
|
657
|
-
},
|
|
658
|
-
2467(module) {
|
|
659
|
-
module.exports = __rspack_createRequire_require("node:http2");
|
|
660
|
-
|
|
661
|
-
},
|
|
662
|
-
4708(module) {
|
|
663
|
-
module.exports = __rspack_createRequire_require("node:https");
|
|
664
|
-
|
|
665
621
|
},
|
|
666
622
|
8995(module) {
|
|
667
623
|
module.exports = __rspack_createRequire_require("node:module");
|
|
668
624
|
|
|
669
|
-
},
|
|
670
|
-
7030(module) {
|
|
671
|
-
module.exports = __rspack_createRequire_require("node:net");
|
|
672
|
-
|
|
673
625
|
},
|
|
674
626
|
8161(module) {
|
|
675
627
|
module.exports = __rspack_createRequire_require("node:os");
|
|
@@ -686,10 +638,6 @@ module.exports = __rspack_createRequire_require("node:perf_hooks");
|
|
|
686
638
|
1708(module) {
|
|
687
639
|
module.exports = __rspack_createRequire_require("node:process");
|
|
688
640
|
|
|
689
|
-
},
|
|
690
|
-
1792(module) {
|
|
691
|
-
module.exports = __rspack_createRequire_require("node:querystring");
|
|
692
|
-
|
|
693
641
|
},
|
|
694
642
|
481(module) {
|
|
695
643
|
module.exports = __rspack_createRequire_require("node:readline");
|
|
@@ -699,12 +647,12 @@ module.exports = __rspack_createRequire_require("node:readline");
|
|
|
699
647
|
module.exports = __rspack_createRequire_require("node:stream");
|
|
700
648
|
|
|
701
649
|
},
|
|
702
|
-
|
|
703
|
-
module.exports = __rspack_createRequire_require("node:stream/
|
|
650
|
+
6466(module) {
|
|
651
|
+
module.exports = __rspack_createRequire_require("node:stream/promises");
|
|
704
652
|
|
|
705
653
|
},
|
|
706
|
-
|
|
707
|
-
module.exports = __rspack_createRequire_require("node:
|
|
654
|
+
6193(module) {
|
|
655
|
+
module.exports = __rspack_createRequire_require("node:string_decoder");
|
|
708
656
|
|
|
709
657
|
},
|
|
710
658
|
7066(module) {
|
|
@@ -718,10 +666,6 @@ module.exports = __rspack_createRequire_require("node:url");
|
|
|
718
666
|
7975(module) {
|
|
719
667
|
module.exports = __rspack_createRequire_require("node:util");
|
|
720
668
|
|
|
721
|
-
},
|
|
722
|
-
3429(module) {
|
|
723
|
-
module.exports = __rspack_createRequire_require("node:util/types");
|
|
724
|
-
|
|
725
669
|
},
|
|
726
670
|
8877(module) {
|
|
727
671
|
module.exports = __rspack_createRequire_require("node:v8");
|
|
@@ -730,14 +674,6 @@ module.exports = __rspack_createRequire_require("node:v8");
|
|
|
730
674
|
714(module) {
|
|
731
675
|
module.exports = __rspack_createRequire_require("node:vm");
|
|
732
676
|
|
|
733
|
-
},
|
|
734
|
-
5919(module) {
|
|
735
|
-
module.exports = __rspack_createRequire_require("node:worker_threads");
|
|
736
|
-
|
|
737
|
-
},
|
|
738
|
-
8522(module) {
|
|
739
|
-
module.exports = __rspack_createRequire_require("node:zlib");
|
|
740
|
-
|
|
741
677
|
},
|
|
742
678
|
857(module) {
|
|
743
679
|
module.exports = __rspack_createRequire_require("os");
|
|
@@ -750,34 +686,6 @@ module.exports = __rspack_createRequire_require("path");
|
|
|
750
686
|
932(module) {
|
|
751
687
|
module.exports = __rspack_createRequire_require("process");
|
|
752
688
|
|
|
753
|
-
},
|
|
754
|
-
2203(module) {
|
|
755
|
-
module.exports = __rspack_createRequire_require("stream");
|
|
756
|
-
|
|
757
|
-
},
|
|
758
|
-
3193(module) {
|
|
759
|
-
module.exports = __rspack_createRequire_require("string_decoder");
|
|
760
|
-
|
|
761
|
-
},
|
|
762
|
-
4756(module) {
|
|
763
|
-
module.exports = __rspack_createRequire_require("tls");
|
|
764
|
-
|
|
765
|
-
},
|
|
766
|
-
2018(module) {
|
|
767
|
-
module.exports = __rspack_createRequire_require("tty");
|
|
768
|
-
|
|
769
|
-
},
|
|
770
|
-
7016(module) {
|
|
771
|
-
module.exports = __rspack_createRequire_require("url");
|
|
772
|
-
|
|
773
|
-
},
|
|
774
|
-
9023(module) {
|
|
775
|
-
module.exports = __rspack_createRequire_require("util");
|
|
776
|
-
|
|
777
|
-
},
|
|
778
|
-
8167(module) {
|
|
779
|
-
module.exports = __rspack_createRequire_require("worker_threads");
|
|
780
|
-
|
|
781
689
|
},
|
|
782
690
|
3106(module) {
|
|
783
691
|
module.exports = __rspack_createRequire_require("zlib");
|
|
@@ -9317,427 +9225,89 @@ function jsonc_parser_e(e,i=!1){let a=e.length,o=0,s=``,c=0,l=16,u=0,d=0,f=0,p=0
|
|
|
9317
9225
|
function jsonc_r(n,r){let i=jsonc_parser_m(n,r?.errors,r);return (0,_format.n)(n,i,r),i}function jsonc_i(e,t){return n(e,t)}
|
|
9318
9226
|
|
|
9319
9227
|
},
|
|
9320
|
-
|
|
9321
|
-
|
|
9322
|
-
|
|
9228
|
+
1583(module) {
|
|
9229
|
+
module.exports = JSON.parse('{"name":"dotenv","version":"17.3.1","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","pretest":"npm run lint && npm run dts-check","test":"tap run tests/**/*.js --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run tests/**/*.js --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"homepage":"https://github.com/motdotla/dotenv#readme","funding":"https://dotenvx.com","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@types/node":"^18.11.3","decache":"^4.6.2","sinon":"^14.0.1","standard":"^17.0.0","standard-version":"^9.5.0","tap":"^19.2.0","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}')
|
|
9230
|
+
|
|
9231
|
+
},
|
|
9232
|
+
|
|
9323
9233
|
});
|
|
9324
|
-
|
|
9325
|
-
|
|
9326
|
-
return false;
|
|
9327
|
-
}
|
|
9328
|
-
const prototype = Object.getPrototypeOf(value);
|
|
9329
|
-
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
|
|
9330
|
-
return false;
|
|
9331
|
-
}
|
|
9332
|
-
if (Symbol.iterator in value) {
|
|
9333
|
-
return false;
|
|
9334
|
-
}
|
|
9335
|
-
if (Symbol.toStringTag in value) {
|
|
9336
|
-
return Object.prototype.toString.call(value) === "[object Module]";
|
|
9337
|
-
}
|
|
9338
|
-
return true;
|
|
9339
|
-
}
|
|
9234
|
+
// The module cache
|
|
9235
|
+
var __webpack_module_cache__ = {};
|
|
9340
9236
|
|
|
9341
|
-
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9347
|
-
|
|
9348
|
-
continue;
|
|
9349
|
-
}
|
|
9350
|
-
const value = baseObject[key];
|
|
9351
|
-
if (value === null || value === void 0) {
|
|
9352
|
-
continue;
|
|
9353
|
-
}
|
|
9354
|
-
if (merger && merger(object, key, value, namespace)) {
|
|
9355
|
-
continue;
|
|
9356
|
-
}
|
|
9357
|
-
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
9358
|
-
object[key] = [...value, ...object[key]];
|
|
9359
|
-
} else if (isPlainObject(value) && isPlainObject(object[key])) {
|
|
9360
|
-
object[key] = _defu(
|
|
9361
|
-
value,
|
|
9362
|
-
object[key],
|
|
9363
|
-
(namespace ? `${namespace}.` : "") + key.toString(),
|
|
9364
|
-
merger
|
|
9365
|
-
);
|
|
9366
|
-
} else {
|
|
9367
|
-
object[key] = value;
|
|
9368
|
-
}
|
|
9369
|
-
}
|
|
9370
|
-
return object;
|
|
9371
|
-
}
|
|
9372
|
-
function createDefu(merger) {
|
|
9373
|
-
return (...arguments_) => (
|
|
9374
|
-
// eslint-disable-next-line unicorn/no-array-reduce
|
|
9375
|
-
arguments_.reduce((p, c) => _defu(p, c, "", merger), {})
|
|
9376
|
-
);
|
|
9237
|
+
// The require function
|
|
9238
|
+
function __webpack_require__(moduleId) {
|
|
9239
|
+
|
|
9240
|
+
// Check if module is in cache
|
|
9241
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
9242
|
+
if (cachedModule !== undefined) {
|
|
9243
|
+
return cachedModule.exports;
|
|
9377
9244
|
}
|
|
9378
|
-
|
|
9379
|
-
|
|
9380
|
-
|
|
9381
|
-
object[key] = currentValue(object[key]);
|
|
9382
|
-
return true;
|
|
9383
|
-
}
|
|
9384
|
-
});
|
|
9385
|
-
const defuArrayFn = createDefu((object, key, currentValue) => {
|
|
9386
|
-
if (Array.isArray(object[key]) && typeof currentValue === "function") {
|
|
9387
|
-
object[key] = currentValue(object[key]);
|
|
9388
|
-
return true;
|
|
9389
|
-
}
|
|
9245
|
+
// Create a new module (and put it into the cache)
|
|
9246
|
+
var module = (__webpack_module_cache__[moduleId] = {
|
|
9247
|
+
exports: {}
|
|
9390
9248
|
});
|
|
9249
|
+
// Execute the module function
|
|
9250
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
9391
9251
|
|
|
9252
|
+
// Return the exports of the module
|
|
9253
|
+
return module.exports;
|
|
9392
9254
|
|
|
9255
|
+
}
|
|
9393
9256
|
|
|
9257
|
+
// expose the modules object (__webpack_modules__)
|
|
9258
|
+
__webpack_require__.m = __webpack_modules__;
|
|
9394
9259
|
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
|
|
9409
|
-
|
|
9410
|
-
|
|
9411
|
-
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
|
|
9260
|
+
// webpack/runtime/create_fake_namespace_object
|
|
9261
|
+
(() => {
|
|
9262
|
+
var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
|
|
9263
|
+
var leafPrototypes;
|
|
9264
|
+
// create a fake namespace object
|
|
9265
|
+
// mode & 1: value is a module id, require it
|
|
9266
|
+
// mode & 2: merge all properties of value into the ns
|
|
9267
|
+
// mode & 4: return value when already ns object
|
|
9268
|
+
// mode & 16: return value when it's Promise-like
|
|
9269
|
+
// mode & 8|1: behave like require
|
|
9270
|
+
__webpack_require__.t = function(value, mode) {
|
|
9271
|
+
if(mode & 1) value = this(value);
|
|
9272
|
+
if(mode & 8) return value;
|
|
9273
|
+
if(typeof value === 'object' && value) {
|
|
9274
|
+
if((mode & 4) && value.__esModule) return value;
|
|
9275
|
+
if((mode & 16) && typeof value.then === 'function') return value;
|
|
9276
|
+
}
|
|
9277
|
+
var ns = Object.create(null);
|
|
9278
|
+
__webpack_require__.r(ns);
|
|
9279
|
+
var def = {};
|
|
9280
|
+
leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
|
|
9281
|
+
for(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {
|
|
9282
|
+
Object.getOwnPropertyNames(current).forEach((key) => { def[key] = () => (value[key]) });
|
|
9283
|
+
}
|
|
9284
|
+
def['default'] = () => (value);
|
|
9285
|
+
__webpack_require__.d(ns, def);
|
|
9286
|
+
return ns;
|
|
9415
9287
|
};
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
}
|
|
9424
|
-
|
|
9425
|
-
const _UNC_REGEX = /^[/\\]{2}/;
|
|
9426
|
-
const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
9427
|
-
const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
9428
|
-
const _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
|
|
9429
|
-
const _EXTNAME_RE = /.(\.[^./]+|\.)$/;
|
|
9430
|
-
const _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/;
|
|
9431
|
-
const sep = "/";
|
|
9432
|
-
const normalize = function(path) {
|
|
9433
|
-
if (path.length === 0) {
|
|
9434
|
-
return ".";
|
|
9435
|
-
}
|
|
9436
|
-
path = normalizeWindowsPath(path);
|
|
9437
|
-
const isUNCPath = path.match(_UNC_REGEX);
|
|
9438
|
-
const isPathAbsolute = isAbsolute(path);
|
|
9439
|
-
const trailingSeparator = path[path.length - 1] === "/";
|
|
9440
|
-
path = normalizeString(path, !isPathAbsolute);
|
|
9441
|
-
if (path.length === 0) {
|
|
9442
|
-
if (isPathAbsolute) {
|
|
9443
|
-
return "/";
|
|
9444
|
-
}
|
|
9445
|
-
return trailingSeparator ? "./" : ".";
|
|
9446
|
-
}
|
|
9447
|
-
if (trailingSeparator) {
|
|
9448
|
-
path += "/";
|
|
9449
|
-
}
|
|
9450
|
-
if (_DRIVE_LETTER_RE.test(path)) {
|
|
9451
|
-
path += "/";
|
|
9452
|
-
}
|
|
9453
|
-
if (isUNCPath) {
|
|
9454
|
-
if (!isPathAbsolute) {
|
|
9455
|
-
return `//./${path}`;
|
|
9288
|
+
})();
|
|
9289
|
+
// webpack/runtime/define_property_getters
|
|
9290
|
+
(() => {
|
|
9291
|
+
__webpack_require__.d = (exports, definition) => {
|
|
9292
|
+
for(var key in definition) {
|
|
9293
|
+
if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
9294
|
+
Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
9295
|
+
}
|
|
9456
9296
|
}
|
|
9457
|
-
return `//${path}`;
|
|
9458
|
-
}
|
|
9459
|
-
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
9460
9297
|
};
|
|
9461
|
-
|
|
9462
|
-
|
|
9463
|
-
|
|
9464
|
-
|
|
9465
|
-
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
|
|
9469
|
-
|
|
9470
|
-
|
|
9471
|
-
|
|
9472
|
-
|
|
9473
|
-
|
|
9474
|
-
path += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
9475
|
-
}
|
|
9476
|
-
} else {
|
|
9477
|
-
path += seg;
|
|
9478
|
-
}
|
|
9479
|
-
}
|
|
9480
|
-
return normalize(path);
|
|
9481
|
-
};
|
|
9482
|
-
function cwd() {
|
|
9483
|
-
if (typeof process !== "undefined" && typeof process.cwd === "function") {
|
|
9484
|
-
return process.cwd().replace(/\\/g, "/");
|
|
9485
|
-
}
|
|
9486
|
-
return "/";
|
|
9487
|
-
}
|
|
9488
|
-
const resolve = function(...arguments_) {
|
|
9489
|
-
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
|
9490
|
-
let resolvedPath = "";
|
|
9491
|
-
let resolvedAbsolute = false;
|
|
9492
|
-
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
9493
|
-
const path = index >= 0 ? arguments_[index] : cwd();
|
|
9494
|
-
if (!path || path.length === 0) {
|
|
9495
|
-
continue;
|
|
9496
|
-
}
|
|
9497
|
-
resolvedPath = `${path}/${resolvedPath}`;
|
|
9498
|
-
resolvedAbsolute = isAbsolute(path);
|
|
9499
|
-
}
|
|
9500
|
-
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
|
|
9501
|
-
if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
|
|
9502
|
-
return `/${resolvedPath}`;
|
|
9503
|
-
}
|
|
9504
|
-
return resolvedPath.length > 0 ? resolvedPath : ".";
|
|
9505
|
-
};
|
|
9506
|
-
function normalizeString(path, allowAboveRoot) {
|
|
9507
|
-
let res = "";
|
|
9508
|
-
let lastSegmentLength = 0;
|
|
9509
|
-
let lastSlash = -1;
|
|
9510
|
-
let dots = 0;
|
|
9511
|
-
let char = null;
|
|
9512
|
-
for (let index = 0; index <= path.length; ++index) {
|
|
9513
|
-
if (index < path.length) {
|
|
9514
|
-
char = path[index];
|
|
9515
|
-
} else if (char === "/") {
|
|
9516
|
-
break;
|
|
9517
|
-
} else {
|
|
9518
|
-
char = "/";
|
|
9519
|
-
}
|
|
9520
|
-
if (char === "/") {
|
|
9521
|
-
if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {
|
|
9522
|
-
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
9523
|
-
if (res.length > 2) {
|
|
9524
|
-
const lastSlashIndex = res.lastIndexOf("/");
|
|
9525
|
-
if (lastSlashIndex === -1) {
|
|
9526
|
-
res = "";
|
|
9527
|
-
lastSegmentLength = 0;
|
|
9528
|
-
} else {
|
|
9529
|
-
res = res.slice(0, lastSlashIndex);
|
|
9530
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
9531
|
-
}
|
|
9532
|
-
lastSlash = index;
|
|
9533
|
-
dots = 0;
|
|
9534
|
-
continue;
|
|
9535
|
-
} else if (res.length > 0) {
|
|
9536
|
-
res = "";
|
|
9537
|
-
lastSegmentLength = 0;
|
|
9538
|
-
lastSlash = index;
|
|
9539
|
-
dots = 0;
|
|
9540
|
-
continue;
|
|
9541
|
-
}
|
|
9542
|
-
}
|
|
9543
|
-
if (allowAboveRoot) {
|
|
9544
|
-
res += res.length > 0 ? "/.." : "..";
|
|
9545
|
-
lastSegmentLength = 2;
|
|
9546
|
-
}
|
|
9547
|
-
} else {
|
|
9548
|
-
if (res.length > 0) {
|
|
9549
|
-
res += `/${path.slice(lastSlash + 1, index)}`;
|
|
9550
|
-
} else {
|
|
9551
|
-
res = path.slice(lastSlash + 1, index);
|
|
9552
|
-
}
|
|
9553
|
-
lastSegmentLength = index - lastSlash - 1;
|
|
9554
|
-
}
|
|
9555
|
-
lastSlash = index;
|
|
9556
|
-
dots = 0;
|
|
9557
|
-
} else if (char === "." && dots !== -1) {
|
|
9558
|
-
++dots;
|
|
9559
|
-
} else {
|
|
9560
|
-
dots = -1;
|
|
9561
|
-
}
|
|
9562
|
-
}
|
|
9563
|
-
return res;
|
|
9564
|
-
}
|
|
9565
|
-
const isAbsolute = function(p) {
|
|
9566
|
-
return _IS_ABSOLUTE_RE.test(p);
|
|
9567
|
-
};
|
|
9568
|
-
const toNamespacedPath = function(p) {
|
|
9569
|
-
return normalizeWindowsPath(p);
|
|
9570
|
-
};
|
|
9571
|
-
const extname = function(p) {
|
|
9572
|
-
if (p === "..") return "";
|
|
9573
|
-
const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
|
|
9574
|
-
return match && match[1] || "";
|
|
9575
|
-
};
|
|
9576
|
-
const relative = function(from, to) {
|
|
9577
|
-
const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
9578
|
-
const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
9579
|
-
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
|
|
9580
|
-
return _to.join("/");
|
|
9581
|
-
}
|
|
9582
|
-
const _fromCopy = [..._from];
|
|
9583
|
-
for (const segment of _fromCopy) {
|
|
9584
|
-
if (_to[0] !== segment) {
|
|
9585
|
-
break;
|
|
9586
|
-
}
|
|
9587
|
-
_from.shift();
|
|
9588
|
-
_to.shift();
|
|
9589
|
-
}
|
|
9590
|
-
return [..._from.map(() => ".."), ..._to].join("/");
|
|
9591
|
-
};
|
|
9592
|
-
const dirname = function(p) {
|
|
9593
|
-
const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
|
9594
|
-
if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
|
|
9595
|
-
segments[0] += "/";
|
|
9596
|
-
}
|
|
9597
|
-
return segments.join("/") || (isAbsolute(p) ? "/" : ".");
|
|
9598
|
-
};
|
|
9599
|
-
const format = function(p) {
|
|
9600
|
-
const ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "";
|
|
9601
|
-
const segments = [p.root, p.dir, p.base ?? (p.name ?? "") + ext].filter(
|
|
9602
|
-
Boolean
|
|
9603
|
-
);
|
|
9604
|
-
return normalizeWindowsPath(
|
|
9605
|
-
p.root ? resolve(...segments) : segments.join("/")
|
|
9606
|
-
);
|
|
9607
|
-
};
|
|
9608
|
-
const basename = function(p, extension) {
|
|
9609
|
-
const segments = normalizeWindowsPath(p).split("/");
|
|
9610
|
-
let lastSegment = "";
|
|
9611
|
-
for (let i = segments.length - 1; i >= 0; i--) {
|
|
9612
|
-
const val = segments[i];
|
|
9613
|
-
if (val) {
|
|
9614
|
-
lastSegment = val;
|
|
9615
|
-
break;
|
|
9616
|
-
}
|
|
9617
|
-
}
|
|
9618
|
-
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
|
9619
|
-
};
|
|
9620
|
-
const parse = function(p) {
|
|
9621
|
-
const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "";
|
|
9622
|
-
const base = basename(p);
|
|
9623
|
-
const extension = extname(base);
|
|
9624
|
-
return {
|
|
9625
|
-
root,
|
|
9626
|
-
dir: dirname(p),
|
|
9627
|
-
base,
|
|
9628
|
-
ext: extension,
|
|
9629
|
-
name: base.slice(0, base.length - extension.length)
|
|
9630
|
-
};
|
|
9631
|
-
};
|
|
9632
|
-
const matchesGlob = (path, pattern) => {
|
|
9633
|
-
return zeptomatch(pattern, normalize(path));
|
|
9634
|
-
};
|
|
9635
|
-
|
|
9636
|
-
const _path = (/* unused pure expression or super */ null && ({
|
|
9637
|
-
__proto__: null,
|
|
9638
|
-
basename: basename,
|
|
9639
|
-
dirname: dirname,
|
|
9640
|
-
extname: extname,
|
|
9641
|
-
format: format,
|
|
9642
|
-
isAbsolute: isAbsolute,
|
|
9643
|
-
join: join,
|
|
9644
|
-
matchesGlob: matchesGlob,
|
|
9645
|
-
normalize: normalize,
|
|
9646
|
-
normalizeString: normalizeString,
|
|
9647
|
-
parse: parse,
|
|
9648
|
-
relative: relative,
|
|
9649
|
-
resolve: resolve,
|
|
9650
|
-
sep: sep,
|
|
9651
|
-
toNamespacedPath: toNamespacedPath
|
|
9652
|
-
}));
|
|
9653
|
-
|
|
9654
|
-
|
|
9655
|
-
|
|
9656
|
-
|
|
9657
|
-
},
|
|
9658
|
-
1583(module) {
|
|
9659
|
-
module.exports = JSON.parse('{"name":"dotenv","version":"17.3.1","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","pretest":"npm run lint && npm run dts-check","test":"tap run tests/**/*.js --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run tests/**/*.js --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"homepage":"https://github.com/motdotla/dotenv#readme","funding":"https://dotenvx.com","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@types/node":"^18.11.3","decache":"^4.6.2","sinon":"^14.0.1","standard":"^17.0.0","standard-version":"^9.5.0","tap":"^19.2.0","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}')
|
|
9660
|
-
|
|
9661
|
-
},
|
|
9662
|
-
|
|
9663
|
-
});
|
|
9664
|
-
// The module cache
|
|
9665
|
-
var __webpack_module_cache__ = {};
|
|
9666
|
-
|
|
9667
|
-
// The require function
|
|
9668
|
-
function __webpack_require__(moduleId) {
|
|
9669
|
-
|
|
9670
|
-
// Check if module is in cache
|
|
9671
|
-
var cachedModule = __webpack_module_cache__[moduleId];
|
|
9672
|
-
if (cachedModule !== undefined) {
|
|
9673
|
-
return cachedModule.exports;
|
|
9674
|
-
}
|
|
9675
|
-
// Create a new module (and put it into the cache)
|
|
9676
|
-
var module = (__webpack_module_cache__[moduleId] = {
|
|
9677
|
-
exports: {}
|
|
9678
|
-
});
|
|
9679
|
-
// Execute the module function
|
|
9680
|
-
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
9681
|
-
|
|
9682
|
-
// Return the exports of the module
|
|
9683
|
-
return module.exports;
|
|
9684
|
-
|
|
9685
|
-
}
|
|
9686
|
-
|
|
9687
|
-
// expose the modules object (__webpack_modules__)
|
|
9688
|
-
__webpack_require__.m = __webpack_modules__;
|
|
9689
|
-
|
|
9690
|
-
// webpack/runtime/create_fake_namespace_object
|
|
9691
|
-
(() => {
|
|
9692
|
-
var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
|
|
9693
|
-
var leafPrototypes;
|
|
9694
|
-
// create a fake namespace object
|
|
9695
|
-
// mode & 1: value is a module id, require it
|
|
9696
|
-
// mode & 2: merge all properties of value into the ns
|
|
9697
|
-
// mode & 4: return value when already ns object
|
|
9698
|
-
// mode & 16: return value when it's Promise-like
|
|
9699
|
-
// mode & 8|1: behave like require
|
|
9700
|
-
__webpack_require__.t = function(value, mode) {
|
|
9701
|
-
if(mode & 1) value = this(value);
|
|
9702
|
-
if(mode & 8) return value;
|
|
9703
|
-
if(typeof value === 'object' && value) {
|
|
9704
|
-
if((mode & 4) && value.__esModule) return value;
|
|
9705
|
-
if((mode & 16) && typeof value.then === 'function') return value;
|
|
9706
|
-
}
|
|
9707
|
-
var ns = Object.create(null);
|
|
9708
|
-
__webpack_require__.r(ns);
|
|
9709
|
-
var def = {};
|
|
9710
|
-
leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
|
|
9711
|
-
for(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {
|
|
9712
|
-
Object.getOwnPropertyNames(current).forEach((key) => { def[key] = () => (value[key]) });
|
|
9713
|
-
}
|
|
9714
|
-
def['default'] = () => (value);
|
|
9715
|
-
__webpack_require__.d(ns, def);
|
|
9716
|
-
return ns;
|
|
9717
|
-
};
|
|
9718
|
-
})();
|
|
9719
|
-
// webpack/runtime/define_property_getters
|
|
9720
|
-
(() => {
|
|
9721
|
-
__webpack_require__.d = (exports, definition) => {
|
|
9722
|
-
for(var key in definition) {
|
|
9723
|
-
if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
9724
|
-
Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
9725
|
-
}
|
|
9726
|
-
}
|
|
9727
|
-
};
|
|
9728
|
-
})();
|
|
9729
|
-
// webpack/runtime/ensure_chunk
|
|
9730
|
-
(() => {
|
|
9731
|
-
__webpack_require__.f = {};
|
|
9732
|
-
// This file contains only the entry chunk.
|
|
9733
|
-
// The chunk loading function for additional chunks
|
|
9734
|
-
__webpack_require__.e = (chunkId) => {
|
|
9735
|
-
return Promise.all(
|
|
9736
|
-
Object.keys(__webpack_require__.f).reduce((promises, key) => {
|
|
9737
|
-
__webpack_require__.f[key](chunkId, promises);
|
|
9738
|
-
return promises;
|
|
9739
|
-
}, [])
|
|
9740
|
-
);
|
|
9298
|
+
})();
|
|
9299
|
+
// webpack/runtime/ensure_chunk
|
|
9300
|
+
(() => {
|
|
9301
|
+
__webpack_require__.f = {};
|
|
9302
|
+
// This file contains only the entry chunk.
|
|
9303
|
+
// The chunk loading function for additional chunks
|
|
9304
|
+
__webpack_require__.e = (chunkId) => {
|
|
9305
|
+
return Promise.all(
|
|
9306
|
+
Object.keys(__webpack_require__.f).reduce((promises, key) => {
|
|
9307
|
+
__webpack_require__.f[key](chunkId, promises);
|
|
9308
|
+
return promises;
|
|
9309
|
+
}, [])
|
|
9310
|
+
);
|
|
9741
9311
|
};
|
|
9742
9312
|
})();
|
|
9743
9313
|
// webpack/runtime/get javascript chunk filename
|
|
@@ -10124,6 +9694,7 @@ __webpack_require__.d(constructs_namespaceObject, {
|
|
|
10124
9694
|
|
|
10125
9695
|
|
|
10126
9696
|
;// CONCATENATED MODULE: ../../node_modules/citty/dist/_chunks/libs/scule.mjs
|
|
9697
|
+
//#region node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs
|
|
10127
9698
|
const NUMBER_CHAR_RE = /\d/;
|
|
10128
9699
|
const STR_SPLITTERS = [
|
|
10129
9700
|
"-",
|
|
@@ -10188,6 +9759,10 @@ function camelCase(str, opts) {
|
|
|
10188
9759
|
function kebabCase(str, joiner) {
|
|
10189
9760
|
return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => p.toLowerCase()).join(joiner ?? "-") : "";
|
|
10190
9761
|
}
|
|
9762
|
+
function snakeCase(str) {
|
|
9763
|
+
return kebabCase(str || "", "_");
|
|
9764
|
+
}
|
|
9765
|
+
//#endregion
|
|
10191
9766
|
|
|
10192
9767
|
|
|
10193
9768
|
// EXTERNAL MODULE: external "node:util"
|
|
@@ -10195,6 +9770,7 @@ var external_node_util_ = __webpack_require__(7975);
|
|
|
10195
9770
|
;// CONCATENATED MODULE: ../../node_modules/citty/dist/index.mjs
|
|
10196
9771
|
|
|
10197
9772
|
|
|
9773
|
+
//#region src/_utils.ts
|
|
10198
9774
|
function toArray(val) {
|
|
10199
9775
|
if (Array.isArray(val)) return val;
|
|
10200
9776
|
return val === void 0 ? [] : [val];
|
|
@@ -10215,6 +9791,8 @@ var CLIError = class extends Error {
|
|
|
10215
9791
|
this.code = code;
|
|
10216
9792
|
}
|
|
10217
9793
|
};
|
|
9794
|
+
//#endregion
|
|
9795
|
+
//#region src/_parser.ts
|
|
10218
9796
|
function parseRawArgs(args = [], opts = {}) {
|
|
10219
9797
|
const booleans = new Set(opts.boolean || []);
|
|
10220
9798
|
const strings = new Set(opts.string || []);
|
|
@@ -10240,6 +9818,12 @@ function parseRawArgs(args = [], opts = {}) {
|
|
|
10240
9818
|
for (const alias of aliases) if (booleans.has(alias)) return "boolean";
|
|
10241
9819
|
return "string";
|
|
10242
9820
|
}
|
|
9821
|
+
function isStringType(name) {
|
|
9822
|
+
if (strings.has(name)) return true;
|
|
9823
|
+
const aliases = mainToAliases.get(name) || [];
|
|
9824
|
+
for (const alias of aliases) if (strings.has(alias)) return true;
|
|
9825
|
+
return false;
|
|
9826
|
+
}
|
|
10243
9827
|
const allOptions = new Set([
|
|
10244
9828
|
...booleans,
|
|
10245
9829
|
...strings,
|
|
@@ -10283,7 +9867,12 @@ function parseRawArgs(args = [], opts = {}) {
|
|
|
10283
9867
|
}
|
|
10284
9868
|
const out = { _: [] };
|
|
10285
9869
|
out._ = parsed.positionals;
|
|
10286
|
-
for (const [key, value] of Object.entries(parsed.values))
|
|
9870
|
+
for (const [key, value] of Object.entries(parsed.values)) {
|
|
9871
|
+
let coerced = value;
|
|
9872
|
+
if (getType(key) === "boolean" && typeof value === "string") coerced = value !== "false";
|
|
9873
|
+
else if (isStringType(key) && typeof value === "boolean") coerced = "";
|
|
9874
|
+
out[key] = coerced;
|
|
9875
|
+
}
|
|
10287
9876
|
for (const [name] of Object.entries(negatedFlags)) {
|
|
10288
9877
|
out[name] = false;
|
|
10289
9878
|
const mainName = aliasToMain.get(name);
|
|
@@ -10294,9 +9883,12 @@ function parseRawArgs(args = [], opts = {}) {
|
|
|
10294
9883
|
for (const [alias, main] of aliasToMain.entries()) {
|
|
10295
9884
|
if (out[alias] !== void 0 && out[main] === void 0) out[main] = out[alias];
|
|
10296
9885
|
if (out[main] !== void 0 && out[alias] === void 0) out[alias] = out[main];
|
|
9886
|
+
if (out[alias] !== out[main] && defaults[main] === out[main]) out[main] = out[alias];
|
|
10297
9887
|
}
|
|
10298
9888
|
return out;
|
|
10299
9889
|
}
|
|
9890
|
+
//#endregion
|
|
9891
|
+
//#region src/_color.ts
|
|
10300
9892
|
const noColor = /* @__PURE__ */ (() => {
|
|
10301
9893
|
const env = globalThis.process?.env ?? {};
|
|
10302
9894
|
return env.NO_COLOR === "1" || env.TERM === "dumb" || env.TEST || env.CI;
|
|
@@ -10306,6 +9898,8 @@ const bold = /* @__PURE__ */ _c(1, 22);
|
|
|
10306
9898
|
const cyan = /* @__PURE__ */ _c(36);
|
|
10307
9899
|
const gray = /* @__PURE__ */ _c(90);
|
|
10308
9900
|
const underline = /* @__PURE__ */ _c(4, 24);
|
|
9901
|
+
//#endregion
|
|
9902
|
+
//#region src/args.ts
|
|
10309
9903
|
function parseArgs(rawArgs, argsDef) {
|
|
10310
9904
|
const parseOptions = {
|
|
10311
9905
|
boolean: [],
|
|
@@ -10355,6 +9949,16 @@ function resolveArgs(argsDef) {
|
|
|
10355
9949
|
});
|
|
10356
9950
|
return args;
|
|
10357
9951
|
}
|
|
9952
|
+
//#endregion
|
|
9953
|
+
//#region src/plugin.ts
|
|
9954
|
+
function defineCittyPlugin(plugin) {
|
|
9955
|
+
return plugin;
|
|
9956
|
+
}
|
|
9957
|
+
async function resolvePlugins(plugins) {
|
|
9958
|
+
return Promise.all(plugins.map((p) => resolveValue(p)));
|
|
9959
|
+
}
|
|
9960
|
+
//#endregion
|
|
9961
|
+
//#region src/command.ts
|
|
10358
9962
|
function defineCommand(def) {
|
|
10359
9963
|
return def;
|
|
10360
9964
|
}
|
|
@@ -10367,35 +9971,94 @@ async function dist_runCommand(cmd, opts) {
|
|
|
10367
9971
|
data: opts.data,
|
|
10368
9972
|
cmd
|
|
10369
9973
|
};
|
|
10370
|
-
|
|
9974
|
+
const plugins = await resolvePlugins(cmd.plugins ?? []);
|
|
10371
9975
|
let result;
|
|
9976
|
+
let runError;
|
|
10372
9977
|
try {
|
|
9978
|
+
for (const plugin of plugins) await plugin.setup?.(context);
|
|
9979
|
+
if (typeof cmd.setup === "function") await cmd.setup(context);
|
|
10373
9980
|
const subCommands = await resolveValue(cmd.subCommands);
|
|
10374
9981
|
if (subCommands && Object.keys(subCommands).length > 0) {
|
|
10375
|
-
const subCommandArgIndex = opts.rawArgs
|
|
10376
|
-
const
|
|
10377
|
-
if (
|
|
10378
|
-
|
|
10379
|
-
|
|
10380
|
-
|
|
10381
|
-
} else
|
|
9982
|
+
const subCommandArgIndex = findSubCommandIndex(opts.rawArgs, cmdArgs);
|
|
9983
|
+
const explicitName = opts.rawArgs[subCommandArgIndex];
|
|
9984
|
+
if (explicitName) {
|
|
9985
|
+
const subCommand = await _findSubCommand(subCommands, explicitName);
|
|
9986
|
+
if (!subCommand) throw new CLIError(`Unknown command ${cyan(explicitName)}`, "E_UNKNOWN_COMMAND");
|
|
9987
|
+
await dist_runCommand(subCommand, { rawArgs: opts.rawArgs.slice(subCommandArgIndex + 1) });
|
|
9988
|
+
} else {
|
|
9989
|
+
const defaultSubCommand = await resolveValue(cmd.default);
|
|
9990
|
+
if (defaultSubCommand) {
|
|
9991
|
+
if (cmd.run) throw new CLIError(`Cannot specify both 'run' and 'default' on the same command.`, "E_DEFAULT_CONFLICT");
|
|
9992
|
+
const subCommand = await _findSubCommand(subCommands, defaultSubCommand);
|
|
9993
|
+
if (!subCommand) throw new CLIError(`Default sub command ${cyan(defaultSubCommand)} not found in subCommands.`, "E_UNKNOWN_COMMAND");
|
|
9994
|
+
await dist_runCommand(subCommand, { rawArgs: opts.rawArgs });
|
|
9995
|
+
} else if (!cmd.run) throw new CLIError(`No command specified.`, "E_NO_COMMAND");
|
|
9996
|
+
}
|
|
10382
9997
|
}
|
|
10383
9998
|
if (typeof cmd.run === "function") result = await cmd.run(context);
|
|
10384
|
-
}
|
|
10385
|
-
|
|
9999
|
+
} catch (error) {
|
|
10000
|
+
runError = error;
|
|
10001
|
+
}
|
|
10002
|
+
const cleanupErrors = [];
|
|
10003
|
+
if (typeof cmd.cleanup === "function") try {
|
|
10004
|
+
await cmd.cleanup(context);
|
|
10005
|
+
} catch (error) {
|
|
10006
|
+
cleanupErrors.push(error);
|
|
10007
|
+
}
|
|
10008
|
+
for (const plugin of [...plugins].reverse()) try {
|
|
10009
|
+
await plugin.cleanup?.(context);
|
|
10010
|
+
} catch (error) {
|
|
10011
|
+
cleanupErrors.push(error);
|
|
10386
10012
|
}
|
|
10013
|
+
if (runError) throw runError;
|
|
10014
|
+
if (cleanupErrors.length === 1) throw cleanupErrors[0];
|
|
10015
|
+
if (cleanupErrors.length > 1) throw new Error("Multiple cleanup errors", { cause: cleanupErrors });
|
|
10387
10016
|
return { result };
|
|
10388
10017
|
}
|
|
10389
10018
|
async function resolveSubCommand(cmd, rawArgs, parent) {
|
|
10390
10019
|
const subCommands = await resolveValue(cmd.subCommands);
|
|
10391
10020
|
if (subCommands && Object.keys(subCommands).length > 0) {
|
|
10392
|
-
const subCommandArgIndex = rawArgs.
|
|
10021
|
+
const subCommandArgIndex = findSubCommandIndex(rawArgs, await resolveValue(cmd.args || {}));
|
|
10393
10022
|
const subCommandName = rawArgs[subCommandArgIndex];
|
|
10394
|
-
const subCommand = await
|
|
10023
|
+
const subCommand = await _findSubCommand(subCommands, subCommandName);
|
|
10395
10024
|
if (subCommand) return resolveSubCommand(subCommand, rawArgs.slice(subCommandArgIndex + 1), cmd);
|
|
10396
10025
|
}
|
|
10397
10026
|
return [cmd, parent];
|
|
10398
10027
|
}
|
|
10028
|
+
async function _findSubCommand(subCommands, name) {
|
|
10029
|
+
if (name in subCommands) return resolveValue(subCommands[name]);
|
|
10030
|
+
for (const sub of Object.values(subCommands)) {
|
|
10031
|
+
const resolved = await resolveValue(sub);
|
|
10032
|
+
const meta = await resolveValue(resolved?.meta);
|
|
10033
|
+
if (meta?.alias) {
|
|
10034
|
+
if (toArray(meta.alias).includes(name)) return resolved;
|
|
10035
|
+
}
|
|
10036
|
+
}
|
|
10037
|
+
}
|
|
10038
|
+
function findSubCommandIndex(rawArgs, argsDef) {
|
|
10039
|
+
for (let i = 0; i < rawArgs.length; i++) {
|
|
10040
|
+
const arg = rawArgs[i];
|
|
10041
|
+
if (arg === "--") return -1;
|
|
10042
|
+
if (arg.startsWith("-")) {
|
|
10043
|
+
if (!arg.includes("=") && _isValueFlag(arg, argsDef)) i++;
|
|
10044
|
+
continue;
|
|
10045
|
+
}
|
|
10046
|
+
return i;
|
|
10047
|
+
}
|
|
10048
|
+
return -1;
|
|
10049
|
+
}
|
|
10050
|
+
function _isValueFlag(flag, argsDef) {
|
|
10051
|
+
const name = flag.replace(/^-{1,2}/, "");
|
|
10052
|
+
const normalized = camelCase(name);
|
|
10053
|
+
for (const [key, def] of Object.entries(argsDef)) {
|
|
10054
|
+
if (def.type !== "string" && def.type !== "enum") continue;
|
|
10055
|
+
if (normalized === camelCase(key)) return true;
|
|
10056
|
+
if ((Array.isArray(def.alias) ? def.alias : def.alias ? [def.alias] : []).includes(name)) return true;
|
|
10057
|
+
}
|
|
10058
|
+
return false;
|
|
10059
|
+
}
|
|
10060
|
+
//#endregion
|
|
10061
|
+
//#region src/usage.ts
|
|
10399
10062
|
async function showUsage(cmd, parent) {
|
|
10400
10063
|
try {
|
|
10401
10064
|
console.log(await renderUsage(cmd, parent) + "\n");
|
|
@@ -10416,22 +10079,22 @@ async function renderUsage(cmd, parent) {
|
|
|
10416
10079
|
for (const arg of cmdArgs) if (arg.type === "positional") {
|
|
10417
10080
|
const name = arg.name.toUpperCase();
|
|
10418
10081
|
const isRequired = arg.required !== false && arg.default === void 0;
|
|
10419
|
-
|
|
10420
|
-
posLines.push([
|
|
10421
|
-
cyan(name + defaultHint),
|
|
10422
|
-
arg.description || "",
|
|
10423
|
-
arg.valueHint ? `<${arg.valueHint}>` : ""
|
|
10424
|
-
]);
|
|
10082
|
+
posLines.push([cyan(name + renderValueHint(arg)), renderDescription(arg, isRequired)]);
|
|
10425
10083
|
usageLine.push(isRequired ? `<${name}>` : `[${name}]`);
|
|
10426
10084
|
} else {
|
|
10427
10085
|
const isRequired = arg.required === true && arg.default === void 0;
|
|
10428
|
-
const argStr = [...(arg.alias || []).map((a) => `-${a}`), `--${arg.name}`].join(", ") + (arg
|
|
10429
|
-
argLines.push([cyan(argStr
|
|
10086
|
+
const argStr = [...(arg.alias || []).map((a) => `-${a}`), `--${arg.name}`].join(", ") + renderValueHint(arg);
|
|
10087
|
+
argLines.push([cyan(argStr), renderDescription(arg, isRequired)]);
|
|
10088
|
+
/**
|
|
10089
|
+
* print negative boolean arg variant usage when
|
|
10090
|
+
* - enabled by default or has `negativeDescription`
|
|
10091
|
+
* - not prefixed with `no-` or `no[A-Z]`
|
|
10092
|
+
*/
|
|
10430
10093
|
if (arg.type === "boolean" && (arg.default === true || arg.negativeDescription) && !negativePrefixRe.test(arg.name)) {
|
|
10431
10094
|
const negativeArgStr = [...(arg.alias || []).map((a) => `--no-${a}`), `--no-${arg.name}`].join(", ");
|
|
10432
|
-
argLines.push([cyan(negativeArgStr
|
|
10095
|
+
argLines.push([cyan(negativeArgStr), [arg.negativeDescription, isRequired ? gray("(Required)") : ""].filter(Boolean).join(" ")]);
|
|
10433
10096
|
}
|
|
10434
|
-
if (isRequired) usageLine.push(
|
|
10097
|
+
if (isRequired) usageLine.push(`--${arg.name}` + renderValueHint(arg));
|
|
10435
10098
|
}
|
|
10436
10099
|
if (cmd.subCommands) {
|
|
10437
10100
|
const commandNames = [];
|
|
@@ -10439,8 +10102,10 @@ async function renderUsage(cmd, parent) {
|
|
|
10439
10102
|
for (const [name, sub] of Object.entries(subCommands)) {
|
|
10440
10103
|
const meta = await resolveValue((await resolveValue(sub))?.meta);
|
|
10441
10104
|
if (meta?.hidden) continue;
|
|
10442
|
-
|
|
10443
|
-
|
|
10105
|
+
const aliases = toArray(meta?.alias);
|
|
10106
|
+
const label = [name, ...aliases].join(", ");
|
|
10107
|
+
commandsLines.push([cyan(label), meta?.description || ""]);
|
|
10108
|
+
commandNames.push(name, ...aliases);
|
|
10444
10109
|
}
|
|
10445
10110
|
usageLine.push(commandNames.join("|"));
|
|
10446
10111
|
}
|
|
@@ -10466,14 +10131,33 @@ async function renderUsage(cmd, parent) {
|
|
|
10466
10131
|
}
|
|
10467
10132
|
return usageLines.filter((l) => typeof l === "string").join("\n");
|
|
10468
10133
|
}
|
|
10134
|
+
function renderValueHint(arg) {
|
|
10135
|
+
const valueHint = arg.valueHint ? `=<${arg.valueHint}>` : "";
|
|
10136
|
+
const fallbackValueHint = valueHint || `=<${snakeCase(arg.name)}>`;
|
|
10137
|
+
if (!arg.type || arg.type === "positional" || arg.type === "boolean") return valueHint;
|
|
10138
|
+
if (arg.type === "enum" && arg.options?.length) return `=<${arg.options.join("|")}>`;
|
|
10139
|
+
return fallbackValueHint;
|
|
10140
|
+
}
|
|
10141
|
+
function renderDescription(arg, required) {
|
|
10142
|
+
const requiredHint = required ? gray("(Required)") : "";
|
|
10143
|
+
const defaultHint = arg.default === void 0 ? "" : gray(`(Default: ${arg.default})`);
|
|
10144
|
+
return [
|
|
10145
|
+
arg.description,
|
|
10146
|
+
requiredHint,
|
|
10147
|
+
defaultHint
|
|
10148
|
+
].filter(Boolean).join(" ");
|
|
10149
|
+
}
|
|
10150
|
+
//#endregion
|
|
10151
|
+
//#region src/main.ts
|
|
10469
10152
|
async function runMain(cmd, opts = {}) {
|
|
10470
10153
|
const rawArgs = opts.rawArgs || process.argv.slice(2);
|
|
10471
10154
|
const showUsage$1 = opts.showUsage || showUsage;
|
|
10472
10155
|
try {
|
|
10473
|
-
|
|
10156
|
+
const builtinFlags = await _resolveBuiltinFlags(cmd);
|
|
10157
|
+
if (builtinFlags.help.length > 0 && rawArgs.some((arg) => builtinFlags.help.includes(arg))) {
|
|
10474
10158
|
await showUsage$1(...await resolveSubCommand(cmd, rawArgs));
|
|
10475
10159
|
process.exit(0);
|
|
10476
|
-
} else if (rawArgs.length === 1 && rawArgs[0]
|
|
10160
|
+
} else if (rawArgs.length === 1 && builtinFlags.version.includes(rawArgs[0])) {
|
|
10477
10161
|
const meta = typeof cmd.meta === "function" ? await cmd.meta() : await cmd.meta;
|
|
10478
10162
|
if (!meta?.version) throw new CLIError("No version specified", "E_NO_VERSION");
|
|
10479
10163
|
console.log(meta.version);
|
|
@@ -10489,6 +10173,25 @@ async function runMain(cmd, opts = {}) {
|
|
|
10489
10173
|
function createMain(cmd) {
|
|
10490
10174
|
return (opts = {}) => runMain(cmd, opts);
|
|
10491
10175
|
}
|
|
10176
|
+
async function _resolveBuiltinFlags(cmd) {
|
|
10177
|
+
const argsDef = await resolveValue(cmd.args || {});
|
|
10178
|
+
const userNames = /* @__PURE__ */ new Set();
|
|
10179
|
+
const userAliases = /* @__PURE__ */ new Set();
|
|
10180
|
+
for (const [name, def] of Object.entries(argsDef)) {
|
|
10181
|
+
userNames.add(name);
|
|
10182
|
+
for (const alias of toArray(def.alias)) userAliases.add(alias);
|
|
10183
|
+
}
|
|
10184
|
+
return {
|
|
10185
|
+
help: _getBuiltinFlags("help", "h", userNames, userAliases),
|
|
10186
|
+
version: _getBuiltinFlags("version", "v", userNames, userAliases)
|
|
10187
|
+
};
|
|
10188
|
+
}
|
|
10189
|
+
function _getBuiltinFlags(long, short, userNames, userAliases) {
|
|
10190
|
+
if (userNames.has(long) || userAliases.has(long)) return [];
|
|
10191
|
+
if (userNames.has(short) || userAliases.has(short)) return [`--${long}`];
|
|
10192
|
+
return [`--${long}`, `-${short}`];
|
|
10193
|
+
}
|
|
10194
|
+
//#endregion
|
|
10492
10195
|
|
|
10493
10196
|
|
|
10494
10197
|
// EXTERNAL MODULE: external "node:fs/promises"
|
|
@@ -10695,38 +10398,287 @@ function isPathWithinRoot(rootPath, candidatePath) {
|
|
|
10695
10398
|
const normalizedContent = content.endsWith("\n") ? content : `${content}\n`;
|
|
10696
10399
|
await writeFile(docPath, normalizedContent, "utf-8");
|
|
10697
10400
|
}
|
|
10698
|
-
}
|
|
10699
|
-
/**
|
|
10700
|
-
* Factory function to create a Claude file gateway
|
|
10701
|
-
*/ function createClaudeFileGateway() {
|
|
10702
|
-
return new FileSystemClaudeFileGateway();
|
|
10703
|
-
}
|
|
10401
|
+
}
|
|
10402
|
+
/**
|
|
10403
|
+
* Factory function to create a Claude file gateway
|
|
10404
|
+
*/ function createClaudeFileGateway() {
|
|
10405
|
+
return new FileSystemClaudeFileGateway();
|
|
10406
|
+
}
|
|
10407
|
+
|
|
10408
|
+
;// CONCATENATED MODULE: ../core/src/entities/copilot-setup.ts
|
|
10409
|
+
/**
|
|
10410
|
+
* Core domain entities for the Copilot Setup Steps feature.
|
|
10411
|
+
* These are the fundamental types that represent the business domain.
|
|
10412
|
+
*/ /**
|
|
10413
|
+
* Types of version files supported for detection
|
|
10414
|
+
*/ /**
|
|
10415
|
+
* Node.js package manager types (in priority order: npm > yarn > pnpm)
|
|
10416
|
+
*/ const NODE_PACKAGE_MANAGERS = [
|
|
10417
|
+
"npm",
|
|
10418
|
+
"yarn",
|
|
10419
|
+
"pnpm"
|
|
10420
|
+
];
|
|
10421
|
+
/**
|
|
10422
|
+
* Python package manager types (in priority order)
|
|
10423
|
+
*/ const PYTHON_PACKAGE_MANAGERS = [
|
|
10424
|
+
"poetry",
|
|
10425
|
+
"pipenv",
|
|
10426
|
+
"pip"
|
|
10427
|
+
];
|
|
10428
|
+
|
|
10429
|
+
// EXTERNAL MODULE: external "node:fs"
|
|
10430
|
+
var external_node_fs_ = __webpack_require__(3024);
|
|
10431
|
+
;// CONCATENATED MODULE: ../../node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
|
|
10432
|
+
let _lazyMatch = () => { var __lib__=(()=>{var m=Object.defineProperty,V=Object.getOwnPropertyDescriptor,G=Object.getOwnPropertyNames,T=Object.prototype.hasOwnProperty,q=(r,e)=>{for(var n in e)m(r,n,{get:e[n],enumerable:true});},H=(r,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of G(e))!T.call(r,t)&&t!==n&&m(r,t,{get:()=>e[t],enumerable:!(a=V(e,t))||a.enumerable});return r},J=r=>H(m({},"__esModule",{value:true}),r),w={};q(w,{default:()=>re});var A=r=>Array.isArray(r),d=r=>typeof r=="function",Q=r=>r.length===0,W=r=>typeof r=="number",K=r=>typeof r=="object"&&r!==null,X=r=>r instanceof RegExp,b=r=>typeof r=="string",h=r=>r===void 0,Y=r=>{const e=new Map;return n=>{const a=e.get(n);if(a)return a;const t=r(n);return e.set(n,t),t}},rr=(r,e,n={})=>{const a={cache:{},input:r,index:0,indexMax:0,options:n,output:[]};if(v(e)(a)&&a.index===r.length)return a.output;throw new Error(`Failed to parse at index ${a.indexMax}`)},i=(r,e)=>A(r)?er(r,e):b(r)?ar(r,e):nr(r,e),er=(r,e)=>{const n={};for(const a of r){if(a.length!==1)throw new Error(`Invalid character: "${a}"`);const t=a.charCodeAt(0);n[t]=true;}return a=>{const t=a.index,o=a.input;for(;a.index<o.length&&o.charCodeAt(a.index)in n;)a.index+=1;const u=a.index;if(u>t){if(!h(e)&&!a.options.silent){const s=a.input.slice(t,u),c=d(e)?e(s,o,String(t)):e;h(c)||a.output.push(c);}a.indexMax=Math.max(a.indexMax,a.index);}return true}},nr=(r,e)=>{const n=r.source,a=r.flags.replace(/y|$/,"y"),t=new RegExp(n,a);return g(o=>{t.lastIndex=o.index;const u=t.exec(o.input);if(u){if(!h(e)&&!o.options.silent){const s=d(e)?e(...u,o.input,String(o.index)):e;h(s)||o.output.push(s);}return o.index+=u[0].length,o.indexMax=Math.max(o.indexMax,o.index),true}else return false})},ar=(r,e)=>n=>{if(n.input.startsWith(r,n.index)){if(!h(e)&&!n.options.silent){const t=d(e)?e(r,n.input,String(n.index)):e;h(t)||n.output.push(t);}return n.index+=r.length,n.indexMax=Math.max(n.indexMax,n.index),true}else return false},C=(r,e,n,a)=>{const t=v(r);return g(_(M(o=>{let u=0;for(;u<n;){const s=o.index;if(!t(o)||(u+=1,o.index===s))break}return u>=e})))},tr=(r,e)=>C(r,0,1),f=(r,e)=>C(r,0,1/0),x=(r,e)=>{const n=r.map(v);return g(_(M(a=>{for(let t=0,o=n.length;t<o;t++)if(!n[t](a))return false;return true})))},l=(r,e)=>{const n=r.map(v);return g(_(a=>{for(let t=0,o=n.length;t<o;t++)if(n[t](a))return true;return false}))},M=(r,e=false)=>{const n=v(r);return a=>{const t=a.index,o=a.output.length,u=n(a);return (!u||e)&&(a.index=t,a.output.length!==o&&(a.output.length=o)),u}},_=(r,e)=>{const n=v(r);return n},g=(()=>{let r=0;return e=>{const n=v(e),a=r+=1;return t=>{var o;if(t.options.memoization===false)return n(t);const u=t.index,s=(o=t.cache)[a]||(o[a]=new Map),c=s.get(u);if(c===false)return false;if(W(c))return t.index=c,true;if(c)return t.index=c.index,c.output?.length&&t.output.push(...c.output),true;{const Z=t.output.length;if(n(t)){const D=t.index,U=t.output.length;if(U>Z){const ee=t.output.slice(Z,U);s.set(u,{index:D,output:ee});}else s.set(u,D);return true}else return s.set(u,false),false}}}})(),E=r=>{let e;return n=>(e||(e=v(r())),e(n))},v=Y(r=>{if(d(r))return Q(r)?E(r):r;if(b(r)||X(r))return i(r);if(A(r))return x(r);if(K(r))return l(Object.values(r));throw new Error("Invalid rule")}),P="abcdefghijklmnopqrstuvwxyz",ir=r=>{let e="";for(;r>0;){const n=(r-1)%26;e=P[n]+e,r=Math.floor((r-1)/26);}return e},O=r=>{let e=0;for(let n=0,a=r.length;n<a;n++)e=e*26+P.indexOf(r[n])+1;return e},S=(r,e)=>{if(e<r)return S(e,r);const n=[];for(;r<=e;)n.push(r++);return n},or=(r,e,n)=>S(r,e).map(a=>String(a).padStart(n,"0")),R=(r,e)=>S(O(r),O(e)).map(ir),p=r=>r,z=r=>ur(e=>rr(e,r,{memoization:false}).join("")),ur=r=>{const e={};return n=>e[n]??(e[n]=r(n))},sr=i(/^\*\*\/\*$/,".*"),cr=i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/,(r,e,n)=>`.*${e?"":"(?:^|/)"}${n.replaceAll(".","\\.")}`),lr=i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/,(r,e,n,a)=>`.*${e?"":"(?:^|/)"}${n.replaceAll(".","\\.")}(?:${a.replaceAll(",","|").replaceAll(".","\\.")})`),y=i(/\\./,p),pr=i(/[$.*+?^(){}[\]\|]/,r=>`\\${r}`),vr=i(/./,p),hr=i(/^(?:!!)*!(.*)$/,(r,e)=>`(?!^${L(e)}$).*?`),dr=i(/^(!!)+/,""),fr=l([hr,dr]),xr=i(/\/(\*\*\/)+/,"(?:/.+/|/)"),gr=i(/^(\*\*\/)+/,"(?:^|.*/)"),mr=i(/\/(\*\*)$/,"(?:/.*|$)"),_r=i(/\*\*/,".*"),j=l([xr,gr,mr,_r]),Sr=i(/\*\/(?!\*\*\/)/,"[^/]*/"),yr=i(/\*/,"[^/]*"),N=l([Sr,yr]),k=i("?","[^/]"),$r=i("[",p),wr=i("]",p),Ar=i(/[!^]/,"^/"),br=i(/[a-z]-[a-z]|[0-9]-[0-9]/i,p),Cr=i(/[$.*+?^(){}[\|]/,r=>`\\${r}`),Mr=i(/[^\]]/,p),Er=l([y,Cr,br,Mr]),B=x([$r,tr(Ar),f(Er),wr]),Pr=i("{","(?:"),Or=i("}",")"),Rr=i(/(\d+)\.\.(\d+)/,(r,e,n)=>or(+e,+n,Math.min(e.length,n.length)).join("|")),zr=i(/([a-z]+)\.\.([a-z]+)/,(r,e,n)=>R(e,n).join("|")),jr=i(/([A-Z]+)\.\.([A-Z]+)/,(r,e,n)=>R(e.toLowerCase(),n.toLowerCase()).join("|").toUpperCase()),Nr=l([Rr,zr,jr]),I=x([Pr,Nr,Or]),kr=i("{","(?:"),Br=i("}",")"),Ir=i(",","|"),Fr=i(/[$.*+?^(){[\]\|]/,r=>`\\${r}`),Lr=i(/[^}]/,p),Zr=E(()=>F),Dr=l([j,N,k,B,I,Zr,y,Fr,Ir,Lr]),F=x([kr,f(Dr),Br]),Ur=f(l([sr,cr,lr,fr,j,N,k,B,I,F,y,pr,vr])),Vr=Ur,Gr=z(Vr),L=Gr,Tr=i(/\\./,p),qr=i(/./,p),Hr=i(/\*\*\*+/,"*"),Jr=i(/([^/{[(!])\*\*/,(r,e)=>`${e}*`),Qr=i(/(^|.)\*\*(?=[^*/)\]}])/,(r,e)=>`${e}*`),Wr=f(l([Tr,Hr,Jr,Qr,qr])),Kr=Wr,Xr=z(Kr),Yr=Xr,$=(r,e)=>{const n=Array.isArray(r)?r:[r];if(!n.length)return false;const a=n.map($.compile),t=n.every(s=>/(\/(?:\*\*)?|\[\/\])$/.test(s)),o=e.replace(/[\\\/]+/g,"/").replace(/\/$/,t?"/":"");return a.some(s=>s.test(o))};$.compile=r=>new RegExp(`^${L(Yr(r))}$`,"s");var re=$;return J(w)})();
|
|
10433
|
+
return __lib__.default || __lib__; };
|
|
10434
|
+
let _match;
|
|
10435
|
+
const zeptomatch = (path, pattern) => {
|
|
10436
|
+
if (!_match) {
|
|
10437
|
+
_match = _lazyMatch();
|
|
10438
|
+
_lazyMatch = null;
|
|
10439
|
+
}
|
|
10440
|
+
return _match(path, pattern);
|
|
10441
|
+
};
|
|
10442
|
+
|
|
10443
|
+
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
10444
|
+
function normalizeWindowsPath(input = "") {
|
|
10445
|
+
if (!input) {
|
|
10446
|
+
return input;
|
|
10447
|
+
}
|
|
10448
|
+
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
10449
|
+
}
|
|
10450
|
+
|
|
10451
|
+
const _UNC_REGEX = /^[/\\]{2}/;
|
|
10452
|
+
const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
10453
|
+
const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
10454
|
+
const _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
|
|
10455
|
+
const _EXTNAME_RE = /.(\.[^./]+|\.)$/;
|
|
10456
|
+
const _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/;
|
|
10457
|
+
const sep = "/";
|
|
10458
|
+
const normalize = function(path) {
|
|
10459
|
+
if (path.length === 0) {
|
|
10460
|
+
return ".";
|
|
10461
|
+
}
|
|
10462
|
+
path = normalizeWindowsPath(path);
|
|
10463
|
+
const isUNCPath = path.match(_UNC_REGEX);
|
|
10464
|
+
const isPathAbsolute = isAbsolute(path);
|
|
10465
|
+
const trailingSeparator = path[path.length - 1] === "/";
|
|
10466
|
+
path = normalizeString(path, !isPathAbsolute);
|
|
10467
|
+
if (path.length === 0) {
|
|
10468
|
+
if (isPathAbsolute) {
|
|
10469
|
+
return "/";
|
|
10470
|
+
}
|
|
10471
|
+
return trailingSeparator ? "./" : ".";
|
|
10472
|
+
}
|
|
10473
|
+
if (trailingSeparator) {
|
|
10474
|
+
path += "/";
|
|
10475
|
+
}
|
|
10476
|
+
if (_DRIVE_LETTER_RE.test(path)) {
|
|
10477
|
+
path += "/";
|
|
10478
|
+
}
|
|
10479
|
+
if (isUNCPath) {
|
|
10480
|
+
if (!isPathAbsolute) {
|
|
10481
|
+
return `//./${path}`;
|
|
10482
|
+
}
|
|
10483
|
+
return `//${path}`;
|
|
10484
|
+
}
|
|
10485
|
+
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
10486
|
+
};
|
|
10487
|
+
const pathe_M_eThtNZ_join = function(...segments) {
|
|
10488
|
+
let path = "";
|
|
10489
|
+
for (const seg of segments) {
|
|
10490
|
+
if (!seg) {
|
|
10491
|
+
continue;
|
|
10492
|
+
}
|
|
10493
|
+
if (path.length > 0) {
|
|
10494
|
+
const pathTrailing = path[path.length - 1] === "/";
|
|
10495
|
+
const segLeading = seg[0] === "/";
|
|
10496
|
+
const both = pathTrailing && segLeading;
|
|
10497
|
+
if (both) {
|
|
10498
|
+
path += seg.slice(1);
|
|
10499
|
+
} else {
|
|
10500
|
+
path += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
10501
|
+
}
|
|
10502
|
+
} else {
|
|
10503
|
+
path += seg;
|
|
10504
|
+
}
|
|
10505
|
+
}
|
|
10506
|
+
return normalize(path);
|
|
10507
|
+
};
|
|
10508
|
+
function pathe_M_eThtNZ_cwd() {
|
|
10509
|
+
if (typeof process !== "undefined" && typeof process.cwd === "function") {
|
|
10510
|
+
return process.cwd().replace(/\\/g, "/");
|
|
10511
|
+
}
|
|
10512
|
+
return "/";
|
|
10513
|
+
}
|
|
10514
|
+
const pathe_M_eThtNZ_resolve = function(...arguments_) {
|
|
10515
|
+
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
|
10516
|
+
let resolvedPath = "";
|
|
10517
|
+
let resolvedAbsolute = false;
|
|
10518
|
+
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
10519
|
+
const path = index >= 0 ? arguments_[index] : pathe_M_eThtNZ_cwd();
|
|
10520
|
+
if (!path || path.length === 0) {
|
|
10521
|
+
continue;
|
|
10522
|
+
}
|
|
10523
|
+
resolvedPath = `${path}/${resolvedPath}`;
|
|
10524
|
+
resolvedAbsolute = isAbsolute(path);
|
|
10525
|
+
}
|
|
10526
|
+
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
|
|
10527
|
+
if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
|
|
10528
|
+
return `/${resolvedPath}`;
|
|
10529
|
+
}
|
|
10530
|
+
return resolvedPath.length > 0 ? resolvedPath : ".";
|
|
10531
|
+
};
|
|
10532
|
+
function normalizeString(path, allowAboveRoot) {
|
|
10533
|
+
let res = "";
|
|
10534
|
+
let lastSegmentLength = 0;
|
|
10535
|
+
let lastSlash = -1;
|
|
10536
|
+
let dots = 0;
|
|
10537
|
+
let char = null;
|
|
10538
|
+
for (let index = 0; index <= path.length; ++index) {
|
|
10539
|
+
if (index < path.length) {
|
|
10540
|
+
char = path[index];
|
|
10541
|
+
} else if (char === "/") {
|
|
10542
|
+
break;
|
|
10543
|
+
} else {
|
|
10544
|
+
char = "/";
|
|
10545
|
+
}
|
|
10546
|
+
if (char === "/") {
|
|
10547
|
+
if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {
|
|
10548
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
10549
|
+
if (res.length > 2) {
|
|
10550
|
+
const lastSlashIndex = res.lastIndexOf("/");
|
|
10551
|
+
if (lastSlashIndex === -1) {
|
|
10552
|
+
res = "";
|
|
10553
|
+
lastSegmentLength = 0;
|
|
10554
|
+
} else {
|
|
10555
|
+
res = res.slice(0, lastSlashIndex);
|
|
10556
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
10557
|
+
}
|
|
10558
|
+
lastSlash = index;
|
|
10559
|
+
dots = 0;
|
|
10560
|
+
continue;
|
|
10561
|
+
} else if (res.length > 0) {
|
|
10562
|
+
res = "";
|
|
10563
|
+
lastSegmentLength = 0;
|
|
10564
|
+
lastSlash = index;
|
|
10565
|
+
dots = 0;
|
|
10566
|
+
continue;
|
|
10567
|
+
}
|
|
10568
|
+
}
|
|
10569
|
+
if (allowAboveRoot) {
|
|
10570
|
+
res += res.length > 0 ? "/.." : "..";
|
|
10571
|
+
lastSegmentLength = 2;
|
|
10572
|
+
}
|
|
10573
|
+
} else {
|
|
10574
|
+
if (res.length > 0) {
|
|
10575
|
+
res += `/${path.slice(lastSlash + 1, index)}`;
|
|
10576
|
+
} else {
|
|
10577
|
+
res = path.slice(lastSlash + 1, index);
|
|
10578
|
+
}
|
|
10579
|
+
lastSegmentLength = index - lastSlash - 1;
|
|
10580
|
+
}
|
|
10581
|
+
lastSlash = index;
|
|
10582
|
+
dots = 0;
|
|
10583
|
+
} else if (char === "." && dots !== -1) {
|
|
10584
|
+
++dots;
|
|
10585
|
+
} else {
|
|
10586
|
+
dots = -1;
|
|
10587
|
+
}
|
|
10588
|
+
}
|
|
10589
|
+
return res;
|
|
10590
|
+
}
|
|
10591
|
+
const isAbsolute = function(p) {
|
|
10592
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
10593
|
+
};
|
|
10594
|
+
const toNamespacedPath = function(p) {
|
|
10595
|
+
return normalizeWindowsPath(p);
|
|
10596
|
+
};
|
|
10597
|
+
const pathe_M_eThtNZ_extname = function(p) {
|
|
10598
|
+
if (p === "..") return "";
|
|
10599
|
+
const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
|
|
10600
|
+
return match && match[1] || "";
|
|
10601
|
+
};
|
|
10602
|
+
const pathe_M_eThtNZ_relative = function(from, to) {
|
|
10603
|
+
const _from = pathe_M_eThtNZ_resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
10604
|
+
const _to = pathe_M_eThtNZ_resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
10605
|
+
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
|
|
10606
|
+
return _to.join("/");
|
|
10607
|
+
}
|
|
10608
|
+
const _fromCopy = [..._from];
|
|
10609
|
+
for (const segment of _fromCopy) {
|
|
10610
|
+
if (_to[0] !== segment) {
|
|
10611
|
+
break;
|
|
10612
|
+
}
|
|
10613
|
+
_from.shift();
|
|
10614
|
+
_to.shift();
|
|
10615
|
+
}
|
|
10616
|
+
return [..._from.map(() => ".."), ..._to].join("/");
|
|
10617
|
+
};
|
|
10618
|
+
const pathe_M_eThtNZ_dirname = function(p) {
|
|
10619
|
+
const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
|
10620
|
+
if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
|
|
10621
|
+
segments[0] += "/";
|
|
10622
|
+
}
|
|
10623
|
+
return segments.join("/") || (isAbsolute(p) ? "/" : ".");
|
|
10624
|
+
};
|
|
10625
|
+
const pathe_M_eThtNZ_format = function(p) {
|
|
10626
|
+
const ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "";
|
|
10627
|
+
const segments = [p.root, p.dir, p.base ?? (p.name ?? "") + ext].filter(
|
|
10628
|
+
Boolean
|
|
10629
|
+
);
|
|
10630
|
+
return normalizeWindowsPath(
|
|
10631
|
+
p.root ? pathe_M_eThtNZ_resolve(...segments) : segments.join("/")
|
|
10632
|
+
);
|
|
10633
|
+
};
|
|
10634
|
+
const pathe_M_eThtNZ_basename = function(p, extension) {
|
|
10635
|
+
const segments = normalizeWindowsPath(p).split("/");
|
|
10636
|
+
let lastSegment = "";
|
|
10637
|
+
for (let i = segments.length - 1; i >= 0; i--) {
|
|
10638
|
+
const val = segments[i];
|
|
10639
|
+
if (val) {
|
|
10640
|
+
lastSegment = val;
|
|
10641
|
+
break;
|
|
10642
|
+
}
|
|
10643
|
+
}
|
|
10644
|
+
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
|
10645
|
+
};
|
|
10646
|
+
const pathe_M_eThtNZ_parse = function(p) {
|
|
10647
|
+
const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "";
|
|
10648
|
+
const base = pathe_M_eThtNZ_basename(p);
|
|
10649
|
+
const extension = pathe_M_eThtNZ_extname(base);
|
|
10650
|
+
return {
|
|
10651
|
+
root,
|
|
10652
|
+
dir: pathe_M_eThtNZ_dirname(p),
|
|
10653
|
+
base,
|
|
10654
|
+
ext: extension,
|
|
10655
|
+
name: base.slice(0, base.length - extension.length)
|
|
10656
|
+
};
|
|
10657
|
+
};
|
|
10658
|
+
const matchesGlob = (path, pattern) => {
|
|
10659
|
+
return zeptomatch(pattern, normalize(path));
|
|
10660
|
+
};
|
|
10661
|
+
|
|
10662
|
+
const pathe_M_eThtNZ_path = (/* unused pure expression or super */ null && ({
|
|
10663
|
+
__proto__: null,
|
|
10664
|
+
basename: pathe_M_eThtNZ_basename,
|
|
10665
|
+
dirname: pathe_M_eThtNZ_dirname,
|
|
10666
|
+
extname: pathe_M_eThtNZ_extname,
|
|
10667
|
+
format: pathe_M_eThtNZ_format,
|
|
10668
|
+
isAbsolute: isAbsolute,
|
|
10669
|
+
join: pathe_M_eThtNZ_join,
|
|
10670
|
+
matchesGlob: matchesGlob,
|
|
10671
|
+
normalize: normalize,
|
|
10672
|
+
normalizeString: normalizeString,
|
|
10673
|
+
parse: pathe_M_eThtNZ_parse,
|
|
10674
|
+
relative: pathe_M_eThtNZ_relative,
|
|
10675
|
+
resolve: pathe_M_eThtNZ_resolve,
|
|
10676
|
+
sep: sep,
|
|
10677
|
+
toNamespacedPath: toNamespacedPath
|
|
10678
|
+
}));
|
|
10679
|
+
|
|
10704
10680
|
|
|
10705
|
-
;// CONCATENATED MODULE: ../core/src/entities/copilot-setup.ts
|
|
10706
|
-
/**
|
|
10707
|
-
* Core domain entities for the Copilot Setup Steps feature.
|
|
10708
|
-
* These are the fundamental types that represent the business domain.
|
|
10709
|
-
*/ /**
|
|
10710
|
-
* Types of version files supported for detection
|
|
10711
|
-
*/ /**
|
|
10712
|
-
* Node.js package manager types (in priority order: npm > yarn > pnpm)
|
|
10713
|
-
*/ const NODE_PACKAGE_MANAGERS = [
|
|
10714
|
-
"npm",
|
|
10715
|
-
"yarn",
|
|
10716
|
-
"pnpm"
|
|
10717
|
-
];
|
|
10718
|
-
/**
|
|
10719
|
-
* Python package manager types (in priority order)
|
|
10720
|
-
*/ const PYTHON_PACKAGE_MANAGERS = [
|
|
10721
|
-
"poetry",
|
|
10722
|
-
"pipenv",
|
|
10723
|
-
"pip"
|
|
10724
|
-
];
|
|
10725
10681
|
|
|
10726
|
-
// EXTERNAL MODULE: external "node:fs"
|
|
10727
|
-
var external_node_fs_ = __webpack_require__(3024);
|
|
10728
|
-
// EXTERNAL MODULE: ../../node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
|
|
10729
|
-
var pathe_M_eThtNZ = __webpack_require__(2072);
|
|
10730
10682
|
// EXTERNAL MODULE: ../../node_modules/dotenv/lib/main.js
|
|
10731
10683
|
var lib_main = __webpack_require__(5599);
|
|
10732
10684
|
// EXTERNAL MODULE: external "node:url"
|
|
@@ -11820,6 +11772,92 @@ function createJiti(id, opts = {}) {
|
|
|
11820
11772
|
|
|
11821
11773
|
/* export default */ const lib_jiti = ((/* unused pure expression or super */ null && (createJiti)));
|
|
11822
11774
|
|
|
11775
|
+
;// CONCATENATED MODULE: ../../node_modules/rc9/dist/_chunks/libs/flat.mjs
|
|
11776
|
+
//#region node_modules/.pnpm/flat@6.0.1/node_modules/flat/index.js
|
|
11777
|
+
function isBuffer(obj) {
|
|
11778
|
+
return obj && obj.constructor && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj);
|
|
11779
|
+
}
|
|
11780
|
+
function keyIdentity(key) {
|
|
11781
|
+
return key;
|
|
11782
|
+
}
|
|
11783
|
+
function flat_flatten(target, opts) {
|
|
11784
|
+
opts = opts || {};
|
|
11785
|
+
const delimiter = opts.delimiter || ".";
|
|
11786
|
+
const maxDepth = opts.maxDepth;
|
|
11787
|
+
const transformKey = opts.transformKey || keyIdentity;
|
|
11788
|
+
const output = {};
|
|
11789
|
+
function step(object, prev, currentDepth) {
|
|
11790
|
+
currentDepth = currentDepth || 1;
|
|
11791
|
+
Object.keys(object).forEach(function(key) {
|
|
11792
|
+
const value = object[key];
|
|
11793
|
+
const isarray = opts.safe && Array.isArray(value);
|
|
11794
|
+
const type = Object.prototype.toString.call(value);
|
|
11795
|
+
const isbuffer = isBuffer(value);
|
|
11796
|
+
const isobject = type === "[object Object]" || type === "[object Array]";
|
|
11797
|
+
const newKey = prev ? prev + delimiter + transformKey(key) : transformKey(key);
|
|
11798
|
+
if (!isarray && !isbuffer && isobject && Object.keys(value).length && (!opts.maxDepth || currentDepth < maxDepth)) return step(value, newKey, currentDepth + 1);
|
|
11799
|
+
output[newKey] = value;
|
|
11800
|
+
});
|
|
11801
|
+
}
|
|
11802
|
+
step(target);
|
|
11803
|
+
return output;
|
|
11804
|
+
}
|
|
11805
|
+
function flat_unflatten(target, opts) {
|
|
11806
|
+
opts = opts || {};
|
|
11807
|
+
const delimiter = opts.delimiter || ".";
|
|
11808
|
+
const overwrite = opts.overwrite || false;
|
|
11809
|
+
const transformKey = opts.transformKey || keyIdentity;
|
|
11810
|
+
const result = {};
|
|
11811
|
+
if (isBuffer(target) || Object.prototype.toString.call(target) !== "[object Object]") return target;
|
|
11812
|
+
function getkey(key) {
|
|
11813
|
+
const parsedKey = Number(key);
|
|
11814
|
+
return isNaN(parsedKey) || key.indexOf(".") !== -1 || opts.object ? key : parsedKey;
|
|
11815
|
+
}
|
|
11816
|
+
function addKeys(keyPrefix, recipient, target) {
|
|
11817
|
+
return Object.keys(target).reduce(function(result, key) {
|
|
11818
|
+
result[keyPrefix + delimiter + key] = target[key];
|
|
11819
|
+
return result;
|
|
11820
|
+
}, recipient);
|
|
11821
|
+
}
|
|
11822
|
+
function isEmpty(val) {
|
|
11823
|
+
const type = Object.prototype.toString.call(val);
|
|
11824
|
+
const isArray = type === "[object Array]";
|
|
11825
|
+
const isObject = type === "[object Object]";
|
|
11826
|
+
if (!val) return true;
|
|
11827
|
+
else if (isArray) return !val.length;
|
|
11828
|
+
else if (isObject) return !Object.keys(val).length;
|
|
11829
|
+
}
|
|
11830
|
+
target = Object.keys(target).reduce(function(result, key) {
|
|
11831
|
+
const type = Object.prototype.toString.call(target[key]);
|
|
11832
|
+
if (!(type === "[object Object]" || type === "[object Array]") || isEmpty(target[key])) {
|
|
11833
|
+
result[key] = target[key];
|
|
11834
|
+
return result;
|
|
11835
|
+
} else return addKeys(key, result, flat_flatten(target[key], opts));
|
|
11836
|
+
}, {});
|
|
11837
|
+
Object.keys(target).forEach(function(key) {
|
|
11838
|
+
const split = key.split(delimiter).map(transformKey);
|
|
11839
|
+
let key1 = getkey(split.shift());
|
|
11840
|
+
let key2 = getkey(split[0]);
|
|
11841
|
+
let recipient = result;
|
|
11842
|
+
while (key2 !== void 0) {
|
|
11843
|
+
if (key1 === "__proto__") return;
|
|
11844
|
+
const type = Object.prototype.toString.call(recipient[key1]);
|
|
11845
|
+
const isobject = type === "[object Object]" || type === "[object Array]";
|
|
11846
|
+
if (!overwrite && !isobject && typeof recipient[key1] !== "undefined") return;
|
|
11847
|
+
if (overwrite && !isobject || !overwrite && recipient[key1] == null) recipient[key1] = typeof key2 === "number" && !opts.object ? [] : {};
|
|
11848
|
+
recipient = recipient[key1];
|
|
11849
|
+
if (split.length > 0) {
|
|
11850
|
+
key1 = getkey(split.shift());
|
|
11851
|
+
key2 = getkey(split[0]);
|
|
11852
|
+
}
|
|
11853
|
+
}
|
|
11854
|
+
recipient[key1] = flat_unflatten(target[key], opts);
|
|
11855
|
+
});
|
|
11856
|
+
return result;
|
|
11857
|
+
}
|
|
11858
|
+
//#endregion
|
|
11859
|
+
|
|
11860
|
+
|
|
11823
11861
|
;// CONCATENATED MODULE: ../../node_modules/destr/dist/index.mjs
|
|
11824
11862
|
const suspectProtoRx = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/;
|
|
11825
11863
|
const suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
|
|
@@ -11894,255 +11932,235 @@ function safeDestr(value, options = {}) {
|
|
|
11894
11932
|
|
|
11895
11933
|
|
|
11896
11934
|
|
|
11897
|
-
|
|
11898
|
-
|
|
11899
|
-
|
|
11900
|
-
|
|
11901
|
-
|
|
11902
|
-
|
|
11903
|
-
|
|
11904
|
-
|
|
11905
|
-
|
|
11906
|
-
function isBuffer (obj) {
|
|
11907
|
-
return obj &&
|
|
11908
|
-
obj.constructor &&
|
|
11909
|
-
(typeof obj.constructor.isBuffer === 'function') &&
|
|
11910
|
-
obj.constructor.isBuffer(obj)
|
|
11911
|
-
}
|
|
11912
|
-
|
|
11913
|
-
function keyIdentity (key) {
|
|
11914
|
-
return key
|
|
11915
|
-
}
|
|
11916
|
-
|
|
11917
|
-
function flatten (target, opts) {
|
|
11918
|
-
opts = opts || {};
|
|
11919
|
-
|
|
11920
|
-
const delimiter = opts.delimiter || '.';
|
|
11921
|
-
const maxDepth = opts.maxDepth;
|
|
11922
|
-
const transformKey = opts.transformKey || keyIdentity;
|
|
11923
|
-
const output = {};
|
|
11924
|
-
|
|
11925
|
-
function step (object, prev, currentDepth) {
|
|
11926
|
-
currentDepth = currentDepth || 1;
|
|
11927
|
-
Object.keys(object).forEach(function (key) {
|
|
11928
|
-
const value = object[key];
|
|
11929
|
-
const isarray = opts.safe && Array.isArray(value);
|
|
11930
|
-
const type = Object.prototype.toString.call(value);
|
|
11931
|
-
const isbuffer = isBuffer(value);
|
|
11932
|
-
const isobject = (
|
|
11933
|
-
type === '[object Object]' ||
|
|
11934
|
-
type === '[object Array]'
|
|
11935
|
-
);
|
|
11936
|
-
|
|
11937
|
-
const newKey = prev
|
|
11938
|
-
? prev + delimiter + transformKey(key)
|
|
11939
|
-
: transformKey(key);
|
|
11940
|
-
|
|
11941
|
-
if (!isarray && !isbuffer && isobject && Object.keys(value).length &&
|
|
11942
|
-
(!opts.maxDepth || currentDepth < maxDepth)) {
|
|
11943
|
-
return step(value, newKey, currentDepth + 1)
|
|
11944
|
-
}
|
|
11945
|
-
|
|
11946
|
-
output[newKey] = value;
|
|
11947
|
-
});
|
|
11935
|
+
;// CONCATENATED MODULE: ../../node_modules/defu/dist/defu.mjs
|
|
11936
|
+
function isPlainObject(value) {
|
|
11937
|
+
if (value === null || typeof value !== "object") {
|
|
11938
|
+
return false;
|
|
11948
11939
|
}
|
|
11949
|
-
|
|
11950
|
-
|
|
11951
|
-
|
|
11952
|
-
return output
|
|
11953
|
-
}
|
|
11954
|
-
|
|
11955
|
-
function unflatten (target, opts) {
|
|
11956
|
-
opts = opts || {};
|
|
11957
|
-
|
|
11958
|
-
const delimiter = opts.delimiter || '.';
|
|
11959
|
-
const overwrite = opts.overwrite || false;
|
|
11960
|
-
const transformKey = opts.transformKey || keyIdentity;
|
|
11961
|
-
const result = {};
|
|
11962
|
-
|
|
11963
|
-
const isbuffer = isBuffer(target);
|
|
11964
|
-
if (isbuffer || Object.prototype.toString.call(target) !== '[object Object]') {
|
|
11965
|
-
return target
|
|
11940
|
+
const prototype = Object.getPrototypeOf(value);
|
|
11941
|
+
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
|
|
11942
|
+
return false;
|
|
11966
11943
|
}
|
|
11967
|
-
|
|
11968
|
-
|
|
11969
|
-
// an integer.
|
|
11970
|
-
function getkey (key) {
|
|
11971
|
-
const parsedKey = Number(key);
|
|
11972
|
-
|
|
11973
|
-
return (
|
|
11974
|
-
isNaN(parsedKey) ||
|
|
11975
|
-
key.indexOf('.') !== -1 ||
|
|
11976
|
-
opts.object
|
|
11977
|
-
)
|
|
11978
|
-
? key
|
|
11979
|
-
: parsedKey
|
|
11944
|
+
if (Symbol.iterator in value) {
|
|
11945
|
+
return false;
|
|
11980
11946
|
}
|
|
11981
|
-
|
|
11982
|
-
|
|
11983
|
-
return Object.keys(target).reduce(function (result, key) {
|
|
11984
|
-
result[keyPrefix + delimiter + key] = target[key];
|
|
11985
|
-
|
|
11986
|
-
return result
|
|
11987
|
-
}, recipient)
|
|
11947
|
+
if (Symbol.toStringTag in value) {
|
|
11948
|
+
return Object.prototype.toString.call(value) === "[object Module]";
|
|
11988
11949
|
}
|
|
11950
|
+
return true;
|
|
11951
|
+
}
|
|
11989
11952
|
|
|
11990
|
-
|
|
11991
|
-
|
|
11992
|
-
|
|
11993
|
-
const isObject = type === '[object Object]';
|
|
11994
|
-
|
|
11995
|
-
if (!val) {
|
|
11996
|
-
return true
|
|
11997
|
-
} else if (isArray) {
|
|
11998
|
-
return !val.length
|
|
11999
|
-
} else if (isObject) {
|
|
12000
|
-
return !Object.keys(val).length
|
|
12001
|
-
}
|
|
11953
|
+
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
11954
|
+
if (!isPlainObject(defaults)) {
|
|
11955
|
+
return _defu(baseObject, {}, namespace, merger);
|
|
12002
11956
|
}
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
|
|
12006
|
-
|
|
12007
|
-
|
|
12008
|
-
|
|
12009
|
-
|
|
11957
|
+
const object = { ...defaults };
|
|
11958
|
+
for (const key of Object.keys(baseObject)) {
|
|
11959
|
+
if (key === "__proto__" || key === "constructor") {
|
|
11960
|
+
continue;
|
|
11961
|
+
}
|
|
11962
|
+
const value = baseObject[key];
|
|
11963
|
+
if (value === null || value === void 0) {
|
|
11964
|
+
continue;
|
|
11965
|
+
}
|
|
11966
|
+
if (merger && merger(object, key, value, namespace)) {
|
|
11967
|
+
continue;
|
|
11968
|
+
}
|
|
11969
|
+
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
11970
|
+
object[key] = [...value, ...object[key]];
|
|
11971
|
+
} else if (isPlainObject(value) && isPlainObject(object[key])) {
|
|
11972
|
+
object[key] = _defu(
|
|
11973
|
+
value,
|
|
11974
|
+
object[key],
|
|
11975
|
+
(namespace ? `${namespace}.` : "") + key.toString(),
|
|
11976
|
+
merger
|
|
11977
|
+
);
|
|
12010
11978
|
} else {
|
|
12011
|
-
|
|
12012
|
-
key,
|
|
12013
|
-
result,
|
|
12014
|
-
flatten(target[key], opts)
|
|
12015
|
-
)
|
|
11979
|
+
object[key] = value;
|
|
12016
11980
|
}
|
|
12017
|
-
}
|
|
11981
|
+
}
|
|
11982
|
+
return object;
|
|
11983
|
+
}
|
|
11984
|
+
function createDefu(merger) {
|
|
11985
|
+
return (...arguments_) => (
|
|
11986
|
+
// eslint-disable-next-line unicorn/no-array-reduce
|
|
11987
|
+
arguments_.reduce((p, c) => _defu(p, c, "", merger), {})
|
|
11988
|
+
);
|
|
11989
|
+
}
|
|
11990
|
+
const defu_defu = createDefu();
|
|
11991
|
+
const defuFn = createDefu((object, key, currentValue) => {
|
|
11992
|
+
if (object[key] !== void 0 && typeof currentValue === "function") {
|
|
11993
|
+
object[key] = currentValue(object[key]);
|
|
11994
|
+
return true;
|
|
11995
|
+
}
|
|
11996
|
+
});
|
|
11997
|
+
const defuArrayFn = createDefu((object, key, currentValue) => {
|
|
11998
|
+
if (Array.isArray(object[key]) && typeof currentValue === "function") {
|
|
11999
|
+
object[key] = currentValue(object[key]);
|
|
12000
|
+
return true;
|
|
12001
|
+
}
|
|
12002
|
+
});
|
|
12018
12003
|
|
|
12019
|
-
Object.keys(target).forEach(function (key) {
|
|
12020
|
-
const split = key.split(delimiter).map(transformKey);
|
|
12021
|
-
let key1 = getkey(split.shift());
|
|
12022
|
-
let key2 = getkey(split[0]);
|
|
12023
|
-
let recipient = result;
|
|
12024
12004
|
|
|
12025
|
-
while (key2 !== undefined) {
|
|
12026
|
-
if (key1 === '__proto__') {
|
|
12027
|
-
return
|
|
12028
|
-
}
|
|
12029
12005
|
|
|
12030
|
-
|
|
12031
|
-
const isobject = (
|
|
12032
|
-
type === '[object Object]' ||
|
|
12033
|
-
type === '[object Array]'
|
|
12034
|
-
);
|
|
12006
|
+
;// CONCATENATED MODULE: ../../node_modules/rc9/dist/index.mjs
|
|
12035
12007
|
|
|
12036
|
-
// do not write over falsey, non-undefined values if overwrite is false
|
|
12037
|
-
if (!overwrite && !isobject && typeof recipient[key1] !== 'undefined') {
|
|
12038
|
-
return
|
|
12039
|
-
}
|
|
12040
12008
|
|
|
12041
|
-
if ((overwrite && !isobject) || (!overwrite && recipient[key1] == null)) {
|
|
12042
|
-
recipient[key1] = (
|
|
12043
|
-
typeof key2 === 'number' &&
|
|
12044
|
-
!opts.object
|
|
12045
|
-
? []
|
|
12046
|
-
: {}
|
|
12047
|
-
);
|
|
12048
|
-
}
|
|
12049
12009
|
|
|
12050
|
-
recipient = recipient[key1];
|
|
12051
|
-
if (split.length > 0) {
|
|
12052
|
-
key1 = getkey(split.shift());
|
|
12053
|
-
key2 = getkey(split[0]);
|
|
12054
|
-
}
|
|
12055
|
-
}
|
|
12056
12010
|
|
|
12057
|
-
// unflatten again for 'messy objects'
|
|
12058
|
-
recipient[key1] = unflatten(target[key], opts);
|
|
12059
|
-
});
|
|
12060
12011
|
|
|
12061
|
-
return result
|
|
12062
|
-
}
|
|
12063
12012
|
|
|
12013
|
+
//#region src/index.ts
|
|
12064
12014
|
const RE_KEY_VAL = /^\s*([^\s=]+)\s*=\s*(.*)?\s*$/;
|
|
12065
12015
|
const RE_LINES = /\n|\r|\r\n/;
|
|
12016
|
+
/**
|
|
12017
|
+
* The default options for the configuration file.
|
|
12018
|
+
*/
|
|
12066
12019
|
const dist_defaults = {
|
|
12067
|
-
|
|
12068
|
-
|
|
12069
|
-
|
|
12020
|
+
name: ".conf",
|
|
12021
|
+
dir: process.cwd(),
|
|
12022
|
+
flat: false
|
|
12070
12023
|
};
|
|
12071
12024
|
function withDefaults(options) {
|
|
12072
|
-
|
|
12073
|
-
|
|
12074
|
-
|
|
12075
|
-
|
|
12025
|
+
if (typeof options === "string") options = { name: options };
|
|
12026
|
+
return {
|
|
12027
|
+
...dist_defaults,
|
|
12028
|
+
...options
|
|
12029
|
+
};
|
|
12076
12030
|
}
|
|
12077
12031
|
function dist_parse(contents, options = {}) {
|
|
12078
|
-
|
|
12079
|
-
|
|
12080
|
-
|
|
12081
|
-
|
|
12082
|
-
|
|
12083
|
-
|
|
12084
|
-
|
|
12085
|
-
|
|
12086
|
-
|
|
12087
|
-
|
|
12088
|
-
|
|
12089
|
-
|
|
12090
|
-
|
|
12091
|
-
|
|
12092
|
-
|
|
12093
|
-
|
|
12094
|
-
const nkey = key.slice(0, Math.max(0, key.length - 2));
|
|
12095
|
-
config[nkey] = (config[nkey] || []).concat(value);
|
|
12096
|
-
continue;
|
|
12097
|
-
}
|
|
12098
|
-
config[key] = value;
|
|
12099
|
-
}
|
|
12100
|
-
return options.flat ? config : unflatten(config, { overwrite: true });
|
|
12032
|
+
const config = {};
|
|
12033
|
+
const lines = contents.split(RE_LINES);
|
|
12034
|
+
for (const line of lines) {
|
|
12035
|
+
const match = line.match(RE_KEY_VAL);
|
|
12036
|
+
if (!match) continue;
|
|
12037
|
+
const key = match[1];
|
|
12038
|
+
if (!key || key === "__proto__" || key === "constructor") continue;
|
|
12039
|
+
const value = destr((match[2] || "").trim());
|
|
12040
|
+
if (key.endsWith("[]")) {
|
|
12041
|
+
const nkey = key.slice(0, Math.max(0, key.length - 2));
|
|
12042
|
+
config[nkey] = (config[nkey] || []).concat(value);
|
|
12043
|
+
continue;
|
|
12044
|
+
}
|
|
12045
|
+
config[key] = value;
|
|
12046
|
+
}
|
|
12047
|
+
return options.flat ? config : flat_unflatten(config, { overwrite: true });
|
|
12101
12048
|
}
|
|
12049
|
+
/**
|
|
12050
|
+
* Parses a configuration string into an object.
|
|
12051
|
+
* @param {string} contents - The configuration data as a raw string.
|
|
12052
|
+
* @param {RCOptions} [options={}] - Options to control the parsing behaviour. See {@link RCOptions}.
|
|
12053
|
+
* @returns {RC} - The parsed configuration object. See {@link RC}.
|
|
12054
|
+
*/
|
|
12102
12055
|
function parseFile(path, options) {
|
|
12103
|
-
|
|
12104
|
-
|
|
12105
|
-
}
|
|
12106
|
-
return dist_parse((0,external_node_fs_.readFileSync)(path, "utf8"), options);
|
|
12056
|
+
if (!(0,external_node_fs_.existsSync)(path)) return {};
|
|
12057
|
+
return dist_parse((0,external_node_fs_.readFileSync)(path, "utf8"), options);
|
|
12107
12058
|
}
|
|
12059
|
+
/**
|
|
12060
|
+
* Reads a configuration file from a default or specified location and parses its contents.
|
|
12061
|
+
* @param {RCOptions|string} [options] - Options for reading the configuration file, or the name of the configuration file. See {@link RCOptions}.
|
|
12062
|
+
* @returns {RC} - The parsed configuration object. See {@link RC}.
|
|
12063
|
+
*/
|
|
12108
12064
|
function dist_read(options) {
|
|
12109
|
-
|
|
12110
|
-
|
|
12065
|
+
options = withDefaults(options);
|
|
12066
|
+
return parseFile((0,external_node_path_.resolve)(options.dir, options.name), options);
|
|
12111
12067
|
}
|
|
12068
|
+
/**
|
|
12069
|
+
* Reads a custom configuration file from a default or specified location and parses its contents.
|
|
12070
|
+
* @param {RCOptions|string} [options] - Options for reading the configuration file, or the name of the configuration file. See {@link RCOptions}.
|
|
12071
|
+
* @returns {RC} - The parsed configuration object.
|
|
12072
|
+
* @deprecated Use {@link readUserConfig} instead, which uses `~/.config` following XDG conventions.
|
|
12073
|
+
*/
|
|
12112
12074
|
function readUser(options) {
|
|
12113
|
-
|
|
12114
|
-
|
|
12115
|
-
|
|
12075
|
+
options = withDefaults(options);
|
|
12076
|
+
options.dir = process.env.XDG_CONFIG_HOME || (0,external_node_os_.homedir)();
|
|
12077
|
+
return dist_read(options);
|
|
12116
12078
|
}
|
|
12079
|
+
/**
|
|
12080
|
+
* Serialises a configuration object to a string format.
|
|
12081
|
+
* @param {RC} config - The configuration object to serialise. See {@link RC}.
|
|
12082
|
+
* @returns {string} - The serialised configuration string.
|
|
12083
|
+
*/
|
|
12117
12084
|
function serialize(config) {
|
|
12118
|
-
|
|
12085
|
+
return Object.entries(flatten(config)).map(([key, value]) => `${key}=${JSON.stringify(value)}`).join("\n");
|
|
12119
12086
|
}
|
|
12087
|
+
/**
|
|
12088
|
+
* Writes a configuration object to a file in a default or specified location.
|
|
12089
|
+
* @param {RC} config - The configuration object to write. See {@link RC}.
|
|
12090
|
+
* @param {RCOptions|string} [options] - Options for writing the configuration file, or the name of the configuration file. See {@link RCOptions}.
|
|
12091
|
+
*/
|
|
12120
12092
|
function dist_write(config, options) {
|
|
12121
|
-
|
|
12122
|
-
|
|
12123
|
-
encoding: "utf8"
|
|
12124
|
-
});
|
|
12093
|
+
options = withDefaults(options);
|
|
12094
|
+
writeFileSync(resolve(options.dir, options.name), serialize(config), { encoding: "utf8" });
|
|
12125
12095
|
}
|
|
12096
|
+
/**
|
|
12097
|
+
* Writes a custom configuration object to a file in a default or specified location.
|
|
12098
|
+
* @param {RC} config - The configuration object to write. See {@link RC}.
|
|
12099
|
+
* @param {RCOptions|string} [options] - Options for writing the configuration file, or the name of the configuration file. See {@link RCOptions}.
|
|
12100
|
+
* @deprecated Use {@link writeUserConfig} instead, which uses `~/.config` following XDG conventions.
|
|
12101
|
+
*/
|
|
12126
12102
|
function writeUser(config, options) {
|
|
12127
|
-
|
|
12128
|
-
|
|
12129
|
-
|
|
12103
|
+
options = withDefaults(options);
|
|
12104
|
+
options.dir = process.env.XDG_CONFIG_HOME || homedir();
|
|
12105
|
+
dist_write(config, options);
|
|
12130
12106
|
}
|
|
12131
|
-
|
|
12132
|
-
|
|
12133
|
-
|
|
12134
|
-
|
|
12135
|
-
|
|
12136
|
-
|
|
12137
|
-
|
|
12138
|
-
|
|
12107
|
+
/**
|
|
12108
|
+
* Reads a configuration file from `$XDG_CONFIG_HOME` or `$HOME/.config` and parses its contents.
|
|
12109
|
+
* @param {RCOptions|string} [options] - Options for reading the configuration file, or the name of the configuration file. See {@link RCOptions}.
|
|
12110
|
+
* @returns {RC} - The parsed configuration object.
|
|
12111
|
+
*/
|
|
12112
|
+
function readUserConfig(options) {
|
|
12113
|
+
options = withDefaults(options);
|
|
12114
|
+
options.dir = process.env.XDG_CONFIG_HOME || resolve(homedir(), ".config");
|
|
12115
|
+
return dist_read(options);
|
|
12116
|
+
}
|
|
12117
|
+
/**
|
|
12118
|
+
* Writes a configuration object to a file in `$XDG_CONFIG_HOME` or `$HOME/.config`.
|
|
12119
|
+
* @param {RC} config - The configuration object to write. See {@link RC}.
|
|
12120
|
+
* @param {RCOptions|string} [options] - Options for writing the configuration file, or the name of the configuration file. See {@link RCOptions}.
|
|
12121
|
+
*/
|
|
12122
|
+
function writeUserConfig(config, options) {
|
|
12123
|
+
options = withDefaults(options);
|
|
12124
|
+
options.dir = process.env.XDG_CONFIG_HOME || resolve(homedir(), ".config");
|
|
12125
|
+
dist_write(config, options);
|
|
12139
12126
|
}
|
|
12127
|
+
/**
|
|
12128
|
+
* Updates a configuration object in `$XDG_CONFIG_HOME` or `$HOME/.config` by merging and writing the result.
|
|
12129
|
+
* @param {RC} config - The configuration object to update. See {@link RC}.
|
|
12130
|
+
* @param {RCOptions|string} [options] - Options for updating the configuration file, or the name of the configuration file. See {@link RCOptions}.
|
|
12131
|
+
* @returns {RC} - The updated configuration object.
|
|
12132
|
+
*/
|
|
12133
|
+
function updateUserConfig(config, options) {
|
|
12134
|
+
options = withDefaults(options);
|
|
12135
|
+
options.dir = process.env.XDG_CONFIG_HOME || resolve(homedir(), ".config");
|
|
12136
|
+
return update(config, options);
|
|
12137
|
+
}
|
|
12138
|
+
/**
|
|
12139
|
+
* Updates an existing configuration object by merging it with the contents of a configuration file and writing the result.
|
|
12140
|
+
* @param {RC} config - The configuration object to update. See {@link RC}.
|
|
12141
|
+
* @param {RCOptions|string} [options] - Options for updating the configuration file, or the name of the configuration file. See {@link RCOptions}.
|
|
12142
|
+
* @returns {RC} - The updated configuration object. See {@link RC}.
|
|
12143
|
+
*/
|
|
12144
|
+
function update(config, options) {
|
|
12145
|
+
options = withDefaults(options);
|
|
12146
|
+
if (!options.flat) config = unflatten(config, { overwrite: true });
|
|
12147
|
+
const newConfig = defu(config, dist_read(options));
|
|
12148
|
+
dist_write(newConfig, options);
|
|
12149
|
+
return newConfig;
|
|
12150
|
+
}
|
|
12151
|
+
/**
|
|
12152
|
+
* Updates a custom configuration object by merging it with the contents of a configuration file in a default location and writing the result.
|
|
12153
|
+
* @param {RC} config - The configuration object to update. See {@link RC}.
|
|
12154
|
+
* @param {RCOptions|string} [options] - Options for updating the configuration file, or the name of the configuration file. See {@link RCOptions}.
|
|
12155
|
+
* @returns {RC} - The updated configuration object. See {@link RC}.
|
|
12156
|
+
* @deprecated Use {@link updateUserConfig} instead, which uses `~/.config` following XDG conventions.
|
|
12157
|
+
*/
|
|
12140
12158
|
function updateUser(config, options) {
|
|
12141
|
-
|
|
12142
|
-
|
|
12143
|
-
|
|
12159
|
+
options = withDefaults(options);
|
|
12160
|
+
options.dir = process.env.XDG_CONFIG_HOME || homedir();
|
|
12161
|
+
return update(config, options);
|
|
12144
12162
|
}
|
|
12145
|
-
|
|
12163
|
+
//#endregion
|
|
12146
12164
|
|
|
12147
12165
|
|
|
12148
12166
|
// EXTERNAL MODULE: ../../node_modules/confbox/dist/_chunks/_format.mjs
|
|
@@ -12176,7 +12194,7 @@ const defaultFindOptions = {
|
|
|
12176
12194
|
async function findFile(filename, _options = {}) {
|
|
12177
12195
|
const filenames = Array.isArray(filename) ? filename : [filename];
|
|
12178
12196
|
const options = { ...defaultFindOptions, ..._options };
|
|
12179
|
-
const basePath = (
|
|
12197
|
+
const basePath = pathe_M_eThtNZ_resolve(options.startingFrom);
|
|
12180
12198
|
const leadingSlash = basePath[0] === "/";
|
|
12181
12199
|
const segments = basePath.split("/").filter(Boolean);
|
|
12182
12200
|
if (filenames.includes(segments.at(-1)) && await options.test(basePath)) {
|
|
@@ -12192,7 +12210,7 @@ async function findFile(filename, _options = {}) {
|
|
|
12192
12210
|
if (options.reverse) {
|
|
12193
12211
|
for (let index = root + 1; index <= segments.length; index++) {
|
|
12194
12212
|
for (const filename2 of filenames) {
|
|
12195
|
-
const filePath = (
|
|
12213
|
+
const filePath = pathe_M_eThtNZ_join(...segments.slice(0, index), filename2);
|
|
12196
12214
|
if (await options.test(filePath)) {
|
|
12197
12215
|
return filePath;
|
|
12198
12216
|
}
|
|
@@ -12201,7 +12219,7 @@ async function findFile(filename, _options = {}) {
|
|
|
12201
12219
|
} else {
|
|
12202
12220
|
for (let index = segments.length; index > root; index--) {
|
|
12203
12221
|
for (const filename2 of filenames) {
|
|
12204
|
-
const filePath = (
|
|
12222
|
+
const filePath = pathe_M_eThtNZ_join(...segments.slice(0, index), filename2);
|
|
12205
12223
|
if (await options.test(filePath)) {
|
|
12206
12224
|
return filePath;
|
|
12207
12225
|
}
|
|
@@ -12221,10 +12239,10 @@ function findFarthestFile(filename, options = {}) {
|
|
|
12221
12239
|
|
|
12222
12240
|
function _resolvePath(id, opts = {}) {
|
|
12223
12241
|
if (id instanceof URL || id.startsWith("file://")) {
|
|
12224
|
-
return (
|
|
12242
|
+
return normalize((0,external_node_url_.fileURLToPath)(id));
|
|
12225
12243
|
}
|
|
12226
|
-
if ((
|
|
12227
|
-
return (
|
|
12244
|
+
if (isAbsolute(id)) {
|
|
12245
|
+
return normalize(id);
|
|
12228
12246
|
}
|
|
12229
12247
|
return resolveModulePath(id, {
|
|
12230
12248
|
...opts,
|
|
@@ -12350,10 +12368,10 @@ async function resolveLockfile(id = process.cwd(), options = {}) {
|
|
|
12350
12368
|
});
|
|
12351
12369
|
}
|
|
12352
12370
|
const workspaceTests = {
|
|
12353
|
-
workspaceFile: (opts) => findFile(workspaceFiles, opts).then((r) => (
|
|
12354
|
-
gitConfig: (opts) => findFile(".git/config", opts).then((r) => (
|
|
12355
|
-
lockFile: (opts) => findFile(lockFiles, opts).then((r) => (
|
|
12356
|
-
packageJson: (opts) => findFile(packageFiles, opts).then((r) => (
|
|
12371
|
+
workspaceFile: (opts) => findFile(workspaceFiles, opts).then((r) => pathe_M_eThtNZ_dirname(r)),
|
|
12372
|
+
gitConfig: (opts) => findFile(".git/config", opts).then((r) => pathe_M_eThtNZ_resolve(r, "../..")),
|
|
12373
|
+
lockFile: (opts) => findFile(lockFiles, opts).then((r) => pathe_M_eThtNZ_dirname(r)),
|
|
12374
|
+
packageJson: (opts) => findFile(packageFiles, opts).then((r) => pathe_M_eThtNZ_dirname(r))
|
|
12357
12375
|
};
|
|
12358
12376
|
async function findWorkspaceDir(id = process.cwd(), options = {}) {
|
|
12359
12377
|
const startingFrom = _resolvePath(id, options);
|
|
@@ -12537,7 +12555,6 @@ function stringifyGitConfig(config) {
|
|
|
12537
12555
|
|
|
12538
12556
|
|
|
12539
12557
|
|
|
12540
|
-
|
|
12541
12558
|
//#region src/dotenv.ts
|
|
12542
12559
|
/**
|
|
12543
12560
|
* Load and interpolate environment variables into `process.env`.
|
|
@@ -12562,13 +12579,13 @@ async function setupDotenv(options) {
|
|
|
12562
12579
|
/** Load environment variables into an object. */
|
|
12563
12580
|
async function loadDotenv(options) {
|
|
12564
12581
|
const environment = Object.create(null);
|
|
12565
|
-
const cwd = (
|
|
12582
|
+
const cwd = pathe_M_eThtNZ_resolve(options.cwd || ".");
|
|
12566
12583
|
const _fileName = options.fileName || ".env";
|
|
12567
12584
|
const dotenvFiles = typeof _fileName === "string" ? [_fileName] : _fileName;
|
|
12568
12585
|
const dotenvVars = getDotEnvVars(options.env || {});
|
|
12569
12586
|
Object.assign(environment, options.env);
|
|
12570
12587
|
for (const file of dotenvFiles) {
|
|
12571
|
-
const dotenvFile = (
|
|
12588
|
+
const dotenvFile = pathe_M_eThtNZ_resolve(cwd, file);
|
|
12572
12589
|
if (!(0,external_node_fs_.statSync)(dotenvFile, { throwIfNoEntry: false })?.isFile()) continue;
|
|
12573
12590
|
const parsed = lib_main.parse(await external_node_fs_.promises.readFile(dotenvFile, "utf8"));
|
|
12574
12591
|
for (const key in parsed) {
|
|
@@ -12577,22 +12594,22 @@ async function loadDotenv(options) {
|
|
|
12577
12594
|
dotenvVars.add(key);
|
|
12578
12595
|
}
|
|
12579
12596
|
}
|
|
12580
|
-
if (options.interpolate)
|
|
12597
|
+
if (options.interpolate) dist_interpolate(environment);
|
|
12581
12598
|
return environment;
|
|
12582
12599
|
}
|
|
12583
|
-
function
|
|
12600
|
+
function dist_interpolate(target, source = {}, parse = (v) => v) {
|
|
12584
12601
|
function getValue(key) {
|
|
12585
12602
|
return source[key] === void 0 ? target[key] : source[key];
|
|
12586
12603
|
}
|
|
12587
|
-
function interpolate
|
|
12604
|
+
function interpolate(value, parents = []) {
|
|
12588
12605
|
if (typeof value !== "string") return value;
|
|
12589
12606
|
return parse((value.match(/(.?\${?(?:[\w:]+)?}?)/g) || []).reduce((newValue, match) => {
|
|
12590
12607
|
const parts = /(.?)\${?([\w:]+)?}?/g.exec(match) || [];
|
|
12591
12608
|
const prefix = parts[1];
|
|
12592
|
-
let value
|
|
12609
|
+
let value, replacePart;
|
|
12593
12610
|
if (prefix === "\\") {
|
|
12594
12611
|
replacePart = parts[0] || "";
|
|
12595
|
-
value
|
|
12612
|
+
value = replacePart.replace(String.raw`\$`, "$");
|
|
12596
12613
|
} else {
|
|
12597
12614
|
const key = parts[2];
|
|
12598
12615
|
replacePart = (parts[0] || "").slice(prefix.length);
|
|
@@ -12600,20 +12617,19 @@ function interpolate(target, source = {}, parse = (v) => v) {
|
|
|
12600
12617
|
console.warn(`Please avoid recursive environment variables ( loop: ${parents.join(" > ")} > ${key} )`);
|
|
12601
12618
|
return "";
|
|
12602
12619
|
}
|
|
12603
|
-
value
|
|
12604
|
-
value
|
|
12620
|
+
value = getValue(key);
|
|
12621
|
+
value = interpolate(value, [...parents, key]);
|
|
12605
12622
|
}
|
|
12606
|
-
return value
|
|
12623
|
+
return value === void 0 ? newValue : newValue.replace(replacePart, value);
|
|
12607
12624
|
}, value));
|
|
12608
12625
|
}
|
|
12609
|
-
for (const key in target) target[key] = interpolate
|
|
12626
|
+
for (const key in target) target[key] = interpolate(getValue(key));
|
|
12610
12627
|
}
|
|
12611
12628
|
function getDotEnvVars(targetEnvironment) {
|
|
12612
12629
|
const globalRegistry = globalThis.__c12_dotenv_vars__ ||= /* @__PURE__ */ new Map();
|
|
12613
12630
|
if (!globalRegistry.has(targetEnvironment)) globalRegistry.set(targetEnvironment, /* @__PURE__ */ new Set());
|
|
12614
12631
|
return globalRegistry.get(targetEnvironment);
|
|
12615
12632
|
}
|
|
12616
|
-
|
|
12617
12633
|
//#endregion
|
|
12618
12634
|
//#region src/loader.ts
|
|
12619
12635
|
const _normalize = (p) => p?.replace(/\\/g, "/");
|
|
@@ -12639,7 +12655,7 @@ const SUPPORTED_EXTENSIONS = Object.freeze([
|
|
|
12639
12655
|
".toml"
|
|
12640
12656
|
]);
|
|
12641
12657
|
async function loadConfig(options) {
|
|
12642
|
-
options.cwd = (
|
|
12658
|
+
options.cwd = pathe_M_eThtNZ_resolve(process.cwd(), options.cwd || ".");
|
|
12643
12659
|
options.name = options.name || "config";
|
|
12644
12660
|
options.envName = options.envName ?? "production";
|
|
12645
12661
|
options.configFile = options.configFile ?? (options.name === "config" ? "config" : `${options.name}.config`);
|
|
@@ -12648,8 +12664,8 @@ async function loadConfig(options) {
|
|
|
12648
12664
|
extendKey: "extends",
|
|
12649
12665
|
...options.extend
|
|
12650
12666
|
};
|
|
12651
|
-
const _merger = options.merger ||
|
|
12652
|
-
options.jiti = options.jiti || createJiti((
|
|
12667
|
+
const _merger = options.merger || defu_defu;
|
|
12668
|
+
options.jiti = options.jiti || createJiti(pathe_M_eThtNZ_join(options.cwd, options.configFile), {
|
|
12653
12669
|
interopDefault: true,
|
|
12654
12670
|
moduleCache: false,
|
|
12655
12671
|
extensions: [...SUPPORTED_EXTENSIONS],
|
|
@@ -12658,7 +12674,7 @@ async function loadConfig(options) {
|
|
|
12658
12674
|
const r = {
|
|
12659
12675
|
config: {},
|
|
12660
12676
|
cwd: options.cwd,
|
|
12661
|
-
configFile: (
|
|
12677
|
+
configFile: pathe_M_eThtNZ_resolve(options.cwd, options.configFile),
|
|
12662
12678
|
layers: [],
|
|
12663
12679
|
_configFile: void 0
|
|
12664
12680
|
};
|
|
@@ -12801,22 +12817,22 @@ const GIGET_PREFIXES = [
|
|
|
12801
12817
|
const NPM_PACKAGE_RE = /^(@[\da-z~-][\d._a-z~-]*\/)?[\da-z~-][\d._a-z~-]*($|\/.*)/;
|
|
12802
12818
|
async function resolveConfig(source, options, sourceOptions = {}) {
|
|
12803
12819
|
if (options.resolve) {
|
|
12804
|
-
const res
|
|
12805
|
-
if (res
|
|
12820
|
+
const res = await options.resolve(source, options);
|
|
12821
|
+
if (res) return res;
|
|
12806
12822
|
}
|
|
12807
|
-
const _merger = options.merger ||
|
|
12823
|
+
const _merger = options.merger || defu_defu;
|
|
12808
12824
|
const customProviderKeys = Object.keys(sourceOptions.giget?.providers || {}).map((key) => `${key}:`);
|
|
12809
12825
|
const gigetPrefixes = customProviderKeys.length > 0 ? [...new Set([...customProviderKeys, ...GIGET_PREFIXES])] : GIGET_PREFIXES;
|
|
12810
12826
|
if (options.giget !== false && gigetPrefixes.some((prefix) => source.startsWith(prefix))) {
|
|
12811
|
-
const { downloadTemplate } = await __webpack_require__.e(/* import() */ "
|
|
12827
|
+
const { downloadTemplate } = await __webpack_require__.e(/* import() */ "511").then(__webpack_require__.bind(__webpack_require__, 7170));
|
|
12812
12828
|
const { digest } = await __webpack_require__.e(/* import() */ "714").then(__webpack_require__.bind(__webpack_require__, 4689));
|
|
12813
12829
|
const cloneName = source.replace(/\W+/g, "_").split("_").splice(0, 3).join("_") + "_" + digest(source).slice(0, 10).replace(/[-_]/g, "");
|
|
12814
12830
|
let cloneDir;
|
|
12815
|
-
const localNodeModules = (
|
|
12816
|
-
const parentDir = (
|
|
12817
|
-
if ((
|
|
12818
|
-
else if ((0,external_node_fs_.existsSync)(localNodeModules)) cloneDir = (
|
|
12819
|
-
else cloneDir = process.env.XDG_CACHE_HOME ? (
|
|
12831
|
+
const localNodeModules = pathe_M_eThtNZ_resolve(options.cwd, "node_modules");
|
|
12832
|
+
const parentDir = pathe_M_eThtNZ_dirname(options.cwd);
|
|
12833
|
+
if (pathe_M_eThtNZ_basename(parentDir) === ".c12") cloneDir = pathe_M_eThtNZ_join(parentDir, cloneName);
|
|
12834
|
+
else if ((0,external_node_fs_.existsSync)(localNodeModules)) cloneDir = pathe_M_eThtNZ_join(localNodeModules, ".c12", cloneName);
|
|
12835
|
+
else cloneDir = process.env.XDG_CACHE_HOME ? pathe_M_eThtNZ_resolve(process.env.XDG_CACHE_HOME, "c12", cloneName) : pathe_M_eThtNZ_resolve((0,external_node_os_.homedir)(), ".cache/c12", cloneName);
|
|
12820
12836
|
if ((0,external_node_fs_.existsSync)(cloneDir) && !sourceOptions.install) await (0,promises_.rm)(cloneDir, { recursive: true });
|
|
12821
12837
|
source = (await downloadTemplate(source, {
|
|
12822
12838
|
dir: cloneDir,
|
|
@@ -12828,9 +12844,9 @@ async function resolveConfig(source, options, sourceOptions = {}) {
|
|
|
12828
12844
|
})).dir;
|
|
12829
12845
|
}
|
|
12830
12846
|
if (NPM_PACKAGE_RE.test(source)) source = tryResolve(source, options) || source;
|
|
12831
|
-
const ext = (
|
|
12832
|
-
const isDir = !ext || ext === (
|
|
12833
|
-
const cwd = (
|
|
12847
|
+
const ext = pathe_M_eThtNZ_extname(source);
|
|
12848
|
+
const isDir = !ext || ext === pathe_M_eThtNZ_basename(source);
|
|
12849
|
+
const cwd = pathe_M_eThtNZ_resolve(options.cwd, isDir ? source : pathe_M_eThtNZ_dirname(source));
|
|
12834
12850
|
if (isDir) source = options.configFile;
|
|
12835
12851
|
const res = {
|
|
12836
12852
|
config: void 0,
|
|
@@ -12839,10 +12855,10 @@ async function resolveConfig(source, options, sourceOptions = {}) {
|
|
|
12839
12855
|
source,
|
|
12840
12856
|
sourceOptions
|
|
12841
12857
|
};
|
|
12842
|
-
res.configFile = tryResolve((
|
|
12858
|
+
res.configFile = tryResolve(pathe_M_eThtNZ_resolve(cwd, source), options) || tryResolve(pathe_M_eThtNZ_resolve(cwd, ".config", source.replace(/\.config$/, "")), options) || tryResolve(pathe_M_eThtNZ_resolve(cwd, ".config", source), options) || source;
|
|
12843
12859
|
if (!(0,external_node_fs_.existsSync)(res.configFile)) return res;
|
|
12844
12860
|
res._configFile = res.configFile;
|
|
12845
|
-
const configFileExt = (
|
|
12861
|
+
const configFileExt = pathe_M_eThtNZ_extname(res.configFile) || "";
|
|
12846
12862
|
if (configFileExt in ASYNC_LOADERS) res.config = (await ASYNC_LOADERS[configFileExt]())(await (0,promises_.readFile)(res.configFile, "utf8"));
|
|
12847
12863
|
else res.config = await options.jiti.import(res.configFile, { default: true });
|
|
12848
12864
|
if (typeof res.config === "function") res.config = await res.config(options.context);
|
|
@@ -12853,7 +12869,7 @@ async function resolveConfig(source, options, sourceOptions = {}) {
|
|
|
12853
12869
|
};
|
|
12854
12870
|
if (Object.keys(envConfig).length > 0) res.config = _merger(envConfig, res.config);
|
|
12855
12871
|
}
|
|
12856
|
-
res.meta = (
|
|
12872
|
+
res.meta = defu_defu(res.sourceOptions.meta, res.config.$meta);
|
|
12857
12873
|
delete res.config.$meta;
|
|
12858
12874
|
if (res.sourceOptions.overrides) res.config = _merger(res.sourceOptions.overrides, res.config);
|
|
12859
12875
|
res.configFile = _normalize(res.configFile);
|
|
@@ -12863,20 +12879,18 @@ async function resolveConfig(source, options, sourceOptions = {}) {
|
|
|
12863
12879
|
function tryResolve(id, options) {
|
|
12864
12880
|
const res = resolveModulePath(id, {
|
|
12865
12881
|
try: true,
|
|
12866
|
-
from: (0,external_node_url_.pathToFileURL)((
|
|
12882
|
+
from: (0,external_node_url_.pathToFileURL)(pathe_M_eThtNZ_join(options.cwd || ".", options.configFile || "/")),
|
|
12867
12883
|
suffixes: ["", "/index"],
|
|
12868
12884
|
extensions: SUPPORTED_EXTENSIONS,
|
|
12869
12885
|
cache: false
|
|
12870
12886
|
});
|
|
12871
|
-
return res ? (
|
|
12887
|
+
return res ? normalize(res) : void 0;
|
|
12872
12888
|
}
|
|
12873
|
-
|
|
12874
12889
|
//#endregion
|
|
12875
12890
|
//#region src/types.ts
|
|
12876
12891
|
function createDefineConfig() {
|
|
12877
12892
|
return (input) => input;
|
|
12878
12893
|
}
|
|
12879
|
-
|
|
12880
12894
|
//#endregion
|
|
12881
12895
|
//#region src/watch.ts
|
|
12882
12896
|
const eventMap = (/* unused pure expression or super */ null && ({
|
|
@@ -12941,9 +12955,9 @@ async function watchConfig(options) {
|
|
|
12941
12955
|
return config[prop];
|
|
12942
12956
|
} });
|
|
12943
12957
|
}
|
|
12944
|
-
|
|
12945
12958
|
//#endregion
|
|
12946
12959
|
|
|
12960
|
+
|
|
12947
12961
|
;// CONCATENATED MODULE: ../../node_modules/zod/v4/core/core.js
|
|
12948
12962
|
/** A special constant with type `never` */
|
|
12949
12963
|
const NEVER = Object.freeze({
|
|
@@ -13186,7 +13200,7 @@ const util_allowsEval = util_cached(() => {
|
|
|
13186
13200
|
return false;
|
|
13187
13201
|
}
|
|
13188
13202
|
});
|
|
13189
|
-
function
|
|
13203
|
+
function util_isPlainObject(o) {
|
|
13190
13204
|
if (util_isObject(o) === false)
|
|
13191
13205
|
return false;
|
|
13192
13206
|
// modified constructor
|
|
@@ -13206,7 +13220,7 @@ function isPlainObject(o) {
|
|
|
13206
13220
|
return true;
|
|
13207
13221
|
}
|
|
13208
13222
|
function shallowClone(o) {
|
|
13209
|
-
if (
|
|
13223
|
+
if (util_isPlainObject(o))
|
|
13210
13224
|
return { ...o };
|
|
13211
13225
|
if (Array.isArray(o))
|
|
13212
13226
|
return [...o];
|
|
@@ -13401,7 +13415,7 @@ function omit(schema, mask) {
|
|
|
13401
13415
|
return clone(schema, def);
|
|
13402
13416
|
}
|
|
13403
13417
|
function extend(schema, shape) {
|
|
13404
|
-
if (!
|
|
13418
|
+
if (!util_isPlainObject(shape)) {
|
|
13405
13419
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
13406
13420
|
}
|
|
13407
13421
|
const checks = schema._zod.def.checks;
|
|
@@ -13426,7 +13440,7 @@ function extend(schema, shape) {
|
|
|
13426
13440
|
return clone(schema, def);
|
|
13427
13441
|
}
|
|
13428
13442
|
function safeExtend(schema, shape) {
|
|
13429
|
-
if (!
|
|
13443
|
+
if (!util_isPlainObject(shape)) {
|
|
13430
13444
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
13431
13445
|
}
|
|
13432
13446
|
const def = mergeDefs(schema._zod.def, {
|
|
@@ -13497,7 +13511,7 @@ function partial(Class, schema, mask) {
|
|
|
13497
13511
|
});
|
|
13498
13512
|
return clone(schema, def);
|
|
13499
13513
|
}
|
|
13500
|
-
function
|
|
13514
|
+
function util_required(Class, schema, mask) {
|
|
13501
13515
|
const def = mergeDefs(schema._zod.def, {
|
|
13502
13516
|
get shape() {
|
|
13503
13517
|
const oldShape = schema._zod.def.shape;
|
|
@@ -15858,7 +15872,7 @@ function mergeValues(a, b) {
|
|
|
15858
15872
|
if (a instanceof Date && b instanceof Date && +a === +b) {
|
|
15859
15873
|
return { valid: true, data: a };
|
|
15860
15874
|
}
|
|
15861
|
-
if (
|
|
15875
|
+
if (util_isPlainObject(a) && util_isPlainObject(b)) {
|
|
15862
15876
|
const bKeys = Object.keys(b);
|
|
15863
15877
|
const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
|
|
15864
15878
|
const newObj = { ...a, ...b };
|
|
@@ -16019,7 +16033,7 @@ const $ZodRecord = /*@__PURE__*/ $constructor("$ZodRecord", (inst, def) => {
|
|
|
16019
16033
|
$ZodType.init(inst, def);
|
|
16020
16034
|
inst._zod.parse = (payload, ctx) => {
|
|
16021
16035
|
const input = payload.value;
|
|
16022
|
-
if (!
|
|
16036
|
+
if (!util_isPlainObject(input)) {
|
|
16023
16037
|
payload.issues.push({
|
|
16024
16038
|
expected: "record",
|
|
16025
16039
|
code: "invalid_type",
|
|
@@ -16907,7 +16921,7 @@ const ar_error = () => {
|
|
|
16907
16921
|
}
|
|
16908
16922
|
};
|
|
16909
16923
|
};
|
|
16910
|
-
/* export default */ function
|
|
16924
|
+
/* export default */ function locales_ar() {
|
|
16911
16925
|
return {
|
|
16912
16926
|
localeError: ar_error(),
|
|
16913
16927
|
};
|
|
@@ -18439,7 +18453,7 @@ const fr_error = () => {
|
|
|
18439
18453
|
}
|
|
18440
18454
|
};
|
|
18441
18455
|
};
|
|
18442
|
-
/* export default */ function
|
|
18456
|
+
/* export default */ function locales_fr() {
|
|
18443
18457
|
return {
|
|
18444
18458
|
localeError: fr_error(),
|
|
18445
18459
|
};
|
|
@@ -21614,7 +21628,7 @@ const tr_error = () => {
|
|
|
21614
21628
|
}
|
|
21615
21629
|
};
|
|
21616
21630
|
};
|
|
21617
|
-
/* export default */ function
|
|
21631
|
+
/* export default */ function locales_tr() {
|
|
21618
21632
|
return {
|
|
21619
21633
|
localeError: tr_error(),
|
|
21620
21634
|
};
|
|
@@ -21843,7 +21857,7 @@ const ur_error = () => {
|
|
|
21843
21857
|
}
|
|
21844
21858
|
};
|
|
21845
21859
|
};
|
|
21846
|
-
/* export default */ function
|
|
21860
|
+
/* export default */ function locales_ur() {
|
|
21847
21861
|
return {
|
|
21848
21862
|
localeError: ur_error(),
|
|
21849
21863
|
};
|
|
@@ -25419,7 +25433,7 @@ const ZodObject = /*@__PURE__*/ $constructor("ZodObject", (inst, def) => {
|
|
|
25419
25433
|
inst.pick = (mask) => pick(inst, mask);
|
|
25420
25434
|
inst.omit = (mask) => omit(inst, mask);
|
|
25421
25435
|
inst.partial = (...args) => partial(ZodOptional, inst, args[0]);
|
|
25422
|
-
inst.required = (...args) =>
|
|
25436
|
+
inst.required = (...args) => util_required(ZodNonOptional, inst, args[0]);
|
|
25423
25437
|
});
|
|
25424
25438
|
function schemas_object(shape, params) {
|
|
25425
25439
|
const def = {
|
|
@@ -26044,7 +26058,7 @@ var compat_ZodFirstPartyTypeKind;
|
|
|
26044
26058
|
|
|
26045
26059
|
|
|
26046
26060
|
// Local z object to avoid circular dependency with ../index.js
|
|
26047
|
-
const
|
|
26061
|
+
const from_json_schema_z = {
|
|
26048
26062
|
...classic_schemas_namespaceObject,
|
|
26049
26063
|
...classic_checks_namespaceObject,
|
|
26050
26064
|
iso: iso_namespaceObject,
|
|
@@ -26159,7 +26173,7 @@ function convertBaseSchema(schema, ctx) {
|
|
|
26159
26173
|
if (schema.not !== undefined) {
|
|
26160
26174
|
// Special case: { not: {} } represents never
|
|
26161
26175
|
if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) {
|
|
26162
|
-
return
|
|
26176
|
+
return from_json_schema_z.never();
|
|
26163
26177
|
}
|
|
26164
26178
|
throw new Error("not is not supported in Zod (except { not: {} } for never)");
|
|
26165
26179
|
}
|
|
@@ -26183,7 +26197,7 @@ function convertBaseSchema(schema, ctx) {
|
|
|
26183
26197
|
}
|
|
26184
26198
|
if (ctx.processing.has(refPath)) {
|
|
26185
26199
|
// Circular reference - use lazy
|
|
26186
|
-
return
|
|
26200
|
+
return from_json_schema_z.lazy(() => {
|
|
26187
26201
|
if (!ctx.refs.has(refPath)) {
|
|
26188
26202
|
throw new Error(`Circular reference not resolved: ${refPath}`);
|
|
26189
26203
|
}
|
|
@@ -26205,28 +26219,28 @@ function convertBaseSchema(schema, ctx) {
|
|
|
26205
26219
|
schema.nullable === true &&
|
|
26206
26220
|
enumValues.length === 1 &&
|
|
26207
26221
|
enumValues[0] === null) {
|
|
26208
|
-
return
|
|
26222
|
+
return from_json_schema_z.null();
|
|
26209
26223
|
}
|
|
26210
26224
|
if (enumValues.length === 0) {
|
|
26211
|
-
return
|
|
26225
|
+
return from_json_schema_z.never();
|
|
26212
26226
|
}
|
|
26213
26227
|
if (enumValues.length === 1) {
|
|
26214
|
-
return
|
|
26228
|
+
return from_json_schema_z.literal(enumValues[0]);
|
|
26215
26229
|
}
|
|
26216
26230
|
// Check if all values are strings
|
|
26217
26231
|
if (enumValues.every((v) => typeof v === "string")) {
|
|
26218
|
-
return
|
|
26232
|
+
return from_json_schema_z.enum(enumValues);
|
|
26219
26233
|
}
|
|
26220
26234
|
// Mixed types - use union of literals
|
|
26221
|
-
const literalSchemas = enumValues.map((v) =>
|
|
26235
|
+
const literalSchemas = enumValues.map((v) => from_json_schema_z.literal(v));
|
|
26222
26236
|
if (literalSchemas.length < 2) {
|
|
26223
26237
|
return literalSchemas[0];
|
|
26224
26238
|
}
|
|
26225
|
-
return
|
|
26239
|
+
return from_json_schema_z.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
|
|
26226
26240
|
}
|
|
26227
26241
|
// Handle const
|
|
26228
26242
|
if (schema.const !== undefined) {
|
|
26229
|
-
return
|
|
26243
|
+
return from_json_schema_z.literal(schema.const);
|
|
26230
26244
|
}
|
|
26231
26245
|
// Handle type
|
|
26232
26246
|
const type = schema.type;
|
|
@@ -26237,93 +26251,93 @@ function convertBaseSchema(schema, ctx) {
|
|
|
26237
26251
|
return convertBaseSchema(typeSchema, ctx);
|
|
26238
26252
|
});
|
|
26239
26253
|
if (typeSchemas.length === 0) {
|
|
26240
|
-
return
|
|
26254
|
+
return from_json_schema_z.never();
|
|
26241
26255
|
}
|
|
26242
26256
|
if (typeSchemas.length === 1) {
|
|
26243
26257
|
return typeSchemas[0];
|
|
26244
26258
|
}
|
|
26245
|
-
return
|
|
26259
|
+
return from_json_schema_z.union(typeSchemas);
|
|
26246
26260
|
}
|
|
26247
26261
|
if (!type) {
|
|
26248
26262
|
// No type specified - empty schema (any)
|
|
26249
|
-
return
|
|
26263
|
+
return from_json_schema_z.any();
|
|
26250
26264
|
}
|
|
26251
26265
|
let zodSchema;
|
|
26252
26266
|
switch (type) {
|
|
26253
26267
|
case "string": {
|
|
26254
|
-
let stringSchema =
|
|
26268
|
+
let stringSchema = from_json_schema_z.string();
|
|
26255
26269
|
// Apply format using .check() with Zod format functions
|
|
26256
26270
|
if (schema.format) {
|
|
26257
26271
|
const format = schema.format;
|
|
26258
26272
|
// Map common formats to Zod check functions
|
|
26259
26273
|
if (format === "email") {
|
|
26260
|
-
stringSchema = stringSchema.check(
|
|
26274
|
+
stringSchema = stringSchema.check(from_json_schema_z.email());
|
|
26261
26275
|
}
|
|
26262
26276
|
else if (format === "uri" || format === "uri-reference") {
|
|
26263
|
-
stringSchema = stringSchema.check(
|
|
26277
|
+
stringSchema = stringSchema.check(from_json_schema_z.url());
|
|
26264
26278
|
}
|
|
26265
26279
|
else if (format === "uuid" || format === "guid") {
|
|
26266
|
-
stringSchema = stringSchema.check(
|
|
26280
|
+
stringSchema = stringSchema.check(from_json_schema_z.uuid());
|
|
26267
26281
|
}
|
|
26268
26282
|
else if (format === "date-time") {
|
|
26269
|
-
stringSchema = stringSchema.check(
|
|
26283
|
+
stringSchema = stringSchema.check(from_json_schema_z.iso.datetime());
|
|
26270
26284
|
}
|
|
26271
26285
|
else if (format === "date") {
|
|
26272
|
-
stringSchema = stringSchema.check(
|
|
26286
|
+
stringSchema = stringSchema.check(from_json_schema_z.iso.date());
|
|
26273
26287
|
}
|
|
26274
26288
|
else if (format === "time") {
|
|
26275
|
-
stringSchema = stringSchema.check(
|
|
26289
|
+
stringSchema = stringSchema.check(from_json_schema_z.iso.time());
|
|
26276
26290
|
}
|
|
26277
26291
|
else if (format === "duration") {
|
|
26278
|
-
stringSchema = stringSchema.check(
|
|
26292
|
+
stringSchema = stringSchema.check(from_json_schema_z.iso.duration());
|
|
26279
26293
|
}
|
|
26280
26294
|
else if (format === "ipv4") {
|
|
26281
|
-
stringSchema = stringSchema.check(
|
|
26295
|
+
stringSchema = stringSchema.check(from_json_schema_z.ipv4());
|
|
26282
26296
|
}
|
|
26283
26297
|
else if (format === "ipv6") {
|
|
26284
|
-
stringSchema = stringSchema.check(
|
|
26298
|
+
stringSchema = stringSchema.check(from_json_schema_z.ipv6());
|
|
26285
26299
|
}
|
|
26286
26300
|
else if (format === "mac") {
|
|
26287
|
-
stringSchema = stringSchema.check(
|
|
26301
|
+
stringSchema = stringSchema.check(from_json_schema_z.mac());
|
|
26288
26302
|
}
|
|
26289
26303
|
else if (format === "cidr") {
|
|
26290
|
-
stringSchema = stringSchema.check(
|
|
26304
|
+
stringSchema = stringSchema.check(from_json_schema_z.cidrv4());
|
|
26291
26305
|
}
|
|
26292
26306
|
else if (format === "cidr-v6") {
|
|
26293
|
-
stringSchema = stringSchema.check(
|
|
26307
|
+
stringSchema = stringSchema.check(from_json_schema_z.cidrv6());
|
|
26294
26308
|
}
|
|
26295
26309
|
else if (format === "base64") {
|
|
26296
|
-
stringSchema = stringSchema.check(
|
|
26310
|
+
stringSchema = stringSchema.check(from_json_schema_z.base64());
|
|
26297
26311
|
}
|
|
26298
26312
|
else if (format === "base64url") {
|
|
26299
|
-
stringSchema = stringSchema.check(
|
|
26313
|
+
stringSchema = stringSchema.check(from_json_schema_z.base64url());
|
|
26300
26314
|
}
|
|
26301
26315
|
else if (format === "e164") {
|
|
26302
|
-
stringSchema = stringSchema.check(
|
|
26316
|
+
stringSchema = stringSchema.check(from_json_schema_z.e164());
|
|
26303
26317
|
}
|
|
26304
26318
|
else if (format === "jwt") {
|
|
26305
|
-
stringSchema = stringSchema.check(
|
|
26319
|
+
stringSchema = stringSchema.check(from_json_schema_z.jwt());
|
|
26306
26320
|
}
|
|
26307
26321
|
else if (format === "emoji") {
|
|
26308
|
-
stringSchema = stringSchema.check(
|
|
26322
|
+
stringSchema = stringSchema.check(from_json_schema_z.emoji());
|
|
26309
26323
|
}
|
|
26310
26324
|
else if (format === "nanoid") {
|
|
26311
|
-
stringSchema = stringSchema.check(
|
|
26325
|
+
stringSchema = stringSchema.check(from_json_schema_z.nanoid());
|
|
26312
26326
|
}
|
|
26313
26327
|
else if (format === "cuid") {
|
|
26314
|
-
stringSchema = stringSchema.check(
|
|
26328
|
+
stringSchema = stringSchema.check(from_json_schema_z.cuid());
|
|
26315
26329
|
}
|
|
26316
26330
|
else if (format === "cuid2") {
|
|
26317
|
-
stringSchema = stringSchema.check(
|
|
26331
|
+
stringSchema = stringSchema.check(from_json_schema_z.cuid2());
|
|
26318
26332
|
}
|
|
26319
26333
|
else if (format === "ulid") {
|
|
26320
|
-
stringSchema = stringSchema.check(
|
|
26334
|
+
stringSchema = stringSchema.check(from_json_schema_z.ulid());
|
|
26321
26335
|
}
|
|
26322
26336
|
else if (format === "xid") {
|
|
26323
|
-
stringSchema = stringSchema.check(
|
|
26337
|
+
stringSchema = stringSchema.check(from_json_schema_z.xid());
|
|
26324
26338
|
}
|
|
26325
26339
|
else if (format === "ksuid") {
|
|
26326
|
-
stringSchema = stringSchema.check(
|
|
26340
|
+
stringSchema = stringSchema.check(from_json_schema_z.ksuid());
|
|
26327
26341
|
}
|
|
26328
26342
|
// Note: json-string format is not currently supported by Zod
|
|
26329
26343
|
// Custom formats are ignored - keep as plain string
|
|
@@ -26344,7 +26358,7 @@ function convertBaseSchema(schema, ctx) {
|
|
|
26344
26358
|
}
|
|
26345
26359
|
case "number":
|
|
26346
26360
|
case "integer": {
|
|
26347
|
-
let numberSchema = type === "integer" ?
|
|
26361
|
+
let numberSchema = type === "integer" ? from_json_schema_z.number().int() : from_json_schema_z.number();
|
|
26348
26362
|
// Apply constraints
|
|
26349
26363
|
if (typeof schema.minimum === "number") {
|
|
26350
26364
|
numberSchema = numberSchema.min(schema.minimum);
|
|
@@ -26371,11 +26385,11 @@ function convertBaseSchema(schema, ctx) {
|
|
|
26371
26385
|
break;
|
|
26372
26386
|
}
|
|
26373
26387
|
case "boolean": {
|
|
26374
|
-
zodSchema =
|
|
26388
|
+
zodSchema = from_json_schema_z.boolean();
|
|
26375
26389
|
break;
|
|
26376
26390
|
}
|
|
26377
26391
|
case "null": {
|
|
26378
|
-
zodSchema =
|
|
26392
|
+
zodSchema = from_json_schema_z.null();
|
|
26379
26393
|
break;
|
|
26380
26394
|
}
|
|
26381
26395
|
case "object": {
|
|
@@ -26393,16 +26407,16 @@ function convertBaseSchema(schema, ctx) {
|
|
|
26393
26407
|
const keySchema = convertSchema(schema.propertyNames, ctx);
|
|
26394
26408
|
const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object"
|
|
26395
26409
|
? convertSchema(schema.additionalProperties, ctx)
|
|
26396
|
-
:
|
|
26410
|
+
: from_json_schema_z.any();
|
|
26397
26411
|
// Case A: No properties (pure record)
|
|
26398
26412
|
if (Object.keys(shape).length === 0) {
|
|
26399
|
-
zodSchema =
|
|
26413
|
+
zodSchema = from_json_schema_z.record(keySchema, valueSchema);
|
|
26400
26414
|
break;
|
|
26401
26415
|
}
|
|
26402
26416
|
// Case B: With properties (intersection of object and looseRecord)
|
|
26403
|
-
const objectSchema =
|
|
26404
|
-
const recordSchema =
|
|
26405
|
-
zodSchema =
|
|
26417
|
+
const objectSchema = from_json_schema_z.object(shape).passthrough();
|
|
26418
|
+
const recordSchema = from_json_schema_z.looseRecord(keySchema, valueSchema);
|
|
26419
|
+
zodSchema = from_json_schema_z.intersection(objectSchema, recordSchema);
|
|
26406
26420
|
break;
|
|
26407
26421
|
}
|
|
26408
26422
|
// Handle patternProperties
|
|
@@ -26414,27 +26428,27 @@ function convertBaseSchema(schema, ctx) {
|
|
|
26414
26428
|
const looseRecords = [];
|
|
26415
26429
|
for (const pattern of patternKeys) {
|
|
26416
26430
|
const patternValue = convertSchema(patternProps[pattern], ctx);
|
|
26417
|
-
const keySchema =
|
|
26418
|
-
looseRecords.push(
|
|
26431
|
+
const keySchema = from_json_schema_z.string().regex(new RegExp(pattern));
|
|
26432
|
+
looseRecords.push(from_json_schema_z.looseRecord(keySchema, patternValue));
|
|
26419
26433
|
}
|
|
26420
26434
|
// Build intersection: object schema + all pattern property records
|
|
26421
26435
|
const schemasToIntersect = [];
|
|
26422
26436
|
if (Object.keys(shape).length > 0) {
|
|
26423
26437
|
// Use passthrough so patternProperties can validate additional keys
|
|
26424
|
-
schemasToIntersect.push(
|
|
26438
|
+
schemasToIntersect.push(from_json_schema_z.object(shape).passthrough());
|
|
26425
26439
|
}
|
|
26426
26440
|
schemasToIntersect.push(...looseRecords);
|
|
26427
26441
|
if (schemasToIntersect.length === 0) {
|
|
26428
|
-
zodSchema =
|
|
26442
|
+
zodSchema = from_json_schema_z.object({}).passthrough();
|
|
26429
26443
|
}
|
|
26430
26444
|
else if (schemasToIntersect.length === 1) {
|
|
26431
26445
|
zodSchema = schemasToIntersect[0];
|
|
26432
26446
|
}
|
|
26433
26447
|
else {
|
|
26434
26448
|
// Chain intersections: (A & B) & C & D ...
|
|
26435
|
-
let result =
|
|
26449
|
+
let result = from_json_schema_z.intersection(schemasToIntersect[0], schemasToIntersect[1]);
|
|
26436
26450
|
for (let i = 2; i < schemasToIntersect.length; i++) {
|
|
26437
|
-
result =
|
|
26451
|
+
result = from_json_schema_z.intersection(result, schemasToIntersect[i]);
|
|
26438
26452
|
}
|
|
26439
26453
|
zodSchema = result;
|
|
26440
26454
|
}
|
|
@@ -26443,7 +26457,7 @@ function convertBaseSchema(schema, ctx) {
|
|
|
26443
26457
|
// Handle additionalProperties
|
|
26444
26458
|
// In JSON Schema, additionalProperties defaults to true (allow any extra properties)
|
|
26445
26459
|
// In Zod, objects strip unknown keys by default, so we need to handle this explicitly
|
|
26446
|
-
const objectSchema =
|
|
26460
|
+
const objectSchema = from_json_schema_z.object(shape);
|
|
26447
26461
|
if (schema.additionalProperties === false) {
|
|
26448
26462
|
// Strict mode - no extra properties allowed
|
|
26449
26463
|
zodSchema = objectSchema.strict();
|
|
@@ -26471,17 +26485,17 @@ function convertBaseSchema(schema, ctx) {
|
|
|
26471
26485
|
? convertSchema(items, ctx)
|
|
26472
26486
|
: undefined;
|
|
26473
26487
|
if (rest) {
|
|
26474
|
-
zodSchema =
|
|
26488
|
+
zodSchema = from_json_schema_z.tuple(tupleItems).rest(rest);
|
|
26475
26489
|
}
|
|
26476
26490
|
else {
|
|
26477
|
-
zodSchema =
|
|
26491
|
+
zodSchema = from_json_schema_z.tuple(tupleItems);
|
|
26478
26492
|
}
|
|
26479
26493
|
// Apply minItems/maxItems constraints to tuples
|
|
26480
26494
|
if (typeof schema.minItems === "number") {
|
|
26481
|
-
zodSchema = zodSchema.check(
|
|
26495
|
+
zodSchema = zodSchema.check(from_json_schema_z.minLength(schema.minItems));
|
|
26482
26496
|
}
|
|
26483
26497
|
if (typeof schema.maxItems === "number") {
|
|
26484
|
-
zodSchema = zodSchema.check(
|
|
26498
|
+
zodSchema = zodSchema.check(from_json_schema_z.maxLength(schema.maxItems));
|
|
26485
26499
|
}
|
|
26486
26500
|
}
|
|
26487
26501
|
else if (Array.isArray(items)) {
|
|
@@ -26491,23 +26505,23 @@ function convertBaseSchema(schema, ctx) {
|
|
|
26491
26505
|
? convertSchema(schema.additionalItems, ctx)
|
|
26492
26506
|
: undefined; // additionalItems: false means no rest, handled by default tuple behavior
|
|
26493
26507
|
if (rest) {
|
|
26494
|
-
zodSchema =
|
|
26508
|
+
zodSchema = from_json_schema_z.tuple(tupleItems).rest(rest);
|
|
26495
26509
|
}
|
|
26496
26510
|
else {
|
|
26497
|
-
zodSchema =
|
|
26511
|
+
zodSchema = from_json_schema_z.tuple(tupleItems);
|
|
26498
26512
|
}
|
|
26499
26513
|
// Apply minItems/maxItems constraints to tuples
|
|
26500
26514
|
if (typeof schema.minItems === "number") {
|
|
26501
|
-
zodSchema = zodSchema.check(
|
|
26515
|
+
zodSchema = zodSchema.check(from_json_schema_z.minLength(schema.minItems));
|
|
26502
26516
|
}
|
|
26503
26517
|
if (typeof schema.maxItems === "number") {
|
|
26504
|
-
zodSchema = zodSchema.check(
|
|
26518
|
+
zodSchema = zodSchema.check(from_json_schema_z.maxLength(schema.maxItems));
|
|
26505
26519
|
}
|
|
26506
26520
|
}
|
|
26507
26521
|
else if (items !== undefined) {
|
|
26508
26522
|
// Regular array
|
|
26509
26523
|
const element = convertSchema(items, ctx);
|
|
26510
|
-
let arraySchema =
|
|
26524
|
+
let arraySchema = from_json_schema_z.array(element);
|
|
26511
26525
|
// Apply constraints
|
|
26512
26526
|
if (typeof schema.minItems === "number") {
|
|
26513
26527
|
arraySchema = arraySchema.min(schema.minItems);
|
|
@@ -26519,7 +26533,7 @@ function convertBaseSchema(schema, ctx) {
|
|
|
26519
26533
|
}
|
|
26520
26534
|
else {
|
|
26521
26535
|
// No items specified - array of any
|
|
26522
|
-
zodSchema =
|
|
26536
|
+
zodSchema = from_json_schema_z.array(from_json_schema_z.any());
|
|
26523
26537
|
}
|
|
26524
26538
|
break;
|
|
26525
26539
|
}
|
|
@@ -26537,7 +26551,7 @@ function convertBaseSchema(schema, ctx) {
|
|
|
26537
26551
|
}
|
|
26538
26552
|
function convertSchema(schema, ctx) {
|
|
26539
26553
|
if (typeof schema === "boolean") {
|
|
26540
|
-
return schema ?
|
|
26554
|
+
return schema ? from_json_schema_z.any() : from_json_schema_z.never();
|
|
26541
26555
|
}
|
|
26542
26556
|
// Convert base schema first (ignoring composition keywords)
|
|
26543
26557
|
let baseSchema = convertBaseSchema(schema, ctx);
|
|
@@ -26546,36 +26560,36 @@ function convertSchema(schema, ctx) {
|
|
|
26546
26560
|
// Handle anyOf - wrap base schema with union
|
|
26547
26561
|
if (schema.anyOf && Array.isArray(schema.anyOf)) {
|
|
26548
26562
|
const options = schema.anyOf.map((s) => convertSchema(s, ctx));
|
|
26549
|
-
const anyOfUnion =
|
|
26550
|
-
baseSchema = hasExplicitType ?
|
|
26563
|
+
const anyOfUnion = from_json_schema_z.union(options);
|
|
26564
|
+
baseSchema = hasExplicitType ? from_json_schema_z.intersection(baseSchema, anyOfUnion) : anyOfUnion;
|
|
26551
26565
|
}
|
|
26552
26566
|
// Handle oneOf - exclusive union (exactly one must match)
|
|
26553
26567
|
if (schema.oneOf && Array.isArray(schema.oneOf)) {
|
|
26554
26568
|
const options = schema.oneOf.map((s) => convertSchema(s, ctx));
|
|
26555
|
-
const oneOfUnion =
|
|
26556
|
-
baseSchema = hasExplicitType ?
|
|
26569
|
+
const oneOfUnion = from_json_schema_z.xor(options);
|
|
26570
|
+
baseSchema = hasExplicitType ? from_json_schema_z.intersection(baseSchema, oneOfUnion) : oneOfUnion;
|
|
26557
26571
|
}
|
|
26558
26572
|
// Handle allOf - wrap base schema with intersection
|
|
26559
26573
|
if (schema.allOf && Array.isArray(schema.allOf)) {
|
|
26560
26574
|
if (schema.allOf.length === 0) {
|
|
26561
|
-
baseSchema = hasExplicitType ? baseSchema :
|
|
26575
|
+
baseSchema = hasExplicitType ? baseSchema : from_json_schema_z.any();
|
|
26562
26576
|
}
|
|
26563
26577
|
else {
|
|
26564
26578
|
let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);
|
|
26565
26579
|
const startIdx = hasExplicitType ? 0 : 1;
|
|
26566
26580
|
for (let i = startIdx; i < schema.allOf.length; i++) {
|
|
26567
|
-
result =
|
|
26581
|
+
result = from_json_schema_z.intersection(result, convertSchema(schema.allOf[i], ctx));
|
|
26568
26582
|
}
|
|
26569
26583
|
baseSchema = result;
|
|
26570
26584
|
}
|
|
26571
26585
|
}
|
|
26572
26586
|
// Handle nullable (OpenAPI 3.0)
|
|
26573
26587
|
if (schema.nullable === true && ctx.version === "openapi-3.0") {
|
|
26574
|
-
baseSchema =
|
|
26588
|
+
baseSchema = from_json_schema_z.nullable(baseSchema);
|
|
26575
26589
|
}
|
|
26576
26590
|
// Handle readOnly
|
|
26577
26591
|
if (schema.readOnly === true) {
|
|
26578
|
-
baseSchema =
|
|
26592
|
+
baseSchema = from_json_schema_z.readonly(baseSchema);
|
|
26579
26593
|
}
|
|
26580
26594
|
// Collect metadata: core schema keywords and unrecognized keys
|
|
26581
26595
|
const extraMeta = {};
|
|
@@ -26609,7 +26623,7 @@ function convertSchema(schema, ctx) {
|
|
|
26609
26623
|
function fromJSONSchema(schema, params) {
|
|
26610
26624
|
// Handle boolean schemas
|
|
26611
26625
|
if (typeof schema === "boolean") {
|
|
26612
|
-
return schema ?
|
|
26626
|
+
return schema ? from_json_schema_z.any() : from_json_schema_z.never();
|
|
26613
26627
|
}
|
|
26614
26628
|
const version = detectVersion(schema, params?.defaultTarget);
|
|
26615
26629
|
const defs = (schema.$defs || schema.definitions || {});
|
|
@@ -28261,8 +28275,8 @@ function withCustomRequest(customRequest) {
|
|
|
28261
28275
|
;// CONCATENATED MODULE: ../../node_modules/@octokit/auth-token/dist-bundle/index.js
|
|
28262
28276
|
// pkg/dist-src/is-jwt.js
|
|
28263
28277
|
var b64url = "(?:[a-zA-Z0-9_-]+)";
|
|
28264
|
-
var
|
|
28265
|
-
var jwtRE = new RegExp(`^${b64url}${
|
|
28278
|
+
var dist_bundle_sep = "\\.";
|
|
28279
|
+
var jwtRE = new RegExp(`^${b64url}${dist_bundle_sep}${b64url}${dist_bundle_sep}${b64url}$`);
|
|
28266
28280
|
var isJWT = jwtRE.test.bind(jwtRE);
|
|
28267
28281
|
|
|
28268
28282
|
// pkg/dist-src/auth.js
|
|
@@ -31734,9 +31748,9 @@ function isPlainObject$1(value) {
|
|
|
31734
31748
|
return true;
|
|
31735
31749
|
}
|
|
31736
31750
|
|
|
31737
|
-
function
|
|
31751
|
+
function core_defu(baseObject, defaults, namespace = ".", merger) {
|
|
31738
31752
|
if (!isPlainObject$1(defaults)) {
|
|
31739
|
-
return
|
|
31753
|
+
return core_defu(baseObject, {}, namespace, merger);
|
|
31740
31754
|
}
|
|
31741
31755
|
const object = Object.assign({}, defaults);
|
|
31742
31756
|
for (const key in baseObject) {
|
|
@@ -31753,7 +31767,7 @@ function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
|
31753
31767
|
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
31754
31768
|
object[key] = [...value, ...object[key]];
|
|
31755
31769
|
} else if (isPlainObject$1(value) && isPlainObject$1(object[key])) {
|
|
31756
|
-
object[key] =
|
|
31770
|
+
object[key] = core_defu(
|
|
31757
31771
|
value,
|
|
31758
31772
|
object[key],
|
|
31759
31773
|
(namespace ? `${namespace}.` : "") + key.toString(),
|
|
@@ -31765,13 +31779,13 @@ function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
|
31765
31779
|
}
|
|
31766
31780
|
return object;
|
|
31767
31781
|
}
|
|
31768
|
-
function
|
|
31782
|
+
function core_createDefu(merger) {
|
|
31769
31783
|
return (...arguments_) => (
|
|
31770
31784
|
// eslint-disable-next-line unicorn/no-array-reduce
|
|
31771
|
-
arguments_.reduce((p, c) =>
|
|
31785
|
+
arguments_.reduce((p, c) => core_defu(p, c, "", merger), {})
|
|
31772
31786
|
);
|
|
31773
31787
|
}
|
|
31774
|
-
const
|
|
31788
|
+
const dist_core_defu = core_createDefu();
|
|
31775
31789
|
|
|
31776
31790
|
function core_isPlainObject(obj) {
|
|
31777
31791
|
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
@@ -31802,7 +31816,7 @@ class Consola {
|
|
|
31802
31816
|
*/
|
|
31803
31817
|
constructor(options = {}) {
|
|
31804
31818
|
const types = options.types || LogTypes;
|
|
31805
|
-
this.options =
|
|
31819
|
+
this.options = dist_core_defu(
|
|
31806
31820
|
{
|
|
31807
31821
|
...options,
|
|
31808
31822
|
defaults: { ...options.defaults },
|
|
@@ -32538,7 +32552,7 @@ function box(text, _opts = {}) {
|
|
|
32538
32552
|
|
|
32539
32553
|
|
|
32540
32554
|
|
|
32541
|
-
const dist_r=Object.create(null),dist_i=e=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?dist_r:globalThis),dist_o=new Proxy(dist_r,{get(e,s){return dist_i()[s]??dist_r[s]},has(e,s){const E=dist_i();return s in E||s in dist_r},set(e,s,E){const B=dist_i(true);return B[s]=E,true},deleteProperty(e,s){if(!s)return false;const E=dist_i(true);return delete E[s],true},ownKeys(){const e=dist_i(true);return Object.keys(e)}}),dist_t=typeof process<"u"&&process.env&&"production"||"",dist_f=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:true}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:true}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:false}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:false}],["VERCEL","VERCEL_ENV",{ci:false}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:false}],["CODESANDBOX","CODESANDBOX_HOST",{ci:false}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:true}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:true}]];function dist_b(){if(globalThis.process?.env)for(const e of dist_f){const s=e[1]||e[0];if(globalThis.process?.env[s])return {name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:false}:{name:"",ci:false}}const dist_l=dist_b();dist_l.name;function dist_n(e){return e?e!=="false":false}const
|
|
32555
|
+
const dist_r=Object.create(null),dist_i=e=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?dist_r:globalThis),dist_o=new Proxy(dist_r,{get(e,s){return dist_i()[s]??dist_r[s]},has(e,s){const E=dist_i();return s in E||s in dist_r},set(e,s,E){const B=dist_i(true);return B[s]=E,true},deleteProperty(e,s){if(!s)return false;const E=dist_i(true);return delete E[s],true},ownKeys(){const e=dist_i(true);return Object.keys(e)}}),dist_t=typeof process<"u"&&process.env&&"production"||"",dist_f=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:true}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:true}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:false}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:false}],["VERCEL","VERCEL_ENV",{ci:false}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:false}],["CODESANDBOX","CODESANDBOX_HOST",{ci:false}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:true}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:true}]];function dist_b(){if(globalThis.process?.env)for(const e of dist_f){const s=e[1]||e[0];if(globalThis.process?.env[s])return {name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:false}:{name:"",ci:false}}const dist_l=dist_b();dist_l.name;function dist_n(e){return e?e!=="false":false}const dist_I=globalThis.process?.platform||"",dist_T=dist_n(dist_o.CI)||dist_l.ci!==false,dist_a=dist_n(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY),dist_g=dist_n(dist_o.DEBUG),dist_R=dist_t==="test"||dist_n(dist_o.TEST);dist_n(dist_o.MINIMAL)||dist_T||dist_R||!dist_a;const dist_A=/^win/i.test(dist_I);!dist_n(dist_o.NO_COLOR)&&(dist_n(dist_o.FORCE_COLOR)||(dist_a||dist_A)&&dist_o.TERM!=="dumb"||dist_T);const dist_C=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(dist_C?.split(".")[0])||null;const dist_y=globalThis.process||Object.create(null),dist_={versions:{}};new Proxy(dist_y,{get(e,s){if(s==="env")return dist_o;if(s in e)return e[s];if(s in dist_)return dist_[s]}});const dist_c=globalThis.process?.release?.name==="node",dist_O=!!globalThis.Bun||!!globalThis.process?.versions?.bun,dist_D=!!globalThis.Deno,dist_L=!!globalThis.fastly,dist_S=!!globalThis.Netlify,dist_u=!!globalThis.EdgeRuntime,dist_N=globalThis.navigator?.userAgent==="Cloudflare-Workers",dist_F=[[dist_S,"netlify"],[dist_u,"edge-light"],[dist_N,"workerd"],[dist_L,"fastly"],[dist_D,"deno"],[dist_O,"bun"],[dist_c,"node"]];function dist_G(){const e=dist_F.find(s=>s[0]);if(e)return {name:e[1]}}const dist_P=dist_G();dist_P?.name||"";
|
|
32542
32556
|
|
|
32543
32557
|
function dist_ansiRegex({onlyFirst = false} = {}) {
|
|
32544
32558
|
// Valid string terminator sequences are BEL, ESC\, and 0x9c
|
|
@@ -33162,17 +33176,17 @@ function dist_createConsola(options = {}) {
|
|
|
33162
33176
|
stderr: process.stderr,
|
|
33163
33177
|
prompt: (...args) => __webpack_require__.e(/* import() */ "116").then(__webpack_require__.bind(__webpack_require__, 8711)).then((m) => m.prompt(...args)),
|
|
33164
33178
|
reporters: options.reporters || [
|
|
33165
|
-
options.fancy ?? !(
|
|
33179
|
+
options.fancy ?? !(dist_T || dist_R) ? new FancyReporter() : new BasicReporter()
|
|
33166
33180
|
],
|
|
33167
33181
|
...options
|
|
33168
33182
|
});
|
|
33169
33183
|
return consola2;
|
|
33170
33184
|
}
|
|
33171
33185
|
function _getDefaultLogLevel() {
|
|
33172
|
-
if (
|
|
33186
|
+
if (dist_g) {
|
|
33173
33187
|
return LogLevels.debug;
|
|
33174
33188
|
}
|
|
33175
|
-
if (
|
|
33189
|
+
if (dist_R) {
|
|
33176
33190
|
return LogLevels.warn;
|
|
33177
33191
|
}
|
|
33178
33192
|
return LogLevels.info;
|