@object-ui/data-objectstack 17.5.0 → 17.6.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.
- package/CHANGELOG.md +219 -0
- package/dist/index.cjs +262 -357
- package/dist/index.d.cts +385 -448
- package/dist/index.d.ts +385 -448
- package/dist/index.js +258 -350
- package/package.json +5 -6
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/src/aggregate-capability.test.ts +0 -177
- package/src/apiAccessDenied.test.ts +0 -233
- package/src/appAccessProbe.test.ts +0 -147
- package/src/bulkDelete.test.ts +0 -75
- package/src/bulkUpdate.test.ts +0 -93
- package/src/cache/MetadataCache.test.ts +0 -477
- package/src/cache/MetadataCache.ts +0 -289
- package/src/cloud-surface-retired-4152.pin.test.ts +0 -171
- package/src/connection.test.ts +0 -188
- package/src/contracts.ts +0 -115
- package/src/deleteView.homes.test.ts +0 -389
- package/src/deleteViewContract.types.test.ts +0 -246
- package/src/errors.test.ts +0 -426
- package/src/errors.ts +0 -293
- package/src/exportDownload.test.ts +0 -141
- package/src/filter-entry-translation.test.ts +0 -360
- package/src/filter-operator-ast-parity.test.ts +0 -135
- package/src/getObjectSchema.test.ts +0 -145
- package/src/httpFailureLogging.test.ts +0 -109
- package/src/importJob.test.ts +0 -71
- package/src/index.ts +0 -4442
- package/src/integration.ts +0 -200
- package/src/listViewOverrides.test.ts +0 -241
- package/src/listViews.test.ts +0 -175
- package/src/metadata-client.get-envelope.test.ts +0 -171
- package/src/metadata-client.saveAdvisories.test.ts +0 -226
- package/src/metadata-client.test.ts +0 -303
- package/src/metadata-client.ts +0 -1046
- package/src/occ.test.ts +0 -101
- package/src/onMutation.test.ts +0 -589
- package/src/onSaveAdvisory.test.ts +0 -311
- package/src/onWriteWarning.test.ts +0 -273
- package/src/orderby-serialization.test.ts +0 -115
- package/src/queryDataset.test.ts +0 -543
- package/src/searchAll.test.ts +0 -120
- package/src/security.ts +0 -243
- package/src/spec-symbol-batch6.test.ts +0 -326
- package/src/studio.ts +0 -152
- package/src/updateView.draft.test.ts +0 -242
- package/src/userState.test.ts +0 -315
- package/src/userState.ts +0 -238
- package/src/v3-compat.test.ts +0 -229
- package/src/validation-error.test.ts +0 -94
- package/src/viewCacheInvalidation.pin.test.ts +0 -260
- package/src/viewInvalidationSeam.pin.test.ts +0 -162
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,224 @@
|
|
|
1
1
|
# @object-ui/data-objectstack
|
|
2
2
|
|
|
3
|
+
## 17.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a8411ad: data-objectstack: retire the four remaining `v3.0.0 Deep Integration` modules — `IntegrationManager`, `SecurityManager`, the studio canvas helpers (`createDefaultCanvasConfig` / `snapToGrid` / `calculateAutoLayout`), and the contract helpers (`validatePluginContract` / `generateContractManifest`) — for having zero code consumers outside this package
|
|
8
|
+
|
|
9
|
+
`src/index.ts`'s `// v3.0.0 Deep Integration modules` banner introduced five
|
|
10
|
+
modules. objectui#4152 / PR #4239 already retired the first,
|
|
11
|
+
`CloudOperations`, for fabricating a plausible success against a client
|
|
12
|
+
namespace that does not exist. This closes out the other four:
|
|
13
|
+
`contracts.ts`, `integration.ts`, `security.ts`, `studio.ts`.
|
|
14
|
+
|
|
15
|
+
**Not a repeat of #4152's urgency limb.** None of these four fabricated
|
|
16
|
+
anything — `SecurityManager.generateCSPHeader()` really composes a header,
|
|
17
|
+
`snapToGrid` really snaps, `validatePluginContract` really validates. What
|
|
18
|
+
they shared with `CloudOperations` was the other limb: published surface of
|
|
19
|
+
`@object-ui/data-objectstack` with a measured **zero** code consumers outside
|
|
20
|
+
this package, across `packages/`, `apps/` and `examples/` (`.ts`/`.tsx`,
|
|
21
|
+
excluding `node_modules`). The two apparent hits on re-measurement were
|
|
22
|
+
homonyms, not consumers — `packages/plugin-designer/src/PageDesigner.tsx`
|
|
23
|
+
declares its own local `snapToGrid` callback with no import from this
|
|
24
|
+
package, and the `SecurityManager` hits outside this file are prose in
|
|
25
|
+
`CHANGELOG.md`. Under the startup-focus principle a declared capability with
|
|
26
|
+
no producer, no consumer and no business pull is retired, not kept on the
|
|
27
|
+
chance it becomes useful.
|
|
28
|
+
|
|
29
|
+
**Breaking, in FROM → TO form.** The following are no longer exported from
|
|
30
|
+
`@object-ui/data-objectstack`:
|
|
31
|
+
|
|
32
|
+
- `IntegrationManager` and its types (`IntegrationConfig`, `IntegrationTrigger`,
|
|
33
|
+
`IntegrationProvider`, `SlackIntegrationConfig`, `EmailIntegrationConfig`,
|
|
34
|
+
`WebhookIntegrationConfig`)
|
|
35
|
+
- `SecurityManager` and its types (`SecurityManagerPolicy`, `CSPConfig`,
|
|
36
|
+
`AuditLogConfig`, `AuditEventType`, `DataMaskingConfig`, `DataMaskingRule`,
|
|
37
|
+
`AuditLogEntry`)
|
|
38
|
+
- `createDefaultCanvasConfig`, `snapToGrid`, `calculateAutoLayout` and their
|
|
39
|
+
types (`StudioCanvasConfig`, `StudioPropertyEditor`,
|
|
40
|
+
`StudioThemeBuilderConfig`, `StudioColorPalette`, `StudioTypographyPreset`,
|
|
41
|
+
`StudioShadowPreset`)
|
|
42
|
+
- `validatePluginContract`, `generateContractManifest` and their types
|
|
43
|
+
(`PluginContract`, `PluginExport`, `PluginAPIContract`,
|
|
44
|
+
`ContractValidationResult`, `ContractValidationError`)
|
|
45
|
+
|
|
46
|
+
It is a `minor` under this repo's version policy (objectui's own breaking
|
|
47
|
+
changes never declare `major`). Nothing broke that was working: the only
|
|
48
|
+
in-repo construction sites were this package's own `v3-compat.test.ts` (which
|
|
49
|
+
exercised the modules directly) and `spec-symbol-batch6.test.ts` (which only
|
|
50
|
+
guarded `SecurityManagerPolicy`'s name against colliding with the spec's
|
|
51
|
+
unrelated `SecurityPolicy` — that guard is removed along with its subject).
|
|
52
|
+
|
|
53
|
+
**No compile-compat stub was left**, for the same reason #4152 left none: with
|
|
54
|
+
no consumer to keep compiling, a stub would be a second phantom surface
|
|
55
|
+
guarding the first.
|
|
56
|
+
|
|
57
|
+
**The banner and the compat-test title stop claiming a v3.** `index.ts`'s
|
|
58
|
+
`// v3.0.0 Deep Integration modules` banner had nothing left under it once
|
|
59
|
+
these four went, so it is removed rather than retitled.
|
|
60
|
+
`v3-compat.test.ts` — titled "v3.0.0 compatibility tests for @objectstack
|
|
61
|
+
dependencies" against a resolved `@objectstack` family of `17.0.0-rc.6` even
|
|
62
|
+
before this change — is not an empty shell (one block, `PaginatedResult API`,
|
|
63
|
+
never depended on any of the five retired modules), so it stays and is
|
|
64
|
+
retitled instead of deleted.
|
|
65
|
+
|
|
66
|
+
A negative pin
|
|
67
|
+
(`src/v3-deep-integration-retired-4241.pin.test.ts`) replaces the retired
|
|
68
|
+
`v3-compat.test.ts` cases and fails if any of the thirty retired names
|
|
69
|
+
returns — reading both the runtime export list (which catches the seven
|
|
70
|
+
class/function exports) and `index.ts`'s source text (the only instrument
|
|
71
|
+
that can catch a returning `export type`).
|
|
72
|
+
|
|
73
|
+
### Patch Changes
|
|
74
|
+
|
|
75
|
+
- 1ef236e: `@object-ui/data-objectstack` stops publishing its `src/` tree
|
|
76
|
+
|
|
77
|
+
The manifest's `files` array listed `src` alongside `dist`, so every published tarball carried all 43 source files — 38 of them `*.test.ts`. It had been that way since the package's first commit (`780a1b993`), never added for a consumer, and objectui#4006 recorded the same shape without acting on it: its scope was the `*.test.d.ts` half that the build program emitted into `dist`, and its own triage note graded this half as tarball weight rather than a break.
|
|
78
|
+
|
|
79
|
+
Nothing in the published surface reached those files, which is why no consumer changes in either direction. Measured on a cleanly rebuilt `dist`, all four ways in are closed: the `exports` map has one entry (`.`) and every condition under it targets `dist`; `main` / `module` / `types` are `./dist/index.js`, `./dist/index.js`, `./dist/index.d.ts`; the repo and the docs teach only the root specifier, and no `@object-ui/data-objectstack/src/...` deep import exists anywhere (the `src` paths in sibling `vite.config.ts` / `vitest.config.mts` files are workspace aliases resolved through `path.resolve()` against the source tree, which no `files` array shapes); and the tarball holds no sourcemap that could point back at `src`, since `tsup.config.ts` sets `sourcemap: false` and its bundled `dts` writes no `.d.ts.map` — the built `dist` contains four files, zero `.map` among them, and zero occurrences of `sourceMappingURL` or `../src/`.
|
|
80
|
+
|
|
81
|
+
`npm pack --dry-run` across the change, on the same `dist`:
|
|
82
|
+
|
|
83
|
+
| | before | after |
|
|
84
|
+
| --- | --- | --- |
|
|
85
|
+
| entries | 51 | 8 |
|
|
86
|
+
| unpacked | 1356830 B | 719876 B |
|
|
87
|
+
| tarball | 393379 B | 222157 B |
|
|
88
|
+
|
|
89
|
+
43 files leave, none arrives, and every surviving entry is byte-identical apart from the edited `package.json`: `dist/index.{js,cjs,d.ts,d.cts}`, `README.md`, `CHANGELOG.md`, `LICENSE`, `package.json`. The 43 are the 38 tests plus the five modules they cover (`index.ts`, `errors.ts`, `metadata-client.ts`, `userState.ts`, `cache/MetadataCache.ts`), whose published form remains the bundled `dist/index.js`.
|
|
90
|
+
- cf4f8a6: `MetadataClient.layered()` now reads the three-layer view from its declared path,
|
|
91
|
+
`GET /meta/:type/:name/layers`, instead of flagging the ordinary item read.
|
|
92
|
+
|
|
93
|
+
The consumer half of objectstack#5882 (ruled B by the maintainer; the server half
|
|
94
|
+
landed in objectstack#6596 and shipped in `@objectstack/spec@17.0.0`). The layered
|
|
95
|
+
projection — packaged baseline vs tenant overlay vs merged effective, which is
|
|
96
|
+
what the Studio metadata editor's comparison tabs render — used to be reached by
|
|
97
|
+
hanging a query flag on `GET /meta/:type/:name`. One route therefore answered two
|
|
98
|
+
unrelated representations chosen by a query parameter, while `packages/spec`
|
|
99
|
+
declared only the unflagged one: anything generating a client from the route
|
|
100
|
+
table produced a parser that was simply wrong for the flagged call. The
|
|
101
|
+
projection now has a path of its own and a response schema of its own
|
|
102
|
+
(`GetMetaItemLayeredResponseSchema`).
|
|
103
|
+
|
|
104
|
+
Same body, same envelope, so nothing in the editor changes shape: `code`,
|
|
105
|
+
`overlay`, `overlayScope`, `effective`, the load-time `_diagnostics` and the full
|
|
106
|
+
ADR-0010 protection envelope all still arrive on one round trip, and `?package=`
|
|
107
|
+
(ADR-0048) is still threaded — the two entry points are served by ONE handler
|
|
108
|
+
upstream precisely so the deprecation window's promise holds. The retired
|
|
109
|
+
spelling still answers during that window, marked with RFC 9745 `Deprecation` and
|
|
110
|
+
an RFC 8288 `Link: rel="successor-version"` pointing here, so this migration is
|
|
111
|
+
safe against a lagging backend for as long as the window stays open, and it is
|
|
112
|
+
what lets the maintainer close it.
|
|
113
|
+
|
|
114
|
+
One behaviour delta rides along, and it is the server's design rather than a
|
|
115
|
+
choice made here: the retired flag FELL THROUGH to the plain item read when the
|
|
116
|
+
backend's protocol implementation had no layered support, answering the
|
|
117
|
+
`{ type, name, item }` envelope. A dedicated path refuses to answer a different
|
|
118
|
+
resource under this one's declared shape and returns 501 `NOT_IMPLEMENTED`, which
|
|
119
|
+
surfaces as a failed read instead of a comparison view whose `code` and `overlay`
|
|
120
|
+
are silently blank.
|
|
121
|
+
|
|
122
|
+
The request is built in this package rather than delegated to
|
|
123
|
+
`@objectstack/client` because the SDK expresses no layered read in either
|
|
124
|
+
spelling — the framework's REST route ledger records the route as `server-only`,
|
|
125
|
+
"consumed by objectui over plain HTTP", and whether the SDK should express it is
|
|
126
|
+
an open upstream product call. The new path expectation is derived from the
|
|
127
|
+
installed `@objectstack/spec` route table, and a ratchet keeps any shipped source
|
|
128
|
+
file or skills guide from reaching the projection by query flag again.
|
|
129
|
+
- 3d053bb: The Studio's overlay-layer badge stops printing the producer's raw scope value
|
|
130
|
+
|
|
131
|
+
objectui#4982. `MetadataLayered.overlayScope` was typed `string | null` under a comment naming its
|
|
132
|
+
vocabulary as `organization | environment | package` — three spellings the producer has never
|
|
133
|
+
emitted. The real vocabulary lives in `@objectstack/spec`'s `GetMetaItemLayeredResponseSchema`
|
|
134
|
+
(`z.enum(['org', 'env']).nullable()`), and the framework's two assignment sites write `'org'` /
|
|
135
|
+
`'env'`. Because the declared type was `string`, no compiler anywhere had an opinion, so the wrong
|
|
136
|
+
comment was the only description of the field a reader had.
|
|
137
|
+
|
|
138
|
+
`overlayScope` is now the spec union, derived by indexing the published response type rather than
|
|
139
|
+
restated locally (a restatement is the fork `check:spec-symbol-derivation` rejects); the alias ships
|
|
140
|
+
as `MetadataOverlayScope`.
|
|
141
|
+
|
|
142
|
+
User-visible half: `LayeredDiff`'s overlay badge rendered that value straight to screen while the
|
|
143
|
+
sibling artifact / none / merged badges all went through `translateConsoleValue`, and
|
|
144
|
+
`CONSOLE_VALUE_ZH.layer` had no entry for either value the field can hold. One badge therefore had
|
|
145
|
+
two languages depending on the data — a zh-CN admin opening any overlaid metadata item read `org` /
|
|
146
|
+
`env`, while an un-overlaid one read 「已设」. The badge now translates like its three siblings, with
|
|
147
|
+
「组织」/「环境」 added to the layer table. That table's overlay-scope half is keyed by the spec union,
|
|
148
|
+
so a scope the spec adds later fails `type-check` until it has a label instead of quietly reaching a
|
|
149
|
+
badge in English. `translateConsoleValue` remains zh-only for every group, as before — extending it
|
|
150
|
+
to the other locale packs is a separate decision and not part of this change.
|
|
151
|
+
- d871f8e: A view personalization overlay no longer freezes the view it was laid over. `ObjectView`'s
|
|
152
|
+
`persistViewPatch` sends `{ ...baseViewDef, ...patch }`, so a row written by a mere column
|
|
153
|
+
drag or sort change stored the view's whole body — its effective `filter`, `columns`,
|
|
154
|
+
`label`, `type`, `isDefault` — as of that moment, and the display merge
|
|
155
|
+
(`{ ...source, ...override }`) then let that snapshot outrank the source view indefinitely:
|
|
156
|
+
an admin edited a view's filter and everyone who had ever resized a column silently kept the
|
|
157
|
+
old filter, with nothing reporting it.
|
|
158
|
+
|
|
159
|
+
An overlay now contributes only the keys it owns — `rowHeight`, `sort`, `hiddenFields`,
|
|
160
|
+
`columnState`, `inlineEdit` (`VIEW_OVERLAY_OWNED_KEYS`, new export from
|
|
161
|
+
`@object-ui/data-objectstack` alongside `narrowPersonalizationOverlay`) — so a later change
|
|
162
|
+
to the source view reaches every user, including those whose stored row still carries the
|
|
163
|
+
old snapshot: rows written before this change stop shadowing the source on the next read,
|
|
164
|
+
with no migration to run and nothing rewritten at rest. A genuine saved view's own body is
|
|
165
|
+
untouched — it is classified by the same predicate `listViews()` already excludes overlay
|
|
166
|
+
rows by, so a row cannot be an overlay for one reader and a saved view for the other
|
|
167
|
+
(objectui#5233, ruled on objectstack#7494).
|
|
168
|
+
- a0b9e91: A system (code-defined) view's personalization overlay row no longer masquerades as a user-created saved view.
|
|
169
|
+
|
|
170
|
+
Toggling density / sort / hidden columns / column widths / inline-edit on a code-defined view persists a row under the same `type='view'` metadata namespace a genuinely saved view lives in, keyed by the same id (`ObjectStackAdapter.updateViewConfig`). `listViews()` previously returned that row indistinguishably from a real saved view, so `ObjectView`'s `isSystem = !saved` check flipped to `false` and the tab gained Rename / Delete / Set-default / Pin against a view that lives in code — `handleDeleteView` would even call `dataSource.deleteView` on it.
|
|
171
|
+
|
|
172
|
+
Two layers now keep the two kinds of rows apart:
|
|
173
|
+
|
|
174
|
+
- **Write side**: `updateViewConfig` — the only production writer of personalization overlays — stamps an explicit `_isOverride: true` discriminant on every row it saves, UNLESS the write targets an already-saved view's own row (see below).
|
|
175
|
+
- **Read side**: `listViews()` excludes any row carrying that marker, and (for rows already persisted before this fix shipped) a best-effort legacy shape: a flat body with a `viewKind` the platform can only have server-side-backfilled from a registry (code-defined) baseline — a genuine runtime-created saved view never has one.
|
|
176
|
+
|
|
177
|
+
`listViewOverrides()` (the reader `ObjectView` uses to merge these settings back into the live view for display) is unchanged — it is supposed to keep seeing overlay rows.
|
|
178
|
+
|
|
179
|
+
The overlay this stores is **org-wide shared view settings**, not a per-user preference (a true per-user scope is a parked platform-side v18 direction) — comments describing it as "personal" have been corrected to say so.
|
|
180
|
+
|
|
181
|
+
**Follow-up fix (same card, post-review):** `updateViewConfig`'s ONE call site (`ObjectView`'s toolbar-driven toggle) fires for a toggle on EITHER a system view OR an already-saved view — a saved view whose own toolbar the user toggles writes to that same view's own row. Stamping the overlay marker unconditionally there would flag the user's own saved view as an overlay and make `listViews()` exclude it on the very next read, i.e. the saved view would vanish from the switcher the moment its density was adjusted. `updateViewConfig` gains an optional `opts.isSavedView` parameter (also added to the `DataSource` interface in `@object-ui/types`); `ObjectView` passes it from the same `isSavedViewId` classification its readonly gate and mutating handlers already use, and the marker is withheld when it's true.
|
|
182
|
+
- Updated dependencies [88085e3]
|
|
183
|
+
- Updated dependencies [2533ec5]
|
|
184
|
+
- Updated dependencies [bbe8b86]
|
|
185
|
+
- Updated dependencies [8477be5]
|
|
186
|
+
- Updated dependencies [279fb13]
|
|
187
|
+
- Updated dependencies [ad07b65]
|
|
188
|
+
- Updated dependencies [41f498b]
|
|
189
|
+
- Updated dependencies [e1d4251]
|
|
190
|
+
- Updated dependencies [1184192]
|
|
191
|
+
- Updated dependencies [a2a9747]
|
|
192
|
+
- Updated dependencies [ac600e5]
|
|
193
|
+
- Updated dependencies [c1ef923]
|
|
194
|
+
- Updated dependencies [af5e292]
|
|
195
|
+
- Updated dependencies [7f96b10]
|
|
196
|
+
- Updated dependencies [167ec42]
|
|
197
|
+
- Updated dependencies [f1d4748]
|
|
198
|
+
- Updated dependencies [b1119ec]
|
|
199
|
+
- Updated dependencies [9f23d2b]
|
|
200
|
+
- Updated dependencies [578e025]
|
|
201
|
+
- Updated dependencies [af025ee]
|
|
202
|
+
- Updated dependencies [598c89a]
|
|
203
|
+
- Updated dependencies [b8b9af4]
|
|
204
|
+
- Updated dependencies [31676be]
|
|
205
|
+
- Updated dependencies [9ce096f]
|
|
206
|
+
- Updated dependencies [e05db88]
|
|
207
|
+
- Updated dependencies [5ffcc14]
|
|
208
|
+
- Updated dependencies [d971e51]
|
|
209
|
+
- Updated dependencies [97abb24]
|
|
210
|
+
- Updated dependencies [deb157a]
|
|
211
|
+
- Updated dependencies [d2ce342]
|
|
212
|
+
- Updated dependencies [9695da7]
|
|
213
|
+
- Updated dependencies [58b8346]
|
|
214
|
+
- Updated dependencies [dfc6975]
|
|
215
|
+
- Updated dependencies [3cf4de0]
|
|
216
|
+
- Updated dependencies [c9dc811]
|
|
217
|
+
- Updated dependencies [a0b9e91]
|
|
218
|
+
- Updated dependencies [99bd015]
|
|
219
|
+
- @object-ui/types@17.6.0
|
|
220
|
+
- @object-ui/core@17.6.0
|
|
221
|
+
|
|
3
222
|
## 17.5.0
|
|
4
223
|
|
|
5
224
|
### Minor Changes
|