@ankhorage/zora 25.6.2 → 25.7.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.
@@ -1,11 +1,83 @@
1
- import type { Capability } from '@ankhorage/contracts/capability';
2
1
  import { create } from './commands/create';
3
2
  import { sync } from './commands/sync';
4
3
  declare const provider: {
5
4
  id: string;
6
5
  category: string;
7
6
  version: string;
8
- capabilities: Capability[];
7
+ capabilities: readonly [{
8
+ readonly id: "zora.create";
9
+ readonly owner: "@ankhorage/zora";
10
+ readonly access: readonly ["invoke"];
11
+ readonly binding: {
12
+ readonly kind: "action";
13
+ readonly bindableAs: readonly ["target"];
14
+ };
15
+ readonly label: "Materialize ZORA web component";
16
+ readonly description: "Materialize a declared ZORA component and reconcile its web runtime.";
17
+ readonly input: {
18
+ readonly schema: {
19
+ readonly type: "object";
20
+ readonly required: readonly ["component", "platform"];
21
+ readonly properties: {
22
+ readonly component: {
23
+ readonly type: "string";
24
+ };
25
+ readonly platform: {
26
+ readonly type: "string";
27
+ readonly const: "web";
28
+ };
29
+ };
30
+ readonly additionalProperties: false;
31
+ };
32
+ };
33
+ readonly output: {
34
+ readonly schema: {
35
+ readonly type: "object";
36
+ readonly required: readonly ["exitCode"];
37
+ readonly properties: {
38
+ readonly exitCode: {
39
+ readonly type: "integer";
40
+ };
41
+ };
42
+ readonly additionalProperties: false;
43
+ };
44
+ };
45
+ }, {
46
+ readonly id: "zora.sync";
47
+ readonly owner: "@ankhorage/zora";
48
+ readonly access: readonly ["invoke"];
49
+ readonly binding: {
50
+ readonly kind: "action";
51
+ readonly bindableAs: readonly ["target"];
52
+ };
53
+ readonly label: "Synchronize ZORA web components";
54
+ readonly description: "Reconcile the web runtime from the declared ZORA component set.";
55
+ readonly input: {
56
+ readonly schema: {
57
+ readonly type: "object";
58
+ readonly required: readonly ["platform"];
59
+ readonly properties: {
60
+ readonly platform: {
61
+ readonly type: "string";
62
+ readonly const: "web";
63
+ };
64
+ };
65
+ readonly additionalProperties: false;
66
+ };
67
+ };
68
+ readonly output: {
69
+ readonly schema: {
70
+ readonly type: "object";
71
+ readonly required: readonly ["exitCode"];
72
+ readonly properties: {
73
+ readonly exitCode: {
74
+ readonly type: "integer";
75
+ };
76
+ };
77
+ readonly additionalProperties: false;
78
+ };
79
+ };
80
+ }];
9
81
  commands: ({
10
82
  readonly path: readonly ["create"];
11
83
  readonly capability: "zora.create";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAGlE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAgBvC,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;CAgBwB,CAAC;AAEvC,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAavC,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBwB,CAAC;AAEvC,eAAe,QAAQ,CAAC"}
package/dist/cli/index.js CHANGED
@@ -14,12 +14,11 @@ const SYNC_COMMAND = {
14
14
  capability: 'zora.sync',
15
15
  summary: 'Regenerate the declared ZORA web materialization.',
16
16
  };
17
- const COMMAND_CAPABILITIES = CAPABILITIES.filter((capability) => capability.access.includes('invoke'));
18
17
  const provider = {
19
18
  id: '@ankhorage/zora',
20
19
  category: 'zora',
21
20
  version: readPackageVersion(),
22
- capabilities: COMMAND_CAPABILITIES,
21
+ capabilities: CAPABILITIES,
23
22
  commands: [CREATE_COMMAND, SYNC_COMMAND],
24
23
  handlers: [
25
24
  {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAKzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,MAAM,cAAc,GAAG;IACrB,IAAI,EAAE,CAAC,QAAQ,CAAC;IAChB,UAAU,EAAE,aAAwC;IACpD,OAAO,EAAE,+DAA+D;CAChE,CAAC;AACX,MAAM,YAAY,GAAG;IACnB,IAAI,EAAE,CAAC,MAAM,CAAC;IACd,UAAU,EAAE,WAAsC;IAClD,OAAO,EAAE,mDAAmD;CACpD,CAAC;AACX,MAAM,oBAAoB,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAC9D,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CACrC,CAAC;AAEF,MAAM,QAAQ,GAAG;IACf,EAAE,EAAE,iBAAiB;IACrB,QAAQ,EAAE,MAAM;IAChB,OAAO,EAAE,kBAAkB,EAAE;IAC7B,YAAY,EAAE,oBAAoB;IAClC,QAAQ,EAAE,CAAC,cAAc,EAAE,YAAY,CAAC;IACxC,QAAQ,EAAE;QACR;YACE,IAAI,EAAE,cAAc,CAAC,IAAI;YACzB,OAAO,EAAE,MAAM;SAChB;QACD;YACE,IAAI,EAAE,YAAY,CAAC,IAAI;YACvB,OAAO,EAAE,IAAI;SACd;KACF;CACmC,CAAC;AAEvC,eAAe,QAAQ,CAAC;AAExB,uEAAuE;AACvE,SAAS,kBAAkB;IACzB,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAC5B,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,oBAAoB,CAAC,EAAE,MAAM,CAAC,CAC3D,CAAC;IAEpC,IAAI,OAAO,WAAW,CAAC,OAAO,KAAK,QAAQ,IAAI,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACjF,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,CAAC;IAED,OAAO,WAAW,CAAC,OAAO,CAAC;AAC7B,CAAC","sourcesContent":["import { readFileSync } from 'node:fs';\nimport { dirname, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport type { AnkhRuntimeCommandProvider } from '@ankhorage/ankh';\nimport type { Capability } from '@ankhorage/contracts/capability';\n\nimport { CAPABILITIES } from '../capabilities';\nimport { create } from './commands/create';\nimport { sync } from './commands/sync';\n\nconst CREATE_COMMAND = {\n path: ['create'],\n capability: 'zora.create' satisfies Capability['id'],\n summary: 'Materialize a canonical ZORA component for a target platform.',\n} as const;\nconst SYNC_COMMAND = {\n path: ['sync'],\n capability: 'zora.sync' satisfies Capability['id'],\n summary: 'Regenerate the declared ZORA web materialization.',\n} as const;\nconst COMMAND_CAPABILITIES = CAPABILITIES.filter((capability) =>\n capability.access.includes('invoke'),\n);\n\nconst provider = {\n id: '@ankhorage/zora',\n category: 'zora',\n version: readPackageVersion(),\n capabilities: COMMAND_CAPABILITIES,\n commands: [CREATE_COMMAND, SYNC_COMMAND],\n handlers: [\n {\n path: CREATE_COMMAND.path,\n handler: create,\n },\n {\n path: SYNC_COMMAND.path,\n handler: sync,\n },\n ],\n} satisfies AnkhRuntimeCommandProvider;\n\nexport default provider;\n\n/*** Read the installed ZORA version for the Ankh provider manifest. */\nfunction readPackageVersion(): string {\n const packageJson = JSON.parse(\n readFileSync(resolve(dirname(fileURLToPath(import.meta.url)), '../../package.json'), 'utf8'),\n ) as { readonly version?: unknown };\n\n if (typeof packageJson.version !== 'string' || packageJson.version.trim() === '') {\n throw new Error('ZORA package.json must define a non-empty version.');\n }\n\n return packageJson.version;\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAKzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,MAAM,cAAc,GAAG;IACrB,IAAI,EAAE,CAAC,QAAQ,CAAC;IAChB,UAAU,EAAE,aAAwC;IACpD,OAAO,EAAE,+DAA+D;CAChE,CAAC;AACX,MAAM,YAAY,GAAG;IACnB,IAAI,EAAE,CAAC,MAAM,CAAC;IACd,UAAU,EAAE,WAAsC;IAClD,OAAO,EAAE,mDAAmD;CACpD,CAAC;AAEX,MAAM,QAAQ,GAAG;IACf,EAAE,EAAE,iBAAiB;IACrB,QAAQ,EAAE,MAAM;IAChB,OAAO,EAAE,kBAAkB,EAAE;IAC7B,YAAY,EAAE,YAAY;IAC1B,QAAQ,EAAE,CAAC,cAAc,EAAE,YAAY,CAAC;IACxC,QAAQ,EAAE;QACR;YACE,IAAI,EAAE,cAAc,CAAC,IAAI;YACzB,OAAO,EAAE,MAAM;SAChB;QACD;YACE,IAAI,EAAE,YAAY,CAAC,IAAI;YACvB,OAAO,EAAE,IAAI;SACd;KACF;CACmC,CAAC;AAEvC,eAAe,QAAQ,CAAC;AAExB,uEAAuE;AACvE,SAAS,kBAAkB;IACzB,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAC5B,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,oBAAoB,CAAC,EAAE,MAAM,CAAC,CAC3D,CAAC;IAEpC,IAAI,OAAO,WAAW,CAAC,OAAO,KAAK,QAAQ,IAAI,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACjF,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,CAAC;IAED,OAAO,WAAW,CAAC,OAAO,CAAC;AAC7B,CAAC","sourcesContent":["import { readFileSync } from 'node:fs';\nimport { dirname, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport type { AnkhRuntimeCommandProvider } from '@ankhorage/ankh';\nimport type { Capability } from '@ankhorage/contracts/capabilities';\n\nimport { CAPABILITIES } from '../capabilities';\nimport { create } from './commands/create';\nimport { sync } from './commands/sync';\n\nconst CREATE_COMMAND = {\n path: ['create'],\n capability: 'zora.create' satisfies Capability['id'],\n summary: 'Materialize a canonical ZORA component for a target platform.',\n} as const;\nconst SYNC_COMMAND = {\n path: ['sync'],\n capability: 'zora.sync' satisfies Capability['id'],\n summary: 'Regenerate the declared ZORA web materialization.',\n} as const;\n\nconst provider = {\n id: '@ankhorage/zora',\n category: 'zora',\n version: readPackageVersion(),\n capabilities: CAPABILITIES,\n commands: [CREATE_COMMAND, SYNC_COMMAND],\n handlers: [\n {\n path: CREATE_COMMAND.path,\n handler: create,\n },\n {\n path: SYNC_COMMAND.path,\n handler: sync,\n },\n ],\n} satisfies AnkhRuntimeCommandProvider;\n\nexport default provider;\n\n/*** Read the installed ZORA version for the Ankh provider manifest. */\nfunction readPackageVersion(): string {\n const packageJson = JSON.parse(\n readFileSync(resolve(dirname(fileURLToPath(import.meta.url)), '../../package.json'), 'utf8'),\n ) as { readonly version?: unknown };\n\n if (typeof packageJson.version !== 'string' || packageJson.version.trim() === '') {\n throw new Error('ZORA package.json must define a non-empty version.');\n }\n\n return packageJson.version;\n}\n"]}