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
10 changes: 10 additions & 0 deletions .changeset/28855-object-extension-registry-comment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@objectstack/spec': patch
---

docs(spec): the `object_extension` registry row's comment now says what happens to a code package's `objectExtensions`

Clause-②: no
Metadata-protocol: none

The `//` comment above the `object_extension` row of `DEFAULT_METADATA_TYPE_REGISTRY` (`src/kernel/metadata-plugin.zod.ts`, which ships in the package) said the artifact loader stores a code package's `objectExtensions` under this type. It does not: the ObjectQL engine's `registerApp` registers each extension as an `'extend'` contributor of its target object, and the artifact loader files no item from that collection because an extension carries `extend` and no `name`. The comment now says so, and that this type's items are the stored rows the `/api/v1/meta` doors write. Comment only: no key, row field or schema changes.
8 changes: 6 additions & 2 deletions packages/spec/src/kernel/metadata-plugin.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,12 @@ export const DEFAULT_METADATA_TYPE_REGISTRY: MetadataTypeRegistryEntryParsed[] =
// `filePatterns`: the `*.extension.ts` convention a code package's
// `defineObjectExtension` files follow (`examples/app-showcase/src/data/
// extensions/`). A code package declares its extensions in
// `objectExtensions`, which the artifact loader already stores under this
// type name. `supportsOverlay` /
// `objectExtensions`, and they are never stored as items of this type: the
// ObjectQL engine's `registerApp` registers each one as an `'extend'`
// contributor of its target object. The artifact loader maps that collection
// to this type name but files no item from it, because an extension carries
// `extend` and no `name`. This type's items are the stored rows the
// `/api/v1/meta` doors write. `supportsOverlay` /
// `allowEnvironmentOverlay: false`: an extension is never overlaid; a
// package changes its own item, and a second package writes a second item.
// The body is judged by the metadata-protocol doors with
Expand Down
Loading