@vc-shell/create-vc-app 1.2.0 → 1.2.1

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/index.js CHANGED
@@ -6,7 +6,7 @@ import c from "node:path";
6
6
  import s from "node:fs";
7
7
  import { fileURLToPath as Oe } from "node:url";
8
8
  import { cwd as Me, exit as Ee, argv as Te } from "node:process";
9
- const Ue = "1.2.0", I = {
9
+ const Ue = "1.2.1", I = {
10
10
  version: Ue
11
11
  };
12
12
  var Pe = typeof global == "object" && global && global.Object === Object && global, Le = typeof self == "object" && self && self.Object === Object && self, _e = Pe || Le || Function("return this")(), b = _e.Symbol, K = Object.prototype, ze = K.hasOwnProperty, De = K.toString, $ = b ? b.toStringTag : void 0;
@@ -87,10 +87,10 @@ function ie(e) {
87
87
  };
88
88
  }
89
89
  var L = ie("toUpperCase");
90
- function kr(e) {
90
+ function Cr(e) {
91
91
  return L(R(e).toLowerCase());
92
92
  }
93
- function Cr(e, r, a, o) {
93
+ function kr(e, r, a, o) {
94
94
  for (var i = -1, u = e == null ? 0 : e.length; ++i < u; )
95
95
  a = r(a, e[i], i, e);
96
96
  return a;
@@ -324,14 +324,14 @@ function ca(e, r, a) {
324
324
  var la = "['’]", fa = RegExp(la, "g");
325
325
  function _(e) {
326
326
  return function(r) {
327
- return Cr(ca(Pr(r).replace(fa, "")), e, "");
327
+ return kr(ca(Pr(r).replace(fa, "")), e, "");
328
328
  };
329
329
  }
330
330
  var G = _(function(e, r, a) {
331
- return r = r.toLowerCase(), e + (a ? kr(r) : r);
331
+ return r = r.toLowerCase(), e + (a ? Cr(r) : r);
332
332
  }), pa = ie("toLowerCase"), ma = _(function(e, r, a) {
333
333
  return e + (a ? "_" : "") + r.toLowerCase();
334
- }), C = _(function(e, r, a) {
334
+ }), k = _(function(e, r, a) {
335
335
  return e + (a ? " " : "") + L(r);
336
336
  });
337
337
  const da = {
@@ -347,7 +347,6 @@ const da = {
347
347
  _prettierrc: ".prettierrc",
348
348
  "_eslintrc.js": ".eslintrc.js",
349
349
  _github: ".github",
350
- _husky: ".husky",
351
350
  _vscode: ".vscode",
352
351
  _yarn: ".yarn",
353
352
  "_package.json": "package.json"
@@ -455,7 +454,7 @@ create-vc-app version: ${I.version}
455
454
  o = o || e.name || e["app-name"] || i, o || (console.error(t.red("Project name is required")), process.exit(1)), s.existsSync(o) && !q(o) && !e.overwrite && (console.error(
456
455
  t.red(`Target directory "${o}" is not empty. Use --overwrite to overwrite existing files.`)
457
456
  ), process.exit(1));
458
- const n = u(), g = e["package-name"] || (w(n) ? n : p(n)), S = e["module-name"] || C(n), N = e["base-path"] || Y(`/apps/${p(n)}/`);
457
+ const n = u(), g = e["package-name"] || (w(n) ? n : p(n)), S = e["module-name"] || k(n), N = e["base-path"] || Y(`/apps/${p(n)}/`);
459
458
  l = {
460
459
  appName: p(o),
461
460
  packageName: g,
@@ -515,7 +514,7 @@ create-vc-app version: ${I.version}
515
514
  name: "moduleName",
516
515
  type: "text",
517
516
  message: t.reset("Module name:"),
518
- initial: () => C(u()),
517
+ initial: () => k(u()),
519
518
  format: (n) => String(n).trim()
520
519
  },
521
520
  {
@@ -534,16 +533,16 @@ create-vc-app version: ${I.version}
534
533
  } catch (n) {
535
534
  console.log(n.message), Ee(1);
536
535
  }
537
- const { packageName: Se, variant: v, moduleName: d, appName: z, basePath: ke, mocks: Ce } = l, A = /* @__PURE__ */ new Map([
536
+ const { packageName: Se, variant: v, moduleName: d, appName: z, basePath: Ce, mocks: ke } = l, A = /* @__PURE__ */ new Map([
538
537
  ["{{ModuleName}}", p(d)],
539
538
  ["{{ModuleNamePascalCase}}", L(G(d))],
540
539
  ["{{ModuleNameUppercase}}", d.toUpperCase()],
541
540
  ["{{ModuleNameUppercaseSnakeCase}}", ma(d).toUpperCase()],
542
541
  ["{{ModuleNameExports}}", pa(G(d))],
543
- ["{{ModuleNameSentenceCase}}", C(d)],
542
+ ["{{ModuleNameSentenceCase}}", k(d)],
544
543
  ["{{AppName}}", z],
545
- ["{{AppNameSentenceCase}}", C(z)],
546
- ["{{BasePath}}", ke],
544
+ ["{{AppNameSentenceCase}}", k(z)],
545
+ ["{{BasePath}}", Ce],
547
546
  ["{{PackageName}}", Se || u()]
548
547
  ]), f = c.join(a, o);
549
548
  s.existsSync(f) ? he(f) : s.existsSync(f) || s.mkdirSync(f), console.log(`
@@ -553,14 +552,14 @@ Scaffolding app in ${f}...`);
553
552
  const S = c.resolve(we, n), N = s.readdirSync(S);
554
553
  for (const y of N) {
555
554
  const O = c.join(S, y);
556
- let k = da[y] ?? y;
555
+ let C = da[y] ?? y;
557
556
  for (const [D, h] of A.entries()) {
558
557
  const E = new RegExp(D, "g");
559
- k = k.replace(E, h);
558
+ C = C.replace(E, h);
560
559
  }
561
- const M = c.join(f, g, k);
560
+ const M = c.join(f, g, C);
562
561
  if (s.statSync(O).isDirectory())
563
- s.mkdirSync(M, { recursive: !0 }), m(c.join(n, y), c.join(g, k));
562
+ s.mkdirSync(M, { recursive: !0 }), m(c.join(n, y), c.join(g, C));
564
563
  else if ([".png", ".jpg", ".jpeg", ".gif", ".bmp", ".ico", ".pdf", ".zip"].includes(
565
564
  c.extname(y).toLowerCase()
566
565
  ))
@@ -577,7 +576,7 @@ Scaffolding app in ${f}...`);
577
576
  }
578
577
  if (m("base"), T[v].forEach((n) => {
579
578
  m(`modules/${n}`, "src/modules/" + A.get("{{ModuleName}}"));
580
- }), Ce && (v === "dynamic" && T[v].forEach((n) => {
579
+ }), ke && (v === "dynamic" && T[v].forEach((n) => {
581
580
  m(`sample/${n}`, "src/modules/sample");
582
581
  }), v === "classic" && T[v].forEach((n) => {
583
582
  m(`sample/${n}`, "src/modules/sample");
@@ -11,8 +11,7 @@
11
11
  "type-check": "vue-tsc --noEmit",
12
12
  "lint-staged": "lint-staged",
13
13
  "lint": "eslint --fix --cache '**/*.{ts,vue}'",
14
- "generate-api-client": "cross-env api-client-generator --APP_PLATFORM_MODULES='[]' --APP_API_CLIENT_DIRECTORY=./src/api_client/ --APP_OUT_DIR=dist --APP_PACKAGE_NAME=api --APP_PACKAGE_VERSION=$npm_package_version",
15
- "release": "tsx scripts/release.ts --dry"
14
+ "generate-api-client": "cross-env api-client-generator --APP_PLATFORM_MODULES='[]' --APP_API_CLIENT_DIRECTORY=./src/api_client/ --APP_OUT_DIR=dist --APP_PACKAGE_NAME=api --APP_PACKAGE_VERSION=$npm_package_version"
16
15
  },
17
16
  "devDependencies": {
18
17
  "@commitlint/cli": "^18.4.3",
@@ -23,9 +22,9 @@
23
22
  "@types/node": "^20.10.5",
24
23
  "@typescript-eslint/eslint-plugin": "^7.4.0",
25
24
  "@typescript-eslint/parser": "^7.4.0",
26
- "@vc-shell/api-client-generator": "^1.2.0",
27
- "@vc-shell/release-config": "^1.2.0",
28
- "@vc-shell/ts-config": "^1.2.0",
25
+ "@vc-shell/api-client-generator": "^1.2.1",
26
+ "@vc-shell/release-config": "^1.2.1",
27
+ "@vc-shell/ts-config": "^1.2.1",
29
28
  "@vitejs/plugin-vue": "^5.2.3",
30
29
  "@vue/eslint-config-prettier": "^9.0.0",
31
30
  "@vue/eslint-config-typescript": "^13.0.0",
@@ -53,8 +52,8 @@
53
52
  "vue-tsc": "^2.2.10"
54
53
  },
55
54
  "dependencies": {
56
- "@vc-shell/config-generator": "^1.2.0",
57
- "@vc-shell/framework": "^1.2.0",
55
+ "@vc-shell/config-generator": "^1.2.1",
56
+ "@vc-shell/framework": "^1.2.1",
58
57
  "@vueuse/core": "^10.7.1",
59
58
  "@vueuse/integrations": "^10.7.1",
60
59
  "cross-spawn": "^7.0.3",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vc-shell/create-vc-app",
3
3
  "description": "Application scaffolding",
4
- "version": "1.2.0",
4
+ "version": "1.2.1",
5
5
  "type": "module",
6
6
  "bin": "./dist/index.js",
7
7
  "files": [
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "devDependencies": {
16
16
  "@types/prompts": "^2.4.4",
17
- "@vc-shell/ts-config": "1.2.0",
17
+ "@vc-shell/ts-config": "1.2.1",
18
18
  "copyfiles": "^2.4.1",
19
19
  "cross-env": "^7.0.3",
20
20
  "shx": "^0.3.4",
@@ -32,5 +32,5 @@
32
32
  "access": "public",
33
33
  "registry": "https://registry.npmjs.org/"
34
34
  },
35
- "gitHead": "b2d01aef92535f1a9b6af0d621a43f920d541ba8"
35
+ "gitHead": "75afdc6afb8a3563385e526f9384a34557fe3561"
36
36
  }
@@ -1,4 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- #npx --no-install commitlint --edit "$1"
@@ -1,4 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- #npm run lint-staged
@@ -1,5 +0,0 @@
1
- import { release } from "@vc-shell/release-config";
2
-
3
- release({
4
- packages: ["."]
5
- });