@voltro/cli 0.23.0 → 0.25.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 +537 -0
- package/THIRD-PARTY-NOTICES.md +2 -2
- package/bin/voltro.mjs +39 -4
- package/dist/{apiBuild-JQtIhZPy.js → apiBuild-BqhCSytw.js} +46 -24
- package/dist/apiBuild-N1R4V792.js +2 -0
- package/dist/bin.js +3 -3
- package/dist/{commands-Bsu9Buln.js → commands-7EmYJ9Xg.js} +2796 -2478
- package/dist/dbCommand-CIrdFLp9.js +2 -0
- package/dist/{dbCommand-GI7-BVZt.js → dbCommand-FUU12FvD.js} +285 -246
- package/dist/{dev-DRxF_qOB.js → dev-BvHT7WZa.js} +1 -1
- package/dist/{dev-jM07kq_D.js → dev-MacSQ1Ll.js} +2042 -1631
- package/dist/fileConventions-3bffWssN.js +30 -0
- package/dist/frameworkTableAssembly-BsnCKzQ6.js +2 -0
- package/dist/{frameworkTableAssembly-sg41s14F.js → frameworkTableAssembly-Cw5zJz6n.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/inspect-C9gjHwBk.js +2 -0
- package/dist/{inspect-_ldwsAwH.js → inspect-DuLUrZp9.js} +14 -1
- package/dist/{inspectMetrics-dcC7gnxu.js → inspectMetrics-EQwH7BI4.js} +15 -15
- package/dist/manifestBuild-BVwS1Z_6.js +2 -0
- package/dist/{manifestBuild-Bs1Uw22_.js → manifestBuild-Dneq4_Jx.js} +1 -1
- package/dist/serveCommand-5ZFiNO1R.js +1241 -0
- package/dist/serveEntry.js +2 -2
- package/dist/{start-C_4VUDT8.js → start-C-ZWSDpg.js} +2 -2
- package/dist/startEntry.js +2 -2
- package/package.json +17 -17
- package/templates/AGENTS.core.md +12 -5
- package/templates/AGENTS.md +14 -7
- package/templates/agent-docs/_index.md +2 -2
- package/templates/agent-docs/_manifest.json +3 -3
- package/templates/agent-docs/authentication.md +21 -0
- package/templates/agent-docs/cli.md +32 -0
- package/templates/agent-docs/data.md +491 -167
- package/templates/agent-docs/database/migrations.md +132 -63
- package/templates/agent-docs/database/schema.md +80 -0
- package/templates/agent-docs/database/seedsdialects.md +12 -0
- package/templates/agent-docs/deployment.md +75 -1
- package/templates/agent-docs/plugins.md +1 -1
- package/templates/agent-docs/reference.md +2 -2
- package/templates/agent-docs/security.md +18 -0
- package/templates/agent-docs/templates/apibackends.md +5 -5
- package/templates/agent-docs/templates/overview.md +1 -1
- package/templates/agent-docs/whats-new.md +263 -169
- package/templates/agent-docs/workflows.md +74 -20
- package/templates/apps/api-ai/package.json +8 -7
- package/templates/apps/api-auth/package.json +9 -8
- package/templates/apps/api-backend/package.json +8 -7
- package/templates/apps/api-backend-deactivation/package.json +8 -7
- package/templates/apps/api-backend-mail/package.json +9 -8
- package/templates/apps/api-backend-mariadb/package.json +10 -9
- package/templates/apps/api-backend-storage/package.json +9 -8
- package/templates/apps/api-data-advanced/package.json +9 -8
- package/templates/apps/api-durable/README.md +2 -1
- package/templates/apps/api-durable/events/orders.event.ts +18 -0
- package/templates/apps/api-durable/mutations/orders.place.mutation.server.ts +17 -15
- package/templates/apps/api-durable/package.json +9 -8
- package/templates/apps/api-durable/triggers/order.placed.trigger.tsx +6 -4
- package/templates/apps/api-feature-flags/package.json +10 -9
- package/templates/apps/api-governance/package.json +9 -8
- package/templates/apps/api-kv/package.json +9 -8
- package/templates/apps/api-moderation/package.json +9 -8
- package/templates/apps/api-observability/package.json +9 -8
- package/templates/apps/api-ratelimit/package.json +9 -8
- package/templates/apps/api-rbac/package.json +9 -8
- package/templates/apps/api-rest/package.json +8 -7
- package/templates/apps/api-saas/package.json +12 -11
- package/templates/apps/api-search/package.json +9 -8
- package/templates/apps/api-versioning/package.json +9 -8
- package/templates/apps/api-webhooks/README.md +2 -2
- package/templates/apps/api-webhooks/events/orders.event.ts +35 -0
- package/templates/apps/api-webhooks/package.json +10 -9
- package/templates/apps/api-webhooks/template.json +1 -1
- package/templates/apps/changelog/package.json +7 -6
- package/templates/apps/edge-functions/package.json +3 -2
- package/templates/apps/frontend-admin/package.json +9 -8
- package/templates/apps/frontend-app/package.json +9 -8
- package/templates/apps/frontend-blank/package.json +8 -7
- package/templates/apps/frontend-contact/package.json +8 -7
- package/templates/apps/frontend-contact/src/globals.d.ts +6 -0
- package/templates/apps/frontend-dashboard/package.json +8 -7
- package/templates/apps/frontend-docs/package.json +8 -7
- package/templates/apps/frontend-docs/src/globals.d.ts +6 -0
- package/templates/apps/frontend-i18n/package.json +7 -6
- package/templates/apps/frontend-landing/package.json +8 -7
- package/templates/apps/frontend-landing/src/globals.d.ts +6 -0
- package/templates/apps/frontend-spa/package.json +8 -7
- package/templates/apps/frontend-spa/src/globals.d.ts +6 -0
- package/templates/apps/frontend-ssr/package.json +8 -7
- package/templates/apps/frontend-ssr/src/globals.d.ts +6 -0
- package/templates/apps/frontend-ssr-api/package.json +9 -8
- package/templates/apps/frontend-static-blog/package.json +7 -6
- package/templates/apps/frontend-static-blog/src/globals.d.ts +6 -0
- package/dist/apiBuild-CD-4JLLA.js +0 -2
- package/dist/dbCommand-CSguuUQn.js +0 -2
- package/dist/fileConventions-CBNPZVOV.js +0 -29
- package/dist/frameworkTableAssembly-DRJrAVr1.js +0 -2
- package/dist/inspect-BA67TF6v.js +0 -2
- package/dist/manifestBuild-i-fRHg_H.js +0 -2
- package/dist/serveCommand-Cl8sicD5.js +0 -1162
- package/templates/apps/api-webhooks/events/order.completed.webhook.tsx +0 -22
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region src/fileConventions.ts
|
|
2
|
+
var e = /\.(query|mutation|action|stream)\.ts$/, t = /\.(query|mutation|action|stream)\.server\.ts$/, n = /\.event\.ts$/, r = /\.workflow\.tsx$/, i = /\.workflow\.server\.tsx$/, a = /\.workflow\.tsx?$/, o = /\.trigger\.tsx?$/, s = /\.cron\.tsx?$/, c = /\.webhook\.tsx?$/, l = /\.outbox\.tsx?$/, u = /\.subscribe\.tsx?$/, d = /\.reaction\.tsx?$/, f = /\.aggregate\.tsx?$/, p = /\.startup\.tsx?$/, m = /\.seed\.ts$/, h = /\.relations\.ts$/, g = /\.entity\.ts$|\.schema\.ts$|^schema\.ts$/, _ = (e) => a.test(e) && !r.test(e) && !i.test(e), v = /(?:^|\/)page\.tsx$/, y = /\.island\.tsx?$/, b = /\.component\.tsx$/, x = /\.component\.ui\.tsx$/, S = /\.hook\.tsx?$/, C = /\.internal\.tsx?$/, w = /\.types\.tsx?$/, T = /\.fixture\.tsx?$/, E = /\.tracking\.tsx?$/, D = /\.store\.tsx?$/, O = /\.client\.tsx?$/, k = /\.(test|spec)\.tsx?$/, A = [
|
|
3
|
+
e,
|
|
4
|
+
t,
|
|
5
|
+
a,
|
|
6
|
+
i,
|
|
7
|
+
o,
|
|
8
|
+
s,
|
|
9
|
+
c,
|
|
10
|
+
l,
|
|
11
|
+
u,
|
|
12
|
+
d,
|
|
13
|
+
f,
|
|
14
|
+
p,
|
|
15
|
+
m,
|
|
16
|
+
h,
|
|
17
|
+
g,
|
|
18
|
+
/\.route\.tsx?$/,
|
|
19
|
+
n,
|
|
20
|
+
D,
|
|
21
|
+
O,
|
|
22
|
+
/\.(agent|tool|email|connection|serverless|server|config|generated)\.tsx?$/
|
|
23
|
+
], j = (e) => A.some((t) => t.test(e)), M = /* @__PURE__ */ new Set([
|
|
24
|
+
"layout.tsx",
|
|
25
|
+
"error.tsx",
|
|
26
|
+
"loading.tsx",
|
|
27
|
+
"not-found.tsx"
|
|
28
|
+
]);
|
|
29
|
+
//#endregion
|
|
30
|
+
export { j as A, E as C, r as D, c as E, a as O, k as S, w as T, g as _, n as a, D as b, C as c, v as d, M as f, h as g, d as h, s as i, _ as j, i as k, y as l, t as m, b as n, T as o, e as p, x as r, S as s, f as t, l as u, m as v, o as w, u as x, p as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e } from "./appModuleLoader-C9r9mxZt.js";
|
|
2
|
-
import {
|
|
2
|
+
import { E as t, O as n, i as r, u as i, w as a } from "./fileConventions-3bffWssN.js";
|
|
3
3
|
import { basename as o, join as s } from "node:path";
|
|
4
4
|
import { pathToFileURL as c } from "node:url";
|
|
5
5
|
import { Effect as l } from "effect";
|
|
@@ -553,7 +553,7 @@ var R = [
|
|
|
553
553
|
await m(s(e, u.name));
|
|
554
554
|
} else {
|
|
555
555
|
let e = u.name;
|
|
556
|
-
(n.test(e) ||
|
|
556
|
+
(n.test(e) || a.test(e)) && (o = !0), r.test(e) && (c = !0), t.test(e) && (l = !0), H.test(e) && (d = !0), i.test(e) && (f = !0), W.test(e) && (p = !0);
|
|
557
557
|
}
|
|
558
558
|
};
|
|
559
559
|
return await m(e), {
|
package/dist/index.js
CHANGED
|
@@ -202,7 +202,20 @@ var n = "/_voltro/inspect", r = () => process.env.VOLTRO_INSPECT === "off", i =
|
|
|
202
202
|
subscriptions: [],
|
|
203
203
|
matcherStats: [],
|
|
204
204
|
capturedAt: Date.now()
|
|
205
|
-
}, c) : s(200, t.subscriptions(), c) : s(404, { error: "subscriptions endpoint is api-only" }, c) : o === "/_voltro/inspect/
|
|
205
|
+
}, c) : s(200, t.subscriptions(), c) : s(404, { error: "subscriptions endpoint is api-only" }, c) : o === "/_voltro/inspect/members" ? t.kind === "api" ? t.members === void 0 ? s(200, {
|
|
206
|
+
members: [],
|
|
207
|
+
capturedAt: Date.now()
|
|
208
|
+
}, c) : s(200, t.members(), c) : s(404, { error: "members endpoint is api-only" }, c) : o === "/_voltro/inspect/events" ? t.kind === "api" ? t.events === void 0 ? s(200, {
|
|
209
|
+
declared: [],
|
|
210
|
+
routes: [],
|
|
211
|
+
origin: "",
|
|
212
|
+
capturedAt: Date.now(),
|
|
213
|
+
totals: {
|
|
214
|
+
routes: 0,
|
|
215
|
+
subscribers: 0,
|
|
216
|
+
buffered: 0
|
|
217
|
+
}
|
|
218
|
+
}, c) : s(200, t.events(), c) : s(404, { error: "events endpoint is api-only" }, c) : o === "/_voltro/inspect/data-cache" ? t.kind === "api" ? t.dataCache === void 0 ? s(200, {
|
|
206
219
|
backend: "memory",
|
|
207
220
|
engine: "memory",
|
|
208
221
|
driver: "resp",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as r, E as i, T as a, a as o, p as s, w as c } from "./inspect-
|
|
1
|
+
import { S as e, d as t, f as n } from "./fileConventions-3bffWssN.js";
|
|
2
|
+
import { D as r, E as i, T as a, a as o, p as s, w as c } from "./inspect-DuLUrZp9.js";
|
|
3
3
|
import { basename as l, dirname as u, isAbsolute as d, join as f, relative as p, resolve as m } from "node:path";
|
|
4
4
|
import { fileURLToPath as h, pathToFileURL as g } from "node:url";
|
|
5
5
|
import { FileSystem as _ } from "@effect/platform";
|
|
@@ -1162,7 +1162,7 @@ __installPublicEnv(publicEnvValues)
|
|
|
1162
1162
|
cacheInvalidatesOn: "it wires this page into the ISR cache invalidator",
|
|
1163
1163
|
interactive: "it decides how much client JS the server ships",
|
|
1164
1164
|
tenantAware: "it is part of the server-side cache key"
|
|
1165
|
-
}, jn = Object.keys(An), Mn = (
|
|
1165
|
+
}, jn = Object.keys(An), Mn = (t) => e.test(t), Nn = (e) => e.replace(/page\.tsx$/, "page.test.tsx"), Pn = "virtual:voltro-route-refresh", Fn = `\0${Pn}`, In = /(?:^|&)(raw|url|inline|worker|sharedworker|direct)(?:&|=|$)/, Ln = () => `
|
|
1166
1166
|
// GENERATED by @voltro/cli — the \`voltro dev\` route Fast Refresh runtime.
|
|
1167
1167
|
|
|
1168
1168
|
/** Mirrors react-refresh's own \`isLikelyComponentType\` closely enough for the
|
|
@@ -1266,11 +1266,11 @@ import {
|
|
|
1266
1266
|
routeUpdateNeedsReload as __voltro_routeUpdateNeedsReload,
|
|
1267
1267
|
serverEffectOf as __voltro_serverEffect,
|
|
1268
1268
|
} from '${Pn}'
|
|
1269
|
-
`, zn = (e) => e.replace(/\\/g, "/"), Bn = (
|
|
1270
|
-
let [i = "", a] = zn(
|
|
1269
|
+
`, zn = (e) => e.replace(/\\/g, "/"), Bn = (e, r) => {
|
|
1270
|
+
let [i = "", a] = zn(e).split("?");
|
|
1271
1271
|
if (!i.endsWith(".tsx") || a !== void 0 && In.test(a)) return !1;
|
|
1272
1272
|
let o = zn(r).replace(/\/$/, "");
|
|
1273
|
-
return i.startsWith(`${o}/`) ? t.test(i) ||
|
|
1273
|
+
return i.startsWith(`${o}/`) ? t.test(i) || n.has(i.slice(i.lastIndexOf("/") + 1)) : !1;
|
|
1274
1274
|
}, Vn = (e, t, n) => Bn(t, n) ? `${e}${Rn(zn(t).split("?")[0] ?? t)}` : null, Hn = (e) => ({
|
|
1275
1275
|
name: "voltro:route-fast-refresh",
|
|
1276
1276
|
enforce: "pre",
|
|
@@ -1734,20 +1734,20 @@ import {
|
|
|
1734
1734
|
}, $r = /export\s+(?:async\s+)?(?:const|function|let|var)\s+loader\b/, ei = (e) => e.startsWith("(") && e.endsWith(")"), ti = (e) => e.filter((e) => !ei(e)), ni = (e) => {
|
|
1735
1735
|
let n = e.replace(t, "").split("/").filter(Boolean).filter((e) => !ei(e));
|
|
1736
1736
|
return n.length === 0 ? "/" : "/" + n.join("/");
|
|
1737
|
-
}, ri = (e) => `${e.replace(t, "").split("/").filter(Boolean).map((e) => e.replace(/[()]/g, "").replace(/\[\.\.\./g, "_rest_").replace(/[[\]]/g, "_")).map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("").replace(/[^A-Za-z0-9_]/g, "_") || "Index"}Page`, Z = (e, t) => e === "" ? `Root${t}` : `${e.split("/").filter(Boolean).map((e) => e.replace(/[()]/g, "").replace(/\[\.\.\./g, "_rest_").replace(/[[\]]/g, "_")).map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("").replace(/[^A-Za-z0-9_]/g, "_") || "Root"}${t}`, Q = async (
|
|
1738
|
-
let r = [], i = [], a = async (
|
|
1737
|
+
}, ri = (e) => `${e.replace(t, "").split("/").filter(Boolean).map((e) => e.replace(/[()]/g, "").replace(/\[\.\.\./g, "_rest_").replace(/[[\]]/g, "_")).map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("").replace(/[^A-Za-z0-9_]/g, "_") || "Index"}Page`, Z = (e, t) => e === "" ? `Root${t}` : `${e.split("/").filter(Boolean).map((e) => e.replace(/[()]/g, "").replace(/\[\.\.\./g, "_rest_").replace(/[[\]]/g, "_")).map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("").replace(/[^A-Za-z0-9_]/g, "_") || "Root"}${t}`, Q = async (e) => {
|
|
1738
|
+
let r = [], i = [], a = async (e, o) => {
|
|
1739
1739
|
let s = [];
|
|
1740
1740
|
try {
|
|
1741
|
-
s = await A.readdir(
|
|
1741
|
+
s = await A.readdir(e, { withFileTypes: !0 });
|
|
1742
1742
|
} catch {
|
|
1743
1743
|
return;
|
|
1744
1744
|
}
|
|
1745
1745
|
let c = s.filter((e) => e.isDirectory()).map((e) => e.name).sort(), l = s.filter((e) => e.isFile() && e.name.endsWith(".tsx") && !Zr(e.name)).map((e) => e.name).sort(), u = new Set(l), d = o.join("/");
|
|
1746
|
-
if (l.some((
|
|
1746
|
+
if (l.some((e) => n.has(e))) {
|
|
1747
1747
|
let t = u.has("layout.tsx"), r = !1;
|
|
1748
1748
|
if (t) try {
|
|
1749
|
-
let
|
|
1750
|
-
r = $r.test(
|
|
1749
|
+
let t = await A.readFile(f(e, "layout.tsx"), "utf8");
|
|
1750
|
+
r = $r.test(t);
|
|
1751
1751
|
} catch {}
|
|
1752
1752
|
i.push({
|
|
1753
1753
|
dir: d,
|
|
@@ -1758,7 +1758,7 @@ import {
|
|
|
1758
1758
|
hasError: u.has("error.tsx"),
|
|
1759
1759
|
hasPending: u.has("loading.tsx"),
|
|
1760
1760
|
hasNotFound: u.has("not-found.tsx"),
|
|
1761
|
-
specialFiles: l.filter((
|
|
1761
|
+
specialFiles: l.filter((e) => n.has(e))
|
|
1762
1762
|
});
|
|
1763
1763
|
}
|
|
1764
1764
|
for (let e of l) {
|
|
@@ -1771,9 +1771,9 @@ import {
|
|
|
1771
1771
|
dirChain: o
|
|
1772
1772
|
});
|
|
1773
1773
|
}
|
|
1774
|
-
for (let
|
|
1774
|
+
for (let t of c) await a(f(e, t), [...o, t]);
|
|
1775
1775
|
};
|
|
1776
|
-
await a(
|
|
1776
|
+
await a(e, []), r.sort((e, t) => e.file < t.file ? -1 : 1);
|
|
1777
1777
|
let o = /* @__PURE__ */ new Set();
|
|
1778
1778
|
for (let e of r) for (let t = e.dirChain.length; t >= 0; t--) o.add(e.dirChain.slice(0, t).join("/"));
|
|
1779
1779
|
let s = [], c = [];
|