create-cloudflare 2.55.1 → 2.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +708 -682
- package/package.json +7 -7
- package/templates/angular/workers/c3.ts +2 -2
- package/templates/hello-world-durable-object/js/src/index.js +1 -1
- package/templates/hello-world-durable-object/py/src/entry.py +1 -1
- package/templates/hello-world-durable-object/ts/src/index.ts +1 -1
- package/templates/hello-world-durable-object-with-assets/js/src/index.js +1 -1
- package/templates/hello-world-durable-object-with-assets/py/src/entry.py +1 -1
- package/templates/hello-world-durable-object-with-assets/ts/src/index.ts +1 -1
- package/templates/pre-existing/c3.ts +4 -4
- package/templates/react/workers/c3.ts +1 -1
- package/templates/redwood/c3.ts +33 -0
- package/templates/solid/c3.ts +1 -9
- package/templates/tanstack-start/c3.ts +1 -1
package/dist/cli.js
CHANGED
|
@@ -526,7 +526,7 @@ var require_XDGAppPaths = __commonJS({
|
|
|
526
526
|
}
|
|
527
527
|
function Adapt(adapter_) {
|
|
528
528
|
var meta = adapter_.meta, path6 = adapter_.path, xdg = adapter_.xdg;
|
|
529
|
-
var XDGAppPaths_ = /* @__PURE__ */ function() {
|
|
529
|
+
var XDGAppPaths_ = /* @__PURE__ */ (function() {
|
|
530
530
|
function XDGAppPaths_2(options_) {
|
|
531
531
|
if (options_ === void 0) {
|
|
532
532
|
options_ = {};
|
|
@@ -568,7 +568,7 @@ var require_XDGAppPaths = __commonJS({
|
|
|
568
568
|
XDGAppPaths.cache = function cache(dirOptions) {
|
|
569
569
|
return path6.join(xdg.cache(), finalPathSegment(dirOptions));
|
|
570
570
|
};
|
|
571
|
-
XDGAppPaths.config = function
|
|
571
|
+
XDGAppPaths.config = function config46(dirOptions) {
|
|
572
572
|
return path6.join(xdg.config(), finalPathSegment(dirOptions));
|
|
573
573
|
};
|
|
574
574
|
XDGAppPaths.data = function data(dirOptions) {
|
|
@@ -593,7 +593,7 @@ var require_XDGAppPaths = __commonJS({
|
|
|
593
593
|
return XDGAppPaths;
|
|
594
594
|
}
|
|
595
595
|
return XDGAppPaths_2;
|
|
596
|
-
}();
|
|
596
|
+
})();
|
|
597
597
|
return { XDGAppPaths: new XDGAppPaths_() };
|
|
598
598
|
}
|
|
599
599
|
exports2.Adapt = Adapt;
|
|
@@ -625,7 +625,7 @@ var require_XDG = __commonJS({
|
|
|
625
625
|
var cache = function() {
|
|
626
626
|
return valOrPath(env3.get("XDG_CACHE_HOME"), [baseDir(), ".cache"]);
|
|
627
627
|
};
|
|
628
|
-
var
|
|
628
|
+
var config46 = function() {
|
|
629
629
|
return valOrPath(env3.get("XDG_CONFIG_HOME"), [baseDir(), ".config"]);
|
|
630
630
|
};
|
|
631
631
|
var data = function() {
|
|
@@ -637,13 +637,13 @@ var require_XDG = __commonJS({
|
|
|
637
637
|
var state = function() {
|
|
638
638
|
return valOrPath(env3.get("XDG_STATE_HOME"), [baseDir(), ".local", "state"]);
|
|
639
639
|
};
|
|
640
|
-
return { cache, config:
|
|
640
|
+
return { cache, config: config46, data, runtime, state };
|
|
641
641
|
};
|
|
642
642
|
var macos = function() {
|
|
643
643
|
var cache = function() {
|
|
644
644
|
return valOrPath(env3.get("XDG_CACHE_HOME"), [baseDir(), "Library", "Caches"]);
|
|
645
645
|
};
|
|
646
|
-
var
|
|
646
|
+
var config46 = function() {
|
|
647
647
|
return valOrPath(env3.get("XDG_CONFIG_HOME"), [baseDir(), "Library", "Preferences"]);
|
|
648
648
|
};
|
|
649
649
|
var data = function() {
|
|
@@ -655,7 +655,7 @@ var require_XDG = __commonJS({
|
|
|
655
655
|
var state = function() {
|
|
656
656
|
return valOrPath(env3.get("XDG_STATE_HOME"), [baseDir(), "Library", "State"]);
|
|
657
657
|
};
|
|
658
|
-
return { cache, config:
|
|
658
|
+
return { cache, config: config46, data, runtime, state };
|
|
659
659
|
};
|
|
660
660
|
var windows = function() {
|
|
661
661
|
function appData() {
|
|
@@ -667,7 +667,7 @@ var require_XDG = __commonJS({
|
|
|
667
667
|
var cache = function() {
|
|
668
668
|
return valOrPath(env3.get("XDG_CACHE_HOME"), [localAppData(), "xdg.cache"]);
|
|
669
669
|
};
|
|
670
|
-
var
|
|
670
|
+
var config46 = function() {
|
|
671
671
|
return valOrPath(env3.get("XDG_CONFIG_HOME"), [appData(), "xdg.config"]);
|
|
672
672
|
};
|
|
673
673
|
var data = function() {
|
|
@@ -679,9 +679,9 @@ var require_XDG = __commonJS({
|
|
|
679
679
|
var state = function() {
|
|
680
680
|
return valOrPath(env3.get("XDG_STATE_HOME"), [localAppData(), "xdg.state"]);
|
|
681
681
|
};
|
|
682
|
-
return { cache, config:
|
|
682
|
+
return { cache, config: config46, data, runtime, state };
|
|
683
683
|
};
|
|
684
|
-
var XDG_ = /* @__PURE__ */ function() {
|
|
684
|
+
var XDG_ = /* @__PURE__ */ (function() {
|
|
685
685
|
function XDG_2() {
|
|
686
686
|
function XDG() {
|
|
687
687
|
return new XDG_2();
|
|
@@ -703,7 +703,7 @@ var require_XDG = __commonJS({
|
|
|
703
703
|
return XDG;
|
|
704
704
|
}
|
|
705
705
|
return XDG_2;
|
|
706
|
-
}();
|
|
706
|
+
})();
|
|
707
707
|
return { XDG: new XDG_() };
|
|
708
708
|
}
|
|
709
709
|
exports2.Adapt = Adapt;
|
|
@@ -801,7 +801,7 @@ var require_OSPaths = __commonJS({
|
|
|
801
801
|
}
|
|
802
802
|
return isWinOS ? windows() : posix();
|
|
803
803
|
}
|
|
804
|
-
var OSPaths_ = /* @__PURE__ */ function() {
|
|
804
|
+
var OSPaths_ = /* @__PURE__ */ (function() {
|
|
805
805
|
function OSPaths_2() {
|
|
806
806
|
function OSPaths() {
|
|
807
807
|
return new OSPaths_2();
|
|
@@ -811,7 +811,7 @@ var require_OSPaths = __commonJS({
|
|
|
811
811
|
return OSPaths;
|
|
812
812
|
}
|
|
813
813
|
return OSPaths_2;
|
|
814
|
-
}();
|
|
814
|
+
})();
|
|
815
815
|
return { OSPaths: new OSPaths_() };
|
|
816
816
|
}
|
|
817
817
|
exports2.Adapt = Adapt;
|
|
@@ -822,18 +822,18 @@ var require_OSPaths = __commonJS({
|
|
|
822
822
|
var require_node = __commonJS({
|
|
823
823
|
"../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/platform-adapters/node.js"(exports2) {
|
|
824
824
|
"use strict";
|
|
825
|
-
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m2, k2, k22) {
|
|
825
|
+
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k2, k22) {
|
|
826
826
|
if (k22 === void 0) k22 = k2;
|
|
827
827
|
Object.defineProperty(o, k22, { enumerable: true, get: function() {
|
|
828
828
|
return m2[k2];
|
|
829
829
|
} });
|
|
830
|
-
} : function(o, m2, k2, k22) {
|
|
830
|
+
}) : (function(o, m2, k2, k22) {
|
|
831
831
|
if (k22 === void 0) k22 = k2;
|
|
832
832
|
o[k22] = m2[k2];
|
|
833
|
-
});
|
|
834
|
-
var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v2) {
|
|
833
|
+
}));
|
|
834
|
+
var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v2) {
|
|
835
835
|
Object.defineProperty(o, "default", { enumerable: true, value: v2 });
|
|
836
|
-
} : function(o, v2) {
|
|
836
|
+
}) : function(o, v2) {
|
|
837
837
|
o["default"] = v2;
|
|
838
838
|
});
|
|
839
839
|
var __importStar2 = exports2 && exports2.__importStar || function(mod) {
|
|
@@ -877,18 +877,18 @@ var require_mod_cjs = __commonJS({
|
|
|
877
877
|
var require_node2 = __commonJS({
|
|
878
878
|
"../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/platform-adapters/node.js"(exports2) {
|
|
879
879
|
"use strict";
|
|
880
|
-
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m2, k2, k22) {
|
|
880
|
+
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k2, k22) {
|
|
881
881
|
if (k22 === void 0) k22 = k2;
|
|
882
882
|
Object.defineProperty(o, k22, { enumerable: true, get: function() {
|
|
883
883
|
return m2[k2];
|
|
884
884
|
} });
|
|
885
|
-
} : function(o, m2, k2, k22) {
|
|
885
|
+
}) : (function(o, m2, k2, k22) {
|
|
886
886
|
if (k22 === void 0) k22 = k2;
|
|
887
887
|
o[k22] = m2[k2];
|
|
888
|
-
});
|
|
889
|
-
var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v2) {
|
|
888
|
+
}));
|
|
889
|
+
var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v2) {
|
|
890
890
|
Object.defineProperty(o, "default", { enumerable: true, value: v2 });
|
|
891
|
-
} : function(o, v2) {
|
|
891
|
+
}) : function(o, v2) {
|
|
892
892
|
o["default"] = v2;
|
|
893
893
|
});
|
|
894
894
|
var __importStar2 = exports2 && exports2.__importStar || function(mod) {
|
|
@@ -935,18 +935,18 @@ var require_mod_cjs2 = __commonJS({
|
|
|
935
935
|
var require_node3 = __commonJS({
|
|
936
936
|
"../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js"(exports2) {
|
|
937
937
|
"use strict";
|
|
938
|
-
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m2, k2, k22) {
|
|
938
|
+
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k2, k22) {
|
|
939
939
|
if (k22 === void 0) k22 = k2;
|
|
940
940
|
Object.defineProperty(o, k22, { enumerable: true, get: function() {
|
|
941
941
|
return m2[k2];
|
|
942
942
|
} });
|
|
943
|
-
} : function(o, m2, k2, k22) {
|
|
943
|
+
}) : (function(o, m2, k2, k22) {
|
|
944
944
|
if (k22 === void 0) k22 = k2;
|
|
945
945
|
o[k22] = m2[k2];
|
|
946
|
-
});
|
|
947
|
-
var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v2) {
|
|
946
|
+
}));
|
|
947
|
+
var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v2) {
|
|
948
948
|
Object.defineProperty(o, "default", { enumerable: true, value: v2 });
|
|
949
|
-
} : function(o, v2) {
|
|
949
|
+
}) : function(o, v2) {
|
|
950
950
|
o["default"] = v2;
|
|
951
951
|
});
|
|
952
952
|
var __importStar2 = exports2 && exports2.__importStar || function(mod) {
|
|
@@ -20598,7 +20598,7 @@ var require_fetch = __commonJS({
|
|
|
20598
20598
|
fetchParams.controller.terminate(e);
|
|
20599
20599
|
}
|
|
20600
20600
|
};
|
|
20601
|
-
requestBody = async function* () {
|
|
20601
|
+
requestBody = (async function* () {
|
|
20602
20602
|
try {
|
|
20603
20603
|
for await (const bytes of request2.body.stream) {
|
|
20604
20604
|
yield* processBodyChunk(bytes);
|
|
@@ -20607,7 +20607,7 @@ var require_fetch = __commonJS({
|
|
|
20607
20607
|
} catch (err) {
|
|
20608
20608
|
processBodyError(err);
|
|
20609
20609
|
}
|
|
20610
|
-
}();
|
|
20610
|
+
})();
|
|
20611
20611
|
}
|
|
20612
20612
|
try {
|
|
20613
20613
|
const { body, status: status2, statusText, headersList, socket } = await dispatch({ body: requestBody });
|
|
@@ -31137,7 +31137,7 @@ var require_index_688c5d50 = __commonJS({
|
|
|
31137
31137
|
};
|
|
31138
31138
|
}
|
|
31139
31139
|
if (platform === "win32") {
|
|
31140
|
-
fs4.rename = /* @__PURE__ */ function(fs$rename) {
|
|
31140
|
+
fs4.rename = /* @__PURE__ */ (function(fs$rename) {
|
|
31141
31141
|
return function(from, to, cb) {
|
|
31142
31142
|
var start = Date.now();
|
|
31143
31143
|
var backoff = 0;
|
|
@@ -31158,9 +31158,9 @@ var require_index_688c5d50 = __commonJS({
|
|
|
31158
31158
|
if (cb) cb(er);
|
|
31159
31159
|
});
|
|
31160
31160
|
};
|
|
31161
|
-
}(fs4.rename);
|
|
31161
|
+
})(fs4.rename);
|
|
31162
31162
|
}
|
|
31163
|
-
fs4.read = /* @__PURE__ */ function(fs$read) {
|
|
31163
|
+
fs4.read = /* @__PURE__ */ (function(fs$read) {
|
|
31164
31164
|
return function(fd, buffer, offset, length, position, callback_) {
|
|
31165
31165
|
var callback;
|
|
31166
31166
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -31175,8 +31175,8 @@ var require_index_688c5d50 = __commonJS({
|
|
|
31175
31175
|
}
|
|
31176
31176
|
return fs$read.call(fs4, fd, buffer, offset, length, position, callback);
|
|
31177
31177
|
};
|
|
31178
|
-
}(fs4.read);
|
|
31179
|
-
fs4.readSync = /* @__PURE__ */ function(fs$readSync) {
|
|
31178
|
+
})(fs4.read);
|
|
31179
|
+
fs4.readSync = /* @__PURE__ */ (function(fs$readSync) {
|
|
31180
31180
|
return function(fd, buffer, offset, length, position) {
|
|
31181
31181
|
var eagCounter = 0;
|
|
31182
31182
|
while (true) {
|
|
@@ -31191,7 +31191,7 @@ var require_index_688c5d50 = __commonJS({
|
|
|
31191
31191
|
}
|
|
31192
31192
|
}
|
|
31193
31193
|
};
|
|
31194
|
-
}(fs4.readSync);
|
|
31194
|
+
})(fs4.readSync);
|
|
31195
31195
|
}
|
|
31196
31196
|
function patchLchmod(fs4) {
|
|
31197
31197
|
fs4.lchmod = function(path7, mode, callback) {
|
|
@@ -31457,7 +31457,7 @@ var require_index_688c5d50 = __commonJS({
|
|
|
31457
31457
|
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH) {
|
|
31458
31458
|
module3.exports = patch2(fs__default["default"]);
|
|
31459
31459
|
}
|
|
31460
|
-
module3.exports.close = fs__default["default"].close = /* @__PURE__ */ function(fs$close) {
|
|
31460
|
+
module3.exports.close = fs__default["default"].close = /* @__PURE__ */ (function(fs$close) {
|
|
31461
31461
|
return function(fd, cb) {
|
|
31462
31462
|
return fs$close.call(fs__default["default"], fd, function(err) {
|
|
31463
31463
|
if (!err)
|
|
@@ -31466,14 +31466,14 @@ var require_index_688c5d50 = __commonJS({
|
|
|
31466
31466
|
cb.apply(this, arguments);
|
|
31467
31467
|
});
|
|
31468
31468
|
};
|
|
31469
|
-
}(fs__default["default"].close);
|
|
31470
|
-
module3.exports.closeSync = fs__default["default"].closeSync = /* @__PURE__ */ function(fs$closeSync) {
|
|
31469
|
+
})(fs__default["default"].close);
|
|
31470
|
+
module3.exports.closeSync = fs__default["default"].closeSync = /* @__PURE__ */ (function(fs$closeSync) {
|
|
31471
31471
|
return function(fd) {
|
|
31472
31472
|
var rval = fs$closeSync.apply(fs__default["default"], arguments);
|
|
31473
31473
|
retry2();
|
|
31474
31474
|
return rval;
|
|
31475
31475
|
};
|
|
31476
|
-
}(fs__default["default"].closeSync);
|
|
31476
|
+
})(fs__default["default"].closeSync);
|
|
31477
31477
|
function patch2(fs4) {
|
|
31478
31478
|
polyfills(fs4);
|
|
31479
31479
|
fs4.gracefulify = patch2;
|
|
@@ -35831,7 +35831,7 @@ var require_random_seed = __commonJS({
|
|
|
35831
35831
|
return mash;
|
|
35832
35832
|
};
|
|
35833
35833
|
var uheprng = function(seed) {
|
|
35834
|
-
return function() {
|
|
35834
|
+
return (function() {
|
|
35835
35835
|
var o = 48;
|
|
35836
35836
|
var c2 = 1;
|
|
35837
35837
|
var p2 = o;
|
|
@@ -35940,7 +35940,7 @@ var require_random_seed = __commonJS({
|
|
|
35940
35940
|
return Math.floor(random.random() * (max - min + 1)) + min;
|
|
35941
35941
|
};
|
|
35942
35942
|
return random;
|
|
35943
|
-
}();
|
|
35943
|
+
})();
|
|
35944
35944
|
};
|
|
35945
35945
|
uheprng.create = function(seed) {
|
|
35946
35946
|
return new uheprng(seed);
|
|
@@ -36167,7 +36167,7 @@ var require_dist_web = __commonJS({
|
|
|
36167
36167
|
tokenHex: false,
|
|
36168
36168
|
tokenChars: "0123456789"
|
|
36169
36169
|
};
|
|
36170
|
-
var Haikunator2 = /* @__PURE__ */ function() {
|
|
36170
|
+
var Haikunator2 = /* @__PURE__ */ (function() {
|
|
36171
36171
|
function Haikunator3() {
|
|
36172
36172
|
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
36173
36173
|
_classCallCheck(this, Haikunator3);
|
|
@@ -36179,21 +36179,21 @@ var require_dist_web = __commonJS({
|
|
|
36179
36179
|
_createClass(Haikunator3, [{
|
|
36180
36180
|
key: "haikunate",
|
|
36181
36181
|
value: function haikunate(options) {
|
|
36182
|
-
var
|
|
36183
|
-
if (
|
|
36184
|
-
|
|
36182
|
+
var config46 = (0, _lodash["default"])(options, this.config);
|
|
36183
|
+
if (config46.tokenHex === true) {
|
|
36184
|
+
config46.tokenChars = "0123456789abcdef";
|
|
36185
36185
|
}
|
|
36186
36186
|
var adjective = this._randomElement(this.adjectives);
|
|
36187
36187
|
var noun = this._randomElement(this.nouns);
|
|
36188
|
-
if (!
|
|
36188
|
+
if (!config46.tokenLength) config46.tokenLength = 0;
|
|
36189
36189
|
var token = "";
|
|
36190
|
-
for (var i = 0; i <
|
|
36191
|
-
token += this._randomElement(
|
|
36190
|
+
for (var i = 0; i < config46.tokenLength; i++) {
|
|
36191
|
+
token += this._randomElement(config46.tokenChars);
|
|
36192
36192
|
}
|
|
36193
36193
|
var sections = [adjective, noun, token];
|
|
36194
36194
|
return sections.filter(function(e) {
|
|
36195
36195
|
return !!e;
|
|
36196
|
-
}).join(
|
|
36196
|
+
}).join(config46.delimiter);
|
|
36197
36197
|
}
|
|
36198
36198
|
/**
|
|
36199
36199
|
* Get a random element from an array/string
|
|
@@ -36209,7 +36209,7 @@ var require_dist_web = __commonJS({
|
|
|
36209
36209
|
}
|
|
36210
36210
|
}]);
|
|
36211
36211
|
return Haikunator3;
|
|
36212
|
-
}();
|
|
36212
|
+
})();
|
|
36213
36213
|
exports2["default"] = Haikunator2;
|
|
36214
36214
|
module2.exports = exports2.default;
|
|
36215
36215
|
}
|
|
@@ -36230,7 +36230,7 @@ var require_esprima = __commonJS({
|
|
|
36230
36230
|
})(exports2, function() {
|
|
36231
36231
|
return (
|
|
36232
36232
|
/******/
|
|
36233
|
-
function(modules) {
|
|
36233
|
+
(function(modules) {
|
|
36234
36234
|
var installedModules = {};
|
|
36235
36235
|
function __webpack_require__(moduleId) {
|
|
36236
36236
|
if (installedModules[moduleId])
|
|
@@ -36252,7 +36252,7 @@ var require_esprima = __commonJS({
|
|
|
36252
36252
|
__webpack_require__.c = installedModules;
|
|
36253
36253
|
__webpack_require__.p = "";
|
|
36254
36254
|
return __webpack_require__(0);
|
|
36255
|
-
}([
|
|
36255
|
+
})([
|
|
36256
36256
|
/* 0 */
|
|
36257
36257
|
/***/
|
|
36258
36258
|
function(module3, exports3, __webpack_require__) {
|
|
@@ -36354,7 +36354,7 @@ var require_esprima = __commonJS({
|
|
|
36354
36354
|
"use strict";
|
|
36355
36355
|
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
36356
36356
|
var syntax_1 = __webpack_require__(2);
|
|
36357
|
-
var CommentHandler = function() {
|
|
36357
|
+
var CommentHandler = (function() {
|
|
36358
36358
|
function CommentHandler2() {
|
|
36359
36359
|
this.attach = false;
|
|
36360
36360
|
this.comments = [];
|
|
@@ -36493,7 +36493,7 @@ var require_esprima = __commonJS({
|
|
|
36493
36493
|
}
|
|
36494
36494
|
};
|
|
36495
36495
|
return CommentHandler2;
|
|
36496
|
-
}();
|
|
36496
|
+
})();
|
|
36497
36497
|
exports3.CommentHandler = CommentHandler;
|
|
36498
36498
|
},
|
|
36499
36499
|
/* 2 */
|
|
@@ -36574,7 +36574,7 @@ var require_esprima = __commonJS({
|
|
|
36574
36574
|
/***/
|
|
36575
36575
|
function(module3, exports3, __webpack_require__) {
|
|
36576
36576
|
"use strict";
|
|
36577
|
-
var __extends2 = this && this.__extends || function() {
|
|
36577
|
+
var __extends2 = this && this.__extends || (function() {
|
|
36578
36578
|
var extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b3) {
|
|
36579
36579
|
d2.__proto__ = b3;
|
|
36580
36580
|
} || function(d2, b3) {
|
|
@@ -36587,7 +36587,7 @@ var require_esprima = __commonJS({
|
|
|
36587
36587
|
}
|
|
36588
36588
|
d2.prototype = b3 === null ? Object.create(b3) : (__.prototype = b3.prototype, new __());
|
|
36589
36589
|
};
|
|
36590
|
-
}();
|
|
36590
|
+
})();
|
|
36591
36591
|
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
36592
36592
|
var character_1 = __webpack_require__(4);
|
|
36593
36593
|
var JSXNode = __webpack_require__(5);
|
|
@@ -36625,7 +36625,7 @@ var require_esprima = __commonJS({
|
|
|
36625
36625
|
}
|
|
36626
36626
|
return qualifiedName;
|
|
36627
36627
|
}
|
|
36628
|
-
var JSXParser = function(_super) {
|
|
36628
|
+
var JSXParser = (function(_super) {
|
|
36629
36629
|
__extends2(JSXParser2, _super);
|
|
36630
36630
|
function JSXParser2(code, options, delegate) {
|
|
36631
36631
|
return _super.call(this, code, options, delegate) || this;
|
|
@@ -37083,7 +37083,7 @@ var require_esprima = __commonJS({
|
|
|
37083
37083
|
return _super.prototype.isStartOfExpression.call(this) || this.match("<");
|
|
37084
37084
|
};
|
|
37085
37085
|
return JSXParser2;
|
|
37086
|
-
}(parser_1.Parser);
|
|
37086
|
+
})(parser_1.Parser);
|
|
37087
37087
|
exports3.JSXParser = JSXParser;
|
|
37088
37088
|
},
|
|
37089
37089
|
/* 4 */
|
|
@@ -37135,15 +37135,15 @@ var require_esprima = __commonJS({
|
|
|
37135
37135
|
"use strict";
|
|
37136
37136
|
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
37137
37137
|
var jsx_syntax_1 = __webpack_require__(6);
|
|
37138
|
-
var JSXClosingElement = /* @__PURE__ */ function() {
|
|
37138
|
+
var JSXClosingElement = /* @__PURE__ */ (function() {
|
|
37139
37139
|
function JSXClosingElement2(name3) {
|
|
37140
37140
|
this.type = jsx_syntax_1.JSXSyntax.JSXClosingElement;
|
|
37141
37141
|
this.name = name3;
|
|
37142
37142
|
}
|
|
37143
37143
|
return JSXClosingElement2;
|
|
37144
|
-
}();
|
|
37144
|
+
})();
|
|
37145
37145
|
exports3.JSXClosingElement = JSXClosingElement;
|
|
37146
|
-
var JSXElement = /* @__PURE__ */ function() {
|
|
37146
|
+
var JSXElement = /* @__PURE__ */ (function() {
|
|
37147
37147
|
function JSXElement2(openingElement, children, closingElement) {
|
|
37148
37148
|
this.type = jsx_syntax_1.JSXSyntax.JSXElement;
|
|
37149
37149
|
this.openingElement = openingElement;
|
|
@@ -37151,59 +37151,59 @@ var require_esprima = __commonJS({
|
|
|
37151
37151
|
this.closingElement = closingElement;
|
|
37152
37152
|
}
|
|
37153
37153
|
return JSXElement2;
|
|
37154
|
-
}();
|
|
37154
|
+
})();
|
|
37155
37155
|
exports3.JSXElement = JSXElement;
|
|
37156
|
-
var JSXEmptyExpression = /* @__PURE__ */ function() {
|
|
37156
|
+
var JSXEmptyExpression = /* @__PURE__ */ (function() {
|
|
37157
37157
|
function JSXEmptyExpression2() {
|
|
37158
37158
|
this.type = jsx_syntax_1.JSXSyntax.JSXEmptyExpression;
|
|
37159
37159
|
}
|
|
37160
37160
|
return JSXEmptyExpression2;
|
|
37161
|
-
}();
|
|
37161
|
+
})();
|
|
37162
37162
|
exports3.JSXEmptyExpression = JSXEmptyExpression;
|
|
37163
|
-
var JSXExpressionContainer = /* @__PURE__ */ function() {
|
|
37163
|
+
var JSXExpressionContainer = /* @__PURE__ */ (function() {
|
|
37164
37164
|
function JSXExpressionContainer2(expression) {
|
|
37165
37165
|
this.type = jsx_syntax_1.JSXSyntax.JSXExpressionContainer;
|
|
37166
37166
|
this.expression = expression;
|
|
37167
37167
|
}
|
|
37168
37168
|
return JSXExpressionContainer2;
|
|
37169
|
-
}();
|
|
37169
|
+
})();
|
|
37170
37170
|
exports3.JSXExpressionContainer = JSXExpressionContainer;
|
|
37171
|
-
var JSXIdentifier = /* @__PURE__ */ function() {
|
|
37171
|
+
var JSXIdentifier = /* @__PURE__ */ (function() {
|
|
37172
37172
|
function JSXIdentifier2(name3) {
|
|
37173
37173
|
this.type = jsx_syntax_1.JSXSyntax.JSXIdentifier;
|
|
37174
37174
|
this.name = name3;
|
|
37175
37175
|
}
|
|
37176
37176
|
return JSXIdentifier2;
|
|
37177
|
-
}();
|
|
37177
|
+
})();
|
|
37178
37178
|
exports3.JSXIdentifier = JSXIdentifier;
|
|
37179
|
-
var JSXMemberExpression = /* @__PURE__ */ function() {
|
|
37179
|
+
var JSXMemberExpression = /* @__PURE__ */ (function() {
|
|
37180
37180
|
function JSXMemberExpression2(object, property) {
|
|
37181
37181
|
this.type = jsx_syntax_1.JSXSyntax.JSXMemberExpression;
|
|
37182
37182
|
this.object = object;
|
|
37183
37183
|
this.property = property;
|
|
37184
37184
|
}
|
|
37185
37185
|
return JSXMemberExpression2;
|
|
37186
|
-
}();
|
|
37186
|
+
})();
|
|
37187
37187
|
exports3.JSXMemberExpression = JSXMemberExpression;
|
|
37188
|
-
var JSXAttribute = /* @__PURE__ */ function() {
|
|
37188
|
+
var JSXAttribute = /* @__PURE__ */ (function() {
|
|
37189
37189
|
function JSXAttribute2(name3, value) {
|
|
37190
37190
|
this.type = jsx_syntax_1.JSXSyntax.JSXAttribute;
|
|
37191
37191
|
this.name = name3;
|
|
37192
37192
|
this.value = value;
|
|
37193
37193
|
}
|
|
37194
37194
|
return JSXAttribute2;
|
|
37195
|
-
}();
|
|
37195
|
+
})();
|
|
37196
37196
|
exports3.JSXAttribute = JSXAttribute;
|
|
37197
|
-
var JSXNamespacedName = /* @__PURE__ */ function() {
|
|
37197
|
+
var JSXNamespacedName = /* @__PURE__ */ (function() {
|
|
37198
37198
|
function JSXNamespacedName2(namespace, name3) {
|
|
37199
37199
|
this.type = jsx_syntax_1.JSXSyntax.JSXNamespacedName;
|
|
37200
37200
|
this.namespace = namespace;
|
|
37201
37201
|
this.name = name3;
|
|
37202
37202
|
}
|
|
37203
37203
|
return JSXNamespacedName2;
|
|
37204
|
-
}();
|
|
37204
|
+
})();
|
|
37205
37205
|
exports3.JSXNamespacedName = JSXNamespacedName;
|
|
37206
|
-
var JSXOpeningElement = /* @__PURE__ */ function() {
|
|
37206
|
+
var JSXOpeningElement = /* @__PURE__ */ (function() {
|
|
37207
37207
|
function JSXOpeningElement2(name3, selfClosing, attributes) {
|
|
37208
37208
|
this.type = jsx_syntax_1.JSXSyntax.JSXOpeningElement;
|
|
37209
37209
|
this.name = name3;
|
|
@@ -37211,24 +37211,24 @@ var require_esprima = __commonJS({
|
|
|
37211
37211
|
this.attributes = attributes;
|
|
37212
37212
|
}
|
|
37213
37213
|
return JSXOpeningElement2;
|
|
37214
|
-
}();
|
|
37214
|
+
})();
|
|
37215
37215
|
exports3.JSXOpeningElement = JSXOpeningElement;
|
|
37216
|
-
var JSXSpreadAttribute = /* @__PURE__ */ function() {
|
|
37216
|
+
var JSXSpreadAttribute = /* @__PURE__ */ (function() {
|
|
37217
37217
|
function JSXSpreadAttribute2(argument) {
|
|
37218
37218
|
this.type = jsx_syntax_1.JSXSyntax.JSXSpreadAttribute;
|
|
37219
37219
|
this.argument = argument;
|
|
37220
37220
|
}
|
|
37221
37221
|
return JSXSpreadAttribute2;
|
|
37222
|
-
}();
|
|
37222
|
+
})();
|
|
37223
37223
|
exports3.JSXSpreadAttribute = JSXSpreadAttribute;
|
|
37224
|
-
var JSXText = /* @__PURE__ */ function() {
|
|
37224
|
+
var JSXText = /* @__PURE__ */ (function() {
|
|
37225
37225
|
function JSXText2(value, raw) {
|
|
37226
37226
|
this.type = jsx_syntax_1.JSXSyntax.JSXText;
|
|
37227
37227
|
this.value = value;
|
|
37228
37228
|
this.raw = raw;
|
|
37229
37229
|
}
|
|
37230
37230
|
return JSXText2;
|
|
37231
|
-
}();
|
|
37231
|
+
})();
|
|
37232
37232
|
exports3.JSXText = JSXText;
|
|
37233
37233
|
},
|
|
37234
37234
|
/* 6 */
|
|
@@ -37256,23 +37256,23 @@ var require_esprima = __commonJS({
|
|
|
37256
37256
|
"use strict";
|
|
37257
37257
|
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
37258
37258
|
var syntax_1 = __webpack_require__(2);
|
|
37259
|
-
var ArrayExpression = /* @__PURE__ */ function() {
|
|
37259
|
+
var ArrayExpression = /* @__PURE__ */ (function() {
|
|
37260
37260
|
function ArrayExpression2(elements) {
|
|
37261
37261
|
this.type = syntax_1.Syntax.ArrayExpression;
|
|
37262
37262
|
this.elements = elements;
|
|
37263
37263
|
}
|
|
37264
37264
|
return ArrayExpression2;
|
|
37265
|
-
}();
|
|
37265
|
+
})();
|
|
37266
37266
|
exports3.ArrayExpression = ArrayExpression;
|
|
37267
|
-
var ArrayPattern = /* @__PURE__ */ function() {
|
|
37267
|
+
var ArrayPattern = /* @__PURE__ */ (function() {
|
|
37268
37268
|
function ArrayPattern2(elements) {
|
|
37269
37269
|
this.type = syntax_1.Syntax.ArrayPattern;
|
|
37270
37270
|
this.elements = elements;
|
|
37271
37271
|
}
|
|
37272
37272
|
return ArrayPattern2;
|
|
37273
|
-
}();
|
|
37273
|
+
})();
|
|
37274
37274
|
exports3.ArrayPattern = ArrayPattern;
|
|
37275
|
-
var ArrowFunctionExpression = /* @__PURE__ */ function() {
|
|
37275
|
+
var ArrowFunctionExpression = /* @__PURE__ */ (function() {
|
|
37276
37276
|
function ArrowFunctionExpression2(params, body, expression) {
|
|
37277
37277
|
this.type = syntax_1.Syntax.ArrowFunctionExpression;
|
|
37278
37278
|
this.id = null;
|
|
@@ -37283,9 +37283,9 @@ var require_esprima = __commonJS({
|
|
|
37283
37283
|
this.async = false;
|
|
37284
37284
|
}
|
|
37285
37285
|
return ArrowFunctionExpression2;
|
|
37286
|
-
}();
|
|
37286
|
+
})();
|
|
37287
37287
|
exports3.ArrowFunctionExpression = ArrowFunctionExpression;
|
|
37288
|
-
var AssignmentExpression = /* @__PURE__ */ function() {
|
|
37288
|
+
var AssignmentExpression = /* @__PURE__ */ (function() {
|
|
37289
37289
|
function AssignmentExpression2(operator, left2, right2) {
|
|
37290
37290
|
this.type = syntax_1.Syntax.AssignmentExpression;
|
|
37291
37291
|
this.operator = operator;
|
|
@@ -37293,18 +37293,18 @@ var require_esprima = __commonJS({
|
|
|
37293
37293
|
this.right = right2;
|
|
37294
37294
|
}
|
|
37295
37295
|
return AssignmentExpression2;
|
|
37296
|
-
}();
|
|
37296
|
+
})();
|
|
37297
37297
|
exports3.AssignmentExpression = AssignmentExpression;
|
|
37298
|
-
var AssignmentPattern = /* @__PURE__ */ function() {
|
|
37298
|
+
var AssignmentPattern = /* @__PURE__ */ (function() {
|
|
37299
37299
|
function AssignmentPattern2(left2, right2) {
|
|
37300
37300
|
this.type = syntax_1.Syntax.AssignmentPattern;
|
|
37301
37301
|
this.left = left2;
|
|
37302
37302
|
this.right = right2;
|
|
37303
37303
|
}
|
|
37304
37304
|
return AssignmentPattern2;
|
|
37305
|
-
}();
|
|
37305
|
+
})();
|
|
37306
37306
|
exports3.AssignmentPattern = AssignmentPattern;
|
|
37307
|
-
var AsyncArrowFunctionExpression = /* @__PURE__ */ function() {
|
|
37307
|
+
var AsyncArrowFunctionExpression = /* @__PURE__ */ (function() {
|
|
37308
37308
|
function AsyncArrowFunctionExpression2(params, body, expression) {
|
|
37309
37309
|
this.type = syntax_1.Syntax.ArrowFunctionExpression;
|
|
37310
37310
|
this.id = null;
|
|
@@ -37315,9 +37315,9 @@ var require_esprima = __commonJS({
|
|
|
37315
37315
|
this.async = true;
|
|
37316
37316
|
}
|
|
37317
37317
|
return AsyncArrowFunctionExpression2;
|
|
37318
|
-
}();
|
|
37318
|
+
})();
|
|
37319
37319
|
exports3.AsyncArrowFunctionExpression = AsyncArrowFunctionExpression;
|
|
37320
|
-
var AsyncFunctionDeclaration = /* @__PURE__ */ function() {
|
|
37320
|
+
var AsyncFunctionDeclaration = /* @__PURE__ */ (function() {
|
|
37321
37321
|
function AsyncFunctionDeclaration2(id, params, body) {
|
|
37322
37322
|
this.type = syntax_1.Syntax.FunctionDeclaration;
|
|
37323
37323
|
this.id = id;
|
|
@@ -37328,9 +37328,9 @@ var require_esprima = __commonJS({
|
|
|
37328
37328
|
this.async = true;
|
|
37329
37329
|
}
|
|
37330
37330
|
return AsyncFunctionDeclaration2;
|
|
37331
|
-
}();
|
|
37331
|
+
})();
|
|
37332
37332
|
exports3.AsyncFunctionDeclaration = AsyncFunctionDeclaration;
|
|
37333
|
-
var AsyncFunctionExpression = /* @__PURE__ */ function() {
|
|
37333
|
+
var AsyncFunctionExpression = /* @__PURE__ */ (function() {
|
|
37334
37334
|
function AsyncFunctionExpression2(id, params, body) {
|
|
37335
37335
|
this.type = syntax_1.Syntax.FunctionExpression;
|
|
37336
37336
|
this.id = id;
|
|
@@ -37341,17 +37341,17 @@ var require_esprima = __commonJS({
|
|
|
37341
37341
|
this.async = true;
|
|
37342
37342
|
}
|
|
37343
37343
|
return AsyncFunctionExpression2;
|
|
37344
|
-
}();
|
|
37344
|
+
})();
|
|
37345
37345
|
exports3.AsyncFunctionExpression = AsyncFunctionExpression;
|
|
37346
|
-
var AwaitExpression = /* @__PURE__ */ function() {
|
|
37346
|
+
var AwaitExpression = /* @__PURE__ */ (function() {
|
|
37347
37347
|
function AwaitExpression2(argument) {
|
|
37348
37348
|
this.type = syntax_1.Syntax.AwaitExpression;
|
|
37349
37349
|
this.argument = argument;
|
|
37350
37350
|
}
|
|
37351
37351
|
return AwaitExpression2;
|
|
37352
|
-
}();
|
|
37352
|
+
})();
|
|
37353
37353
|
exports3.AwaitExpression = AwaitExpression;
|
|
37354
|
-
var BinaryExpression = /* @__PURE__ */ function() {
|
|
37354
|
+
var BinaryExpression = /* @__PURE__ */ (function() {
|
|
37355
37355
|
function BinaryExpression2(operator, left2, right2) {
|
|
37356
37356
|
var logical = operator === "||" || operator === "&&";
|
|
37357
37357
|
this.type = logical ? syntax_1.Syntax.LogicalExpression : syntax_1.Syntax.BinaryExpression;
|
|
@@ -37360,51 +37360,51 @@ var require_esprima = __commonJS({
|
|
|
37360
37360
|
this.right = right2;
|
|
37361
37361
|
}
|
|
37362
37362
|
return BinaryExpression2;
|
|
37363
|
-
}();
|
|
37363
|
+
})();
|
|
37364
37364
|
exports3.BinaryExpression = BinaryExpression;
|
|
37365
|
-
var BlockStatement = /* @__PURE__ */ function() {
|
|
37365
|
+
var BlockStatement = /* @__PURE__ */ (function() {
|
|
37366
37366
|
function BlockStatement2(body) {
|
|
37367
37367
|
this.type = syntax_1.Syntax.BlockStatement;
|
|
37368
37368
|
this.body = body;
|
|
37369
37369
|
}
|
|
37370
37370
|
return BlockStatement2;
|
|
37371
|
-
}();
|
|
37371
|
+
})();
|
|
37372
37372
|
exports3.BlockStatement = BlockStatement;
|
|
37373
|
-
var BreakStatement = /* @__PURE__ */ function() {
|
|
37373
|
+
var BreakStatement = /* @__PURE__ */ (function() {
|
|
37374
37374
|
function BreakStatement2(label) {
|
|
37375
37375
|
this.type = syntax_1.Syntax.BreakStatement;
|
|
37376
37376
|
this.label = label;
|
|
37377
37377
|
}
|
|
37378
37378
|
return BreakStatement2;
|
|
37379
|
-
}();
|
|
37379
|
+
})();
|
|
37380
37380
|
exports3.BreakStatement = BreakStatement;
|
|
37381
|
-
var CallExpression = /* @__PURE__ */ function() {
|
|
37381
|
+
var CallExpression = /* @__PURE__ */ (function() {
|
|
37382
37382
|
function CallExpression2(callee, args) {
|
|
37383
37383
|
this.type = syntax_1.Syntax.CallExpression;
|
|
37384
37384
|
this.callee = callee;
|
|
37385
37385
|
this.arguments = args;
|
|
37386
37386
|
}
|
|
37387
37387
|
return CallExpression2;
|
|
37388
|
-
}();
|
|
37388
|
+
})();
|
|
37389
37389
|
exports3.CallExpression = CallExpression;
|
|
37390
|
-
var CatchClause = /* @__PURE__ */ function() {
|
|
37390
|
+
var CatchClause = /* @__PURE__ */ (function() {
|
|
37391
37391
|
function CatchClause2(param, body) {
|
|
37392
37392
|
this.type = syntax_1.Syntax.CatchClause;
|
|
37393
37393
|
this.param = param;
|
|
37394
37394
|
this.body = body;
|
|
37395
37395
|
}
|
|
37396
37396
|
return CatchClause2;
|
|
37397
|
-
}();
|
|
37397
|
+
})();
|
|
37398
37398
|
exports3.CatchClause = CatchClause;
|
|
37399
|
-
var ClassBody = /* @__PURE__ */ function() {
|
|
37399
|
+
var ClassBody = /* @__PURE__ */ (function() {
|
|
37400
37400
|
function ClassBody2(body) {
|
|
37401
37401
|
this.type = syntax_1.Syntax.ClassBody;
|
|
37402
37402
|
this.body = body;
|
|
37403
37403
|
}
|
|
37404
37404
|
return ClassBody2;
|
|
37405
|
-
}();
|
|
37405
|
+
})();
|
|
37406
37406
|
exports3.ClassBody = ClassBody;
|
|
37407
|
-
var ClassDeclaration = /* @__PURE__ */ function() {
|
|
37407
|
+
var ClassDeclaration = /* @__PURE__ */ (function() {
|
|
37408
37408
|
function ClassDeclaration2(id, superClass, body) {
|
|
37409
37409
|
this.type = syntax_1.Syntax.ClassDeclaration;
|
|
37410
37410
|
this.id = id;
|
|
@@ -37412,9 +37412,9 @@ var require_esprima = __commonJS({
|
|
|
37412
37412
|
this.body = body;
|
|
37413
37413
|
}
|
|
37414
37414
|
return ClassDeclaration2;
|
|
37415
|
-
}();
|
|
37415
|
+
})();
|
|
37416
37416
|
exports3.ClassDeclaration = ClassDeclaration;
|
|
37417
|
-
var ClassExpression = /* @__PURE__ */ function() {
|
|
37417
|
+
var ClassExpression = /* @__PURE__ */ (function() {
|
|
37418
37418
|
function ClassExpression2(id, superClass, body) {
|
|
37419
37419
|
this.type = syntax_1.Syntax.ClassExpression;
|
|
37420
37420
|
this.id = id;
|
|
@@ -37422,9 +37422,9 @@ var require_esprima = __commonJS({
|
|
|
37422
37422
|
this.body = body;
|
|
37423
37423
|
}
|
|
37424
37424
|
return ClassExpression2;
|
|
37425
|
-
}();
|
|
37425
|
+
})();
|
|
37426
37426
|
exports3.ClassExpression = ClassExpression;
|
|
37427
|
-
var ComputedMemberExpression = /* @__PURE__ */ function() {
|
|
37427
|
+
var ComputedMemberExpression = /* @__PURE__ */ (function() {
|
|
37428
37428
|
function ComputedMemberExpression2(object, property) {
|
|
37429
37429
|
this.type = syntax_1.Syntax.MemberExpression;
|
|
37430
37430
|
this.computed = true;
|
|
@@ -37432,9 +37432,9 @@ var require_esprima = __commonJS({
|
|
|
37432
37432
|
this.property = property;
|
|
37433
37433
|
}
|
|
37434
37434
|
return ComputedMemberExpression2;
|
|
37435
|
-
}();
|
|
37435
|
+
})();
|
|
37436
37436
|
exports3.ComputedMemberExpression = ComputedMemberExpression;
|
|
37437
|
-
var ConditionalExpression = /* @__PURE__ */ function() {
|
|
37437
|
+
var ConditionalExpression = /* @__PURE__ */ (function() {
|
|
37438
37438
|
function ConditionalExpression2(test, consequent, alternate) {
|
|
37439
37439
|
this.type = syntax_1.Syntax.ConditionalExpression;
|
|
37440
37440
|
this.test = test;
|
|
@@ -37442,65 +37442,65 @@ var require_esprima = __commonJS({
|
|
|
37442
37442
|
this.alternate = alternate;
|
|
37443
37443
|
}
|
|
37444
37444
|
return ConditionalExpression2;
|
|
37445
|
-
}();
|
|
37445
|
+
})();
|
|
37446
37446
|
exports3.ConditionalExpression = ConditionalExpression;
|
|
37447
|
-
var ContinueStatement = /* @__PURE__ */ function() {
|
|
37447
|
+
var ContinueStatement = /* @__PURE__ */ (function() {
|
|
37448
37448
|
function ContinueStatement2(label) {
|
|
37449
37449
|
this.type = syntax_1.Syntax.ContinueStatement;
|
|
37450
37450
|
this.label = label;
|
|
37451
37451
|
}
|
|
37452
37452
|
return ContinueStatement2;
|
|
37453
|
-
}();
|
|
37453
|
+
})();
|
|
37454
37454
|
exports3.ContinueStatement = ContinueStatement;
|
|
37455
|
-
var DebuggerStatement = /* @__PURE__ */ function() {
|
|
37455
|
+
var DebuggerStatement = /* @__PURE__ */ (function() {
|
|
37456
37456
|
function DebuggerStatement2() {
|
|
37457
37457
|
this.type = syntax_1.Syntax.DebuggerStatement;
|
|
37458
37458
|
}
|
|
37459
37459
|
return DebuggerStatement2;
|
|
37460
|
-
}();
|
|
37460
|
+
})();
|
|
37461
37461
|
exports3.DebuggerStatement = DebuggerStatement;
|
|
37462
|
-
var Directive = /* @__PURE__ */ function() {
|
|
37462
|
+
var Directive = /* @__PURE__ */ (function() {
|
|
37463
37463
|
function Directive2(expression, directive) {
|
|
37464
37464
|
this.type = syntax_1.Syntax.ExpressionStatement;
|
|
37465
37465
|
this.expression = expression;
|
|
37466
37466
|
this.directive = directive;
|
|
37467
37467
|
}
|
|
37468
37468
|
return Directive2;
|
|
37469
|
-
}();
|
|
37469
|
+
})();
|
|
37470
37470
|
exports3.Directive = Directive;
|
|
37471
|
-
var DoWhileStatement = /* @__PURE__ */ function() {
|
|
37471
|
+
var DoWhileStatement = /* @__PURE__ */ (function() {
|
|
37472
37472
|
function DoWhileStatement2(body, test) {
|
|
37473
37473
|
this.type = syntax_1.Syntax.DoWhileStatement;
|
|
37474
37474
|
this.body = body;
|
|
37475
37475
|
this.test = test;
|
|
37476
37476
|
}
|
|
37477
37477
|
return DoWhileStatement2;
|
|
37478
|
-
}();
|
|
37478
|
+
})();
|
|
37479
37479
|
exports3.DoWhileStatement = DoWhileStatement;
|
|
37480
|
-
var EmptyStatement = /* @__PURE__ */ function() {
|
|
37480
|
+
var EmptyStatement = /* @__PURE__ */ (function() {
|
|
37481
37481
|
function EmptyStatement2() {
|
|
37482
37482
|
this.type = syntax_1.Syntax.EmptyStatement;
|
|
37483
37483
|
}
|
|
37484
37484
|
return EmptyStatement2;
|
|
37485
|
-
}();
|
|
37485
|
+
})();
|
|
37486
37486
|
exports3.EmptyStatement = EmptyStatement;
|
|
37487
|
-
var ExportAllDeclaration = /* @__PURE__ */ function() {
|
|
37487
|
+
var ExportAllDeclaration = /* @__PURE__ */ (function() {
|
|
37488
37488
|
function ExportAllDeclaration2(source) {
|
|
37489
37489
|
this.type = syntax_1.Syntax.ExportAllDeclaration;
|
|
37490
37490
|
this.source = source;
|
|
37491
37491
|
}
|
|
37492
37492
|
return ExportAllDeclaration2;
|
|
37493
|
-
}();
|
|
37493
|
+
})();
|
|
37494
37494
|
exports3.ExportAllDeclaration = ExportAllDeclaration;
|
|
37495
|
-
var ExportDefaultDeclaration = /* @__PURE__ */ function() {
|
|
37495
|
+
var ExportDefaultDeclaration = /* @__PURE__ */ (function() {
|
|
37496
37496
|
function ExportDefaultDeclaration2(declaration) {
|
|
37497
37497
|
this.type = syntax_1.Syntax.ExportDefaultDeclaration;
|
|
37498
37498
|
this.declaration = declaration;
|
|
37499
37499
|
}
|
|
37500
37500
|
return ExportDefaultDeclaration2;
|
|
37501
|
-
}();
|
|
37501
|
+
})();
|
|
37502
37502
|
exports3.ExportDefaultDeclaration = ExportDefaultDeclaration;
|
|
37503
|
-
var ExportNamedDeclaration = /* @__PURE__ */ function() {
|
|
37503
|
+
var ExportNamedDeclaration = /* @__PURE__ */ (function() {
|
|
37504
37504
|
function ExportNamedDeclaration2(declaration, specifiers, source) {
|
|
37505
37505
|
this.type = syntax_1.Syntax.ExportNamedDeclaration;
|
|
37506
37506
|
this.declaration = declaration;
|
|
@@ -37508,26 +37508,26 @@ var require_esprima = __commonJS({
|
|
|
37508
37508
|
this.source = source;
|
|
37509
37509
|
}
|
|
37510
37510
|
return ExportNamedDeclaration2;
|
|
37511
|
-
}();
|
|
37511
|
+
})();
|
|
37512
37512
|
exports3.ExportNamedDeclaration = ExportNamedDeclaration;
|
|
37513
|
-
var ExportSpecifier = /* @__PURE__ */ function() {
|
|
37513
|
+
var ExportSpecifier = /* @__PURE__ */ (function() {
|
|
37514
37514
|
function ExportSpecifier2(local, exported) {
|
|
37515
37515
|
this.type = syntax_1.Syntax.ExportSpecifier;
|
|
37516
37516
|
this.exported = exported;
|
|
37517
37517
|
this.local = local;
|
|
37518
37518
|
}
|
|
37519
37519
|
return ExportSpecifier2;
|
|
37520
|
-
}();
|
|
37520
|
+
})();
|
|
37521
37521
|
exports3.ExportSpecifier = ExportSpecifier;
|
|
37522
|
-
var ExpressionStatement = /* @__PURE__ */ function() {
|
|
37522
|
+
var ExpressionStatement = /* @__PURE__ */ (function() {
|
|
37523
37523
|
function ExpressionStatement2(expression) {
|
|
37524
37524
|
this.type = syntax_1.Syntax.ExpressionStatement;
|
|
37525
37525
|
this.expression = expression;
|
|
37526
37526
|
}
|
|
37527
37527
|
return ExpressionStatement2;
|
|
37528
|
-
}();
|
|
37528
|
+
})();
|
|
37529
37529
|
exports3.ExpressionStatement = ExpressionStatement;
|
|
37530
|
-
var ForInStatement = /* @__PURE__ */ function() {
|
|
37530
|
+
var ForInStatement = /* @__PURE__ */ (function() {
|
|
37531
37531
|
function ForInStatement2(left2, right2, body) {
|
|
37532
37532
|
this.type = syntax_1.Syntax.ForInStatement;
|
|
37533
37533
|
this.left = left2;
|
|
@@ -37536,9 +37536,9 @@ var require_esprima = __commonJS({
|
|
|
37536
37536
|
this.each = false;
|
|
37537
37537
|
}
|
|
37538
37538
|
return ForInStatement2;
|
|
37539
|
-
}();
|
|
37539
|
+
})();
|
|
37540
37540
|
exports3.ForInStatement = ForInStatement;
|
|
37541
|
-
var ForOfStatement = /* @__PURE__ */ function() {
|
|
37541
|
+
var ForOfStatement = /* @__PURE__ */ (function() {
|
|
37542
37542
|
function ForOfStatement2(left2, right2, body) {
|
|
37543
37543
|
this.type = syntax_1.Syntax.ForOfStatement;
|
|
37544
37544
|
this.left = left2;
|
|
@@ -37546,9 +37546,9 @@ var require_esprima = __commonJS({
|
|
|
37546
37546
|
this.body = body;
|
|
37547
37547
|
}
|
|
37548
37548
|
return ForOfStatement2;
|
|
37549
|
-
}();
|
|
37549
|
+
})();
|
|
37550
37550
|
exports3.ForOfStatement = ForOfStatement;
|
|
37551
|
-
var ForStatement = /* @__PURE__ */ function() {
|
|
37551
|
+
var ForStatement = /* @__PURE__ */ (function() {
|
|
37552
37552
|
function ForStatement2(init, test, update, body) {
|
|
37553
37553
|
this.type = syntax_1.Syntax.ForStatement;
|
|
37554
37554
|
this.init = init;
|
|
@@ -37557,9 +37557,9 @@ var require_esprima = __commonJS({
|
|
|
37557
37557
|
this.body = body;
|
|
37558
37558
|
}
|
|
37559
37559
|
return ForStatement2;
|
|
37560
|
-
}();
|
|
37560
|
+
})();
|
|
37561
37561
|
exports3.ForStatement = ForStatement;
|
|
37562
|
-
var FunctionDeclaration = /* @__PURE__ */ function() {
|
|
37562
|
+
var FunctionDeclaration = /* @__PURE__ */ (function() {
|
|
37563
37563
|
function FunctionDeclaration2(id, params, body, generator) {
|
|
37564
37564
|
this.type = syntax_1.Syntax.FunctionDeclaration;
|
|
37565
37565
|
this.id = id;
|
|
@@ -37570,9 +37570,9 @@ var require_esprima = __commonJS({
|
|
|
37570
37570
|
this.async = false;
|
|
37571
37571
|
}
|
|
37572
37572
|
return FunctionDeclaration2;
|
|
37573
|
-
}();
|
|
37573
|
+
})();
|
|
37574
37574
|
exports3.FunctionDeclaration = FunctionDeclaration;
|
|
37575
|
-
var FunctionExpression = /* @__PURE__ */ function() {
|
|
37575
|
+
var FunctionExpression = /* @__PURE__ */ (function() {
|
|
37576
37576
|
function FunctionExpression2(id, params, body, generator) {
|
|
37577
37577
|
this.type = syntax_1.Syntax.FunctionExpression;
|
|
37578
37578
|
this.id = id;
|
|
@@ -37583,17 +37583,17 @@ var require_esprima = __commonJS({
|
|
|
37583
37583
|
this.async = false;
|
|
37584
37584
|
}
|
|
37585
37585
|
return FunctionExpression2;
|
|
37586
|
-
}();
|
|
37586
|
+
})();
|
|
37587
37587
|
exports3.FunctionExpression = FunctionExpression;
|
|
37588
|
-
var Identifier = /* @__PURE__ */ function() {
|
|
37588
|
+
var Identifier = /* @__PURE__ */ (function() {
|
|
37589
37589
|
function Identifier2(name3) {
|
|
37590
37590
|
this.type = syntax_1.Syntax.Identifier;
|
|
37591
37591
|
this.name = name3;
|
|
37592
37592
|
}
|
|
37593
37593
|
return Identifier2;
|
|
37594
|
-
}();
|
|
37594
|
+
})();
|
|
37595
37595
|
exports3.Identifier = Identifier;
|
|
37596
|
-
var IfStatement = /* @__PURE__ */ function() {
|
|
37596
|
+
var IfStatement = /* @__PURE__ */ (function() {
|
|
37597
37597
|
function IfStatement2(test, consequent, alternate) {
|
|
37598
37598
|
this.type = syntax_1.Syntax.IfStatement;
|
|
37599
37599
|
this.test = test;
|
|
@@ -37601,70 +37601,70 @@ var require_esprima = __commonJS({
|
|
|
37601
37601
|
this.alternate = alternate;
|
|
37602
37602
|
}
|
|
37603
37603
|
return IfStatement2;
|
|
37604
|
-
}();
|
|
37604
|
+
})();
|
|
37605
37605
|
exports3.IfStatement = IfStatement;
|
|
37606
|
-
var ImportDeclaration = /* @__PURE__ */ function() {
|
|
37606
|
+
var ImportDeclaration = /* @__PURE__ */ (function() {
|
|
37607
37607
|
function ImportDeclaration2(specifiers, source) {
|
|
37608
37608
|
this.type = syntax_1.Syntax.ImportDeclaration;
|
|
37609
37609
|
this.specifiers = specifiers;
|
|
37610
37610
|
this.source = source;
|
|
37611
37611
|
}
|
|
37612
37612
|
return ImportDeclaration2;
|
|
37613
|
-
}();
|
|
37613
|
+
})();
|
|
37614
37614
|
exports3.ImportDeclaration = ImportDeclaration;
|
|
37615
|
-
var ImportDefaultSpecifier = /* @__PURE__ */ function() {
|
|
37615
|
+
var ImportDefaultSpecifier = /* @__PURE__ */ (function() {
|
|
37616
37616
|
function ImportDefaultSpecifier2(local) {
|
|
37617
37617
|
this.type = syntax_1.Syntax.ImportDefaultSpecifier;
|
|
37618
37618
|
this.local = local;
|
|
37619
37619
|
}
|
|
37620
37620
|
return ImportDefaultSpecifier2;
|
|
37621
|
-
}();
|
|
37621
|
+
})();
|
|
37622
37622
|
exports3.ImportDefaultSpecifier = ImportDefaultSpecifier;
|
|
37623
|
-
var ImportNamespaceSpecifier = /* @__PURE__ */ function() {
|
|
37623
|
+
var ImportNamespaceSpecifier = /* @__PURE__ */ (function() {
|
|
37624
37624
|
function ImportNamespaceSpecifier2(local) {
|
|
37625
37625
|
this.type = syntax_1.Syntax.ImportNamespaceSpecifier;
|
|
37626
37626
|
this.local = local;
|
|
37627
37627
|
}
|
|
37628
37628
|
return ImportNamespaceSpecifier2;
|
|
37629
|
-
}();
|
|
37629
|
+
})();
|
|
37630
37630
|
exports3.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
|
|
37631
|
-
var ImportSpecifier = /* @__PURE__ */ function() {
|
|
37631
|
+
var ImportSpecifier = /* @__PURE__ */ (function() {
|
|
37632
37632
|
function ImportSpecifier2(local, imported) {
|
|
37633
37633
|
this.type = syntax_1.Syntax.ImportSpecifier;
|
|
37634
37634
|
this.local = local;
|
|
37635
37635
|
this.imported = imported;
|
|
37636
37636
|
}
|
|
37637
37637
|
return ImportSpecifier2;
|
|
37638
|
-
}();
|
|
37638
|
+
})();
|
|
37639
37639
|
exports3.ImportSpecifier = ImportSpecifier;
|
|
37640
|
-
var LabeledStatement = /* @__PURE__ */ function() {
|
|
37640
|
+
var LabeledStatement = /* @__PURE__ */ (function() {
|
|
37641
37641
|
function LabeledStatement2(label, body) {
|
|
37642
37642
|
this.type = syntax_1.Syntax.LabeledStatement;
|
|
37643
37643
|
this.label = label;
|
|
37644
37644
|
this.body = body;
|
|
37645
37645
|
}
|
|
37646
37646
|
return LabeledStatement2;
|
|
37647
|
-
}();
|
|
37647
|
+
})();
|
|
37648
37648
|
exports3.LabeledStatement = LabeledStatement;
|
|
37649
|
-
var Literal = /* @__PURE__ */ function() {
|
|
37649
|
+
var Literal = /* @__PURE__ */ (function() {
|
|
37650
37650
|
function Literal2(value, raw) {
|
|
37651
37651
|
this.type = syntax_1.Syntax.Literal;
|
|
37652
37652
|
this.value = value;
|
|
37653
37653
|
this.raw = raw;
|
|
37654
37654
|
}
|
|
37655
37655
|
return Literal2;
|
|
37656
|
-
}();
|
|
37656
|
+
})();
|
|
37657
37657
|
exports3.Literal = Literal;
|
|
37658
|
-
var MetaProperty = /* @__PURE__ */ function() {
|
|
37658
|
+
var MetaProperty = /* @__PURE__ */ (function() {
|
|
37659
37659
|
function MetaProperty2(meta, property) {
|
|
37660
37660
|
this.type = syntax_1.Syntax.MetaProperty;
|
|
37661
37661
|
this.meta = meta;
|
|
37662
37662
|
this.property = property;
|
|
37663
37663
|
}
|
|
37664
37664
|
return MetaProperty2;
|
|
37665
|
-
}();
|
|
37665
|
+
})();
|
|
37666
37666
|
exports3.MetaProperty = MetaProperty;
|
|
37667
|
-
var MethodDefinition = /* @__PURE__ */ function() {
|
|
37667
|
+
var MethodDefinition = /* @__PURE__ */ (function() {
|
|
37668
37668
|
function MethodDefinition2(key, computed, value, kind, isStatic) {
|
|
37669
37669
|
this.type = syntax_1.Syntax.MethodDefinition;
|
|
37670
37670
|
this.key = key;
|
|
@@ -37674,43 +37674,43 @@ var require_esprima = __commonJS({
|
|
|
37674
37674
|
this.static = isStatic;
|
|
37675
37675
|
}
|
|
37676
37676
|
return MethodDefinition2;
|
|
37677
|
-
}();
|
|
37677
|
+
})();
|
|
37678
37678
|
exports3.MethodDefinition = MethodDefinition;
|
|
37679
|
-
var Module = /* @__PURE__ */ function() {
|
|
37679
|
+
var Module = /* @__PURE__ */ (function() {
|
|
37680
37680
|
function Module2(body) {
|
|
37681
37681
|
this.type = syntax_1.Syntax.Program;
|
|
37682
37682
|
this.body = body;
|
|
37683
37683
|
this.sourceType = "module";
|
|
37684
37684
|
}
|
|
37685
37685
|
return Module2;
|
|
37686
|
-
}();
|
|
37686
|
+
})();
|
|
37687
37687
|
exports3.Module = Module;
|
|
37688
|
-
var NewExpression = /* @__PURE__ */ function() {
|
|
37688
|
+
var NewExpression = /* @__PURE__ */ (function() {
|
|
37689
37689
|
function NewExpression2(callee, args) {
|
|
37690
37690
|
this.type = syntax_1.Syntax.NewExpression;
|
|
37691
37691
|
this.callee = callee;
|
|
37692
37692
|
this.arguments = args;
|
|
37693
37693
|
}
|
|
37694
37694
|
return NewExpression2;
|
|
37695
|
-
}();
|
|
37695
|
+
})();
|
|
37696
37696
|
exports3.NewExpression = NewExpression;
|
|
37697
|
-
var ObjectExpression = /* @__PURE__ */ function() {
|
|
37697
|
+
var ObjectExpression = /* @__PURE__ */ (function() {
|
|
37698
37698
|
function ObjectExpression2(properties) {
|
|
37699
37699
|
this.type = syntax_1.Syntax.ObjectExpression;
|
|
37700
37700
|
this.properties = properties;
|
|
37701
37701
|
}
|
|
37702
37702
|
return ObjectExpression2;
|
|
37703
|
-
}();
|
|
37703
|
+
})();
|
|
37704
37704
|
exports3.ObjectExpression = ObjectExpression;
|
|
37705
|
-
var ObjectPattern = /* @__PURE__ */ function() {
|
|
37705
|
+
var ObjectPattern = /* @__PURE__ */ (function() {
|
|
37706
37706
|
function ObjectPattern2(properties) {
|
|
37707
37707
|
this.type = syntax_1.Syntax.ObjectPattern;
|
|
37708
37708
|
this.properties = properties;
|
|
37709
37709
|
}
|
|
37710
37710
|
return ObjectPattern2;
|
|
37711
|
-
}();
|
|
37711
|
+
})();
|
|
37712
37712
|
exports3.ObjectPattern = ObjectPattern;
|
|
37713
|
-
var Property = /* @__PURE__ */ function() {
|
|
37713
|
+
var Property = /* @__PURE__ */ (function() {
|
|
37714
37714
|
function Property2(kind, key, computed, value, method, shorthand) {
|
|
37715
37715
|
this.type = syntax_1.Syntax.Property;
|
|
37716
37716
|
this.key = key;
|
|
@@ -37721,9 +37721,9 @@ var require_esprima = __commonJS({
|
|
|
37721
37721
|
this.shorthand = shorthand;
|
|
37722
37722
|
}
|
|
37723
37723
|
return Property2;
|
|
37724
|
-
}();
|
|
37724
|
+
})();
|
|
37725
37725
|
exports3.Property = Property;
|
|
37726
|
-
var RegexLiteral = /* @__PURE__ */ function() {
|
|
37726
|
+
var RegexLiteral = /* @__PURE__ */ (function() {
|
|
37727
37727
|
function RegexLiteral2(value, raw, pattern, flags) {
|
|
37728
37728
|
this.type = syntax_1.Syntax.Literal;
|
|
37729
37729
|
this.value = value;
|
|
@@ -37731,50 +37731,50 @@ var require_esprima = __commonJS({
|
|
|
37731
37731
|
this.regex = { pattern, flags };
|
|
37732
37732
|
}
|
|
37733
37733
|
return RegexLiteral2;
|
|
37734
|
-
}();
|
|
37734
|
+
})();
|
|
37735
37735
|
exports3.RegexLiteral = RegexLiteral;
|
|
37736
|
-
var RestElement = /* @__PURE__ */ function() {
|
|
37736
|
+
var RestElement = /* @__PURE__ */ (function() {
|
|
37737
37737
|
function RestElement2(argument) {
|
|
37738
37738
|
this.type = syntax_1.Syntax.RestElement;
|
|
37739
37739
|
this.argument = argument;
|
|
37740
37740
|
}
|
|
37741
37741
|
return RestElement2;
|
|
37742
|
-
}();
|
|
37742
|
+
})();
|
|
37743
37743
|
exports3.RestElement = RestElement;
|
|
37744
|
-
var ReturnStatement = /* @__PURE__ */ function() {
|
|
37744
|
+
var ReturnStatement = /* @__PURE__ */ (function() {
|
|
37745
37745
|
function ReturnStatement2(argument) {
|
|
37746
37746
|
this.type = syntax_1.Syntax.ReturnStatement;
|
|
37747
37747
|
this.argument = argument;
|
|
37748
37748
|
}
|
|
37749
37749
|
return ReturnStatement2;
|
|
37750
|
-
}();
|
|
37750
|
+
})();
|
|
37751
37751
|
exports3.ReturnStatement = ReturnStatement;
|
|
37752
|
-
var Script = /* @__PURE__ */ function() {
|
|
37752
|
+
var Script = /* @__PURE__ */ (function() {
|
|
37753
37753
|
function Script2(body) {
|
|
37754
37754
|
this.type = syntax_1.Syntax.Program;
|
|
37755
37755
|
this.body = body;
|
|
37756
37756
|
this.sourceType = "script";
|
|
37757
37757
|
}
|
|
37758
37758
|
return Script2;
|
|
37759
|
-
}();
|
|
37759
|
+
})();
|
|
37760
37760
|
exports3.Script = Script;
|
|
37761
|
-
var SequenceExpression = /* @__PURE__ */ function() {
|
|
37761
|
+
var SequenceExpression = /* @__PURE__ */ (function() {
|
|
37762
37762
|
function SequenceExpression2(expressions) {
|
|
37763
37763
|
this.type = syntax_1.Syntax.SequenceExpression;
|
|
37764
37764
|
this.expressions = expressions;
|
|
37765
37765
|
}
|
|
37766
37766
|
return SequenceExpression2;
|
|
37767
|
-
}();
|
|
37767
|
+
})();
|
|
37768
37768
|
exports3.SequenceExpression = SequenceExpression;
|
|
37769
|
-
var SpreadElement = /* @__PURE__ */ function() {
|
|
37769
|
+
var SpreadElement = /* @__PURE__ */ (function() {
|
|
37770
37770
|
function SpreadElement2(argument) {
|
|
37771
37771
|
this.type = syntax_1.Syntax.SpreadElement;
|
|
37772
37772
|
this.argument = argument;
|
|
37773
37773
|
}
|
|
37774
37774
|
return SpreadElement2;
|
|
37775
|
-
}();
|
|
37775
|
+
})();
|
|
37776
37776
|
exports3.SpreadElement = SpreadElement;
|
|
37777
|
-
var StaticMemberExpression = /* @__PURE__ */ function() {
|
|
37777
|
+
var StaticMemberExpression = /* @__PURE__ */ (function() {
|
|
37778
37778
|
function StaticMemberExpression2(object, property) {
|
|
37779
37779
|
this.type = syntax_1.Syntax.MemberExpression;
|
|
37780
37780
|
this.computed = false;
|
|
@@ -37782,76 +37782,76 @@ var require_esprima = __commonJS({
|
|
|
37782
37782
|
this.property = property;
|
|
37783
37783
|
}
|
|
37784
37784
|
return StaticMemberExpression2;
|
|
37785
|
-
}();
|
|
37785
|
+
})();
|
|
37786
37786
|
exports3.StaticMemberExpression = StaticMemberExpression;
|
|
37787
|
-
var Super = /* @__PURE__ */ function() {
|
|
37787
|
+
var Super = /* @__PURE__ */ (function() {
|
|
37788
37788
|
function Super2() {
|
|
37789
37789
|
this.type = syntax_1.Syntax.Super;
|
|
37790
37790
|
}
|
|
37791
37791
|
return Super2;
|
|
37792
|
-
}();
|
|
37792
|
+
})();
|
|
37793
37793
|
exports3.Super = Super;
|
|
37794
|
-
var SwitchCase = /* @__PURE__ */ function() {
|
|
37794
|
+
var SwitchCase = /* @__PURE__ */ (function() {
|
|
37795
37795
|
function SwitchCase2(test, consequent) {
|
|
37796
37796
|
this.type = syntax_1.Syntax.SwitchCase;
|
|
37797
37797
|
this.test = test;
|
|
37798
37798
|
this.consequent = consequent;
|
|
37799
37799
|
}
|
|
37800
37800
|
return SwitchCase2;
|
|
37801
|
-
}();
|
|
37801
|
+
})();
|
|
37802
37802
|
exports3.SwitchCase = SwitchCase;
|
|
37803
|
-
var SwitchStatement = /* @__PURE__ */ function() {
|
|
37803
|
+
var SwitchStatement = /* @__PURE__ */ (function() {
|
|
37804
37804
|
function SwitchStatement2(discriminant, cases) {
|
|
37805
37805
|
this.type = syntax_1.Syntax.SwitchStatement;
|
|
37806
37806
|
this.discriminant = discriminant;
|
|
37807
37807
|
this.cases = cases;
|
|
37808
37808
|
}
|
|
37809
37809
|
return SwitchStatement2;
|
|
37810
|
-
}();
|
|
37810
|
+
})();
|
|
37811
37811
|
exports3.SwitchStatement = SwitchStatement;
|
|
37812
|
-
var TaggedTemplateExpression = /* @__PURE__ */ function() {
|
|
37812
|
+
var TaggedTemplateExpression = /* @__PURE__ */ (function() {
|
|
37813
37813
|
function TaggedTemplateExpression2(tag, quasi) {
|
|
37814
37814
|
this.type = syntax_1.Syntax.TaggedTemplateExpression;
|
|
37815
37815
|
this.tag = tag;
|
|
37816
37816
|
this.quasi = quasi;
|
|
37817
37817
|
}
|
|
37818
37818
|
return TaggedTemplateExpression2;
|
|
37819
|
-
}();
|
|
37819
|
+
})();
|
|
37820
37820
|
exports3.TaggedTemplateExpression = TaggedTemplateExpression;
|
|
37821
|
-
var TemplateElement = /* @__PURE__ */ function() {
|
|
37821
|
+
var TemplateElement = /* @__PURE__ */ (function() {
|
|
37822
37822
|
function TemplateElement2(value, tail) {
|
|
37823
37823
|
this.type = syntax_1.Syntax.TemplateElement;
|
|
37824
37824
|
this.value = value;
|
|
37825
37825
|
this.tail = tail;
|
|
37826
37826
|
}
|
|
37827
37827
|
return TemplateElement2;
|
|
37828
|
-
}();
|
|
37828
|
+
})();
|
|
37829
37829
|
exports3.TemplateElement = TemplateElement;
|
|
37830
|
-
var TemplateLiteral = /* @__PURE__ */ function() {
|
|
37830
|
+
var TemplateLiteral = /* @__PURE__ */ (function() {
|
|
37831
37831
|
function TemplateLiteral2(quasis, expressions) {
|
|
37832
37832
|
this.type = syntax_1.Syntax.TemplateLiteral;
|
|
37833
37833
|
this.quasis = quasis;
|
|
37834
37834
|
this.expressions = expressions;
|
|
37835
37835
|
}
|
|
37836
37836
|
return TemplateLiteral2;
|
|
37837
|
-
}();
|
|
37837
|
+
})();
|
|
37838
37838
|
exports3.TemplateLiteral = TemplateLiteral;
|
|
37839
|
-
var ThisExpression = /* @__PURE__ */ function() {
|
|
37839
|
+
var ThisExpression = /* @__PURE__ */ (function() {
|
|
37840
37840
|
function ThisExpression2() {
|
|
37841
37841
|
this.type = syntax_1.Syntax.ThisExpression;
|
|
37842
37842
|
}
|
|
37843
37843
|
return ThisExpression2;
|
|
37844
|
-
}();
|
|
37844
|
+
})();
|
|
37845
37845
|
exports3.ThisExpression = ThisExpression;
|
|
37846
|
-
var ThrowStatement = /* @__PURE__ */ function() {
|
|
37846
|
+
var ThrowStatement = /* @__PURE__ */ (function() {
|
|
37847
37847
|
function ThrowStatement2(argument) {
|
|
37848
37848
|
this.type = syntax_1.Syntax.ThrowStatement;
|
|
37849
37849
|
this.argument = argument;
|
|
37850
37850
|
}
|
|
37851
37851
|
return ThrowStatement2;
|
|
37852
|
-
}();
|
|
37852
|
+
})();
|
|
37853
37853
|
exports3.ThrowStatement = ThrowStatement;
|
|
37854
|
-
var TryStatement = /* @__PURE__ */ function() {
|
|
37854
|
+
var TryStatement = /* @__PURE__ */ (function() {
|
|
37855
37855
|
function TryStatement2(block, handler, finalizer) {
|
|
37856
37856
|
this.type = syntax_1.Syntax.TryStatement;
|
|
37857
37857
|
this.block = block;
|
|
@@ -37859,9 +37859,9 @@ var require_esprima = __commonJS({
|
|
|
37859
37859
|
this.finalizer = finalizer;
|
|
37860
37860
|
}
|
|
37861
37861
|
return TryStatement2;
|
|
37862
|
-
}();
|
|
37862
|
+
})();
|
|
37863
37863
|
exports3.TryStatement = TryStatement;
|
|
37864
|
-
var UnaryExpression = /* @__PURE__ */ function() {
|
|
37864
|
+
var UnaryExpression = /* @__PURE__ */ (function() {
|
|
37865
37865
|
function UnaryExpression2(operator, argument) {
|
|
37866
37866
|
this.type = syntax_1.Syntax.UnaryExpression;
|
|
37867
37867
|
this.operator = operator;
|
|
@@ -37869,9 +37869,9 @@ var require_esprima = __commonJS({
|
|
|
37869
37869
|
this.prefix = true;
|
|
37870
37870
|
}
|
|
37871
37871
|
return UnaryExpression2;
|
|
37872
|
-
}();
|
|
37872
|
+
})();
|
|
37873
37873
|
exports3.UnaryExpression = UnaryExpression;
|
|
37874
|
-
var UpdateExpression = /* @__PURE__ */ function() {
|
|
37874
|
+
var UpdateExpression = /* @__PURE__ */ (function() {
|
|
37875
37875
|
function UpdateExpression2(operator, argument, prefix) {
|
|
37876
37876
|
this.type = syntax_1.Syntax.UpdateExpression;
|
|
37877
37877
|
this.operator = operator;
|
|
@@ -37879,52 +37879,52 @@ var require_esprima = __commonJS({
|
|
|
37879
37879
|
this.prefix = prefix;
|
|
37880
37880
|
}
|
|
37881
37881
|
return UpdateExpression2;
|
|
37882
|
-
}();
|
|
37882
|
+
})();
|
|
37883
37883
|
exports3.UpdateExpression = UpdateExpression;
|
|
37884
|
-
var VariableDeclaration = /* @__PURE__ */ function() {
|
|
37884
|
+
var VariableDeclaration = /* @__PURE__ */ (function() {
|
|
37885
37885
|
function VariableDeclaration2(declarations, kind) {
|
|
37886
37886
|
this.type = syntax_1.Syntax.VariableDeclaration;
|
|
37887
37887
|
this.declarations = declarations;
|
|
37888
37888
|
this.kind = kind;
|
|
37889
37889
|
}
|
|
37890
37890
|
return VariableDeclaration2;
|
|
37891
|
-
}();
|
|
37891
|
+
})();
|
|
37892
37892
|
exports3.VariableDeclaration = VariableDeclaration;
|
|
37893
|
-
var VariableDeclarator = /* @__PURE__ */ function() {
|
|
37893
|
+
var VariableDeclarator = /* @__PURE__ */ (function() {
|
|
37894
37894
|
function VariableDeclarator2(id, init) {
|
|
37895
37895
|
this.type = syntax_1.Syntax.VariableDeclarator;
|
|
37896
37896
|
this.id = id;
|
|
37897
37897
|
this.init = init;
|
|
37898
37898
|
}
|
|
37899
37899
|
return VariableDeclarator2;
|
|
37900
|
-
}();
|
|
37900
|
+
})();
|
|
37901
37901
|
exports3.VariableDeclarator = VariableDeclarator;
|
|
37902
|
-
var WhileStatement = /* @__PURE__ */ function() {
|
|
37902
|
+
var WhileStatement = /* @__PURE__ */ (function() {
|
|
37903
37903
|
function WhileStatement2(test, body) {
|
|
37904
37904
|
this.type = syntax_1.Syntax.WhileStatement;
|
|
37905
37905
|
this.test = test;
|
|
37906
37906
|
this.body = body;
|
|
37907
37907
|
}
|
|
37908
37908
|
return WhileStatement2;
|
|
37909
|
-
}();
|
|
37909
|
+
})();
|
|
37910
37910
|
exports3.WhileStatement = WhileStatement;
|
|
37911
|
-
var WithStatement = /* @__PURE__ */ function() {
|
|
37911
|
+
var WithStatement = /* @__PURE__ */ (function() {
|
|
37912
37912
|
function WithStatement2(object, body) {
|
|
37913
37913
|
this.type = syntax_1.Syntax.WithStatement;
|
|
37914
37914
|
this.object = object;
|
|
37915
37915
|
this.body = body;
|
|
37916
37916
|
}
|
|
37917
37917
|
return WithStatement2;
|
|
37918
|
-
}();
|
|
37918
|
+
})();
|
|
37919
37919
|
exports3.WithStatement = WithStatement;
|
|
37920
|
-
var YieldExpression = /* @__PURE__ */ function() {
|
|
37920
|
+
var YieldExpression = /* @__PURE__ */ (function() {
|
|
37921
37921
|
function YieldExpression2(argument, delegate) {
|
|
37922
37922
|
this.type = syntax_1.Syntax.YieldExpression;
|
|
37923
37923
|
this.argument = argument;
|
|
37924
37924
|
this.delegate = delegate;
|
|
37925
37925
|
}
|
|
37926
37926
|
return YieldExpression2;
|
|
37927
|
-
}();
|
|
37927
|
+
})();
|
|
37928
37928
|
exports3.YieldExpression = YieldExpression;
|
|
37929
37929
|
},
|
|
37930
37930
|
/* 8 */
|
|
@@ -37940,7 +37940,7 @@ var require_esprima = __commonJS({
|
|
|
37940
37940
|
var syntax_1 = __webpack_require__(2);
|
|
37941
37941
|
var token_1 = __webpack_require__(13);
|
|
37942
37942
|
var ArrowParameterPlaceHolder = "ArrowParameterPlaceHolder";
|
|
37943
|
-
var Parser2 = function() {
|
|
37943
|
+
var Parser2 = (function() {
|
|
37944
37944
|
function Parser3(code, options, delegate) {
|
|
37945
37945
|
if (options === void 0) {
|
|
37946
37946
|
options = {};
|
|
@@ -40779,7 +40779,7 @@ var require_esprima = __commonJS({
|
|
|
40779
40779
|
return exportDeclaration;
|
|
40780
40780
|
};
|
|
40781
40781
|
return Parser3;
|
|
40782
|
-
}();
|
|
40782
|
+
})();
|
|
40783
40783
|
exports3.Parser = Parser2;
|
|
40784
40784
|
},
|
|
40785
40785
|
/* 9 */
|
|
@@ -40799,7 +40799,7 @@ var require_esprima = __commonJS({
|
|
|
40799
40799
|
function(module3, exports3) {
|
|
40800
40800
|
"use strict";
|
|
40801
40801
|
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
40802
|
-
var ErrorHandler = function() {
|
|
40802
|
+
var ErrorHandler = (function() {
|
|
40803
40803
|
function ErrorHandler2() {
|
|
40804
40804
|
this.errors = [];
|
|
40805
40805
|
this.tolerant = false;
|
|
@@ -40846,7 +40846,7 @@ var require_esprima = __commonJS({
|
|
|
40846
40846
|
}
|
|
40847
40847
|
};
|
|
40848
40848
|
return ErrorHandler2;
|
|
40849
|
-
}();
|
|
40849
|
+
})();
|
|
40850
40850
|
exports3.ErrorHandler = ErrorHandler;
|
|
40851
40851
|
},
|
|
40852
40852
|
/* 11 */
|
|
@@ -40929,7 +40929,7 @@ var require_esprima = __commonJS({
|
|
|
40929
40929
|
function octalValue(ch) {
|
|
40930
40930
|
return "01234567".indexOf(ch);
|
|
40931
40931
|
}
|
|
40932
|
-
var Scanner = function() {
|
|
40932
|
+
var Scanner = (function() {
|
|
40933
40933
|
function Scanner2(code, handler) {
|
|
40934
40934
|
this.source = code;
|
|
40935
40935
|
this.errorHandler = handler;
|
|
@@ -41943,7 +41943,7 @@ var require_esprima = __commonJS({
|
|
|
41943
41943
|
return this.scanPunctuator();
|
|
41944
41944
|
};
|
|
41945
41945
|
return Scanner2;
|
|
41946
|
-
}();
|
|
41946
|
+
})();
|
|
41947
41947
|
exports3.Scanner = Scanner;
|
|
41948
41948
|
},
|
|
41949
41949
|
/* 13 */
|
|
@@ -42261,7 +42261,7 @@ var require_esprima = __commonJS({
|
|
|
42261
42261
|
var error_handler_1 = __webpack_require__(10);
|
|
42262
42262
|
var scanner_1 = __webpack_require__(12);
|
|
42263
42263
|
var token_1 = __webpack_require__(13);
|
|
42264
|
-
var Reader = function() {
|
|
42264
|
+
var Reader = (function() {
|
|
42265
42265
|
function Reader2() {
|
|
42266
42266
|
this.values = [];
|
|
42267
42267
|
this.curly = this.paren = -1;
|
|
@@ -42366,15 +42366,15 @@ var require_esprima = __commonJS({
|
|
|
42366
42366
|
}
|
|
42367
42367
|
};
|
|
42368
42368
|
return Reader2;
|
|
42369
|
-
}();
|
|
42370
|
-
var Tokenizer = function() {
|
|
42371
|
-
function Tokenizer2(code,
|
|
42369
|
+
})();
|
|
42370
|
+
var Tokenizer = (function() {
|
|
42371
|
+
function Tokenizer2(code, config46) {
|
|
42372
42372
|
this.errorHandler = new error_handler_1.ErrorHandler();
|
|
42373
|
-
this.errorHandler.tolerant =
|
|
42373
|
+
this.errorHandler.tolerant = config46 ? typeof config46.tolerant === "boolean" && config46.tolerant : false;
|
|
42374
42374
|
this.scanner = new scanner_1.Scanner(code, this.errorHandler);
|
|
42375
|
-
this.scanner.trackComment =
|
|
42376
|
-
this.trackRange =
|
|
42377
|
-
this.trackLoc =
|
|
42375
|
+
this.scanner.trackComment = config46 ? typeof config46.comment === "boolean" && config46.comment : false;
|
|
42376
|
+
this.trackRange = config46 ? typeof config46.range === "boolean" && config46.range : false;
|
|
42377
|
+
this.trackLoc = config46 ? typeof config46.loc === "boolean" && config46.loc : false;
|
|
42378
42378
|
this.buffer = [];
|
|
42379
42379
|
this.reader = new Reader();
|
|
42380
42380
|
}
|
|
@@ -42440,7 +42440,7 @@ var require_esprima = __commonJS({
|
|
|
42440
42440
|
return this.buffer.shift();
|
|
42441
42441
|
};
|
|
42442
42442
|
return Tokenizer2;
|
|
42443
|
-
}();
|
|
42443
|
+
})();
|
|
42444
42444
|
exports3.Tokenizer = Tokenizer;
|
|
42445
42445
|
}
|
|
42446
42446
|
/******/
|
|
@@ -44896,7 +44896,7 @@ var init_tslib_es6 = __esm({
|
|
|
44896
44896
|
};
|
|
44897
44897
|
return __assign.apply(this, arguments);
|
|
44898
44898
|
};
|
|
44899
|
-
__createBinding = Object.create ? function(o, m2, k2, k22) {
|
|
44899
|
+
__createBinding = Object.create ? (function(o, m2, k2, k22) {
|
|
44900
44900
|
if (k22 === void 0) k22 = k2;
|
|
44901
44901
|
var desc = Object.getOwnPropertyDescriptor(m2, k2);
|
|
44902
44902
|
if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
|
|
@@ -44905,13 +44905,13 @@ var init_tslib_es6 = __esm({
|
|
|
44905
44905
|
} };
|
|
44906
44906
|
}
|
|
44907
44907
|
Object.defineProperty(o, k22, desc);
|
|
44908
|
-
} : function(o, m2, k2, k22) {
|
|
44908
|
+
}) : (function(o, m2, k2, k22) {
|
|
44909
44909
|
if (k22 === void 0) k22 = k2;
|
|
44910
44910
|
o[k22] = m2[k2];
|
|
44911
|
-
};
|
|
44912
|
-
__setModuleDefault = Object.create ? function(o, v2) {
|
|
44911
|
+
});
|
|
44912
|
+
__setModuleDefault = Object.create ? (function(o, v2) {
|
|
44913
44913
|
Object.defineProperty(o, "default", { enumerable: true, value: v2 });
|
|
44914
|
-
} : function(o, v2) {
|
|
44914
|
+
}) : function(o, v2) {
|
|
44915
44915
|
o["default"] = v2;
|
|
44916
44916
|
};
|
|
44917
44917
|
ownKeys = function(o) {
|
|
@@ -44975,7 +44975,7 @@ var require_types = __commonJS({
|
|
|
44975
44975
|
var hasOwn = Op.hasOwnProperty;
|
|
44976
44976
|
var BaseType = (
|
|
44977
44977
|
/** @class */
|
|
44978
|
-
function() {
|
|
44978
|
+
(function() {
|
|
44979
44979
|
function BaseType2() {
|
|
44980
44980
|
}
|
|
44981
44981
|
BaseType2.prototype.assert = function(value, deep) {
|
|
@@ -44990,11 +44990,11 @@ var require_types = __commonJS({
|
|
|
44990
44990
|
return new ArrayType(elemType);
|
|
44991
44991
|
};
|
|
44992
44992
|
return BaseType2;
|
|
44993
|
-
}()
|
|
44993
|
+
})()
|
|
44994
44994
|
);
|
|
44995
44995
|
var ArrayType = (
|
|
44996
44996
|
/** @class */
|
|
44997
|
-
function(_super) {
|
|
44997
|
+
(function(_super) {
|
|
44998
44998
|
(0, tslib_1.__extends)(ArrayType2, _super);
|
|
44999
44999
|
function ArrayType2(elemType) {
|
|
45000
45000
|
var _this = _super.call(this) || this;
|
|
@@ -45012,11 +45012,11 @@ var require_types = __commonJS({
|
|
|
45012
45012
|
});
|
|
45013
45013
|
};
|
|
45014
45014
|
return ArrayType2;
|
|
45015
|
-
}(BaseType)
|
|
45015
|
+
})(BaseType)
|
|
45016
45016
|
);
|
|
45017
45017
|
var IdentityType = (
|
|
45018
45018
|
/** @class */
|
|
45019
|
-
function(_super) {
|
|
45019
|
+
(function(_super) {
|
|
45020
45020
|
(0, tslib_1.__extends)(IdentityType2, _super);
|
|
45021
45021
|
function IdentityType2(value) {
|
|
45022
45022
|
var _this = _super.call(this) || this;
|
|
@@ -45035,11 +45035,11 @@ var require_types = __commonJS({
|
|
|
45035
45035
|
return result;
|
|
45036
45036
|
};
|
|
45037
45037
|
return IdentityType2;
|
|
45038
|
-
}(BaseType)
|
|
45038
|
+
})(BaseType)
|
|
45039
45039
|
);
|
|
45040
45040
|
var ObjectType = (
|
|
45041
45041
|
/** @class */
|
|
45042
|
-
function(_super) {
|
|
45042
|
+
(function(_super) {
|
|
45043
45043
|
(0, tslib_1.__extends)(ObjectType2, _super);
|
|
45044
45044
|
function ObjectType2(fields) {
|
|
45045
45045
|
var _this = _super.call(this) || this;
|
|
@@ -45056,11 +45056,11 @@ var require_types = __commonJS({
|
|
|
45056
45056
|
});
|
|
45057
45057
|
};
|
|
45058
45058
|
return ObjectType2;
|
|
45059
|
-
}(BaseType)
|
|
45059
|
+
})(BaseType)
|
|
45060
45060
|
);
|
|
45061
45061
|
var OrType = (
|
|
45062
45062
|
/** @class */
|
|
45063
|
-
function(_super) {
|
|
45063
|
+
(function(_super) {
|
|
45064
45064
|
(0, tslib_1.__extends)(OrType2, _super);
|
|
45065
45065
|
function OrType2(types12) {
|
|
45066
45066
|
var _this = _super.call(this) || this;
|
|
@@ -45077,11 +45077,11 @@ var require_types = __commonJS({
|
|
|
45077
45077
|
});
|
|
45078
45078
|
};
|
|
45079
45079
|
return OrType2;
|
|
45080
|
-
}(BaseType)
|
|
45080
|
+
})(BaseType)
|
|
45081
45081
|
);
|
|
45082
45082
|
var PredicateType = (
|
|
45083
45083
|
/** @class */
|
|
45084
|
-
function(_super) {
|
|
45084
|
+
(function(_super) {
|
|
45085
45085
|
(0, tslib_1.__extends)(PredicateType2, _super);
|
|
45086
45086
|
function PredicateType2(name3, predicate) {
|
|
45087
45087
|
var _this = _super.call(this) || this;
|
|
@@ -45101,11 +45101,11 @@ var require_types = __commonJS({
|
|
|
45101
45101
|
return result;
|
|
45102
45102
|
};
|
|
45103
45103
|
return PredicateType2;
|
|
45104
|
-
}(BaseType)
|
|
45104
|
+
})(BaseType)
|
|
45105
45105
|
);
|
|
45106
45106
|
var Def = (
|
|
45107
45107
|
/** @class */
|
|
45108
|
-
function() {
|
|
45108
|
+
(function() {
|
|
45109
45109
|
function Def2(type, typeName) {
|
|
45110
45110
|
this.type = type;
|
|
45111
45111
|
this.typeName = typeName;
|
|
@@ -45167,12 +45167,12 @@ var require_types = __commonJS({
|
|
|
45167
45167
|
return this;
|
|
45168
45168
|
};
|
|
45169
45169
|
return Def2;
|
|
45170
|
-
}()
|
|
45170
|
+
})()
|
|
45171
45171
|
);
|
|
45172
45172
|
exports2.Def = Def;
|
|
45173
45173
|
var Field = (
|
|
45174
45174
|
/** @class */
|
|
45175
|
-
function() {
|
|
45175
|
+
(function() {
|
|
45176
45176
|
function Field2(name3, type, defaultFn, hidden2) {
|
|
45177
45177
|
this.name = name3;
|
|
45178
45178
|
this.type = type;
|
|
@@ -45193,7 +45193,7 @@ var require_types = __commonJS({
|
|
|
45193
45193
|
return value;
|
|
45194
45194
|
};
|
|
45195
45195
|
return Field2;
|
|
45196
|
-
}()
|
|
45196
|
+
})()
|
|
45197
45197
|
);
|
|
45198
45198
|
function shallowStringify(value) {
|
|
45199
45199
|
if (Array.isArray(value)) {
|
|
@@ -45314,7 +45314,7 @@ var require_types = __commonJS({
|
|
|
45314
45314
|
}
|
|
45315
45315
|
var DefImpl = (
|
|
45316
45316
|
/** @class */
|
|
45317
|
-
function(_super) {
|
|
45317
|
+
(function(_super) {
|
|
45318
45318
|
(0, tslib_1.__extends)(DefImpl2, _super);
|
|
45319
45319
|
function DefImpl2(typeName) {
|
|
45320
45320
|
var _this = _super.call(this, new PredicateType(typeName, function(value, deep) {
|
|
@@ -45478,7 +45478,7 @@ var require_types = __commonJS({
|
|
|
45478
45478
|
}
|
|
45479
45479
|
};
|
|
45480
45480
|
return DefImpl2;
|
|
45481
|
-
}(Def)
|
|
45481
|
+
})(Def)
|
|
45482
45482
|
);
|
|
45483
45483
|
function getSupertypeNames(typeName) {
|
|
45484
45484
|
if (!hasOwn.call(defCache, typeName)) {
|
|
@@ -48550,10 +48550,10 @@ var require_util8 = __commonJS({
|
|
|
48550
48550
|
return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
|
|
48551
48551
|
}
|
|
48552
48552
|
exports2.relative = relative3;
|
|
48553
|
-
var supportsNullProto = function() {
|
|
48553
|
+
var supportsNullProto = (function() {
|
|
48554
48554
|
var obj = /* @__PURE__ */ Object.create(null);
|
|
48555
48555
|
return !("__proto__" in obj);
|
|
48556
|
-
}();
|
|
48556
|
+
})();
|
|
48557
48557
|
function identity(s) {
|
|
48558
48558
|
return s;
|
|
48559
48559
|
}
|
|
@@ -50437,7 +50437,7 @@ var require_mapping = __commonJS({
|
|
|
50437
50437
|
var util_1 = require_util9();
|
|
50438
50438
|
var Mapping = (
|
|
50439
50439
|
/** @class */
|
|
50440
|
-
function() {
|
|
50440
|
+
(function() {
|
|
50441
50441
|
function Mapping2(sourceLines, sourceLoc, targetLoc) {
|
|
50442
50442
|
if (targetLoc === void 0) {
|
|
50443
50443
|
targetLoc = sourceLoc;
|
|
@@ -50559,7 +50559,7 @@ var require_mapping = __commonJS({
|
|
|
50559
50559
|
return new Mapping2(this.sourceLines, this.sourceLoc, targetLoc);
|
|
50560
50560
|
};
|
|
50561
50561
|
return Mapping2;
|
|
50562
|
-
}()
|
|
50562
|
+
})()
|
|
50563
50563
|
);
|
|
50564
50564
|
exports2.default = Mapping;
|
|
50565
50565
|
function addPos(toPos, line, column) {
|
|
@@ -50632,7 +50632,7 @@ var require_lines = __commonJS({
|
|
|
50632
50632
|
var mapping_1 = tslib_1.__importDefault(require_mapping());
|
|
50633
50633
|
var Lines = (
|
|
50634
50634
|
/** @class */
|
|
50635
|
-
function() {
|
|
50635
|
+
(function() {
|
|
50636
50636
|
function Lines2(infos, sourceFileName) {
|
|
50637
50637
|
if (sourceFileName === void 0) {
|
|
50638
50638
|
sourceFileName = null;
|
|
@@ -51120,7 +51120,7 @@ var require_lines = __commonJS({
|
|
|
51120
51120
|
return emptyLines.join(list);
|
|
51121
51121
|
};
|
|
51122
51122
|
return Lines2;
|
|
51123
|
-
}()
|
|
51123
|
+
})()
|
|
51124
51124
|
);
|
|
51125
51125
|
exports2.Lines = Lines;
|
|
51126
51126
|
var fromStringCache = {};
|
|
@@ -52460,11 +52460,11 @@ var require_printer = __commonJS({
|
|
|
52460
52460
|
return this.code;
|
|
52461
52461
|
};
|
|
52462
52462
|
var emptyPrintResult = new PrintResult("");
|
|
52463
|
-
var Printer = function Printer2(
|
|
52463
|
+
var Printer = function Printer2(config46) {
|
|
52464
52464
|
assert_1.default.ok(this instanceof Printer2);
|
|
52465
|
-
var explicitTabWidth =
|
|
52466
|
-
|
|
52467
|
-
|
|
52465
|
+
var explicitTabWidth = config46 && config46.tabWidth;
|
|
52466
|
+
config46 = options_1.normalize(config46);
|
|
52467
|
+
config46.sourceFileName = null;
|
|
52468
52468
|
function makePrintFunctionWith(options, overrides) {
|
|
52469
52469
|
options = Object.assign({}, options, overrides);
|
|
52470
52470
|
return function(path6) {
|
|
@@ -52479,11 +52479,11 @@ var require_printer = __commonJS({
|
|
|
52479
52479
|
includeComments: false
|
|
52480
52480
|
}));
|
|
52481
52481
|
}
|
|
52482
|
-
var oldTabWidth =
|
|
52482
|
+
var oldTabWidth = config46.tabWidth;
|
|
52483
52483
|
if (!explicitTabWidth) {
|
|
52484
52484
|
var loc = path6.getNode().loc;
|
|
52485
52485
|
if (loc && loc.lines && loc.lines.guessTabWidth) {
|
|
52486
|
-
|
|
52486
|
+
config46.tabWidth = loc.lines.guessTabWidth();
|
|
52487
52487
|
}
|
|
52488
52488
|
}
|
|
52489
52489
|
var reprinter = patcher_1.getReprinter(path6);
|
|
@@ -52497,11 +52497,11 @@ var require_printer = __commonJS({
|
|
|
52497
52497
|
// right choice because it gives us the opportunity to reprint
|
|
52498
52498
|
// such nodes using their original source.
|
|
52499
52499
|
reprinter(print2)
|
|
52500
|
-
) : genericPrint(path6,
|
|
52500
|
+
) : genericPrint(path6, config46, options, makePrintFunctionWith(options, {
|
|
52501
52501
|
includeComments: true,
|
|
52502
52502
|
avoidRootParens: false
|
|
52503
52503
|
}));
|
|
52504
|
-
|
|
52504
|
+
config46.tabWidth = oldTabWidth;
|
|
52505
52505
|
return lines;
|
|
52506
52506
|
}
|
|
52507
52507
|
this.print = function(ast) {
|
|
@@ -52512,7 +52512,7 @@ var require_printer = __commonJS({
|
|
|
52512
52512
|
includeComments: true,
|
|
52513
52513
|
avoidRootParens: false
|
|
52514
52514
|
});
|
|
52515
|
-
return new PrintResult(lines.toString(
|
|
52515
|
+
return new PrintResult(lines.toString(config46), util.composeSourceMaps(config46.inputSourceMap, lines.getSourceMap(config46.sourceMapName, config46.sourceRoot)));
|
|
52516
52516
|
};
|
|
52517
52517
|
this.printGenerically = function(ast) {
|
|
52518
52518
|
if (!ast) {
|
|
@@ -52520,26 +52520,26 @@ var require_printer = __commonJS({
|
|
|
52520
52520
|
}
|
|
52521
52521
|
function printGenerically(path7) {
|
|
52522
52522
|
return comments_1.printComments(path7, function(path8) {
|
|
52523
|
-
return genericPrint(path8,
|
|
52523
|
+
return genericPrint(path8, config46, {
|
|
52524
52524
|
includeComments: true,
|
|
52525
52525
|
avoidRootParens: false
|
|
52526
52526
|
}, printGenerically);
|
|
52527
52527
|
});
|
|
52528
52528
|
}
|
|
52529
52529
|
var path6 = fast_path_1.default.from(ast);
|
|
52530
|
-
var oldReuseWhitespace =
|
|
52531
|
-
|
|
52532
|
-
var pr = new PrintResult(printGenerically(path6).toString(
|
|
52533
|
-
|
|
52530
|
+
var oldReuseWhitespace = config46.reuseWhitespace;
|
|
52531
|
+
config46.reuseWhitespace = false;
|
|
52532
|
+
var pr = new PrintResult(printGenerically(path6).toString(config46));
|
|
52533
|
+
config46.reuseWhitespace = oldReuseWhitespace;
|
|
52534
52534
|
return pr;
|
|
52535
52535
|
};
|
|
52536
52536
|
};
|
|
52537
52537
|
exports2.Printer = Printer;
|
|
52538
|
-
function genericPrint(path6,
|
|
52538
|
+
function genericPrint(path6, config46, options, printPath) {
|
|
52539
52539
|
assert_1.default.ok(path6 instanceof fast_path_1.default);
|
|
52540
52540
|
var node = path6.getValue();
|
|
52541
52541
|
var parts = [];
|
|
52542
|
-
var linesWithoutParens = genericPrintNoParens(path6,
|
|
52542
|
+
var linesWithoutParens = genericPrintNoParens(path6, config46, printPath);
|
|
52543
52543
|
if (!node || linesWithoutParens.isEmpty()) {
|
|
52544
52544
|
return linesWithoutParens;
|
|
52545
52545
|
}
|
|
@@ -68725,7 +68725,7 @@ var require_babel2 = __commonJS({
|
|
|
68725
68725
|
exports2.parse = exports2.parser = void 0;
|
|
68726
68726
|
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
68727
68727
|
var _babel_options_1 = tslib_1.__importDefault(require_babel_options());
|
|
68728
|
-
exports2.parser = function() {
|
|
68728
|
+
exports2.parser = (function() {
|
|
68729
68729
|
try {
|
|
68730
68730
|
return require_lib();
|
|
68731
68731
|
} catch (_a2) {
|
|
@@ -68735,7 +68735,7 @@ var require_babel2 = __commonJS({
|
|
|
68735
68735
|
throw new Error("Install @babel/parser to use the `typescript`, `flow`, or `babel` parsers");
|
|
68736
68736
|
}
|
|
68737
68737
|
}
|
|
68738
|
-
}();
|
|
68738
|
+
})();
|
|
68739
68739
|
function parse7(source, options) {
|
|
68740
68740
|
var babelOptions = _babel_options_1.default(options);
|
|
68741
68741
|
babelOptions.plugins.push("jsx", "flow");
|
|
@@ -70089,12 +70089,12 @@ __export(cli_exports, {
|
|
|
70089
70089
|
setupProjectDirectory: () => setupProjectDirectory
|
|
70090
70090
|
});
|
|
70091
70091
|
module.exports = __toCommonJS(cli_exports);
|
|
70092
|
-
var
|
|
70093
|
-
var
|
|
70094
|
-
var
|
|
70092
|
+
var import_node_fs14 = require("node:fs");
|
|
70093
|
+
var import_node_path18 = require("node:path");
|
|
70094
|
+
var import_node_process7 = require("node:process");
|
|
70095
70095
|
|
|
70096
70096
|
// ../cli/index.ts
|
|
70097
|
-
var
|
|
70097
|
+
var import_node_process2 = require("node:process");
|
|
70098
70098
|
|
|
70099
70099
|
// ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
70100
70100
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
@@ -70821,7 +70821,7 @@ var hyperlink = (url, label = url) => {
|
|
|
70821
70821
|
};
|
|
70822
70822
|
var crash = (msg, extra) => {
|
|
70823
70823
|
error(msg, extra);
|
|
70824
|
-
(0,
|
|
70824
|
+
(0, import_node_process2.exit)(1);
|
|
70825
70825
|
};
|
|
70826
70826
|
var error = (msg, extra, corner = shapes.corners.bl) => {
|
|
70827
70827
|
const currentLevel = getLogLevel();
|
|
@@ -70843,7 +70843,7 @@ var CancelError = class extends Error {
|
|
|
70843
70843
|
|
|
70844
70844
|
// ../../node_modules/.pnpm/@clack+core@0.3.2/node_modules/@clack/core/dist/index.mjs
|
|
70845
70845
|
var import_sisteransi = __toESM(require_src(), 1);
|
|
70846
|
-
var
|
|
70846
|
+
var import_node_process3 = require("node:process");
|
|
70847
70847
|
var import_node_readline = __toESM(require("node:readline"), 1);
|
|
70848
70848
|
var import_node_tty2 = require("node:tty");
|
|
70849
70849
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
@@ -71049,7 +71049,7 @@ function g(t2, u) {
|
|
|
71049
71049
|
var V = /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"]]);
|
|
71050
71050
|
var tD = /* @__PURE__ */ new Set(["up", "down", "left", "right", "space", "enter"]);
|
|
71051
71051
|
var h = class {
|
|
71052
|
-
constructor({ render: u, input: F =
|
|
71052
|
+
constructor({ render: u, input: F = import_node_process3.stdin, output: e = import_node_process3.stdout, ...s }, C = true) {
|
|
71053
71053
|
this._track = false, this._cursor = 0, this.state = "initial", this.error = "", this.subscribers = /* @__PURE__ */ new Map(), this._prevFrame = "", this.opts = s, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = u.bind(this), this._track = C, this.input = F, this.output = e;
|
|
71054
71054
|
}
|
|
71055
71055
|
prompt() {
|
|
@@ -71217,7 +71217,7 @@ var oD = class extends h {
|
|
|
71217
71217
|
};
|
|
71218
71218
|
|
|
71219
71219
|
// ../../node_modules/.pnpm/log-update@5.0.1/node_modules/log-update/index.js
|
|
71220
|
-
var
|
|
71220
|
+
var import_node_process6 = __toESM(require("node:process"), 1);
|
|
71221
71221
|
|
|
71222
71222
|
// ../../node_modules/.pnpm/ansi-escapes@5.0.0/node_modules/ansi-escapes/index.js
|
|
71223
71223
|
var ESC = "\x1B[";
|
|
@@ -71342,15 +71342,15 @@ ansiEscapes.iTerm = {
|
|
|
71342
71342
|
var ansi_escapes_default = ansiEscapes;
|
|
71343
71343
|
|
|
71344
71344
|
// ../../node_modules/.pnpm/cli-cursor@4.0.0/node_modules/cli-cursor/index.js
|
|
71345
|
-
var
|
|
71345
|
+
var import_node_process5 = __toESM(require("node:process"), 1);
|
|
71346
71346
|
|
|
71347
71347
|
// ../../node_modules/.pnpm/restore-cursor@4.0.0/node_modules/restore-cursor/index.js
|
|
71348
|
-
var
|
|
71348
|
+
var import_node_process4 = __toESM(require("node:process"), 1);
|
|
71349
71349
|
var import_onetime = __toESM(require_onetime(), 1);
|
|
71350
71350
|
var import_signal_exit = __toESM(require_signal_exit(), 1);
|
|
71351
71351
|
var restoreCursor = (0, import_onetime.default)(() => {
|
|
71352
71352
|
(0, import_signal_exit.default)(() => {
|
|
71353
|
-
|
|
71353
|
+
import_node_process4.default.stderr.write("\x1B[?25h");
|
|
71354
71354
|
}, { alwaysLast: true });
|
|
71355
71355
|
});
|
|
71356
71356
|
var restore_cursor_default = restoreCursor;
|
|
@@ -71358,14 +71358,14 @@ var restore_cursor_default = restoreCursor;
|
|
|
71358
71358
|
// ../../node_modules/.pnpm/cli-cursor@4.0.0/node_modules/cli-cursor/index.js
|
|
71359
71359
|
var isHidden = false;
|
|
71360
71360
|
var cliCursor = {};
|
|
71361
|
-
cliCursor.show = (writableStream =
|
|
71361
|
+
cliCursor.show = (writableStream = import_node_process5.default.stderr) => {
|
|
71362
71362
|
if (!writableStream.isTTY) {
|
|
71363
71363
|
return;
|
|
71364
71364
|
}
|
|
71365
71365
|
isHidden = false;
|
|
71366
71366
|
writableStream.write("\x1B[?25h");
|
|
71367
71367
|
};
|
|
71368
|
-
cliCursor.hide = (writableStream =
|
|
71368
|
+
cliCursor.hide = (writableStream = import_node_process5.default.stderr) => {
|
|
71369
71369
|
if (!writableStream.isTTY) {
|
|
71370
71370
|
return;
|
|
71371
71371
|
}
|
|
@@ -71949,8 +71949,8 @@ function createLogUpdate(stream, { showCursor = false } = {}) {
|
|
|
71949
71949
|
};
|
|
71950
71950
|
return render;
|
|
71951
71951
|
}
|
|
71952
|
-
var logUpdate = createLogUpdate(
|
|
71953
|
-
var logUpdateStderr = createLogUpdate(
|
|
71952
|
+
var logUpdate = createLogUpdate(import_node_process6.default.stdout);
|
|
71953
|
+
var logUpdateStderr = createLogUpdate(import_node_process6.default.stderr);
|
|
71954
71954
|
|
|
71955
71955
|
// ../cli/select-list.ts
|
|
71956
71956
|
var SelectRefreshablePrompt = class extends h {
|
|
@@ -72119,33 +72119,33 @@ var inputPrompt = async (promptConfig) => {
|
|
|
72119
72119
|
}
|
|
72120
72120
|
return input;
|
|
72121
72121
|
};
|
|
72122
|
-
var renderSubmit = (
|
|
72123
|
-
const { question, label } =
|
|
72124
|
-
if (
|
|
72122
|
+
var renderSubmit = (config46, value) => {
|
|
72123
|
+
const { question, label } = config46;
|
|
72124
|
+
if (config46.type !== "confirm" && !value) {
|
|
72125
72125
|
return [`${leftT} ${question} ${dim("(skipped)")}`, `${grayBar}`];
|
|
72126
72126
|
}
|
|
72127
|
-
const content =
|
|
72127
|
+
const content = config46.type === "confirm" ? `${grayBar} ${brandColor(value)} ${dim(label)}` : `${grayBar} ${brandColor(label)} ${dim(value)}`;
|
|
72128
72128
|
return [`${leftT} ${question}`, content, `${grayBar}`];
|
|
72129
72129
|
};
|
|
72130
|
-
var getRenderers = (
|
|
72131
|
-
switch (
|
|
72130
|
+
var getRenderers = (config46) => {
|
|
72131
|
+
switch (config46.type) {
|
|
72132
72132
|
case "select":
|
|
72133
|
-
return getSelectRenderers(
|
|
72133
|
+
return getSelectRenderers(config46);
|
|
72134
72134
|
case "confirm":
|
|
72135
|
-
return getConfirmRenderers(
|
|
72135
|
+
return getConfirmRenderers(config46);
|
|
72136
72136
|
case "text":
|
|
72137
|
-
return getTextRenderers(
|
|
72137
|
+
return getTextRenderers(config46);
|
|
72138
72138
|
case "multiselect":
|
|
72139
|
-
return getSelectRenderers(
|
|
72139
|
+
return getSelectRenderers(config46);
|
|
72140
72140
|
case "list":
|
|
72141
|
-
return getSelectListRenderers(
|
|
72141
|
+
return getSelectListRenderers(config46);
|
|
72142
72142
|
}
|
|
72143
72143
|
};
|
|
72144
|
-
var getTextRenderers = (
|
|
72145
|
-
const { question } =
|
|
72146
|
-
const helpText =
|
|
72147
|
-
const format5 =
|
|
72148
|
-
const defaultValue =
|
|
72144
|
+
var getTextRenderers = (config46) => {
|
|
72145
|
+
const { question } = config46;
|
|
72146
|
+
const helpText = config46.helpText ?? "";
|
|
72147
|
+
const format5 = config46.format ?? ((val) => String(val));
|
|
72148
|
+
const defaultValue = config46.defaultValue?.toString() ?? "";
|
|
72149
72149
|
const activeRenderer = (props) => {
|
|
72150
72150
|
const { valueWithCursor } = props;
|
|
72151
72151
|
return [
|
|
@@ -72171,14 +72171,14 @@ var getTextRenderers = (config45) => {
|
|
|
72171
72171
|
``
|
|
72172
72172
|
// extra line for readability
|
|
72173
72173
|
],
|
|
72174
|
-
submit: ({ value }) => renderSubmit(
|
|
72174
|
+
submit: ({ value }) => renderSubmit(config46, format5(value ?? "")),
|
|
72175
72175
|
cancel: activeRenderer
|
|
72176
72176
|
};
|
|
72177
72177
|
};
|
|
72178
|
-
var getSelectRenderers = (
|
|
72179
|
-
const { options, question, helpText: _helpText } =
|
|
72178
|
+
var getSelectRenderers = (config46) => {
|
|
72179
|
+
const { options, question, helpText: _helpText } = config46;
|
|
72180
72180
|
const helpText = _helpText ?? "";
|
|
72181
|
-
const maxItemsPerPage =
|
|
72181
|
+
const maxItemsPerPage = config46.maxItemsPerPage ?? 32;
|
|
72182
72182
|
const defaultRenderer = ({ cursor = 0, value }) => {
|
|
72183
72183
|
const renderOption = (opt, i) => {
|
|
72184
72184
|
const { label: optionLabel, value: optionValue } = opt;
|
|
@@ -72253,21 +72253,21 @@ ${space(2)}${dim("...")}` : ""}`,
|
|
|
72253
72253
|
submit: ({ value }) => {
|
|
72254
72254
|
if (Array.isArray(value)) {
|
|
72255
72255
|
return renderSubmit(
|
|
72256
|
-
|
|
72256
|
+
config46,
|
|
72257
72257
|
options.filter((o) => value.includes(o.value)).map((o) => o.label).join(", ")
|
|
72258
72258
|
);
|
|
72259
72259
|
}
|
|
72260
72260
|
return renderSubmit(
|
|
72261
|
-
|
|
72261
|
+
config46,
|
|
72262
72262
|
options.find((o) => o.value === value)?.label
|
|
72263
72263
|
);
|
|
72264
72264
|
},
|
|
72265
72265
|
cancel: defaultRenderer
|
|
72266
72266
|
};
|
|
72267
72267
|
};
|
|
72268
|
-
var getSelectListRenderers = (
|
|
72269
|
-
const { question, helpText: _helpText } =
|
|
72270
|
-
let options =
|
|
72268
|
+
var getSelectListRenderers = (config46) => {
|
|
72269
|
+
const { question, helpText: _helpText } = config46;
|
|
72270
|
+
let options = config46.options;
|
|
72271
72271
|
const helpText = _helpText ?? "";
|
|
72272
72272
|
const { rows } = stdout;
|
|
72273
72273
|
const defaultRenderer = ({ cursor, value }, prompt) => {
|
|
@@ -72348,20 +72348,20 @@ var getSelectListRenderers = (config45) => {
|
|
|
72348
72348
|
submit: ({ value }) => {
|
|
72349
72349
|
if (Array.isArray(value)) {
|
|
72350
72350
|
return renderSubmit(
|
|
72351
|
-
|
|
72351
|
+
config46,
|
|
72352
72352
|
options.filter((o) => value.includes(o.value)).map((o) => o.value).join(", ")
|
|
72353
72353
|
);
|
|
72354
72354
|
}
|
|
72355
72355
|
return renderSubmit(
|
|
72356
|
-
|
|
72356
|
+
config46,
|
|
72357
72357
|
options.find((o) => o.value === value)?.value
|
|
72358
72358
|
);
|
|
72359
72359
|
},
|
|
72360
72360
|
cancel: defaultRenderer
|
|
72361
72361
|
};
|
|
72362
72362
|
};
|
|
72363
|
-
var getConfirmRenderers = (
|
|
72364
|
-
const { activeText, inactiveText, question, helpText: _helpText } =
|
|
72363
|
+
var getConfirmRenderers = (config46) => {
|
|
72364
|
+
const { activeText, inactiveText, question, helpText: _helpText } = config46;
|
|
72365
72365
|
const helpText = _helpText ?? "";
|
|
72366
72366
|
const active = activeText || "Yes";
|
|
72367
72367
|
const inactive = inactiveText || "No";
|
|
@@ -72378,7 +72378,7 @@ var getConfirmRenderers = (config45) => {
|
|
|
72378
72378
|
active: defaultRenderer,
|
|
72379
72379
|
confirm: defaultRenderer,
|
|
72380
72380
|
error: defaultRenderer,
|
|
72381
|
-
submit: ({ value }) => renderSubmit(
|
|
72381
|
+
submit: ({ value }) => renderSubmit(config46, value ? "yes" : "no"),
|
|
72382
72382
|
cancel: defaultRenderer
|
|
72383
72383
|
};
|
|
72384
72384
|
};
|
|
@@ -73346,23 +73346,23 @@ var YargsParser = class {
|
|
|
73346
73346
|
const configPath = argv2[configKey] || configLookup[configKey];
|
|
73347
73347
|
if (configPath) {
|
|
73348
73348
|
try {
|
|
73349
|
-
let
|
|
73349
|
+
let config46 = null;
|
|
73350
73350
|
const resolvedConfigPath = mixin2.resolve(mixin2.cwd(), configPath);
|
|
73351
73351
|
const resolveConfig = flags.configs[configKey];
|
|
73352
73352
|
if (typeof resolveConfig === "function") {
|
|
73353
73353
|
try {
|
|
73354
|
-
|
|
73354
|
+
config46 = resolveConfig(resolvedConfigPath);
|
|
73355
73355
|
} catch (e) {
|
|
73356
|
-
|
|
73356
|
+
config46 = e;
|
|
73357
73357
|
}
|
|
73358
|
-
if (
|
|
73359
|
-
error2 =
|
|
73358
|
+
if (config46 instanceof Error) {
|
|
73359
|
+
error2 = config46;
|
|
73360
73360
|
return;
|
|
73361
73361
|
}
|
|
73362
73362
|
} else {
|
|
73363
|
-
|
|
73363
|
+
config46 = mixin2.require(resolvedConfigPath);
|
|
73364
73364
|
}
|
|
73365
|
-
setConfigObject(
|
|
73365
|
+
setConfigObject(config46);
|
|
73366
73366
|
} catch (ex) {
|
|
73367
73367
|
if (ex.name === "PermissionDenied")
|
|
73368
73368
|
error2 = ex;
|
|
@@ -73372,9 +73372,9 @@ var YargsParser = class {
|
|
|
73372
73372
|
}
|
|
73373
73373
|
});
|
|
73374
73374
|
}
|
|
73375
|
-
function setConfigObject(
|
|
73376
|
-
Object.keys(
|
|
73377
|
-
const value =
|
|
73375
|
+
function setConfigObject(config46, prev) {
|
|
73376
|
+
Object.keys(config46).forEach(function(key) {
|
|
73377
|
+
const value = config46[key];
|
|
73378
73378
|
const fullKey = prev ? prev + "." + key : key;
|
|
73379
73379
|
if (typeof value === "object" && value !== null && !Array.isArray(value) && configuration["dot-notation"]) {
|
|
73380
73380
|
setConfigObject(value, fullKey);
|
|
@@ -74526,11 +74526,11 @@ var CommandInstance = class {
|
|
|
74526
74526
|
});
|
|
74527
74527
|
if (!unparsed.length)
|
|
74528
74528
|
return;
|
|
74529
|
-
const
|
|
74529
|
+
const config46 = Object.assign({}, options.configuration, {
|
|
74530
74530
|
"populate--": false
|
|
74531
74531
|
});
|
|
74532
74532
|
const parsed = this.shim.Parser.detailed(unparsed, Object.assign({}, options, {
|
|
74533
|
-
configuration:
|
|
74533
|
+
configuration: config46
|
|
74534
74534
|
}));
|
|
74535
74535
|
if (parsed.error) {
|
|
74536
74536
|
yargs.getInternalMethods().getUsageInstance().fail(parsed.error.message, parsed.error);
|
|
@@ -75753,31 +75753,31 @@ ${customMsgs.join("\n")}` : "";
|
|
|
75753
75753
|
// ../../node_modules/.pnpm/yargs@17.7.2/node_modules/yargs/build/lib/utils/apply-extends.js
|
|
75754
75754
|
var previouslyVisitedConfigs = [];
|
|
75755
75755
|
var shim2;
|
|
75756
|
-
function applyExtends(
|
|
75756
|
+
function applyExtends(config46, cwd, mergeExtends, _shim) {
|
|
75757
75757
|
shim2 = _shim;
|
|
75758
75758
|
let defaultConfig = {};
|
|
75759
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
75760
|
-
if (typeof
|
|
75759
|
+
if (Object.prototype.hasOwnProperty.call(config46, "extends")) {
|
|
75760
|
+
if (typeof config46.extends !== "string")
|
|
75761
75761
|
return defaultConfig;
|
|
75762
|
-
const isPath = /\.json|\..*rc$/.test(
|
|
75762
|
+
const isPath = /\.json|\..*rc$/.test(config46.extends);
|
|
75763
75763
|
let pathToDefault = null;
|
|
75764
75764
|
if (!isPath) {
|
|
75765
75765
|
try {
|
|
75766
|
-
pathToDefault = require.resolve(
|
|
75766
|
+
pathToDefault = require.resolve(config46.extends);
|
|
75767
75767
|
} catch (_err) {
|
|
75768
|
-
return
|
|
75768
|
+
return config46;
|
|
75769
75769
|
}
|
|
75770
75770
|
} else {
|
|
75771
|
-
pathToDefault = getPathToDefaultConfig(cwd,
|
|
75771
|
+
pathToDefault = getPathToDefaultConfig(cwd, config46.extends);
|
|
75772
75772
|
}
|
|
75773
75773
|
checkForCircularExtends(pathToDefault);
|
|
75774
75774
|
previouslyVisitedConfigs.push(pathToDefault);
|
|
75775
|
-
defaultConfig = isPath ? JSON.parse(shim2.readFileSync(pathToDefault, "utf8")) : require(
|
|
75776
|
-
delete
|
|
75775
|
+
defaultConfig = isPath ? JSON.parse(shim2.readFileSync(pathToDefault, "utf8")) : require(config46.extends);
|
|
75776
|
+
delete config46.extends;
|
|
75777
75777
|
defaultConfig = applyExtends(defaultConfig, shim2.path.dirname(pathToDefault), mergeExtends, shim2);
|
|
75778
75778
|
}
|
|
75779
75779
|
previouslyVisitedConfigs = [];
|
|
75780
|
-
return mergeExtends ? mergeDeep(defaultConfig,
|
|
75780
|
+
return mergeExtends ? mergeDeep(defaultConfig, config46) : Object.assign({}, defaultConfig, config46);
|
|
75781
75781
|
}
|
|
75782
75782
|
function checkForCircularExtends(cfgPath) {
|
|
75783
75783
|
if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) {
|
|
@@ -76553,9 +76553,9 @@ var YargsInstance = class {
|
|
|
76553
76553
|
}
|
|
76554
76554
|
return maybePromise;
|
|
76555
76555
|
}
|
|
76556
|
-
parserConfiguration(
|
|
76557
|
-
argsert("<object>", [
|
|
76558
|
-
__classPrivateFieldSet(this, _YargsInstance_parserConfig,
|
|
76556
|
+
parserConfiguration(config46) {
|
|
76557
|
+
argsert("<object>", [config46], arguments.length);
|
|
76558
|
+
__classPrivateFieldSet(this, _YargsInstance_parserConfig, config46, "f");
|
|
76559
76559
|
return this;
|
|
76560
76560
|
}
|
|
76561
76561
|
pkgConf(key, rootPath) {
|
|
@@ -76727,9 +76727,9 @@ var YargsInstance = class {
|
|
|
76727
76727
|
return this;
|
|
76728
76728
|
}
|
|
76729
76729
|
}
|
|
76730
|
-
usageConfiguration(
|
|
76731
|
-
argsert("<object>", [
|
|
76732
|
-
__classPrivateFieldSet(this, _YargsInstance_usageConfig,
|
|
76730
|
+
usageConfiguration(config46) {
|
|
76731
|
+
argsert("<object>", [config46], arguments.length);
|
|
76732
|
+
__classPrivateFieldSet(this, _YargsInstance_usageConfig, config46, "f");
|
|
76733
76733
|
return this;
|
|
76734
76734
|
}
|
|
76735
76735
|
version(opt, msg, ver) {
|
|
@@ -77135,11 +77135,11 @@ var YargsInstance = class {
|
|
|
77135
77135
|
__classPrivateFieldGet(this, _YargsInstance_options, "f").__ = __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__;
|
|
77136
77136
|
__classPrivateFieldGet(this, _YargsInstance_options, "f").configuration = this[kGetParserConfiguration]();
|
|
77137
77137
|
const populateDoubleDash = !!__classPrivateFieldGet(this, _YargsInstance_options, "f").configuration["populate--"];
|
|
77138
|
-
const
|
|
77138
|
+
const config46 = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, {
|
|
77139
77139
|
"populate--": true
|
|
77140
77140
|
});
|
|
77141
77141
|
const parsed = __classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.detailed(args, Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f"), {
|
|
77142
|
-
configuration: { "parse-positional-numbers": false, ...
|
|
77142
|
+
configuration: { "parse-positional-numbers": false, ...config46 }
|
|
77143
77143
|
}));
|
|
77144
77144
|
const argv = Object.assign(parsed.argv, __classPrivateFieldGet(this, _YargsInstance_parseContext, "f"));
|
|
77145
77145
|
let argvPromise = void 0;
|
|
@@ -77302,7 +77302,7 @@ var Yargs = YargsFactory(esm_default);
|
|
|
77302
77302
|
var yargs_default = Yargs;
|
|
77303
77303
|
|
|
77304
77304
|
// package.json
|
|
77305
|
-
var version = "2.
|
|
77305
|
+
var version = "2.57.0";
|
|
77306
77306
|
|
|
77307
77307
|
// src/metrics.ts
|
|
77308
77308
|
var import_node_async_hooks = require("node:async_hooks");
|
|
@@ -77346,12 +77346,12 @@ function getGlobalWranglerConfigPath() {
|
|
|
77346
77346
|
}
|
|
77347
77347
|
|
|
77348
77348
|
// src/helpers/metrics-config.ts
|
|
77349
|
-
function writeMetricsConfig(
|
|
77349
|
+
function writeMetricsConfig(config46) {
|
|
77350
77350
|
(0, import_node_fs2.mkdirSync)(import_node_path2.default.dirname(getMetricsConfigPath()), { recursive: true });
|
|
77351
77351
|
(0, import_node_fs2.writeFileSync)(
|
|
77352
77352
|
getMetricsConfigPath(),
|
|
77353
77353
|
JSON.stringify(
|
|
77354
|
-
|
|
77354
|
+
config46,
|
|
77355
77355
|
(_key, value) => value instanceof Date ? value.toISOString() : value,
|
|
77356
77356
|
" "
|
|
77357
77357
|
)
|
|
@@ -77359,9 +77359,9 @@ function writeMetricsConfig(config45) {
|
|
|
77359
77359
|
}
|
|
77360
77360
|
function readMetricsConfig() {
|
|
77361
77361
|
try {
|
|
77362
|
-
const
|
|
77362
|
+
const config46 = (0, import_node_fs2.readFileSync)(getMetricsConfigPath(), "utf8");
|
|
77363
77363
|
return JSON.parse(
|
|
77364
|
-
|
|
77364
|
+
config46,
|
|
77365
77365
|
(key, value) => key === "date" ? new Date(value) : value
|
|
77366
77366
|
);
|
|
77367
77367
|
} catch {
|
|
@@ -77371,17 +77371,17 @@ function readMetricsConfig() {
|
|
|
77371
77371
|
function getMetricsConfigPath() {
|
|
77372
77372
|
return import_node_path2.default.resolve(getGlobalWranglerConfigPath(), "metrics.json");
|
|
77373
77373
|
}
|
|
77374
|
-
function getDeviceId(
|
|
77375
|
-
const deviceId =
|
|
77376
|
-
if (
|
|
77377
|
-
writeMetricsConfig({ ...
|
|
77374
|
+
function getDeviceId(config46) {
|
|
77375
|
+
const deviceId = config46.deviceId ?? (0, import_node_crypto.randomUUID)();
|
|
77376
|
+
if (config46.deviceId === void 0) {
|
|
77377
|
+
writeMetricsConfig({ ...config46, deviceId });
|
|
77378
77378
|
}
|
|
77379
77379
|
return deviceId;
|
|
77380
77380
|
}
|
|
77381
77381
|
|
|
77382
77382
|
// src/helpers/packageManagers.ts
|
|
77383
|
-
var
|
|
77384
|
-
var
|
|
77383
|
+
var import_node_fs3 = require("node:fs");
|
|
77384
|
+
var import_node_path3 = __toESM(require("node:path"));
|
|
77385
77385
|
var import_semver = __toESM(require_semver2());
|
|
77386
77386
|
var import_which_pm_runs = __toESM(require_which_pm_runs());
|
|
77387
77387
|
|
|
@@ -77588,37 +77588,37 @@ var detectPackageManager = () => {
|
|
|
77588
77588
|
}
|
|
77589
77589
|
};
|
|
77590
77590
|
var rectifyPmMismatch = async (ctx) => {
|
|
77591
|
-
const { npm:
|
|
77591
|
+
const { npm: npm24 } = detectPackageManager();
|
|
77592
77592
|
if (!detectPmMismatch(ctx)) {
|
|
77593
77593
|
return;
|
|
77594
77594
|
}
|
|
77595
|
-
const nodeModulesPath =
|
|
77596
|
-
if ((0,
|
|
77597
|
-
(0,
|
|
77595
|
+
const nodeModulesPath = import_node_path3.default.join(ctx.project.path, "node_modules");
|
|
77596
|
+
if ((0, import_node_fs3.existsSync)(nodeModulesPath)) {
|
|
77597
|
+
(0, import_node_fs3.rmSync)(nodeModulesPath, { recursive: true });
|
|
77598
77598
|
}
|
|
77599
|
-
const lockfilePath =
|
|
77600
|
-
if ((0,
|
|
77601
|
-
(0,
|
|
77599
|
+
const lockfilePath = import_node_path3.default.join(ctx.project.path, "package-lock.json");
|
|
77600
|
+
if ((0, import_node_fs3.existsSync)(lockfilePath)) {
|
|
77601
|
+
(0, import_node_fs3.rmSync)(lockfilePath);
|
|
77602
77602
|
}
|
|
77603
|
-
await runCommand([
|
|
77603
|
+
await runCommand([npm24, "install"], {
|
|
77604
77604
|
silent: true,
|
|
77605
77605
|
cwd: ctx.project.path,
|
|
77606
77606
|
startText: "Installing dependencies",
|
|
77607
|
-
doneText: `${brandColor("installed")} ${dim(`via \`${
|
|
77607
|
+
doneText: `${brandColor("installed")} ${dim(`via \`${npm24} install\``)}`
|
|
77608
77608
|
});
|
|
77609
77609
|
};
|
|
77610
77610
|
var detectPmMismatch = (ctx) => {
|
|
77611
|
-
const { npm:
|
|
77611
|
+
const { npm: npm24 } = detectPackageManager();
|
|
77612
77612
|
const projectPath = ctx.project.path;
|
|
77613
|
-
switch (
|
|
77613
|
+
switch (npm24) {
|
|
77614
77614
|
case "npm":
|
|
77615
77615
|
return false;
|
|
77616
77616
|
case "yarn":
|
|
77617
|
-
return !(0,
|
|
77617
|
+
return !(0, import_node_fs3.existsSync)(import_node_path3.default.join(projectPath, "yarn.lock"));
|
|
77618
77618
|
case "pnpm":
|
|
77619
|
-
return !(0,
|
|
77619
|
+
return !(0, import_node_fs3.existsSync)(import_node_path3.default.join(projectPath, "pnpm-lock.yaml"));
|
|
77620
77620
|
case "bun":
|
|
77621
|
-
return !(0,
|
|
77621
|
+
return !(0, import_node_fs3.existsSync)(import_node_path3.default.join(projectPath, "bun.lockb")) && !(0, import_node_fs3.existsSync)(import_node_path3.default.join(projectPath, "bun.lock"));
|
|
77622
77622
|
}
|
|
77623
77623
|
};
|
|
77624
77624
|
|
|
@@ -77678,10 +77678,10 @@ function getPlatform() {
|
|
|
77678
77678
|
function createReporter() {
|
|
77679
77679
|
const events = [];
|
|
77680
77680
|
const als = new import_node_async_hooks.AsyncLocalStorage();
|
|
77681
|
-
const
|
|
77682
|
-
const isFirstUsage =
|
|
77681
|
+
const config46 = readMetricsConfig() ?? {};
|
|
77682
|
+
const isFirstUsage = config46.c3permission === void 0;
|
|
77683
77683
|
const isEnabled = isTelemetryEnabled();
|
|
77684
|
-
const deviceId = getDeviceId(
|
|
77684
|
+
const deviceId = getDeviceId(config46);
|
|
77685
77685
|
const packageManager = detectPackageManager();
|
|
77686
77686
|
const platform = getPlatform();
|
|
77687
77687
|
const amplitude_session_id = Date.now();
|
|
@@ -77714,7 +77714,7 @@ function createReporter() {
|
|
|
77714
77714
|
if (process.env.CREATE_CLOUDFLARE_TELEMETRY_DISABLED === "1") {
|
|
77715
77715
|
return false;
|
|
77716
77716
|
}
|
|
77717
|
-
return hasSparrowSourceKey() && getC3Permission(
|
|
77717
|
+
return hasSparrowSourceKey() && getC3Permission(config46).enabled;
|
|
77718
77718
|
}
|
|
77719
77719
|
async function waitForAllEventsSettled() {
|
|
77720
77720
|
await Promise.allSettled(events);
|
|
@@ -77820,20 +77820,20 @@ function initializeC3Permission(enabled = true) {
|
|
|
77820
77820
|
date: /* @__PURE__ */ new Date()
|
|
77821
77821
|
};
|
|
77822
77822
|
}
|
|
77823
|
-
function getC3Permission(
|
|
77824
|
-
if (!
|
|
77825
|
-
|
|
77826
|
-
writeMetricsConfig(
|
|
77823
|
+
function getC3Permission(config46 = readMetricsConfig() ?? {}) {
|
|
77824
|
+
if (!config46.c3permission) {
|
|
77825
|
+
config46.c3permission = initializeC3Permission();
|
|
77826
|
+
writeMetricsConfig(config46);
|
|
77827
77827
|
}
|
|
77828
|
-
return
|
|
77828
|
+
return config46.c3permission;
|
|
77829
77829
|
}
|
|
77830
77830
|
function updateC3Pemission(enabled) {
|
|
77831
|
-
const
|
|
77832
|
-
if (
|
|
77831
|
+
const config46 = readMetricsConfig();
|
|
77832
|
+
if (config46.c3permission?.enabled === enabled) {
|
|
77833
77833
|
return;
|
|
77834
77834
|
}
|
|
77835
|
-
|
|
77836
|
-
writeMetricsConfig(
|
|
77835
|
+
config46.c3permission = initializeC3Permission(enabled);
|
|
77836
|
+
writeMetricsConfig(config46);
|
|
77837
77837
|
}
|
|
77838
77838
|
var runTelemetryCommand = (action) => {
|
|
77839
77839
|
const logTelemetryStatus = (enabled) => {
|
|
@@ -77864,10 +77864,10 @@ var runTelemetryCommand = (action) => {
|
|
|
77864
77864
|
};
|
|
77865
77865
|
|
|
77866
77866
|
// src/templates.ts
|
|
77867
|
-
var
|
|
77868
|
-
var import_promises4 = require("fs/promises");
|
|
77869
|
-
var
|
|
77870
|
-
var
|
|
77867
|
+
var import_node_fs11 = require("node:fs");
|
|
77868
|
+
var import_promises4 = require("node:fs/promises");
|
|
77869
|
+
var import_node_os5 = require("node:os");
|
|
77870
|
+
var import_node_path13 = require("node:path");
|
|
77871
77871
|
var import_deepmerge = __toESM(require_cjs());
|
|
77872
77872
|
var import_degit = __toESM(require_dist());
|
|
77873
77873
|
|
|
@@ -77875,14 +77875,14 @@ var import_degit = __toESM(require_dist());
|
|
|
77875
77875
|
var import_haikunator = __toESM(require_dist_web());
|
|
77876
77876
|
|
|
77877
77877
|
// src/helpers/packages.ts
|
|
77878
|
-
var
|
|
77879
|
-
var
|
|
77880
|
-
var
|
|
77878
|
+
var import_node_assert2 = __toESM(require("node:assert"));
|
|
77879
|
+
var import_node_fs5 = require("node:fs");
|
|
77880
|
+
var import_node_path5 = __toESM(require("node:path"));
|
|
77881
77881
|
var import_undici2 = __toESM(require_undici());
|
|
77882
77882
|
|
|
77883
77883
|
// src/helpers/files.ts
|
|
77884
|
-
var
|
|
77885
|
-
var
|
|
77884
|
+
var import_node_fs4 = __toESM(require("node:fs"));
|
|
77885
|
+
var import_node_path4 = require("node:path");
|
|
77886
77886
|
var import_comment_json = __toESM(require_src3());
|
|
77887
77887
|
|
|
77888
77888
|
// ../../node_modules/.pnpm/smol-toml@1.5.2/node_modules/smol-toml/dist/error.js
|
|
@@ -78733,35 +78733,35 @@ var dist_default = { parse, stringify, TomlDate, TomlError };
|
|
|
78733
78733
|
// src/helpers/files.ts
|
|
78734
78734
|
var writeFile2 = (path6, content) => {
|
|
78735
78735
|
try {
|
|
78736
|
-
|
|
78736
|
+
import_node_fs4.default.writeFileSync(path6, content);
|
|
78737
78737
|
} catch (error2) {
|
|
78738
78738
|
throw new Error(error2);
|
|
78739
78739
|
}
|
|
78740
78740
|
};
|
|
78741
78741
|
var appendFile = (path6, content) => {
|
|
78742
78742
|
try {
|
|
78743
|
-
|
|
78743
|
+
import_node_fs4.default.appendFileSync(path6, content);
|
|
78744
78744
|
} catch (error2) {
|
|
78745
78745
|
throw new Error(error2);
|
|
78746
78746
|
}
|
|
78747
78747
|
};
|
|
78748
78748
|
var readFile = (path6) => {
|
|
78749
78749
|
try {
|
|
78750
|
-
return
|
|
78750
|
+
return import_node_fs4.default.readFileSync(path6, "utf-8");
|
|
78751
78751
|
} catch (error2) {
|
|
78752
78752
|
throw new Error(error2);
|
|
78753
78753
|
}
|
|
78754
78754
|
};
|
|
78755
78755
|
var removeFile = (path6) => {
|
|
78756
78756
|
try {
|
|
78757
|
-
|
|
78757
|
+
import_node_fs4.default.rmSync(path6, { force: true });
|
|
78758
78758
|
} catch (error2) {
|
|
78759
78759
|
throw new Error(`Remove file failed: ${path6}`, { cause: error2 });
|
|
78760
78760
|
}
|
|
78761
78761
|
};
|
|
78762
78762
|
var directoryExists = (path6) => {
|
|
78763
78763
|
try {
|
|
78764
|
-
const stat = (0,
|
|
78764
|
+
const stat = (0, import_node_fs4.statSync)(path6);
|
|
78765
78765
|
return stat.isDirectory();
|
|
78766
78766
|
} catch (error2) {
|
|
78767
78767
|
if (error2.code === "ENOENT") {
|
|
@@ -78781,54 +78781,54 @@ var usesTypescript = (ctx) => {
|
|
|
78781
78781
|
return hasTsConfig(ctx.project.path);
|
|
78782
78782
|
};
|
|
78783
78783
|
var hasTsConfig = (path6) => {
|
|
78784
|
-
return (0,
|
|
78784
|
+
return (0, import_node_fs4.existsSync)((0, import_node_path4.join)(`${path6}`, `tsconfig.json`));
|
|
78785
78785
|
};
|
|
78786
78786
|
|
|
78787
78787
|
// src/helpers/packages.ts
|
|
78788
|
-
var installPackages = async (packages,
|
|
78788
|
+
var installPackages = async (packages, config46 = {}) => {
|
|
78789
78789
|
if (packages.length === 0) {
|
|
78790
78790
|
return;
|
|
78791
78791
|
}
|
|
78792
|
-
const { npm:
|
|
78792
|
+
const { npm: npm24 } = detectPackageManager();
|
|
78793
78793
|
let saveFlag;
|
|
78794
78794
|
let cmd;
|
|
78795
|
-
switch (
|
|
78795
|
+
switch (npm24) {
|
|
78796
78796
|
case "yarn":
|
|
78797
78797
|
cmd = "add";
|
|
78798
|
-
saveFlag =
|
|
78798
|
+
saveFlag = config46.dev ? "-D" : "";
|
|
78799
78799
|
break;
|
|
78800
78800
|
case "bun":
|
|
78801
78801
|
cmd = "add";
|
|
78802
|
-
saveFlag =
|
|
78802
|
+
saveFlag = config46.dev ? "-d" : "";
|
|
78803
78803
|
break;
|
|
78804
78804
|
case "npm":
|
|
78805
78805
|
case "pnpm":
|
|
78806
78806
|
default:
|
|
78807
78807
|
cmd = "install";
|
|
78808
|
-
saveFlag =
|
|
78808
|
+
saveFlag = config46.dev ? "--save-dev" : "";
|
|
78809
78809
|
break;
|
|
78810
78810
|
}
|
|
78811
78811
|
await runCommand(
|
|
78812
78812
|
[
|
|
78813
|
-
|
|
78813
|
+
npm24,
|
|
78814
78814
|
cmd,
|
|
78815
78815
|
...saveFlag ? [saveFlag] : [],
|
|
78816
78816
|
...packages,
|
|
78817
78817
|
// Add --legacy-peer-deps so that installing Wrangler v4 doesn't case issues with
|
|
78818
78818
|
// frameworks that haven't updated their peer dependency for Wrangler v4
|
|
78819
78819
|
// TODO: Remove this once Wrangler v4 has been released and framework templates are updated
|
|
78820
|
-
...
|
|
78820
|
+
...npm24 === "npm" ? ["--legacy-peer-deps"] : []
|
|
78821
78821
|
],
|
|
78822
78822
|
{
|
|
78823
|
-
...
|
|
78823
|
+
...config46,
|
|
78824
78824
|
silent: true
|
|
78825
78825
|
}
|
|
78826
78826
|
);
|
|
78827
|
-
if (
|
|
78828
|
-
const pkgJsonPath =
|
|
78827
|
+
if (npm24 === "npm") {
|
|
78828
|
+
const pkgJsonPath = import_node_path5.default.join(process.cwd(), "package.json");
|
|
78829
78829
|
const pkgJson = readJSON(pkgJsonPath);
|
|
78830
|
-
const deps =
|
|
78831
|
-
(0,
|
|
78830
|
+
const deps = config46.dev ? pkgJson.devDependencies : pkgJson.dependencies;
|
|
78831
|
+
(0, import_node_assert2.default)(deps, "dependencies should be defined");
|
|
78832
78832
|
for (const pkg of packages) {
|
|
78833
78833
|
const versionMarker = pkg.lastIndexOf("@");
|
|
78834
78834
|
if (versionMarker > 0) {
|
|
@@ -78843,20 +78843,20 @@ var installPackages = async (packages, config45 = {}) => {
|
|
|
78843
78843
|
}
|
|
78844
78844
|
};
|
|
78845
78845
|
var npmInstall = async (ctx) => {
|
|
78846
|
-
const nodeModulesPath =
|
|
78847
|
-
if ((0,
|
|
78846
|
+
const nodeModulesPath = import_node_path5.default.join(ctx.project.path, "node_modules");
|
|
78847
|
+
if ((0, import_node_fs5.existsSync)(nodeModulesPath)) {
|
|
78848
78848
|
return;
|
|
78849
78849
|
}
|
|
78850
|
-
const { npm:
|
|
78850
|
+
const { npm: npm24 } = detectPackageManager();
|
|
78851
78851
|
await runCommand(
|
|
78852
78852
|
// Add --legacy-peer-deps so that installing Wrangler v4 doesn't case issues with
|
|
78853
78853
|
// frameworks that haven't updated their peer dependency for Wrangler v4
|
|
78854
78854
|
// TODO: Remove this once Wrangler v4 has been released and framework templates are updated
|
|
78855
|
-
[
|
|
78855
|
+
[npm24, "install", ...npm24 === "npm" ? ["--legacy-peer-deps"] : []],
|
|
78856
78856
|
{
|
|
78857
78857
|
silent: true,
|
|
78858
78858
|
startText: "Installing dependencies",
|
|
78859
|
-
doneText: `${brandColor("installed")} ${dim(`via \`${
|
|
78859
|
+
doneText: `${brandColor("installed")} ${dim(`via \`${npm24} install\``)}`
|
|
78860
78860
|
}
|
|
78861
78861
|
);
|
|
78862
78862
|
};
|
|
@@ -78866,14 +78866,14 @@ async function getLatestPackageVersion(packageSpecifier) {
|
|
|
78866
78866
|
return npmInfo["dist-tags"].latest;
|
|
78867
78867
|
}
|
|
78868
78868
|
var installWrangler = async () => {
|
|
78869
|
-
const { npm:
|
|
78869
|
+
const { npm: npm24 } = detectPackageManager();
|
|
78870
78870
|
await installPackages([`wrangler@latest`], {
|
|
78871
78871
|
dev: true,
|
|
78872
78872
|
startText: `Installing wrangler ${dim(
|
|
78873
78873
|
"A command line tool for building Cloudflare Workers"
|
|
78874
78874
|
)}`,
|
|
78875
78875
|
doneText: `${brandColor("installed")} ${dim(
|
|
78876
|
-
`via \`${
|
|
78876
|
+
`via \`${npm24} install wrangler --save-dev\``
|
|
78877
78877
|
)}`
|
|
78878
78878
|
});
|
|
78879
78879
|
};
|
|
@@ -78933,19 +78933,20 @@ var package_default = {
|
|
|
78933
78933
|
dependencies: {
|
|
78934
78934
|
"create-astro": "4.13.2",
|
|
78935
78935
|
"create-analog": "1.8.1",
|
|
78936
|
-
"@angular/create": "
|
|
78936
|
+
"@angular/create": "21.0.1",
|
|
78937
78937
|
"create-docusaurus": "3.9.2",
|
|
78938
78938
|
"create-hono": "0.19.3",
|
|
78939
78939
|
"create-next-app": "15.5.6",
|
|
78940
78940
|
"create-qwik": "1.17.2",
|
|
78941
78941
|
"create-vite": "7.1.1",
|
|
78942
|
+
"create-rwsdk": "3.1.0",
|
|
78942
78943
|
"create-react-router": "7.9.6",
|
|
78943
78944
|
"create-solid": "0.6.11",
|
|
78944
|
-
"create-vue": "3.18.
|
|
78945
|
-
"create-waku": "0.12.5-0.27.
|
|
78946
|
-
"@tanstack/create-start": "0.
|
|
78945
|
+
"create-vue": "3.18.3",
|
|
78946
|
+
"create-waku": "0.12.5-0.27.1-0",
|
|
78947
|
+
"@tanstack/create-start": "0.40.0",
|
|
78947
78948
|
gatsby: "5.15.0",
|
|
78948
|
-
sv: "0.
|
|
78949
|
+
sv: "0.10.5",
|
|
78949
78950
|
nuxi: "3.30.0"
|
|
78950
78951
|
}
|
|
78951
78952
|
};
|
|
@@ -78961,9 +78962,9 @@ var getFrameworkCli = (ctx, withVersion = true) => {
|
|
|
78961
78962
|
};
|
|
78962
78963
|
var runFrameworkGenerator = async (ctx, args) => {
|
|
78963
78964
|
const cli = getFrameworkCli(ctx, true);
|
|
78964
|
-
const { npm:
|
|
78965
|
-
const cmd = [...
|
|
78966
|
-
const env3 =
|
|
78965
|
+
const { npm: npm24, dlx } = detectPackageManager();
|
|
78966
|
+
const cmd = [...npm24 === "yarn" ? ["npx"] : dlx, cli, ...args];
|
|
78967
|
+
const env3 = npm24 === "yarn" && !process.env.npm_config_user_agent?.startsWith("yarn") ? { npm_config_user_agent: "yarn/1.22.22" } : {};
|
|
78967
78968
|
if (ctx.args.additionalArgs?.length) {
|
|
78968
78969
|
cmd.push(...ctx.args.additionalArgs);
|
|
78969
78970
|
}
|
|
@@ -78977,16 +78978,16 @@ var runFrameworkGenerator = async (ctx, args) => {
|
|
|
78977
78978
|
};
|
|
78978
78979
|
|
|
78979
78980
|
// src/helpers/codemod.ts
|
|
78980
|
-
var
|
|
78981
|
-
var
|
|
78981
|
+
var import_node_fs6 = require("node:fs");
|
|
78982
|
+
var import_node_path6 = __toESM(require("node:path"));
|
|
78982
78983
|
var recast = __toESM(require_main2());
|
|
78983
78984
|
var esprimaParser = __toESM(require_esprima3());
|
|
78984
78985
|
var typescriptParser = __toESM(require_typescript2());
|
|
78985
78986
|
var parseFile = (filePath) => {
|
|
78986
|
-
const lang =
|
|
78987
|
+
const lang = import_node_path6.default.extname(filePath).slice(1);
|
|
78987
78988
|
const parser2 = lang === "js" ? esprimaParser : typescriptParser;
|
|
78988
78989
|
try {
|
|
78989
|
-
const fileContents = readFile(
|
|
78990
|
+
const fileContents = readFile(import_node_path6.default.resolve(filePath));
|
|
78990
78991
|
if (fileContents) {
|
|
78991
78992
|
return recast.parse(fileContents, { parser: parser2 }).program;
|
|
78992
78993
|
}
|
|
@@ -79003,20 +79004,20 @@ var transformFile = (filePath, methods) => {
|
|
|
79003
79004
|
}
|
|
79004
79005
|
};
|
|
79005
79006
|
var loadSnippets = (parentFolder) => {
|
|
79006
|
-
const snippetsPath = (0,
|
|
79007
|
-
if (!(0,
|
|
79007
|
+
const snippetsPath = (0, import_node_path6.join)(parentFolder, "snippets");
|
|
79008
|
+
if (!(0, import_node_fs6.existsSync)(snippetsPath)) {
|
|
79008
79009
|
return {};
|
|
79009
79010
|
}
|
|
79010
|
-
if (!(0,
|
|
79011
|
+
if (!(0, import_node_fs6.lstatSync)(snippetsPath).isDirectory) {
|
|
79011
79012
|
return {};
|
|
79012
79013
|
}
|
|
79013
|
-
const files = (0,
|
|
79014
|
-
return files.filter((fileName) => (0,
|
|
79014
|
+
const files = (0, import_node_fs6.readdirSync)(snippetsPath);
|
|
79015
|
+
return files.filter((fileName) => (0, import_node_fs6.lstatSync)((0, import_node_path6.join)(snippetsPath, fileName)).isFile).filter((fileName) => [".js", ".ts"].includes((0, import_node_path6.extname)(fileName))).reduce((acc, snippetPath) => {
|
|
79015
79016
|
const [file, ext] = snippetPath.split(".");
|
|
79016
79017
|
const key = `${file}${ext === "js" ? "Js" : "Ts"}`;
|
|
79017
79018
|
return {
|
|
79018
79019
|
...acc,
|
|
79019
|
-
[key]: parseFile((0,
|
|
79020
|
+
[key]: parseFile((0, import_node_path6.join)(snippetsPath, snippetPath))?.body
|
|
79020
79021
|
};
|
|
79021
79022
|
}, {});
|
|
79022
79023
|
};
|
|
@@ -79140,7 +79141,7 @@ var config = {
|
|
|
79140
79141
|
var c3_default = config;
|
|
79141
79142
|
|
|
79142
79143
|
// templates/angular/pages/c3.ts
|
|
79143
|
-
var
|
|
79144
|
+
var import_node_path7 = require("node:path");
|
|
79144
79145
|
var { npm: npm2 } = detectPackageManager();
|
|
79145
79146
|
var generate2 = async (ctx) => {
|
|
79146
79147
|
await runFrameworkGenerator(ctx, [ctx.project.name, "--ssr"]);
|
|
@@ -79162,23 +79163,23 @@ async function updateAppCode() {
|
|
|
79162
79163
|
const s = spinner();
|
|
79163
79164
|
s.start(`Updating application code`);
|
|
79164
79165
|
const appConfigPath = "src/app/app.config.ts";
|
|
79165
|
-
const appConfig = readFile((0,
|
|
79166
|
+
const appConfig = readFile((0, import_node_path7.resolve)(appConfigPath));
|
|
79166
79167
|
const newAppConfig = "import { provideHttpClient, withFetch } from '@angular/common/http';\n" + appConfig.replace(
|
|
79167
79168
|
"providers: [",
|
|
79168
79169
|
"providers: [provideHttpClient(withFetch()), "
|
|
79169
79170
|
);
|
|
79170
|
-
writeFile2((0,
|
|
79171
|
+
writeFile2((0, import_node_path7.resolve)(appConfigPath), newAppConfig);
|
|
79171
79172
|
s.stop(`${brandColor(`updated`)} ${dim(appConfigPath)}`);
|
|
79172
79173
|
const appServerRoutesPath = "src/app/app.routes.server.ts";
|
|
79173
|
-
const appRoutes = readFile((0,
|
|
79174
|
+
const appRoutes = readFile((0, import_node_path7.resolve)(appServerRoutesPath));
|
|
79174
79175
|
const newAppRoutes = appRoutes.replace(
|
|
79175
79176
|
"RenderMode.Prerender",
|
|
79176
79177
|
"RenderMode.Server"
|
|
79177
79178
|
);
|
|
79178
|
-
writeFile2((0,
|
|
79179
|
+
writeFile2((0, import_node_path7.resolve)(appServerRoutesPath), newAppRoutes);
|
|
79179
79180
|
s.stop(`${brandColor(`updated`)} ${dim(appServerRoutesPath)}`);
|
|
79180
79181
|
s.start(`Updating package.json`);
|
|
79181
|
-
const packageJsonPath = (0,
|
|
79182
|
+
const packageJsonPath = (0, import_node_path7.resolve)("package.json");
|
|
79182
79183
|
const packageManifest = readJSON(packageJsonPath);
|
|
79183
79184
|
delete packageManifest["dependencies"]?.["express"];
|
|
79184
79185
|
delete packageManifest["devDependencies"]?.["@types/express"];
|
|
@@ -79194,7 +79195,7 @@ function updateAngularJson(ctx) {
|
|
|
79194
79195
|
architectSection.build.options.outputMode = "server";
|
|
79195
79196
|
architectSection.build.options.ssr.experimentalPlatform = "neutral";
|
|
79196
79197
|
architectSection.build.options.assets.push("src/_routes.json");
|
|
79197
|
-
writeFile2((0,
|
|
79198
|
+
writeFile2((0, import_node_path7.resolve)("angular.json"), JSON.stringify(angularJson, null, 2));
|
|
79198
79199
|
s.stop(`${brandColor(`updated`)} ${dim(`\`angular.json\``)}`);
|
|
79199
79200
|
}
|
|
79200
79201
|
var config2 = {
|
|
@@ -79226,7 +79227,7 @@ var config2 = {
|
|
|
79226
79227
|
var c3_default2 = config2;
|
|
79227
79228
|
|
|
79228
79229
|
// templates/angular/workers/c3.ts
|
|
79229
|
-
var
|
|
79230
|
+
var import_node_path8 = require("node:path");
|
|
79230
79231
|
var { npm: npm3 } = detectPackageManager();
|
|
79231
79232
|
var generate3 = async (ctx) => {
|
|
79232
79233
|
await runFrameworkGenerator(ctx, [ctx.project.name, "--ssr"]);
|
|
@@ -79248,23 +79249,23 @@ async function updateAppCode2() {
|
|
|
79248
79249
|
const s = spinner();
|
|
79249
79250
|
s.start(`Updating application code`);
|
|
79250
79251
|
const appConfigPath = "src/app/app.config.ts";
|
|
79251
|
-
const appConfig = readFile((0,
|
|
79252
|
+
const appConfig = readFile((0, import_node_path8.resolve)(appConfigPath));
|
|
79252
79253
|
const newAppConfig = "import { provideHttpClient, withFetch } from '@angular/common/http';\n" + appConfig.replace(
|
|
79253
79254
|
"providers: [",
|
|
79254
79255
|
"providers: [provideHttpClient(withFetch()), "
|
|
79255
79256
|
);
|
|
79256
|
-
writeFile2((0,
|
|
79257
|
+
writeFile2((0, import_node_path8.resolve)(appConfigPath), newAppConfig);
|
|
79257
79258
|
s.stop(`${brandColor(`updated`)} ${dim(appConfigPath)}`);
|
|
79258
79259
|
const appServerRoutesPath = "src/app/app.routes.server.ts";
|
|
79259
|
-
const appRoutes = readFile((0,
|
|
79260
|
+
const appRoutes = readFile((0, import_node_path8.resolve)(appServerRoutesPath));
|
|
79260
79261
|
const newAppRoutes = appRoutes.replace(
|
|
79261
79262
|
"RenderMode.Prerender",
|
|
79262
79263
|
"RenderMode.Server"
|
|
79263
79264
|
);
|
|
79264
|
-
writeFile2((0,
|
|
79265
|
+
writeFile2((0, import_node_path8.resolve)(appServerRoutesPath), newAppRoutes);
|
|
79265
79266
|
s.stop(`${brandColor(`updated`)} ${dim(appServerRoutesPath)}`);
|
|
79266
79267
|
s.start(`Updating package.json`);
|
|
79267
|
-
const packageJsonPath = (0,
|
|
79268
|
+
const packageJsonPath = (0, import_node_path8.resolve)("package.json");
|
|
79268
79269
|
const packageManifest = readJSON(packageJsonPath);
|
|
79269
79270
|
delete packageManifest["dependencies"]?.["express"];
|
|
79270
79271
|
delete packageManifest["devDependencies"]?.["@types/express"];
|
|
@@ -79274,12 +79275,12 @@ async function updateAppCode2() {
|
|
|
79274
79275
|
function updateAngularJson2(ctx) {
|
|
79275
79276
|
const s = spinner();
|
|
79276
79277
|
s.start(`Updating angular.json config`);
|
|
79277
|
-
const angularJson = readJSON((0,
|
|
79278
|
+
const angularJson = readJSON((0, import_node_path8.resolve)("angular.json"));
|
|
79278
79279
|
const architectSection = angularJson.projects[ctx.project.name].architect;
|
|
79279
79280
|
architectSection.build.options.outputPath = "dist";
|
|
79280
79281
|
architectSection.build.options.outputMode = "server";
|
|
79281
79282
|
architectSection.build.options.ssr.experimentalPlatform = "neutral";
|
|
79282
|
-
writeFile2((0,
|
|
79283
|
+
writeFile2((0, import_node_path8.resolve)("angular.json"), JSON.stringify(angularJson, null, 2));
|
|
79283
79284
|
s.stop(`${brandColor(`updated`)} ${dim(`\`angular.json\``)}`);
|
|
79284
79285
|
}
|
|
79285
79286
|
var config3 = {
|
|
@@ -79294,12 +79295,12 @@ var config3 = {
|
|
|
79294
79295
|
path: "templates/angular/workers",
|
|
79295
79296
|
devScript: "start",
|
|
79296
79297
|
deployScript: "deploy",
|
|
79297
|
-
previewScript: "
|
|
79298
|
+
previewScript: "preview",
|
|
79298
79299
|
generate: generate3,
|
|
79299
79300
|
configure: configure3,
|
|
79300
79301
|
transformPackageJson: async () => ({
|
|
79301
79302
|
scripts: {
|
|
79302
|
-
|
|
79303
|
+
preview: `${npm3} run build && wrangler dev`,
|
|
79303
79304
|
build: `ng build`,
|
|
79304
79305
|
deploy: `${npm3} run build && wrangler deploy`,
|
|
79305
79306
|
"cf-typegen": `wrangler types`
|
|
@@ -79776,7 +79777,7 @@ var c3_default19 = {
|
|
|
79776
79777
|
|
|
79777
79778
|
// templates/hello-world/c3.ts
|
|
79778
79779
|
var import_promises2 = require("node:fs/promises");
|
|
79779
|
-
var
|
|
79780
|
+
var import_node_path9 = require("node:path");
|
|
79780
79781
|
var c3_default20 = {
|
|
79781
79782
|
configVersion: 1,
|
|
79782
79783
|
id: "hello-world",
|
|
@@ -79786,11 +79787,11 @@ var c3_default20 = {
|
|
|
79786
79787
|
async configure(ctx) {
|
|
79787
79788
|
if (ctx.args.lang === "python") {
|
|
79788
79789
|
const contents = await (0, import_promises2.readFile)(
|
|
79789
|
-
(0,
|
|
79790
|
+
(0, import_node_path9.resolve)(ctx.project.path, "pyproject.toml"),
|
|
79790
79791
|
"utf8"
|
|
79791
79792
|
);
|
|
79792
79793
|
const updated = contents.replaceAll(/<TBD>/g, ctx.project.name);
|
|
79793
|
-
await (0, import_promises2.writeFile)((0,
|
|
79794
|
+
await (0, import_promises2.writeFile)((0, import_node_path9.resolve)(ctx.project.path, "pyproject.toml"), updated);
|
|
79794
79795
|
}
|
|
79795
79796
|
},
|
|
79796
79797
|
copyFiles: {
|
|
@@ -80142,10 +80143,10 @@ var config25 = {
|
|
|
80142
80143
|
var c3_default28 = config25;
|
|
80143
80144
|
|
|
80144
80145
|
// templates/pre-existing/c3.ts
|
|
80145
|
-
var
|
|
80146
|
-
var import_promises3 = require("fs/promises");
|
|
80147
|
-
var
|
|
80148
|
-
var
|
|
80146
|
+
var import_node_fs7 = require("node:fs");
|
|
80147
|
+
var import_promises3 = require("node:fs/promises");
|
|
80148
|
+
var import_node_os4 = require("node:os");
|
|
80149
|
+
var import_node_path10 = require("node:path");
|
|
80149
80150
|
|
|
80150
80151
|
// src/wrangler/accounts.ts
|
|
80151
80152
|
var chooseAccount = async (ctx) => {
|
|
@@ -80258,7 +80259,7 @@ async function copyExistingWorkerFiles(ctx) {
|
|
|
80258
80259
|
}
|
|
80259
80260
|
);
|
|
80260
80261
|
}
|
|
80261
|
-
const tempdir = await (0, import_promises3.mkdtemp)((0,
|
|
80262
|
+
const tempdir = await (0, import_promises3.mkdtemp)((0, import_node_path10.join)((0, import_node_os4.tmpdir)(), "c3-wrangler-init--from-dash-"));
|
|
80262
80263
|
await runCommand(
|
|
80263
80264
|
[
|
|
80264
80265
|
...dlx,
|
|
@@ -80281,16 +80282,16 @@ async function copyExistingWorkerFiles(ctx) {
|
|
|
80281
80282
|
}
|
|
80282
80283
|
);
|
|
80283
80284
|
await (0, import_promises3.cp)(
|
|
80284
|
-
(0,
|
|
80285
|
-
(0,
|
|
80285
|
+
(0, import_node_path10.join)(tempdir, ctx.args.existingScript, "src"),
|
|
80286
|
+
(0, import_node_path10.join)(ctx.project.path, "src"),
|
|
80286
80287
|
{ recursive: true }
|
|
80287
80288
|
);
|
|
80288
80289
|
const configFiles = ["wrangler.jsonc", "wrangler.json", "wrangler.toml"];
|
|
80289
80290
|
let configFileCopied = false;
|
|
80290
80291
|
for (const configFile of configFiles) {
|
|
80291
|
-
const sourcePath = (0,
|
|
80292
|
-
if ((0,
|
|
80293
|
-
await (0, import_promises3.cp)(sourcePath, (0,
|
|
80292
|
+
const sourcePath = (0, import_node_path10.join)(tempdir, ctx.args.existingScript, configFile);
|
|
80293
|
+
if ((0, import_node_fs7.existsSync)(sourcePath)) {
|
|
80294
|
+
await (0, import_promises3.cp)(sourcePath, (0, import_node_path10.join)(ctx.project.path, configFile));
|
|
80294
80295
|
configFileCopied = true;
|
|
80295
80296
|
break;
|
|
80296
80297
|
}
|
|
@@ -80678,7 +80679,7 @@ var config32 = {
|
|
|
80678
80679
|
var c3_default35 = config32;
|
|
80679
80680
|
|
|
80680
80681
|
// templates/react/workers/c3.ts
|
|
80681
|
-
var
|
|
80682
|
+
var import_node_assert3 = __toESM(require("node:assert"));
|
|
80682
80683
|
var recast9 = __toESM(require_main2());
|
|
80683
80684
|
var b2 = recast9.types.builders;
|
|
80684
80685
|
var t = recast9.types.namedTypes;
|
|
@@ -80724,10 +80725,10 @@ function transformViteConfig(ctx) {
|
|
|
80724
80725
|
if (callee.name !== "defineConfig") {
|
|
80725
80726
|
return this.traverse(n);
|
|
80726
80727
|
}
|
|
80727
|
-
const
|
|
80728
|
-
(0,
|
|
80729
|
-
const pluginsProp =
|
|
80730
|
-
(0,
|
|
80728
|
+
const config46 = n.node.arguments[0];
|
|
80729
|
+
(0, import_node_assert3.default)(t.ObjectExpression.check(config46));
|
|
80730
|
+
const pluginsProp = config46.properties.find((prop) => isPluginsProp(prop));
|
|
80731
|
+
(0, import_node_assert3.default)(pluginsProp && t.ArrayExpression.check(pluginsProp.value));
|
|
80731
80732
|
pluginsProp.value.elements.push(
|
|
80732
80733
|
b2.callExpression(b2.identifier("cloudflare"), [])
|
|
80733
80734
|
);
|
|
@@ -80780,7 +80781,7 @@ async function getVariant() {
|
|
|
80780
80781
|
defaultValue: variantsOptions2[0].value
|
|
80781
80782
|
});
|
|
80782
80783
|
const selected = variantsOptions2.find((variant) => variant.value === value);
|
|
80783
|
-
(0,
|
|
80784
|
+
(0, import_node_assert3.default)(selected, "Expected a variant to be selected");
|
|
80784
80785
|
return selected;
|
|
80785
80786
|
}
|
|
80786
80787
|
var config33 = {
|
|
@@ -80822,8 +80823,34 @@ var config34 = {
|
|
|
80822
80823
|
};
|
|
80823
80824
|
var c3_default37 = config34;
|
|
80824
80825
|
|
|
80825
|
-
// templates/
|
|
80826
|
+
// templates/redwood/c3.ts
|
|
80827
|
+
var { npm: npm15 } = detectPackageManager();
|
|
80828
|
+
var generate20 = async (ctx) => {
|
|
80829
|
+
await runFrameworkGenerator(ctx, [ctx.project.name]);
|
|
80830
|
+
logRaw("");
|
|
80831
|
+
};
|
|
80826
80832
|
var config35 = {
|
|
80833
|
+
configVersion: 1,
|
|
80834
|
+
id: "redwood",
|
|
80835
|
+
platform: "workers",
|
|
80836
|
+
frameworkCli: "create-rwsdk",
|
|
80837
|
+
displayName: "RedwoodSDK",
|
|
80838
|
+
generate: generate20,
|
|
80839
|
+
transformPackageJson: async () => ({
|
|
80840
|
+
scripts: {
|
|
80841
|
+
deploy: `${npm15} run release`,
|
|
80842
|
+
preview: `${npm15} run build && wrangler dev`,
|
|
80843
|
+
"cf-typegen": `wrangler types`
|
|
80844
|
+
}
|
|
80845
|
+
}),
|
|
80846
|
+
devScript: "dev",
|
|
80847
|
+
deployScript: "release",
|
|
80848
|
+
previewScript: "preview"
|
|
80849
|
+
};
|
|
80850
|
+
var c3_default38 = config35;
|
|
80851
|
+
|
|
80852
|
+
// templates/scheduled/c3.ts
|
|
80853
|
+
var config36 = {
|
|
80827
80854
|
configVersion: 1,
|
|
80828
80855
|
id: "scheduled",
|
|
80829
80856
|
displayName: "Scheduled Worker (Cron Trigger)",
|
|
@@ -80840,11 +80867,11 @@ var config35 = {
|
|
|
80840
80867
|
}
|
|
80841
80868
|
}
|
|
80842
80869
|
};
|
|
80843
|
-
var
|
|
80870
|
+
var c3_default39 = config36;
|
|
80844
80871
|
|
|
80845
80872
|
// src/helpers/compatDate.ts
|
|
80846
|
-
var
|
|
80847
|
-
var
|
|
80873
|
+
var import_node_fs8 = require("node:fs");
|
|
80874
|
+
var import_node_path11 = require("node:path");
|
|
80848
80875
|
async function getWorkerdCompatibilityDate() {
|
|
80849
80876
|
const s = spinner();
|
|
80850
80877
|
s.start("Retrieving current workerd compatibility date");
|
|
@@ -80872,14 +80899,14 @@ async function getWorkerdCompatibilityDate() {
|
|
|
80872
80899
|
return fallbackDate;
|
|
80873
80900
|
}
|
|
80874
80901
|
function getLatestTypesEntrypoint(ctx) {
|
|
80875
|
-
const workersTypesPath = (0,
|
|
80902
|
+
const workersTypesPath = (0, import_node_path11.resolve)(
|
|
80876
80903
|
ctx.project.path,
|
|
80877
80904
|
"node_modules",
|
|
80878
80905
|
"@cloudflare",
|
|
80879
80906
|
"workers-types"
|
|
80880
80907
|
);
|
|
80881
80908
|
try {
|
|
80882
|
-
const entrypoints = (0,
|
|
80909
|
+
const entrypoints = (0, import_node_fs8.readdirSync)(workersTypesPath);
|
|
80883
80910
|
const sorted = entrypoints.filter((filename) => filename.match(/(\d{4})-(\d{2})-(\d{2})/)).sort().reverse();
|
|
80884
80911
|
if (sorted.length === 0) {
|
|
80885
80912
|
return null;
|
|
@@ -80892,18 +80919,12 @@ function getLatestTypesEntrypoint(ctx) {
|
|
|
80892
80919
|
|
|
80893
80920
|
// templates/solid/c3.ts
|
|
80894
80921
|
var recast10 = __toESM(require_main2());
|
|
80895
|
-
var { npm:
|
|
80896
|
-
var
|
|
80922
|
+
var { npm: npm16 } = detectPackageManager();
|
|
80923
|
+
var generate21 = async (ctx) => {
|
|
80897
80924
|
await runFrameworkGenerator(ctx, ["-p", ctx.project.name, "-s"]);
|
|
80898
80925
|
logRaw("");
|
|
80899
80926
|
};
|
|
80900
80927
|
var configure11 = async (ctx) => {
|
|
80901
|
-
const packages = ["nitropack"];
|
|
80902
|
-
await installPackages(packages, {
|
|
80903
|
-
dev: true,
|
|
80904
|
-
startText: "Installing nitro module `nitropack`",
|
|
80905
|
-
doneText: `${brandColor("installed")} ${dim(`via \`${npm15} install\``)}`
|
|
80906
|
-
});
|
|
80907
80928
|
usesTypescript(ctx);
|
|
80908
80929
|
const filePath = `app.config.${usesTypescript(ctx) ? "ts" : "js"}`;
|
|
80909
80930
|
const compatDate = await getWorkerdCompatibilityDate();
|
|
@@ -80938,7 +80959,7 @@ var configure11 = async (ctx) => {
|
|
|
80938
80959
|
}
|
|
80939
80960
|
});
|
|
80940
80961
|
};
|
|
80941
|
-
var
|
|
80962
|
+
var config37 = {
|
|
80942
80963
|
configVersion: 1,
|
|
80943
80964
|
id: "solid",
|
|
80944
80965
|
frameworkCli: "create-solid",
|
|
@@ -80948,12 +80969,12 @@ var config36 = {
|
|
|
80948
80969
|
path: "./templates"
|
|
80949
80970
|
},
|
|
80950
80971
|
path: "templates/solid",
|
|
80951
|
-
generate:
|
|
80972
|
+
generate: generate21,
|
|
80952
80973
|
configure: configure11,
|
|
80953
80974
|
transformPackageJson: async () => ({
|
|
80954
80975
|
scripts: {
|
|
80955
|
-
preview: `${
|
|
80956
|
-
deploy: `${
|
|
80976
|
+
preview: `${npm16} run build && npx wrangler dev`,
|
|
80977
|
+
deploy: `${npm16} run build && wrangler deploy`,
|
|
80957
80978
|
"cf-typegen": `wrangler types`
|
|
80958
80979
|
}
|
|
80959
80980
|
}),
|
|
@@ -80961,13 +80982,13 @@ var config36 = {
|
|
|
80961
80982
|
deployScript: "deploy",
|
|
80962
80983
|
previewScript: "preview"
|
|
80963
80984
|
};
|
|
80964
|
-
var
|
|
80985
|
+
var c3_default40 = config37;
|
|
80965
80986
|
|
|
80966
80987
|
// templates/svelte/pages/c3.ts
|
|
80967
|
-
var
|
|
80988
|
+
var import_node_fs9 = require("node:fs");
|
|
80968
80989
|
var recast11 = __toESM(require_main2());
|
|
80969
|
-
var { npm:
|
|
80970
|
-
var
|
|
80990
|
+
var { npm: npm17 } = detectPackageManager();
|
|
80991
|
+
var generate22 = async (ctx) => {
|
|
80971
80992
|
await runFrameworkGenerator(ctx, ["create", ctx.project.name]);
|
|
80972
80993
|
logRaw("");
|
|
80973
80994
|
};
|
|
@@ -80996,7 +81017,7 @@ var updateSvelteConfig = () => {
|
|
|
80996
81017
|
};
|
|
80997
81018
|
var updatePlaywrightConfig = (shouldUseTypescript) => {
|
|
80998
81019
|
const filePath = `playwright.config.${shouldUseTypescript ? "ts" : "js"}`;
|
|
80999
|
-
if (!(0,
|
|
81020
|
+
if (!(0, import_node_fs9.existsSync)(filePath)) {
|
|
81000
81021
|
return;
|
|
81001
81022
|
}
|
|
81002
81023
|
updateStatus(`Changing webServer port in ${blue(filePath)}`);
|
|
@@ -81054,7 +81075,7 @@ var updateTypeDefinitions = (ctx) => {
|
|
|
81054
81075
|
});
|
|
81055
81076
|
};
|
|
81056
81077
|
var typesPath2 = "src/worker-configuration.d.ts";
|
|
81057
|
-
var
|
|
81078
|
+
var config38 = {
|
|
81058
81079
|
configVersion: 1,
|
|
81059
81080
|
id: "svelte",
|
|
81060
81081
|
frameworkCli: "sv",
|
|
@@ -81065,12 +81086,12 @@ var config37 = {
|
|
|
81065
81086
|
path: "./templates"
|
|
81066
81087
|
},
|
|
81067
81088
|
path: "templates/svelte/pages",
|
|
81068
|
-
generate:
|
|
81089
|
+
generate: generate22,
|
|
81069
81090
|
configure: configure12,
|
|
81070
81091
|
transformPackageJson: async (original, ctx) => {
|
|
81071
81092
|
let scripts = {
|
|
81072
|
-
preview: `${
|
|
81073
|
-
deploy: `${
|
|
81093
|
+
preview: `${npm17} run build && wrangler pages dev`,
|
|
81094
|
+
deploy: `${npm17} run build && wrangler pages deploy`
|
|
81074
81095
|
};
|
|
81075
81096
|
if (usesTypescript(ctx)) {
|
|
81076
81097
|
scripts = {
|
|
@@ -81085,12 +81106,12 @@ var config37 = {
|
|
|
81085
81106
|
previewScript: "preview",
|
|
81086
81107
|
typesPath: typesPath2
|
|
81087
81108
|
};
|
|
81088
|
-
var
|
|
81109
|
+
var c3_default41 = config38;
|
|
81089
81110
|
|
|
81090
81111
|
// templates/svelte/workers/c3.ts
|
|
81091
81112
|
var recast12 = __toESM(require_main2());
|
|
81092
|
-
var { npm:
|
|
81093
|
-
var
|
|
81113
|
+
var { npm: npm18 } = detectPackageManager();
|
|
81114
|
+
var generate23 = async (ctx) => {
|
|
81094
81115
|
await runFrameworkGenerator(ctx, ["create", ctx.project.name]);
|
|
81095
81116
|
logRaw("");
|
|
81096
81117
|
};
|
|
@@ -81154,7 +81175,7 @@ var updateTypeDefinitions2 = (ctx) => {
|
|
|
81154
81175
|
});
|
|
81155
81176
|
};
|
|
81156
81177
|
var typesPath3 = "./src/worker-configuration.d.ts";
|
|
81157
|
-
var
|
|
81178
|
+
var config39 = {
|
|
81158
81179
|
configVersion: 1,
|
|
81159
81180
|
id: "svelte",
|
|
81160
81181
|
frameworkCli: "sv",
|
|
@@ -81164,12 +81185,12 @@ var config38 = {
|
|
|
81164
81185
|
path: "./templates"
|
|
81165
81186
|
},
|
|
81166
81187
|
path: "templates/svelte/workers",
|
|
81167
|
-
generate:
|
|
81188
|
+
generate: generate23,
|
|
81168
81189
|
configure: configure13,
|
|
81169
81190
|
transformPackageJson: async (original, ctx) => {
|
|
81170
81191
|
let scripts = {
|
|
81171
|
-
preview: `${
|
|
81172
|
-
deploy: `${
|
|
81192
|
+
preview: `${npm18} run build && wrangler dev`,
|
|
81193
|
+
deploy: `${npm18} run build && wrangler deploy`
|
|
81173
81194
|
};
|
|
81174
81195
|
if (usesTypescript(ctx)) {
|
|
81175
81196
|
scripts = {
|
|
@@ -81184,18 +81205,18 @@ var config38 = {
|
|
|
81184
81205
|
previewScript: "preview",
|
|
81185
81206
|
typesPath: typesPath3
|
|
81186
81207
|
};
|
|
81187
|
-
var
|
|
81208
|
+
var c3_default42 = config39;
|
|
81188
81209
|
|
|
81189
81210
|
// templates/svelte/c3.ts
|
|
81190
|
-
var
|
|
81211
|
+
var config40 = {
|
|
81191
81212
|
displayName: "SvelteKit",
|
|
81192
|
-
platformVariants: { pages:
|
|
81213
|
+
platformVariants: { pages: c3_default41, workers: c3_default42 }
|
|
81193
81214
|
};
|
|
81194
|
-
var
|
|
81215
|
+
var c3_default43 = config40;
|
|
81195
81216
|
|
|
81196
81217
|
// templates/tanstack-start/c3.ts
|
|
81197
|
-
var { npm:
|
|
81198
|
-
var
|
|
81218
|
+
var { npm: npm19 } = detectPackageManager();
|
|
81219
|
+
var generate24 = async (ctx) => {
|
|
81199
81220
|
await runFrameworkGenerator(ctx, [
|
|
81200
81221
|
ctx.project.name,
|
|
81201
81222
|
"--deployment",
|
|
@@ -81207,32 +81228,32 @@ var generate23 = async (ctx) => {
|
|
|
81207
81228
|
]);
|
|
81208
81229
|
logRaw("");
|
|
81209
81230
|
};
|
|
81210
|
-
var
|
|
81231
|
+
var config41 = {
|
|
81211
81232
|
configVersion: 1,
|
|
81212
81233
|
id: "tanstack-start",
|
|
81213
81234
|
platform: "workers",
|
|
81214
81235
|
frameworkCli: "@tanstack/create-start",
|
|
81215
81236
|
displayName: "TanStack Start",
|
|
81216
|
-
generate:
|
|
81237
|
+
generate: generate24,
|
|
81217
81238
|
transformPackageJson: async () => ({
|
|
81218
81239
|
scripts: {
|
|
81219
|
-
deploy: `${
|
|
81220
|
-
preview: `${
|
|
81240
|
+
deploy: `${npm19} run build && wrangler deploy`,
|
|
81241
|
+
preview: `${npm19} run build && vite preview`,
|
|
81221
81242
|
"cf-typegen": `wrangler types`
|
|
81222
81243
|
}
|
|
81223
81244
|
}),
|
|
81224
81245
|
devScript: "dev",
|
|
81225
81246
|
deployScript: "deploy",
|
|
81226
|
-
previewScript: "
|
|
81247
|
+
previewScript: "serve"
|
|
81227
81248
|
};
|
|
81228
|
-
var
|
|
81249
|
+
var c3_default44 = config41;
|
|
81229
81250
|
|
|
81230
81251
|
// templates/vue/pages/c3.ts
|
|
81231
|
-
var { npm:
|
|
81232
|
-
var
|
|
81252
|
+
var { npm: npm20 } = detectPackageManager();
|
|
81253
|
+
var generate25 = async (ctx) => {
|
|
81233
81254
|
await runFrameworkGenerator(ctx, [ctx.project.name]);
|
|
81234
81255
|
};
|
|
81235
|
-
var
|
|
81256
|
+
var config42 = {
|
|
81236
81257
|
configVersion: 1,
|
|
81237
81258
|
id: "vue",
|
|
81238
81259
|
frameworkCli: "create-vue",
|
|
@@ -81241,11 +81262,11 @@ var config41 = {
|
|
|
81241
81262
|
hidden: true,
|
|
81242
81263
|
path: "templates/vue/pages",
|
|
81243
81264
|
copyFiles: { path: "./templates" },
|
|
81244
|
-
generate:
|
|
81265
|
+
generate: generate25,
|
|
81245
81266
|
transformPackageJson: async () => ({
|
|
81246
81267
|
scripts: {
|
|
81247
|
-
deploy: `${
|
|
81248
|
-
preview: `${
|
|
81268
|
+
deploy: `${npm20} run build && wrangler pages deploy`,
|
|
81269
|
+
preview: `${npm20} run build && wrangler pages dev`,
|
|
81249
81270
|
"cf-typegen": `wrangler types`
|
|
81250
81271
|
}
|
|
81251
81272
|
}),
|
|
@@ -81253,11 +81274,11 @@ var config41 = {
|
|
|
81253
81274
|
deployScript: "deploy",
|
|
81254
81275
|
previewScript: "preview"
|
|
81255
81276
|
};
|
|
81256
|
-
var
|
|
81277
|
+
var c3_default45 = config42;
|
|
81257
81278
|
|
|
81258
81279
|
// templates/vue/workers/c3.ts
|
|
81259
|
-
var { npm:
|
|
81260
|
-
var
|
|
81280
|
+
var { npm: npm21 } = detectPackageManager();
|
|
81281
|
+
var generate26 = async (ctx) => {
|
|
81261
81282
|
const lang = ctx.args.lang ?? await inputPrompt({
|
|
81262
81283
|
type: "select",
|
|
81263
81284
|
question: "Would you like to use TypeScript?",
|
|
@@ -81295,7 +81316,7 @@ function updateTsconfigJson2() {
|
|
|
81295
81316
|
writeJSON("tsconfig.json", tsconfig);
|
|
81296
81317
|
s.stop(`${brandColor(`updated`)} ${dim(`\`tsconfig.json\``)}`);
|
|
81297
81318
|
}
|
|
81298
|
-
var
|
|
81319
|
+
var config43 = {
|
|
81299
81320
|
configVersion: 1,
|
|
81300
81321
|
id: "vue",
|
|
81301
81322
|
frameworkCli: "create-vue",
|
|
@@ -81316,11 +81337,11 @@ var config42 = {
|
|
|
81316
81337
|
}
|
|
81317
81338
|
},
|
|
81318
81339
|
configure: configure14,
|
|
81319
|
-
generate:
|
|
81340
|
+
generate: generate26,
|
|
81320
81341
|
transformPackageJson: async (_3, ctx) => ({
|
|
81321
81342
|
scripts: {
|
|
81322
|
-
deploy: `${
|
|
81323
|
-
preview: `${
|
|
81343
|
+
deploy: `${npm21} run build && wrangler deploy`,
|
|
81344
|
+
preview: `${npm21} run build && wrangler dev`,
|
|
81324
81345
|
...usesTypescript(ctx) && { "cf-typegen": `wrangler types` }
|
|
81325
81346
|
}
|
|
81326
81347
|
}),
|
|
@@ -81328,18 +81349,18 @@ var config42 = {
|
|
|
81328
81349
|
deployScript: "deploy",
|
|
81329
81350
|
previewScript: "preview"
|
|
81330
81351
|
};
|
|
81331
|
-
var
|
|
81352
|
+
var c3_default46 = config43;
|
|
81332
81353
|
|
|
81333
81354
|
// templates/vue/c3.ts
|
|
81334
|
-
var
|
|
81355
|
+
var config44 = {
|
|
81335
81356
|
displayName: "Vue",
|
|
81336
|
-
platformVariants: { pages:
|
|
81357
|
+
platformVariants: { pages: c3_default45, workers: c3_default46 }
|
|
81337
81358
|
};
|
|
81338
|
-
var
|
|
81359
|
+
var c3_default47 = config44;
|
|
81339
81360
|
|
|
81340
81361
|
// templates/waku/c3.ts
|
|
81341
|
-
var { npm:
|
|
81342
|
-
var
|
|
81362
|
+
var { npm: npm22 } = detectPackageManager();
|
|
81363
|
+
var generate27 = async (ctx) => {
|
|
81343
81364
|
await runFrameworkGenerator(ctx, [
|
|
81344
81365
|
"--project-name",
|
|
81345
81366
|
ctx.project.name,
|
|
@@ -81347,31 +81368,31 @@ var generate26 = async (ctx) => {
|
|
|
81347
81368
|
"07_cloudflare"
|
|
81348
81369
|
]);
|
|
81349
81370
|
};
|
|
81350
|
-
var
|
|
81371
|
+
var config45 = {
|
|
81351
81372
|
configVersion: 1,
|
|
81352
81373
|
id: "waku",
|
|
81353
81374
|
frameworkCli: "create-waku",
|
|
81354
81375
|
platform: "workers",
|
|
81355
81376
|
displayName: "Waku",
|
|
81356
81377
|
path: "templates/waku",
|
|
81357
|
-
generate:
|
|
81378
|
+
generate: generate27,
|
|
81358
81379
|
transformPackageJson: async () => ({
|
|
81359
81380
|
scripts: {
|
|
81360
|
-
deploy: `${
|
|
81361
|
-
preview: `NODE_ENV=production ${
|
|
81381
|
+
deploy: `${npm22} run build && wrangler deploy`,
|
|
81382
|
+
preview: `NODE_ENV=production ${npm22} run build && wrangler dev`
|
|
81362
81383
|
}
|
|
81363
81384
|
}),
|
|
81364
81385
|
devScript: "dev",
|
|
81365
81386
|
deployScript: "deploy",
|
|
81366
81387
|
previewScript: "preview"
|
|
81367
81388
|
};
|
|
81368
|
-
var
|
|
81389
|
+
var c3_default48 = config45;
|
|
81369
81390
|
|
|
81370
81391
|
// src/git.ts
|
|
81371
|
-
var
|
|
81392
|
+
var import_node_assert4 = __toESM(require("node:assert"));
|
|
81372
81393
|
|
|
81373
81394
|
// ../wrangler/package.json
|
|
81374
|
-
var version2 = "4.
|
|
81395
|
+
var version2 = "4.52.0";
|
|
81375
81396
|
|
|
81376
81397
|
// src/git.ts
|
|
81377
81398
|
var offerGit = async (ctx) => {
|
|
@@ -81407,7 +81428,7 @@ var offerGit = async (ctx) => {
|
|
|
81407
81428
|
}
|
|
81408
81429
|
};
|
|
81409
81430
|
var gitCommit = async (ctx) => {
|
|
81410
|
-
|
|
81431
|
+
import_node_assert4.default.notStrictEqual(
|
|
81411
81432
|
ctx.args.git,
|
|
81412
81433
|
void 0,
|
|
81413
81434
|
"Expected git context to be defined by now"
|
|
@@ -81549,8 +81570,8 @@ async function getProductionBranch(cwd) {
|
|
|
81549
81570
|
}
|
|
81550
81571
|
|
|
81551
81572
|
// src/validators.ts
|
|
81552
|
-
var
|
|
81553
|
-
var
|
|
81573
|
+
var import_node_fs10 = require("node:fs");
|
|
81574
|
+
var import_node_path12 = require("node:path");
|
|
81554
81575
|
var TEMPLATE_REGEX = /^(?:(?:https:\/\/)?(?<httpsUrl>[^:/]+\.[^:/]+)\/|git@(?<gitUrl>[^:/]+)[:/]|(?<shorthandUrl>[^/]+):)?(?<user>[^/\s]+)\/(?<repository>[^/\s#]+)(?:(?<subdirectoryPath>(?:\/[^/\s#]+)+))?(?:\/)?(?:#(?<tag>.+))?/;
|
|
81555
81576
|
var validateTemplateUrl = (value) => {
|
|
81556
81577
|
if (!String(value).match(TEMPLATE_REGEX)) {
|
|
@@ -81558,17 +81579,17 @@ var validateTemplateUrl = (value) => {
|
|
|
81558
81579
|
}
|
|
81559
81580
|
};
|
|
81560
81581
|
var validateProjectDirectory = (relativePath, args) => {
|
|
81561
|
-
const path6 = (0,
|
|
81562
|
-
const existsAlready = (0,
|
|
81582
|
+
const path6 = (0, import_node_path12.resolve)(relativePath);
|
|
81583
|
+
const existsAlready = (0, import_node_fs10.existsSync)(path6);
|
|
81563
81584
|
if (existsAlready) {
|
|
81564
|
-
for (const file of (0,
|
|
81585
|
+
for (const file of (0, import_node_fs10.readdirSync)(path6)) {
|
|
81565
81586
|
if (!isAllowedExistingFile(file)) {
|
|
81566
81587
|
return `Directory \`${relativePath}\` already exists and contains files that might conflict. Please choose a new name.`;
|
|
81567
81588
|
}
|
|
81568
81589
|
}
|
|
81569
81590
|
}
|
|
81570
81591
|
if (!args.existingScript) {
|
|
81571
|
-
const projectName = (0,
|
|
81592
|
+
const projectName = (0, import_node_path12.basename)(path6);
|
|
81572
81593
|
const invalidChars = /[^a-z0-9-]/;
|
|
81573
81594
|
const invalidStartEnd = /^-|-$/;
|
|
81574
81595
|
if (projectName.match(invalidStartEnd)) {
|
|
@@ -81629,8 +81650,8 @@ var isAllowedExistingFile = (file) => {
|
|
|
81629
81650
|
var defaultSelectVariant = async (ctx) => {
|
|
81630
81651
|
return ctx.args.lang;
|
|
81631
81652
|
};
|
|
81632
|
-
var templateSupportsLanguage = (
|
|
81633
|
-
const { copyFiles } =
|
|
81653
|
+
var templateSupportsLanguage = (config46, lang) => {
|
|
81654
|
+
const { copyFiles } = config46;
|
|
81634
81655
|
if (!copyFiles || isVariantInfo(copyFiles)) {
|
|
81635
81656
|
return false;
|
|
81636
81657
|
}
|
|
@@ -81644,11 +81665,11 @@ var filterTemplatesByLanguage = (templates, lang) => {
|
|
|
81644
81665
|
return templates;
|
|
81645
81666
|
}
|
|
81646
81667
|
return Object.fromEntries(
|
|
81647
|
-
Object.entries(templates).filter(([,
|
|
81648
|
-
if ("platformVariants" in
|
|
81649
|
-
return templateSupportsLanguage(
|
|
81668
|
+
Object.entries(templates).filter(([, config46]) => {
|
|
81669
|
+
if ("platformVariants" in config46) {
|
|
81670
|
+
return templateSupportsLanguage(config46.platformVariants.pages, lang) || templateSupportsLanguage(config46.platformVariants.workers, lang);
|
|
81650
81671
|
}
|
|
81651
|
-
return templateSupportsLanguage(
|
|
81672
|
+
return templateSupportsLanguage(config46, lang);
|
|
81652
81673
|
})
|
|
81653
81674
|
);
|
|
81654
81675
|
};
|
|
@@ -81656,8 +81677,12 @@ function getFrameworkMap({ experimental = false }) {
|
|
|
81656
81677
|
if (experimental) {
|
|
81657
81678
|
return {
|
|
81658
81679
|
gatsby: c3_default14,
|
|
81659
|
-
svelte:
|
|
81660
|
-
docusaurus: c3_default11
|
|
81680
|
+
svelte: c3_default43,
|
|
81681
|
+
docusaurus: c3_default11,
|
|
81682
|
+
astro: c3_default7,
|
|
81683
|
+
"tanstack-start": c3_default44,
|
|
81684
|
+
angular: c3_default4,
|
|
81685
|
+
solid: c3_default40
|
|
81661
81686
|
};
|
|
81662
81687
|
} else {
|
|
81663
81688
|
return {
|
|
@@ -81672,11 +81697,12 @@ function getFrameworkMap({ experimental = false }) {
|
|
|
81672
81697
|
qwik: c3_default33,
|
|
81673
81698
|
react: c3_default37,
|
|
81674
81699
|
"react-router": c3_default34,
|
|
81675
|
-
|
|
81676
|
-
|
|
81677
|
-
|
|
81678
|
-
|
|
81679
|
-
|
|
81700
|
+
redwood: c3_default38,
|
|
81701
|
+
solid: c3_default40,
|
|
81702
|
+
svelte: c3_default43,
|
|
81703
|
+
"tanstack-start": c3_default44,
|
|
81704
|
+
vue: c3_default47,
|
|
81705
|
+
waku: c3_default48
|
|
81680
81706
|
};
|
|
81681
81707
|
}
|
|
81682
81708
|
}
|
|
@@ -81688,7 +81714,7 @@ function getOtherTemplateMap({
|
|
|
81688
81714
|
} else {
|
|
81689
81715
|
return {
|
|
81690
81716
|
common: c3_default8,
|
|
81691
|
-
scheduled:
|
|
81717
|
+
scheduled: c3_default39,
|
|
81692
81718
|
queues: c3_default30,
|
|
81693
81719
|
openapi: c3_default28,
|
|
81694
81720
|
"pre-existing": c3_default29
|
|
@@ -81709,7 +81735,7 @@ function getHelloWorldTemplateMap({
|
|
|
81709
81735
|
"hello-world-durable-object-with-assets": c3_default16,
|
|
81710
81736
|
"hello-world-workflows": c3_default19,
|
|
81711
81737
|
common: c3_default8,
|
|
81712
|
-
scheduled:
|
|
81738
|
+
scheduled: c3_default39,
|
|
81713
81739
|
queues: c3_default30,
|
|
81714
81740
|
openapi: c3_default28,
|
|
81715
81741
|
"pre-existing": c3_default29
|
|
@@ -81880,10 +81906,10 @@ var createContext = async (args, prevArgs) => {
|
|
|
81880
81906
|
let template;
|
|
81881
81907
|
if (category === "web-framework") {
|
|
81882
81908
|
const frameworkOptions = Object.entries(frameworkMap).reduce(
|
|
81883
|
-
(acc, [key,
|
|
81884
|
-
if (!
|
|
81909
|
+
(acc, [key, config46]) => {
|
|
81910
|
+
if (!config46.hidden || args.framework) {
|
|
81885
81911
|
acc.push({
|
|
81886
|
-
label:
|
|
81912
|
+
label: config46.displayName,
|
|
81887
81913
|
value: key
|
|
81888
81914
|
});
|
|
81889
81915
|
}
|
|
@@ -81909,7 +81935,7 @@ var createContext = async (args, prevArgs) => {
|
|
|
81909
81935
|
if ("platformVariants" in frameworkConfig) {
|
|
81910
81936
|
const availableVariants = Object.entries(
|
|
81911
81937
|
frameworkConfig.platformVariants
|
|
81912
|
-
).filter(([,
|
|
81938
|
+
).filter(([, config46]) => !config46.hidden);
|
|
81913
81939
|
if (availableVariants.length === 1) {
|
|
81914
81940
|
args.platform ??= availableVariants[0][0];
|
|
81915
81941
|
}
|
|
@@ -81992,7 +82018,7 @@ var createContext = async (args, prevArgs) => {
|
|
|
81992
82018
|
envInterfaceName: "Env",
|
|
81993
82019
|
...template
|
|
81994
82020
|
};
|
|
81995
|
-
const path6 = (0,
|
|
82021
|
+
const path6 = (0, import_node_path13.resolve)(projectName);
|
|
81996
82022
|
const languageVariants = template.copyFiles && !isVariantInfo(template.copyFiles) && !template.copyFiles.selectVariant ? Object.keys(template.copyFiles.variants) : [];
|
|
81997
82023
|
if (languageVariants.length > 0) {
|
|
81998
82024
|
if (hasTsConfig(path6)) {
|
|
@@ -82018,8 +82044,8 @@ var createContext = async (args, prevArgs) => {
|
|
|
82018
82044
|
}
|
|
82019
82045
|
}
|
|
82020
82046
|
}
|
|
82021
|
-
const name3 = (0,
|
|
82022
|
-
const directory = (0,
|
|
82047
|
+
const name3 = (0, import_node_path13.basename)(path6);
|
|
82048
|
+
const directory = (0, import_node_path13.dirname)(path6);
|
|
82023
82049
|
const originalCWD = process.cwd();
|
|
82024
82050
|
return {
|
|
82025
82051
|
project: { name: name3, path: path6 },
|
|
@@ -82039,7 +82065,7 @@ async function copyTemplateFiles(ctx) {
|
|
|
82039
82065
|
const { copyFiles } = ctx.template;
|
|
82040
82066
|
let srcdir;
|
|
82041
82067
|
if (isVariantInfo(copyFiles)) {
|
|
82042
|
-
srcdir = (0,
|
|
82068
|
+
srcdir = (0, import_node_path13.join)(getTemplatePath(ctx), copyFiles.path);
|
|
82043
82069
|
} else {
|
|
82044
82070
|
const selectVariant = copyFiles.selectVariant ?? defaultSelectVariant;
|
|
82045
82071
|
const variant = await selectVariant(ctx);
|
|
@@ -82049,16 +82075,16 @@ async function copyTemplateFiles(ctx) {
|
|
|
82049
82075
|
`Unknown variant provided: ${JSON.stringify(variant ?? "")}`
|
|
82050
82076
|
);
|
|
82051
82077
|
}
|
|
82052
|
-
srcdir = (0,
|
|
82078
|
+
srcdir = (0, import_node_path13.join)(getTemplatePath(ctx), variantInfo.path);
|
|
82053
82079
|
}
|
|
82054
82080
|
const copyDestDir = getCopyFilesDestinationDir(ctx);
|
|
82055
|
-
const destdir = (0,
|
|
82081
|
+
const destdir = (0, import_node_path13.join)(ctx.project.path, ...copyDestDir ? [copyDestDir] : []);
|
|
82056
82082
|
const s = spinner();
|
|
82057
82083
|
s.start(`Copying template files`);
|
|
82058
82084
|
await (0, import_promises4.cp)(srcdir, destdir, { recursive: true, force: true });
|
|
82059
|
-
const dummyGitIgnorePath = (0,
|
|
82060
|
-
if ((0,
|
|
82061
|
-
await (0, import_promises4.rename)(dummyGitIgnorePath, (0,
|
|
82085
|
+
const dummyGitIgnorePath = (0, import_node_path13.join)(destdir, "__dot__gitignore");
|
|
82086
|
+
if ((0, import_node_fs11.existsSync)(dummyGitIgnorePath)) {
|
|
82087
|
+
await (0, import_promises4.rename)(dummyGitIgnorePath, (0, import_node_path13.join)(destdir, ".gitignore"));
|
|
82062
82088
|
}
|
|
82063
82089
|
s.stop(`${brandColor("files")} ${dim("copied to project directory")}`);
|
|
82064
82090
|
}
|
|
@@ -82075,39 +82101,39 @@ var processRemoteTemplate = async (args) => {
|
|
|
82075
82101
|
src = src.replace("https://github.com/", "github:").replace("/tree/main/", "/");
|
|
82076
82102
|
}
|
|
82077
82103
|
const path6 = await downloadRemoteTemplate(src, args.templateMode);
|
|
82078
|
-
const
|
|
82079
|
-
validateTemplate(path6,
|
|
82104
|
+
const config46 = inferTemplateConfig(path6);
|
|
82105
|
+
validateTemplate(path6, config46);
|
|
82080
82106
|
updateStatus(`${brandColor("template")} ${dim("cloned and validated")}`);
|
|
82081
82107
|
return {
|
|
82082
82108
|
path: path6,
|
|
82083
|
-
...
|
|
82109
|
+
...config46
|
|
82084
82110
|
};
|
|
82085
82111
|
};
|
|
82086
|
-
var validateTemplate = (path6,
|
|
82087
|
-
if (!
|
|
82112
|
+
var validateTemplate = (path6, config46) => {
|
|
82113
|
+
if (!config46.copyFiles) {
|
|
82088
82114
|
return;
|
|
82089
82115
|
}
|
|
82090
|
-
if (isVariantInfo(
|
|
82091
|
-
validateTemplateSrcDirectory((0,
|
|
82116
|
+
if (isVariantInfo(config46.copyFiles)) {
|
|
82117
|
+
validateTemplateSrcDirectory((0, import_node_path13.resolve)(path6, config46.copyFiles.path), config46);
|
|
82092
82118
|
} else {
|
|
82093
|
-
for (const variant of Object.values(
|
|
82094
|
-
validateTemplateSrcDirectory((0,
|
|
82119
|
+
for (const variant of Object.values(config46.copyFiles.variants)) {
|
|
82120
|
+
validateTemplateSrcDirectory((0, import_node_path13.resolve)(path6, variant.path), config46);
|
|
82095
82121
|
}
|
|
82096
82122
|
}
|
|
82097
82123
|
};
|
|
82098
|
-
var validateTemplateSrcDirectory = (path6,
|
|
82099
|
-
if (
|
|
82100
|
-
const wranglerTomlPath = (0,
|
|
82101
|
-
const wranglerJsonPath = (0,
|
|
82102
|
-
const wranglerJsoncPath = (0,
|
|
82103
|
-
if (!(0,
|
|
82124
|
+
var validateTemplateSrcDirectory = (path6, config46) => {
|
|
82125
|
+
if (config46.platform === "workers") {
|
|
82126
|
+
const wranglerTomlPath = (0, import_node_path13.resolve)(path6, "wrangler.toml");
|
|
82127
|
+
const wranglerJsonPath = (0, import_node_path13.resolve)(path6, "wrangler.json");
|
|
82128
|
+
const wranglerJsoncPath = (0, import_node_path13.resolve)(path6, "wrangler.jsonc");
|
|
82129
|
+
if (!(0, import_node_fs11.existsSync)(wranglerTomlPath) && !(0, import_node_fs11.existsSync)(wranglerJsonPath) && !(0, import_node_fs11.existsSync)(wranglerJsoncPath)) {
|
|
82104
82130
|
throw new Error(
|
|
82105
82131
|
`create-cloudflare templates must contain a "wrangler.toml" or "wrangler.json(c)" file.`
|
|
82106
82132
|
);
|
|
82107
82133
|
}
|
|
82108
82134
|
}
|
|
82109
|
-
const pkgJsonPath = (0,
|
|
82110
|
-
if (!(0,
|
|
82135
|
+
const pkgJsonPath = (0, import_node_path13.resolve)(path6, "package.json");
|
|
82136
|
+
if (!(0, import_node_fs11.existsSync)(pkgJsonPath)) {
|
|
82111
82137
|
throw new Error(
|
|
82112
82138
|
`create-cloudflare templates must contain a "package.json" file.`
|
|
82113
82139
|
);
|
|
@@ -82124,10 +82150,10 @@ var inferTemplateConfig = (path6) => {
|
|
|
82124
82150
|
};
|
|
82125
82151
|
var inferCopyFilesDefinition = (path6) => {
|
|
82126
82152
|
const variants = {};
|
|
82127
|
-
if ((0,
|
|
82153
|
+
if ((0, import_node_fs11.existsSync)((0, import_node_path13.join)(path6, "js"))) {
|
|
82128
82154
|
variants["js"] = { path: "./js" };
|
|
82129
82155
|
}
|
|
82130
|
-
if ((0,
|
|
82156
|
+
if ((0, import_node_fs11.existsSync)((0, import_node_path13.join)(path6, "ts"))) {
|
|
82131
82157
|
variants["ts"] = { path: "./ts" };
|
|
82132
82158
|
}
|
|
82133
82159
|
const copyFiles = Object.keys(variants).length !== 0 ? { variants } : { path: "." };
|
|
@@ -82142,7 +82168,7 @@ var downloadRemoteTemplate = async (src, mode) => {
|
|
|
82142
82168
|
force: true,
|
|
82143
82169
|
mode
|
|
82144
82170
|
});
|
|
82145
|
-
const tmpDir = await (0, import_promises4.mkdtemp)((0,
|
|
82171
|
+
const tmpDir = await (0, import_promises4.mkdtemp)((0, import_node_path13.join)((0, import_node_os5.tmpdir)(), "c3-template"));
|
|
82146
82172
|
await emitter.clone(tmpDir);
|
|
82147
82173
|
return tmpDir;
|
|
82148
82174
|
} catch {
|
|
@@ -82151,8 +82177,8 @@ var downloadRemoteTemplate = async (src, mode) => {
|
|
|
82151
82177
|
}
|
|
82152
82178
|
};
|
|
82153
82179
|
function updatePythonPackageName(path6, projectName) {
|
|
82154
|
-
const pyprojectTomlPath = (0,
|
|
82155
|
-
if (!(0,
|
|
82180
|
+
const pyprojectTomlPath = (0, import_node_path13.resolve)(path6, "pyproject.toml");
|
|
82181
|
+
if (!(0, import_node_fs11.existsSync)(pyprojectTomlPath)) {
|
|
82156
82182
|
return;
|
|
82157
82183
|
}
|
|
82158
82184
|
const s = spinner();
|
|
@@ -82167,7 +82193,7 @@ function updatePythonPackageName(path6, projectName) {
|
|
|
82167
82193
|
}
|
|
82168
82194
|
var updatePackageName = async (ctx) => {
|
|
82169
82195
|
const placeholderNames = ["<TBD>", "TBD", ""];
|
|
82170
|
-
const pkgJsonPath = (0,
|
|
82196
|
+
const pkgJsonPath = (0, import_node_path13.resolve)(ctx.project.path, "package.json");
|
|
82171
82197
|
const pkgJson = readJSON(pkgJsonPath);
|
|
82172
82198
|
if (!placeholderNames.includes(pkgJson.name)) {
|
|
82173
82199
|
return;
|
|
@@ -82185,7 +82211,7 @@ var updatePackageScripts = async (ctx) => {
|
|
|
82185
82211
|
}
|
|
82186
82212
|
const s = spinner();
|
|
82187
82213
|
s.start("Updating `package.json` scripts");
|
|
82188
|
-
const pkgJsonPath = (0,
|
|
82214
|
+
const pkgJsonPath = (0, import_node_path13.resolve)(ctx.project.path, "package.json");
|
|
82189
82215
|
let pkgJson = readJSON(pkgJsonPath);
|
|
82190
82216
|
const transformed = await ctx.template.transformPackageJson(pkgJson, ctx);
|
|
82191
82217
|
pkgJson = (0, import_deepmerge.default)(pkgJson, transformed);
|
|
@@ -82194,9 +82220,9 @@ var updatePackageScripts = async (ctx) => {
|
|
|
82194
82220
|
};
|
|
82195
82221
|
var getTemplatePath = (ctx) => {
|
|
82196
82222
|
if (ctx.template.path) {
|
|
82197
|
-
return (0,
|
|
82223
|
+
return (0, import_node_path13.resolve)(__dirname, "..", ctx.template.path);
|
|
82198
82224
|
}
|
|
82199
|
-
return (0,
|
|
82225
|
+
return (0, import_node_path13.resolve)(__dirname, "..", "templates", ctx.template.id);
|
|
82200
82226
|
};
|
|
82201
82227
|
var isVariantInfo = (copyFiles) => {
|
|
82202
82228
|
return "path" in copyFiles;
|
|
@@ -82213,7 +82239,7 @@ var getCopyFilesDestinationDir = (ctx) => {
|
|
|
82213
82239
|
};
|
|
82214
82240
|
var addWranglerToGitIgnore = (ctx) => {
|
|
82215
82241
|
const gitIgnorePath = `${ctx.project.path}/.gitignore`;
|
|
82216
|
-
const gitIgnorePreExisted = (0,
|
|
82242
|
+
const gitIgnorePreExisted = (0, import_node_fs11.existsSync)(gitIgnorePath);
|
|
82217
82243
|
const gitDirExists = directoryExists(`${ctx.project.path}/.git`);
|
|
82218
82244
|
if (!gitIgnorePreExisted && !gitDirExists) {
|
|
82219
82245
|
return;
|
|
@@ -82614,8 +82640,8 @@ var processArgument = async (args, key, promptConfig) => {
|
|
|
82614
82640
|
|
|
82615
82641
|
// src/deploy.ts
|
|
82616
82642
|
var import_promises6 = require("node:fs/promises");
|
|
82617
|
-
var
|
|
82618
|
-
var
|
|
82643
|
+
var import_node_os6 = require("node:os");
|
|
82644
|
+
var import_node_path15 = require("node:path");
|
|
82619
82645
|
|
|
82620
82646
|
// src/helpers/poll.ts
|
|
82621
82647
|
var import_promises5 = require("node:timers/promises");
|
|
@@ -82707,8 +82733,8 @@ function secondsSince(start) {
|
|
|
82707
82733
|
}
|
|
82708
82734
|
|
|
82709
82735
|
// src/wrangler/config.ts
|
|
82710
|
-
var
|
|
82711
|
-
var
|
|
82736
|
+
var import_node_fs12 = require("node:fs");
|
|
82737
|
+
var import_node_path14 = require("node:path");
|
|
82712
82738
|
|
|
82713
82739
|
// src/helpers/json.ts
|
|
82714
82740
|
var import_comment_json2 = __toESM(require_src3());
|
|
@@ -82846,22 +82872,22 @@ var updateWranglerConfig = async (ctx) => {
|
|
|
82846
82872
|
}
|
|
82847
82873
|
};
|
|
82848
82874
|
var getWranglerTomlPath = (ctx) => {
|
|
82849
|
-
return (0,
|
|
82875
|
+
return (0, import_node_path14.resolve)(ctx.project.path, "wrangler.toml");
|
|
82850
82876
|
};
|
|
82851
82877
|
var getWranglerJsonPath = (ctx) => {
|
|
82852
|
-
return (0,
|
|
82878
|
+
return (0, import_node_path14.resolve)(ctx.project.path, "wrangler.json");
|
|
82853
82879
|
};
|
|
82854
82880
|
var getWranglerJsoncPath = (ctx) => {
|
|
82855
|
-
return (0,
|
|
82881
|
+
return (0, import_node_path14.resolve)(ctx.project.path, "wrangler.jsonc");
|
|
82856
82882
|
};
|
|
82857
82883
|
var wranglerTomlExists = (ctx) => {
|
|
82858
82884
|
const wranglerTomlPath = getWranglerTomlPath(ctx);
|
|
82859
|
-
return (0,
|
|
82885
|
+
return (0, import_node_fs12.existsSync)(wranglerTomlPath);
|
|
82860
82886
|
};
|
|
82861
82887
|
var wranglerJsonExists = (ctx) => {
|
|
82862
82888
|
const wranglerJsonPath = getWranglerJsonPath(ctx);
|
|
82863
82889
|
const wranglerJsoncPath = getWranglerJsoncPath(ctx);
|
|
82864
|
-
return (0,
|
|
82890
|
+
return (0, import_node_fs12.existsSync)(wranglerJsonPath) || (0, import_node_fs12.existsSync)(wranglerJsoncPath);
|
|
82865
82891
|
};
|
|
82866
82892
|
var readWranglerToml = (ctx) => {
|
|
82867
82893
|
const wranglerTomlPath = getWranglerTomlPath(ctx);
|
|
@@ -82869,7 +82895,7 @@ var readWranglerToml = (ctx) => {
|
|
|
82869
82895
|
};
|
|
82870
82896
|
var readWranglerJson = (ctx) => {
|
|
82871
82897
|
const wranglerJsonPath = getWranglerJsonPath(ctx);
|
|
82872
|
-
if ((0,
|
|
82898
|
+
if ((0, import_node_fs12.existsSync)(wranglerJsonPath)) {
|
|
82873
82899
|
return readJSONWithComments(wranglerJsonPath);
|
|
82874
82900
|
}
|
|
82875
82901
|
const wranglerJsoncPath = getWranglerJsoncPath(ctx);
|
|
@@ -82879,37 +82905,37 @@ var writeWranglerToml = (ctx, contents) => {
|
|
|
82879
82905
|
const wranglerTomlPath = getWranglerTomlPath(ctx);
|
|
82880
82906
|
return writeFile2(wranglerTomlPath, contents);
|
|
82881
82907
|
};
|
|
82882
|
-
var writeWranglerJson = (ctx,
|
|
82908
|
+
var writeWranglerJson = (ctx, config46) => {
|
|
82883
82909
|
const wranglerJsonPath = getWranglerJsonPath(ctx);
|
|
82884
|
-
if ((0,
|
|
82885
|
-
return writeJSONWithComments(wranglerJsonPath,
|
|
82910
|
+
if ((0, import_node_fs12.existsSync)(wranglerJsonPath)) {
|
|
82911
|
+
return writeJSONWithComments(wranglerJsonPath, config46);
|
|
82886
82912
|
}
|
|
82887
82913
|
const wranglerJsoncPath = getWranglerJsoncPath(ctx);
|
|
82888
|
-
return writeJSONWithComments(wranglerJsoncPath,
|
|
82914
|
+
return writeJSONWithComments(wranglerJsoncPath, config46);
|
|
82889
82915
|
};
|
|
82890
82916
|
var addVscodeConfig = (ctx) => {
|
|
82891
82917
|
const settingsPath = `${ctx.project.path}/.vscode/settings.json`;
|
|
82892
|
-
if ((0,
|
|
82918
|
+
if ((0, import_node_fs12.existsSync)(settingsPath)) {
|
|
82893
82919
|
return;
|
|
82894
82920
|
}
|
|
82895
|
-
(0,
|
|
82921
|
+
(0, import_node_fs12.mkdirSync)(`${ctx.project.path}/.vscode`, { recursive: true });
|
|
82896
82922
|
writeJSON(settingsPath, {
|
|
82897
82923
|
"files.associations": {
|
|
82898
82924
|
"wrangler.json": "jsonc"
|
|
82899
82925
|
}
|
|
82900
82926
|
});
|
|
82901
82927
|
};
|
|
82902
|
-
async function getCompatibilityDate(
|
|
82928
|
+
async function getCompatibilityDate(config46) {
|
|
82903
82929
|
const validCompatDateRe = /^\d{4}-\d{2}-\d{2}$/m;
|
|
82904
|
-
if (typeof
|
|
82905
|
-
return
|
|
82930
|
+
if (typeof config46["compatibility_date"] === "string" && config46["compatibility_date"].match(validCompatDateRe)) {
|
|
82931
|
+
return config46["compatibility_date"];
|
|
82906
82932
|
}
|
|
82907
82933
|
return await getWorkerdCompatibilityDate();
|
|
82908
82934
|
}
|
|
82909
82935
|
|
|
82910
82936
|
// src/deploy.ts
|
|
82911
82937
|
var offerToDeploy = async (ctx) => {
|
|
82912
|
-
const { npm:
|
|
82938
|
+
const { npm: npm24 } = detectPackageManager();
|
|
82913
82939
|
startSection(`Deploy with Cloudflare`, `Step 3 of 3`);
|
|
82914
82940
|
if (!await isDeployable(ctx)) {
|
|
82915
82941
|
ctx.args.deploy = false;
|
|
@@ -82920,7 +82946,7 @@ var offerToDeploy = async (ctx) => {
|
|
|
82920
82946
|
);
|
|
82921
82947
|
}
|
|
82922
82948
|
const label = `deploy via \`${quoteShellArgs([
|
|
82923
|
-
|
|
82949
|
+
npm24,
|
|
82924
82950
|
"run",
|
|
82925
82951
|
ctx.template.deployScript ?? "deploy"
|
|
82926
82952
|
])}\``;
|
|
@@ -82956,11 +82982,11 @@ var readWranglerConfig = (ctx) => {
|
|
|
82956
82982
|
return dist_default.parse(wranglerTomlStr.replace(/\r\n/g, "\n"));
|
|
82957
82983
|
};
|
|
82958
82984
|
var runDeploy = async (ctx) => {
|
|
82959
|
-
const { npm:
|
|
82985
|
+
const { npm: npm24, name: pm4 } = detectPackageManager();
|
|
82960
82986
|
if (!ctx.account?.id) {
|
|
82961
82987
|
throw new Error("Failed to read Cloudflare account.");
|
|
82962
82988
|
}
|
|
82963
|
-
const baseDeployCmd = [
|
|
82989
|
+
const baseDeployCmd = [npm24, "run", ctx.template.deployScript ?? "deploy"];
|
|
82964
82990
|
const insideGitRepo = await isInsideGitRepo(ctx.project.path);
|
|
82965
82991
|
const deployCmd = [
|
|
82966
82992
|
...baseDeployCmd,
|
|
@@ -82971,8 +82997,8 @@ var runDeploy = async (ctx) => {
|
|
|
82971
82997
|
JSON.stringify(ctx.commitMessage)
|
|
82972
82998
|
] : []
|
|
82973
82999
|
];
|
|
82974
|
-
const outputFile = (0,
|
|
82975
|
-
await (0, import_promises6.mkdtemp)((0,
|
|
83000
|
+
const outputFile = (0, import_node_path15.join)(
|
|
83001
|
+
await (0, import_promises6.mkdtemp)((0, import_node_path15.join)((0, import_node_os6.tmpdir)(), "c3-wrangler-deploy-")),
|
|
82976
83002
|
"output.json"
|
|
82977
83003
|
);
|
|
82978
83004
|
await runCommand(deployCmd, {
|
|
@@ -83034,7 +83060,7 @@ var hasBinding = (node) => {
|
|
|
83034
83060
|
};
|
|
83035
83061
|
|
|
83036
83062
|
// src/dialog.ts
|
|
83037
|
-
var
|
|
83063
|
+
var import_node_path16 = require("node:path");
|
|
83038
83064
|
function createDialog(lines) {
|
|
83039
83065
|
const screenWidth = process.stdout.columns;
|
|
83040
83066
|
const maxLineWidth = Math.max(
|
|
@@ -83074,11 +83100,11 @@ function printWelcomeMessage(version3, telemetryEnabled, args) {
|
|
|
83074
83100
|
}
|
|
83075
83101
|
var printSummary = (ctx) => {
|
|
83076
83102
|
const dashboardUrl = ctx.account ? `https://dash.cloudflare.com/?to=/:account/workers/services/view/${ctx.project.name}` : null;
|
|
83077
|
-
const relativePath = (0,
|
|
83103
|
+
const relativePath = (0, import_node_path16.relative)(ctx.originalCWD, ctx.project.path);
|
|
83078
83104
|
const cdCommand = relativePath ? `cd ${relativePath}` : null;
|
|
83079
|
-
const { npm:
|
|
83105
|
+
const { npm: npm24 } = detectPackageManager();
|
|
83080
83106
|
const deployCommand = quoteShellArgs([
|
|
83081
|
-
|
|
83107
|
+
npm24,
|
|
83082
83108
|
"run",
|
|
83083
83109
|
ctx.template.deployScript ?? "deploy"
|
|
83084
83110
|
]);
|
|
@@ -83446,8 +83472,8 @@ var renderValues = (values) => {
|
|
|
83446
83472
|
|
|
83447
83473
|
// src/helpers/retry.ts
|
|
83448
83474
|
var import_promises7 = require("node:timers/promises");
|
|
83449
|
-
var retry = async (
|
|
83450
|
-
let { times } =
|
|
83475
|
+
var retry = async (config46, fn) => {
|
|
83476
|
+
let { times } = config46;
|
|
83451
83477
|
let error2 = null;
|
|
83452
83478
|
while (times > 0) {
|
|
83453
83479
|
try {
|
|
@@ -83455,10 +83481,10 @@ var retry = async (config45, fn) => {
|
|
|
83455
83481
|
} catch (e) {
|
|
83456
83482
|
error2 = e;
|
|
83457
83483
|
times--;
|
|
83458
|
-
if (
|
|
83484
|
+
if (config46.exitCondition?.(e)) {
|
|
83459
83485
|
break;
|
|
83460
83486
|
}
|
|
83461
|
-
await (0, import_promises7.setTimeout)(
|
|
83487
|
+
await (0, import_promises7.setTimeout)(config46.sleepMs ?? 1e3);
|
|
83462
83488
|
}
|
|
83463
83489
|
}
|
|
83464
83490
|
throw error2;
|
|
@@ -83545,8 +83571,8 @@ var createProject = async (ctx) => {
|
|
|
83545
83571
|
};
|
|
83546
83572
|
|
|
83547
83573
|
// src/workers.ts
|
|
83548
|
-
var
|
|
83549
|
-
var
|
|
83574
|
+
var import_node_fs13 = require("node:fs");
|
|
83575
|
+
var import_node_path17 = require("node:path");
|
|
83550
83576
|
|
|
83551
83577
|
// ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/impl/scanner.js
|
|
83552
83578
|
function createScanner(text, ignoreTrivia = false) {
|
|
@@ -84866,25 +84892,25 @@ async function addTypes(ctx) {
|
|
|
84866
84892
|
if (!usesTypescript(ctx) || ctx.template.workersTypes === "none") {
|
|
84867
84893
|
return;
|
|
84868
84894
|
}
|
|
84869
|
-
const { npm:
|
|
84895
|
+
const { npm: npm24 } = detectPackageManager();
|
|
84870
84896
|
if (ctx.template.workersTypes === "installed") {
|
|
84871
|
-
await installWorkersTypes(
|
|
84897
|
+
await installWorkersTypes(npm24);
|
|
84872
84898
|
} else if (ctx.template.workersTypes === "generated") {
|
|
84873
|
-
await generateWorkersTypes(ctx,
|
|
84899
|
+
await generateWorkersTypes(ctx, npm24);
|
|
84874
84900
|
}
|
|
84875
|
-
const usesNodeCompat = await maybeInstallNodeTypes(ctx,
|
|
84901
|
+
const usesNodeCompat = await maybeInstallNodeTypes(ctx, npm24);
|
|
84876
84902
|
await updateTsConfig(ctx, { usesNodeCompat });
|
|
84877
84903
|
}
|
|
84878
|
-
async function generateWorkersTypes(ctx,
|
|
84879
|
-
const packageJsonPath = (0,
|
|
84880
|
-
if (!(0,
|
|
84904
|
+
async function generateWorkersTypes(ctx, npm24) {
|
|
84905
|
+
const packageJsonPath = (0, import_node_path17.join)(ctx.project.path, "package.json");
|
|
84906
|
+
if (!(0, import_node_fs13.existsSync)(packageJsonPath)) {
|
|
84881
84907
|
return;
|
|
84882
84908
|
}
|
|
84883
84909
|
const packageManifest = readJSON(packageJsonPath);
|
|
84884
84910
|
if (!packageManifest.scripts?.["cf-typegen"]) {
|
|
84885
84911
|
return;
|
|
84886
84912
|
}
|
|
84887
|
-
const typesCmd = [
|
|
84913
|
+
const typesCmd = [npm24, "run", "cf-typegen"];
|
|
84888
84914
|
await runCommand(typesCmd, {
|
|
84889
84915
|
cwd: ctx.project.path,
|
|
84890
84916
|
silent: true,
|
|
@@ -84896,7 +84922,7 @@ async function generateWorkersTypes(ctx, npm23) {
|
|
|
84896
84922
|
writeFile2(packageJsonPath, JSON.stringify(packageManifest, null, 2));
|
|
84897
84923
|
}
|
|
84898
84924
|
}
|
|
84899
|
-
var maybeInstallNodeTypes = async (ctx,
|
|
84925
|
+
var maybeInstallNodeTypes = async (ctx, npm24) => {
|
|
84900
84926
|
let parsedConfig = {};
|
|
84901
84927
|
if (wranglerJsonExists(ctx)) {
|
|
84902
84928
|
parsedConfig = readWranglerJson(ctx);
|
|
@@ -84909,21 +84935,21 @@ var maybeInstallNodeTypes = async (ctx, npm23) => {
|
|
|
84909
84935
|
await installPackages(["@types/node"], {
|
|
84910
84936
|
dev: true,
|
|
84911
84937
|
startText: "Installing @types/node",
|
|
84912
|
-
doneText: `${brandColor("installed")} ${dim(`via ${
|
|
84938
|
+
doneText: `${brandColor("installed")} ${dim(`via ${npm24}`)}`
|
|
84913
84939
|
});
|
|
84914
84940
|
return true;
|
|
84915
84941
|
}
|
|
84916
84942
|
return false;
|
|
84917
84943
|
};
|
|
84918
84944
|
async function updateTsConfig(ctx, { usesNodeCompat }) {
|
|
84919
|
-
const tsconfigPath = (0,
|
|
84920
|
-
if (!(0,
|
|
84945
|
+
const tsconfigPath = (0, import_node_path17.join)(ctx.project.path, "tsconfig.json");
|
|
84946
|
+
if (!(0, import_node_fs13.existsSync)(tsconfigPath)) {
|
|
84921
84947
|
return;
|
|
84922
84948
|
}
|
|
84923
84949
|
const tsconfig = readFile(tsconfigPath);
|
|
84924
84950
|
try {
|
|
84925
|
-
const
|
|
84926
|
-
const currentTypes =
|
|
84951
|
+
const config46 = parse6(tsconfig);
|
|
84952
|
+
const currentTypes = config46.compilerOptions?.types ?? [];
|
|
84927
84953
|
let newTypes = [...currentTypes];
|
|
84928
84954
|
if (ctx.template.workersTypes === "installed") {
|
|
84929
84955
|
const entrypointVersion = getLatestTypesEntrypoint(ctx);
|
|
@@ -84974,16 +85000,16 @@ async function updateTsConfig(ctx, { usesNodeCompat }) {
|
|
|
84974
85000
|
warn("Failed to update `tsconfig.json`.");
|
|
84975
85001
|
}
|
|
84976
85002
|
}
|
|
84977
|
-
async function installWorkersTypes(
|
|
85003
|
+
async function installWorkersTypes(npm24) {
|
|
84978
85004
|
await installPackages(["@cloudflare/workers-types"], {
|
|
84979
85005
|
dev: true,
|
|
84980
85006
|
startText: "Installing @cloudflare/workers-types",
|
|
84981
|
-
doneText: `${brandColor("installed")} ${dim(`via ${
|
|
85007
|
+
doneText: `${brandColor("installed")} ${dim(`via ${npm24}`)}`
|
|
84982
85008
|
});
|
|
84983
85009
|
}
|
|
84984
85010
|
|
|
84985
85011
|
// src/cli.ts
|
|
84986
|
-
var { npm:
|
|
85012
|
+
var { npm: npm23 } = detectPackageManager();
|
|
84987
85013
|
var main = async (argv) => {
|
|
84988
85014
|
const result = await parseArgs(argv);
|
|
84989
85015
|
if (result.type === "unknown") {
|
|
@@ -85019,10 +85045,10 @@ ${result.errorMessage}`);
|
|
|
85019
85045
|
};
|
|
85020
85046
|
var runLatest = async () => {
|
|
85021
85047
|
const args = process.argv.slice(2);
|
|
85022
|
-
if (
|
|
85048
|
+
if (npm23 === "npm") {
|
|
85023
85049
|
args.unshift("--");
|
|
85024
85050
|
}
|
|
85025
|
-
await runCommand([
|
|
85051
|
+
await runCommand([npm23, "create", "cloudflare@latest", ...args]);
|
|
85026
85052
|
};
|
|
85027
85053
|
var runCli = async (args) => {
|
|
85028
85054
|
printBanner(args);
|
|
@@ -85040,9 +85066,9 @@ var setupProjectDirectory = (ctx) => {
|
|
|
85040
85066
|
if (err) {
|
|
85041
85067
|
throw new Error(err);
|
|
85042
85068
|
}
|
|
85043
|
-
const directory = (0,
|
|
85044
|
-
(0,
|
|
85045
|
-
(0,
|
|
85069
|
+
const directory = (0, import_node_path18.dirname)(path6);
|
|
85070
|
+
(0, import_node_fs14.mkdirSync)(directory, { recursive: true });
|
|
85071
|
+
(0, import_node_process7.chdir)(directory);
|
|
85046
85072
|
};
|
|
85047
85073
|
var create = async (ctx) => {
|
|
85048
85074
|
const { template } = ctx;
|
|
@@ -85054,14 +85080,14 @@ var create = async (ctx) => {
|
|
|
85054
85080
|
await copyTemplateFiles(ctx);
|
|
85055
85081
|
}
|
|
85056
85082
|
await updatePackageName(ctx);
|
|
85057
|
-
(0,
|
|
85083
|
+
(0, import_node_process7.chdir)(ctx.project.path);
|
|
85058
85084
|
await npmInstall(ctx);
|
|
85059
85085
|
await rectifyPmMismatch(ctx);
|
|
85060
85086
|
endSection(`Application created`);
|
|
85061
85087
|
};
|
|
85062
85088
|
var configure15 = async (ctx) => {
|
|
85063
85089
|
startSection(
|
|
85064
|
-
|
|
85090
|
+
`Configuring your application for Cloudflare${ctx.args.experimental ? ` via \`wrangler setup\`` : ""}`,
|
|
85065
85091
|
"Step 2 of 3"
|
|
85066
85092
|
);
|
|
85067
85093
|
await installWrangler();
|