@sequenceholdings/orm 0.1.1 → 0.1.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/README.md +1 -1
- package/dist/authoring.cjs +794 -0
- package/dist/authoring.cjs.map +1 -0
- package/dist/authoring.d.cts +274 -0
- package/dist/authoring.d.ts +274 -0
- package/dist/authoring.js +763 -0
- package/dist/authoring.js.map +1 -0
- package/dist/canonical.cjs +146 -0
- package/dist/canonical.cjs.map +1 -0
- package/dist/canonical.d.cts +369 -0
- package/dist/canonical.d.ts +369 -0
- package/dist/canonical.js +131 -0
- package/dist/canonical.js.map +1 -0
- package/dist/cli.cjs +6172 -1683
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.d.cts +8 -1
- package/dist/cli.d.ts +8 -1
- package/dist/cli.js +6172 -1685
- package/dist/cli.js.map +1 -1
- package/dist/client.cjs +120 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +74 -2
- package/dist/client.d.ts +74 -2
- package/dist/client.js +116 -1
- package/dist/client.js.map +1 -1
- package/dist/compiler.cjs +3001 -0
- package/dist/compiler.cjs.map +1 -0
- package/dist/compiler.d.cts +581 -0
- package/dist/compiler.d.ts +581 -0
- package/dist/compiler.js +2947 -0
- package/dist/compiler.js.map +1 -0
- package/dist/index.cjs +1705 -326
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +117 -56
- package/dist/index.d.ts +117 -56
- package/dist/index.js +1619 -323
- package/dist/index.js.map +1 -1
- package/dist/ir.cjs +407 -0
- package/dist/ir.cjs.map +1 -0
- package/dist/ir.d.cts +1179 -0
- package/dist/ir.d.ts +1179 -0
- package/dist/ir.js +388 -0
- package/dist/ir.js.map +1 -0
- package/dist/naming-CTvWSRTf.d.ts +79 -0
- package/dist/naming-DRyinU4u.d.cts +79 -0
- package/dist/sdl.cjs +833 -0
- package/dist/sdl.cjs.map +1 -0
- package/dist/sdl.d.cts +96 -0
- package/dist/sdl.d.ts +96 -0
- package/dist/sdl.js +809 -0
- package/dist/sdl.js.map +1 -0
- package/package.json +36 -3
- package/src/codegen-gql/apollo-hooks.cjs +98 -0
- package/src/codegen-gql/server-fns.cjs +101 -0
- package/templates/README.md +13 -0
- package/templates/orm-namespace/CLAUDE.md +81 -0
- package/templates/orm-namespace/codegen.ts +22 -0
- package/templates/orm-namespace/gitignore +5 -0
- package/templates/orm-namespace/graphql/example/queries.ts +56 -0
- package/templates/orm-namespace/package.json +24 -0
- package/templates/orm-namespace/schema/tables.ts +71 -0
- package/templates/orm-namespace/sequence.config.ts +32 -0
- package/templates/orm-namespace/tsconfig.json +15 -0
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ This package is the pure core — no Atlas imports, no database access:
|
|
|
13
13
|
- `engine/` — namespace definitions → ordered migration plans (`hint` / `ddl` / `security` / `function`) plus drizzle-kit snapshots for the registry. Each declared action compiles to a `SECURITY INVOKER` Postgres function (`orm_<ns>.action_<name>`) created at apply, so the invoke path is a single `SELECT`; writes never run as client-rewritten statements. Apply also `PREPARE`s each executes statement so Postgres validates its columns/types (plpgsql function bodies defer that to first invoke), failing the apply on a bad reference. `executes` may be one statement or an ordered list (run atomically); `returns:` makes the function `RETURNS TABLE(...)` and hands back the RETURNING rows.
|
|
14
14
|
- `loader.ts` — a namespace directory of `*.yaml` files → validated `NamespaceDefinition`
|
|
15
15
|
- `hash.ts` — canonical content hash (key-order-insensitive) used for content-addressed registry versions
|
|
16
|
-
- `client/` (`@sequenceholdings/orm/client`) — typed Data API client; fetch-only, no node builtins. `createOrmClient` acts as the caller (session bearer, or a managed function's delegated user token — the default); `createServiceOrmClient` is the loudly-named escalation that acts as
|
|
16
|
+
- `client/` (`@sequenceholdings/orm/client`) — typed Data API client; fetch-only, no node builtins. `createOrmClient` acts as the caller (session bearer, or a managed function's delegated user token — the default); `createServiceOrmClient` is the loudly-named escalation that acts as the platform service account attached to the function (its manifest's top-level `service_account`). See the `sequence-orm` skill → "two consumer modes".
|
|
17
17
|
- `codegen/` — derives the client's wire types from the definitions; `apply` refreshes `types.gen.ts` on every successful run (there is no separate `generate` command — one verb owns the loop)
|
|
18
18
|
|
|
19
19
|
Deploy with `seq-studio orm …` (see `@sequenceholdings/studio-cli`):
|