create-cloudflare 0.0.0-d329da16c → 0.0.0-d34ef3d5b

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
@@ -74560,7 +74560,7 @@ var Yargs = YargsFactory(esm_default);
74560
74560
  var yargs_default = Yargs;
74561
74561
 
74562
74562
  // package.json
74563
- var version = "0.0.0-d329da16c";
74563
+ var version = "0.0.0-d34ef3d5b";
74564
74564
 
74565
74565
  // src/metrics.ts
74566
74566
  var import_node_async_hooks = require("node:async_hooks");
@@ -74853,7 +74853,7 @@ var detectPmMismatch = (ctx) => {
74853
74853
 
74854
74854
  // src/helpers/sparrow.ts
74855
74855
  var import_undici = __toESM(require_undici());
74856
- var SPARROW_SOURCE_KEY = "";
74856
+ var SPARROW_SOURCE_KEY = "5adf183f94b3436ba78d67f506965998";
74857
74857
  var SPARROW_URL = "https://sparrow.cloudflare.com";
74858
74858
  function hasSparrowSourceKey() {
74859
74859
  return SPARROW_SOURCE_KEY !== "";
@@ -75335,21 +75335,21 @@ var package_default = {
75335
75335
  "so that we can use dependabot to update these dependencies automatically."
75336
75336
  ],
75337
75337
  dependencies: {
75338
- "create-astro": "4.11.1",
75338
+ "create-astro": "4.11.2",
75339
75339
  "create-analog": "1.8.1",
75340
- "@angular/create": "19.2.5",
75340
+ "@angular/create": "19.2.8",
75341
75341
  "create-docusaurus": "3.7.0",
75342
- "create-hono": "0.15.3",
75343
- "create-next-app": "15.2.1",
75344
- "create-qwik": "1.12.0",
75345
- "create-vite": "6.3.1",
75346
- "create-remix": "2.15.3",
75347
- "create-react-router": "7.4.1",
75342
+ "create-hono": "0.17.0",
75343
+ "create-next-app": "15.3.1",
75344
+ "create-qwik": "1.13.0",
75345
+ "create-vite": "6.4.1",
75346
+ "create-remix": "2.16.5",
75347
+ "create-react-router": "7.5.1",
75348
75348
  "create-solid": "0.6.2",
75349
- "create-vue": "3.15.1",
75350
- gatsby: "5.14.1",
75351
- sv: "0.6.23",
75352
- nuxi: "3.23.1"
75349
+ "create-vue": "3.16.4",
75350
+ gatsby: "5.14.3",
75351
+ sv: "0.8.1",
75352
+ nuxi: "3.25.0"
75353
75353
  }
75354
75354
  };
75355
75355
 
@@ -76204,8 +76204,8 @@ var config16 = {
76204
76204
  configVersion: 1,
76205
76205
  id: "hello-world-assets-only",
76206
76206
  path: "templates/hello-world-assets-only",
76207
- displayName: "Assets only",
76208
- description: "For static sites (including SPAs) or when using your own backend",
76207
+ displayName: "Static site",
76208
+ description: "For static sites or when using your own backend. Uses Workers Static Assets.",
76209
76209
  platform: "workers",
76210
76210
  copyFiles: {
76211
76211
  path: "./templates"
@@ -76259,8 +76259,8 @@ var config19 = {
76259
76259
  configVersion: 1,
76260
76260
  id: "hello-world-with-assets",
76261
76261
  path: "templates/hello-world-with-assets",
76262
- displayName: "Worker + Assets",
76263
- description: "For static sites with an API or server-side rendering (SSR)",
76262
+ displayName: "SSR / full-stack app",
76263
+ description: "For sites with a backend API, or server-side rendering (SSR). Uses Static Assets with a Worker.",
76264
76264
  platform: "workers",
76265
76265
  copyFiles: {
76266
76266
  variants: {
@@ -76594,7 +76594,7 @@ var c3_default25 = {
76594
76594
  configVersion: 1,
76595
76595
  id: "next",
76596
76596
  frameworkCli: "create-next-app",
76597
- frameworkCliPinnedVersion: "~15.2.4",
76597
+ frameworkCliPinnedVersion: "~15.3.0",
76598
76598
  platform: "workers",
76599
76599
  displayName: "Next.js (using Node.js compat + Workers Assets)",
76600
76600
  path: "templates/next/workers",
@@ -76984,7 +76984,7 @@ async function copyExistingWorkerFiles(ctx) {
76984
76984
  await runCommand(
76985
76985
  [
76986
76986
  ...dlx,
76987
- "wrangler@3",
76987
+ "wrangler@latest",
76988
76988
  "init",
76989
76989
  "--from-dash",
76990
76990
  ctx.args.existingScript,
@@ -77190,8 +77190,6 @@ var configure12 = async (ctx) => {
77190
77190
  const cmd = [name2 === "pnpm" ? npm13 : npx5, "qwik", "add", "cloudflare-pages"];
77191
77191
  endSection(`Running ${quoteShellArgs(cmd)}`);
77192
77192
  await runCommand(cmd);
77193
- removeFile("./public/_headers");
77194
- removeFile("./public/_redirects");
77195
77193
  removeFile("./public/_routes.json");
77196
77194
  addBindingsProxy2(ctx);
77197
77195
  populateCloudflareEnv2();
@@ -77231,7 +77229,7 @@ var addBindingsProxy2 = (ctx) => {
77231
77229
  return false;
77232
77230
  }
77233
77231
  if (configArgument.type !== "ObjectExpression") {
77234
- crash("Failed to update `vite.config.ts`");
77232
+ throw new Error("Failed to update `vite.config.ts`");
77235
77233
  }
77236
77234
  configArgument.properties.push(platformPropery);
77237
77235
  return false;
@@ -77410,7 +77408,7 @@ var configure13 = async (ctx) => {
77410
77408
  startText: "Installing the Cloudflare Vite plugin",
77411
77409
  doneText: `${brandColor(`installed`)} ${dim("@cloudflare/vite-plugin")}`
77412
77410
  });
77413
- await transformViteConfig(ctx);
77411
+ transformViteConfig(ctx);
77414
77412
  if (usesTypescript(ctx)) {
77415
77413
  updateTsconfigJson();
77416
77414
  }
@@ -78065,7 +78063,7 @@ var c3_default50 = config47;
78065
78063
  var import_node_assert = __toESM(require("node:assert"));
78066
78064
 
78067
78065
  // ../wrangler/package.json
78068
- var version2 = "0.0.0-d329da16c";
78066
+ var version2 = "0.0.0-d34ef3d5b";
78069
78067
 
78070
78068
  // src/git.ts
78071
78069
  var offerGit = async (ctx) => {
@@ -78441,10 +78439,10 @@ var createContext = async (args, prevArgs) => {
78441
78439
  deriveCorrelatedArgs(args);
78442
78440
  const experimental = args.experimental;
78443
78441
  const frameworkMap = getFrameworkMap({ experimental });
78444
- const helloWorldTemplateMap = await getHelloWorldTemplateMap({
78442
+ const helloWorldTemplateMap = getHelloWorldTemplateMap({
78445
78443
  experimental
78446
78444
  });
78447
- const otherTemplateMap = await getOtherTemplateMap({ experimental });
78445
+ const otherTemplateMap = getOtherTemplateMap({ experimental });
78448
78446
  let linesPrinted = 0;
78449
78447
  const goBack = async (from) => {
78450
78448
  const currentArgs = { ...args };
@@ -78693,7 +78691,7 @@ async function copyTemplateFiles(ctx) {
78693
78691
  }
78694
78692
  srcdir = (0, import_path13.join)(getTemplatePath(ctx), variantInfo.path);
78695
78693
  }
78696
- const copyDestDir = await getCopyFilesDestinationDir(ctx);
78694
+ const copyDestDir = getCopyFilesDestinationDir(ctx);
78697
78695
  const destdir = (0, import_path13.join)(ctx.project.path, ...copyDestDir ? [copyDestDir] : []);
78698
78696
  const s = spinner();
78699
78697
  s.start(`Copying template files`);
@@ -78716,7 +78714,7 @@ var processRemoteTemplate = async (args) => {
78716
78714
  if (src.startsWith("https://github.com/") && src.includes("/tree/main/")) {
78717
78715
  src = src.replace("https://github.com/", "github:").replace("/tree/main/", "/");
78718
78716
  }
78719
- const path6 = await downloadRemoteTemplate(src);
78717
+ const path6 = await downloadRemoteTemplate(src, args.templateMode);
78720
78718
  const config48 = inferTemplateConfig(path6);
78721
78719
  validateTemplate(path6, config48);
78722
78720
  updateStatus(`${brandColor("template")} ${dim("cloned and validated")}`);
@@ -78775,13 +78773,14 @@ var inferCopyFilesDefinition = (path6) => {
78775
78773
  const copyFiles = Object.keys(variants).length !== 0 ? { variants } : { path: "." };
78776
78774
  return copyFiles;
78777
78775
  };
78778
- var downloadRemoteTemplate = async (src) => {
78776
+ var downloadRemoteTemplate = async (src, mode) => {
78779
78777
  try {
78780
78778
  updateStatus(`Cloning template from: ${blue(src)}`);
78781
78779
  const emitter = (0, import_degit.default)(src, {
78782
78780
  cache: false,
78783
78781
  verbose: false,
78784
- force: true
78782
+ force: true,
78783
+ mode
78785
78784
  });
78786
78785
  const tmpDir = await (0, import_promises4.mkdtemp)((0, import_path13.join)((0, import_os2.tmpdir)(), "c3-template"));
78787
78786
  await emitter.clone(tmpDir);
@@ -79036,6 +79035,27 @@ var cliDefinition = {
79036
79035
  npm create cloudflare -- --template https://github.com/cloudflare/workers-sdk/templates/worker-r2
79037
79036
  `
79038
79037
  },
79038
+ {
79039
+ name: "template-mode",
79040
+ type: "string",
79041
+ requiresArg: true,
79042
+ description: `The mechanism to use when fetching the template.
79043
+
79044
+ Can be either "git" or "tar". "tar" does not support fetching from private
79045
+ repositories. By default, degit will use "tar" if the template is hosted on GitHub, BitBucket, GitLab, or git.sr.ht.
79046
+ Otherwise, it will use "git".
79047
+ `,
79048
+ values: [
79049
+ {
79050
+ name: "git",
79051
+ description: "Use git to fetch the template. Supports private repositories."
79052
+ },
79053
+ {
79054
+ name: "tar",
79055
+ description: "Use tar to fetch the template. Only supported on public repositories hosted on GitHub, BitBucket, GitLab, or git.sr.ht."
79056
+ }
79057
+ ]
79058
+ },
79039
79059
  {
79040
79060
  name: "accept-defaults",
79041
79061
  alias: "y",