create-cloudflare 2.32.0 → 2.32.1

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.
Files changed (2) hide show
  1. package/dist/cli.js +32 -18
  2. package/package.json +2 -2
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: join7 } = path__default["default"];
24819
- const getDirs = (path7) => join7(path7).split(/[\\/]/).slice(0, -1).reduce((set, path8) => set.length ? set.concat(join7(set[set.length - 1], path8)) : [path8], []);
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 join7(aRoot, aPath) {
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 = join7;
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 = join7(urlGenerate(parsed), sourceURL);
38817
+ sourceURL = join8(urlGenerate(parsed), sourceURL);
38818
38818
  }
38819
38819
  return normalize2(sourceURL);
38820
38820
  }
@@ -73719,7 +73719,7 @@ var Yargs = YargsFactory(esm_default);
73719
73719
  var yargs_default = Yargs;
73720
73720
 
73721
73721
  // package.json
73722
- var version = "2.32.0";
73722
+ var version = "2.32.1";
73723
73723
 
73724
73724
  // src/metrics.ts
73725
73725
  var import_node_async_hooks = require("node:async_hooks");
@@ -74477,14 +74477,14 @@ var package_default = {
74477
74477
  "create-astro": "4.10.0",
74478
74478
  "create-analog": "1.8.1",
74479
74479
  "@angular/create": "18.2.11",
74480
- "create-docusaurus": "3.6.0",
74480
+ "create-docusaurus": "3.6.1",
74481
74481
  "create-hono": "0.14.2",
74482
74482
  "create-next-app": "14.2.5",
74483
74483
  "create-qwik": "1.9.1",
74484
74484
  "create-vite": "5.5.5",
74485
- "create-remix": "2.13.1",
74485
+ "create-remix": "2.14.0",
74486
74486
  "create-solid": "0.5.13",
74487
- "create-vue": "3.12.0",
74487
+ "create-vue": "3.12.1",
74488
74488
  gatsby: "5.14.0",
74489
74489
  nuxi: "3.15.0",
74490
74490
  sv: "0.6.1"
@@ -76831,7 +76831,7 @@ var config25 = {
76831
76831
  var c3_default35 = config25;
76832
76832
 
76833
76833
  // ../wrangler/package.json
76834
- var version2 = "3.86.0";
76834
+ var version2 = "3.86.1";
76835
76835
 
76836
76836
  // src/git.ts
76837
76837
  var offerGit = async (ctx) => {
@@ -77920,6 +77920,9 @@ var processArgument = async (args, key, promptConfig) => {
77920
77920
  };
77921
77921
 
77922
77922
  // src/deploy.ts
77923
+ var import_promises4 = require("node:fs/promises");
77924
+ var import_node_os5 = require("node:os");
77925
+ var import_node_path5 = require("node:path");
77923
77926
  var import_toml2 = __toESM(require_toml());
77924
77927
 
77925
77928
  // src/helpers/poll.ts
@@ -79238,23 +79241,34 @@ var runDeploy = async (ctx) => {
79238
79241
  JSON.stringify(ctx.commitMessage)
79239
79242
  ] : []
79240
79243
  ];
79241
- const result = await runCommand(deployCmd, {
79242
- silent: true,
79244
+ const outputFile = (0, import_node_path5.join)(
79245
+ await (0, import_promises4.mkdtemp)((0, import_node_path5.join)((0, import_node_os5.tmpdir)(), "c3-wrangler-deploy-")),
79246
+ "output.json"
79247
+ );
79248
+ await runCommand(deployCmd, {
79243
79249
  cwd: ctx.project.path,
79244
79250
  env: {
79245
79251
  CLOUDFLARE_ACCOUNT_ID: ctx.account.id,
79246
- NODE_ENV: "production"
79252
+ NODE_ENV: "production",
79253
+ WRANGLER_OUTPUT_FILE_PATH: outputFile
79247
79254
  },
79248
79255
  startText: "Deploying your application",
79249
79256
  doneText: `${brandColor("deployed")} ${dim(
79250
79257
  `via \`${quoteShellArgs(baseDeployCmd)}\``
79251
79258
  )}`
79252
79259
  });
79253
- const deployedUrlRegex = /https:\/\/.+\.(pages|workers)\.dev/;
79254
- const deployedUrlMatch = result.match(deployedUrlRegex);
79255
- if (deployedUrlMatch) {
79256
- ctx.deployment.url = deployedUrlMatch[0];
79257
- } else {
79260
+ try {
79261
+ const contents = readFile(outputFile);
79262
+ const entries = contents.split("\n").filter(Boolean).map((entry) => JSON.parse(entry));
79263
+ const url = entries.find((entry) => entry.type === "deploy")?.targets?.[0] ?? entries.find((entry) => entry.type === "pages-deploy")?.url;
79264
+ const deployedUrlRegex = /https:\/\/.+\.(pages|workers)\.dev/;
79265
+ const deployedUrlMatch = url?.match(deployedUrlRegex);
79266
+ if (deployedUrlMatch) {
79267
+ ctx.deployment.url = deployedUrlMatch[0];
79268
+ } else {
79269
+ throw new Error("Failed to find deployment url.");
79270
+ }
79271
+ } catch {
79258
79272
  throw new Error("Failed to find deployment url.");
79259
79273
  }
79260
79274
  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.0",
3
+ "version": "2.32.1",
4
4
  "description": "A CLI for creating and deploying new applications to Cloudflare.",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -69,7 +69,7 @@
69
69
  "@cloudflare/cli": "1.1.1",
70
70
  "@cloudflare/workers-tsconfig": "0.0.0",
71
71
  "@cloudflare/eslint-config-worker": "1.1.0",
72
- "wrangler": "3.86.0"
72
+ "wrangler": "3.86.1"
73
73
  },
74
74
  "engines": {
75
75
  "node": ">=18.14.1"