@vibes.diy/api-svc 2.0.0-dev-cli-d → 2.0.0-dev-cli-i
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/cf-serve.d.ts +1 -4
- package/cf-serve.js +10 -15
- package/cf-serve.js.map +1 -1
- package/check-auth.js +13 -3
- package/check-auth.js.map +1 -1
- package/create-handler.d.ts +5 -6
- package/create-handler.js +6 -32
- package/create-handler.js.map +1 -1
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/index.js.map +1 -1
- package/intern/ensure-application-chat-id.js +5 -5
- package/intern/ensure-application-chat-id.js.map +1 -1
- package/intern/ensure-chat-id.js +45 -33
- package/intern/ensure-chat-id.js.map +1 -1
- package/intern/ensure-slug-binding.d.ts +12 -26
- package/intern/ensure-slug-binding.js +125 -29
- package/intern/ensure-slug-binding.js.map +1 -1
- package/intern/get-model-defaults.d.ts +12 -0
- package/intern/get-model-defaults.js +90 -0
- package/intern/get-model-defaults.js.map +1 -0
- package/intern/get-slug-binding.d.ts +2 -3
- package/intern/get-slug-binding.js +13 -4
- package/intern/get-slug-binding.js.map +1 -1
- package/intern/grouped-vibe-import-map.d.ts +2 -0
- package/intern/grouped-vibe-import-map.js +2 -0
- package/intern/grouped-vibe-import-map.js.map +1 -1
- package/intern/render-vibe.d.ts +2 -2
- package/intern/render-vibe.js.map +1 -1
- package/intern/resend-prev-msg.js +5 -13
- package/intern/resend-prev-msg.js.map +1 -1
- package/intern/write-apps.d.ts +4 -5
- package/intern/write-apps.js +27 -18
- package/intern/write-apps.js.map +1 -1
- package/models.json +179 -0
- package/package.json +19 -16
- package/peers/s3.d.ts +1 -1
- package/public/ensure-app-settings.js +39 -12
- package/public/ensure-app-settings.js.map +1 -1
- package/public/ensure-app-slug-item.js +23 -47
- package/public/ensure-app-slug-item.js.map +1 -1
- package/public/ensure-user-settings.js +9 -8
- package/public/ensure-user-settings.js.map +1 -1
- package/public/get-chat-details.js +7 -5
- package/public/get-chat-details.js.map +1 -1
- package/public/invite-flow.js +59 -36
- package/public/invite-flow.js.map +1 -1
- package/public/list-models.d.ts +14 -0
- package/public/list-models.js +41 -0
- package/public/list-models.js.map +1 -0
- package/public/open-chat.js +2 -2
- package/public/open-chat.js.map +1 -1
- package/public/prompt-chat-section.d.ts +1 -1
- package/public/prompt-chat-section.js +40 -15
- package/public/prompt-chat-section.js.map +1 -1
- package/public/request-flow.js +65 -53
- package/public/request-flow.js.map +1 -1
- package/public/user-slug-bindings.d.ts +5 -0
- package/public/user-slug-bindings.js +144 -0
- package/public/user-slug-bindings.js.map +1 -0
- package/types.d.ts +37 -18
- package/types.js +27 -1
- package/types.js.map +1 -1
- package/usage-report/README.md +27 -0
- package/usage-report/inspect-db-report-template.d.ts +29 -0
- package/usage-report/inspect-db-report-template.js +379 -0
- package/usage-report/inspect-db-report-template.js.map +1 -0
- package/usage-report/inspect-db-report.d.ts +1 -0
- package/usage-report/inspect-db-report.js +264 -0
- package/usage-report/inspect-db-report.js.map +1 -0
- package/usage-report/inspect-db.d.ts +1 -0
- package/usage-report/inspect-db.js +226 -0
- package/usage-report/inspect-db.js.map +1 -0
- package/vibes-msg-evento.js +3 -1
- package/vibes-msg-evento.js.map +1 -1
- package/intern/ensure-storage.d.ts +0 -26
- package/intern/ensure-storage.js +0 -86
- package/intern/ensure-storage.js.map +0 -1
- package/intern/send-email.d.ts +0 -4
- package/intern/send-email.js +0 -55
- package/intern/send-email.js.map +0 -1
- package/intern/store-screenshot.d.ts +0 -17
- package/intern/store-screenshot.js +0 -36
- package/intern/store-screenshot.js.map +0 -1
- package/peers/sql.d.ts +0 -22
- package/peers/sql.js +0 -102
- package/peers/sql.js.map +0 -1
- package/sql/tables.d.ts +0 -1536
- package/sql/tables.js +0 -38
- package/sql/tables.js.map +0 -1
- package/sql/vibes-diy-api-schema-pg.d.ts +0 -1418
- package/sql/vibes-diy-api-schema-pg.js +0 -141
- package/sql/vibes-diy-api-schema-pg.js.map +0 -1
- package/sql/vibes-diy-api-schema-sqlite.d.ts +0 -1536
- package/sql/vibes-diy-api-schema-sqlite.js +0 -131
- package/sql/vibes-diy-api-schema-sqlite.js.map +0 -1
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { renderToStaticMarkup } from "react-dom/server";
|
|
3
|
+
function flattenValue(value) {
|
|
4
|
+
if (value === null || value === undefined)
|
|
5
|
+
return "";
|
|
6
|
+
if (typeof value === "string")
|
|
7
|
+
return value;
|
|
8
|
+
if (typeof value === "number" || typeof value === "boolean")
|
|
9
|
+
return String(value);
|
|
10
|
+
return JSON.stringify(value);
|
|
11
|
+
}
|
|
12
|
+
function collectKeys(rows) {
|
|
13
|
+
return Array.from(rows.reduce((set, row) => {
|
|
14
|
+
Object.keys(row).forEach((key) => set.add(key));
|
|
15
|
+
return set;
|
|
16
|
+
}, new Set()));
|
|
17
|
+
}
|
|
18
|
+
function DataTable({ rows }) {
|
|
19
|
+
if (rows.length === 0) {
|
|
20
|
+
return React.createElement("p", { className: "empty" }, "No rows");
|
|
21
|
+
}
|
|
22
|
+
const keys = collectKeys(rows);
|
|
23
|
+
return (React.createElement("div", { className: "table-wrap" },
|
|
24
|
+
React.createElement("table", null,
|
|
25
|
+
React.createElement("thead", null,
|
|
26
|
+
React.createElement("tr", null, keys.map((key) => (React.createElement("th", { key: key }, key))))),
|
|
27
|
+
React.createElement("tbody", null, rows.map((row, rowIdx) => (React.createElement("tr", { key: rowIdx }, keys.map((key) => (React.createElement("td", { key: key },
|
|
28
|
+
React.createElement("pre", null, flattenValue(row[key]))))))))))));
|
|
29
|
+
}
|
|
30
|
+
function TrendChart({ rows, valueKey, }) {
|
|
31
|
+
if (rows.length === 0) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
const values = rows.map((row) => Number(row[valueKey] ?? 0));
|
|
35
|
+
const max = Math.max(...values, 1);
|
|
36
|
+
const width = 720;
|
|
37
|
+
const height = 220;
|
|
38
|
+
const padding = 18;
|
|
39
|
+
const pointCoords = values.map((value, index) => {
|
|
40
|
+
const x = rows.length === 1 ? width / 2 : padding + (index * (width - padding * 2)) / (rows.length - 1);
|
|
41
|
+
const y = height - padding - (value / max) * (height - padding * 2);
|
|
42
|
+
return { x, y };
|
|
43
|
+
});
|
|
44
|
+
const pointsStr = pointCoords.map(({ x, y }) => `${x},${y}`).join(" ");
|
|
45
|
+
const lastValue = values[values.length - 1] ?? 0;
|
|
46
|
+
const firstDay = rows[0]?.["day"] ?? "";
|
|
47
|
+
const lastDay = rows[rows.length - 1]?.["day"] ?? "";
|
|
48
|
+
return (React.createElement("div", { className: "trend-card" },
|
|
49
|
+
React.createElement("div", { className: "trend-meta" },
|
|
50
|
+
React.createElement("div", null,
|
|
51
|
+
React.createElement("div", { className: "label" }, "Current Total"),
|
|
52
|
+
React.createElement("div", { className: "trend-value" }, lastValue)),
|
|
53
|
+
React.createElement("div", { className: "trend-range" },
|
|
54
|
+
firstDay,
|
|
55
|
+
" to ",
|
|
56
|
+
lastDay)),
|
|
57
|
+
React.createElement("svg", { viewBox: `0 0 ${width} ${height}`, className: "trend-chart", role: "img", "aria-label": "30 day trend" },
|
|
58
|
+
React.createElement("rect", { x: "0", y: "0", width: width, height: height, fill: "transparent" }),
|
|
59
|
+
React.createElement("g", { stroke: "rgba(15, 23, 42, 0.18)", strokeWidth: "1" },
|
|
60
|
+
React.createElement("line", { x1: padding, y1: padding, x2: padding, y2: height - padding }),
|
|
61
|
+
React.createElement("line", { x1: padding, y1: height - padding, x2: width - padding, y2: height - padding }),
|
|
62
|
+
React.createElement("line", { x1: padding, y1: height / 2, x2: width - padding, y2: height / 2 })),
|
|
63
|
+
React.createElement("polyline", { fill: "none", stroke: "var(--ink)", strokeWidth: "5", points: pointsStr }),
|
|
64
|
+
pointCoords.map(({ x, y }, i) => (React.createElement("circle", { key: i, cx: x, cy: y, r: "4", fill: "var(--plate)", stroke: "var(--ink)", strokeWidth: "3" }))))));
|
|
65
|
+
}
|
|
66
|
+
function TrendSection({ title, description, rows, valueKey, }) {
|
|
67
|
+
return (React.createElement("section", null,
|
|
68
|
+
React.createElement("h2", null, title),
|
|
69
|
+
React.createElement("p", null, description),
|
|
70
|
+
React.createElement(TrendChart, { rows: rows, valueKey: valueKey })));
|
|
71
|
+
}
|
|
72
|
+
function MetricCard({ label, value }) {
|
|
73
|
+
return (React.createElement("div", { className: "card" },
|
|
74
|
+
React.createElement("div", { className: "label" }, label),
|
|
75
|
+
React.createElement("div", { className: "value" }, String(value))));
|
|
76
|
+
}
|
|
77
|
+
const reportCss = `
|
|
78
|
+
:root {
|
|
79
|
+
color-scheme: light;
|
|
80
|
+
--paper: #f1f5f9;
|
|
81
|
+
--grid-soft: #cbd5e1;
|
|
82
|
+
--grid-strong: #94a3b8;
|
|
83
|
+
--slate: #64748b;
|
|
84
|
+
--ink: #0f172a;
|
|
85
|
+
--plate: #ffffff;
|
|
86
|
+
--panel: #e2e8f0;
|
|
87
|
+
--shadow: #242424;
|
|
88
|
+
--accent: #94a3b8;
|
|
89
|
+
--accent-strong: #64748b;
|
|
90
|
+
--grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
|
|
91
|
+
}
|
|
92
|
+
* { box-sizing: border-box; }
|
|
93
|
+
html {
|
|
94
|
+
background:
|
|
95
|
+
repeating-linear-gradient(0deg, transparent 0 19px, var(--grid-soft) 19px 20px),
|
|
96
|
+
repeating-linear-gradient(90deg, transparent 0 19px, var(--grid-soft) 19px 20px),
|
|
97
|
+
linear-gradient(180deg, #f8fbff 0%, var(--paper) 100%);
|
|
98
|
+
background-attachment: fixed;
|
|
99
|
+
}
|
|
100
|
+
body {
|
|
101
|
+
margin: 0;
|
|
102
|
+
font-family: "Arial Black", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
103
|
+
background: transparent;
|
|
104
|
+
color: var(--ink);
|
|
105
|
+
min-height: 100vh;
|
|
106
|
+
position: relative;
|
|
107
|
+
}
|
|
108
|
+
body::before {
|
|
109
|
+
content: "";
|
|
110
|
+
position: fixed;
|
|
111
|
+
inset: 0;
|
|
112
|
+
background-image: var(--grain);
|
|
113
|
+
opacity: 0.05;
|
|
114
|
+
mix-blend-mode: multiply;
|
|
115
|
+
pointer-events: none;
|
|
116
|
+
filter: blur(0.6px) contrast(102%) brightness(101%);
|
|
117
|
+
}
|
|
118
|
+
main {
|
|
119
|
+
max-width: 1200px;
|
|
120
|
+
margin: 0 auto;
|
|
121
|
+
padding: 32px 20px 72px;
|
|
122
|
+
position: relative;
|
|
123
|
+
}
|
|
124
|
+
h1, h2, h3 { margin: 0; }
|
|
125
|
+
h1 {
|
|
126
|
+
font-size: clamp(40px, 7vw, 72px);
|
|
127
|
+
line-height: 0.95;
|
|
128
|
+
letter-spacing: -0.04em;
|
|
129
|
+
text-transform: uppercase;
|
|
130
|
+
}
|
|
131
|
+
h2 {
|
|
132
|
+
font-size: 28px;
|
|
133
|
+
margin-bottom: 12px;
|
|
134
|
+
text-transform: uppercase;
|
|
135
|
+
letter-spacing: 0.04em;
|
|
136
|
+
}
|
|
137
|
+
p {
|
|
138
|
+
color: var(--slate);
|
|
139
|
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
140
|
+
font-size: 15px;
|
|
141
|
+
line-height: 1.5;
|
|
142
|
+
}
|
|
143
|
+
.hero {
|
|
144
|
+
display: grid;
|
|
145
|
+
gap: 20px;
|
|
146
|
+
margin-bottom: 32px;
|
|
147
|
+
}
|
|
148
|
+
.meta {
|
|
149
|
+
display: grid;
|
|
150
|
+
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
151
|
+
gap: 16px;
|
|
152
|
+
}
|
|
153
|
+
.card {
|
|
154
|
+
background: var(--plate);
|
|
155
|
+
border: 4px solid var(--ink);
|
|
156
|
+
border-radius: 0;
|
|
157
|
+
padding: 16px;
|
|
158
|
+
box-shadow: 8px 8px 0 var(--shadow);
|
|
159
|
+
}
|
|
160
|
+
.label {
|
|
161
|
+
font-size: 12px;
|
|
162
|
+
text-transform: uppercase;
|
|
163
|
+
letter-spacing: 0.08em;
|
|
164
|
+
color: var(--slate);
|
|
165
|
+
margin-bottom: 8px;
|
|
166
|
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
167
|
+
font-weight: 700;
|
|
168
|
+
}
|
|
169
|
+
.value {
|
|
170
|
+
font-size: 30px;
|
|
171
|
+
color: var(--ink);
|
|
172
|
+
}
|
|
173
|
+
section {
|
|
174
|
+
margin-top: 32px;
|
|
175
|
+
}
|
|
176
|
+
section > h2,
|
|
177
|
+
section > p {
|
|
178
|
+
position: relative;
|
|
179
|
+
z-index: 1;
|
|
180
|
+
}
|
|
181
|
+
section > h2 {
|
|
182
|
+
display: inline-block;
|
|
183
|
+
background: var(--panel);
|
|
184
|
+
border: 4px solid var(--ink);
|
|
185
|
+
padding: 10px 14px 8px;
|
|
186
|
+
box-shadow: 6px 6px 0 var(--shadow);
|
|
187
|
+
}
|
|
188
|
+
section > p {
|
|
189
|
+
margin: 14px 0 0;
|
|
190
|
+
max-width: 860px;
|
|
191
|
+
}
|
|
192
|
+
.table-wrap {
|
|
193
|
+
overflow: auto;
|
|
194
|
+
border: 4px solid var(--ink);
|
|
195
|
+
border-radius: 0;
|
|
196
|
+
background: var(--plate);
|
|
197
|
+
box-shadow: 10px 10px 0 var(--shadow);
|
|
198
|
+
margin-top: 16px;
|
|
199
|
+
}
|
|
200
|
+
table {
|
|
201
|
+
width: 100%;
|
|
202
|
+
border-collapse: collapse;
|
|
203
|
+
}
|
|
204
|
+
th, td {
|
|
205
|
+
text-align: left;
|
|
206
|
+
vertical-align: top;
|
|
207
|
+
padding: 12px 14px;
|
|
208
|
+
border-bottom: 3px solid var(--ink);
|
|
209
|
+
border-right: 3px solid var(--ink);
|
|
210
|
+
}
|
|
211
|
+
th:last-child,
|
|
212
|
+
td:last-child {
|
|
213
|
+
border-right: 0;
|
|
214
|
+
}
|
|
215
|
+
tbody tr:last-child td {
|
|
216
|
+
border-bottom: 0;
|
|
217
|
+
}
|
|
218
|
+
th {
|
|
219
|
+
position: sticky;
|
|
220
|
+
top: 0;
|
|
221
|
+
background:
|
|
222
|
+
radial-gradient(circle at 1px 1px, rgba(15, 23, 42, 0.16) 1px, transparent 0) 0 0 / 12px 12px,
|
|
223
|
+
linear-gradient(180deg, var(--panel) 0%, #dbe4ef 100%);
|
|
224
|
+
font-size: 13px;
|
|
225
|
+
text-transform: uppercase;
|
|
226
|
+
letter-spacing: 0.06em;
|
|
227
|
+
z-index: 1;
|
|
228
|
+
}
|
|
229
|
+
td pre {
|
|
230
|
+
margin: 0;
|
|
231
|
+
white-space: pre-wrap;
|
|
232
|
+
word-break: break-word;
|
|
233
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
234
|
+
font-size: 12px;
|
|
235
|
+
}
|
|
236
|
+
.empty {
|
|
237
|
+
margin-top: 16px;
|
|
238
|
+
padding: 18px;
|
|
239
|
+
background: var(--plate);
|
|
240
|
+
border: 4px dashed var(--ink);
|
|
241
|
+
border-radius: 0;
|
|
242
|
+
box-shadow: 8px 8px 0 var(--shadow);
|
|
243
|
+
}
|
|
244
|
+
.hero-panel {
|
|
245
|
+
background: var(--plate);
|
|
246
|
+
border: 6px solid var(--ink);
|
|
247
|
+
box-shadow: 12px 12px 0 var(--shadow);
|
|
248
|
+
padding: 20px;
|
|
249
|
+
}
|
|
250
|
+
.hero-kicker {
|
|
251
|
+
display: inline-block;
|
|
252
|
+
margin-bottom: 14px;
|
|
253
|
+
padding: 8px 12px;
|
|
254
|
+
background: linear-gradient(180deg, #dbe4ef 0%, var(--accent) 100%);
|
|
255
|
+
color: var(--ink);
|
|
256
|
+
border: 3px solid var(--ink);
|
|
257
|
+
font-size: 12px;
|
|
258
|
+
line-height: 1;
|
|
259
|
+
letter-spacing: 0.1em;
|
|
260
|
+
text-transform: uppercase;
|
|
261
|
+
}
|
|
262
|
+
.hero-panel p {
|
|
263
|
+
margin: 14px 0 0;
|
|
264
|
+
max-width: 760px;
|
|
265
|
+
}
|
|
266
|
+
.trend-card {
|
|
267
|
+
margin-top: 16px;
|
|
268
|
+
background: var(--plate);
|
|
269
|
+
border: 4px solid var(--ink);
|
|
270
|
+
box-shadow: 10px 10px 0 var(--shadow);
|
|
271
|
+
padding: 16px;
|
|
272
|
+
}
|
|
273
|
+
.trend-meta {
|
|
274
|
+
display: flex;
|
|
275
|
+
justify-content: space-between;
|
|
276
|
+
gap: 12px;
|
|
277
|
+
align-items: end;
|
|
278
|
+
margin-bottom: 12px;
|
|
279
|
+
}
|
|
280
|
+
.trend-value {
|
|
281
|
+
font-size: 40px;
|
|
282
|
+
line-height: 1;
|
|
283
|
+
}
|
|
284
|
+
.trend-range {
|
|
285
|
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
286
|
+
color: var(--slate);
|
|
287
|
+
font-size: 13px;
|
|
288
|
+
text-transform: uppercase;
|
|
289
|
+
letter-spacing: 0.08em;
|
|
290
|
+
}
|
|
291
|
+
.trend-chart {
|
|
292
|
+
width: 100%;
|
|
293
|
+
height: auto;
|
|
294
|
+
display: block;
|
|
295
|
+
background:
|
|
296
|
+
repeating-linear-gradient(0deg, transparent 0 19px, rgba(148, 163, 184, 0.2) 19px 20px);
|
|
297
|
+
}
|
|
298
|
+
@media (max-width: 640px) {
|
|
299
|
+
main {
|
|
300
|
+
padding: 20px 12px 56px;
|
|
301
|
+
}
|
|
302
|
+
.card,
|
|
303
|
+
.empty,
|
|
304
|
+
.hero-panel,
|
|
305
|
+
.trend-card,
|
|
306
|
+
.table-wrap,
|
|
307
|
+
section > h2 {
|
|
308
|
+
box-shadow: 6px 6px 0 var(--shadow);
|
|
309
|
+
}
|
|
310
|
+
th, td {
|
|
311
|
+
padding: 10px;
|
|
312
|
+
}
|
|
313
|
+
.trend-meta {
|
|
314
|
+
flex-direction: column;
|
|
315
|
+
align-items: start;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
`;
|
|
319
|
+
function ReportPage(data) {
|
|
320
|
+
const { generatedAt, info, tableCounts, membershipSummary, membershipTimeseries, userSlugBindingsTimeseries, membershipsByApp, userModelRows, appModelRows, userSettingsSample, appSettingsSample, } = data;
|
|
321
|
+
const totalRows = tableCounts.reduce((sum, row) => sum + Number(row.rowCount || 0), 0);
|
|
322
|
+
const lastBindingsCount = userSlugBindingsTimeseries[userSlugBindingsTimeseries.length - 1]?.["user_slug_bindings_count"] ?? 0;
|
|
323
|
+
return (React.createElement("html", { lang: "en" },
|
|
324
|
+
React.createElement("head", null,
|
|
325
|
+
React.createElement("meta", { charSet: "utf-8" }),
|
|
326
|
+
React.createElement("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }),
|
|
327
|
+
React.createElement("title", null, "Inspect DB Report"),
|
|
328
|
+
React.createElement("style", { dangerouslySetInnerHTML: { __html: reportCss } })),
|
|
329
|
+
React.createElement("body", null,
|
|
330
|
+
React.createElement("main", null,
|
|
331
|
+
React.createElement("div", { className: "hero" },
|
|
332
|
+
React.createElement("div", { className: "hero-panel" },
|
|
333
|
+
React.createElement("div", { className: "hero-kicker" }, "Team Snapshot"),
|
|
334
|
+
React.createElement("h1", null, "Inspect DB Report"),
|
|
335
|
+
React.createElement("p", null,
|
|
336
|
+
"Generated ",
|
|
337
|
+
generatedAt,
|
|
338
|
+
" for ",
|
|
339
|
+
info.database,
|
|
340
|
+
" / ",
|
|
341
|
+
info.current_schema,
|
|
342
|
+
".")),
|
|
343
|
+
React.createElement("div", { className: "meta" },
|
|
344
|
+
React.createElement(MetricCard, { label: "Memberships", value: membershipSummary.membership_count ?? 0 }),
|
|
345
|
+
React.createElement(MetricCard, { label: "User Slug Bindings", value: lastBindingsCount }),
|
|
346
|
+
React.createElement(MetricCard, { label: "Shared Apps", value: membershipSummary.shared_app_count ?? 0 }),
|
|
347
|
+
React.createElement(MetricCard, { label: "Distinct Members", value: membershipSummary.distinct_member_count ?? 0 }),
|
|
348
|
+
React.createElement(MetricCard, { label: "Database", value: info.database }),
|
|
349
|
+
React.createElement(MetricCard, { label: "Schema", value: info.current_schema }),
|
|
350
|
+
React.createElement(MetricCard, { label: "User", value: info.current_user }),
|
|
351
|
+
React.createElement(MetricCard, { label: "Tables", value: tableCounts.length }),
|
|
352
|
+
React.createElement(MetricCard, { label: "Rows Counted", value: totalRows }),
|
|
353
|
+
React.createElement(MetricCard, { label: "Model Rows", value: userModelRows.length + appModelRows.length }))),
|
|
354
|
+
React.createElement(TrendSection, { title: "Memberships Over 30 Days", description: "Daily cumulative total of currently active memberships, where one membership is one non-owner user with durable access to one specific vibe by approved request or accepted invite.", rows: membershipTimeseries, valueKey: "membership_count" }),
|
|
355
|
+
React.createElement(TrendSection, { title: "User Slug Bindings Over 30 Days", description: "Daily cumulative total of rows in UserSlugBindings over the last 30 days.", rows: userSlugBindingsTimeseries, valueKey: "user_slug_bindings_count" }),
|
|
356
|
+
React.createElement("section", null,
|
|
357
|
+
React.createElement("h2", null, "Memberships By App"),
|
|
358
|
+
React.createElement("p", null, "A membership is one non-owner user with durable access to one specific vibe, whether that access came from an accepted invite or an approved request including auto-approval."),
|
|
359
|
+
React.createElement(DataTable, { rows: membershipsByApp })),
|
|
360
|
+
React.createElement("section", null,
|
|
361
|
+
React.createElement("h2", null, "Table Counts"),
|
|
362
|
+
React.createElement(DataTable, { rows: tableCounts })),
|
|
363
|
+
React.createElement("section", null,
|
|
364
|
+
React.createElement("h2", null, "User Model Settings"),
|
|
365
|
+
React.createElement(DataTable, { rows: userModelRows })),
|
|
366
|
+
React.createElement("section", null,
|
|
367
|
+
React.createElement("h2", null, "App Model Settings"),
|
|
368
|
+
React.createElement(DataTable, { rows: appModelRows })),
|
|
369
|
+
React.createElement("section", null,
|
|
370
|
+
React.createElement("h2", null, "User Settings Sample"),
|
|
371
|
+
React.createElement(DataTable, { rows: userSettingsSample })),
|
|
372
|
+
React.createElement("section", null,
|
|
373
|
+
React.createElement("h2", null, "App Settings Sample"),
|
|
374
|
+
React.createElement(DataTable, { rows: appSettingsSample }))))));
|
|
375
|
+
}
|
|
376
|
+
export function renderHtmlReport(data) {
|
|
377
|
+
return "<!doctype html>" + renderToStaticMarkup(ReportPage(data));
|
|
378
|
+
}
|
|
379
|
+
//# sourceMappingURL=inspect-db-report-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspect-db-report-template.js","sourceRoot":"","sources":["../../jsr/usage-report/inspect-db-report-template.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AA2BxD,SAAS,YAAY,CAAC,KAAc;IAClC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACrD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IAClF,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,WAAW,CAAC,IAAwC;IAC3D,OAAO,KAAK,CAAC,IAAI,CACf,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QACvB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QAChD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,IAAI,GAAG,EAAU,CAAC,CAC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264 @@
|
|
|
1
|
+
import * as fs from "node:fs";
|
|
2
|
+
import * as path from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { spawnSync } from "node:child_process";
|
|
5
|
+
import { Result, exception2Result } from "@adviser/cement";
|
|
6
|
+
import { renderHtmlReport } from "./inspect-db-report-template.jsx";
|
|
7
|
+
const scriptDir = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
const inspectScriptPath = path.join(scriptDir, "inspect-db.ts");
|
|
9
|
+
const outDir = path.join(scriptDir, "../dist/inspect-db-report");
|
|
10
|
+
function runInspect(args) {
|
|
11
|
+
const tsxBin = path.join(scriptDir, "../node_modules/.bin/tsx");
|
|
12
|
+
const result = spawnSync(tsxBin, [inspectScriptPath, ...args], {
|
|
13
|
+
cwd: path.join(scriptDir, ".."),
|
|
14
|
+
encoding: "utf8",
|
|
15
|
+
env: process.env,
|
|
16
|
+
});
|
|
17
|
+
if (result.status !== 0) {
|
|
18
|
+
return Result.Err((result.stderr || result.stdout || `inspect-db failed for ${args.join(" ")}`).trim());
|
|
19
|
+
}
|
|
20
|
+
const stdout = result.stdout.trim();
|
|
21
|
+
if (stdout === "") {
|
|
22
|
+
return Result.Err(`inspect-db returned no output for ${args.join(" ")}`);
|
|
23
|
+
}
|
|
24
|
+
return exception2Result(() => JSON.parse(stdout));
|
|
25
|
+
}
|
|
26
|
+
function flattenValue(value) {
|
|
27
|
+
if (value === null || value === undefined)
|
|
28
|
+
return "";
|
|
29
|
+
if (typeof value === "string")
|
|
30
|
+
return value;
|
|
31
|
+
if (typeof value === "number" || typeof value === "boolean")
|
|
32
|
+
return String(value);
|
|
33
|
+
return JSON.stringify(value);
|
|
34
|
+
}
|
|
35
|
+
function toCsv(rows) {
|
|
36
|
+
const keys = Array.from(rows.reduce((set, row) => {
|
|
37
|
+
Object.keys(row).forEach((key) => set.add(key));
|
|
38
|
+
return set;
|
|
39
|
+
}, new Set()));
|
|
40
|
+
const escapeCell = (value) => {
|
|
41
|
+
const text = flattenValue(value);
|
|
42
|
+
if (/[",\n]/.test(text)) {
|
|
43
|
+
return `"${text.replaceAll('"', '""')}"`;
|
|
44
|
+
}
|
|
45
|
+
return text;
|
|
46
|
+
};
|
|
47
|
+
const lines = [keys.join(",")];
|
|
48
|
+
for (const row of rows) {
|
|
49
|
+
lines.push(keys.map((key) => escapeCell(row[key])).join(","));
|
|
50
|
+
}
|
|
51
|
+
return `${lines.join("\n")}\n`;
|
|
52
|
+
}
|
|
53
|
+
function writeCsv(name, rows) {
|
|
54
|
+
const outPath = path.join(outDir, name);
|
|
55
|
+
fs.writeFileSync(outPath, toCsv(rows), "utf8");
|
|
56
|
+
return outPath;
|
|
57
|
+
}
|
|
58
|
+
function unwrapInspect(args) {
|
|
59
|
+
const r = runInspect(args);
|
|
60
|
+
if (r.isErr()) {
|
|
61
|
+
console.error(`inspect-db failed for: ${args.join(" ")}: ${r.Err().message}`);
|
|
62
|
+
process.exitCode = 1;
|
|
63
|
+
return {};
|
|
64
|
+
}
|
|
65
|
+
return r.Ok();
|
|
66
|
+
}
|
|
67
|
+
async function main() {
|
|
68
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
69
|
+
const tablesPayload = unwrapInspect(["tables"]);
|
|
70
|
+
const info = {
|
|
71
|
+
database: tablesPayload["database"],
|
|
72
|
+
current_schema: tablesPayload["current_schema"],
|
|
73
|
+
current_user: tablesPayload["current_user"],
|
|
74
|
+
server_addr: tablesPayload["server_addr"],
|
|
75
|
+
server_port: tablesPayload["server_port"],
|
|
76
|
+
schemas: tablesPayload["schemas"],
|
|
77
|
+
};
|
|
78
|
+
const tables = tablesPayload["tables"] ?? [];
|
|
79
|
+
const tableCounts = tables.map((table) => {
|
|
80
|
+
const payload = unwrapInspect(["sql", `select count(*)::int as "rowCount" from "${table.table_schema}"."${table.table_name}"`]);
|
|
81
|
+
return {
|
|
82
|
+
table: `${table.table_schema}.${table.table_name}`,
|
|
83
|
+
rowCount: payload["rows"]?.[0]?.["rowCount"] ?? 0,
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
const membershipSummaryPayload = unwrapInspect([
|
|
87
|
+
"sql",
|
|
88
|
+
`with memberships as (
|
|
89
|
+
select
|
|
90
|
+
a."userId" as owner_user_id,
|
|
91
|
+
a."userSlug",
|
|
92
|
+
a."appSlug",
|
|
93
|
+
elem->>'state' as state,
|
|
94
|
+
elem->'request'->>'userId' as member_user_id
|
|
95
|
+
from public."AppSettings" a
|
|
96
|
+
cross join lateral jsonb_array_elements(a.settings) as elem
|
|
97
|
+
where elem->>'type' = 'app.acl.active.request'
|
|
98
|
+
and elem->>'state' = 'approved'
|
|
99
|
+
),
|
|
100
|
+
deduped as (
|
|
101
|
+
select distinct owner_user_id, "userSlug", "appSlug", member_user_id
|
|
102
|
+
from memberships
|
|
103
|
+
)
|
|
104
|
+
select
|
|
105
|
+
count(*)::int as membership_count,
|
|
106
|
+
count(distinct ("userSlug", "appSlug"))::int as shared_app_count,
|
|
107
|
+
count(distinct member_user_id)::int as distinct_member_count
|
|
108
|
+
from deduped`,
|
|
109
|
+
]);
|
|
110
|
+
const membershipSummary = (membershipSummaryPayload["rows"] ?? [])[0] ?? {
|
|
111
|
+
membership_count: 0,
|
|
112
|
+
shared_app_count: 0,
|
|
113
|
+
distinct_member_count: 0,
|
|
114
|
+
};
|
|
115
|
+
const membershipsByAppPayload = unwrapInspect([
|
|
116
|
+
"sql",
|
|
117
|
+
`with memberships as (
|
|
118
|
+
select
|
|
119
|
+
a."userId" as owner_user_id,
|
|
120
|
+
a."userSlug",
|
|
121
|
+
a."appSlug",
|
|
122
|
+
elem->'request'->>'userId' as member_user_id
|
|
123
|
+
from public."AppSettings" a
|
|
124
|
+
cross join lateral jsonb_array_elements(a.settings) as elem
|
|
125
|
+
where elem->>'type' = 'app.acl.active.request'
|
|
126
|
+
and elem->>'state' = 'approved'
|
|
127
|
+
)
|
|
128
|
+
select
|
|
129
|
+
owner_user_id,
|
|
130
|
+
"userSlug",
|
|
131
|
+
"appSlug",
|
|
132
|
+
count(distinct member_user_id)::int as memberships
|
|
133
|
+
from memberships
|
|
134
|
+
group by 1, 2, 3
|
|
135
|
+
order by memberships desc, "userSlug", "appSlug"
|
|
136
|
+
limit 200`,
|
|
137
|
+
]);
|
|
138
|
+
const membershipsByApp = membershipsByAppPayload["rows"] ?? [];
|
|
139
|
+
const membershipTimeseriesPayload = unwrapInspect([
|
|
140
|
+
"sql",
|
|
141
|
+
`with days as (
|
|
142
|
+
select generate_series(current_date - interval '29 days', current_date, interval '1 day')::date as day
|
|
143
|
+
),
|
|
144
|
+
memberships as (
|
|
145
|
+
select
|
|
146
|
+
a."userId" as owner_user_id,
|
|
147
|
+
a."userSlug",
|
|
148
|
+
a."appSlug",
|
|
149
|
+
elem->'request'->>'userId' as member_user_id,
|
|
150
|
+
(elem->'grant'->>'on')::timestamptz as created_at
|
|
151
|
+
from public."AppSettings" a
|
|
152
|
+
cross join lateral jsonb_array_elements(a.settings) as elem
|
|
153
|
+
where elem->>'type' = 'app.acl.active.request'
|
|
154
|
+
and elem->>'state' = 'approved'
|
|
155
|
+
and elem->'grant'->>'on' is not null
|
|
156
|
+
),
|
|
157
|
+
first_memberships as (
|
|
158
|
+
select
|
|
159
|
+
owner_user_id,
|
|
160
|
+
"userSlug",
|
|
161
|
+
"appSlug",
|
|
162
|
+
member_user_id,
|
|
163
|
+
min(created_at)::date as first_day
|
|
164
|
+
from memberships
|
|
165
|
+
group by 1, 2, 3, 4
|
|
166
|
+
)
|
|
167
|
+
select
|
|
168
|
+
to_char(day, 'YYYY-MM-DD') as day,
|
|
169
|
+
(
|
|
170
|
+
select count(*)::int
|
|
171
|
+
from first_memberships fm
|
|
172
|
+
where fm.first_day <= day
|
|
173
|
+
) as membership_count
|
|
174
|
+
from days
|
|
175
|
+
order by day`,
|
|
176
|
+
]);
|
|
177
|
+
const membershipTimeseries = membershipTimeseriesPayload["rows"] ?? [];
|
|
178
|
+
const userSlugBindingsTimeseriesPayload = unwrapInspect([
|
|
179
|
+
"sql",
|
|
180
|
+
`with days as (
|
|
181
|
+
select generate_series(current_date - interval '29 days', current_date, interval '1 day')::date as day
|
|
182
|
+
),
|
|
183
|
+
bindings as (
|
|
184
|
+
select created::timestamptz::date as created_day
|
|
185
|
+
from public."UserSlugBindings"
|
|
186
|
+
)
|
|
187
|
+
select
|
|
188
|
+
to_char(day, 'YYYY-MM-DD') as day,
|
|
189
|
+
(
|
|
190
|
+
select count(*)::int
|
|
191
|
+
from bindings b
|
|
192
|
+
where b.created_day <= day
|
|
193
|
+
) as user_slug_bindings_count
|
|
194
|
+
from days
|
|
195
|
+
order by day`,
|
|
196
|
+
]);
|
|
197
|
+
const userSlugBindingsTimeseries = userSlugBindingsTimeseriesPayload["rows"] ?? [];
|
|
198
|
+
const userModelPayload = unwrapInspect([
|
|
199
|
+
"sql",
|
|
200
|
+
`select "userId", elem as setting, updated from public."UserSettings" cross join lateral jsonb_array_elements(settings) as elem where elem->>'type' = 'model' order by updated desc limit 200`,
|
|
201
|
+
]);
|
|
202
|
+
const userModelRows = userModelPayload["rows"] ?? [];
|
|
203
|
+
const appModelPayload = unwrapInspect([
|
|
204
|
+
"sql",
|
|
205
|
+
`select "userId", "userSlug", "appSlug", elem as setting, updated from public."AppSettings" cross join lateral jsonb_array_elements(settings) as elem where elem->>'type' = 'active.model' order by updated desc limit 200`,
|
|
206
|
+
]);
|
|
207
|
+
const appModelRows = appModelPayload["rows"] ?? [];
|
|
208
|
+
const userSettingsPayload = unwrapInspect(["table", "public.UserSettings", "--limit", "20"]);
|
|
209
|
+
const userSettingsSample = (userSettingsPayload["rows"] ?? []).map((row) => ({
|
|
210
|
+
userId: row["userId"],
|
|
211
|
+
updated: row["updated"],
|
|
212
|
+
created: row["created"],
|
|
213
|
+
settings: row["settings"],
|
|
214
|
+
}));
|
|
215
|
+
const appSettingsPayload = unwrapInspect(["table", "public.AppSettings", "--limit", "20"]);
|
|
216
|
+
const appSettingsSample = (appSettingsPayload["rows"] ?? []).map((row) => ({
|
|
217
|
+
userId: row["userId"],
|
|
218
|
+
userSlug: row["userSlug"],
|
|
219
|
+
appSlug: row["appSlug"],
|
|
220
|
+
updated: row["updated"],
|
|
221
|
+
created: row["created"],
|
|
222
|
+
settings: row["settings"],
|
|
223
|
+
}));
|
|
224
|
+
const generatedAt = new Date().toISOString();
|
|
225
|
+
const files = {
|
|
226
|
+
membershipsTimeseriesCsv: writeCsv("memberships-timeseries.csv", membershipTimeseries),
|
|
227
|
+
userSlugBindingsTimeseriesCsv: writeCsv("user-slug-bindings-timeseries.csv", userSlugBindingsTimeseries),
|
|
228
|
+
membershipsByAppCsv: writeCsv("memberships-by-app.csv", membershipsByApp),
|
|
229
|
+
tableCountsCsv: writeCsv("table-counts.csv", tableCounts),
|
|
230
|
+
userModelCsv: writeCsv("user-model-settings.csv", userModelRows),
|
|
231
|
+
appModelCsv: writeCsv("app-model-settings.csv", appModelRows),
|
|
232
|
+
userSettingsCsv: writeCsv("user-settings-sample.csv", userSettingsSample),
|
|
233
|
+
appSettingsCsv: writeCsv("app-settings-sample.csv", appSettingsSample),
|
|
234
|
+
};
|
|
235
|
+
const html = renderHtmlReport({
|
|
236
|
+
generatedAt,
|
|
237
|
+
info,
|
|
238
|
+
tableCounts,
|
|
239
|
+
membershipSummary: membershipSummary,
|
|
240
|
+
membershipTimeseries,
|
|
241
|
+
userSlugBindingsTimeseries,
|
|
242
|
+
membershipsByApp,
|
|
243
|
+
userModelRows,
|
|
244
|
+
appModelRows,
|
|
245
|
+
userSettingsSample,
|
|
246
|
+
appSettingsSample,
|
|
247
|
+
});
|
|
248
|
+
const htmlPath = path.join(outDir, "index.html");
|
|
249
|
+
fs.writeFileSync(htmlPath, html, "utf8");
|
|
250
|
+
console.log(JSON.stringify({
|
|
251
|
+
generatedAt,
|
|
252
|
+
outputDir: outDir,
|
|
253
|
+
htmlPath,
|
|
254
|
+
...files,
|
|
255
|
+
}, null, 2));
|
|
256
|
+
return Result.Ok(undefined);
|
|
257
|
+
}
|
|
258
|
+
main().then((result) => {
|
|
259
|
+
if (result.isErr()) {
|
|
260
|
+
console.error(result.Err().message);
|
|
261
|
+
process.exitCode = 1;
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
//# sourceMappingURL=inspect-db-report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspect-db-report.js","sourceRoot":"","sources":["../../jsr/usage-report/inspect-db-report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/D,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;AAChE,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,2BAA2B,CAAC,CAAC;AAEjE,SAAS,UAAU,CAAC,IAAuB;IACzC,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,0BAA0B,CAAC,CAAC;IAChE,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,iBAAiB,EAAE,GAAG,IAAI,CAAC,EAAE;QAC7D,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC;QAC/B,QAAQ,EAAE,MAAe;QACzB,GAAG,EAAE,OAAO,CAAC,GAAG;KACjB,CAAC,CAAC;IAEH,IAAI,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