You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6b5895b
Browse filesBrowse the repository at this point in the historyBrowse files
fix(objectql,cli): carry boot's falsy-key skip into the shared view-container judge; fixtures boot accepts
viewContainerNameRefusal now answers undefined for a container whose
derived object key is falsy, the entry registerMetadataCollections warns
about and skips before the name check, so os validate cannot refuse what
boot skips. Pinned by a control that boot registers nothing and throws
nothing.
Every CLI test fixture whose views: container carried a name other than
its bound object (two red integration pins among them) now names the
object, so each is a stack the server loads. The changeset grades
@objectstack/objectql minor with Clause-② yes for its two new root
exports, and the gate-parity remedy text names VALIDATE_ONLY_GATES.
Claude-Session: https://claude.ai/code/session_01UYBdGBzWSrAMzpW8ah3GbP
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .changeset/20331-validate-view-container-name.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
---
2
2
'@objectstack/cli': patch
3
-
'@objectstack/objectql': patch
3
+
'@objectstack/objectql': minor
4
4
---
5
5
6
6
fix(cli): `os validate` refuses a `views:` container whose own `name` disagrees with the object it binds to, the stack the server refuses at boot (#20331)
7
7
8
-
Clause-②: no
8
+
Clause-②: yes
9
9
10
10
A view container is registered under the object it binds to. When its own `name`
11
11
is set to something else, for example `{ name: 'order_line', object: 'my_app_order_line', list: { … } }`,
@@ -21,10 +21,13 @@ unchanged.
21
21
22
22
**Fix:** remove the container's `name`, or set it to the object name the message names.
23
23
24
-
`@objectstack/objectql` exports the check as `viewContainerNameRefusal(container, sourceLabel, ownerId)`,
25
-
with its type `ViewContainerNameRefusal`. It returns the refusal the boot registrar
26
-
throws, or `undefined`. The boot registrar now calls this function. What it refuses,
27
-
its message and its `VALIDATION_ERROR` / `400` envelope are unchanged.
24
+
**New in `@objectstack/objectql` (the widening):** two new exports on the package's
25
+
root entry, `viewContainerNameRefusal(container, sourceLabel, ownerId)` and its
26
+
return type `ViewContainerNameRefusal`. The function returns the refusal the boot
27
+
registrar throws, or `undefined`. It returns `undefined` for a container whose
28
+
derived object key is empty, because the boot registrar skips that entry with a
29
+
warning and never refuses it. The boot registrar now calls this function. What it
30
+
refuses, its message and its `VALIDATION_ERROR` / `400` envelope are unchanged.
28
31
29
32
Not changed: `os build` does not run this check, so it still writes an artifact
30
33
carrying such a container, and the server refuses that artifact when it loads it.
0 commit comments