create-cloudflare 0.0.0-5388447d7 → 0.0.0-53ba97df6
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 +54 -51
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/templates/hello-world/js/package.json +1 -1
- package/templates/hello-world/py/README.md +2 -2
- package/templates/hello-world/py/pyproject.toml +1 -1
- package/templates/hello-world/py/src/entry.py +3 -2
- package/templates/hello-world/ts/package.json +1 -1
- package/templates/hello-world-durable-object/c3.ts +3 -0
- package/templates/hello-world-durable-object/py/.python-version +1 -0
- package/templates/hello-world-durable-object/py/README.md +23 -0
- package/templates/hello-world-durable-object/py/__dot__gitignore +68 -0
- package/templates/hello-world-durable-object/py/package.json +13 -0
- package/templates/hello-world-durable-object/py/pyproject.toml +9 -0
- package/templates/hello-world-durable-object/py/src/entry.py +66 -0
- package/templates/hello-world-durable-object/py/uv.lock +22 -0
- package/templates/hello-world-durable-object/py/wrangler.jsonc +27 -0
- package/templates/hello-world-durable-object-with-assets/c3.ts +3 -0
- package/templates/hello-world-durable-object-with-assets/py/.python-version +1 -0
- package/templates/hello-world-durable-object-with-assets/py/README.md +23 -0
- package/templates/hello-world-durable-object-with-assets/py/__dot__gitignore +68 -0
- package/templates/hello-world-durable-object-with-assets/py/package.json +13 -0
- package/templates/hello-world-durable-object-with-assets/py/public/index.html +19 -0
- package/templates/hello-world-durable-object-with-assets/py/pyproject.toml +9 -0
- package/templates/hello-world-durable-object-with-assets/py/src/entry.py +66 -0
- package/templates/hello-world-durable-object-with-assets/py/uv.lock +22 -0
- package/templates/hello-world-durable-object-with-assets/py/wrangler.jsonc +31 -0
- package/templates/hello-world-with-assets/js/package.json +1 -1
- package/templates/hello-world-with-assets/py/.python-version +1 -0
- package/templates/hello-world-with-assets/py/README.md +23 -0
- package/templates/hello-world-with-assets/py/pyproject.toml +9 -0
- package/templates/hello-world-with-assets/py/src/entry.py +9 -7
- package/templates/hello-world-with-assets/py/uv.lock +22 -0
- package/templates/hello-world-with-assets/ts/package.json +1 -1
- package/templates/next/workers/c3.ts +3 -8
- package/templates/next/workers/templates/wrangler.jsonc +2 -1
- package/templates/openapi/ts/__dot__gitignore +1 -0
- package/templates/openapi/ts/package.json +7 -6
- package/templates/openapi/ts/src/endpoints/taskCreate.ts +2 -2
- package/templates/openapi/ts/src/endpoints/taskDelete.ts +2 -2
- package/templates/openapi/ts/src/endpoints/taskFetch.ts +2 -2
- package/templates/openapi/ts/src/endpoints/taskList.ts +2 -2
- package/templates/openapi/ts/src/index.ts +4 -1
- package/templates/openapi/ts/src/types.ts +3 -0
- package/templates/openapi/ts/tsconfig.json +18 -20
- package/templates/qwik/workers/c3.ts +2 -4
- package/templates/react/workers/c3.ts +1 -1
- package/templates/react/workers/ts/tsconfig.worker.json +2 -2
- package/templates/remix/workers/templates/wrangler.toml +1 -1
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-
|
|
74563
|
+
var version = "0.0.0-53ba97df6";
|
|
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.
|
|
75338
|
+
"create-astro": "4.11.4",
|
|
75339
75339
|
"create-analog": "1.8.1",
|
|
75340
|
-
"@angular/create": "19.2.
|
|
75340
|
+
"@angular/create": "19.2.10",
|
|
75341
75341
|
"create-docusaurus": "3.7.0",
|
|
75342
|
-
"create-hono": "0.
|
|
75343
|
-
"create-next-app": "15.
|
|
75344
|
-
"create-qwik": "1.
|
|
75345
|
-
"create-vite": "6.
|
|
75346
|
-
"create-remix": "2.
|
|
75347
|
-
"create-react-router": "7.
|
|
75342
|
+
"create-hono": "0.18.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.3",
|
|
75348
75348
|
"create-solid": "0.6.2",
|
|
75349
|
-
"create-vue": "3.
|
|
75350
|
-
gatsby: "5.14.
|
|
75351
|
-
sv: "0.
|
|
75352
|
-
nuxi: "3.
|
|
75349
|
+
"create-vue": "3.16.4",
|
|
75350
|
+
gatsby: "5.14.3",
|
|
75351
|
+
sv: "0.8.3",
|
|
75352
|
+
nuxi: "3.25.0"
|
|
75353
75353
|
}
|
|
75354
75354
|
};
|
|
75355
75355
|
|
|
@@ -76228,6 +76228,9 @@ var config17 = {
|
|
|
76228
76228
|
},
|
|
76229
76229
|
ts: {
|
|
76230
76230
|
path: "./ts"
|
|
76231
|
+
},
|
|
76232
|
+
python: {
|
|
76233
|
+
path: "./py"
|
|
76231
76234
|
}
|
|
76232
76235
|
}
|
|
76233
76236
|
}
|
|
@@ -76248,6 +76251,9 @@ var config18 = {
|
|
|
76248
76251
|
},
|
|
76249
76252
|
ts: {
|
|
76250
76253
|
path: "./ts"
|
|
76254
|
+
},
|
|
76255
|
+
python: {
|
|
76256
|
+
path: "./py"
|
|
76251
76257
|
}
|
|
76252
76258
|
}
|
|
76253
76259
|
}
|
|
@@ -76565,14 +76571,9 @@ var generate14 = async (ctx) => {
|
|
|
76565
76571
|
await runFrameworkGenerator(ctx, [ctx.project.name]);
|
|
76566
76572
|
};
|
|
76567
76573
|
var configure8 = async (ctx) => {
|
|
76568
|
-
|
|
76569
|
-
"@opennextjs/cloudflare@~1.0.0-beta.0 || ^1.0.0",
|
|
76570
|
-
"@cloudflare/workers-types"
|
|
76571
|
-
];
|
|
76572
|
-
await installPackages(packages, {
|
|
76573
|
-
dev: true,
|
|
76574
|
+
await installPackages(["@opennextjs/cloudflare@~1.0.0-beta.0 || ^1.0.0"], {
|
|
76574
76575
|
startText: "Adding the Cloudflare adapter",
|
|
76575
|
-
doneText: `${brandColor(`installed`)}
|
|
76576
|
+
doneText: `${brandColor(`installed`)} @opennextjs/cloudflare)}`
|
|
76576
76577
|
});
|
|
76577
76578
|
const usesTs = usesTypescript(ctx);
|
|
76578
76579
|
updateNextConfig2(usesTs);
|
|
@@ -76594,7 +76595,7 @@ var c3_default25 = {
|
|
|
76594
76595
|
configVersion: 1,
|
|
76595
76596
|
id: "next",
|
|
76596
76597
|
frameworkCli: "create-next-app",
|
|
76597
|
-
frameworkCliPinnedVersion: "~15.
|
|
76598
|
+
frameworkCliPinnedVersion: "~15.3.0",
|
|
76598
76599
|
platform: "workers",
|
|
76599
76600
|
displayName: "Next.js (using Node.js compat + Workers Assets)",
|
|
76600
76601
|
path: "templates/next/workers",
|
|
@@ -77190,8 +77191,6 @@ var configure12 = async (ctx) => {
|
|
|
77190
77191
|
const cmd = [name2 === "pnpm" ? npm13 : npx5, "qwik", "add", "cloudflare-pages"];
|
|
77191
77192
|
endSection(`Running ${quoteShellArgs(cmd)}`);
|
|
77192
77193
|
await runCommand(cmd);
|
|
77193
|
-
removeFile("./public/_headers");
|
|
77194
|
-
removeFile("./public/_redirects");
|
|
77195
77194
|
removeFile("./public/_routes.json");
|
|
77196
77195
|
addBindingsProxy2(ctx);
|
|
77197
77196
|
populateCloudflareEnv2();
|
|
@@ -77231,7 +77230,7 @@ var addBindingsProxy2 = (ctx) => {
|
|
|
77231
77230
|
return false;
|
|
77232
77231
|
}
|
|
77233
77232
|
if (configArgument.type !== "ObjectExpression") {
|
|
77234
|
-
|
|
77233
|
+
throw new Error("Failed to update `vite.config.ts`");
|
|
77235
77234
|
}
|
|
77236
77235
|
configArgument.properties.push(platformPropery);
|
|
77237
77236
|
return false;
|
|
@@ -77410,7 +77409,7 @@ var configure13 = async (ctx) => {
|
|
|
77410
77409
|
startText: "Installing the Cloudflare Vite plugin",
|
|
77411
77410
|
doneText: `${brandColor(`installed`)} ${dim("@cloudflare/vite-plugin")}`
|
|
77412
77411
|
});
|
|
77413
|
-
|
|
77412
|
+
transformViteConfig(ctx);
|
|
77414
77413
|
if (usesTypescript(ctx)) {
|
|
77415
77414
|
updateTsconfigJson();
|
|
77416
77415
|
}
|
|
@@ -78065,7 +78064,7 @@ var c3_default50 = config47;
|
|
|
78065
78064
|
var import_node_assert = __toESM(require("node:assert"));
|
|
78066
78065
|
|
|
78067
78066
|
// ../wrangler/package.json
|
|
78068
|
-
var version2 = "0.0.0-
|
|
78067
|
+
var version2 = "0.0.0-53ba97df6";
|
|
78069
78068
|
|
|
78070
78069
|
// src/git.ts
|
|
78071
78070
|
var offerGit = async (ctx) => {
|
|
@@ -78441,10 +78440,10 @@ var createContext = async (args, prevArgs) => {
|
|
|
78441
78440
|
deriveCorrelatedArgs(args);
|
|
78442
78441
|
const experimental = args.experimental;
|
|
78443
78442
|
const frameworkMap = getFrameworkMap({ experimental });
|
|
78444
|
-
const helloWorldTemplateMap =
|
|
78443
|
+
const helloWorldTemplateMap = getHelloWorldTemplateMap({
|
|
78445
78444
|
experimental
|
|
78446
78445
|
});
|
|
78447
|
-
const otherTemplateMap =
|
|
78446
|
+
const otherTemplateMap = getOtherTemplateMap({ experimental });
|
|
78448
78447
|
let linesPrinted = 0;
|
|
78449
78448
|
const goBack = async (from) => {
|
|
78450
78449
|
const currentArgs = { ...args };
|
|
@@ -78693,7 +78692,7 @@ async function copyTemplateFiles(ctx) {
|
|
|
78693
78692
|
}
|
|
78694
78693
|
srcdir = (0, import_path13.join)(getTemplatePath(ctx), variantInfo.path);
|
|
78695
78694
|
}
|
|
78696
|
-
const copyDestDir =
|
|
78695
|
+
const copyDestDir = getCopyFilesDestinationDir(ctx);
|
|
78697
78696
|
const destdir = (0, import_path13.join)(ctx.project.path, ...copyDestDir ? [copyDestDir] : []);
|
|
78698
78697
|
const s = spinner();
|
|
78699
78698
|
s.start(`Copying template files`);
|
|
@@ -78716,7 +78715,7 @@ var processRemoteTemplate = async (args) => {
|
|
|
78716
78715
|
if (src.startsWith("https://github.com/") && src.includes("/tree/main/")) {
|
|
78717
78716
|
src = src.replace("https://github.com/", "github:").replace("/tree/main/", "/");
|
|
78718
78717
|
}
|
|
78719
|
-
const path6 = await downloadRemoteTemplate(src);
|
|
78718
|
+
const path6 = await downloadRemoteTemplate(src, args.templateMode);
|
|
78720
78719
|
const config48 = inferTemplateConfig(path6);
|
|
78721
78720
|
validateTemplate(path6, config48);
|
|
78722
78721
|
updateStatus(`${brandColor("template")} ${dim("cloned and validated")}`);
|
|
@@ -78775,13 +78774,14 @@ var inferCopyFilesDefinition = (path6) => {
|
|
|
78775
78774
|
const copyFiles = Object.keys(variants).length !== 0 ? { variants } : { path: "." };
|
|
78776
78775
|
return copyFiles;
|
|
78777
78776
|
};
|
|
78778
|
-
var downloadRemoteTemplate = async (src) => {
|
|
78777
|
+
var downloadRemoteTemplate = async (src, mode) => {
|
|
78779
78778
|
try {
|
|
78780
78779
|
updateStatus(`Cloning template from: ${blue(src)}`);
|
|
78781
78780
|
const emitter = (0, import_degit.default)(src, {
|
|
78782
78781
|
cache: false,
|
|
78783
78782
|
verbose: false,
|
|
78784
|
-
force: true
|
|
78783
|
+
force: true,
|
|
78784
|
+
mode
|
|
78785
78785
|
});
|
|
78786
78786
|
const tmpDir = await (0, import_promises4.mkdtemp)((0, import_path13.join)((0, import_os2.tmpdir)(), "c3-template"));
|
|
78787
78787
|
await emitter.clone(tmpDir);
|
|
@@ -79036,6 +79036,27 @@ var cliDefinition = {
|
|
|
79036
79036
|
npm create cloudflare -- --template https://github.com/cloudflare/workers-sdk/templates/worker-r2
|
|
79037
79037
|
`
|
|
79038
79038
|
},
|
|
79039
|
+
{
|
|
79040
|
+
name: "template-mode",
|
|
79041
|
+
type: "string",
|
|
79042
|
+
requiresArg: true,
|
|
79043
|
+
description: `The mechanism to use when fetching the template.
|
|
79044
|
+
|
|
79045
|
+
Can be either "git" or "tar". "tar" does not support fetching from private
|
|
79046
|
+
repositories. By default, degit will use "tar" if the template is hosted on GitHub, BitBucket, GitLab, or git.sr.ht.
|
|
79047
|
+
Otherwise, it will use "git".
|
|
79048
|
+
`,
|
|
79049
|
+
values: [
|
|
79050
|
+
{
|
|
79051
|
+
name: "git",
|
|
79052
|
+
description: "Use git to fetch the template. Supports private repositories."
|
|
79053
|
+
},
|
|
79054
|
+
{
|
|
79055
|
+
name: "tar",
|
|
79056
|
+
description: "Use tar to fetch the template. Only supported on public repositories hosted on GitHub, BitBucket, GitLab, or git.sr.ht."
|
|
79057
|
+
}
|
|
79058
|
+
]
|
|
79059
|
+
},
|
|
79039
79060
|
{
|
|
79040
79061
|
name: "accept-defaults",
|
|
79041
79062
|
alias: "y",
|
|
@@ -81643,26 +81664,8 @@ repeat-string/index.js:
|
|
|
81643
81664
|
*)
|
|
81644
81665
|
|
|
81645
81666
|
yargs-parser/build/lib/string-utils.js:
|
|
81646
|
-
(**
|
|
81647
|
-
* @license
|
|
81648
|
-
* Copyright (c) 2016, Contributors
|
|
81649
|
-
* SPDX-License-Identifier: ISC
|
|
81650
|
-
*)
|
|
81651
|
-
|
|
81652
81667
|
yargs-parser/build/lib/tokenize-arg-string.js:
|
|
81653
|
-
(**
|
|
81654
|
-
* @license
|
|
81655
|
-
* Copyright (c) 2016, Contributors
|
|
81656
|
-
* SPDX-License-Identifier: ISC
|
|
81657
|
-
*)
|
|
81658
|
-
|
|
81659
81668
|
yargs-parser/build/lib/yargs-parser-types.js:
|
|
81660
|
-
(**
|
|
81661
|
-
* @license
|
|
81662
|
-
* Copyright (c) 2016, Contributors
|
|
81663
|
-
* SPDX-License-Identifier: ISC
|
|
81664
|
-
*)
|
|
81665
|
-
|
|
81666
81669
|
yargs-parser/build/lib/yargs-parser.js:
|
|
81667
81670
|
(**
|
|
81668
81671
|
* @license
|