acrylblends 1.2.0 → 1.3.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/dist/index.d.ts +2 -1
- package/dist/index.js +44 -10
- package/dist/index.js.map +1 -1
- package/docs/framework/guides/create-acrylblends.md +4 -2
- package/docs/framework/workshop/README.md +4 -2
- package/docs/framework/workshop/facilitator.md +1 -1
- package/lib/cordis/door.d.ts +54 -2
- package/lib/cordis/door.js +131 -4
- package/package.json +1 -1
- package/plugins/acryl-door/plugin.json +3 -0
- package/plugins/acryl-door/src/cli/acryl.ts +63 -6
- package/plugins/acryl-door/src/host/door.ts +91 -5
- package/plugins/acryl-door/src/host/operator-routes.ts +21 -1
- package/plugins/acryl-door/src/host/verbs.ts +11 -1
- package/plugins/acryl-door/src/index.ts +2 -1
- package/plugins/builder/index.ts +13 -35
- package/plugins/builder/plugin.json +4 -2
- package/plugins/extensions/index.ts +78 -19
- package/plugins/extensions/plugin-store.ts +27 -0
- package/plugins/extensions/plugin.json +1 -1
- package/plugins/extensions/routes.ts +92 -0
- package/plugins/extensions/stage.ts +15 -5
- package/plugins/home/index.ts +3 -1
- package/plugins/manifest/plugin.json +1 -1
- package/plugins/plugin-share/README.md +66 -0
- package/plugins/plugin-share/index.ts +581 -0
- package/plugins/plugin-share/package.ts +186 -0
- package/plugins/plugin-share/plugin.json +15 -0
- package/plugins/plugin-share/publish.ts +65 -0
- package/plugins/plugin-share/pull-check.ts +129 -0
- package/plugins/plugin-share/pulled-records.ts +70 -0
- package/templates/agent/.gitattributes +2 -0
- package/templates/agent/blend.yaml +2 -0
- package/templates/agent/src/app.ts +6 -0
- package/templates/agent/template.json +1 -0
- package/templates/blank/.gitattributes +2 -0
- package/templates/blank/blend.yaml +3 -0
- package/templates/blank/src/app.ts +8 -0
- package/templates/blank/template.json +1 -0
- package/templates/chat/.gitattributes +2 -0
- package/templates/chat/blend.yaml +3 -0
- package/templates/chat/src/app.ts +8 -0
- package/templates/chat/template.json +1 -0
- package/templates/nodejs/.gitattributes +2 -0
- package/templates/nodejs/blend.yaml +3 -0
- package/templates/nodejs/src/app.ts +8 -0
- package/templates/nodejs/template.json +1 -0
- package/templates/notes/.gitattributes +2 -0
- package/templates/notes/blend.yaml +3 -0
- package/templates/notes/src/app.ts +8 -0
- package/templates/notes/template.json +1 -0
- package/templates/todo/.gitattributes +2 -0
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
loadManifest,
|
|
15
15
|
type ParameterValue,
|
|
16
16
|
} from '../plugins/manifest/index.ts'
|
|
17
|
+
import { pluginShare } from '../plugins/plugin-share/index.ts'
|
|
17
18
|
import { doorEnabled } from './door.ts'
|
|
18
19
|
import { FRAME_MOUNT_PREFIX, routes } from './routes.ts'
|
|
19
20
|
|
|
@@ -23,6 +24,7 @@ export const registry = {
|
|
|
23
24
|
'acryl-node-server': nodeServer,
|
|
24
25
|
'acryl-door': door,
|
|
25
26
|
extensions,
|
|
27
|
+
'plugin-share': pluginShare,
|
|
26
28
|
routes,
|
|
27
29
|
}
|
|
28
30
|
|
|
@@ -104,6 +106,8 @@ export async function composeInto(
|
|
|
104
106
|
const leaveOut = new Set<string>(options.host === true ? HOST_ROWS : [])
|
|
105
107
|
if (!own) leaveOut.add('acryl-node-server').add('acryl-door')
|
|
106
108
|
if (!doorEnabled()) leaveOut.add('acryl-door')
|
|
109
|
+
// A pull runs a stranger's code and a publish leaves the machine: development only, like the door.
|
|
110
|
+
if (process.env.NODE_ENV === 'production') leaveOut.add('plugin-share')
|
|
107
111
|
const manifest = without(read, ...leaveOut)
|
|
108
112
|
// The rows that name one of the app's own plugin folders (a feature: plugins/<name>/ and its row) rather than a registry import. Each one that runs
|
|
109
113
|
// is imported here; all of them, off or on, belong to their row, so the extensions row never starts them a second time.
|
|
@@ -127,7 +131,11 @@ export async function composeInto(
|
|
|
127
131
|
...(process.env.NODE_ENV === 'production' ? { readOnly: true } : {}),
|
|
128
132
|
sources: [{ dir: PLUGINS_DIR, trust: 'install' }],
|
|
129
133
|
rows: ownRows,
|
|
134
|
+
// Messages name a route as the plugin wrote it, not under the frame's canvas prefix.
|
|
135
|
+
...(prefix === undefined ? {} : { routePrefix: prefix }),
|
|
130
136
|
},
|
|
137
|
+
// Pulled plugins go where the extensions row installs from.
|
|
138
|
+
'plugin-share': { dir: PLUGINS_DIR },
|
|
131
139
|
// Only the app's own server listens; the frame host owns the server and its port.
|
|
132
140
|
...(own ? { server: { port: chosen.port.start, scan: chosen.port.scan ? 20 : 0 } } : {}),
|
|
133
141
|
},
|
|
@@ -24,6 +24,9 @@ spec:
|
|
|
24
24
|
# Read-only when NODE_ENV=production.
|
|
25
25
|
- id: extensions
|
|
26
26
|
name: extensions
|
|
27
|
+
# Sharing: `npm run acryl -- plugin pull github:<owner>/<repo>@<version>` installs a plugin someone released (development only).
|
|
28
|
+
- id: plugin-share
|
|
29
|
+
name: plugin-share
|
|
27
30
|
- id: server
|
|
28
31
|
name: acryl-node-server
|
|
29
32
|
config:
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
loadManifest,
|
|
16
16
|
type ParameterValue,
|
|
17
17
|
} from '../plugins/manifest/index.ts'
|
|
18
|
+
import { pluginShare } from '../plugins/plugin-share/index.ts'
|
|
18
19
|
import { doorEnabled } from './door.ts'
|
|
19
20
|
import { FRAME_MOUNT_PREFIX, routes } from './routes.ts'
|
|
20
21
|
|
|
@@ -25,6 +26,7 @@ export const registry = {
|
|
|
25
26
|
'acryl-node-server': nodeServer,
|
|
26
27
|
'acryl-door': door,
|
|
27
28
|
extensions,
|
|
29
|
+
'plugin-share': pluginShare,
|
|
28
30
|
routes,
|
|
29
31
|
}
|
|
30
32
|
|
|
@@ -106,6 +108,8 @@ export async function composeInto(
|
|
|
106
108
|
const leaveOut = new Set<string>(options.host === true ? HOST_ROWS : [])
|
|
107
109
|
if (!own) leaveOut.add('acryl-node-server').add('acryl-door')
|
|
108
110
|
if (!doorEnabled()) leaveOut.add('acryl-door')
|
|
111
|
+
// A pull runs a stranger's code and a publish leaves the machine: development only, like the door.
|
|
112
|
+
if (process.env.NODE_ENV === 'production') leaveOut.add('plugin-share')
|
|
109
113
|
const manifest = without(read, ...leaveOut)
|
|
110
114
|
// The rows that name one of the app's own plugin folders (a feature: plugins/<name>/ and its row) rather than a registry import. Each one that runs
|
|
111
115
|
// is imported here; all of them, off or on, belong to their row, so the extensions row never starts them a second time.
|
|
@@ -134,7 +138,11 @@ export async function composeInto(
|
|
|
134
138
|
...(process.env.NODE_ENV === 'production' ? { readOnly: true } : {}),
|
|
135
139
|
sources: [{ dir: PLUGINS_DIR, trust: 'install' }],
|
|
136
140
|
rows: ownRows,
|
|
141
|
+
// Messages name a route as the plugin wrote it, not under the frame's canvas prefix.
|
|
142
|
+
...(prefix === undefined ? {} : { routePrefix: prefix }),
|
|
137
143
|
},
|
|
144
|
+
// Pulled plugins go where the extensions row installs from.
|
|
145
|
+
'plugin-share': { dir: PLUGINS_DIR },
|
|
138
146
|
// Only the app's own server listens; the frame host owns the server and its port.
|
|
139
147
|
...(own ? { server: { port: chosen.port.start, scan: chosen.port.scan ? 20 : 0 } } : {}),
|
|
140
148
|
},
|