@dxos/compute 0.8.3-staging.0fa589b → 0.8.4-main.28f8d3d
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-UGMCTYCW.mjs → chunk-X2FWMHD4.mjs} +53 -24
- package/dist/lib/browser/chunk-X2FWMHD4.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 +10 -7
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/{chunk-WIABMPQE.mjs → chunk-RP7HSSCA.mjs} +53 -24
- package/dist/lib/node-esm/chunk-RP7HSSCA.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 +10 -7
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/types/src/compute-graph-registry.d.ts +1 -1
- package/dist/types/src/compute-graph-registry.d.ts.map +1 -1
- package/dist/types/src/compute-graph.d.ts.map +1 -1
- package/dist/types/src/compute-node.d.ts.map +1 -1
- package/dist/types/src/functions/async-function.d.ts.map +1 -1
- package/dist/types/src/functions/edge-function.d.ts.map +1 -1
- package/dist/types/src/testing/test-plugin.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/vendor/hyperformula.mjs +10 -755
- package/package.json +25 -28
- package/src/compute-graph-registry.ts +2 -1
- package/src/compute-graph.test.ts +1 -0
- package/src/compute-graph.ts +4 -3
- package/src/compute-node.ts +1 -0
- package/src/functions/async-function.ts +2 -2
- package/src/functions/edge-function.ts +1 -0
- package/src/hyperformula.test.ts +1 -1
- package/src/testing/test-plugin.ts +1 -0
- package/src/types/types.test.ts +2 -2
- package/dist/lib/browser/chunk-UGMCTYCW.mjs.map +0 -7
- package/dist/lib/node/chunk-KCYHSFFU.cjs +0 -3120
- package/dist/lib/node/chunk-KCYHSFFU.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -77
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/testing/index.cjs +0 -188
- package/dist/lib/node/testing/index.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-WIABMPQE.mjs.map +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/core/compute/src/types/hyperformula.ts":{"bytes":1769,"imports":[{"path":"#hyperformula","kind":"import-statement","external":true}],"format":"esm"},"packages/core/compute/src/types/types.ts":{"bytes":9133,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/core/compute/src/types/index.ts":{"bytes":560,"imports":[{"path":"packages/core/compute/src/types/hyperformula.ts","kind":"import-statement","original":"./hyperformula"},{"path":"packages/core/compute/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/core/compute/src/compute-node.ts":{"bytes":5792,"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":"packages/core/compute/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/core/compute/src/functions/async-function.ts":{"bytes":18935,"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"},"packages/core/compute/src/functions/edge-function.ts":{"bytes":15512,"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":"packages/core/compute/src/functions/async-function.ts","kind":"import-statement","original":"./async-function"}],"format":"esm"},"packages/core/compute/src/functions/function-defs.ts":{"bytes":201451,"imports":[],"format":"esm"},"packages/core/compute/src/functions/index.ts":{"bytes":695,"imports":[{"path":"packages/core/compute/src/functions/async-function.ts","kind":"import-statement","original":"./async-function"},{"path":"packages/core/compute/src/functions/edge-function.ts","kind":"import-statement","original":"./edge-function"},{"path":"packages/core/compute/src/functions/function-defs.ts","kind":"import-statement","original":"./function-defs"}],"format":"esm"},"packages/core/compute/src/compute-graph.ts":{"bytes":28513,"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":"packages/core/compute/src/compute-node.ts","kind":"import-statement","original":"./compute-node"},{"path":"packages/core/compute/src/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"packages/core/compute/src/compute-graph-registry.ts":{"bytes":9289,"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":"packages/core/compute/src/compute-graph.ts","kind":"import-statement","original":"./compute-graph"},{"path":"packages/core/compute/src/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"packages/core/compute/src/index.ts":{"bytes":2812,"imports":[{"path":"packages/core/compute/src/compute-graph.ts","kind":"import-statement","original":"./compute-graph"},{"path":"packages/core/compute/src/compute-graph-registry.ts","kind":"import-statement","original":"./compute-graph-registry"},{"path":"packages/core/compute/src/compute-node.ts","kind":"import-statement","original":"./compute-node"},{"path":"packages/core/compute/src/functions/index.ts","kind":"import-statement","original":"./functions"},{"path":"packages/core/compute/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/core/compute/src/testing/test-builder.ts":{"bytes":5353,"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":"packages/core/compute/src/compute-graph-registry.ts","kind":"import-statement","original":"../compute-graph-registry"}],"format":"esm"},"packages/core/compute/src/util.ts":{"bytes":881,"imports":[],"format":"esm"},"packages/core/compute/src/testing/test-plugin.ts":{"bytes":8929,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"packages/core/compute/src/functions/index.ts","kind":"import-statement","original":"../functions"},{"path":"packages/core/compute/src/util.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"packages/core/compute/src/testing/util.ts":{"bytes":1087,"imports":[{"path":"hyperformula","kind":"import-statement","external":true}],"format":"esm"},"packages/core/compute/src/testing/index.ts":{"bytes":660,"imports":[{"path":"packages/core/compute/src/testing/test-builder.ts","kind":"import-statement","original":"./test-builder"},{"path":"packages/core/compute/src/testing/test-plugin.ts","kind":"import-statement","original":"./test-plugin"},{"path":"packages/core/compute/src/testing/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"packages/core/compute/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/core/compute/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/core/compute/dist/lib/browser/chunk-UGMCTYCW.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":"packages/core/compute/src/index.ts","inputs":{"packages/core/compute/src/index.ts":{"bytesInOutput":0}},"bytes":1101},"packages/core/compute/dist/lib/browser/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7835},"packages/core/compute/dist/lib/browser/testing/index.mjs":{"imports":[{"path":"packages/core/compute/dist/lib/browser/chunk-UGMCTYCW.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":"packages/core/compute/src/testing/index.ts","inputs":{"packages/core/compute/src/testing/test-builder.ts":{"bytesInOutput":1286},"packages/core/compute/src/testing/index.ts":{"bytesInOutput":0},"packages/core/compute/src/testing/test-plugin.ts":{"bytesInOutput":1961},"packages/core/compute/src/util.ts":{"bytesInOutput":87},"packages/core/compute/src/testing/util.ts":{"bytesInOutput":184}},"bytes":4003},"packages/core/compute/dist/lib/browser/chunk-UGMCTYCW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":137045},"packages/core/compute/dist/lib/browser/chunk-UGMCTYCW.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":{"packages/core/compute/src/types/hyperformula.ts":{"bytesInOutput":71},"packages/core/compute/src/types/types.ts":{"bytesInOutput":2067},"packages/core/compute/src/types/index.ts":{"bytesInOutput":0},"packages/core/compute/src/compute-node.ts":{"bytesInOutput":1004},"packages/core/compute/src/functions/async-function.ts":{"bytesInOutput":4077},"packages/core/compute/src/functions/edge-function.ts":{"bytesInOutput":3883},"packages/core/compute/src/functions/function-defs.ts":{"bytesInOutput":68677},"packages/core/compute/src/functions/index.ts":{"bytesInOutput":0},"packages/core/compute/src/compute-graph.ts":{"bytesInOutput":6550},"packages/core/compute/src/compute-graph-registry.ts":{"bytesInOutput":1896}},"bytes":89206}}}
|
|
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":5783,"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":18922,"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":15503,"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":28500,"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":9280,"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":5340,"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":8916,"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/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-X2FWMHD4.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":7851},"dist/lib/browser/testing/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-X2FWMHD4.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":1309},"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":3916},"dist/lib/browser/chunk-X2FWMHD4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":137156},"dist/lib/browser/chunk-X2FWMHD4.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":1035},"src/functions/async-function.ts":{"bytesInOutput":4339},"src/functions/edge-function.ts":{"bytesInOutput":3870},"src/functions/function-defs.ts":{"bytesInOutput":68677},"src/functions/index.ts":{"bytesInOutput":0},"src/compute-graph.ts":{"bytesInOutput":6741},"src/compute-graph-registry.ts":{"bytesInOutput":1888}},"bytes":89480}}}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AsyncFunctionPlugin,
|
|
3
3
|
ComputeGraphRegistry
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-X2FWMHD4.mjs";
|
|
5
5
|
|
|
6
|
-
//
|
|
6
|
+
// src/testing/test-builder.ts
|
|
7
7
|
import { Client } from "@dxos/client";
|
|
8
8
|
import { Resource } from "@dxos/context";
|
|
9
9
|
import { invariant } from "@dxos/invariant";
|
|
10
|
-
var __dxlog_file = "/
|
|
10
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/core/compute/src/testing/test-builder.ts";
|
|
11
11
|
var TestBuilder = class extends Resource {
|
|
12
|
+
_options;
|
|
13
|
+
_client;
|
|
14
|
+
_registry;
|
|
12
15
|
constructor(_options = {}) {
|
|
13
16
|
super(), this._options = _options;
|
|
14
17
|
}
|
|
@@ -58,16 +61,16 @@ var TestBuilder = class extends Resource {
|
|
|
58
61
|
}
|
|
59
62
|
};
|
|
60
63
|
|
|
61
|
-
//
|
|
64
|
+
// src/testing/test-plugin.ts
|
|
62
65
|
import { getDeep } from "@dxos/util";
|
|
63
66
|
import { FunctionArgumentType } from "#hyperformula";
|
|
64
67
|
|
|
65
|
-
//
|
|
68
|
+
// src/util.ts
|
|
66
69
|
var parseNumberString = (str) => {
|
|
67
70
|
return parseFloat(str.replace(/[^\d.]/g, ""));
|
|
68
71
|
};
|
|
69
72
|
|
|
70
|
-
//
|
|
73
|
+
// src/testing/test-plugin.ts
|
|
71
74
|
var TestPlugin = class extends AsyncFunctionPlugin {
|
|
72
75
|
/**
|
|
73
76
|
* Simple local function returns input value.
|
|
@@ -156,7 +159,7 @@ var testFunctionPlugins = [
|
|
|
156
159
|
}
|
|
157
160
|
];
|
|
158
161
|
|
|
159
|
-
//
|
|
162
|
+
// src/testing/util.ts
|
|
160
163
|
import { HyperFormula } from "hyperformula";
|
|
161
164
|
var getRegisteredFunctionNames = () => {
|
|
162
165
|
return HyperFormula.buildEmpty({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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;\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(this._options);\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 2024 DXOS.org\n//\n\nimport { type InterpreterState } from 'hyperformula/typings/interpreter/InterpreterState';\nimport { type ProcedureAst } from 'hyperformula/typings/parser';\n\nimport { getDeep } from '@dxos/util';\n\nimport { FunctionArgumentType } from '#hyperformula';\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 '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;;AAOnB,IAAMC,cAAN,cAA0BC,SAAAA;
|
|
6
|
-
"names": ["Client", "Resource", "invariant", "TestBuilder", "Resource", "
|
|
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;\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(this._options);\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 2024 DXOS.org\n//\n\nimport { type InterpreterState } from 'hyperformula/typings/interpreter/InterpreterState';\nimport { type ProcedureAst } from 'hyperformula/typings/parser';\n\nimport { getDeep } from '@dxos/util';\n\nimport { FunctionArgumentType } from '#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 '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", "TestBuilder", "Resource", "_client", "_registry", "_options", "ctx", "_ctx", "client", "invariant", "registry", "_open", "Client", "initialize", "halo", "createIdentity", "onDispose", "destroy", "undefined", "ComputeGraphRegistry", "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,11 +1,11 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
//
|
|
3
|
+
// src/types/hyperformula.ts
|
|
4
4
|
import { DetailedCellError, ExportedCellChange } from "#hyperformula";
|
|
5
5
|
|
|
6
|
-
//
|
|
6
|
+
// src/types/types.ts
|
|
7
7
|
import { invariant } from "@dxos/invariant";
|
|
8
|
-
var __dxlog_file = "/
|
|
8
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/core/compute/src/types/types.ts";
|
|
9
9
|
var RANGE_NOTATION = /^[A-Z]+[0-9]+(:[A-Z]+[0-9]+)?$/;
|
|
10
10
|
var isFormula = (value) => typeof value === "string" && value.charAt(0) === "=";
|
|
11
11
|
var cellEquals = (a, b) => {
|
|
@@ -76,11 +76,14 @@ var inRange = (range, cell) => {
|
|
|
76
76
|
return col >= cMin && col <= cMax && row >= rMin && row <= rMax;
|
|
77
77
|
};
|
|
78
78
|
|
|
79
|
-
//
|
|
79
|
+
// src/compute-node.ts
|
|
80
80
|
import { Event } from "@dxos/async";
|
|
81
81
|
import { Resource } from "@dxos/context";
|
|
82
82
|
import { DetailedCellError as DetailedCellError2 } from "#hyperformula";
|
|
83
83
|
var ComputeNode = class extends Resource {
|
|
84
|
+
_graph;
|
|
85
|
+
sheetId;
|
|
86
|
+
update;
|
|
84
87
|
constructor(_graph, sheetId) {
|
|
85
88
|
super(), this._graph = _graph, this.sheetId = sheetId, this.update = new Event();
|
|
86
89
|
}
|
|
@@ -118,18 +121,20 @@ var ComputeNode = class extends Resource {
|
|
|
118
121
|
}
|
|
119
122
|
};
|
|
120
123
|
|
|
121
|
-
//
|
|
124
|
+
// src/functions/async-function.ts
|
|
122
125
|
import defaultsDeep from "lodash.defaultsdeep";
|
|
123
126
|
import { debounce } from "@dxos/async";
|
|
124
127
|
import { log } from "@dxos/log";
|
|
125
|
-
import { CellError,
|
|
126
|
-
var __dxlog_file2 = "/
|
|
128
|
+
import { CellError, EmptyValue, ErrorType, FunctionPlugin } from "#hyperformula";
|
|
129
|
+
var __dxlog_file2 = "/__w/dxos/dxos/packages/core/compute/src/functions/async-function.ts";
|
|
127
130
|
var defaultFunctionContextOptions = {
|
|
128
131
|
defaultTtl: 5e3,
|
|
129
132
|
debounceDelay: 200,
|
|
130
133
|
remoteFunctionUrl: "https://edge.dxos.workers.dev/functions"
|
|
131
134
|
};
|
|
132
135
|
var FunctionContext = class _FunctionContext {
|
|
136
|
+
_hf;
|
|
137
|
+
_space;
|
|
133
138
|
// Mangle name with params.
|
|
134
139
|
static createInvocationKey(name, ...args) {
|
|
135
140
|
return JSON.stringify({
|
|
@@ -137,6 +142,18 @@ var FunctionContext = class _FunctionContext {
|
|
|
137
142
|
...args
|
|
138
143
|
});
|
|
139
144
|
}
|
|
145
|
+
// TODO(wittjosiah): Persist cached values.
|
|
146
|
+
// Cached values for cell.
|
|
147
|
+
_cache;
|
|
148
|
+
// Active requests.
|
|
149
|
+
_pending;
|
|
150
|
+
// Query subscriptions.
|
|
151
|
+
_subscriptions;
|
|
152
|
+
// Invocation count.
|
|
153
|
+
_invocations;
|
|
154
|
+
_options;
|
|
155
|
+
// Debounced update handler.
|
|
156
|
+
_onUpdate;
|
|
140
157
|
constructor(_hf, _space, _options) {
|
|
141
158
|
this._hf = _hf;
|
|
142
159
|
this._space = _space;
|
|
@@ -261,7 +278,7 @@ var AsyncFunctionPlugin = class extends FunctionPlugin {
|
|
|
261
278
|
}
|
|
262
279
|
};
|
|
263
280
|
|
|
264
|
-
//
|
|
281
|
+
// src/functions/edge-function.ts
|
|
265
282
|
import { effect } from "@preact/signals-core";
|
|
266
283
|
import { SchemaAST } from "effect";
|
|
267
284
|
import { Filter, getMeta } from "@dxos/client/echo";
|
|
@@ -270,7 +287,7 @@ import { FunctionType, getUserFunctionUrlInMetadata } from "@dxos/functions";
|
|
|
270
287
|
import { log as log2 } from "@dxos/log";
|
|
271
288
|
import { isNonNullable } from "@dxos/util";
|
|
272
289
|
import { CellError as CellError2, ErrorType as ErrorType2, FunctionArgumentType } from "#hyperformula";
|
|
273
|
-
var __dxlog_file3 = "/
|
|
290
|
+
var __dxlog_file3 = "/__w/dxos/dxos/packages/core/compute/src/functions/edge-function.ts";
|
|
274
291
|
var EDGE_FUNCTION_NAME = "DX";
|
|
275
292
|
var FUNCTION_TTL = 1e4;
|
|
276
293
|
var EdgeFunctionPlugin = class extends AsyncFunctionPlugin {
|
|
@@ -288,7 +305,7 @@ var EdgeFunctionPlugin = class extends AsyncFunctionPlugin {
|
|
|
288
305
|
binding
|
|
289
306
|
}, {
|
|
290
307
|
F: __dxlog_file3,
|
|
291
|
-
L:
|
|
308
|
+
L: 42,
|
|
292
309
|
S: this,
|
|
293
310
|
C: (f, a) => f(...a)
|
|
294
311
|
});
|
|
@@ -300,7 +317,7 @@ var EdgeFunctionPlugin = class extends AsyncFunctionPlugin {
|
|
|
300
317
|
fn
|
|
301
318
|
}, {
|
|
302
319
|
F: __dxlog_file3,
|
|
303
|
-
L:
|
|
320
|
+
L: 48,
|
|
304
321
|
S: this,
|
|
305
322
|
C: (f, a) => f(...a)
|
|
306
323
|
});
|
|
@@ -333,7 +350,7 @@ var EdgeFunctionPlugin = class extends AsyncFunctionPlugin {
|
|
|
333
350
|
result
|
|
334
351
|
}, {
|
|
335
352
|
F: __dxlog_file3,
|
|
336
|
-
L:
|
|
353
|
+
L: 75,
|
|
337
354
|
S: this,
|
|
338
355
|
C: (f, a) => f(...a)
|
|
339
356
|
});
|
|
@@ -398,7 +415,7 @@ var EdgeFunctionPluginTranslations = {
|
|
|
398
415
|
}
|
|
399
416
|
};
|
|
400
417
|
|
|
401
|
-
//
|
|
418
|
+
// src/functions/function-defs.ts
|
|
402
419
|
var defaultFunctions = [
|
|
403
420
|
// Array
|
|
404
421
|
{
|
|
@@ -2772,7 +2789,7 @@ var defaultFunctions = [
|
|
|
2772
2789
|
}
|
|
2773
2790
|
];
|
|
2774
2791
|
|
|
2775
|
-
//
|
|
2792
|
+
// src/compute-graph.ts
|
|
2776
2793
|
import { Event as Event2 } from "@dxos/async";
|
|
2777
2794
|
import { Filter as Filter2, fullyQualifiedId } from "@dxos/client/echo";
|
|
2778
2795
|
import { FQ_ID_LENGTH } from "@dxos/client/echo";
|
|
@@ -2784,7 +2801,7 @@ import { PublicKey } from "@dxos/keys";
|
|
|
2784
2801
|
import { log as log3 } from "@dxos/log";
|
|
2785
2802
|
import { isNonNullable as isNonNullable2 } from "@dxos/util";
|
|
2786
2803
|
import { ExportedCellChange as ExportedCellChange2 } from "#hyperformula";
|
|
2787
|
-
var __dxlog_file4 = "/
|
|
2804
|
+
var __dxlog_file4 = "/__w/dxos/dxos/packages/core/compute/src/compute-graph.ts";
|
|
2788
2805
|
var UNKNOWN_BINDING = "__UNKNOWN__";
|
|
2789
2806
|
var createSheetName = ({ type, id }) => `${type}@${id}`;
|
|
2790
2807
|
var parseSheetName = (name) => {
|
|
@@ -2797,6 +2814,17 @@ var parseSheetName = (name) => {
|
|
|
2797
2814
|
};
|
|
2798
2815
|
};
|
|
2799
2816
|
var ComputeGraph = class extends Resource2 {
|
|
2817
|
+
_hf;
|
|
2818
|
+
_space;
|
|
2819
|
+
_options;
|
|
2820
|
+
id;
|
|
2821
|
+
// Map of nodes indexed by sheet number.
|
|
2822
|
+
_nodes;
|
|
2823
|
+
// Cached function objects.
|
|
2824
|
+
_remoteFunctions;
|
|
2825
|
+
update;
|
|
2826
|
+
// The context is passed to all functions.
|
|
2827
|
+
context;
|
|
2800
2828
|
constructor(_hf, _space, _options) {
|
|
2801
2829
|
super(), this._hf = _hf, this._space = _space, this._options = _options, this.id = `graph-${PublicKey.random().truncate()}`, this._nodes = /* @__PURE__ */ new Map(), this._remoteFunctions = [], this.update = new Event2();
|
|
2802
2830
|
this.context = new FunctionContext(this._hf, this._space, {
|
|
@@ -2855,7 +2883,7 @@ var ComputeGraph = class extends Resource2 {
|
|
|
2855
2883
|
getOrCreateNode(name) {
|
|
2856
2884
|
invariant2(name.length, void 0, {
|
|
2857
2885
|
F: __dxlog_file4,
|
|
2858
|
-
L:
|
|
2886
|
+
L: 129,
|
|
2859
2887
|
S: this,
|
|
2860
2888
|
A: [
|
|
2861
2889
|
"name.length",
|
|
@@ -2868,7 +2896,7 @@ var ComputeGraph = class extends Resource2 {
|
|
|
2868
2896
|
sheet: name
|
|
2869
2897
|
}, {
|
|
2870
2898
|
F: __dxlog_file4,
|
|
2871
|
-
L:
|
|
2899
|
+
L: 131,
|
|
2872
2900
|
S: this,
|
|
2873
2901
|
C: (f, a) => f(...a)
|
|
2874
2902
|
});
|
|
@@ -2877,7 +2905,7 @@ var ComputeGraph = class extends Resource2 {
|
|
|
2877
2905
|
const sheetId = this._hf.getSheetId(name);
|
|
2878
2906
|
invariant2(sheetId !== void 0, void 0, {
|
|
2879
2907
|
F: __dxlog_file4,
|
|
2880
|
-
L:
|
|
2908
|
+
L: 136,
|
|
2881
2909
|
S: this,
|
|
2882
2910
|
A: [
|
|
2883
2911
|
"sheetId !== undefined",
|
|
@@ -2982,13 +3010,13 @@ var ComputeGraph = class extends Resource2 {
|
|
|
2982
3010
|
}
|
|
2983
3011
|
};
|
|
2984
3012
|
|
|
2985
|
-
//
|
|
3013
|
+
// src/compute-graph-registry.ts
|
|
2986
3014
|
import defaultsDeep2 from "lodash.defaultsdeep";
|
|
2987
3015
|
import { Resource as Resource3 } from "@dxos/context";
|
|
2988
3016
|
import { invariant as invariant3 } from "@dxos/invariant";
|
|
2989
3017
|
import { log as log4 } from "@dxos/log";
|
|
2990
3018
|
import { HyperFormula } from "#hyperformula";
|
|
2991
|
-
var __dxlog_file5 = "/
|
|
3019
|
+
var __dxlog_file5 = "/__w/dxos/dxos/packages/core/compute/src/compute-graph-registry.ts";
|
|
2992
3020
|
var defaultOptions = {
|
|
2993
3021
|
licenseKey: "gpl-v3"
|
|
2994
3022
|
};
|
|
@@ -2999,11 +3027,12 @@ var defaultPlugins = [
|
|
|
2999
3027
|
}
|
|
3000
3028
|
];
|
|
3001
3029
|
var ComputeGraphRegistry = class extends Resource3 {
|
|
3030
|
+
_graphs = /* @__PURE__ */ new Map();
|
|
3031
|
+
_options;
|
|
3002
3032
|
constructor(options = {
|
|
3003
3033
|
plugins: defaultPlugins
|
|
3004
3034
|
}) {
|
|
3005
3035
|
super();
|
|
3006
|
-
this._graphs = /* @__PURE__ */ new Map();
|
|
3007
3036
|
this._options = defaultsDeep2({}, options, defaultOptions);
|
|
3008
3037
|
this._options.plugins?.forEach(({ plugin, translations }) => {
|
|
3009
3038
|
HyperFormula.registerFunctionPlugin(plugin, translations);
|
|
@@ -3019,7 +3048,7 @@ var ComputeGraphRegistry = class extends Resource3 {
|
|
|
3019
3048
|
space: space.id
|
|
3020
3049
|
}, {
|
|
3021
3050
|
F: __dxlog_file5,
|
|
3022
|
-
L:
|
|
3051
|
+
L: 70,
|
|
3023
3052
|
S: this,
|
|
3024
3053
|
C: (f, a) => f(...a)
|
|
3025
3054
|
});
|
|
@@ -3030,7 +3059,7 @@ var ComputeGraphRegistry = class extends Resource3 {
|
|
|
3030
3059
|
createGraph(space) {
|
|
3031
3060
|
invariant3(!this._graphs.has(space.id), `ComputeGraph already exists for space: ${space.id}`, {
|
|
3032
3061
|
F: __dxlog_file5,
|
|
3033
|
-
L:
|
|
3062
|
+
L: 78,
|
|
3034
3063
|
S: this,
|
|
3035
3064
|
A: [
|
|
3036
3065
|
"!this._graphs.has(space.id)",
|
|
@@ -3077,4 +3106,4 @@ export {
|
|
|
3077
3106
|
defaultPlugins,
|
|
3078
3107
|
ComputeGraphRegistry
|
|
3079
3108
|
};
|
|
3080
|
-
//# sourceMappingURL=chunk-
|
|
3109
|
+
//# sourceMappingURL=chunk-RP7HSSCA.mjs.map
|