create-cloudflare 2.32.0 → 2.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +47 -27
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -24815,8 +24815,8 @@ var require_index_688c5d50 = __commonJS({
|
|
|
24815
24815
|
var pathReservations = () => {
|
|
24816
24816
|
const queues = /* @__PURE__ */ new Map();
|
|
24817
24817
|
const reservations = /* @__PURE__ */ new Map();
|
|
24818
|
-
const { join:
|
|
24819
|
-
const getDirs = (path7) =>
|
|
24818
|
+
const { join: join8 } = path__default["default"];
|
|
24819
|
+
const getDirs = (path7) => join8(path7).split(/[\\/]/).slice(0, -1).reduce((set, path8) => set.length ? set.concat(join8(set[set.length - 1], path8)) : [path8], []);
|
|
24820
24820
|
const running = /* @__PURE__ */ new Set();
|
|
24821
24821
|
const getQueues = (fn) => {
|
|
24822
24822
|
const res = reservations.get(fn);
|
|
@@ -38609,7 +38609,7 @@ var require_util8 = __commonJS({
|
|
|
38609
38609
|
return path6;
|
|
38610
38610
|
}
|
|
38611
38611
|
exports2.normalize = normalize2;
|
|
38612
|
-
function
|
|
38612
|
+
function join8(aRoot, aPath) {
|
|
38613
38613
|
if (aRoot === "") {
|
|
38614
38614
|
aRoot = ".";
|
|
38615
38615
|
}
|
|
@@ -38641,7 +38641,7 @@ var require_util8 = __commonJS({
|
|
|
38641
38641
|
}
|
|
38642
38642
|
return joined;
|
|
38643
38643
|
}
|
|
38644
|
-
exports2.join =
|
|
38644
|
+
exports2.join = join8;
|
|
38645
38645
|
exports2.isAbsolute = function(aPath) {
|
|
38646
38646
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
38647
38647
|
};
|
|
@@ -38814,7 +38814,7 @@ var require_util8 = __commonJS({
|
|
|
38814
38814
|
parsed.path = parsed.path.substring(0, index + 1);
|
|
38815
38815
|
}
|
|
38816
38816
|
}
|
|
38817
|
-
sourceURL =
|
|
38817
|
+
sourceURL = join8(urlGenerate(parsed), sourceURL);
|
|
38818
38818
|
}
|
|
38819
38819
|
return normalize2(sourceURL);
|
|
38820
38820
|
}
|
|
@@ -67118,7 +67118,7 @@ var logRaw = (msg) => {
|
|
|
67118
67118
|
`);
|
|
67119
67119
|
};
|
|
67120
67120
|
var log = (msg) => {
|
|
67121
|
-
const lines = msg.split("\n").map((ln) => `${gray(shapes.bar)}
|
|
67121
|
+
const lines = msg.split("\n").map((ln) => `${gray(shapes.bar)}${ln.length > 0 ? " " + white(ln) : ""}`);
|
|
67122
67122
|
logRaw(lines.join("\n"));
|
|
67123
67123
|
};
|
|
67124
67124
|
var newline = () => {
|
|
@@ -68818,7 +68818,10 @@ var spinner = (frames = spinnerFrames.clockwise, color = brandColor) => {
|
|
|
68818
68818
|
start(msg, helpText) {
|
|
68819
68819
|
helpText ||= ``;
|
|
68820
68820
|
currentMsg = msg;
|
|
68821
|
-
startMsg =
|
|
68821
|
+
startMsg = currentMsg;
|
|
68822
|
+
if (helpText !== void 0 && helpText.length > 0) {
|
|
68823
|
+
startMsg += ` ${dim(helpText)}`;
|
|
68824
|
+
}
|
|
68822
68825
|
if (isInteractive()) {
|
|
68823
68826
|
let index = 0;
|
|
68824
68827
|
clearLoop();
|
|
@@ -68831,7 +68834,7 @@ var spinner = (frames = spinnerFrames.clockwise, color = brandColor) => {
|
|
|
68831
68834
|
}
|
|
68832
68835
|
}, frameRate);
|
|
68833
68836
|
} else {
|
|
68834
|
-
|
|
68837
|
+
logRaw(`${leftT} ${startMsg}`);
|
|
68835
68838
|
}
|
|
68836
68839
|
},
|
|
68837
68840
|
update(msg) {
|
|
@@ -68849,17 +68852,20 @@ ${grayBar} ${msg}`);
|
|
|
68849
68852
|
clearLoop();
|
|
68850
68853
|
} else {
|
|
68851
68854
|
if (msg !== void 0) {
|
|
68852
|
-
|
|
68853
|
-
${grayBar} ${msg}`);
|
|
68855
|
+
logRaw(`${grayBar} ${msg}`);
|
|
68854
68856
|
}
|
|
68855
68857
|
newline();
|
|
68856
68858
|
}
|
|
68857
68859
|
}
|
|
68858
68860
|
};
|
|
68859
68861
|
};
|
|
68860
|
-
|
|
68861
|
-
|
|
68862
|
-
|
|
68862
|
+
function isInteractive() {
|
|
68863
|
+
try {
|
|
68864
|
+
return Boolean(process.stdin.isTTY && process.stdout.isTTY);
|
|
68865
|
+
} catch {
|
|
68866
|
+
return false;
|
|
68867
|
+
}
|
|
68868
|
+
}
|
|
68863
68869
|
|
|
68864
68870
|
// ../../node_modules/.pnpm/yargs@17.7.2/node_modules/yargs/lib/platform-shims/esm.mjs
|
|
68865
68871
|
var import_assert = require("assert");
|
|
@@ -73719,7 +73725,7 @@ var Yargs = YargsFactory(esm_default);
|
|
|
73719
73725
|
var yargs_default = Yargs;
|
|
73720
73726
|
|
|
73721
73727
|
// package.json
|
|
73722
|
-
var version = "2.32.
|
|
73728
|
+
var version = "2.32.2";
|
|
73723
73729
|
|
|
73724
73730
|
// src/metrics.ts
|
|
73725
73731
|
var import_node_async_hooks = require("node:async_hooks");
|
|
@@ -73999,7 +74005,7 @@ var detectPmMismatch = (ctx) => {
|
|
|
73999
74005
|
case "pnpm":
|
|
74000
74006
|
return !(0, import_fs5.existsSync)(import_path5.default.join(projectPath, "pnpm-lock.yaml"));
|
|
74001
74007
|
case "bun":
|
|
74002
|
-
return !(0, import_fs5.existsSync)(import_path5.default.join(projectPath, "bun.lockb"));
|
|
74008
|
+
return !(0, import_fs5.existsSync)(import_path5.default.join(projectPath, "bun.lockb")) && !(0, import_fs5.existsSync)(import_path5.default.join(projectPath, "bun.lock"));
|
|
74003
74009
|
}
|
|
74004
74010
|
};
|
|
74005
74011
|
|
|
@@ -74477,14 +74483,14 @@ var package_default = {
|
|
|
74477
74483
|
"create-astro": "4.10.0",
|
|
74478
74484
|
"create-analog": "1.8.1",
|
|
74479
74485
|
"@angular/create": "18.2.11",
|
|
74480
|
-
"create-docusaurus": "3.6.
|
|
74486
|
+
"create-docusaurus": "3.6.1",
|
|
74481
74487
|
"create-hono": "0.14.2",
|
|
74482
74488
|
"create-next-app": "14.2.5",
|
|
74483
74489
|
"create-qwik": "1.9.1",
|
|
74484
74490
|
"create-vite": "5.5.5",
|
|
74485
|
-
"create-remix": "2.
|
|
74491
|
+
"create-remix": "2.14.0",
|
|
74486
74492
|
"create-solid": "0.5.13",
|
|
74487
|
-
"create-vue": "3.12.
|
|
74493
|
+
"create-vue": "3.12.1",
|
|
74488
74494
|
gatsby: "5.14.0",
|
|
74489
74495
|
nuxi: "3.15.0",
|
|
74490
74496
|
sv: "0.6.1"
|
|
@@ -76831,7 +76837,7 @@ var config25 = {
|
|
|
76831
76837
|
var c3_default35 = config25;
|
|
76832
76838
|
|
|
76833
76839
|
// ../wrangler/package.json
|
|
76834
|
-
var version2 = "3.
|
|
76840
|
+
var version2 = "3.88.0";
|
|
76835
76841
|
|
|
76836
76842
|
// src/git.ts
|
|
76837
76843
|
var offerGit = async (ctx) => {
|
|
@@ -77920,6 +77926,9 @@ var processArgument = async (args, key, promptConfig) => {
|
|
|
77920
77926
|
};
|
|
77921
77927
|
|
|
77922
77928
|
// src/deploy.ts
|
|
77929
|
+
var import_promises4 = require("node:fs/promises");
|
|
77930
|
+
var import_node_os5 = require("node:os");
|
|
77931
|
+
var import_node_path5 = require("node:path");
|
|
77923
77932
|
var import_toml2 = __toESM(require_toml());
|
|
77924
77933
|
|
|
77925
77934
|
// src/helpers/poll.ts
|
|
@@ -79238,23 +79247,34 @@ var runDeploy = async (ctx) => {
|
|
|
79238
79247
|
JSON.stringify(ctx.commitMessage)
|
|
79239
79248
|
] : []
|
|
79240
79249
|
];
|
|
79241
|
-
const
|
|
79242
|
-
|
|
79250
|
+
const outputFile = (0, import_node_path5.join)(
|
|
79251
|
+
await (0, import_promises4.mkdtemp)((0, import_node_path5.join)((0, import_node_os5.tmpdir)(), "c3-wrangler-deploy-")),
|
|
79252
|
+
"output.json"
|
|
79253
|
+
);
|
|
79254
|
+
await runCommand(deployCmd, {
|
|
79243
79255
|
cwd: ctx.project.path,
|
|
79244
79256
|
env: {
|
|
79245
79257
|
CLOUDFLARE_ACCOUNT_ID: ctx.account.id,
|
|
79246
|
-
NODE_ENV: "production"
|
|
79258
|
+
NODE_ENV: "production",
|
|
79259
|
+
WRANGLER_OUTPUT_FILE_PATH: outputFile
|
|
79247
79260
|
},
|
|
79248
79261
|
startText: "Deploying your application",
|
|
79249
79262
|
doneText: `${brandColor("deployed")} ${dim(
|
|
79250
79263
|
`via \`${quoteShellArgs(baseDeployCmd)}\``
|
|
79251
79264
|
)}`
|
|
79252
79265
|
});
|
|
79253
|
-
|
|
79254
|
-
|
|
79255
|
-
|
|
79256
|
-
|
|
79257
|
-
|
|
79266
|
+
try {
|
|
79267
|
+
const contents = readFile(outputFile);
|
|
79268
|
+
const entries = contents.split("\n").filter(Boolean).map((entry) => JSON.parse(entry));
|
|
79269
|
+
const url = entries.find((entry) => entry.type === "deploy")?.targets?.[0] ?? entries.find((entry) => entry.type === "pages-deploy")?.url;
|
|
79270
|
+
const deployedUrlRegex = /https:\/\/.+\.(pages|workers)\.dev/;
|
|
79271
|
+
const deployedUrlMatch = url?.match(deployedUrlRegex);
|
|
79272
|
+
if (deployedUrlMatch) {
|
|
79273
|
+
ctx.deployment.url = deployedUrlMatch[0];
|
|
79274
|
+
} else {
|
|
79275
|
+
throw new Error("Failed to find deployment url.");
|
|
79276
|
+
}
|
|
79277
|
+
} catch {
|
|
79258
79278
|
throw new Error("Failed to find deployment url.");
|
|
79259
79279
|
}
|
|
79260
79280
|
if (ctx.deployment.url?.endsWith(".pages.dev")) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cloudflare",
|
|
3
|
-
"version": "2.32.
|
|
3
|
+
"version": "2.32.2",
|
|
4
4
|
"description": "A CLI for creating and deploying new applications to Cloudflare.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"xdg-app-paths": "^8.3.0",
|
|
68
68
|
"yargs": "^17.7.2",
|
|
69
69
|
"@cloudflare/cli": "1.1.1",
|
|
70
|
-
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
71
70
|
"@cloudflare/eslint-config-worker": "1.1.0",
|
|
72
|
-
"
|
|
71
|
+
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
72
|
+
"wrangler": "3.88.0"
|
|
73
73
|
},
|
|
74
74
|
"engines": {
|
|
75
75
|
"node": ">=18.14.1"
|