create-cloudflare 2.30.1 → 2.31.0
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 +22 -11
- package/package.json +5 -5
- package/templates/svelte/c3.ts +2 -2
- package/templates-experimental/svelte/c3.ts +2 -2
package/dist/cli.js
CHANGED
|
@@ -68447,7 +68447,12 @@ var inputPrompt = async (promptConfig) => {
|
|
|
68447
68447
|
};
|
|
68448
68448
|
let prompt;
|
|
68449
68449
|
const dispatchRender = (props, p2) => {
|
|
68450
|
-
|
|
68450
|
+
let state = props.state;
|
|
68451
|
+
if (state === "initial" && promptConfig.initialErrorMessage) {
|
|
68452
|
+
state = "error";
|
|
68453
|
+
props.error = promptConfig.initialErrorMessage;
|
|
68454
|
+
}
|
|
68455
|
+
const renderedLines = renderers[state](props, p2);
|
|
68451
68456
|
return renderedLines.join("\n");
|
|
68452
68457
|
};
|
|
68453
68458
|
if (promptConfig.type === "select") {
|
|
@@ -73714,7 +73719,7 @@ var Yargs = YargsFactory(esm_default);
|
|
|
73714
73719
|
var yargs_default = Yargs;
|
|
73715
73720
|
|
|
73716
73721
|
// package.json
|
|
73717
|
-
var version = "2.
|
|
73722
|
+
var version = "2.31.0";
|
|
73718
73723
|
|
|
73719
73724
|
// src/metrics.ts
|
|
73720
73725
|
var import_node_async_hooks = require("node:async_hooks");
|
|
@@ -74476,13 +74481,13 @@ var package_default = {
|
|
|
74476
74481
|
"create-hono": "0.14.2",
|
|
74477
74482
|
"create-next-app": "14.2.5",
|
|
74478
74483
|
"create-qwik": "1.9.1",
|
|
74479
|
-
"create-vite": "5.5.
|
|
74484
|
+
"create-vite": "5.5.4",
|
|
74480
74485
|
"create-remix": "2.13.1",
|
|
74481
74486
|
"create-solid": "0.5.13",
|
|
74482
|
-
"create-svelte": "6.4.0",
|
|
74483
74487
|
"create-vue": "3.11.1",
|
|
74484
74488
|
gatsby: "5.13.7",
|
|
74485
|
-
nuxi: "3.12.0"
|
|
74489
|
+
nuxi: "3.12.0",
|
|
74490
|
+
sv: "0.5.11"
|
|
74486
74491
|
}
|
|
74487
74492
|
};
|
|
74488
74493
|
|
|
@@ -75395,7 +75400,7 @@ var import_node_os3 = require("node:os");
|
|
|
75395
75400
|
var recast6 = __toESM(require_main3());
|
|
75396
75401
|
var { npm: npm8 } = detectPackageManager();
|
|
75397
75402
|
var generate11 = async (ctx) => {
|
|
75398
|
-
await runFrameworkGenerator(ctx, [ctx.project.name]);
|
|
75403
|
+
await runFrameworkGenerator(ctx, ["create", ctx.project.name]);
|
|
75399
75404
|
logRaw("");
|
|
75400
75405
|
};
|
|
75401
75406
|
var configure8 = async (ctx) => {
|
|
@@ -75460,7 +75465,7 @@ var updateTypeDefinitions = (ctx) => {
|
|
|
75460
75465
|
var config12 = {
|
|
75461
75466
|
configVersion: 1,
|
|
75462
75467
|
id: "svelte",
|
|
75463
|
-
frameworkCli: "
|
|
75468
|
+
frameworkCli: "sv",
|
|
75464
75469
|
displayName: "Svelte",
|
|
75465
75470
|
platform: "workers",
|
|
75466
75471
|
copyFiles: {
|
|
@@ -76719,7 +76724,7 @@ var import_node_os4 = require("node:os");
|
|
|
76719
76724
|
var recast12 = __toESM(require_main3());
|
|
76720
76725
|
var { npm: npm19 } = detectPackageManager();
|
|
76721
76726
|
var generate24 = async (ctx) => {
|
|
76722
|
-
await runFrameworkGenerator(ctx, [ctx.project.name]);
|
|
76727
|
+
await runFrameworkGenerator(ctx, ["create", ctx.project.name]);
|
|
76723
76728
|
logRaw("");
|
|
76724
76729
|
};
|
|
76725
76730
|
var configure18 = async (ctx) => {
|
|
@@ -76784,7 +76789,7 @@ var updateTypeDefinitions2 = (ctx) => {
|
|
|
76784
76789
|
var config24 = {
|
|
76785
76790
|
configVersion: 1,
|
|
76786
76791
|
id: "svelte",
|
|
76787
|
-
frameworkCli: "
|
|
76792
|
+
frameworkCli: "sv",
|
|
76788
76793
|
displayName: "Svelte",
|
|
76789
76794
|
platform: "pages",
|
|
76790
76795
|
copyFiles: {
|
|
@@ -76840,7 +76845,7 @@ var config25 = {
|
|
|
76840
76845
|
var c3_default35 = config25;
|
|
76841
76846
|
|
|
76842
76847
|
// ../wrangler/package.json
|
|
76843
|
-
var version2 = "3.
|
|
76848
|
+
var version2 = "3.84.0";
|
|
76844
76849
|
|
|
76845
76850
|
// src/git.ts
|
|
76846
76851
|
var offerGit = async (ctx) => {
|
|
@@ -77911,11 +77916,13 @@ var processArgument = async (args, key, promptConfig) => {
|
|
|
77911
77916
|
disableTelemetry: args[key] !== void 0,
|
|
77912
77917
|
async promise() {
|
|
77913
77918
|
const value = args[key];
|
|
77919
|
+
const error2 = promptConfig.validate?.(value) ?? null;
|
|
77914
77920
|
const result = await inputPrompt({
|
|
77915
77921
|
...promptConfig,
|
|
77916
77922
|
// Accept the default value if the arg is already set
|
|
77917
|
-
acceptDefault: promptConfig.acceptDefault ?? value !== void 0,
|
|
77923
|
+
acceptDefault: promptConfig.acceptDefault ?? (value !== void 0 && !error2),
|
|
77918
77924
|
defaultValue: value ?? promptConfig.defaultValue,
|
|
77925
|
+
initialErrorMessage: error2,
|
|
77919
77926
|
throwOnError: true
|
|
77920
77927
|
});
|
|
77921
77928
|
args[key] = result;
|
|
@@ -79346,6 +79353,7 @@ var printSummary = (ctx) => {
|
|
|
79346
79353
|
]);
|
|
79347
79354
|
const documentationUrl = `https://developers.cloudflare.com/${ctx.template.platform}`;
|
|
79348
79355
|
const discordUrl = `https://discord.cloudflare.com`;
|
|
79356
|
+
const reportIssueUrl = "https://github.com/cloudflare/workers-sdk/issues/new/choose";
|
|
79349
79357
|
const lines = [
|
|
79350
79358
|
`\u{1F389} ${bgGreen(" SUCCESS ")} Application ${ctx.deployment.url ? "deployed" : "created"} successfully!`,
|
|
79351
79359
|
``
|
|
@@ -79367,6 +79375,9 @@ var printSummary = (ctx) => {
|
|
|
79367
79375
|
`\u{1F4D6} Explore Documentation`,
|
|
79368
79376
|
`${blue.underline(hyperlink(documentationUrl))}`,
|
|
79369
79377
|
``,
|
|
79378
|
+
`\u{1F41B} Report an Issue`,
|
|
79379
|
+
`${blue.underline(hyperlink(reportIssueUrl))}`,
|
|
79380
|
+
``,
|
|
79370
79381
|
`\u{1F4AC} Join our Community`,
|
|
79371
79382
|
`${blue.underline(hyperlink(discordUrl))}`
|
|
79372
79383
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cloudflare",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.31.0",
|
|
4
4
|
"description": "A CLI for creating and deploying new applications to Cloudflare.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@babel/parser": "^7.21.3",
|
|
31
31
|
"@babel/types": "^7.21.4",
|
|
32
32
|
"@clack/prompts": "^0.6.3",
|
|
33
|
-
"@cloudflare/workers-types": "^4.
|
|
33
|
+
"@cloudflare/workers-types": "^4.20241022.0",
|
|
34
34
|
"@iarna/toml": "^3.0.0",
|
|
35
35
|
"@types/command-exists": "^1.2.0",
|
|
36
36
|
"@types/cross-spawn": "^6.0.2",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@types/degit": "^2.8.6",
|
|
39
39
|
"@types/dns2": "^2.0.3",
|
|
40
40
|
"@types/esprima": "^4.0.3",
|
|
41
|
-
"@types/node": "
|
|
41
|
+
"@types/node": "^18.19.59",
|
|
42
42
|
"@types/semver": "^7.5.1",
|
|
43
43
|
"@types/which-pm-runs": "^1.0.0",
|
|
44
44
|
"@types/yargs": "^17.0.22",
|
|
@@ -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.84.0"
|
|
73
73
|
},
|
|
74
74
|
"engines": {
|
|
75
75
|
"node": ">=18.14.1"
|
package/templates/svelte/c3.ts
CHANGED
|
@@ -13,7 +13,7 @@ import type { C3Context, PackageJson } from "types";
|
|
|
13
13
|
const { npm } = detectPackageManager();
|
|
14
14
|
|
|
15
15
|
const generate = async (ctx: C3Context) => {
|
|
16
|
-
await runFrameworkGenerator(ctx, [ctx.project.name]);
|
|
16
|
+
await runFrameworkGenerator(ctx, ["create", ctx.project.name]);
|
|
17
17
|
|
|
18
18
|
logRaw("");
|
|
19
19
|
};
|
|
@@ -97,7 +97,7 @@ const updateTypeDefinitions = (ctx: C3Context) => {
|
|
|
97
97
|
const config: TemplateConfig = {
|
|
98
98
|
configVersion: 1,
|
|
99
99
|
id: "svelte",
|
|
100
|
-
frameworkCli: "
|
|
100
|
+
frameworkCli: "sv",
|
|
101
101
|
displayName: "Svelte",
|
|
102
102
|
platform: "pages",
|
|
103
103
|
copyFiles: {
|
|
@@ -13,7 +13,7 @@ import type { C3Context, PackageJson } from "types";
|
|
|
13
13
|
const { npm } = detectPackageManager();
|
|
14
14
|
|
|
15
15
|
const generate = async (ctx: C3Context) => {
|
|
16
|
-
await runFrameworkGenerator(ctx, [ctx.project.name]);
|
|
16
|
+
await runFrameworkGenerator(ctx, ["create", ctx.project.name]);
|
|
17
17
|
|
|
18
18
|
logRaw("");
|
|
19
19
|
};
|
|
@@ -97,7 +97,7 @@ const updateTypeDefinitions = (ctx: C3Context) => {
|
|
|
97
97
|
const config: TemplateConfig = {
|
|
98
98
|
configVersion: 1,
|
|
99
99
|
id: "svelte",
|
|
100
|
-
frameworkCli: "
|
|
100
|
+
frameworkCli: "sv",
|
|
101
101
|
displayName: "Svelte",
|
|
102
102
|
platform: "workers",
|
|
103
103
|
copyFiles: {
|