create-cloudflare 0.0.0-5798038 → 0.0.0-5810f815

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.
Files changed (2) hide show
  1. package/dist/cli.js +57 -11
  2. package/package.json +3 -3
package/dist/cli.js CHANGED
@@ -53761,9 +53761,9 @@ var shapes = {
53761
53761
  };
53762
53762
  var status = {
53763
53763
  error: bgRed(` ERROR `),
53764
- warning: bgRed(` WARNING `),
53765
- info: bgRed(` INFO `),
53766
- success: bgRed(` SUCCESS `)
53764
+ warning: bgYellow(` WARNING `),
53765
+ info: bgBlue(` INFO `),
53766
+ success: bgGreen(` SUCCESS `)
53767
53767
  };
53768
53768
  var space = (n = 1) => {
53769
53769
  return hidden("\u200A".repeat(n));
@@ -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-05798038";
60110
+ var version = "0.0.0-5810f815";
60111
60111
  var devDependencies = {
60112
60112
  "@babel/parser": "^7.21.3",
60113
60113
  "@babel/types": "^7.21.4",
@@ -60938,13 +60938,16 @@ var config6 = {
60938
60938
  configure: configure3,
60939
60939
  displayName: "Next",
60940
60940
  getPackageScripts: async () => {
60941
- const isNpmOrBun = ["npm", "bun"].includes(npm4);
60941
+ const isNpm = npm4 === "npm";
60942
+ const isBun = npm4 === "bun";
60943
+ const isNpmOrBun = isNpm || isBun;
60942
60944
  const nextOnPagesScope = isNpmOrBun ? "@cloudflare/" : "";
60943
60945
  const nextOnPagesCommand = `${nextOnPagesScope}next-on-pages`;
60944
60946
  const pmCommand = isNpmOrBun ? npx3 : npm4;
60947
+ const pagesDeployCommand = isNpm ? "npm run" : isBun ? "bun" : pmCommand;
60945
60948
  return {
60946
60949
  "pages:build": `${pmCommand} ${nextOnPagesCommand}`,
60947
- "pages:deploy": `${npm4 === "npm" ? "npm run" : pmCommand} pages:build && wrangler pages deploy .vercel/output/static`,
60950
+ "pages:deploy": `${pagesDeployCommand} pages:build && wrangler pages deploy .vercel/output/static`,
60948
60951
  "pages:watch": `${pmCommand} ${nextOnPagesCommand} --watch`,
60949
60952
  "pages:dev": `${pmCommand} wrangler pages dev .vercel/output/static ${await compatDateFlag()} --compatibility-flag=nodejs_compat`
60950
60953
  };
@@ -61008,7 +61011,7 @@ var package_default = {
61008
61011
  "create-qwik": "1.2.14",
61009
61012
  "create-react-app": "5.0.1",
61010
61013
  "create-remix": "2.1.0",
61011
- "create-solid": "0.3.7",
61014
+ "create-solid": "0.3.8",
61012
61015
  "create-svelte": "5.1.1",
61013
61016
  "create-vue": "3.8.0",
61014
61017
  gatsby: "5.12.8",
@@ -61413,16 +61416,19 @@ function secondsSince(start) {
61413
61416
  }
61414
61417
 
61415
61418
  // ../wrangler/package.json
61416
- var version2 = "3.14.0";
61419
+ var version2 = "3.15.0";
61417
61420
 
61418
61421
  // src/common.ts
61419
61422
  var { name, npm: npm12 } = detectPackageManager();
61420
61423
  var validateProjectDirectory = (relativePath, args) => {
61421
61424
  const path3 = (0, import_path7.resolve)(relativePath);
61422
61425
  const existsAlready = (0, import_fs8.existsSync)(path3);
61423
- const isEmpty = existsAlready && (0, import_fs8.readdirSync)(path3).length === 0;
61424
- if (existsAlready && !isEmpty) {
61425
- return `Directory \`${relativePath}\` already exists and is not empty. Please choose a new name.`;
61426
+ if (existsAlready) {
61427
+ for (const file of (0, import_fs8.readdirSync)(path3)) {
61428
+ if (!isAllowedExistingFile(file)) {
61429
+ return `Directory \`${relativePath}\` already exists and contains files that might conflict. Please choose a new name.`;
61430
+ }
61431
+ }
61426
61432
  }
61427
61433
  if (!args.existingScript) {
61428
61434
  const projectName = (0, import_path7.basename)(path3);
@@ -61439,6 +61445,46 @@ var validateProjectDirectory = (relativePath, args) => {
61439
61445
  }
61440
61446
  }
61441
61447
  };
61448
+ var isAllowedExistingFile = (file) => {
61449
+ const allowedExistingFiles = /* @__PURE__ */ new Set([
61450
+ ".DS_Store",
61451
+ ".git",
61452
+ ".gitattributes",
61453
+ ".gitignore",
61454
+ ".gitlab-ci.yml",
61455
+ ".hg",
61456
+ ".hgcheck",
61457
+ ".hgignore",
61458
+ ".idea",
61459
+ ".npmignore",
61460
+ ".travis.yml",
61461
+ ".vscode",
61462
+ "Thumbs.db",
61463
+ "docs",
61464
+ "mkdocs.yml",
61465
+ "npm-debug.log",
61466
+ "yarn-debug.log",
61467
+ "yarn-error.log",
61468
+ "yarnrc.yml",
61469
+ ".yarn",
61470
+ ".gitkeep"
61471
+ ]);
61472
+ if (allowedExistingFiles.has(file))
61473
+ return true;
61474
+ const allowedExistingPatters = [
61475
+ /readme(\.md)?$/i,
61476
+ /license(\.md)?$/i,
61477
+ /\.iml$/,
61478
+ /^npm-debug\.log/,
61479
+ /^yarn-debug\.log/,
61480
+ /^yarn-error\.log/
61481
+ ];
61482
+ for (const regex2 of allowedExistingPatters) {
61483
+ if (regex2.test(file))
61484
+ return true;
61485
+ }
61486
+ return false;
61487
+ };
61442
61488
  var setupProjectDirectory = (args) => {
61443
61489
  const path3 = (0, import_path7.resolve)(args.projectName);
61444
61490
  const err = validateProjectDirectory(path3, args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "0.0.0-05798038",
3
+ "version": "0.0.0-5810f815",
4
4
  "description": "A CLI for creating and deploying new applications to Cloudflare.",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -62,9 +62,9 @@
62
62
  "which-pm-runs": "^1.1.0",
63
63
  "yargs": "^17.7.1",
64
64
  "yarn": "^1.22.19",
65
- "@cloudflare/cli": "0.1.0",
65
+ "@cloudflare/cli": "1.0.0",
66
66
  "@cloudflare/workers-tsconfig": "0.0.0",
67
- "wrangler": "3.14.0"
67
+ "wrangler": "3.15.0"
68
68
  },
69
69
  "engines": {
70
70
  "node": ">=18.14.1"