@boltapp/bolt-local-dashboard 0.1.2 → 0.1.4

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.
@@ -369,7 +369,7 @@ function countUsers(sqlite) {
369
369
  return row?.value ?? 0;
370
370
  }
371
371
 
372
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/collection/summarize-items.js
372
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/collection/summarize-items.js
373
373
  function summarizeItems(data, key, itemsToShow) {
374
374
  if (!data.length) {
375
375
  return "No items";
@@ -380,13 +380,13 @@ function summarizeItems(data, key, itemsToShow) {
380
380
  return remainingItemCount > 0 ? `${itemsList} + ${remainingItemCount} other item${remainingItemCount > 1 ? "s" : ""}` : itemsList;
381
381
  }
382
382
 
383
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/date/date-to-string.js
383
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/date/date-to-string.js
384
384
  function dateToString(date5) {
385
385
  const dateString = date5 ? date5.toISOString().split("T")[0] : "";
386
386
  return dateString ?? false;
387
387
  }
388
388
 
389
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/date/format-date.js
389
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/date/format-date.js
390
390
  var templateOptions = {
391
391
  common: ["dd", "monthName", "yyyy"],
392
392
  commonWithTime: ["dd", "monthName", "yyyy", "h", "m", "s"]
@@ -409,19 +409,19 @@ function formatDate(date5, format2, join) {
409
409
  return format2.map((f2) => options[f2] || "").join(join ?? " ");
410
410
  }
411
411
 
412
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/date/string-to-date.js
412
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/date/string-to-date.js
413
413
  function stringToDate(dateString = "") {
414
414
  return new Date(dateString);
415
415
  }
416
416
 
417
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/date/subtract-days.js
417
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/date/subtract-days.js
418
418
  function subtractDays(date5, days) {
419
419
  const result = new Date(date5);
420
420
  result.setDate(result.getDate() - days);
421
421
  return result;
422
422
  }
423
423
 
424
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/format/format-number.js
424
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/format/format-number.js
425
425
  function formatNumber(amount, currency, options) {
426
426
  const { locale = "en-US", style = "currency", minimumFractionDigits = 0 } = options || {};
427
427
  const formatter = new Intl.NumberFormat(locale, {
@@ -432,7 +432,7 @@ function formatNumber(amount, currency, options) {
432
432
  return formatter.format(amount / 100);
433
433
  }
434
434
 
435
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/format/to-kebab-case.js
435
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/format/to-kebab-case.js
436
436
  function toKebabCase(input) {
437
437
  if (!input) {
438
438
  return "";
@@ -440,34 +440,34 @@ function toKebabCase(input) {
440
440
  return input.trim().toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "");
441
441
  }
442
442
 
443
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/generation/generate-excerpt.js
443
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/generation/generate-excerpt.js
444
444
  function generateExcerpt(content) {
445
445
  const plainText = content.replace(/<\/?[^>]+(>|$)/g, "");
446
446
  const normalizedText = plainText.replace(/\s+/g, " ").trim();
447
447
  return normalizedText.slice(0, 200);
448
448
  }
449
449
 
450
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/generation/generate-random-email.js
450
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/generation/generate-random-email.js
451
451
  function generateRandomEmail(length = 10) {
452
452
  const chars = "abcdefghijklmnopqrstuvwxyz0123456789";
453
- let randomString3 = "";
453
+ let randomString4 = "";
454
454
  for (let i2 = 0; i2 < length; i2++) {
455
- randomString3 += chars[Math.floor(Math.random() * chars.length)];
455
+ randomString4 += chars[Math.floor(Math.random() * chars.length)];
456
456
  }
457
- return `${randomString3}@test.com`;
457
+ return `${randomString4}@test.com`;
458
458
  }
459
459
 
460
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/generation/generate-sequence.js
460
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/generation/generate-sequence.js
461
461
  function generateSequence(length) {
462
462
  return Array.from({ length }, (_, i2) => i2 + 1);
463
463
  }
464
464
 
465
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/generation/generate-slug.js
465
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/generation/generate-slug.js
466
466
  function generateSlug(text11) {
467
467
  return text11.toLowerCase().trim().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
468
468
  }
469
469
 
470
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/generation/random-string.js
470
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/generation/random-string.js
471
471
  function randomString(size) {
472
472
  if (size % 2 !== 0)
473
473
  throw new Error("size must be even");
@@ -477,7 +477,7 @@ function randomString(size) {
477
477
  return Array.from(bytes).reduce(r2, "").slice(0, size);
478
478
  }
479
479
 
480
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/is-current-path.js
480
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/is-current-path.js
481
481
  function normalize(path6) {
482
482
  const basePath = path6.split("?")[0]?.split("#")[0] ?? "";
483
483
  return basePath.replace(/\/+$/, "") || "/";
@@ -493,7 +493,7 @@ function isPartOfCurrentPath(path6, url2) {
493
493
  return p2 === u2 || p2.startsWith(`${u2}/`);
494
494
  }
495
495
 
496
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-currency.js
496
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-currency.js
497
497
  function prettyCurrency(props) {
498
498
  const { value, currency, locale, fromCents, decimalPlaces = "2", round = false } = props;
499
499
  let safeValue = (value ?? 0) / (fromCents ? 100 : 1);
@@ -619,11 +619,11 @@ function getTimezoneOffsetInMilliseconds(date5) {
619
619
 
620
620
  // ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/normalizeDates.js
621
621
  function normalizeDates(context, ...dates) {
622
- const normalize2 = constructFrom.bind(
622
+ const normalize3 = constructFrom.bind(
623
623
  null,
624
624
  context || dates.find((date5) => typeof date5 === "object")
625
625
  );
626
- return dates.map(normalize2);
626
+ return dates.map(normalize3);
627
627
  }
628
628
 
629
629
  // ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfDay.js
@@ -2174,7 +2174,7 @@ function isToday(date5, options) {
2174
2174
  );
2175
2175
  }
2176
2176
 
2177
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-date.js
2177
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-date.js
2178
2178
  function prettyDate(date5, withHour = false) {
2179
2179
  const parsed = typeof date5 === "string" ? new Date(date5) : date5;
2180
2180
  if (!(parsed instanceof Date) || Number.isNaN(parsed.getTime())) {
@@ -2200,7 +2200,7 @@ function prettyDate(date5, withHour = false) {
2200
2200
  return `${format(parsed, `PP`)} ${hour}`.trim();
2201
2201
  }
2202
2202
 
2203
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-file-size.js
2203
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-file-size.js
2204
2204
  function prettyFileSize(bytes) {
2205
2205
  const KB = 1024;
2206
2206
  const MB = KB * 1024;
@@ -2216,13 +2216,13 @@ function prettyFileSize(bytes) {
2216
2216
  }
2217
2217
  }
2218
2218
 
2219
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-number.js
2219
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-number.js
2220
2220
  function prettyNumber(props) {
2221
2221
  const { value, locale } = props;
2222
2222
  return new Intl.NumberFormat(locale).format(value ?? 0);
2223
2223
  }
2224
2224
 
2225
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-text.js
2225
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-text.js
2226
2226
  function prettyText(input) {
2227
2227
  if (!input)
2228
2228
  return "";
@@ -2231,7 +2231,7 @@ function prettyText(input) {
2231
2231
  return capitalizedString;
2232
2232
  }
2233
2233
 
2234
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-timestamp.js
2234
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-timestamp.js
2235
2235
  function prettyTimeStamp() {
2236
2236
  const now = /* @__PURE__ */ new Date();
2237
2237
  const day = now.toLocaleDateString("en-US", { weekday: "short" }).toLowerCase();
@@ -2246,7 +2246,7 @@ function prettyTimeStamp() {
2246
2246
  return `${day}-${date5}-${month}-${year}-${formattedHour}-${minutes}${ampm}`;
2247
2247
  }
2248
2248
 
2249
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-unit.js
2249
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-unit.js
2250
2250
  function prettyUnit(props) {
2251
2251
  const { value, unit, locale } = props;
2252
2252
  return new Intl.NumberFormat(locale, {
@@ -2255,7 +2255,7 @@ function prettyUnit(props) {
2255
2255
  }).format(value ?? 0);
2256
2256
  }
2257
2257
 
2258
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/text/capitalize-first-letter.js
2258
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/text/capitalize-first-letter.js
2259
2259
  function capitalizeFirstLetter(input) {
2260
2260
  if (!input.length) {
2261
2261
  return input;
@@ -2263,7 +2263,7 @@ function capitalizeFirstLetter(input) {
2263
2263
  return input.charAt(0).toUpperCase() + input.slice(1);
2264
2264
  }
2265
2265
 
2266
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/text/change-format.js
2266
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/text/change-format.js
2267
2267
  function changeFormat(value) {
2268
2268
  if (!value?.length) {
2269
2269
  return "";
@@ -2271,7 +2271,7 @@ function changeFormat(value) {
2271
2271
  return `${value.charAt(0).toUpperCase()}${value.slice(1).replace(/_|-/g, " ")}`;
2272
2272
  }
2273
2273
 
2274
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/text/get-two-first-letters-from-string.js
2274
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/text/get-two-first-letters-from-string.js
2275
2275
  function getTwoFirstLettersFromString(input) {
2276
2276
  if (!input) {
2277
2277
  return "";
@@ -2292,7 +2292,7 @@ function getTwoFirstLettersFromString(input) {
2292
2292
  return words[0].charAt(0) + words[1].charAt(0);
2293
2293
  }
2294
2294
 
2295
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/text/truncate.js
2295
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/text/truncate.js
2296
2296
  function truncate(str, length) {
2297
2297
  if (typeof str === "string" && str.length > length) {
2298
2298
  return `${str.slice(0, length)}...`;
@@ -2300,7 +2300,7 @@ function truncate(str, length) {
2300
2300
  return str;
2301
2301
  }
2302
2302
 
2303
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/transform/convert-to-csv.js
2303
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/transform/convert-to-csv.js
2304
2304
  function convertToCsv({ data, schema, headers, options }) {
2305
2305
  const escapeCsv = (value) => {
2306
2306
  let str = value instanceof Date ? value.toISOString() : value == null ? "" : String(value);
@@ -2328,12 +2328,12 @@ function convertToCsv({ data, schema, headers, options }) {
2328
2328
  return lines.join("\n");
2329
2329
  }
2330
2330
 
2331
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/url/decode-url-text.js
2331
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/url/decode-url-text.js
2332
2332
  function decodeUrlText(encodedText) {
2333
2333
  return decodeURIComponent(encodedText);
2334
2334
  }
2335
2335
 
2336
- // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.1/node_modules/@boltapp/bolt-helpers/dist/index.js
2336
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.7/node_modules/@boltapp/bolt-helpers/dist/index.js
2337
2337
  var Helpers = {
2338
2338
  isCurrentPath,
2339
2339
  isPartOfCurrentPath,
@@ -2364,7 +2364,7 @@ var Helpers = {
2364
2364
  dateToString
2365
2365
  };
2366
2366
 
2367
- // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.1_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_5c1e7fdb59c20b93a5807ebf0427a7a0/node_modules/@boltapp/bolt-app-db/dist/client/schema/index.js
2367
+ // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.6_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_f13d8938db1a5f59618ae6657194ac02/node_modules/@boltapp/bolt-app-db/dist/client/schema/index.js
2368
2368
  var schema_exports = {};
2369
2369
  __export(schema_exports, {
2370
2370
  boltAppVersions: () => boltAppVersions,
@@ -2384,7 +2384,12 @@ __export(schema_exports, {
2384
2384
  boltTablesRelations: () => boltTablesRelations
2385
2385
  });
2386
2386
 
2387
- // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.1_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_5c1e7fdb59c20b93a5807ebf0427a7a0/node_modules/@boltapp/bolt-app-db/dist/client/schema/project-schema.js
2387
+ // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.6_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_f13d8938db1a5f59618ae6657194ac02/node_modules/@boltapp/bolt-app-db/dist/client/schema/app-schema.js
2388
+ import { relations } from "drizzle-orm";
2389
+ import { index as index2, integer as integer3, sqliteTable as sqliteTable3, text as text3, uniqueIndex as uniqueIndex3 } from "drizzle-orm/sqlite-core";
2390
+ import { nanoid as nanoid3 } from "nanoid";
2391
+
2392
+ // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.6_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_f13d8938db1a5f59618ae6657194ac02/node_modules/@boltapp/bolt-app-db/dist/client/schema/project-schema.js
2388
2393
  import { integer as integer2, sqliteTable as sqliteTable2, text as text2, uniqueIndex as uniqueIndex2 } from "drizzle-orm/sqlite-core";
2389
2394
  import { nanoid as nanoid2 } from "nanoid";
2390
2395
  var boltProjects = sqliteTable2("bolt_projects", {
@@ -2401,6 +2406,111 @@ var boltProjects = sqliteTable2("bolt_projects", {
2401
2406
  uniqueIndex2("bolt_projects_slug_unique_idx").on(table.slug)
2402
2407
  ]);
2403
2408
 
2409
+ // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.6_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_f13d8938db1a5f59618ae6657194ac02/node_modules/@boltapp/bolt-app-db/dist/client/schema/app-schema.js
2410
+ var boltApps = sqliteTable3("bolt_apps", {
2411
+ id: text3().primaryKey().$defaultFn(() => nanoid3()),
2412
+ name: text3().notNull(),
2413
+ title: text3().notNull(),
2414
+ description: text3(),
2415
+ status: text3({ enum: ["draft", "published", "archived"] }).default("draft").notNull(),
2416
+ projectId: text3().notNull().references(() => boltProjects.id, { onDelete: "cascade" }),
2417
+ createdAt: integer3({ mode: "timestamp" }),
2418
+ updatedAt: integer3({ mode: "timestamp" }),
2419
+ createdBy: text3().default("system").notNull(),
2420
+ updatedBy: text3().default("system").notNull()
2421
+ }, (table) => [
2422
+ uniqueIndex3("bolt_apps_name_unique_idx").on(table.name),
2423
+ index2("bolt_apps_project_id_idx").on(table.projectId),
2424
+ index2("bolt_apps_status_idx").on(table.status)
2425
+ ]);
2426
+ var boltAppVersions = sqliteTable3("bolt_app_versions", {
2427
+ id: text3().primaryKey().$defaultFn(() => nanoid3()),
2428
+ appId: text3().notNull().references(() => boltApps.id, { onDelete: "cascade" }),
2429
+ incrementalId: integer3({ mode: "number" }).notNull(),
2430
+ publishedAt: integer3({ mode: "timestamp" }),
2431
+ notes: text3(),
2432
+ model: text3({ mode: "json" }).$type(),
2433
+ s3Url: text3(),
2434
+ createdAt: integer3({ mode: "timestamp" }),
2435
+ updatedAt: integer3({ mode: "timestamp" }),
2436
+ createdBy: text3().default("system").notNull(),
2437
+ updatedBy: text3().default("system").notNull()
2438
+ }, (table) => [
2439
+ index2("bolt_app_versions_app_id_idx").on(table.appId),
2440
+ uniqueIndex3("bolt_app_versions_app_incremental_idx").on(table.appId, table.incrementalId)
2441
+ ]);
2442
+ var boltAppsRelations = relations(boltApps, ({ many, one }) => ({
2443
+ versions: many(boltAppVersions),
2444
+ project: one(boltProjects, {
2445
+ fields: [boltApps.projectId],
2446
+ references: [boltProjects.id]
2447
+ })
2448
+ }));
2449
+ var boltAppVersionsRelations = relations(boltAppVersions, ({ one }) => ({
2450
+ app: one(boltApps, {
2451
+ fields: [boltAppVersions.appId],
2452
+ references: [boltApps.id]
2453
+ })
2454
+ }));
2455
+
2456
+ // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.6_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_f13d8938db1a5f59618ae6657194ac02/node_modules/@boltapp/bolt-app-db/dist/client/schema/data-store-schema.js
2457
+ import { relations as relations2 } from "drizzle-orm";
2458
+ import { index as index3, integer as integer4, sqliteTable as sqliteTable4, text as text4, uniqueIndex as uniqueIndex4 } from "drizzle-orm/sqlite-core";
2459
+ import { nanoid as nanoid4 } from "nanoid";
2460
+ var boltDataStores = sqliteTable4("bolt_data_stores", {
2461
+ id: text4().primaryKey().$defaultFn(() => nanoid4()),
2462
+ name: text4().notNull(),
2463
+ label: text4().default("Untitled Store").notNull(),
2464
+ description: text4(),
2465
+ items: text4({ mode: "json" }).$type(),
2466
+ data: text4({ mode: "json" }).$type().notNull(),
2467
+ appId: text4("app_id").notNull(),
2468
+ organizationId: text4("organization_id"),
2469
+ createdBy: text4().default("system").notNull(),
2470
+ updatedBy: text4().default("system").notNull(),
2471
+ createdAt: integer4({ mode: "timestamp" }),
2472
+ updatedAt: integer4({ mode: "timestamp" })
2473
+ }, (table) => [
2474
+ uniqueIndex4("bolt_data_stores_app_name_unique_idx").on(table.appId, table.name),
2475
+ index3("bolt_data_stores_app_idx").on(table.appId)
2476
+ ]);
2477
+ var boltDataStoresRelations = relations2(boltDataStores, ({ one }) => ({
2478
+ app: one(boltApps, {
2479
+ fields: [boltDataStores.appId],
2480
+ references: [boltApps.id]
2481
+ })
2482
+ }));
2483
+
2484
+ // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.6_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_f13d8938db1a5f59618ae6657194ac02/node_modules/@boltapp/bolt-app-db/dist/client/schema/file-schema.js
2485
+ import { relations as relations3 } from "drizzle-orm";
2486
+ import { index as index4, integer as integer5, sqliteTable as sqliteTable5, text as text5 } from "drizzle-orm/sqlite-core";
2487
+ import { nanoid as nanoid5 } from "nanoid";
2488
+ var boltFiles = sqliteTable5("bolt_files", {
2489
+ id: text5().primaryKey().$defaultFn(() => nanoid5()),
2490
+ appId: text5("app_id").notNull(),
2491
+ organizationId: text5("organization_id"),
2492
+ name: text5("name").notNull(),
2493
+ url: text5("url").notNull(),
2494
+ mimeType: text5("mime_type").notNull(),
2495
+ extension: text5("extension"),
2496
+ size: integer5("size"),
2497
+ width: integer5("width"),
2498
+ height: integer5("height"),
2499
+ alt: text5("alt"),
2500
+ source: text5("source", { enum: ["local", "remote"] }).default("local"),
2501
+ storagePath: text5("storage_path").notNull(),
2502
+ createdBy: text5("created_by").default("system").notNull(),
2503
+ updatedBy: text5("updated_by").default("system"),
2504
+ createdAt: integer5("created_at", { mode: "timestamp" }),
2505
+ updatedAt: integer5("updated_at", { mode: "timestamp" })
2506
+ }, (table) => [index4("bolt_files_app_idx").on(table.appId), index4("bolt_files_name_idx").on(table.name)]);
2507
+ var boltFilesRelations = relations3(boltFiles, ({ one }) => ({
2508
+ app: one(boltApps, {
2509
+ fields: [boltFiles.appId],
2510
+ references: [boltApps.id]
2511
+ })
2512
+ }));
2513
+
2404
2514
  // ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/external.js
2405
2515
  var external_exports = {};
2406
2516
  __export(external_exports, {
@@ -2567,7 +2677,7 @@ __export(external_exports, {
2567
2677
  minSize: () => _minSize,
2568
2678
  multipleOf: () => _multipleOf,
2569
2679
  nan: () => nan,
2570
- nanoid: () => nanoid4,
2680
+ nanoid: () => nanoid7,
2571
2681
  nativeEnum: () => nativeEnum,
2572
2682
  negative: () => _negative,
2573
2683
  never: () => never,
@@ -3923,7 +4033,7 @@ __export(regexes_exports, {
3923
4033
  hostname: () => hostname,
3924
4034
  html5Email: () => html5Email,
3925
4035
  idnEmail: () => idnEmail,
3926
- integer: () => integer3,
4036
+ integer: () => integer6,
3927
4037
  ipv4: () => ipv4,
3928
4038
  ipv6: () => ipv6,
3929
4039
  ksuid: () => ksuid,
@@ -3932,7 +4042,7 @@ __export(regexes_exports, {
3932
4042
  md5_base64: () => md5_base64,
3933
4043
  md5_base64url: () => md5_base64url,
3934
4044
  md5_hex: () => md5_hex,
3935
- nanoid: () => nanoid3,
4045
+ nanoid: () => nanoid6,
3936
4046
  null: () => _null,
3937
4047
  number: () => number,
3938
4048
  rfc5322Email: () => rfc5322Email,
@@ -3965,7 +4075,7 @@ var cuid2 = /^[0-9a-z]+$/;
3965
4075
  var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
3966
4076
  var xid = /^[0-9a-vA-V]{20}$/;
3967
4077
  var ksuid = /^[A-Za-z0-9]{27}$/;
3968
- var nanoid3 = /^[a-zA-Z0-9_-]{21}$/;
4078
+ var nanoid6 = /^[a-zA-Z0-9_-]{21}$/;
3969
4079
  var duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
3970
4080
  var extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
3971
4081
  var guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
@@ -4025,7 +4135,7 @@ var string = (params) => {
4025
4135
  return new RegExp(`^${regex}$`);
4026
4136
  };
4027
4137
  var bigint = /^-?\d+n?$/;
4028
- var integer3 = /^-?\d+$/;
4138
+ var integer6 = /^-?\d+$/;
4029
4139
  var number = /^-?\d+(?:\.\d+)?$/;
4030
4140
  var boolean = /^(?:true|false)$/i;
4031
4141
  var _null = /^null$/i;
@@ -4157,7 +4267,7 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
4157
4267
  bag.minimum = minimum;
4158
4268
  bag.maximum = maximum;
4159
4269
  if (isInt)
4160
- bag.pattern = integer3;
4270
+ bag.pattern = integer6;
4161
4271
  });
4162
4272
  inst._zod.check = (payload) => {
4163
4273
  const input = payload.value;
@@ -4864,7 +4974,7 @@ var $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => {
4864
4974
  $ZodStringFormat.init(inst, def);
4865
4975
  });
4866
4976
  var $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => {
4867
- def.pattern ?? (def.pattern = nanoid3);
4977
+ def.pattern ?? (def.pattern = nanoid6);
4868
4978
  $ZodStringFormat.init(inst, def);
4869
4979
  });
4870
4980
  var $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => {
@@ -14388,7 +14498,7 @@ __export(schemas_exports2, {
14388
14498
  map: () => map,
14389
14499
  meta: () => meta2,
14390
14500
  nan: () => nan,
14391
- nanoid: () => nanoid4,
14501
+ nanoid: () => nanoid7,
14392
14502
  nativeEnum: () => nativeEnum,
14393
14503
  never: () => never,
14394
14504
  nonoptional: () => nonoptional,
@@ -14763,7 +14873,7 @@ var ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => {
14763
14873
  $ZodNanoID.init(inst, def);
14764
14874
  ZodStringFormat.init(inst, def);
14765
14875
  });
14766
- function nanoid4(params) {
14876
+ function nanoid7(params) {
14767
14877
  return _nanoid(ZodNanoID, params);
14768
14878
  }
14769
14879
  var ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => {
@@ -16172,11 +16282,11 @@ config(en_default());
16172
16282
  // ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/index.js
16173
16283
  var zod_default = external_exports;
16174
16284
 
16175
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/data-table/schemas/views/display.js
16285
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.3/node_modules/@boltapp/bolt-core/dist/data-table/schemas/views/display.js
16176
16286
  var TABLE_VIEW_DISPLAY_TYPES = ["table", "fileSystem", "cards"];
16177
16287
  var boltTableView = zod_default.enum(TABLE_VIEW_DISPLAY_TYPES);
16178
16288
 
16179
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/data-table/schemas/views/file-system-node.js
16289
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.3/node_modules/@boltapp/bolt-core/dist/data-table/schemas/views/file-system-node.js
16180
16290
  var boltFileSystemNodeSchema = zod_default.lazy(() => zod_default.discriminatedUnion("type", [
16181
16291
  zod_default.object({
16182
16292
  id: zod_default.string(),
@@ -16191,7 +16301,7 @@ var boltFileSystemNodeSchema = zod_default.lazy(() => zod_default.discriminatedU
16191
16301
  })
16192
16302
  ]));
16193
16303
 
16194
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/data-table/schemas/views/display-config.js
16304
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.3/node_modules/@boltapp/bolt-core/dist/data-table/schemas/views/display-config.js
16195
16305
  var boltTableColumnConfigSchema = zod_default.record(zod_default.string(), zod_default.object({
16196
16306
  // Column sizing
16197
16307
  size: zod_default.number().optional(),
@@ -16226,7 +16336,7 @@ var boltTableViewDisplayConfigSchema = zod_default.discriminatedUnion("type", [
16226
16336
  })
16227
16337
  ]);
16228
16338
 
16229
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/data-table/table-action-schemas.js
16339
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.3/node_modules/@boltapp/bolt-core/dist/data-table/table-action-schemas.js
16230
16340
  var ACTION_TYPES = [
16231
16341
  "UPDATE_CELL",
16232
16342
  "ADD_ROW",
@@ -16479,72 +16589,72 @@ var BatchResponseSchema = zod_default.object({
16479
16589
  timestamp: zod_default.date()
16480
16590
  });
16481
16591
 
16482
- // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.1_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_5c1e7fdb59c20b93a5807ebf0427a7a0/node_modules/@boltapp/bolt-app-db/dist/client/schema/table-schema.js
16483
- import { relations } from "drizzle-orm";
16484
- import { index as index2, integer as integer4, sqliteTable as sqliteTable3, text as text3, uniqueIndex as uniqueIndex3 } from "drizzle-orm/sqlite-core";
16485
- import { nanoid as nanoid5 } from "nanoid";
16486
- var boltTables = sqliteTable3("bolt_tables", {
16487
- id: text3().primaryKey().$defaultFn(() => nanoid5()),
16488
- name: text3().notNull(),
16489
- label: text3().default("Untitled Table").notNull(),
16490
- description: text3(),
16491
- idField: text3().default("id").notNull(),
16492
- displayColumn: text3().notNull(),
16493
- columns: text3({ mode: "json" }).$type(),
16494
- rows: text3({ mode: "json" }).$type(),
16495
- projectId: text3().notNull().references(() => boltProjects.id, { onDelete: "cascade" }),
16496
- organizationId: text3(),
16497
- createdBy: text3().default("system").notNull(),
16498
- updatedBy: text3().default("system").notNull(),
16499
- createdAt: integer4({ mode: "timestamp" }),
16500
- updatedAt: integer4({ mode: "timestamp" })
16592
+ // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.6_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_f13d8938db1a5f59618ae6657194ac02/node_modules/@boltapp/bolt-app-db/dist/client/schema/table-schema.js
16593
+ import { relations as relations4 } from "drizzle-orm";
16594
+ import { index as index5, integer as integer7, sqliteTable as sqliteTable6, text as text6, uniqueIndex as uniqueIndex5 } from "drizzle-orm/sqlite-core";
16595
+ import { nanoid as nanoid8 } from "nanoid";
16596
+ var boltTables = sqliteTable6("bolt_tables", {
16597
+ id: text6().primaryKey().$defaultFn(() => nanoid8()),
16598
+ name: text6().notNull(),
16599
+ label: text6().default("Untitled Table").notNull(),
16600
+ description: text6(),
16601
+ idField: text6().default("id").notNull(),
16602
+ displayColumn: text6().notNull(),
16603
+ columns: text6({ mode: "json" }).$type(),
16604
+ rows: text6({ mode: "json" }).$type(),
16605
+ projectId: text6().notNull().references(() => boltProjects.id, { onDelete: "cascade" }),
16606
+ organizationId: text6(),
16607
+ createdBy: text6().default("system").notNull(),
16608
+ updatedBy: text6().default("system").notNull(),
16609
+ createdAt: integer7({ mode: "timestamp" }),
16610
+ updatedAt: integer7({ mode: "timestamp" })
16501
16611
  }, (table) => [
16502
- uniqueIndex3("bolt_tables_project_name_unique_idx").on(table.projectId, table.name),
16503
- index2("bolt_tables_project_idx").on(table.projectId)
16612
+ uniqueIndex5("bolt_tables_project_name_unique_idx").on(table.projectId, table.name),
16613
+ index5("bolt_tables_project_idx").on(table.projectId)
16504
16614
  ]);
16505
- var boltTableViews = sqliteTable3("bolt_table_views", {
16506
- id: text3().primaryKey().$defaultFn(() => nanoid5()),
16507
- name: text3().notNull(),
16508
- label: text3().default("Untitled View").notNull(),
16509
- tableId: text3().notNull().references(() => boltTables.id, { onDelete: "cascade" }),
16510
- description: text3(),
16511
- display: text3({ enum: TABLE_VIEW_DISPLAY_TYPES }).default("table").notNull(),
16512
- visibleColumnIds: text3({ mode: "json" }).$type().notNull(),
16513
- sorting: text3({ mode: "json" }).$type(),
16514
- showRowNumbers: integer4({ mode: "boolean" }),
16515
- rowHeight: integer4({ mode: "number" }),
16516
- displayConfig: text3({ mode: "json" }).$type().notNull(),
16517
- projectId: text3().references(() => boltProjects.id, { onDelete: "cascade" }),
16518
- organizationId: text3(),
16519
- createdBy: text3(),
16520
- createdAt: integer4({ mode: "timestamp" }),
16521
- updatedAt: integer4({ mode: "timestamp" })
16615
+ var boltTableViews = sqliteTable6("bolt_table_views", {
16616
+ id: text6().primaryKey().$defaultFn(() => nanoid8()),
16617
+ name: text6().notNull(),
16618
+ label: text6().default("Untitled View").notNull(),
16619
+ tableId: text6().notNull().references(() => boltTables.id, { onDelete: "cascade" }),
16620
+ description: text6(),
16621
+ display: text6({ enum: TABLE_VIEW_DISPLAY_TYPES }).default("table").notNull(),
16622
+ visibleColumnIds: text6({ mode: "json" }).$type().notNull(),
16623
+ sorting: text6({ mode: "json" }).$type(),
16624
+ showRowNumbers: integer7({ mode: "boolean" }),
16625
+ rowHeight: integer7({ mode: "number" }),
16626
+ displayConfig: text6({ mode: "json" }).$type().notNull(),
16627
+ projectId: text6().references(() => boltProjects.id, { onDelete: "cascade" }),
16628
+ organizationId: text6(),
16629
+ createdBy: text6(),
16630
+ createdAt: integer7({ mode: "timestamp" }),
16631
+ updatedAt: integer7({ mode: "timestamp" })
16522
16632
  }, (table) => [
16523
- index2("bolt_table_views_table_id_idx").on(table.tableId),
16524
- index2("bolt_table_views_project_idx").on(table.projectId)
16633
+ index5("bolt_table_views_table_id_idx").on(table.tableId),
16634
+ index5("bolt_table_views_project_idx").on(table.projectId)
16525
16635
  ]);
16526
- var boltTableOps = sqliteTable3("bolt_table_ops", {
16527
- id: text3().$defaultFn(() => nanoid5()),
16528
- serverSeq: integer4("server_seq").primaryKey({ autoIncrement: true }),
16529
- clientActionId: text3(),
16530
- type: text3({ enum: ACTION_TYPES }).notNull(),
16531
- rowId: text3(),
16532
- colId: text3(),
16533
- tableId: text3().notNull().references(() => boltTables.id, { onDelete: "cascade" }),
16534
- source: text3({ enum: ["client", "api", "server"] }).default("server").notNull(),
16535
- payload: text3({ mode: "json" }).$type().notNull(),
16536
- basisRowVersion: integer4("basis_row_version", { mode: "number" }),
16537
- basisTableVersion: integer4("basis_table_version", { mode: "number" }),
16538
- userId: text3().notNull(),
16539
- createdAt: integer4({ mode: "timestamp" })
16636
+ var boltTableOps = sqliteTable6("bolt_table_ops", {
16637
+ id: text6().$defaultFn(() => nanoid8()),
16638
+ serverSeq: integer7("server_seq").primaryKey({ autoIncrement: true }),
16639
+ clientActionId: text6(),
16640
+ type: text6({ enum: ACTION_TYPES }).notNull(),
16641
+ rowId: text6(),
16642
+ colId: text6(),
16643
+ tableId: text6().notNull().references(() => boltTables.id, { onDelete: "cascade" }),
16644
+ source: text6({ enum: ["client", "api", "server"] }).default("server").notNull(),
16645
+ payload: text6({ mode: "json" }).$type().notNull(),
16646
+ basisRowVersion: integer7("basis_row_version", { mode: "number" }),
16647
+ basisTableVersion: integer7("basis_table_version", { mode: "number" }),
16648
+ userId: text6().notNull(),
16649
+ createdAt: integer7({ mode: "timestamp" })
16540
16650
  }, (table) => [
16541
- index2("bolt_table_ops_table_seq_idx").on(table.tableId, table.serverSeq),
16542
- index2("bolt_table_ops_table_idx").on(table.tableId),
16543
- index2("bolt_table_ops_row_idx").on(table.rowId),
16544
- index2("bolt_table_ops_col_idx").on(table.colId),
16545
- index2("bolt_table_ops_type_idx").on(table.type)
16651
+ index5("bolt_table_ops_table_seq_idx").on(table.tableId, table.serverSeq),
16652
+ index5("bolt_table_ops_table_idx").on(table.tableId),
16653
+ index5("bolt_table_ops_row_idx").on(table.rowId),
16654
+ index5("bolt_table_ops_col_idx").on(table.colId),
16655
+ index5("bolt_table_ops_type_idx").on(table.type)
16546
16656
  ]);
16547
- var boltTablesRelations = relations(boltTables, ({ many, one }) => ({
16657
+ var boltTablesRelations = relations4(boltTables, ({ many, one }) => ({
16548
16658
  views: many(boltTableViews),
16549
16659
  ops: many(boltTableOps),
16550
16660
  project: one(boltProjects, {
@@ -16552,127 +16662,19 @@ var boltTablesRelations = relations(boltTables, ({ many, one }) => ({
16552
16662
  references: [boltProjects.id]
16553
16663
  })
16554
16664
  }));
16555
- var boltTableViewsRelations = relations(boltTableViews, ({ one }) => ({
16665
+ var boltTableViewsRelations = relations4(boltTableViews, ({ one }) => ({
16556
16666
  table: one(boltTables, {
16557
16667
  fields: [boltTableViews.tableId],
16558
16668
  references: [boltTables.id]
16559
16669
  })
16560
16670
  }));
16561
- var boltTableOpsRelations = relations(boltTableOps, ({ one }) => ({
16671
+ var boltTableOpsRelations = relations4(boltTableOps, ({ one }) => ({
16562
16672
  table: one(boltTables, {
16563
16673
  fields: [boltTableOps.tableId],
16564
16674
  references: [boltTables.id]
16565
16675
  })
16566
16676
  }));
16567
16677
 
16568
- // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.1_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_5c1e7fdb59c20b93a5807ebf0427a7a0/node_modules/@boltapp/bolt-app-db/dist/client/schema/app-schema.js
16569
- import { relations as relations2 } from "drizzle-orm";
16570
- import { index as index3, integer as integer5, sqliteTable as sqliteTable4, text as text4, uniqueIndex as uniqueIndex4 } from "drizzle-orm/sqlite-core";
16571
- import { nanoid as nanoid6 } from "nanoid";
16572
- var boltApps = sqliteTable4("bolt_apps", {
16573
- id: text4().primaryKey().$defaultFn(() => nanoid6()),
16574
- name: text4().notNull(),
16575
- title: text4().notNull(),
16576
- description: text4(),
16577
- status: text4({ enum: ["draft", "published", "archived"] }).default("draft").notNull(),
16578
- projectId: text4().notNull().references(() => boltProjects.id, { onDelete: "cascade" }),
16579
- createdAt: integer5({ mode: "timestamp" }),
16580
- updatedAt: integer5({ mode: "timestamp" }),
16581
- createdBy: text4().default("system").notNull(),
16582
- updatedBy: text4().default("system").notNull()
16583
- }, (table) => [
16584
- uniqueIndex4("bolt_apps_name_unique_idx").on(table.name),
16585
- index3("bolt_apps_project_id_idx").on(table.projectId),
16586
- index3("bolt_apps_status_idx").on(table.status)
16587
- ]);
16588
- var boltAppVersions = sqliteTable4("bolt_app_versions", {
16589
- id: text4().primaryKey().$defaultFn(() => nanoid6()),
16590
- appId: text4().notNull().references(() => boltApps.id, { onDelete: "cascade" }),
16591
- incrementalId: integer5({ mode: "number" }).notNull(),
16592
- publishedAt: integer5({ mode: "timestamp" }),
16593
- notes: text4(),
16594
- model: text4({ mode: "json" }).$type(),
16595
- s3Url: text4(),
16596
- createdAt: integer5({ mode: "timestamp" }),
16597
- updatedAt: integer5({ mode: "timestamp" }),
16598
- createdBy: text4().default("system").notNull(),
16599
- updatedBy: text4().default("system").notNull()
16600
- }, (table) => [
16601
- index3("bolt_app_versions_app_id_idx").on(table.appId),
16602
- uniqueIndex4("bolt_app_versions_app_incremental_idx").on(table.appId, table.incrementalId)
16603
- ]);
16604
- var boltAppsRelations = relations2(boltApps, ({ many, one }) => ({
16605
- versions: many(boltAppVersions),
16606
- project: one(boltProjects, {
16607
- fields: [boltApps.projectId],
16608
- references: [boltProjects.id]
16609
- })
16610
- }));
16611
- var boltAppVersionsRelations = relations2(boltAppVersions, ({ one }) => ({
16612
- app: one(boltApps, {
16613
- fields: [boltAppVersions.appId],
16614
- references: [boltApps.id]
16615
- })
16616
- }));
16617
-
16618
- // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.1_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_5c1e7fdb59c20b93a5807ebf0427a7a0/node_modules/@boltapp/bolt-app-db/dist/client/schema/data-store-schema.js
16619
- import { relations as relations3 } from "drizzle-orm";
16620
- import { index as index4, integer as integer6, sqliteTable as sqliteTable5, text as text5, uniqueIndex as uniqueIndex5 } from "drizzle-orm/sqlite-core";
16621
- import { nanoid as nanoid7 } from "nanoid";
16622
- var boltDataStores = sqliteTable5("bolt_data_stores", {
16623
- id: text5().primaryKey().$defaultFn(() => nanoid7()),
16624
- name: text5().notNull(),
16625
- label: text5().default("Untitled Store").notNull(),
16626
- description: text5(),
16627
- items: text5({ mode: "json" }).$type(),
16628
- data: text5({ mode: "json" }).$type().notNull(),
16629
- appId: text5("app_id").notNull(),
16630
- organizationId: text5("organization_id"),
16631
- createdBy: text5().default("system").notNull(),
16632
- updatedBy: text5().default("system").notNull(),
16633
- createdAt: integer6({ mode: "timestamp" }),
16634
- updatedAt: integer6({ mode: "timestamp" })
16635
- }, (table) => [
16636
- uniqueIndex5("bolt_data_stores_app_name_unique_idx").on(table.appId, table.name),
16637
- index4("bolt_data_stores_app_idx").on(table.appId)
16638
- ]);
16639
- var boltDataStoresRelations = relations3(boltDataStores, ({ one }) => ({
16640
- app: one(boltApps, {
16641
- fields: [boltDataStores.appId],
16642
- references: [boltApps.id]
16643
- })
16644
- }));
16645
-
16646
- // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.1_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_5c1e7fdb59c20b93a5807ebf0427a7a0/node_modules/@boltapp/bolt-app-db/dist/client/schema/file-schema.js
16647
- import { relations as relations4 } from "drizzle-orm";
16648
- import { index as index5, integer as integer7, sqliteTable as sqliteTable6, text as text6 } from "drizzle-orm/sqlite-core";
16649
- import { nanoid as nanoid8 } from "nanoid";
16650
- var boltFiles = sqliteTable6("bolt_files", {
16651
- id: text6().primaryKey().$defaultFn(() => nanoid8()),
16652
- appId: text6("app_id").notNull(),
16653
- organizationId: text6("organization_id"),
16654
- name: text6("name").notNull(),
16655
- url: text6("url").notNull(),
16656
- mimeType: text6("mime_type").notNull(),
16657
- extension: text6("extension"),
16658
- size: integer7("size"),
16659
- width: integer7("width"),
16660
- height: integer7("height"),
16661
- alt: text6("alt"),
16662
- source: text6("source", { enum: ["local", "remote"] }).default("local"),
16663
- storagePath: text6("storage_path").notNull(),
16664
- createdBy: text6("created_by").default("system").notNull(),
16665
- updatedBy: text6("updated_by").default("system"),
16666
- createdAt: integer7("created_at", { mode: "timestamp" }),
16667
- updatedAt: integer7("updated_at", { mode: "timestamp" })
16668
- }, (table) => [index5("bolt_files_app_idx").on(table.appId), index5("bolt_files_name_idx").on(table.name)]);
16669
- var boltFilesRelations = relations4(boltFiles, ({ one }) => ({
16670
- app: one(boltApps, {
16671
- fields: [boltFiles.appId],
16672
- references: [boltApps.id]
16673
- })
16674
- }));
16675
-
16676
16678
  // ../bolt-actions/dist/client/actions/app-actions.js
16677
16679
  import { eq } from "drizzle-orm";
16678
16680
  async function getApp(db, appId) {
@@ -27465,13 +27467,13 @@ function createFileService(adapter) {
27465
27467
  };
27466
27468
  }
27467
27469
 
27468
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/data-table/constants.js
27470
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.5/node_modules/@boltapp/bolt-core/dist/data-table/constants.js
27469
27471
  var DATA_TABLE_CONSTANTS = {
27470
27472
  /** Default column width in pixels */
27471
27473
  DEFAULT_COLUMN_WIDTH: 150
27472
27474
  };
27473
27475
 
27474
- // ../../node_modules/.pnpm/@boltapp+bolt-constants@0.0.0/node_modules/@boltapp/bolt-constants/dist/date-formats.js
27476
+ // ../../node_modules/.pnpm/@boltapp+bolt-constants@0.0.2/node_modules/@boltapp/bolt-constants/dist/date-formats.js
27475
27477
  var DATE_FORMATS = [
27476
27478
  { key: "m_d_yyyy", format: "M/d/yyyy", label: "1/31/2025", description: "Numeric US date" },
27477
27479
  { key: "m_d_yy", format: "M/d/yy", label: "1/31/25", description: "Numeric US date, short year" },
@@ -27573,7 +27575,7 @@ var DATE_FORMATS = [
27573
27575
  { key: "weekday_short", format: "EEE", label: "Fri", description: "Short weekday name" }
27574
27576
  ];
27575
27577
 
27576
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/inputs/input-format-registry.js
27578
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.5/node_modules/@boltapp/bolt-core/dist/inputs/input-format-registry.js
27577
27579
  var dateFormatOptions = [
27578
27580
  { value: "auto", label: "Auto (relative)", description: "Today, Yesterday, Jan 31, etc." },
27579
27581
  ...DATE_FORMATS.map((f2) => ({
@@ -27583,7 +27585,7 @@ var dateFormatOptions = [
27583
27585
  }))
27584
27586
  ];
27585
27587
 
27586
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/files/schemas.js
27588
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.5/node_modules/@boltapp/bolt-core/dist/files/schemas.js
27587
27589
  var fileRefSchema = external_exports.object({
27588
27590
  id: external_exports.string(),
27589
27591
  url: external_exports.string(),
@@ -27606,7 +27608,7 @@ var createFilePickerValueSchema = (meta3) => {
27606
27608
  return schema;
27607
27609
  };
27608
27610
 
27609
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/inputs/input-registry.js
27611
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.5/node_modules/@boltapp/bolt-core/dist/inputs/input-registry.js
27610
27612
  var DATE_FORMAT_KEYS = DATE_FORMATS.map((f2) => f2.key);
27611
27613
  var boltInputMetaBaseSchema = zod_default.object({
27612
27614
  label: zod_default.string().optional(),
@@ -28534,7 +28536,355 @@ var validationRuleSchema = zod_default.union([
28534
28536
  })
28535
28537
  ]);
28536
28538
 
28537
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/inputs/input-type-formatter.js
28539
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/collection/summarize-items.js
28540
+ function summarizeItems2(data, key, itemsToShow) {
28541
+ if (!data.length) {
28542
+ return "No items";
28543
+ }
28544
+ const effectiveItemsToShow = itemsToShow && itemsToShow < data.length ? itemsToShow : data.length;
28545
+ const itemsList = data.slice(0, effectiveItemsToShow).map((item) => item[key]).join(", ");
28546
+ const remainingItemCount = data.length - effectiveItemsToShow;
28547
+ return remainingItemCount > 0 ? `${itemsList} + ${remainingItemCount} other item${remainingItemCount > 1 ? "s" : ""}` : itemsList;
28548
+ }
28549
+
28550
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/date/date-to-string.js
28551
+ function dateToString2(date5) {
28552
+ const dateString = date5 ? date5.toISOString().split("T")[0] : "";
28553
+ return dateString ?? false;
28554
+ }
28555
+
28556
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/date/format-date.js
28557
+ var templateOptions2 = {
28558
+ common: ["dd", "monthName", "yyyy"],
28559
+ commonWithTime: ["dd", "monthName", "yyyy", "h", "m", "s"]
28560
+ };
28561
+ function formatDate2(date5, format2, join) {
28562
+ const options = {
28563
+ dd: date5.getDate().toString().padStart(2, "0"),
28564
+ mm: (date5.getMonth() + 1).toString().padStart(2, "0"),
28565
+ yy: date5.getFullYear().toString().slice(-2),
28566
+ yyyy: date5.getFullYear().toString(),
28567
+ dayName: date5.toLocaleString("en-US", { weekday: "long" }),
28568
+ monthName: date5.toLocaleString("en-US", { month: "long" }),
28569
+ h: date5.getHours().toString().padStart(2, "0"),
28570
+ m: date5.getMinutes().toString().padStart(2, "0"),
28571
+ s: date5.getSeconds().toString().padStart(2, "0")
28572
+ };
28573
+ if (typeof format2 === "string") {
28574
+ return templateOptions2[format2].map((f2) => options[f2] || "").join(join ?? " ");
28575
+ }
28576
+ return format2.map((f2) => options[f2] || "").join(join ?? " ");
28577
+ }
28578
+
28579
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/date/string-to-date.js
28580
+ function stringToDate2(dateString = "") {
28581
+ return new Date(dateString);
28582
+ }
28583
+
28584
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/date/subtract-days.js
28585
+ function subtractDays2(date5, days) {
28586
+ const result = new Date(date5);
28587
+ result.setDate(result.getDate() - days);
28588
+ return result;
28589
+ }
28590
+
28591
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/format/format-number.js
28592
+ function formatNumber2(amount, currency, options) {
28593
+ const { locale = "en-US", style = "currency", minimumFractionDigits = 0 } = options || {};
28594
+ const formatter = new Intl.NumberFormat(locale, {
28595
+ style,
28596
+ currency: style === "currency" ? currency.toUpperCase() : void 0,
28597
+ minimumFractionDigits
28598
+ });
28599
+ return formatter.format(amount / 100);
28600
+ }
28601
+
28602
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/format/to-kebab-case.js
28603
+ function toKebabCase2(input) {
28604
+ if (!input) {
28605
+ return "";
28606
+ }
28607
+ return input.trim().toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "");
28608
+ }
28609
+
28610
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/generation/generate-excerpt.js
28611
+ function generateExcerpt2(content) {
28612
+ const plainText = content.replace(/<\/?[^>]+(>|$)/g, "");
28613
+ const normalizedText = plainText.replace(/\s+/g, " ").trim();
28614
+ return normalizedText.slice(0, 200);
28615
+ }
28616
+
28617
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/generation/generate-random-email.js
28618
+ function generateRandomEmail2(length = 10) {
28619
+ const chars = "abcdefghijklmnopqrstuvwxyz0123456789";
28620
+ let randomString4 = "";
28621
+ for (let i2 = 0; i2 < length; i2++) {
28622
+ randomString4 += chars[Math.floor(Math.random() * chars.length)];
28623
+ }
28624
+ return `${randomString4}@test.com`;
28625
+ }
28626
+
28627
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/generation/generate-sequence.js
28628
+ function generateSequence2(length) {
28629
+ return Array.from({ length }, (_, i2) => i2 + 1);
28630
+ }
28631
+
28632
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/generation/generate-slug.js
28633
+ function generateSlug2(text11) {
28634
+ return text11.toLowerCase().trim().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
28635
+ }
28636
+
28637
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/generation/random-string.js
28638
+ function randomString3(size) {
28639
+ if (size % 2 !== 0)
28640
+ throw new Error("size must be even");
28641
+ const i2hex = (i2) => ("0" + i2.toString(16)).slice(-2);
28642
+ const r2 = (a2, i2) => a2 + i2hex(i2);
28643
+ const bytes = crypto.getRandomValues(new Uint8Array(Math.ceil(size / 2)));
28644
+ return Array.from(bytes).reduce(r2, "").slice(0, size);
28645
+ }
28646
+
28647
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/is-current-path.js
28648
+ function normalize2(path6) {
28649
+ const basePath = path6.split("?")[0]?.split("#")[0] ?? "";
28650
+ return basePath.replace(/\/+$/, "") || "/";
28651
+ }
28652
+ function isCurrentPath2(path6, url2) {
28653
+ return normalize2(path6) === normalize2(url2);
28654
+ }
28655
+ function isPartOfCurrentPath2(path6, url2) {
28656
+ const p2 = normalize2(path6);
28657
+ const u2 = normalize2(url2);
28658
+ if (u2 === "/")
28659
+ return p2 === "/";
28660
+ return p2 === u2 || p2.startsWith(`${u2}/`);
28661
+ }
28662
+
28663
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-currency.js
28664
+ function prettyCurrency2(props) {
28665
+ const { value, currency, locale, fromCents, decimalPlaces = "2", round = false } = props;
28666
+ let safeValue = (value ?? 0) / (fromCents ? 100 : 1);
28667
+ if (round && decimalPlaces !== "all" && decimalPlaces !== "none") {
28668
+ const places = Number(decimalPlaces);
28669
+ safeValue = Number(safeValue.toFixed(places));
28670
+ }
28671
+ if (round && decimalPlaces === "none") {
28672
+ safeValue = Math.round(safeValue);
28673
+ }
28674
+ let minimumFractionDigits;
28675
+ let maximumFractionDigits;
28676
+ switch (decimalPlaces) {
28677
+ case "all":
28678
+ break;
28679
+ case "none":
28680
+ minimumFractionDigits = 0;
28681
+ maximumFractionDigits = 0;
28682
+ break;
28683
+ default:
28684
+ const places = Number(decimalPlaces);
28685
+ minimumFractionDigits = places;
28686
+ maximumFractionDigits = places;
28687
+ break;
28688
+ }
28689
+ return new Intl.NumberFormat(locale, {
28690
+ style: "currency",
28691
+ currency,
28692
+ minimumFractionDigits,
28693
+ maximumFractionDigits
28694
+ }).format(safeValue);
28695
+ }
28696
+
28697
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-date.js
28698
+ function prettyDate2(date5, withHour = false) {
28699
+ const parsed = typeof date5 === "string" ? new Date(date5) : date5;
28700
+ if (!(parsed instanceof Date) || Number.isNaN(parsed.getTime())) {
28701
+ return "Invalid date";
28702
+ }
28703
+ const hour = withHour ? format(parsed, "h:mm a") : "";
28704
+ const now = /* @__PURE__ */ new Date();
28705
+ const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
28706
+ const target = new Date(parsed.getFullYear(), parsed.getMonth(), parsed.getDate());
28707
+ const diffDays = Math.round((today.getTime() - target.getTime()) / 864e5);
28708
+ if (isToday(parsed) || diffDays === 0)
28709
+ return `Today ${hour}`.trim();
28710
+ if (diffDays === 1)
28711
+ return `Yesterday ${hour}`.trim();
28712
+ if (diffDays === -1)
28713
+ return `Tomorrow ${hour}`.trim();
28714
+ if (isThisWeek(parsed))
28715
+ return `${format(parsed, `EEEE`)} ${hour}`.trim();
28716
+ if (isThisMonth(parsed))
28717
+ return `${format(parsed, `MMM do`)} ${hour}`.trim();
28718
+ if (isThisYear(parsed))
28719
+ return `${format(parsed, `MMM do`)} ${hour}`.trim();
28720
+ return `${format(parsed, `PP`)} ${hour}`.trim();
28721
+ }
28722
+
28723
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-file-size.js
28724
+ function prettyFileSize2(bytes) {
28725
+ const KB = 1024;
28726
+ const MB = KB * 1024;
28727
+ const GB = MB * 1024;
28728
+ if (bytes >= GB) {
28729
+ return `${(bytes / GB).toFixed(2)} GB`;
28730
+ } else if (bytes >= MB) {
28731
+ return `${(bytes / MB).toFixed(2)} MB`;
28732
+ } else if (bytes >= KB) {
28733
+ return `${(bytes / KB).toFixed(2)} KB`;
28734
+ } else {
28735
+ return `${bytes} bytes`;
28736
+ }
28737
+ }
28738
+
28739
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-number.js
28740
+ function prettyNumber2(props) {
28741
+ const { value, locale } = props;
28742
+ return new Intl.NumberFormat(locale).format(value ?? 0);
28743
+ }
28744
+
28745
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-text.js
28746
+ function prettyText2(input) {
28747
+ if (!input)
28748
+ return "";
28749
+ const replacedString = input.replace(/_/g, " ");
28750
+ const capitalizedString = replacedString.charAt(0).toUpperCase() + replacedString.slice(1);
28751
+ return capitalizedString;
28752
+ }
28753
+
28754
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-timestamp.js
28755
+ function prettyTimeStamp2() {
28756
+ const now = /* @__PURE__ */ new Date();
28757
+ const day = now.toLocaleDateString("en-US", { weekday: "short" }).toLowerCase();
28758
+ const date5 = now.getDate().toString().padStart(2, "0");
28759
+ const month = now.toLocaleDateString("en-US", { month: "short" }).toLowerCase();
28760
+ const year = now.getFullYear();
28761
+ let hours = now.getHours();
28762
+ const minutes = now.getMinutes().toString().padStart(2, "0");
28763
+ const ampm = hours >= 12 ? "PM" : "AM";
28764
+ hours = hours % 12 || 12;
28765
+ const formattedHour = hours.toString().padStart(2, "0");
28766
+ return `${day}-${date5}-${month}-${year}-${formattedHour}-${minutes}${ampm}`;
28767
+ }
28768
+
28769
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/pretty/pretty-unit.js
28770
+ function prettyUnit2(props) {
28771
+ const { value, unit, locale } = props;
28772
+ return new Intl.NumberFormat(locale, {
28773
+ style: "unit",
28774
+ unit
28775
+ }).format(value ?? 0);
28776
+ }
28777
+
28778
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/text/capitalize-first-letter.js
28779
+ function capitalizeFirstLetter2(input) {
28780
+ if (!input.length) {
28781
+ return input;
28782
+ }
28783
+ return input.charAt(0).toUpperCase() + input.slice(1);
28784
+ }
28785
+
28786
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/text/change-format.js
28787
+ function changeFormat2(value) {
28788
+ if (!value?.length) {
28789
+ return "";
28790
+ }
28791
+ return `${value.charAt(0).toUpperCase()}${value.slice(1).replace(/_|-/g, " ")}`;
28792
+ }
28793
+
28794
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/text/get-two-first-letters-from-string.js
28795
+ function getTwoFirstLettersFromString2(input) {
28796
+ if (!input) {
28797
+ return "";
28798
+ }
28799
+ const words = input.trim().split(/\s+/);
28800
+ if (!words.length) {
28801
+ return "";
28802
+ }
28803
+ if (words.length === 1) {
28804
+ if (!words[0]) {
28805
+ return false;
28806
+ }
28807
+ return words[0].charAt(0);
28808
+ }
28809
+ if (!words[0] || !words[1]) {
28810
+ return false;
28811
+ }
28812
+ return words[0].charAt(0) + words[1].charAt(0);
28813
+ }
28814
+
28815
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/text/truncate.js
28816
+ function truncate2(str, length) {
28817
+ if (typeof str === "string" && str.length > length) {
28818
+ return `${str.slice(0, length)}...`;
28819
+ }
28820
+ return str;
28821
+ }
28822
+
28823
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/transform/convert-to-csv.js
28824
+ function convertToCsv2({ data, schema, headers, options }) {
28825
+ const escapeCsv = (value) => {
28826
+ let str = value instanceof Date ? value.toISOString() : value == null ? "" : String(value);
28827
+ return /[",\n]/.test(str) ? `"${str.replace(/"/g, '""')}"` : str;
28828
+ };
28829
+ if (data.length === 0)
28830
+ return "";
28831
+ const firstMapped = schema(data[0], 0);
28832
+ const headerList = headers ? [...headers] : Object.keys(firstMapped);
28833
+ const keySet = new Set(headerList);
28834
+ const ensureSameKeys = (row, idx) => {
28835
+ const rowKeys = Object.keys(row);
28836
+ if (rowKeys.length !== headerList.length || rowKeys.some((k2) => !keySet.has(k2))) {
28837
+ throw new Error(`Row ${idx} schema keys differ from headers. Expected [${headerList.join(", ")}], got [${rowKeys.join(", ")}].`);
28838
+ }
28839
+ };
28840
+ const lines = [];
28841
+ lines.push(headerList.join(","));
28842
+ const limit = options?.maxRows ? Math.min(data.length, options.maxRows) : data.length;
28843
+ for (let i2 = 0; i2 < limit; i2++) {
28844
+ const mapped = schema(data[i2], i2);
28845
+ ensureSameKeys(mapped, i2);
28846
+ lines.push(headerList.map((h2) => escapeCsv(mapped[h2])).join(","));
28847
+ }
28848
+ return lines.join("\n");
28849
+ }
28850
+
28851
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/url/decode-url-text.js
28852
+ function decodeUrlText2(encodedText) {
28853
+ return decodeURIComponent(encodedText);
28854
+ }
28855
+
28856
+ // ../../node_modules/.pnpm/@boltapp+bolt-helpers@0.0.6/node_modules/@boltapp/bolt-helpers/dist/index.js
28857
+ var Helpers2 = {
28858
+ isCurrentPath: isCurrentPath2,
28859
+ isPartOfCurrentPath: isPartOfCurrentPath2,
28860
+ capitalizeFirstLetter: capitalizeFirstLetter2,
28861
+ generateExcerpt: generateExcerpt2,
28862
+ prettyText: prettyText2,
28863
+ prettyTimeStamp: prettyTimeStamp2,
28864
+ prettyDate: prettyDate2,
28865
+ prettyFileSize: prettyFileSize2,
28866
+ prettyNumber: prettyNumber2,
28867
+ prettyCurrency: prettyCurrency2,
28868
+ prettyUnit: prettyUnit2,
28869
+ formatDate: formatDate2,
28870
+ toKebabCase: toKebabCase2,
28871
+ formatNumber: formatNumber2,
28872
+ randomString: randomString3,
28873
+ generateSlug: generateSlug2,
28874
+ generateRandomEmail: generateRandomEmail2,
28875
+ generateSequence: generateSequence2,
28876
+ convertToCsv: convertToCsv2,
28877
+ changeFormat: changeFormat2,
28878
+ truncate: truncate2,
28879
+ getTwoFirstLettersFromString: getTwoFirstLettersFromString2,
28880
+ summarizeItems: summarizeItems2,
28881
+ decodeUrlText: decodeUrlText2,
28882
+ subtractDays: subtractDays2,
28883
+ stringToDate: stringToDate2,
28884
+ dateToString: dateToString2
28885
+ };
28886
+
28887
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.5/node_modules/@boltapp/bolt-core/dist/inputs/input-type-formatter.js
28538
28888
  var getInputTypeFormatter = {
28539
28889
  text: (value, _formatConfig) => {
28540
28890
  if (value == null)
@@ -28591,7 +28941,7 @@ var getInputTypeFormatter = {
28591
28941
  return String(value);
28592
28942
  if (formatConfig?.dateFormat) {
28593
28943
  if (formatConfig.dateFormat === "auto") {
28594
- return Helpers.prettyDate(date5);
28944
+ return Helpers2.prettyDate(date5);
28595
28945
  }
28596
28946
  const dateFormatObj = DATE_FORMATS.find((f2) => f2.key === formatConfig.dateFormat);
28597
28947
  if (dateFormatObj?.format) {
@@ -28618,7 +28968,7 @@ var getInputTypeFormatter = {
28618
28968
  return "";
28619
28969
  if (formatConfig?.dateFormat) {
28620
28970
  if (formatConfig.dateFormat === "auto") {
28621
- return Helpers.prettyDate(d2);
28971
+ return Helpers2.prettyDate(d2);
28622
28972
  }
28623
28973
  const dateFormatObj = DATE_FORMATS.find((f2) => f2.key === formatConfig.dateFormat);
28624
28974
  if (dateFormatObj?.format) {
@@ -28881,7 +29231,7 @@ var getInputTypeFormatter = {
28881
29231
  }
28882
29232
  };
28883
29233
 
28884
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/data-types/data-type-registry.js
29234
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.5/node_modules/@boltapp/bolt-core/dist/data-types/data-type-registry.js
28885
29235
  var boltDataTypes = ["string", "number", "boolean", "enum", "array", "object"];
28886
29236
  var boltDataTypesSchema = external_exports.enum(boltDataTypes);
28887
29237
  var TRUTHY_STRING_VALUES = ["true", "yes", "1", "y", "on"];
@@ -29247,7 +29597,7 @@ var boltDataTypeRegistry = {
29247
29597
  }
29248
29598
  };
29249
29599
 
29250
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/inputs/input-type-handler.js
29600
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.5/node_modules/@boltapp/bolt-core/dist/inputs/input-type-handler.js
29251
29601
  var inputTypeHandlerCache = /* @__PURE__ */ new Map();
29252
29602
  function getInputTypeHandler(inputType) {
29253
29603
  const cached2 = inputTypeHandlerCache.get(inputType);
@@ -29327,7 +29677,7 @@ function getInputTypeHandler(inputType) {
29327
29677
  return handler;
29328
29678
  }
29329
29679
 
29330
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/data-table/table-actions.js
29680
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.5/node_modules/@boltapp/bolt-core/dist/data-table/table-actions.js
29331
29681
  import { nanoid as nanoid10 } from "nanoid";
29332
29682
  function createCellValue(rawInput, column, options) {
29333
29683
  const handler = getInputTypeHandler(column.schema.input.inputType);
@@ -30805,7 +31155,7 @@ function createClientBoltInstance(options) {
30805
31155
  };
30806
31156
  }
30807
31157
 
30808
- // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.1_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_5c1e7fdb59c20b93a5807ebf0427a7a0/node_modules/@boltapp/bolt-app-db/dist/cloud-app/schema/index.js
31158
+ // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.6_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_f13d8938db1a5f59618ae6657194ac02/node_modules/@boltapp/bolt-app-db/dist/cloud-app/schema/index.js
30809
31159
  var schema_exports2 = {};
30810
31160
  __export(schema_exports2, {
30811
31161
  appStatusEnum: () => appStatusEnum,
@@ -30828,7 +31178,12 @@ __export(schema_exports2, {
30828
31178
  projectsRelations: () => projectsRelations
30829
31179
  });
30830
31180
 
30831
- // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.1_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_5c1e7fdb59c20b93a5807ebf0427a7a0/node_modules/@boltapp/bolt-app-db/dist/cloud-app/schema/schema.js
31181
+ // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.6_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_f13d8938db1a5f59618ae6657194ac02/node_modules/@boltapp/bolt-app-db/dist/cloud-app/schema/data-store-schemas.js
31182
+ import { relations as relations6 } from "drizzle-orm";
31183
+ import { index as index7, jsonb, pgTable as pgTable2, text as text8, timestamp as timestamp2, uniqueIndex as uniqueIndex7 } from "drizzle-orm/pg-core";
31184
+ import { nanoid as nanoid13 } from "nanoid";
31185
+
31186
+ // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.6_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_f13d8938db1a5f59618ae6657194ac02/node_modules/@boltapp/bolt-app-db/dist/cloud-app/schema/schema.js
30832
31187
  import { relations as relations5 } from "drizzle-orm";
30833
31188
  import { index as index6, pgEnum, pgTable, text as text7, timestamp, uniqueIndex as uniqueIndex6 } from "drizzle-orm/pg-core";
30834
31189
  import { nanoid as nanoid12 } from "nanoid";
@@ -30872,10 +31227,7 @@ var appsRelations = relations5(apps, ({ one }) => ({
30872
31227
  })
30873
31228
  }));
30874
31229
 
30875
- // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.1_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_5c1e7fdb59c20b93a5807ebf0427a7a0/node_modules/@boltapp/bolt-app-db/dist/cloud-app/schema/data-store-schemas.js
30876
- import { relations as relations6 } from "drizzle-orm";
30877
- import { index as index7, jsonb, pgTable as pgTable2, text as text8, timestamp as timestamp2, uniqueIndex as uniqueIndex7 } from "drizzle-orm/pg-core";
30878
- import { nanoid as nanoid13 } from "nanoid";
31230
+ // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.6_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_f13d8938db1a5f59618ae6657194ac02/node_modules/@boltapp/bolt-app-db/dist/cloud-app/schema/data-store-schemas.js
30879
31231
  var boltDataStores3 = pgTable2("bolt_data_stores", {
30880
31232
  id: text8("id").primaryKey().$defaultFn(() => nanoid13()),
30881
31233
  name: text8("name").notNull(),
@@ -30901,110 +31253,76 @@ var boltDataStoresRelations2 = relations6(boltDataStores3, ({ one }) => ({
30901
31253
  })
30902
31254
  }));
30903
31255
 
30904
- // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.1_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_5c1e7fdb59c20b93a5807ebf0427a7a0/node_modules/@boltapp/bolt-app-db/dist/cloud-app/schema/file-schemas.js
31256
+ // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.6_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_f13d8938db1a5f59618ae6657194ac02/node_modules/@boltapp/bolt-app-db/dist/cloud-app/schema/data-table-schemas.js
30905
31257
  import { relations as relations7 } from "drizzle-orm";
30906
- import { index as index8, integer as integer8, pgTable as pgTable3, text as text9, timestamp as timestamp3 } from "drizzle-orm/pg-core";
31258
+ import { boolean as boolean4, index as index8, integer as integer8, jsonb as jsonb2, pgEnum as pgEnum2, pgTable as pgTable3, serial, text as text9, timestamp as timestamp3, uniqueIndex as uniqueIndex8 } from "drizzle-orm/pg-core";
30907
31259
  import { nanoid as nanoid14 } from "nanoid";
30908
- var boltFiles4 = pgTable3("bolt_files", {
30909
- id: text9("id").primaryKey().$defaultFn(() => nanoid14()),
30910
- appId: text9("app_id").notNull().references(() => apps.id, { onDelete: "cascade" }),
30911
- organizationId: text9("organization_id"),
30912
- name: text9("name").notNull(),
30913
- url: text9("url").notNull(),
30914
- mimeType: text9("mime_type").notNull(),
30915
- extension: text9("extension"),
30916
- size: integer8("size"),
30917
- width: integer8("width"),
30918
- height: integer8("height"),
30919
- alt: text9("alt"),
30920
- source: text9("source", { enum: ["local", "remote"] }).default("local"),
30921
- storagePath: text9("storage_path").notNull(),
30922
- createdBy: text9("created_by").default("system").notNull(),
30923
- updatedBy: text9("updated_by").default("system"),
30924
- createdAt: timestamp3("created_at").defaultNow(),
30925
- updatedAt: timestamp3("updated_at").defaultNow()
30926
- }, (table) => [
30927
- index8("bolt_files_app_idx").on(table.appId),
30928
- index8("bolt_files_org_idx").on(table.organizationId),
30929
- index8("bolt_files_name_idx").on(table.name)
30930
- ]);
30931
- var boltFilesRelations2 = relations7(boltFiles4, ({ one }) => ({
30932
- app: one(apps, {
30933
- fields: [boltFiles4.appId],
30934
- references: [apps.id]
30935
- })
30936
- }));
30937
-
30938
- // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.1_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_5c1e7fdb59c20b93a5807ebf0427a7a0/node_modules/@boltapp/bolt-app-db/dist/cloud-app/schema/data-table-schemas.js
30939
- import { relations as relations8 } from "drizzle-orm";
30940
- import { boolean as boolean4, index as index9, integer as integer9, jsonb as jsonb2, pgEnum as pgEnum2, pgTable as pgTable4, serial, text as text10, timestamp as timestamp4, uniqueIndex as uniqueIndex8 } from "drizzle-orm/pg-core";
30941
- import { nanoid as nanoid15 } from "nanoid";
30942
31260
  var boltTableDisplayEnum = pgEnum2("bolt_table_display", TABLE_VIEW_DISPLAY_TYPES);
30943
31261
  var boltTableOpSourceEnum = pgEnum2("bolt_table_op_source", ["client", "api", "server"]);
30944
31262
  var boltTableOpTypeEnum = pgEnum2("bolt_table_op_type", ACTION_TYPES);
30945
- var boltTables3 = pgTable4("bolt_tables", {
30946
- id: text10("id").primaryKey().$defaultFn(() => nanoid15()),
30947
- name: text10("name").notNull(),
30948
- label: text10("label").default("Untitled Table").notNull(),
30949
- description: text10("description"),
30950
- idField: text10("id_field").default("id").notNull(),
30951
- displayColumn: text10("display_column").notNull(),
31263
+ var boltTables3 = pgTable3("bolt_tables", {
31264
+ id: text9("id").primaryKey().$defaultFn(() => nanoid14()),
31265
+ name: text9("name").notNull(),
31266
+ label: text9("label").default("Untitled Table").notNull(),
31267
+ description: text9("description"),
31268
+ idField: text9("id_field").default("id").notNull(),
31269
+ displayColumn: text9("display_column").notNull(),
30952
31270
  columns: jsonb2("columns").$type(),
30953
31271
  rows: jsonb2("rows").$type(),
30954
- projectId: text10("project_id").notNull().references(() => projects.id, { onDelete: "cascade" }),
30955
- organizationId: text10("organization_id"),
30956
- createdBy: text10("created_by").default("system").notNull(),
30957
- updatedBy: text10("updated_by").default("system").notNull(),
30958
- createdAt: timestamp4("created_at").defaultNow(),
30959
- updatedAt: timestamp4("updated_at").defaultNow()
31272
+ projectId: text9("project_id").notNull().references(() => projects.id, { onDelete: "cascade" }),
31273
+ organizationId: text9("organization_id"),
31274
+ createdBy: text9("created_by").default("system").notNull(),
31275
+ updatedBy: text9("updated_by").default("system").notNull(),
31276
+ createdAt: timestamp3("created_at").defaultNow(),
31277
+ updatedAt: timestamp3("updated_at").defaultNow()
30960
31278
  }, (table) => [
30961
31279
  uniqueIndex8("bolt_tables_project_name_unique_idx").on(table.projectId, table.name),
30962
- index9("bolt_tables_project_idx").on(table.projectId),
30963
- index9("bolt_tables_organization_idx").on(table.organizationId)
31280
+ index8("bolt_tables_project_idx").on(table.projectId),
31281
+ index8("bolt_tables_organization_idx").on(table.organizationId)
30964
31282
  ]);
30965
- var boltTableViews3 = pgTable4("bolt_table_views", {
30966
- id: text10("id").primaryKey().$defaultFn(() => nanoid15()),
30967
- name: text10("name").notNull(),
30968
- label: text10("label").default("Untitled View").notNull(),
30969
- tableId: text10("table_id").notNull().references(() => boltTables3.id, { onDelete: "cascade" }),
30970
- description: text10("description"),
31283
+ var boltTableViews3 = pgTable3("bolt_table_views", {
31284
+ id: text9("id").primaryKey().$defaultFn(() => nanoid14()),
31285
+ name: text9("name").notNull(),
31286
+ label: text9("label").default("Untitled View").notNull(),
31287
+ tableId: text9("table_id").notNull().references(() => boltTables3.id, { onDelete: "cascade" }),
31288
+ description: text9("description"),
30971
31289
  display: boltTableDisplayEnum("display").default("table").notNull(),
30972
31290
  visibleColumnIds: jsonb2("visible_column_ids").$type().notNull(),
30973
31291
  sorting: jsonb2("sorting").$type(),
30974
31292
  showRowNumbers: boolean4("show_row_numbers"),
30975
- rowHeight: integer9("row_height"),
31293
+ rowHeight: integer8("row_height"),
30976
31294
  displayConfig: jsonb2("display_config").$type().notNull(),
30977
- projectId: text10("project_id").references(() => projects.id, { onDelete: "cascade" }),
30978
- organizationId: text10("organization_id"),
30979
- createdBy: text10("created_by"),
30980
- createdAt: timestamp4("created_at").defaultNow(),
30981
- updatedAt: timestamp4("updated_at").defaultNow()
31295
+ projectId: text9("project_id").references(() => projects.id, { onDelete: "cascade" }),
31296
+ organizationId: text9("organization_id"),
31297
+ createdBy: text9("created_by"),
31298
+ createdAt: timestamp3("created_at").defaultNow(),
31299
+ updatedAt: timestamp3("updated_at").defaultNow()
30982
31300
  }, (table) => [
30983
- index9("bolt_table_views_table_id_idx").on(table.tableId),
30984
- index9("bolt_table_views_project_idx").on(table.projectId)
31301
+ index8("bolt_table_views_table_id_idx").on(table.tableId),
31302
+ index8("bolt_table_views_project_idx").on(table.projectId)
30985
31303
  ]);
30986
- var boltTableOps3 = pgTable4("bolt_table_ops", {
30987
- id: text10("id").notNull().$defaultFn(() => nanoid15()),
31304
+ var boltTableOps3 = pgTable3("bolt_table_ops", {
31305
+ id: text9("id").notNull().$defaultFn(() => nanoid14()),
30988
31306
  serverSeq: serial("server_seq").primaryKey(),
30989
- clientActionId: text10("client_action_id"),
31307
+ clientActionId: text9("client_action_id"),
30990
31308
  type: boltTableOpTypeEnum("type").notNull(),
30991
- rowId: text10("row_id"),
30992
- colId: text10("col_id"),
30993
- tableId: text10("table_id").notNull().references(() => boltTables3.id, { onDelete: "cascade" }),
31309
+ rowId: text9("row_id"),
31310
+ colId: text9("col_id"),
31311
+ tableId: text9("table_id").notNull().references(() => boltTables3.id, { onDelete: "cascade" }),
30994
31312
  source: boltTableOpSourceEnum("source").default("server").notNull(),
30995
31313
  payload: jsonb2("payload").$type().notNull(),
30996
- basisRowVersion: integer9("basis_row_version"),
30997
- basisTableVersion: integer9("basis_table_version"),
30998
- userId: text10("user_id").notNull(),
30999
- createdAt: timestamp4("created_at").defaultNow()
31314
+ basisRowVersion: integer8("basis_row_version"),
31315
+ basisTableVersion: integer8("basis_table_version"),
31316
+ userId: text9("user_id").notNull(),
31317
+ createdAt: timestamp3("created_at").defaultNow()
31000
31318
  }, (table) => [
31001
- index9("bolt_table_ops_table_seq_idx").on(table.tableId, table.serverSeq),
31002
- index9("bolt_table_ops_table_idx").on(table.tableId),
31003
- index9("bolt_table_ops_row_idx").on(table.rowId),
31004
- index9("bolt_table_ops_col_idx").on(table.colId),
31005
- index9("bolt_table_ops_type_idx").on(table.type)
31319
+ index8("bolt_table_ops_table_seq_idx").on(table.tableId, table.serverSeq),
31320
+ index8("bolt_table_ops_table_idx").on(table.tableId),
31321
+ index8("bolt_table_ops_row_idx").on(table.rowId),
31322
+ index8("bolt_table_ops_col_idx").on(table.colId),
31323
+ index8("bolt_table_ops_type_idx").on(table.type)
31006
31324
  ]);
31007
- var boltTablesRelations2 = relations8(boltTables3, ({ many, one }) => ({
31325
+ var boltTablesRelations2 = relations7(boltTables3, ({ many, one }) => ({
31008
31326
  views: many(boltTableViews3),
31009
31327
  ops: many(boltTableOps3),
31010
31328
  project: one(projects, {
@@ -31012,19 +31330,53 @@ var boltTablesRelations2 = relations8(boltTables3, ({ many, one }) => ({
31012
31330
  references: [projects.id]
31013
31331
  })
31014
31332
  }));
31015
- var boltTableViewsRelations2 = relations8(boltTableViews3, ({ one }) => ({
31333
+ var boltTableViewsRelations2 = relations7(boltTableViews3, ({ one }) => ({
31016
31334
  table: one(boltTables3, {
31017
31335
  fields: [boltTableViews3.tableId],
31018
31336
  references: [boltTables3.id]
31019
31337
  })
31020
31338
  }));
31021
- var boltTableOpsRelations2 = relations8(boltTableOps3, ({ one }) => ({
31339
+ var boltTableOpsRelations2 = relations7(boltTableOps3, ({ one }) => ({
31022
31340
  table: one(boltTables3, {
31023
31341
  fields: [boltTableOps3.tableId],
31024
31342
  references: [boltTables3.id]
31025
31343
  })
31026
31344
  }));
31027
31345
 
31346
+ // ../../node_modules/.pnpm/@boltapp+bolt-app-db@0.0.6_@types+better-sqlite3@7.6.13_@types+pg@8.16.0_better-sqlite3_f13d8938db1a5f59618ae6657194ac02/node_modules/@boltapp/bolt-app-db/dist/cloud-app/schema/file-schemas.js
31347
+ import { relations as relations8 } from "drizzle-orm";
31348
+ import { index as index9, integer as integer9, pgTable as pgTable4, text as text10, timestamp as timestamp4 } from "drizzle-orm/pg-core";
31349
+ import { nanoid as nanoid15 } from "nanoid";
31350
+ var boltFiles4 = pgTable4("bolt_files", {
31351
+ id: text10("id").primaryKey().$defaultFn(() => nanoid15()),
31352
+ appId: text10("app_id").notNull().references(() => apps.id, { onDelete: "cascade" }),
31353
+ organizationId: text10("organization_id"),
31354
+ name: text10("name").notNull(),
31355
+ url: text10("url").notNull(),
31356
+ mimeType: text10("mime_type").notNull(),
31357
+ extension: text10("extension"),
31358
+ size: integer9("size"),
31359
+ width: integer9("width"),
31360
+ height: integer9("height"),
31361
+ alt: text10("alt"),
31362
+ source: text10("source", { enum: ["local", "remote"] }).default("local"),
31363
+ storagePath: text10("storage_path").notNull(),
31364
+ createdBy: text10("created_by").default("system").notNull(),
31365
+ updatedBy: text10("updated_by").default("system"),
31366
+ createdAt: timestamp4("created_at").defaultNow(),
31367
+ updatedAt: timestamp4("updated_at").defaultNow()
31368
+ }, (table) => [
31369
+ index9("bolt_files_app_idx").on(table.appId),
31370
+ index9("bolt_files_org_idx").on(table.organizationId),
31371
+ index9("bolt_files_name_idx").on(table.name)
31372
+ ]);
31373
+ var boltFilesRelations2 = relations8(boltFiles4, ({ one }) => ({
31374
+ app: one(apps, {
31375
+ fields: [boltFiles4.appId],
31376
+ references: [apps.id]
31377
+ })
31378
+ }));
31379
+
31028
31380
  // ../bolt-actions/dist/cloud/actions/app-actions.js
31029
31381
  import { and as and4, eq as eq7 } from "drizzle-orm";
31030
31382
 
@@ -31787,7 +32139,7 @@ import { exec as exec2 } from "child_process";
31787
32139
  import { promisify as promisify2 } from "util";
31788
32140
  var execAsync2 = promisify2(exec2);
31789
32141
 
31790
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/data-stores/data-store-actions.js
32142
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.5/node_modules/@boltapp/bolt-core/dist/data-stores/data-store-actions.js
31791
32143
  var TEMPLATE_APP_CONFIG = {
31792
32144
  name: "app_config",
31793
32145
  label: "App Config",
@@ -31835,7 +32187,7 @@ var TEMPLATE_APP_CONFIG = {
31835
32187
  // },
31836
32188
  };
31837
32189
 
31838
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/data-stores/schemas.js
32190
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.5/node_modules/@boltapp/bolt-core/dist/data-stores/schemas.js
31839
32191
  var dataStoreSchemaItemSchema = external_exports.object({
31840
32192
  id: external_exports.string(),
31841
32193
  label: external_exports.string(),
@@ -31881,13 +32233,67 @@ var createDataStoreInputSchema = external_exports.object({
31881
32233
  }).optional()
31882
32234
  });
31883
32235
 
31884
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/data-table/schemas/primitives/sorting.js
32236
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.5/node_modules/@boltapp/bolt-core/dist/data-table/schemas/primitives/sorting.js
31885
32237
  var boltTableViewSortingSchema = zod_default.object({
31886
32238
  columnId: zod_default.string(),
31887
32239
  direction: zod_default.enum(["asc", "desc"])
31888
32240
  });
31889
32241
 
31890
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/data-table/schemas/views/view.js
32242
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.5/node_modules/@boltapp/bolt-core/dist/data-table/schemas/views/display.js
32243
+ var TABLE_VIEW_DISPLAY_TYPES2 = ["table", "fileSystem", "cards"];
32244
+ var boltTableView2 = zod_default.enum(TABLE_VIEW_DISPLAY_TYPES2);
32245
+
32246
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.5/node_modules/@boltapp/bolt-core/dist/data-table/schemas/views/file-system-node.js
32247
+ var boltFileSystemNodeSchema2 = zod_default.lazy(() => zod_default.discriminatedUnion("type", [
32248
+ zod_default.object({
32249
+ id: zod_default.string(),
32250
+ type: zod_default.literal("folder"),
32251
+ label: zod_default.string(),
32252
+ items: zod_default.array(boltFileSystemNodeSchema2).optional()
32253
+ }),
32254
+ zod_default.object({
32255
+ id: zod_default.string(),
32256
+ type: zod_default.literal("rowRef"),
32257
+ rowId: zod_default.string()
32258
+ })
32259
+ ]));
32260
+
32261
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.5/node_modules/@boltapp/bolt-core/dist/data-table/schemas/views/display-config.js
32262
+ var boltTableColumnConfigSchema2 = zod_default.record(zod_default.string(), zod_default.object({
32263
+ // Column sizing
32264
+ size: zod_default.number().optional(),
32265
+ minSize: zod_default.number().optional(),
32266
+ maxSize: zod_default.number().optional(),
32267
+ enableResizing: zod_default.boolean().optional(),
32268
+ wrap: zod_default.boolean().optional(),
32269
+ // Column-specific filters/formatting
32270
+ customLabel: zod_default.string().optional()
32271
+ // Override default label in this view
32272
+ }));
32273
+ var boltTableViewDisplayConfigSchema2 = zod_default.discriminatedUnion("type", [
32274
+ zod_default.object({
32275
+ type: zod_default.literal("table"),
32276
+ view: zod_default.object({
32277
+ config: boltTableColumnConfigSchema2
32278
+ })
32279
+ }),
32280
+ zod_default.object({
32281
+ type: zod_default.literal("cards"),
32282
+ view: zod_default.object({})
32283
+ }),
32284
+ zod_default.object({
32285
+ type: zod_default.literal("fileSystem"),
32286
+ view: zod_default.object({
32287
+ config: zod_default.object({
32288
+ /** Column IDs to display for each row, in order */
32289
+ visibleColumnIds: zod_default.array(zod_default.string())
32290
+ }),
32291
+ roots: zod_default.array(boltFileSystemNodeSchema2)
32292
+ })
32293
+ })
32294
+ ]);
32295
+
32296
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.5/node_modules/@boltapp/bolt-core/dist/data-table/schemas/views/view.js
31891
32297
  var boltTableViewSchema = zod_default.object({
31892
32298
  /** The id is auto generated. It should not be used in the sdk, or queries that devs can use. */
31893
32299
  id: zod_default.string(),
@@ -31896,7 +32302,7 @@ var boltTableViewSchema = zod_default.object({
31896
32302
  label: zod_default.string(),
31897
32303
  tableId: zod_default.string(),
31898
32304
  description: zod_default.string().nullable().optional(),
31899
- display: boltTableView,
32305
+ display: boltTableView2,
31900
32306
  /** Column visibility and ordering */
31901
32307
  visibleColumnIds: zod_default.array(zod_default.string()),
31902
32308
  /** Sorting */
@@ -31913,13 +32319,13 @@ var boltTableViewSchema = zod_default.object({
31913
32319
  createdAt: zod_default.date().nullable(),
31914
32320
  updatedAt: zod_default.date().nullable(),
31915
32321
  /** Display-specific configuration (table grid, file system, etc.) */
31916
- displayConfig: boltTableViewDisplayConfigSchema
32322
+ displayConfig: boltTableViewDisplayConfigSchema2
31917
32323
  }).refine((v2) => v2.display === v2.displayConfig.type, {
31918
32324
  message: "display and displayConfig.type must match",
31919
32325
  path: ["displayConfig", "type"]
31920
32326
  });
31921
32327
 
31922
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/data-table/schemas/table/cell.js
32328
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.5/node_modules/@boltapp/bolt-core/dist/data-table/schemas/table/cell.js
31923
32329
  var boltCellValueSchema = zod_default.object({
31924
32330
  /** Whatever was last written (Untrusted) */
31925
32331
  raw: zod_default.any(),
@@ -31929,7 +32335,7 @@ var boltCellValueSchema = zod_default.object({
31929
32335
  schemaVersion: zod_default.number()
31930
32336
  });
31931
32337
 
31932
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/data-table/schemas/table/column.js
32338
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.5/node_modules/@boltapp/bolt-core/dist/data-table/schemas/table/column.js
31933
32339
  var boltColumnInputSchema = zod_default.discriminatedUnion("inputType", boltInputTypes.map((t8) => boltInputRegistry[t8].schema));
31934
32340
  var boltColumnFormatConfigSchema = zod_default.discriminatedUnion("inputType", boltInputTypes.map((t8) => boltInputRegistry[t8].formatConfigSchema.extend({ inputType: zod_default.literal(t8) }).loose()));
31935
32341
  var boltTableColumnSchema = zod_default.object({
@@ -31962,7 +32368,7 @@ var boltTableColumnSchema = zod_default.object({
31962
32368
  })
31963
32369
  });
31964
32370
 
31965
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/data-table/schemas/table/row.js
32371
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.5/node_modules/@boltapp/bolt-core/dist/data-table/schemas/table/row.js
31966
32372
  var boltTableRowSchema = zod_default.object({
31967
32373
  id: zod_default.string(),
31968
32374
  index: zod_default.number(),
@@ -31980,7 +32386,7 @@ var boltTableRowSchema = zod_default.object({
31980
32386
  data: zod_default.record(zod_default.string(), boltCellValueSchema)
31981
32387
  });
31982
32388
 
31983
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/data-table/schemas/table/contracts.js
32389
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.5/node_modules/@boltapp/bolt-core/dist/data-table/schemas/table/contracts.js
31984
32390
  var tablePropertiesSchema = zod_default.object({
31985
32391
  userId: zod_default.string().optional(),
31986
32392
  organizationId: zod_default.string().optional(),
@@ -32018,13 +32424,13 @@ var createViewInputSchema = zod_default.object({
32018
32424
  name: zod_default.string(),
32019
32425
  label: zod_default.string(),
32020
32426
  description: zod_default.string().optional(),
32021
- display: boltTableView.optional(),
32427
+ display: boltTableView2.optional(),
32022
32428
  visibleColumnIds: zod_default.array(zod_default.string()).optional(),
32023
32429
  sorting: zod_default.array(zod_default.object({ columnId: zod_default.string(), direction: zod_default.enum(["asc", "desc"]) })).nullable().optional(),
32024
32430
  showRowNumbers: zod_default.boolean().optional(),
32025
32431
  rowHeight: zod_default.number().nullable().optional(),
32026
32432
  createdBy: zod_default.string().optional(),
32027
- displayConfig: boltTableViewDisplayConfigSchema.optional()
32433
+ displayConfig: boltTableViewDisplayConfigSchema2.optional()
32028
32434
  });
32029
32435
  var updateViewInputSchema = zod_default.object({
32030
32436
  viewId: zod_default.string(),
@@ -32037,11 +32443,11 @@ var updateViewInputSchema = zod_default.object({
32037
32443
  density: zod_default.enum(["compact", "normal", "comfortable"]).optional(),
32038
32444
  showRowNumbers: zod_default.boolean().optional(),
32039
32445
  rowHeight: zod_default.number().optional(),
32040
- displayConfig: boltTableViewDisplayConfigSchema.optional()
32446
+ displayConfig: boltTableViewDisplayConfigSchema2.optional()
32041
32447
  })
32042
32448
  });
32043
32449
 
32044
- // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.0/node_modules/@boltapp/bolt-core/dist/data-table/schemas/table/table.js
32450
+ // ../../node_modules/.pnpm/@boltapp+bolt-core@0.0.5/node_modules/@boltapp/bolt-core/dist/data-table/schemas/table/table.js
32045
32451
  var boltTableSchema = zod_default.object({
32046
32452
  id: zod_default.string(),
32047
32453
  name: zod_default.string(),
@@ -33311,12 +33717,12 @@ function createDataTableRestHandler(api) {
33311
33717
  name: external_exports.string(),
33312
33718
  label: external_exports.string(),
33313
33719
  description: external_exports.string().optional(),
33314
- display: boltTableView,
33720
+ display: boltTableView2,
33315
33721
  visibleColumnIds: external_exports.array(external_exports.string()).optional(),
33316
33722
  sorting: external_exports.array(external_exports.object({ columnId: external_exports.string(), direction: external_exports.enum(["asc", "desc"]) })).nullable().optional(),
33317
33723
  showRowNumbers: external_exports.boolean().optional(),
33318
33724
  rowHeight: external_exports.number().nullable().optional(),
33319
- displayConfig: boltTableViewDisplayConfigSchema
33725
+ displayConfig: boltTableViewDisplayConfigSchema2
33320
33726
  })), async (c2) => {
33321
33727
  const { tableId } = c2.req.valid("param");
33322
33728
  const body = c2.req.valid("json");
@@ -33341,7 +33747,7 @@ function createDataTableRestHandler(api) {
33341
33747
  sorting: external_exports.array(external_exports.object({ columnId: external_exports.string(), direction: external_exports.enum(["asc", "desc"]) })).nullable().optional(),
33342
33748
  showRowNumbers: external_exports.boolean().optional(),
33343
33749
  rowHeight: external_exports.number().nullable().optional(),
33344
- displayConfig: boltTableViewDisplayConfigSchema.optional()
33750
+ displayConfig: boltTableViewDisplayConfigSchema2.optional()
33345
33751
  })), async (c2) => {
33346
33752
  const { viewId } = c2.req.valid("param");
33347
33753
  const updates = c2.req.valid("json");