@everystack/cli 0.4.15 → 0.4.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everystack/cli",
3
- "version": "0.4.15",
3
+ "version": "0.4.16",
4
4
  "description": "CLI and OTA updates for Expo apps on everystack",
5
5
  "license": "AGPL-3.0-only",
6
6
  "author": "Scalable Technology, Inc. <licensing@scalable.technology>",
@@ -296,10 +296,15 @@ export function renderDerivedSource(catalog: DerivedCatalog, opts: DerivedRender
296
296
  need('defineMaterializedTable');
297
297
  need('field');
298
298
  need('sql');
299
+ // MODEL naming idiom: bare table + a schema prop. The derived layer's
300
+ // qualified-first-arg spelling must NOT leak here — defineModel stores the
301
+ // table name verbatim, so 'stats.x' would become a dot-containing identifier
302
+ // in public and 3-part-qualify (public.stats.x) downstream.
299
303
  lines.push(
300
304
  ...fixmes,
301
- `export const ${varName} = defineMaterializedTable(${tsString(declaredName(o))}, {`,
305
+ `export const ${varName} = defineMaterializedTable(${tsString(o.name)}, {`,
302
306
  ` ${abilities.length ? `abilities: [${abilities.join(', ')}],` : 'private: true,'}`,
307
+ ...(o.schema !== 'public' ? [` schema: ${tsString(o.schema)},`] : []),
303
308
  ' fields: {',
304
309
  ...fieldLines,
305
310
  ' },',