create-cloudflare 2.70.5 → 2.70.7

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 CHANGED
@@ -2740,9 +2740,9 @@ var require_dispatcher_base = __commonJS({
2740
2740
  }
2741
2741
  close(callback) {
2742
2742
  if (callback === void 0) {
2743
- return new Promise((resolve14, reject) => {
2743
+ return new Promise((resolve15, reject) => {
2744
2744
  this.close((err, data) => {
2745
- return err ? reject(err) : resolve14(data);
2745
+ return err ? reject(err) : resolve15(data);
2746
2746
  });
2747
2747
  });
2748
2748
  }
@@ -2780,9 +2780,9 @@ var require_dispatcher_base = __commonJS({
2780
2780
  err = null;
2781
2781
  }
2782
2782
  if (callback === void 0) {
2783
- return new Promise((resolve14, reject) => {
2783
+ return new Promise((resolve15, reject) => {
2784
2784
  this.destroy(err, (err2, data) => {
2785
- return err2 ? reject(err2) : resolve14(data);
2785
+ return err2 ? reject(err2) : resolve15(data);
2786
2786
  });
2787
2787
  });
2788
2788
  }
@@ -6279,8 +6279,8 @@ var require_promise = __commonJS({
6279
6279
  function createDeferredPromise() {
6280
6280
  let res;
6281
6281
  let rej;
6282
- const promise = new Promise((resolve14, reject) => {
6283
- res = resolve14;
6282
+ const promise = new Promise((resolve15, reject) => {
6283
+ res = resolve15;
6284
6284
  rej = reject;
6285
6285
  });
6286
6286
  return { promise, resolve: res, reject: rej };
@@ -7675,12 +7675,12 @@ upgrade: ${upgrade}\r
7675
7675
  cb();
7676
7676
  }
7677
7677
  }
7678
- const waitForDrain = () => new Promise((resolve14, reject) => {
7678
+ const waitForDrain = () => new Promise((resolve15, reject) => {
7679
7679
  assert7(callback === null);
7680
7680
  if (socket[kError]) {
7681
7681
  reject(socket[kError]);
7682
7682
  } else {
7683
- callback = resolve14;
7683
+ callback = resolve15;
7684
7684
  }
7685
7685
  });
7686
7686
  socket.on("close", onDrain).on("drain", onDrain);
@@ -8525,12 +8525,12 @@ var require_client_h2 = __commonJS({
8525
8525
  cb();
8526
8526
  }
8527
8527
  }
8528
- const waitForDrain = () => new Promise((resolve14, reject) => {
8528
+ const waitForDrain = () => new Promise((resolve15, reject) => {
8529
8529
  assert7(callback === null);
8530
8530
  if (socket[kError]) {
8531
8531
  reject(socket[kError]);
8532
8532
  } else {
8533
- callback = resolve14;
8533
+ callback = resolve15;
8534
8534
  }
8535
8535
  });
8536
8536
  h2stream.on("close", onDrain).on("drain", onDrain);
@@ -8846,16 +8846,16 @@ var require_client = __commonJS({
8846
8846
  return this[kNeedDrain] < 2;
8847
8847
  }
8848
8848
  [kClose]() {
8849
- return new Promise((resolve14) => {
8849
+ return new Promise((resolve15) => {
8850
8850
  if (this[kSize]) {
8851
- this[kClosedResolve] = resolve14;
8851
+ this[kClosedResolve] = resolve15;
8852
8852
  } else {
8853
- resolve14(null);
8853
+ resolve15(null);
8854
8854
  }
8855
8855
  });
8856
8856
  }
8857
8857
  [kDestroy](err) {
8858
- return new Promise((resolve14) => {
8858
+ return new Promise((resolve15) => {
8859
8859
  const requests = this[kQueue].splice(this[kPendingIdx]);
8860
8860
  for (let i = 0; i < requests.length; i++) {
8861
8861
  const request2 = requests[i];
@@ -8866,7 +8866,7 @@ var require_client = __commonJS({
8866
8866
  this[kClosedResolve]();
8867
8867
  this[kClosedResolve] = null;
8868
8868
  }
8869
- resolve14(null);
8869
+ resolve15(null);
8870
8870
  };
8871
8871
  if (this[kHTTPContext]) {
8872
8872
  this[kHTTPContext].destroy(err, callback);
@@ -9271,8 +9271,8 @@ var require_pool_base = __commonJS({
9271
9271
  }
9272
9272
  return Promise.all(closeAll);
9273
9273
  } else {
9274
- return new Promise((resolve14) => {
9275
- this[kClosedResolve] = resolve14;
9274
+ return new Promise((resolve15) => {
9275
+ this[kClosedResolve] = resolve15;
9276
9276
  });
9277
9277
  }
9278
9278
  }
@@ -10389,7 +10389,7 @@ var require_socks5_proxy_agent = __commonJS({
10389
10389
  const proxyHost = this[kProxyUrl].hostname;
10390
10390
  const proxyPort = parseInt(this[kProxyUrl].port) || 1080;
10391
10391
  debug("creating SOCKS5 connection to", proxyHost, proxyPort);
10392
- const socket = await new Promise((resolve14, reject) => {
10392
+ const socket = await new Promise((resolve15, reject) => {
10393
10393
  this[kConnector]({
10394
10394
  hostname: proxyHost,
10395
10395
  host: proxyHost,
@@ -10399,7 +10399,7 @@ var require_socks5_proxy_agent = __commonJS({
10399
10399
  if (err) {
10400
10400
  reject(err);
10401
10401
  } else {
10402
- resolve14(socket2);
10402
+ resolve15(socket2);
10403
10403
  }
10404
10404
  });
10405
10405
  });
@@ -10409,14 +10409,14 @@ var require_socks5_proxy_agent = __commonJS({
10409
10409
  socket.destroy();
10410
10410
  });
10411
10411
  await socks5Client.handshake();
10412
- await new Promise((resolve14, reject) => {
10412
+ await new Promise((resolve15, reject) => {
10413
10413
  const timeout = setTimeout(() => {
10414
10414
  reject(new Error("SOCKS5 authentication timeout"));
10415
10415
  }, 5e3);
10416
10416
  const onAuthenticated = () => {
10417
10417
  clearTimeout(timeout);
10418
10418
  socks5Client.removeListener("error", onError);
10419
- resolve14();
10419
+ resolve15();
10420
10420
  };
10421
10421
  const onError = (err) => {
10422
10422
  clearTimeout(timeout);
@@ -10425,14 +10425,14 @@ var require_socks5_proxy_agent = __commonJS({
10425
10425
  };
10426
10426
  if (socks5Client.state === STATES.AUTHENTICATED) {
10427
10427
  clearTimeout(timeout);
10428
- resolve14();
10428
+ resolve15();
10429
10429
  } else {
10430
10430
  socks5Client.once("authenticated", onAuthenticated);
10431
10431
  socks5Client.once("error", onError);
10432
10432
  }
10433
10433
  });
10434
10434
  await socks5Client.connect(targetHost, targetPort);
10435
- await new Promise((resolve14, reject) => {
10435
+ await new Promise((resolve15, reject) => {
10436
10436
  const timeout = setTimeout(() => {
10437
10437
  reject(new Error("SOCKS5 connection timeout"));
10438
10438
  }, 5e3);
@@ -10440,7 +10440,7 @@ var require_socks5_proxy_agent = __commonJS({
10440
10440
  debug("SOCKS5 tunnel established to", targetHost, targetPort, "via", info);
10441
10441
  clearTimeout(timeout);
10442
10442
  socks5Client.removeListener("error", onError);
10443
- resolve14();
10443
+ resolve15();
10444
10444
  };
10445
10445
  const onError = (err) => {
10446
10446
  clearTimeout(timeout);
@@ -10483,8 +10483,8 @@ var require_socks5_proxy_agent = __commonJS({
10483
10483
  socket,
10484
10484
  servername: this[kRequestTls]?.servername || targetHost
10485
10485
  });
10486
- await new Promise((resolve14, reject) => {
10487
- finalSocket.once("secureConnect", resolve14);
10486
+ await new Promise((resolve15, reject) => {
10487
+ finalSocket.once("secureConnect", resolve15);
10488
10488
  finalSocket.once("error", reject);
10489
10489
  });
10490
10490
  }
@@ -11521,7 +11521,7 @@ var require_readable = __commonJS({
11521
11521
  if (this._readableState.closeEmitted) {
11522
11522
  return Promise.resolve(null);
11523
11523
  }
11524
- return new Promise((resolve14, reject) => {
11524
+ return new Promise((resolve15, reject) => {
11525
11525
  if (this[kContentLength] && this[kContentLength] > limit || this[kBytesRead] > limit) {
11526
11526
  this.destroy(new AbortError());
11527
11527
  }
@@ -11535,11 +11535,11 @@ var require_readable = __commonJS({
11535
11535
  if (signal.aborted) {
11536
11536
  reject(signal.reason ?? new AbortError());
11537
11537
  } else {
11538
- resolve14(null);
11538
+ resolve15(null);
11539
11539
  }
11540
11540
  });
11541
11541
  } else {
11542
- this.on("close", resolve14);
11542
+ this.on("close", resolve15);
11543
11543
  }
11544
11544
  this.on("error", noop).on("data", () => {
11545
11545
  if (this[kBytesRead] > limit) {
@@ -11567,7 +11567,7 @@ var require_readable = __commonJS({
11567
11567
  }
11568
11568
  function consume(stream, type) {
11569
11569
  assert7(!stream[kConsume]);
11570
- return new Promise((resolve14, reject) => {
11570
+ return new Promise((resolve15, reject) => {
11571
11571
  if (isUnusable(stream)) {
11572
11572
  const rState = stream._readableState;
11573
11573
  if (rState.destroyed && rState.closeEmitted === false) {
@@ -11582,7 +11582,7 @@ var require_readable = __commonJS({
11582
11582
  stream[kConsume] = {
11583
11583
  type,
11584
11584
  stream,
11585
- resolve: resolve14,
11585
+ resolve: resolve15,
11586
11586
  reject,
11587
11587
  length: 0,
11588
11588
  body: []
@@ -11656,18 +11656,18 @@ var require_readable = __commonJS({
11656
11656
  return buffer;
11657
11657
  }
11658
11658
  function consumeEnd(consume2, encoding) {
11659
- const { type, body, resolve: resolve14, stream, length } = consume2;
11659
+ const { type, body, resolve: resolve15, stream, length } = consume2;
11660
11660
  try {
11661
11661
  if (type === "text") {
11662
- resolve14(chunksDecode(body, length, encoding));
11662
+ resolve15(chunksDecode(body, length, encoding));
11663
11663
  } else if (type === "json") {
11664
- resolve14(JSON.parse(chunksDecode(body, length, encoding)));
11664
+ resolve15(JSON.parse(chunksDecode(body, length, encoding)));
11665
11665
  } else if (type === "arrayBuffer") {
11666
- resolve14(chunksConcat(body, length).buffer);
11666
+ resolve15(chunksConcat(body, length).buffer);
11667
11667
  } else if (type === "blob") {
11668
- resolve14(new Blob(body, { type: stream[kContentType] }));
11668
+ resolve15(new Blob(body, { type: stream[kContentType] }));
11669
11669
  } else if (type === "bytes") {
11670
- resolve14(chunksConcat(body, length));
11670
+ resolve15(chunksConcat(body, length));
11671
11671
  }
11672
11672
  consumeFinish(consume2);
11673
11673
  } catch (err) {
@@ -11857,9 +11857,9 @@ var require_api_request = __commonJS({
11857
11857
  };
11858
11858
  function request2(opts, callback) {
11859
11859
  if (callback === void 0) {
11860
- return new Promise((resolve14, reject) => {
11860
+ return new Promise((resolve15, reject) => {
11861
11861
  request2.call(this, opts, (err, data) => {
11862
- return err ? reject(err) : resolve14(data);
11862
+ return err ? reject(err) : resolve15(data);
11863
11863
  });
11864
11864
  });
11865
11865
  }
@@ -12071,9 +12071,9 @@ var require_api_stream = __commonJS({
12071
12071
  };
12072
12072
  function stream(opts, factory, callback) {
12073
12073
  if (callback === void 0) {
12074
- return new Promise((resolve14, reject) => {
12074
+ return new Promise((resolve15, reject) => {
12075
12075
  stream.call(this, opts, factory, (err, data) => {
12076
- return err ? reject(err) : resolve14(data);
12076
+ return err ? reject(err) : resolve15(data);
12077
12077
  });
12078
12078
  });
12079
12079
  }
@@ -12361,9 +12361,9 @@ var require_api_upgrade = __commonJS({
12361
12361
  };
12362
12362
  function upgrade(opts, callback) {
12363
12363
  if (callback === void 0) {
12364
- return new Promise((resolve14, reject) => {
12364
+ return new Promise((resolve15, reject) => {
12365
12365
  upgrade.call(this, opts, (err, data) => {
12366
- return err ? reject(err) : resolve14(data);
12366
+ return err ? reject(err) : resolve15(data);
12367
12367
  });
12368
12368
  });
12369
12369
  }
@@ -12456,9 +12456,9 @@ var require_api_connect = __commonJS({
12456
12456
  };
12457
12457
  function connect(opts, callback) {
12458
12458
  if (callback === void 0) {
12459
- return new Promise((resolve14, reject) => {
12459
+ return new Promise((resolve15, reject) => {
12460
12460
  connect.call(this, opts, (err, data) => {
12461
- return err ? reject(err) : resolve14(data);
12461
+ return err ? reject(err) : resolve15(data);
12462
12462
  });
12463
12463
  });
12464
12464
  }
@@ -13732,7 +13732,7 @@ var require_snapshot_recorder = __commonJS({
13732
13732
  "../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/mock/snapshot-recorder.js"(exports2, module2) {
13733
13733
  "use strict";
13734
13734
  var { writeFile: writeFile4, readFile: readFile2, mkdir } = require("node:fs/promises");
13735
- var { dirname: dirname7, resolve: resolve14 } = require("node:path");
13735
+ var { dirname: dirname7, resolve: resolve15 } = require("node:path");
13736
13736
  var { setTimeout: setTimeout6, clearTimeout: clearTimeout2 } = require("node:timers");
13737
13737
  var { InvalidArgumentError, UndiciError } = require_errors();
13738
13738
  var { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require_snapshot_utils();
@@ -13933,7 +13933,7 @@ var require_snapshot_recorder = __commonJS({
13933
13933
  throw new InvalidArgumentError("Snapshot path is required");
13934
13934
  }
13935
13935
  try {
13936
- const data = await readFile2(resolve14(path6), "utf8");
13936
+ const data = await readFile2(resolve15(path6), "utf8");
13937
13937
  const parsed = JSON.parse(data);
13938
13938
  if (Array.isArray(parsed)) {
13939
13939
  this.#snapshots.clear();
@@ -13962,7 +13962,7 @@ var require_snapshot_recorder = __commonJS({
13962
13962
  if (!path6) {
13963
13963
  throw new InvalidArgumentError("Snapshot path is required");
13964
13964
  }
13965
- const resolvedPath = resolve14(path6);
13965
+ const resolvedPath = resolve15(path6);
13966
13966
  await mkdir(dirname7(resolvedPath), { recursive: true });
13967
13967
  const data = Array.from(this.#snapshots.entries()).map(([hash, snapshot]) => ({
13968
13968
  hash,
@@ -20814,7 +20814,7 @@ var require_fetch = __commonJS({
20814
20814
  const agent = fetchParams.controller.dispatcher;
20815
20815
  const path6 = url.pathname + url.search;
20816
20816
  const hasTrailingQuestionMark = url.search.length === 0 && url.href[url.href.length - url.hash.length - 1] === "?";
20817
- return new Promise((resolve14, reject) => agent.dispatch(
20817
+ return new Promise((resolve15, reject) => agent.dispatch(
20818
20818
  {
20819
20819
  path: hasTrailingQuestionMark ? `${path6}?` : path6,
20820
20820
  origin: url.origin,
@@ -20902,7 +20902,7 @@ var require_fetch = __commonJS({
20902
20902
  }
20903
20903
  }
20904
20904
  const onError = this.onError.bind(this);
20905
- resolve14({
20905
+ resolve15({
20906
20906
  status: status2,
20907
20907
  statusText,
20908
20908
  headersList,
@@ -20955,7 +20955,7 @@ var require_fetch = __commonJS({
20955
20955
  headersList.append(headerName, String(value), true);
20956
20956
  }
20957
20957
  }
20958
- resolve14({
20958
+ resolve15({
20959
20959
  status: status2,
20960
20960
  statusText: STATUS_CODES[status2],
20961
20961
  headersList,
@@ -20979,7 +20979,7 @@ var require_fetch = __commonJS({
20979
20979
  headersList.append(nameStr, value.toString("latin1"), true);
20980
20980
  }
20981
20981
  }
20982
- resolve14({
20982
+ resolve15({
20983
20983
  status: status2,
20984
20984
  statusText: STATUS_CODES[status2],
20985
20985
  headersList,
@@ -26510,12 +26510,12 @@ var require_isexe = __commonJS({
26510
26510
  if (typeof Promise !== "function") {
26511
26511
  throw new TypeError("callback not provided");
26512
26512
  }
26513
- return new Promise(function(resolve14, reject) {
26513
+ return new Promise(function(resolve15, reject) {
26514
26514
  isexe(path6, options || {}, function(er, is) {
26515
26515
  if (er) {
26516
26516
  reject(er);
26517
26517
  } else {
26518
- resolve14(is);
26518
+ resolve15(is);
26519
26519
  }
26520
26520
  });
26521
26521
  });
@@ -26581,27 +26581,27 @@ var require_which = __commonJS({
26581
26581
  opt = {};
26582
26582
  const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
26583
26583
  const found = [];
26584
- const step = (i) => new Promise((resolve14, reject) => {
26584
+ const step = (i) => new Promise((resolve15, reject) => {
26585
26585
  if (i === pathEnv.length)
26586
- return opt.all && found.length ? resolve14(found) : reject(getNotFoundError(cmd));
26586
+ return opt.all && found.length ? resolve15(found) : reject(getNotFoundError(cmd));
26587
26587
  const ppRaw = pathEnv[i];
26588
26588
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
26589
26589
  const pCmd = path6.join(pathPart, cmd);
26590
26590
  const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
26591
- resolve14(subStep(p2, i, 0));
26591
+ resolve15(subStep(p2, i, 0));
26592
26592
  });
26593
- const subStep = (p2, i, ii) => new Promise((resolve14, reject) => {
26593
+ const subStep = (p2, i, ii) => new Promise((resolve15, reject) => {
26594
26594
  if (ii === pathExt.length)
26595
- return resolve14(step(i + 1));
26595
+ return resolve15(step(i + 1));
26596
26596
  const ext = pathExt[ii];
26597
26597
  isexe(p2 + ext, { pathExt: pathExtExe }, (er, is) => {
26598
26598
  if (!er && is) {
26599
26599
  if (opt.all)
26600
26600
  found.push(p2 + ext);
26601
26601
  else
26602
- return resolve14(p2 + ext);
26602
+ return resolve15(p2 + ext);
26603
26603
  }
26604
- return resolve14(subStep(p2, i, ii + 1));
26604
+ return resolve15(subStep(p2, i, ii + 1));
26605
26605
  });
26606
26606
  });
26607
26607
  return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
@@ -29685,9 +29685,9 @@ var require_index_688c5d50 = __commonJS({
29685
29685
  }
29686
29686
  // stream.promise().then(() => done, er => emitted error)
29687
29687
  promise() {
29688
- return new Promise((resolve15, reject) => {
29688
+ return new Promise((resolve16, reject) => {
29689
29689
  this.on(DESTROYED, () => reject(new Error("stream destroyed")));
29690
- this.on("end", () => resolve15());
29690
+ this.on("end", () => resolve16());
29691
29691
  this.on("error", (er) => reject(er));
29692
29692
  });
29693
29693
  }
@@ -29699,7 +29699,7 @@ var require_index_688c5d50 = __commonJS({
29699
29699
  return Promise.resolve({ done: false, value: res });
29700
29700
  if (this[EOF$1])
29701
29701
  return Promise.resolve({ done: true });
29702
- let resolve15 = null;
29702
+ let resolve16 = null;
29703
29703
  let reject = null;
29704
29704
  const onerr = (er) => {
29705
29705
  this.removeListener("data", ondata);
@@ -29710,17 +29710,17 @@ var require_index_688c5d50 = __commonJS({
29710
29710
  this.removeListener("error", onerr);
29711
29711
  this.removeListener("end", onend);
29712
29712
  this.pause();
29713
- resolve15({ value, done: !!this[EOF$1] });
29713
+ resolve16({ value, done: !!this[EOF$1] });
29714
29714
  };
29715
29715
  const onend = () => {
29716
29716
  this.removeListener("error", onerr);
29717
29717
  this.removeListener("data", ondata);
29718
- resolve15({ done: true });
29718
+ resolve16({ done: true });
29719
29719
  };
29720
29720
  const ondestroy = () => onerr(new Error("stream destroyed"));
29721
29721
  return new Promise((res2, rej) => {
29722
29722
  reject = rej;
29723
- resolve15 = res2;
29723
+ resolve16 = res2;
29724
29724
  this.once(DESTROYED, ondestroy);
29725
29725
  this.once("error", onerr);
29726
29726
  this.once("end", onend);
@@ -32147,9 +32147,9 @@ var require_index_688c5d50 = __commonJS({
32147
32147
  const parse11 = new parse$4(opt);
32148
32148
  const readSize = opt.maxReadSize || 16 * 1024 * 1024;
32149
32149
  const file2 = opt.file;
32150
- const p2 = new Promise((resolve15, reject) => {
32150
+ const p2 = new Promise((resolve16, reject) => {
32151
32151
  parse11.on("error", reject);
32152
- parse11.on("end", resolve15);
32152
+ parse11.on("end", resolve16);
32153
32153
  fs__default["default"].stat(file2, (er, stat) => {
32154
32154
  if (er)
32155
32155
  reject(er);
@@ -32360,7 +32360,7 @@ var require_index_688c5d50 = __commonJS({
32360
32360
  };
32361
32361
  fs__default["default"].read(fd, headBuf, 0, 512, position, onread);
32362
32362
  };
32363
- const promise = new Promise((resolve15, reject) => {
32363
+ const promise = new Promise((resolve16, reject) => {
32364
32364
  p2.on("error", reject);
32365
32365
  let flag = "r+";
32366
32366
  const onopen = (er, fd) => {
@@ -32382,7 +32382,7 @@ var require_index_688c5d50 = __commonJS({
32382
32382
  });
32383
32383
  p2.pipe(stream);
32384
32384
  stream.on("error", reject);
32385
- stream.on("close", resolve15);
32385
+ stream.on("close", resolve16);
32386
32386
  addFilesAsync(p2, files);
32387
32387
  });
32388
32388
  });
@@ -32459,7 +32459,7 @@ var require_index_688c5d50 = __commonJS({
32459
32459
  };
32460
32460
  var optsArg_1 = optsArg;
32461
32461
  var platform$2 = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;
32462
- var { resolve: resolve14, parse: parse$3 } = path__default["default"];
32462
+ var { resolve: resolve15, parse: parse$3 } = path__default["default"];
32463
32463
  var pathArg = (path7) => {
32464
32464
  if (/\0/.test(path7)) {
32465
32465
  throw Object.assign(
@@ -32470,7 +32470,7 @@ var require_index_688c5d50 = __commonJS({
32470
32470
  }
32471
32471
  );
32472
32472
  }
32473
- path7 = resolve14(path7);
32473
+ path7 = resolve15(path7);
32474
32474
  if (platform$2 === "win32") {
32475
32475
  const badWinChars = /[*|"<>?:]/;
32476
32476
  const { root } = parse$3(path7);
@@ -33549,9 +33549,9 @@ var require_index_688c5d50 = __commonJS({
33549
33549
  const u2 = new unpack(opt);
33550
33550
  const readSize = opt.maxReadSize || 16 * 1024 * 1024;
33551
33551
  const file2 = opt.file;
33552
- const p2 = new Promise((resolve15, reject) => {
33552
+ const p2 = new Promise((resolve16, reject) => {
33553
33553
  u2.on("error", reject);
33554
- u2.on("close", resolve15);
33554
+ u2.on("close", resolve16);
33555
33555
  fs__default["default"].stat(file2, (er, stat) => {
33556
33556
  if (er)
33557
33557
  reject(er);
@@ -38866,12 +38866,12 @@ var require_index_688c5d50 = __commonJS({
38866
38866
  });
38867
38867
  function promisify7(fn) {
38868
38868
  return function(req, opts) {
38869
- return new Promise((resolve15, reject) => {
38869
+ return new Promise((resolve16, reject) => {
38870
38870
  fn.call(this, req, opts, (err, rtn) => {
38871
38871
  if (err) {
38872
38872
  reject(err);
38873
38873
  } else {
38874
- resolve15(rtn);
38874
+ resolve16(rtn);
38875
38875
  }
38876
38876
  });
38877
38877
  });
@@ -39062,7 +39062,7 @@ var require_index_688c5d50 = __commonJS({
39062
39062
  var debug_1$1 = __importDefault$2(src$1);
39063
39063
  var debug$1 = debug_1$1.default("https-proxy-agent:parse-proxy-response");
39064
39064
  function parseProxyResponse(socket) {
39065
- return new Promise((resolve15, reject) => {
39065
+ return new Promise((resolve16, reject) => {
39066
39066
  let buffersLength = 0;
39067
39067
  const buffers = [];
39068
39068
  function read() {
@@ -39102,7 +39102,7 @@ var require_index_688c5d50 = __commonJS({
39102
39102
  const firstLine = buffered.toString("ascii", 0, buffered.indexOf("\r\n"));
39103
39103
  const statusCode = +firstLine.split(" ")[1];
39104
39104
  debug$1("got proxy server response: %o", firstLine);
39105
- resolve15({
39105
+ resolve16({
39106
39106
  statusCode,
39107
39107
  buffered
39108
39108
  });
@@ -39119,11 +39119,11 @@ var require_index_688c5d50 = __commonJS({
39119
39119
  }, "__esModule", { value: true });
39120
39120
  var __awaiter2 = commonjsGlobal && commonjsGlobal.__awaiter || function(thisArg, _arguments, P2, generator) {
39121
39121
  function adopt(value) {
39122
- return value instanceof P2 ? value : new P2(function(resolve15) {
39123
- resolve15(value);
39122
+ return value instanceof P2 ? value : new P2(function(resolve16) {
39123
+ resolve16(value);
39124
39124
  });
39125
39125
  }
39126
- return new (P2 || (P2 = Promise))(function(resolve15, reject) {
39126
+ return new (P2 || (P2 = Promise))(function(resolve16, reject) {
39127
39127
  function fulfilled(value) {
39128
39128
  try {
39129
39129
  step(generator.next(value));
@@ -39139,7 +39139,7 @@ var require_index_688c5d50 = __commonJS({
39139
39139
  }
39140
39140
  }
39141
39141
  function step(result) {
39142
- result.done ? resolve15(result.value) : adopt(result.value).then(fulfilled, rejected);
39142
+ result.done ? resolve16(result.value) : adopt(result.value).then(fulfilled, rejected);
39143
39143
  }
39144
39144
  step((generator = generator.apply(thisArg, _arguments || [])).next());
39145
39145
  });
@@ -48390,11 +48390,11 @@ function __metadata(metadataKey, metadataValue) {
48390
48390
  }
48391
48391
  function __awaiter(thisArg, _arguments, P2, generator) {
48392
48392
  function adopt(value) {
48393
- return value instanceof P2 ? value : new P2(function(resolve14) {
48394
- resolve14(value);
48393
+ return value instanceof P2 ? value : new P2(function(resolve15) {
48394
+ resolve15(value);
48395
48395
  });
48396
48396
  }
48397
- return new (P2 || (P2 = Promise))(function(resolve14, reject) {
48397
+ return new (P2 || (P2 = Promise))(function(resolve15, reject) {
48398
48398
  function fulfilled(value) {
48399
48399
  try {
48400
48400
  step(generator.next(value));
@@ -48410,7 +48410,7 @@ function __awaiter(thisArg, _arguments, P2, generator) {
48410
48410
  }
48411
48411
  }
48412
48412
  function step(result) {
48413
- result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
48413
+ result.done ? resolve15(result.value) : adopt(result.value).then(fulfilled, rejected);
48414
48414
  }
48415
48415
  step((generator = generator.apply(thisArg, _arguments || [])).next());
48416
48416
  });
@@ -48601,14 +48601,14 @@ function __asyncValues(o) {
48601
48601
  }, i);
48602
48602
  function verb(n) {
48603
48603
  i[n] = o[n] && function(v) {
48604
- return new Promise(function(resolve14, reject) {
48605
- v = o[n](v), settle(resolve14, reject, v.done, v.value);
48604
+ return new Promise(function(resolve15, reject) {
48605
+ v = o[n](v), settle(resolve15, reject, v.done, v.value);
48606
48606
  });
48607
48607
  };
48608
48608
  }
48609
- function settle(resolve14, reject, d2, v) {
48609
+ function settle(resolve15, reject, d2, v) {
48610
48610
  Promise.resolve(v).then(function(v2) {
48611
- resolve14({ value: v2, done: d2 });
48611
+ resolve15({ value: v2, done: d2 });
48612
48612
  }, reject);
48613
48613
  }
48614
48614
  }
@@ -73533,12 +73533,12 @@ var require_packet = __commonJS({
73533
73533
  let chunklen = 0;
73534
73534
  let received = false;
73535
73535
  let expected = false;
73536
- return new Promise((resolve14, reject) => {
73536
+ return new Promise((resolve15, reject) => {
73537
73537
  const processMessage = () => {
73538
73538
  if (received) return;
73539
73539
  received = true;
73540
73540
  const buffer = Buffer.concat(chunks, chunklen);
73541
- resolve14(buffer.slice(2));
73541
+ resolve15(buffer.slice(2));
73542
73542
  };
73543
73543
  socket.on("end", processMessage);
73544
73544
  socket.on("error", reject);
@@ -73600,15 +73600,15 @@ var require_udp = __commonJS({
73600
73600
  if (message instanceof Packet) {
73601
73601
  message = message.toBuffer();
73602
73602
  }
73603
- return new Promise((resolve14, reject) => {
73603
+ return new Promise((resolve15, reject) => {
73604
73604
  this.send(message, rinfo.port, rinfo.address, (err) => {
73605
73605
  if (err) return reject(err);
73606
- resolve14(message);
73606
+ resolve15(message);
73607
73607
  });
73608
73608
  });
73609
73609
  }
73610
73610
  listen(port, address) {
73611
- return new Promise((resolve14) => this.bind(port, address, resolve14));
73611
+ return new Promise((resolve15) => this.bind(port, address, resolve15));
73612
73612
  }
73613
73613
  };
73614
73614
  module2.exports = Server;
@@ -73670,11 +73670,11 @@ var require_doh = __commonJS({
73670
73670
  }
73671
73671
  return queryData;
73672
73672
  };
73673
- var readStream = (stream) => new Promise((resolve14, reject) => {
73673
+ var readStream = (stream) => new Promise((resolve15, reject) => {
73674
73674
  let buffer = "";
73675
73675
  stream.on("error", reject).on("data", (chunk) => {
73676
73676
  buffer += chunk;
73677
- }).on("end", () => resolve14(buffer));
73677
+ }).on("end", () => resolve15(buffer));
73678
73678
  });
73679
73679
  var Server = class extends EventEmitter {
73680
73680
  constructor(options) {
@@ -73800,12 +73800,12 @@ var require_dns2 = __commonJS({
73800
73800
  }
73801
73801
  const servers = Object.values(this.servers);
73802
73802
  this.closed = Promise.all(
73803
- servers.map((server) => new Promise((resolve14) => server.once("close", resolve14)))
73803
+ servers.map((server) => new Promise((resolve15) => server.once("close", resolve15)))
73804
73804
  ).then(() => {
73805
73805
  this.emit("close");
73806
73806
  });
73807
73807
  this.listening = Promise.all(
73808
- servers.map((server) => new Promise((resolve14) => server.once("listening", resolve14)))
73808
+ servers.map((server) => new Promise((resolve15) => server.once("listening", resolve15)))
73809
73809
  ).then(() => {
73810
73810
  const addresses = this.addresses();
73811
73811
  this.emit("listening", addresses);
@@ -73937,18 +73937,18 @@ var require_tcp2 = __commonJS({
73937
73937
  var require_doh2 = __commonJS({
73938
73938
  "../../node_modules/.pnpm/dns2@2.1.0/node_modules/dns2/client/doh.js"(exports2, module2) {
73939
73939
  var Packet = require_packet();
73940
- var defaultGet = (url) => new Promise((resolve14, reject) => {
73940
+ var defaultGet = (url) => new Promise((resolve15, reject) => {
73941
73941
  const headers = {
73942
73942
  accept: "application/dns-message"
73943
73943
  };
73944
73944
  const base = url.startsWith("https") ? require("https") : require("http");
73945
- const req = base.get(url, { headers }, resolve14);
73945
+ const req = base.get(url, { headers }, resolve15);
73946
73946
  req.on("error", reject);
73947
73947
  });
73948
73948
  var readStream = (stream) => {
73949
73949
  const buffer = [];
73950
- return new Promise((resolve14, reject) => {
73951
- stream.on("error", reject).on("data", (chunk) => buffer.push(chunk)).on("end", () => resolve14(Buffer.concat(buffer)));
73950
+ return new Promise((resolve15, reject) => {
73951
+ stream.on("error", reject).on("data", (chunk) => buffer.push(chunk)).on("end", () => resolve15(Buffer.concat(buffer)));
73952
73952
  });
73953
73953
  };
73954
73954
  var DOHClient = ({ dns, http, get = defaultGet } = {}) => {
@@ -74001,12 +74001,12 @@ var require_udp2 = __commonJS({
74001
74001
  type: Packet.TYPE[type]
74002
74002
  });
74003
74003
  const client = new udp.Socket(socketType);
74004
- return new Promise((resolve14, reject) => {
74004
+ return new Promise((resolve15, reject) => {
74005
74005
  client.once("message", function onMessage(message) {
74006
74006
  client.close();
74007
74007
  const response = Packet.parse(message);
74008
74008
  equal(response.header.id, query.header.id);
74009
- resolve14(response);
74009
+ resolve15(response);
74010
74010
  });
74011
74011
  debug("send", dns, query.toBuffer());
74012
74012
  client.send(query.toBuffer(), port, dns, (err) => err && reject(err));
@@ -74020,13 +74020,13 @@ var require_udp2 = __commonJS({
74020
74020
  var require_google = __commonJS({
74021
74021
  "../../node_modules/.pnpm/dns2@2.1.0/node_modules/dns2/client/google.js"(exports2, module2) {
74022
74022
  var https = require("https");
74023
- var get = (url) => new Promise((resolve14) => https.get(url, resolve14));
74023
+ var get = (url) => new Promise((resolve15) => https.get(url, resolve15));
74024
74024
  var readStream = (stream) => {
74025
74025
  const buffer = [];
74026
- return new Promise((resolve14, reject) => {
74026
+ return new Promise((resolve15, reject) => {
74027
74027
  stream.on("error", reject).on("data", (chunk) => {
74028
74028
  buffer.push(chunk);
74029
- }).on("end", () => resolve14(Buffer.concat(buffer)));
74029
+ }).on("end", () => resolve15(Buffer.concat(buffer)));
74030
74030
  });
74031
74031
  };
74032
74032
  var GoogleClient = () => (name3, type = "ANY") => {
@@ -74087,8 +74087,8 @@ var require_dns22 = __commonJS({
74087
74087
  const { port, nameServers, recursive, resolverProtocol = "UDP" } = this;
74088
74088
  const createResolver = _DNS[resolverProtocol + "Client"];
74089
74089
  return Promise.race(nameServers.map((address) => {
74090
- const resolve14 = createResolver({ dns: address, port, recursive });
74091
- return resolve14(name3, type, cls, clientIp);
74090
+ const resolve15 = createResolver({ dns: address, port, recursive });
74091
+ return resolve15(name3, type, cls, clientIp);
74092
74092
  }));
74093
74093
  }
74094
74094
  /**
@@ -74141,7 +74141,7 @@ __export(cli_exports, {
74141
74141
  });
74142
74142
  module.exports = __toCommonJS(cli_exports);
74143
74143
  var import_node_fs22 = require("node:fs");
74144
- var import_node_path25 = require("node:path");
74144
+ var import_node_path26 = require("node:path");
74145
74145
  var import_node_process14 = require("node:process");
74146
74146
 
74147
74147
  // ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
@@ -96644,12 +96644,12 @@ var YargsInstance = class {
96644
96644
  async getCompletion(args, done) {
96645
96645
  argsert("<array> [function]", [args, done], arguments.length);
96646
96646
  if (!done) {
96647
- return new Promise((resolve14, reject) => {
96647
+ return new Promise((resolve15, reject) => {
96648
96648
  __classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(args, (err, completions) => {
96649
96649
  if (err)
96650
96650
  reject(err);
96651
96651
  else
96652
- resolve14(completions);
96652
+ resolve15(completions);
96653
96653
  });
96654
96654
  });
96655
96655
  } else {
@@ -97689,7 +97689,7 @@ var Yargs = YargsFactory(esm_default2);
97689
97689
  var yargs_default = Yargs;
97690
97690
 
97691
97691
  // package.json
97692
- var version = "2.70.5";
97692
+ var version = "2.70.7";
97693
97693
 
97694
97694
  // src/metrics.ts
97695
97695
  var import_node_async_hooks = require("node:async_hooks");
@@ -98012,16 +98012,16 @@ async function sendEvent(payload, enableLog) {
98012
98012
 
98013
98013
  // src/metrics.ts
98014
98014
  function promiseWithResolvers() {
98015
- let resolve14;
98015
+ let resolve15;
98016
98016
  let reject;
98017
98017
  const promise = new Promise((res, rej) => {
98018
- resolve14 = res;
98018
+ resolve15 = res;
98019
98019
  reject = rej;
98020
98020
  });
98021
- if (!resolve14 || !reject) {
98021
+ if (!resolve15 || !reject) {
98022
98022
  throw new Error("Promise resolvers not set");
98023
98023
  }
98024
- return { resolve: resolve14, reject, promise };
98024
+ return { resolve: resolve15, reject, promise };
98025
98025
  }
98026
98026
  function getPlatform() {
98027
98027
  const platform2 = process.platform;
@@ -98225,7 +98225,7 @@ var runTelemetryCommand = (action) => {
98225
98225
  var import_node_fs19 = require("node:fs");
98226
98226
  var import_promises7 = require("node:fs/promises");
98227
98227
  var import_node_os7 = require("node:os");
98228
- var import_node_path20 = require("node:path");
98228
+ var import_node_path21 = require("node:path");
98229
98229
  var import_deepmerge = __toESM(require_cjs());
98230
98230
  var import_degit = __toESM(require_dist());
98231
98231
 
@@ -100004,19 +100004,19 @@ var baseOpen = async (options) => {
100004
100004
  }
100005
100005
  const subprocess = import_node_child_process8.default.spawn(command2, cliArguments, childProcessOptions);
100006
100006
  if (options.wait) {
100007
- return new Promise((resolve14, reject) => {
100007
+ return new Promise((resolve15, reject) => {
100008
100008
  subprocess.once("error", reject);
100009
100009
  subprocess.once("close", (exitCode) => {
100010
100010
  if (!options.allowNonzeroExitCode && exitCode !== 0) {
100011
100011
  reject(new Error(`Exited with code ${exitCode}`));
100012
100012
  return;
100013
100013
  }
100014
- resolve14(subprocess);
100014
+ resolve15(subprocess);
100015
100015
  });
100016
100016
  });
100017
100017
  }
100018
100018
  if (isFallbackAttempt) {
100019
- return new Promise((resolve14, reject) => {
100019
+ return new Promise((resolve15, reject) => {
100020
100020
  subprocess.once("error", reject);
100021
100021
  subprocess.once("spawn", () => {
100022
100022
  subprocess.once("close", (exitCode) => {
@@ -100026,17 +100026,17 @@ var baseOpen = async (options) => {
100026
100026
  return;
100027
100027
  }
100028
100028
  subprocess.unref();
100029
- resolve14(subprocess);
100029
+ resolve15(subprocess);
100030
100030
  });
100031
100031
  });
100032
100032
  });
100033
100033
  }
100034
100034
  subprocess.unref();
100035
- return new Promise((resolve14, reject) => {
100035
+ return new Promise((resolve15, reject) => {
100036
100036
  subprocess.once("error", reject);
100037
100037
  subprocess.once("spawn", () => {
100038
100038
  subprocess.off("error", reject);
100039
- resolve14(subprocess);
100039
+ resolve15(subprocess);
100040
100040
  });
100041
100041
  });
100042
100042
  };
@@ -100252,23 +100252,23 @@ __name2(getPropertyName, "getPropertyName");
100252
100252
  var package_default = {
100253
100253
  name: "frameworks_clis_info",
100254
100254
  dependencies: {
100255
- "@angular/create": "22.0.1",
100256
- "@tanstack/cli": "0.69.3",
100257
- "create-analog": "2.6.1",
100258
- "create-astro": "5.0.6",
100255
+ "@angular/create": "22.0.4",
100256
+ "@tanstack/cli": "0.69.5",
100257
+ "create-analog": "2.6.2",
100258
+ "create-astro": "5.2.0",
100259
100259
  "create-docusaurus": "3.10.1",
100260
100260
  "create-hono": "0.19.4",
100261
100261
  "create-next-app": "16.2.9",
100262
100262
  "create-qwik": "1.20.0",
100263
- "create-react-router": "8.0.0",
100263
+ "create-react-router": "8.0.1",
100264
100264
  "create-rwsdk": "3.1.3",
100265
100265
  "create-solid": "0.7.0",
100266
- "create-vike": "0.0.651",
100267
- "create-vite": "9.0.7",
100268
- "create-vue": "3.22.3",
100266
+ "create-vike": "0.0.660",
100267
+ "create-vite": "9.1.0",
100268
+ "create-vue": "3.22.4",
100269
100269
  "create-waku": "0.12.5-1.0.0-alpha.10-0",
100270
100270
  gatsby: "5.16.1",
100271
- nuxi: "3.35.2",
100271
+ nuxi: "3.36.1",
100272
100272
  sv: "0.15.4"
100273
100273
  },
100274
100274
  info: [
@@ -100336,7 +100336,12 @@ function getLatestTypesEntrypoint(ctx) {
100336
100336
  var recast2 = __toESM(require_main2());
100337
100337
  var { npm } = detectPackageManager();
100338
100338
  var generate = async (ctx) => {
100339
- await runFrameworkGenerator(ctx, [ctx.project.name, "--template=latest"]);
100339
+ await runFrameworkGenerator(ctx, [
100340
+ ctx.project.name,
100341
+ "--template=latest",
100342
+ // Analog's npm Vite overrides can fail as deps shift; remove once fixed upstream.
100343
+ ...npm === "npm" ? ["--skipViteOverrides"] : []
100344
+ ]);
100340
100345
  logRaw("");
100341
100346
  };
100342
100347
  var configure = async (ctx) => {
@@ -101573,7 +101578,7 @@ var config26 = {
101573
101578
  };
101574
101579
  var c3_default29 = config26;
101575
101580
  function buildConfigure(params) {
101576
- return async function configure17(ctx) {
101581
+ return async function configure18(ctx) {
101577
101582
  const loginSuccess = await params.login(ctx);
101578
101583
  if (!loginSuccess) {
101579
101584
  throw new Error("Failed to login to Cloudflare");
@@ -102638,14 +102643,32 @@ var config46 = {
102638
102643
  var c3_default48 = config46;
102639
102644
 
102640
102645
  // templates/waku/c3.ts
102646
+ var import_node_path19 = require("node:path");
102641
102647
  var { npm: npm22 } = detectPackageManager();
102642
102648
  var generate30 = async (ctx) => {
102643
102649
  await runFrameworkGenerator(ctx, [
102644
102650
  "--project-name",
102645
102651
  ctx.project.name,
102646
- "--template",
102647
- "07_cloudflare"
102652
+ // c3 installs dependencies itself once the template files have been copied over
102653
+ "--skip-install"
102648
102654
  ]);
102655
+ logRaw("");
102656
+ };
102657
+ var configure16 = async (ctx) => {
102658
+ await installPackages2(
102659
+ ["@cloudflare/vite-plugin", "miniflare", "@types/node"],
102660
+ {
102661
+ dev: true,
102662
+ startText: "Installing Cloudflare build dependencies",
102663
+ doneText: `${brandColor("installed")} ${dim(
102664
+ "@cloudflare/vite-plugin, miniflare, @types/node"
102665
+ )}`
102666
+ }
102667
+ );
102668
+ const s = spinner();
102669
+ s.start("Removing non-Cloudflare artifacts from template");
102670
+ removeFile((0, import_node_path19.resolve)(ctx.project.path, "src/middleware/no-trailing-slash.ts"));
102671
+ s.stop(`${brandColor("removed")} ${dim("trailing-slash dev middleware")}`);
102649
102672
  };
102650
102673
  var config47 = {
102651
102674
  configVersion: 1,
@@ -102653,12 +102676,18 @@ var config47 = {
102653
102676
  frameworkCli: "create-waku",
102654
102677
  platform: "workers",
102655
102678
  displayName: "Waku",
102679
+ copyFiles: {
102680
+ path: "./templates"
102681
+ },
102656
102682
  path: "templates/waku",
102657
102683
  generate: generate30,
102684
+ configure: configure16,
102658
102685
  transformPackageJson: async () => ({
102659
102686
  scripts: {
102660
102687
  deploy: `${npm22} run build && wrangler deploy`,
102661
- preview: `NODE_ENV=production ${npm22} run build && wrangler dev`
102688
+ preview: `NODE_ENV=production ${npm22} run build && wrangler dev`,
102689
+ start: `wrangler dev`,
102690
+ "cf-typegen": `wrangler types`
102662
102691
  }
102663
102692
  }),
102664
102693
  devScript: "dev",
@@ -102740,7 +102769,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
102740
102769
  var import_node_assert6 = __toESM(require("node:assert"));
102741
102770
 
102742
102771
  // ../wrangler/package.json
102743
- var version2 = "4.103.0";
102772
+ var version2 = "4.106.0";
102744
102773
 
102745
102774
  // src/git.ts
102746
102775
  var offerGit = async (ctx) => {
@@ -102929,7 +102958,7 @@ async function getProductionBranch(cwd) {
102929
102958
 
102930
102959
  // src/validators.ts
102931
102960
  var import_node_fs18 = require("node:fs");
102932
- var import_node_path19 = require("node:path");
102961
+ var import_node_path20 = require("node:path");
102933
102962
  var TEMPLATE_REGEX = /^(?:(?:https:\/\/)?(?<httpsUrl>[^:/]+\.[^:/]+)\/|git@(?<gitUrl>[^:/]+)[:/]|(?<shorthandUrl>[^/]+):)?(?<user>[^/\s]+)\/(?<repository>[^/\s#]+)(?:(?<subdirectoryPath>(?:\/[^/\s#]+)+))?(?:\/)?(?:#(?<tag>.+))?/;
102934
102963
  var validateTemplateUrl = (value) => {
102935
102964
  if (!String(value).match(TEMPLATE_REGEX)) {
@@ -102937,7 +102966,7 @@ var validateTemplateUrl = (value) => {
102937
102966
  }
102938
102967
  };
102939
102968
  var validateProjectDirectory = (relativePath, args) => {
102940
- const path6 = (0, import_node_path19.resolve)(relativePath);
102969
+ const path6 = (0, import_node_path20.resolve)(relativePath);
102941
102970
  const existsAlready = (0, import_node_fs18.existsSync)(path6);
102942
102971
  if (existsAlready) {
102943
102972
  for (const file2 of (0, import_node_fs18.readdirSync)(path6)) {
@@ -102947,7 +102976,7 @@ var validateProjectDirectory = (relativePath, args) => {
102947
102976
  }
102948
102977
  }
102949
102978
  if (!args.existingScript) {
102950
- const projectName = (0, import_node_path19.basename)(path6);
102979
+ const projectName = (0, import_node_path20.basename)(path6);
102951
102980
  const invalidChars = /[^a-z0-9-]/;
102952
102981
  const invalidStartEnd = /^-|-$/;
102953
102982
  if (projectName.match(invalidStartEnd)) {
@@ -103401,7 +103430,7 @@ var createContext = async (args, prevArgs) => {
103401
103430
  envInterfaceName: "Env",
103402
103431
  ...template
103403
103432
  };
103404
- const path6 = (0, import_node_path20.resolve)(projectName);
103433
+ const path6 = (0, import_node_path21.resolve)(projectName);
103405
103434
  const languageVariants = template.copyFiles && !isVariantInfo(template.copyFiles) && !template.copyFiles.selectVariant ? Object.keys(template.copyFiles.variants) : [];
103406
103435
  if (languageVariants.length > 0) {
103407
103436
  if (hasTsConfig(path6)) {
@@ -103427,8 +103456,8 @@ var createContext = async (args, prevArgs) => {
103427
103456
  }
103428
103457
  }
103429
103458
  }
103430
- const name3 = (0, import_node_path20.basename)(path6);
103431
- const directory = (0, import_node_path20.dirname)(path6);
103459
+ const name3 = (0, import_node_path21.basename)(path6);
103460
+ const directory = (0, import_node_path21.dirname)(path6);
103432
103461
  const originalCWD = process.cwd();
103433
103462
  return {
103434
103463
  project: { name: name3, path: path6 },
@@ -103448,7 +103477,7 @@ async function copyTemplateFiles(ctx) {
103448
103477
  const { copyFiles } = ctx.template;
103449
103478
  let srcdir;
103450
103479
  if (isVariantInfo(copyFiles)) {
103451
- srcdir = (0, import_node_path20.join)(getTemplatePath(ctx), copyFiles.path);
103480
+ srcdir = (0, import_node_path21.join)(getTemplatePath(ctx), copyFiles.path);
103452
103481
  } else {
103453
103482
  const selectVariant = copyFiles.selectVariant ?? defaultSelectVariant;
103454
103483
  const variant = await selectVariant(ctx);
@@ -103458,21 +103487,21 @@ async function copyTemplateFiles(ctx) {
103458
103487
  `Unknown variant provided: ${JSON.stringify(variant ?? "")}`
103459
103488
  );
103460
103489
  }
103461
- srcdir = (0, import_node_path20.join)(getTemplatePath(ctx), variantInfo.path);
103490
+ srcdir = (0, import_node_path21.join)(getTemplatePath(ctx), variantInfo.path);
103462
103491
  }
103463
103492
  const copyDestDir = getCopyFilesDestinationDir(ctx);
103464
- const destdir = (0, import_node_path20.join)(ctx.project.path, ...copyDestDir ? [copyDestDir] : []);
103493
+ const destdir = (0, import_node_path21.join)(ctx.project.path, ...copyDestDir ? [copyDestDir] : []);
103465
103494
  const s = spinner();
103466
103495
  s.start(`Copying template files`);
103467
103496
  await (0, import_promises7.cp)(srcdir, destdir, { recursive: true, force: true });
103468
- const dummyGitIgnorePath = (0, import_node_path20.join)(destdir, "__dot__gitignore");
103497
+ const dummyGitIgnorePath = (0, import_node_path21.join)(destdir, "__dot__gitignore");
103469
103498
  if ((0, import_node_fs19.existsSync)(dummyGitIgnorePath)) {
103470
- await (0, import_promises7.rename)(dummyGitIgnorePath, (0, import_node_path20.join)(destdir, ".gitignore"));
103499
+ await (0, import_promises7.rename)(dummyGitIgnorePath, (0, import_node_path21.join)(destdir, ".gitignore"));
103471
103500
  }
103472
103501
  s.stop(`${brandColor("files")} ${dim("copied to project directory")}`);
103473
103502
  }
103474
103503
  function writeAgentsMd(projectPath) {
103475
- const agentsMdPath = (0, import_node_path20.join)(projectPath, "AGENTS.md");
103504
+ const agentsMdPath = (0, import_node_path21.join)(projectPath, "AGENTS.md");
103476
103505
  if ((0, import_node_fs19.existsSync)(agentsMdPath)) {
103477
103506
  return;
103478
103507
  }
@@ -103502,25 +103531,25 @@ var validateTemplate = (path6, config49) => {
103502
103531
  return;
103503
103532
  }
103504
103533
  if (isVariantInfo(config49.copyFiles)) {
103505
- validateTemplateSrcDirectory((0, import_node_path20.resolve)(path6, config49.copyFiles.path), config49);
103534
+ validateTemplateSrcDirectory((0, import_node_path21.resolve)(path6, config49.copyFiles.path), config49);
103506
103535
  } else {
103507
103536
  for (const variant of Object.values(config49.copyFiles.variants)) {
103508
- validateTemplateSrcDirectory((0, import_node_path20.resolve)(path6, variant.path), config49);
103537
+ validateTemplateSrcDirectory((0, import_node_path21.resolve)(path6, variant.path), config49);
103509
103538
  }
103510
103539
  }
103511
103540
  };
103512
103541
  var validateTemplateSrcDirectory = (path6, config49) => {
103513
103542
  if (config49.platform === "workers") {
103514
- const wranglerTomlPath = (0, import_node_path20.resolve)(path6, "wrangler.toml");
103515
- const wranglerJsonPath = (0, import_node_path20.resolve)(path6, "wrangler.json");
103516
- const wranglerJsoncPath = (0, import_node_path20.resolve)(path6, "wrangler.jsonc");
103543
+ const wranglerTomlPath = (0, import_node_path21.resolve)(path6, "wrangler.toml");
103544
+ const wranglerJsonPath = (0, import_node_path21.resolve)(path6, "wrangler.json");
103545
+ const wranglerJsoncPath = (0, import_node_path21.resolve)(path6, "wrangler.jsonc");
103517
103546
  if (!(0, import_node_fs19.existsSync)(wranglerTomlPath) && !(0, import_node_fs19.existsSync)(wranglerJsonPath) && !(0, import_node_fs19.existsSync)(wranglerJsoncPath)) {
103518
103547
  throw new Error(
103519
103548
  `create-cloudflare templates must contain a "wrangler.toml" or "wrangler.json(c)" file.`
103520
103549
  );
103521
103550
  }
103522
103551
  }
103523
- const pkgJsonPath = (0, import_node_path20.resolve)(path6, "package.json");
103552
+ const pkgJsonPath = (0, import_node_path21.resolve)(path6, "package.json");
103524
103553
  if (!(0, import_node_fs19.existsSync)(pkgJsonPath)) {
103525
103554
  throw new Error(
103526
103555
  `create-cloudflare templates must contain a "package.json" file.`
@@ -103538,10 +103567,10 @@ var inferTemplateConfig = (path6) => {
103538
103567
  };
103539
103568
  var inferCopyFilesDefinition = (path6) => {
103540
103569
  const variants = {};
103541
- if ((0, import_node_fs19.existsSync)((0, import_node_path20.join)(path6, "js"))) {
103570
+ if ((0, import_node_fs19.existsSync)((0, import_node_path21.join)(path6, "js"))) {
103542
103571
  variants["js"] = { path: "./js" };
103543
103572
  }
103544
- if ((0, import_node_fs19.existsSync)((0, import_node_path20.join)(path6, "ts"))) {
103573
+ if ((0, import_node_fs19.existsSync)((0, import_node_path21.join)(path6, "ts"))) {
103545
103574
  variants["ts"] = { path: "./ts" };
103546
103575
  }
103547
103576
  const copyFiles = Object.keys(variants).length !== 0 ? { variants } : { path: "." };
@@ -103576,7 +103605,7 @@ Use the format "github:<owner>/<repo>/sub/directory[#<branch>]" to clone a speci
103576
103605
  force: true,
103577
103606
  mode: options.mode
103578
103607
  });
103579
- const tmpDir = options.intoFolder ?? await (0, import_promises7.mkdtemp)((0, import_node_path20.join)((0, import_node_os7.tmpdir)(), "c3-template"));
103608
+ const tmpDir = options.intoFolder ?? await (0, import_promises7.mkdtemp)((0, import_node_path21.join)((0, import_node_os7.tmpdir)(), "c3-template"));
103580
103609
  await emitter.clone(tmpDir);
103581
103610
  return tmpDir;
103582
103611
  } catch {
@@ -103585,7 +103614,7 @@ Use the format "github:<owner>/<repo>/sub/directory[#<branch>]" to clone a speci
103585
103614
  }
103586
103615
  }
103587
103616
  function updatePythonPackageName(path6, projectName) {
103588
- const pyProjectFile = (0, import_node_path20.resolve)(path6, "pyproject.toml");
103617
+ const pyProjectFile = (0, import_node_path21.resolve)(path6, "pyproject.toml");
103589
103618
  if (!(0, import_node_fs19.existsSync)(pyProjectFile)) {
103590
103619
  return;
103591
103620
  }
@@ -103598,7 +103627,7 @@ function updatePythonPackageName(path6, projectName) {
103598
103627
  }
103599
103628
  var updatePackageName = (ctx) => {
103600
103629
  const placeholderNames = ["<PACKAGE_NAME>", "<TBD>", "TBD", ""];
103601
- const pkgJsonPath = (0, import_node_path20.resolve)(ctx.project.path, "package.json");
103630
+ const pkgJsonPath = (0, import_node_path21.resolve)(ctx.project.path, "package.json");
103602
103631
  const pkgJson = readJSON(pkgJsonPath);
103603
103632
  if (!placeholderNames.includes(pkgJson.name)) {
103604
103633
  return;
@@ -103616,7 +103645,7 @@ var updatePackageScripts = async (ctx) => {
103616
103645
  }
103617
103646
  const s = spinner();
103618
103647
  s.start("Updating `package.json` scripts");
103619
- const pkgJsonPath = (0, import_node_path20.resolve)(ctx.project.path, "package.json");
103648
+ const pkgJsonPath = (0, import_node_path21.resolve)(ctx.project.path, "package.json");
103620
103649
  let pkgJson = readJSON(pkgJsonPath);
103621
103650
  const transformed = await ctx.template.transformPackageJson(pkgJson, ctx);
103622
103651
  pkgJson = (0, import_deepmerge.default)(pkgJson, transformed);
@@ -103625,9 +103654,9 @@ var updatePackageScripts = async (ctx) => {
103625
103654
  };
103626
103655
  var getTemplatePath = (ctx) => {
103627
103656
  if (ctx.template.path) {
103628
- return (0, import_node_path20.resolve)(__dirname, "..", ctx.template.path);
103657
+ return (0, import_node_path21.resolve)(__dirname, "..", ctx.template.path);
103629
103658
  }
103630
- return (0, import_node_path20.resolve)(__dirname, "..", "templates", ctx.template.id);
103659
+ return (0, import_node_path21.resolve)(__dirname, "..", "templates", ctx.template.id);
103631
103660
  };
103632
103661
  var isVariantInfo = (copyFiles) => {
103633
103662
  return "path" in copyFiles;
@@ -104004,7 +104033,7 @@ var processArgument = async (args, key, promptConfig) => {
104004
104033
  // src/deploy.ts
104005
104034
  var import_promises9 = require("node:fs/promises");
104006
104035
  var import_node_os8 = require("node:os");
104007
- var import_node_path22 = require("node:path");
104036
+ var import_node_path23 = require("node:path");
104008
104037
 
104009
104038
  // src/helpers/poll.ts
104010
104039
  var import_promises8 = require("node:timers/promises");
@@ -104097,7 +104126,7 @@ function secondsSince(start) {
104097
104126
 
104098
104127
  // src/wrangler/config.ts
104099
104128
  var import_node_fs20 = require("node:fs");
104100
- var import_node_path21 = require("node:path");
104129
+ var import_node_path22 = require("node:path");
104101
104130
 
104102
104131
  // src/helpers/json.ts
104103
104132
  var import_comment_json2 = __toESM(require_src3());
@@ -104209,13 +104238,13 @@ ${generateHintsAsTomlComments(wranglerToml)}
104209
104238
  }
104210
104239
  };
104211
104240
  var getWranglerTomlPath = (ctx) => {
104212
- return (0, import_node_path21.resolve)(ctx.project.path, "wrangler.toml");
104241
+ return (0, import_node_path22.resolve)(ctx.project.path, "wrangler.toml");
104213
104242
  };
104214
104243
  var getWranglerJsonPath = (ctx) => {
104215
- return (0, import_node_path21.resolve)(ctx.project.path, "wrangler.json");
104244
+ return (0, import_node_path22.resolve)(ctx.project.path, "wrangler.json");
104216
104245
  };
104217
104246
  var getWranglerJsoncPath = (ctx) => {
104218
- return (0, import_node_path21.resolve)(ctx.project.path, "wrangler.jsonc");
104247
+ return (0, import_node_path22.resolve)(ctx.project.path, "wrangler.jsonc");
104219
104248
  };
104220
104249
  var wranglerTomlExists = (ctx) => {
104221
104250
  const wranglerTomlPath = getWranglerTomlPath(ctx);
@@ -104421,8 +104450,8 @@ var runDeploy = async (ctx) => {
104421
104450
  JSON.stringify(ctx.commitMessage)
104422
104451
  ] : []
104423
104452
  ];
104424
- const outputFile = (0, import_node_path22.join)(
104425
- await (0, import_promises9.mkdtemp)((0, import_node_path22.join)((0, import_node_os8.tmpdir)(), "c3-wrangler-deploy-")),
104453
+ const outputFile = (0, import_node_path23.join)(
104454
+ await (0, import_promises9.mkdtemp)((0, import_node_path23.join)((0, import_node_os8.tmpdir)(), "c3-wrangler-deploy-")),
104426
104455
  "output.json"
104427
104456
  );
104428
104457
  await runCommand(deployCmd, {
@@ -104484,7 +104513,7 @@ var hasBinding = (node) => {
104484
104513
  };
104485
104514
 
104486
104515
  // src/dialog.ts
104487
- var import_node_path23 = require("node:path");
104516
+ var import_node_path24 = require("node:path");
104488
104517
  function createDialog(lines) {
104489
104518
  const screenWidth = process.stdout.columns;
104490
104519
  const maxLineWidth = Math.max(
@@ -104524,7 +104553,7 @@ function printWelcomeMessage(version3, telemetryEnabled, args) {
104524
104553
  }
104525
104554
  var printSummary = (ctx) => {
104526
104555
  const dashboardUrl = ctx.account ? `https://dash.cloudflare.com/?to=/:account/workers/services/view/${ctx.project.name}/production` : null;
104527
- const relativePath = (0, import_node_path23.relative)(ctx.originalCWD, ctx.project.path);
104556
+ const relativePath = (0, import_node_path24.relative)(ctx.originalCWD, ctx.project.path);
104528
104557
  const cdCommand = relativePath ? `cd ${relativePath}` : null;
104529
104558
  const { npm: npm24 } = detectPackageManager();
104530
104559
  const deployCommand = quoteShellArgs([
@@ -104996,7 +105025,7 @@ var createProject = async (ctx) => {
104996
105025
 
104997
105026
  // src/workers.ts
104998
105027
  var import_node_fs21 = require("node:fs");
104999
- var import_node_path24 = require("node:path");
105028
+ var import_node_path25 = require("node:path");
105000
105029
 
105001
105030
  // ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/impl/scanner.js
105002
105031
  function createScanner2(text, ignoreTrivia = false) {
@@ -106326,7 +106355,7 @@ async function addTypes(ctx) {
106326
106355
  await updateTsConfig(ctx, { usesNodeCompat });
106327
106356
  }
106328
106357
  async function generateWorkersTypes(ctx, npm24) {
106329
- const packageJsonPath = (0, import_node_path24.join)(ctx.project.path, "package.json");
106358
+ const packageJsonPath = (0, import_node_path25.join)(ctx.project.path, "package.json");
106330
106359
  if (!(0, import_node_fs21.existsSync)(packageJsonPath)) {
106331
106360
  return;
106332
106361
  }
@@ -106366,7 +106395,7 @@ var maybeInstallNodeTypes = async (ctx, npm24) => {
106366
106395
  return false;
106367
106396
  };
106368
106397
  async function updateTsConfig(ctx, { usesNodeCompat }) {
106369
- const tsconfigPath = (0, import_node_path24.join)(ctx.project.path, "tsconfig.json");
106398
+ const tsconfigPath = (0, import_node_path25.join)(ctx.project.path, "tsconfig.json");
106370
106399
  if (!(0, import_node_fs21.existsSync)(tsconfigPath)) {
106371
106400
  return;
106372
106401
  }
@@ -106483,7 +106512,7 @@ var runCli = async (args) => {
106483
106512
  checkMacOSVersion({ shouldThrow: true });
106484
106513
  const ctx = await createContext(args);
106485
106514
  await create(ctx);
106486
- await configure16(ctx);
106515
+ await configure17(ctx);
106487
106516
  await deploy(ctx);
106488
106517
  printSummary(ctx);
106489
106518
  logRaw("");
@@ -106494,7 +106523,7 @@ var setupProjectDirectory = (ctx) => {
106494
106523
  if (err) {
106495
106524
  throw new Error(err);
106496
106525
  }
106497
- const directory = (0, import_node_path25.dirname)(path6);
106526
+ const directory = (0, import_node_path26.dirname)(path6);
106498
106527
  (0, import_node_fs22.mkdirSync)(directory, { recursive: true });
106499
106528
  (0, import_node_process14.chdir)(directory);
106500
106529
  };
@@ -106517,7 +106546,7 @@ var create = async (ctx) => {
106517
106546
  }
106518
106547
  endSection(`Application created`);
106519
106548
  };
106520
- var configure16 = async (ctx) => {
106549
+ var configure17 = async (ctx) => {
106521
106550
  startSection(
106522
106551
  `Configuring your application for Cloudflare${ctx.args.experimental ? ` via \`wrangler setup\`` : ""}`,
106523
106552
  "Step 2 of 3"