@oomol-lab/open-flow 0.1.0-beta.75 → 0.1.0-beta.76
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/README.md +2 -1
- package/dist/browser/{ContentIcon-FCpKiwjp.js → ContentIcon-Cm1hbVzW.js} +2 -2
- package/dist/browser/{FlowCanvas-dzRBnlUT.js → FlowCanvas-NzKtla_c.js} +62 -62
- package/dist/browser/{createResourceDialog-BeYDdUl-.js → createResourceDialog-BgdedQqu.js} +3 -3
- package/dist/browser/{dialog-ZtpsFbl4.js → dialog-aSElFFw2.js} +49 -24
- package/dist/browser/{exportSvg-DqXw1yf-.js → exportSvg-Dcz4HTo_.js} +2 -2
- package/dist/browser/{flowChanges-b_5UobFj.js → flowChanges-NZyS7HSp.js} +207 -396
- package/dist/browser/{flowWorkspace-ItojZbO4.js → flowWorkspace-Bl0SDehy.js} +90 -13
- package/dist/browser/preview.css +515 -649
- package/dist/browser/preview.js +454 -545
- package/dist/browser/theme.css +114 -262
- package/dist/browser/{tooltip-wZJRB9oP.js → tooltip-3XMK9jkr.js} +1 -1
- package/dist/browser/{typeScriptSession-CSRwWmZm.js → typeScriptSession-C9sBGOKZ.js} +1 -1
- package/dist/browser/ui.css +354 -460
- package/dist/browser/ui.js +1 -1
- package/dist/browser/workbench.css +515 -649
- package/dist/browser/workbench.js +7 -7
- package/dist/browser/{workbenchSelect-M441Lz0d.js → workbenchSelect-DBGP7Y4Z.js} +2 -2
- package/dist/command/index.js +33 -35
- package/dist/common/authoring.d.ts +3 -3
- package/dist/common/authoringSchema.d.ts +3 -0
- package/dist/common/connector-proxy.d.ts +1 -1
- package/dist/common/control-api-conformance.js +197 -136
- package/dist/common/control-api.d.ts +3 -2
- package/dist/common/control-api.js +192 -131
- package/dist/common/control-requests.js +126 -24
- package/dist/common/cron-trigger.d.ts +2 -1
- package/dist/common/decision.d.ts +4 -4
- package/dist/common/decision.js +5 -2
- package/dist/common/engine-contract.d.ts +5 -1
- package/dist/common/event-source-definition.d.ts +1 -1
- package/dist/common/event-source-view.d.ts +22 -0
- package/dist/common/event-source.d.ts +1 -1
- package/dist/common/event-source.js +24 -65
- package/dist/common/event-sources.d.ts +0 -21
- package/dist/common/flow-authoring.js +40 -18
- package/dist/common/flow-change-schema.d.ts +9 -1
- package/dist/common/flow-change.d.ts +7 -201
- package/dist/common/flow-change.js +46 -22
- package/dist/common/flow-encoding.js +40 -20
- package/dist/common/flow-input-value.d.ts +1 -1
- package/dist/common/flow-model.d.ts +121 -0
- package/dist/common/flow-notifications.d.ts +1 -1
- package/dist/common/flow-retry.d.ts +2 -4
- package/dist/common/flow-semantics.js +83 -86
- package/dist/common/flow-workflowReferences.d.ts +8 -0
- package/dist/common/flowInspection.d.ts +1 -1
- package/dist/common/http-hosts.d.ts +6 -0
- package/dist/common/http-request.d.ts +13 -5
- package/dist/common/http-request.js +23 -5
- package/dist/common/integration-trigger.d.ts +2 -1
- package/dist/common/mcp.js +195 -134
- package/dist/common/openapi.d.ts +4 -4
- package/dist/common/openapi.js +4 -1
- package/dist/common/poll-trigger.d.ts +2 -1
- package/dist/common/runtime-contract.d.ts +23 -1
- package/dist/common/runtime-contract.js +604 -72
- package/dist/common/runtime-nodejs-compat.d.ts +44 -0
- package/dist/common/runtime-nodejs-compat.js +5870 -0
- package/dist/common/scheduler-checkpoint.d.ts +1 -1
- package/dist/common/scheduler-node-execution.d.ts +1 -1
- package/dist/common/scheduler.d.ts +1 -1
- package/dist/common/scheduler.js +25 -4
- package/dist/common/trigger-catalog.d.ts +1 -7
- package/dist/common/trigger-config-options.d.ts +1 -1
- package/dist/common/trigger-config.d.ts +1 -1
- package/dist/common/trigger-contract.d.ts +2 -1
- package/dist/common/trigger-localization.d.ts +8 -2
- package/dist/common/trigger-model.d.ts +101 -0
- package/dist/common/webhook-response.d.ts +1 -1
- package/dist/common/webhook-trigger.d.ts +3 -1
- package/dist/common/workflow.d.ts +3 -12
- package/dist/common/workflow.js +25 -23
- package/dist/index.d.ts +41 -14
- package/package.json +5 -1
- package/src/base/common/json.ts +1 -1
- package/src/connector/common/proxy.ts +1 -1
- package/src/control/common/api.ts +6 -5
- package/src/control/common/authoringSchema.ts +9 -2
- package/src/control/common/authoringTools.ts +1 -1
- package/src/control/common/conformance.ts +1 -1
- package/src/control/common/connectorDecoders.ts +1 -1
- package/src/control/common/eventSources.ts +2 -29
- package/src/control/common/triggerCatalog.ts +1 -8
- package/src/decision/common/decision.ts +15 -7
- package/src/event-source/common/definition.ts +1 -1
- package/src/event-source/common/index.ts +1 -1
- package/src/event-source/common/view.ts +20 -0
- package/src/execution/common/checkpoint.ts +1 -1
- package/src/execution/common/node-execution.ts +1 -1
- package/src/execution/common/scheduler.ts +1 -1
- package/src/flow/common/change.ts +58 -192
- package/src/flow/common/changeSchema.ts +29 -4
- package/src/flow/common/connectionUsage.ts +1 -1
- package/src/flow/common/inputValue.ts +1 -1
- package/src/flow/common/model.ts +130 -0
- package/src/flow/common/modules.ts +1 -1
- package/src/flow/common/portChanges.ts +1 -1
- package/src/flow/common/retry.ts +2 -4
- package/src/flow/common/semantics.ts +11 -4
- package/src/flow/common/webhookResponse.ts +1 -1
- package/src/flow/common/workflowReferences.ts +31 -0
- package/src/http/common/authBindings.ts +6 -9
- package/src/http/common/hosts.ts +13 -0
- package/src/http/common/httpRequest.ts +30 -15
- package/src/openapi/common/openapi.ts +9 -5
- package/src/{execution → runtime}/common/engineContract.ts +20 -15
- package/src/runtime/common/nodejsCompat.ts +275 -0
- package/src/runtime/common/nodejsGuest.generated.json +47 -0
- package/src/runtime/common/runtime.ts +1138 -0
- package/src/trigger/common/config.ts +1 -1
- package/src/trigger/common/configOptions.ts +1 -1
- package/src/trigger/common/contract.ts +2 -1
- package/src/trigger/common/cron.ts +2 -1
- package/src/trigger/common/integration.ts +2 -1
- package/src/trigger/common/model.ts +87 -0
- package/src/trigger/common/poll.ts +2 -1
- package/src/trigger/common/webhook.ts +3 -1
- package/src/trigger/providers/fieldDescriptions.ts +1 -1
- package/src/trigger/providers/localization.ts +9 -2
- package/src/trigger/providers/remote.ts +1 -1
- package/src/types/index.ts +44 -15
- package/src/workflow/common/workflow.ts +3 -44
- package/src/execution/common/runtime.ts +0 -563
- /package/src/{control → connector}/common/providerIconSprite.ts +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { InputMapping, JsonValue,
|
|
1
|
+
import type { InputMapping, JsonValue, ManagedTaskDefinitionOf, TaskDefinitionBase, TaskExecutor } from './flow-model.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
+
export { httpHostAllowed, isHttpHost, maxHttpHosts } from './http-hosts.js';
|
|
3
4
|
export declare const httpRequestConfigSchema: z.ZodObject<{
|
|
4
5
|
method: z.ZodDefault<z.ZodEnum<{
|
|
5
6
|
DELETE: "DELETE";
|
|
@@ -135,7 +136,7 @@ export declare const httpQuerySchema: {
|
|
|
135
136
|
};
|
|
136
137
|
};
|
|
137
138
|
export declare function httpAuthHandles(config: HttpRequestConfig): string[];
|
|
138
|
-
export declare function httpRequestTask(config?: HttpRequestConfig, name?: string, previous?:
|
|
139
|
+
export declare function httpRequestTask(config?: HttpRequestConfig, name?: string, previous?: TaskDefinitionBase): ManagedTaskDefinitionOf<HttpRequestExecutor>;
|
|
139
140
|
export interface HttpRequestIssue {
|
|
140
141
|
field: string;
|
|
141
142
|
index?: number;
|
|
@@ -150,7 +151,14 @@ export declare function buildHttpRequest(config: HttpRequestConfig, input: Reado
|
|
|
150
151
|
};
|
|
151
152
|
export declare function parseHttpResponse(config: HttpRequestConfig, status: number, headers: Headers, text: string): Record<string, JsonValue>;
|
|
152
153
|
/** Only a named parameter rename carries a value; changing source modes is not a rename. */
|
|
153
|
-
export declare function httpRequestInputs(mappings: Readonly<Record<string, InputMapping>>, previous:
|
|
154
|
+
export declare function httpRequestInputs(mappings: Readonly<Record<string, InputMapping>>, previous: TaskDefinitionBase, next: TaskDefinitionBase): Record<string, InputMapping>;
|
|
155
|
+
/** A Task node as HTTP helpers read it; inline Tasks have no executor. */
|
|
156
|
+
interface HttpTaskNode {
|
|
157
|
+
readonly inputs: Readonly<Record<string, InputMapping>>;
|
|
158
|
+
readonly task: TaskDefinitionBase & {
|
|
159
|
+
readonly executor?: TaskExecutor;
|
|
160
|
+
};
|
|
161
|
+
}
|
|
154
162
|
/** The object editor assembles named inputs without changing unrelated request settings. */
|
|
155
|
-
export declare function withHttpParameterFields(node:
|
|
156
|
-
export declare function withHttpParameterSource(node:
|
|
163
|
+
export declare function withHttpParameterFields<Node extends HttpTaskNode>(node: Node, group: 'query' | 'headers', values: Record<string, JsonValue>): Node;
|
|
164
|
+
export declare function withHttpParameterSource<Node extends HttpTaskNode>(node: Node, group: 'query' | 'headers', mapping?: InputMapping): Node;
|
|
@@ -4916,6 +4916,19 @@ function httpHeaderNameIssue(name, names) {
|
|
|
4916
4916
|
if (names.some((candidate) => candidate.toLowerCase() === name.toLowerCase())) return "duplicate";
|
|
4917
4917
|
}
|
|
4918
4918
|
//#endregion
|
|
4919
|
+
//#region src/http/common/hosts.ts
|
|
4920
|
+
/** Hosts of a Code `http` Capability: lowercase DNS names or IPv4 addresses; `*.example.com` matches subdomains only. */
|
|
4921
|
+
var httpHostPattern = /^(?:\*\.)?(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;
|
|
4922
|
+
var maxHttpHosts = 20;
|
|
4923
|
+
/** Wildcards must name a registrable suffix, so `*.com` is rejected. */
|
|
4924
|
+
function isHttpHost(value) {
|
|
4925
|
+
return httpHostPattern.test(value) && (!value.startsWith("*.") || value.slice(2).includes("."));
|
|
4926
|
+
}
|
|
4927
|
+
function httpHostAllowed(hosts, hostname) {
|
|
4928
|
+
const host = hostname.toLowerCase();
|
|
4929
|
+
return hosts.some((pattern) => pattern.startsWith("*.") ? host.endsWith(pattern.slice(1)) : host == pattern);
|
|
4930
|
+
}
|
|
4931
|
+
//#endregion
|
|
4919
4932
|
//#region src/http/common/httpRequest.ts
|
|
4920
4933
|
var parameterSchema = strictObject({
|
|
4921
4934
|
mode: _enum(["fields", "object"]).default("fields"),
|
|
@@ -5205,10 +5218,14 @@ function httpRequestInputs(mappings, previous, next) {
|
|
|
5205
5218
|
const rename = candidate != null && ["query.", "header."].some((prefix) => candidate.every((name) => name.startsWith(prefix))) ? candidate : void 0;
|
|
5206
5219
|
return remapInputMappings(mappings, next.inputs, rename);
|
|
5207
5220
|
}
|
|
5221
|
+
function httpRequestExecutor(node) {
|
|
5222
|
+
const executor = node.task.executor;
|
|
5223
|
+
return executor?.kind === "http-request" ? executor : void 0;
|
|
5224
|
+
}
|
|
5208
5225
|
/** The object editor assembles named inputs without changing unrelated request settings. */
|
|
5209
5226
|
function withHttpParameterFields(node, group, values) {
|
|
5210
|
-
|
|
5211
|
-
|
|
5227
|
+
const config = httpRequestExecutor(node);
|
|
5228
|
+
if (config == null) return node;
|
|
5212
5229
|
const task = httpRequestTask({
|
|
5213
5230
|
...config,
|
|
5214
5231
|
[group]: {
|
|
@@ -5233,9 +5250,10 @@ function withHttpParameterFields(node, group, values) {
|
|
|
5233
5250
|
};
|
|
5234
5251
|
}
|
|
5235
5252
|
function withHttpParameterSource(node, group, mapping) {
|
|
5236
|
-
|
|
5253
|
+
const config = httpRequestExecutor(node);
|
|
5254
|
+
if (config == null) return node;
|
|
5237
5255
|
const task = httpRequestTask({
|
|
5238
|
-
...
|
|
5256
|
+
...config,
|
|
5239
5257
|
[group]: {
|
|
5240
5258
|
mode: "object",
|
|
5241
5259
|
names: []
|
|
@@ -5251,4 +5269,4 @@ function withHttpParameterSource(node, group, mapping) {
|
|
|
5251
5269
|
};
|
|
5252
5270
|
}
|
|
5253
5271
|
//#endregion
|
|
5254
|
-
export { buildHttpRequest, httpAuthHandles, httpHeaderSchema, httpQuerySchema, httpRequestConfigSchema, httpRequestExecutorSchema, httpRequestInputs, httpRequestIssues, httpRequestTask, httpRequestUrl, parseHttpResponse, withHttpParameterFields, withHttpParameterSource };
|
|
5272
|
+
export { buildHttpRequest, httpAuthHandles, httpHeaderSchema, httpHostAllowed, httpQuerySchema, httpRequestConfigSchema, httpRequestExecutorSchema, httpRequestInputs, httpRequestIssues, httpRequestTask, httpRequestUrl, isHttpHost, maxHttpHosts, parseHttpResponse, withHttpParameterFields, withHttpParameterSource };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { resolveTriggerConfig, triggerConfigValues } from './trigger-config.js';
|
|
2
2
|
import type { ConnectorProxy } from './connector-proxy.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type { JsonValue } from './flow-model.js';
|
|
4
4
|
import type { TriggerConfigOption, TriggerConfigOptionsContext } from './trigger-config-options.js';
|
|
5
|
+
import type { IntegrationEndpointMethod, TriggerKeySnapshot } from './trigger-model.js';
|
|
5
6
|
export declare const maximumIntegrationBodyBytes: number;
|
|
6
7
|
export declare const maximumIntegrationDeliveryPages = 5;
|
|
7
8
|
export interface ListenerReadContext {
|