apexrest 1.2.0 → 1.3.0-beta.1
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 +9 -3
- package/README.uk.md +9 -3
- package/dist/codex-compat/plugins/apexrest-apex/.codex-plugin/plugin.json +1 -1
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/evidence/block%3Aanalytics%2Fstatus-summary%401.0.0.json +19 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/evidence/block%3Acrud%2Freport-dialog%401.0.0.json +19 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/evidence/block%3Aread%2Fdetail%401.0.0.json +19 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/evidence/block%3Aread%2Ffiltered-list%401.0.0.json +19 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/evidence/block%3Aread%2Fhistory%401.0.0.json +19 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/evidence/block%3Aread%2Fmaster-detail%401.0.0.json +19 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/generator.json +5 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/manifest.json +29 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/packages/analytics/status-summary/1.0.0/block.yaml +59 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/packages/analytics/status-summary/1.0.0/renderer.json +14 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/packages/crud/report-dialog/1.0.0/block.yaml +66 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/packages/crud/report-dialog/1.0.0/renderer.json +14 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/packages/read/detail/1.0.0/block.yaml +59 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/packages/read/detail/1.0.0/renderer.json +14 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/packages/read/filtered-list/1.0.0/block.yaml +59 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/packages/read/filtered-list/1.0.0/renderer.json +14 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/packages/read/history/1.0.0/block.yaml +59 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/packages/read/history/1.0.0/renderer.json +14 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/packages/read/master-detail/1.0.0/block.yaml +59 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/packages/read/master-detail/1.0.0/renderer.json +14 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/profiles.json +10 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blocks/revocations.json +1 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blueprints/crm.yaml +172 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blueprints/index.json +12 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/blueprints/service-desk.yaml +120 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/panel/index.html +7 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/panel/panel.js +234 -2
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/composer-allocation.schema.json +33 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/composer-block.schema.json +208 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/composer-blueprint.schema.json +664 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/composer-command.schema.json +106 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/composer-contract.schema.json +174 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/composer-diagnostic.schema.json +26 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/composer-entity.schema.json +141 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/composer-evidence.schema.json +95 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/composer-field.schema.json +53 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/composer-instance.schema.json +117 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/composer-lock.schema.json +54 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/composer-operation.schema.json +55 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/composer-owner.schema.json +105 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/composer-parameters.schema.json +61 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/composer-plan.schema.json +1010 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/composer-renderer.schema.json +69 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/composer-state.schema.json +146 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/deploy-plan.schema.json +760 -169
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/operations.schema.json +486 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/project.schema.json +13 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/sync-state.schema.json +238 -0
- package/dist/codex-compat/plugins/apexrest-apex/resources/third-party/node_modules__yaml__LICENSE +13 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/apexrest.mjs +21 -11
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-2BBNJVKW.mjs +1996 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/{chunk-HOKFFGSZ.mjs → chunk-33GE2NWZ.mjs} +1 -1
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-5JI3XEAK.mjs +14 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/{chunk-2ZUNLCLK.mjs → chunk-BAHECVGO.mjs} +30 -10
- package/dist/{runtime/chunk-SPZVXAM5.mjs → codex-compat/plugins/apexrest-apex/runtime/chunk-CYPFCUNE.mjs} +7 -4
- package/dist/{runtime/chunk-3MDDJFXN.mjs → codex-compat/plugins/apexrest-apex/runtime/chunk-EBBEN4AV.mjs} +29 -6
- package/dist/{runtime/chunk-NDZ2RWQU.mjs → codex-compat/plugins/apexrest-apex/runtime/chunk-ESDVN7DS.mjs} +3 -2
- package/dist/codex-compat/plugins/apexrest-apex/runtime/{chunk-AQZLLQ3D.mjs → chunk-FTTPESNK.mjs} +2 -2
- package/dist/codex-compat/plugins/apexrest-apex/runtime/{chunk-S24BD6PY.mjs → chunk-G3KR57BY.mjs} +1 -1
- package/dist/codex-compat/plugins/apexrest-apex/runtime/{chunk-TXVQLYTH.mjs → chunk-HKJVCGQQ.mjs} +118 -87
- package/dist/codex-compat/plugins/apexrest-apex/runtime/{chunk-WK5GP4ES.mjs → chunk-KQ5IDT7Z.mjs} +2 -2
- package/dist/{runtime/chunk-7RZW5QV2.mjs → codex-compat/plugins/apexrest-apex/runtime/chunk-RWGJITHZ.mjs} +5 -5
- package/dist/codex-compat/plugins/apexrest-apex/runtime/{chunk-IX6V6ZGW.mjs → chunk-WXP75UUP.mjs} +5 -5
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-YPLIIQ4Y.mjs +10233 -0
- package/dist/codex-compat/plugins/apexrest-apex/runtime/{chunk-QIVPMPU3.mjs → chunk-YQHHPRJH.mjs} +1 -1
- package/dist/codex-compat/plugins/apexrest-apex/runtime/mcp.mjs +7 -7
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-apexlang/SKILL.md +1 -1
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-compose/SKILL.md +18 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-compose/agents/openai.yaml +4 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-compose/references/workflow.md +15 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-deploy/SKILL.md +3 -1
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-menu/SKILL.md +3 -1
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-menu/references/cli-catalog.md +8 -1
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-project/SKILL.md +2 -0
- package/dist/codex-compat/plugins/apexrest-apex/skills/apexrest-work/SKILL.md +3 -1
- package/dist/resources/blocks/evidence/block%3Aanalytics%2Fstatus-summary%401.0.0.json +19 -0
- package/dist/resources/blocks/evidence/block%3Acrud%2Freport-dialog%401.0.0.json +19 -0
- package/dist/resources/blocks/evidence/block%3Aread%2Fdetail%401.0.0.json +19 -0
- package/dist/resources/blocks/evidence/block%3Aread%2Ffiltered-list%401.0.0.json +19 -0
- package/dist/resources/blocks/evidence/block%3Aread%2Fhistory%401.0.0.json +19 -0
- package/dist/resources/blocks/evidence/block%3Aread%2Fmaster-detail%401.0.0.json +19 -0
- package/dist/resources/blocks/generator.json +5 -0
- package/dist/resources/blocks/manifest.json +29 -0
- package/dist/resources/blocks/packages/analytics/status-summary/1.0.0/block.yaml +59 -0
- package/dist/resources/blocks/packages/analytics/status-summary/1.0.0/renderer.json +14 -0
- package/dist/resources/blocks/packages/crud/report-dialog/1.0.0/block.yaml +66 -0
- package/dist/resources/blocks/packages/crud/report-dialog/1.0.0/renderer.json +14 -0
- package/dist/resources/blocks/packages/read/detail/1.0.0/block.yaml +59 -0
- package/dist/resources/blocks/packages/read/detail/1.0.0/renderer.json +14 -0
- package/dist/resources/blocks/packages/read/filtered-list/1.0.0/block.yaml +59 -0
- package/dist/resources/blocks/packages/read/filtered-list/1.0.0/renderer.json +14 -0
- package/dist/resources/blocks/packages/read/history/1.0.0/block.yaml +59 -0
- package/dist/resources/blocks/packages/read/history/1.0.0/renderer.json +14 -0
- package/dist/resources/blocks/packages/read/master-detail/1.0.0/block.yaml +59 -0
- package/dist/resources/blocks/packages/read/master-detail/1.0.0/renderer.json +14 -0
- package/dist/resources/blocks/profiles.json +10 -0
- package/dist/resources/blocks/revocations.json +1 -0
- package/dist/resources/blueprints/crm.yaml +172 -0
- package/dist/resources/blueprints/index.json +12 -0
- package/dist/resources/blueprints/service-desk.yaml +120 -0
- package/dist/resources/panel/index.html +7 -0
- package/dist/resources/panel/panel.js +234 -2
- package/dist/resources/schemas/composer-allocation.schema.json +33 -0
- package/dist/resources/schemas/composer-block.schema.json +208 -0
- package/dist/resources/schemas/composer-blueprint.schema.json +664 -0
- package/dist/resources/schemas/composer-command.schema.json +106 -0
- package/dist/resources/schemas/composer-contract.schema.json +174 -0
- package/dist/resources/schemas/composer-diagnostic.schema.json +26 -0
- package/dist/resources/schemas/composer-entity.schema.json +141 -0
- package/dist/resources/schemas/composer-evidence.schema.json +95 -0
- package/dist/resources/schemas/composer-field.schema.json +53 -0
- package/dist/resources/schemas/composer-instance.schema.json +117 -0
- package/dist/resources/schemas/composer-lock.schema.json +54 -0
- package/dist/resources/schemas/composer-operation.schema.json +55 -0
- package/dist/resources/schemas/composer-owner.schema.json +105 -0
- package/dist/resources/schemas/composer-parameters.schema.json +61 -0
- package/dist/resources/schemas/composer-plan.schema.json +1010 -0
- package/dist/resources/schemas/composer-renderer.schema.json +69 -0
- package/dist/resources/schemas/composer-state.schema.json +146 -0
- package/dist/resources/schemas/deploy-plan.schema.json +760 -169
- package/dist/resources/schemas/operations.schema.json +486 -0
- package/dist/resources/schemas/project.schema.json +13 -0
- package/dist/resources/schemas/sync-state.schema.json +238 -0
- package/dist/resources/third-party/node_modules__yaml__LICENSE +13 -0
- package/dist/runtime/apexrest.mjs +21 -11
- package/dist/runtime/chunk-2BBNJVKW.mjs +1996 -0
- package/dist/runtime/{chunk-HOKFFGSZ.mjs → chunk-33GE2NWZ.mjs} +1 -1
- package/dist/runtime/chunk-5JI3XEAK.mjs +14 -0
- package/dist/runtime/{chunk-2ZUNLCLK.mjs → chunk-BAHECVGO.mjs} +30 -10
- package/dist/{codex-compat/plugins/apexrest-apex/runtime/chunk-SPZVXAM5.mjs → runtime/chunk-CYPFCUNE.mjs} +7 -4
- package/dist/{codex-compat/plugins/apexrest-apex/runtime/chunk-3MDDJFXN.mjs → runtime/chunk-EBBEN4AV.mjs} +29 -6
- package/dist/{codex-compat/plugins/apexrest-apex/runtime/chunk-NDZ2RWQU.mjs → runtime/chunk-ESDVN7DS.mjs} +3 -2
- package/dist/runtime/{chunk-AQZLLQ3D.mjs → chunk-FTTPESNK.mjs} +2 -2
- package/dist/runtime/{chunk-S24BD6PY.mjs → chunk-G3KR57BY.mjs} +1 -1
- package/dist/runtime/{chunk-TXVQLYTH.mjs → chunk-HKJVCGQQ.mjs} +118 -87
- package/dist/runtime/{chunk-WK5GP4ES.mjs → chunk-KQ5IDT7Z.mjs} +2 -2
- package/dist/{codex-compat/plugins/apexrest-apex/runtime/chunk-7RZW5QV2.mjs → runtime/chunk-RWGJITHZ.mjs} +5 -5
- package/dist/runtime/{chunk-IX6V6ZGW.mjs → chunk-WXP75UUP.mjs} +5 -5
- package/dist/runtime/chunk-YPLIIQ4Y.mjs +10233 -0
- package/dist/runtime/{chunk-QIVPMPU3.mjs → chunk-YQHHPRJH.mjs} +1 -1
- package/dist/runtime/mcp.mjs +7 -7
- package/package.json +10 -3
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-4MYHJ2IU.mjs +0 -1208
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-BD2AVCFU.mjs +0 -367
- package/dist/codex-compat/plugins/apexrest-apex/runtime/chunk-YLXJ6H4J.mjs +0 -14
- package/dist/runtime/chunk-4MYHJ2IU.mjs +0 -1208
- package/dist/runtime/chunk-BD2AVCFU.mjs +0 -367
- package/dist/runtime/chunk-YLXJ6H4J.mjs +0 -14
|
@@ -2,6 +2,75 @@
|
|
|
2
2
|
// plugins/apexrest-apex/assets/apexrest-logo.svg
|
|
3
3
|
var apexrest_logo_default = `data:image/svg+xml,<?xml version='1.0' encoding='utf-8'?>%0A<svg xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="100 66 98 98" xml:space="preserve" width="98" height="98" role="img" aria-labelledby="logo-title">%0A <title id="logo-title">APEXREST pencil and ruler symbol</title>%0A <style type="text/css">%0A%09.st0{fill:%2331BEF9;}%0A%09.st1{fill:%23FFD541;}%0A%09.st2{fill:%23FF4141;}%0A%09.st3{fill:%231E1E1E;}%0A</style>%0A <g id="\u0421\u043B\u043E\u0439_2">%0A <polygon class="st0" points="133,149 177,106 160,89 116,132 " />%0A </g>%0A <g id="\u0421\u043B\u043E\u0439_3">%0A <polygon class="st1" points="128,114 147,95 128,76 126,75 123,76 108,91 107,93 110,97 127,114 " />%0A <polygon class="st1" points="151,137 170,118 189,137 190,140 189,142 186,146 173,157 170,157 " />%0A </g>%0A <g id="\u0421\u043B\u043E\u0439_4">%0A <path class="st2" d="M166,83l16,16l4-3l2-5v-4c0,0-1-2-1-3s-3-4-3-4l-5-3h-3h-3l-3,2l-2,2L166,83L166,83z" />%0A </g>%0A <g id="\u0421\u043B\u043E\u0439_1">%0A <g>%0A <path class="st3" d="M126.7,115.5l1.7-1.7l-2.2-2.2l4.3-4.3c0.5-0.5,0.4-1.3-0.1-1.7c-0.5-0.4-1.2-0.4-1.7,0l-4.3,4.3l-4.1-4.1 l4.3-4.3c0.5-0.5,0.4-1.3-0.1-1.7c-0.5-0.4-1.2-0.4-1.7,0l-4.3,4.3l-4.1-4.1l9.4-9.5c0.5-0.5,0.4-1.3-0.1-1.7 c-0.5-0.4-1.2-0.4-1.7,0l-9.5,9.5l-3.6-3.6c-0.8-0.8-0.8-2,0-2.8L123.9,77c0.8-0.8,2-0.8,2.8,0L146,96.2l1.7-1.7l-19.2-19.2 c-1.7-1.7-4.6-1.7-6.3,0L107.5,90c-1.7,1.7-1.7,4.6,0,6.3L126.7,115.5z" />%0A <path class="st3" d="M182.7,100.8l3-3c5-5.1,4.9-13.3-0.2-18.3c-5-5-13.1-5-18.2,0l-51.9,51.9c-0.1,0.1-0.2,0.2-0.2,0.4v0.1 l-7.2,23.8c-0.2,0.6,0.2,1.3,0.8,1.5c0.2,0.1,0.5,0.1,0.7,0l23.8-7.2h0.1c0.1-0.1,0.2-0.1,0.4-0.2L182.7,100.8L182.7,100.8z M159.3,91l6.6,6.6l-41.3,41.3l-6.6-6.6L159.3,91z M110.9,154.2l1-3.5c1.1,0.5,2,1.3,2.5,2.4L110.9,154.2z M116.9,152.4 c-0.8-1.8-2.4-3.2-4.2-4l4.2-13.9l13.7,13.7L116.9,152.4z M132.9,147.1l-6.6-6.6l41.3-41.3l6.6,6.6L132.9,147.1z M175.9,104.1 l-7.4-7.4l-7.4-7.4l4.2-4.2l14.9,14.9L175.9,104.1z M167,83.3l2.1-2.1c4.3-4,10.9-3.7,14.9,0.6c3.7,4,3.7,10.3,0,14.3l-2.1,2.1 L167,83.3z" />%0A <path class="st3" d="M189.9,136.7l-19.2-19.2l-1.7,1.7l19.2,19.2c0.8,0.8,0.8,2,0,2.8l-14.7,14.7c-0.8,0.8-2.1,0.8-2.8,0l-3.6-3.6 l9.5-9.5c0.5-0.4,0.6-1.2,0.2-1.7c-0.4-0.5-1.2-0.6-1.7-0.2c-0.1,0.1-0.1,0.1-0.2,0.2l-9.5,9.5l-4.1-4.1l4.3-4.3 c0.5-0.5,0.5-1.2,0.1-1.7c-0.5-0.5-1.2-0.5-1.7-0.1c0,0,0,0-0.1,0.1l-4.3,4.3l-4.1-4.1l4.3-4.3c0.5-0.5,0.4-1.3-0.1-1.7 c-0.5-0.4-1.2-0.4-1.7,0l-4.3,4.3l-2.2-2.2l-1.8,1.7l19.2,19.2c1.7,1.7,4.6,1.7,6.3,0l14.7-14.7 C191.6,141.3,191.6,138.4,189.9,136.7C189.9,136.7,189.9,136.7,189.9,136.7z" />%0A </g>%0A </g>%0A</svg>%0A`;
|
|
4
4
|
|
|
5
|
+
// packages/panel/src/composer-jobs.ts
|
|
6
|
+
var ReviewRequests = class {
|
|
7
|
+
revision = 0;
|
|
8
|
+
invalidate() {
|
|
9
|
+
this.revision++;
|
|
10
|
+
}
|
|
11
|
+
async run(read) {
|
|
12
|
+
const revision = ++this.revision;
|
|
13
|
+
const result = await read();
|
|
14
|
+
return revision === this.revision ? result : void 0;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var CompositionJobs = class {
|
|
18
|
+
constructor(read, observed, changed, failed, wait = () => new Promise((resolve) => setTimeout(resolve, 1500))) {
|
|
19
|
+
this.read = read;
|
|
20
|
+
this.observed = observed;
|
|
21
|
+
this.changed = changed;
|
|
22
|
+
this.failed = failed;
|
|
23
|
+
this.wait = wait;
|
|
24
|
+
}
|
|
25
|
+
read;
|
|
26
|
+
observed;
|
|
27
|
+
changed;
|
|
28
|
+
failed;
|
|
29
|
+
wait;
|
|
30
|
+
running = false;
|
|
31
|
+
pending;
|
|
32
|
+
revision = 0;
|
|
33
|
+
invalidate() {
|
|
34
|
+
this.revision++;
|
|
35
|
+
}
|
|
36
|
+
async run(start) {
|
|
37
|
+
if (this.running) return;
|
|
38
|
+
this.running = true;
|
|
39
|
+
this.changed();
|
|
40
|
+
try {
|
|
41
|
+
if (!this.pending) {
|
|
42
|
+
const revision = this.revision;
|
|
43
|
+
this.pending = { id: await start(), revision };
|
|
44
|
+
this.changed();
|
|
45
|
+
}
|
|
46
|
+
const job = this.pending;
|
|
47
|
+
let failures = 0;
|
|
48
|
+
for (; ; ) {
|
|
49
|
+
let response;
|
|
50
|
+
try {
|
|
51
|
+
response = await this.read(job.id);
|
|
52
|
+
failures = 0;
|
|
53
|
+
} catch (error) {
|
|
54
|
+
const paused = ++failures >= 3;
|
|
55
|
+
this.failed(error, paused);
|
|
56
|
+
if (paused) return;
|
|
57
|
+
await this.wait();
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
this.observed(response);
|
|
61
|
+
if (!["queued", "running", "cancelling"].includes(response.job.status)) {
|
|
62
|
+
this.pending = void 0;
|
|
63
|
+
return { response, current: job.revision === this.revision };
|
|
64
|
+
}
|
|
65
|
+
await this.wait();
|
|
66
|
+
}
|
|
67
|
+
} finally {
|
|
68
|
+
this.running = false;
|
|
69
|
+
this.changed();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
|
|
5
74
|
// packages/panel/src/panel.ts
|
|
6
75
|
var $ = (id) => document.getElementById(id);
|
|
7
76
|
var input = (id) => $(id);
|
|
@@ -168,14 +237,38 @@
|
|
|
168
237
|
}
|
|
169
238
|
renderSavedConnections();
|
|
170
239
|
}
|
|
240
|
+
var selectedBlock = "";
|
|
241
|
+
var blueprintReview;
|
|
242
|
+
var composeJob = "";
|
|
243
|
+
var reviewedPlan;
|
|
244
|
+
var compositionJobs = new CompositionJobs(
|
|
245
|
+
async (id) => await api({ kind: "compose-status", id }),
|
|
246
|
+
(response) => {
|
|
247
|
+
notice("");
|
|
248
|
+
$("compose-review").textContent = JSON.stringify(response.job, null, 2);
|
|
249
|
+
},
|
|
250
|
+
controls,
|
|
251
|
+
(error, paused) => {
|
|
252
|
+
notice(
|
|
253
|
+
(error instanceof Error ? error.message : String(error)) + (paused ? " Job outcome is unknown. Retry job status to continue observing the same operation." : " Retrying the existing job status."),
|
|
254
|
+
true
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
);
|
|
258
|
+
var blueprintReviews = new ReviewRequests();
|
|
171
259
|
function controls() {
|
|
172
260
|
const canAct = connected && !!snapshot?.trusted && !busy;
|
|
173
261
|
for (const id of ["validate", "run-tests", "plan", "open-browser"])
|
|
174
262
|
$(id).disabled = !canAct || !snapshot?.configured;
|
|
175
|
-
for (const form of ["sqlcl-form", "connection-form", "preferences-form"])
|
|
263
|
+
for (const form of ["catalog-search", "catalog-add", "sqlcl-form", "connection-form", "preferences-form"])
|
|
176
264
|
$(form).querySelectorAll("button[type=submit]").forEach((button) => {
|
|
177
265
|
button.disabled = !canAct;
|
|
178
266
|
});
|
|
267
|
+
$("compose-plan").disabled = !canAct || !snapshot?.configured || compositionJobs.running;
|
|
268
|
+
$("compose-plan").textContent = compositionJobs.pending ? "Retry job status" : "Plan and compile offline";
|
|
269
|
+
$("compose-materialize").disabled = !canAct || !reviewedPlan || compositionJobs.running || !!compositionJobs.pending;
|
|
270
|
+
$("compose-cancel").disabled = !canAct || !compositionJobs.pending;
|
|
271
|
+
$("blueprint-apply").disabled = !canAct || !blueprintReview;
|
|
179
272
|
$("saved-connections-refresh").disabled = !canAct || savedConnectionsState === "loading";
|
|
180
273
|
$("connection-save").disabled = !canAct || input("sqlcl-transport").value === "direct" && savedConnectionsState === "loading";
|
|
181
274
|
}
|
|
@@ -240,6 +333,19 @@
|
|
|
240
333
|
box.append(table);
|
|
241
334
|
}
|
|
242
335
|
const output = [card("Operation jobs", box, "Compile, export, tests and deployment work")];
|
|
336
|
+
const sync = node("div");
|
|
337
|
+
for (const entry of data.sync) {
|
|
338
|
+
const row = node("div", "journal-entry");
|
|
339
|
+
row.append(badge(entry.status), node("p", "", entry.environment));
|
|
340
|
+
if ("exportedAt" in entry) row.append(node("p", "subtle", "Initial export: " + entry.exportedAt));
|
|
341
|
+
if ("lastSuccessfulImport" in entry && entry.lastSuccessfulImport)
|
|
342
|
+
row.append(node("p", "subtle", "Latest successful import: " + entry.lastSuccessfulImport.at));
|
|
343
|
+
if ("blockedReason" in entry && entry.blockedReason) row.append(node("p", "", entry.blockedReason));
|
|
344
|
+
if ("dirty" in entry)
|
|
345
|
+
row.append(node("p", "", entry.dirty ? "Local edits present" : "Local checkpoint matches"));
|
|
346
|
+
sync.append(row);
|
|
347
|
+
}
|
|
348
|
+
output.push(card("Working-copy sync", sync, "Local status only; server freshness is not checked"));
|
|
243
349
|
const deployments = node("div");
|
|
244
350
|
if (!data.deployments.length) deployments.append(empty("No deployment runs recorded."));
|
|
245
351
|
for (const deployment of data.deployments) {
|
|
@@ -376,7 +482,7 @@
|
|
|
376
482
|
columns
|
|
377
483
|
];
|
|
378
484
|
});
|
|
379
|
-
draw("operations-live", [data.jobs, data.deployments, busy], () => operations(data));
|
|
485
|
+
draw("operations-live", [data.jobs, data.deployments, data.sync, busy], () => operations(data));
|
|
380
486
|
draw(
|
|
381
487
|
"settings-live",
|
|
382
488
|
[data.preferences, data.configuration, data.connections, data.toolchain, data.permissions],
|
|
@@ -445,6 +551,13 @@
|
|
|
445
551
|
refreshing = true;
|
|
446
552
|
try {
|
|
447
553
|
render(await api());
|
|
554
|
+
if (reviewedPlan && composeJob) {
|
|
555
|
+
const assessed = await api({ kind: "compose-status", id: composeJob });
|
|
556
|
+
if (!assessed.materializable) {
|
|
557
|
+
reviewedPlan = void 0;
|
|
558
|
+
$("compose-materialize").disabled = true;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
448
561
|
} catch (error) {
|
|
449
562
|
connected = false;
|
|
450
563
|
$("connection").textContent = "Disconnected";
|
|
@@ -460,6 +573,7 @@
|
|
|
460
573
|
var views = {
|
|
461
574
|
overview: ["Workspace overview", "Project settings and APEX operations for your current Codex session."],
|
|
462
575
|
operations: ["APEX operations", "Compile, verify and follow deployment state."],
|
|
576
|
+
catalog: ["Composer catalog", "Find blocks, review bindings and compile a local application plan."],
|
|
463
577
|
settings: ["Workspace settings", "Inspect configuration, database connections and browser preferences."]
|
|
464
578
|
};
|
|
465
579
|
function view(name) {
|
|
@@ -626,4 +740,122 @@
|
|
|
626
740
|
document.addEventListener("visibilitychange", () => {
|
|
627
741
|
if (!document.hidden) void refresh();
|
|
628
742
|
});
|
|
743
|
+
function invalidateBlueprintReview() {
|
|
744
|
+
blueprintReviews.invalidate();
|
|
745
|
+
blueprintReview = void 0;
|
|
746
|
+
controls();
|
|
747
|
+
}
|
|
748
|
+
async function catalogAction(action) {
|
|
749
|
+
try {
|
|
750
|
+
return await api(action);
|
|
751
|
+
} catch (error) {
|
|
752
|
+
notice(error instanceof Error ? error.message : String(error), true);
|
|
753
|
+
throw error;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
$("catalog-search").onsubmit = (event) => {
|
|
757
|
+
event.preventDefault();
|
|
758
|
+
void (async () => {
|
|
759
|
+
const result = await catalogAction({ kind: "catalog-search", query: input("catalog-query").value });
|
|
760
|
+
$("catalog-hits").replaceChildren();
|
|
761
|
+
for (const hit of result.results) {
|
|
762
|
+
const b = node("button", "quiet", hit.title + " \xB7 " + hit.status);
|
|
763
|
+
b.type = "button";
|
|
764
|
+
b.onclick = () => {
|
|
765
|
+
selectedBlock = hit.id;
|
|
766
|
+
invalidateBlueprintReview();
|
|
767
|
+
void catalogAction({ kind: "catalog-read", id: hit.id, offset: 0 }).then((data) => {
|
|
768
|
+
$("catalog-detail").textContent = data.content;
|
|
769
|
+
});
|
|
770
|
+
};
|
|
771
|
+
$("catalog-hits").append(b);
|
|
772
|
+
}
|
|
773
|
+
})();
|
|
774
|
+
};
|
|
775
|
+
$("catalog-add").onsubmit = (event) => {
|
|
776
|
+
event.preventDefault();
|
|
777
|
+
invalidateBlueprintReview();
|
|
778
|
+
void (async () => {
|
|
779
|
+
if (!selectedBlock) throw new Error("Select a block from the catalog.");
|
|
780
|
+
const blueprint = input("compose-blueprint").value, instanceId = input("compose-instance").value, instance = {
|
|
781
|
+
...JSON.parse($("compose-parameters").value),
|
|
782
|
+
use: selectedBlock
|
|
783
|
+
};
|
|
784
|
+
const reviewed = await blueprintReviews.run(async () => {
|
|
785
|
+
const state = await catalogAction({ kind: "blueprint-read", blueprint });
|
|
786
|
+
const action = {
|
|
787
|
+
kind: "blueprint-add",
|
|
788
|
+
blueprint,
|
|
789
|
+
instanceId,
|
|
790
|
+
instance,
|
|
791
|
+
expectedDigest: state.digest,
|
|
792
|
+
apply: false
|
|
793
|
+
};
|
|
794
|
+
const diff = await catalogAction(action);
|
|
795
|
+
return { action, diff };
|
|
796
|
+
});
|
|
797
|
+
if (!reviewed) return;
|
|
798
|
+
blueprintReview = { ...reviewed.action, apply: true };
|
|
799
|
+
$("blueprint-diff").textContent = "BEFORE\n" + reviewed.diff.before + "\nAFTER\n" + reviewed.diff.after;
|
|
800
|
+
controls();
|
|
801
|
+
})().catch((error) => notice(String(error), true));
|
|
802
|
+
};
|
|
803
|
+
$("blueprint-apply").onclick = () => {
|
|
804
|
+
if (blueprintReview)
|
|
805
|
+
void catalogAction(blueprintReview).then(() => {
|
|
806
|
+
blueprintReview = void 0;
|
|
807
|
+
blueprintReviews.invalidate();
|
|
808
|
+
reviewedPlan = void 0;
|
|
809
|
+
compositionJobs.invalidate();
|
|
810
|
+
$("blueprint-apply").disabled = true;
|
|
811
|
+
$("compose-materialize").disabled = true;
|
|
812
|
+
notice("Blueprint updated. Create and review a new plan.");
|
|
813
|
+
});
|
|
814
|
+
};
|
|
815
|
+
async function startComposition(action) {
|
|
816
|
+
if (compositionJobs.running) return;
|
|
817
|
+
reviewedPlan = void 0;
|
|
818
|
+
controls();
|
|
819
|
+
try {
|
|
820
|
+
const completed = await compositionJobs.run(async () => {
|
|
821
|
+
composeJob = (await catalogAction(action)).jobId;
|
|
822
|
+
return composeJob;
|
|
823
|
+
});
|
|
824
|
+
const result = completed?.response.job.result?.data;
|
|
825
|
+
reviewedPlan = completed?.current && completed.response.materializable && result?.planDigest ? { plan: result.plan, planDigest: result.planDigest } : void 0;
|
|
826
|
+
} catch (error) {
|
|
827
|
+
notice(error instanceof Error ? error.message : String(error), true);
|
|
828
|
+
} finally {
|
|
829
|
+
controls();
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
input("compose-blueprint").oninput = () => {
|
|
833
|
+
invalidateBlueprintReview();
|
|
834
|
+
reviewedPlan = void 0;
|
|
835
|
+
compositionJobs.invalidate();
|
|
836
|
+
controls();
|
|
837
|
+
};
|
|
838
|
+
input("compose-instance").oninput = invalidateBlueprintReview;
|
|
839
|
+
$("compose-parameters").oninput = invalidateBlueprintReview;
|
|
840
|
+
$("compose-plan").onclick = () => {
|
|
841
|
+
void startComposition({
|
|
842
|
+
kind: "compose-plan",
|
|
843
|
+
blueprint: input("compose-blueprint").value,
|
|
844
|
+
out: ".apexrest/composer/panel-plan.json",
|
|
845
|
+
mode: "offline",
|
|
846
|
+
validation: "compiler",
|
|
847
|
+
action: "compose"
|
|
848
|
+
});
|
|
849
|
+
};
|
|
850
|
+
$("compose-materialize").onclick = () => {
|
|
851
|
+
if (reviewedPlan)
|
|
852
|
+
void startComposition({
|
|
853
|
+
kind: "compose-materialize",
|
|
854
|
+
plan: reviewedPlan.plan,
|
|
855
|
+
expectedDigest: reviewedPlan.planDigest
|
|
856
|
+
});
|
|
857
|
+
};
|
|
858
|
+
$("compose-cancel").onclick = () => {
|
|
859
|
+
if (composeJob) void catalogAction({ kind: "cancel-job", id: composeJob });
|
|
860
|
+
};
|
|
629
861
|
})();
|
package/dist/codex-compat/plugins/apexrest-apex/resources/schemas/composer-allocation.schema.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"page": {
|
|
6
|
+
"type": "integer",
|
|
7
|
+
"exclusiveMinimum": 0,
|
|
8
|
+
"maximum": 9007199254740991
|
|
9
|
+
},
|
|
10
|
+
"dialog": {
|
|
11
|
+
"anyOf": [
|
|
12
|
+
{
|
|
13
|
+
"type": "integer",
|
|
14
|
+
"exclusiveMinimum": 0,
|
|
15
|
+
"maximum": 9007199254740991
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "null"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"prefix": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"required": [
|
|
28
|
+
"page",
|
|
29
|
+
"dialog",
|
|
30
|
+
"prefix"
|
|
31
|
+
],
|
|
32
|
+
"additionalProperties": false
|
|
33
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"schemaVersion": {
|
|
6
|
+
"type": "number",
|
|
7
|
+
"const": 1
|
|
8
|
+
},
|
|
9
|
+
"id": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"pattern": "^block:[a-z0-9-]+\\/[a-z0-9-]+$"
|
|
12
|
+
},
|
|
13
|
+
"version": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+(?:-[a-z0-9.-]+)?$"
|
|
16
|
+
},
|
|
17
|
+
"kind": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"const": "block"
|
|
20
|
+
},
|
|
21
|
+
"name": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1,
|
|
24
|
+
"maxLength": 180
|
|
25
|
+
},
|
|
26
|
+
"aliases": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"items": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"maxLength": 128
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"status": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"enum": [
|
|
36
|
+
"draft",
|
|
37
|
+
"experimental",
|
|
38
|
+
"verified",
|
|
39
|
+
"deprecated",
|
|
40
|
+
"revoked"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"license": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
},
|
|
46
|
+
"origin": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
},
|
|
49
|
+
"recipeRefs": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": {
|
|
52
|
+
"type": "string"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"compatibility": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"properties": {
|
|
58
|
+
"profileRefs": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"required": [
|
|
66
|
+
"profileRefs"
|
|
67
|
+
],
|
|
68
|
+
"additionalProperties": false
|
|
69
|
+
},
|
|
70
|
+
"renderer": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"enum": [
|
|
73
|
+
"report-dialog",
|
|
74
|
+
"status-summary",
|
|
75
|
+
"filtered-list",
|
|
76
|
+
"read-only-detail",
|
|
77
|
+
"history-timeline",
|
|
78
|
+
"master-detail"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"ports": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"properties": {
|
|
84
|
+
"inputs": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"enum": [
|
|
89
|
+
"records",
|
|
90
|
+
"saveRecord"
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"outputs": {
|
|
95
|
+
"type": "array",
|
|
96
|
+
"items": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"const": "saved"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"required": [
|
|
103
|
+
"inputs",
|
|
104
|
+
"outputs"
|
|
105
|
+
],
|
|
106
|
+
"additionalProperties": false
|
|
107
|
+
},
|
|
108
|
+
"requires": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"properties": {
|
|
111
|
+
"blocks": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"items": {
|
|
114
|
+
"type": "string"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"capabilities": {
|
|
118
|
+
"type": "array",
|
|
119
|
+
"items": {
|
|
120
|
+
"type": "string"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"required": [
|
|
125
|
+
"blocks",
|
|
126
|
+
"capabilities"
|
|
127
|
+
],
|
|
128
|
+
"additionalProperties": false
|
|
129
|
+
},
|
|
130
|
+
"source": {
|
|
131
|
+
"type": "object",
|
|
132
|
+
"properties": {
|
|
133
|
+
"files": {
|
|
134
|
+
"type": "array",
|
|
135
|
+
"items": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"minLength": 1,
|
|
138
|
+
"maxLength": 1024
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"required": [
|
|
143
|
+
"files"
|
|
144
|
+
],
|
|
145
|
+
"additionalProperties": false
|
|
146
|
+
},
|
|
147
|
+
"effects": {
|
|
148
|
+
"type": "object",
|
|
149
|
+
"properties": {
|
|
150
|
+
"local": {
|
|
151
|
+
"type": "array",
|
|
152
|
+
"items": {
|
|
153
|
+
"type": "string"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"deployment": {
|
|
157
|
+
"type": "array",
|
|
158
|
+
"items": {
|
|
159
|
+
"type": "string"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"applicationRuntime": {
|
|
163
|
+
"type": "array",
|
|
164
|
+
"items": {
|
|
165
|
+
"type": "string"
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"authentication": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"const": "preserve"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"required": [
|
|
174
|
+
"local",
|
|
175
|
+
"deployment",
|
|
176
|
+
"applicationRuntime",
|
|
177
|
+
"authentication"
|
|
178
|
+
],
|
|
179
|
+
"additionalProperties": false
|
|
180
|
+
},
|
|
181
|
+
"limitations": {
|
|
182
|
+
"type": "array",
|
|
183
|
+
"items": {
|
|
184
|
+
"type": "string"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"required": [
|
|
189
|
+
"schemaVersion",
|
|
190
|
+
"id",
|
|
191
|
+
"version",
|
|
192
|
+
"kind",
|
|
193
|
+
"name",
|
|
194
|
+
"aliases",
|
|
195
|
+
"status",
|
|
196
|
+
"license",
|
|
197
|
+
"origin",
|
|
198
|
+
"recipeRefs",
|
|
199
|
+
"compatibility",
|
|
200
|
+
"renderer",
|
|
201
|
+
"ports",
|
|
202
|
+
"requires",
|
|
203
|
+
"source",
|
|
204
|
+
"effects",
|
|
205
|
+
"limitations"
|
|
206
|
+
],
|
|
207
|
+
"additionalProperties": false
|
|
208
|
+
}
|