@vc-shell/create-vc-app 2.5.0-pr318.ac8415b → 2.5.0-pr319.10c3bf0
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/README.md +0 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/engine/helpers.d.ts +0 -1
- package/dist/engine/helpers.d.ts.map +1 -1
- package/dist/index.js +45 -54
- package/dist/templates/standalone/_package.json.ejs +0 -3
- package/dist/templates/standalone/src/main.ts.ejs +0 -10
- package/dist/templates/standalone/vite.config.mts.ejs +0 -6
- package/dist/types.d.ts +0 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -39,7 +39,6 @@ npx @vc-shell/create-vc-app my-module --type dynamic-module --module-name "Revie
|
|
|
39
39
|
| `--tenant-routes` | Include tenant routing (`/:tenantId` prefix) | `false` |
|
|
40
40
|
| `--ai-agent` | Include AI Agent configuration | `false` |
|
|
41
41
|
| `--dashboard` | Include Dashboard with widgets | `false` |
|
|
42
|
-
| `--module-federation` | Include Module Federation host runtime | `false` |
|
|
43
42
|
| `--mocks` | Include sample module with mock data | `false` |
|
|
44
43
|
| `--overwrite` | Overwrite existing files without confirmation | `false` |
|
|
45
44
|
| `--help`, `-h` | Show help | — |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAA+B,MAAM,aAAa,CAAC;AAsBxE,wBAAsB,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAA+B,MAAM,aAAa,CAAC;AAsBxE,wBAAsB,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA4NpF"}
|
package/dist/engine/helpers.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/engine/helpers.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAO/C;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG/C;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKxD;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAExD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOvD;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAOxD;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/engine/helpers.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAO/C;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG/C;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKxD;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAExD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOvD;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAOxD;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CA6BnC"}
|
package/dist/index.js
CHANGED
|
@@ -6,9 +6,9 @@ import { exit as J, argv as Y } from "node:process";
|
|
|
6
6
|
import { fileURLToPath as Z } from "node:url";
|
|
7
7
|
import P from "prompts";
|
|
8
8
|
import i from "node:fs";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
const q = "2.5.0-
|
|
9
|
+
import F from "ejs";
|
|
10
|
+
import I from "prettier";
|
|
11
|
+
const q = "2.5.0-pr319.10c3bf0", W = {
|
|
12
12
|
version: q
|
|
13
13
|
};
|
|
14
14
|
function v(e) {
|
|
@@ -46,7 +46,7 @@ function U(e) {
|
|
|
46
46
|
ModuleNameScreamingSnake: t ? O(t) : "",
|
|
47
47
|
ModuleNameSentenceCase: t ? x(t) : ""
|
|
48
48
|
};
|
|
49
|
-
return e.projectName && (o.AppName = v(e.projectName), o.AppNameSentenceCase = x(e.projectName)), e.packageName !== void 0 && (o.PackageName = e.packageName || "", o.BasePath = e.basePath || "", o.tenantRoutes = e.tenantRoutes || !1, o.aiAgent = e.aiAgent || !1, o.dashboard = e.dashboard || !1, o.
|
|
49
|
+
return e.projectName && (o.AppName = v(e.projectName), o.AppNameSentenceCase = x(e.projectName)), e.packageName !== void 0 && (o.PackageName = e.packageName || "", o.BasePath = e.basePath || "", o.tenantRoutes = e.tenantRoutes || !1, o.aiAgent = e.aiAgent || !1, o.dashboard = e.dashboard || !1, o.mocks = e.mocks || !1), o;
|
|
50
50
|
}
|
|
51
51
|
const H = /* @__PURE__ */ new Set([".png", ".jpg", ".jpeg", ".gif", ".bmp", ".ico", ".pdf", ".zip"]), X = {
|
|
52
52
|
_gitignore: ".gitignore",
|
|
@@ -71,7 +71,7 @@ function Q(e, t, n) {
|
|
|
71
71
|
if (H.has(a))
|
|
72
72
|
i.copyFileSync(e, t);
|
|
73
73
|
else {
|
|
74
|
-
const l = i.readFileSync(e, "utf-8"), s =
|
|
74
|
+
const l = i.readFileSync(e, "utf-8"), s = F.render(l, n, { filename: e });
|
|
75
75
|
i.writeFileSync(t, s);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -82,7 +82,7 @@ function j(e, t, n) {
|
|
|
82
82
|
const l = m.join(e, a), s = a.endsWith(".ejs") ? a.slice(0, -4) : a;
|
|
83
83
|
let c = X[s] ?? s;
|
|
84
84
|
try {
|
|
85
|
-
c =
|
|
85
|
+
c = F.render(c, n);
|
|
86
86
|
} catch {
|
|
87
87
|
}
|
|
88
88
|
const d = m.join(t, c);
|
|
@@ -116,9 +116,9 @@ async function z(e) {
|
|
|
116
116
|
let n = 0;
|
|
117
117
|
for (const o of t)
|
|
118
118
|
try {
|
|
119
|
-
const a = await
|
|
119
|
+
const a = await I.getFileInfo(o, { resolveConfig: !0 });
|
|
120
120
|
if (!a.inferredParser || a.ignored) continue;
|
|
121
|
-
const l = i.readFileSync(o, "utf-8"), s = await
|
|
121
|
+
const l = i.readFileSync(o, "utf-8"), s = await I.resolveConfig(o, { editorconfig: !0 }), c = await I.format(l, { ...s, filepath: o });
|
|
122
122
|
c !== l && (i.writeFileSync(o, c), n++);
|
|
123
123
|
} catch {
|
|
124
124
|
}
|
|
@@ -156,12 +156,12 @@ ${n && e.moduleName ? `
|
|
|
156
156
|
function ae(e) {
|
|
157
157
|
return e.trim().replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase().replace(/[^a-z0-9-]/g, "");
|
|
158
158
|
}
|
|
159
|
-
const
|
|
159
|
+
const D = [
|
|
160
160
|
{ title: "Standalone App — full application with bundled modules", value: "standalone" },
|
|
161
161
|
{ title: "Dynamic Module — remote module loaded by host via Module Federation", value: "dynamic-module" }
|
|
162
162
|
];
|
|
163
163
|
function re(e) {
|
|
164
|
-
return typeof e == "string" &&
|
|
164
|
+
return typeof e == "string" && D.some((t) => t.value === e);
|
|
165
165
|
}
|
|
166
166
|
async function se(e, t) {
|
|
167
167
|
const n = process.cwd();
|
|
@@ -172,7 +172,7 @@ async function se(e, t) {
|
|
|
172
172
|
a = a || l;
|
|
173
173
|
const y = m.resolve(n, a);
|
|
174
174
|
if (!re(e.type)) {
|
|
175
|
-
const S =
|
|
175
|
+
const S = D.map(($) => $.value).join(", ");
|
|
176
176
|
console.error(r.red(`Unknown project type: "${e.type}". Valid types: ${S}`)), process.exit(1);
|
|
177
177
|
}
|
|
178
178
|
i.existsSync(y) && !T(y) && !e.overwrite && (console.error(r.red(`Target directory "${a}" is not empty. Use --overwrite to overwrite.`)), process.exit(1));
|
|
@@ -186,7 +186,6 @@ async function se(e, t) {
|
|
|
186
186
|
tenantRoutes: e["tenant-routes"] || !1,
|
|
187
187
|
aiAgent: e["ai-agent"] || !1,
|
|
188
188
|
dashboard: e.dashboard || !1,
|
|
189
|
-
moduleFederation: e["module-federation"] || !1,
|
|
190
189
|
mocks: e.mocks || !1
|
|
191
190
|
};
|
|
192
191
|
} else {
|
|
@@ -212,8 +211,8 @@ async function se(e, t) {
|
|
|
212
211
|
message: () => (a === "." ? "Current directory" : `Target directory "${a}"`) + " is not empty. Remove existing files and continue?"
|
|
213
212
|
},
|
|
214
213
|
{
|
|
215
|
-
type: (w, { overwrite:
|
|
216
|
-
if (
|
|
214
|
+
type: (w, { overwrite: _ }) => {
|
|
215
|
+
if (_ === !1)
|
|
217
216
|
throw new Error(r.red("✖") + " Operation cancelled");
|
|
218
217
|
return null;
|
|
219
218
|
},
|
|
@@ -230,7 +229,7 @@ async function se(e, t) {
|
|
|
230
229
|
type: "select",
|
|
231
230
|
name: "projectType",
|
|
232
231
|
message: r.reset("Project type:"),
|
|
233
|
-
choices:
|
|
232
|
+
choices: D
|
|
234
233
|
}
|
|
235
234
|
],
|
|
236
235
|
{ onCancel: y }
|
|
@@ -244,7 +243,7 @@ async function se(e, t) {
|
|
|
244
243
|
},
|
|
245
244
|
{
|
|
246
245
|
name: "moduleName",
|
|
247
|
-
type: (w,
|
|
246
|
+
type: (w, _) => g === "standalone" && !_.includeModule ? null : "text",
|
|
248
247
|
message: r.reset("Module name:"),
|
|
249
248
|
initial: b,
|
|
250
249
|
format: (w) => String(w).trim()
|
|
@@ -274,12 +273,6 @@ async function se(e, t) {
|
|
|
274
273
|
message: "Include Dashboard with widgets?",
|
|
275
274
|
initial: !0
|
|
276
275
|
},
|
|
277
|
-
{
|
|
278
|
-
type: g === "dynamic-module" ? null : "confirm",
|
|
279
|
-
name: "moduleFederation",
|
|
280
|
-
message: "Include Module Federation host (load remote modules)?",
|
|
281
|
-
initial: !1
|
|
282
|
-
},
|
|
283
276
|
{
|
|
284
277
|
name: "mocks",
|
|
285
278
|
type: "confirm",
|
|
@@ -298,23 +291,22 @@ async function se(e, t) {
|
|
|
298
291
|
tenantRoutes: $.tenantRoutes || !1,
|
|
299
292
|
aiAgent: $.aiAgent || !1,
|
|
300
293
|
dashboard: $.dashboard ?? !0,
|
|
301
|
-
moduleFederation: $.moduleFederation || !1,
|
|
302
294
|
mocks: $.mocks || !1
|
|
303
295
|
};
|
|
304
296
|
} catch (f) {
|
|
305
297
|
console.log(f.message), process.exit(1);
|
|
306
298
|
}
|
|
307
299
|
}
|
|
308
|
-
const
|
|
309
|
-
i.existsSync(
|
|
310
|
-
Scaffolding ${r.cyan(d.projectType)} in ${r.green(
|
|
300
|
+
const p = m.resolve(n, a);
|
|
301
|
+
i.existsSync(p) && !T(p) ? ee(p) : i.existsSync(p) || i.mkdirSync(p, { recursive: !0 }), console.log(`
|
|
302
|
+
Scaffolding ${r.cyan(d.projectType)} in ${r.green(p)}...
|
|
311
303
|
`);
|
|
312
|
-
const
|
|
313
|
-
if (j(m.join(t, d.projectType),
|
|
314
|
-
const y = v(d.moduleName), f = d.projectType === "dynamic-module" ? m.join(
|
|
315
|
-
j(m.join(t, "module"), f,
|
|
304
|
+
const u = U(d);
|
|
305
|
+
if (j(m.join(t, d.projectType), p, u), d.moduleName) {
|
|
306
|
+
const y = v(d.moduleName), f = d.projectType === "dynamic-module" ? m.join(p, "src/modules") : m.join(p, "src/modules", y);
|
|
307
|
+
j(m.join(t, "module"), f, u);
|
|
316
308
|
}
|
|
317
|
-
d.mocks && j(m.join(t, "sample-module"), m.join(
|
|
309
|
+
d.mocks && j(m.join(t, "sample-module"), m.join(p, "src/modules/sample"), u), await z([p]), oe(d);
|
|
318
310
|
}
|
|
319
311
|
function k(e, { strings: t = !0 } = {}) {
|
|
320
312
|
const n = e.split("");
|
|
@@ -429,29 +421,29 @@ ${e}` : C(e, [{ at: a, text: `
|
|
|
429
421
|
${o}` }]);
|
|
430
422
|
}
|
|
431
423
|
function de(e, t) {
|
|
432
|
-
const n = v(t), o = O(t), a = me(i.readFileSync(e, "utf-8")), l = k(a), s = (
|
|
433
|
-
`${
|
|
434
|
-
`${
|
|
435
|
-
`${
|
|
436
|
-
`${
|
|
437
|
-
`${
|
|
438
|
-
`${
|
|
424
|
+
const n = v(t), o = O(t), a = me(i.readFileSync(e, "utf-8")), l = k(a), s = (u) => [
|
|
425
|
+
`${u}addMenuItem({`,
|
|
426
|
+
`${u} title: "${o}.MENU.TITLE",`,
|
|
427
|
+
`${u} icon: "lucide-box",`,
|
|
428
|
+
`${u} priority: 10,`,
|
|
429
|
+
`${u} url: "/${n}",`,
|
|
430
|
+
`${u}});`
|
|
439
431
|
].join(`
|
|
440
432
|
`), c = ce(l, "addMenuItem"), d = c[c.length - 1];
|
|
441
433
|
if (d) {
|
|
442
|
-
const
|
|
434
|
+
const u = V(a, d.start);
|
|
443
435
|
i.writeFileSync(e, C(a, [{ at: d.end, text: `
|
|
444
436
|
|
|
445
|
-
${s(
|
|
437
|
+
${s(u)}` }]));
|
|
446
438
|
return;
|
|
447
439
|
}
|
|
448
|
-
const
|
|
449
|
-
if (
|
|
440
|
+
const p = l.lastIndexOf("}");
|
|
441
|
+
if (p === -1)
|
|
450
442
|
throw new Error("Could not find the bootstrap function body in bootstrap.ts");
|
|
451
|
-
i.writeFileSync(e, C(a, [{ at:
|
|
443
|
+
i.writeFileSync(e, C(a, [{ at: p, text: `${s(" ")}
|
|
452
444
|
` }]));
|
|
453
445
|
}
|
|
454
|
-
async function
|
|
446
|
+
async function pe(e, t) {
|
|
455
447
|
const n = process.cwd(), o = e._?.[1], a = m.join(n, "package.json");
|
|
456
448
|
i.existsSync(a) || (console.error(r.red("Error: No package.json found. Run this command from a vc-shell project root.")), process.exit(1));
|
|
457
449
|
const l = JSON.parse(i.readFileSync(a, "utf-8"));
|
|
@@ -463,16 +455,16 @@ async function ue(e, t) {
|
|
|
463
455
|
message: "Module name:",
|
|
464
456
|
validate: (S) => S.trim().length > 0 || "Module name is required"
|
|
465
457
|
})).moduleName), c || (console.error(r.red("Module name is required.")), process.exit(1));
|
|
466
|
-
const d = v(c),
|
|
467
|
-
i.existsSync(
|
|
458
|
+
const d = v(c), p = M(c), u = m.join(n, "src/modules"), y = m.join(u, d);
|
|
459
|
+
i.existsSync(u) || i.mkdirSync(u, { recursive: !0 }), i.existsSync(y) && (console.error(r.red(`Error: Module "${d}" already exists at ${m.relative(n, y)}`)), process.exit(1));
|
|
468
460
|
const f = U({ moduleName: c, projectName: m.basename(n) });
|
|
469
461
|
j(m.join(t, "module"), y, f), console.log(r.green(` ✔ Created ${m.relative(n, y)}/`));
|
|
470
462
|
const h = m.join(n, "src/main.ts");
|
|
471
463
|
if (i.existsSync(h))
|
|
472
464
|
try {
|
|
473
|
-
le(h, c), console.log(r.green(` ✔ Updated src/main.ts — added import & app.use(${
|
|
465
|
+
le(h, c), console.log(r.green(` ✔ Updated src/main.ts — added import & app.use(${p})`));
|
|
474
466
|
} catch {
|
|
475
|
-
console.warn(r.yellow(" ⚠ Could not auto-update src/main.ts. Add manually:")), console.warn(r.yellow(` import ${
|
|
467
|
+
console.warn(r.yellow(" ⚠ Could not auto-update src/main.ts. Add manually:")), console.warn(r.yellow(` import ${p} from "./modules/${d}";`)), console.warn(r.yellow(` app.use(${p}, { router });`));
|
|
476
468
|
}
|
|
477
469
|
const g = m.join(n, "src/bootstrap.ts");
|
|
478
470
|
if (i.existsSync(g))
|
|
@@ -485,8 +477,8 @@ async function ue(e, t) {
|
|
|
485
477
|
Module "${d}" is ready! Run ${r.bold(r.green("yarn serve"))} to see it.
|
|
486
478
|
`);
|
|
487
479
|
}
|
|
488
|
-
const
|
|
489
|
-
function
|
|
480
|
+
const R = m.resolve(Z(import.meta.url), "..", "templates");
|
|
481
|
+
function ue() {
|
|
490
482
|
console.log(`
|
|
491
483
|
${r.bold(r.green("create-vc-app"))} — Create VC Shell applications and modules
|
|
492
484
|
|
|
@@ -503,7 +495,6 @@ ${r.bold("Options (create):")}
|
|
|
503
495
|
--tenant-routes Include tenant routing (/:tenantId prefix)
|
|
504
496
|
--ai-agent Include AI Agent configuration
|
|
505
497
|
--dashboard Include Dashboard with widgets
|
|
506
|
-
--module-federation Include Module Federation host runtime
|
|
507
498
|
--mocks Include sample module with mock data
|
|
508
499
|
--overwrite Overwrite existing files
|
|
509
500
|
--help, -h Show this help
|
|
@@ -521,18 +512,18 @@ ${r.bold("Docs:")} https://docs.virtocommerce.org/platform/developer-guide/lates
|
|
|
521
512
|
async function fe() {
|
|
522
513
|
const e = K(Y.slice(2), {
|
|
523
514
|
alias: { h: "help", v: "version" },
|
|
524
|
-
boolean: ["help", "version", "mocks", "overwrite", "tenant-routes", "ai-agent", "dashboard"
|
|
515
|
+
boolean: ["help", "version", "mocks", "overwrite", "tenant-routes", "ai-agent", "dashboard"],
|
|
525
516
|
string: ["type", "name", "app-name", "package-name", "module-name", "base-path"]
|
|
526
517
|
});
|
|
527
518
|
if (e.help) {
|
|
528
|
-
|
|
519
|
+
ue();
|
|
529
520
|
return;
|
|
530
521
|
}
|
|
531
522
|
if (e.version) {
|
|
532
523
|
console.log(`create-vc-app v${W.version}`);
|
|
533
524
|
return;
|
|
534
525
|
}
|
|
535
|
-
e._[0] === "add-module" ? await
|
|
526
|
+
e._[0] === "add-module" ? await pe(e, R) : await se(e, R);
|
|
536
527
|
}
|
|
537
528
|
fe().catch((e) => {
|
|
538
529
|
console.error(r.red(e.message || String(e))), J(1);
|
|
@@ -53,9 +53,6 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@vc-shell/config-generator": "^2.5.0",
|
|
55
55
|
"@vc-shell/framework": "^2.5.0",
|
|
56
|
-
<%_ if (moduleFederation) { _%>
|
|
57
|
-
"@vc-shell/mf-host": "^2.5.0",
|
|
58
|
-
<%_ } _%>
|
|
59
56
|
"@vueuse/core": "^10.7.1",
|
|
60
57
|
"@vueuse/integrations": "^10.7.1",
|
|
61
58
|
"vee-validate": "^4.12.4",
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import VirtoShellFramework, { notification, useUser, useLanguages } from "@vc-shell/framework";
|
|
2
|
-
<% if (moduleFederation) { -%>
|
|
3
|
-
import { registerRemoteModules } from "@vc-shell/mf-host";
|
|
4
|
-
<% } -%>
|
|
5
2
|
import { createApp } from "vue";
|
|
6
3
|
import { router } from "./router";
|
|
7
4
|
import * as locales from "./locales";
|
|
@@ -66,13 +63,6 @@ async function startApp() {
|
|
|
66
63
|
});
|
|
67
64
|
};
|
|
68
65
|
|
|
69
|
-
<% if (moduleFederation) { -%>
|
|
70
|
-
// Register remote modules BEFORE mount so the provide/inject keys
|
|
71
|
-
// (ModulesReadyKey, ModulesLoadErrorKey) are available to mounted components.
|
|
72
|
-
// Fire-and-forget — sets modulesReady/modulesLoadError when complete.
|
|
73
|
-
registerRemoteModules(app, { router, appName: "<%- AppName %>" });
|
|
74
|
-
|
|
75
|
-
<% } -%>
|
|
76
66
|
await router.isReady();
|
|
77
67
|
|
|
78
68
|
app.mount("#app");
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { getApplicationConfiguration } from "@vc-shell/config-generator";
|
|
2
|
-
<%_ if (moduleFederation) { _%>
|
|
3
|
-
import { mfHostConfig } from "@vc-shell/mf-host/vite";
|
|
4
|
-
<%_ } _%>
|
|
5
2
|
|
|
6
3
|
export default getApplicationConfiguration({
|
|
7
|
-
<%_ if (moduleFederation) { _%>
|
|
8
|
-
...mfHostConfig(),
|
|
9
|
-
<%_ } _%>
|
|
10
4
|
// Add you extra Vite configuration here
|
|
11
5
|
});
|
package/dist/types.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export interface ProjectOptions {
|
|
|
8
8
|
tenantRoutes: boolean;
|
|
9
9
|
aiAgent: boolean;
|
|
10
10
|
dashboard: boolean;
|
|
11
|
-
moduleFederation: boolean;
|
|
12
11
|
mocks: boolean;
|
|
13
12
|
}
|
|
14
13
|
export interface ModuleOptions {
|
|
@@ -36,6 +35,5 @@ export interface CLIArgs {
|
|
|
36
35
|
"tenant-routes"?: boolean;
|
|
37
36
|
"ai-agent"?: boolean;
|
|
38
37
|
dashboard?: boolean;
|
|
39
|
-
"module-federation"?: boolean;
|
|
40
38
|
}
|
|
41
39
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,gBAAgB,CAAC;AAE1D,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,gBAAgB,CAAC;AAE1D,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,cAAc,CAAC;IACxB,cAAc,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACnG,SAAS,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CAC7F;AAED,MAAM,WAAW,OAAO;IACtB,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB"}
|
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.5.0-
|
|
4
|
+
"version": "2.5.0-pr319.10c3bf0",
|
|
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.5.0-
|
|
19
|
+
"@vc-shell/ts-config": "2.5.0-pr319.10c3bf0",
|
|
20
20
|
"copyfiles": "^2.4.1",
|
|
21
21
|
"cross-env": "^7.0.3",
|
|
22
22
|
"shx": "^0.3.4",
|