@flighthq/registry-codegen 0.5.1-next.743.8d09db1 → 0.5.1-next.799.62ef0c7

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/README.md CHANGED
@@ -13,5 +13,5 @@ Import the supported application-facing API from `@flighthq/registry-codegen`. T
13
13
  This package is part of the locked-version Flight SDK graph. Applications may instead install and import `@flighthq/sdk` when package-level tree shaking is sufficient.
14
14
 
15
15
  - [Flight project](https://github.com/flighthq/flight)
16
- - [Source for @flighthq/registry-codegen@0.5.1-next.743.8d09db1](https://github.com/flighthq/flight/tree/8d09db125a0afd3b73ca6e039a7dd25bcb9737d0/packages/registry-codegen)
17
- - [License](https://github.com/flighthq/flight/blob/8d09db125a0afd3b73ca6e039a7dd25bcb9737d0/LICENSE.md)
16
+ - [Source for @flighthq/registry-codegen@0.5.1-next.799.62ef0c7](https://github.com/flighthq/flight/tree/62ef0c74f09f24177aac3695b2487b2d743d4fe6/packages/registry-codegen)
17
+ - [License](https://github.com/flighthq/flight/blob/62ef0c74f09f24177aac3695b2487b2d743d4fe6/LICENSE.md)
@@ -1,3 +1,3 @@
1
- import type { RegistryCatalog, RegistryCodegenPlan, RequirementSet } from '@flighthq/types/contract';
2
- export declare function createRegistryCodegenPlan(catalog: Readonly<RegistryCatalog>, requirements: Readonly<RequirementSet>, backend: string): RegistryCodegenPlan;
1
+ import type { Entity, RegistryCatalog, RegistryCodegenPlan, RequirementSet } from '@flighthq/types/contract';
2
+ export declare function createRegistryCodegenPlan(catalog: Readonly<RegistryCatalog>, requirements: Readonly<RequirementSet>, backend: string): RegistryCodegenPlan & Entity;
3
3
  //# sourceMappingURL=registryCodegen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registryCodegen.d.ts","sourceRoot":"","sources":["../src/registryCodegen.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,eAAe,EAEf,mBAAmB,EAEnB,cAAc,EACf,MAAM,0BAA0B,CAAC;AAIlC,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,QAAQ,CAAC,eAAe,CAAC,EAClC,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,EACtC,OAAO,EAAE,MAAM,GACd,mBAAmB,CAmBrB"}
1
+ {"version":3,"file":"registryCodegen.d.ts","sourceRoot":"","sources":["../src/registryCodegen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,MAAM,EACN,eAAe,EAEf,mBAAmB,EAEnB,cAAc,EACf,MAAM,0BAA0B,CAAC;AAIlC,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,QAAQ,CAAC,eAAe,CAAC,EAClC,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,EACtC,OAAO,EAAE,MAAM,GACd,mBAAmB,GAAG,MAAM,CAmB9B"}
@@ -1,3 +1,4 @@
1
+ import { createEntity } from '@flighthq/entity/contract';
1
2
  import { findRegistryCatalogEntries } from '@flighthq/registry-catalog/contract';
2
3
  // Resolve only facts here. A later emitter may choose how a row becomes source after the ownership lane
3
4
  // is ruled; this kernel cannot encode that decision accidentally because it returns no source text.
@@ -18,7 +19,7 @@ export function createRegistryCodegenPlan(catalog, requirements, backend) {
18
19
  entries.push(...matches);
19
20
  }
20
21
  }
21
- return { backend, entries, unresolved };
22
+ return createEntity({ backend, entries, unresolved });
22
23
  }
23
24
  function requirementIdentity(requirement) {
24
25
  return `${requirement.facet}\0${requirement.key}`;
@@ -1 +1 @@
1
- {"version":3,"file":"registryCodegen.js","sourceRoot":"","sources":["../src/registryCodegen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AASjF,wGAAwG;AACxG,oGAAoG;AACpG,MAAM,UAAU,yBAAyB,CACvC,OAAkC,EAClC,YAAsC,EACtC,OAAe;IAEf,MAAM,OAAO,GAA2B,EAAE,CAAC;IAC3C,MAAM,UAAU,GAAkB,EAAE,CAAC;IACrC,MAAM,IAAI,GAAG,IAAI,GAAG,EA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K,MAAM,WAAW,IAAI,YAAY,CAAC,YAAY,EAAE,CAAC;QACpD,MAAM,QAAQ,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAC;QAClD,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC;YAAE,SAAS;QACjC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAEnB,MAAM,OAAO,GAAG,0BAA0B,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;QACjG,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzB,UAAU,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC;QACtE,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;AACxD,CAAC;AAED,SAAS,mBAAmB,CAAC,WAAkC;IAC7D,OAAO,GAAG,WAAW,CAAC,KAAK,KAAK,WAAW,CAAC,GAAG,EAAE,CAAC;AACpD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flighthq/registry-codegen",
3
- "version": "0.5.1-next.743.8d09db1",
3
+ "version": "0.5.1-next.799.62ef0c7",
4
4
  "author": "Joshua Granick and other contributors",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -38,8 +38,9 @@
38
38
  "clean:dist": "tsx ../../scripts/clean-package-dist.ts"
39
39
  },
40
40
  "dependencies": {
41
- "@flighthq/registry-catalog": "0.5.1-next.743.8d09db1",
42
- "@flighthq/types": "0.5.1-next.743.8d09db1"
41
+ "@flighthq/entity": "0.5.1-next.799.62ef0c7",
42
+ "@flighthq/registry-catalog": "0.5.1-next.799.62ef0c7",
43
+ "@flighthq/types": "0.5.1-next.799.62ef0c7"
43
44
  },
44
45
  "devDependencies": {
45
46
  "typescript": "^5.3.0"
@@ -1,6 +1,7 @@
1
+ import { createEntity } from '@flighthq/entity/contract';
1
2
  import { createRegistryCatalog } from '@flighthq/registry-catalog/contract';
2
3
  import type { RegistryCatalogEntry, RequirementSet } from '@flighthq/types/contract';
3
- import { RequirementFacet } from '@flighthq/types/contract';
4
+ import { EntityRuntimeKey, RequirementFacet } from '@flighthq/types/contract';
4
5
 
5
6
  import { createRegistryCodegenPlan } from './registryCodegen';
6
7
 
@@ -23,15 +24,17 @@ const shapeCommands: RegistryCatalogEntry = {
23
24
  describe('createRegistryCodegenPlan', () => {
24
25
  it('selects the matching backend rows in requirement and catalog order', () => {
25
26
  const catalog = createRegistryCatalog([shapeRenderer, shapeCommands, { ...shapeRenderer, backend: 'webgpu' }]);
26
- const requirements: RequirementSet = {
27
+ const requirements: RequirementSet = createEntity({
27
28
  covers: [RequirementFacet.SceneNodeKind],
28
29
  requirements: [
29
30
  { facet: RequirementFacet.SceneNodeKind, key: 'Shape' },
30
31
  { facet: RequirementFacet.SceneNodeKind, key: 'Sprite' },
31
32
  ],
32
- };
33
+ });
33
34
 
34
- expect(createRegistryCodegenPlan(catalog, requirements, 'webgl')).toEqual({
35
+ const plan = createRegistryCodegenPlan(catalog, requirements, 'webgl');
36
+ expect(EntityRuntimeKey in plan).toBe(true);
37
+ expect(plan).toMatchObject({
35
38
  backend: 'webgl',
36
39
  entries: [shapeRenderer, shapeCommands],
37
40
  unresolved: [{ facet: RequirementFacet.SceneNodeKind, key: 'Sprite' }],
@@ -41,12 +44,12 @@ describe('createRegistryCodegenPlan', () => {
41
44
  it('deduplicates repeated positive requirements without treating covers as requests', () => {
42
45
  const catalog = createRegistryCatalog([shapeRenderer]);
43
46
  const requirement = { facet: RequirementFacet.SceneNodeKind, key: 'Shape' } as const;
44
- const requirements: RequirementSet = {
47
+ const requirements: RequirementSet = createEntity({
45
48
  covers: [RequirementFacet.SceneNodeKind, RequirementFacet.SceneShapeCommand],
46
49
  requirements: [requirement, requirement],
47
- };
50
+ });
48
51
 
49
- expect(createRegistryCodegenPlan(catalog, requirements, 'webgl')).toEqual({
52
+ expect(createRegistryCodegenPlan(catalog, requirements, 'webgl')).toMatchObject({
50
53
  backend: 'webgl',
51
54
  entries: [shapeRenderer],
52
55
  unresolved: [],
@@ -54,7 +57,9 @@ describe('createRegistryCodegenPlan', () => {
54
57
  });
55
58
 
56
59
  it('returns an empty plan for empty catalog contents and requirements', () => {
57
- expect(createRegistryCodegenPlan(createRegistryCatalog(), { covers: [], requirements: [] }, 'webgl')).toEqual({
60
+ expect(
61
+ createRegistryCodegenPlan(createRegistryCatalog(), createEntity({ covers: [], requirements: [] }), 'webgl'),
62
+ ).toMatchObject({
58
63
  backend: 'webgl',
59
64
  entries: [],
60
65
  unresolved: [],