@dxos/compute 0.8.4-main.7ace549 → 0.8.4-main.937b3ca
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{chunk-ILJV45WQ.mjs → chunk-KGBGT4NT.mjs} +16 -23
- package/dist/lib/browser/chunk-KGBGT4NT.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +4 -3
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/{chunk-QDJ6J7GT.mjs → chunk-2MATJWLB.mjs} +16 -23
- package/dist/lib/node-esm/chunk-2MATJWLB.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1 -1
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +4 -3
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/types/src/compute-graph.d.ts.map +1 -1
- package/dist/types/src/functions/edge-function.d.ts.map +1 -1
- package/dist/types/src/testing/test-runtime.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +26 -24
- package/src/compute-graph-registry.test.ts +6 -2
- package/src/compute-graph.ts +3 -8
- package/src/functions/edge-function.ts +9 -10
- package/src/testing/test-runtime.ts +3 -2
- package/dist/lib/browser/chunk-ILJV45WQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QDJ6J7GT.mjs.map +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/types/hyperformula.ts":{"bytes":1321,"imports":[{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true}],"format":"esm"},"src/types/types.ts":{"bytes":9120,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":547,"imports":[{"path":"src/types/hyperformula.ts","kind":"import-statement","original":"./hyperformula"},{"path":"src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/compute-node.ts":{"bytes":5714,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/functions/async-function.ts":{"bytes":18966,"imports":[{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true}],"format":"esm"},"src/functions/edge-function.ts":{"bytes":16101,"imports":[{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/SchemaAST","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"src/functions/async-function.ts","kind":"import-statement","original":"./async-function"}],"format":"esm"},"src/functions/function-defs.ts":{"bytes":201438,"imports":[],"format":"esm"},"src/functions/index.ts":{"bytes":682,"imports":[{"path":"src/functions/async-function.ts","kind":"import-statement","original":"./async-function"},{"path":"src/functions/edge-function.ts","kind":"import-statement","original":"./edge-function"},{"path":"src/functions/function-defs.ts","kind":"import-statement","original":"./function-defs"}],"format":"esm"},"src/compute-graph.ts":{"bytes":29331,"imports":[{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"src/compute-node.ts","kind":"import-statement","original":"./compute-node"},{"path":"src/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"src/compute-graph-registry.ts":{"bytes":10396,"imports":[{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"src/compute-graph.ts","kind":"import-statement","original":"./compute-graph"},{"path":"src/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"src/index.ts":{"bytes":857,"imports":[{"path":"src/compute-graph.ts","kind":"import-statement","original":"./compute-graph"},{"path":"src/compute-graph-registry.ts","kind":"import-statement","original":"./compute-graph-registry"},{"path":"src/compute-node.ts","kind":"import-statement","original":"./compute-node"},{"path":"src/functions/index.ts","kind":"import-statement","original":"./functions"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/testing/test-runtime.ts":{"bytes":3736,"imports":[{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/ManagedRuntime","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/testing","kind":"import-statement","external":true}],"format":"esm"},"src/testing/test-builder.ts":{"bytes":6179,"imports":[{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/compute-graph-registry.ts","kind":"import-statement","original":"../compute-graph-registry"},{"path":"src/testing/test-runtime.ts","kind":"import-statement","original":"./test-runtime"}],"format":"esm"},"src/util.ts":{"bytes":868,"imports":[],"format":"esm"},"src/testing/test-plugin.ts":{"bytes":8844,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"src/functions/index.ts","kind":"import-statement","original":"../functions"},{"path":"src/util.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"src/testing/util.ts":{"bytes":1107,"imports":[{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true}],"format":"esm"},"src/testing/index.ts":{"bytes":747,"imports":[{"path":"src/testing/test-builder.ts","kind":"import-statement","original":"./test-builder"},{"path":"src/testing/test-plugin.ts","kind":"import-statement","original":"./test-plugin"},{"path":"src/testing/util.ts","kind":"import-statement","original":"./util"},{"path":"src/testing/test-runtime.ts","kind":"import-statement","original":"./test-runtime"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-ILJV45WQ.mjs","kind":"import-statement"}],"exports":["AsyncFunctionPlugin","ComputeGraph","ComputeGraphRegistry","ComputeNode","DetailedCellError","EDGE_FUNCTION_NAME","EdgeFunctionPlugin","EdgeFunctionPluginTranslations","ExportedCellChange","FunctionContext","RANGE_NOTATION","addressFromA1Notation","addressToA1Notation","cellEquals","columnLetter","createSheetName","defaultFunctionContextOptions","defaultFunctions","defaultOptions","defaultPlugins","inRange","isFormula","parseSheetName","rangeFromA1Notation","rangeToA1Notation"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":1101},"dist/lib/browser/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10162},"dist/lib/browser/testing/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-ILJV45WQ.mjs","kind":"import-statement"},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/ManagedRuntime","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/testing","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true}],"exports":["TestBuilder","TestPlugin","TestPluginTranslations","createMockedComputeRuntimeProvider","getRegisteredFunctionNames","testFunctionPlugins"],"entryPoint":"src/testing/index.ts","inputs":{"src/testing/test-builder.ts":{"bytesInOutput":1489},"src/testing/test-runtime.ts":{"bytesInOutput":688},"src/testing/index.ts":{"bytesInOutput":0},"src/testing/test-plugin.ts":{"bytesInOutput":1973},"src/util.ts":{"bytesInOutput":87},"src/testing/util.ts":{"bytesInOutput":197}},"bytes":4911},"dist/lib/browser/chunk-ILJV45WQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":138314},"dist/lib/browser/chunk-ILJV45WQ.mjs":{"imports":[{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/SchemaAST","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true}],"exports":["AsyncFunctionPlugin","ComputeGraph","ComputeGraphRegistry","ComputeNode","DetailedCellError","EDGE_FUNCTION_NAME","EdgeFunctionPlugin","EdgeFunctionPluginTranslations","ExportedCellChange","FunctionContext","RANGE_NOTATION","addressFromA1Notation","addressToA1Notation","cellEquals","columnLetter","createSheetName","defaultFunctionContextOptions","defaultFunctions","defaultOptions","defaultPlugins","inRange","isFormula","parseSheetName","rangeFromA1Notation","rangeToA1Notation"],"inputs":{"src/types/hyperformula.ts":{"bytesInOutput":83},"src/types/types.ts":{"bytesInOutput":2054},"src/types/index.ts":{"bytesInOutput":0},"src/compute-node.ts":{"bytesInOutput":1034},"src/functions/async-function.ts":{"bytesInOutput":4227},"src/functions/edge-function.ts":{"bytesInOutput":3887},"src/functions/function-defs.ts":{"bytesInOutput":68677},"src/functions/index.ts":{"bytesInOutput":0},"src/compute-graph.ts":{"bytesInOutput":6868},"src/compute-graph-registry.ts":{"bytesInOutput":2248}},"bytes":89883}}}
|
|
1
|
+
{"inputs":{"src/types/hyperformula.ts":{"bytes":1321,"imports":[{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true}],"format":"esm"},"src/types/types.ts":{"bytes":9120,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":547,"imports":[{"path":"src/types/hyperformula.ts","kind":"import-statement","original":"./hyperformula"},{"path":"src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/compute-node.ts":{"bytes":5714,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/functions/async-function.ts":{"bytes":18966,"imports":[{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true}],"format":"esm"},"src/functions/edge-function.ts":{"bytes":15830,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/SchemaAST","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"src/functions/async-function.ts","kind":"import-statement","original":"./async-function"}],"format":"esm"},"src/functions/function-defs.ts":{"bytes":201438,"imports":[],"format":"esm"},"src/functions/index.ts":{"bytes":682,"imports":[{"path":"src/functions/async-function.ts","kind":"import-statement","original":"./async-function"},{"path":"src/functions/edge-function.ts","kind":"import-statement","original":"./edge-function"},{"path":"src/functions/function-defs.ts","kind":"import-statement","original":"./function-defs"}],"format":"esm"},"src/compute-graph.ts":{"bytes":28886,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"src/compute-node.ts","kind":"import-statement","original":"./compute-node"},{"path":"src/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"src/compute-graph-registry.ts":{"bytes":10396,"imports":[{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"src/compute-graph.ts","kind":"import-statement","original":"./compute-graph"},{"path":"src/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"src/index.ts":{"bytes":857,"imports":[{"path":"src/compute-graph.ts","kind":"import-statement","original":"./compute-graph"},{"path":"src/compute-graph-registry.ts","kind":"import-statement","original":"./compute-graph-registry"},{"path":"src/compute-node.ts","kind":"import-statement","original":"./compute-node"},{"path":"src/functions/index.ts","kind":"import-statement","original":"./functions"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/testing/test-runtime.ts":{"bytes":3827,"imports":[{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/ManagedRuntime","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/testing","kind":"import-statement","external":true}],"format":"esm"},"src/testing/test-builder.ts":{"bytes":6179,"imports":[{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/compute-graph-registry.ts","kind":"import-statement","original":"../compute-graph-registry"},{"path":"src/testing/test-runtime.ts","kind":"import-statement","original":"./test-runtime"}],"format":"esm"},"src/util.ts":{"bytes":868,"imports":[],"format":"esm"},"src/testing/test-plugin.ts":{"bytes":8844,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"src/functions/index.ts","kind":"import-statement","original":"../functions"},{"path":"src/util.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"src/testing/util.ts":{"bytes":1107,"imports":[{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true}],"format":"esm"},"src/testing/index.ts":{"bytes":747,"imports":[{"path":"src/testing/test-builder.ts","kind":"import-statement","original":"./test-builder"},{"path":"src/testing/test-plugin.ts","kind":"import-statement","original":"./test-plugin"},{"path":"src/testing/util.ts","kind":"import-statement","original":"./util"},{"path":"src/testing/test-runtime.ts","kind":"import-statement","original":"./test-runtime"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-KGBGT4NT.mjs","kind":"import-statement"}],"exports":["AsyncFunctionPlugin","ComputeGraph","ComputeGraphRegistry","ComputeNode","DetailedCellError","EDGE_FUNCTION_NAME","EdgeFunctionPlugin","EdgeFunctionPluginTranslations","ExportedCellChange","FunctionContext","RANGE_NOTATION","addressFromA1Notation","addressToA1Notation","cellEquals","columnLetter","createSheetName","defaultFunctionContextOptions","defaultFunctions","defaultOptions","defaultPlugins","inRange","isFormula","parseSheetName","rangeFromA1Notation","rangeToA1Notation"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":1101},"dist/lib/browser/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10198},"dist/lib/browser/testing/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-KGBGT4NT.mjs","kind":"import-statement"},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/ManagedRuntime","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/testing","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true}],"exports":["TestBuilder","TestPlugin","TestPluginTranslations","createMockedComputeRuntimeProvider","getRegisteredFunctionNames","testFunctionPlugins"],"entryPoint":"src/testing/index.ts","inputs":{"src/testing/test-builder.ts":{"bytesInOutput":1489},"src/testing/test-runtime.ts":{"bytesInOutput":711},"src/testing/index.ts":{"bytesInOutput":0},"src/testing/test-plugin.ts":{"bytesInOutput":1973},"src/util.ts":{"bytesInOutput":87},"src/testing/util.ts":{"bytesInOutput":197}},"bytes":4934},"dist/lib/browser/chunk-KGBGT4NT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":137943},"dist/lib/browser/chunk-KGBGT4NT.mjs":{"imports":[{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/SchemaAST","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true},{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/vendor-hyperformula","kind":"import-statement","external":true}],"exports":["AsyncFunctionPlugin","ComputeGraph","ComputeGraphRegistry","ComputeNode","DetailedCellError","EDGE_FUNCTION_NAME","EdgeFunctionPlugin","EdgeFunctionPluginTranslations","ExportedCellChange","FunctionContext","RANGE_NOTATION","addressFromA1Notation","addressToA1Notation","cellEquals","columnLetter","createSheetName","defaultFunctionContextOptions","defaultFunctions","defaultOptions","defaultPlugins","inRange","isFormula","parseSheetName","rangeFromA1Notation","rangeToA1Notation"],"inputs":{"src/types/hyperformula.ts":{"bytesInOutput":83},"src/types/types.ts":{"bytesInOutput":2054},"src/types/index.ts":{"bytesInOutput":0},"src/compute-node.ts":{"bytesInOutput":1034},"src/functions/async-function.ts":{"bytesInOutput":4227},"src/functions/edge-function.ts":{"bytesInOutput":3810},"src/functions/function-defs.ts":{"bytesInOutput":68677},"src/functions/index.ts":{"bytesInOutput":0},"src/compute-graph.ts":{"bytesInOutput":6736},"src/compute-graph-registry.ts":{"bytesInOutput":2248}},"bytes":89674}}}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AsyncFunctionPlugin,
|
|
3
3
|
ComputeGraphRegistry
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-KGBGT4NT.mjs";
|
|
5
5
|
|
|
6
6
|
// src/testing/test-builder.ts
|
|
7
7
|
import { Client } from "@dxos/client";
|
|
@@ -12,13 +12,14 @@ import { invariant } from "@dxos/invariant";
|
|
|
12
12
|
import * as Layer from "effect/Layer";
|
|
13
13
|
import * as ManagedRuntime from "effect/ManagedRuntime";
|
|
14
14
|
import { AiService } from "@dxos/ai";
|
|
15
|
-
import {
|
|
15
|
+
import { Database } from "@dxos/echo";
|
|
16
|
+
import { CredentialsService, QueueService } from "@dxos/functions";
|
|
16
17
|
import { FunctionInvocationServiceLayerTest } from "@dxos/functions-runtime/testing";
|
|
17
18
|
var createMockedComputeRuntimeProvider = ({ functions } = {}) => {
|
|
18
19
|
return {
|
|
19
20
|
getRuntime: (_spaceId) => ManagedRuntime.make(FunctionInvocationServiceLayerTest({
|
|
20
21
|
functions
|
|
21
|
-
}).pipe(Layer.provide(AiService.notAvailable), Layer.provide(CredentialsService.configuredLayer([])), Layer.provide(
|
|
22
|
+
}).pipe(Layer.provide(AiService.notAvailable), Layer.provide(CredentialsService.configuredLayer([])), Layer.provide(Database.Service.notAvailable), Layer.provide(QueueService.notAvailable)))
|
|
22
23
|
};
|
|
23
24
|
};
|
|
24
25
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/testing/test-builder.ts", "../../../../src/testing/test-runtime.ts", "../../../../src/testing/test-plugin.ts", "../../../../src/util.ts", "../../../../src/testing/util.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Client, type ClientOptions } from '@dxos/client';\nimport { type Context, Resource } from '@dxos/context';\nimport { invariant } from '@dxos/invariant';\n\nimport { type ComputeGraphOptions, ComputeGraphRegistry } from '../compute-graph-registry';\n\nimport { createMockedComputeRuntimeProvider } from './test-runtime';\n\nexport type TestBuilderOptions = ClientOptions & Partial<ComputeGraphOptions>;\n\n// TODO(burdon): Reconcile with @dxos/client/testing.\nexport class TestBuilder extends Resource {\n private _client?: Client;\n private _registry?: ComputeGraphRegistry;\n\n constructor(private readonly _options: TestBuilderOptions = {}) {\n super();\n }\n\n get ctx(): Context {\n return this._ctx;\n }\n\n get client(): Client {\n invariant(this._client);\n return this._client;\n }\n\n get registry(): ComputeGraphRegistry {\n invariant(this._registry);\n return this._registry;\n }\n\n override async _open(): Promise<void> {\n const client = new Client(this._options);\n await client.initialize();\n await client.halo.createIdentity();\n this._client = client;\n this._ctx.onDispose(async () => {\n await client.destroy();\n this._client = undefined;\n });\n\n const registry = new ComputeGraphRegistry({\n ...this._options,\n // Provide a default runtime provider for tests if not supplied.\n computeRuntime: this._options.computeRuntime ?? createMockedComputeRuntimeProvider(),\n });\n await registry.open();\n this._registry = registry;\n this._ctx.onDispose(async () => {\n await registry.close();\n this._registry = undefined;\n });\n }\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Layer from 'effect/Layer';\nimport * as ManagedRuntime from 'effect/ManagedRuntime';\n\nimport { AiService } from '@dxos/ai';\nimport { type SpaceId } from '@dxos/client/echo';\nimport { CredentialsService,
|
|
5
|
-
"mappings": ";;;;;;AAIA,SAASA,cAAkC;AAC3C,SAAuBC,gBAAgB;AACvC,SAASC,iBAAiB;;;ACF1B,YAAYC,WAAW;AACvB,YAAYC,oBAAoB;AAEhC,SAASC,iBAAiB;AAE1B,SAASC,
|
|
6
|
-
"names": ["Client", "Resource", "invariant", "Layer", "ManagedRuntime", "AiService", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Client, type ClientOptions } from '@dxos/client';\nimport { type Context, Resource } from '@dxos/context';\nimport { invariant } from '@dxos/invariant';\n\nimport { type ComputeGraphOptions, ComputeGraphRegistry } from '../compute-graph-registry';\n\nimport { createMockedComputeRuntimeProvider } from './test-runtime';\n\nexport type TestBuilderOptions = ClientOptions & Partial<ComputeGraphOptions>;\n\n// TODO(burdon): Reconcile with @dxos/client/testing.\nexport class TestBuilder extends Resource {\n private _client?: Client;\n private _registry?: ComputeGraphRegistry;\n\n constructor(private readonly _options: TestBuilderOptions = {}) {\n super();\n }\n\n get ctx(): Context {\n return this._ctx;\n }\n\n get client(): Client {\n invariant(this._client);\n return this._client;\n }\n\n get registry(): ComputeGraphRegistry {\n invariant(this._registry);\n return this._registry;\n }\n\n override async _open(): Promise<void> {\n const client = new Client(this._options);\n await client.initialize();\n await client.halo.createIdentity();\n this._client = client;\n this._ctx.onDispose(async () => {\n await client.destroy();\n this._client = undefined;\n });\n\n const registry = new ComputeGraphRegistry({\n ...this._options,\n // Provide a default runtime provider for tests if not supplied.\n computeRuntime: this._options.computeRuntime ?? createMockedComputeRuntimeProvider(),\n });\n await registry.open();\n this._registry = registry;\n this._ctx.onDispose(async () => {\n await registry.close();\n this._registry = undefined;\n });\n }\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Layer from 'effect/Layer';\nimport * as ManagedRuntime from 'effect/ManagedRuntime';\n\nimport { AiService } from '@dxos/ai';\nimport { type SpaceId } from '@dxos/client/echo';\nimport { Database } from '@dxos/echo';\nimport { CredentialsService, type FunctionDefinition, QueueService } from '@dxos/functions';\nimport { FunctionInvocationServiceLayerTest } from '@dxos/functions-runtime/testing';\n\nimport { type FunctionsRuntimeProvider } from '../compute-graph-registry';\n\n/**\n * Minimal compute runtime provider for tests and Storybook.\n * Will cause errors if used for actual runtime.\n */\nexport const createMockedComputeRuntimeProvider = ({\n functions,\n}: { functions?: FunctionDefinition.Any[] } = {}): FunctionsRuntimeProvider => {\n return {\n getRuntime: (_spaceId: SpaceId) =>\n ManagedRuntime.make(\n FunctionInvocationServiceLayerTest({ functions }).pipe(\n Layer.provide(AiService.notAvailable),\n Layer.provide(CredentialsService.configuredLayer([])),\n Layer.provide(Database.Service.notAvailable),\n Layer.provide(QueueService.notAvailable),\n ),\n ),\n };\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { getDeep } from '@dxos/util';\nimport { type InterpreterState, type ProcedureAst } from '@dxos/vendor-hyperformula';\nimport { FunctionArgumentType } from '@dxos/vendor-hyperformula';\n\nimport { type ComputeGraphPlugin } from '../compute-graph-registry';\nimport { type AsyncFunction, AsyncFunctionPlugin } from '../functions';\nimport { parseNumberString } from '../util';\n\n/**\n * Testing functions run locally (not run via EDGE).\n * https://hyperformula.handsontable.com/guide/custom-functions.html#add-a-simple-custom-function\n */\nexport class TestPlugin extends AsyncFunctionPlugin {\n /**\n * Simple local function returns input value.\n */\n test(ast: ProcedureAst, state: InterpreterState) {\n const handler: AsyncFunction = async (_value) => {\n return _value;\n };\n\n return this.runAsyncFunction(ast, state, handler);\n }\n\n /**\n * Simple local function returns random number.\n */\n random(ast: ProcedureAst, state: InterpreterState) {\n const handler: AsyncFunction = async () => {\n return Math.random();\n };\n\n return this.runAsyncFunction(ast, state, handler);\n }\n\n /**\n * Async HTTP function.\n */\n crypto(ast: ProcedureAst, state: InterpreterState) {\n const handler: AsyncFunction = async (_currency) => {\n const currency = (_currency || 'USD').toUpperCase();\n const result = await fetch(`https://api.coindesk.com/v1/bpi/currentprice/${currency}.json`);\n const data = await result.json();\n const rate = getDeep<string>(data, ['bpi', currency, 'rate']);\n if (!rate) {\n return NaN;\n }\n\n return parseNumberString(rate);\n };\n\n return this.runAsyncFunction(ast, state, handler, { ttl: 10_000 });\n }\n}\n\nTestPlugin.implementedFunctions = {\n TEST: {\n method: 'test',\n parameters: [{ argumentType: FunctionArgumentType.NUMBER, optionalArg: false }],\n isVolatile: true,\n },\n\n RANDOM: {\n method: 'random',\n parameters: [],\n isVolatile: true,\n },\n\n CRYPTO: {\n method: 'crypto',\n parameters: [{ argumentType: FunctionArgumentType.STRING, optionalArg: true }],\n isVolatile: true,\n },\n};\n\nexport const TestPluginTranslations = {\n enGB: {\n TEST: 'Returns input value',\n RANDOM: 'Random number',\n CRYPTO: 'Crypto token value',\n },\n enUS: {\n TEST: 'Returns input value',\n RANDOM: 'Random number',\n CRYPTO: 'Crypto token value',\n },\n};\n\nexport const testFunctionPlugins: ComputeGraphPlugin[] = [\n {\n plugin: TestPlugin,\n translations: TestPluginTranslations,\n },\n];\n", "//\n// Copyright 2024 DXOS.org\n//\n\n// TODO(burdon): Factor out.\nexport const parseNumberString = (str: string): number => {\n return parseFloat(str.replace(/[^\\d.]/g, ''));\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { HyperFormula } from '@dxos/vendor-hyperformula';\n\nexport const getRegisteredFunctionNames = () => {\n return HyperFormula.buildEmpty({ licenseKey: 'gpl-v3' }).getRegisteredFunctionNames();\n};\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["Client", "Resource", "invariant", "Layer", "ManagedRuntime", "AiService", "Database", "CredentialsService", "QueueService", "FunctionInvocationServiceLayerTest", "createMockedComputeRuntimeProvider", "functions", "getRuntime", "_spaceId", "make", "FunctionInvocationServiceLayerTest", "pipe", "provide", "AiService", "notAvailable", "CredentialsService", "configuredLayer", "Database", "Service", "QueueService", "TestBuilder", "Resource", "_client", "_registry", "_options", "ctx", "_ctx", "client", "invariant", "registry", "_open", "Client", "initialize", "halo", "createIdentity", "onDispose", "destroy", "undefined", "ComputeGraphRegistry", "computeRuntime", "createMockedComputeRuntimeProvider", "open", "close", "getDeep", "FunctionArgumentType", "parseNumberString", "str", "parseFloat", "replace", "TestPlugin", "AsyncFunctionPlugin", "test", "ast", "state", "handler", "_value", "runAsyncFunction", "random", "Math", "crypto", "_currency", "currency", "toUpperCase", "result", "fetch", "data", "json", "rate", "getDeep", "NaN", "parseNumberString", "ttl", "implementedFunctions", "TEST", "method", "parameters", "argumentType", "FunctionArgumentType", "NUMBER", "optionalArg", "isVolatile", "RANDOM", "CRYPTO", "STRING", "TestPluginTranslations", "enGB", "enUS", "testFunctionPlugins", "plugin", "translations", "HyperFormula", "getRegisteredFunctionNames", "HyperFormula", "buildEmpty", "licenseKey"]
|
|
7
7
|
}
|
|
@@ -276,11 +276,10 @@ var AsyncFunctionPlugin = class extends FunctionPlugin {
|
|
|
276
276
|
};
|
|
277
277
|
|
|
278
278
|
// src/functions/edge-function.ts
|
|
279
|
-
import { effect } from "@preact/signals-core";
|
|
280
279
|
import * as Effect from "effect/Effect";
|
|
281
280
|
import * as SchemaAST from "effect/SchemaAST";
|
|
282
281
|
import { Filter } from "@dxos/client/echo";
|
|
283
|
-
import { JsonSchema } from "@dxos/echo";
|
|
282
|
+
import { JsonSchema, Obj } from "@dxos/echo";
|
|
284
283
|
import { Function, FunctionInvocationService, TracingService } from "@dxos/functions";
|
|
285
284
|
import { FunctionDefinition } from "@dxos/functions";
|
|
286
285
|
import { log as log2 } from "@dxos/log";
|
|
@@ -296,7 +295,7 @@ var EdgeFunctionPlugin = class extends AsyncFunctionPlugin {
|
|
|
296
295
|
if (!space) {
|
|
297
296
|
return new CellError2(ErrorType2.REF, "Missing space");
|
|
298
297
|
}
|
|
299
|
-
const
|
|
298
|
+
const [fn] = await space.db.query(Filter.type(Function.Function, {
|
|
300
299
|
binding
|
|
301
300
|
})).run();
|
|
302
301
|
if (!fn) {
|
|
@@ -304,23 +303,22 @@ var EdgeFunctionPlugin = class extends AsyncFunctionPlugin {
|
|
|
304
303
|
binding
|
|
305
304
|
}, {
|
|
306
305
|
F: __dxlog_file3,
|
|
307
|
-
L:
|
|
306
|
+
L: 40,
|
|
308
307
|
S: this,
|
|
309
308
|
C: (f, a) => f(...a)
|
|
310
309
|
});
|
|
311
310
|
return new CellError2(ErrorType2.REF, "Function not found");
|
|
312
311
|
}
|
|
313
312
|
if (subscribe) {
|
|
314
|
-
const unsubscribe =
|
|
313
|
+
const unsubscribe = Obj.subscribe(fn, () => {
|
|
315
314
|
log2("function changed", {
|
|
316
315
|
fn
|
|
317
316
|
}, {
|
|
318
317
|
F: __dxlog_file3,
|
|
319
|
-
L:
|
|
318
|
+
L: 46,
|
|
320
319
|
S: this,
|
|
321
320
|
C: (f, a) => f(...a)
|
|
322
321
|
});
|
|
323
|
-
const _ = fn?.version;
|
|
324
322
|
this.runAsyncFunction(ast, state, handler(false), {
|
|
325
323
|
ttl: FUNCTION_TTL
|
|
326
324
|
});
|
|
@@ -2781,12 +2779,11 @@ var defaultFunctions = [
|
|
|
2781
2779
|
];
|
|
2782
2780
|
|
|
2783
2781
|
// src/compute-graph.ts
|
|
2784
|
-
import { effect as effect2 } from "@preact/signals-core";
|
|
2785
2782
|
import { Event as Event2 } from "@dxos/async";
|
|
2786
2783
|
import { Filter as Filter2 } from "@dxos/client/echo";
|
|
2787
2784
|
import { FQ_ID_LENGTH } from "@dxos/client/echo";
|
|
2788
2785
|
import { Resource as Resource2 } from "@dxos/context";
|
|
2789
|
-
import { Obj } from "@dxos/echo";
|
|
2786
|
+
import { Obj as Obj2 } from "@dxos/echo";
|
|
2790
2787
|
import { Function as Function2 } from "@dxos/functions";
|
|
2791
2788
|
import { invariant as invariant2 } from "@dxos/invariant";
|
|
2792
2789
|
import { PublicKey } from "@dxos/keys";
|
|
@@ -2876,7 +2873,7 @@ var ComputeGraph = class extends Resource2 {
|
|
|
2876
2873
|
getOrCreateNode(name) {
|
|
2877
2874
|
invariant2(name.length, void 0, {
|
|
2878
2875
|
F: __dxlog_file4,
|
|
2879
|
-
L:
|
|
2876
|
+
L: 133,
|
|
2880
2877
|
S: this,
|
|
2881
2878
|
A: [
|
|
2882
2879
|
"name.length",
|
|
@@ -2889,7 +2886,7 @@ var ComputeGraph = class extends Resource2 {
|
|
|
2889
2886
|
sheet: name
|
|
2890
2887
|
}, {
|
|
2891
2888
|
F: __dxlog_file4,
|
|
2892
|
-
L:
|
|
2889
|
+
L: 135,
|
|
2893
2890
|
S: this,
|
|
2894
2891
|
C: (f, a) => f(...a)
|
|
2895
2892
|
});
|
|
@@ -2898,7 +2895,7 @@ var ComputeGraph = class extends Resource2 {
|
|
|
2898
2895
|
const sheetId = this._hf.getSheetId(name);
|
|
2899
2896
|
invariant2(sheetId !== void 0, void 0, {
|
|
2900
2897
|
F: __dxlog_file4,
|
|
2901
|
-
L:
|
|
2898
|
+
L: 140,
|
|
2902
2899
|
S: this,
|
|
2903
2900
|
A: [
|
|
2904
2901
|
"sheetId !== undefined",
|
|
@@ -2922,7 +2919,7 @@ var ComputeGraph = class extends Resource2 {
|
|
|
2922
2919
|
}).filter(isNonNullable2);
|
|
2923
2920
|
for (const obj of objects) {
|
|
2924
2921
|
if (obj.name === name) {
|
|
2925
|
-
const type =
|
|
2922
|
+
const type = Obj2.getTypename(obj);
|
|
2926
2923
|
return `'${createSheetName({
|
|
2927
2924
|
type,
|
|
2928
2925
|
id: obj.id
|
|
@@ -2954,7 +2951,7 @@ var ComputeGraph = class extends Resource2 {
|
|
|
2954
2951
|
}
|
|
2955
2952
|
const fn = this._remoteFunctions.find((fn2) => fn2.binding === binding);
|
|
2956
2953
|
if (fn) {
|
|
2957
|
-
const id =
|
|
2954
|
+
const id = Obj2.getDXN(fn).toString();
|
|
2958
2955
|
return `${id}(${args})`;
|
|
2959
2956
|
} else {
|
|
2960
2957
|
return match;
|
|
@@ -2971,7 +2968,7 @@ var ComputeGraph = class extends Resource2 {
|
|
|
2971
2968
|
if (id.length !== FQ_ID_LENGTH) {
|
|
2972
2969
|
return match;
|
|
2973
2970
|
}
|
|
2974
|
-
const fn = this._remoteFunctions.find((fn2) =>
|
|
2971
|
+
const fn = this._remoteFunctions.find((fn2) => Obj2.getDXN(fn2).toString() === id);
|
|
2975
2972
|
if (fn?.binding) {
|
|
2976
2973
|
return `${fn.binding}(${args})`;
|
|
2977
2974
|
} else {
|
|
@@ -2987,17 +2984,13 @@ var ComputeGraph = class extends Resource2 {
|
|
|
2987
2984
|
async _open() {
|
|
2988
2985
|
if (this._space) {
|
|
2989
2986
|
const query = this._space.db.query(Filter2.type(Function2.Function));
|
|
2990
|
-
const unsubscribe = query.subscribe()
|
|
2991
|
-
|
|
2992
|
-
this._remoteFunctions = query.objects.filter(({ binding }) => binding);
|
|
2987
|
+
const unsubscribe = query.subscribe(() => {
|
|
2988
|
+
this._remoteFunctions = query.results.filter((fn) => fn.binding);
|
|
2993
2989
|
this.update.emit({
|
|
2994
2990
|
type: "functionsUpdated"
|
|
2995
2991
|
});
|
|
2996
2992
|
});
|
|
2997
|
-
this._ctx.onDispose(
|
|
2998
|
-
unsubscribe();
|
|
2999
|
-
dispose();
|
|
3000
|
-
});
|
|
2993
|
+
this._ctx.onDispose(unsubscribe);
|
|
3001
2994
|
}
|
|
3002
2995
|
}
|
|
3003
2996
|
async _close() {
|
|
@@ -3112,4 +3105,4 @@ export {
|
|
|
3112
3105
|
defaultOptions,
|
|
3113
3106
|
ComputeGraphRegistry
|
|
3114
3107
|
};
|
|
3115
|
-
//# sourceMappingURL=chunk-
|
|
3108
|
+
//# sourceMappingURL=chunk-2MATJWLB.mjs.map
|