@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.
Files changed (83) hide show
  1. package/CHANGELOG.md +436 -0
  2. package/THIRD-PARTY-NOTICES.md +4 -4
  3. package/dist/{apiBuild-zFDv0u8y.js → apiBuild-GefjNI5d.js} +10 -9
  4. package/dist/apiBuild-s7swuEU5.js +2 -0
  5. package/dist/appModuleLoader-C9r9mxZt.js +19 -0
  6. package/dist/bin.js +24 -6
  7. package/dist/cliArgs-qdZSElM3.js +28 -0
  8. package/dist/{commands-BDGYrBhK.js → commands-BmNi1RgZ.js} +2580 -2493
  9. package/dist/dbCommand-Bt6BCG7g.js +2 -0
  10. package/dist/dbCommand-DNrkb58g.js +862 -0
  11. package/dist/dev-YHbHmeXt.js +3 -0
  12. package/dist/{dev-CGt0PP1f.js → dev-d0LjACxE.js} +1591 -2332
  13. package/dist/{devActivity-1WtIVyHc.js → devActivity-BhIu6ncs.js} +7 -1
  14. package/dist/devActivity.js +1 -1
  15. package/dist/index.d.ts +22 -0
  16. package/dist/index.js +3 -3
  17. package/dist/inspect-DcZ04OME.js +2 -0
  18. package/dist/inspect-Dwx0_tUj.js +921 -0
  19. package/dist/inspectMetrics-uEfIS1vp.js +3399 -0
  20. package/dist/manifestBuild-D1MzJAiQ.js +2 -0
  21. package/dist/manifestBuild-P9yuCY2d.js +39 -0
  22. package/dist/seedRunner-DZmhoqNt.js +821 -0
  23. package/dist/serveCommand-B2-YV9TU.js +1112 -0
  24. package/dist/serveEntry.js +4 -4
  25. package/dist/{start-Crl39M38.js → start-DKcQd52a.js} +348 -337
  26. package/dist/startEntry.js +2 -2
  27. package/dist/startup.js +1 -1
  28. package/dist/{startupRunner-DhlX9nqd.js → startupRunner-DPGFchOa.js} +19 -33
  29. package/package.json +17 -17
  30. package/templates/AGENTS.md +1 -0
  31. package/templates/agent-docs/_index.md +1 -0
  32. package/templates/agent-docs/_manifest.json +1 -1
  33. package/templates/agent-docs/cli.md +266 -16
  34. package/templates/agent-docs/data.md +143 -1
  35. package/templates/agent-docs/database/misc.md +32 -0
  36. package/templates/agent-docs/database/querying.md +14 -1
  37. package/templates/agent-docs/internationalization.md +3 -8
  38. package/templates/agent-docs/reference.md +35 -0
  39. package/templates/agent-docs/scheduling.md +35 -1
  40. package/templates/agent-docs/security.md +48 -0
  41. package/templates/agent-docs/templates/apibackends.md +90 -17
  42. package/templates/agent-docs/whats-new.md +177 -0
  43. package/templates/agent-docs/workflows.md +31 -0
  44. package/templates/apps/api-ai/package.json +7 -7
  45. package/templates/apps/api-auth/package.json +8 -8
  46. package/templates/apps/api-backend/package.json +7 -7
  47. package/templates/apps/api-backend-deactivation/package.json +7 -7
  48. package/templates/apps/api-backend-mail/package.json +8 -8
  49. package/templates/apps/api-backend-mariadb/package.json +9 -9
  50. package/templates/apps/api-backend-storage/package.json +8 -8
  51. package/templates/apps/api-data-advanced/package.json +8 -8
  52. package/templates/apps/api-durable/package.json +8 -8
  53. package/templates/apps/api-feature-flags/package.json +9 -9
  54. package/templates/apps/api-governance/package.json +8 -8
  55. package/templates/apps/api-kv/package.json +8 -8
  56. package/templates/apps/api-moderation/package.json +8 -8
  57. package/templates/apps/api-observability/package.json +8 -8
  58. package/templates/apps/api-ratelimit/package.json +8 -8
  59. package/templates/apps/api-rbac/package.json +8 -8
  60. package/templates/apps/api-rest/package.json +7 -7
  61. package/templates/apps/api-saas/package.json +11 -11
  62. package/templates/apps/api-search/package.json +8 -8
  63. package/templates/apps/api-versioning/package.json +8 -8
  64. package/templates/apps/api-webhooks/README.md +3 -1
  65. package/templates/apps/api-webhooks/package.json +8 -8
  66. package/templates/apps/changelog/package.json +6 -6
  67. package/templates/apps/edge-functions/package.json +2 -2
  68. package/templates/apps/frontend-admin/package.json +8 -8
  69. package/templates/apps/frontend-app/package.json +8 -8
  70. package/templates/apps/frontend-blank/package.json +7 -7
  71. package/templates/apps/frontend-contact/package.json +7 -7
  72. package/templates/apps/frontend-dashboard/package.json +7 -7
  73. package/templates/apps/frontend-docs/package.json +7 -7
  74. package/templates/apps/frontend-i18n/package.json +6 -6
  75. package/templates/apps/frontend-landing/package.json +7 -7
  76. package/templates/apps/frontend-spa/package.json +7 -7
  77. package/templates/apps/frontend-ssr/package.json +7 -7
  78. package/templates/apps/frontend-ssr-api/package.json +8 -8
  79. package/templates/apps/frontend-static-blog/package.json +6 -6
  80. package/dist/apiBuild-BmPdmhgi.js +0 -2
  81. package/dist/dev-D_PGP9Kx.js +0 -2
  82. package/dist/inspectMetrics-SRtv8KDy.js +0 -4247
  83. package/dist/serveCommand-p6e5Ahgx.js +0 -1070
@@ -1,16 +1,17 @@
1
- import { Mt as e } from "./inspectMetrics-SRtv8KDy.js";
2
- import { d as t, lt as n } from "./dev-CGt0PP1f.js";
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 t = i(e, "package.json");
10
- if (!c(t)) return [];
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(t, "utf8"));
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(t);
23
- return n.filter((e) => {
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 t(e)).filter((t) => p.test(t) && m(t) && !t.includes(`${e}/.framework/`)), g = {
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 { _ as a, C as i, v as n, T as o, h as r, w as s, y as t };
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,2 @@
1
+ import { o as e, s as t } from "./apiBuild-GefjNI5d.js";
2
+ export { e as runApiBuild, t as runServeBundleBuild };
@@ -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 { bt as e } from "./inspectMetrics-SRtv8KDy.js";
3
- import { n as t } from "./commands-BDGYrBhK.js";
4
- import { createLogger as n } from "@voltro/logger";
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 r = n({ scope: "voltro:cli" }), i = process.argv.slice(2);
7
- e(i), t(i).then((e) => process.exit(e)).catch((e) => {
8
- r.fatal("unhandled cli error", {}, e), process.exit(1);
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 };