@vc-shell/create-vc-app 2.1.0-pr252.fb65d9e → 2.1.0-pr253.0b14b2c
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 +11 -11
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { fileURLToPath as F } from "node:url";
|
|
|
7
7
|
import A from "prompts";
|
|
8
8
|
import r from "node:fs";
|
|
9
9
|
import E from "ejs";
|
|
10
|
-
const O = "2.1.0-
|
|
10
|
+
const O = "2.1.0-pr253.0b14b2c", V = {
|
|
11
11
|
version: O
|
|
12
12
|
};
|
|
13
13
|
function h(e) {
|
|
@@ -149,16 +149,16 @@ async function Q(e, a) {
|
|
|
149
149
|
o = o || d;
|
|
150
150
|
const f = c.resolve(t, o);
|
|
151
151
|
if (!G(e.type)) {
|
|
152
|
-
const
|
|
153
|
-
console.error(n.red(`Unknown project type: "${e.type}". Valid types: ${
|
|
152
|
+
const N = P.map(($) => $.value).join(", ");
|
|
153
|
+
console.error(n.red(`Unknown project type: "${e.type}". Valid types: ${N}`)), process.exit(1);
|
|
154
154
|
}
|
|
155
155
|
r.existsSync(f) && !I(f) && !e.overwrite && (console.error(n.red(`Target directory "${o}" is not empty. Use --overwrite to overwrite.`)), process.exit(1));
|
|
156
|
-
const u = p(), y = e.type, g = e["module-name"],
|
|
156
|
+
const u = p(), y = e.type, g = e["module-name"], b = y === "dynamic-module" ? g || S(u) : g || void 0;
|
|
157
157
|
l = {
|
|
158
158
|
projectName: h(u),
|
|
159
159
|
packageName: e["package-name"] || (k(u) ? u : C(u)),
|
|
160
160
|
projectType: y,
|
|
161
|
-
moduleName:
|
|
161
|
+
moduleName: b,
|
|
162
162
|
basePath: e["base-path"] || _(`/apps/${h(u)}/`),
|
|
163
163
|
tenantRoutes: e["tenant-routes"] || !1,
|
|
164
164
|
aiAgent: e["ai-agent"] || !1,
|
|
@@ -210,7 +210,7 @@ async function Q(e, a) {
|
|
|
210
210
|
}
|
|
211
211
|
],
|
|
212
212
|
{ onCancel: f }
|
|
213
|
-
), y = o ? h(o) : u.projectName, g = u.projectType || "standalone",
|
|
213
|
+
), y = o ? h(o) : u.projectName, g = u.projectType || "standalone", b = S(y), N = "/apps/" + h(y) + "/", $ = await A(
|
|
214
214
|
[
|
|
215
215
|
{
|
|
216
216
|
name: "includeModule",
|
|
@@ -222,14 +222,14 @@ async function Q(e, a) {
|
|
|
222
222
|
name: "moduleName",
|
|
223
223
|
type: (w, M) => g === "standalone" && !M.includeModule ? null : "text",
|
|
224
224
|
message: n.reset("Module name:"),
|
|
225
|
-
initial:
|
|
225
|
+
initial: b,
|
|
226
226
|
format: (w) => String(w).trim()
|
|
227
227
|
},
|
|
228
228
|
{
|
|
229
229
|
name: "basePath",
|
|
230
230
|
type: g === "dynamic-module" ? null : "text",
|
|
231
231
|
message: n.reset("Base path:"),
|
|
232
|
-
initial:
|
|
232
|
+
initial: N,
|
|
233
233
|
format: (w) => _(String(w).trim())
|
|
234
234
|
},
|
|
235
235
|
{
|
|
@@ -263,8 +263,8 @@ async function Q(e, a) {
|
|
|
263
263
|
projectName: y,
|
|
264
264
|
packageName: u.packageName || (k(y) ? y : C(y)),
|
|
265
265
|
projectType: g,
|
|
266
|
-
moduleName: $.moduleName || ($.includeModule !== !1 ?
|
|
267
|
-
basePath: $.basePath || _(
|
|
266
|
+
moduleName: $.moduleName || ($.includeModule !== !1 ? b : void 0),
|
|
267
|
+
basePath: $.basePath || _(N),
|
|
268
268
|
tenantRoutes: $.tenantRoutes || !1,
|
|
269
269
|
aiAgent: $.aiAgent || !1,
|
|
270
270
|
dashboard: $.dashboard ?? !0,
|
|
@@ -356,7 +356,7 @@ async function ae(e, a) {
|
|
|
356
356
|
type: "text",
|
|
357
357
|
name: "moduleName",
|
|
358
358
|
message: "Module name:",
|
|
359
|
-
validate: (
|
|
359
|
+
validate: (N) => N.trim().length > 0 || "Module name is required"
|
|
360
360
|
})).moduleName), m || (console.error(n.red("Module name is required.")), process.exit(1));
|
|
361
361
|
const l = h(m), i = x(m), v = c.join(t, "src/modules"), f = c.join(v, l);
|
|
362
362
|
r.existsSync(v) || r.mkdirSync(v, { recursive: !0 }), r.existsSync(f) && (console.error(n.red(`Error: Module "${l}" already exists at ${c.relative(t, f)}`)), process.exit(1));
|
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.1.0-
|
|
4
|
+
"version": "2.1.0-pr253.0b14b2c",
|
|
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.1.0-
|
|
19
|
+
"@vc-shell/ts-config": "2.1.0-pr253.0b14b2c",
|
|
20
20
|
"copyfiles": "^2.4.1",
|
|
21
21
|
"cross-env": "^7.0.3",
|
|
22
22
|
"shx": "^0.3.4",
|