@dxos/functions 0.8.1 → 0.8.2-main.10c050d
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 +0 -3
- package/dist/lib/browser/bundler/index.mjs.map +3 -3
- package/dist/lib/browser/edge/index.mjs +63 -7
- package/dist/lib/browser/edge/index.mjs.map +4 -4
- package/dist/lib/browser/index.mjs +513 -100
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/bundler/index.cjs +0 -1
- package/dist/lib/node/bundler/index.cjs.map +3 -3
- package/dist/lib/node/edge/index.cjs +65 -5
- package/dist/lib/node/edge/index.cjs.map +4 -4
- package/dist/lib/node/index.cjs +519 -92
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/bundler/index.mjs +0 -1
- package/dist/lib/node-esm/bundler/index.mjs.map +3 -3
- package/dist/lib/node-esm/edge/index.mjs +64 -6
- package/dist/lib/node-esm/edge/index.mjs.map +4 -4
- package/dist/lib/node-esm/index.mjs +513 -98
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/bundler/bundler.d.ts.map +1 -1
- package/dist/types/src/edge/functions.d.ts +3 -3
- package/dist/types/src/edge/functions.d.ts.map +1 -1
- package/dist/types/src/edge/index.d.ts.map +1 -1
- package/dist/types/src/executor/executor.d.ts +8 -0
- package/dist/types/src/executor/executor.d.ts.map +1 -0
- package/dist/types/src/executor/index.d.ts +2 -0
- package/dist/types/src/executor/index.d.ts.map +1 -0
- package/dist/types/src/handler.d.ts +23 -67
- package/dist/types/src/handler.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +5 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/schema.d.ts +57 -0
- package/dist/types/src/schema.d.ts.map +1 -0
- package/dist/types/src/services/ai.d.ts +9 -0
- package/dist/types/src/services/ai.d.ts.map +1 -0
- package/dist/types/src/services/credentials.d.ts +30 -0
- package/dist/types/src/services/credentials.d.ts.map +1 -0
- package/dist/types/src/services/database.d.ts +9 -0
- package/dist/types/src/services/database.d.ts.map +1 -0
- package/dist/types/src/services/index.d.ts +7 -0
- package/dist/types/src/services/index.d.ts.map +1 -0
- package/dist/types/src/services/queues.d.ts +10 -0
- package/dist/types/src/services/queues.d.ts.map +1 -0
- package/dist/types/src/services/service-container.d.ts +25 -0
- package/dist/types/src/services/service-container.d.ts.map +1 -0
- package/dist/types/src/services/tracing.d.ts +15 -0
- package/dist/types/src/services/tracing.d.ts.map +1 -0
- package/dist/types/src/trace.d.ts +149 -0
- package/dist/types/src/trace.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +2 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +407 -0
- package/dist/types/src/types.d.ts.map +1 -0
- package/dist/types/src/{types/url.d.ts → url.d.ts} +6 -0
- package/dist/types/src/url.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +21 -36
- package/src/bundler/bundler.ts +7 -1
- package/src/edge/functions.ts +7 -4
- package/src/edge/index.ts +4 -0
- package/src/executor/executor.ts +47 -0
- package/src/executor/index.ts +5 -0
- package/src/handler.ts +29 -125
- package/src/index.ts +8 -5
- package/src/schema.ts +52 -0
- package/src/services/ai.ts +15 -0
- package/src/services/credentials.ts +55 -0
- package/src/services/database.ts +14 -0
- package/src/services/index.ts +10 -0
- package/src/services/queues.ts +16 -0
- package/src/services/service-container.ts +58 -0
- package/src/services/tracing.ts +27 -0
- package/src/{types/trace.ts → trace.ts} +37 -35
- package/src/translations.ts +1 -1
- package/src/types.ts +211 -0
- package/src/{types/url.ts → url.ts} +5 -0
- package/dist/lib/browser/chunk-HI7YZO2K.mjs +0 -482
- package/dist/lib/browser/chunk-HI7YZO2K.mjs.map +0 -7
- package/dist/lib/browser/chunk-LT4LR4VU.mjs +0 -72
- package/dist/lib/browser/chunk-LT4LR4VU.mjs.map +0 -7
- package/dist/lib/browser/chunk-RVSG6WTL.mjs +0 -358
- package/dist/lib/browser/chunk-RVSG6WTL.mjs.map +0 -7
- package/dist/lib/browser/chunk-XRCXIG74.mjs +0 -12
- package/dist/lib/browser/chunk-XRCXIG74.mjs.map +0 -7
- package/dist/lib/browser/testing/index.mjs +0 -670
- package/dist/lib/browser/testing/index.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -49
- package/dist/lib/browser/types/index.mjs.map +0 -7
- package/dist/lib/node/chunk-DSUGRAAL.cjs +0 -392
- package/dist/lib/node/chunk-DSUGRAAL.cjs.map +0 -7
- package/dist/lib/node/chunk-JEQ2X3Z6.cjs +0 -34
- package/dist/lib/node/chunk-JEQ2X3Z6.cjs.map +0 -7
- package/dist/lib/node/chunk-NXZNXVT3.cjs +0 -94
- package/dist/lib/node/chunk-NXZNXVT3.cjs.map +0 -7
- package/dist/lib/node/chunk-RXMCVAMJ.cjs +0 -496
- package/dist/lib/node/chunk-RXMCVAMJ.cjs.map +0 -7
- package/dist/lib/node/testing/index.cjs +0 -687
- package/dist/lib/node/testing/index.cjs.map +0 -7
- package/dist/lib/node/types/index.cjs +0 -70
- package/dist/lib/node/types/index.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-DHGBFXSZ.mjs +0 -12
- package/dist/lib/node-esm/chunk-DHGBFXSZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HBD2FZXO.mjs +0 -358
- package/dist/lib/node-esm/chunk-HBD2FZXO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-O2SXVYU5.mjs +0 -72
- package/dist/lib/node-esm/chunk-O2SXVYU5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SQSJO5HI.mjs +0 -482
- package/dist/lib/node-esm/chunk-SQSJO5HI.mjs.map +0 -7
- package/dist/lib/node-esm/testing/index.mjs +0 -670
- package/dist/lib/node-esm/testing/index.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -49
- package/dist/lib/node-esm/types/index.mjs.map +0 -7
- package/dist/types/src/browser/index.d.ts +0 -2
- package/dist/types/src/browser/index.d.ts.map +0 -1
- package/dist/types/src/function/function-registry.d.ts +0 -25
- package/dist/types/src/function/function-registry.d.ts.map +0 -1
- package/dist/types/src/function/function-registry.test.d.ts +0 -2
- package/dist/types/src/function/function-registry.test.d.ts.map +0 -1
- package/dist/types/src/function/index.d.ts +0 -2
- package/dist/types/src/function/index.d.ts.map +0 -1
- package/dist/types/src/runtime/dev-server.d.ts +0 -52
- package/dist/types/src/runtime/dev-server.d.ts.map +0 -1
- package/dist/types/src/runtime/dev-server.test.d.ts +0 -2
- package/dist/types/src/runtime/dev-server.test.d.ts.map +0 -1
- package/dist/types/src/runtime/index.d.ts +0 -3
- package/dist/types/src/runtime/index.d.ts.map +0 -1
- package/dist/types/src/runtime/scheduler.d.ts +0 -34
- package/dist/types/src/runtime/scheduler.d.ts.map +0 -1
- package/dist/types/src/runtime/scheduler.test.d.ts +0 -2
- package/dist/types/src/runtime/scheduler.test.d.ts.map +0 -1
- package/dist/types/src/testing/functions-integration.test.d.ts +0 -2
- package/dist/types/src/testing/functions-integration.test.d.ts.map +0 -1
- package/dist/types/src/testing/index.d.ts +0 -5
- package/dist/types/src/testing/index.d.ts.map +0 -1
- package/dist/types/src/testing/manifest.d.ts +0 -3
- package/dist/types/src/testing/manifest.d.ts.map +0 -1
- package/dist/types/src/testing/plugin-init.d.ts +0 -6
- package/dist/types/src/testing/plugin-init.d.ts.map +0 -1
- package/dist/types/src/testing/setup.d.ts +0 -15
- package/dist/types/src/testing/setup.d.ts.map +0 -1
- package/dist/types/src/testing/test/handler.d.ts +0 -4
- package/dist/types/src/testing/test/handler.d.ts.map +0 -1
- package/dist/types/src/testing/test/index.d.ts +0 -3
- package/dist/types/src/testing/test/index.d.ts.map +0 -1
- package/dist/types/src/testing/types.d.ts +0 -10
- package/dist/types/src/testing/types.d.ts.map +0 -1
- package/dist/types/src/testing/util.d.ts +0 -5
- package/dist/types/src/testing/util.d.ts.map +0 -1
- package/dist/types/src/trigger/index.d.ts +0 -3
- package/dist/types/src/trigger/index.d.ts.map +0 -1
- package/dist/types/src/trigger/trigger-registry.d.ts +0 -38
- package/dist/types/src/trigger/trigger-registry.d.ts.map +0 -1
- package/dist/types/src/trigger/trigger-registry.test.d.ts +0 -2
- package/dist/types/src/trigger/trigger-registry.test.d.ts.map +0 -1
- package/dist/types/src/trigger/type/index.d.ts +0 -3
- package/dist/types/src/trigger/type/index.d.ts.map +0 -1
- package/dist/types/src/trigger/type/subscription-trigger.d.ts +0 -4
- package/dist/types/src/trigger/type/subscription-trigger.d.ts.map +0 -1
- package/dist/types/src/trigger/type/timer-trigger.d.ts +0 -4
- package/dist/types/src/trigger/type/timer-trigger.d.ts.map +0 -1
- package/dist/types/src/trigger/type/webhook-trigger.d.ts +0 -4
- package/dist/types/src/trigger/type/webhook-trigger.d.ts.map +0 -1
- package/dist/types/src/types/index.d.ts +0 -5
- package/dist/types/src/types/index.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -53
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/dist/types/src/types/trace.d.ts +0 -146
- package/dist/types/src/types/trace.d.ts.map +0 -1
- package/dist/types/src/types/types.d.ts +0 -265
- package/dist/types/src/types/types.d.ts.map +0 -1
- package/dist/types/src/types/url.d.ts.map +0 -1
- package/dist/types/tools/schema.d.ts +0 -2
- package/dist/types/tools/schema.d.ts.map +0 -1
- package/schema/functions.json +0 -211
- package/src/browser/index.ts +0 -5
- package/src/function/function-registry.test.ts +0 -118
- package/src/function/function-registry.ts +0 -104
- package/src/function/index.ts +0 -5
- package/src/runtime/dev-server.test.ts +0 -79
- package/src/runtime/dev-server.ts +0 -240
- package/src/runtime/index.ts +0 -6
- package/src/runtime/scheduler.test.ts +0 -152
- package/src/runtime/scheduler.ts +0 -170
- package/src/testing/functions-integration.test.ts +0 -65
- package/src/testing/index.ts +0 -8
- package/src/testing/manifest.ts +0 -15
- package/src/testing/plugin-init.ts +0 -20
- package/src/testing/setup.ts +0 -109
- package/src/testing/test/handler.ts +0 -15
- package/src/testing/test/index.ts +0 -7
- package/src/testing/types.ts +0 -9
- package/src/testing/util.ts +0 -26
- package/src/trigger/index.ts +0 -6
- package/src/trigger/trigger-registry.test.ts +0 -278
- package/src/trigger/trigger-registry.ts +0 -218
- package/src/trigger/type/index.ts +0 -7
- package/src/trigger/type/subscription-trigger.ts +0 -84
- package/src/trigger/type/timer-trigger.ts +0 -48
- package/src/trigger/type/webhook-trigger.ts +0 -48
- package/src/types/index.ts +0 -8
- package/src/types/schema.ts +0 -46
- package/src/types/types.ts +0 -163
package/dist/lib/node/index.cjs
CHANGED
|
@@ -18,47 +18,60 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var node_exports = {};
|
|
20
20
|
__export(node_exports, {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
21
|
+
AiService: () => AiService,
|
|
22
|
+
ConfiguredCredentialsService: () => ConfiguredCredentialsService,
|
|
23
|
+
CredentialsService: () => CredentialsService,
|
|
24
|
+
DatabaseService: () => DatabaseService,
|
|
25
|
+
EmailTriggerOutput: () => EmailTriggerOutput,
|
|
26
|
+
FUNCTIONS_PRESET_META_KEY: () => FUNCTIONS_PRESET_META_KEY,
|
|
27
|
+
FUNCTION_TYPES: () => FUNCTION_TYPES,
|
|
28
|
+
FunctionExecutor: () => FunctionExecutor,
|
|
29
|
+
FunctionManifestSchema: () => FunctionManifestSchema,
|
|
30
|
+
FunctionTrigger: () => FunctionTrigger,
|
|
31
|
+
FunctionTriggerSchema: () => FunctionTriggerSchema,
|
|
32
|
+
FunctionType: () => FunctionType,
|
|
33
|
+
InvocationOutcome: () => InvocationOutcome,
|
|
34
|
+
InvocationTraceEndEvent: () => InvocationTraceEndEvent,
|
|
35
|
+
InvocationTraceEventType: () => InvocationTraceEventType,
|
|
36
|
+
InvocationTraceStartEvent: () => InvocationTraceStartEvent,
|
|
37
|
+
QueueTriggerOutput: () => QueueTriggerOutput,
|
|
38
|
+
QueuesService: () => QueuesService,
|
|
39
|
+
ScriptType: () => ScriptType,
|
|
40
|
+
ServiceContainer: () => ServiceContainer,
|
|
41
|
+
SubscriptionTriggerOutput: () => SubscriptionTriggerOutput,
|
|
42
|
+
TimerTriggerOutput: () => TimerTriggerOutput,
|
|
43
|
+
TraceEvent: () => TraceEvent,
|
|
44
|
+
TraceEventException: () => TraceEventException,
|
|
45
|
+
TraceEventLog: () => TraceEventLog,
|
|
46
|
+
TracingService: () => TracingService,
|
|
47
|
+
TriggerKind: () => TriggerKind,
|
|
48
|
+
TriggerSchema: () => TriggerSchema,
|
|
49
|
+
WebhookTriggerOutput: () => WebhookTriggerOutput,
|
|
50
|
+
createInvocationSpans: () => createInvocationSpans,
|
|
43
51
|
defineFunction: () => defineFunction,
|
|
44
|
-
getInvocationUrl: () =>
|
|
45
|
-
getUserFunctionUrlInMetadata: () =>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
setUserFunctionUrlInMetadata: () => import_chunk_DSUGRAAL.setUserFunctionUrlInMetadata,
|
|
49
|
-
subscriptionHandler: () => subscriptionHandler,
|
|
50
|
-
uploadWorkerFunction: () => import_chunk_NXZNXVT3.uploadWorkerFunction
|
|
52
|
+
getInvocationUrl: () => getInvocationUrl,
|
|
53
|
+
getUserFunctionUrlInMetadata: () => getUserFunctionUrlInMetadata,
|
|
54
|
+
makeFunctionUrl: () => makeFunctionUrl,
|
|
55
|
+
setUserFunctionUrlInMetadata: () => setUserFunctionUrlInMetadata
|
|
51
56
|
});
|
|
52
57
|
module.exports = __toCommonJS(node_exports);
|
|
53
|
-
var import_chunk_NXZNXVT3 = require("./chunk-NXZNXVT3.cjs");
|
|
54
|
-
var import_chunk_RXMCVAMJ = require("./chunk-RXMCVAMJ.cjs");
|
|
55
|
-
var import_chunk_DSUGRAAL = require("./chunk-DSUGRAAL.cjs");
|
|
56
|
-
var import_chunk_JEQ2X3Z6 = require("./chunk-JEQ2X3Z6.cjs");
|
|
57
58
|
var import_effect = require("effect");
|
|
58
|
-
var
|
|
59
|
+
var import_effect2 = require("effect");
|
|
60
|
+
var import_echo_schema = require("@dxos/echo-schema");
|
|
61
|
+
var import_schema = require("@dxos/schema");
|
|
62
|
+
var import_effect3 = require("effect");
|
|
63
|
+
var import_echo_db = require("@dxos/echo-db");
|
|
64
|
+
var import_echo_schema2 = require("@dxos/echo-schema");
|
|
59
65
|
var import_log = require("@dxos/log");
|
|
60
|
-
var
|
|
61
|
-
var
|
|
66
|
+
var import_effect4 = require("effect");
|
|
67
|
+
var import_echo_schema3 = require("@dxos/echo-schema");
|
|
68
|
+
var import_keys = require("@dxos/keys");
|
|
69
|
+
var import_effect5 = require("effect");
|
|
70
|
+
var import_effect6 = require("effect");
|
|
71
|
+
var import_effect7 = require("effect");
|
|
72
|
+
var import_effect8 = require("effect");
|
|
73
|
+
var import_effect9 = require("effect");
|
|
74
|
+
var import_effect10 = require("effect");
|
|
62
75
|
var defineFunction = (params) => {
|
|
63
76
|
if (!import_effect.Schema.isSchema(params.inputSchema)) {
|
|
64
77
|
throw new Error("Input schema must be a valid schema");
|
|
@@ -73,72 +86,485 @@ var defineFunction = (params) => {
|
|
|
73
86
|
handler: params.handler
|
|
74
87
|
};
|
|
75
88
|
};
|
|
76
|
-
var
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
89
|
+
var ScriptType = import_effect2.Schema.Struct({
|
|
90
|
+
name: import_effect2.Schema.optional(import_effect2.Schema.String),
|
|
91
|
+
description: import_effect2.Schema.optional(import_effect2.Schema.String),
|
|
92
|
+
// TODO(burdon): Change to hash of deployed content.
|
|
93
|
+
// Whether source has changed since last deploy.
|
|
94
|
+
changed: import_effect2.Schema.optional(import_effect2.Schema.Boolean),
|
|
95
|
+
source: (0, import_echo_schema.Ref)(import_schema.DataType.Text)
|
|
96
|
+
}).pipe((0, import_echo_schema.EchoObject)({
|
|
97
|
+
typename: "dxos.org/type/Script",
|
|
98
|
+
version: "0.1.0"
|
|
99
|
+
}), import_echo_schema.LabelAnnotation.set([
|
|
100
|
+
"name"
|
|
101
|
+
]));
|
|
102
|
+
var FunctionType = class extends (0, import_echo_schema.TypedObject)({
|
|
103
|
+
typename: "dxos.org/type/Function",
|
|
104
|
+
version: "0.1.0"
|
|
105
|
+
})({
|
|
106
|
+
// TODO(burdon): Rename to id/uri?
|
|
107
|
+
name: import_effect2.Schema.NonEmptyString,
|
|
108
|
+
version: import_effect2.Schema.String,
|
|
109
|
+
description: import_effect2.Schema.optional(import_effect2.Schema.String),
|
|
110
|
+
// Reference to a source script if it exists within ECHO.
|
|
111
|
+
// TODO(burdon): Don't ref ScriptType directly (core).
|
|
112
|
+
source: import_effect2.Schema.optional((0, import_echo_schema.Ref)(ScriptType)),
|
|
113
|
+
inputSchema: import_effect2.Schema.optional(import_echo_schema.JsonSchemaType),
|
|
114
|
+
outputSchema: import_effect2.Schema.optional(import_echo_schema.JsonSchemaType),
|
|
115
|
+
// Local binding to a function name.
|
|
116
|
+
binding: import_effect2.Schema.optional(import_effect2.Schema.String)
|
|
117
|
+
}) {
|
|
118
|
+
};
|
|
119
|
+
var TriggerKind = /* @__PURE__ */ function(TriggerKind2) {
|
|
120
|
+
TriggerKind2["Timer"] = "timer";
|
|
121
|
+
TriggerKind2["Webhook"] = "webhook";
|
|
122
|
+
TriggerKind2["Subscription"] = "subscription";
|
|
123
|
+
TriggerKind2["Email"] = "email";
|
|
124
|
+
TriggerKind2["Queue"] = "queue";
|
|
125
|
+
return TriggerKind2;
|
|
126
|
+
}({});
|
|
127
|
+
var kindLiteralAnnotations = {
|
|
128
|
+
title: "Kind"
|
|
129
|
+
};
|
|
130
|
+
var TimerTriggerSchema = import_effect4.Schema.Struct({
|
|
131
|
+
kind: import_effect4.Schema.Literal("timer").annotations(kindLiteralAnnotations),
|
|
132
|
+
cron: import_effect4.Schema.String.annotations({
|
|
133
|
+
title: "Cron",
|
|
134
|
+
[import_effect4.SchemaAST.ExamplesAnnotationId]: [
|
|
135
|
+
"0 0 * * *"
|
|
136
|
+
]
|
|
137
|
+
})
|
|
138
|
+
}).pipe(import_effect4.Schema.mutable);
|
|
139
|
+
var EmailTriggerSchema = import_effect4.Schema.Struct({
|
|
140
|
+
kind: import_effect4.Schema.Literal("email").annotations(kindLiteralAnnotations)
|
|
141
|
+
}).pipe(import_effect4.Schema.mutable);
|
|
142
|
+
var QueueTriggerSchema = import_effect4.Schema.Struct({
|
|
143
|
+
kind: import_effect4.Schema.Literal("queue").annotations(kindLiteralAnnotations),
|
|
144
|
+
queue: import_keys.DXN.Schema
|
|
145
|
+
}).pipe(import_effect4.Schema.mutable);
|
|
146
|
+
var WebhookTriggerSchema = import_effect4.Schema.Struct({
|
|
147
|
+
kind: import_effect4.Schema.Literal("webhook").annotations(kindLiteralAnnotations),
|
|
148
|
+
method: import_effect4.Schema.optional(import_effect4.Schema.String.annotations({
|
|
149
|
+
title: "Method",
|
|
150
|
+
[import_echo_schema3.OptionsAnnotationId]: [
|
|
151
|
+
"GET",
|
|
152
|
+
"POST"
|
|
153
|
+
]
|
|
154
|
+
})),
|
|
155
|
+
port: import_effect4.Schema.optional(import_effect4.Schema.Number.annotations({
|
|
156
|
+
title: "Port"
|
|
157
|
+
}))
|
|
158
|
+
}).pipe(import_effect4.Schema.mutable);
|
|
159
|
+
var QuerySchema = import_effect4.Schema.Struct({
|
|
160
|
+
type: import_effect4.Schema.optional(import_effect4.Schema.String.annotations({
|
|
161
|
+
title: "Type"
|
|
162
|
+
})),
|
|
163
|
+
props: import_effect4.Schema.optional(import_effect4.Schema.Record({
|
|
164
|
+
key: import_effect4.Schema.String,
|
|
165
|
+
value: import_effect4.Schema.Any
|
|
166
|
+
}))
|
|
167
|
+
}).annotations({
|
|
168
|
+
title: "Query"
|
|
169
|
+
});
|
|
170
|
+
var SubscriptionTriggerSchema = import_effect4.Schema.Struct({
|
|
171
|
+
kind: import_effect4.Schema.Literal("subscription").annotations(kindLiteralAnnotations),
|
|
172
|
+
// TODO(burdon): Define query DSL (from ECHO). Reconcile with Table.Query.
|
|
173
|
+
filter: QuerySchema,
|
|
174
|
+
options: import_effect4.Schema.optional(import_effect4.Schema.Struct({
|
|
175
|
+
// Watch changes to object (not just creation).
|
|
176
|
+
deep: import_effect4.Schema.optional(import_effect4.Schema.Boolean.annotations({
|
|
177
|
+
title: "Nested"
|
|
178
|
+
})),
|
|
179
|
+
// Debounce changes (delay in ms).
|
|
180
|
+
delay: import_effect4.Schema.optional(import_effect4.Schema.Number.annotations({
|
|
181
|
+
title: "Delay"
|
|
182
|
+
}))
|
|
183
|
+
}).annotations({
|
|
184
|
+
title: "Options"
|
|
185
|
+
}))
|
|
186
|
+
}).pipe(import_effect4.Schema.mutable);
|
|
187
|
+
var TriggerSchema = import_effect4.Schema.Union(TimerTriggerSchema, WebhookTriggerSchema, SubscriptionTriggerSchema, EmailTriggerSchema, QueueTriggerSchema).annotations({
|
|
188
|
+
title: "Trigger"
|
|
189
|
+
});
|
|
190
|
+
var EmailTriggerOutput = import_effect4.Schema.mutable(import_effect4.Schema.Struct({
|
|
191
|
+
from: import_effect4.Schema.String,
|
|
192
|
+
to: import_effect4.Schema.String,
|
|
193
|
+
subject: import_effect4.Schema.String,
|
|
194
|
+
created: import_effect4.Schema.String,
|
|
195
|
+
body: import_effect4.Schema.String
|
|
196
|
+
}));
|
|
197
|
+
var WebhookTriggerOutput = import_effect4.Schema.mutable(import_effect4.Schema.Struct({
|
|
198
|
+
url: import_effect4.Schema.String,
|
|
199
|
+
method: import_effect4.Schema.Literal("GET", "POST"),
|
|
200
|
+
headers: import_effect4.Schema.Record({
|
|
201
|
+
key: import_effect4.Schema.String,
|
|
202
|
+
value: import_effect4.Schema.String
|
|
203
|
+
}),
|
|
204
|
+
bodyText: import_effect4.Schema.String
|
|
205
|
+
}));
|
|
206
|
+
var QueueTriggerOutput = import_effect4.Schema.mutable(import_effect4.Schema.Struct({
|
|
207
|
+
queue: import_keys.DXN.Schema,
|
|
208
|
+
item: import_effect4.Schema.Any,
|
|
209
|
+
cursor: import_effect4.Schema.String
|
|
210
|
+
}));
|
|
211
|
+
var SubscriptionTriggerOutput = import_effect4.Schema.mutable(import_effect4.Schema.Struct({
|
|
212
|
+
type: import_effect4.Schema.String,
|
|
213
|
+
changedObjectId: import_effect4.Schema.String
|
|
214
|
+
}));
|
|
215
|
+
var TimerTriggerOutput = import_effect4.Schema.mutable(import_effect4.Schema.Struct({
|
|
216
|
+
tick: import_effect4.Schema.Number
|
|
217
|
+
}));
|
|
218
|
+
var FunctionTriggerSchema = import_effect4.Schema.Struct({
|
|
219
|
+
/**
|
|
220
|
+
* Function or workflow to invoke.
|
|
221
|
+
*/
|
|
222
|
+
// TODO(dmaretskyi): Can be a Ref(FunctionType) or Ref(ComputeGraphType).
|
|
223
|
+
function: import_effect4.Schema.optional((0, import_echo_schema3.Ref)(import_echo_schema3.Expando).annotations({
|
|
224
|
+
title: "Function"
|
|
225
|
+
})),
|
|
226
|
+
/**
|
|
227
|
+
* Only used for workflowSchema.
|
|
228
|
+
* Specifies the input node in the circuit.
|
|
229
|
+
* @deprecated Remove and enforce a single input node in all compute graphSchema.
|
|
230
|
+
*/
|
|
231
|
+
inputNodeId: import_effect4.Schema.optional(import_effect4.Schema.String.annotations({
|
|
232
|
+
title: "Input Node ID"
|
|
233
|
+
})),
|
|
234
|
+
enabled: import_effect4.Schema.optional(import_effect4.Schema.Boolean.annotations({
|
|
235
|
+
title: "Enabled"
|
|
236
|
+
})),
|
|
237
|
+
spec: import_effect4.Schema.optional(TriggerSchema),
|
|
238
|
+
/**
|
|
239
|
+
* Passed as the input data to the function.
|
|
240
|
+
* Must match the function's input schema.
|
|
241
|
+
*
|
|
242
|
+
* @example
|
|
243
|
+
* {
|
|
244
|
+
* item: '{{$.trigger.event}}',
|
|
245
|
+
* instructions: 'Summarize and perform entity-extraction'
|
|
246
|
+
* mailbox: { '/': 'dxn:echo:AAA:ZZZ' }
|
|
247
|
+
* }
|
|
248
|
+
*/
|
|
249
|
+
input: import_effect4.Schema.optional(import_effect4.Schema.mutable(import_effect4.Schema.Record({
|
|
250
|
+
key: import_effect4.Schema.String,
|
|
251
|
+
value: import_effect4.Schema.Any
|
|
252
|
+
})))
|
|
253
|
+
});
|
|
254
|
+
var FunctionTrigger = class extends (0, import_echo_schema3.TypedObject)({
|
|
255
|
+
typename: "dxos.org/type/FunctionTrigger",
|
|
256
|
+
version: "0.2.0"
|
|
257
|
+
})(FunctionTriggerSchema.fields) {
|
|
258
|
+
};
|
|
259
|
+
var FunctionManifestSchema = import_effect4.Schema.Struct({
|
|
260
|
+
functions: import_effect4.Schema.optional(import_effect4.Schema.mutable(import_effect4.Schema.Array((0, import_echo_schema3.RawObject)(FunctionType)))),
|
|
261
|
+
triggers: import_effect4.Schema.optional(import_effect4.Schema.mutable(import_effect4.Schema.Array((0, import_echo_schema3.RawObject)(FunctionTrigger))))
|
|
262
|
+
});
|
|
263
|
+
var FUNCTION_TYPES = [
|
|
264
|
+
FunctionType,
|
|
265
|
+
FunctionTrigger
|
|
266
|
+
];
|
|
267
|
+
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/core/functions/src/trace.ts";
|
|
268
|
+
var InvocationOutcome = /* @__PURE__ */ function(InvocationOutcome2) {
|
|
269
|
+
InvocationOutcome2["SUCCESS"] = "success";
|
|
270
|
+
InvocationOutcome2["FAILURE"] = "failure";
|
|
271
|
+
InvocationOutcome2["PENDING"] = "pending";
|
|
272
|
+
return InvocationOutcome2;
|
|
273
|
+
}({});
|
|
274
|
+
var InvocationTraceEventType = /* @__PURE__ */ function(InvocationTraceEventType2) {
|
|
275
|
+
InvocationTraceEventType2["START"] = "start";
|
|
276
|
+
InvocationTraceEventType2["END"] = "end";
|
|
277
|
+
return InvocationTraceEventType2;
|
|
278
|
+
}({});
|
|
279
|
+
var TraceEventException = import_effect3.Schema.Struct({
|
|
280
|
+
timestampMs: import_effect3.Schema.Number,
|
|
281
|
+
message: import_effect3.Schema.String,
|
|
282
|
+
name: import_effect3.Schema.String,
|
|
283
|
+
stack: import_effect3.Schema.optional(import_effect3.Schema.String)
|
|
284
|
+
});
|
|
285
|
+
var InvocationTraceStartEvent = import_effect3.Schema.Struct({
|
|
286
|
+
/**
|
|
287
|
+
* Queue message id.
|
|
288
|
+
*/
|
|
289
|
+
id: import_echo_schema2.ObjectId,
|
|
290
|
+
type: import_effect3.Schema.Literal("start"),
|
|
291
|
+
/**
|
|
292
|
+
* Invocation id, the same for invocation start and end events.
|
|
293
|
+
*/
|
|
294
|
+
invocationId: import_echo_schema2.ObjectId,
|
|
295
|
+
/**
|
|
296
|
+
* Event generation time.
|
|
297
|
+
*/
|
|
298
|
+
timestampMs: import_effect3.Schema.Number,
|
|
299
|
+
/**
|
|
300
|
+
* Data passed to function / workflow as an argument.
|
|
301
|
+
*/
|
|
302
|
+
// TODO(burdon): Input schema?
|
|
303
|
+
input: import_effect3.Schema.Object,
|
|
304
|
+
/**
|
|
305
|
+
* Queue for function/workflow invocation events.
|
|
306
|
+
*/
|
|
307
|
+
invocationTraceQueue: (0, import_echo_schema2.Ref)(import_echo_db.Queue),
|
|
308
|
+
/**
|
|
309
|
+
* DXN of the invoked function/workflow.
|
|
310
|
+
*/
|
|
311
|
+
invocationTarget: (0, import_echo_schema2.Ref)(import_echo_schema2.Expando),
|
|
312
|
+
/**
|
|
313
|
+
* Present for automatic invocations.
|
|
314
|
+
*/
|
|
315
|
+
trigger: import_effect3.Schema.optional((0, import_echo_schema2.Ref)(FunctionTrigger))
|
|
316
|
+
}).pipe((0, import_echo_schema2.EchoObject)({
|
|
317
|
+
typename: "dxos.org/type/InvocationTraceStart",
|
|
318
|
+
version: "0.1.0"
|
|
319
|
+
}));
|
|
320
|
+
var InvocationTraceEndEvent = import_effect3.Schema.Struct({
|
|
321
|
+
/**
|
|
322
|
+
* Trace event id.
|
|
323
|
+
*/
|
|
324
|
+
id: import_echo_schema2.ObjectId,
|
|
325
|
+
type: import_effect3.Schema.Literal("end"),
|
|
326
|
+
/**
|
|
327
|
+
* Invocation id, will be the same for invocation start and end.
|
|
328
|
+
*/
|
|
329
|
+
invocationId: import_echo_schema2.ObjectId,
|
|
330
|
+
/**
|
|
331
|
+
* Event generation time.
|
|
332
|
+
*/
|
|
333
|
+
// TODO(burdon): Remove ms suffix.
|
|
334
|
+
timestampMs: import_effect3.Schema.Number,
|
|
335
|
+
outcome: import_effect3.Schema.Enums(InvocationOutcome),
|
|
336
|
+
exception: import_effect3.Schema.optional(TraceEventException)
|
|
337
|
+
}).pipe((0, import_echo_schema2.EchoObject)({
|
|
338
|
+
typename: "dxos.org/type/InvocationTraceEnd",
|
|
339
|
+
version: "0.1.0"
|
|
340
|
+
}));
|
|
341
|
+
var TraceEventLog = import_effect3.Schema.Struct({
|
|
342
|
+
timestampMs: import_effect3.Schema.Number,
|
|
343
|
+
level: import_effect3.Schema.String,
|
|
344
|
+
message: import_effect3.Schema.String,
|
|
345
|
+
context: import_effect3.Schema.optional(import_effect3.Schema.Object)
|
|
346
|
+
});
|
|
347
|
+
var TraceEvent = import_effect3.Schema.Struct({
|
|
348
|
+
id: import_echo_schema2.ObjectId,
|
|
349
|
+
// TODO(burdon): Need enum/numeric result (not string).
|
|
350
|
+
outcome: import_effect3.Schema.String,
|
|
351
|
+
truncated: import_effect3.Schema.Boolean,
|
|
352
|
+
/**
|
|
353
|
+
* Time when the event was persisted.
|
|
354
|
+
*/
|
|
355
|
+
ingestionTimestampMs: import_effect3.Schema.Number,
|
|
356
|
+
logs: import_effect3.Schema.Array(TraceEventLog),
|
|
357
|
+
exceptions: import_effect3.Schema.Array(TraceEventException)
|
|
358
|
+
}).pipe((0, import_echo_schema2.EchoObject)({
|
|
359
|
+
typename: "dxos.org/type/TraceEvent",
|
|
360
|
+
version: "0.1.0"
|
|
361
|
+
}));
|
|
362
|
+
var createInvocationSpans = (items) => {
|
|
363
|
+
if (!items) {
|
|
364
|
+
return [];
|
|
365
|
+
}
|
|
366
|
+
const eventsByInvocationId = /* @__PURE__ */ new Map();
|
|
367
|
+
for (const event of items) {
|
|
368
|
+
if (!("invocationId" in event)) {
|
|
369
|
+
continue;
|
|
88
370
|
}
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
371
|
+
const invocationId = event.invocationId;
|
|
372
|
+
const entry = eventsByInvocationId.get(invocationId) || {
|
|
373
|
+
start: void 0,
|
|
374
|
+
end: void 0
|
|
375
|
+
};
|
|
376
|
+
if (event.type === "start") {
|
|
377
|
+
entry.start = event;
|
|
378
|
+
} else if (event.type === "end") {
|
|
379
|
+
entry.end = event;
|
|
380
|
+
}
|
|
381
|
+
eventsByInvocationId.set(invocationId, entry);
|
|
382
|
+
}
|
|
383
|
+
const now = Date.now();
|
|
384
|
+
const result = [];
|
|
385
|
+
for (const [invocationId, { start, end }] of eventsByInvocationId.entries()) {
|
|
386
|
+
if (!start) {
|
|
387
|
+
import_log.log.warn("found end event without matching start", {
|
|
388
|
+
invocationId
|
|
104
389
|
}, {
|
|
105
390
|
F: __dxlog_file,
|
|
106
|
-
L:
|
|
391
|
+
L: 160,
|
|
107
392
|
S: void 0,
|
|
108
393
|
C: (f, a) => f(...a)
|
|
109
394
|
});
|
|
395
|
+
continue;
|
|
110
396
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
397
|
+
const isInProgress = end === void 0;
|
|
398
|
+
result.push({
|
|
399
|
+
id: invocationId,
|
|
400
|
+
timestampMs: start.timestampMs,
|
|
401
|
+
durationMs: isInProgress ? now - start.timestampMs : end.timestampMs - start.timestampMs,
|
|
402
|
+
outcome: end?.outcome ?? "pending",
|
|
403
|
+
exception: end?.exception,
|
|
404
|
+
input: start.input,
|
|
405
|
+
invocationTraceQueue: start.invocationTraceQueue,
|
|
406
|
+
invocationTarget: start.invocationTarget,
|
|
407
|
+
trigger: start.trigger
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
return result;
|
|
411
|
+
};
|
|
412
|
+
var FUNCTIONS_META_KEY = "dxos.org/service/function";
|
|
413
|
+
var FUNCTIONS_PRESET_META_KEY = "dxos.org/service/function-preset";
|
|
414
|
+
var isSecure = (protocol) => {
|
|
415
|
+
return protocol === "https:" || protocol === "wss:";
|
|
416
|
+
};
|
|
417
|
+
var getUserFunctionUrlInMetadata = (meta) => {
|
|
418
|
+
return meta.keys.find((key) => key.source === FUNCTIONS_META_KEY)?.id;
|
|
419
|
+
};
|
|
420
|
+
var setUserFunctionUrlInMetadata = (meta, functionUrl) => {
|
|
421
|
+
const key = meta.keys.find((key2) => key2.source === FUNCTIONS_META_KEY);
|
|
422
|
+
if (key) {
|
|
423
|
+
if (key.id !== functionUrl) {
|
|
424
|
+
throw new Error("Metadata mismatch");
|
|
425
|
+
}
|
|
426
|
+
} else {
|
|
427
|
+
meta.keys.push({
|
|
428
|
+
source: FUNCTIONS_META_KEY,
|
|
429
|
+
id: functionUrl
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
var makeFunctionUrl = (fn) => `/${fn.functionId}`;
|
|
434
|
+
var getInvocationUrl = (functionUrl, edgeUrl, options = {}) => {
|
|
435
|
+
const baseUrl = new URL("functions/", edgeUrl);
|
|
436
|
+
const relativeUrl = functionUrl.replace(/^\//, "");
|
|
437
|
+
const url = new URL(`./${relativeUrl}`, baseUrl.toString());
|
|
438
|
+
options.spaceId && url.searchParams.set("spaceId", options.spaceId);
|
|
439
|
+
options.subjectId && url.searchParams.set("subjectId", options.subjectId);
|
|
440
|
+
url.protocol = isSecure(url.protocol) ? "https" : "http";
|
|
441
|
+
return url.toString();
|
|
442
|
+
};
|
|
443
|
+
var AiService = class extends import_effect5.Context.Tag("AiService")() {
|
|
444
|
+
};
|
|
445
|
+
var DatabaseService = class extends import_effect6.Context.Tag("DatabaseService")() {
|
|
446
|
+
};
|
|
447
|
+
var QueuesService = class extends import_effect7.Context.Tag("QueuesService")() {
|
|
448
|
+
};
|
|
449
|
+
var CredentialsService = class extends import_effect8.Context.Tag("CredentialsService")() {
|
|
450
|
+
};
|
|
451
|
+
var ConfiguredCredentialsService = class {
|
|
452
|
+
constructor(credentials = []) {
|
|
453
|
+
this.credentials = credentials;
|
|
454
|
+
}
|
|
455
|
+
addCredentials(credentials) {
|
|
456
|
+
this.credentials.push(...credentials);
|
|
457
|
+
return this;
|
|
458
|
+
}
|
|
459
|
+
async queryCredentials(query) {
|
|
460
|
+
return this.credentials.filter((credential) => credential.service === query.service);
|
|
461
|
+
}
|
|
462
|
+
async getCredential(query) {
|
|
463
|
+
const credential = this.credentials.find((credential2) => credential2.service === query.service);
|
|
464
|
+
if (!credential) {
|
|
465
|
+
throw new Error(`Credential not found for service: ${query.service}`);
|
|
466
|
+
}
|
|
467
|
+
return credential;
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
var TracingService = class extends import_effect9.Context.Tag("TracingService")() {
|
|
471
|
+
static {
|
|
472
|
+
this.noop = {
|
|
473
|
+
write: () => {
|
|
474
|
+
}
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
static {
|
|
478
|
+
this.console = {
|
|
479
|
+
write: (event) => {
|
|
480
|
+
console.log(event);
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
};
|
|
485
|
+
var SERVICE_MAPPING = {
|
|
486
|
+
[DatabaseService.key]: "database",
|
|
487
|
+
[AiService.key]: "ai",
|
|
488
|
+
[QueuesService.key]: "queues",
|
|
489
|
+
[CredentialsService.key]: "credentials",
|
|
490
|
+
[TracingService.key]: "tracing"
|
|
491
|
+
};
|
|
492
|
+
var DEFAULT_SERVICES = {
|
|
493
|
+
tracing: TracingService.noop
|
|
494
|
+
};
|
|
495
|
+
var ServiceContainer = class _ServiceContainer {
|
|
496
|
+
constructor() {
|
|
497
|
+
this._services = {
|
|
498
|
+
...DEFAULT_SERVICES
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Set services.
|
|
503
|
+
* @param services - Services to set.
|
|
504
|
+
* @returns The container instance.
|
|
505
|
+
*/
|
|
506
|
+
setServices(services) {
|
|
507
|
+
this._services = {
|
|
508
|
+
...this._services,
|
|
509
|
+
...services
|
|
510
|
+
};
|
|
511
|
+
return this;
|
|
512
|
+
}
|
|
513
|
+
getService(tag) {
|
|
514
|
+
const serviceKey = SERVICE_MAPPING[tag.key];
|
|
515
|
+
const service = serviceKey != null ? this._services[serviceKey] : void 0;
|
|
516
|
+
if (!service) {
|
|
517
|
+
throw new Error(`Service not available: ${tag.key}`);
|
|
518
|
+
}
|
|
519
|
+
return service;
|
|
520
|
+
}
|
|
521
|
+
clone() {
|
|
522
|
+
return new _ServiceContainer().setServices({
|
|
523
|
+
...this._services
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
var FunctionExecutor = class {
|
|
528
|
+
constructor(_services) {
|
|
529
|
+
this._services = _services;
|
|
530
|
+
}
|
|
531
|
+
// TODO(dmaretskyi): Invocation context: queue, space, etc...
|
|
532
|
+
async invoke(fnDef, input) {
|
|
533
|
+
const assertInput = fnDef.inputSchema.pipe(import_effect10.Schema.asserts);
|
|
534
|
+
assertInput(input);
|
|
535
|
+
const context = {
|
|
536
|
+
getService: this._services.getService.bind(this._services),
|
|
537
|
+
getSpace: async (_spaceId) => {
|
|
538
|
+
throw new Error("Not available. Use the database service instead.");
|
|
118
539
|
},
|
|
540
|
+
space: void 0,
|
|
541
|
+
get ai() {
|
|
542
|
+
throw new Error("Not available. Use the ai service instead.");
|
|
543
|
+
}
|
|
544
|
+
};
|
|
545
|
+
const result = await fnDef.handler({
|
|
119
546
|
context,
|
|
120
|
-
|
|
121
|
-
...rest
|
|
547
|
+
data: input
|
|
122
548
|
});
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
for (const type of types) {
|
|
128
|
-
if (!registry.hasSchema(type)) {
|
|
129
|
-
registry.addSchema([
|
|
130
|
-
type
|
|
131
|
-
]);
|
|
549
|
+
const assertOutput = fnDef.outputSchema?.pipe(import_effect10.Schema.asserts);
|
|
550
|
+
assertOutput(result);
|
|
551
|
+
if (import_effect10.Effect.isEffect(result)) {
|
|
552
|
+
return import_effect10.Effect.runPromise(result);
|
|
132
553
|
}
|
|
554
|
+
return result;
|
|
133
555
|
}
|
|
134
556
|
};
|
|
135
557
|
// Annotate the CommonJS export names for ESM import in node:
|
|
136
558
|
0 && (module.exports = {
|
|
559
|
+
AiService,
|
|
560
|
+
ConfiguredCredentialsService,
|
|
561
|
+
CredentialsService,
|
|
562
|
+
DatabaseService,
|
|
563
|
+
EmailTriggerOutput,
|
|
137
564
|
FUNCTIONS_PRESET_META_KEY,
|
|
138
565
|
FUNCTION_TYPES,
|
|
139
|
-
|
|
566
|
+
FunctionExecutor,
|
|
140
567
|
FunctionManifestSchema,
|
|
141
|
-
FunctionRegistry,
|
|
142
568
|
FunctionTrigger,
|
|
143
569
|
FunctionTriggerSchema,
|
|
144
570
|
FunctionType,
|
|
@@ -146,23 +572,24 @@ var registerTypes = (space, types = []) => {
|
|
|
146
572
|
InvocationTraceEndEvent,
|
|
147
573
|
InvocationTraceEventType,
|
|
148
574
|
InvocationTraceStartEvent,
|
|
575
|
+
QueueTriggerOutput,
|
|
576
|
+
QueuesService,
|
|
149
577
|
ScriptType,
|
|
578
|
+
ServiceContainer,
|
|
579
|
+
SubscriptionTriggerOutput,
|
|
580
|
+
TimerTriggerOutput,
|
|
150
581
|
TraceEvent,
|
|
151
582
|
TraceEventException,
|
|
152
583
|
TraceEventLog,
|
|
584
|
+
TracingService,
|
|
153
585
|
TriggerKind,
|
|
154
|
-
TriggerRegistry,
|
|
155
586
|
TriggerSchema,
|
|
587
|
+
WebhookTriggerOutput,
|
|
156
588
|
createInvocationSpans,
|
|
157
|
-
createSubscriptionTrigger,
|
|
158
|
-
createTimerTrigger,
|
|
159
589
|
defineFunction,
|
|
160
590
|
getInvocationUrl,
|
|
161
591
|
getUserFunctionUrlInMetadata,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
setUserFunctionUrlInMetadata,
|
|
165
|
-
subscriptionHandler,
|
|
166
|
-
uploadWorkerFunction
|
|
592
|
+
makeFunctionUrl,
|
|
593
|
+
setUserFunctionUrlInMetadata
|
|
167
594
|
});
|
|
168
595
|
//# sourceMappingURL=index.cjs.map
|