@vc-shell/create-vc-app 2.0.0-alpha.18 → 2.0.0-alpha.19
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/CHANGELOG.md +4 -0
- package/dist/engine/template.d.ts.map +1 -1
- package/dist/index.js +24 -26
- package/dist/templates/dynamic-module/_package.json.ejs +3 -3
- package/dist/templates/host-app/_package.json.ejs +4 -4
- package/dist/templates/standalone/_package.json.ejs +12 -12
- package/dist/templates/standalone/eslint.config.mjs +31 -0
- package/package.json +2 -2
- package/dist/templates/standalone/_eslintignore +0 -3
- package/dist/templates/standalone/_eslintrc.js +0 -41
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
# [2.0.0-alpha.19](https://github.com/VirtoCommerce/vc-shell/compare/v2.0.0-alpha.18...v2.0.0-alpha.19) (2026-03-23)
|
|
2
|
+
|
|
3
|
+
**Note:** Version bump only for package @vc-shell/create-vc-app
|
|
4
|
+
|
|
1
5
|
# [2.0.0-alpha.18](https://github.com/VirtoCommerce/vc-shell/compare/v2.0.0-alpha.17...v2.0.0-alpha.18) (2026-03-23)
|
|
2
6
|
|
|
3
7
|
**Note:** Version bump only for package @vc-shell/create-vc-app
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/engine/template.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/engine/template.ts"],"names":[],"mappings":"AAsBA;;;GAGG;AACH,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAmB5G;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CA6BrG;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAY1C;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAInD"}
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { fileURLToPath as B } from "node:url";
|
|
|
7
7
|
import A from "prompts";
|
|
8
8
|
import r from "node:fs";
|
|
9
9
|
import T from "ejs";
|
|
10
|
-
const F = "2.0.0-alpha.
|
|
10
|
+
const F = "2.0.0-alpha.19", O = {
|
|
11
11
|
version: F
|
|
12
12
|
};
|
|
13
13
|
function h(e) {
|
|
@@ -55,10 +55,8 @@ const Z = /* @__PURE__ */ new Set([".png", ".jpg", ".jpeg", ".gif", ".bmp", ".ic
|
|
|
55
55
|
_editorconfig: ".editorconfig",
|
|
56
56
|
_env: ".env",
|
|
57
57
|
"_env.local": ".env.local",
|
|
58
|
-
_eslintignore: ".eslintignore",
|
|
59
58
|
_prettierignore: ".prettierignore",
|
|
60
59
|
_prettierrc: ".prettierrc",
|
|
61
|
-
"_eslintrc.js": ".eslintrc.js",
|
|
62
60
|
_github: ".github",
|
|
63
61
|
_vscode: ".vscode",
|
|
64
62
|
_yarn: ".yarn",
|
|
@@ -146,9 +144,9 @@ async function G(e, n) {
|
|
|
146
144
|
let l;
|
|
147
145
|
if (m) {
|
|
148
146
|
o = o || d;
|
|
149
|
-
const
|
|
150
|
-
r.existsSync(
|
|
151
|
-
const u = p(), y = e.type,
|
|
147
|
+
const f = c.resolve(a, o);
|
|
148
|
+
r.existsSync(f) && !I(f) && !e.overwrite && (console.error(t.red(`Target directory "${o}" is not empty. Use --overwrite to overwrite.`)), process.exit(1));
|
|
149
|
+
const u = p(), y = e.type, g = e["module-name"], N = y === "dynamic-module" ? g || S(u) : g || void 0;
|
|
152
150
|
l = {
|
|
153
151
|
projectName: h(u),
|
|
154
152
|
packageName: e["package-name"] || (k(u) ? u : C(u)),
|
|
@@ -161,7 +159,7 @@ async function G(e, n) {
|
|
|
161
159
|
mocks: e.mocks || !1
|
|
162
160
|
};
|
|
163
161
|
} else {
|
|
164
|
-
const
|
|
162
|
+
const f = () => {
|
|
165
163
|
throw new Error(t.red("✖") + " Creation cancelled");
|
|
166
164
|
};
|
|
167
165
|
try {
|
|
@@ -204,43 +202,43 @@ async function G(e, n) {
|
|
|
204
202
|
choices: X
|
|
205
203
|
}
|
|
206
204
|
],
|
|
207
|
-
{ onCancel:
|
|
208
|
-
), y = o ? h(o) : u.projectName,
|
|
205
|
+
{ onCancel: f }
|
|
206
|
+
), y = o ? h(o) : u.projectName, g = u.projectType || "standalone", N = S(y), j = "/apps/" + h(y) + "/", $ = await A(
|
|
209
207
|
[
|
|
210
208
|
{
|
|
211
209
|
name: "includeModule",
|
|
212
|
-
type:
|
|
210
|
+
type: g === "standalone" ? "confirm" : null,
|
|
213
211
|
message: "Include starter module?",
|
|
214
212
|
initial: !0
|
|
215
213
|
},
|
|
216
214
|
{
|
|
217
215
|
name: "moduleName",
|
|
218
|
-
type: (w, M) =>
|
|
216
|
+
type: (w, M) => g === "standalone" && !M.includeModule ? null : "text",
|
|
219
217
|
message: t.reset("Module name:"),
|
|
220
218
|
initial: N,
|
|
221
219
|
format: (w) => String(w).trim()
|
|
222
220
|
},
|
|
223
221
|
{
|
|
224
222
|
name: "basePath",
|
|
225
|
-
type:
|
|
223
|
+
type: g === "dynamic-module" ? null : "text",
|
|
226
224
|
message: t.reset("Base path:"),
|
|
227
225
|
initial: j,
|
|
228
226
|
format: (w) => _(String(w).trim())
|
|
229
227
|
},
|
|
230
228
|
{
|
|
231
|
-
type:
|
|
229
|
+
type: g === "dynamic-module" ? null : "confirm",
|
|
232
230
|
name: "tenantRoutes",
|
|
233
231
|
message: "Include tenant routing (/:tenantId prefix)?",
|
|
234
232
|
initial: !1
|
|
235
233
|
},
|
|
236
234
|
{
|
|
237
|
-
type:
|
|
235
|
+
type: g === "dynamic-module" ? null : "confirm",
|
|
238
236
|
name: "aiAgent",
|
|
239
237
|
message: "Include AI Agent configuration?",
|
|
240
238
|
initial: !1
|
|
241
239
|
},
|
|
242
240
|
{
|
|
243
|
-
type:
|
|
241
|
+
type: g === "dynamic-module" ? null : "confirm",
|
|
244
242
|
name: "dashboard",
|
|
245
243
|
message: "Include Dashboard with widgets?",
|
|
246
244
|
initial: !0
|
|
@@ -252,12 +250,12 @@ async function G(e, n) {
|
|
|
252
250
|
initial: !1
|
|
253
251
|
}
|
|
254
252
|
],
|
|
255
|
-
{ onCancel:
|
|
253
|
+
{ onCancel: f }
|
|
256
254
|
);
|
|
257
255
|
l = {
|
|
258
256
|
projectName: y,
|
|
259
257
|
packageName: u.packageName || (k(y) ? y : C(y)),
|
|
260
|
-
projectType:
|
|
258
|
+
projectType: g,
|
|
261
259
|
moduleName: $.moduleName || ($.includeModule !== !1 ? N : void 0),
|
|
262
260
|
basePath: $.basePath || _(j),
|
|
263
261
|
tenantRoutes: $.tenantRoutes || !1,
|
|
@@ -275,7 +273,7 @@ async function G(e, n) {
|
|
|
275
273
|
`);
|
|
276
274
|
const v = D(l);
|
|
277
275
|
if (b(c.join(n, l.projectType), i, v), l.moduleName) {
|
|
278
|
-
const
|
|
276
|
+
const f = h(l.moduleName), u = l.projectType === "dynamic-module" ? c.join(i, "src/modules") : c.join(i, "src/modules", f);
|
|
279
277
|
b(c.join(n, "module"), u, v);
|
|
280
278
|
}
|
|
281
279
|
l.mocks && b(c.join(n, "sample-module"), c.join(i, "src/modules/sample"), v), W(l);
|
|
@@ -314,8 +312,8 @@ function ee(e, n) {
|
|
|
314
312
|
if (!a.includes("addMenuItem")) {
|
|
315
313
|
const v = /import\s*\{([^}]+)\}\s*from\s*["']@vc-shell\/framework["']/.exec(a);
|
|
316
314
|
if (v) {
|
|
317
|
-
const
|
|
318
|
-
a = a.replace(v[0], `import { ${
|
|
315
|
+
const f = v[1].trim() + ", addMenuItem";
|
|
316
|
+
a = a.replace(v[0], `import { ${f} } from "@vc-shell/framework"`);
|
|
319
317
|
} else
|
|
320
318
|
a = R(a, 'import { addMenuItem } from "@vc-shell/framework";');
|
|
321
319
|
}
|
|
@@ -353,10 +351,10 @@ async function ae(e, n) {
|
|
|
353
351
|
message: "Module name:",
|
|
354
352
|
validate: (j) => j.trim().length > 0 || "Module name is required"
|
|
355
353
|
})).moduleName), m || (console.error(t.red("Module name is required.")), process.exit(1));
|
|
356
|
-
const l = h(m), i = x(m), v = c.join(a, "src/modules"),
|
|
357
|
-
r.existsSync(v) || r.mkdirSync(v, { recursive: !0 }), r.existsSync(
|
|
354
|
+
const l = h(m), i = x(m), v = c.join(a, "src/modules"), f = c.join(v, l);
|
|
355
|
+
r.existsSync(v) || r.mkdirSync(v, { recursive: !0 }), r.existsSync(f) && (console.error(t.red(`Error: Module "${l}" already exists at ${c.relative(a, f)}`)), process.exit(1));
|
|
358
356
|
const u = D({ moduleName: m, projectName: c.basename(a) });
|
|
359
|
-
b(c.join(n, "module"),
|
|
357
|
+
b(c.join(n, "module"), f, u), console.log(t.green(` ✔ Created ${c.relative(a, f)}/`));
|
|
360
358
|
const y = c.join(a, "src/main.ts");
|
|
361
359
|
if (r.existsSync(y))
|
|
362
360
|
try {
|
|
@@ -364,10 +362,10 @@ async function ae(e, n) {
|
|
|
364
362
|
} catch {
|
|
365
363
|
console.warn(t.yellow(" ⚠ Could not auto-update src/main.ts. Add manually:")), console.warn(t.yellow(` import ${i} from "./modules/${l}";`)), console.warn(t.yellow(` app.use(${i}, { router });`));
|
|
366
364
|
}
|
|
367
|
-
const
|
|
368
|
-
if (r.existsSync(
|
|
365
|
+
const g = c.join(a, "src/bootstrap.ts");
|
|
366
|
+
if (r.existsSync(g))
|
|
369
367
|
try {
|
|
370
|
-
ee(
|
|
368
|
+
ee(g, m), console.log(t.green(` ✔ Updated src/bootstrap.ts — added menu item "${S(m)}"`));
|
|
371
369
|
} catch {
|
|
372
370
|
console.warn(t.yellow(" ⚠ Could not auto-update src/bootstrap.ts. Add addMenuItem() manually."));
|
|
373
371
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@types/node": "^20.10.5",
|
|
13
|
-
"@vc-shell/ts-config": "^2.0.0-alpha.
|
|
13
|
+
"@vc-shell/ts-config": "^2.0.0-alpha.19",
|
|
14
14
|
"cross-env": "^7.0.3",
|
|
15
15
|
"sass": "^1.87.0",
|
|
16
16
|
"typescript": "^5.8.3",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"vue-tsc": "^3.2.5"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@vc-shell/config-generator": "^2.0.0-alpha.
|
|
22
|
-
"@vc-shell/framework": "^2.0.0-alpha.
|
|
21
|
+
"@vc-shell/config-generator": "^2.0.0-alpha.19",
|
|
22
|
+
"@vc-shell/framework": "^2.0.0-alpha.19",
|
|
23
23
|
"vue": "^3.5.30",
|
|
24
24
|
"vue-router": "^5.0.3"
|
|
25
25
|
}
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"@types/node": "^20.10.5",
|
|
23
23
|
"@typescript-eslint/eslint-plugin": "^7.4.0",
|
|
24
24
|
"@typescript-eslint/parser": "^7.4.0",
|
|
25
|
-
"@vc-shell/api-client-generator": "^2.0.0-alpha.
|
|
26
|
-
"@vc-shell/ts-config": "^2.0.0-alpha.
|
|
25
|
+
"@vc-shell/api-client-generator": "^2.0.0-alpha.19",
|
|
26
|
+
"@vc-shell/ts-config": "^2.0.0-alpha.19",
|
|
27
27
|
"@vitejs/plugin-vue": "^5.2.3",
|
|
28
28
|
"@vue/eslint-config-prettier": "^9.0.0",
|
|
29
29
|
"@vue/eslint-config-typescript": "^13.0.0",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"vue-tsc": "^3.2.5"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@vc-shell/config-generator": "^2.0.0-alpha.
|
|
55
|
-
"@vc-shell/framework": "^2.0.0-alpha.
|
|
54
|
+
"@vc-shell/config-generator": "^2.0.0-alpha.19",
|
|
55
|
+
"@vc-shell/framework": "^2.0.0-alpha.19",
|
|
56
56
|
"@vueuse/core": "^10.7.1",
|
|
57
57
|
"@vueuse/integrations": "^10.7.1",
|
|
58
58
|
"vee-validate": "^4.12.4",
|
|
@@ -20,21 +20,21 @@
|
|
|
20
20
|
"@rollup/plugin-typescript": "^11.1.5",
|
|
21
21
|
"@types/lodash-es": "^4.17.12",
|
|
22
22
|
"@types/node": "^20.10.5",
|
|
23
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
24
|
-
"@typescript-eslint/parser": "^
|
|
25
|
-
"@vc-shell/api-client-generator": "^2.0.0-alpha.
|
|
26
|
-
"@vc-shell/ts-config": "^2.0.0-alpha.
|
|
23
|
+
"@typescript-eslint/eslint-plugin": "^8.43.0",
|
|
24
|
+
"@typescript-eslint/parser": "^8.43.0",
|
|
25
|
+
"@vc-shell/api-client-generator": "^2.0.0-alpha.19",
|
|
26
|
+
"@vc-shell/ts-config": "^2.0.0-alpha.19",
|
|
27
27
|
"@vitejs/plugin-vue": "^5.2.3",
|
|
28
|
-
"@vue/eslint-config-prettier": "^
|
|
29
|
-
"@vue/eslint-config-typescript": "^
|
|
28
|
+
"@vue/eslint-config-prettier": "^10.2.0",
|
|
29
|
+
"@vue/eslint-config-typescript": "^14.6.0",
|
|
30
30
|
"autoprefixer": "^10.4.16",
|
|
31
31
|
"conventional-changelog-cli": "^5.0.0",
|
|
32
32
|
"cross-env": "^7.0.3",
|
|
33
|
-
"eslint": "^
|
|
34
|
-
"eslint-import-resolver-typescript": "^
|
|
33
|
+
"eslint": "^9.35.0",
|
|
34
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
35
35
|
"eslint-plugin-import": "^2.29.1",
|
|
36
36
|
"eslint-plugin-prettier": "^5.1.3",
|
|
37
|
-
"eslint-plugin-vue": "^
|
|
37
|
+
"eslint-plugin-vue": "^10.4.0",
|
|
38
38
|
"husky": "^8.0.3",
|
|
39
39
|
"lint-staged": "^15.2.0",
|
|
40
40
|
"lodash-es": "^4.17.21",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"vite": "^6.3.3",
|
|
48
48
|
"vite-plugin-checker": "^0.9.1",
|
|
49
49
|
"vite-plugin-mkcert": "^1.17.1",
|
|
50
|
-
"vue-eslint-parser": "^
|
|
50
|
+
"vue-eslint-parser": "^10.2.0",
|
|
51
51
|
"vue-tsc": "^3.2.5"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@vc-shell/config-generator": "^2.0.0-alpha.
|
|
55
|
-
"@vc-shell/framework": "^2.0.0-alpha.
|
|
54
|
+
"@vc-shell/config-generator": "^2.0.0-alpha.19",
|
|
55
|
+
"@vc-shell/framework": "^2.0.0-alpha.19",
|
|
56
56
|
"@vueuse/core": "^10.7.1",
|
|
57
57
|
"@vueuse/integrations": "^10.7.1",
|
|
58
58
|
"vee-validate": "^4.12.4",
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import pluginVue from "eslint-plugin-vue";
|
|
2
|
+
import vueTsEslintConfig from "@vue/eslint-config-typescript";
|
|
3
|
+
import vuePrettierConfig from "@vue/eslint-config-prettier";
|
|
4
|
+
|
|
5
|
+
export default [
|
|
6
|
+
{
|
|
7
|
+
ignores: ["**/node_modules/**", "**/dist/**", "api-client.ts"],
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
...pluginVue.configs["flat/recommended"],
|
|
11
|
+
|
|
12
|
+
...vueTsEslintConfig(),
|
|
13
|
+
|
|
14
|
+
vuePrettierConfig,
|
|
15
|
+
|
|
16
|
+
{
|
|
17
|
+
rules: {
|
|
18
|
+
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
|
19
|
+
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
|
20
|
+
"@typescript-eslint/ban-ts-comment": "warn",
|
|
21
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
22
|
+
"@typescript-eslint/no-empty-object-type": "off",
|
|
23
|
+
"@typescript-eslint/no-require-imports": "off",
|
|
24
|
+
"@typescript-eslint/no-unused-vars": "warn",
|
|
25
|
+
"vue/multi-word-component-names": "off",
|
|
26
|
+
"vue/require-default-prop": "off",
|
|
27
|
+
"vue/no-v-html": "off",
|
|
28
|
+
"vue/no-template-shadow": "off",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
];
|
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": "2.0.0-alpha.
|
|
4
|
+
"version": "2.0.0-alpha.19",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "./dist/index.js",
|
|
7
7
|
"files": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@types/ejs": "^3.1.5",
|
|
18
18
|
"@types/prompts": "^2.4.4",
|
|
19
|
-
"@vc-shell/ts-config": "2.0.0-alpha.
|
|
19
|
+
"@vc-shell/ts-config": "2.0.0-alpha.19",
|
|
20
20
|
"copyfiles": "^2.4.1",
|
|
21
21
|
"cross-env": "^7.0.3",
|
|
22
22
|
"shx": "^0.3.4",
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
root: true,
|
|
3
|
-
env: {
|
|
4
|
-
node: true,
|
|
5
|
-
},
|
|
6
|
-
plugins: ["@typescript-eslint", "vue", "import"],
|
|
7
|
-
extends: [
|
|
8
|
-
"plugin:vue/vue3-recommended",
|
|
9
|
-
"eslint:recommended",
|
|
10
|
-
"plugin:import/recommended",
|
|
11
|
-
"plugin:import/typescript",
|
|
12
|
-
"@vue/typescript/recommended",
|
|
13
|
-
"@vue/prettier",
|
|
14
|
-
"@vue/eslint-config-typescript/recommended",
|
|
15
|
-
],
|
|
16
|
-
parser: "vue-eslint-parser",
|
|
17
|
-
parserOptions: {
|
|
18
|
-
sourceType: "module",
|
|
19
|
-
ecmaVersion: 2022,
|
|
20
|
-
},
|
|
21
|
-
settings: {
|
|
22
|
-
"import/parsers": {
|
|
23
|
-
"@typescript-eslint/parser": [".ts"],
|
|
24
|
-
},
|
|
25
|
-
"import/resolver": {
|
|
26
|
-
typescript: {
|
|
27
|
-
project: ["./tsconfig.json"],
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
rules: {
|
|
32
|
-
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
|
33
|
-
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
|
34
|
-
"@typescript-eslint/ban-ts-comment": "warn",
|
|
35
|
-
"@typescript-eslint/no-unused-vars": "warn",
|
|
36
|
-
"vue/multi-word-component-names": "off",
|
|
37
|
-
"vue/require-default-prop": "off",
|
|
38
|
-
"vue/no-v-html": "off",
|
|
39
|
-
"vue/no-template-shadow": "off",
|
|
40
|
-
},
|
|
41
|
-
};
|