@voltro/cli 0.11.3 → 0.12.0
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 +436 -0
- package/THIRD-PARTY-NOTICES.md +4 -4
- package/dist/{apiBuild-zFDv0u8y.js → apiBuild-GefjNI5d.js} +10 -9
- package/dist/apiBuild-s7swuEU5.js +2 -0
- package/dist/appModuleLoader-C9r9mxZt.js +19 -0
- package/dist/bin.js +24 -6
- package/dist/cliArgs-qdZSElM3.js +28 -0
- package/dist/{commands-BDGYrBhK.js → commands-BmNi1RgZ.js} +2580 -2493
- package/dist/dbCommand-Bt6BCG7g.js +2 -0
- package/dist/dbCommand-DNrkb58g.js +862 -0
- package/dist/dev-YHbHmeXt.js +3 -0
- package/dist/{dev-CGt0PP1f.js → dev-d0LjACxE.js} +1591 -2332
- package/dist/{devActivity-1WtIVyHc.js → devActivity-BhIu6ncs.js} +7 -1
- package/dist/devActivity.js +1 -1
- package/dist/index.d.ts +22 -0
- package/dist/index.js +3 -3
- package/dist/inspect-DcZ04OME.js +2 -0
- package/dist/inspect-Dwx0_tUj.js +921 -0
- package/dist/inspectMetrics-uEfIS1vp.js +3399 -0
- package/dist/manifestBuild-D1MzJAiQ.js +2 -0
- package/dist/manifestBuild-P9yuCY2d.js +39 -0
- package/dist/seedRunner-DZmhoqNt.js +821 -0
- package/dist/serveCommand-B2-YV9TU.js +1112 -0
- package/dist/serveEntry.js +4 -4
- package/dist/{start-Crl39M38.js → start-DKcQd52a.js} +348 -337
- package/dist/startEntry.js +2 -2
- package/dist/startup.js +1 -1
- package/dist/{startupRunner-DhlX9nqd.js → startupRunner-DPGFchOa.js} +19 -33
- package/package.json +17 -17
- package/templates/AGENTS.md +1 -0
- package/templates/agent-docs/_index.md +1 -0
- package/templates/agent-docs/_manifest.json +1 -1
- package/templates/agent-docs/cli.md +266 -16
- package/templates/agent-docs/data.md +143 -1
- package/templates/agent-docs/database/misc.md +32 -0
- package/templates/agent-docs/database/querying.md +14 -1
- package/templates/agent-docs/internationalization.md +3 -8
- package/templates/agent-docs/reference.md +35 -0
- package/templates/agent-docs/scheduling.md +35 -1
- package/templates/agent-docs/security.md +48 -0
- package/templates/agent-docs/templates/apibackends.md +90 -17
- package/templates/agent-docs/whats-new.md +177 -0
- package/templates/agent-docs/workflows.md +31 -0
- package/templates/apps/api-ai/package.json +7 -7
- package/templates/apps/api-auth/package.json +8 -8
- package/templates/apps/api-backend/package.json +7 -7
- package/templates/apps/api-backend-deactivation/package.json +7 -7
- package/templates/apps/api-backend-mail/package.json +8 -8
- package/templates/apps/api-backend-mariadb/package.json +9 -9
- package/templates/apps/api-backend-storage/package.json +8 -8
- package/templates/apps/api-data-advanced/package.json +8 -8
- package/templates/apps/api-durable/package.json +8 -8
- package/templates/apps/api-feature-flags/package.json +9 -9
- package/templates/apps/api-governance/package.json +8 -8
- package/templates/apps/api-kv/package.json +8 -8
- package/templates/apps/api-moderation/package.json +8 -8
- package/templates/apps/api-observability/package.json +8 -8
- package/templates/apps/api-ratelimit/package.json +8 -8
- package/templates/apps/api-rbac/package.json +8 -8
- package/templates/apps/api-rest/package.json +7 -7
- package/templates/apps/api-saas/package.json +11 -11
- package/templates/apps/api-search/package.json +8 -8
- package/templates/apps/api-versioning/package.json +8 -8
- package/templates/apps/api-webhooks/README.md +3 -1
- package/templates/apps/api-webhooks/package.json +8 -8
- package/templates/apps/changelog/package.json +6 -6
- package/templates/apps/edge-functions/package.json +2 -2
- package/templates/apps/frontend-admin/package.json +8 -8
- package/templates/apps/frontend-app/package.json +8 -8
- package/templates/apps/frontend-blank/package.json +7 -7
- package/templates/apps/frontend-contact/package.json +7 -7
- package/templates/apps/frontend-dashboard/package.json +7 -7
- package/templates/apps/frontend-docs/package.json +7 -7
- package/templates/apps/frontend-i18n/package.json +6 -6
- package/templates/apps/frontend-landing/package.json +7 -7
- package/templates/apps/frontend-spa/package.json +7 -7
- package/templates/apps/frontend-ssr/package.json +7 -7
- package/templates/apps/frontend-ssr-api/package.json +8 -8
- package/templates/apps/frontend-static-blog/package.json +6 -6
- package/dist/apiBuild-BmPdmhgi.js +0 -2
- package/dist/dev-D_PGP9Kx.js +0 -2
- package/dist/inspectMetrics-SRtv8KDy.js +0 -4247
- package/dist/serveCommand-p6e5Ahgx.js +0 -1070
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ct as e } from "./inspectMetrics-uEfIS1vp.js";
|
|
2
|
+
import { U as t } from "./seedRunner-DZmhoqNt.js";
|
|
3
|
+
import { d as n } from "./dev-d0LjACxE.js";
|
|
3
4
|
import { isAbsolute as r, join as i, relative as a, resolve as o } from "node:path";
|
|
4
5
|
import { createLogger as s } from "@voltro/logger";
|
|
5
6
|
import { existsSync as c, promises as l } from "node:fs";
|
|
6
7
|
import { createRequire as u } from "node:module";
|
|
7
8
|
//#region src/apiBuild.ts
|
|
8
9
|
var d = s({ scope: "voltro:build" }), f = async (e) => {
|
|
9
|
-
let
|
|
10
|
-
if (!c(
|
|
10
|
+
let n = i(e, "package.json");
|
|
11
|
+
if (!c(n)) return [];
|
|
11
12
|
let r = {};
|
|
12
13
|
try {
|
|
13
|
-
let e = JSON.parse(await l.readFile(
|
|
14
|
+
let e = JSON.parse(await l.readFile(n, "utf8"));
|
|
14
15
|
r = {
|
|
15
16
|
...e.dependencies,
|
|
16
17
|
...e.devDependencies,
|
|
@@ -19,8 +20,8 @@ var d = s({ scope: "voltro:build" }), f = async (e) => {
|
|
|
19
20
|
} catch {
|
|
20
21
|
return [];
|
|
21
22
|
}
|
|
22
|
-
let a = u(
|
|
23
|
-
return
|
|
23
|
+
let a = u(n);
|
|
24
|
+
return t.filter((e) => {
|
|
24
25
|
if (r[e] === void 0) return !1;
|
|
25
26
|
try {
|
|
26
27
|
return a.resolve(e), !0;
|
|
@@ -28,7 +29,7 @@ var d = s({ scope: "voltro:build" }), f = async (e) => {
|
|
|
28
29
|
return !1;
|
|
29
30
|
}
|
|
30
31
|
});
|
|
31
|
-
}, p = /(?:\.(?:query|mutation|action|stream)(?:\.server)?\.ts|\.workflow(?:\.server)?\.tsx|\.(?:subscribe|reaction|aggregate|agent|tool|webhook|cron|trigger)(?:\.server)?\.tsx?|\.(?:startup|seed)\.tsx?|\.(?:entity|schema|relations)\.ts|(?:^|\/)schema\.ts)$/, m = (e) => /\.(ts|tsx)$/.test(e) && !/\.(test|spec)\.[tj]sx?$/.test(e), h = async (e) => (await
|
|
32
|
+
}, p = /(?:\.(?:query|mutation|action|stream)(?:\.server)?\.ts|\.workflow(?:\.server)?\.tsx|\.(?:subscribe|reaction|aggregate|agent|tool|webhook|cron|trigger|outbox|connection|email)(?:\.server)?\.tsx?|\.(?:startup|seed)\.tsx?|\.(?:entity|schema|relations|migration)\.ts|(?:^|\/)schema\.ts)$/, m = (e) => /\.(ts|tsx)$/.test(e) && !/\.(test|spec)\.[tj]sx?$/.test(e), h = async (e) => (await n(e)).filter((t) => p.test(t) && m(t) && !t.includes(`${e}/.framework/`)), g = {
|
|
32
33
|
name: "externalize-bare",
|
|
33
34
|
setup(e) {
|
|
34
35
|
e.onResolve({ filter: /.*/ }, (e) => {
|
|
@@ -192,4 +193,4 @@ const drivers = ${JSON.stringify(t)}\nlet mod\nfor (const d of drivers) {\n try
|
|
|
192
193
|
}), i(s, "serveEntry.js");
|
|
193
194
|
};
|
|
194
195
|
//#endregion
|
|
195
|
-
export {
|
|
196
|
+
export { C as a, w as c, h as i, y as n, _ as o, v as r, T as s, p as t };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { pathToFileURL as e } from "node:url";
|
|
2
|
+
//#region src/appModuleLoader.ts
|
|
3
|
+
var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = (e) => {
|
|
4
|
+
for (let [n, r] of Object.entries(e)) t.set(n, r);
|
|
5
|
+
}, i = () => t.size > 0, a = async (r) => {
|
|
6
|
+
let i = n.get(r);
|
|
7
|
+
if (i) return i;
|
|
8
|
+
let a = t.get(r);
|
|
9
|
+
if (a !== void 0) {
|
|
10
|
+
if (typeof a == "function") {
|
|
11
|
+
let e = await a();
|
|
12
|
+
return n.set(r, e), e;
|
|
13
|
+
}
|
|
14
|
+
return a;
|
|
15
|
+
}
|
|
16
|
+
return await import(e(r).href);
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { a as n, r, i as t };
|
package/dist/bin.js
CHANGED
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { X as e } from "./inspectMetrics-uEfIS1vp.js";
|
|
3
|
+
import { r as t } from "./commands-BmNi1RgZ.js";
|
|
4
|
+
import { c as n } from "./dbCommand-DNrkb58g.js";
|
|
5
|
+
import { createLogger as r } from "@voltro/logger";
|
|
5
6
|
//#region src/bin.ts
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
var i = r({ scope: "voltro:cli" }), a = (e) => {
|
|
8
|
+
process.exitCode = e;
|
|
9
|
+
let t = 2, n = () => {
|
|
10
|
+
--t === 0 && process.exit(e);
|
|
11
|
+
};
|
|
12
|
+
setTimeout(() => process.exit(e), 1e3).unref?.();
|
|
13
|
+
for (let e of [process.stdout, process.stderr]) {
|
|
14
|
+
if (e.writableLength === 0) {
|
|
15
|
+
n();
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
e.write("", () => n());
|
|
19
|
+
}
|
|
20
|
+
}, o = process.argv.slice(2);
|
|
21
|
+
e(o), t(o).then((e) => a(e)).catch((e) => {
|
|
22
|
+
if (n(e)) {
|
|
23
|
+
console.error(e.message), a(e.code);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
i.fatal("unhandled cli error", {}, e), a(1);
|
|
9
27
|
});
|
|
10
28
|
//#endregion
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//#region src/cliArgs.ts
|
|
2
|
+
var e = (e, t) => {
|
|
3
|
+
for (let n = 0; n < e.length; n++) {
|
|
4
|
+
let r = e[n];
|
|
5
|
+
if (r === t) return e[n + 1];
|
|
6
|
+
if (r.startsWith(t + "=")) return r.slice(t.length + 1);
|
|
7
|
+
}
|
|
8
|
+
}, t = (e, t) => {
|
|
9
|
+
let n = [], r, i = !1;
|
|
10
|
+
for (let a = 0; a < e.length; a++) {
|
|
11
|
+
let o = e[a];
|
|
12
|
+
if (!i && o === t) {
|
|
13
|
+
r = e[++a], i = !0;
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
if (!i && o.startsWith(t + "=")) {
|
|
17
|
+
r = o.slice(t.length + 1), i = !0;
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
n.push(o);
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
value: r,
|
|
24
|
+
rest: n
|
|
25
|
+
};
|
|
26
|
+
}, n = (e, ...t) => e.some((e) => t.includes(e) || t.some((t) => e.startsWith(`${t}=`))), r = (e) => e.filter((e) => !e.startsWith("-")), i = (e) => e.find((e) => !e.startsWith("-"));
|
|
27
|
+
//#endregion
|
|
28
|
+
export { t as a, r as i, e as n, n as r, i as t };
|