@ikenga/contract 0.18.0 → 0.19.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.
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/manifest.d.ts +1803 -37
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +125 -3
- package/dist/manifest.js.map +1 -1
- package/dist/ngwa.d.ts +2 -2
- package/dist/registry.d.ts +1307 -35
- package/dist/registry.d.ts.map +1 -1
- package/dist/window.d.ts +5 -5
- package/package.json +1 -1
- package/schemas/registry/pkg-detail-v1.json +532 -11
- package/src/__fixtures__/manifest-v5/README.md +23 -0
- package/src/__fixtures__/manifest-v5/alias/nav-only.json +16 -0
- package/src/__fixtures__/manifest-v5/invalid/companion-panel-missing-route.json +11 -0
- package/src/__fixtures__/manifest-v5/invalid/context-action-bad-run.json +16 -0
- package/src/__fixtures__/manifest-v5/invalid/context-selector-bad-kind.json +16 -0
- package/src/__fixtures__/manifest-v5/invalid/explorer-section-missing-data-route.json +11 -0
- package/src/__fixtures__/manifest-v5/invalid/side-pane-viewers-empty.json +9 -0
- package/src/__fixtures__/manifest-v5/invalid/side-pane-viewers.json +14 -0
- package/src/__fixtures__/manifest-v5/invalid/view-route-no-routes.json +11 -0
- package/src/__fixtures__/manifest-v5/invalid/view-route-undeclared.json +15 -0
- package/src/__fixtures__/manifest-v5/invalid/view-unknown-field.json +14 -0
- package/src/__fixtures__/manifest-v5/invalid/widget-bad-span.json +14 -0
- package/src/__fixtures__/manifest-v5/valid/companion-panels.json +26 -0
- package/src/__fixtures__/manifest-v5/valid/context-actions.json +41 -0
- package/src/__fixtures__/manifest-v5/valid/explorer-sections.json +31 -0
- package/src/__fixtures__/manifest-v5/valid/full.json +42 -0
- package/src/__fixtures__/manifest-v5/valid/minimal.json +6 -0
- package/src/__fixtures__/manifest-v5/valid/nav-and-views.json +17 -0
- package/src/__fixtures__/manifest-v5/valid/v4-manifest.json +20 -0
- package/src/__fixtures__/manifest-v5/valid/views.json +26 -0
- package/src/__fixtures__/manifest-v5/valid/widgets.json +18 -0
- package/src/index.ts +1 -1
- package/src/manifest.test.ts +350 -2
- package/src/manifest.ts +143 -3
- package/src/ngwa.test.ts +46 -2
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "com.ikenga.bad-run",
|
|
3
|
+
"name": "Bad Run",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"ikenga_api": "5",
|
|
6
|
+
"ui": {
|
|
7
|
+
"context_actions": [
|
|
8
|
+
{
|
|
9
|
+
"id": "shell-out",
|
|
10
|
+
"label": "Shell Out",
|
|
11
|
+
"when": { "kind": "file" },
|
|
12
|
+
"run": { "kind": "shell", "command": "rm -rf /" }
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "com.ikenga.bad-selector",
|
|
3
|
+
"name": "Bad Selector",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"ikenga_api": "5",
|
|
6
|
+
"ui": {
|
|
7
|
+
"context_actions": [
|
|
8
|
+
{
|
|
9
|
+
"id": "project-wide",
|
|
10
|
+
"label": "Project Wide",
|
|
11
|
+
"when": { "kind": "project" },
|
|
12
|
+
"run": { "kind": "dispatch", "prompt": "hi" }
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "com.ikenga.sidepane",
|
|
3
|
+
"name": "Side Pane",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"ikenga_api": "5",
|
|
6
|
+
"ui": {
|
|
7
|
+
"routes": [
|
|
8
|
+
{ "path": "/viewer", "kind": "iframe", "source": "viewer.html" }
|
|
9
|
+
],
|
|
10
|
+
"side_pane_viewers": [
|
|
11
|
+
{ "id": "viewer", "label": "Viewer", "route": "/viewer" }
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "com.ikenga.bad-route",
|
|
3
|
+
"name": "Bad Route",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"ikenga_api": "5",
|
|
6
|
+
"ui": {
|
|
7
|
+
"routes": [
|
|
8
|
+
{ "path": "/grid", "kind": "iframe", "source": "grid.html" }
|
|
9
|
+
],
|
|
10
|
+
"views": [
|
|
11
|
+
{ "id": "grid", "title": "Grid", "route": "/grid" },
|
|
12
|
+
{ "id": "missing", "title": "Missing", "route": "/not-declared" }
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "com.ikenga.strict-view",
|
|
3
|
+
"name": "Strict View",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"ikenga_api": "5",
|
|
6
|
+
"ui": {
|
|
7
|
+
"routes": [
|
|
8
|
+
{ "path": "/grid", "kind": "iframe", "source": "grid.html" }
|
|
9
|
+
],
|
|
10
|
+
"views": [
|
|
11
|
+
{ "id": "grid", "title": "Grid", "route": "/grid", "label": "not-a-field" }
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "com.ikenga.bad-span",
|
|
3
|
+
"name": "Bad Span",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"ikenga_api": "5",
|
|
6
|
+
"ui": {
|
|
7
|
+
"routes": [
|
|
8
|
+
{ "path": "/w/main", "kind": "iframe", "source": "w-main.html" }
|
|
9
|
+
],
|
|
10
|
+
"widgets": [
|
|
11
|
+
{ "id": "main", "title": "Main", "route": "/w/main", "span": "large" }
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "com.ikenga.companion-demo",
|
|
3
|
+
"name": "Companion Demo",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"ikenga_api": "5",
|
|
6
|
+
"ui": {
|
|
7
|
+
"routes": [
|
|
8
|
+
{ "path": "/session-state", "kind": "iframe", "source": "session-state.html" },
|
|
9
|
+
{ "path": "/project-state", "kind": "iframe", "source": "project-state.html" }
|
|
10
|
+
],
|
|
11
|
+
"companion_panels": [
|
|
12
|
+
{
|
|
13
|
+
"id": "session-state",
|
|
14
|
+
"title": "Session State",
|
|
15
|
+
"icon": "activity",
|
|
16
|
+
"route": "/session-state",
|
|
17
|
+
"session_scoped": true
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "project-state",
|
|
21
|
+
"title": "Project State",
|
|
22
|
+
"route": "/project-state"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "com.ikenga.actions-demo",
|
|
3
|
+
"name": "Actions Demo",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"ikenga_api": "5",
|
|
6
|
+
"ui": {
|
|
7
|
+
"routes": [
|
|
8
|
+
{ "path": "/review", "kind": "iframe", "source": "review.html" }
|
|
9
|
+
],
|
|
10
|
+
"context_actions": [
|
|
11
|
+
{
|
|
12
|
+
"id": "hand-to-chi",
|
|
13
|
+
"label": "Hand to Chi",
|
|
14
|
+
"when": { "kind": "file", "glob": "*.md" },
|
|
15
|
+
"run": {
|
|
16
|
+
"kind": "dispatch",
|
|
17
|
+
"prompt": "Review {{file.path}} in {{project.root}}",
|
|
18
|
+
"target": "chi"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "open-artifact",
|
|
23
|
+
"label": "Open Artifact",
|
|
24
|
+
"when": { "kind": "artifact" },
|
|
25
|
+
"run": { "kind": "view", "route": "/review" }
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "summarize-session",
|
|
29
|
+
"label": "Summarize Session",
|
|
30
|
+
"when": { "kind": "session" },
|
|
31
|
+
"run": { "kind": "dispatch", "prompt": "Summarize {{pane.url}}" }
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "triage-ngwa",
|
|
35
|
+
"label": "Triage Item",
|
|
36
|
+
"when": { "kind": "ngwa-item", "kinds": ["task", "alert"] },
|
|
37
|
+
"run": { "kind": "view", "route": "/review" }
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "com.ikenga.explorer-demo",
|
|
3
|
+
"name": "Explorer Demo",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"ikenga_api": "5",
|
|
6
|
+
"ui": {
|
|
7
|
+
"explorer_sections": [
|
|
8
|
+
{
|
|
9
|
+
"id": "open-tasks",
|
|
10
|
+
"title": "Open Tasks",
|
|
11
|
+
"icon": "check-circle",
|
|
12
|
+
"order": 10,
|
|
13
|
+
"data_route": "/pkg/com.ikenga.explorer-demo/sections/open-tasks"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "recent-files",
|
|
17
|
+
"title": "Recent Files",
|
|
18
|
+
"data_route": "/pkg/com.ikenga.explorer-demo/sections/recent-files"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"iyke": {
|
|
23
|
+
"routes": [
|
|
24
|
+
{
|
|
25
|
+
"method": "GET",
|
|
26
|
+
"path": "/pkg/com.ikenga.explorer-demo/sections/open-tasks",
|
|
27
|
+
"handler": "sidecar:pa-ikenga-explorer-demo sections"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "com.ikenga.full-v5",
|
|
3
|
+
"name": "Full v5",
|
|
4
|
+
"version": "2.0.0",
|
|
5
|
+
"ikenga_api": "5",
|
|
6
|
+
"author": { "name": "Ikenga", "key": "ed25519:abc" },
|
|
7
|
+
"ui": {
|
|
8
|
+
"routes": [
|
|
9
|
+
{ "path": "/grid", "kind": "iframe", "source": "grid.html" },
|
|
10
|
+
{ "path": "/panel", "kind": "iframe", "source": "panel.html" },
|
|
11
|
+
{ "path": "/w/main", "kind": "iframe", "source": "w-main.html" }
|
|
12
|
+
],
|
|
13
|
+
"views": [
|
|
14
|
+
{ "id": "grid", "title": "Grid", "icon": "layout-grid", "route": "/grid", "pin_on_install": true }
|
|
15
|
+
],
|
|
16
|
+
"explorer_sections": [
|
|
17
|
+
{ "id": "queue", "title": "Queue", "order": 5, "data_route": "/pkg/com.ikenga.full-v5/queue" }
|
|
18
|
+
],
|
|
19
|
+
"companion_panels": [
|
|
20
|
+
{ "id": "state", "title": "State", "route": "/panel", "session_scoped": true }
|
|
21
|
+
],
|
|
22
|
+
"context_actions": [
|
|
23
|
+
{
|
|
24
|
+
"id": "dispatch-file",
|
|
25
|
+
"label": "Dispatch File",
|
|
26
|
+
"when": { "kind": "file" },
|
|
27
|
+
"run": { "kind": "dispatch", "prompt": "Handle {{file.path}}" }
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"widgets": [
|
|
31
|
+
{ "id": "main", "title": "Main", "route": "/w/main", "span": "medium" }
|
|
32
|
+
],
|
|
33
|
+
"command_palette": [
|
|
34
|
+
{ "id": "refresh", "label": "Refresh", "action": { "type": "whatever-untyped" } }
|
|
35
|
+
],
|
|
36
|
+
"session": { "persistence": "keep" }
|
|
37
|
+
},
|
|
38
|
+
"permissions": {
|
|
39
|
+
"net": ["https://api.example.com/"],
|
|
40
|
+
"events": ["pkg://lifecycle"]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "com.ikenga.nav-and-views",
|
|
3
|
+
"name": "Nav And Views",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"ikenga_api": "5",
|
|
6
|
+
"ui": {
|
|
7
|
+
"routes": [
|
|
8
|
+
{ "path": "/grid", "kind": "iframe", "source": "grid.html" }
|
|
9
|
+
],
|
|
10
|
+
"nav": [
|
|
11
|
+
{ "id": "legacy-grid", "label": "Legacy Grid", "icon": "grid", "route": "/grid" }
|
|
12
|
+
],
|
|
13
|
+
"views": [
|
|
14
|
+
{ "id": "grid", "title": "Grid", "icon": "layout-grid", "route": "/grid" }
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "com.ikenga.legacy-v4",
|
|
3
|
+
"name": "Legacy v4",
|
|
4
|
+
"version": "1.4.0",
|
|
5
|
+
"ikenga_api": "4",
|
|
6
|
+
"ui": {
|
|
7
|
+
"routes": [
|
|
8
|
+
{ "path": "/home", "kind": "iframe", "source": "home.html" }
|
|
9
|
+
],
|
|
10
|
+
"nav": [
|
|
11
|
+
{ "id": "home", "label": "Home", "icon": "home", "route": "/home" }
|
|
12
|
+
],
|
|
13
|
+
"command_palette": [
|
|
14
|
+
{ "id": "sync", "label": "Sync", "shortcut": "ctrl+shift+s", "action": "sync.now" }
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"capabilities": {
|
|
18
|
+
"webview": { "child_webviews": true, "partitions": ["default"] }
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "com.ikenga.views-demo",
|
|
3
|
+
"name": "Views Demo",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"ikenga_api": "5",
|
|
6
|
+
"ui": {
|
|
7
|
+
"routes": [
|
|
8
|
+
{ "path": "/grid", "kind": "iframe", "source": "grid.html" },
|
|
9
|
+
{ "path": "/detail", "kind": "iframe", "source": "detail.html" }
|
|
10
|
+
],
|
|
11
|
+
"views": [
|
|
12
|
+
{
|
|
13
|
+
"id": "grid",
|
|
14
|
+
"title": "Grid",
|
|
15
|
+
"icon": "layout-grid",
|
|
16
|
+
"route": "/grid",
|
|
17
|
+
"pin_on_install": true
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "detail",
|
|
21
|
+
"title": "Detail",
|
|
22
|
+
"route": "/detail"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "com.ikenga.widgets-demo",
|
|
3
|
+
"name": "Widgets Demo",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"ikenga_api": "5",
|
|
6
|
+
"ui": {
|
|
7
|
+
"routes": [
|
|
8
|
+
{ "path": "/w/stats", "kind": "iframe", "source": "w-stats.html" },
|
|
9
|
+
{ "path": "/w/feed", "kind": "iframe", "source": "w-feed.html" },
|
|
10
|
+
{ "path": "/w/pipeline", "kind": "iframe", "source": "w-pipeline.html" }
|
|
11
|
+
],
|
|
12
|
+
"widgets": [
|
|
13
|
+
{ "id": "stats", "title": "Stats", "route": "/w/stats", "span": "small" },
|
|
14
|
+
{ "id": "feed", "title": "Feed", "route": "/w/feed" },
|
|
15
|
+
{ "id": "pipeline", "title": "Pipeline", "route": "/w/pipeline", "span": "wide" }
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
package/src/index.ts
CHANGED