create-cloudflare 2.21.2 → 2.21.4
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
|
@@ -3902,7 +3902,7 @@ var init_args = __esm({
|
|
|
3902
3902
|
var version;
|
|
3903
3903
|
var init_package = __esm({
|
|
3904
3904
|
"package.json"() {
|
|
3905
|
-
version = "2.21.
|
|
3905
|
+
version = "2.21.4";
|
|
3906
3906
|
}
|
|
3907
3907
|
});
|
|
3908
3908
|
|
|
@@ -24714,19 +24714,19 @@ var init_package2 = __esm({
|
|
|
24714
24714
|
"additionally it also contains a map that maps frameworks to their respective clis"
|
|
24715
24715
|
],
|
|
24716
24716
|
dependencies: {
|
|
24717
|
-
"create-astro": "4.
|
|
24718
|
-
"create-analog": "1.
|
|
24717
|
+
"create-astro": "4.8.0",
|
|
24718
|
+
"create-analog": "1.3.1",
|
|
24719
24719
|
"@angular/create": "17.3.7",
|
|
24720
|
-
"create-docusaurus": "3.
|
|
24721
|
-
"create-hono": "0.7.
|
|
24720
|
+
"create-docusaurus": "3.3.2",
|
|
24721
|
+
"create-hono": "0.7.3",
|
|
24722
24722
|
"create-next-app": "14.1.0",
|
|
24723
24723
|
"create-qwik": "1.5.4",
|
|
24724
24724
|
"create-react-app": "5.0.1",
|
|
24725
|
-
"create-remix": "2.
|
|
24725
|
+
"create-remix": "2.9.2",
|
|
24726
24726
|
"create-solid": "0.5.5",
|
|
24727
|
-
"create-svelte": "6.
|
|
24727
|
+
"create-svelte": "6.1.2",
|
|
24728
24728
|
"create-vue": "3.10.2",
|
|
24729
|
-
gatsby: "5.13.
|
|
24729
|
+
gatsby: "5.13.5",
|
|
24730
24730
|
nuxi: "3.11.1"
|
|
24731
24731
|
},
|
|
24732
24732
|
frameworkCliMap: {
|
|
@@ -24757,6 +24757,7 @@ var init_frameworks = __esm({
|
|
|
24757
24757
|
init_colors();
|
|
24758
24758
|
init_command();
|
|
24759
24759
|
init_packageManagers();
|
|
24760
|
+
init_git();
|
|
24760
24761
|
init_package2();
|
|
24761
24762
|
getFrameworkCli = (ctx, withVersion = true) => {
|
|
24762
24763
|
if (!ctx.template) {
|
|
@@ -24782,6 +24783,223 @@ var init_frameworks = __esm({
|
|
|
24782
24783
|
);
|
|
24783
24784
|
logRaw("");
|
|
24784
24785
|
await runCommand(cmd, { env: env2 });
|
|
24786
|
+
if (process.env.SAVE_DIFFS) {
|
|
24787
|
+
const cmdEnv = {
|
|
24788
|
+
silent: true,
|
|
24789
|
+
cwd: ctx.project.path
|
|
24790
|
+
};
|
|
24791
|
+
if (!isInsideGitRepo(ctx.project.path)) {
|
|
24792
|
+
await runCommand(["git", "init"], cmdEnv);
|
|
24793
|
+
await runCommand(["git", "add", "."], cmdEnv);
|
|
24794
|
+
const commitMessage = `Initial commit by ${cli}`;
|
|
24795
|
+
await runCommand(["git", "commit", "-m", commitMessage], cmdEnv);
|
|
24796
|
+
}
|
|
24797
|
+
}
|
|
24798
|
+
};
|
|
24799
|
+
}
|
|
24800
|
+
});
|
|
24801
|
+
|
|
24802
|
+
// ../wrangler/package.json
|
|
24803
|
+
var version2;
|
|
24804
|
+
var init_package3 = __esm({
|
|
24805
|
+
"../wrangler/package.json"() {
|
|
24806
|
+
version2 = "3.58.0";
|
|
24807
|
+
}
|
|
24808
|
+
});
|
|
24809
|
+
|
|
24810
|
+
// src/git.ts
|
|
24811
|
+
async function getGitVersion() {
|
|
24812
|
+
try {
|
|
24813
|
+
const rawGitVersion = await runCommand(["git", "--version"], {
|
|
24814
|
+
useSpinner: false,
|
|
24815
|
+
silent: true
|
|
24816
|
+
});
|
|
24817
|
+
const gitVersion = rawGitVersion.replace(/^git\s+version\s+/, "");
|
|
24818
|
+
return gitVersion;
|
|
24819
|
+
} catch {
|
|
24820
|
+
return null;
|
|
24821
|
+
}
|
|
24822
|
+
}
|
|
24823
|
+
async function isGitInstalled() {
|
|
24824
|
+
return await getGitVersion() !== null;
|
|
24825
|
+
}
|
|
24826
|
+
async function isGitConfigured() {
|
|
24827
|
+
try {
|
|
24828
|
+
const userName = await runCommand(["git", "config", "user.name"], {
|
|
24829
|
+
useSpinner: false,
|
|
24830
|
+
silent: true
|
|
24831
|
+
});
|
|
24832
|
+
if (!userName) {
|
|
24833
|
+
return false;
|
|
24834
|
+
}
|
|
24835
|
+
const email = await runCommand(["git", "config", "user.email"], {
|
|
24836
|
+
useSpinner: false,
|
|
24837
|
+
silent: true
|
|
24838
|
+
});
|
|
24839
|
+
if (!email) {
|
|
24840
|
+
return false;
|
|
24841
|
+
}
|
|
24842
|
+
return true;
|
|
24843
|
+
} catch {
|
|
24844
|
+
return false;
|
|
24845
|
+
}
|
|
24846
|
+
}
|
|
24847
|
+
async function isInsideGitRepo(cwd) {
|
|
24848
|
+
try {
|
|
24849
|
+
const output = await runCommand(["git", "status"], {
|
|
24850
|
+
cwd,
|
|
24851
|
+
useSpinner: false,
|
|
24852
|
+
silent: true,
|
|
24853
|
+
captureOutput: true
|
|
24854
|
+
});
|
|
24855
|
+
return output.includes("not a git repository") === false;
|
|
24856
|
+
} catch (err) {
|
|
24857
|
+
return false;
|
|
24858
|
+
}
|
|
24859
|
+
}
|
|
24860
|
+
async function initializeGit(cwd) {
|
|
24861
|
+
const s = spinner();
|
|
24862
|
+
s.start("Initializing git repo");
|
|
24863
|
+
try {
|
|
24864
|
+
const defaultBranchName = await runCommand(
|
|
24865
|
+
["git", "config", "--get", "init.defaultBranch"],
|
|
24866
|
+
{ useSpinner: false, silent: true, cwd }
|
|
24867
|
+
);
|
|
24868
|
+
await runCommand(
|
|
24869
|
+
["git", "init", "--initial-branch", defaultBranchName.trim() ?? "main"],
|
|
24870
|
+
// branch names can't contain spaces, so this is safe
|
|
24871
|
+
{ useSpinner: false, silent: true, cwd }
|
|
24872
|
+
);
|
|
24873
|
+
} catch {
|
|
24874
|
+
await runCommand(["git", "init"], { useSpinner: false, silent: true, cwd });
|
|
24875
|
+
} finally {
|
|
24876
|
+
s.stop(`${brandColor("initialized")} ${dim(`git`)}`);
|
|
24877
|
+
}
|
|
24878
|
+
}
|
|
24879
|
+
async function getProductionBranch(cwd) {
|
|
24880
|
+
try {
|
|
24881
|
+
const productionBranch = await runCommand(
|
|
24882
|
+
["git", "branch", "--show-current"],
|
|
24883
|
+
{
|
|
24884
|
+
silent: true,
|
|
24885
|
+
cwd,
|
|
24886
|
+
useSpinner: false,
|
|
24887
|
+
captureOutput: true
|
|
24888
|
+
}
|
|
24889
|
+
);
|
|
24890
|
+
return productionBranch.trim();
|
|
24891
|
+
} catch (err) {
|
|
24892
|
+
}
|
|
24893
|
+
return "main";
|
|
24894
|
+
}
|
|
24895
|
+
var offerGit, gitCommit, createCommitMessage;
|
|
24896
|
+
var init_git = __esm({
|
|
24897
|
+
"src/git.ts"() {
|
|
24898
|
+
init_cli();
|
|
24899
|
+
init_args();
|
|
24900
|
+
init_colors();
|
|
24901
|
+
init_interactive();
|
|
24902
|
+
init_frameworks();
|
|
24903
|
+
init_cli2();
|
|
24904
|
+
init_command();
|
|
24905
|
+
init_packageManagers();
|
|
24906
|
+
init_package3();
|
|
24907
|
+
init_package();
|
|
24908
|
+
offerGit = async (ctx) => {
|
|
24909
|
+
const gitInstalled = await isGitInstalled();
|
|
24910
|
+
if (!gitInstalled) {
|
|
24911
|
+
if (ctx.args.git) {
|
|
24912
|
+
updateStatus(
|
|
24913
|
+
"Couldn't find `git` installed on your machine. Continuing without git."
|
|
24914
|
+
);
|
|
24915
|
+
}
|
|
24916
|
+
ctx.args.git = false;
|
|
24917
|
+
return;
|
|
24918
|
+
}
|
|
24919
|
+
const gitConfigured = await isGitConfigured();
|
|
24920
|
+
if (!gitConfigured) {
|
|
24921
|
+
if (ctx.args.git) {
|
|
24922
|
+
updateStatus(
|
|
24923
|
+
"Must configure `user.name` and user.email` to use git. Continuing without git."
|
|
24924
|
+
);
|
|
24925
|
+
}
|
|
24926
|
+
ctx.args.git = false;
|
|
24927
|
+
return;
|
|
24928
|
+
}
|
|
24929
|
+
const insideGitRepo = await isInsideGitRepo(ctx.project.path);
|
|
24930
|
+
if (insideGitRepo) {
|
|
24931
|
+
ctx.args.git = true;
|
|
24932
|
+
return;
|
|
24933
|
+
}
|
|
24934
|
+
ctx.args.git = await processArgument(ctx.args, "git", {
|
|
24935
|
+
type: "confirm",
|
|
24936
|
+
question: "Do you want to use git for version control?",
|
|
24937
|
+
label: "git",
|
|
24938
|
+
defaultValue: C3_DEFAULTS.git
|
|
24939
|
+
});
|
|
24940
|
+
if (ctx.args.git) {
|
|
24941
|
+
await initializeGit(ctx.project.path);
|
|
24942
|
+
}
|
|
24943
|
+
};
|
|
24944
|
+
gitCommit = async (ctx) => {
|
|
24945
|
+
const commitMessage = await createCommitMessage(ctx);
|
|
24946
|
+
if (!ctx.args.git) {
|
|
24947
|
+
return;
|
|
24948
|
+
}
|
|
24949
|
+
if (ctx.gitRepoAlreadyExisted) {
|
|
24950
|
+
return;
|
|
24951
|
+
}
|
|
24952
|
+
const gitInstalled = await isGitInstalled();
|
|
24953
|
+
const gitInitialized = await isInsideGitRepo(ctx.project.path);
|
|
24954
|
+
if (!gitInstalled || !gitInitialized) {
|
|
24955
|
+
return;
|
|
24956
|
+
}
|
|
24957
|
+
const s = spinner();
|
|
24958
|
+
s.start("Committing new files");
|
|
24959
|
+
await runCommand(["git", "add", "."], {
|
|
24960
|
+
silent: true,
|
|
24961
|
+
cwd: ctx.project.path
|
|
24962
|
+
});
|
|
24963
|
+
await runCommand(["git", "commit", "-m", commitMessage], {
|
|
24964
|
+
silent: true,
|
|
24965
|
+
cwd: ctx.project.path
|
|
24966
|
+
});
|
|
24967
|
+
s.stop(`${brandColor("git")} ${dim(`commit`)}`);
|
|
24968
|
+
};
|
|
24969
|
+
createCommitMessage = async (ctx) => {
|
|
24970
|
+
const isPages = ctx.template.platform === "pages";
|
|
24971
|
+
const header = isPages ? "Initialize web application via create-cloudflare CLI" : "Initial commit (by create-cloudflare CLI)";
|
|
24972
|
+
const packageManager = detectPackageManager();
|
|
24973
|
+
const gitVersion = await getGitVersion();
|
|
24974
|
+
const insideRepo = await isInsideGitRepo(ctx.project.path);
|
|
24975
|
+
const showFramework = isPages || ctx.template.id === "hono";
|
|
24976
|
+
const details = [
|
|
24977
|
+
{ key: "C3", value: `create-cloudflare@${version}` },
|
|
24978
|
+
{ key: "project name", value: ctx.project.name },
|
|
24979
|
+
...showFramework ? [{ key: "framework", value: ctx.template.id }] : [],
|
|
24980
|
+
...showFramework ? [{ key: "framework cli", value: getFrameworkCli(ctx) }] : [],
|
|
24981
|
+
{
|
|
24982
|
+
key: "package manager",
|
|
24983
|
+
value: `${packageManager.name}@${packageManager.version}`
|
|
24984
|
+
},
|
|
24985
|
+
{
|
|
24986
|
+
key: "wrangler",
|
|
24987
|
+
value: `wrangler@${version2}`
|
|
24988
|
+
},
|
|
24989
|
+
{
|
|
24990
|
+
key: "git",
|
|
24991
|
+
value: insideRepo ? gitVersion : "N/A"
|
|
24992
|
+
}
|
|
24993
|
+
];
|
|
24994
|
+
const body = `Details:
|
|
24995
|
+
${details.map(({ key, value }) => ` ${key} = ${value}`).join("\n")}
|
|
24996
|
+
`;
|
|
24997
|
+
const commitMessage = `${header}
|
|
24998
|
+
|
|
24999
|
+
${body}
|
|
25000
|
+
`;
|
|
25001
|
+
ctx.commitMessage = commitMessage;
|
|
25002
|
+
return commitMessage;
|
|
24785
25003
|
};
|
|
24786
25004
|
}
|
|
24787
25005
|
});
|
|
@@ -77948,200 +78166,7 @@ init_colors();
|
|
|
77948
78166
|
init_cli2();
|
|
77949
78167
|
init_command();
|
|
77950
78168
|
init_packageManagers();
|
|
77951
|
-
|
|
77952
|
-
// src/git.ts
|
|
77953
|
-
init_cli();
|
|
77954
|
-
init_args();
|
|
77955
|
-
init_colors();
|
|
77956
|
-
init_interactive();
|
|
77957
|
-
init_frameworks();
|
|
77958
|
-
init_cli2();
|
|
77959
|
-
init_command();
|
|
77960
|
-
init_packageManagers();
|
|
77961
|
-
|
|
77962
|
-
// ../wrangler/package.json
|
|
77963
|
-
var version2 = "3.57.0";
|
|
77964
|
-
|
|
77965
|
-
// src/git.ts
|
|
77966
|
-
init_package();
|
|
77967
|
-
var offerGit = async (ctx) => {
|
|
77968
|
-
const gitInstalled = await isGitInstalled();
|
|
77969
|
-
if (!gitInstalled) {
|
|
77970
|
-
if (ctx.args.git) {
|
|
77971
|
-
updateStatus(
|
|
77972
|
-
"Couldn't find `git` installed on your machine. Continuing without git."
|
|
77973
|
-
);
|
|
77974
|
-
}
|
|
77975
|
-
ctx.args.git = false;
|
|
77976
|
-
return;
|
|
77977
|
-
}
|
|
77978
|
-
const gitConfigured = await isGitConfigured();
|
|
77979
|
-
if (!gitConfigured) {
|
|
77980
|
-
if (ctx.args.git) {
|
|
77981
|
-
updateStatus(
|
|
77982
|
-
"Must configure `user.name` and user.email` to use git. Continuing without git."
|
|
77983
|
-
);
|
|
77984
|
-
}
|
|
77985
|
-
ctx.args.git = false;
|
|
77986
|
-
return;
|
|
77987
|
-
}
|
|
77988
|
-
const insideGitRepo = await isInsideGitRepo(ctx.project.path);
|
|
77989
|
-
if (insideGitRepo) {
|
|
77990
|
-
return;
|
|
77991
|
-
}
|
|
77992
|
-
ctx.args.git = await processArgument(ctx.args, "git", {
|
|
77993
|
-
type: "confirm",
|
|
77994
|
-
question: "Do you want to use git for version control?",
|
|
77995
|
-
label: "git",
|
|
77996
|
-
defaultValue: C3_DEFAULTS.git
|
|
77997
|
-
});
|
|
77998
|
-
if (ctx.args.git) {
|
|
77999
|
-
await initializeGit(ctx.project.path);
|
|
78000
|
-
}
|
|
78001
|
-
};
|
|
78002
|
-
var gitCommit = async (ctx) => {
|
|
78003
|
-
const commitMessage = await createCommitMessage(ctx);
|
|
78004
|
-
if (ctx.gitRepoAlreadyExisted) {
|
|
78005
|
-
return;
|
|
78006
|
-
}
|
|
78007
|
-
const gitInstalled = await isGitInstalled();
|
|
78008
|
-
const gitInitialized = await isInsideGitRepo(ctx.project.path);
|
|
78009
|
-
if (!gitInstalled || !gitInitialized) {
|
|
78010
|
-
return;
|
|
78011
|
-
}
|
|
78012
|
-
const s = spinner();
|
|
78013
|
-
s.start("Committing new files");
|
|
78014
|
-
await runCommand(["git", "add", "."], {
|
|
78015
|
-
silent: true,
|
|
78016
|
-
cwd: ctx.project.path
|
|
78017
|
-
});
|
|
78018
|
-
await runCommand(["git", "commit", "-m", commitMessage], {
|
|
78019
|
-
silent: true,
|
|
78020
|
-
cwd: ctx.project.path
|
|
78021
|
-
});
|
|
78022
|
-
s.stop(`${brandColor("git")} ${dim(`commit`)}`);
|
|
78023
|
-
};
|
|
78024
|
-
var createCommitMessage = async (ctx) => {
|
|
78025
|
-
const isPages = ctx.template.platform === "pages";
|
|
78026
|
-
const header = isPages ? "Initialize web application via create-cloudflare CLI" : "Initial commit (by create-cloudflare CLI)";
|
|
78027
|
-
const packageManager = detectPackageManager();
|
|
78028
|
-
const gitVersion = await getGitVersion();
|
|
78029
|
-
const insideRepo = await isInsideGitRepo(ctx.project.path);
|
|
78030
|
-
const showFramework = isPages || ctx.template.id === "hono";
|
|
78031
|
-
const details = [
|
|
78032
|
-
{ key: "C3", value: `create-cloudflare@${version}` },
|
|
78033
|
-
{ key: "project name", value: ctx.project.name },
|
|
78034
|
-
...showFramework ? [{ key: "framework", value: ctx.template.id }] : [],
|
|
78035
|
-
...showFramework ? [{ key: "framework cli", value: getFrameworkCli(ctx) }] : [],
|
|
78036
|
-
{
|
|
78037
|
-
key: "package manager",
|
|
78038
|
-
value: `${packageManager.name}@${packageManager.version}`
|
|
78039
|
-
},
|
|
78040
|
-
{
|
|
78041
|
-
key: "wrangler",
|
|
78042
|
-
value: `wrangler@${version2}`
|
|
78043
|
-
},
|
|
78044
|
-
{
|
|
78045
|
-
key: "git",
|
|
78046
|
-
value: insideRepo ? gitVersion : "N/A"
|
|
78047
|
-
}
|
|
78048
|
-
];
|
|
78049
|
-
const body = `Details:
|
|
78050
|
-
${details.map(({ key, value }) => ` ${key} = ${value}`).join("\n")}
|
|
78051
|
-
`;
|
|
78052
|
-
const commitMessage = `${header}
|
|
78053
|
-
|
|
78054
|
-
${body}
|
|
78055
|
-
`;
|
|
78056
|
-
ctx.commitMessage = commitMessage;
|
|
78057
|
-
return commitMessage;
|
|
78058
|
-
};
|
|
78059
|
-
async function getGitVersion() {
|
|
78060
|
-
try {
|
|
78061
|
-
const rawGitVersion = await runCommand(["git", "--version"], {
|
|
78062
|
-
useSpinner: false,
|
|
78063
|
-
silent: true
|
|
78064
|
-
});
|
|
78065
|
-
const gitVersion = rawGitVersion.replace(/^git\s+version\s+/, "");
|
|
78066
|
-
return gitVersion;
|
|
78067
|
-
} catch {
|
|
78068
|
-
return null;
|
|
78069
|
-
}
|
|
78070
|
-
}
|
|
78071
|
-
async function isGitInstalled() {
|
|
78072
|
-
return await getGitVersion() !== null;
|
|
78073
|
-
}
|
|
78074
|
-
async function isGitConfigured() {
|
|
78075
|
-
try {
|
|
78076
|
-
const userName = await runCommand(["git", "config", "user.name"], {
|
|
78077
|
-
useSpinner: false,
|
|
78078
|
-
silent: true
|
|
78079
|
-
});
|
|
78080
|
-
if (!userName) {
|
|
78081
|
-
return false;
|
|
78082
|
-
}
|
|
78083
|
-
const email = await runCommand(["git", "config", "user.email"], {
|
|
78084
|
-
useSpinner: false,
|
|
78085
|
-
silent: true
|
|
78086
|
-
});
|
|
78087
|
-
if (!email) {
|
|
78088
|
-
return false;
|
|
78089
|
-
}
|
|
78090
|
-
return true;
|
|
78091
|
-
} catch {
|
|
78092
|
-
return false;
|
|
78093
|
-
}
|
|
78094
|
-
}
|
|
78095
|
-
async function isInsideGitRepo(cwd) {
|
|
78096
|
-
try {
|
|
78097
|
-
const output = await runCommand(["git", "status"], {
|
|
78098
|
-
cwd,
|
|
78099
|
-
useSpinner: false,
|
|
78100
|
-
silent: true,
|
|
78101
|
-
captureOutput: true
|
|
78102
|
-
});
|
|
78103
|
-
return output.includes("not a git repository") === false;
|
|
78104
|
-
} catch (err) {
|
|
78105
|
-
return false;
|
|
78106
|
-
}
|
|
78107
|
-
}
|
|
78108
|
-
async function initializeGit(cwd) {
|
|
78109
|
-
const s = spinner();
|
|
78110
|
-
s.start("Initializing git repo");
|
|
78111
|
-
try {
|
|
78112
|
-
const defaultBranchName = await runCommand(
|
|
78113
|
-
["git", "config", "--get", "init.defaultBranch"],
|
|
78114
|
-
{ useSpinner: false, silent: true, cwd }
|
|
78115
|
-
);
|
|
78116
|
-
await runCommand(
|
|
78117
|
-
["git", "init", "--initial-branch", defaultBranchName.trim() ?? "main"],
|
|
78118
|
-
// branch names can't contain spaces, so this is safe
|
|
78119
|
-
{ useSpinner: false, silent: true, cwd }
|
|
78120
|
-
);
|
|
78121
|
-
} catch {
|
|
78122
|
-
await runCommand(["git", "init"], { useSpinner: false, silent: true, cwd });
|
|
78123
|
-
} finally {
|
|
78124
|
-
s.stop(`${brandColor("initialized")} ${dim(`git`)}`);
|
|
78125
|
-
}
|
|
78126
|
-
}
|
|
78127
|
-
async function getProductionBranch(cwd) {
|
|
78128
|
-
try {
|
|
78129
|
-
const productionBranch = await runCommand(
|
|
78130
|
-
["git", "branch", "--show-current"],
|
|
78131
|
-
{
|
|
78132
|
-
silent: true,
|
|
78133
|
-
cwd,
|
|
78134
|
-
useSpinner: false,
|
|
78135
|
-
captureOutput: true
|
|
78136
|
-
}
|
|
78137
|
-
);
|
|
78138
|
-
return productionBranch.trim();
|
|
78139
|
-
} catch (err) {
|
|
78140
|
-
}
|
|
78141
|
-
return "main";
|
|
78142
|
-
}
|
|
78143
|
-
|
|
78144
|
-
// src/deploy.ts
|
|
78169
|
+
init_git();
|
|
78145
78170
|
init_accounts();
|
|
78146
78171
|
|
|
78147
78172
|
// src/wrangler/config.ts
|
|
@@ -79344,6 +79369,9 @@ var runDeploy = async (ctx) => {
|
|
|
79344
79369
|
}
|
|
79345
79370
|
};
|
|
79346
79371
|
|
|
79372
|
+
// src/cli.ts
|
|
79373
|
+
init_git();
|
|
79374
|
+
|
|
79347
79375
|
// src/pages.ts
|
|
79348
79376
|
init_cli();
|
|
79349
79377
|
init_colors();
|
|
@@ -79369,6 +79397,7 @@ var retry = async (config14, fn) => {
|
|
|
79369
79397
|
};
|
|
79370
79398
|
|
|
79371
79399
|
// src/pages.ts
|
|
79400
|
+
init_git();
|
|
79372
79401
|
var CREATE_PROJECT_RETRIES = 3;
|
|
79373
79402
|
var VERIFY_PROJECT_RETRIES = 3;
|
|
79374
79403
|
var { npx } = detectPackageManager();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cloudflare",
|
|
3
|
-
"version": "2.21.
|
|
3
|
+
"version": "2.21.4",
|
|
4
4
|
"description": "A CLI for creating and deploying new applications to Cloudflare.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@babel/parser": "^7.21.3",
|
|
30
30
|
"@babel/types": "^7.21.4",
|
|
31
31
|
"@clack/prompts": "^0.6.3",
|
|
32
|
-
"@cloudflare/workers-types": "^4.
|
|
32
|
+
"@cloudflare/workers-types": "^4.20240524.0",
|
|
33
33
|
"@iarna/toml": "^3.0.0",
|
|
34
34
|
"@types/command-exists": "^1.2.0",
|
|
35
35
|
"@types/cross-spawn": "^6.0.2",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@cloudflare/cli": "1.1.1",
|
|
68
68
|
"@cloudflare/eslint-config-worker": "1.1.0",
|
|
69
69
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
70
|
-
"wrangler": "3.
|
|
70
|
+
"wrangler": "3.58.0"
|
|
71
71
|
},
|
|
72
72
|
"engines": {
|
|
73
73
|
"node": ">=18.14.1"
|
|
@@ -82,6 +82,10 @@
|
|
|
82
82
|
"check:type": "tsc",
|
|
83
83
|
"lint": "eslint",
|
|
84
84
|
"test:e2e": "vitest run --config ./vitest-e2e.config.ts",
|
|
85
|
+
"test:e2e:npm": "pnpm run build && cross-env TEST_PM=npm vitest run --config ./vitest-e2e.config.ts",
|
|
86
|
+
"test:e2e:pnpm": "pnpm run build && cross-env TEST_PM=pnpm vitest run --config ./vitest-e2e.config.ts",
|
|
87
|
+
"test:e2e:bun": "pnpm run build && cross-env TEST_PM=bun vitest run --config ./vitest-e2e.config.ts",
|
|
88
|
+
"test:e2e:yarn": "pnpm run build && cross-env TEST_PM=yarn vitest run --config ./vitest-e2e.config.ts",
|
|
85
89
|
"test:unit": "vitest run --config ./vitest.config.ts",
|
|
86
90
|
"test:unit:watch": "vitest --config ./vitest.config.ts",
|
|
87
91
|
"watch": "node -r esbuild-register scripts/build.ts --watch",
|
|
@@ -32,7 +32,7 @@ export class MyDurableObject extends DurableObject {
|
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* The Durable Object exposes an RPC method sayHello which will be invoked when when a Durable
|
|
35
|
-
* Object instance receives a request from a Worker via the same method
|
|
35
|
+
* Object instance receives a request from a Worker via the same method invocation on the stub
|
|
36
36
|
*
|
|
37
37
|
* @param {string} name - The name provided to a Durable Object instance from a Worker
|
|
38
38
|
* @returns {Promise<string>} The greeting to be sent back to the Worker
|
|
@@ -49,7 +49,7 @@ export class MyDurableObject extends DurableObject {
|
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* The Durable Object exposes an RPC method sayHello which will be invoked when when a Durable
|
|
52
|
-
* Object instance receives a request from a Worker via the same method
|
|
52
|
+
* Object instance receives a request from a Worker via the same method invocation on the stub
|
|
53
53
|
*
|
|
54
54
|
* @param name - The name provided to a Durable Object instance from a Worker
|
|
55
55
|
* @returns The greeting to be sent back to the Worker
|