@dxos/plugin-script 0.6.10-main.e92b5eb → 0.6.10-staging.014d6d3
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 +45 -0
- package/dist/lib/browser/ScriptEditor-WNCGR5OU.mjs +452 -0
- package/dist/lib/browser/ScriptEditor-WNCGR5OU.mjs.map +7 -0
- package/dist/lib/browser/{TypescriptEditor-PIRIDDUS.mjs → TypescriptEditor-XTGRVCMY.mjs} +2 -2
- package/dist/lib/browser/{chunk-ISMNAD3P.mjs → chunk-DL5XQRQM.mjs} +13 -7
- package/dist/lib/browser/{chunk-ISMNAD3P.mjs.map → chunk-DL5XQRQM.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-D4O723CR.mjs → chunk-DX5CSOBP.mjs} +22 -5
- package/dist/lib/browser/chunk-DX5CSOBP.mjs.map +7 -0
- package/dist/lib/browser/chunk-RHEZ5LUU.mjs +229 -0
- package/dist/lib/browser/chunk-RHEZ5LUU.mjs.map +7 -0
- package/dist/lib/browser/edge/index.mjs +1 -1
- package/dist/lib/browser/index.mjs +88 -195
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/ScriptEditor-RR7AVOQL.cjs +465 -0
- package/dist/lib/node/ScriptEditor-RR7AVOQL.cjs.map +7 -0
- package/dist/lib/node/{TypescriptEditor-OTWJUIWB.cjs → TypescriptEditor-CRONCQSI.cjs} +7 -7
- package/dist/lib/node/{TypescriptEditor-OTWJUIWB.cjs.map → TypescriptEditor-CRONCQSI.cjs.map} +2 -2
- package/dist/lib/node/chunk-4GTXIELQ.cjs +252 -0
- package/dist/lib/node/chunk-4GTXIELQ.cjs.map +7 -0
- package/dist/lib/node/{chunk-HN3AVLUL.cjs → chunk-PFH3ROEH.cjs} +16 -10
- package/dist/lib/node/{chunk-HN3AVLUL.cjs.map → chunk-PFH3ROEH.cjs.map} +3 -3
- package/dist/lib/node/{chunk-ITLHJMWP.cjs → chunk-RXI576K3.cjs} +24 -7
- package/dist/lib/node/chunk-RXI576K3.cjs.map +7 -0
- package/dist/lib/node/edge/index.cjs +8 -8
- package/dist/lib/node/edge/index.cjs.map +1 -1
- package/dist/lib/node/index.cjs +85 -194
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/types/src/ScriptPlugin.d.ts +1 -4
- package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
- package/dist/types/src/bundler/bundler.d.ts +39 -0
- package/dist/types/src/bundler/bundler.d.ts.map +1 -0
- package/dist/types/src/bundler/bundler.test.d.ts +2 -0
- package/dist/types/src/bundler/bundler.test.d.ts.map +1 -0
- package/dist/types/src/bundler/index.d.ts +2 -0
- package/dist/types/src/bundler/index.d.ts.map +1 -0
- package/dist/types/src/compiler/compiler.browser.test.d.ts +2 -0
- package/dist/types/src/compiler/compiler.browser.test.d.ts.map +1 -0
- package/dist/types/src/compiler/compiler.d.ts +9 -34
- package/dist/types/src/compiler/compiler.d.ts.map +1 -1
- package/dist/types/src/components/DetailsPanel.d.ts +9 -0
- package/dist/types/src/components/DetailsPanel.d.ts.map +1 -0
- package/dist/types/src/components/ScriptBlock/FrameContainer/FrameContainer.d.ts +2 -2
- package/dist/types/src/components/ScriptBlock/FrameContainer/FrameContainer.d.ts.map +1 -1
- package/dist/types/src/components/ScriptBlock/ScriptBlock.d.ts.map +1 -1
- package/dist/types/src/components/ScriptEditor.d.ts +3 -2
- package/dist/types/src/components/ScriptEditor.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar.d.ts +9 -7
- package/dist/types/src/components/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar.stories.d.ts +1 -1
- package/dist/types/src/components/TypescriptEditor.d.ts +3 -1
- package/dist/types/src/components/TypescriptEditor.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor.stories.d.ts +1 -1
- package/dist/types/src/components/index.d.ts +2 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/data/templates.md.d.ts +3 -0
- package/dist/types/src/data/templates.md.d.ts.map +1 -0
- package/dist/types/src/edge/functions.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +3 -2
- package/dist/types/src/translations.d.ts.map +1 -1
- package/package.json +38 -33
- package/src/ScriptPlugin.tsx +29 -10
- package/src/bundler/bundler.test.ts +44 -0
- package/src/bundler/bundler.ts +246 -0
- package/src/bundler/index.ts +5 -0
- package/src/compiler/compiler.browser.test.ts +18 -0
- package/src/compiler/compiler.ts +31 -190
- package/src/compiler/index.ts +1 -1
- package/src/components/DetailsPanel.tsx +218 -0
- package/src/components/ScriptBlock/FrameContainer/FrameContainer.tsx +2 -2
- package/src/components/ScriptBlock/ScriptBlock.tsx +10 -7
- package/src/components/ScriptEditor.tsx +71 -13
- package/src/components/Toolbar.tsx +69 -91
- package/src/components/TypescriptEditor.tsx +18 -4
- package/src/data/templates.md.ts +44 -0
- package/src/edge/functions.ts +9 -2
- package/src/index.ts +1 -0
- package/src/translations.ts +4 -3
- package/dist/lib/browser/ScriptEditor-MSQDR6D7.mjs +0 -241
- package/dist/lib/browser/ScriptEditor-MSQDR6D7.mjs.map +0 -7
- package/dist/lib/browser/chunk-D4O723CR.mjs.map +0 -7
- package/dist/lib/node/ScriptEditor-KBSACFYK.cjs +0 -258
- package/dist/lib/node/ScriptEditor-KBSACFYK.cjs.map +0 -7
- package/dist/lib/node/chunk-ITLHJMWP.cjs.map +0 -7
- package/dist/types/src/compiler/compiler.test.d.ts +0 -2
- package/dist/types/src/compiler/compiler.test.d.ts.map +0 -1
- package/src/compiler/compiler.test.ts +0 -17
- /package/dist/lib/browser/{TypescriptEditor-PIRIDDUS.mjs.map → TypescriptEditor-XTGRVCMY.mjs.map} +0 -0
package/dist/lib/node/index.cjs
CHANGED
|
@@ -28,6 +28,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var node_exports = {};
|
|
30
30
|
__export(node_exports, {
|
|
31
|
+
Bundler: () => import_chunk_4GTXIELQ.Bundler,
|
|
31
32
|
Compiler: () => Compiler,
|
|
32
33
|
FunctionType: () => import_chunk_VW2POILW.FunctionType,
|
|
33
34
|
ScriptAction: () => import_chunk_VW2POILW.ScriptAction,
|
|
@@ -36,12 +37,14 @@ __export(node_exports, {
|
|
|
36
37
|
ScriptType: () => import_chunk_VW2POILW.ScriptType,
|
|
37
38
|
TypescriptEditor: () => TypescriptEditor,
|
|
38
39
|
default: () => src_default,
|
|
39
|
-
|
|
40
|
+
initializeBundler: () => import_chunk_4GTXIELQ.initializeBundler
|
|
40
41
|
});
|
|
41
42
|
module.exports = __toCommonJS(node_exports);
|
|
43
|
+
var import_chunk_4GTXIELQ = require("./chunk-4GTXIELQ.cjs");
|
|
42
44
|
var import_chunk_VW2POILW = require("./chunk-VW2POILW.cjs");
|
|
43
45
|
var import_chunk_4VMNBXWU = require("./chunk-4VMNBXWU.cjs");
|
|
44
46
|
var import_react = require("@phosphor-icons/react");
|
|
47
|
+
var import_esbuild = __toESM(require("esbuild-wasm/esbuild.wasm?url"));
|
|
45
48
|
var import_react2 = __toESM(require("react"));
|
|
46
49
|
var import_app_framework = require("@dxos/app-framework");
|
|
47
50
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
@@ -50,12 +53,60 @@ var import_plugin_graph = require("@dxos/plugin-graph");
|
|
|
50
53
|
var import_types = require("@dxos/plugin-markdown/types");
|
|
51
54
|
var import_plugin_space = require("@dxos/plugin-space");
|
|
52
55
|
var import_echo = require("@dxos/react-client/echo");
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var import_crypto = require("@dxos/crypto");
|
|
56
|
+
var import_vfs = require("@typescript/vfs");
|
|
57
|
+
var import_typescript = __toESM(require("typescript"));
|
|
56
58
|
var import_invariant = require("@dxos/invariant");
|
|
57
|
-
var
|
|
58
|
-
var
|
|
59
|
+
var import_react3 = __toESM(require("react"));
|
|
60
|
+
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/experimental/plugin-script/src/compiler/compiler.ts";
|
|
61
|
+
var defaultOptions = {
|
|
62
|
+
lib: [
|
|
63
|
+
"DOM",
|
|
64
|
+
"es2022"
|
|
65
|
+
],
|
|
66
|
+
target: import_typescript.default.ScriptTarget.ES2022
|
|
67
|
+
};
|
|
68
|
+
var Compiler = class {
|
|
69
|
+
constructor(_options = defaultOptions) {
|
|
70
|
+
this._options = _options;
|
|
71
|
+
}
|
|
72
|
+
async initialize() {
|
|
73
|
+
if (this._env) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
this._fsMap = await (0, import_vfs.createDefaultMapFromCDN)(this._options, "5.5.4", true, import_typescript.default);
|
|
77
|
+
const system = (0, import_vfs.createSystem)(this._fsMap);
|
|
78
|
+
this._env = (0, import_vfs.createVirtualTypeScriptEnvironment)(system, [], import_typescript.default, this._options);
|
|
79
|
+
}
|
|
80
|
+
get environment() {
|
|
81
|
+
(0, import_invariant.invariant)(this._env, "Compiler environment not initialized.", {
|
|
82
|
+
F: __dxlog_file,
|
|
83
|
+
L: 39,
|
|
84
|
+
S: this,
|
|
85
|
+
A: [
|
|
86
|
+
"this._env",
|
|
87
|
+
"'Compiler environment not initialized.'"
|
|
88
|
+
]
|
|
89
|
+
});
|
|
90
|
+
return this._env;
|
|
91
|
+
}
|
|
92
|
+
setFile(fileName, content) {
|
|
93
|
+
(0, import_invariant.invariant)(this._fsMap, "File system map not initialized.", {
|
|
94
|
+
F: __dxlog_file,
|
|
95
|
+
L: 44,
|
|
96
|
+
S: this,
|
|
97
|
+
A: [
|
|
98
|
+
"this._fsMap",
|
|
99
|
+
"'File system map not initialized.'"
|
|
100
|
+
]
|
|
101
|
+
});
|
|
102
|
+
this.environment.createFile(fileName, content);
|
|
103
|
+
}
|
|
104
|
+
compile(fileName) {
|
|
105
|
+
return this.environment.languageService.getEmitOutput(fileName);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
var ScriptEditor = import_react3.default.lazy(() => import("./ScriptEditor-RR7AVOQL.cjs"));
|
|
109
|
+
var TypescriptEditor = import_react3.default.lazy(() => import("./TypescriptEditor-CRONCQSI.cjs"));
|
|
59
110
|
var translations_default = [
|
|
60
111
|
{
|
|
61
112
|
"en-US": {
|
|
@@ -64,20 +115,34 @@ var translations_default = [
|
|
|
64
115
|
"object title placeholder": "New script",
|
|
65
116
|
"create object label": "Create script",
|
|
66
117
|
"create stack section label": "Create script",
|
|
67
|
-
"binding
|
|
68
|
-
"
|
|
69
|
-
"edit binding label": "Edit binding",
|
|
118
|
+
"binding placeholder": "Function name",
|
|
119
|
+
"function request placeholder": "Function request",
|
|
70
120
|
"deploy label": "Deploy",
|
|
71
121
|
"deployed label": "Current version of the script is deployed",
|
|
72
122
|
"upload failed label": "Upload failed",
|
|
73
|
-
"copy link label": "Copy function link"
|
|
123
|
+
"copy link label": "Copy function link",
|
|
124
|
+
"format label": "Format",
|
|
125
|
+
"toggle details label": "Toggle details panel"
|
|
74
126
|
}
|
|
75
127
|
}
|
|
76
128
|
}
|
|
77
129
|
];
|
|
78
|
-
var ScriptPlugin = (
|
|
130
|
+
var ScriptPlugin = () => {
|
|
131
|
+
const compiler = new Compiler();
|
|
79
132
|
return {
|
|
80
133
|
meta: import_chunk_4VMNBXWU.meta_default,
|
|
134
|
+
initialize: async () => {
|
|
135
|
+
await compiler.initialize();
|
|
136
|
+
compiler.setFile("/src/typings.d.ts", "declare module 'https://*';");
|
|
137
|
+
compiler.setFile("/src/runtime.ts", `
|
|
138
|
+
export const Filter: any = {};
|
|
139
|
+
export type FunctionHandler = ({ event, context }: { event: any; context: any }) => Promise<Response>;
|
|
140
|
+
export const functionHandler = (handler: FunctionHandler) => handler;
|
|
141
|
+
`);
|
|
142
|
+
await (0, import_chunk_4GTXIELQ.initializeBundler)({
|
|
143
|
+
wasmUrl: import_esbuild.default
|
|
144
|
+
});
|
|
145
|
+
},
|
|
81
146
|
provides: {
|
|
82
147
|
metadata: {
|
|
83
148
|
records: {
|
|
@@ -195,6 +260,7 @@ var ScriptPlugin = ({ containerUrl }) => {
|
|
|
195
260
|
}
|
|
196
261
|
if (data.object instanceof import_chunk_VW2POILW.ScriptType) {
|
|
197
262
|
return /* @__PURE__ */ import_react2.default.createElement(ScriptEditor, {
|
|
263
|
+
env: compiler.environment,
|
|
198
264
|
script: data.object,
|
|
199
265
|
role
|
|
200
266
|
});
|
|
@@ -221,193 +287,18 @@ var ScriptPlugin = ({ containerUrl }) => {
|
|
|
221
287
|
};
|
|
222
288
|
};
|
|
223
289
|
var example = [
|
|
224
|
-
"export default {",
|
|
225
|
-
"
|
|
226
|
-
"
|
|
227
|
-
"
|
|
228
|
-
"
|
|
290
|
+
"export default async ({ ",
|
|
291
|
+
" event: { data: { request } },",
|
|
292
|
+
" context: { space, ai } ",
|
|
293
|
+
"}) => {",
|
|
294
|
+
" return new Response('Hello World, from ScriptPlugin!');",
|
|
295
|
+
"};",
|
|
229
296
|
""
|
|
230
297
|
].join("\n");
|
|
231
|
-
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/experimental/plugin-script/src/compiler/compiler.ts";
|
|
232
|
-
var initialized;
|
|
233
|
-
var initializeCompiler = async (options) => {
|
|
234
|
-
await (initialized ??= (0, import_esbuild_wasm.initialize)({
|
|
235
|
-
wasmURL: options.wasmURL
|
|
236
|
-
}));
|
|
237
|
-
};
|
|
238
|
-
var Compiler = class {
|
|
239
|
-
constructor(_options) {
|
|
240
|
-
this._options = _options;
|
|
241
|
-
}
|
|
242
|
-
async compile(source) {
|
|
243
|
-
const { providedModules, ...options } = this._options;
|
|
244
|
-
const createResult = async (result) => {
|
|
245
|
-
return {
|
|
246
|
-
timestamp: Date.now(),
|
|
247
|
-
sourceHash: Buffer.from(await import_crypto.subtleCrypto.digest("SHA-256", Buffer.from(source))),
|
|
248
|
-
...result
|
|
249
|
-
};
|
|
250
|
-
};
|
|
251
|
-
if (this._options.platform === "browser") {
|
|
252
|
-
(0, import_invariant.invariant)(initialized, "Compiler not initialized.", {
|
|
253
|
-
F: __dxlog_file,
|
|
254
|
-
L: 55,
|
|
255
|
-
S: this,
|
|
256
|
-
A: [
|
|
257
|
-
"initialized",
|
|
258
|
-
"'Compiler not initialized.'"
|
|
259
|
-
]
|
|
260
|
-
});
|
|
261
|
-
await initialized;
|
|
262
|
-
}
|
|
263
|
-
const imports = analyzeSourceFileImports(source);
|
|
264
|
-
try {
|
|
265
|
-
const result = await (0, import_esbuild_wasm.build)({
|
|
266
|
-
...options,
|
|
267
|
-
metafile: true,
|
|
268
|
-
write: false,
|
|
269
|
-
entryPoints: [
|
|
270
|
-
"memory:main.tsx"
|
|
271
|
-
],
|
|
272
|
-
bundle: true,
|
|
273
|
-
format: "esm",
|
|
274
|
-
plugins: [
|
|
275
|
-
{
|
|
276
|
-
name: "memory",
|
|
277
|
-
setup: (build2) => {
|
|
278
|
-
build2.onResolve({
|
|
279
|
-
filter: /^memory:/
|
|
280
|
-
}, ({ path }) => {
|
|
281
|
-
return {
|
|
282
|
-
path: path.split(":")[1],
|
|
283
|
-
namespace: "memory"
|
|
284
|
-
};
|
|
285
|
-
});
|
|
286
|
-
build2.onLoad({
|
|
287
|
-
filter: /.*/,
|
|
288
|
-
namespace: "memory"
|
|
289
|
-
}, ({ path }) => {
|
|
290
|
-
const imports2 = [
|
|
291
|
-
"import React from 'react';"
|
|
292
|
-
];
|
|
293
|
-
if (path === "main.tsx") {
|
|
294
|
-
return {
|
|
295
|
-
contents: [
|
|
296
|
-
...imports2,
|
|
297
|
-
source
|
|
298
|
-
].join("\n"),
|
|
299
|
-
loader: "tsx"
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
});
|
|
303
|
-
for (const module2 of providedModules) {
|
|
304
|
-
build2.onResolve({
|
|
305
|
-
filter: new RegExp(`^${module2}$`)
|
|
306
|
-
}, ({ path }) => {
|
|
307
|
-
return {
|
|
308
|
-
path,
|
|
309
|
-
namespace: "injected-module"
|
|
310
|
-
};
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
build2.onLoad({
|
|
314
|
-
filter: /.*/,
|
|
315
|
-
namespace: "injected-module"
|
|
316
|
-
}, ({ path }) => {
|
|
317
|
-
const namedImports = imports.find((entry) => entry.moduleIdentifier === path)?.namedImports ?? [];
|
|
318
|
-
return {
|
|
319
|
-
contents: `
|
|
320
|
-
const { ${namedImports.join(",")} } = window.__DXOS_SANDBOX_MODULES__[${JSON.stringify(path)}];
|
|
321
|
-
export { ${namedImports.join(",")} };
|
|
322
|
-
export default window.__DXOS_SANDBOX_MODULES__[${JSON.stringify(path)}].default;
|
|
323
|
-
`,
|
|
324
|
-
loader: "tsx"
|
|
325
|
-
};
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
]
|
|
330
|
-
});
|
|
331
|
-
return await createResult({
|
|
332
|
-
imports: this.analyzeImports(result),
|
|
333
|
-
bundle: result.outputFiles[0].text
|
|
334
|
-
});
|
|
335
|
-
} catch (err) {
|
|
336
|
-
return await createResult({
|
|
337
|
-
error: err
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
// TODO(dmaretskyi): In the future we can replace the compiler with SWC with plugins running in WASM.
|
|
342
|
-
analyzeImports(result) {
|
|
343
|
-
(0, import_invariant.invariant)(result.outputFiles, void 0, {
|
|
344
|
-
F: __dxlog_file,
|
|
345
|
-
L: 121,
|
|
346
|
-
S: this,
|
|
347
|
-
A: [
|
|
348
|
-
"result.outputFiles",
|
|
349
|
-
""
|
|
350
|
-
]
|
|
351
|
-
});
|
|
352
|
-
const parsedImports = allMatches(IMPORT_REGEX, result.outputFiles[0].text);
|
|
353
|
-
return Object.values(result.metafile.outputs)[0].imports.map((entry) => {
|
|
354
|
-
const namedImports = [];
|
|
355
|
-
const parsedImport = parsedImports.find((capture) => capture?.[4] === entry.path);
|
|
356
|
-
if (parsedImport?.[2]) {
|
|
357
|
-
NAMED_IMPORTS_REGEX.lastIndex = 0;
|
|
358
|
-
const namedImportsMatch = NAMED_IMPORTS_REGEX.exec(parsedImport[2]);
|
|
359
|
-
if (namedImportsMatch) {
|
|
360
|
-
namedImportsMatch[1].split(",").forEach((importName) => {
|
|
361
|
-
namedImports.push(importName.trim());
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
return {
|
|
366
|
-
moduleUrl: entry.path,
|
|
367
|
-
defaultImport: !!parsedImport?.[1],
|
|
368
|
-
namedImports
|
|
369
|
-
};
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
analyzeSourceFileImports(code) {
|
|
373
|
-
const parsedImports = allMatches(IMPORT_REGEX, code);
|
|
374
|
-
return parsedImports.map((capture) => {
|
|
375
|
-
return {
|
|
376
|
-
defaultImportName: capture[1],
|
|
377
|
-
namedImports: capture[2]?.split(",").map((importName) => importName.trim()),
|
|
378
|
-
wildcardImportName: capture[3],
|
|
379
|
-
moduleIdentifier: capture[4],
|
|
380
|
-
quotes: capture[5]
|
|
381
|
-
};
|
|
382
|
-
});
|
|
383
|
-
}
|
|
384
|
-
};
|
|
385
|
-
var IMPORT_REGEX = /import(?:(?:(?:[ \n\t]+([^ *\n\t{},]+)[ \n\t]*(?:,|[ \n\t]+))?([ \n\t]*{(?:[ \n\t]*[^ \n\t"'{}]+[ \n\t]*,?)+})?[ \n\t]*)|[ \n\t]*\*[ \n\t]*as[ \n\t]+([^ \n\t{}]+)[ \n\t]+)from[ \n\t]*(?:['"])([^'"\n]+)(['"])/gm;
|
|
386
|
-
var NAMED_IMPORTS_REGEX = /[ \n\t]*{((?:[ \n\t]*[^ \n\t"'{}]+[ \n\t]*,?)+)}[ \n\t]*/gm;
|
|
387
|
-
var allMatches = (regex, str) => {
|
|
388
|
-
regex.lastIndex = 0;
|
|
389
|
-
let match;
|
|
390
|
-
const matches = [];
|
|
391
|
-
while (match = regex.exec(str)) {
|
|
392
|
-
matches.push(match);
|
|
393
|
-
}
|
|
394
|
-
return matches;
|
|
395
|
-
};
|
|
396
|
-
var analyzeSourceFileImports = (code) => {
|
|
397
|
-
const parsedImports = allMatches(IMPORT_REGEX, code);
|
|
398
|
-
return parsedImports.map((capture) => {
|
|
399
|
-
return {
|
|
400
|
-
defaultImportName: capture[1],
|
|
401
|
-
namedImports: capture[2]?.trim().slice(1, -1).split(",").map((importName) => importName.trim()),
|
|
402
|
-
wildcardImportName: capture[3],
|
|
403
|
-
moduleIdentifier: capture[4],
|
|
404
|
-
quotes: capture[5]
|
|
405
|
-
};
|
|
406
|
-
});
|
|
407
|
-
};
|
|
408
298
|
var src_default = ScriptPlugin;
|
|
409
299
|
// Annotate the CommonJS export names for ESM import in node:
|
|
410
300
|
0 && (module.exports = {
|
|
301
|
+
Bundler,
|
|
411
302
|
Compiler,
|
|
412
303
|
FunctionType,
|
|
413
304
|
ScriptAction,
|
|
@@ -415,6 +306,6 @@ var src_default = ScriptPlugin;
|
|
|
415
306
|
ScriptPlugin,
|
|
416
307
|
ScriptType,
|
|
417
308
|
TypescriptEditor,
|
|
418
|
-
|
|
309
|
+
initializeBundler
|
|
419
310
|
});
|
|
420
311
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/ScriptPlugin.tsx", "../../../src/
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Code, type IconProps } from '@phosphor-icons/react';\nimport React from 'react';\n\nimport { parseIntentPlugin, type PluginDefinition, resolvePlugin, NavigationAction } from '@dxos/app-framework';\nimport { create } from '@dxos/echo-schema';\nimport { parseClientPlugin } from '@dxos/plugin-client';\nimport { type ActionGroup, createExtension, isActionGroup } from '@dxos/plugin-graph';\nimport { TextType } from '@dxos/plugin-markdown/types';\nimport { SpaceAction } from '@dxos/plugin-space';\nimport { loadObjectReferences } from '@dxos/react-client/echo';\n\nimport { ScriptEditor } from './components';\nimport meta, { SCRIPT_PLUGIN } from './meta';\nimport translations from './translations';\nimport { FunctionType, ScriptType } from './types';\nimport { ScriptAction, type ScriptPluginProvides } from './types';\n\nexport type ScriptPluginProps = {\n containerUrl: string;\n};\n\nexport const ScriptPlugin = ({ containerUrl }: ScriptPluginProps): PluginDefinition<ScriptPluginProvides> => {\n return {\n meta,\n provides: {\n metadata: {\n records: {\n [ScriptType.typename]: {\n placeholder: ['object title placeholder', { ns: SCRIPT_PLUGIN }],\n icon: (props: IconProps) => <Code {...props} />,\n iconSymbol: 'ph--code--regular',\n // TODO(wittjosiah): Move out of metadata.\n loadReferences: (script: ScriptType) => loadObjectReferences(script, (script) => [script.source]),\n },\n },\n },\n translations,\n echo: {\n schema: [ScriptType, FunctionType],\n },\n graph: {\n builder: (plugins) => {\n const client = resolvePlugin(plugins, parseClientPlugin)?.provides.client;\n const dispatch = resolvePlugin(plugins, parseIntentPlugin)?.provides.intent.dispatch;\n if (!client || !dispatch) {\n return [];\n }\n\n return createExtension({\n id: ScriptAction.CREATE,\n filter: (node): node is ActionGroup => isActionGroup(node) && node.id.startsWith(SpaceAction.ADD_OBJECT),\n actions: ({ node }) => {\n const id = node.id.split('/').at(-1);\n const [spaceId, objectId] = id?.split(':') ?? [];\n const space = client.spaces.get().find((space) => space.id === spaceId);\n const object = objectId && space?.db.getObjectById(objectId);\n const target = objectId ? object : space;\n if (!target) {\n return;\n }\n\n return [\n {\n id: `${SCRIPT_PLUGIN}/create/${node.id}`,\n data: async () => {\n await dispatch([\n { plugin: SCRIPT_PLUGIN, action: ScriptAction.CREATE },\n { action: SpaceAction.ADD_OBJECT, data: { target } },\n { action: NavigationAction.OPEN },\n ]);\n },\n properties: {\n label: ['create object label', { ns: SCRIPT_PLUGIN }],\n icon: (props: IconProps) => <Code {...props} />,\n iconSymbol: 'ph--code--regular',\n testId: 'scriptPlugin.createObject',\n },\n },\n ];\n },\n });\n },\n },\n stack: {\n creators: [\n {\n id: 'create-stack-section-script',\n testId: 'scriptPlugin.createSectionSpaceScript',\n type: ['plugin name', { ns: SCRIPT_PLUGIN }],\n label: ['create stack section label', { ns: SCRIPT_PLUGIN }],\n icon: (props: any) => <Code {...props} />,\n intent: { plugin: SCRIPT_PLUGIN, action: ScriptAction.CREATE },\n },\n ],\n },\n surface: {\n component: ({ data, role }) => {\n if (role && !['article', 'section'].includes(role)) {\n return null;\n }\n\n if (data.object instanceof ScriptType) {\n return <ScriptEditor script={data.object} role={role} />;\n }\n\n return null;\n },\n },\n intent: {\n resolver: (intent) => {\n switch (intent.action) {\n case ScriptAction.CREATE: {\n return { data: create(ScriptType, { source: create(TextType, { content: example }) }) };\n }\n }\n },\n },\n },\n };\n};\n\n// TODO(burdon): Import.\nconst example = [\n 'export default {',\n ' async fetch(request, env, ctx) {',\n \" return new Response('Hello World, from ScriptPlugin!');\",\n ' }',\n '}',\n '',\n].join('\\n');\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nexport const ScriptEditor = React.lazy(() => import('./ScriptEditor'));\nexport const TypescriptEditor = React.lazy(() => import('./TypescriptEditor'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { SCRIPT_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [SCRIPT_PLUGIN]: {\n 'plugin name': 'Scripts',\n 'object title placeholder': 'New script',\n 'create object label': 'Create script',\n 'create stack section label': 'Create script',\n 'binding label': 'Binding',\n 'binding placeholder': 'Enter binding',\n 'edit binding label': 'Edit binding',\n 'deploy label': 'Deploy',\n 'deployed label': 'Current version of the script is deployed',\n 'upload failed label': 'Upload failed',\n 'copy link label': 'Copy function link',\n },\n },\n },\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type BuildOptions } from 'esbuild';\nimport { build, initialize, type BuildResult } from 'esbuild-wasm';\n\nimport { subtleCrypto } from '@dxos/crypto';\nimport { invariant } from '@dxos/invariant';\n\nexport type Import = {\n moduleUrl: string;\n defaultImport: boolean;\n namedImports: string[];\n};\n\nexport type CompilerResult = {\n timestamp: number;\n sourceHash: Buffer;\n imports?: Import[];\n bundle?: string;\n error?: any;\n};\n\nexport type CompilerOptions = {\n platform: BuildOptions['platform'];\n providedModules: string[];\n};\n\nlet initialized: Promise<void>;\nexport const initializeCompiler = async (options: { wasmURL: string }) => {\n await (initialized ??= initialize({\n wasmURL: options.wasmURL,\n }));\n};\n\n/**\n * ESBuild compiler.\n */\nexport class Compiler {\n constructor(private readonly _options: CompilerOptions) {}\n\n async compile(source: string): Promise<CompilerResult> {\n const { providedModules, ...options } = this._options;\n\n const createResult = async (result?: Partial<CompilerResult>) => {\n return {\n timestamp: Date.now(),\n sourceHash: Buffer.from(await subtleCrypto.digest('SHA-256', Buffer.from(source))),\n ...result,\n };\n };\n\n if (this._options.platform === 'browser') {\n invariant(initialized, 'Compiler not initialized.');\n await initialized;\n }\n\n const imports = analyzeSourceFileImports(source);\n\n // https://esbuild.github.io/api/#build\n try {\n const result = await build({\n ...options,\n metafile: true,\n write: false,\n entryPoints: ['memory:main.tsx'],\n bundle: true,\n format: 'esm',\n plugins: [\n {\n name: 'memory',\n setup: (build) => {\n build.onResolve({ filter: /^memory:/ }, ({ path }) => {\n return { path: path.split(':')[1], namespace: 'memory' };\n });\n\n build.onLoad({ filter: /.*/, namespace: 'memory' }, ({ path }) => {\n const imports = [\"import React from 'react';\"];\n if (path === 'main.tsx') {\n return {\n contents: [...imports, source].join('\\n'),\n loader: 'tsx',\n };\n }\n });\n\n for (const module of providedModules) {\n build.onResolve({ filter: new RegExp(`^${module}$`) }, ({ path }) => {\n return { path, namespace: 'injected-module' };\n });\n }\n\n build.onLoad({ filter: /.*/, namespace: 'injected-module' }, ({ path }) => {\n const namedImports = imports.find((entry) => entry.moduleIdentifier === path)?.namedImports ?? [];\n return {\n contents: `\n const { ${namedImports.join(',')} } = window.__DXOS_SANDBOX_MODULES__[${JSON.stringify(path)}];\n export { ${namedImports.join(',')} };\n export default window.__DXOS_SANDBOX_MODULES__[${JSON.stringify(path)}].default;\n `,\n loader: 'tsx',\n };\n });\n },\n },\n ],\n });\n\n return await createResult({\n imports: this.analyzeImports(result),\n bundle: result.outputFiles![0].text,\n });\n } catch (err) {\n return await createResult({ error: err });\n }\n }\n\n // TODO(dmaretskyi): In the future we can replace the compiler with SWC with plugins running in WASM.\n analyzeImports(result: BuildResult): Import[] {\n invariant(result.outputFiles);\n\n // TODO(dmaretskyi): Support import aliases and wildcard imports.\n const parsedImports = allMatches(IMPORT_REGEX, result.outputFiles[0].text);\n return Object.values(result.metafile!.outputs)[0].imports.map((entry): Import => {\n const namedImports: string[] = [];\n\n const parsedImport = parsedImports.find((capture) => capture?.[4] === entry.path);\n if (parsedImport?.[2]) {\n NAMED_IMPORTS_REGEX.lastIndex = 0;\n const namedImportsMatch = NAMED_IMPORTS_REGEX.exec(parsedImport[2]);\n if (namedImportsMatch) {\n namedImportsMatch[1].split(',').forEach((importName) => {\n namedImports.push(importName.trim());\n });\n }\n }\n\n return {\n moduleUrl: entry.path,\n defaultImport: !!parsedImport?.[1],\n namedImports,\n };\n });\n }\n\n analyzeSourceFileImports(code: string) {\n // TODO(dmaretskyi): Support import aliases and wildcard imports.\n const parsedImports = allMatches(IMPORT_REGEX, code);\n return parsedImports.map((capture) => {\n return {\n defaultImportName: capture[1],\n namedImports: capture[2]?.split(',').map((importName) => importName.trim()),\n wildcardImportName: capture[3],\n moduleIdentifier: capture[4],\n quotes: capture[5],\n };\n });\n }\n}\n\n// https://regex101.com/r/FEN5ks/1\n// https://stackoverflow.com/a/73265022\n// $1 = default import name (can be non-existent)\n// $2 = destructured exports (can be non-existent)\n// $3 = wildcard import name (can be non-existent)\n// $4 = module identifier\n// $5 = quotes used (either ' or \")\nconst IMPORT_REGEX =\n /import(?:(?:(?:[ \\n\\t]+([^ *\\n\\t{},]+)[ \\n\\t]*(?:,|[ \\n\\t]+))?([ \\n\\t]*{(?:[ \\n\\t]*[^ \\n\\t\"'{}]+[ \\n\\t]*,?)+})?[ \\n\\t]*)|[ \\n\\t]*\\*[ \\n\\t]*as[ \\n\\t]+([^ \\n\\t{}]+)[ \\n\\t]+)from[ \\n\\t]*(?:['\"])([^'\"\\n]+)(['\"])/gm;\n\nconst NAMED_IMPORTS_REGEX = /[ \\n\\t]*{((?:[ \\n\\t]*[^ \\n\\t\"'{}]+[ \\n\\t]*,?)+)}[ \\n\\t]*/gm;\n\nconst allMatches = (regex: RegExp, str: string) => {\n regex.lastIndex = 0;\n\n let match;\n const matches = [];\n while ((match = regex.exec(str))) {\n matches.push(match);\n }\n\n return matches;\n};\n\ntype ParsedImport = {\n defaultImportName?: string;\n namedImports: string[];\n wildcardImportName?: string;\n moduleIdentifier: string;\n quotes: string;\n};\n\nconst analyzeSourceFileImports = (code: string): ParsedImport[] => {\n // TODO(dmaretskyi): Support import aliases and wildcard imports.\n const parsedImports = allMatches(IMPORT_REGEX, code);\n return parsedImports.map((capture) => {\n return {\n defaultImportName: capture[1],\n namedImports: capture[2]\n ?.trim()\n .slice(1, -1)\n .split(',')\n .map((importName) => importName.trim()),\n wildcardImportName: capture[3],\n moduleIdentifier: capture[4],\n quotes: capture[5],\n };\n });\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { ScriptPlugin } from './ScriptPlugin';\n\nexport default ScriptPlugin;\n\nexport * from './compiler';\nexport * from './components';\nexport * from './types';\n\nexport * from './ScriptPlugin';\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["import_react", "
|
|
3
|
+
"sources": ["../../../src/ScriptPlugin.tsx", "../../../src/compiler/compiler.ts", "../../../src/components/index.ts", "../../../src/translations.ts", "../../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Code, type IconProps } from '@phosphor-icons/react';\n// @ts-ignore\nimport wasmUrl from 'esbuild-wasm/esbuild.wasm?url';\nimport React from 'react';\n\nimport { parseIntentPlugin, type PluginDefinition, resolvePlugin, NavigationAction } from '@dxos/app-framework';\nimport { create } from '@dxos/echo-schema';\nimport { parseClientPlugin } from '@dxos/plugin-client';\nimport { type ActionGroup, createExtension, isActionGroup } from '@dxos/plugin-graph';\nimport { TextType } from '@dxos/plugin-markdown/types';\nimport { SpaceAction } from '@dxos/plugin-space';\nimport { loadObjectReferences } from '@dxos/react-client/echo';\n\nimport { initializeBundler } from './bundler';\nimport { Compiler } from './compiler';\nimport { ScriptEditor } from './components';\nimport meta, { SCRIPT_PLUGIN } from './meta';\nimport translations from './translations';\nimport { FunctionType, ScriptType } from './types';\nimport { ScriptAction, type ScriptPluginProvides } from './types';\n\nexport const ScriptPlugin = (): PluginDefinition<ScriptPluginProvides> => {\n const compiler = new Compiler();\n\n return {\n meta,\n initialize: async () => {\n await compiler.initialize();\n // TODO(wittjosiah): Fetch types for https modules.\n compiler.setFile('/src/typings.d.ts', \"declare module 'https://*';\");\n // TODO(wittjosiah): Proper function handler types.\n // TODO(wittjosiah): Remove.\n compiler.setFile(\n '/src/runtime.ts',\n `\n export const Filter: any = {};\n export type FunctionHandler = ({ event, context }: { event: any; context: any }) => Promise<Response>;\n export const functionHandler = (handler: FunctionHandler) => handler;\n `,\n );\n await initializeBundler({ wasmUrl });\n },\n provides: {\n metadata: {\n records: {\n [ScriptType.typename]: {\n placeholder: ['object title placeholder', { ns: SCRIPT_PLUGIN }],\n icon: (props: IconProps) => <Code {...props} />,\n iconSymbol: 'ph--code--regular',\n // TODO(wittjosiah): Move out of metadata.\n loadReferences: (script: ScriptType) => loadObjectReferences(script, (script) => [script.source]),\n },\n },\n },\n translations,\n echo: {\n schema: [ScriptType, FunctionType],\n },\n graph: {\n builder: (plugins) => {\n const client = resolvePlugin(plugins, parseClientPlugin)?.provides.client;\n const dispatch = resolvePlugin(plugins, parseIntentPlugin)?.provides.intent.dispatch;\n if (!client || !dispatch) {\n return [];\n }\n\n return createExtension({\n id: ScriptAction.CREATE,\n filter: (node): node is ActionGroup => isActionGroup(node) && node.id.startsWith(SpaceAction.ADD_OBJECT),\n actions: ({ node }) => {\n const id = node.id.split('/').at(-1);\n const [spaceId, objectId] = id?.split(':') ?? [];\n const space = client.spaces.get().find((space) => space.id === spaceId);\n const object = objectId && space?.db.getObjectById(objectId);\n const target = objectId ? object : space;\n if (!target) {\n return;\n }\n\n return [\n {\n id: `${SCRIPT_PLUGIN}/create/${node.id}`,\n data: async () => {\n await dispatch([\n { plugin: SCRIPT_PLUGIN, action: ScriptAction.CREATE },\n { action: SpaceAction.ADD_OBJECT, data: { target } },\n { action: NavigationAction.OPEN },\n ]);\n },\n properties: {\n label: ['create object label', { ns: SCRIPT_PLUGIN }],\n icon: (props: IconProps) => <Code {...props} />,\n iconSymbol: 'ph--code--regular',\n testId: 'scriptPlugin.createObject',\n },\n },\n ];\n },\n });\n },\n },\n stack: {\n creators: [\n {\n id: 'create-stack-section-script',\n testId: 'scriptPlugin.createSectionSpaceScript',\n type: ['plugin name', { ns: SCRIPT_PLUGIN }],\n label: ['create stack section label', { ns: SCRIPT_PLUGIN }],\n icon: (props: any) => <Code {...props} />,\n intent: { plugin: SCRIPT_PLUGIN, action: ScriptAction.CREATE },\n },\n ],\n },\n surface: {\n component: ({ data, role }) => {\n if (role && !['article', 'section'].includes(role)) {\n return null;\n }\n\n if (data.object instanceof ScriptType) {\n return <ScriptEditor env={compiler.environment} script={data.object} role={role} />;\n }\n\n return null;\n },\n },\n intent: {\n resolver: (intent) => {\n switch (intent.action) {\n case ScriptAction.CREATE: {\n return { data: create(ScriptType, { source: create(TextType, { content: example }) }) };\n }\n }\n },\n },\n },\n };\n};\n\n// TODO(burdon): Import.\nconst example = [\n 'export default async ({ ',\n ' event: { data: { request } },',\n ' context: { space, ai } ',\n '}) => {',\n \" return new Response('Hello World, from ScriptPlugin!');\",\n '};',\n '',\n].join('\\n');\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport {\n createDefaultMapFromCDN,\n createSystem,\n createVirtualTypeScriptEnvironment,\n type VirtualTypeScriptEnvironment,\n} from '@typescript/vfs';\nimport ts from 'typescript';\n\nimport { invariant } from '@dxos/invariant';\n\nconst defaultOptions: ts.CompilerOptions = {\n lib: ['DOM', 'es2022'],\n target: ts.ScriptTarget.ES2022,\n};\n\nexport class Compiler {\n private _env: VirtualTypeScriptEnvironment | undefined;\n private _fsMap: Map<string, string> | undefined;\n\n constructor(private readonly _options: ts.CompilerOptions = defaultOptions) {}\n\n async initialize() {\n if (this._env) {\n return;\n }\n\n // TODO(wittjosiah): Figure out how to get workers working in plugin packages.\n // https://github.com/val-town/codemirror-ts?tab=readme-ov-file#setup-worker\n this._fsMap = await createDefaultMapFromCDN(this._options, '5.5.4', true, ts);\n const system = createSystem(this._fsMap);\n this._env = createVirtualTypeScriptEnvironment(system, [], ts, this._options);\n }\n\n get environment() {\n invariant(this._env, 'Compiler environment not initialized.');\n return this._env;\n }\n\n setFile(fileName: string, content: string) {\n invariant(this._fsMap, 'File system map not initialized.');\n this.environment.createFile(fileName, content);\n }\n\n compile(fileName: string) {\n return this.environment.languageService.getEmitOutput(fileName);\n }\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nexport const ScriptEditor = React.lazy(() => import('./ScriptEditor'));\nexport const TypescriptEditor = React.lazy(() => import('./TypescriptEditor'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { SCRIPT_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [SCRIPT_PLUGIN]: {\n 'plugin name': 'Scripts',\n 'object title placeholder': 'New script',\n 'create object label': 'Create script',\n 'create stack section label': 'Create script',\n 'binding placeholder': 'Function name',\n 'function request placeholder': 'Function request',\n 'deploy label': 'Deploy',\n 'deployed label': 'Current version of the script is deployed',\n 'upload failed label': 'Upload failed',\n 'copy link label': 'Copy function link',\n 'format label': 'Format',\n 'toggle details label': 'Toggle details panel',\n },\n },\n },\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { ScriptPlugin } from './ScriptPlugin';\n\nexport default ScriptPlugin;\n\nexport * from './bundler';\nexport * from './compiler';\nexport * from './components';\nexport * from './types';\n\nexport * from './ScriptPlugin';\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["import_react", "defaultOptions", "lib", "target", "ts", "ScriptTarget", "ES2022", "Compiler", "constructor", "_options", "initialize", "_env", "_fsMap", "createDefaultMapFromCDN", "system", "createSystem", "createVirtualTypeScriptEnvironment", "environment", "invariant", "setFile", "fileName", "content", "createFile", "compile", "languageService", "getEmitOutput", "ScriptEditor", "React", "lazy", "TypescriptEditor", "SCRIPT_PLUGIN", "ScriptPlugin", "compiler", "meta", "initializeBundler", "wasmUrl", "provides", "metadata", "records", "ScriptType", "typename", "placeholder", "ns", "icon", "props", "Code", "iconSymbol", "loadReferences", "script", "loadObjectReferences", "source", "translations", "echo", "schema", "FunctionType", "graph", "builder", "plugins", "client", "resolvePlugin", "parseClientPlugin", "dispatch", "parseIntentPlugin", "intent", "createExtension", "id", "ScriptAction", "CREATE", "filter", "node", "isActionGroup", "startsWith", "SpaceAction", "ADD_OBJECT", "actions", "split", "at", "spaceId", "objectId", "space", "spaces", "get", "find", "object", "db", "getObjectById", "data", "plugin", "action", "NavigationAction", "OPEN", "properties", "label", "testId", "stack", "creators", "type", "surface", "component", "role", "includes", "env", "resolver", "create", "TextType", "example", "join"]
|
|
7
7
|
}
|
package/dist/lib/node/meta.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts":{"bytes":10228,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/codec.ts":{"bytes":1702,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts","kind":"import-statement","original":"./header-codec"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts":{"bytes":2750,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/functions.ts":{"bytes":14103,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/edge/codec.ts","kind":"import-statement","original":"./codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts","kind":"import-statement","original":"./hub-protocol"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/index.ts":{"bytes":907,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/edge/codec.ts","kind":"import-statement","original":"./codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/functions.ts","kind":"import-statement","original":"./functions"},{"path":"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts","kind":"import-statement","original":"./header-codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts","kind":"import-statement","original":"./hub-protocol"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/meta.tsx":{"bytes":1964,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/Toolbar.tsx":{"bytes":18081,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor.tsx":{"bytes":7342,"imports":[{"path":"@codemirror/lang-javascript","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/theme-one-dark","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/script.ts":{"bytes":2909,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/types.tsx":{"bytes":1612,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/index.ts":{"bytes":600,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/types/script.ts","kind":"import-statement","original":"./script"},{"path":"packages/plugins/experimental/plugin-script/src/types/types.tsx","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx":{"bytes":15542,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/components/Toolbar.tsx","kind":"import-statement","original":"./Toolbar"},{"path":"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor.tsx","kind":"import-statement","original":"./TypescriptEditor"},{"path":"packages/plugins/experimental/plugin-script/src/edge/index.ts","kind":"import-statement","original":"../edge"},{"path":"packages/plugins/experimental/plugin-script/src/meta.tsx","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/index.ts":{"bytes":1121,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx","kind":"dynamic-import","original":"./ScriptEditor"},{"path":"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor.tsx","kind":"dynamic-import","original":"./TypescriptEditor"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/translations.ts":{"bytes":2462,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/meta.tsx","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx":{"bytes":19090,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-script/src/meta.tsx","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/experimental/plugin-script/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts":{"bytes":23524,"imports":[{"path":"esbuild-wasm","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/compiler/index.ts":{"bytes":524,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts","kind":"import-statement","original":"./compiler"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/index.ts":{"bytes":1062,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx","kind":"import-statement","original":"./ScriptPlugin"},{"path":"packages/plugins/experimental/plugin-script/src/compiler/index.ts","kind":"import-statement","original":"./compiler"},{"path":"packages/plugins/experimental/plugin-script/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx","kind":"import-statement","original":"./ScriptPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/experimental/plugin-script/dist/lib/node/edge/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/node/edge/index.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-HN3AVLUL.cjs","kind":"import-statement"}],"exports":["HeaderCodec","codec","getUserFunctionUrlInMetadata","matchServiceCredential","publicKeyToDid","setUserFunctionUrlInMetadata","uploadWorkerFunction"],"entryPoint":"packages/plugins/experimental/plugin-script/src/edge/index.ts","inputs":{},"bytes":398},"packages/plugins/experimental/plugin-script/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21262},"packages/plugins/experimental/plugin-script/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-VW2POILW.cjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-4VMNBXWU.cjs","kind":"import-statement"},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/ScriptEditor-KBSACFYK.cjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/TypescriptEditor-OTWJUIWB.cjs","kind":"dynamic-import"},{"path":"esbuild-wasm","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"exports":["Compiler","FunctionType","ScriptAction","ScriptEditor","ScriptPlugin","ScriptType","TypescriptEditor","default","initializeCompiler"],"entryPoint":"packages/plugins/experimental/plugin-script/src/index.ts","inputs":{"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx":{"bytesInOutput":5058},"packages/plugins/experimental/plugin-script/src/components/index.ts":{"bytesInOutput":187},"packages/plugins/experimental/plugin-script/src/translations.ts":{"bytesInOutput":612},"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts":{"bytesInOutput":5832},"packages/plugins/experimental/plugin-script/src/compiler/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/index.ts":{"bytesInOutput":32}},"bytes":12494},"packages/plugins/experimental/plugin-script/dist/lib/node/meta.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/node/meta.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-4VMNBXWU.cjs","kind":"import-statement"}],"exports":["SCRIPT_PLUGIN","default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/meta.tsx","inputs":{},"bytes":161},"packages/plugins/experimental/plugin-script/dist/lib/node/types/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/node/types/index.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-VW2POILW.cjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-4VMNBXWU.cjs","kind":"import-statement"}],"exports":["FunctionType","ScriptAction","ScriptType"],"entryPoint":"packages/plugins/experimental/plugin-script/src/types/index.ts","inputs":{},"bytes":210},"packages/plugins/experimental/plugin-script/dist/lib/node/TypescriptEditor-OTWJUIWB.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/node/TypescriptEditor-OTWJUIWB.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-ITLHJMWP.cjs","kind":"import-statement"}],"exports":["TypescriptEditor","default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor.tsx","inputs":{},"bytes":212},"packages/plugins/experimental/plugin-script/dist/lib/node/ScriptEditor-KBSACFYK.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17783},"packages/plugins/experimental/plugin-script/dist/lib/node/ScriptEditor-KBSACFYK.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-HN3AVLUL.cjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-VW2POILW.cjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-4VMNBXWU.cjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-ITLHJMWP.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["ScriptEditor","default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx","inputs":{"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx":{"bytesInOutput":3929},"packages/plugins/experimental/plugin-script/src/components/Toolbar.tsx":{"bytesInOutput":5100}},"bytes":9692},"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-HN3AVLUL.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":14612},"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-HN3AVLUL.cjs":{"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["HeaderCodec","codec","getUserFunctionUrlInMetadata","matchServiceCredential","publicKeyToDid","setUserFunctionUrlInMetadata","uploadWorkerFunction"],"inputs":{"packages/plugins/experimental/plugin-script/src/edge/codec.ts":{"bytesInOutput":221},"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts":{"bytesInOutput":2132},"packages/plugins/experimental/plugin-script/src/edge/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/edge/functions.ts":{"bytesInOutput":3316},"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts":{"bytesInOutput":425}},"bytes":6723},"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-VW2POILW.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2276},"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-VW2POILW.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-4VMNBXWU.cjs","kind":"import-statement"},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true}],"exports":["FunctionType","ScriptAction","ScriptType"],"inputs":{"packages/plugins/experimental/plugin-script/src/types/script.ts":{"bytesInOutput":673},"packages/plugins/experimental/plugin-script/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/types/types.tsx":{"bytesInOutput":167}},"bytes":1134},"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-4VMNBXWU.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":961},"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-4VMNBXWU.cjs":{"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["SCRIPT_PLUGIN","meta_default"],"inputs":{"packages/plugins/experimental/plugin-script/src/meta.tsx":{"bytesInOutput":430}},"bytes":579},"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-ITLHJMWP.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3777},"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-ITLHJMWP.cjs":{"imports":[{"path":"@codemirror/lang-javascript","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/theme-one-dark","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["TypescriptEditor","TypescriptEditor_default"],"inputs":{"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor.tsx":{"bytesInOutput":1776}},"bytes":1963}}}
|
|
1
|
+
{"inputs":{"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts":{"bytes":10228,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/codec.ts":{"bytes":1702,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts","kind":"import-statement","original":"./header-codec"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts":{"bytes":2750,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/functions.ts":{"bytes":14898,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/edge/codec.ts","kind":"import-statement","original":"./codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts","kind":"import-statement","original":"./hub-protocol"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/index.ts":{"bytes":907,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/edge/codec.ts","kind":"import-statement","original":"./codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/functions.ts","kind":"import-statement","original":"./functions"},{"path":"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts","kind":"import-statement","original":"./header-codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts","kind":"import-statement","original":"./hub-protocol"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/bundler/bundler.ts":{"bytes":28987,"imports":[{"path":"esbuild-wasm","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/bundler/index.ts":{"bytes":522,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/bundler/bundler.ts","kind":"import-statement","original":"./bundler"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts":{"bytes":5747,"imports":[{"path":"@typescript/vfs","kind":"import-statement","external":true},{"path":"typescript","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/compiler/index.ts":{"bytes":524,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts","kind":"import-statement","original":"./compiler"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/meta.tsx":{"bytes":1964,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/DetailsPanel.tsx":{"bytes":22995,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/Toolbar.tsx":{"bytes":15688,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor.tsx":{"bytes":9408,"imports":[{"path":"@codemirror/lang-javascript","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/theme-one-dark","kind":"import-statement","external":true},{"path":"@valtown/codemirror-ts","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/script.ts":{"bytes":2909,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/types.tsx":{"bytes":1612,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/index.ts":{"bytes":600,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/types/script.ts","kind":"import-statement","original":"./script"},{"path":"packages/plugins/experimental/plugin-script/src/types/types.tsx","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx":{"bytes":22760,"imports":[{"path":"prettier","kind":"import-statement","external":true},{"path":"prettier/plugins/estree","kind":"import-statement","external":true},{"path":"prettier/plugins/typescript","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/components/DetailsPanel.tsx","kind":"import-statement","original":"./DetailsPanel"},{"path":"packages/plugins/experimental/plugin-script/src/components/Toolbar.tsx","kind":"import-statement","original":"./Toolbar"},{"path":"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor.tsx","kind":"import-statement","original":"./TypescriptEditor"},{"path":"packages/plugins/experimental/plugin-script/src/bundler/index.ts","kind":"import-statement","original":"../bundler"},{"path":"packages/plugins/experimental/plugin-script/src/edge/index.ts","kind":"import-statement","original":"../edge"},{"path":"packages/plugins/experimental/plugin-script/src/meta.tsx","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/index.ts":{"bytes":1121,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx","kind":"dynamic-import","original":"./ScriptEditor"},{"path":"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor.tsx","kind":"dynamic-import","original":"./TypescriptEditor"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/translations.ts":{"bytes":2650,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/meta.tsx","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx":{"bytes":21717,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"esbuild-wasm/esbuild.wasm?url","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/bundler/index.ts","kind":"import-statement","original":"./bundler"},{"path":"packages/plugins/experimental/plugin-script/src/compiler/index.ts","kind":"import-statement","original":"./compiler"},{"path":"packages/plugins/experimental/plugin-script/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-script/src/meta.tsx","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/experimental/plugin-script/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/index.ts":{"bytes":1149,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx","kind":"import-statement","original":"./ScriptPlugin"},{"path":"packages/plugins/experimental/plugin-script/src/bundler/index.ts","kind":"import-statement","original":"./bundler"},{"path":"packages/plugins/experimental/plugin-script/src/compiler/index.ts","kind":"import-statement","original":"./compiler"},{"path":"packages/plugins/experimental/plugin-script/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx","kind":"import-statement","original":"./ScriptPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/experimental/plugin-script/dist/lib/node/edge/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/node/edge/index.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-PFH3ROEH.cjs","kind":"import-statement"}],"exports":["HeaderCodec","codec","getUserFunctionUrlInMetadata","matchServiceCredential","publicKeyToDid","setUserFunctionUrlInMetadata","uploadWorkerFunction"],"entryPoint":"packages/plugins/experimental/plugin-script/src/edge/index.ts","inputs":{},"bytes":398},"packages/plugins/experimental/plugin-script/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13928},"packages/plugins/experimental/plugin-script/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-4GTXIELQ.cjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-VW2POILW.cjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-4VMNBXWU.cjs","kind":"import-statement"},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"esbuild-wasm/esbuild.wasm?url","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@typescript/vfs","kind":"import-statement","external":true},{"path":"typescript","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/ScriptEditor-RR7AVOQL.cjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/TypescriptEditor-CRONCQSI.cjs","kind":"dynamic-import"}],"exports":["Bundler","Compiler","FunctionType","ScriptAction","ScriptEditor","ScriptPlugin","ScriptType","TypescriptEditor","default","initializeBundler"],"entryPoint":"packages/plugins/experimental/plugin-script/src/index.ts","inputs":{"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx":{"bytesInOutput":5698},"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts":{"bytesInOutput":1440},"packages/plugins/experimental/plugin-script/src/compiler/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/components/index.ts":{"bytesInOutput":187},"packages/plugins/experimental/plugin-script/src/translations.ts":{"bytesInOutput":680},"packages/plugins/experimental/plugin-script/src/index.ts":{"bytesInOutput":32}},"bytes":8891},"packages/plugins/experimental/plugin-script/dist/lib/node/meta.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/node/meta.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-4VMNBXWU.cjs","kind":"import-statement"}],"exports":["SCRIPT_PLUGIN","default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/meta.tsx","inputs":{},"bytes":161},"packages/plugins/experimental/plugin-script/dist/lib/node/types/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/node/types/index.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-VW2POILW.cjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-4VMNBXWU.cjs","kind":"import-statement"}],"exports":["FunctionType","ScriptAction","ScriptType"],"entryPoint":"packages/plugins/experimental/plugin-script/src/types/index.ts","inputs":{},"bytes":210},"packages/plugins/experimental/plugin-script/dist/lib/node/TypescriptEditor-CRONCQSI.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/node/TypescriptEditor-CRONCQSI.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-RXI576K3.cjs","kind":"import-statement"}],"exports":["TypescriptEditor","default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor.tsx","inputs":{},"bytes":212},"packages/plugins/experimental/plugin-script/dist/lib/node/ScriptEditor-RR7AVOQL.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":31972},"packages/plugins/experimental/plugin-script/dist/lib/node/ScriptEditor-RR7AVOQL.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-PFH3ROEH.cjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-4GTXIELQ.cjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-VW2POILW.cjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-4VMNBXWU.cjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-RXI576K3.cjs","kind":"import-statement"},{"path":"prettier","kind":"import-statement","external":true},{"path":"prettier/plugins/estree","kind":"import-statement","external":true},{"path":"prettier/plugins/typescript","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["ScriptEditor","default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx","inputs":{"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx":{"bytesInOutput":5691},"packages/plugins/experimental/plugin-script/src/components/DetailsPanel.tsx":{"bytesInOutput":6233},"packages/plugins/experimental/plugin-script/src/components/Toolbar.tsx":{"bytesInOutput":4536}},"bytes":17253},"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-PFH3ROEH.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":15020},"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-PFH3ROEH.cjs":{"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["HeaderCodec","codec","getUserFunctionUrlInMetadata","matchServiceCredential","publicKeyToDid","setUserFunctionUrlInMetadata","uploadWorkerFunction"],"inputs":{"packages/plugins/experimental/plugin-script/src/edge/codec.ts":{"bytesInOutput":221},"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts":{"bytesInOutput":2132},"packages/plugins/experimental/plugin-script/src/edge/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/edge/functions.ts":{"bytesInOutput":3474},"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts":{"bytesInOutput":425}},"bytes":6881},"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-4GTXIELQ.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13644},"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-4GTXIELQ.cjs":{"imports":[{"path":"esbuild-wasm","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["Bundler","initializeBundler"],"inputs":{"packages/plugins/experimental/plugin-script/src/bundler/bundler.ts":{"bytesInOutput":6790},"packages/plugins/experimental/plugin-script/src/bundler/index.ts":{"bytesInOutput":0}},"bytes":6948},"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-VW2POILW.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2276},"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-VW2POILW.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-4VMNBXWU.cjs","kind":"import-statement"},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true}],"exports":["FunctionType","ScriptAction","ScriptType"],"inputs":{"packages/plugins/experimental/plugin-script/src/types/script.ts":{"bytesInOutput":673},"packages/plugins/experimental/plugin-script/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/types/types.tsx":{"bytesInOutput":167}},"bytes":1134},"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-4VMNBXWU.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":961},"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-4VMNBXWU.cjs":{"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["SCRIPT_PLUGIN","meta_default"],"inputs":{"packages/plugins/experimental/plugin-script/src/meta.tsx":{"bytesInOutput":430}},"bytes":579},"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-RXI576K3.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4826},"packages/plugins/experimental/plugin-script/dist/lib/node/chunk-RXI576K3.cjs":{"imports":[{"path":"@codemirror/lang-javascript","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/theme-one-dark","kind":"import-statement","external":true},{"path":"@valtown/codemirror-ts","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["TypescriptEditor","TypescriptEditor_default"],"inputs":{"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor.tsx":{"bytesInOutput":2254}},"bytes":2441}}}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { type PluginDefinition } from '@dxos/app-framework';
|
|
2
2
|
import { type ScriptPluginProvides } from './types';
|
|
3
|
-
export
|
|
4
|
-
containerUrl: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const ScriptPlugin: ({ containerUrl }: ScriptPluginProps) => PluginDefinition<ScriptPluginProvides>;
|
|
3
|
+
export declare const ScriptPlugin: () => PluginDefinition<ScriptPluginProvides>;
|
|
7
4
|
//# sourceMappingURL=ScriptPlugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScriptPlugin.d.ts","sourceRoot":"","sources":["../../../src/ScriptPlugin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScriptPlugin.d.ts","sourceRoot":"","sources":["../../../src/ScriptPlugin.tsx"],"names":[],"mappings":"AASA,OAAO,EAAqB,KAAK,gBAAgB,EAAmC,MAAM,qBAAqB,CAAC;AAchH,OAAO,EAAgB,KAAK,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAElE,eAAO,MAAM,YAAY,QAAO,gBAAgB,CAAC,oBAAoB,CAoHpE,CAAC"}
|