Skip to content

Commit 98a4449

Browse files
fix(objectql): the packaged object base carries the fields a code extender adds, so /meta translates a dependent package's added fields (#34156)
<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Steedos** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbSUQWB2j9eHYsRcrCiq1X1C)_ ## 维护者速读 - **改了什么**:依赖包通过 `objectExtensions` 给基础包对象新增的字段(如 carbon 包给 `crm_account` 加的 `cb_market`),在中文等非默认语言下读 `/api/v1/meta/object` 时,字段名和选项名现在按该依赖包自己的翻译包显示,不再是英文。 - **为什么改**:此前对象的"出厂基准"只算基础包自己声明的字段,依赖包加的字段被当成"后来手工改过",于是翻译一律不套用;新建记录表单读的就是这个接口,所以中文界面里出现英文选项。 - **风险与回滚**:只扩了基准里"基础包没声明、由代码依赖包新增"的字段;基础包自己的字段、对象名称、`fieldPatches` 改的文字、租户和 `.custom` 加的字段都按原样不动。回滚即 revert 本 PR。 - **先看**:`packages/objectql/src/registry.ts`(`packagedAddedFields` 与 `getPackagedObjectBase`,重写后的 ⛔ 段)、`packages/objectql/src/protocol-packaged-object-base.test.ts`(边界钉子)、`packages/objectql/src/protocol-meta-effective-schema.test.ts`(中文读回再保存仍存英文原文)。 - **两分钟验证**:`pnpm --filter @objectstack/rest exec vitest run --maxWorkers=2 src/meta-object-field-patch-i18n.test.ts`,预期 12 passed,其中新增组断言 zh-CN 下 `cb_market` 为「市场」、选项为「内销 / 出口」,基础包自己被改名的字段仍保持原文。 - **需要你做的**:无,席位落地。 Fixes #33800 Half 2 of the card (a dependent package's `fieldPatches` label/description getting its own translation) is out of this PR by maintainer ruling 6896340775: D stands and it has its own card. Until that card lands, patched text shows as written in every language. Clause-②: no Metadata-protocol: none ## What changes **The defect, measured on `origin/main` 45dee17.** A select field `cb_market` added by a dependent code package through `objectExtensions`, with the zh-CN rows in that package's pack, was served under zh-CN as `Market` / `Domestic` / `Export`. That held on the item read and on the list read (`translateMetaDocument` / `translateMetaList`, over a real `SchemaRegistry`). `translateObject` worked as designed. Its input was the problem: `SchemaRegistry.getPackagedObjectBase` returned the owner's declaration alone, so the field had no packaged counterpart and every slot of it counted as authored after the fact. **Origin.** The label and option-label divergence checks came in with #29624 (59775a0, shipped in 18.3.0). It was not #29948, and not 18.4.0: the path is identical from 18.3.0 to 18.4.0 (measured: `translateObject`, `packagedObjectField`, `valueOverridesPackagedBase`, `getPackagedObjectBase` and `translateMetaDocument` agree at the 18.3.0 and 18.4.0 tags). **The fix (seat ruling 6895879286, option A).** `getPackagedObjectBase` now also carries every field that a CODE `extend` contributor adds under a name the owner does not declare (`packagedAddedFields`). It uses the same filter as `packagedRules` (`ownership === 'extend' && isCodeArtifactBody`). This extends #27559's rule-name principle to field names: the catalog rows for such a field can only translate what its extender ships. Boundaries, each one pinned: - An owner-declared field stays the owner's, even when an extender redeclares it (#8037). - Same-name extenders resolve to the fold's winner (ascending priority). - `fieldPatches` are not merged, and the scalars are untouched. - Fields from a tenant overlay or a stored (`_provenance: 'org'`) extension, the `.custom` pair's included, stay diverged. - The ⛔ at the former registry.ts:8140 is rewritten and keeps the #8037 reason. - The base is returned BY REFERENCE only when no code extender ships a rule or adds a field. No caller relies on reference equality: the callers are `metadata-protocol`'s echo restore and base accessor, the REST read gate, and objectql's `engine-validation-messages`, which reads `.validations` only. **The save door agrees with the read.** `restoreTranslatedObjectEchoes` (#29673) reads the same accessor. A zh-CN read of the added field, echoed back by a PUT, is stored as the extender's source text (`Market`, `Domestic`, `Export`), both over a stored row and with none. **Extender-added `listViews`: not applicable, no card.** `ObjectExtensionSchema` refuses `listViews` on an extension (`packages/spec/src/data/object.zod.ts`, its guidance: "`listViews` cannot be contributed through an object extension"). So `translateObjectListViews` never sees a view an extender added. **Stale comments rewritten:** the `TranslateDocumentOptions.packagedBase` doc, the `packagedObjectField` doc, the `translateObject` docblock sentence on undeclared fields, and the `i18n-resolver.test.ts` comment on the undeclared-field pin. These are comment-only changes in `@objectstack/spec`. **Contract declaration.** `Clause-②: no`. No accept set, export, schema or response shape changes, and nothing previously served is refused. What changes is the label text that non-default-locale `/api/v1/meta/object` reads serve for fields a code extender adds; the changeset says so. Default-locale reads are unchanged. Not breaking, so no `!`, banner or ADR-0087 marker, and the dogfood battery is not owed. ## Tests - `packages/objectql/src/protocol-packaged-object-base.test.ts` (the existing harness for `getPackagedObjectBase`, per ruling 6583487846): a new top-level describe with 7 cases. The BY REFERENCE pin is flipped: with the shared fixture's `loyalty_tier` extension the base is now a copy that carries the field, and a label-only extension still returns the owner by reference. - `packages/rest/src/meta-object-field-patch-i18n.test.ts` (the existing harness for the meta-object extension i18n exit): a new top-level describe with 5 cases (item read, list read, base fields, owner field redeclared, tenant-added field). - `packages/objectql/src/protocol-meta-effective-schema.test.ts` (the existing #29673 door harness): a new top-level describe with 2 cases (with and without a stored row). Red before the fix (45dee17 + pins): objectql 4 failed / 9 passed; rest 4 failed / 8 passed (`expected 'Market' to be '市场'`). ## Acceptance notes - **The reporter's package shape (seat item 2) was not measured directly**: `steedos-labs/os-project-blackcat-crm` is not readable from this session. The card's own facts point to a code package rather than a stored `object_extension` row. The fields come in "through `objectExtensions`" (the manifest key of a code package), they carry no `__c` suffix, and the package "passes validate". - Extender-added `listViews`: none can exist (the extension schema refuses the key), so there is nothing to translate and no card to file. - The seat ruling asks the reporter to confirm which page and version their 18.3.0 Chinese reading came from. On this path 18.3.0 and 18.4.0 behave the same (#29624 shipped in 18.3.0). ## Verification All on head `ecffbe8d0` (origin/main `86350e125` merged), unless a line names another head. <details><summary>Pins, typecheck, generated artifacts (locked, final head)</summary> ``` os-verify-lock: VERDICT command-exit 0 · held the lock 904s closure :: exit 0 :: pnpm --workspace-concurrency=2 --filter @objectstack/rest... build pins-oql :: exit 0 :: Test Files 2 passed (2) :: Tests 38 passed (38) pins-rest :: exit 0 :: Test Files 1 passed (1) :: Tests 12 passed (12) oql-tc :: exit 0 :: pnpm --filter @objectstack/objectql typecheck rest-tc :: exit 0 :: pnpm --filter @objectstack/rest typecheck spec-gen :: exit 0 :: pnpm --filter @objectstack/spec check:generated dts-closure / published-files / sourcemap-no-sources-content / lean-entry-closure / test-source-alias / nul-bytes / type-check-debt :: exit 0 ``` </details> <details><summary>Package suites (head c856cd3: the fix merged with origin/main fb79d47; the final head adds only a test import and a main merge that touches no package of this diff's behaviour)</summary> ``` oql-test :: exit 0 :: Test Files 598 passed (598) :: Tests 13250 passed (13250) mp-test :: exit 0 :: Test Files 342 passed | 9 skipped (351) :: Tests 22923 passed | 43 skipped rest-test :: exit 0 :: Test Files 413 passed (413) :: Tests 8459 passed | 332 skipped spec-test :: exit 0 :: Test Files 843 passed (843) :: Tests 26966 passed | 1 todo ``` </details> <details><summary>Ablations (each leg: ablation-replace, objectql build, ablation-dist-preflight, pins, restore with blob == HEAD)</summary> ``` A1 drop the owner-declared guard -> 3 red: BY REFERENCE (label-only/redeclare), owner's redeclared field (objectql), owner field redeclared (rest) A2 drop the code-artifact filter -> 1 red: carries nothing from a stored (tenant-provenance) extension A3 fold code fieldPatches into base -> 7 red: does not fold fieldPatches (objectql) + 6 of the published fieldPatches cases (rest) final build exit 0 · absent-preflight exit 0 · every leg "restored == HEAD blob" ``` A3's first run was a no-op: the anchor sat inside its own replacement, and ablation-replace refused it with a drop of 0. It was rerun with a different anchor, and the line above is that rerun. A1's first run failed the dts build (an unused binding) and was rerun clean. </details> <details><summary>Gate sweep and PR-body gates</summary> `dispatch-gates --commands` derived 93 families. 92 were run locally with exit codes recorded and exit 0, after one fix: `check:test-source-alias` asked for a module-top `@objectstack/spec/ui` import in the rest pin file, which is added. `check:dual-build-cjs-loads` is left to CI. `pnpm lint` exit 0. Run with this body: `check-changeset-no-major`, `check-adr-0087-registration`, `check-closing-keyword-parity`, `check-partof-closing-keyword`, all exit 0. `git merge-tree --write-tree` is clean against origin/main, #33821 (already merged) and #34025 (the one open PR touching `i18n-resolver.ts`). </details> --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent b51cb18 commit 98a4449

7 files changed

Lines changed: 466 additions & 15 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@objectstack/objectql': patch
3+
'@objectstack/spec': patch
4+
---
5+
6+
fix(objectql): a field a dependent package adds through `objectExtensions` is served translated on `/api/v1/meta/object`
7+
8+
`SchemaRegistry.getPackagedObjectBase` (the packaged base that `/meta` translates an object against, and that the save door's translated-echo restore reads) now also carries each field a CODE `extend` contributor adds under a name the owner does not declare, as that extender ships it. A later extender's declaration of the same name replaces an earlier one, as in the fold, and a disabled package's extension adds nothing, as the fold withholds it. Before this change such a field counted as authored after the fact. Every non-default-locale read (`GET /api/v1/meta/object`, `GET /api/v1/meta/object/:name`, the list read, the form routes) then served its `label`, help text and option labels in the source language, even when the extender's own translation pack carried them. These reads now serve the pack's translation for those fields. A Studio save of such a read stores the source text again. Default-locale reads are unchanged.
9+
10+
Unchanged: the object scalars, every field the owner declares (including one an extender redeclares), and an extender's `fieldPatches` all stay the owner's. A patched label or description still keeps its text in every language. Fields added by a tenant overlay or by an extension of tenant provenance (`_provenance: 'org'`), the `.custom` pair's included, still count as authored after the fact. `@objectstack/spec` changes only in doc comments (`TranslateDocumentOptions.packagedBase` and `translateObject`).
11+
12+
Clause-②: no
13+
Metadata-protocol: none

‎packages/objectql/src/protocol-meta-effective-schema.test.ts‎

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,3 +535,89 @@ describe('[#29673] a zh-CN read echoed back is stored as its source, and publish
535535
expect(host.registry.getObject('crm_lead')).toBeDefined();
536536
});
537537
});
538+
539+
/**
540+
* [#29673 door · a code dependent's added field] The save door translates its
541+
* source against the same packaged base the read uses
542+
* (`getPackagedObjectBase`), which now carries the fields a CODE extender adds.
543+
* So a zh-CN read that serves such a field translated, echoed back by Studio's
544+
* PUT, is stored as the extender's source text — with a stored row (its
545+
* source) and without one (the packaged base is the source). Were the read and
546+
* the door to disagree about the base, the translation would be stored as the
547+
* tenant's own label, and served in English to every reader after it.
548+
*/
549+
describe('a zh-CN read of a field a code dependent adds, echoed back, is stored as its source', () => {
550+
const MARKET = {
551+
name: 'cb_market',
552+
type: 'select',
553+
label: 'Market',
554+
options: [
555+
{ value: 'domestic', label: 'Domestic' },
556+
{ value: 'export', label: 'Export' },
557+
],
558+
};
559+
const bundle = {
560+
'zh-CN': {
561+
objects: {
562+
crm_account: {
563+
fields: {
564+
name: { label: '名称' },
565+
cb_market: { label: '市场', options: { domestic: '内销', export: '出口' } },
566+
},
567+
},
568+
},
569+
},
570+
};
571+
572+
/** The code layers: a base package's owner and a dependent's `objectExtensions` field. */
573+
function codeLayers(): SchemaRegistry {
574+
const reg = new SchemaRegistry({ multiTenant: false });
575+
reg.logLevel = 'silent';
576+
reg.installPackage({ id: 'com.example.crm', name: 'crm', version: '1.0.0' } as any, 'code');
577+
reg.registerObject(
578+
{ name: 'crm_account', label: 'Account', sharingModel: 'private', fields: { name: { name: 'name', type: 'text', label: 'Name' } } } as any,
579+
'com.example.crm',
580+
);
581+
reg.installPackage({ id: 'com.example.carbon', name: 'carbon', version: '1.0.0' } as any, 'code');
582+
reg.registerObject({ name: 'crm_account', fields: { cb_market: MARKET } } as any, 'com.example.carbon', undefined, 'extend', 200);
583+
return reg;
584+
}
585+
586+
const storedOf = (host: ReturnType<typeof makeHost>) =>
587+
JSON.parse(Array.from(host.rows.values()).find((r) => r.name === 'crm_account' && r.state === 'active')!.metadata);
588+
589+
for (const withStoredRow of [true, false]) {
590+
it(`stores 'Market' and its option labels, ${withStoredRow ? 'over a stored row' : 'with no stored row'}`, async () => {
591+
const layers = codeLayers();
592+
const packagedBase = () => layers.getPackagedObjectBase('crm_account');
593+
const served: any = { ...structuredClone(layers.getObject('crm_account') as any), sharingModel: 'private' };
594+
for (const k of Object.keys(served)) if (k.startsWith('_')) delete served[k];
595+
const echo: any = translateMetadataDocument('object', structuredClone(served), bundle as any, { locale: 'zh-CN', packagedBase: packagedBase() });
596+
// The precondition: the read serves the dependent's field translated.
597+
expect(echo.fields.cb_market.label).toBe('市场');
598+
expect(echo.fields.cb_market.options.map((o: any) => o.label)).toEqual(['内销', '出口']);
599+
600+
const host = makeHost(false);
601+
if (withStoredRow) {
602+
await host.engine.insert('sys_metadata', {
603+
type: 'object', name: 'crm_account', organization_id: null, package_id: null, state: 'active',
604+
metadata: JSON.stringify({ name: 'crm_account', label: 'Account', sharingModel: 'private', fields: { name: served.fields.name, cb_market: MARKET } }),
605+
});
606+
}
607+
const protocol: any = new ObjectStackProtocolImplementation(host.engine, () => new Map<string, any>([
608+
['i18n', { getLocales: () => Object.keys(bundle), getTranslations: (locale: string) => (bundle as any)[locale] }],
609+
]));
610+
protocol.getPackagedObjectBase = (name: string) => (name === 'crm_account' ? packagedBase() : undefined);
611+
const saved: any = await protocol.saveMetaItem({ type: 'object', name: 'crm_account', item: echo, mode: 'publish' } as any);
612+
613+
const stored = storedOf(host);
614+
expect(stored.fields.cb_market.label).toBe('Market');
615+
expect(stored.fields.cb_market.options.map((o: any) => o.label)).toEqual(['Domestic', 'Export']);
616+
expect(stored.fields.name.label).toBe('Name');
617+
expect((saved.advisories ?? []).map((a: any) => a.path)).toEqual(expect.arrayContaining([
618+
'objects.crm_account.fields.cb_market.label',
619+
'objects.crm_account.fields.cb_market.options[domestic].label',
620+
]));
621+
});
622+
}
623+
});

‎packages/objectql/src/protocol-packaged-object-base.test.ts‎

Lines changed: 166 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,22 @@ describe('#27559 getPackagedObjectBase — the packaged RULE set is the owner pl
259259
expect((s.registry.getObject(OBJ) as any).label).toBe(EXTENSION_LABEL);
260260
});
261261

262-
it('stays the owner declaration BY REFERENCE when no extender ships a rule', () => {
262+
it('stays the owner declaration BY REFERENCE when no extender ships a rule or adds a field', () => {
263263
const s = makeSession();
264264
registerPackaged(s.registry);
265-
registerExtension(s.registry);
265+
// An extension that relabels the object and redeclares one of the
266+
// owner's own fields adds nothing the packaged base carries.
267+
s.registry.registerObject(
268+
{
269+
name: OBJ,
270+
label: EXTENSION_LABEL,
271+
fields: { name: { name: 'name', type: 'text', label: 'Full Name' } },
272+
} as any,
273+
EXT_PKG,
274+
undefined,
275+
'extend',
276+
210,
277+
);
266278
expect(baseOf(s.protocol)).toBe(s.registry.getPackagedObjectOwner(OBJ)?.definition);
267279
});
268280

@@ -282,3 +294,155 @@ describe('#27559 getPackagedObjectBase — the packaged RULE set is the owner pl
282294
expect(baseOf(s.protocol).validations.map((r: any) => r.message)).toEqual(['Extension says.']);
283295
});
284296
});
297+
298+
describe('getPackagedObjectBase — a field a code extender ADDS is packaged, as the extender ships it', () => {
299+
// A dependent package's `objectExtensions` entry adds fields the owner does
300+
// not declare, and ships the translations of their labels and option
301+
// labels in its own pack. The catalog translates exactly what the code
302+
// layers ship (the #27559 sentence for rules), so the packaged
303+
// counterpart of such a field is the extender's declaration; read off the
304+
// owner alone, the field counted as authored after the fact and `/meta`
305+
// served its source-language strings under every locale.
306+
const DEP_PKG = 'com.example.carbon';
307+
const MARKET = {
308+
name: 'cb_market',
309+
type: 'select',
310+
label: 'Market',
311+
options: [
312+
{ value: 'domestic', label: 'Domestic' },
313+
{ value: 'export', label: 'Export' },
314+
],
315+
};
316+
317+
function registerDependentExtension(registry: SchemaRegistry, fields: Record<string, unknown>, packageId = DEP_PKG) {
318+
registry.installPackage({ id: packageId, name: packageId, version: '1.0.0' } as any, 'code');
319+
registry.registerObject({ name: OBJ, fields } as any, packageId, undefined, 'extend', 200);
320+
}
321+
322+
it('carries a code dependent\'s added field, label and option labels, beside the owner\'s fields', () => {
323+
const s = makeSession();
324+
registerPackaged(s.registry);
325+
registerDependentExtension(s.registry, { cb_market: MARKET });
326+
327+
const base = baseOf(s.protocol);
328+
expect(base.fields.cb_market.label).toBe('Market');
329+
expect(base.fields.cb_market.options.map((o: any) => o.label)).toEqual(['Domestic', 'Export']);
330+
expect(base.fields.name.label).toBe('Name');
331+
// The owner's own declaration is not mutated on the way.
332+
expect((s.registry.getPackagedObjectOwner(OBJ)?.definition as any).fields.cb_market).toBeUndefined();
333+
});
334+
335+
it('keeps the OWNER\'s declaration of a field an extender redeclares, and the owner\'s scalars (#8037)', () => {
336+
const s = makeSession();
337+
registerPackaged(s.registry);
338+
s.registry.installPackage({ id: DEP_PKG, name: DEP_PKG, version: '1.0.0' } as any, 'code');
339+
s.registry.registerObject(
340+
{
341+
name: OBJ,
342+
label: EXTENSION_LABEL,
343+
fields: { name: { name: 'name', type: 'text', label: 'Full Name' }, cb_market: MARKET },
344+
} as any,
345+
DEP_PKG,
346+
undefined,
347+
'extend',
348+
200,
349+
);
350+
351+
const base = baseOf(s.protocol);
352+
expect(base.fields.name.label).toBe('Name');
353+
expect(base.label).toBe(PACKAGED_LABEL);
354+
expect(base.fields.cb_market.label).toBe('Market');
355+
// The served object is the fold's, which the base must not follow.
356+
expect((s.registry.getObject(OBJ) as any).fields.name.label).toBe('Full Name');
357+
});
358+
359+
it('does not carry a field a tenant overlay adds, and does not move under the tenant\'s rename of an extender field', () => {
360+
const s = makeSession();
361+
registerPackaged(s.registry);
362+
registerDependentExtension(s.registry, { cb_market: MARKET });
363+
s.registry.registerObject(
364+
{
365+
name: OBJ,
366+
label: PACKAGED_LABEL,
367+
fields: {
368+
name: { name: 'name', type: 'text', label: 'Name' },
369+
cb_market: { ...MARKET, label: 'Sales Market' },
370+
tenant_note: { name: 'tenant_note', type: 'text', label: 'Note' },
371+
},
372+
_packageId: 'sys_metadata', _provenance: 'org',
373+
} as any,
374+
'sys_metadata',
375+
undefined,
376+
'overlay',
377+
);
378+
379+
const base = baseOf(s.protocol);
380+
expect(base.fields.tenant_note).toBeUndefined();
381+
expect(base.fields.cb_market.label).toBe('Market');
382+
});
383+
384+
it('is no longer the owner BY REFERENCE once a code extender adds a field: the shared fixture\'s `loyalty_tier` is carried', () => {
385+
const s = makeSession();
386+
registerPackaged(s.registry);
387+
registerExtension(s.registry);
388+
const base = baseOf(s.protocol);
389+
expect(base).not.toBe(s.registry.getPackagedObjectOwner(OBJ)?.definition);
390+
expect(base.fields.loyalty_tier.label).toBe('Loyalty Tier');
391+
expect(base.label).toBe(PACKAGED_LABEL);
392+
});
393+
394+
it('carries nothing from a stored (tenant-provenance) extension, a `.custom` pair\'s row included', () => {
395+
const s = makeSession();
396+
registerPackaged(s.registry);
397+
s.registry.registerObject(
398+
{
399+
name: OBJ,
400+
fields: { region__c: { name: 'region__c', type: 'text', label: 'Region' } },
401+
_packageId: 'app.showcase.custom', _provenance: 'org',
402+
} as any,
403+
'app.showcase.custom',
404+
undefined,
405+
'extend',
406+
200,
407+
);
408+
expect((s.registry.getObject(OBJ) as any).fields.region__c).toBeDefined();
409+
const base = baseOf(s.protocol);
410+
expect(base.fields.region__c).toBeUndefined();
411+
expect(base).toBe(s.registry.getPackagedObjectOwner(OBJ)?.definition);
412+
});
413+
414+
it('does not fold a code extender\'s fieldPatches into the base: the owner\'s field text stays the packaged one', () => {
415+
const s = makeSession();
416+
registerPackaged(s.registry);
417+
s.registry.installPackage({ id: DEP_PKG, name: DEP_PKG, version: '1.0.0' } as any, 'code');
418+
s.registry.registerObject(
419+
{ name: OBJ, fields: { cb_market: MARKET }, fieldPatches: { name: { label: 'Company Name', description: 'Patched.' } } } as any,
420+
DEP_PKG,
421+
undefined,
422+
'extend',
423+
200,
424+
);
425+
expect((s.registry.getObject(OBJ) as any).fields.name.label).toBe('Company Name');
426+
const base = baseOf(s.protocol);
427+
expect(base.fields.name.label).toBe('Name');
428+
expect(base.fields.name.description).toBeUndefined();
429+
expect(base.fields.cb_market.label).toBe('Market');
430+
});
431+
432+
it('lets a later code extender\'s declaration of an added field replace an earlier one, as the fold does', () => {
433+
const s = makeSession();
434+
registerPackaged(s.registry);
435+
registerDependentExtension(s.registry, { cb_market: MARKET });
436+
s.registry.installPackage({ id: 'com.example.later', name: 'later', version: '1.0.0' } as any, 'code');
437+
s.registry.registerObject(
438+
{ name: OBJ, fields: { cb_market: { ...MARKET, label: 'Sales Market' } } } as any,
439+
'com.example.later',
440+
undefined,
441+
'extend',
442+
300,
443+
);
444+
445+
expect(baseOf(s.protocol).fields.cb_market.label).toBe('Sales Market');
446+
expect((s.registry.getObject(OBJ) as any).fields.cb_market.label).toBe('Sales Market');
447+
});
448+
});

0 commit comments

Comments
 (0)