@dxos/functions 0.7.5-main.499c70c → 0.7.5-main.5ae2ba8
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/bundler/index.mjs +239 -0
- package/dist/lib/browser/bundler/index.mjs.map +7 -0
- package/dist/lib/browser/{chunk-PKOLPTSC.mjs → chunk-IXJNRWJP.mjs} +53 -17
- package/dist/lib/browser/chunk-IXJNRWJP.mjs.map +7 -0
- package/dist/lib/browser/{chunk-BCNGUHHW.mjs → chunk-XLM3CJXO.mjs} +2 -2
- package/dist/lib/browser/{chunk-B3FGASHJ.mjs → chunk-YJEIETRB.mjs} +6 -3
- package/dist/lib/browser/{chunk-B3FGASHJ.mjs.map → chunk-YJEIETRB.mjs.map} +3 -3
- package/dist/lib/browser/edge/index.mjs +1 -1
- package/dist/lib/browser/index.mjs +24 -10
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +2 -2
- package/dist/lib/browser/types/index.mjs +1 -3
- package/dist/lib/node/bundler/index.cjs +261 -0
- package/dist/lib/node/bundler/index.cjs.map +7 -0
- package/dist/lib/node/{chunk-RYEY2RR2.cjs → chunk-MGCKR53Q.cjs} +54 -21
- package/dist/lib/node/chunk-MGCKR53Q.cjs.map +7 -0
- package/dist/lib/node/{chunk-ZDG466QT.cjs → chunk-MZMHE4DC.cjs} +9 -6
- package/dist/lib/node/{chunk-ZDG466QT.cjs.map → chunk-MZMHE4DC.cjs.map} +3 -3
- package/dist/lib/node/{chunk-UHWSNERM.cjs → chunk-TLSUCABH.cjs} +15 -15
- package/dist/lib/node/edge/index.cjs +8 -8
- package/dist/lib/node/edge/index.cjs.map +1 -1
- package/dist/lib/node/index.cjs +44 -29
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +7 -7
- package/dist/lib/node/types/index.cjs +10 -12
- package/dist/lib/node/types/index.cjs.map +2 -2
- package/dist/lib/node-esm/bundler/index.mjs +239 -0
- package/dist/lib/node-esm/bundler/index.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-TPGS4PIH.mjs → chunk-CKTHJQ7M.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-2UWB6JYW.mjs → chunk-FCZGNRNF.mjs} +53 -17
- package/dist/lib/node-esm/chunk-FCZGNRNF.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-CN74WOTT.mjs → chunk-T2KBXTMR.mjs} +6 -3
- package/dist/lib/node-esm/{chunk-CN74WOTT.mjs.map → chunk-T2KBXTMR.mjs.map} +3 -3
- package/dist/lib/node-esm/edge/index.mjs +1 -1
- package/dist/lib/node-esm/index.mjs +24 -10
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +2 -2
- package/dist/lib/node-esm/types/index.mjs +1 -3
- package/dist/types/src/bundler/bundler.d.ts +51 -0
- package/dist/types/src/bundler/bundler.d.ts.map +1 -0
- package/dist/types/src/bundler/bundler.test.d.ts +2 -0
- package/dist/types/src/bundler/bundler.test.d.ts.map +1 -0
- package/dist/types/src/bundler/index.d.ts +2 -0
- package/dist/types/src/bundler/index.d.ts.map +1 -0
- package/dist/types/src/edge/functions.d.ts.map +1 -1
- package/dist/types/src/handler.d.ts +29 -4
- package/dist/types/src/handler.d.ts.map +1 -1
- package/dist/types/src/testing/types.d.ts +2 -2
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +20 -23
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/types/trace.d.ts +103 -0
- package/dist/types/src/types/trace.d.ts.map +1 -0
- package/dist/types/src/types/types.d.ts +50 -9
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +33 -19
- package/src/bundler/bundler.test.ts +59 -0
- package/src/bundler/bundler.ts +264 -0
- package/src/bundler/index.ts +5 -0
- package/src/edge/functions.ts +5 -1
- package/src/handler.ts +58 -9
- package/src/trigger/trigger-registry.test.ts +3 -1
- package/src/types/index.ts +1 -0
- package/src/types/schema.ts +4 -6
- package/src/types/trace.ts +49 -0
- package/src/types/types.ts +19 -2
- package/dist/lib/browser/chunk-PKOLPTSC.mjs.map +0 -7
- package/dist/lib/node/chunk-RYEY2RR2.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-2UWB6JYW.mjs.map +0 -7
- /package/dist/lib/browser/{chunk-BCNGUHHW.mjs.map → chunk-XLM3CJXO.mjs.map} +0 -0
- /package/dist/lib/node/{chunk-UHWSNERM.cjs.map → chunk-TLSUCABH.cjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-TPGS4PIH.mjs.map → chunk-CKTHJQ7M.mjs.map} +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type BuildOptions } from 'esbuild';
|
|
2
|
+
import { type BuildResult } from 'esbuild-wasm';
|
|
3
|
+
export type Import = {
|
|
4
|
+
moduleUrl: string;
|
|
5
|
+
defaultImport: boolean;
|
|
6
|
+
namedImports: string[];
|
|
7
|
+
};
|
|
8
|
+
export type BundleOptions = {
|
|
9
|
+
/**
|
|
10
|
+
* Path to the source file on the local file system.
|
|
11
|
+
* If provided, the path will be used instead of the `source` code.
|
|
12
|
+
*/
|
|
13
|
+
path?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Source code to bundle.
|
|
16
|
+
* Required if `path` is not provided.
|
|
17
|
+
*/
|
|
18
|
+
source?: string;
|
|
19
|
+
};
|
|
20
|
+
export type BundleResult = {
|
|
21
|
+
timestamp: number;
|
|
22
|
+
sourceHash?: Buffer;
|
|
23
|
+
imports?: Import[];
|
|
24
|
+
bundle?: string;
|
|
25
|
+
error?: any;
|
|
26
|
+
};
|
|
27
|
+
export type BundlerOptions = {
|
|
28
|
+
platform: BuildOptions['platform'];
|
|
29
|
+
sandboxedModules: string[];
|
|
30
|
+
remoteModules: Record<string, string>;
|
|
31
|
+
};
|
|
32
|
+
export declare const initializeBundler: (options: {
|
|
33
|
+
wasmUrl: string;
|
|
34
|
+
}) => Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* ESBuild bundler.
|
|
37
|
+
*/
|
|
38
|
+
export declare class Bundler {
|
|
39
|
+
private readonly _options;
|
|
40
|
+
constructor(_options: BundlerOptions);
|
|
41
|
+
bundle({ path, source }: BundleOptions): Promise<BundleResult>;
|
|
42
|
+
analyzeImports(result: BuildResult): Import[];
|
|
43
|
+
analyzeSourceFileImports(code: string): {
|
|
44
|
+
defaultImportName: string;
|
|
45
|
+
namedImports: string[];
|
|
46
|
+
wildcardImportName: string;
|
|
47
|
+
moduleIdentifier: string;
|
|
48
|
+
quotes: string;
|
|
49
|
+
}[];
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=bundler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../../../src/bundler/bundler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAqB,KAAK,WAAW,EAAe,MAAM,cAAc,CAAC;AAMhF,MAAM,MAAM,MAAM,GAAG;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IACnC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC,CAAC;AAGF,eAAO,MAAM,iBAAiB,YAAmB;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,kBAInE,CAAC;AAEF;;GAEG;AACH,qBAAa,OAAO;IACN,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,cAAc;IAE/C,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IAwFpE,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,EAAE;IA2B7C,wBAAwB,CAAC,IAAI,EAAE,MAAM;;;;;;;CAatC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundler.test.d.ts","sourceRoot":"","sources":["../../../../src/bundler/bundler.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bundler/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../../src/edge/functions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO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AAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,oBAAoB,4DAO9B,gBAAgB,KAAG,OAAO,CAAC,0BAA0B,CAiBvD,CAAC;AAEF,eAAO,MAAM,4BAA4B,SAAU,UAAU,uBAE5D,CAAC;AAEF,eAAO,MAAM,4BAA4B,SAAU,UAAU,eAAe,MAAM,SASjF,CAAC;AAEF,eAAO,MAAM,gBAAgB,gBAAiB,MAAM,WAAW,MAAM,YAAW,iBAAiB,WAUhG,CAAC;AA0BF,eAAO,MAAM,oBAAoB,YAAa,MAAM,KAAG,MAKtD,CAAC;AAEF,eAAO,MAAM,cAAc,QAAS,SAAS,KAAG,GAE/C,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Schema as S } from '@effect/schema';
|
|
2
|
+
import { type Effect } from 'effect';
|
|
2
3
|
import { type Client } from '@dxos/client';
|
|
3
4
|
import { type Space, type SpaceId } from '@dxos/client/echo';
|
|
4
|
-
import type { CoreDatabase, ReactiveEchoObject } from '@dxos/echo-db';
|
|
5
|
+
import type { CoreDatabase, EchoDatabase, QueryResult, ReactiveEchoObject } from '@dxos/echo-db';
|
|
6
|
+
import { type HasId } from '@dxos/echo-schema';
|
|
7
|
+
import { type DXN } from '@dxos/keys';
|
|
5
8
|
/**
|
|
6
9
|
* Function handler.
|
|
7
10
|
*/
|
|
8
|
-
export type FunctionHandler<TData = {}, TMeta = {}> = (params: {
|
|
11
|
+
export type FunctionHandler<TData = {}, TMeta = {}, TOutput = any> = (params: {
|
|
9
12
|
context: FunctionContext;
|
|
10
13
|
event: FunctionEvent<TData, TMeta>;
|
|
11
14
|
/**
|
|
12
15
|
* @deprecated
|
|
13
16
|
*/
|
|
14
17
|
response: FunctionResponse;
|
|
15
|
-
}) => Promise<
|
|
18
|
+
}) => TOutput | Promise<TOutput> | Effect.Effect<TOutput, any>;
|
|
16
19
|
/**
|
|
17
20
|
* Function context.
|
|
18
21
|
*/
|
|
@@ -53,13 +56,35 @@ export type FunctionEventMeta<TMeta = {}> = {
|
|
|
53
56
|
export type FunctionResponse = {
|
|
54
57
|
status(code: number): FunctionResponse;
|
|
55
58
|
};
|
|
59
|
+
export interface QueuesAPI {
|
|
60
|
+
queryQueue(queue: DXN, options?: {}): Promise<QueryResult>;
|
|
61
|
+
insertIntoQueue(queue: DXN, objects: HasId[]): Promise<void>;
|
|
62
|
+
}
|
|
56
63
|
/**
|
|
57
64
|
* Space interface available to functions.
|
|
58
65
|
*/
|
|
59
66
|
export interface SpaceAPI {
|
|
60
67
|
get id(): SpaceId;
|
|
68
|
+
/**
|
|
69
|
+
* @deprecated
|
|
70
|
+
*/
|
|
61
71
|
get crud(): CoreDatabase;
|
|
72
|
+
get db(): EchoDatabase;
|
|
73
|
+
get queues(): QueuesAPI;
|
|
62
74
|
}
|
|
75
|
+
export type FunctionDefinition = {
|
|
76
|
+
description?: string;
|
|
77
|
+
inputSchema: S.Schema.AnyNoContext;
|
|
78
|
+
outputSchema?: S.Schema.AnyNoContext;
|
|
79
|
+
handler: FunctionHandler<any>;
|
|
80
|
+
};
|
|
81
|
+
export type DefineFunctionParams<T, O = any> = {
|
|
82
|
+
description?: string;
|
|
83
|
+
inputSchema: S.Schema<T, any>;
|
|
84
|
+
outputSchema?: S.Schema<O, any>;
|
|
85
|
+
handler: FunctionHandler<T, any, O>;
|
|
86
|
+
};
|
|
87
|
+
export declare const defineFunction: <T, O>(params: DefineFunctionParams<T, O>) => FunctionDefinition;
|
|
63
88
|
export type RawSubscriptionData = {
|
|
64
89
|
spaceKey?: string;
|
|
65
90
|
objects?: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/handler.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C,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,oBAAoB,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,IAAI;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC9B,YAAY,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAChC,OAAO,EAAE,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;CACrC,CAAC;AAGF,eAAO,MAAM,cAAc,GAAI,CAAC,EAAE,CAAC,UAAU,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,KAAG,kBAczE,CAAC;AAMF,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,CAAC,EAAE,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC;CACrC,CAAC;AAEF;;;;;;;;;GASG;AAEH,eAAO,MAAM,mBAAmB,GAAI,KAAK,WAC9B,eAAe,CAAC,gBAAgB,EAAE,KAAK,CAAC,UACzC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,KACtB,eAAe,CAAC,mBAAmB,EAAE,KAAK,CAwB5C,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { S } from '@dxos/echo-schema';
|
|
2
|
-
declare const TestType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("
|
|
2
|
+
declare const TestType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
|
|
3
3
|
title: typeof S.String;
|
|
4
|
-
}, import("
|
|
4
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<{
|
|
5
5
|
title: typeof S.String;
|
|
6
6
|
}>>;
|
|
7
7
|
export declare class TestType extends TestType_base {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
@@ -1,56 +1,53 @@
|
|
|
1
1
|
import { JsonSchemaType, S } from '@dxos/echo-schema';
|
|
2
|
-
declare const
|
|
3
|
-
content: typeof S.String;
|
|
4
|
-
}, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>, S.Struct.Encoded<{
|
|
5
|
-
content: typeof S.String;
|
|
6
|
-
}>>;
|
|
7
|
-
export declare class TextType extends TextType_base {
|
|
8
|
-
}
|
|
9
|
-
declare const ScriptType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
|
|
2
|
+
declare const ScriptType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
|
|
10
3
|
name: S.optional<typeof S.String>;
|
|
11
4
|
description: S.optional<typeof S.String>;
|
|
12
5
|
changed: S.optional<typeof S.Boolean>;
|
|
13
|
-
source: import("@dxos/echo-schema").Ref$<import("
|
|
6
|
+
source: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
14
7
|
content: typeof S.String;
|
|
15
|
-
}, import("
|
|
16
|
-
}, import("
|
|
8
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>>;
|
|
9
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<{
|
|
17
10
|
name: S.optional<typeof S.String>;
|
|
18
11
|
description: S.optional<typeof S.String>;
|
|
19
12
|
changed: S.optional<typeof S.Boolean>;
|
|
20
|
-
source: import("@dxos/echo-schema").Ref$<import("
|
|
13
|
+
source: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
21
14
|
content: typeof S.String;
|
|
22
|
-
}, import("
|
|
15
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>>;
|
|
23
16
|
}>>;
|
|
24
17
|
/**
|
|
25
18
|
* Source script.
|
|
26
19
|
*/
|
|
27
20
|
export declare class ScriptType extends ScriptType_base {
|
|
28
21
|
}
|
|
29
|
-
declare const FunctionType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("
|
|
22
|
+
declare const FunctionType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
|
|
30
23
|
name: typeof S.NonEmptyString;
|
|
31
24
|
version: typeof S.String;
|
|
32
|
-
|
|
25
|
+
description: S.optional<typeof S.String>;
|
|
26
|
+
source: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
33
27
|
name: S.optional<typeof S.String>;
|
|
34
28
|
description: S.optional<typeof S.String>;
|
|
35
29
|
changed: S.optional<typeof S.Boolean>;
|
|
36
|
-
source: import("@dxos/echo-schema").Ref$<import("
|
|
30
|
+
source: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
37
31
|
content: typeof S.String;
|
|
38
|
-
}, import("
|
|
39
|
-
}, import("
|
|
32
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>>;
|
|
33
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>>>;
|
|
40
34
|
inputSchema: S.optional<S.Schema<JsonSchemaType, JsonSchemaType, never>>;
|
|
35
|
+
outputSchema: S.optional<S.Schema<JsonSchemaType, JsonSchemaType, never>>;
|
|
41
36
|
binding: S.optional<typeof S.String>;
|
|
42
|
-
}, import("
|
|
37
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<{
|
|
43
38
|
name: typeof S.NonEmptyString;
|
|
44
39
|
version: typeof S.String;
|
|
45
|
-
|
|
40
|
+
description: S.optional<typeof S.String>;
|
|
41
|
+
source: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
46
42
|
name: S.optional<typeof S.String>;
|
|
47
43
|
description: S.optional<typeof S.String>;
|
|
48
44
|
changed: S.optional<typeof S.Boolean>;
|
|
49
|
-
source: import("@dxos/echo-schema").Ref$<import("
|
|
45
|
+
source: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
50
46
|
content: typeof S.String;
|
|
51
|
-
}, import("
|
|
52
|
-
}, import("
|
|
47
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>>;
|
|
48
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>>>;
|
|
53
49
|
inputSchema: S.optional<S.Schema<JsonSchemaType, JsonSchemaType, never>>;
|
|
50
|
+
outputSchema: S.optional<S.Schema<JsonSchemaType, JsonSchemaType, never>>;
|
|
54
51
|
binding: S.optional<typeof S.String>;
|
|
55
52
|
}>>;
|
|
56
53
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAO,CAAC,EAAe,MAAM,mBAAmB,CAAC;;;;;;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAO,CAAC,EAAe,MAAM,mBAAmB,CAAC;;;;;;wBAM/D,EAAI,MAAK;;;;;;;wBAAT,EAAI,MAAK;;;AAHlB;;GAEG;AACH,qBAAa,UAAW,SAAQ,eAU9B;CAAG;;;;;;;;;;4BAVI,EAAI,MAAK;;;;;;;;;;;;;;;4BAAT,EAAI,MAAK;;;;;;;AAYlB;;GAEG;AAEH,qBAAa,YAAa,SAAQ,iBAmBhC;CAAG"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Expando, Ref, S } from '@dxos/echo-schema';
|
|
2
|
+
declare const InvocationTrace: S.Schema<{
|
|
3
|
+
readonly id: string;
|
|
4
|
+
invocationTraceQueue: Ref<Expando>;
|
|
5
|
+
invocationTarget: Ref<Expando>;
|
|
6
|
+
trigger?: Ref<import("@dxos/echo-schema").TypedObjectFields<{
|
|
7
|
+
readonly function: S.optional<S.SchemaClass<string, string, never>>;
|
|
8
|
+
readonly enabled: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
9
|
+
readonly spec: S.optional<S.Union<[S.mutable<S.Struct<{
|
|
10
|
+
type: S.Literal<[import("./types").TriggerKind.Timer]>;
|
|
11
|
+
cron: S.SchemaClass<string, string, never>;
|
|
12
|
+
}>>, S.mutable<S.Struct<{
|
|
13
|
+
type: S.Literal<[import("./types").TriggerKind.Webhook]>;
|
|
14
|
+
method: S.optional<S.SchemaClass<string, string, never>>;
|
|
15
|
+
port: S.optional<S.SchemaClass<number, number, never>>;
|
|
16
|
+
}>>, S.mutable<S.Struct<{
|
|
17
|
+
type: S.Literal<[import("./types").TriggerKind.Subscription]>;
|
|
18
|
+
filter: S.Struct<{
|
|
19
|
+
type: S.optional<S.SchemaClass<string, string, never>>;
|
|
20
|
+
props: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
|
|
21
|
+
}>;
|
|
22
|
+
options: S.optional<S.Struct<{
|
|
23
|
+
deep: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
24
|
+
delay: S.optional<S.SchemaClass<number, number, never>>;
|
|
25
|
+
}>>;
|
|
26
|
+
}>>, S.mutable<S.Struct<{
|
|
27
|
+
type: S.Literal<[import("./types").TriggerKind.Email]>;
|
|
28
|
+
}>>, S.mutable<S.Struct<{
|
|
29
|
+
type: S.Literal<[import("./types").TriggerKind.Queue]>;
|
|
30
|
+
queue: S.refine<string, S.Schema<string, string, never>>;
|
|
31
|
+
}>>]>>;
|
|
32
|
+
readonly meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
33
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>> | undefined;
|
|
34
|
+
}, {
|
|
35
|
+
readonly id: string;
|
|
36
|
+
invocationTraceQueue: Ref<Expando>;
|
|
37
|
+
invocationTarget: Ref<Expando>;
|
|
38
|
+
trigger?: Ref<import("@dxos/echo-schema").TypedObjectFields<{
|
|
39
|
+
readonly function: S.optional<S.SchemaClass<string, string, never>>;
|
|
40
|
+
readonly enabled: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
41
|
+
readonly spec: S.optional<S.Union<[S.mutable<S.Struct<{
|
|
42
|
+
type: S.Literal<[import("./types").TriggerKind.Timer]>;
|
|
43
|
+
cron: S.SchemaClass<string, string, never>;
|
|
44
|
+
}>>, S.mutable<S.Struct<{
|
|
45
|
+
type: S.Literal<[import("./types").TriggerKind.Webhook]>;
|
|
46
|
+
method: S.optional<S.SchemaClass<string, string, never>>;
|
|
47
|
+
port: S.optional<S.SchemaClass<number, number, never>>;
|
|
48
|
+
}>>, S.mutable<S.Struct<{
|
|
49
|
+
type: S.Literal<[import("./types").TriggerKind.Subscription]>;
|
|
50
|
+
filter: S.Struct<{
|
|
51
|
+
type: S.optional<S.SchemaClass<string, string, never>>;
|
|
52
|
+
props: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
|
|
53
|
+
}>;
|
|
54
|
+
options: S.optional<S.Struct<{
|
|
55
|
+
deep: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
56
|
+
delay: S.optional<S.SchemaClass<number, number, never>>;
|
|
57
|
+
}>>;
|
|
58
|
+
}>>, S.mutable<S.Struct<{
|
|
59
|
+
type: S.Literal<[import("./types").TriggerKind.Email]>;
|
|
60
|
+
}>>, S.mutable<S.Struct<{
|
|
61
|
+
type: S.Literal<[import("./types").TriggerKind.Queue]>;
|
|
62
|
+
queue: S.refine<string, S.Schema<string, string, never>>;
|
|
63
|
+
}>>]>>;
|
|
64
|
+
readonly meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
65
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>> | undefined;
|
|
66
|
+
}, never>;
|
|
67
|
+
export type InvocationTraceEvent = S.Schema.Type<typeof InvocationTrace>;
|
|
68
|
+
declare const TraceEvent: S.Schema<{
|
|
69
|
+
readonly id: string;
|
|
70
|
+
outcome: string;
|
|
71
|
+
truncated: boolean;
|
|
72
|
+
logs: {
|
|
73
|
+
readonly context?: object | undefined;
|
|
74
|
+
readonly timestampMs: number;
|
|
75
|
+
readonly level: string;
|
|
76
|
+
readonly message: string;
|
|
77
|
+
}[];
|
|
78
|
+
exceptions: {
|
|
79
|
+
readonly name: string;
|
|
80
|
+
readonly timestampMs: number;
|
|
81
|
+
readonly message: string;
|
|
82
|
+
readonly stack?: string | undefined;
|
|
83
|
+
}[];
|
|
84
|
+
}, {
|
|
85
|
+
readonly id: string;
|
|
86
|
+
outcome: string;
|
|
87
|
+
truncated: boolean;
|
|
88
|
+
logs: {
|
|
89
|
+
readonly context?: object | undefined;
|
|
90
|
+
readonly timestampMs: number;
|
|
91
|
+
readonly level: string;
|
|
92
|
+
readonly message: string;
|
|
93
|
+
}[];
|
|
94
|
+
exceptions: {
|
|
95
|
+
readonly name: string;
|
|
96
|
+
readonly timestampMs: number;
|
|
97
|
+
readonly message: string;
|
|
98
|
+
readonly stack?: string | undefined;
|
|
99
|
+
}[];
|
|
100
|
+
}, never>;
|
|
101
|
+
export type TraceEvent = S.Schema.Type<typeof TraceEvent>;
|
|
102
|
+
export {};
|
|
103
|
+
//# sourceMappingURL=trace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../../../../src/types/trace.ts"],"names":[],"mappings":"AAIA,OAAO,EAAc,OAAO,EAAY,GAAG,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAI1E,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAcwC,CAAC;AAE9D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,eAAe,CAAC,CAAC;AAgBzE,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAMwC,CAAC;AAEzD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
|
@@ -7,7 +7,9 @@ import { S } from '@dxos/echo-schema';
|
|
|
7
7
|
export declare enum TriggerKind {
|
|
8
8
|
Timer = "timer",
|
|
9
9
|
Webhook = "webhook",
|
|
10
|
-
Subscription = "subscription"
|
|
10
|
+
Subscription = "subscription",
|
|
11
|
+
Email = "email",
|
|
12
|
+
Queue = "queue"
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
13
15
|
* Cron timer.
|
|
@@ -17,6 +19,15 @@ declare const TimerTriggerSchema: S.mutable<S.Struct<{
|
|
|
17
19
|
cron: S.SchemaClass<string, string, never>;
|
|
18
20
|
}>>;
|
|
19
21
|
export type TimerTrigger = S.Schema.Type<typeof TimerTriggerSchema>;
|
|
22
|
+
declare const EmailTriggerSchema: S.mutable<S.Struct<{
|
|
23
|
+
type: S.Literal<[TriggerKind.Email]>;
|
|
24
|
+
}>>;
|
|
25
|
+
export type EmailTrigger = S.Schema.Type<typeof EmailTriggerSchema>;
|
|
26
|
+
declare const QueueTriggerSchema: S.mutable<S.Struct<{
|
|
27
|
+
type: S.Literal<[TriggerKind.Queue]>;
|
|
28
|
+
queue: S.refine<string, S.Schema<string, string, never>>;
|
|
29
|
+
}>>;
|
|
30
|
+
export type QueueTrigger = S.Schema.Type<typeof QueueTriggerSchema>;
|
|
20
31
|
/**
|
|
21
32
|
* Webhook.
|
|
22
33
|
*/
|
|
@@ -61,6 +72,11 @@ export declare const TriggerSchema: S.Union<[S.mutable<S.Struct<{
|
|
|
61
72
|
deep: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
62
73
|
delay: S.optional<S.SchemaClass<number, number, never>>;
|
|
63
74
|
}>>;
|
|
75
|
+
}>>, S.mutable<S.Struct<{
|
|
76
|
+
type: S.Literal<[TriggerKind.Email]>;
|
|
77
|
+
}>>, S.mutable<S.Struct<{
|
|
78
|
+
type: S.Literal<[TriggerKind.Queue]>;
|
|
79
|
+
queue: S.refine<string, S.Schema<string, string, never>>;
|
|
64
80
|
}>>]>;
|
|
65
81
|
export type TriggerType = S.Schema.Type<typeof TriggerSchema>;
|
|
66
82
|
/**
|
|
@@ -86,11 +102,16 @@ export declare const FunctionTriggerSchema: S.Struct<{
|
|
|
86
102
|
deep: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
87
103
|
delay: S.optional<S.SchemaClass<number, number, never>>;
|
|
88
104
|
}>>;
|
|
105
|
+
}>>, S.mutable<S.Struct<{
|
|
106
|
+
type: S.Literal<[TriggerKind.Email]>;
|
|
107
|
+
}>>, S.mutable<S.Struct<{
|
|
108
|
+
type: S.Literal<[TriggerKind.Queue]>;
|
|
109
|
+
queue: S.refine<string, S.Schema<string, string, never>>;
|
|
89
110
|
}>>]>>;
|
|
90
111
|
meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
91
112
|
}>;
|
|
92
113
|
export type FunctionTriggerType = S.Schema.Type<typeof FunctionTriggerSchema>;
|
|
93
|
-
declare const FunctionTrigger_base: import("@dxos/echo-schema").TypedObjectPrototype<import("
|
|
114
|
+
declare const FunctionTrigger_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
|
|
94
115
|
readonly function: S.optional<S.SchemaClass<string, string, never>>;
|
|
95
116
|
readonly enabled: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
96
117
|
readonly spec: S.optional<S.Union<[S.mutable<S.Struct<{
|
|
@@ -110,9 +131,14 @@ declare const FunctionTrigger_base: import("@dxos/echo-schema").TypedObjectProto
|
|
|
110
131
|
deep: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
111
132
|
delay: S.optional<S.SchemaClass<number, number, never>>;
|
|
112
133
|
}>>;
|
|
134
|
+
}>>, S.mutable<S.Struct<{
|
|
135
|
+
type: S.Literal<[TriggerKind.Email]>;
|
|
136
|
+
}>>, S.mutable<S.Struct<{
|
|
137
|
+
type: S.Literal<[TriggerKind.Queue]>;
|
|
138
|
+
queue: S.refine<string, S.Schema<string, string, never>>;
|
|
113
139
|
}>>]>>;
|
|
114
140
|
readonly meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
115
|
-
}, import("
|
|
141
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<{
|
|
116
142
|
readonly function: S.optional<S.SchemaClass<string, string, never>>;
|
|
117
143
|
readonly enabled: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
118
144
|
readonly spec: S.optional<S.Union<[S.mutable<S.Struct<{
|
|
@@ -132,6 +158,11 @@ declare const FunctionTrigger_base: import("@dxos/echo-schema").TypedObjectProto
|
|
|
132
158
|
deep: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
133
159
|
delay: S.optional<S.SchemaClass<number, number, never>>;
|
|
134
160
|
}>>;
|
|
161
|
+
}>>, S.mutable<S.Struct<{
|
|
162
|
+
type: S.Literal<[TriggerKind.Email]>;
|
|
163
|
+
}>>, S.mutable<S.Struct<{
|
|
164
|
+
type: S.Literal<[TriggerKind.Queue]>;
|
|
165
|
+
queue: S.refine<string, S.Schema<string, string, never>>;
|
|
135
166
|
}>>]>>;
|
|
136
167
|
readonly meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
137
168
|
}>>;
|
|
@@ -140,12 +171,12 @@ declare const FunctionTrigger_base: import("@dxos/echo-schema").TypedObjectProto
|
|
|
140
171
|
*/
|
|
141
172
|
export declare class FunctionTrigger extends FunctionTrigger_base {
|
|
142
173
|
}
|
|
143
|
-
declare const FunctionDef_base: import("@dxos/echo-schema").TypedObjectPrototype<import("
|
|
174
|
+
declare const FunctionDef_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
|
|
144
175
|
uri: typeof S.String;
|
|
145
176
|
description: S.optional<typeof S.String>;
|
|
146
177
|
route: typeof S.String;
|
|
147
178
|
handler: typeof S.String;
|
|
148
|
-
}, import("
|
|
179
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<{
|
|
149
180
|
uri: typeof S.String;
|
|
150
181
|
description: S.optional<typeof S.String>;
|
|
151
182
|
route: typeof S.String;
|
|
@@ -161,18 +192,18 @@ export declare class FunctionDef extends FunctionDef_base {
|
|
|
161
192
|
* Function manifest file.
|
|
162
193
|
*/
|
|
163
194
|
export declare const FunctionManifestSchema: S.Struct<{
|
|
164
|
-
functions: S.optional<S.mutable<S.Array$<S.Schema<import("@dxos/echo-schema").ExcludeId<import("
|
|
195
|
+
functions: S.optional<S.mutable<S.Array$<S.Schema<import("@dxos/echo-schema").ExcludeId<import("@dxos/echo-schema").TypedObjectFields<{
|
|
165
196
|
uri: typeof S.String;
|
|
166
197
|
description: S.optional<typeof S.String>;
|
|
167
198
|
route: typeof S.String;
|
|
168
199
|
handler: typeof S.String;
|
|
169
|
-
}, import("
|
|
200
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>> & import("@dxos/echo-schema").WithMeta, S.Struct.Encoded<{
|
|
170
201
|
uri: typeof S.String;
|
|
171
202
|
description: S.optional<typeof S.String>;
|
|
172
203
|
route: typeof S.String;
|
|
173
204
|
handler: typeof S.String;
|
|
174
205
|
}>, never>>>>;
|
|
175
|
-
triggers: S.optional<S.mutable<S.Array$<S.Schema<import("@dxos/echo-schema").ExcludeId<import("
|
|
206
|
+
triggers: S.optional<S.mutable<S.Array$<S.Schema<import("@dxos/echo-schema").ExcludeId<import("@dxos/echo-schema").TypedObjectFields<{
|
|
176
207
|
readonly function: S.optional<S.SchemaClass<string, string, never>>;
|
|
177
208
|
readonly enabled: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
178
209
|
readonly spec: S.optional<S.Union<[S.mutable<S.Struct<{
|
|
@@ -192,9 +223,14 @@ export declare const FunctionManifestSchema: S.Struct<{
|
|
|
192
223
|
deep: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
193
224
|
delay: S.optional<S.SchemaClass<number, number, never>>;
|
|
194
225
|
}>>;
|
|
226
|
+
}>>, S.mutable<S.Struct<{
|
|
227
|
+
type: S.Literal<[TriggerKind.Email]>;
|
|
228
|
+
}>>, S.mutable<S.Struct<{
|
|
229
|
+
type: S.Literal<[TriggerKind.Queue]>;
|
|
230
|
+
queue: S.refine<string, S.Schema<string, string, never>>;
|
|
195
231
|
}>>]>>;
|
|
196
232
|
readonly meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
197
|
-
}, import("
|
|
233
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>> & import("@dxos/echo-schema").WithMeta, S.Struct.Encoded<{
|
|
198
234
|
readonly function: S.optional<S.SchemaClass<string, string, never>>;
|
|
199
235
|
readonly enabled: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
200
236
|
readonly spec: S.optional<S.Union<[S.mutable<S.Struct<{
|
|
@@ -214,6 +250,11 @@ export declare const FunctionManifestSchema: S.Struct<{
|
|
|
214
250
|
deep: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
215
251
|
delay: S.optional<S.SchemaClass<number, number, never>>;
|
|
216
252
|
}>>;
|
|
253
|
+
}>>, S.mutable<S.Struct<{
|
|
254
|
+
type: S.Literal<[TriggerKind.Email]>;
|
|
255
|
+
}>>, S.mutable<S.Struct<{
|
|
256
|
+
type: S.Literal<[TriggerKind.Queue]>;
|
|
257
|
+
queue: S.refine<string, S.Schema<string, string, never>>;
|
|
217
258
|
}>>]>>;
|
|
218
259
|
readonly meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
219
260
|
}>, never>>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAuC,CAAC,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAuC,CAAC,EAAoB,MAAM,mBAAmB,CAAC;AAE7F;;;;GAIG;AACH,oBAAY,WAAW;IACrB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,YAAY,iBAAiB;IAC7B,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AAKD;;GAEG;AACH,QAAA,MAAM,kBAAkB;;;GAMN,CAAC;AAEnB,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,QAAA,MAAM,kBAAkB;;GAEN,CAAC;AAEnB,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,QAAA,MAAM,kBAAkB;;;GAGN,CAAC;AAEnB,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE;;GAEG;AACH,QAAA,MAAM,oBAAoB;;;;GAaR,CAAC;AAEnB,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAQxE;;GAEG;AACH,QAAA,MAAM,yBAAyB;;;;;;;;;;GAYb,CAAC;AAEnB,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAElF;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;KAQxB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,aAAa,CAAC,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAahC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,qBAAqB,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE9E;;GAEG;AACH,qBAAa,eAAgB,SAAQ,oBAGL;CAAG;;;;;;;;;;;;AAEnC;;;GAGG;AAEH,qBAAa,WAAY,SAAQ,gBAQ/B;CAAG;AAEL;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE5E,eAAO,MAAM,cAAc,iDAAiC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"5.7.
|
|
1
|
+
{"version":"5.7.3"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/functions",
|
|
3
|
-
"version": "0.7.5-main.
|
|
3
|
+
"version": "0.7.5-main.5ae2ba8",
|
|
4
4
|
"description": "Functions API and runtime.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "info@dxos.org",
|
|
9
9
|
"sideEffects": true,
|
|
10
|
+
"type": "module",
|
|
10
11
|
"exports": {
|
|
11
12
|
".": {
|
|
12
13
|
"types": "./dist/types/src/index.d.ts",
|
|
13
14
|
"browser": "./dist/lib/browser/index.mjs",
|
|
14
15
|
"node": "./dist/lib/node-esm/index.mjs"
|
|
15
16
|
},
|
|
17
|
+
"./bundler": {
|
|
18
|
+
"types": "./dist/types/src/bundler/index.d.ts",
|
|
19
|
+
"browser": "./dist/lib/browser/bundler/index.mjs",
|
|
20
|
+
"node": "./dist/lib/node-esm/bundler/index.mjs"
|
|
21
|
+
},
|
|
16
22
|
"./edge": {
|
|
17
23
|
"types": "./dist/types/src/edge/index.d.ts",
|
|
18
24
|
"browser": "./dist/lib/browser/edge/index.mjs",
|
|
@@ -32,11 +38,17 @@
|
|
|
32
38
|
"types": "dist/types/src/index.d.ts",
|
|
33
39
|
"typesVersions": {
|
|
34
40
|
"*": {
|
|
41
|
+
"bundler": [
|
|
42
|
+
"dist/types/src/bundler/index.d.ts"
|
|
43
|
+
],
|
|
44
|
+
"edge": [
|
|
45
|
+
"dist/types/src/edge/index.d.ts"
|
|
46
|
+
],
|
|
35
47
|
"testing": [
|
|
36
48
|
"dist/types/src/testing/index.d.ts"
|
|
37
49
|
],
|
|
38
50
|
"types": [
|
|
39
|
-
"dist/types/src/types.d.ts"
|
|
51
|
+
"dist/types/src/types/index.d.ts"
|
|
40
52
|
]
|
|
41
53
|
}
|
|
42
54
|
},
|
|
@@ -49,31 +61,33 @@
|
|
|
49
61
|
"@effect/schema": "^0.75.5",
|
|
50
62
|
"@preact/signals-core": "^1.6.0",
|
|
51
63
|
"cron": "^3.1.6",
|
|
52
|
-
"effect": "^3.
|
|
64
|
+
"effect": "^3.12.3",
|
|
65
|
+
"esbuild-wasm": "^0.16.14",
|
|
53
66
|
"express": "^4.19.2",
|
|
54
67
|
"get-port-please": "^3.1.1",
|
|
55
68
|
"iso-did": "^1.6.0",
|
|
56
69
|
"ws": "^8.14.2",
|
|
57
|
-
"@dxos/async": "0.7.5-main.
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/echo-
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/util": "0.7.5-main.
|
|
70
|
+
"@dxos/async": "0.7.5-main.5ae2ba8",
|
|
71
|
+
"@dxos/client": "0.7.5-main.5ae2ba8",
|
|
72
|
+
"@dxos/context": "0.7.5-main.5ae2ba8",
|
|
73
|
+
"@dxos/crypto": "0.7.5-main.5ae2ba8",
|
|
74
|
+
"@dxos/echo-db": "0.7.5-main.5ae2ba8",
|
|
75
|
+
"@dxos/echo-protocol": "0.7.5-main.5ae2ba8",
|
|
76
|
+
"@dxos/edge-client": "0.7.5-main.5ae2ba8",
|
|
77
|
+
"@dxos/invariant": "0.7.5-main.5ae2ba8",
|
|
78
|
+
"@dxos/keys": "0.7.5-main.5ae2ba8",
|
|
79
|
+
"@dxos/live-object": "0.7.5-main.5ae2ba8",
|
|
80
|
+
"@dxos/echo-schema": "0.7.5-main.5ae2ba8",
|
|
81
|
+
"@dxos/log": "0.7.5-main.5ae2ba8",
|
|
82
|
+
"@dxos/node-std": "0.7.5-main.5ae2ba8",
|
|
83
|
+
"@dxos/protocols": "0.7.5-main.5ae2ba8",
|
|
84
|
+
"@dxos/util": "0.7.5-main.5ae2ba8",
|
|
85
|
+
"@dxos/schema": "0.7.5-main.5ae2ba8"
|
|
72
86
|
},
|
|
73
87
|
"devDependencies": {
|
|
74
88
|
"@types/express": "^4.17.17",
|
|
75
89
|
"@types/ws": "^7.4.0",
|
|
76
|
-
"@dxos/agent": "0.7.5-main.
|
|
90
|
+
"@dxos/agent": "0.7.5-main.5ae2ba8"
|
|
77
91
|
},
|
|
78
92
|
"publishConfig": {
|
|
79
93
|
"access": "public"
|