@flighthq/entity 0.5.1-next.1350.8ce488b → 0.5.1-next.1404.457d1da

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/entity`. The `@fligh
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/entity@0.5.1-next.1350.8ce488b](https://github.com/flighthq/flight/tree/8ce488bfe444eded2fb281e7b9696e5ce7fabdc0/packages/entity)
17
- - [License](https://github.com/flighthq/flight/blob/8ce488bfe444eded2fb281e7b9696e5ce7fabdc0/LICENSE.md)
16
+ - [Source for @flighthq/entity@0.5.1-next.1404.457d1da](https://github.com/flighthq/flight/tree/457d1da918a60be5853b84eb6c25530a66662cef/packages/entity)
17
+ - [License](https://github.com/flighthq/flight/blob/457d1da918a60be5853b84eb6c25530a66662cef/LICENSE.md)
@@ -5,6 +5,5 @@ export * from './enableEntityRuntimeGuards';
5
5
  export * from './entityUid';
6
6
  export * from './explainEntityRuntimeWrite';
7
7
  export * from './guards';
8
- export * from './host';
9
8
  export * from './runtime';
10
9
  //# sourceMappingURL=contract.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,6BAA6B,CAAC;AAC5C,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,6BAA6B,CAAC;AAC5C,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
package/dist/contract.js CHANGED
@@ -5,6 +5,5 @@ export * from './enableEntityRuntimeGuards';
5
5
  export * from './entityUid';
6
6
  export * from './explainEntityRuntimeWrite';
7
7
  export * from './guards';
8
- export * from './host';
9
8
  export * from './runtime';
10
9
  //# sourceMappingURL=contract.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,6BAA6B,CAAC;AAC5C,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,6BAA6B,CAAC;AAC5C,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flighthq/entity",
3
- "version": "0.5.1-next.1350.8ce488b",
3
+ "version": "0.5.1-next.1404.457d1da",
4
4
  "author": "Joshua Granick and other contributors",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -38,7 +38,7 @@
38
38
  "clean:dist": "tsx ../../scripts/clean-package-dist.ts"
39
39
  },
40
40
  "dependencies": {
41
- "@flighthq/types": "0.5.1-next.1350.8ce488b"
41
+ "@flighthq/types": "0.5.1-next.1404.457d1da"
42
42
  },
43
43
  "devDependencies": {
44
44
  "typescript": "^5.3.0"
package/dist/host.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import type { EntityConstruction, EntityWithoutRuntime, Host } from '@flighthq/types/contract';
2
- export declare function createHost<Capabilities extends Partial<EntityWithoutRuntime<Host>>>(capabilities?: Readonly<Capabilities>): Host & Capabilities;
3
- export declare function initializeHost<Capabilities extends Partial<EntityWithoutRuntime<Host>>>(out: EntityConstruction<Host & Capabilities>, capabilities: Readonly<Capabilities>): void;
4
- //# sourceMappingURL=host.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAI/F,wBAAgB,UAAU,CAAC,YAAY,SAAS,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,EACjF,YAAY,GAAE,QAAQ,CAAC,YAAY,CAAsB,GACxD,IAAI,GAAG,YAAY,CAIrB;AAED,wBAAgB,cAAc,CAAC,YAAY,SAAS,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,EACrF,GAAG,EAAE,kBAAkB,CAAC,IAAI,GAAG,YAAY,CAAC,EAC5C,YAAY,EAAE,QAAQ,CAAC,YAAY,CAAC,GACnC,IAAI,CA2BN"}
package/dist/host.js DELETED
@@ -1,35 +0,0 @@
1
- import { allocateEntity, finishEntity } from './entity';
2
- export function createHost(capabilities = {}) {
3
- const out = allocateEntity();
4
- initializeHost(out, capabilities);
5
- return finishEntity(out);
6
- }
7
- export function initializeHost(out, capabilities) {
8
- out.accessibility = (capabilities.accessibility ?? {});
9
- out.app = (capabilities.app ?? {});
10
- out.clipboard = (capabilities.clipboard ?? {});
11
- out.connectivity = (capabilities.connectivity ?? {});
12
- out.dialog = (capabilities.dialog ?? {});
13
- out.graphics = (capabilities.graphics ?? {});
14
- out.input = (capabilities.input ?? {});
15
- out.ipc = (capabilities.ipc ?? {});
16
- out.media = (capabilities.media ?? {});
17
- out.menu = (capabilities.menu ?? {});
18
- out.midi = (capabilities.midi ?? {});
19
- out.net = (capabilities.net ?? {});
20
- out.notification = (capabilities.notification ?? {});
21
- out.power = (capabilities.power ?? {});
22
- out.protocol = (capabilities.protocol ?? {});
23
- out.screen = (capabilities.screen ?? {});
24
- out.share = (capabilities.share ?? {});
25
- out.shell = (capabilities.shell ?? {});
26
- out.shortcut = (capabilities.shortcut ?? {});
27
- out.storage = (capabilities.storage ?? {});
28
- out.system = (capabilities.system ?? {});
29
- out.text = (capabilities.text ?? {});
30
- out.tray = (capabilities.tray ?? {});
31
- out.ui = (capabilities.ui ?? {});
32
- out.updater = (capabilities.updater ?? {});
33
- out.window = (capabilities.window ?? {});
34
- }
35
- //# sourceMappingURL=host.js.map
package/dist/host.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"host.js","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,UAAU,UAAU,CACxB,eAAuC,EAAkB;IAEzD,MAAM,GAAG,GAAG,cAAc,EAAuB,CAAC;IAClD,cAAc,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAClC,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,GAA4C,EAC5C,YAAoC;IAEpC,GAAG,CAAC,aAAa,GAAG,CAAC,YAAY,CAAC,aAAa,IAAI,EAAE,CAA0B,CAAC;IAChF,GAAG,CAAC,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,IAAI,EAAE,CAAgB,CAAC;IAClD,GAAG,CAAC,SAAS,GAAG,CAAC,YAAY,CAAC,SAAS,IAAI,EAAE,CAAsB,CAAC;IACpE,GAA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Y,CAAC,QAAQ,IAAI,EAAE,CAAqB,CAAC;IACjE,GAAG,CAAC,OAAO,GAAG,CAAC,YAAY,CAAC,OAAO,IAAI,EAAE,CAAoB,CAAC;IAC9D,GAAG,CAAC,MAAM,GAAG,CAAC,YAAY,CAAC,MAAM,IAAI,EAAE,CAAmB,CAAC;IAC3D,GAAG,CAAC,IAAI,GAAG,CAAC,YAAY,CAAC,IAAI,IAAI,EAAE,CAAiB,CAAC;IACrD,GAAG,CAAC,IAAI,GAAG,CAAC,YAAY,CAAC,IAAI,IAAI,EAAE,CAAiB,CAAC;IACrD,GAAG,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAe,CAAC;IAC/C,GAAG,CAAC,OAAO,GAAG,CAAC,YAAY,CAAC,OAAO,IAAI,EAAE,CAAoB,CAAC;IAC9D,GAAG,CAAC,MAAM,GAAG,CAAC,YAAY,CAAC,MAAM,IAAI,EAAE,CAAmB,CAAC;AAC7D,CAAC"}
package/src/host.test.ts DELETED
@@ -1,77 +0,0 @@
1
- import { EntityRuntimeKey } from '@flighthq/types/contract';
2
-
3
- import * as entity from './contract';
4
- import { initializeHost } from './host';
5
-
6
- const HOST_GROUPS = [
7
- 'accessibility',
8
- 'app',
9
- 'clipboard',
10
- 'connectivity',
11
- 'dialog',
12
- 'graphics',
13
- 'input',
14
- 'ipc',
15
- 'media',
16
- 'menu',
17
- 'midi',
18
- 'net',
19
- 'notification',
20
- 'power',
21
- 'protocol',
22
- 'screen',
23
- 'share',
24
- 'shell',
25
- 'shortcut',
26
- 'storage',
27
- 'system',
28
- 'text',
29
- 'tray',
30
- 'ui',
31
- 'updater',
32
- 'window',
33
- ] as const;
34
-
35
- describe('createHost', () => {
36
- it('creates an Entity immediately while leaving its runtime allocation lazy', () => {
37
- const host = requiredFunction(entity, 'createHost')();
38
-
39
- expect(EntityRuntimeKey in host).toBe(true);
40
- expect(host[EntityRuntimeKey]).toBeUndefined();
41
- });
42
-
43
- it('materializes the complete stable Host shape with truthful empty groups', () => {
44
- const host = requiredFunction(entity, 'createHost')();
45
-
46
- expect(
47
- Object.keys(host)
48
- .filter((key) => key !== String(EntityRuntimeKey))
49
- .sort(),
50
- ).toEqual(HOST_GROUPS);
51
- for (const group of HOST_GROUPS) expect(host[group]).toEqual({});
52
- });
53
-
54
- it('preserves supplied capability-group and provider identities without populating another group', () => {
55
- const provider = {};
56
- const accessibility = { provider };
57
- const host = requiredFunction(entity, 'createHost')({ accessibility });
58
-
59
- expect(host.accessibility).toBe(accessibility);
60
- expect(host.accessibility.provider).toBe(provider);
61
- for (const group of HOST_GROUPS) {
62
- if (group !== 'accessibility') expect(host[group]).toEqual({});
63
- }
64
- });
65
- });
66
-
67
- function requiredFunction(module: object, name: string): (...args: any[]) => any {
68
- const value = Reflect.get(module, name);
69
- expect(value, `${name} export`).toBeTypeOf('function');
70
- if (typeof value !== 'function') throw new TypeError(`${name} is not exported`);
71
- return value as (...args: any[]) => any;
72
- }
73
- describe('initializeHost', () => {
74
- it('is the construction initializer of createHost', () => {
75
- expect(typeof initializeHost).toBe('function');
76
- });
77
- });