Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ its own canonical serializer already, so `fmt` runs locally everywhere:

## Running tests

The Bun workspace root is the **repository root** (`/package.json`), which globs `server/typescript/packages/*` and `client/web/packages/*`. Java/Python/C# live outside the JS workspace (not globbed). Run `bun install` **once at the repo root**. Run `bun test` **scoped** — `cd server/typescript && bun test` for the server suite (this also picks up `server/typescript/bunfig.toml`'s test preload), and per-package for `client/web`. **Never run a bare `bun test` at the repo root**: it walks `java/`, `python/`, `csharp/`, and `fixtures/` looking for test files, turning a fast per-package run into many minutes.
The Bun workspace root is the **repository root** (`/package.json`), which globs `server/typescript/packages/*`, `client/web/packages/*` and the `examples/dynamic-grid` example. Java/Python/C# live outside the JS workspace (not globbed). Run `bun install` **once at the repo root**. Run `bun test` **scoped** — `cd server/typescript && bun test` for the server suite (this also picks up `server/typescript/bunfig.toml`'s test preload), and per-package for `client/web`. **Never run a bare `bun test` at the repo root**: it walks `java/`, `python/`, `csharp/`, and `fixtures/` looking for test files, turning a fast per-package run into many minutes.

```
bun install # once, at the repo root
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ here.**
to build and test it, and the preview scope of `cargo meta`; the crates.io name `cargo-meta` is
held by an unrelated crate, so the CLI crate will publish under another name that installs a
`cargo-meta` binary (a plan, not a promise). Nothing is published.
- **Example and write-up: metadata-driven grids, forms and routes in TypeScript.**
`examples/dynamic-grid/` serves and renders every entity of a model from the loaded
metadata: one grid component and one form component that take an entity name and read the
rest from `GET /_meta`, and one Fastify mount over `ObjectManager`, on SQLite. The only
generated code is the types and name constants its hand-written business rules use.
Editing the metadata changes the grid, the form and the API with no regeneration.
`docs/features/metadata-driven-runtime.md` measures it against the reference generators
for the same model (1,823 hand-written lines paid once, against 3,629 generated lines
that grow by about 726 an entity), gives the per-row cost of the metadata lookups, and
lists what the approach cannot do. It is an example on the TypeScript port, not a package.

### Changed

Expand All @@ -96,6 +106,15 @@ here.**

### Fixed

- **Fix, TypeScript: `DELETE` on a missing row answers `404`, not `500`, from the
ObjectManager route mount.** `mountCrudRoutes` and `mountDeleteRoute` in
`@metaobjectsdev/runtime-ts/fastify` called `ObjectManager.delete` in its default mode, which
throws for a row that is not there, so the request ended as `500 {"error":"internal"}`. They
now answer `404 {"error":"not_found"}`, as the update route and the generated routes do.
- **Fix, TypeScript: `findMany` with an `offset` and no `limit` works on SQLite and MySQL.**
The Kysely and Drizzle drivers in `@metaobjectsdev/runtime-ts` wrote `OFFSET` with no
`LIMIT`, which is a syntax error on both databases, so the call threw. An offset alone
now carries a limit no result can reach, and skips rows on every dialect.
- **Fix, Java, Kotlin and Python: `<Entity>Names` has no entry for a derived field with no
column.** The TypeScript and C# names generators already left out a derived (`origin.*`) field
of an entity read from its table; Java, Kotlin and Python still emitted a column constant
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ first-week wedge plan — and `meta init` picks up from there.
- Want the design rationale? → [`spec/`](spec/) + [`docs/superpowers/specs/`](docs/superpowers/specs/).
- Want a worked, non-toy model? → [`examples/advanced-modeling/`](examples/advanced-modeling/)
(projections, value objects, TPH, prompt payloads on one runnable spine).
- Want the metadata to drive the UI and the API at runtime, with no per-entity codegen? → [`docs/features/metadata-driven-runtime.md`](docs/features/metadata-driven-runtime.md)
and [`examples/dynamic-grid/`](examples/dynamic-grid/) (TypeScript).
- Want the cross-language contract? → [`fixtures/`](fixtures/) (the conformance corpora are the oracle).
- Upgrading from 1.0.x to 1.1? → [`docs/features/migrations/upgrading-1.0-to-1.1.md`](docs/features/migrations/upgrading-1.0-to-1.1.md).

Expand Down Expand Up @@ -316,7 +318,8 @@ metaobjects/
│ ├── superpowers/specs/ # design specs
│ └── RELEASING.md # npm publish procedure
├── examples/
│ └── advanced-modeling/ # a worked, runnable non-toy model
│ ├── advanced-modeling/ # a worked, runnable non-toy model
│ └── dynamic-grid/ # runtime metadata: one grid, form and route mount for every entity (TypeScript)
├── library/ # shipped libraries, opt-in per project via `libraries: [...]`
│ ├── ai/ # the LLM-call trace envelope (stable)
│ └── iam/ # users, groups, roles, grants (preview)
Expand Down
75 changes: 73 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ docs/
│ ├── cube-export.md # the cube-model generator: reporting vocabulary as Cube data-model files (FR-044)
│ ├── explorer-data.md # explorer.json and its inputs: export --effective, the verify ledger rows, manifest provenance
│ ├── explorer-site.md # the model explorer site docsSiteFile() builds from explorer.json
│ ├── metadata-driven-runtime.md # one grid, one form and one route mount for every entity, read from the loaded metadata (TypeScript example, measured)
│ └── own-your-codegen.md # scaffold-and-own generator ownership (ADR-0034)
└── ports/ # one file per language/framework port
├── typescript.md
Expand Down Expand Up @@ -92,6 +93,7 @@ this tree is documentation, not the source of truth.
| Know which feature is supported in which port today | the capability matrix in the root [`README.md`](../README.md) or the per-port "Capability snapshot" table |
| See which conformance fixtures gate each feature (and which port passes which) | [`CONFORMANCE.md`](CONFORMANCE.md) |
| See a worked, non-toy model end to end (projections, value objects, TPH, prompt payloads on one runnable spine) | [`../examples/advanced-modeling/`](../examples/advanced-modeling/) |
| Serve and render every entity from the loaded metadata instead of generating a route, grid and form per entity (TypeScript; one grid and one form component, measured against the generators, with what it cannot do) | [`features/metadata-driven-runtime.md`](features/metadata-driven-runtime.md), [`../examples/dynamic-grid/`](../examples/dynamic-grid/) |
| Read the canonical spec (target-agnostic) | [`../spec/`](../spec/) |
| Find a release recipe (Cloudflare D1, etc.) | [`recipes/`](recipes/) |
| Keep drizzle-kit migrations while MetaObjects owns the model | [`recipes/drizzle-kit-migrations.md`](recipes/drizzle-kit-migrations.md) |
Expand Down
3 changes: 2 additions & 1 deletion docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@ diff explained.
## Prerequisites

- The JS/TS **workspace root is the repo root** (`/package.json`), globbing
`server/typescript/packages/*` + `client/web/packages/*`. This is what makes `workspace:*`
`server/typescript/packages/*` + `client/web/packages/*` (and the private `examples/dynamic-grid`,
which publishes nothing). This is what makes `workspace:*`
resolve uniformly at publish time — don't move it.
- npm auth as an owner of the `metaobjectsdev` org. The account has 2FA **auth-and-writes**, so for
an unattended publish use a **Granular/Automation token with the bypass-2FA option**, scoped
Expand Down
Loading
Loading