@stardeck-customer-apps/data-store-sdk 0.3.1 → 0.3.2

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/SKILL.md CHANGED
@@ -354,3 +354,4 @@ try {
354
354
  - **Tables auto-generate** `id` (UUID), `created_at`, and `updated_at` columns. Don't include these in create table definitions.
355
355
  - **Column deletes are soft-deletes.** The column is renamed to `_deleted_{name}_{timestamp}` and can be restored.
356
356
  - **Type changes are restricted** to safe widening conversions (e.g., integer → bigint, boolean → text).
357
+ - **Generated column types: `bigint`/`numeric`/`decimal` map to `string`, not `number`.** `node-postgres` returns these as strings to avoid silent JS precision loss past `Number.MAX_SAFE_INTEGER`, so the generated types are `string` by design (`integer`/`smallint`/`real`/`double precision` stay `number`). `jsonb`/`json` come through as `unknown`. Cast at the boundary (`Number(row.size_bytes)`) or give the column a real type in your derived app type — don't assume `number`.
@@ -339,8 +339,12 @@ async function introspectSchema(connectionString) {
339
339
  }
340
340
  function generateTypeScript(tables) {
341
341
  const lines = [
342
- "// Auto-generated by @stardeck-customer-apps/data-store-sdk",
343
- "// Do not edit manually \u2014 regenerate with: npx stardeck-data-store generate-types",
342
+ "// AUTO-GENERATED by @stardeck-customer-apps/data-store-sdk \u2014 DO NOT EDIT.",
343
+ "// This file is overwritten in full on every run of:",
344
+ "// npx stardeck-data-store generate-types",
345
+ "// Anything you add here (hand-written or derived types) WILL BE LOST on the next",
346
+ "// regeneration. Put those in a separate file that imports from this one, e.g.",
347
+ "// src/lib/<domain>-types.ts importing the table types or DB from this file.",
344
348
  "",
345
349
  'import type { Generated } from "kysely";',
346
350
  ""
@@ -316,8 +316,12 @@ async function introspectSchema(connectionString) {
316
316
  }
317
317
  function generateTypeScript(tables) {
318
318
  const lines = [
319
- "// Auto-generated by @stardeck-customer-apps/data-store-sdk",
320
- "// Do not edit manually \u2014 regenerate with: npx stardeck-data-store generate-types",
319
+ "// AUTO-GENERATED by @stardeck-customer-apps/data-store-sdk \u2014 DO NOT EDIT.",
320
+ "// This file is overwritten in full on every run of:",
321
+ "// npx stardeck-data-store generate-types",
322
+ "// Anything you add here (hand-written or derived types) WILL BE LOST on the next",
323
+ "// regeneration. Put those in a separate file that imports from this one, e.g.",
324
+ "// src/lib/<domain>-types.ts importing the table types or DB from this file.",
321
325
  "",
322
326
  'import type { Generated } from "kysely";',
323
327
  ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stardeck-customer-apps/data-store-sdk",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "SDK for accessing Stardeck data stores from deployed projects",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",