@dxos/plugin-script 0.6.13 → 0.6.14-main.1366248
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 +1 -1
- package/dist/lib/browser/AutomationPanel-XLL2ZXGS.mjs +78 -0
- package/dist/lib/browser/AutomationPanel-XLL2ZXGS.mjs.map +7 -0
- package/dist/lib/browser/ScriptContainer-YXH4MFEO.mjs +415 -0
- package/dist/lib/browser/ScriptContainer-YXH4MFEO.mjs.map +7 -0
- package/dist/lib/browser/chunk-C7VBULMK.mjs +18 -0
- package/dist/lib/browser/chunk-C7VBULMK.mjs.map +7 -0
- package/dist/lib/browser/{chunk-RHEZ5LUU.mjs → chunk-G6H56WFS.mjs} +51 -2
- package/dist/lib/browser/{chunk-RHEZ5LUU.mjs.map → chunk-G6H56WFS.mjs.map} +4 -4
- package/dist/lib/browser/{chunk-DL5XQRQM.mjs → chunk-KHNN3F7J.mjs} +18 -6
- package/dist/lib/browser/chunk-KHNN3F7J.mjs.map +7 -0
- package/dist/lib/browser/chunk-NCZUJKJE.mjs +236 -0
- package/dist/lib/browser/chunk-NCZUJKJE.mjs.map +7 -0
- package/dist/lib/browser/{chunk-O4LWBX6A.mjs → chunk-USXWNH3S.mjs} +2 -2
- package/dist/lib/browser/{chunk-O4LWBX6A.mjs.map → chunk-USXWNH3S.mjs.map} +2 -2
- package/dist/lib/browser/edge/index.mjs +5 -1
- package/dist/lib/browser/index.mjs +185 -62
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/meta.mjs +1 -1
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node/AutomationPanel-OSPAFWZU.cjs +100 -0
- package/dist/lib/node/AutomationPanel-OSPAFWZU.cjs.map +7 -0
- package/dist/lib/node/ScriptContainer-FWHFEIHK.cjs +417 -0
- package/dist/lib/node/ScriptContainer-FWHFEIHK.cjs.map +7 -0
- package/dist/lib/node/{TypescriptEditor-M3WWFIP2.cjs → chunk-6LYX73ZT.cjs} +19 -8
- package/dist/lib/node/chunk-6LYX73ZT.cjs.map +7 -0
- package/dist/lib/node/{chunk-4GTXIELQ.cjs → chunk-ACLCRWDB.cjs} +44 -6
- package/dist/lib/node/chunk-ACLCRWDB.cjs.map +7 -0
- package/dist/lib/node/chunk-BJ4WIWCP.cjs +265 -0
- package/dist/lib/node/chunk-BJ4WIWCP.cjs.map +7 -0
- package/dist/lib/node/{chunk-5RBVXKXT.cjs → chunk-CPNHUAFN.cjs} +6 -6
- package/dist/lib/node/{chunk-5RBVXKXT.cjs.map → chunk-CPNHUAFN.cjs.map} +2 -2
- package/dist/lib/node/{chunk-PFH3ROEH.cjs → chunk-FY5KKL5N.cjs} +22 -8
- package/dist/lib/node/chunk-FY5KKL5N.cjs.map +7 -0
- package/dist/lib/node/edge/index.cjs +12 -8
- package/dist/lib/node/edge/index.cjs.map +2 -2
- package/dist/lib/node/index.cjs +196 -81
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.cjs +3 -3
- package/dist/lib/node/meta.cjs.map +1 -1
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/types/index.cjs +5 -5
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/AutomationPanel-KJNL6ARP.mjs +79 -0
- package/dist/lib/node-esm/AutomationPanel-KJNL6ARP.mjs.map +7 -0
- package/dist/lib/node-esm/ScriptContainer-6U5WJFRB.mjs +416 -0
- package/dist/lib/node-esm/ScriptContainer-6U5WJFRB.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-2NPZGQGA.mjs +47 -0
- package/dist/lib/node-esm/chunk-2NPZGQGA.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-DXWSRDEN.mjs +237 -0
- package/dist/lib/node-esm/chunk-DXWSRDEN.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-LDLNTVAK.mjs +280 -0
- package/dist/lib/node-esm/chunk-LDLNTVAK.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-QMTTZYLF.mjs +255 -0
- package/dist/lib/node-esm/chunk-QMTTZYLF.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SLTZMY34.mjs +20 -0
- package/dist/lib/node-esm/chunk-SLTZMY34.mjs.map +7 -0
- package/dist/lib/node-esm/edge/index.mjs +24 -0
- package/dist/lib/node-esm/index.mjs +415 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/lib/node-esm/meta.mjs +10 -0
- package/dist/lib/node-esm/meta.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +13 -0
- package/dist/lib/node-esm/types/index.mjs.map +7 -0
- package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +17 -0
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -0
- package/dist/types/src/components/AutomationPanel/index.d.ts +4 -0
- package/dist/types/src/components/AutomationPanel/index.d.ts.map +1 -0
- package/dist/types/src/components/DebugPanel/DebugPanel.d.ts +7 -0
- package/dist/types/src/components/DebugPanel/DebugPanel.d.ts.map +1 -0
- package/dist/types/src/components/DebugPanel/index.d.ts +2 -0
- package/dist/types/src/components/DebugPanel/index.d.ts.map +1 -0
- package/dist/types/src/components/{ScriptBlock/FrameContainer → FrameContainer}/FrameContainer.d.ts +1 -1
- package/dist/types/src/components/FrameContainer/FrameContainer.d.ts.map +1 -0
- package/dist/types/src/components/FrameContainer/frame.d.ts.map +1 -0
- package/dist/types/src/components/FrameContainer/index.d.ts.map +1 -0
- package/dist/types/src/components/ScriptBlock/ScriptBlock.d.ts +1 -3
- package/dist/types/src/components/ScriptBlock/ScriptBlock.d.ts.map +1 -1
- package/dist/types/src/components/ScriptBlock/ScriptBlock.stories.d.ts +3 -8
- package/dist/types/src/components/ScriptBlock/ScriptBlock.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScriptContainer.d.ts +5 -0
- package/dist/types/src/components/ScriptContainer.d.ts.map +1 -0
- package/dist/types/src/components/ScriptEditor.d.ts +4 -5
- package/dist/types/src/components/ScriptEditor.d.ts.map +1 -1
- package/dist/types/src/components/ScriptSettings/ScriptSettings.d.ts +6 -0
- package/dist/types/src/components/ScriptSettings/ScriptSettings.d.ts.map +1 -0
- package/dist/types/src/components/ScriptSettings/index.d.ts +2 -0
- package/dist/types/src/components/ScriptSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/ScriptSettingsPanel.d.ts +7 -0
- package/dist/types/src/components/ScriptSettingsPanel.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +23 -0
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +14 -0
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/index.d.ts +2 -0
- package/dist/types/src/components/Toolbar/index.d.ts.map +1 -0
- package/dist/types/src/components/{TypescriptEditor.d.ts → TypescriptEditor/TypescriptEditor.d.ts} +1 -2
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts.map +1 -0
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts +6 -0
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/TypescriptEditor/index.d.ts +2 -0
- package/dist/types/src/components/TypescriptEditor/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +4 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/edge/functions.d.ts +7 -0
- package/dist/types/src/edge/functions.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +5 -9
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/templates/chat.d.ts +6 -0
- package/dist/types/src/templates/chat.d.ts.map +1 -0
- package/dist/types/src/templates/chess.d.ts +6 -0
- package/dist/types/src/templates/chess.d.ts.map +1 -0
- package/dist/types/src/templates/echo.d.ts +6 -0
- package/dist/types/src/templates/echo.d.ts.map +1 -0
- package/dist/types/src/templates/email.d.ts +6 -0
- package/dist/types/src/templates/email.d.ts.map +1 -0
- package/dist/types/src/templates/forex.d.ts +6 -0
- package/dist/types/src/templates/forex.d.ts.map +1 -0
- package/dist/types/src/templates.d.ts +8 -0
- package/dist/types/src/templates.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +7 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/script.d.ts +4 -4
- package/dist/types/src/types/types.d.ts +4 -3
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/package.json +59 -64
- package/src/ScriptPlugin.tsx +47 -41
- package/src/bundler/bundler.test.ts +12 -2
- package/src/components/AutomationPanel/AutomationPanel.tsx +101 -0
- package/src/components/AutomationPanel/index.ts +9 -0
- package/src/components/{DebugPanel.tsx → DebugPanel/DebugPanel.tsx} +74 -96
- package/src/components/DebugPanel/index.ts +5 -0
- package/src/components/{ScriptBlock/FrameContainer → FrameContainer}/FrameContainer.tsx +1 -1
- package/src/components/ScriptBlock/ScriptBlock.stories.tsx +15 -14
- package/src/components/ScriptBlock/ScriptBlock.tsx +23 -51
- package/src/components/ScriptContainer.tsx +22 -0
- package/src/components/ScriptEditor.tsx +51 -62
- package/src/components/ScriptSettings/ScriptSettings.tsx +47 -0
- package/src/components/ScriptSettings/index.ts +5 -0
- package/src/components/ScriptSettingsPanel.tsx +105 -0
- package/src/components/Toolbar/Toolbar.stories.tsx +30 -0
- package/src/components/Toolbar/Toolbar.tsx +177 -0
- package/src/components/{ScriptBlock/Splitter → Toolbar}/index.ts +1 -1
- package/src/components/{TypescriptEditor.stories.tsx → TypescriptEditor/TypescriptEditor.stories.tsx} +17 -35
- package/src/components/{TypescriptEditor.tsx → TypescriptEditor/TypescriptEditor.tsx} +1 -3
- package/src/components/TypescriptEditor/index.ts +5 -0
- package/src/components/index.ts +6 -3
- package/src/edge/functions.ts +19 -0
- package/src/meta.ts +16 -0
- package/src/templates/chat.ts +102 -0
- package/src/templates/chess.ts +41 -0
- package/src/templates/echo.ts +15 -0
- package/src/templates/email.ts +38 -0
- package/src/templates/forex.ts +21 -0
- package/src/templates.ts +54 -0
- package/src/translations.ts +7 -0
- package/src/types/types.ts +9 -5
- package/dist/lib/browser/ScriptEditor-5Y3EROG3.mjs +0 -513
- package/dist/lib/browser/ScriptEditor-5Y3EROG3.mjs.map +0 -7
- package/dist/lib/browser/TypescriptEditor-GPE72Y6I.mjs +0 -9
- package/dist/lib/browser/chunk-DL5XQRQM.mjs.map +0 -7
- package/dist/lib/browser/chunk-JBACGDOJ.mjs +0 -21
- package/dist/lib/browser/chunk-JBACGDOJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-MRGOT5RF.mjs +0 -78
- package/dist/lib/browser/chunk-MRGOT5RF.mjs.map +0 -7
- package/dist/lib/node/ScriptEditor-YCUQFWQM.cjs +0 -526
- package/dist/lib/node/ScriptEditor-YCUQFWQM.cjs.map +0 -7
- package/dist/lib/node/TypescriptEditor-M3WWFIP2.cjs.map +0 -7
- package/dist/lib/node/chunk-4GTXIELQ.cjs.map +0 -7
- package/dist/lib/node/chunk-4VMNBXWU.cjs +0 -54
- package/dist/lib/node/chunk-4VMNBXWU.cjs.map +0 -7
- package/dist/lib/node/chunk-IMLDKD5Y.cjs +0 -111
- package/dist/lib/node/chunk-IMLDKD5Y.cjs.map +0 -7
- package/dist/lib/node/chunk-PFH3ROEH.cjs.map +0 -7
- package/dist/types/src/components/DebugPanel.d.ts +0 -9
- package/dist/types/src/components/DebugPanel.d.ts.map +0 -1
- package/dist/types/src/components/ScriptBlock/FrameContainer/FrameContainer.d.ts.map +0 -1
- package/dist/types/src/components/ScriptBlock/FrameContainer/frame.d.ts.map +0 -1
- package/dist/types/src/components/ScriptBlock/FrameContainer/index.d.ts.map +0 -1
- package/dist/types/src/components/ScriptBlock/Splitter/Splitter.d.ts +0 -15
- package/dist/types/src/components/ScriptBlock/Splitter/Splitter.d.ts.map +0 -1
- package/dist/types/src/components/ScriptBlock/Splitter/Splitter.stories.d.ts +0 -13
- package/dist/types/src/components/ScriptBlock/Splitter/Splitter.stories.d.ts.map +0 -1
- package/dist/types/src/components/ScriptBlock/Splitter/index.d.ts +0 -2
- package/dist/types/src/components/ScriptBlock/Splitter/index.d.ts.map +0 -1
- package/dist/types/src/components/Toolbar.d.ts +0 -13
- package/dist/types/src/components/Toolbar.d.ts.map +0 -1
- package/dist/types/src/components/Toolbar.stories.d.ts +0 -14
- package/dist/types/src/components/Toolbar.stories.d.ts.map +0 -1
- package/dist/types/src/components/TypescriptEditor.d.ts.map +0 -1
- package/dist/types/src/components/TypescriptEditor.stories.d.ts +0 -10
- package/dist/types/src/components/TypescriptEditor.stories.d.ts.map +0 -1
- package/src/components/ScriptBlock/Splitter/Splitter.stories.tsx +0 -37
- package/src/components/ScriptBlock/Splitter/Splitter.tsx +0 -52
- package/src/components/Toolbar.stories.tsx +0 -17
- package/src/components/Toolbar.tsx +0 -147
- package/src/meta.tsx +0 -19
- /package/dist/lib/{browser/TypescriptEditor-GPE72Y6I.mjs.map → node-esm/edge/index.mjs.map} +0 -0
- /package/dist/types/src/components/{ScriptBlock/FrameContainer → FrameContainer}/frame.d.ts +0 -0
- /package/dist/types/src/components/{ScriptBlock/FrameContainer → FrameContainer}/index.d.ts +0 -0
- /package/src/components/{ScriptBlock/FrameContainer → FrameContainer}/frame.html +0 -0
- /package/src/components/{ScriptBlock/FrameContainer → FrameContainer}/frame.tsx +0 -0
- /package/src/components/{ScriptBlock/FrameContainer → FrameContainer}/index.ts +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
import { Chess } from 'https://esm.sh/chess.js@0.13.1';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Plays a random move in a chess game.
|
|
10
|
+
*/
|
|
11
|
+
export default async ({
|
|
12
|
+
event: {
|
|
13
|
+
data: { request },
|
|
14
|
+
},
|
|
15
|
+
context: { space },
|
|
16
|
+
}: any) => {
|
|
17
|
+
const {
|
|
18
|
+
data: {
|
|
19
|
+
objects: [gameId],
|
|
20
|
+
player = 'b',
|
|
21
|
+
},
|
|
22
|
+
} = await request.json();
|
|
23
|
+
|
|
24
|
+
const { pgn } = await space.crud.query({ id: gameId }).first();
|
|
25
|
+
const game = new Chess();
|
|
26
|
+
game.load_pgn(pgn);
|
|
27
|
+
if (game.turn() !== player) {
|
|
28
|
+
return new Response('Invalid turn', { status: 409 });
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const moves = game.moves();
|
|
32
|
+
const move = moves[Math.floor(Math.random() * moves.length)];
|
|
33
|
+
if (!move) {
|
|
34
|
+
return new Response('No legal moves', { status: 406 });
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
game.move(move);
|
|
38
|
+
const newPgn = game.pgn();
|
|
39
|
+
await space.crud.update({ id: gameId }, { pgn: newPgn });
|
|
40
|
+
return new Response(game.ascii());
|
|
41
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Echos the request data.
|
|
7
|
+
*/
|
|
8
|
+
export default async ({
|
|
9
|
+
event: {
|
|
10
|
+
data: { request },
|
|
11
|
+
},
|
|
12
|
+
}: any) => {
|
|
13
|
+
const data = await request.json();
|
|
14
|
+
return new Response(JSON.stringify(data ?? {}), { headers: { 'Content-Type': 'application/json' } });
|
|
15
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Stores a message into ECHO Mailbox object.
|
|
7
|
+
*/
|
|
8
|
+
export default async ({
|
|
9
|
+
event: {
|
|
10
|
+
data: { request },
|
|
11
|
+
},
|
|
12
|
+
context: { space },
|
|
13
|
+
}: any) => {
|
|
14
|
+
const {
|
|
15
|
+
data: {
|
|
16
|
+
objects: [message],
|
|
17
|
+
},
|
|
18
|
+
} = await request.json();
|
|
19
|
+
|
|
20
|
+
const mailbox = await space.crud.query({ __typename: 'dxos.org/type/MailboxType' }).first();
|
|
21
|
+
if (!mailbox) {
|
|
22
|
+
return new Response('Mailbox not found.', { status: 500 });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
await space.crud.push(
|
|
26
|
+
{ id: mailbox.id },
|
|
27
|
+
{
|
|
28
|
+
sender: { email: message.from },
|
|
29
|
+
timestamp: new Date(message.created).toISOString(),
|
|
30
|
+
text: message.body,
|
|
31
|
+
properties: {
|
|
32
|
+
subject: message.subject,
|
|
33
|
+
to: [{ email: message.to }],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
);
|
|
37
|
+
return new Response(JSON.stringify(message));
|
|
38
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Returns the exchange rate between two currencies.
|
|
7
|
+
*/
|
|
8
|
+
export default async ({
|
|
9
|
+
event: {
|
|
10
|
+
data: { request },
|
|
11
|
+
},
|
|
12
|
+
}: any) => {
|
|
13
|
+
const { args: [from = 'EUR', to = 'USD'] = [] } = await request.json();
|
|
14
|
+
|
|
15
|
+
const res = await fetch(`https://free.ratesdb.com/v1/rates?from=${from}&to=${to}`);
|
|
16
|
+
const {
|
|
17
|
+
data: { rates },
|
|
18
|
+
} = await res.json();
|
|
19
|
+
|
|
20
|
+
return new Response(rates[to].toString());
|
|
21
|
+
};
|
package/src/templates.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
import chat from './templates/chat.ts?raw';
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
import chess from './templates/chess.ts?raw';
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
import echo from './templates/echo.ts?raw';
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
import email from './templates/email.ts?raw';
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
import forex from './templates/forex.ts?raw';
|
|
15
|
+
|
|
16
|
+
const removeHeader = (str: string) => str.split('\n').slice(4).join('\n');
|
|
17
|
+
|
|
18
|
+
export type Template = {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
source: string;
|
|
22
|
+
presetId?: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const templates: Template[] = [
|
|
26
|
+
{
|
|
27
|
+
id: 'dxos.org/script/echo',
|
|
28
|
+
name: 'Echo',
|
|
29
|
+
source: removeHeader(echo),
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 'dxos.org/script/forex',
|
|
33
|
+
name: 'Forex',
|
|
34
|
+
source: removeHeader(forex),
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: 'dxos.org/script/gpt',
|
|
38
|
+
name: 'Gpt',
|
|
39
|
+
source: removeHeader(chat),
|
|
40
|
+
presetId: 'dxos.org/function/gpt',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 'dxos.org/script/chess',
|
|
44
|
+
name: 'Chess',
|
|
45
|
+
source: removeHeader(chess),
|
|
46
|
+
presetId: 'dxos.org/function/chess',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: 'dxos.org/script/email',
|
|
50
|
+
name: 'Email',
|
|
51
|
+
source: removeHeader(email),
|
|
52
|
+
presetId: 'dxos.org/function/email',
|
|
53
|
+
},
|
|
54
|
+
];
|
package/src/translations.ts
CHANGED
|
@@ -20,6 +20,13 @@ export default [
|
|
|
20
20
|
'copy link label': 'Copy function link',
|
|
21
21
|
'format label': 'Format',
|
|
22
22
|
'toggle details label': 'Toggle details panel',
|
|
23
|
+
'authenticate action label': 'Authenticate functions service',
|
|
24
|
+
'authenticate button label': 'Authenticate',
|
|
25
|
+
'name label': 'Name',
|
|
26
|
+
'remote function settings heading': 'Remote Function',
|
|
27
|
+
'function url label': 'Invocation URL',
|
|
28
|
+
'function binding label': 'Function binding',
|
|
29
|
+
'function binding placeholder': 'BINDING',
|
|
23
30
|
},
|
|
24
31
|
},
|
|
25
32
|
},
|
package/src/types/types.ts
CHANGED
|
@@ -6,11 +6,12 @@ import type {
|
|
|
6
6
|
GraphBuilderProvides,
|
|
7
7
|
IntentResolverProvides,
|
|
8
8
|
MetadataRecordsProvides,
|
|
9
|
+
SettingsProvides,
|
|
9
10
|
SurfaceProvides,
|
|
10
11
|
TranslationsProvides,
|
|
11
12
|
} from '@dxos/app-framework';
|
|
12
13
|
import { type SchemaProvides } from '@dxos/plugin-client';
|
|
13
|
-
import { type
|
|
14
|
+
import { type SpaceInitProvides } from '@dxos/plugin-space';
|
|
14
15
|
|
|
15
16
|
import { SCRIPT_PLUGIN } from '../meta';
|
|
16
17
|
|
|
@@ -18,10 +19,13 @@ export enum ScriptAction {
|
|
|
18
19
|
CREATE = `${SCRIPT_PLUGIN}/create`,
|
|
19
20
|
}
|
|
20
21
|
|
|
21
|
-
export type
|
|
22
|
+
export type ScriptSettingsProps = {};
|
|
23
|
+
|
|
24
|
+
export type ScriptPluginProvides = GraphBuilderProvides &
|
|
22
25
|
IntentResolverProvides &
|
|
23
|
-
GraphBuilderProvides &
|
|
24
26
|
MetadataRecordsProvides &
|
|
25
|
-
TranslationsProvides &
|
|
26
27
|
SchemaProvides &
|
|
27
|
-
|
|
28
|
+
SettingsProvides<ScriptSettingsProps> &
|
|
29
|
+
SpaceInitProvides &
|
|
30
|
+
SurfaceProvides &
|
|
31
|
+
TranslationsProvides;
|