create-cloudflare 0.0.0-6a09b45c → 0.0.0-6a782ff4
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 +120 -77
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -8473,7 +8473,7 @@ var require_util = __commonJS({
|
|
|
8473
8473
|
exports.isAbsolute = function(aPath) {
|
|
8474
8474
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
8475
8475
|
};
|
|
8476
|
-
function
|
|
8476
|
+
function relative3(aRoot, aPath) {
|
|
8477
8477
|
if (aRoot === "") {
|
|
8478
8478
|
aRoot = ".";
|
|
8479
8479
|
}
|
|
@@ -8492,7 +8492,7 @@ var require_util = __commonJS({
|
|
|
8492
8492
|
}
|
|
8493
8493
|
return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
|
|
8494
8494
|
}
|
|
8495
|
-
exports.relative =
|
|
8495
|
+
exports.relative = relative3;
|
|
8496
8496
|
var supportsNullProto = function() {
|
|
8497
8497
|
var obj = /* @__PURE__ */ Object.create(null);
|
|
8498
8498
|
return !("__proto__" in obj);
|
|
@@ -58091,7 +58091,7 @@ var Yargs = YargsFactory(esm_default);
|
|
|
58091
58091
|
var yargs_default = Yargs;
|
|
58092
58092
|
|
|
58093
58093
|
// package.json
|
|
58094
|
-
var version = "0.0.0-
|
|
58094
|
+
var version = "0.0.0-6a782ff4";
|
|
58095
58095
|
var devDependencies = {
|
|
58096
58096
|
"@babel/parser": "^7.21.3",
|
|
58097
58097
|
"@babel/types": "^7.21.4",
|
|
@@ -60149,29 +60149,39 @@ var spinner = (frames = spinnerFrames.clockwise, color = brandColor) => {
|
|
|
60149
60149
|
helpText ||= ``;
|
|
60150
60150
|
currentMsg = msg;
|
|
60151
60151
|
startMsg = `${currentMsg} ${dim(helpText)}`;
|
|
60152
|
-
|
|
60153
|
-
|
|
60154
|
-
|
|
60155
|
-
|
|
60156
|
-
|
|
60157
|
-
|
|
60158
|
-
|
|
60159
|
-
|
|
60160
|
-
|
|
60161
|
-
|
|
60152
|
+
if (isInteractive()) {
|
|
60153
|
+
let index = 0;
|
|
60154
|
+
clearLoop();
|
|
60155
|
+
loop = setInterval(() => {
|
|
60156
|
+
index++;
|
|
60157
|
+
const spinnerFrame = frames[index % frames.length];
|
|
60158
|
+
const ellipsisFrame = ellipsisFrames[index % ellipsisFrames.length];
|
|
60159
|
+
if (msg) {
|
|
60160
|
+
log_update_default(`${color(spinnerFrame)} ${currentMsg} ${ellipsisFrame}`);
|
|
60161
|
+
}
|
|
60162
|
+
}, frameRate);
|
|
60163
|
+
} else {
|
|
60164
|
+
log_update_default(`${leftT} ${startMsg}`);
|
|
60165
|
+
}
|
|
60162
60166
|
},
|
|
60163
60167
|
update(msg) {
|
|
60164
60168
|
currentMsg = msg;
|
|
60165
60169
|
},
|
|
60166
60170
|
stop(msg) {
|
|
60167
|
-
|
|
60168
|
-
|
|
60169
|
-
|
|
60171
|
+
if (isInteractive()) {
|
|
60172
|
+
log_update_default.clear();
|
|
60173
|
+
if (msg) {
|
|
60174
|
+
log_update_default(`${leftT} ${startMsg}
|
|
60175
|
+
${grayBar} ${msg}`);
|
|
60176
|
+
log_update_default.done();
|
|
60177
|
+
newline();
|
|
60178
|
+
}
|
|
60179
|
+
clearLoop();
|
|
60180
|
+
} else {
|
|
60181
|
+
log_update_default(`
|
|
60170
60182
|
${grayBar} ${msg}`);
|
|
60171
|
-
log_update_default.done();
|
|
60172
60183
|
newline();
|
|
60173
60184
|
}
|
|
60174
|
-
clearLoop();
|
|
60175
60185
|
}
|
|
60176
60186
|
};
|
|
60177
60187
|
};
|
|
@@ -60265,7 +60275,10 @@ var detectPackageManager = () => {
|
|
|
60265
60275
|
|
|
60266
60276
|
// src/helpers/shell-quote.ts
|
|
60267
60277
|
var import_shell_quote = __toESM(require_shell_quote());
|
|
60268
|
-
var quote =
|
|
60278
|
+
var quote = function(args) {
|
|
60279
|
+
const stringArgs = args.map((arg) => String(arg));
|
|
60280
|
+
return import_shell_quote.default.quote(stringArgs);
|
|
60281
|
+
};
|
|
60269
60282
|
function parse(cmd, env3) {
|
|
60270
60283
|
if (process.platform === "win32") {
|
|
60271
60284
|
cmd = cmd.replaceAll("\\", "\\\\");
|
|
@@ -60364,7 +60377,7 @@ var printAsyncStatus = async ({
|
|
|
60364
60377
|
...opts
|
|
60365
60378
|
}) => {
|
|
60366
60379
|
let s;
|
|
60367
|
-
if (opts.useSpinner) {
|
|
60380
|
+
if (opts.useSpinner && isInteractive()) {
|
|
60368
60381
|
s = spinner();
|
|
60369
60382
|
}
|
|
60370
60383
|
s?.start(opts?.startText);
|
|
@@ -60382,7 +60395,10 @@ var printAsyncStatus = async ({
|
|
|
60382
60395
|
}
|
|
60383
60396
|
return promise;
|
|
60384
60397
|
};
|
|
60385
|
-
var retry = async (
|
|
60398
|
+
var retry = async ({
|
|
60399
|
+
times,
|
|
60400
|
+
exitCondition
|
|
60401
|
+
}, fn) => {
|
|
60386
60402
|
let error = null;
|
|
60387
60403
|
while (times > 0) {
|
|
60388
60404
|
try {
|
|
@@ -60390,6 +60406,9 @@ var retry = async (times, fn) => {
|
|
|
60390
60406
|
} catch (e) {
|
|
60391
60407
|
error = e;
|
|
60392
60408
|
times--;
|
|
60409
|
+
if (exitCondition?.(e)) {
|
|
60410
|
+
break;
|
|
60411
|
+
}
|
|
60393
60412
|
}
|
|
60394
60413
|
}
|
|
60395
60414
|
throw error;
|
|
@@ -60596,9 +60615,9 @@ var usesEslint = (ctx) => {
|
|
|
60596
60615
|
}
|
|
60597
60616
|
return { used: false };
|
|
60598
60617
|
};
|
|
60599
|
-
var compatDateFlag = () => {
|
|
60600
|
-
const
|
|
60601
|
-
return `--compatibility-date=${
|
|
60618
|
+
var compatDateFlag = async () => {
|
|
60619
|
+
const workerdCompatDate = await getWorkerdCompatibilityDate();
|
|
60620
|
+
return `--compatibility-date=${workerdCompatDate}`;
|
|
60602
60621
|
};
|
|
60603
60622
|
|
|
60604
60623
|
// src/frameworks/angular/index.ts
|
|
@@ -60625,12 +60644,12 @@ var config = {
|
|
|
60625
60644
|
generate,
|
|
60626
60645
|
configure,
|
|
60627
60646
|
displayName: "Angular",
|
|
60628
|
-
|
|
60647
|
+
getPackageScripts: async () => ({
|
|
60629
60648
|
process: "node ./tools/copy-worker-files.mjs && node ./tools/copy-client-files.mjs && node ./tools/bundle.mjs",
|
|
60630
60649
|
"pages:build": `${npm} run build:ssr && ${npm} run process`,
|
|
60631
|
-
start: `${npm} run pages:build && wrangler pages dev dist/cloudflare
|
|
60650
|
+
start: `${npm} run pages:build && wrangler pages dev dist/cloudflare ${await compatDateFlag()} --experimental-local`,
|
|
60632
60651
|
deploy: `${npm} run pages:build && wrangler pages deploy dist/cloudflare`
|
|
60633
|
-
},
|
|
60652
|
+
}),
|
|
60634
60653
|
deployCommand: "deploy",
|
|
60635
60654
|
devCommand: "start",
|
|
60636
60655
|
testFlags: ["--routing", "--style", "sass"]
|
|
@@ -60723,10 +60742,10 @@ var config2 = {
|
|
|
60723
60742
|
generate: generate2,
|
|
60724
60743
|
configure: configure2,
|
|
60725
60744
|
displayName: "Astro",
|
|
60726
|
-
|
|
60727
|
-
"pages:dev": `wrangler pages dev ${compatDateFlag()} -- astro dev`,
|
|
60745
|
+
getPackageScripts: async () => ({
|
|
60746
|
+
"pages:dev": `wrangler pages dev ${await compatDateFlag()} -- astro dev`,
|
|
60728
60747
|
"pages:deploy": `astro build && wrangler pages deploy ./dist`
|
|
60729
|
-
},
|
|
60748
|
+
}),
|
|
60730
60749
|
testFlags: [
|
|
60731
60750
|
"--skip-houston",
|
|
60732
60751
|
"--no-install",
|
|
@@ -60748,10 +60767,10 @@ var generate3 = async (ctx) => {
|
|
|
60748
60767
|
var config3 = {
|
|
60749
60768
|
generate: generate3,
|
|
60750
60769
|
displayName: "Docusaurus",
|
|
60751
|
-
|
|
60752
|
-
"pages:dev": `wrangler pages dev ${compatDateFlag()} --proxy 3000 -- ${npm2} run start`,
|
|
60770
|
+
getPackageScripts: async () => ({
|
|
60771
|
+
"pages:dev": `wrangler pages dev ${await compatDateFlag()} --proxy 3000 -- ${npm2} run start`,
|
|
60753
60772
|
"pages:deploy": `NODE_VERSION=16 ${npm2} run build && wrangler pages deploy ./build`
|
|
60754
|
-
},
|
|
60773
|
+
}),
|
|
60755
60774
|
testFlags: [`--package-manager`, npm2]
|
|
60756
60775
|
};
|
|
60757
60776
|
var docusaurus_default = config3;
|
|
@@ -60784,10 +60803,10 @@ var generate4 = async (ctx) => {
|
|
|
60784
60803
|
var config4 = {
|
|
60785
60804
|
generate: generate4,
|
|
60786
60805
|
displayName: "Gatsby",
|
|
60787
|
-
|
|
60788
|
-
"pages:dev": `wrangler pages dev ${compatDateFlag()} --proxy 8000 -- ${npm3} run develop`,
|
|
60806
|
+
getPackageScripts: async () => ({
|
|
60807
|
+
"pages:dev": `wrangler pages dev ${await compatDateFlag()} --proxy 8000 -- ${npm3} run develop`,
|
|
60789
60808
|
"pages:deploy": `${npm3} run build && wrangler pages deploy ./public`
|
|
60790
|
-
}
|
|
60809
|
+
})
|
|
60791
60810
|
};
|
|
60792
60811
|
var gatsby_default = config4;
|
|
60793
60812
|
|
|
@@ -60804,7 +60823,7 @@ var generate5 = async (ctx) => {
|
|
|
60804
60823
|
var config5 = {
|
|
60805
60824
|
generate: generate5,
|
|
60806
60825
|
displayName: "Hono",
|
|
60807
|
-
|
|
60826
|
+
getPackageScripts: async () => ({}),
|
|
60808
60827
|
deployCommand: "deploy",
|
|
60809
60828
|
devCommand: "dev",
|
|
60810
60829
|
type: "workers"
|
|
@@ -60944,11 +60963,17 @@ var config6 = {
|
|
|
60944
60963
|
generate: generate6,
|
|
60945
60964
|
configure: configure3,
|
|
60946
60965
|
displayName: "Next",
|
|
60947
|
-
|
|
60948
|
-
"
|
|
60949
|
-
|
|
60950
|
-
|
|
60951
|
-
|
|
60966
|
+
getPackageScripts: async () => {
|
|
60967
|
+
const isNpmOrBun = ["npm", "bun"].includes(npm4);
|
|
60968
|
+
const nextOnPagesScope = isNpmOrBun ? "@cloudflare/" : "";
|
|
60969
|
+
const nextOnPagesCommand = `${nextOnPagesScope}next-on-pages`;
|
|
60970
|
+
const pmCommand = isNpmOrBun ? npx3 : npm4;
|
|
60971
|
+
return {
|
|
60972
|
+
"pages:build": `${pmCommand} ${nextOnPagesCommand}`,
|
|
60973
|
+
"pages:deploy": `${npm4 === "npm" ? "npm run" : pmCommand} pages:build && wrangler pages deploy .vercel/output/static`,
|
|
60974
|
+
"pages:watch": `${pmCommand} ${nextOnPagesCommand} --watch`,
|
|
60975
|
+
"pages:dev": `${pmCommand} wrangler pages dev .vercel/output/static ${await compatDateFlag()} --compatibility-flag=nodejs_compat`
|
|
60976
|
+
};
|
|
60952
60977
|
},
|
|
60953
60978
|
testFlags: [
|
|
60954
60979
|
"--typescript",
|
|
@@ -60984,11 +61009,11 @@ var config7 = {
|
|
|
60984
61009
|
generate: generate7,
|
|
60985
61010
|
configure: configure4,
|
|
60986
61011
|
displayName: "Nuxt",
|
|
60987
|
-
|
|
61012
|
+
getPackageScripts: async () => ({
|
|
60988
61013
|
build: (cmd) => `NITRO_PRESET=cloudflare-pages ${cmd}`,
|
|
60989
|
-
"pages:dev": `wrangler pages dev ${compatDateFlag()} --proxy 3000 -- ${npm5} run dev`,
|
|
61014
|
+
"pages:dev": `wrangler pages dev ${await compatDateFlag()} --proxy 3000 -- ${npm5} run dev`,
|
|
60990
61015
|
"pages:deploy": `${npm5} run build && wrangler pages deploy ./dist`
|
|
60991
|
-
}
|
|
61016
|
+
})
|
|
60992
61017
|
};
|
|
60993
61018
|
var nuxt_default = config7;
|
|
60994
61019
|
|
|
@@ -61002,17 +61027,17 @@ var package_default = {
|
|
|
61002
61027
|
],
|
|
61003
61028
|
dependencies: {
|
|
61004
61029
|
"@angular/cli": "16.2.2",
|
|
61005
|
-
"create-astro": "4.
|
|
61030
|
+
"create-astro": "4.3.0",
|
|
61006
61031
|
"create-docusaurus": "2.4.3",
|
|
61007
|
-
"create-hono": "0.3.
|
|
61032
|
+
"create-hono": "0.3.2",
|
|
61008
61033
|
"create-next-app": "13.4.19",
|
|
61009
|
-
"create-qwik": "1.2.
|
|
61034
|
+
"create-qwik": "1.2.14",
|
|
61010
61035
|
"create-react-app": "5.0.1",
|
|
61011
61036
|
"create-remix": "2.1.0",
|
|
61012
|
-
"create-solid": "0.3.
|
|
61037
|
+
"create-solid": "0.3.7",
|
|
61013
61038
|
"create-svelte": "5.1.1",
|
|
61014
|
-
"create-vue": "3.
|
|
61015
|
-
gatsby: "5.12.
|
|
61039
|
+
"create-vue": "3.8.0",
|
|
61040
|
+
gatsby: "5.12.8",
|
|
61016
61041
|
nuxi: "3.9.0"
|
|
61017
61042
|
},
|
|
61018
61043
|
frameworkCliMap: {
|
|
@@ -61049,10 +61074,10 @@ var config8 = {
|
|
|
61049
61074
|
generate: generate8,
|
|
61050
61075
|
configure: configure5,
|
|
61051
61076
|
displayName: "Qwik",
|
|
61052
|
-
|
|
61053
|
-
"pages:dev": `wrangler pages dev ${compatDateFlag()} -- ${npm6} run dev`,
|
|
61077
|
+
getPackageScripts: async () => ({
|
|
61078
|
+
"pages:dev": `wrangler pages dev ${await compatDateFlag()} -- ${npm6} run dev`,
|
|
61054
61079
|
"pages:deploy": `${npm6} run build && wrangler pages deploy ./dist`
|
|
61055
|
-
}
|
|
61080
|
+
})
|
|
61056
61081
|
};
|
|
61057
61082
|
var qwik_default = config8;
|
|
61058
61083
|
|
|
@@ -61070,10 +61095,10 @@ var config9 = {
|
|
|
61070
61095
|
generate: generate9,
|
|
61071
61096
|
configure: configure6,
|
|
61072
61097
|
displayName: "React",
|
|
61073
|
-
|
|
61074
|
-
"pages:dev": `wrangler pages dev ${compatDateFlag()} --port 3000 -- ${npm7} start`,
|
|
61098
|
+
getPackageScripts: async () => ({
|
|
61099
|
+
"pages:dev": `wrangler pages dev ${await compatDateFlag()} --port 3000 -- ${npm7} start`,
|
|
61075
61100
|
"pages:deploy": `${npm7} run build && wrangler pages deploy ./build`
|
|
61076
|
-
}
|
|
61101
|
+
})
|
|
61077
61102
|
};
|
|
61078
61103
|
var react_default = config9;
|
|
61079
61104
|
|
|
@@ -61090,9 +61115,9 @@ var generate10 = async (ctx) => {
|
|
|
61090
61115
|
var config10 = {
|
|
61091
61116
|
generate: generate10,
|
|
61092
61117
|
displayName: "Remix",
|
|
61093
|
-
|
|
61118
|
+
getPackageScripts: async () => ({
|
|
61094
61119
|
"pages:deploy": `${npm8} run build && wrangler pages deploy ./public`
|
|
61095
|
-
},
|
|
61120
|
+
}),
|
|
61096
61121
|
devCommand: "dev",
|
|
61097
61122
|
testFlags: ["--typescript", "--no-install", "--no-git-init"]
|
|
61098
61123
|
};
|
|
@@ -61134,10 +61159,10 @@ var config11 = {
|
|
|
61134
61159
|
generate: generate11,
|
|
61135
61160
|
configure: configure7,
|
|
61136
61161
|
displayName: "Solid",
|
|
61137
|
-
|
|
61138
|
-
"pages:dev": `wrangler pages dev ${compatDateFlag()} --proxy 3000 -- ${npm9} run dev`,
|
|
61162
|
+
getPackageScripts: async () => ({
|
|
61163
|
+
"pages:dev": `wrangler pages dev ${await compatDateFlag()} --proxy 3000 -- ${npm9} run dev`,
|
|
61139
61164
|
"pages:deploy": `${npm9} run build && wrangler pages deploy ./dist/public`
|
|
61140
|
-
}
|
|
61165
|
+
})
|
|
61141
61166
|
};
|
|
61142
61167
|
var solid_default = config11;
|
|
61143
61168
|
|
|
@@ -61231,10 +61256,10 @@ var config12 = {
|
|
|
61231
61256
|
generate: generate12,
|
|
61232
61257
|
configure: configure8,
|
|
61233
61258
|
displayName: "Svelte",
|
|
61234
|
-
|
|
61235
|
-
"pages:dev": `wrangler pages dev ${compatDateFlag()} --proxy 5173 -- ${npm10} run dev`,
|
|
61259
|
+
getPackageScripts: async () => ({
|
|
61260
|
+
"pages:dev": `wrangler pages dev ${await compatDateFlag()} --proxy 5173 -- ${npm10} run dev`,
|
|
61236
61261
|
"pages:deploy": `${npm10} run build && wrangler pages deploy .svelte-kit/cloudflare`
|
|
61237
|
-
}
|
|
61262
|
+
})
|
|
61238
61263
|
};
|
|
61239
61264
|
var svelte_default = config12;
|
|
61240
61265
|
|
|
@@ -61247,10 +61272,10 @@ var generate13 = async (ctx) => {
|
|
|
61247
61272
|
var config13 = {
|
|
61248
61273
|
generate: generate13,
|
|
61249
61274
|
displayName: "Vue",
|
|
61250
|
-
|
|
61251
|
-
"pages:dev": `wrangler pages dev ${compatDateFlag()} --proxy 5173 -- ${npm11} run dev`,
|
|
61275
|
+
getPackageScripts: async () => ({
|
|
61276
|
+
"pages:dev": `wrangler pages dev ${await compatDateFlag()} --proxy 5173 -- ${npm11} run dev`,
|
|
61252
61277
|
"pages:deploy": `${npm11} run build && wrangler pages deploy ./dist`
|
|
61253
|
-
},
|
|
61278
|
+
}),
|
|
61254
61279
|
testFlags: ["--ts"]
|
|
61255
61280
|
};
|
|
61256
61281
|
var vue_default = config13;
|
|
@@ -61388,7 +61413,7 @@ function secondsSince(start) {
|
|
|
61388
61413
|
}
|
|
61389
61414
|
|
|
61390
61415
|
// ../wrangler/package.json
|
|
61391
|
-
var version2 = "3.
|
|
61416
|
+
var version2 = "3.14.0";
|
|
61392
61417
|
|
|
61393
61418
|
// src/common.ts
|
|
61394
61419
|
var { name, npm: npm12 } = detectPackageManager();
|
|
@@ -61522,7 +61547,10 @@ var chooseAccount = async (ctx) => {
|
|
|
61522
61547
|
};
|
|
61523
61548
|
var printSummary = async (ctx) => {
|
|
61524
61549
|
const nextSteps = [
|
|
61525
|
-
[
|
|
61550
|
+
[
|
|
61551
|
+
`Navigate to the new directory`,
|
|
61552
|
+
`cd ${quote([(0, import_path7.relative)(ctx.originalCWD, ctx.project.path)])}`
|
|
61553
|
+
],
|
|
61526
61554
|
[
|
|
61527
61555
|
`Run the development server`,
|
|
61528
61556
|
`${npm12} run ${ctx.framework?.config.devCommand ?? "start"}`
|
|
@@ -61749,6 +61777,7 @@ var defaultFrameworkConfig = {
|
|
|
61749
61777
|
devCommand: "pages:dev"
|
|
61750
61778
|
};
|
|
61751
61779
|
var runPagesGenerator = async (args) => {
|
|
61780
|
+
const originalCWD = process.cwd();
|
|
61752
61781
|
const { name: name2, path: path3 } = setupProjectDirectory(args);
|
|
61753
61782
|
const framework = await getFrameworkSelection(args);
|
|
61754
61783
|
const frameworkConfig = FrameworkMap[framework];
|
|
@@ -61766,7 +61795,8 @@ var runPagesGenerator = async (args) => {
|
|
|
61766
61795
|
args: args.additionalArgs ?? []
|
|
61767
61796
|
},
|
|
61768
61797
|
args,
|
|
61769
|
-
type: frameworkConfig.type
|
|
61798
|
+
type: frameworkConfig.type,
|
|
61799
|
+
originalCWD
|
|
61770
61800
|
};
|
|
61771
61801
|
const { generate: generate14, configure: configure9 } = FrameworkMap[framework];
|
|
61772
61802
|
await generate14({ ...ctx });
|
|
@@ -61806,7 +61836,8 @@ var getFrameworkSelection = async (args) => {
|
|
|
61806
61836
|
var updatePackageScripts = async (ctx) => {
|
|
61807
61837
|
(0, import_process3.chdir)(ctx.project.path);
|
|
61808
61838
|
await installWrangler();
|
|
61809
|
-
const {
|
|
61839
|
+
const { getPackageScripts } = ctx.framework?.config ?? {};
|
|
61840
|
+
const packageScripts = getPackageScripts ? await getPackageScripts() : {};
|
|
61810
61841
|
if (packageScripts) {
|
|
61811
61842
|
const s = spinner();
|
|
61812
61843
|
const updatingScripts = Object.entries(packageScripts).filter(
|
|
@@ -61848,12 +61879,22 @@ var createProject = async (ctx) => {
|
|
|
61848
61879
|
}
|
|
61849
61880
|
const CLOUDFLARE_ACCOUNT_ID = ctx.account.id;
|
|
61850
61881
|
try {
|
|
61851
|
-
const compatFlags =
|
|
61882
|
+
const compatFlags = quote(
|
|
61883
|
+
ctx.framework?.config.compatibilityFlags ?? []
|
|
61884
|
+
);
|
|
61852
61885
|
const compatFlagsArg = compatFlags ? `--compatibility-flags ${compatFlags}` : "";
|
|
61853
61886
|
const productionBranch = await getProductionBranch(ctx.project.path);
|
|
61854
61887
|
const cmd = `${npx5} wrangler pages project create ${ctx.project.name} --production-branch ${productionBranch} ${compatFlagsArg}`;
|
|
61855
61888
|
await retry(
|
|
61856
|
-
|
|
61889
|
+
{
|
|
61890
|
+
times: CREATE_PROJECT_RETRIES,
|
|
61891
|
+
exitCondition: (e) => {
|
|
61892
|
+
return e instanceof Error && // if the error is regarding name duplication we can exist as retrying is not going to help
|
|
61893
|
+
e.message.includes(
|
|
61894
|
+
"A project with this name already exists. Choose a different project name."
|
|
61895
|
+
);
|
|
61896
|
+
}
|
|
61897
|
+
},
|
|
61857
61898
|
async () => runCommand(cmd, {
|
|
61858
61899
|
// Make this command more verbose in test mode to aid
|
|
61859
61900
|
// troubleshooting API errors
|
|
@@ -61870,7 +61911,7 @@ var createProject = async (ctx) => {
|
|
|
61870
61911
|
try {
|
|
61871
61912
|
const verifyProject = `${npx5} wrangler pages deployment list --project-name ${ctx.project.name}`;
|
|
61872
61913
|
await retry(
|
|
61873
|
-
VERIFY_PROJECT_RETRIES,
|
|
61914
|
+
{ times: VERIFY_PROJECT_RETRIES },
|
|
61874
61915
|
async () => runCommand(verifyProject, {
|
|
61875
61916
|
silent: process.env.VITEST == void 0,
|
|
61876
61917
|
cwd: ctx.project.path,
|
|
@@ -61894,10 +61935,12 @@ var import_path9 = require("path");
|
|
|
61894
61935
|
var import_process4 = require("process");
|
|
61895
61936
|
var { dlx: dlx14 } = detectPackageManager();
|
|
61896
61937
|
var runWorkersGenerator = async (args) => {
|
|
61938
|
+
const originalCWD = process.cwd();
|
|
61897
61939
|
const { name: name2, path: path3 } = setupProjectDirectory(args);
|
|
61898
61940
|
const ctx = {
|
|
61899
61941
|
project: { name: name2, path: path3 },
|
|
61900
|
-
args
|
|
61942
|
+
args,
|
|
61943
|
+
originalCWD
|
|
61901
61944
|
};
|
|
61902
61945
|
ctx.args.ts = await processArgument(ctx.args, "ts", {
|
|
61903
61946
|
type: "confirm",
|
|
@@ -62134,7 +62177,7 @@ var isUpdateAvailable = async () => {
|
|
|
62134
62177
|
};
|
|
62135
62178
|
var runLatest = async () => {
|
|
62136
62179
|
const args = process.argv.slice(2);
|
|
62137
|
-
const argString = npm13 === "npm" ? `-- ${args
|
|
62180
|
+
const argString = npm13 === "npm" ? `-- ${quote(args)}` : `${quote(args)}`;
|
|
62138
62181
|
await runCommand(`${npm13} create cloudflare@latest ${argString}`);
|
|
62139
62182
|
};
|
|
62140
62183
|
var runCli = async (args) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cloudflare",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-6a782ff4",
|
|
4
4
|
"description": "A CLI for creating and deploying new applications to Cloudflare.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"yargs": "^17.7.1",
|
|
67
67
|
"yarn": "^1.22.19",
|
|
68
68
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
69
|
-
"wrangler": "3.
|
|
69
|
+
"wrangler": "3.14.0"
|
|
70
70
|
},
|
|
71
71
|
"engines": {
|
|
72
72
|
"node": ">=18.14.1"
|