create-cloudflare 0.0.0-696d7f29 → 0.0.0-6a09b45c
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 +32 -28
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -58091,7 +58091,7 @@ var Yargs = YargsFactory(esm_default);
|
|
|
58091
58091
|
var yargs_default = Yargs;
|
|
58092
58092
|
|
|
58093
58093
|
// package.json
|
|
58094
|
-
var version = "0.0.0-
|
|
58094
|
+
var version = "0.0.0-6a09b45c";
|
|
58095
58095
|
var devDependencies = {
|
|
58096
58096
|
"@babel/parser": "^7.21.3",
|
|
58097
58097
|
"@babel/types": "^7.21.4",
|
|
@@ -60612,9 +60612,8 @@ var generate = async (ctx) => {
|
|
|
60612
60612
|
logRaw("");
|
|
60613
60613
|
};
|
|
60614
60614
|
var configure = async (ctx) => {
|
|
60615
|
-
const cli = getFrameworkCli(ctx, false);
|
|
60616
60615
|
process.chdir(ctx.project.path);
|
|
60617
|
-
await runCommand(`${npx}
|
|
60616
|
+
await runCommand(`${npx} ng analytics disable`, {
|
|
60618
60617
|
silent: true
|
|
60619
60618
|
});
|
|
60620
60619
|
await addSSRAdapter();
|
|
@@ -60628,13 +60627,13 @@ var config = {
|
|
|
60628
60627
|
displayName: "Angular",
|
|
60629
60628
|
packageScripts: {
|
|
60630
60629
|
process: "node ./tools/copy-worker-files.mjs && node ./tools/copy-client-files.mjs && node ./tools/bundle.mjs",
|
|
60631
|
-
|
|
60632
|
-
start:
|
|
60633
|
-
|
|
60634
|
-
deploy: "wrangler pages deploy dist/cloudflare"
|
|
60630
|
+
"pages:build": `${npm} run build:ssr && ${npm} run process`,
|
|
60631
|
+
start: `${npm} run pages:build && wrangler pages dev dist/cloudflare --compatibility-date=2021-09-20 --experimental-local`,
|
|
60632
|
+
deploy: `${npm} run pages:build && wrangler pages deploy dist/cloudflare`
|
|
60635
60633
|
},
|
|
60636
60634
|
deployCommand: "deploy",
|
|
60637
|
-
devCommand: "start"
|
|
60635
|
+
devCommand: "start",
|
|
60636
|
+
testFlags: ["--routing", "--style", "sass"]
|
|
60638
60637
|
};
|
|
60639
60638
|
var angular_default = config;
|
|
60640
60639
|
async function installCFWorker(ctx) {
|
|
@@ -61005,15 +61004,15 @@ var package_default = {
|
|
|
61005
61004
|
"@angular/cli": "16.2.2",
|
|
61006
61005
|
"create-astro": "4.2.1",
|
|
61007
61006
|
"create-docusaurus": "2.4.3",
|
|
61008
|
-
"create-hono": "0.
|
|
61007
|
+
"create-hono": "0.3.1",
|
|
61009
61008
|
"create-next-app": "13.4.19",
|
|
61010
61009
|
"create-qwik": "1.2.13",
|
|
61011
61010
|
"create-react-app": "5.0.1",
|
|
61012
|
-
"create-remix": "2.0
|
|
61011
|
+
"create-remix": "2.1.0",
|
|
61013
61012
|
"create-solid": "0.3.6",
|
|
61014
|
-
"create-svelte": "5.1.
|
|
61013
|
+
"create-svelte": "5.1.1",
|
|
61015
61014
|
"create-vue": "3.7.5",
|
|
61016
|
-
gatsby: "5.12.
|
|
61015
|
+
gatsby: "5.12.7",
|
|
61017
61016
|
nuxi: "3.9.0"
|
|
61018
61017
|
},
|
|
61019
61018
|
frameworkCliMap: {
|
|
@@ -61389,33 +61388,35 @@ function secondsSince(start) {
|
|
|
61389
61388
|
}
|
|
61390
61389
|
|
|
61391
61390
|
// ../wrangler/package.json
|
|
61392
|
-
var version2 = "3.13.
|
|
61391
|
+
var version2 = "3.13.1";
|
|
61393
61392
|
|
|
61394
61393
|
// src/common.ts
|
|
61395
61394
|
var { name, npm: npm12 } = detectPackageManager();
|
|
61396
|
-
var validateProjectDirectory = (relativePath) => {
|
|
61395
|
+
var validateProjectDirectory = (relativePath, args) => {
|
|
61397
61396
|
const path3 = (0, import_path7.resolve)(relativePath);
|
|
61398
61397
|
const existsAlready = (0, import_fs8.existsSync)(path3);
|
|
61399
61398
|
const isEmpty = existsAlready && (0, import_fs8.readdirSync)(path3).length === 0;
|
|
61400
61399
|
if (existsAlready && !isEmpty) {
|
|
61401
61400
|
return `Directory \`${relativePath}\` already exists and is not empty. Please choose a new name.`;
|
|
61402
61401
|
}
|
|
61403
|
-
|
|
61404
|
-
|
|
61405
|
-
|
|
61406
|
-
|
|
61407
|
-
|
|
61408
|
-
|
|
61409
|
-
|
|
61410
|
-
|
|
61411
|
-
|
|
61412
|
-
|
|
61413
|
-
|
|
61402
|
+
if (!args.existingScript) {
|
|
61403
|
+
const projectName = (0, import_path7.basename)(path3);
|
|
61404
|
+
const invalidChars = /[^a-z0-9-]/;
|
|
61405
|
+
const invalidStartEnd = /^-|-$/;
|
|
61406
|
+
if (projectName.match(invalidStartEnd)) {
|
|
61407
|
+
return `Project names cannot start or end with a dash.`;
|
|
61408
|
+
}
|
|
61409
|
+
if (projectName.match(invalidChars)) {
|
|
61410
|
+
return `Project names must only contain lowercase characters, numbers, and dashes.`;
|
|
61411
|
+
}
|
|
61412
|
+
if (projectName.length > 58) {
|
|
61413
|
+
return `Project names must be less than 58 characters.`;
|
|
61414
|
+
}
|
|
61414
61415
|
}
|
|
61415
61416
|
};
|
|
61416
61417
|
var setupProjectDirectory = (args) => {
|
|
61417
61418
|
const path3 = (0, import_path7.resolve)(args.projectName);
|
|
61418
|
-
const err = validateProjectDirectory(path3);
|
|
61419
|
+
const err = validateProjectDirectory(path3, args);
|
|
61419
61420
|
if (err) {
|
|
61420
61421
|
crash(err);
|
|
61421
61422
|
}
|
|
@@ -62092,7 +62093,10 @@ var processArgument = async (args, name2, promptConfig) => {
|
|
|
62092
62093
|
let value = args[name2];
|
|
62093
62094
|
const renderSubmitted = getRenderers(promptConfig).submit;
|
|
62094
62095
|
if (value !== void 0) {
|
|
62095
|
-
promptConfig.validate?.(value);
|
|
62096
|
+
const error = promptConfig.validate?.(value);
|
|
62097
|
+
if (error) {
|
|
62098
|
+
crash(error);
|
|
62099
|
+
}
|
|
62096
62100
|
const lines = renderSubmitted({ value });
|
|
62097
62101
|
logRaw(lines.join("\n"));
|
|
62098
62102
|
return value;
|
|
@@ -62141,7 +62145,7 @@ var runCli = async (args) => {
|
|
|
62141
62145
|
helpText: "also used as application name",
|
|
62142
62146
|
defaultValue: C3_DEFAULTS.projectName,
|
|
62143
62147
|
label: "dir",
|
|
62144
|
-
validate: (value) => validateProjectDirectory(String(value) || C3_DEFAULTS.projectName),
|
|
62148
|
+
validate: (value) => validateProjectDirectory(String(value) || C3_DEFAULTS.projectName, args),
|
|
62145
62149
|
format: (val) => `./${val}`
|
|
62146
62150
|
});
|
|
62147
62151
|
if (!args.type) {
|
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-6a09b45c",
|
|
4
4
|
"description": "A CLI for creating and deploying new applications to Cloudflare.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"yargs": "^17.7.1",
|
|
67
67
|
"yarn": "^1.22.19",
|
|
68
68
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
69
|
-
"wrangler": "3.13.
|
|
69
|
+
"wrangler": "3.13.1"
|
|
70
70
|
},
|
|
71
71
|
"engines": {
|
|
72
72
|
"node": ">=18.14.1"
|