@malloy-publisher/server 0.12.6 → 0.13.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.
Files changed (34) hide show
  1. package/README.md +1 -1
  2. package/dist/admin-api-doc.yaml +23 -3
  3. package/dist/app/api-doc.yaml +674 -19
  4. package/dist/app/assets/{EnvironmentPage-DFozqUjF.js → EnvironmentPage-B74sWMJb.js} +1 -1
  5. package/dist/app/assets/{HomePage-Bad32fax.js → HomePage-BOb2eaod.js} +1 -1
  6. package/dist/app/assets/{MainPage-BAwxr_X1.js → MainPage-D6QvMDBc.js} +1 -1
  7. package/dist/app/assets/{ModelPage-CuW71DWw.js → ModelPage-DOac8VF3.js} +2 -2
  8. package/dist/app/assets/{PackagePage-DtP6BtnP.js → PackagePage-CpahRMLt.js} +1 -1
  9. package/dist/app/assets/{PackageSplatRoute-EsC7l_nR.js → PackageSplatRoute-BBPH3864.js} +2 -2
  10. package/dist/app/assets/{RenderedResult-DAW_Cfc-.es-BYEbDD8i.js → RenderedResult-D5HJr2Xo.es-CFweT1ny.js} +3 -3
  11. package/dist/app/assets/{RouteError--h2XhIM0.js → RouteError-r7ydeLAE.js} +1 -1
  12. package/dist/app/assets/{ThemeEditorPage-B1e_-WV5.js → ThemeEditorPage-dxaIYM0S.js} +1 -1
  13. package/dist/app/assets/{ToggleButtonGroup-CuyU-wPN.js → ToggleButtonGroup-B8CQst36.js} +1 -1
  14. package/dist/app/assets/{documentRoutes-BUqz3gK5.js → documentRoutes-Dn5OclPv.js} +1 -1
  15. package/dist/app/assets/{editPageMounted-mt7xJomn.js → editPageMounted-BXWQAQvv.js} +2 -2
  16. package/dist/app/assets/{index-CRAwrhYM.js → index-B0BUzE-t.js} +8 -2
  17. package/dist/app/assets/index-BiZnC_i6.js +1318 -0
  18. package/dist/app/assets/{index-YeH6QPnQ.js → index-C2rpVa58.js} +1 -1
  19. package/dist/app/assets/index-Co7C9Gew.js +2724 -0
  20. package/dist/app/assets/{index-oAv7JJIj.js → index-D3PvzI_V.js} +16 -16
  21. package/dist/app/assets/{index-DzSE-Kxp.js → index-jw6yCO3t.js} +1 -1
  22. package/dist/app/assets/{index.es-DdMQ3KvM.js → index.es-BfpodLFo.js} +1 -1
  23. package/dist/app/assets/usePackageLinkNavigate-CpjXFkgK.js +1 -0
  24. package/dist/app/assets/{usePackageRoute-lzkkk2Fh.js → usePackageRoute-CwvWFoYD.js} +1 -1
  25. package/dist/app/index.html +1 -1
  26. package/dist/app/mcp-app/report.css +1 -0
  27. package/dist/app/mcp-app/report.js +3422 -0
  28. package/dist/instrumentation.mjs +300 -181
  29. package/dist/package_load_worker.mjs +19302 -6881
  30. package/dist/server.mjs +42465 -18587
  31. package/package.json +19 -17
  32. package/dist/app/assets/index-DZD8qhzO.js +0 -1314
  33. package/dist/app/assets/index-DgBiwYeC.js +0 -2714
  34. package/dist/app/assets/usePackageLinkNavigate-Y0cmkFp3.js +0 -1
package/README.md CHANGED
@@ -45,7 +45,7 @@ Three facts that are easy to get wrong:
45
45
 
46
46
  - **A flat-file (CSV/Parquet/XLSX) package needs no `connections` entry at all.** Every loaded package automatically gets its own DuckDB sandbox connection named `duckdb`, which is what `duckdb.table('data/file.csv')` resolves against. That name is reserved: an environment-level connection named `duckdb` fails the whole environment at init (call an env-level DuckDB connection `shared_duckdb` or similar).
47
47
  - **A package `location` is local only when it starts with `./`, `../`, `~/`, or `/`.** Write `./sales`, not `sales`: a bare name is read as a remote URI, and the package is skipped with `Invalid package path: "sales". Must be an absolute mounted path or a GCS/S3/GitHub URI.` in `loadErrors`. A `./` or `../` path resolves against the config file's directory; `~/` against your home directory.
48
- - **Local authoring means `--watch-env <env>`.** Without it the server copies each local package into `publisher_data/` at boot and serves the copy, so edits to your source directory are never read — a reload recompiles the copy and still answers 200. Adding the flag to a later boot does not undo a copy already made: pass `--watch-env <env> --init` once to re-mount (it wipes `publisher_data/` and re-syncs from config), then plain `--watch-env` boots keep watching. `publisher_data/<env>/<pkg>` tells you which you got — a symlink is mounted, a real directory is a copy.
48
+ - **Local authoring means `--watch-env <env>`.** Without it the server publishes each package at boot as the immutable version its `publisher.json` declares, under `publisher_data/<env>/<pkg>/<version>/`, and serves that, so edits to your source directory are never read — a reload answers the version unchanged and still answers 200. Adding the flag to a later boot does not undo a publish already made: pass `--watch-env <env> --init` once to re-mount (it wipes `publisher_data/` and re-syncs from config), then plain `--watch-env` boots keep watching. `publisher_data/<env>/<pkg>` tells you which you got — a symlink is mounted, a folder of versions is published.
49
49
 
50
50
  Poll `curl -s http://localhost:4000/api/v0/status` until `operationalState` is `"serving"`, then check `loadErrors` (absent when everything loaded). The MCP endpoint for agents is `http://localhost:4040/mcp`.
51
51
 
@@ -201,7 +201,7 @@ paths:
201
201
  tags: [tables]
202
202
  operationId: get-table
203
203
  summary: Get a table
204
- description: The table's columns, and its row count when the catalog records one.
204
+ description: The table's columns, its partition spec, and its row count when the catalog records one.
205
205
  responses:
206
206
  "200":
207
207
  description: The table
@@ -230,7 +230,10 @@ paths:
230
230
  `404 SOURCE_NOT_FOUND`; a source catalog owned by a role the configured
231
231
  role cannot act as is `409 CATALOG_OWNER_UNSUPPORTED`; and a copy from an
232
232
  encrypted catalog into an unencrypted one is refused (`400
233
- INVALID_REQUEST`), since it would write the rows unencrypted. Either way
233
+ INVALID_REQUEST`), since it would write the rows unencrypted. A copy
234
+ keeps the source table's partition spec and writes its rows in
235
+ partition order; a partitioned table copied onto itself is refused
236
+ (`400 INVALID_REQUEST`). Either way
234
237
  the bytes are rewritten as the catalog's own Parquet, never registered
235
238
  in place and never left as rows in the catalog database, so an
236
239
  encrypted catalog stays encrypted. One DuckLake transaction:
@@ -589,7 +592,7 @@ components:
589
592
 
590
593
  Table:
591
594
  type: object
592
- required: [schema, name, columns]
595
+ required: [schema, name, columns, partitionedBy]
593
596
  properties:
594
597
  schema:
595
598
  type: string
@@ -609,6 +612,23 @@ components:
609
612
  type: integer
610
613
  format: int64
611
614
  description: When the catalog records one
615
+ partitionedBy:
616
+ type: array
617
+ description: The table's partition spec in key order; empty when it is not partitioned
618
+ items:
619
+ $ref: "#/components/schemas/PartitionKey"
620
+
621
+ PartitionKey:
622
+ type: object
623
+ required: [column, transform]
624
+ properties:
625
+ column:
626
+ type: string
627
+ transform:
628
+ type: string
629
+ description: >-
630
+ DuckLake's transform for the column: one of `identity`, `year`,
631
+ `month`, `day`, `hour` or `bucket(N)`
612
632
 
613
633
  TableWrite:
614
634
  type: object