create-cloudflare 0.0.0-db8b5fe5 → 0.0.0-dcb1ea6b
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.
|
@@ -22,11 +22,6 @@ for (let index = 0; index < 2; index++) {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
// Add needed polyfills
|
|
25
|
-
serverPolyfillsData.unshift(
|
|
26
|
-
`globalThis['process'] = {};`,
|
|
27
|
-
`globalThis['global'] = globalThis;`,
|
|
28
|
-
// Needed as performance.mark is not a function in worker.
|
|
29
|
-
`performance.mark = () => {};`
|
|
30
|
-
);
|
|
25
|
+
serverPolyfillsData.unshift(`globalThis['process'] = {};`);
|
|
31
26
|
|
|
32
27
|
fs.writeFileSync(serverPolyfillsFile, serverPolyfillsData.join(EOL));
|
package/dist/cli.js
CHANGED
|
@@ -60107,7 +60107,7 @@ var Yargs = YargsFactory(esm_default);
|
|
|
60107
60107
|
var yargs_default = Yargs;
|
|
60108
60108
|
|
|
60109
60109
|
// package.json
|
|
60110
|
-
var version = "0.0.0-
|
|
60110
|
+
var version = "0.0.0-dcb1ea6b";
|
|
60111
60111
|
var devDependencies = {
|
|
60112
60112
|
"@babel/parser": "^7.21.3",
|
|
60113
60113
|
"@babel/types": "^7.21.4",
|
|
@@ -60143,7 +60143,6 @@ var devDependencies = {
|
|
|
60143
60143
|
typescript: "^5.0.2",
|
|
60144
60144
|
undici: "5.20.0",
|
|
60145
60145
|
"vite-tsconfig-paths": "^4.0.8",
|
|
60146
|
-
vitest: "^0.30.0",
|
|
60147
60146
|
"which-pm-runs": "^1.1.0",
|
|
60148
60147
|
wrangler: "workspace:*",
|
|
60149
60148
|
yargs: "^17.7.1",
|
|
@@ -60387,7 +60386,11 @@ var retry = async ({
|
|
|
60387
60386
|
}
|
|
60388
60387
|
throw error;
|
|
60389
60388
|
};
|
|
60390
|
-
var runFrameworkGenerator = async (ctx,
|
|
60389
|
+
var runFrameworkGenerator = async (ctx, argString) => {
|
|
60390
|
+
const cli = getFrameworkCli(ctx, true);
|
|
60391
|
+
const { npm: npm14, dlx: dlx2 } = detectPackageManager();
|
|
60392
|
+
let cmd = `${npm14 === "yarn" ? "npx" : dlx2} ${cli} ${argString}`;
|
|
60393
|
+
const env3 = npm14 === "yarn" ? { npm_config_user_agent: "yarn" } : {};
|
|
60391
60394
|
if (ctx.framework?.args?.length) {
|
|
60392
60395
|
cmd = `${cmd} ${quote(ctx.framework.args)}`;
|
|
60393
60396
|
}
|
|
@@ -60399,7 +60402,7 @@ var runFrameworkGenerator = async (ctx, cmd) => {
|
|
|
60399
60402
|
const flags = ctx.framework?.config.testFlags ?? [];
|
|
60400
60403
|
cmd = `${cmd} ${quote(flags)}`;
|
|
60401
60404
|
}
|
|
60402
|
-
await runCommand(cmd);
|
|
60405
|
+
await runCommand(cmd, { env: env3 });
|
|
60403
60406
|
};
|
|
60404
60407
|
var installPackages = async (packages, config14) => {
|
|
60405
60408
|
const { npm: npm14 } = detectPackageManager();
|
|
@@ -60426,25 +60429,42 @@ var installPackages = async (packages, config14) => {
|
|
|
60426
60429
|
silent: true
|
|
60427
60430
|
});
|
|
60428
60431
|
};
|
|
60429
|
-
var
|
|
60432
|
+
var resetPackageManager = async (ctx) => {
|
|
60430
60433
|
const { npm: npm14 } = detectPackageManager();
|
|
60434
|
+
if (!needsPackageManagerReset(ctx)) {
|
|
60435
|
+
return;
|
|
60436
|
+
}
|
|
60437
|
+
const nodeModulesPath = import_path5.default.join(ctx.project.path, "node_modules");
|
|
60438
|
+
if ((0, import_fs5.existsSync)(nodeModulesPath))
|
|
60439
|
+
(0, import_fs5.rmSync)(nodeModulesPath, { recursive: true });
|
|
60440
|
+
const lockfilePath = import_path5.default.join(ctx.project.path, "package-lock.json");
|
|
60441
|
+
if ((0, import_fs5.existsSync)(lockfilePath))
|
|
60442
|
+
(0, import_fs5.rmSync)(lockfilePath);
|
|
60431
60443
|
await runCommand(`${npm14} install`, {
|
|
60432
60444
|
silent: true,
|
|
60445
|
+
cwd: ctx.project.path,
|
|
60433
60446
|
startText: "Installing dependencies",
|
|
60434
60447
|
doneText: `${brandColor("installed")} ${dim(`via \`${npm14} install\``)}`
|
|
60435
60448
|
});
|
|
60436
60449
|
};
|
|
60437
|
-
var
|
|
60450
|
+
var needsPackageManagerReset = (ctx) => {
|
|
60451
|
+
const { npm: npm14 } = detectPackageManager();
|
|
60452
|
+
const projectPath = ctx.project.path;
|
|
60453
|
+
switch (npm14) {
|
|
60454
|
+
case "npm":
|
|
60455
|
+
return false;
|
|
60456
|
+
case "yarn":
|
|
60457
|
+
return !(0, import_fs5.existsSync)(import_path5.default.join(projectPath, "yarn.lock"));
|
|
60458
|
+
case "pnpm":
|
|
60459
|
+
return !(0, import_fs5.existsSync)(import_path5.default.join(projectPath, "pnpm-lock.yaml"));
|
|
60460
|
+
case "bun":
|
|
60461
|
+
return !(0, import_fs5.existsSync)(import_path5.default.join(projectPath, "bun.lockb"));
|
|
60462
|
+
}
|
|
60463
|
+
};
|
|
60464
|
+
var npmInstall = async () => {
|
|
60438
60465
|
const { npm: npm14 } = detectPackageManager();
|
|
60439
|
-
if (npm14 === "npm")
|
|
60440
|
-
return;
|
|
60441
|
-
const nodeModulesPath = import_path5.default.join(ctx.project.path, "node_modules");
|
|
60442
|
-
(0, import_fs5.rmSync)(nodeModulesPath, { recursive: true });
|
|
60443
|
-
const lockfilePath = import_path5.default.join(ctx.project.path, "package-lock.json");
|
|
60444
|
-
(0, import_fs5.rmSync)(lockfilePath);
|
|
60445
60466
|
await runCommand(`${npm14} install`, {
|
|
60446
60467
|
silent: true,
|
|
60447
|
-
cwd: ctx.project.path,
|
|
60448
60468
|
startText: "Installing dependencies",
|
|
60449
60469
|
doneText: `${brandColor("installed")} ${dim(`via \`${npm14} install\``)}`
|
|
60450
60470
|
});
|
|
@@ -60595,10 +60615,9 @@ var compatDateFlag = async () => {
|
|
|
60595
60615
|
};
|
|
60596
60616
|
|
|
60597
60617
|
// src/frameworks/angular/index.ts
|
|
60598
|
-
var {
|
|
60618
|
+
var { npm } = detectPackageManager();
|
|
60599
60619
|
var generate = async (ctx) => {
|
|
60600
|
-
|
|
60601
|
-
await runFrameworkGenerator(ctx, `${dlx} ${cli} ${ctx.project.name} --ssr`);
|
|
60620
|
+
await runFrameworkGenerator(ctx, `${ctx.project.name} --ssr`);
|
|
60602
60621
|
logRaw("");
|
|
60603
60622
|
};
|
|
60604
60623
|
var configure = async (ctx) => {
|
|
@@ -60672,13 +60691,9 @@ function updateAngularJson(ctx) {
|
|
|
60672
60691
|
}
|
|
60673
60692
|
|
|
60674
60693
|
// src/frameworks/astro/index.ts
|
|
60675
|
-
var { npx
|
|
60694
|
+
var { npx } = detectPackageManager();
|
|
60676
60695
|
var generate2 = async (ctx) => {
|
|
60677
|
-
|
|
60678
|
-
await runFrameworkGenerator(
|
|
60679
|
-
ctx,
|
|
60680
|
-
`${dlx2} ${cli} ${ctx.project.name} --no-install`
|
|
60681
|
-
);
|
|
60696
|
+
await runFrameworkGenerator(ctx, `${ctx.project.name} --no-install`);
|
|
60682
60697
|
logRaw("");
|
|
60683
60698
|
};
|
|
60684
60699
|
var configure2 = async (ctx) => {
|
|
@@ -60713,10 +60728,9 @@ var config2 = {
|
|
|
60713
60728
|
var astro_default = config2;
|
|
60714
60729
|
|
|
60715
60730
|
// src/frameworks/docusaurus/index.ts
|
|
60716
|
-
var { npm: npm2
|
|
60731
|
+
var { npm: npm2 } = detectPackageManager();
|
|
60717
60732
|
var generate3 = async (ctx) => {
|
|
60718
|
-
|
|
60719
|
-
await runFrameworkGenerator(ctx, `${dlx3} ${cli} ${ctx.project.name} classic`);
|
|
60733
|
+
await runFrameworkGenerator(ctx, `${ctx.project.name} classic`);
|
|
60720
60734
|
};
|
|
60721
60735
|
var config3 = {
|
|
60722
60736
|
generate: generate3,
|
|
@@ -60730,7 +60744,7 @@ var config3 = {
|
|
|
60730
60744
|
var docusaurus_default = config3;
|
|
60731
60745
|
|
|
60732
60746
|
// src/frameworks/gatsby/index.ts
|
|
60733
|
-
var { npm: npm3
|
|
60747
|
+
var { npm: npm3 } = detectPackageManager();
|
|
60734
60748
|
var generate4 = async (ctx) => {
|
|
60735
60749
|
const defaultTemplate = "https://github.com/gatsbyjs/gatsby-starter-blog";
|
|
60736
60750
|
const useTemplate = await inputPrompt({
|
|
@@ -60748,11 +60762,7 @@ var generate4 = async (ctx) => {
|
|
|
60748
60762
|
defaultValue: defaultTemplate
|
|
60749
60763
|
});
|
|
60750
60764
|
}
|
|
60751
|
-
|
|
60752
|
-
await runFrameworkGenerator(
|
|
60753
|
-
ctx,
|
|
60754
|
-
`${dlx4} ${cli} new ${ctx.project.name} ${templateUrl}`
|
|
60755
|
-
);
|
|
60765
|
+
await runFrameworkGenerator(ctx, `new ${ctx.project.name} ${templateUrl}`);
|
|
60756
60766
|
};
|
|
60757
60767
|
var config4 = {
|
|
60758
60768
|
generate: generate4,
|
|
@@ -60765,12 +60775,10 @@ var config4 = {
|
|
|
60765
60775
|
var gatsby_default = config4;
|
|
60766
60776
|
|
|
60767
60777
|
// src/frameworks/hono/index.ts
|
|
60768
|
-
var { dlx: dlx5 } = detectPackageManager();
|
|
60769
60778
|
var generate5 = async (ctx) => {
|
|
60770
|
-
const cli = getFrameworkCli(ctx);
|
|
60771
60779
|
await runFrameworkGenerator(
|
|
60772
60780
|
ctx,
|
|
60773
|
-
`${
|
|
60781
|
+
`${ctx.project.name} --template cloudflare-workers`
|
|
60774
60782
|
);
|
|
60775
60783
|
logRaw("");
|
|
60776
60784
|
};
|
|
@@ -60834,11 +60842,10 @@ export async function GET(request) {
|
|
|
60834
60842
|
`;
|
|
60835
60843
|
|
|
60836
60844
|
// src/frameworks/next/index.ts
|
|
60837
|
-
var { npm: npm4, npx: npx2
|
|
60845
|
+
var { npm: npm4, npx: npx2 } = detectPackageManager();
|
|
60838
60846
|
var generate6 = async (ctx) => {
|
|
60839
60847
|
const projectName = ctx.project.name;
|
|
60840
|
-
|
|
60841
|
-
await runFrameworkGenerator(ctx, `${dlx6} ${cli} ${projectName}`);
|
|
60848
|
+
await runFrameworkGenerator(ctx, `${projectName}`);
|
|
60842
60849
|
};
|
|
60843
60850
|
var getApiTemplate = (apiPath, isTypescript) => {
|
|
60844
60851
|
const isAppDir = /\/app\/api$/.test(apiPath);
|
|
@@ -60947,13 +60954,12 @@ var config6 = {
|
|
|
60947
60954
|
var next_default = config6;
|
|
60948
60955
|
|
|
60949
60956
|
// src/frameworks/nuxt/index.ts
|
|
60950
|
-
var { npm: npm5
|
|
60957
|
+
var { npm: npm5 } = detectPackageManager();
|
|
60951
60958
|
var generate7 = async (ctx) => {
|
|
60952
|
-
const cli = getFrameworkCli(ctx);
|
|
60953
60959
|
const gitFlag = ctx.args.git ? `--gitInit` : `--no-gitInit`;
|
|
60954
60960
|
await runFrameworkGenerator(
|
|
60955
60961
|
ctx,
|
|
60956
|
-
|
|
60962
|
+
`init ${ctx.project.name} --packageManager ${npm5} ${gitFlag}`
|
|
60957
60963
|
);
|
|
60958
60964
|
logRaw("");
|
|
60959
60965
|
};
|
|
@@ -60983,16 +60989,16 @@ var package_default = {
|
|
|
60983
60989
|
"additionally it also contains a map that maps frameworks to their respective clis"
|
|
60984
60990
|
],
|
|
60985
60991
|
dependencies: {
|
|
60986
|
-
"create-astro": "4.
|
|
60987
|
-
"@angular/create": "17.0.
|
|
60992
|
+
"create-astro": "4.5.1",
|
|
60993
|
+
"@angular/create": "17.0.1",
|
|
60988
60994
|
"create-docusaurus": "3.0.0",
|
|
60989
60995
|
"create-hono": "0.3.2",
|
|
60990
|
-
"create-next-app": "
|
|
60991
|
-
"create-qwik": "1.2.
|
|
60996
|
+
"create-next-app": "14.0.3",
|
|
60997
|
+
"create-qwik": "1.2.17",
|
|
60992
60998
|
"create-react-app": "5.0.1",
|
|
60993
60999
|
"create-remix": "2.2.0",
|
|
60994
|
-
"create-solid": "0.3.
|
|
60995
|
-
"create-svelte": "5.
|
|
61000
|
+
"create-solid": "0.3.9",
|
|
61001
|
+
"create-svelte": "5.2.0",
|
|
60996
61002
|
"create-vue": "3.8.0",
|
|
60997
61003
|
gatsby: "5.12.9",
|
|
60998
61004
|
nuxi: "3.9.1"
|
|
@@ -61015,10 +61021,9 @@ var package_default = {
|
|
|
61015
61021
|
};
|
|
61016
61022
|
|
|
61017
61023
|
// src/frameworks/qwik/index.ts
|
|
61018
|
-
var { npm: npm6, npx: npx3
|
|
61024
|
+
var { npm: npm6, npx: npx3 } = detectPackageManager();
|
|
61019
61025
|
var generate8 = async (ctx) => {
|
|
61020
|
-
|
|
61021
|
-
await runFrameworkGenerator(ctx, `${dlx8} ${cli} basic ${ctx.project.name}`);
|
|
61026
|
+
await runFrameworkGenerator(ctx, `basic ${ctx.project.name}`);
|
|
61022
61027
|
};
|
|
61023
61028
|
var configure5 = async (ctx) => {
|
|
61024
61029
|
process.chdir(ctx.project.path);
|
|
@@ -61039,18 +61044,13 @@ var config8 = {
|
|
|
61039
61044
|
var qwik_default = config8;
|
|
61040
61045
|
|
|
61041
61046
|
// src/frameworks/react/index.ts
|
|
61042
|
-
var { npm: npm7
|
|
61047
|
+
var { npm: npm7 } = detectPackageManager();
|
|
61043
61048
|
var generate9 = async (ctx) => {
|
|
61044
|
-
|
|
61045
|
-
await runFrameworkGenerator(ctx, `${dlx9} ${cli} ${ctx.project.name}`);
|
|
61049
|
+
await runFrameworkGenerator(ctx, `${ctx.project.name}`);
|
|
61046
61050
|
logRaw("");
|
|
61047
61051
|
};
|
|
61048
|
-
var configure6 = async (ctx) => {
|
|
61049
|
-
await resetPackageManager(ctx);
|
|
61050
|
-
};
|
|
61051
61052
|
var config9 = {
|
|
61052
61053
|
generate: generate9,
|
|
61053
|
-
configure: configure6,
|
|
61054
61054
|
displayName: "React",
|
|
61055
61055
|
getPackageScripts: async () => ({
|
|
61056
61056
|
"pages:dev": `wrangler pages dev ${await compatDateFlag()} --port 3000 -- ${npm7} start`,
|
|
@@ -61060,12 +61060,11 @@ var config9 = {
|
|
|
61060
61060
|
var react_default = config9;
|
|
61061
61061
|
|
|
61062
61062
|
// src/frameworks/remix/index.ts
|
|
61063
|
-
var { npm: npm8
|
|
61063
|
+
var { npm: npm8 } = detectPackageManager();
|
|
61064
61064
|
var generate10 = async (ctx) => {
|
|
61065
|
-
const cli = getFrameworkCli(ctx);
|
|
61066
61065
|
await runFrameworkGenerator(
|
|
61067
61066
|
ctx,
|
|
61068
|
-
`${
|
|
61067
|
+
`${ctx.project.name} --template https://github.com/remix-run/remix/tree/main/templates/cloudflare-pages`
|
|
61069
61068
|
);
|
|
61070
61069
|
logRaw("");
|
|
61071
61070
|
};
|
|
@@ -61092,13 +61091,12 @@ export default defineConfig({
|
|
|
61092
61091
|
`;
|
|
61093
61092
|
|
|
61094
61093
|
// src/frameworks/solid/index.ts
|
|
61095
|
-
var { npm: npm9
|
|
61094
|
+
var { npm: npm9 } = detectPackageManager();
|
|
61096
61095
|
var generate11 = async (ctx) => {
|
|
61097
|
-
|
|
61098
|
-
await runFrameworkGenerator(ctx, `${dlx11} ${cli} ${ctx.project.name}`);
|
|
61096
|
+
await runFrameworkGenerator(ctx, `${ctx.project.name}`);
|
|
61099
61097
|
logRaw("");
|
|
61100
61098
|
};
|
|
61101
|
-
var
|
|
61099
|
+
var configure6 = async (ctx) => {
|
|
61102
61100
|
process.chdir(ctx.project.path);
|
|
61103
61101
|
const pkg = "solid-start-cloudflare-pages";
|
|
61104
61102
|
await installPackages([pkg], {
|
|
@@ -61114,7 +61112,7 @@ var configure7 = async (ctx) => {
|
|
|
61114
61112
|
};
|
|
61115
61113
|
var config11 = {
|
|
61116
61114
|
generate: generate11,
|
|
61117
|
-
configure:
|
|
61115
|
+
configure: configure6,
|
|
61118
61116
|
displayName: "Solid",
|
|
61119
61117
|
getPackageScripts: async () => ({
|
|
61120
61118
|
"pages:dev": `wrangler pages dev ${await compatDateFlag()} --proxy 3000 -- ${npm9} run dev`,
|
|
@@ -61170,13 +61168,12 @@ interface Platform {
|
|
|
61170
61168
|
`;
|
|
61171
61169
|
|
|
61172
61170
|
// src/frameworks/svelte/index.ts
|
|
61173
|
-
var { npm: npm10
|
|
61171
|
+
var { npm: npm10 } = detectPackageManager();
|
|
61174
61172
|
var generate12 = async (ctx) => {
|
|
61175
|
-
|
|
61176
|
-
await runFrameworkGenerator(ctx, `${dlx12} ${cli} ${ctx.project.name}`);
|
|
61173
|
+
await runFrameworkGenerator(ctx, `${ctx.project.name}`);
|
|
61177
61174
|
logRaw("");
|
|
61178
61175
|
};
|
|
61179
|
-
var
|
|
61176
|
+
var configure7 = async (ctx) => {
|
|
61180
61177
|
process.chdir(ctx.project.path);
|
|
61181
61178
|
await npmInstall();
|
|
61182
61179
|
const pkg = `@sveltejs/adapter-cloudflare`;
|
|
@@ -61211,7 +61208,7 @@ var configure8 = async (ctx) => {
|
|
|
61211
61208
|
};
|
|
61212
61209
|
var config12 = {
|
|
61213
61210
|
generate: generate12,
|
|
61214
|
-
configure:
|
|
61211
|
+
configure: configure7,
|
|
61215
61212
|
displayName: "Svelte",
|
|
61216
61213
|
getPackageScripts: async () => ({
|
|
61217
61214
|
"pages:dev": `wrangler pages dev ${await compatDateFlag()} --proxy 5173 -- ${npm10} run dev`,
|
|
@@ -61221,10 +61218,9 @@ var config12 = {
|
|
|
61221
61218
|
var svelte_default = config12;
|
|
61222
61219
|
|
|
61223
61220
|
// src/frameworks/vue/index.ts
|
|
61224
|
-
var { npm: npm11
|
|
61221
|
+
var { npm: npm11 } = detectPackageManager();
|
|
61225
61222
|
var generate13 = async (ctx) => {
|
|
61226
|
-
|
|
61227
|
-
await runFrameworkGenerator(ctx, `${dlx13} ${cli} ${ctx.project.name}`);
|
|
61223
|
+
await runFrameworkGenerator(ctx, `${ctx.project.name}`);
|
|
61228
61224
|
};
|
|
61229
61225
|
var config13 = {
|
|
61230
61226
|
generate: generate13,
|
|
@@ -61396,7 +61392,7 @@ function secondsSince(start) {
|
|
|
61396
61392
|
}
|
|
61397
61393
|
|
|
61398
61394
|
// ../wrangler/package.json
|
|
61399
|
-
var version2 = "3.
|
|
61395
|
+
var version2 = "3.16.0";
|
|
61400
61396
|
|
|
61401
61397
|
// src/common.ts
|
|
61402
61398
|
var { name, npm: npm12 } = detectPackageManager();
|
|
@@ -61666,6 +61662,8 @@ var offerGit = async (ctx) => {
|
|
|
61666
61662
|
};
|
|
61667
61663
|
var gitCommit = async (ctx) => {
|
|
61668
61664
|
const commitMessage = await createCommitMessage(ctx);
|
|
61665
|
+
if (ctx.gitRepoAlreadyExisted)
|
|
61666
|
+
return;
|
|
61669
61667
|
if (!await isGitInstalled() || !await isInsideGitRepo(ctx.project.path))
|
|
61670
61668
|
return;
|
|
61671
61669
|
await runCommands({
|
|
@@ -61822,13 +61820,15 @@ var runPagesGenerator = async (args) => {
|
|
|
61822
61820
|
},
|
|
61823
61821
|
args,
|
|
61824
61822
|
type: frameworkConfig.type,
|
|
61825
|
-
originalCWD
|
|
61823
|
+
originalCWD,
|
|
61824
|
+
gitRepoAlreadyExisted: await isInsideGitRepo((0, import_path8.dirname)(path3))
|
|
61826
61825
|
};
|
|
61827
|
-
const { generate: generate14, configure:
|
|
61826
|
+
const { generate: generate14, configure: configure8 } = FrameworkMap[framework];
|
|
61828
61827
|
await generate14({ ...ctx });
|
|
61829
61828
|
startSection("Configuring your application for Cloudflare", "Step 2 of 3");
|
|
61830
|
-
|
|
61831
|
-
|
|
61829
|
+
await resetPackageManager(ctx);
|
|
61830
|
+
if (configure8) {
|
|
61831
|
+
await configure8({ ...ctx });
|
|
61832
61832
|
}
|
|
61833
61833
|
await updatePackageScripts(ctx);
|
|
61834
61834
|
await offerGit(ctx);
|
|
@@ -61959,14 +61959,15 @@ var import_promises2 = require("fs/promises");
|
|
|
61959
61959
|
var import_os = require("os");
|
|
61960
61960
|
var import_path9 = require("path");
|
|
61961
61961
|
var import_process4 = require("process");
|
|
61962
|
-
var { dlx
|
|
61962
|
+
var { dlx } = detectPackageManager();
|
|
61963
61963
|
var runWorkersGenerator = async (args) => {
|
|
61964
61964
|
const originalCWD = process.cwd();
|
|
61965
61965
|
const { name: name2, path: path3 } = setupProjectDirectory(args);
|
|
61966
61966
|
const ctx = {
|
|
61967
61967
|
project: { name: name2, path: path3 },
|
|
61968
61968
|
args,
|
|
61969
|
-
originalCWD
|
|
61969
|
+
originalCWD,
|
|
61970
|
+
gitRepoAlreadyExisted: await isInsideGitRepo((0, import_path9.dirname)(path3))
|
|
61970
61971
|
};
|
|
61971
61972
|
ctx.args.ts = await processArgument(ctx.args, "ts", {
|
|
61972
61973
|
type: "confirm",
|
|
@@ -62028,7 +62029,7 @@ async function copyExistingWorkerFiles(ctx) {
|
|
|
62028
62029
|
(0, import_path9.join)((0, import_os.tmpdir)(), "c3-wrangler-init--from-dash-")
|
|
62029
62030
|
);
|
|
62030
62031
|
await runCommand(
|
|
62031
|
-
`${
|
|
62032
|
+
`${dlx} wrangler@3 init --from-dash ${ctx.args.existingScript} -y --no-delegate-c3`,
|
|
62032
62033
|
{
|
|
62033
62034
|
silent: true,
|
|
62034
62035
|
cwd: tempdir,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cloudflare",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-dcb1ea6b",
|
|
4
4
|
"description": "A CLI for creating and deploying new applications to Cloudflare.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -58,13 +58,12 @@
|
|
|
58
58
|
"typescript": "^5.0.2",
|
|
59
59
|
"undici": "5.20.0",
|
|
60
60
|
"vite-tsconfig-paths": "^4.0.8",
|
|
61
|
-
"vitest": "^0.30.0",
|
|
62
61
|
"which-pm-runs": "^1.1.0",
|
|
63
62
|
"yargs": "^17.7.1",
|
|
64
63
|
"yarn": "^1.22.19",
|
|
65
64
|
"@cloudflare/cli": "1.0.0",
|
|
66
|
-
"
|
|
67
|
-
"
|
|
65
|
+
"wrangler": "3.16.0",
|
|
66
|
+
"@cloudflare/workers-tsconfig": "0.0.0"
|
|
68
67
|
},
|
|
69
68
|
"engines": {
|
|
70
69
|
"node": ">=18.14.1"
|
|
@@ -75,11 +74,13 @@
|
|
|
75
74
|
"check:type": "tsc",
|
|
76
75
|
"lint": "eslint",
|
|
77
76
|
"test:e2e:cleanup": "node -r esbuild-register scripts/e2eCleanup.ts",
|
|
78
|
-
"test:e2e:npm": "pnpm run build && TEST_PM=npm vitest run --config ./vitest-e2e.config.ts",
|
|
79
|
-
"test:e2e:pnpm": "pnpm run build && TEST_PM=pnpm vitest run --config ./vitest-e2e.config.ts",
|
|
80
|
-
"test:e2e:bun": "pnpm run build && TEST_PM=bun vitest run --config ./vitest-e2e.config.ts",
|
|
77
|
+
"test:e2e:npm": "pnpm run build && cross-env TEST_PM=npm vitest run --config ./vitest-e2e.config.ts",
|
|
78
|
+
"test:e2e:pnpm": "pnpm run build && cross-env TEST_PM=pnpm vitest run --config ./vitest-e2e.config.ts",
|
|
79
|
+
"test:e2e:bun": "pnpm run build && cross-env TEST_PM=bun vitest run --config ./vitest-e2e.config.ts",
|
|
80
|
+
"test:e2e:yarn": "pnpm run build && cross-env TEST_PM=yarn vitest run --config ./vitest-e2e.config.ts",
|
|
81
81
|
"test:unit": "vitest run --config ./vitest.config.ts",
|
|
82
82
|
"test:unit:watch": "vitest --config ./vitest.config.ts",
|
|
83
|
-
"watch": "node -r esbuild-register scripts/build.ts --watch"
|
|
83
|
+
"watch": "node -r esbuild-register scripts/build.ts --watch",
|
|
84
|
+
"test:ci": "vitest run --config ./vitest.config.ts"
|
|
84
85
|
}
|
|
85
86
|
}
|