@svgrid/enterprise 2.5.2 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SvAlertRuleEditor.svelte.d.ts +13 -0
- package/dist/SvAlertsManager.svelte.d.ts +14 -0
- package/dist/SvAlertsPanel.svelte.d.ts +9 -0
- package/dist/SvAuthGate.svelte.d.ts +22 -0
- package/dist/SvBoard.svelte.d.ts +35 -0
- package/dist/SvExportMenu.svelte.d.ts +61 -0
- package/dist/SvExpressionEditor.svelte.d.ts +12 -0
- package/dist/SvFileInput.svelte.d.ts +20 -0
- package/dist/SvGridAlerts.svelte.d.ts +77 -0
- package/dist/SvGridBoard.svelte.d.ts +30 -0
- package/dist/SvGridEditPanel.svelte.d.ts +73 -0
- package/dist/SvGridMasterDetail.svelte.d.ts +49 -0
- package/dist/SvGridScheduler.svelte.d.ts +30 -0
- package/dist/SvImportDialog.svelte.d.ts +88 -0
- package/dist/SvLookupInput.svelte.d.ts +21 -0
- package/dist/SvPivotDesigner.svelte.d.ts +176 -0
- package/dist/SvRecordDetail.svelte.d.ts +58 -0
- package/dist/SvSchedule.svelte.d.ts +29 -0
- package/dist/SvSchemaChart.svelte.d.ts +61 -0
- package/dist/SvSchemaDashboard.svelte.d.ts +46 -0
- package/dist/alerts/alert-engine-attach.d.ts +79 -0
- package/dist/alerts/alert-engine-attach.js +106 -0
- package/dist/alerts/alert-engine.d.ts +42 -0
- package/dist/alerts/alert-engine.js +196 -0
- package/dist/alerts/alert-formats.d.ts +26 -0
- package/dist/alerts/alert-formats.js +58 -0
- package/dist/alerts/alert-observer.d.ts +54 -0
- package/dist/alerts/alert-observer.js +156 -0
- package/dist/alerts/alert-scheduler.d.ts +30 -0
- package/dist/alerts/alert-scheduler.js +54 -0
- package/dist/alerts/alert-storage.d.ts +31 -0
- package/dist/alerts/alert-storage.js +92 -0
- package/dist/alerts/alert-store.svelte.d.ts +24 -0
- package/dist/alerts/alert-store.svelte.js +69 -0
- package/dist/alerts/alert-types.d.ts +86 -0
- package/dist/alerts/alert-types.js +1 -0
- package/dist/alerts.d.ts +2 -0
- package/{src/alerts.ts → dist/alerts.js} +9 -9
- package/dist/board.d.ts +7 -0
- package/{src/board.ts → dist/board.js} +13 -14
- package/dist/cdn/svgrid-enterprise.svelte-external.js +2987 -2981
- package/dist/designer/assets/{index-CM5xvaOy.js → index-BF0UH638.js} +3 -3
- package/dist/designer/assets/{src-D-ET9Mmo.js → src-BPJruwB9.js} +184 -184
- package/dist/designer/index.html +2 -2
- package/dist/edit-panel.d.ts +105 -0
- package/dist/edit-panel.js +350 -0
- package/dist/export-conditional.d.ts +31 -0
- package/dist/export-conditional.js +65 -0
- package/dist/export-ooxml.d.ts +93 -0
- package/dist/export-ooxml.js +385 -0
- package/dist/export-pdf.d.ts +107 -0
- package/dist/export-pdf.js +144 -0
- package/dist/export-print.d.ts +55 -0
- package/dist/export-print.js +91 -0
- package/{src/export-serialize.ts → dist/export-serialize.d.ts} +11 -24
- package/dist/export-serialize.js +11 -0
- package/dist/export-xls.d.ts +26 -0
- package/dist/export-xls.js +157 -0
- package/dist/export.d.ts +323 -0
- package/dist/export.js +1021 -0
- package/dist/expressions/evaluate.d.ts +17 -0
- package/dist/expressions/evaluate.js +214 -0
- package/dist/expressions/expression-columns.d.ts +61 -0
- package/dist/expressions/expression-columns.js +72 -0
- package/dist/expressions/expression-types.d.ts +125 -0
- package/dist/expressions/expression-types.js +1 -0
- package/dist/expressions/parse.d.ts +25 -0
- package/dist/expressions/parse.js +537 -0
- package/dist/import.d.ts +232 -0
- package/dist/import.js +846 -0
- package/dist/index.d.ts +66 -0
- package/dist/index.js +91 -0
- package/dist/install.d.ts +70 -0
- package/dist/install.js +61 -0
- package/dist/license-core.d.ts +37 -0
- package/dist/license-core.js +81 -0
- package/dist/license.d.ts +30 -0
- package/dist/license.js +139 -0
- package/dist/master-detail.d.ts +23 -0
- package/dist/master-detail.js +35 -0
- package/dist/node/studio.js +1 -1
- package/dist/pivot-chart.d.ts +28 -0
- package/dist/pivot-chart.js +71 -0
- package/dist/pivot-designer.d.ts +69 -0
- package/dist/pivot-designer.js +38 -0
- package/dist/pivot-enable.d.ts +6 -0
- package/{src/pivot-enable.ts → dist/pivot-enable.js} +13 -18
- package/dist/pivot.d.ts +111 -0
- package/dist/pivot.js +353 -0
- package/dist/print.d.ts +33 -0
- package/dist/print.js +61 -0
- package/dist/revoked.d.ts +1 -0
- package/{src/revoked.ts → dist/revoked.js} +5 -6
- package/dist/scheduler-assignments.d.ts +64 -0
- package/dist/scheduler-assignments.js +92 -0
- package/dist/scheduler-axis.d.ts +81 -0
- package/dist/scheduler-axis.js +180 -0
- package/{src/scheduler-booking.ts → dist/scheduler-booking.d.ts} +10 -43
- package/dist/scheduler-booking.js +50 -0
- package/dist/scheduler-config.d.ts +177 -0
- package/dist/scheduler-config.js +1 -0
- package/dist/scheduler-dependencies.d.ts +89 -0
- package/dist/scheduler-dependencies.js +179 -0
- package/dist/scheduler-freebusy.d.ts +19 -0
- package/{src/scheduler-freebusy.ts → dist/scheduler-freebusy.js} +9 -19
- package/{src/scheduler-heatmap.ts → dist/scheduler-heatmap.d.ts} +12 -35
- package/dist/scheduler-heatmap.js +41 -0
- package/dist/scheduler-resource-tree.d.ts +48 -0
- package/dist/scheduler-resource-tree.js +78 -0
- package/dist/scheduler-slots.d.ts +37 -0
- package/dist/scheduler-slots.js +80 -0
- package/dist/scheduler-summary.d.ts +41 -0
- package/dist/scheduler-summary.js +54 -0
- package/dist/scheduler.d.ts +7 -0
- package/{src/scheduler.ts → dist/scheduler.js} +13 -14
- package/dist/scheduling.d.ts +132 -0
- package/dist/scheduling.js +228 -0
- package/dist/schema-designer.d.ts +42 -0
- package/dist/schema-designer.js +117 -0
- package/dist/schema.d.ts +369 -0
- package/dist/schema.js +216 -0
- package/dist/smart-shim.d.ts +62 -0
- package/dist/smart-shim.js +34 -0
- package/dist/sources/aggregate.d.ts +43 -0
- package/dist/sources/aggregate.js +60 -0
- package/dist/sources/auth-supabase.d.ts +69 -0
- package/dist/sources/auth-supabase.js +39 -0
- package/dist/sources/dashboard.d.ts +65 -0
- package/dist/sources/dashboard.js +95 -0
- package/dist/sources/field-inference.d.ts +23 -0
- package/dist/sources/field-inference.js +52 -0
- package/dist/sources/filters.d.ts +35 -0
- package/dist/sources/filters.js +52 -0
- package/dist/sources/index.d.ts +18 -0
- package/dist/sources/index.js +18 -0
- package/dist/sources/introspect-supabase.d.ts +30 -0
- package/dist/sources/introspect-supabase.js +134 -0
- package/dist/sources/realtime-supabase.d.ts +37 -0
- package/dist/sources/realtime-supabase.js +52 -0
- package/dist/sources/relation-lookup.d.ts +50 -0
- package/dist/sources/relation-lookup.js +77 -0
- package/dist/sources/rest-adapters.d.ts +48 -0
- package/dist/sources/rest-adapters.js +85 -0
- package/dist/sources/rest.d.ts +38 -0
- package/dist/sources/rest.js +86 -0
- package/dist/sources/schema-from-columns.d.ts +37 -0
- package/dist/sources/schema-from-columns.js +48 -0
- package/dist/sources/supabase.d.ts +33 -0
- package/dist/sources/supabase.js +74 -0
- package/dist/sources/with-entity-rules.d.ts +25 -0
- package/dist/sources/with-entity-rules.js +47 -0
- package/dist/sources/with-relation-labels.d.ts +26 -0
- package/dist/sources/with-relation-labels.js +38 -0
- package/dist/staged-editing.d.ts +85 -0
- package/dist/staged-editing.js +0 -0
- package/dist/studio/bug-report.d.ts +61 -0
- package/dist/studio/bug-report.js +126 -0
- package/dist/studio/cli.d.ts +56 -0
- package/dist/studio/cli.js +70 -0
- package/dist/studio/copilot-core.d.ts +22 -0
- package/{src/studio/copilot-core.ts → dist/studio/copilot-core.js} +34 -38
- package/dist/studio/csv.d.ts +36 -0
- package/dist/studio/csv.js +173 -0
- package/dist/studio/db-connect-string.d.ts +45 -0
- package/dist/studio/db-connect-string.js +113 -0
- package/dist/studio/deploy-cli.d.ts +35 -0
- package/dist/studio/deploy-cli.js +81 -0
- package/dist/studio/emit-project.d.ts +77 -0
- package/dist/studio/emit-project.js +5389 -0
- package/dist/studio/emit-schema.d.ts +110 -0
- package/dist/studio/emit-schema.js +1128 -0
- package/dist/studio/index.d.ts +35 -0
- package/dist/studio/index.js +38 -0
- package/dist/studio/init-flow.d.ts +58 -0
- package/dist/studio/init-flow.js +451 -0
- package/dist/studio/introspect-db.d.ts +47 -0
- package/dist/studio/introspect-db.js +255 -0
- package/dist/studio/introspect-openapi.d.ts +19 -0
- package/dist/studio/introspect-openapi.js +244 -0
- package/dist/studio/introspect-prisma.d.ts +25 -0
- package/dist/studio/introspect-prisma.js +164 -0
- package/dist/studio/introspect.d.ts +35 -0
- package/dist/studio/introspect.js +306 -0
- package/dist/studio/project.d.ts +1327 -0
- package/dist/studio/project.js +1798 -0
- package/dist/studio/sample-data.d.ts +19 -0
- package/dist/studio/sample-data.js +207 -0
- package/dist/studio/samples/ats.d.ts +2 -0
- package/dist/studio/samples/ats.js +194 -0
- package/dist/studio/samples/clinic.d.ts +2 -0
- package/dist/studio/samples/clinic.js +171 -0
- package/dist/studio/samples/crm.d.ts +2 -0
- package/dist/studio/samples/crm.js +280 -0
- package/dist/studio/samples/datasets.d.ts +38 -0
- package/dist/studio/samples/datasets.js +296 -0
- package/dist/studio/samples/ecommerce.d.ts +2 -0
- package/dist/studio/samples/ecommerce.js +178 -0
- package/dist/studio/samples/events.d.ts +2 -0
- package/dist/studio/samples/events.js +192 -0
- package/dist/studio/samples/fleet.d.ts +2 -0
- package/dist/studio/samples/fleet.js +203 -0
- package/dist/studio/samples/gym.d.ts +2 -0
- package/dist/studio/samples/gym.js +205 -0
- package/dist/studio/samples/hr.d.ts +2 -0
- package/dist/studio/samples/hr.js +186 -0
- package/dist/studio/samples/index.d.ts +13 -0
- package/dist/studio/samples/index.js +44 -0
- package/dist/studio/samples/insurance.d.ts +2 -0
- package/dist/studio/samples/insurance.js +220 -0
- package/dist/studio/samples/inventory.d.ts +2 -0
- package/dist/studio/samples/inventory.js +204 -0
- package/dist/studio/samples/invoicing.d.ts +2 -0
- package/dist/studio/samples/invoicing.js +154 -0
- package/dist/studio/samples/library.d.ts +2 -0
- package/dist/studio/samples/library.js +171 -0
- package/dist/studio/samples/live-data.d.ts +5 -0
- package/dist/studio/samples/live-data.js +261 -0
- package/dist/studio/samples/projects.d.ts +2 -0
- package/dist/studio/samples/projects.js +203 -0
- package/dist/studio/samples/realestate.d.ts +2 -0
- package/dist/studio/samples/realestate.js +187 -0
- package/dist/studio/samples/restaurant.d.ts +2 -0
- package/dist/studio/samples/restaurant.js +180 -0
- package/dist/studio/samples/school.d.ts +2 -0
- package/dist/studio/samples/school.js +188 -0
- package/dist/studio/samples/shared.d.ts +142 -0
- package/dist/studio/samples/shared.js +164 -0
- package/dist/studio/samples/starter.d.ts +4 -0
- package/dist/studio/samples/starter.js +237 -0
- package/dist/studio/samples/subscriptions.d.ts +2 -0
- package/dist/studio/samples/subscriptions.js +175 -0
- package/dist/studio/samples/support.d.ts +2 -0
- package/dist/studio/samples/support.js +209 -0
- package/dist/studio/scaffold-app.d.ts +22 -0
- package/{src/studio/scaffold-app.ts → dist/studio/scaffold-app.js} +45 -63
- package/dist/studio/scaffold.d.ts +63 -0
- package/dist/studio/scaffold.js +346 -0
- package/dist/studio/screen-suites.d.ts +193 -0
- package/dist/studio/screen-suites.js +297 -0
- package/dist/studio/themes.d.ts +34 -0
- package/dist/studio/themes.js +41 -0
- package/dist/studio/ui-components.d.ts +89 -0
- package/dist/studio/ui-components.generated.d.ts +29 -0
- package/dist/studio/ui-components.generated.js +7139 -0
- package/dist/studio/ui-components.js +673 -0
- package/dist/studio/user-error.d.ts +23 -0
- package/{src/studio/user-error.ts → dist/studio/user-error.js} +10 -13
- package/dist/studio/verify.d.ts +34 -0
- package/dist/studio/verify.js +47 -0
- package/dist/sveltekit/in-memory.d.ts +14 -0
- package/dist/sveltekit/in-memory.js +113 -0
- package/dist/sveltekit/index.d.ts +6 -0
- package/dist/sveltekit/index.js +5 -0
- package/dist/sveltekit/query-plan.d.ts +44 -0
- package/dist/sveltekit/query-plan.js +76 -0
- package/dist/sveltekit/sql-source.d.ts +47 -0
- package/dist/sveltekit/sql-source.js +106 -0
- package/dist/sveltekit/sql.d.ts +48 -0
- package/dist/sveltekit/sql.js +73 -0
- package/dist/sveltekit/transport.d.ts +209 -0
- package/dist/sveltekit/transport.js +219 -0
- package/{src/sveltekit/types.ts → dist/sveltekit/types.d.ts} +8 -11
- package/dist/sveltekit/types.js +1 -0
- package/dist/upgrade-prompt.d.ts +16 -0
- package/dist/upgrade-prompt.js +141 -0
- package/dist/version.d.ts +13 -0
- package/{src/version.ts → dist/version.js} +1 -1
- package/dist/watermark.d.ts +2 -0
- package/dist/watermark.js +146 -0
- package/package.json +26 -24
- package/src/SvBoard.dom.test.ts +0 -67
- package/src/SvGridAlerts.dom.test.ts +0 -113
- package/src/SvGridEditPanel.dom.test.ts +0 -320
- package/src/SvRecordDetail.dom.test.ts +0 -137
- package/src/SvSchedule.dom.test.ts +0 -57
- package/src/ai-export-pdf.dom.test.ts +0 -77
- package/src/ai-export-xlsx.dom.test.ts +0 -90
- package/src/ai-export.dom.test.ts +0 -114
- package/src/alerts/alert-engine-attach.ts +0 -165
- package/src/alerts/alert-engine.test.ts +0 -135
- package/src/alerts/alert-engine.ts +0 -260
- package/src/alerts/alert-formats.test.ts +0 -87
- package/src/alerts/alert-formats.ts +0 -77
- package/src/alerts/alert-observer.test.ts +0 -189
- package/src/alerts/alert-observer.ts +0 -208
- package/src/alerts/alert-scheduler.ts +0 -96
- package/src/alerts/alert-storage.test.ts +0 -54
- package/src/alerts/alert-storage.ts +0 -116
- package/src/alerts/alert-store.svelte.ts +0 -80
- package/src/alerts/alert-types.ts +0 -94
- package/src/board.dom.test.ts +0 -941
- package/src/edit-panel.test.ts +0 -322
- package/src/edit-panel.ts +0 -379
- package/src/export-conditional.test.ts +0 -60
- package/src/export-conditional.ts +0 -94
- package/src/export-ooxml.test.ts +0 -152
- package/src/export-ooxml.ts +0 -489
- package/src/export-pdf.test.ts +0 -138
- package/src/export-pdf.ts +0 -245
- package/src/export-print.test.ts +0 -66
- package/src/export-print.ts +0 -132
- package/src/export-serialize.test.ts +0 -56
- package/src/export-xls.ts +0 -199
- package/src/export-xlsx-roundtrip.test.ts +0 -120
- package/src/export-xlsx.test.ts +0 -150
- package/src/export.test.ts +0 -349
- package/src/export.ts +0 -1464
- package/src/expressions/evaluate.test.ts +0 -111
- package/src/expressions/evaluate.ts +0 -237
- package/src/expressions/expression-columns.ts +0 -133
- package/src/expressions/expression-types.ts +0 -84
- package/src/expressions/parse.test.ts +0 -106
- package/src/expressions/parse.ts +0 -610
- package/src/import-automap.test.ts +0 -131
- package/src/import-hardening.test.ts +0 -158
- package/src/import.test.ts +0 -415
- package/src/import.ts +0 -1044
- package/src/index.ts +0 -569
- package/src/install.ts +0 -154
- package/src/license-core.test.ts +0 -23
- package/src/license-core.ts +0 -107
- package/src/license-expiry.test.ts +0 -127
- package/src/license.ts +0 -137
- package/src/master-detail.test.ts +0 -61
- package/src/master-detail.ts +0 -42
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/_metadata.json +0 -178
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/attachments-ZrPsKxob.js +0 -3875
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/attachments-ZrPsKxob.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/constants-ACqvWGE2.js +0 -21
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/constants-ACqvWGE2.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/dev-D3w5jt92.js +0 -1938
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/dev-D3w5jt92.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/events-CC2V3H0y.js +0 -205
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/events-CC2V3H0y.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/flags-BXP37tAa.js +0 -18
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/flags-BXP37tAa.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/hydration-DwubnU5b.js +0 -264
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/hydration-DwubnU5b.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/legacy-client-hD7f6PUz.js +0 -697
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/legacy-client-hD7f6PUz.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte.js +0 -134
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_animate.js +0 -55
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_animate.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_attachments.js +0 -2
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_compiler.js +0 -46843
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_compiler.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_easing.js +0 -237
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_easing.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_events.js +0 -2
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal.js +0 -4
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_client.js +0 -7
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_disclose-version.js +0 -4
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_disclose-version.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_async.js +0 -5
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_async.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_legacy.js +0 -5
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_legacy.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_tracing.js +0 -5
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_tracing.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_server.js +0 -6
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_legacy.js +0 -83
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_legacy.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_motion.js +0 -559
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_motion.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity.js +0 -24
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity_window.js +0 -122
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity_window.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_server.js +0 -2
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_store.js +0 -89
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_store.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_transition.js +0 -241
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_transition.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-DBx1SCN6.js +0 -4938
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-DBx1SCN6.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-gjfpSTFS.js +0 -495
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-gjfpSTFS.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/validate-DKoOKg8S.js +0 -190
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/validate-DKoOKg8S.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/version-C0MiR7eR.js +0 -8
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/version-C0MiR7eR.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/warnings-B6Y7P0Q-.js +0 -138
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/warnings-B6Y7P0Q-.js.map +0 -1
- package/src/pivot-chart.test.ts +0 -86
- package/src/pivot-chart.ts +0 -112
- package/src/pivot-designer.ts +0 -101
- package/src/pivot.test.ts +0 -335
- package/src/pivot.ts +0 -578
- package/src/print.ts +0 -107
- package/src/scheduler-assignments.test.ts +0 -97
- package/src/scheduler-assignments.ts +0 -134
- package/src/scheduler-axis.test.ts +0 -108
- package/src/scheduler-axis.ts +0 -238
- package/src/scheduler-booking.test.ts +0 -57
- package/src/scheduler-config.ts +0 -179
- package/src/scheduler-dependencies.test.ts +0 -155
- package/src/scheduler-dependencies.ts +0 -223
- package/src/scheduler-freebusy.test.ts +0 -41
- package/src/scheduler-heatmap.test.ts +0 -39
- package/src/scheduler-resource-tree.test.ts +0 -84
- package/src/scheduler-resource-tree.ts +0 -107
- package/src/scheduler-slots.test.ts +0 -53
- package/src/scheduler-slots.ts +0 -94
- package/src/scheduler-summary.test.ts +0 -47
- package/src/scheduler-summary.ts +0 -81
- package/src/scheduling.test.ts +0 -194
- package/src/scheduling.ts +0 -293
- package/src/schema-designer.test.ts +0 -121
- package/src/schema-designer.ts +0 -142
- package/src/schema.test.ts +0 -268
- package/src/schema.ts +0 -562
- package/src/smart-shim.ts +0 -107
- package/src/sources/aggregate.test.ts +0 -79
- package/src/sources/aggregate.ts +0 -102
- package/src/sources/auth-supabase.test.ts +0 -80
- package/src/sources/auth-supabase.ts +0 -87
- package/src/sources/dashboard.kpi.test.ts +0 -50
- package/src/sources/dashboard.test.ts +0 -61
- package/src/sources/dashboard.ts +0 -136
- package/src/sources/field-inference.test.ts +0 -60
- package/src/sources/field-inference.ts +0 -63
- package/src/sources/filters.test.ts +0 -58
- package/src/sources/filters.ts +0 -70
- package/src/sources/index.ts +0 -67
- package/src/sources/introspect-supabase.test.ts +0 -112
- package/src/sources/introspect-supabase.ts +0 -139
- package/src/sources/realtime-supabase.test.ts +0 -93
- package/src/sources/realtime-supabase.ts +0 -99
- package/src/sources/relation-lookup.test.ts +0 -99
- package/src/sources/relation-lookup.ts +0 -128
- package/src/sources/rest-adapters.test.ts +0 -95
- package/src/sources/rest-adapters.ts +0 -120
- package/src/sources/rest.test.ts +0 -104
- package/src/sources/rest.ts +0 -129
- package/src/sources/schema-from-columns.test.ts +0 -106
- package/src/sources/schema-from-columns.ts +0 -88
- package/src/sources/supabase.test.ts +0 -110
- package/src/sources/supabase.ts +0 -99
- package/src/sources/with-entity-rules.test.ts +0 -104
- package/src/sources/with-entity-rules.ts +0 -78
- package/src/sources/with-relation-labels.test.ts +0 -75
- package/src/sources/with-relation-labels.ts +0 -73
- package/src/staged-editing.ts +0 -0
- package/src/studio/bug-report.test.ts +0 -101
- package/src/studio/bug-report.ts +0 -165
- package/src/studio/cli.test.ts +0 -187
- package/src/studio/cli.ts +0 -117
- package/src/studio/copilot-core.test.ts +0 -45
- package/src/studio/csv.test.ts +0 -90
- package/src/studio/csv.ts +0 -165
- package/src/studio/db-connect-string.test.ts +0 -94
- package/src/studio/db-connect-string.ts +0 -128
- package/src/studio/deploy-cli.test.ts +0 -56
- package/src/studio/deploy-cli.ts +0 -100
- package/src/studio/emit-project.test.ts +0 -3324
- package/src/studio/emit-project.ts +0 -5377
- package/src/studio/emit-schema.test.ts +0 -111
- package/src/studio/emit-schema.ts +0 -1181
- package/src/studio/index.ts +0 -380
- package/src/studio/init-flow.test.ts +0 -514
- package/src/studio/init-flow.ts +0 -556
- package/src/studio/introspect-db.test.ts +0 -186
- package/src/studio/introspect-db.ts +0 -312
- package/src/studio/introspect-openapi.test.ts +0 -84
- package/src/studio/introspect-openapi.ts +0 -252
- package/src/studio/introspect-prisma.test.ts +0 -99
- package/src/studio/introspect-prisma.ts +0 -175
- package/src/studio/introspect.test.ts +0 -172
- package/src/studio/introspect.ts +0 -310
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/_svelte_metadata.json +0 -1
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/package.json +0 -3
- package/src/studio/pipeline.test.ts +0 -42
- package/src/studio/project-robust.test.ts +0 -157
- package/src/studio/project.test.ts +0 -929
- package/src/studio/project.ts +0 -2394
- package/src/studio/sample-data.test.ts +0 -58
- package/src/studio/sample-data.ts +0 -203
- package/src/studio/samples/ats.ts +0 -202
- package/src/studio/samples/clinic.ts +0 -179
- package/src/studio/samples/crm.ts +0 -291
- package/src/studio/samples/datasets.test.ts +0 -84
- package/src/studio/samples/datasets.ts +0 -340
- package/src/studio/samples/ecommerce.ts +0 -187
- package/src/studio/samples/events.ts +0 -201
- package/src/studio/samples/fleet.ts +0 -213
- package/src/studio/samples/gym.ts +0 -215
- package/src/studio/samples/hr.ts +0 -195
- package/src/studio/samples/index.ts +0 -55
- package/src/studio/samples/insurance.ts +0 -229
- package/src/studio/samples/inventory.ts +0 -213
- package/src/studio/samples/invoicing.ts +0 -162
- package/src/studio/samples/library.ts +0 -180
- package/src/studio/samples/live-data.test.ts +0 -99
- package/src/studio/samples/live-data.ts +0 -306
- package/src/studio/samples/projects.ts +0 -212
- package/src/studio/samples/realestate.ts +0 -196
- package/src/studio/samples/restaurant.ts +0 -189
- package/src/studio/samples/samples.test.ts +0 -304
- package/src/studio/samples/school.ts +0 -197
- package/src/studio/samples/seed-floor.test.ts +0 -25
- package/src/studio/samples/shared.ts +0 -237
- package/src/studio/samples/starter.ts +0 -251
- package/src/studio/samples/subscriptions.ts +0 -183
- package/src/studio/samples/support.ts +0 -216
- package/src/studio/scaffold-app.test.ts +0 -91
- package/src/studio/scaffold.test.ts +0 -192
- package/src/studio/scaffold.ts +0 -390
- package/src/studio/screen-suites.test.ts +0 -269
- package/src/studio/screen-suites.ts +0 -448
- package/src/studio/themes.ts +0 -62
- package/src/studio/ui-components-surface.test.ts +0 -185
- package/src/studio/ui-components.generated.ts +0 -7154
- package/src/studio/ui-components.ts +0 -742
- package/src/studio/verify.test.ts +0 -47
- package/src/studio/verify.ts +0 -79
- package/src/sveltekit/in-memory.test.ts +0 -104
- package/src/sveltekit/in-memory.ts +0 -129
- package/src/sveltekit/index.ts +0 -24
- package/src/sveltekit/query-plan.test.ts +0 -109
- package/src/sveltekit/query-plan.ts +0 -125
- package/src/sveltekit/sql-source.test.ts +0 -198
- package/src/sveltekit/sql-source.ts +0 -171
- package/src/sveltekit/sql.test.ts +0 -80
- package/src/sveltekit/sql.ts +0 -131
- package/src/sveltekit/transport-scope.test.ts +0 -125
- package/src/sveltekit/transport.test.ts +0 -201
- package/src/sveltekit/transport.ts +0 -373
- package/src/upgrade-prompt.test.ts +0 -71
- package/src/upgrade-prompt.ts +0 -162
- package/src/version.test.ts +0 -17
- package/src/watermark.test.ts +0 -97
- package/src/watermark.ts +0 -156
- /package/{src → dist}/SvAlertRuleEditor.svelte +0 -0
- /package/{src → dist}/SvAlertsManager.svelte +0 -0
- /package/{src → dist}/SvAlertsPanel.svelte +0 -0
- /package/{src → dist}/SvAuthGate.svelte +0 -0
- /package/{src → dist}/SvBoard.svelte +0 -0
- /package/{src → dist}/SvExportMenu.svelte +0 -0
- /package/{src → dist}/SvExpressionEditor.svelte +0 -0
- /package/{src → dist}/SvFileInput.svelte +0 -0
- /package/{src → dist}/SvGridAlerts.svelte +0 -0
- /package/{src → dist}/SvGridBoard.svelte +0 -0
- /package/{src → dist}/SvGridEditPanel.svelte +0 -0
- /package/{src → dist}/SvGridMasterDetail.svelte +0 -0
- /package/{src → dist}/SvGridScheduler.svelte +0 -0
- /package/{src → dist}/SvImportDialog.svelte +0 -0
- /package/{src → dist}/SvLookupInput.svelte +0 -0
- /package/{src → dist}/SvPivotDesigner.svelte +0 -0
- /package/{src → dist}/SvRecordDetail.svelte +0 -0
- /package/{src → dist}/SvSchedule.svelte +0 -0
- /package/{src → dist}/SvSchemaChart.svelte +0 -0
- /package/{src → dist}/SvSchemaDashboard.svelte +0 -0
- /package/{src → dist}/pdfmake-shims.d.ts +0 -0
- /package/{src → dist}/smart.export.d.ts +0 -0
- /package/{src → dist}/smart.export.js +0 -0
- /package/{src → dist}/studio/HANDLERS-DESIGN.md +0 -0
- /package/{src → dist/studio}/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/_svelte_metadata.json +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/_metadata.json +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/attachments-BOv1rBKp.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/attachments-BOv1rBKp.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/constants-B9vgIdCd.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/constants-B9vgIdCd.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/dev-T1qbW_qD.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/dev-T1qbW_qD.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/events-Bo11SfVK.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/events-Bo11SfVK.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/flags-X7D4vfrZ.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/flags-X7D4vfrZ.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/hydration-oyUje5i1.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/hydration-oyUje5i1.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/legacy-client-DeSQgSFm.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/legacy-client-DeSQgSFm.js.map +0 -0
- /package/{src → dist/studio}/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/package.json +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_animate.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_animate.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_attachments.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_compiler.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_compiler.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_easing.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_easing.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_events.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_client.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_disclose-version.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_disclose-version.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_async.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_async.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_legacy.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_legacy.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_tracing.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_tracing.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_server.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_legacy.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_legacy.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_motion.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_motion.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity_window.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity_window.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_server.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_store.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_store.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_transition.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_transition.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-BbWyXNk1.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-BbWyXNk1.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-DI_fC7vt.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-DI_fC7vt.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/validate-Dyr3lQv9.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/validate-Dyr3lQv9.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/version-_9FHH-LF.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/version-_9FHH-LF.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/warnings-CUbSPnyP.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/warnings-CUbSPnyP.js.map +0 -0
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* withEntityRules - apply an `EntitySchema`'s computed fields and lifecycle
|
|
3
|
-
* hooks to any `ServerDataSource`, at the mutation boundary. It's a transparent
|
|
4
|
-
* wrapper: pass the result to `createServerDataSource` (or straight to the grid)
|
|
5
|
-
* and every read row gets its computed fields materialized, while writes run the
|
|
6
|
-
* schema's before/after hooks and cross-field validation.
|
|
7
|
-
*
|
|
8
|
-
* const source = withEntityRules(createSqlDataSource(...), orderSchema)
|
|
9
|
-
*
|
|
10
|
-
* - `getRows` -> each row through `applyComputed` (grid can sort/filter the
|
|
11
|
-
* computed value within the fetched page).
|
|
12
|
-
* - `createRow` -> `hooks.validate` + `hooks.beforeCreate` (may transform the
|
|
13
|
-
* payload or throw), then `applyComputed` on the returned row,
|
|
14
|
-
* then `hooks.afterCreate`.
|
|
15
|
-
* - `updateRow` -> the same with `beforeUpdate` / `afterUpdate`.
|
|
16
|
-
* - `deleteRow` -> `hooks.beforeDelete` (throw to veto) then `hooks.afterDelete`.
|
|
17
|
-
*
|
|
18
|
-
* Optional write methods stay optional, and any extra source capabilities
|
|
19
|
-
* (`getAggregate`, `rows()`) pass through untouched. Returning `applyComputed`
|
|
20
|
-
* rows from every method keeps the controller's optimistic reconciliation
|
|
21
|
-
* correct (a source must return the same row shape from all methods).
|
|
22
|
-
*/
|
|
23
|
-
import type { RowData, ServerDataSource } from '@svgrid/grid'
|
|
24
|
-
import { applyComputed, validateEntity, type EntitySchema } from '../schema'
|
|
25
|
-
|
|
26
|
-
function firstError(errors: Record<string, string>): string {
|
|
27
|
-
return Object.values(errors)[0] ?? 'Validation failed'
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export function withEntityRules<TData extends RowData, S extends ServerDataSource<TData>>(
|
|
31
|
-
source: S,
|
|
32
|
-
schema: EntitySchema<TData>,
|
|
33
|
-
): S {
|
|
34
|
-
const hooks = schema.hooks ?? {}
|
|
35
|
-
const compute = (row: TData) => applyComputed(schema, row)
|
|
36
|
-
|
|
37
|
-
const wrapped: ServerDataSource<TData> = {
|
|
38
|
-
async getRows(request) {
|
|
39
|
-
const res = await source.getRows(request)
|
|
40
|
-
return { ...res, rows: res.rows.map(compute) }
|
|
41
|
-
},
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (source.createRow) {
|
|
45
|
-
const create = source.createRow.bind(source)
|
|
46
|
-
wrapped.createRow = async (input) => {
|
|
47
|
-
const errors = await validateEntity(schema, input)
|
|
48
|
-
if (Object.keys(errors).length) throw new Error(firstError(errors))
|
|
49
|
-
const payload = hooks.beforeCreate ? await hooks.beforeCreate(input) : input
|
|
50
|
-
const row = compute(await create(payload))
|
|
51
|
-
await hooks.afterCreate?.(row)
|
|
52
|
-
return row
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (source.updateRow) {
|
|
57
|
-
const update = source.updateRow.bind(source)
|
|
58
|
-
wrapped.updateRow = async (id, patch) => {
|
|
59
|
-
const errors = await validateEntity(schema, patch)
|
|
60
|
-
if (Object.keys(errors).length) throw new Error(firstError(errors))
|
|
61
|
-
const payload = hooks.beforeUpdate ? await hooks.beforeUpdate(id, patch) : patch
|
|
62
|
-
const row = compute(await update(id, payload))
|
|
63
|
-
await hooks.afterUpdate?.(row)
|
|
64
|
-
return row
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
if (source.deleteRow) {
|
|
69
|
-
const del = source.deleteRow.bind(source)
|
|
70
|
-
wrapped.deleteRow = async (id) => {
|
|
71
|
-
await hooks.beforeDelete?.(id)
|
|
72
|
-
await del(id)
|
|
73
|
-
await hooks.afterDelete?.(id)
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
return { ...source, ...wrapped } as S
|
|
78
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it, vi } from 'vitest'
|
|
2
|
-
import type { EntitySchema } from '../schema'
|
|
3
|
-
import { createInMemoryDataSource } from '../sveltekit/in-memory'
|
|
4
|
-
import { createRelationLookup } from './relation-lookup'
|
|
5
|
-
import { withRelationLabels } from './with-relation-labels'
|
|
6
|
-
|
|
7
|
-
type User = { id: string; name: string }
|
|
8
|
-
type Post = { id: string; title: string; authorId: string; author?: string }
|
|
9
|
-
|
|
10
|
-
const userSchema: EntitySchema<User> = {
|
|
11
|
-
name: 'users', idField: 'id',
|
|
12
|
-
fields: [{ field: 'id', type: 'text', primaryKey: true }, { field: 'name', type: 'text' }],
|
|
13
|
-
}
|
|
14
|
-
const postSchema: EntitySchema<Post> = {
|
|
15
|
-
name: 'posts', idField: 'id',
|
|
16
|
-
fields: [
|
|
17
|
-
{ field: 'id', type: 'text', primaryKey: true },
|
|
18
|
-
{ field: 'title', type: 'text' },
|
|
19
|
-
{ field: 'authorId', type: 'relation', relation: { entity: 'users', labelField: 'name' } },
|
|
20
|
-
{ field: 'author', type: 'text', readonly: true },
|
|
21
|
-
],
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function setup() {
|
|
25
|
-
const users = createInMemoryDataSource<User>(
|
|
26
|
-
[{ id: 'u1', name: 'Ada' }, { id: 'u2', name: 'Alan' }],
|
|
27
|
-
userSchema,
|
|
28
|
-
)
|
|
29
|
-
const rawPosts = createInMemoryDataSource<Post>(
|
|
30
|
-
[{ id: 'p1', title: 'A', authorId: 'u1' }, { id: 'p2', title: 'B', authorId: 'u2' }],
|
|
31
|
-
postSchema,
|
|
32
|
-
)
|
|
33
|
-
const lookup = createRelationLookup<User>({ source: users, schema: userSchema, labelField: 'name' })
|
|
34
|
-
const posts = withRelationLabels(rawPosts, [{ fk: 'authorId', lookup, as: 'author' }])
|
|
35
|
-
return { posts }
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
describe('withRelationLabels', () => {
|
|
39
|
-
it('decorates getRows with the related label', async () => {
|
|
40
|
-
const { posts } = setup()
|
|
41
|
-
const { rows } = await posts.getRows({ startRow: 0, endRow: 10, pageIndex: 0, pageSize: 10, sortModel: [], filterModel: {} })
|
|
42
|
-
expect(rows.map((r) => r.author)).toEqual(['Ada', 'Alan'])
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
it('decorates the created / updated row (same shape from every method)', async () => {
|
|
46
|
-
const { posts } = setup()
|
|
47
|
-
const created = await posts.createRow!({ id: 'p3', title: 'C', authorId: 'u1' })
|
|
48
|
-
expect(created.author).toBe('Ada')
|
|
49
|
-
const updated = await posts.updateRow!('p3', { authorId: 'u2' })
|
|
50
|
-
expect(updated.author).toBe('Alan')
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
it('is a no-op with no relations', () => {
|
|
54
|
-
const raw = createInMemoryDataSource<Post>([], postSchema)
|
|
55
|
-
expect(withRelationLabels(raw, [])).toBe(raw)
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
it('batches label resolution to one query per page (no N+1)', async () => {
|
|
59
|
-
const users = createInMemoryDataSource<User>([{ id: 'u1', name: 'Ada' }, { id: 'u2', name: 'Alan' }], userSchema)
|
|
60
|
-
const spy = vi.spyOn(users, 'getRows')
|
|
61
|
-
const rawPosts = createInMemoryDataSource<Post>(
|
|
62
|
-
[
|
|
63
|
-
{ id: 'p1', title: 'A', authorId: 'u1' },
|
|
64
|
-
{ id: 'p2', title: 'B', authorId: 'u2' },
|
|
65
|
-
{ id: 'p3', title: 'C', authorId: 'u1' },
|
|
66
|
-
],
|
|
67
|
-
postSchema,
|
|
68
|
-
)
|
|
69
|
-
const lookup = createRelationLookup<User>({ source: users, schema: userSchema, labelField: 'name' })
|
|
70
|
-
const posts = withRelationLabels(rawPosts, [{ fk: 'authorId', lookup, as: 'author' }])
|
|
71
|
-
const { rows } = await posts.getRows({ startRow: 0, endRow: 10, pageIndex: 0, pageSize: 10, sortModel: [], filterModel: {} })
|
|
72
|
-
expect(rows.map((r) => r.author)).toEqual(['Ada', 'Alan', 'Ada'])
|
|
73
|
-
expect(spy).toHaveBeenCalledTimes(1) // 3 rows, 2 distinct authors -> ONE lookup query
|
|
74
|
-
})
|
|
75
|
-
})
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* withRelationLabels - decorate a source's rows with the human label of each
|
|
3
|
-
* foreign key, so the grid can show "Acme Inc" instead of the raw id `42`. It
|
|
4
|
-
* resolves labels through a `RelationLookup` (the same cached resolver the edit
|
|
5
|
-
* form's picker uses), so a value is fetched at most once and stays fresh.
|
|
6
|
-
*
|
|
7
|
-
* const postsSource = withRelationLabels(rawPostsSource, [
|
|
8
|
-
* { fk: 'authorId', lookup: authorLookup, as: 'author' },
|
|
9
|
-
* ])
|
|
10
|
-
*
|
|
11
|
-
* Pair it with a schema where the FK field is `hidden: { grid: true }` and a
|
|
12
|
-
* read-only display column (`author`) shows the label. Because every method
|
|
13
|
-
* returns the decorated row shape, the controller's optimistic updates stay
|
|
14
|
-
* correct.
|
|
15
|
-
*/
|
|
16
|
-
import type { RowData, ServerDataSource } from '@svgrid/grid'
|
|
17
|
-
import type { RelationLookup } from './relation-lookup'
|
|
18
|
-
|
|
19
|
-
export type RelationLabelConfig = {
|
|
20
|
-
/** Local foreign-key field to resolve. */
|
|
21
|
-
fk: string
|
|
22
|
-
/** Resolver for the related entity (see `createRelationLookup`). */
|
|
23
|
-
lookup: RelationLookup
|
|
24
|
-
/** Field to write the resolved label onto. */
|
|
25
|
-
as: string
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function withRelationLabels<TData extends RowData, S extends ServerDataSource<TData>>(
|
|
29
|
-
source: S,
|
|
30
|
-
relations: RelationLabelConfig[],
|
|
31
|
-
): S {
|
|
32
|
-
if (relations.length === 0) return source
|
|
33
|
-
|
|
34
|
-
/** Decorate one row (used by create/update returns). */
|
|
35
|
-
const decorate = async (row: TData): Promise<TData> => {
|
|
36
|
-
const copy = { ...(row as RowData) }
|
|
37
|
-
await Promise.all(
|
|
38
|
-
relations.map(async (r) => {
|
|
39
|
-
copy[r.as] = (await r.lookup.labelFor(row[r.fk])) ?? ''
|
|
40
|
-
}),
|
|
41
|
-
)
|
|
42
|
-
return copy as TData
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const wrapped: ServerDataSource<TData> = {
|
|
46
|
-
async getRows(request) {
|
|
47
|
-
const res = await source.getRows(request)
|
|
48
|
-
// Batch: one lookup query per relation for the whole page (no N+1).
|
|
49
|
-
const maps = await Promise.all(
|
|
50
|
-
relations.map((r) => r.lookup.labelsFor(res.rows.map((row) => row[r.fk]))),
|
|
51
|
-
)
|
|
52
|
-
const rows = res.rows.map((row) => {
|
|
53
|
-
const copy = { ...(row as RowData) }
|
|
54
|
-
relations.forEach((r, i) => {
|
|
55
|
-
copy[r.as] = maps[i]!.get(String(row[r.fk])) ?? ''
|
|
56
|
-
})
|
|
57
|
-
return copy as TData
|
|
58
|
-
})
|
|
59
|
-
return { ...res, rows }
|
|
60
|
-
},
|
|
61
|
-
}
|
|
62
|
-
if (source.createRow) {
|
|
63
|
-
const fn = source.createRow.bind(source)
|
|
64
|
-
wrapped.createRow = async (input) => decorate(await fn(input))
|
|
65
|
-
}
|
|
66
|
-
if (source.updateRow) {
|
|
67
|
-
const fn = source.updateRow.bind(source)
|
|
68
|
-
wrapped.updateRow = async (id, patch) => decorate(await fn(id, patch))
|
|
69
|
-
}
|
|
70
|
-
if (source.deleteRow) wrapped.deleteRow = source.deleteRow.bind(source)
|
|
71
|
-
|
|
72
|
-
return { ...source, ...wrapped } as S
|
|
73
|
-
}
|
package/src/staged-editing.ts
DELETED
|
Binary file
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest'
|
|
2
|
-
import type { EntitySchema } from '../schema.js'
|
|
3
|
-
import { createProject, setEntityDataSource } from './project.js'
|
|
4
|
-
import { sanitizeStudioProject, buildStudioBugReport } from './bug-report.js'
|
|
5
|
-
|
|
6
|
-
const SUPABASE_URL = 'https://myproject.supabase.co'
|
|
7
|
-
const SUPABASE_KEY = 'sb_secret_TOP_SECRET_KEY_123'
|
|
8
|
-
const REST_TOKEN = 'Bearer LEAKED_AUTH_TOKEN_XYZ'
|
|
9
|
-
const PRIVATE_ROW = 'Jane Doe SSN 123-45-6789'
|
|
10
|
-
|
|
11
|
-
function entity(name: string): EntitySchema {
|
|
12
|
-
return { name, label: name, idField: 'id', fields: [
|
|
13
|
-
{ field: 'id', type: 'text', primaryKey: true, readonly: true },
|
|
14
|
-
{ field: 'name', type: 'text' },
|
|
15
|
-
] }
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function projectWithSecrets() {
|
|
19
|
-
let p = createProject([entity('customers'), entity('orders'), entity('notes')])
|
|
20
|
-
p = setEntityDataSource(p, 'customers', { kind: 'supabase', table: 'customers', url: SUPABASE_URL, key: SUPABASE_KEY })
|
|
21
|
-
p = setEntityDataSource(p, 'orders', {
|
|
22
|
-
kind: 'rest', baseUrl: 'https://api.example.com', path: 'orders', method: 'GET',
|
|
23
|
-
params: [
|
|
24
|
-
{ name: 'Authorization', location: 'header', type: 'string', value: REST_TOKEN },
|
|
25
|
-
{ name: 'region', location: 'query', type: 'string', value: 'eu' },
|
|
26
|
-
],
|
|
27
|
-
})
|
|
28
|
-
p = setEntityDataSource(p, 'notes', { kind: 'memory', seed: [{ id: 'n1', name: PRIVATE_ROW }] })
|
|
29
|
-
return p
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
describe('sanitizeStudioProject', () => {
|
|
33
|
-
it('strips credentials + seed rows but keeps schema/screens', () => {
|
|
34
|
-
const { project, redactions } = sanitizeStudioProject(projectWithSecrets())
|
|
35
|
-
const json = JSON.stringify(project)
|
|
36
|
-
|
|
37
|
-
// No secret of any kind survives.
|
|
38
|
-
expect(json).not.toContain(SUPABASE_URL)
|
|
39
|
-
expect(json).not.toContain(SUPABASE_KEY)
|
|
40
|
-
expect(json).not.toContain(REST_TOKEN)
|
|
41
|
-
expect(json).not.toContain(PRIVATE_ROW)
|
|
42
|
-
|
|
43
|
-
// Non-secret structure is preserved (repro value).
|
|
44
|
-
expect(json).toContain('"region"') // a non-secret query param name stays
|
|
45
|
-
expect(json).toContain('eu') // ...and its value
|
|
46
|
-
expect(project.entities.map((e) => e.name).sort()).toEqual(['customers', 'notes', 'orders'])
|
|
47
|
-
|
|
48
|
-
// Every removal is reported to the user.
|
|
49
|
-
expect(redactions.join('\n')).toMatch(/Supabase URL redacted/)
|
|
50
|
-
expect(redactions.join('\n')).toMatch(/Supabase key redacted/)
|
|
51
|
-
expect(redactions.join('\n')).toMatch(/Authorization.*redacted/)
|
|
52
|
-
expect(redactions.join('\n')).toMatch(/seed row\(s\) omitted/)
|
|
53
|
-
expect(redactions.length).toBe(4)
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
it('leaves a project with no secrets unchanged (no false redactions)', () => {
|
|
57
|
-
const p = createProject([entity('a')])
|
|
58
|
-
const { redactions } = sanitizeStudioProject(p)
|
|
59
|
-
// createProject defaults to a memory source with generated seed rows -> that
|
|
60
|
-
// seed IS data, so it's the only thing (if any) reported; never a credential.
|
|
61
|
-
expect(redactions.every((r) => !/redacted/i.test(r) || /seed/i.test(r))).toBe(true)
|
|
62
|
-
})
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
describe('buildStudioBugReport', () => {
|
|
66
|
-
it('never leaks secrets into the markdown or the prefilled issue URL', () => {
|
|
67
|
-
const report = buildStudioBugReport({
|
|
68
|
-
project: projectWithSecrets(),
|
|
69
|
-
error: new Error('Cannot read properties of undefined (reading "blocks")'),
|
|
70
|
-
action: 'generating the app',
|
|
71
|
-
env: { studioVersion: '0.1.0', node: 'v22.0.0', os: 'win32' },
|
|
72
|
-
})
|
|
73
|
-
for (const secret of [SUPABASE_URL, SUPABASE_KEY, REST_TOKEN, PRIVATE_ROW]) {
|
|
74
|
-
expect(report.markdown).not.toContain(secret)
|
|
75
|
-
expect(report.issueUrl).not.toContain(encodeURIComponent(secret))
|
|
76
|
-
expect(report.issueUrl).not.toContain(secret)
|
|
77
|
-
}
|
|
78
|
-
expect(report.title).toContain('[Studio]')
|
|
79
|
-
expect(report.issueUrl).toContain('https://github.com/sv-grid/sv-grid/issues/new')
|
|
80
|
-
expect(report.markdown).toContain('Sanitized studio.config.json')
|
|
81
|
-
expect(report.redactions.length).toBe(4)
|
|
82
|
-
})
|
|
83
|
-
|
|
84
|
-
it('truncates the URL for a large project (falls back to paste-the-markdown)', () => {
|
|
85
|
-
// A project big enough that the full report exceeds the URL cap.
|
|
86
|
-
const many = Array.from({ length: 40 }, (_, i) => entity(`e${i}`))
|
|
87
|
-
let p = createProject(many)
|
|
88
|
-
for (const e of many) p = setEntityDataSource(p, e.name, { kind: 'memory', seed: [] })
|
|
89
|
-
const report = buildStudioBugReport({ project: p, env: {} })
|
|
90
|
-
expect(report.truncated).toBe(true)
|
|
91
|
-
expect(report.issueUrl.length).toBeLessThanOrEqual(7500)
|
|
92
|
-
expect(report.issueUrl).toContain('issues/new')
|
|
93
|
-
})
|
|
94
|
-
|
|
95
|
-
it('works with no project (a plain crash report)', () => {
|
|
96
|
-
const report = buildStudioBugReport({ error: 'boom', env: { studioVersion: '0.1.0' } })
|
|
97
|
-
expect(report.title).toBe('[Studio] boom')
|
|
98
|
-
expect(report.markdown).toContain('boom')
|
|
99
|
-
expect(report.redactions).toEqual([])
|
|
100
|
-
})
|
|
101
|
-
})
|
package/src/studio/bug-report.ts
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Studio bug-report core (pure + node-safe, usable from the CLI and the
|
|
3
|
-
* designer). Two pieces:
|
|
4
|
-
*
|
|
5
|
-
* - `sanitizeStudioProject` - strip credentials + seed DATA from a project so
|
|
6
|
-
* a bug report never leaks a user's database or rows. It keeps the SCHEMA,
|
|
7
|
-
* screens, and block structure (what actually reproduces a Studio bug) and
|
|
8
|
-
* returns a plain-language list of what was removed, so the user sees it.
|
|
9
|
-
* - `buildStudioBugReport` - assemble a markdown report + a prefilled GitHub
|
|
10
|
-
* "new issue" URL. The URL carries a short summary (GitHub caps the prefill
|
|
11
|
-
* ~8 KB); the full sanitized report goes in `markdown` for the caller to
|
|
12
|
-
* copy to the clipboard / write to a file and paste in.
|
|
13
|
-
*
|
|
14
|
-
* The caller supplies `env` (version / node / os) so this stays free of any
|
|
15
|
-
* process or DOM access and is trivially testable.
|
|
16
|
-
*/
|
|
17
|
-
import type { EntityDataSource, StudioProject } from './project.js'
|
|
18
|
-
|
|
19
|
-
const REDACTED = '<redacted>'
|
|
20
|
-
const DEFAULT_REPO = 'sv-grid/sv-grid'
|
|
21
|
-
/** Keep the prefilled issue URL comfortably under browser / GitHub limits. */
|
|
22
|
-
const MAX_URL = 7500
|
|
23
|
-
/** Param names that carry secrets (substring, case-insensitive). */
|
|
24
|
-
const SECRET_NAME_RE = /(key|token|secret|auth|password|pass|bearer|credential)/i
|
|
25
|
-
|
|
26
|
-
export type SanitizeResult = { project: StudioProject; redactions: string[] }
|
|
27
|
-
|
|
28
|
-
/** Redact one entity's data source; push a human note for anything removed. */
|
|
29
|
-
function sanitizeSource(entity: string, src: EntityDataSource, redactions: string[]): EntityDataSource {
|
|
30
|
-
if (src.kind === 'memory') {
|
|
31
|
-
const { seed, ...rest } = src
|
|
32
|
-
if (seed?.length) redactions.push(`${entity}: ${seed.length} in-memory seed row(s) omitted`)
|
|
33
|
-
return rest
|
|
34
|
-
}
|
|
35
|
-
if (src.kind === 'pglite') {
|
|
36
|
-
const { seed, ...rest } = src
|
|
37
|
-
if (seed?.length) redactions.push(`${entity}: ${seed.length} local-database seed row(s) omitted`)
|
|
38
|
-
return rest
|
|
39
|
-
}
|
|
40
|
-
if (src.kind === 'supabase') {
|
|
41
|
-
const out = { ...src }
|
|
42
|
-
if (out.url) { out.url = REDACTED; redactions.push(`${entity}: Supabase URL redacted`) }
|
|
43
|
-
if (out.key) { out.key = REDACTED; redactions.push(`${entity}: Supabase key redacted`) }
|
|
44
|
-
return out
|
|
45
|
-
}
|
|
46
|
-
if (src.kind === 'rest') {
|
|
47
|
-
const params = src.params.map((p) => {
|
|
48
|
-
// Header params and secret-named params carry auth; drop their values.
|
|
49
|
-
if (p.value && (p.location === 'header' || SECRET_NAME_RE.test(p.name))) {
|
|
50
|
-
redactions.push(`${entity}: REST ${p.location} param "${p.name}" value redacted`)
|
|
51
|
-
return { ...p, value: REDACTED }
|
|
52
|
-
}
|
|
53
|
-
return p
|
|
54
|
-
})
|
|
55
|
-
let baseUrl = src.baseUrl
|
|
56
|
-
if (/[?&](key|token|apikey|secret|auth|password)=/i.test(baseUrl)) {
|
|
57
|
-
baseUrl = baseUrl.replace(/([?&](?:key|token|apikey|secret|auth|password)=)[^&]*/gi, `$1${REDACTED}`)
|
|
58
|
-
redactions.push(`${entity}: credentials in REST baseUrl redacted`)
|
|
59
|
-
}
|
|
60
|
-
return { ...src, baseUrl, params }
|
|
61
|
-
}
|
|
62
|
-
// sql: the connection string lives in the host env, not the model - nothing to strip.
|
|
63
|
-
return src
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Return a copy of the project safe to attach to a bug report: credentials and
|
|
68
|
-
* seeded rows removed, schema + screens + blocks intact. Also returns a list of
|
|
69
|
-
* exactly what was stripped, for transparency.
|
|
70
|
-
*/
|
|
71
|
-
export function sanitizeStudioProject(project: StudioProject): SanitizeResult {
|
|
72
|
-
const redactions: string[] = []
|
|
73
|
-
if (!project.dataSources) return { project, redactions }
|
|
74
|
-
const nextSources: Record<string, EntityDataSource> = {}
|
|
75
|
-
for (const [name, src] of Object.entries(project.dataSources)) {
|
|
76
|
-
nextSources[name] = sanitizeSource(name, src, redactions)
|
|
77
|
-
}
|
|
78
|
-
return { project: { ...project, dataSources: nextSources }, redactions }
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export type StudioEnv = { studioVersion?: string; node?: string; os?: string }
|
|
82
|
-
|
|
83
|
-
export type BugReportInput = {
|
|
84
|
-
/** The current project model (studio.config.json). Sanitized before use. */
|
|
85
|
-
project?: StudioProject
|
|
86
|
-
/** The error that triggered the report (on a crash), if any. */
|
|
87
|
-
error?: Error | { message: string; stack?: string } | string
|
|
88
|
-
/** What the user was doing (e.g. "generating the app", "editing the CRM board"). */
|
|
89
|
-
action?: string
|
|
90
|
-
env?: StudioEnv
|
|
91
|
-
/** `owner/repo` the issue targets (default the public SvGrid repo). */
|
|
92
|
-
repo?: string
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export type BugReport = {
|
|
96
|
-
title: string
|
|
97
|
-
/** Full markdown report - copy to clipboard / write to a file and paste in. */
|
|
98
|
-
markdown: string
|
|
99
|
-
/** Prefilled GitHub "new issue" URL. */
|
|
100
|
-
issueUrl: string
|
|
101
|
-
redactions: string[]
|
|
102
|
-
/** True when the report was too big for the URL, so `markdown` must be pasted. */
|
|
103
|
-
truncated: boolean
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function normalizeError(e: BugReportInput['error']): { message: string; stack?: string } | undefined {
|
|
107
|
-
if (!e) return undefined
|
|
108
|
-
if (typeof e === 'string') return { message: e }
|
|
109
|
-
return { message: e.message, stack: 'stack' in e ? e.stack : undefined }
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function newIssueUrl(repo: string, title: string, body: string): string {
|
|
113
|
-
const q = new URLSearchParams({ title, body, labels: 'studio,bug' })
|
|
114
|
-
return `https://github.com/${repo}/issues/new?${q.toString()}`
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function envLines(env: StudioEnv): string[] {
|
|
118
|
-
return [
|
|
119
|
-
`- Studio: ${env.studioVersion ?? 'unknown'}`,
|
|
120
|
-
`- Node: ${env.node ?? 'unknown'}`,
|
|
121
|
-
`- OS: ${env.os ?? 'unknown'}`,
|
|
122
|
-
]
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
function renderSummary(env: StudioEnv, err: ReturnType<typeof normalizeError>, action: string | undefined, redactions: string[]): string {
|
|
126
|
-
const lines = ['### Environment', ...envLines(env), '']
|
|
127
|
-
if (action) lines.push('### What I was doing', action, '')
|
|
128
|
-
if (err) lines.push('### Error', '```', err.message, '```', '')
|
|
129
|
-
lines.push(`_${redactions.length} item(s) redacted (credentials + seed data)._`)
|
|
130
|
-
return lines.join('\n')
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Build a shareable bug report from the current Studio state. The project is
|
|
135
|
-
* sanitized first; secrets never reach the markdown or the URL.
|
|
136
|
-
*/
|
|
137
|
-
export function buildStudioBugReport(input: BugReportInput): BugReport {
|
|
138
|
-
const env = input.env ?? {}
|
|
139
|
-
const err = normalizeError(input.error)
|
|
140
|
-
const { project, redactions } = input.project
|
|
141
|
-
? sanitizeStudioProject(input.project)
|
|
142
|
-
: { project: undefined as StudioProject | undefined, redactions: [] as string[] }
|
|
143
|
-
|
|
144
|
-
const firstLine = (err?.message ?? 'Bug report').split('\n')[0]!.trim().slice(0, 100)
|
|
145
|
-
const title = `[Studio] ${firstLine}`
|
|
146
|
-
|
|
147
|
-
const md: string[] = ['## SvGrid Studio bug report', '', '### Environment', ...envLines(env), '']
|
|
148
|
-
if (input.action) md.push('### What I was doing', input.action, '')
|
|
149
|
-
if (err) md.push('### Error', '```', err.message, ...(err.stack ? ['', err.stack] : []), '```', '')
|
|
150
|
-
if (project) md.push('### Project', `${project.entities?.length ?? 0} entities, ${project.screens?.length ?? 0} screens.`, '')
|
|
151
|
-
md.push('### Redactions', redactions.length ? redactions.map((r) => `- ${r}`).join('\n') : '- none', '')
|
|
152
|
-
if (project) md.push('### Sanitized studio.config.json', '```json', JSON.stringify(project, null, 2), '```')
|
|
153
|
-
const markdown = md.join('\n')
|
|
154
|
-
|
|
155
|
-
const repo = input.repo ?? DEFAULT_REPO
|
|
156
|
-
let issueUrl = newIssueUrl(repo, title, markdown)
|
|
157
|
-
let truncated = false
|
|
158
|
-
if (issueUrl.length > MAX_URL) {
|
|
159
|
-
truncated = true
|
|
160
|
-
const body = `${renderSummary(env, err, input.action, redactions)}\n\n> The full sanitized report was copied to your clipboard - paste it below.`
|
|
161
|
-
issueUrl = newIssueUrl(repo, title, body)
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
return { title, markdown, issueUrl, redactions, truncated }
|
|
165
|
-
}
|