@dxos/functions 0.8.2-main.36232bc → 0.8.2-main.5885341
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.
|
@@ -2,14 +2,14 @@ import { JsonSchemaType, Ref, S } from '@dxos/echo-schema';
|
|
|
2
2
|
/**
|
|
3
3
|
* Source script.
|
|
4
4
|
*/
|
|
5
|
-
export declare const ScriptType: import("@dxos/echo-schema").
|
|
5
|
+
export declare const ScriptType: import("@dxos/echo-schema").EchoTypeSchema<S.Struct<{
|
|
6
6
|
name: S.optional<typeof S.String>;
|
|
7
7
|
description: S.optional<typeof S.String>;
|
|
8
8
|
changed: S.optional<typeof S.Boolean>;
|
|
9
9
|
source: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
10
10
|
content: typeof S.String;
|
|
11
11
|
}, import("@dxos/echo-schema").TypedObjectOptions>>;
|
|
12
|
-
}
|
|
12
|
+
}>, {}>;
|
|
13
13
|
export type ScriptType = S.Schema.Type<typeof ScriptType>;
|
|
14
14
|
declare const FunctionType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
|
|
15
15
|
name: typeof S.NonEmptyString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAc,cAAc,EAAqB,GAAG,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;AAGvG;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;wBAFtB,EAAE,MAAM;;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAc,cAAc,EAAqB,GAAG,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;AAGvG;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;wBAFtB,EAAE,MAAM;;OAWkE,CAAC;AAE5E,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC;;;;;;;;4BAbzD,EAAE,MAAM;;;;;;;;;;;;;;;;4BAAR,EAAE,MAAM;;;;;;;;;;AAeT;;GAEG;AACH,qBAAa,YAAa,SAAQ,iBAmBhC;CAAG"}
|
|
@@ -16,7 +16,7 @@ export declare const TraceEventException: S.Struct<{
|
|
|
16
16
|
stack: S.optional<typeof S.String>;
|
|
17
17
|
}>;
|
|
18
18
|
export type TraceEventException = S.Schema.Type<typeof TraceEventException>;
|
|
19
|
-
export declare const InvocationTraceStartEvent: import("@dxos/echo-schema").
|
|
19
|
+
export declare const InvocationTraceStartEvent: import("@dxos/echo-schema").EchoTypeSchema<S.Struct<{
|
|
20
20
|
/**
|
|
21
21
|
* Queue message id.
|
|
22
22
|
*/
|
|
@@ -45,10 +45,10 @@ export declare const InvocationTraceStartEvent: import("@dxos/echo-schema").Echo
|
|
|
45
45
|
/**
|
|
46
46
|
* Present for automatic invocations.
|
|
47
47
|
*/
|
|
48
|
-
trigger: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
trigger: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<Readonly<{
|
|
49
|
+
function: S.optional<S.SchemaClass<string, string, never>>;
|
|
50
|
+
enabled: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
51
|
+
spec: S.optional<S.Union<[S.mutable<S.Struct<{
|
|
52
52
|
type: S.Literal<[import("./types").TriggerKind.Timer]>;
|
|
53
53
|
cron: S.SchemaClass<string, string, never>;
|
|
54
54
|
}>>, S.mutable<S.Struct<{
|
|
@@ -71,11 +71,11 @@ export declare const InvocationTraceStartEvent: import("@dxos/echo-schema").Echo
|
|
|
71
71
|
type: S.Literal<[import("./types").TriggerKind.Queue]>;
|
|
72
72
|
queue: S.refine<string, typeof S.NonEmptyString>;
|
|
73
73
|
}>>]>>;
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
}
|
|
74
|
+
meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
75
|
+
}>, import("@dxos/echo-schema").TypedObjectOptions>>>;
|
|
76
|
+
}>, {}>;
|
|
77
77
|
export type InvocationTraceStartEvent = S.Schema.Type<typeof InvocationTraceStartEvent>;
|
|
78
|
-
export declare const InvocationTraceEndEvent: import("@dxos/echo-schema").
|
|
78
|
+
export declare const InvocationTraceEndEvent: import("@dxos/echo-schema").EchoTypeSchema<S.Struct<{
|
|
79
79
|
/**
|
|
80
80
|
* Trace event id.
|
|
81
81
|
*/
|
|
@@ -96,7 +96,7 @@ export declare const InvocationTraceEndEvent: import("@dxos/echo-schema").EchoOb
|
|
|
96
96
|
name: typeof S.String;
|
|
97
97
|
stack: S.optional<typeof S.String>;
|
|
98
98
|
}>>;
|
|
99
|
-
}
|
|
99
|
+
}>, {}>;
|
|
100
100
|
export type InvocationTraceEndEvent = S.Schema.Type<typeof InvocationTraceEndEvent>;
|
|
101
101
|
export type InvocationTraceEvent = InvocationTraceStartEvent | InvocationTraceEndEvent;
|
|
102
102
|
export declare const TraceEventLog: S.Struct<{
|
|
@@ -105,7 +105,7 @@ export declare const TraceEventLog: S.Struct<{
|
|
|
105
105
|
message: typeof S.String;
|
|
106
106
|
context: S.optional<typeof S.Object>;
|
|
107
107
|
}>;
|
|
108
|
-
export declare const TraceEvent: import("@dxos/echo-schema").
|
|
108
|
+
export declare const TraceEvent: import("@dxos/echo-schema").EchoTypeSchema<S.Struct<{
|
|
109
109
|
id: import("@dxos/echo-schema").ObjectIdClass;
|
|
110
110
|
outcome: typeof S.String;
|
|
111
111
|
truncated: typeof S.Boolean;
|
|
@@ -125,7 +125,7 @@ export declare const TraceEvent: import("@dxos/echo-schema").EchoObjectSchema<S.
|
|
|
125
125
|
name: typeof S.String;
|
|
126
126
|
stack: S.optional<typeof S.String>;
|
|
127
127
|
}>>;
|
|
128
|
-
}
|
|
128
|
+
}>, {}>;
|
|
129
129
|
export type TraceEvent = S.Schema.Type<typeof TraceEvent>;
|
|
130
130
|
/**
|
|
131
131
|
* Deprecated InvocationTrace event format.
|
|
@@ -1 +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;AAG1E,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEpE,oBAAY,iBAAiB;IAC3B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAGD,oBAAY,wBAAwB;IAClC,KAAK,UAAU;IACf,GAAG,QAAQ;CACZ;AAED,eAAO,MAAM,mBAAmB;;;;;EAK9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE5E,eAAO,MAAM,yBAAyB;IACpC;;OAEG;;;IAGH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
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;AAG1E,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEpE,oBAAY,iBAAiB;IAC3B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAGD,oBAAY,wBAAwB;IAClC,KAAK,UAAU;IACf,GAAG,QAAQ;CACZ;A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,CAAC,EAAE,mBAAmB,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,qBAAqB,WAAY,oBAAoB,EAAE,KAAG,cAAc,EAkDpF,CAAC"}
|
|
@@ -111,10 +111,10 @@ export declare const FunctionTriggerSchema: S.Struct<{
|
|
|
111
111
|
meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
112
112
|
}>;
|
|
113
113
|
export type FunctionTriggerType = S.Schema.Type<typeof FunctionTriggerSchema>;
|
|
114
|
-
declare const FunctionTrigger_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
declare const FunctionTrigger_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<Readonly<{
|
|
115
|
+
function: S.optional<S.SchemaClass<string, string, never>>;
|
|
116
|
+
enabled: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
117
|
+
spec: S.optional<S.Union<[S.mutable<S.Struct<{
|
|
118
118
|
type: S.Literal<[TriggerKind.Timer]>;
|
|
119
119
|
cron: S.SchemaClass<string, string, never>;
|
|
120
120
|
}>>, S.mutable<S.Struct<{
|
|
@@ -137,11 +137,11 @@ declare const FunctionTrigger_base: import("@dxos/echo-schema").TypedObjectProto
|
|
|
137
137
|
type: S.Literal<[TriggerKind.Queue]>;
|
|
138
138
|
queue: S.refine<string, typeof S.NonEmptyString>;
|
|
139
139
|
}>>]>>;
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
140
|
+
meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
141
|
+
}>, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<Readonly<{
|
|
142
|
+
function: S.optional<S.SchemaClass<string, string, never>>;
|
|
143
|
+
enabled: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
144
|
+
spec: S.optional<S.Union<[S.mutable<S.Struct<{
|
|
145
145
|
type: S.Literal<[TriggerKind.Timer]>;
|
|
146
146
|
cron: S.SchemaClass<string, string, never>;
|
|
147
147
|
}>>, S.mutable<S.Struct<{
|
|
@@ -164,8 +164,8 @@ declare const FunctionTrigger_base: import("@dxos/echo-schema").TypedObjectProto
|
|
|
164
164
|
type: S.Literal<[TriggerKind.Queue]>;
|
|
165
165
|
queue: S.refine<string, typeof S.NonEmptyString>;
|
|
166
166
|
}>>]>>;
|
|
167
|
-
|
|
168
|
-
}
|
|
167
|
+
meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
168
|
+
}>>>;
|
|
169
169
|
/**
|
|
170
170
|
* Function trigger.
|
|
171
171
|
*/
|
|
@@ -203,10 +203,10 @@ export declare const FunctionManifestSchema: S.Struct<{
|
|
|
203
203
|
route: typeof S.String;
|
|
204
204
|
handler: typeof S.String;
|
|
205
205
|
}>, never>>>>;
|
|
206
|
-
triggers: S.optional<S.mutable<S.Array$<S.Schema<import("@dxos/echo-schema").ExcludeId<import("@dxos/echo-schema").TypedObjectFields<{
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
206
|
+
triggers: S.optional<S.mutable<S.Array$<S.Schema<import("@dxos/echo-schema").ExcludeId<import("@dxos/echo-schema").TypedObjectFields<Readonly<{
|
|
207
|
+
function: S.optional<S.SchemaClass<string, string, never>>;
|
|
208
|
+
enabled: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
209
|
+
spec: S.optional<S.Union<[S.mutable<S.Struct<{
|
|
210
210
|
type: S.Literal<[TriggerKind.Timer]>;
|
|
211
211
|
cron: S.SchemaClass<string, string, never>;
|
|
212
212
|
}>>, S.mutable<S.Struct<{
|
|
@@ -229,11 +229,11 @@ export declare const FunctionManifestSchema: S.Struct<{
|
|
|
229
229
|
type: S.Literal<[TriggerKind.Queue]>;
|
|
230
230
|
queue: S.refine<string, typeof S.NonEmptyString>;
|
|
231
231
|
}>>]>>;
|
|
232
|
-
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
232
|
+
meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
233
|
+
}>, import("@dxos/echo-schema").TypedObjectOptions>> & import("@dxos/echo-schema").WithMeta, S.Struct.Encoded<Readonly<{
|
|
234
|
+
function: S.optional<S.SchemaClass<string, string, never>>;
|
|
235
|
+
enabled: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
236
|
+
spec: S.optional<S.Union<[S.mutable<S.Struct<{
|
|
237
237
|
type: S.Literal<[TriggerKind.Timer]>;
|
|
238
238
|
cron: S.SchemaClass<string, string, never>;
|
|
239
239
|
}>>, S.mutable<S.Struct<{
|
|
@@ -256,8 +256,8 @@ export declare const FunctionManifestSchema: S.Struct<{
|
|
|
256
256
|
type: S.Literal<[TriggerKind.Queue]>;
|
|
257
257
|
queue: S.refine<string, typeof S.NonEmptyString>;
|
|
258
258
|
}>>]>>;
|
|
259
|
-
|
|
260
|
-
}
|
|
259
|
+
meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
260
|
+
}>>, never>>>>;
|
|
261
261
|
}>;
|
|
262
262
|
export type FunctionManifest = S.Schema.Type<typeof FunctionManifestSchema>;
|
|
263
263
|
export declare const FUNCTION_TYPES: (typeof FunctionTrigger | typeof FunctionDef)[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/functions",
|
|
3
|
-
"version": "0.8.2-main.
|
|
3
|
+
"version": "0.8.2-main.5885341",
|
|
4
4
|
"description": "Functions API and runtime.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -61,34 +61,34 @@
|
|
|
61
61
|
"@preact/signals-core": "^1.6.0",
|
|
62
62
|
"cron": "^3.1.6",
|
|
63
63
|
"cron-schedule": "^5.0.4",
|
|
64
|
-
"effect": "3.
|
|
64
|
+
"effect": "3.14.21",
|
|
65
65
|
"esbuild-wasm": "^0.16.14",
|
|
66
66
|
"express": "^4.19.2",
|
|
67
67
|
"get-port-please": "^3.1.1",
|
|
68
68
|
"iso-did": "^1.6.0",
|
|
69
69
|
"ws": "^8.14.2",
|
|
70
|
-
"@dxos/assistant": "0.8.2-main.
|
|
71
|
-
"@dxos/async": "0.8.2-main.
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/crypto": "0.8.2-main.
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/echo-
|
|
76
|
-
"@dxos/echo-
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/
|
|
79
|
-
"@dxos/invariant": "0.8.2-main.
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/live-object": "0.8.2-main.
|
|
82
|
-
"@dxos/node-std": "0.8.2-main.
|
|
83
|
-
"@dxos/protocols": "0.8.2-main.
|
|
84
|
-
"@dxos/log": "0.8.2-main.
|
|
85
|
-
"@dxos/util": "0.8.2-main.
|
|
86
|
-
"@dxos/schema": "0.8.2-main.
|
|
70
|
+
"@dxos/assistant": "0.8.2-main.5885341",
|
|
71
|
+
"@dxos/async": "0.8.2-main.5885341",
|
|
72
|
+
"@dxos/context": "0.8.2-main.5885341",
|
|
73
|
+
"@dxos/crypto": "0.8.2-main.5885341",
|
|
74
|
+
"@dxos/client": "0.8.2-main.5885341",
|
|
75
|
+
"@dxos/echo-db": "0.8.2-main.5885341",
|
|
76
|
+
"@dxos/echo-protocol": "0.8.2-main.5885341",
|
|
77
|
+
"@dxos/echo-schema": "0.8.2-main.5885341",
|
|
78
|
+
"@dxos/edge-client": "0.8.2-main.5885341",
|
|
79
|
+
"@dxos/invariant": "0.8.2-main.5885341",
|
|
80
|
+
"@dxos/keys": "0.8.2-main.5885341",
|
|
81
|
+
"@dxos/live-object": "0.8.2-main.5885341",
|
|
82
|
+
"@dxos/node-std": "0.8.2-main.5885341",
|
|
83
|
+
"@dxos/protocols": "0.8.2-main.5885341",
|
|
84
|
+
"@dxos/log": "0.8.2-main.5885341",
|
|
85
|
+
"@dxos/util": "0.8.2-main.5885341",
|
|
86
|
+
"@dxos/schema": "0.8.2-main.5885341"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
89
|
"@types/express": "^4.17.17",
|
|
90
90
|
"@types/ws": "^7.4.0",
|
|
91
|
-
"@dxos/agent": "0.8.2-main.
|
|
91
|
+
"@dxos/agent": "0.8.2-main.5885341"
|
|
92
92
|
},
|
|
93
93
|
"publishConfig": {
|
|
94
94
|
"access": "public"
|