create-cloudflare 0.0.0-6d7d00a8 → 0.0.0-6dda3626
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 +131 -392
- package/package.json +2 -4
- package/templates/angular/c3.ts +4 -5
- package/templates/astro/c3.ts +1 -1
- package/templates/common/c3.ts +0 -1
- package/templates/hello-world/c3.ts +0 -1
- package/templates/hello-world-durable-object/c3.ts +0 -1
- package/templates/hono/c3.ts +2 -2
- package/templates/next/c3.ts +3 -1
- package/templates/next/templates.ts +18 -18
- package/templates/nuxt/c3.ts +1 -1
- package/templates/openapi/c3.ts +0 -1
- package/templates/pre-existing/c3.ts +2 -4
- package/templates/queues/c3.ts +0 -1
- package/templates/qwik/c3.ts +1 -1
- package/templates/remix/c3.ts +1 -1
- package/templates/scheduled/c3.ts +0 -1
- package/templates/solid/c3.ts +7 -18
- package/templates/solid/js/vite.config.js +9 -4
- package/templates/solid/ts/vite.config.ts +9 -4
- package/templates/svelte/c3.ts +3 -1
- package/templates/chatgptPlugin/c3.ts +0 -10
- package/templates/chatgptPlugin/ts/.assets/example.png +0 -0
- package/templates/chatgptPlugin/ts/README.md +0 -25
- package/templates/chatgptPlugin/ts/__dot__gitignore +0 -171
- package/templates/chatgptPlugin/ts/package.json +0 -16
- package/templates/chatgptPlugin/ts/src/index.ts +0 -33
- package/templates/chatgptPlugin/ts/src/search.ts +0 -59
- package/templates/chatgptPlugin/ts/wrangler.toml +0 -3
package/dist/cli.js
CHANGED
|
@@ -2837,8 +2837,8 @@ function assembleStyles() {
|
|
|
2837
2837
|
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
2838
2838
|
Object.defineProperties(styles, {
|
|
2839
2839
|
rgbToAnsi256: {
|
|
2840
|
-
value: (red2, green2,
|
|
2841
|
-
if (red2 === green2 && green2 ===
|
|
2840
|
+
value: (red2, green2, blue2) => {
|
|
2841
|
+
if (red2 === green2 && green2 === blue2) {
|
|
2842
2842
|
if (red2 < 8) {
|
|
2843
2843
|
return 16;
|
|
2844
2844
|
}
|
|
@@ -2847,7 +2847,7 @@ function assembleStyles() {
|
|
|
2847
2847
|
}
|
|
2848
2848
|
return Math.round((red2 - 8) / 247 * 24) + 232;
|
|
2849
2849
|
}
|
|
2850
|
-
return 16 + 36 * Math.round(red2 / 255 * 5) + 6 * Math.round(green2 / 255 * 5) + Math.round(
|
|
2850
|
+
return 16 + 36 * Math.round(red2 / 255 * 5) + 6 * Math.round(green2 / 255 * 5) + Math.round(blue2 / 255 * 5);
|
|
2851
2851
|
},
|
|
2852
2852
|
enumerable: false
|
|
2853
2853
|
},
|
|
@@ -2886,23 +2886,23 @@ function assembleStyles() {
|
|
|
2886
2886
|
}
|
|
2887
2887
|
let red2;
|
|
2888
2888
|
let green2;
|
|
2889
|
-
let
|
|
2889
|
+
let blue2;
|
|
2890
2890
|
if (code >= 232) {
|
|
2891
2891
|
red2 = ((code - 232) * 10 + 8) / 255;
|
|
2892
2892
|
green2 = red2;
|
|
2893
|
-
|
|
2893
|
+
blue2 = red2;
|
|
2894
2894
|
} else {
|
|
2895
2895
|
code -= 16;
|
|
2896
2896
|
const remainder = code % 36;
|
|
2897
2897
|
red2 = Math.floor(code / 36) / 5;
|
|
2898
2898
|
green2 = Math.floor(remainder / 6) / 5;
|
|
2899
|
-
|
|
2899
|
+
blue2 = remainder % 6 / 5;
|
|
2900
2900
|
}
|
|
2901
|
-
const value = Math.max(red2, green2,
|
|
2901
|
+
const value = Math.max(red2, green2, blue2) * 2;
|
|
2902
2902
|
if (value === 0) {
|
|
2903
2903
|
return 30;
|
|
2904
2904
|
}
|
|
2905
|
-
let result = 30 + (Math.round(
|
|
2905
|
+
let result = 30 + (Math.round(blue2) << 2 | Math.round(green2) << 1 | Math.round(red2));
|
|
2906
2906
|
if (value === 2) {
|
|
2907
2907
|
result += 60;
|
|
2908
2908
|
}
|
|
@@ -2911,7 +2911,7 @@ function assembleStyles() {
|
|
|
2911
2911
|
enumerable: false
|
|
2912
2912
|
},
|
|
2913
2913
|
rgbToAnsi: {
|
|
2914
|
-
value: (red2, green2,
|
|
2914
|
+
value: (red2, green2, blue2) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red2, green2, blue2)),
|
|
2915
2915
|
enumerable: false
|
|
2916
2916
|
},
|
|
2917
2917
|
hexToAnsi: {
|
|
@@ -2927,7 +2927,7 @@ var init_ansi_styles = __esm({
|
|
|
2927
2927
|
ANSI_BACKGROUND_OFFSET = 10;
|
|
2928
2928
|
wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
2929
2929
|
wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
2930
|
-
wrapAnsi16m = (offset = 0) => (red2, green2,
|
|
2930
|
+
wrapAnsi16m = (offset = 0) => (red2, green2, blue2) => `\x1B[${38 + offset};2;${red2};${green2};${blue2}m`;
|
|
2931
2931
|
styles = {
|
|
2932
2932
|
modifier: {
|
|
2933
2933
|
reset: [0, 0],
|
|
@@ -3814,7 +3814,7 @@ var init_args = __esm({
|
|
|
3814
3814
|
var version, devDependencies;
|
|
3815
3815
|
var init_package = __esm({
|
|
3816
3816
|
"package.json"() {
|
|
3817
|
-
version = "0.0.0-
|
|
3817
|
+
version = "0.0.0-6dda3626";
|
|
3818
3818
|
devDependencies = {
|
|
3819
3819
|
"@babel/parser": "^7.21.3",
|
|
3820
3820
|
"@babel/types": "^7.21.4",
|
|
@@ -3832,7 +3832,6 @@ var init_package = __esm({
|
|
|
3832
3832
|
"@types/esprima": "^4.0.3",
|
|
3833
3833
|
"@types/node": "^18.15.3",
|
|
3834
3834
|
"@types/semver": "^7.5.1",
|
|
3835
|
-
"@types/shell-quote": "^1.7.2",
|
|
3836
3835
|
"@types/which-pm-runs": "^1.0.0",
|
|
3837
3836
|
"@types/yargs": "^17.0.22",
|
|
3838
3837
|
"@typescript-eslint/eslint-plugin": "^5.55.0",
|
|
@@ -3852,7 +3851,6 @@ var init_package = __esm({
|
|
|
3852
3851
|
pnpm: "^8.10.0",
|
|
3853
3852
|
recast: "^0.22.0",
|
|
3854
3853
|
semver: "^7.5.1",
|
|
3855
|
-
"shell-quote": "^1.8.1",
|
|
3856
3854
|
typescript: "^5.0.2",
|
|
3857
3855
|
undici: "5.28.2",
|
|
3858
3856
|
"vite-tsconfig-paths": "^4.0.8",
|
|
@@ -24219,18 +24217,18 @@ var init_package2 = __esm({
|
|
|
24219
24217
|
"additionally it also contains a map that maps frameworks to their respective clis"
|
|
24220
24218
|
],
|
|
24221
24219
|
dependencies: {
|
|
24222
|
-
"create-astro": "4.7.
|
|
24223
|
-
"@angular/create": "17.1.
|
|
24224
|
-
"create-docusaurus": "3.1.
|
|
24220
|
+
"create-astro": "4.7.2",
|
|
24221
|
+
"@angular/create": "17.1.2",
|
|
24222
|
+
"create-docusaurus": "3.1.1",
|
|
24225
24223
|
"create-hono": "0.3.2",
|
|
24226
|
-
"create-next-app": "14.0
|
|
24227
|
-
"create-qwik": "1.4.
|
|
24224
|
+
"create-next-app": "14.1.0",
|
|
24225
|
+
"create-qwik": "1.4.3",
|
|
24228
24226
|
"create-react-app": "5.0.1",
|
|
24229
24227
|
"create-remix": "2.5.1",
|
|
24230
|
-
"create-solid": "0.
|
|
24228
|
+
"create-solid": "0.4.10",
|
|
24231
24229
|
"create-svelte": "6.0.8",
|
|
24232
|
-
"create-vue": "3.9.
|
|
24233
|
-
gatsby: "5.13.
|
|
24230
|
+
"create-vue": "3.9.2",
|
|
24231
|
+
gatsby: "5.13.3",
|
|
24234
24232
|
nuxi: "3.10.0"
|
|
24235
24233
|
},
|
|
24236
24234
|
frameworkCliMap: {
|
|
@@ -25810,238 +25808,11 @@ var init_poll = __esm({
|
|
|
25810
25808
|
}
|
|
25811
25809
|
});
|
|
25812
25810
|
|
|
25813
|
-
// ../../node_modules/.pnpm/shell-quote@1.8.1/node_modules/shell-quote/quote.js
|
|
25814
|
-
var require_quote = __commonJS({
|
|
25815
|
-
"../../node_modules/.pnpm/shell-quote@1.8.1/node_modules/shell-quote/quote.js"(exports2, module2) {
|
|
25816
|
-
"use strict";
|
|
25817
|
-
module2.exports = function quote2(xs) {
|
|
25818
|
-
return xs.map(function(s) {
|
|
25819
|
-
if (s && typeof s === "object") {
|
|
25820
|
-
return s.op.replace(/(.)/g, "\\$1");
|
|
25821
|
-
}
|
|
25822
|
-
if (/["\s]/.test(s) && !/'/.test(s)) {
|
|
25823
|
-
return "'" + s.replace(/(['\\])/g, "\\$1") + "'";
|
|
25824
|
-
}
|
|
25825
|
-
if (/["'\s]/.test(s)) {
|
|
25826
|
-
return '"' + s.replace(/(["\\$`!])/g, "\\$1") + '"';
|
|
25827
|
-
}
|
|
25828
|
-
return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g, "$1\\$2");
|
|
25829
|
-
}).join(" ");
|
|
25830
|
-
};
|
|
25831
|
-
}
|
|
25832
|
-
});
|
|
25833
|
-
|
|
25834
|
-
// ../../node_modules/.pnpm/shell-quote@1.8.1/node_modules/shell-quote/parse.js
|
|
25835
|
-
var require_parse4 = __commonJS({
|
|
25836
|
-
"../../node_modules/.pnpm/shell-quote@1.8.1/node_modules/shell-quote/parse.js"(exports2, module2) {
|
|
25837
|
-
"use strict";
|
|
25838
|
-
var CONTROL = "(?:" + [
|
|
25839
|
-
"\\|\\|",
|
|
25840
|
-
"\\&\\&",
|
|
25841
|
-
";;",
|
|
25842
|
-
"\\|\\&",
|
|
25843
|
-
"\\<\\(",
|
|
25844
|
-
"\\<\\<\\<",
|
|
25845
|
-
">>",
|
|
25846
|
-
">\\&",
|
|
25847
|
-
"<\\&",
|
|
25848
|
-
"[&;()|<>]"
|
|
25849
|
-
].join("|") + ")";
|
|
25850
|
-
var controlRE = new RegExp("^" + CONTROL + "$");
|
|
25851
|
-
var META = "|&;()<> \\t";
|
|
25852
|
-
var SINGLE_QUOTE = '"((\\\\"|[^"])*?)"';
|
|
25853
|
-
var DOUBLE_QUOTE = "'((\\\\'|[^'])*?)'";
|
|
25854
|
-
var hash = /^#$/;
|
|
25855
|
-
var SQ = "'";
|
|
25856
|
-
var DQ = '"';
|
|
25857
|
-
var DS = "$";
|
|
25858
|
-
var TOKEN = "";
|
|
25859
|
-
var mult = 4294967296;
|
|
25860
|
-
for (i = 0; i < 4; i++) {
|
|
25861
|
-
TOKEN += (mult * Math.random()).toString(16);
|
|
25862
|
-
}
|
|
25863
|
-
var i;
|
|
25864
|
-
var startsWithToken = new RegExp("^" + TOKEN);
|
|
25865
|
-
function matchAll(s, r2) {
|
|
25866
|
-
var origIndex = r2.lastIndex;
|
|
25867
|
-
var matches = [];
|
|
25868
|
-
var matchObj;
|
|
25869
|
-
while (matchObj = r2.exec(s)) {
|
|
25870
|
-
matches.push(matchObj);
|
|
25871
|
-
if (r2.lastIndex === matchObj.index) {
|
|
25872
|
-
r2.lastIndex += 1;
|
|
25873
|
-
}
|
|
25874
|
-
}
|
|
25875
|
-
r2.lastIndex = origIndex;
|
|
25876
|
-
return matches;
|
|
25877
|
-
}
|
|
25878
|
-
function getVar(env2, pre, key) {
|
|
25879
|
-
var r2 = typeof env2 === "function" ? env2(key) : env2[key];
|
|
25880
|
-
if (typeof r2 === "undefined" && key != "") {
|
|
25881
|
-
r2 = "";
|
|
25882
|
-
} else if (typeof r2 === "undefined") {
|
|
25883
|
-
r2 = "$";
|
|
25884
|
-
}
|
|
25885
|
-
if (typeof r2 === "object") {
|
|
25886
|
-
return pre + TOKEN + JSON.stringify(r2) + TOKEN;
|
|
25887
|
-
}
|
|
25888
|
-
return pre + r2;
|
|
25889
|
-
}
|
|
25890
|
-
function parseInternal(string, env2, opts) {
|
|
25891
|
-
if (!opts) {
|
|
25892
|
-
opts = {};
|
|
25893
|
-
}
|
|
25894
|
-
var BS = opts.escape || "\\";
|
|
25895
|
-
var BAREWORD = "(\\" + BS + `['"` + META + `]|[^\\s'"` + META + "])+";
|
|
25896
|
-
var chunker = new RegExp([
|
|
25897
|
-
"(" + CONTROL + ")",
|
|
25898
|
-
// control chars
|
|
25899
|
-
"(" + BAREWORD + "|" + SINGLE_QUOTE + "|" + DOUBLE_QUOTE + ")+"
|
|
25900
|
-
].join("|"), "g");
|
|
25901
|
-
var matches = matchAll(string, chunker);
|
|
25902
|
-
if (matches.length === 0) {
|
|
25903
|
-
return [];
|
|
25904
|
-
}
|
|
25905
|
-
if (!env2) {
|
|
25906
|
-
env2 = {};
|
|
25907
|
-
}
|
|
25908
|
-
var commented = false;
|
|
25909
|
-
return matches.map(function(match) {
|
|
25910
|
-
var s = match[0];
|
|
25911
|
-
if (!s || commented) {
|
|
25912
|
-
return void 0;
|
|
25913
|
-
}
|
|
25914
|
-
if (controlRE.test(s)) {
|
|
25915
|
-
return { op: s };
|
|
25916
|
-
}
|
|
25917
|
-
var quote2 = false;
|
|
25918
|
-
var esc = false;
|
|
25919
|
-
var out = "";
|
|
25920
|
-
var isGlob = false;
|
|
25921
|
-
var i2;
|
|
25922
|
-
function parseEnvVar() {
|
|
25923
|
-
i2 += 1;
|
|
25924
|
-
var varend;
|
|
25925
|
-
var varname;
|
|
25926
|
-
var char = s.charAt(i2);
|
|
25927
|
-
if (char === "{") {
|
|
25928
|
-
i2 += 1;
|
|
25929
|
-
if (s.charAt(i2) === "}") {
|
|
25930
|
-
throw new Error("Bad substitution: " + s.slice(i2 - 2, i2 + 1));
|
|
25931
|
-
}
|
|
25932
|
-
varend = s.indexOf("}", i2);
|
|
25933
|
-
if (varend < 0) {
|
|
25934
|
-
throw new Error("Bad substitution: " + s.slice(i2));
|
|
25935
|
-
}
|
|
25936
|
-
varname = s.slice(i2, varend);
|
|
25937
|
-
i2 = varend;
|
|
25938
|
-
} else if (/[*@#?$!_-]/.test(char)) {
|
|
25939
|
-
varname = char;
|
|
25940
|
-
i2 += 1;
|
|
25941
|
-
} else {
|
|
25942
|
-
var slicedFromI = s.slice(i2);
|
|
25943
|
-
varend = slicedFromI.match(/[^\w\d_]/);
|
|
25944
|
-
if (!varend) {
|
|
25945
|
-
varname = slicedFromI;
|
|
25946
|
-
i2 = s.length;
|
|
25947
|
-
} else {
|
|
25948
|
-
varname = slicedFromI.slice(0, varend.index);
|
|
25949
|
-
i2 += varend.index - 1;
|
|
25950
|
-
}
|
|
25951
|
-
}
|
|
25952
|
-
return getVar(env2, "", varname);
|
|
25953
|
-
}
|
|
25954
|
-
for (i2 = 0; i2 < s.length; i2++) {
|
|
25955
|
-
var c2 = s.charAt(i2);
|
|
25956
|
-
isGlob = isGlob || !quote2 && (c2 === "*" || c2 === "?");
|
|
25957
|
-
if (esc) {
|
|
25958
|
-
out += c2;
|
|
25959
|
-
esc = false;
|
|
25960
|
-
} else if (quote2) {
|
|
25961
|
-
if (c2 === quote2) {
|
|
25962
|
-
quote2 = false;
|
|
25963
|
-
} else if (quote2 == SQ) {
|
|
25964
|
-
out += c2;
|
|
25965
|
-
} else {
|
|
25966
|
-
if (c2 === BS) {
|
|
25967
|
-
i2 += 1;
|
|
25968
|
-
c2 = s.charAt(i2);
|
|
25969
|
-
if (c2 === DQ || c2 === BS || c2 === DS) {
|
|
25970
|
-
out += c2;
|
|
25971
|
-
} else {
|
|
25972
|
-
out += BS + c2;
|
|
25973
|
-
}
|
|
25974
|
-
} else if (c2 === DS) {
|
|
25975
|
-
out += parseEnvVar();
|
|
25976
|
-
} else {
|
|
25977
|
-
out += c2;
|
|
25978
|
-
}
|
|
25979
|
-
}
|
|
25980
|
-
} else if (c2 === DQ || c2 === SQ) {
|
|
25981
|
-
quote2 = c2;
|
|
25982
|
-
} else if (controlRE.test(c2)) {
|
|
25983
|
-
return { op: s };
|
|
25984
|
-
} else if (hash.test(c2)) {
|
|
25985
|
-
commented = true;
|
|
25986
|
-
var commentObj = { comment: string.slice(match.index + i2 + 1) };
|
|
25987
|
-
if (out.length) {
|
|
25988
|
-
return [out, commentObj];
|
|
25989
|
-
}
|
|
25990
|
-
return [commentObj];
|
|
25991
|
-
} else if (c2 === BS) {
|
|
25992
|
-
esc = true;
|
|
25993
|
-
} else if (c2 === DS) {
|
|
25994
|
-
out += parseEnvVar();
|
|
25995
|
-
} else {
|
|
25996
|
-
out += c2;
|
|
25997
|
-
}
|
|
25998
|
-
}
|
|
25999
|
-
if (isGlob) {
|
|
26000
|
-
return { op: "glob", pattern: out };
|
|
26001
|
-
}
|
|
26002
|
-
return out;
|
|
26003
|
-
}).reduce(function(prev, arg) {
|
|
26004
|
-
return typeof arg === "undefined" ? prev : prev.concat(arg);
|
|
26005
|
-
}, []);
|
|
26006
|
-
}
|
|
26007
|
-
module2.exports = function parse2(s, env2, opts) {
|
|
26008
|
-
var mapped = parseInternal(s, env2, opts);
|
|
26009
|
-
if (typeof env2 !== "function") {
|
|
26010
|
-
return mapped;
|
|
26011
|
-
}
|
|
26012
|
-
return mapped.reduce(function(acc, s2) {
|
|
26013
|
-
if (typeof s2 === "object") {
|
|
26014
|
-
return acc.concat(s2);
|
|
26015
|
-
}
|
|
26016
|
-
var xs = s2.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g"));
|
|
26017
|
-
if (xs.length === 1) {
|
|
26018
|
-
return acc.concat(xs[0]);
|
|
26019
|
-
}
|
|
26020
|
-
return acc.concat(xs.filter(Boolean).map(function(x2) {
|
|
26021
|
-
if (startsWithToken.test(x2)) {
|
|
26022
|
-
return JSON.parse(x2.split(TOKEN)[1]);
|
|
26023
|
-
}
|
|
26024
|
-
return x2;
|
|
26025
|
-
}));
|
|
26026
|
-
}, []);
|
|
26027
|
-
};
|
|
26028
|
-
}
|
|
26029
|
-
});
|
|
26030
|
-
|
|
26031
|
-
// ../../node_modules/.pnpm/shell-quote@1.8.1/node_modules/shell-quote/index.js
|
|
26032
|
-
var require_shell_quote = __commonJS({
|
|
26033
|
-
"../../node_modules/.pnpm/shell-quote@1.8.1/node_modules/shell-quote/index.js"(exports2) {
|
|
26034
|
-
"use strict";
|
|
26035
|
-
exports2.quote = require_quote();
|
|
26036
|
-
exports2.parse = require_parse4();
|
|
26037
|
-
}
|
|
26038
|
-
});
|
|
26039
|
-
|
|
26040
25811
|
// ../wrangler/package.json
|
|
26041
25812
|
var version2;
|
|
26042
25813
|
var init_package3 = __esm({
|
|
26043
25814
|
"../wrangler/package.json"() {
|
|
26044
|
-
version2 = "3.
|
|
25815
|
+
version2 = "3.26.0";
|
|
26045
25816
|
}
|
|
26046
25817
|
});
|
|
26047
25818
|
|
|
@@ -27834,7 +27605,7 @@ var require_parse_stream = __commonJS({
|
|
|
27834
27605
|
});
|
|
27835
27606
|
|
|
27836
27607
|
// ../../node_modules/.pnpm/@iarna+toml@3.0.0/node_modules/@iarna/toml/parse.js
|
|
27837
|
-
var
|
|
27608
|
+
var require_parse4 = __commonJS({
|
|
27838
27609
|
"../../node_modules/.pnpm/@iarna+toml@3.0.0/node_modules/@iarna/toml/parse.js"(exports2, module2) {
|
|
27839
27610
|
"use strict";
|
|
27840
27611
|
module2.exports = require_parse_string();
|
|
@@ -28096,7 +27867,7 @@ var require_stringify2 = __commonJS({
|
|
|
28096
27867
|
var require_toml = __commonJS({
|
|
28097
27868
|
"../../node_modules/.pnpm/@iarna+toml@3.0.0/node_modules/@iarna/toml/toml.js"(exports2) {
|
|
28098
27869
|
"use strict";
|
|
28099
|
-
exports2.parse =
|
|
27870
|
+
exports2.parse = require_parse4();
|
|
28100
27871
|
exports2.stringify = require_stringify2();
|
|
28101
27872
|
}
|
|
28102
27873
|
});
|
|
@@ -29458,16 +29229,24 @@ function prepareCommitMessage(commitMessage) {
|
|
|
29458
29229
|
return JSON.stringify(commitMessage);
|
|
29459
29230
|
}
|
|
29460
29231
|
function quoteShellArgs(args) {
|
|
29461
|
-
if (process.platform
|
|
29462
|
-
return (0, import_shell_quote.quote)(args);
|
|
29463
|
-
} else {
|
|
29232
|
+
if (process.platform === "win32") {
|
|
29464
29233
|
const specialCharsMatcher = /[&<>[\]|{}^=;!'+,`~\s]/;
|
|
29465
29234
|
return args.map(
|
|
29466
29235
|
(arg) => arg.match(specialCharsMatcher) ? `"${arg.replaceAll(`"`, `""`)}"` : arg
|
|
29467
29236
|
).join(" ");
|
|
29237
|
+
} else {
|
|
29238
|
+
return args.map((s) => {
|
|
29239
|
+
if (/["\s]/.test(s) && !/'/.test(s)) {
|
|
29240
|
+
return "'" + s.replace(/(['\\])/g, "\\$1") + "'";
|
|
29241
|
+
}
|
|
29242
|
+
if (/["'\s]/.test(s)) {
|
|
29243
|
+
return '"' + s.replace(/(["\\$`!])/g, "\\$1") + '"';
|
|
29244
|
+
}
|
|
29245
|
+
return s;
|
|
29246
|
+
}).join(" ");
|
|
29468
29247
|
}
|
|
29469
29248
|
}
|
|
29470
|
-
var import_fs7, import_path7, import_process2,
|
|
29249
|
+
var import_fs7, import_path7, import_process2, name, npm2, validateProjectDirectory, isAllowedExistingFile, setupProjectDirectory, offerToDeploy, isDeployable, runDeploy, chooseAccount, printSummary, offerGit, gitCommit, createCommitMessage;
|
|
29471
29250
|
var init_common2 = __esm({
|
|
29472
29251
|
"src/common.ts"() {
|
|
29473
29252
|
import_fs7 = require("fs");
|
|
@@ -29482,7 +29261,6 @@ var init_common2 = __esm({
|
|
|
29482
29261
|
init_command();
|
|
29483
29262
|
init_packages();
|
|
29484
29263
|
init_poll();
|
|
29485
|
-
import_shell_quote = __toESM(require_shell_quote());
|
|
29486
29264
|
init_package3();
|
|
29487
29265
|
init_package();
|
|
29488
29266
|
init_workers();
|
|
@@ -29577,7 +29355,7 @@ var init_common2 = __esm({
|
|
|
29577
29355
|
const label = `deploy via \`${quoteShellArgs([
|
|
29578
29356
|
npm2,
|
|
29579
29357
|
"run",
|
|
29580
|
-
|
|
29358
|
+
ctx.template.deployScript ?? "deploy"
|
|
29581
29359
|
])}\``;
|
|
29582
29360
|
const shouldDeploy = await processArgument(ctx.args, "deploy", {
|
|
29583
29361
|
type: "confirm",
|
|
@@ -29610,11 +29388,7 @@ var init_common2 = __esm({
|
|
|
29610
29388
|
crash("Failed to read Cloudflare account.");
|
|
29611
29389
|
return;
|
|
29612
29390
|
}
|
|
29613
|
-
const baseDeployCmd = [
|
|
29614
|
-
npm2,
|
|
29615
|
-
"run",
|
|
29616
|
-
...ctx.template.deployCommand ?? ["deploy"]
|
|
29617
|
-
];
|
|
29391
|
+
const baseDeployCmd = [npm2, "run", ctx.template.deployScript ?? "deploy"];
|
|
29618
29392
|
const insideGitRepo = await isInsideGitRepo(ctx.project.path);
|
|
29619
29393
|
const deployCmd = [
|
|
29620
29394
|
...baseDeployCmd,
|
|
@@ -29682,30 +29456,32 @@ var init_common2 = __esm({
|
|
|
29682
29456
|
printSummary = async (ctx) => {
|
|
29683
29457
|
const dirRelativePath = (0, import_path7.relative)(ctx.originalCWD, ctx.project.path);
|
|
29684
29458
|
const nextSteps = [
|
|
29685
|
-
dirRelativePath ? [
|
|
29459
|
+
dirRelativePath ? ["Navigate to the new directory", `cd ${dirRelativePath}`] : [],
|
|
29686
29460
|
[
|
|
29687
|
-
|
|
29688
|
-
quoteShellArgs([npm2, "run",
|
|
29461
|
+
"Run the development server",
|
|
29462
|
+
quoteShellArgs([npm2, "run", ctx.template.devScript ?? "start"])
|
|
29689
29463
|
],
|
|
29464
|
+
...ctx.template.previewScript ? [
|
|
29465
|
+
[
|
|
29466
|
+
"Preview your application",
|
|
29467
|
+
quoteShellArgs([npm2, "run", ctx.template.previewScript])
|
|
29468
|
+
]
|
|
29469
|
+
] : [],
|
|
29690
29470
|
[
|
|
29691
|
-
|
|
29692
|
-
quoteShellArgs([
|
|
29693
|
-
npm2,
|
|
29694
|
-
"run",
|
|
29695
|
-
...ctx.template.deployCommand ?? ["deploy"]
|
|
29696
|
-
])
|
|
29471
|
+
"Deploy your application",
|
|
29472
|
+
quoteShellArgs([npm2, "run", ctx.template.deployScript ?? "deploy"])
|
|
29697
29473
|
],
|
|
29698
29474
|
[
|
|
29699
|
-
|
|
29475
|
+
"Read the documentation",
|
|
29700
29476
|
`https://developers.cloudflare.com/${ctx.template.platform}`
|
|
29701
29477
|
],
|
|
29702
|
-
[
|
|
29478
|
+
["Stuck? Join us at", "https://discord.gg/cloudflaredev"]
|
|
29703
29479
|
];
|
|
29704
29480
|
if (ctx.deployment.url) {
|
|
29705
29481
|
const msg = [
|
|
29706
29482
|
`${gray(shapes.leftT)}`,
|
|
29707
29483
|
`${bgGreen(" SUCCESS ")}`,
|
|
29708
|
-
`${dim(
|
|
29484
|
+
`${dim("View your deployed application at")}`,
|
|
29709
29485
|
`${blue(ctx.deployment.url)}`
|
|
29710
29486
|
].join(" ");
|
|
29711
29487
|
logRaw(msg);
|
|
@@ -29713,13 +29489,9 @@ var init_common2 = __esm({
|
|
|
29713
29489
|
const msg = [
|
|
29714
29490
|
`${gray(shapes.leftT)}`,
|
|
29715
29491
|
`${bgGreen(" APPLICATION CREATED ")}`,
|
|
29716
|
-
`${dim(
|
|
29492
|
+
`${dim("Deploy your application with")}`,
|
|
29717
29493
|
`${blue(
|
|
29718
|
-
quoteShellArgs([
|
|
29719
|
-
npm2,
|
|
29720
|
-
"run",
|
|
29721
|
-
...ctx.template.deployCommand ?? ["deploy"]
|
|
29722
|
-
])
|
|
29494
|
+
quoteShellArgs([npm2, "run", ctx.template.deployScript ?? "deploy"])
|
|
29723
29495
|
)}`
|
|
29724
29496
|
].join(" ");
|
|
29725
29497
|
logRaw(msg);
|
|
@@ -33971,10 +33743,10 @@ var require_index_688c5d50 = __commonJS({
|
|
|
33971
33743
|
}
|
|
33972
33744
|
} : (path4, uid, gid) => lchownSync(path4, uid, gid);
|
|
33973
33745
|
var nodeVersion2 = process.version;
|
|
33974
|
-
var
|
|
33746
|
+
var readdir = (path4, options, cb) => fs__default["default"].readdir(path4, options, cb);
|
|
33975
33747
|
var readdirSync4 = (path4, options) => fs__default["default"].readdirSync(path4, options);
|
|
33976
33748
|
if (/^v4\./.test(nodeVersion2))
|
|
33977
|
-
|
|
33749
|
+
readdir = (path4, options, cb) => fs__default["default"].readdir(path4, cb);
|
|
33978
33750
|
var chown = (cpath, uid, gid, cb) => {
|
|
33979
33751
|
fs__default["default"][LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, (er) => {
|
|
33980
33752
|
cb(er && er.code !== "ENOENT" ? er : null);
|
|
@@ -34001,7 +33773,7 @@ var require_index_688c5d50 = __commonJS({
|
|
|
34001
33773
|
}
|
|
34002
33774
|
};
|
|
34003
33775
|
var chownr = (p2, uid, gid, cb) => {
|
|
34004
|
-
|
|
33776
|
+
readdir(p2, { withFileTypes: true }, (er, children) => {
|
|
34005
33777
|
if (er) {
|
|
34006
33778
|
if (er.code === "ENOENT")
|
|
34007
33779
|
return cb();
|
|
@@ -36878,8 +36650,8 @@ var require_index_688c5d50 = __commonJS({
|
|
|
36878
36650
|
}
|
|
36879
36651
|
}
|
|
36880
36652
|
var fs$readdir = fs3.readdir;
|
|
36881
|
-
fs3.readdir =
|
|
36882
|
-
function
|
|
36653
|
+
fs3.readdir = readdir2;
|
|
36654
|
+
function readdir2(path4, options, cb) {
|
|
36883
36655
|
var args = [path4];
|
|
36884
36656
|
if (typeof options !== "function") {
|
|
36885
36657
|
args.push(options);
|
|
@@ -41170,7 +40942,7 @@ var c3_exports = {};
|
|
|
41170
40942
|
__export(c3_exports, {
|
|
41171
40943
|
default: () => c3_default
|
|
41172
40944
|
});
|
|
41173
|
-
async function installCFWorker(
|
|
40945
|
+
async function installCFWorker() {
|
|
41174
40946
|
await installPackages(
|
|
41175
40947
|
["@cloudflare/workers-types", "@miniflare/tre@next", "wrangler@beta"],
|
|
41176
40948
|
{
|
|
@@ -41227,7 +40999,7 @@ var init_c3 = __esm({
|
|
|
41227
40999
|
configure = async (ctx) => {
|
|
41228
41000
|
updateAngularJson(ctx);
|
|
41229
41001
|
await updateAppCode();
|
|
41230
|
-
await installCFWorker(
|
|
41002
|
+
await installCFWorker();
|
|
41231
41003
|
};
|
|
41232
41004
|
config = {
|
|
41233
41005
|
configVersion: 1,
|
|
@@ -41247,8 +41019,8 @@ var init_c3 = __esm({
|
|
|
41247
41019
|
deploy: `${npm3} run pages:build && wrangler pages deploy dist/cloudflare`
|
|
41248
41020
|
}
|
|
41249
41021
|
}),
|
|
41250
|
-
|
|
41251
|
-
|
|
41022
|
+
deployScript: "deploy",
|
|
41023
|
+
devScript: "start",
|
|
41252
41024
|
testFlags: ["--style", "sass"]
|
|
41253
41025
|
};
|
|
41254
41026
|
c3_default = config;
|
|
@@ -41273,7 +41045,7 @@ var init_c32 = __esm({
|
|
|
41273
41045
|
await runFrameworkGenerator(ctx, [ctx.project.name, "--no-install"]);
|
|
41274
41046
|
logRaw("");
|
|
41275
41047
|
};
|
|
41276
|
-
configure2 = async (
|
|
41048
|
+
configure2 = async () => {
|
|
41277
41049
|
await runCommand([npx2, "astro", "add", "cloudflare", "-y"], {
|
|
41278
41050
|
silent: true,
|
|
41279
41051
|
startText: "Installing adapter",
|
|
@@ -41415,8 +41187,8 @@ var init_c35 = __esm({
|
|
|
41415
41187
|
displayName: "Hono",
|
|
41416
41188
|
platform: "workers",
|
|
41417
41189
|
generate: generate5,
|
|
41418
|
-
|
|
41419
|
-
|
|
41190
|
+
devScript: "dev",
|
|
41191
|
+
deployScript: "deploy"
|
|
41420
41192
|
};
|
|
41421
41193
|
c3_default5 = config5;
|
|
41422
41194
|
}
|
|
@@ -41599,30 +41371,30 @@ const styles = {
|
|
|
41599
41371
|
},
|
|
41600
41372
|
} as const;
|
|
41601
41373
|
`;
|
|
41602
|
-
nextConfig =
|
|
41603
|
-
const nextConfig = {}
|
|
41374
|
+
nextConfig = `import { setupDevBindings } from '@cloudflare/next-on-pages/next-dev';
|
|
41604
41375
|
|
|
41605
|
-
|
|
41376
|
+
/** @type {import('next').NextConfig} */
|
|
41377
|
+
const nextConfig = {};
|
|
41606
41378
|
|
|
41607
41379
|
// Here we use the @cloudflare/next-on-pages next-dev module to allow us to use bindings during local development
|
|
41608
41380
|
// (when running the application with \`next dev\`), for more information see:
|
|
41609
|
-
// https://github.com/
|
|
41381
|
+
// https://github.com/cloudflare/next-on-pages/blob/8e93067/internal-packages/next-dev/README.md
|
|
41610
41382
|
if (process.env.NODE_ENV === 'development') {
|
|
41611
|
-
|
|
41612
|
-
|
|
41613
|
-
|
|
41614
|
-
|
|
41615
|
-
|
|
41616
|
-
|
|
41617
|
-
|
|
41618
|
-
|
|
41619
|
-
|
|
41620
|
-
|
|
41621
|
-
|
|
41622
|
-
|
|
41623
|
-
})
|
|
41624
|
-
})
|
|
41383
|
+
await setupDevBindings({
|
|
41384
|
+
bindings: {
|
|
41385
|
+
// Add here the Cloudflare Bindings you want to have available during local development,
|
|
41386
|
+
// for more details on Bindings see: https://developers.cloudflare.com/pages/functions/bindings/)
|
|
41387
|
+
//
|
|
41388
|
+
// KV Example:
|
|
41389
|
+
// MY_KV: {
|
|
41390
|
+
// type: 'kv',
|
|
41391
|
+
// id: 'xxx',
|
|
41392
|
+
// }
|
|
41393
|
+
}
|
|
41394
|
+
});
|
|
41625
41395
|
}
|
|
41396
|
+
|
|
41397
|
+
export default nextConfig;
|
|
41626
41398
|
`;
|
|
41627
41399
|
envDts = `declare global {
|
|
41628
41400
|
namespace NodeJS {
|
|
@@ -41772,7 +41544,7 @@ var init_c36 = __esm({
|
|
|
41772
41544
|
if (installEslintPlugin) {
|
|
41773
41545
|
await writeEslintrc(ctx);
|
|
41774
41546
|
}
|
|
41775
|
-
writeFile2(`${projectPath}/next.config.
|
|
41547
|
+
writeFile2(`${projectPath}/next.config.mjs`, nextConfig);
|
|
41776
41548
|
updateStatus("Updated the next.config.js file");
|
|
41777
41549
|
writeFile2(`${projectPath}/README.md`, readme);
|
|
41778
41550
|
updateStatus("Updated the README file");
|
|
@@ -41824,6 +41596,8 @@ var init_c36 = __esm({
|
|
|
41824
41596
|
id: "next",
|
|
41825
41597
|
platform: "pages",
|
|
41826
41598
|
displayName: "Next",
|
|
41599
|
+
devScript: "dev",
|
|
41600
|
+
previewScript: "pages:preview",
|
|
41827
41601
|
generate: generate6,
|
|
41828
41602
|
configure: configure3,
|
|
41829
41603
|
transformPackageJson: async () => {
|
|
@@ -41886,7 +41660,7 @@ var init_c37 = __esm({
|
|
|
41886
41660
|
writeFile2("./.node-version", "17");
|
|
41887
41661
|
logRaw("");
|
|
41888
41662
|
};
|
|
41889
|
-
configure4 = async (
|
|
41663
|
+
configure4 = async () => {
|
|
41890
41664
|
const configFileName = "nuxt.config.ts";
|
|
41891
41665
|
const configFilePath = (0, import_node_path2.resolve)(configFileName);
|
|
41892
41666
|
const s = spinner();
|
|
@@ -41934,7 +41708,7 @@ var init_c38 = __esm({
|
|
|
41934
41708
|
generate8 = async (ctx) => {
|
|
41935
41709
|
await runFrameworkGenerator(ctx, ["basic", ctx.project.name]);
|
|
41936
41710
|
};
|
|
41937
|
-
configure5 = async (
|
|
41711
|
+
configure5 = async () => {
|
|
41938
41712
|
const cmd = [npx4, "qwik", "add", "cloudflare-pages"];
|
|
41939
41713
|
endSection(`Running ${quoteShellArgs(cmd)}`);
|
|
41940
41714
|
await runCommand(cmd);
|
|
@@ -42022,7 +41796,7 @@ var init_c310 = __esm({
|
|
|
42022
41796
|
"pages:deploy": `${npm10} run build && wrangler pages deploy ./public`
|
|
42023
41797
|
}
|
|
42024
41798
|
}),
|
|
42025
|
-
|
|
41799
|
+
devScript: "dev",
|
|
42026
41800
|
testFlags: ["--typescript", "--no-install", "--no-git-init"]
|
|
42027
41801
|
};
|
|
42028
41802
|
c3_default10 = config9;
|
|
@@ -42034,11 +41808,10 @@ var c3_exports11 = {};
|
|
|
42034
41808
|
__export(c3_exports11, {
|
|
42035
41809
|
default: () => c3_default11
|
|
42036
41810
|
});
|
|
42037
|
-
var npm11, generate11,
|
|
41811
|
+
var npm11, generate11, config10, c3_default11;
|
|
42038
41812
|
var init_c311 = __esm({
|
|
42039
41813
|
"templates/solid/c3.ts"() {
|
|
42040
41814
|
init_cli();
|
|
42041
|
-
init_colors();
|
|
42042
41815
|
init_command();
|
|
42043
41816
|
init_files();
|
|
42044
41817
|
init_packages();
|
|
@@ -42047,15 +41820,6 @@ var init_c311 = __esm({
|
|
|
42047
41820
|
await runFrameworkGenerator(ctx, [ctx.project.name]);
|
|
42048
41821
|
logRaw("");
|
|
42049
41822
|
};
|
|
42050
|
-
configure6 = async (ctx) => {
|
|
42051
|
-
const pkg = "solid-start-cloudflare-pages";
|
|
42052
|
-
await installPackages([pkg], {
|
|
42053
|
-
dev: true,
|
|
42054
|
-
startText: "Adding the Cloudflare Pages adapter",
|
|
42055
|
-
doneText: `${brandColor(`installed`)} ${dim(pkg)}`
|
|
42056
|
-
});
|
|
42057
|
-
updateStatus(`Adding the Cloudflare Pages adapter to vite config`);
|
|
42058
|
-
};
|
|
42059
41823
|
config10 = {
|
|
42060
41824
|
configVersion: 1,
|
|
42061
41825
|
id: "solid",
|
|
@@ -42066,13 +41830,15 @@ var init_c311 = __esm({
|
|
|
42066
41830
|
ts: { path: "./ts" }
|
|
42067
41831
|
},
|
|
42068
41832
|
generate: generate11,
|
|
42069
|
-
configure: configure6,
|
|
42070
41833
|
transformPackageJson: async () => ({
|
|
42071
41834
|
scripts: {
|
|
42072
|
-
"pages:
|
|
42073
|
-
"pages:deploy": `${npm11} run build && wrangler pages deploy ./dist
|
|
41835
|
+
"pages:preview": `${npm11} run build && npx wrangler pages dev dist ${await compatDateFlag()} --compatibility-flag nodejs_compat`,
|
|
41836
|
+
"pages:deploy": `${npm11} run build && wrangler pages deploy ./dist`
|
|
42074
41837
|
}
|
|
42075
|
-
})
|
|
41838
|
+
}),
|
|
41839
|
+
devScript: "dev",
|
|
41840
|
+
previewScript: "pages:preview",
|
|
41841
|
+
compatibilityFlags: ["nodejs_compat"]
|
|
42076
41842
|
};
|
|
42077
41843
|
c3_default11 = config10;
|
|
42078
41844
|
}
|
|
@@ -48393,7 +48159,7 @@ var require_esprima2 = __commonJS({
|
|
|
48393
48159
|
column: this.scanner.index - this.scanner.lineStart
|
|
48394
48160
|
};
|
|
48395
48161
|
};
|
|
48396
|
-
JSXParser2.prototype.scanXHTMLEntity = function(
|
|
48162
|
+
JSXParser2.prototype.scanXHTMLEntity = function(quote) {
|
|
48397
48163
|
var result = "&";
|
|
48398
48164
|
var valid = true;
|
|
48399
48165
|
var terminated = false;
|
|
@@ -48401,7 +48167,7 @@ var require_esprima2 = __commonJS({
|
|
|
48401
48167
|
var hex = false;
|
|
48402
48168
|
while (!this.scanner.eof() && valid && !terminated) {
|
|
48403
48169
|
var ch = this.scanner.source[this.scanner.index];
|
|
48404
|
-
if (ch ===
|
|
48170
|
+
if (ch === quote) {
|
|
48405
48171
|
break;
|
|
48406
48172
|
}
|
|
48407
48173
|
terminated = ch === ";";
|
|
@@ -48453,14 +48219,14 @@ var require_esprima2 = __commonJS({
|
|
|
48453
48219
|
}
|
|
48454
48220
|
if (cp3 === 34 || cp3 === 39) {
|
|
48455
48221
|
var start = this.scanner.index;
|
|
48456
|
-
var
|
|
48222
|
+
var quote = this.scanner.source[this.scanner.index++];
|
|
48457
48223
|
var str = "";
|
|
48458
48224
|
while (!this.scanner.eof()) {
|
|
48459
48225
|
var ch = this.scanner.source[this.scanner.index++];
|
|
48460
|
-
if (ch ===
|
|
48226
|
+
if (ch === quote) {
|
|
48461
48227
|
break;
|
|
48462
48228
|
} else if (ch === "&") {
|
|
48463
|
-
str += this.scanXHTMLEntity(
|
|
48229
|
+
str += this.scanXHTMLEntity(quote);
|
|
48464
48230
|
} else {
|
|
48465
48231
|
str += ch;
|
|
48466
48232
|
}
|
|
@@ -53307,15 +53073,15 @@ var require_esprima2 = __commonJS({
|
|
|
53307
53073
|
};
|
|
53308
53074
|
Scanner2.prototype.scanStringLiteral = function() {
|
|
53309
53075
|
var start = this.index;
|
|
53310
|
-
var
|
|
53311
|
-
assert_1.assert(
|
|
53076
|
+
var quote = this.source[start];
|
|
53077
|
+
assert_1.assert(quote === "'" || quote === '"', "String literal must starts with a quote");
|
|
53312
53078
|
++this.index;
|
|
53313
53079
|
var octal = false;
|
|
53314
53080
|
var str = "";
|
|
53315
53081
|
while (!this.eof()) {
|
|
53316
53082
|
var ch = this.source[this.index++];
|
|
53317
|
-
if (ch ===
|
|
53318
|
-
|
|
53083
|
+
if (ch === quote) {
|
|
53084
|
+
quote = "";
|
|
53319
53085
|
break;
|
|
53320
53086
|
} else if (ch === "\\") {
|
|
53321
53087
|
ch = this.source[this.index++];
|
|
@@ -53386,7 +53152,7 @@ var require_esprima2 = __commonJS({
|
|
|
53386
53152
|
str += ch;
|
|
53387
53153
|
}
|
|
53388
53154
|
}
|
|
53389
|
-
if (
|
|
53155
|
+
if (quote !== "") {
|
|
53390
53156
|
this.index = start;
|
|
53391
53157
|
this.throwUnexpectedToken();
|
|
53392
53158
|
}
|
|
@@ -61673,13 +61439,13 @@ var require_lib = __commonJS({
|
|
|
61673
61439
|
this.state.pos = pos;
|
|
61674
61440
|
return code;
|
|
61675
61441
|
}
|
|
61676
|
-
readString(
|
|
61442
|
+
readString(quote) {
|
|
61677
61443
|
const {
|
|
61678
61444
|
str,
|
|
61679
61445
|
pos,
|
|
61680
61446
|
curLine,
|
|
61681
61447
|
lineStart
|
|
61682
|
-
} = readStringContents(
|
|
61448
|
+
} = readStringContents(quote === 34 ? "double" : "single", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_string);
|
|
61683
61449
|
this.state.pos = pos + 1;
|
|
61684
61450
|
this.state.lineStart = lineStart;
|
|
61685
61451
|
this.state.curLine = curLine;
|
|
@@ -65262,7 +65028,7 @@ var require_lib = __commonJS({
|
|
|
65262
65028
|
this.state.lineStart = this.state.pos;
|
|
65263
65029
|
return out;
|
|
65264
65030
|
}
|
|
65265
|
-
jsxReadString(
|
|
65031
|
+
jsxReadString(quote) {
|
|
65266
65032
|
let out = "";
|
|
65267
65033
|
let chunkStart = ++this.state.pos;
|
|
65268
65034
|
for (; ; ) {
|
|
@@ -65272,7 +65038,7 @@ var require_lib = __commonJS({
|
|
|
65272
65038
|
});
|
|
65273
65039
|
}
|
|
65274
65040
|
const ch = this.input.charCodeAt(this.state.pos);
|
|
65275
|
-
if (ch ===
|
|
65041
|
+
if (ch === quote)
|
|
65276
65042
|
break;
|
|
65277
65043
|
if (ch === 38) {
|
|
65278
65044
|
out += this.input.slice(chunkStart, this.state.pos);
|
|
@@ -73193,7 +72959,7 @@ var c3_exports12 = {};
|
|
|
73193
72959
|
__export(c3_exports12, {
|
|
73194
72960
|
default: () => c3_default12
|
|
73195
72961
|
});
|
|
73196
|
-
var npm12, generate12,
|
|
72962
|
+
var npm12, generate12, configure6, config11, c3_default12;
|
|
73197
72963
|
var init_c312 = __esm({
|
|
73198
72964
|
"templates/svelte/c3.ts"() {
|
|
73199
72965
|
init_cli();
|
|
@@ -73208,7 +72974,7 @@ var init_c312 = __esm({
|
|
|
73208
72974
|
await runFrameworkGenerator(ctx, [ctx.project.name]);
|
|
73209
72975
|
logRaw("");
|
|
73210
72976
|
};
|
|
73211
|
-
|
|
72977
|
+
configure6 = async (ctx) => {
|
|
73212
72978
|
const pkg = `@sveltejs/adapter-cloudflare`;
|
|
73213
72979
|
await installPackages([pkg], {
|
|
73214
72980
|
dev: true,
|
|
@@ -73245,13 +73011,15 @@ var init_c312 = __esm({
|
|
|
73245
73011
|
displayName: "Svelte",
|
|
73246
73012
|
platform: "pages",
|
|
73247
73013
|
generate: generate12,
|
|
73248
|
-
configure:
|
|
73014
|
+
configure: configure6,
|
|
73249
73015
|
transformPackageJson: async () => ({
|
|
73250
73016
|
scripts: {
|
|
73251
|
-
"pages:
|
|
73017
|
+
"pages:preview": `${npm12} run build && wrangler pages dev ${await compatDateFlag()} .svelte-kit/cloudflare`,
|
|
73252
73018
|
"pages:deploy": `${npm12} run build && wrangler pages deploy .svelte-kit/cloudflare`
|
|
73253
73019
|
}
|
|
73254
|
-
})
|
|
73020
|
+
}),
|
|
73021
|
+
devScript: "dev",
|
|
73022
|
+
previewScript: "pages:preview"
|
|
73255
73023
|
};
|
|
73256
73024
|
c3_default12 = config11;
|
|
73257
73025
|
}
|
|
@@ -73303,7 +73071,6 @@ var init_c314 = __esm({
|
|
|
73303
73071
|
id: "hello-world",
|
|
73304
73072
|
displayName: '"Hello World" Worker',
|
|
73305
73073
|
platform: "workers",
|
|
73306
|
-
languages: ["js", "ts"],
|
|
73307
73074
|
copyFiles: {
|
|
73308
73075
|
js: {
|
|
73309
73076
|
path: "./js"
|
|
@@ -73329,7 +73096,6 @@ var init_c315 = __esm({
|
|
|
73329
73096
|
id: "hello-world-durable-object",
|
|
73330
73097
|
displayName: '"Hello World" Durable Object',
|
|
73331
73098
|
platform: "workers",
|
|
73332
|
-
languages: ["js", "ts"],
|
|
73333
73099
|
copyFiles: {
|
|
73334
73100
|
js: {
|
|
73335
73101
|
path: "./js"
|
|
@@ -73355,7 +73121,6 @@ var init_c316 = __esm({
|
|
|
73355
73121
|
id: "common",
|
|
73356
73122
|
displayName: "Example router & proxy Worker",
|
|
73357
73123
|
platform: "workers",
|
|
73358
|
-
languages: ["js", "ts"],
|
|
73359
73124
|
copyFiles: {
|
|
73360
73125
|
js: {
|
|
73361
73126
|
path: "./js"
|
|
@@ -73381,7 +73146,6 @@ var init_c317 = __esm({
|
|
|
73381
73146
|
id: "scheduled",
|
|
73382
73147
|
displayName: "Scheduled Worker (Cron Trigger)",
|
|
73383
73148
|
platform: "workers",
|
|
73384
|
-
languages: ["js", "ts"],
|
|
73385
73149
|
copyFiles: {
|
|
73386
73150
|
js: {
|
|
73387
73151
|
path: "./js"
|
|
@@ -73407,7 +73171,6 @@ var init_c318 = __esm({
|
|
|
73407
73171
|
id: "queues",
|
|
73408
73172
|
displayName: "Queue consumer & producer Worker",
|
|
73409
73173
|
platform: "workers",
|
|
73410
|
-
languages: ["js", "ts"],
|
|
73411
73174
|
copyFiles: {
|
|
73412
73175
|
js: {
|
|
73413
73176
|
path: "./js"
|
|
@@ -73430,41 +73193,19 @@ var init_c318 = __esm({
|
|
|
73430
73193
|
}
|
|
73431
73194
|
});
|
|
73432
73195
|
|
|
73433
|
-
// templates/
|
|
73196
|
+
// templates/openapi/c3.ts
|
|
73434
73197
|
var c3_exports19 = {};
|
|
73435
73198
|
__export(c3_exports19, {
|
|
73436
73199
|
default: () => c3_default19
|
|
73437
73200
|
});
|
|
73438
73201
|
var c3_default19;
|
|
73439
73202
|
var init_c319 = __esm({
|
|
73440
|
-
"templates/chatgptPlugin/c3.ts"() {
|
|
73441
|
-
c3_default19 = {
|
|
73442
|
-
configVersion: 1,
|
|
73443
|
-
id: "chatgptPlugin",
|
|
73444
|
-
displayName: "ChatGPT plugin",
|
|
73445
|
-
platform: "workers",
|
|
73446
|
-
languages: ["ts"],
|
|
73447
|
-
copyFiles: {
|
|
73448
|
-
path: "./ts"
|
|
73449
|
-
}
|
|
73450
|
-
};
|
|
73451
|
-
}
|
|
73452
|
-
});
|
|
73453
|
-
|
|
73454
|
-
// templates/openapi/c3.ts
|
|
73455
|
-
var c3_exports20 = {};
|
|
73456
|
-
__export(c3_exports20, {
|
|
73457
|
-
default: () => c3_default20
|
|
73458
|
-
});
|
|
73459
|
-
var c3_default20;
|
|
73460
|
-
var init_c320 = __esm({
|
|
73461
73203
|
"templates/openapi/c3.ts"() {
|
|
73462
|
-
|
|
73204
|
+
c3_default19 = {
|
|
73463
73205
|
configVersion: 1,
|
|
73464
73206
|
id: "openapi",
|
|
73465
73207
|
displayName: "API starter (OpenAPI compliant)",
|
|
73466
73208
|
platform: "workers",
|
|
73467
|
-
languages: ["ts"],
|
|
73468
73209
|
copyFiles: {
|
|
73469
73210
|
path: "./ts"
|
|
73470
73211
|
}
|
|
@@ -73473,13 +73214,13 @@ var init_c320 = __esm({
|
|
|
73473
73214
|
});
|
|
73474
73215
|
|
|
73475
73216
|
// templates/pre-existing/c3.ts
|
|
73476
|
-
var
|
|
73477
|
-
__export(
|
|
73217
|
+
var c3_exports20 = {};
|
|
73218
|
+
__export(c3_exports20, {
|
|
73478
73219
|
copyExistingWorkerFiles: () => copyExistingWorkerFiles,
|
|
73479
|
-
default: () =>
|
|
73220
|
+
default: () => c3_default20
|
|
73480
73221
|
});
|
|
73481
73222
|
async function copyExistingWorkerFiles(ctx) {
|
|
73482
|
-
const { dlx
|
|
73223
|
+
const { dlx } = detectPackageManager();
|
|
73483
73224
|
await chooseAccount(ctx);
|
|
73484
73225
|
if (ctx.args.existingScript === void 0) {
|
|
73485
73226
|
ctx.args.existingScript = await processArgument(
|
|
@@ -73525,8 +73266,8 @@ async function copyExistingWorkerFiles(ctx) {
|
|
|
73525
73266
|
(0, import_path10.join)(ctx.project.path, "wrangler.toml")
|
|
73526
73267
|
);
|
|
73527
73268
|
}
|
|
73528
|
-
var import_promises, import_os, import_path10,
|
|
73529
|
-
var
|
|
73269
|
+
var import_promises, import_os, import_path10, c3_default20;
|
|
73270
|
+
var init_c320 = __esm({
|
|
73530
73271
|
"templates/pre-existing/c3.ts"() {
|
|
73531
73272
|
import_promises = require("fs/promises");
|
|
73532
73273
|
import_os = require("os");
|
|
@@ -73536,13 +73277,12 @@ var init_c321 = __esm({
|
|
|
73536
73277
|
init_command();
|
|
73537
73278
|
init_packages();
|
|
73538
73279
|
init_common2();
|
|
73539
|
-
|
|
73280
|
+
c3_default20 = {
|
|
73540
73281
|
configVersion: 1,
|
|
73541
73282
|
id: "pre-existing",
|
|
73542
73283
|
displayName: "Pre-existing Worker (from Dashboard)",
|
|
73543
73284
|
platform: "workers",
|
|
73544
73285
|
hidden: true,
|
|
73545
|
-
languages: ["js"],
|
|
73546
73286
|
copyFiles: {
|
|
73547
73287
|
path: "./js"
|
|
73548
73288
|
},
|
|
@@ -78658,13 +78398,12 @@ var getTemplateMap = async () => {
|
|
|
78658
78398
|
common: (await Promise.resolve().then(() => (init_c316(), c3_exports16))).default,
|
|
78659
78399
|
scheduled: (await Promise.resolve().then(() => (init_c317(), c3_exports17))).default,
|
|
78660
78400
|
queues: (await Promise.resolve().then(() => (init_c318(), c3_exports18))).default,
|
|
78661
|
-
|
|
78662
|
-
openapi: (await Promise.resolve().then(() => (init_c320(), c3_exports20))).default,
|
|
78401
|
+
openapi: (await Promise.resolve().then(() => (init_c319(), c3_exports19))).default,
|
|
78663
78402
|
// Dummy record -- actual template config resolved in `processRemoteTemplate`
|
|
78664
78403
|
"remote-template": {
|
|
78665
78404
|
displayName: "Worker built from a template hosted in a git repository"
|
|
78666
78405
|
},
|
|
78667
|
-
"pre-existing": (await Promise.resolve().then(() => (
|
|
78406
|
+
"pre-existing": (await Promise.resolve().then(() => (init_c320(), c3_exports20))).default
|
|
78668
78407
|
};
|
|
78669
78408
|
};
|
|
78670
78409
|
var selectTemplate = async (args) => {
|
|
@@ -78728,8 +78467,8 @@ var selectFramework = async (args) => {
|
|
|
78728
78467
|
crash(`Unsupported framework: ${framework}`);
|
|
78729
78468
|
}
|
|
78730
78469
|
const defaultFrameworkConfig = {
|
|
78731
|
-
|
|
78732
|
-
|
|
78470
|
+
deployScript: "pages:deploy",
|
|
78471
|
+
devScript: "pages:dev"
|
|
78733
78472
|
};
|
|
78734
78473
|
return {
|
|
78735
78474
|
...defaultFrameworkConfig,
|
|
@@ -78923,7 +78662,7 @@ var runCli = async (args) => {
|
|
|
78923
78662
|
};
|
|
78924
78663
|
var runTemplate = async (ctx) => {
|
|
78925
78664
|
await create(ctx);
|
|
78926
|
-
await
|
|
78665
|
+
await configure7(ctx);
|
|
78927
78666
|
await deploy(ctx);
|
|
78928
78667
|
await printSummary(ctx);
|
|
78929
78668
|
};
|
|
@@ -78939,7 +78678,7 @@ var create = async (ctx) => {
|
|
|
78939
78678
|
await rectifyPmMismatch(ctx);
|
|
78940
78679
|
endSection(`Application created`);
|
|
78941
78680
|
};
|
|
78942
|
-
var
|
|
78681
|
+
var configure7 = async (ctx) => {
|
|
78943
78682
|
startSection("Configuring your application for Cloudflare", "Step 2 of 3");
|
|
78944
78683
|
await installWrangler();
|
|
78945
78684
|
await installWorkersTypes(ctx);
|