@dxos/compute 0.8.4-main.406dc2a → 0.8.4-main.422d1c7879
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-C7KLV2IU.mjs → neutral/chunk-JRV42MW3.mjs} +120 -163
- package/dist/lib/neutral/chunk-JRV42MW3.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/index.mjs +1 -1
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/{browser → neutral}/testing/index.mjs +37 -24
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/types/src/compute-graph-registry.d.ts +2 -2
- package/dist/types/src/compute-graph-registry.d.ts.map +1 -1
- package/dist/types/src/compute-graph.d.ts +7 -7
- package/dist/types/src/compute-graph.d.ts.map +1 -1
- package/dist/types/src/functions/async-function.d.ts +3 -3
- 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/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-builder.d.ts.map +1 -1
- package/dist/types/src/testing/test-runtime.d.ts +2 -2
- package/dist/types/src/testing/test-runtime.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +29 -34
- package/src/compute-graph-registry.test.ts +51 -22
- package/src/compute-graph-registry.ts +2 -2
- package/src/compute-graph.test.ts +61 -10
- package/src/compute-graph.ts +37 -33
- package/src/functions/async-function.ts +2 -2
- package/src/functions/edge-function.ts +13 -19
- package/src/index.ts +0 -27
- package/src/testing/test-builder.ts +0 -1
- package/src/testing/test-runtime.ts +30 -15
- package/dist/lib/browser/chunk-C7KLV2IU.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/testing/index.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-K37OSZ5O.mjs +0 -3146
- package/dist/lib/node-esm/chunk-K37OSZ5O.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -56
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/testing/index.mjs +0 -207
- package/dist/lib/node-esm/testing/index.mjs.map +0 -7
- /package/dist/lib/{browser → neutral}/index.mjs.map +0 -0
|
@@ -2,7 +2,7 @@ import type * as ManagedRuntime from 'effect/ManagedRuntime';
|
|
|
2
2
|
import { Event } from '@dxos/async';
|
|
3
3
|
import { type Space } from '@dxos/client/echo';
|
|
4
4
|
import { Resource } from '@dxos/context';
|
|
5
|
-
import {
|
|
5
|
+
import { Operation } from '@dxos/operation';
|
|
6
6
|
import { type HyperFormula } from '@dxos/vendor-hyperformula';
|
|
7
7
|
import { ComputeNode } from './compute-node';
|
|
8
8
|
import { FunctionContext, type FunctionContextOptions, type FunctionDefinition } from './functions';
|
|
@@ -12,7 +12,7 @@ type ObjectRef = {
|
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* Marker for sheets that are managed by an ECHO object.
|
|
15
|
-
* Sheet ID: `dxos.
|
|
15
|
+
* Sheet ID: `org.dxos.type.sheet-type@1234`
|
|
16
16
|
*/
|
|
17
17
|
export declare const createSheetName: ({ type, id }: ObjectRef) => string;
|
|
18
18
|
export declare const parseSheetName: (name: string) => Partial<ObjectRef>;
|
|
@@ -35,7 +35,7 @@ export declare class ComputeGraph extends Resource {
|
|
|
35
35
|
type: ComputeGraphEvent;
|
|
36
36
|
}>;
|
|
37
37
|
readonly context: FunctionContext;
|
|
38
|
-
constructor(_hf: HyperFormula, _runtime: ManagedRuntime.ManagedRuntime<
|
|
38
|
+
constructor(_hf: HyperFormula, _runtime: ManagedRuntime.ManagedRuntime<Operation.Service, never>, _space?: Space | undefined, _options?: Partial<FunctionContextOptions> | undefined);
|
|
39
39
|
get hf(): HyperFormula;
|
|
40
40
|
getFunctions({ standard, echo }?: {
|
|
41
41
|
standard?: boolean;
|
|
@@ -51,13 +51,13 @@ export declare class ComputeGraph extends Resource {
|
|
|
51
51
|
*/
|
|
52
52
|
mapFormulaToNative(formula: string): string;
|
|
53
53
|
/**
|
|
54
|
-
* Map from binding to fully qualified ECHO
|
|
55
|
-
* E.g., HELLO() => spaceId:objectId()
|
|
54
|
+
* Map from binding to fully qualified ECHO DXN (to store).
|
|
55
|
+
* E.g., HELLO() => dxn:echo:spaceId:objectId()
|
|
56
56
|
*/
|
|
57
57
|
mapFunctionBindingToId(formula: string): string;
|
|
58
58
|
/**
|
|
59
|
-
* Map from fully qualified ECHO
|
|
60
|
-
* E.g., spaceId:objectId() => HELLO()
|
|
59
|
+
* Map from fully qualified ECHO DXN to binding (from store).
|
|
60
|
+
* E.g., dxn:echo:spaceId:objectId() => HELLO()
|
|
61
61
|
*/
|
|
62
62
|
mapFunctionBindingFromId(formula: string): string | undefined;
|
|
63
63
|
protected _open(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute-graph.d.ts","sourceRoot":"","sources":["../../../src/compute-graph.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAE7D,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAU,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"compute-graph.d.ts","sourceRoot":"","sources":["../../../src/compute-graph.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAE7D,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAU,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAKzC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAElF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,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C;;;OAGG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAiD3C;;;OAGG;IACH,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAgB/C;;;OAGG;IACH,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;cAqBpC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;cAgBtB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CAKjD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as ManagedRuntime from 'effect/ManagedRuntime';
|
|
2
2
|
import { type CleanupFn } from '@dxos/async';
|
|
3
3
|
import type { Space } from '@dxos/client/echo';
|
|
4
|
-
import {
|
|
4
|
+
import type { Operation } from '@dxos/operation';
|
|
5
5
|
import type { RawInterpreterValue, SimpleCellAddress } from '@dxos/vendor-hyperformula';
|
|
6
6
|
import type { InterpreterState } from '@dxos/vendor-hyperformula';
|
|
7
7
|
import type { InterpreterValue } from '@dxos/vendor-hyperformula';
|
|
@@ -40,13 +40,13 @@ export declare class FunctionContext {
|
|
|
40
40
|
private _invocations;
|
|
41
41
|
private readonly _options;
|
|
42
42
|
private readonly _onUpdate;
|
|
43
|
-
constructor(_hf: HyperFormula, _runtime: ManagedRuntime.ManagedRuntime<
|
|
43
|
+
constructor(_hf: HyperFormula, _runtime: ManagedRuntime.ManagedRuntime<Operation.Service, never>, _space: Space | undefined, _options?: Partial<FunctionContextOptions>);
|
|
44
44
|
get space(): Space | undefined;
|
|
45
45
|
get info(): {
|
|
46
46
|
cache: number;
|
|
47
47
|
invocations: Record<string, number>;
|
|
48
48
|
};
|
|
49
|
-
get runtime(): ManagedRuntime.ManagedRuntime<
|
|
49
|
+
get runtime(): ManagedRuntime.ManagedRuntime<Operation.Service, never>;
|
|
50
50
|
flush(): void;
|
|
51
51
|
createSubscription(name: string, unsubscribe: CleanupFn): void;
|
|
52
52
|
/**
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AAE/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,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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AgB,GAAG,SAAS;CAgChC;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,cAAc;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 +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":"AAYA,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;CAkD9C;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":"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;AAG3F,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,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OperationHandlerSet } from '@dxos/operation';
|
|
2
2
|
import { type FunctionsRuntimeProvider } from '../compute-graph-registry';
|
|
3
3
|
/**
|
|
4
4
|
* Minimal compute runtime provider for tests and Storybook.
|
|
5
5
|
* Will cause errors if used for actual runtime.
|
|
6
6
|
*/
|
|
7
7
|
export declare const createMockedComputeRuntimeProvider: ({ functions, }?: {
|
|
8
|
-
functions?:
|
|
8
|
+
functions?: OperationHandlerSet.OperationHandlerSet;
|
|
9
9
|
}) => FunctionsRuntimeProvider;
|
|
10
10
|
//# sourceMappingURL=test-runtime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-runtime.d.ts","sourceRoot":"","sources":["../../../../src/testing/test-runtime.ts"],"names":[],"mappings":"AASA,OAAO,
|
|
1
|
+
{"version":3,"file":"test-runtime.d.ts","sourceRoot":"","sources":["../../../../src/testing/test-runtime.ts"],"names":[],"mappings":"AASA,OAAO,EAAa,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEjE,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,kCAAkC,GAAI,iBAEhD;IAAE,SAAS,CAAC,EAAE,mBAAmB,CAAC,mBAAmB,CAAA;CAAO,KAAG,wBAiCjE,CAAC"}
|