@dxos/compute 0.8.4-main.5ea62a8 → 0.8.4-main.66e292d
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-OFPP3ZEX.mjs → chunk-ILJV45WQ.mjs} +159 -186
- package/dist/lib/browser/{chunk-OFPP3ZEX.mjs.map → chunk-ILJV45WQ.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +33 -22
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- package/dist/lib/node-esm/{chunk-6GVHPKPB.mjs → chunk-QDJ6J7GT.mjs} +159 -186
- package/dist/lib/node-esm/{chunk-6GVHPKPB.mjs.map → chunk-QDJ6J7GT.mjs.map} +3 -3
- 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 +33 -22
- package/dist/lib/node-esm/testing/index.mjs.map +4 -4
- package/dist/types/src/compute-graph-registry.d.ts +9 -6
- package/dist/types/src/compute-graph-registry.d.ts.map +1 -1
- package/dist/types/src/compute-graph-registry.test.d.ts +2 -0
- package/dist/types/src/compute-graph-registry.test.d.ts.map +1 -0
- package/dist/types/src/compute-graph.d.ts +5 -2
- package/dist/types/src/compute-graph.d.ts.map +1 -1
- package/dist/types/src/compute-node.d.ts +1 -2
- package/dist/types/src/compute-node.d.ts.map +1 -1
- package/dist/types/src/functions/async-function.d.ts +13 -11
- package/dist/types/src/functions/async-function.d.ts.map +1 -1
- package/dist/types/src/functions/edge-function.d.ts +3 -3
- package/dist/types/src/functions/edge-function.d.ts.map +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +1 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-builder.d.ts +1 -1
- package/dist/types/src/testing/test-builder.d.ts.map +1 -1
- package/dist/types/src/testing/test-plugin.d.ts +4 -5
- package/dist/types/src/testing/test-plugin.d.ts.map +1 -1
- package/dist/types/src/testing/test-runtime.d.ts +10 -0
- package/dist/types/src/testing/test-runtime.d.ts.map +1 -0
- package/dist/types/src/types/hyperformula.d.ts +3 -6
- package/dist/types/src/types/hyperformula.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +23 -29
- package/src/compute-graph-registry.test.ts +154 -0
- package/src/compute-graph-registry.ts +19 -13
- package/src/compute-graph.test.ts +31 -13
- package/src/compute-graph.ts +25 -16
- package/src/compute-node.ts +2 -5
- package/src/functions/async-function.ts +20 -15
- package/src/functions/edge-function.ts +26 -24
- package/src/hyperformula.test.ts +1 -1
- package/src/index.ts +0 -27
- package/src/testing/index.ts +1 -0
- package/src/testing/test-builder.ts +8 -2
- package/src/testing/test-plugin.ts +2 -5
- package/src/testing/test-runtime.ts +33 -0
- package/src/testing/util.ts +1 -1
- package/src/types/hyperformula.ts +8 -8
- package/dist/vendor/hyperformula.mjs +0 -36400
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/types/hyperformula.ts":{"bytes":1756,"imports":[{"path":"#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":6212,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/functions/async-function.ts":{"bytes":19656,"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":"#hyperformula","kind":"import-statement","external":true}],"format":"esm"},"src/functions/edge-function.ts":{"bytes":15497,"imports":[{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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":"#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":29123,"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-schema","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":"#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":9666,"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":"#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":2799,"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-builder.ts":{"bytes":5773,"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"}],"format":"esm"},"src/util.ts":{"bytes":868,"imports":[],"format":"esm"},"src/testing/test-plugin.ts":{"bytes":8915,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#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":1074,"imports":[{"path":"hyperformula","kind":"import-statement","external":true}],"format":"esm"},"src/testing/index.ts":{"bytes":647,"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"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-6GVHPKPB.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":1193},"dist/lib/node-esm/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7932},"dist/lib/node-esm/testing/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-6GVHPKPB.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":"@dxos/util","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"hyperformula","kind":"import-statement","external":true}],"exports":["TestBuilder","TestPlugin","TestPluginTranslations","getRegisteredFunctionNames","testFunctionPlugins"],"entryPoint":"src/testing/index.ts","inputs":{"src/testing/test-builder.ts":{"bytesInOutput":1653},"src/testing/index.ts":{"bytesInOutput":0},"src/testing/test-plugin.ts":{"bytesInOutput":1961},"src/util.ts":{"bytesInOutput":87},"src/testing/util.ts":{"bytesInOutput":184}},"bytes":4352},"dist/lib/node-esm/chunk-6GVHPKPB.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":137755},"dist/lib/node-esm/chunk-6GVHPKPB.mjs":{"imports":[{"path":"#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":"#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":"#hyperformula","kind":"import-statement","external":true},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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":"#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-schema","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":"#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":"#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":71},"src/types/types.ts":{"bytesInOutput":2054},"src/types/index.ts":{"bytesInOutput":0},"src/compute-node.ts":{"bytesInOutput":1379},"src/functions/async-function.ts":{"bytesInOutput":4707},"src/functions/edge-function.ts":{"bytesInOutput":3865},"src/functions/function-defs.ts":{"bytesInOutput":68677},"src/functions/index.ts":{"bytesInOutput":0},"src/compute-graph.ts":{"bytesInOutput":7260},"src/compute-graph-registry.ts":{"bytesInOutput":2194}},"bytes":91105}}}
|
|
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/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-QDJ6J7GT.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":1193},"dist/lib/node-esm/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10163},"dist/lib/node-esm/testing/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-QDJ6J7GT.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":5003},"dist/lib/node-esm/chunk-QDJ6J7GT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":138316},"dist/lib/node-esm/chunk-QDJ6J7GT.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":89976}}}
|
|
@@ -2,34 +2,43 @@ import { createRequire } from 'node:module';const require = createRequire(import
|
|
|
2
2
|
import {
|
|
3
3
|
AsyncFunctionPlugin,
|
|
4
4
|
ComputeGraphRegistry
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-QDJ6J7GT.mjs";
|
|
6
6
|
|
|
7
7
|
// src/testing/test-builder.ts
|
|
8
8
|
import { Client } from "@dxos/client";
|
|
9
9
|
import { Resource } from "@dxos/context";
|
|
10
10
|
import { invariant } from "@dxos/invariant";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
11
|
+
|
|
12
|
+
// src/testing/test-runtime.ts
|
|
13
|
+
import * as Layer from "effect/Layer";
|
|
14
|
+
import * as ManagedRuntime from "effect/ManagedRuntime";
|
|
15
|
+
import { AiService } from "@dxos/ai";
|
|
16
|
+
import { CredentialsService, DatabaseService, QueueService } from "@dxos/functions";
|
|
17
|
+
import { FunctionInvocationServiceLayerTest } from "@dxos/functions-runtime/testing";
|
|
18
|
+
var createMockedComputeRuntimeProvider = ({ functions } = {}) => {
|
|
19
|
+
return {
|
|
20
|
+
getRuntime: (_spaceId) => ManagedRuntime.make(FunctionInvocationServiceLayerTest({
|
|
21
|
+
functions
|
|
22
|
+
}).pipe(Layer.provide(AiService.notAvailable), Layer.provide(CredentialsService.configuredLayer([])), Layer.provide(DatabaseService.notAvailable), Layer.provide(QueueService.notAvailable)))
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// src/testing/test-builder.ts
|
|
24
27
|
var __dxlog_file = "/__w/dxos/dxos/packages/core/compute/src/testing/test-builder.ts";
|
|
25
28
|
var TestBuilder = class extends Resource {
|
|
29
|
+
_options;
|
|
30
|
+
_client;
|
|
31
|
+
_registry;
|
|
32
|
+
constructor(_options = {}) {
|
|
33
|
+
super(), this._options = _options;
|
|
34
|
+
}
|
|
26
35
|
get ctx() {
|
|
27
36
|
return this._ctx;
|
|
28
37
|
}
|
|
29
38
|
get client() {
|
|
30
39
|
invariant(this._client, void 0, {
|
|
31
40
|
F: __dxlog_file,
|
|
32
|
-
L:
|
|
41
|
+
L: 29,
|
|
33
42
|
S: this,
|
|
34
43
|
A: [
|
|
35
44
|
"this._client",
|
|
@@ -41,7 +50,7 @@ var TestBuilder = class extends Resource {
|
|
|
41
50
|
get registry() {
|
|
42
51
|
invariant(this._registry, void 0, {
|
|
43
52
|
F: __dxlog_file,
|
|
44
|
-
L:
|
|
53
|
+
L: 34,
|
|
45
54
|
S: this,
|
|
46
55
|
A: [
|
|
47
56
|
"this._registry",
|
|
@@ -59,7 +68,11 @@ var TestBuilder = class extends Resource {
|
|
|
59
68
|
await client.destroy();
|
|
60
69
|
this._client = void 0;
|
|
61
70
|
});
|
|
62
|
-
const registry = new ComputeGraphRegistry(
|
|
71
|
+
const registry = new ComputeGraphRegistry({
|
|
72
|
+
...this._options,
|
|
73
|
+
// Provide a default runtime provider for tests if not supplied.
|
|
74
|
+
computeRuntime: this._options.computeRuntime ?? createMockedComputeRuntimeProvider()
|
|
75
|
+
});
|
|
63
76
|
await registry.open();
|
|
64
77
|
this._registry = registry;
|
|
65
78
|
this._ctx.onDispose(async () => {
|
|
@@ -67,14 +80,11 @@ var TestBuilder = class extends Resource {
|
|
|
67
80
|
this._registry = void 0;
|
|
68
81
|
});
|
|
69
82
|
}
|
|
70
|
-
constructor(_options = {}) {
|
|
71
|
-
super(), _define_property(this, "_options", void 0), _define_property(this, "_client", void 0), _define_property(this, "_registry", void 0), this._options = _options;
|
|
72
|
-
}
|
|
73
83
|
};
|
|
74
84
|
|
|
75
85
|
// src/testing/test-plugin.ts
|
|
76
86
|
import { getDeep } from "@dxos/util";
|
|
77
|
-
import { FunctionArgumentType } from "
|
|
87
|
+
import { FunctionArgumentType } from "@dxos/vendor-hyperformula";
|
|
78
88
|
|
|
79
89
|
// src/util.ts
|
|
80
90
|
var parseNumberString = (str) => {
|
|
@@ -171,7 +181,7 @@ var testFunctionPlugins = [
|
|
|
171
181
|
];
|
|
172
182
|
|
|
173
183
|
// src/testing/util.ts
|
|
174
|
-
import { HyperFormula } from "hyperformula";
|
|
184
|
+
import { HyperFormula } from "@dxos/vendor-hyperformula";
|
|
175
185
|
var getRegisteredFunctionNames = () => {
|
|
176
186
|
return HyperFormula.buildEmpty({
|
|
177
187
|
licenseKey: "gpl-v3"
|
|
@@ -181,6 +191,7 @@ export {
|
|
|
181
191
|
TestBuilder,
|
|
182
192
|
TestPlugin,
|
|
183
193
|
TestPluginTranslations,
|
|
194
|
+
createMockedComputeRuntimeProvider,
|
|
184
195
|
getRegisteredFunctionNames,
|
|
185
196
|
testFunctionPlugins
|
|
186
197
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/testing/test-builder.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\nexport type TestBuilderOptions = ClientOptions & ComputeGraphOptions
|
|
5
|
-
"mappings": ";;;;;;;AAIA,SAASA,cAAkC;AAC3C,SAAuBC,gBAAgB;AACvC,SAASC,iBAAiB
|
|
6
|
-
"names": ["Client", "Resource", "invariant", "TestBuilder", "Resource", "
|
|
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, DatabaseService, 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(DatabaseService.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": ";;;;;;;AAIA,SAASA,cAAkC;AAC3C,SAAuBC,gBAAgB;AACvC,SAASC,iBAAiB;;;ACF1B,YAAYC,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AC5EC,YAAY;EACd;AACF;AAEO,IAAMI,yBAAyB;EACpCC,MAAM;IACJZ,MAAM;IACNQ,QAAQ;IACRC,QAAQ;EACV;EACAI,MAAM;IACJb,MAAM;IACNQ,QAAQ;IACRC,QAAQ;EACV;AACF;AAEO,IAAMK,sBAA4C;EACvD;IACEC,QAAQvC;IACRwC,cAAcL;EAChB;;;;AE5FF,SAASM,oBAAoB;AAEtB,IAAMC,6BAA6B,MAAA;AACxC,SAAOC,aAAaC,WAAW;IAAEC,YAAY;EAAS,CAAA,EAAGH,2BAA0B;AACrF;",
|
|
6
|
+
"names": ["Client", "Resource", "invariant", "Layer", "ManagedRuntime", "AiService", "CredentialsService", "DatabaseService", "QueueService", "FunctionInvocationServiceLayerTest", "createMockedComputeRuntimeProvider", "functions", "getRuntime", "_spaceId", "make", "FunctionInvocationServiceLayerTest", "pipe", "provide", "AiService", "notAvailable", "CredentialsService", "configuredLayer", "DatabaseService", "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
|
}
|
|
@@ -1,31 +1,34 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { ConfigParams } from 'hyperformula/typings/ConfigParams';
|
|
3
|
-
import type { FunctionTranslationsPackage } from 'hyperformula/typings/interpreter';
|
|
1
|
+
import type * as ManagedRuntime from 'effect/ManagedRuntime';
|
|
4
2
|
import { type Space, type SpaceId } from '@dxos/client/echo';
|
|
5
3
|
import { Resource } from '@dxos/context';
|
|
4
|
+
import { type FunctionInvocationService } from '@dxos/functions';
|
|
5
|
+
import type { ConfigParams, FunctionPluginDefinition, FunctionTranslationsPackage } from '@dxos/vendor-hyperformula';
|
|
6
6
|
import { ComputeGraph } from './compute-graph';
|
|
7
7
|
import { type FunctionContextOptions } from './functions';
|
|
8
8
|
export type ComputeGraphPlugin = {
|
|
9
9
|
plugin: FunctionPluginDefinition;
|
|
10
10
|
translations: FunctionTranslationsPackage;
|
|
11
11
|
};
|
|
12
|
+
export type FunctionsRuntimeProvider = {
|
|
13
|
+
getRuntime(spaceId: SpaceId): ManagedRuntime.ManagedRuntime<FunctionInvocationService, never>;
|
|
14
|
+
};
|
|
12
15
|
export type ComputeGraphOptions = {
|
|
13
16
|
plugins?: ComputeGraphPlugin[];
|
|
17
|
+
computeRuntime: FunctionsRuntimeProvider;
|
|
14
18
|
} & Partial<FunctionContextOptions> & Partial<ConfigParams>;
|
|
15
|
-
export declare const defaultOptions: ComputeGraphOptions;
|
|
16
19
|
export declare const defaultPlugins: ComputeGraphPlugin[];
|
|
20
|
+
export declare const defaultOptions: Partial<ComputeGraphOptions>;
|
|
17
21
|
/**
|
|
18
22
|
* Manages a collection of ComputeGraph instances for each space.
|
|
19
23
|
*
|
|
20
24
|
* [ComputePlugin] => [ComputeGraphRegistry] => [ComputeGraph(Space)] => [ComputeNode(Object)]
|
|
21
25
|
*
|
|
22
26
|
* NOTE: The ComputeGraphRegistry manages the hierarchy of resources via its root Context.
|
|
23
|
-
* NOTE: The package.json file defines the packaged #hyperformula module.
|
|
24
27
|
*/
|
|
25
28
|
export declare class ComputeGraphRegistry extends Resource {
|
|
26
29
|
private readonly _graphs;
|
|
27
30
|
private readonly _options;
|
|
28
|
-
constructor(options
|
|
31
|
+
constructor(options: ComputeGraphOptions);
|
|
29
32
|
getGraph(spaceId: SpaceId): ComputeGraph | undefined;
|
|
30
33
|
getOrCreateGraph(space: Space): ComputeGraph;
|
|
31
34
|
createGraph(space: Space): ComputeGraph;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute-graph-registry.d.ts","sourceRoot":"","sources":["../../../src/compute-graph-registry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"compute-graph-registry.d.ts","sourceRoot":"","sources":["../../../src/compute-graph-registry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAG7D,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAGjE,OAAO,KAAK,EAAE,YAAY,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAGrH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAsD,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE9G,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,wBAAwB,CAAC;IACjC,YAAY,EAAE,2BAA2B,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,cAAc,CAAC,cAAc,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;CAC/F,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC/B,cAAc,EAAE,wBAAwB,CAAC;CAC1C,GAAG,OAAO,CAAC,sBAAsB,CAAC,GACjC,OAAO,CAAC,YAAY,CAAC,CAAC;AAExB,eAAO,MAAM,cAAc,EAAE,kBAAkB,EAK9C,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC,mBAAmB,CAEvD,CAAC;AAEF;;;;;;GAMG;AAEH,qBAAa,oBAAqB,SAAQ,QAAQ;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoC;IAC5D,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAsB;gBAEnC,OAAO,EAAE,mBAAmB;IASxC,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,GAAG,SAAS;IAIpD,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY;IAU5C,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY;cAWd,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CAMjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compute-graph-registry.test.d.ts","sourceRoot":"","sources":["../../../src/compute-graph-registry.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type * as ManagedRuntime from 'effect/ManagedRuntime';
|
|
1
2
|
import { Event } from '@dxos/async';
|
|
2
3
|
import { type Space } from '@dxos/client/echo';
|
|
3
4
|
import { Resource } from '@dxos/context';
|
|
4
|
-
import { type
|
|
5
|
+
import { type FunctionInvocationService } from '@dxos/functions';
|
|
6
|
+
import { type HyperFormula } from '@dxos/vendor-hyperformula';
|
|
5
7
|
import { ComputeNode } from './compute-node';
|
|
6
8
|
import { FunctionContext, type FunctionContextOptions, type FunctionDefinition } from './functions';
|
|
7
9
|
type ObjectRef = {
|
|
@@ -23,6 +25,7 @@ export type ComputeGraphEvent = 'functionsUpdated' | 'valuesUpdated';
|
|
|
23
25
|
*/
|
|
24
26
|
export declare class ComputeGraph extends Resource {
|
|
25
27
|
private readonly _hf;
|
|
28
|
+
private readonly _runtime;
|
|
26
29
|
private readonly _space?;
|
|
27
30
|
private readonly _options?;
|
|
28
31
|
readonly id: string;
|
|
@@ -32,7 +35,7 @@ export declare class ComputeGraph extends Resource {
|
|
|
32
35
|
type: ComputeGraphEvent;
|
|
33
36
|
}>;
|
|
34
37
|
readonly context: FunctionContext;
|
|
35
|
-
constructor(_hf: HyperFormula, _space?: Space | undefined, _options?: Partial<FunctionContextOptions> | undefined);
|
|
38
|
+
constructor(_hf: HyperFormula, _runtime: ManagedRuntime.ManagedRuntime<FunctionInvocationService, never>, _space?: Space | undefined, _options?: Partial<FunctionContextOptions> | undefined);
|
|
36
39
|
get hf(): HyperFormula;
|
|
37
40
|
getFunctions({ standard, echo }?: {
|
|
38
41
|
standard?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute-graph.d.ts","sourceRoot":"","sources":["../../../src/compute-graph.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compute-graph.d.ts","sourceRoot":"","sources":["../../../src/compute-graph.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAE7D,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAU,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAY,KAAK,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAM3E,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAElF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAEL,eAAe,EACf,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EAExB,MAAM,aAAa,CAAC;AASrB,KAAK,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9C;;;GAGG;A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AAS;cAsBpC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;cAiBtB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CAKjD"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { type Listeners } from 'hyperformula/typings/Emitter';
|
|
2
|
-
import { type ExportedCellChange } from 'hyperformula/typings/Exporter';
|
|
3
1
|
import { Event } from '@dxos/async';
|
|
4
2
|
import { Resource } from '@dxos/context';
|
|
3
|
+
import { type ExportedCellChange, type Listeners } from '@dxos/vendor-hyperformula';
|
|
5
4
|
import { type ComputeGraph } from './compute-graph';
|
|
6
5
|
import { type CellAddress, type CellScalarValue } from './types';
|
|
7
6
|
export type ComputeNodeEvent = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute-node.d.ts","sourceRoot":"","sources":["../../../src/compute-node.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"compute-node.d.ts","sourceRoot":"","sources":["../../../src/compute-node.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGpF,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAa,MAAM,SAAS,CAAC;AAE5E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,SAAS,CAAC;IACtB,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B,CAAC;AAEF;;GAEG;AAEH,qBAAa,WAAY,SAAQ,QAAQ;IAIrC,OAAO,CAAC,QAAQ,CAAC,MAAM;aACP,OAAO,EAAE,MAAM;IAJjC,SAAgB,MAAM,0BAAiC;gBAGpC,MAAM,EAAE,YAAY,EACrB,OAAO,EAAE,MAAM;IAKjC,IAAI,KAAK,iBAER;IAED,KAAK,IAAI,IAAI;IAIb,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,eAAe;IAS5C,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,eAAe,GAAG,IAAI;cAMhC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAIhD"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { type InterpreterState } from 'hyperformula/typings/interpreter/InterpreterState';
|
|
3
|
-
import { type InterpreterValue } from 'hyperformula/typings/interpreter/InterpreterValue';
|
|
4
|
-
import { type ProcedureAst } from 'hyperformula/typings/parser';
|
|
1
|
+
import type * as ManagedRuntime from 'effect/ManagedRuntime';
|
|
5
2
|
import { type CleanupFn } from '@dxos/async';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import type { Space } from '@dxos/client/echo';
|
|
4
|
+
import { type FunctionInvocationService } from '@dxos/functions';
|
|
5
|
+
import type { RawInterpreterValue, SimpleCellAddress } from '@dxos/vendor-hyperformula';
|
|
6
|
+
import type { InterpreterState } from '@dxos/vendor-hyperformula';
|
|
7
|
+
import type { InterpreterValue } from '@dxos/vendor-hyperformula';
|
|
8
|
+
import type { ProcedureAst } from '@dxos/vendor-hyperformula';
|
|
9
|
+
import { FunctionPlugin, type HyperFormula } from '@dxos/vendor-hyperformula';
|
|
8
10
|
export type AsyncFunction = (...args: any) => Promise<InterpreterValue>;
|
|
9
11
|
export type FunctionUpdateEvent = {
|
|
10
12
|
name: string;
|
|
@@ -16,10 +18,9 @@ export type FunctionOptions = {
|
|
|
16
18
|
export type FunctionContextOptions = {
|
|
17
19
|
defaultTtl: number;
|
|
18
20
|
debounceDelay: number;
|
|
19
|
-
remoteFunctionUrl: string;
|
|
20
21
|
onUpdate?: (update: FunctionUpdateEvent) => void;
|
|
21
22
|
};
|
|
22
|
-
export declare const defaultFunctionContextOptions: FunctionContextOptions
|
|
23
|
+
export declare const defaultFunctionContextOptions: Pick<FunctionContextOptions, 'defaultTtl' | 'debounceDelay'>;
|
|
23
24
|
/**
|
|
24
25
|
* The context singleton for the model is passed into custom functions.
|
|
25
26
|
*
|
|
@@ -30,6 +31,7 @@ export declare const defaultFunctionContextOptions: FunctionContextOptions;
|
|
|
30
31
|
*/
|
|
31
32
|
export declare class FunctionContext {
|
|
32
33
|
private readonly _hf;
|
|
34
|
+
private readonly _runtime;
|
|
33
35
|
private readonly _space;
|
|
34
36
|
static createInvocationKey(name: string, ...args: any): string;
|
|
35
37
|
private readonly _cache;
|
|
@@ -38,13 +40,13 @@ export declare class FunctionContext {
|
|
|
38
40
|
private _invocations;
|
|
39
41
|
private readonly _options;
|
|
40
42
|
private readonly _onUpdate;
|
|
41
|
-
constructor(_hf: HyperFormula, _space: Space | undefined, _options?: Partial<FunctionContextOptions>);
|
|
43
|
+
constructor(_hf: HyperFormula, _runtime: ManagedRuntime.ManagedRuntime<FunctionInvocationService, never>, _space: Space | undefined, _options?: Partial<FunctionContextOptions>);
|
|
42
44
|
get space(): Space | undefined;
|
|
43
|
-
get remoteFunctionUrl(): string;
|
|
44
45
|
get info(): {
|
|
45
46
|
cache: number;
|
|
46
47
|
invocations: Record<string, number>;
|
|
47
48
|
};
|
|
49
|
+
get runtime(): ManagedRuntime.ManagedRuntime<FunctionInvocationService, never>;
|
|
48
50
|
flush(): void;
|
|
49
51
|
createSubscription(name: string, unsubscribe: CleanupFn): void;
|
|
50
52
|
/**
|
|
@@ -61,6 +63,6 @@ export declare class AsyncFunctionPlugin extends FunctionPlugin {
|
|
|
61
63
|
/**
|
|
62
64
|
* Immediately returns cached value then runs the async function.
|
|
63
65
|
*/
|
|
64
|
-
protected runAsyncFunction(ast: ProcedureAst, state: InterpreterState, cb: AsyncFunction, options?: FunctionOptions):
|
|
66
|
+
protected runAsyncFunction(ast: ProcedureAst, state: InterpreterState, cb: AsyncFunction, options?: FunctionOptions): RawInterpreterValue;
|
|
65
67
|
}
|
|
66
68
|
//# sourceMappingURL=async-function.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-function.d.ts","sourceRoot":"","sources":["../../../../src/functions/async-function.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"async-function.d.ts","sourceRoot":"","sources":["../../../../src/functions/async-function.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAG7D,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAEjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACxF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAoC,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAQhH,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAExE,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,iBAAiB,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE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AAc;IACrD,IAAI,OAAO,IACqB,eAAe,CAC9C;IAED;;OAEG;IACH,SAAS,CAAC,gBAAgB,CACxB,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,gBAAgB,EACvB,EAAE,EAAE,aAAa,EACjB,OAAO,CAAC,EAAE,eAAe,GACxB,mBAAmB;CAOvB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
1
|
+
import { type ProcedureAst } from '@dxos/vendor-hyperformula';
|
|
2
|
+
import { type InterpreterState } from '@dxos/vendor-hyperformula';
|
|
3
3
|
import { AsyncFunctionPlugin } from './async-function';
|
|
4
4
|
export declare const EDGE_FUNCTION_NAME = "DX";
|
|
5
5
|
/**
|
|
@@ -7,7 +7,7 @@ export declare const EDGE_FUNCTION_NAME = "DX";
|
|
|
7
7
|
* https://hyperformula.handsontable.com/guide/custom-functions.html#add-a-simple-custom-function
|
|
8
8
|
*/
|
|
9
9
|
export declare class EdgeFunctionPlugin extends AsyncFunctionPlugin {
|
|
10
|
-
dx(ast: ProcedureAst, state: InterpreterState): import("hyperformula
|
|
10
|
+
dx(ast: ProcedureAst, state: InterpreterState): import("@dxos/vendor-hyperformula").RawInterpreterValue;
|
|
11
11
|
}
|
|
12
12
|
export declare const EdgeFunctionPluginTranslations: {
|
|
13
13
|
enGB: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edge-function.d.ts","sourceRoot":"","sources":["../../../../src/functions/edge-function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"edge-function.d.ts","sourceRoot":"","sources":["../../../../src/functions/edge-function.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,OAAO,EAAsB,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE3E,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAIvC;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,mBAAmB;IACzD,EAAE,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB;CAsD9C;AAuBD,eAAO,MAAM,8BAA8B;;;;;;;CAO1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Client, type ClientOptions } from '@dxos/client';
|
|
2
2
|
import { type Context, Resource } from '@dxos/context';
|
|
3
3
|
import { type ComputeGraphOptions, ComputeGraphRegistry } from '../compute-graph-registry';
|
|
4
|
-
export type TestBuilderOptions = ClientOptions & ComputeGraphOptions
|
|
4
|
+
export type TestBuilderOptions = ClientOptions & Partial<ComputeGraphOptions>;
|
|
5
5
|
export declare class TestBuilder extends Resource {
|
|
6
6
|
private readonly _options;
|
|
7
7
|
private _client?;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-builder.d.ts","sourceRoot":"","sources":["../../../../src/testing/test-builder.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,KAAK,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGvD,OAAO,EAAE,KAAK,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"test-builder.d.ts","sourceRoot":"","sources":["../../../../src/testing/test-builder.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,KAAK,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGvD,OAAO,EAAE,KAAK,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAI3F,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAG9E,qBAAa,WAAY,SAAQ,QAAQ;IAI3B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAHrC,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,SAAS,CAAC,CAAuB;gBAEZ,QAAQ,GAAE,kBAAuB;IAI9D,IAAI,GAAG,IAAI,OAAO,CAEjB;IAED,IAAI,MAAM,IAAI,MAAM,CAGnB;IAED,IAAI,QAAQ,IAAI,oBAAoB,CAGnC;IAEc,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAsBtC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { type InterpreterState } from 'hyperformula
|
|
2
|
-
import { type ProcedureAst } from 'hyperformula/typings/parser';
|
|
1
|
+
import { type InterpreterState, type ProcedureAst } from '@dxos/vendor-hyperformula';
|
|
3
2
|
import { type ComputeGraphPlugin } from '../compute-graph-registry';
|
|
4
3
|
import { AsyncFunctionPlugin } from '../functions';
|
|
5
4
|
/**
|
|
@@ -10,15 +9,15 @@ export declare class TestPlugin extends AsyncFunctionPlugin {
|
|
|
10
9
|
/**
|
|
11
10
|
* Simple local function returns input value.
|
|
12
11
|
*/
|
|
13
|
-
test(ast: ProcedureAst, state: InterpreterState): import("hyperformula
|
|
12
|
+
test(ast: ProcedureAst, state: InterpreterState): import("@dxos/vendor-hyperformula").RawInterpreterValue;
|
|
14
13
|
/**
|
|
15
14
|
* Simple local function returns random number.
|
|
16
15
|
*/
|
|
17
|
-
random(ast: ProcedureAst, state: InterpreterState): import("hyperformula
|
|
16
|
+
random(ast: ProcedureAst, state: InterpreterState): import("@dxos/vendor-hyperformula").RawInterpreterValue;
|
|
18
17
|
/**
|
|
19
18
|
* Async HTTP function.
|
|
20
19
|
*/
|
|
21
|
-
crypto(ast: ProcedureAst, state: InterpreterState): import("hyperformula
|
|
20
|
+
crypto(ast: ProcedureAst, state: InterpreterState): import("@dxos/vendor-hyperformula").RawInterpreterValue;
|
|
22
21
|
}
|
|
23
22
|
export declare const TestPluginTranslations: {
|
|
24
23
|
enGB: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-plugin.d.ts","sourceRoot":"","sources":["../../../../src/testing/test-plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test-plugin.d.ts","sourceRoot":"","sources":["../../../../src/testing/test-plugin.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGrF,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAsB,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGvE;;;GAGG;AACH,qBAAa,UAAW,SAAQ,mBAAmB;IACjD;;OAEG;IACH,IAAI,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB;IAQ/C;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB;IAQjD;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB;CAelD;AAsBD,eAAO,MAAM,sBAAsB;;;;;;;;;;;CAWlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,kBAAkB,EAKnD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type FunctionDefinition } from '@dxos/functions';
|
|
2
|
+
import { type FunctionsRuntimeProvider } from '../compute-graph-registry';
|
|
3
|
+
/**
|
|
4
|
+
* Minimal compute runtime provider for tests and Storybook.
|
|
5
|
+
* Will cause errors if used for actual runtime.
|
|
6
|
+
*/
|
|
7
|
+
export declare const createMockedComputeRuntimeProvider: ({ functions, }?: {
|
|
8
|
+
functions?: FunctionDefinition.Any[];
|
|
9
|
+
}) => FunctionsRuntimeProvider;
|
|
10
|
+
//# sourceMappingURL=test-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-runtime.d.ts","sourceRoot":"","sources":["../../../../src/testing/test-runtime.ts"],"names":[],"mappings":"AASA,OAAO,EAAuC,KAAK,kBAAkB,EAAgB,MAAM,iBAAiB,CAAC;AAG7G,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,kCAAkC,GAAI,iBAEhD;IAAE,SAAS,CAAC,EAAE,kBAAkB,CAAC,GAAG,EAAE,CAAA;CAAO,KAAG,wBAYlD,CAAC"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { type SimpleCellRange } from 'hyperformula
|
|
2
|
-
import {
|
|
3
|
-
import { type SimpleDate, type SimpleDateTime } from 'hyperformula/typings/DateTimeHelper';
|
|
4
|
-
import { DetailedCellError, ExportedCellChange } from '#hyperformula';
|
|
1
|
+
import { type SimpleCellAddress, type SimpleCellRange, type SimpleDate, type SimpleDateTime } from '@dxos/vendor-hyperformula';
|
|
2
|
+
import { DetailedCellError, ExportedCellChange } from '@dxos/vendor-hyperformula';
|
|
5
3
|
/**
|
|
6
|
-
*
|
|
7
|
-
* so we pre-bundle hyperformula and place it in the vendor directory of this package.
|
|
4
|
+
* Re-exported from vendored hyperformula package.
|
|
8
5
|
*/
|
|
9
6
|
export { DetailedCellError, ExportedCellChange };
|
|
10
7
|
export type { SimpleCellRange, SimpleCellAddress, SimpleDate, SimpleDateTime };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hyperformula.d.ts","sourceRoot":"","sources":["../../../../src/types/hyperformula.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"hyperformula.d.ts","sourceRoot":"","sources":["../../../../src/types/hyperformula.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAElF;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,CAAC;AAEjD,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
|