@workglow/tasks 0.2.13 → 0.2.15
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/browser.js +189 -166
- package/dist/browser.js.map +22 -23
- package/dist/bun.js +205 -174
- package/dist/bun.js.map +24 -25
- package/dist/common.d.ts +0 -1
- package/dist/common.d.ts.map +1 -1
- package/dist/electron.js +205 -174
- package/dist/electron.js.map +24 -25
- package/dist/node.js +205 -174
- package/dist/node.js.map +24 -25
- package/dist/task/image/ImageBorderTask.d.ts +76 -58
- package/dist/task/image/ImageBorderTask.d.ts.map +1 -1
- package/dist/task/image/ImageSchemas.d.ts +66 -1
- package/dist/task/image/ImageSchemas.d.ts.map +1 -1
- package/dist/task/image/ImageTextTask.d.ts +91 -254
- package/dist/task/image/ImageTextTask.d.ts.map +1 -1
- package/dist/task/image/ImageTintTask.d.ts +76 -58
- package/dist/task/image/ImageTintTask.d.ts.map +1 -1
- package/dist/task/image/imageRasterCodecBrowser.d.ts +1 -1
- package/dist/task/image/imageRasterCodecBrowser.d.ts.map +1 -1
- package/dist/task/image/imageRasterCodecNode.d.ts +1 -1
- package/dist/task/image/imageRasterCodecNode.d.ts.map +1 -1
- package/dist/task/image/imageRasterCodecRegistry.d.ts +7 -7
- package/dist/task/image/imageRasterCodecRegistry.d.ts.map +1 -1
- package/dist/task/image/imageTaskIo.d.ts +11 -3
- package/dist/task/image/imageTaskIo.d.ts.map +1 -1
- package/dist/task/string/StringConcatTask.d.ts +6 -6
- package/dist/task/string/StringConcatTask.d.ts.map +1 -1
- package/dist/task/string/StringIncludesTask.d.ts +12 -12
- package/dist/task/string/StringIncludesTask.d.ts.map +1 -1
- package/dist/task/string/StringJoinTask.d.ts +12 -12
- package/dist/task/string/StringJoinTask.d.ts.map +1 -1
- package/dist/task/string/StringLengthTask.d.ts +12 -12
- package/dist/task/string/StringLengthTask.d.ts.map +1 -1
- package/dist/task/string/StringLowerCaseTask.d.ts +12 -12
- package/dist/task/string/StringLowerCaseTask.d.ts.map +1 -1
- package/dist/task/string/StringReplaceTask.d.ts +12 -12
- package/dist/task/string/StringReplaceTask.d.ts.map +1 -1
- package/dist/task/string/StringSliceTask.d.ts +12 -12
- package/dist/task/string/StringSliceTask.d.ts.map +1 -1
- package/dist/task/string/StringTemplateTask.d.ts +6 -6
- package/dist/task/string/StringTemplateTask.d.ts.map +1 -1
- package/dist/task/string/StringTrimTask.d.ts +12 -12
- package/dist/task/string/StringTrimTask.d.ts.map +1 -1
- package/dist/task/string/StringUpperCaseTask.d.ts +12 -12
- package/dist/task/string/StringUpperCaseTask.d.ts.map +1 -1
- package/dist/util/SafeFetch.server.d.ts.map +1 -1
- package/package.json +9 -9
- package/dist/task/image/imageTaskTransport.d.ts +0 -21
- package/dist/task/image/imageTaskTransport.d.ts.map +0 -1
package/dist/browser.js
CHANGED
|
@@ -6,6 +6,9 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
6
6
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
7
7
|
});
|
|
8
8
|
|
|
9
|
+
// src/task/image/registerImageRasterCodec.browser.ts
|
|
10
|
+
import { registerImageRasterCodec } from "@workglow/util/media";
|
|
11
|
+
|
|
9
12
|
// src/task/image/imageCodecLimits.ts
|
|
10
13
|
var MAX_DECODED_PIXELS = 1e8;
|
|
11
14
|
var MAX_INPUT_BYTES_NODE = 64 * 1024 * 1024;
|
|
@@ -170,18 +173,6 @@ function createBrowserImageRasterCodec() {
|
|
|
170
173
|
return { decodeDataUri, encodeDataUri };
|
|
171
174
|
}
|
|
172
175
|
|
|
173
|
-
// src/task/image/imageRasterCodecRegistry.ts
|
|
174
|
-
var codec = null;
|
|
175
|
-
function registerImageRasterCodec(next) {
|
|
176
|
-
codec = next;
|
|
177
|
-
}
|
|
178
|
-
function getImageRasterCodec() {
|
|
179
|
-
if (!codec) {
|
|
180
|
-
throw new Error("Image raster codec is not registered. Ensure you import @workglow/tasks from the browser or Node entry (dist/browser.js or dist/node.js), or call registerImageRasterCodec() during startup.");
|
|
181
|
-
}
|
|
182
|
-
return codec;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
176
|
// src/task/image/registerImageRasterCodec.browser.ts
|
|
186
177
|
registerImageRasterCodec(createBrowserImageRasterCodec());
|
|
187
178
|
|
|
@@ -5841,45 +5832,50 @@ var ColorSchema = (annotations = {}) => ({
|
|
|
5841
5832
|
a: { type: "integer", minimum: 0, maximum: 255, title: "Alpha", default: 255 }
|
|
5842
5833
|
},
|
|
5843
5834
|
required: ["r", "g", "b"],
|
|
5835
|
+
format: "color",
|
|
5844
5836
|
additionalProperties: false,
|
|
5845
5837
|
...annotations
|
|
5846
5838
|
});
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5839
|
+
var HexColorSchema = (annotations = {}) => ({
|
|
5840
|
+
type: "string",
|
|
5841
|
+
format: "color",
|
|
5842
|
+
pattern: "^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
|
|
5843
|
+
title: "Color (hex)",
|
|
5844
|
+
description: "Color as a `#RRGGBB[AA]` or `#RGB[A]` hex string",
|
|
5845
|
+
...annotations
|
|
5846
|
+
});
|
|
5847
|
+
var ColorValueSchema = (annotations = {}) => ({
|
|
5848
|
+
oneOf: [
|
|
5849
|
+
ColorSchema(),
|
|
5850
|
+
HexColorSchema({
|
|
5851
|
+
title: annotations.title ?? "Color",
|
|
5852
|
+
description: annotations.description ?? "Color as {r,g,b,a} object or `#RRGGBB[AA]` / `#RGB[A]` hex string"
|
|
5853
|
+
})
|
|
5854
|
+
],
|
|
5855
|
+
...annotations
|
|
5856
|
+
});
|
|
5857
|
+
var ColorObjectType = null;
|
|
5858
|
+
var ColorFromSchemaOptions = {
|
|
5859
|
+
...FromSchemaDefaultOptions,
|
|
5860
|
+
deserialize: [
|
|
5861
|
+
{
|
|
5862
|
+
pattern: { type: "object", format: "color" },
|
|
5863
|
+
output: ColorObjectType
|
|
5864
5864
|
}
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
return { raster, transport: { kind: "dataUri", mimeType } };
|
|
5868
|
-
}
|
|
5869
|
-
return { raster: value, transport: { kind: "binary", mimeType: "image/png" } };
|
|
5870
|
-
}
|
|
5871
|
-
async function formatImageOutput(raster, transport) {
|
|
5872
|
-
if (transport.kind === "binary") {
|
|
5873
|
-
return raster;
|
|
5874
|
-
}
|
|
5875
|
-
return getImageRasterCodec().encodeDataUri(raster, transport.mimeType);
|
|
5876
|
-
}
|
|
5865
|
+
]
|
|
5866
|
+
};
|
|
5877
5867
|
|
|
5878
5868
|
// src/task/image/imageTaskIo.ts
|
|
5869
|
+
import { Image, getImageRasterCodec } from "@workglow/util/media";
|
|
5879
5870
|
async function produceImageOutput(inputImage, run) {
|
|
5880
|
-
const
|
|
5881
|
-
const
|
|
5882
|
-
|
|
5871
|
+
const image = Image.is(inputImage) ? inputImage : Image.from(inputImage);
|
|
5872
|
+
const pixels = await image.getPixels();
|
|
5873
|
+
const out = await run(pixels);
|
|
5874
|
+
if (image.kind === "dataUri") {
|
|
5875
|
+
const mime = image.mimeType ?? "image/png";
|
|
5876
|
+
return getImageRasterCodec().encodeDataUri(out, mime);
|
|
5877
|
+
}
|
|
5878
|
+
return out;
|
|
5883
5879
|
}
|
|
5884
5880
|
|
|
5885
5881
|
// src/task/image/ImageBlurTask.ts
|
|
@@ -5970,6 +5966,7 @@ import {
|
|
|
5970
5966
|
Task as Task43,
|
|
5971
5967
|
Workflow as Workflow18
|
|
5972
5968
|
} from "@workglow/task-graph";
|
|
5969
|
+
import { resolveColor } from "@workglow/util/media";
|
|
5973
5970
|
var inputSchema42 = {
|
|
5974
5971
|
type: "object",
|
|
5975
5972
|
properties: {
|
|
@@ -5981,7 +5978,7 @@ var inputSchema42 = {
|
|
|
5981
5978
|
minimum: 1,
|
|
5982
5979
|
default: 1
|
|
5983
5980
|
},
|
|
5984
|
-
color:
|
|
5981
|
+
color: ColorValueSchema({ title: "Color", description: "Border color" })
|
|
5985
5982
|
},
|
|
5986
5983
|
required: ["image", "color"],
|
|
5987
5984
|
additionalProperties: false
|
|
@@ -6007,7 +6004,8 @@ class ImageBorderTask extends Task43 {
|
|
|
6007
6004
|
return outputSchema41;
|
|
6008
6005
|
}
|
|
6009
6006
|
async executeReactive(input, _output, _context) {
|
|
6010
|
-
const { borderWidth: bw = 1
|
|
6007
|
+
const { borderWidth: bw = 1 } = input;
|
|
6008
|
+
const color = resolveColor(input.color);
|
|
6011
6009
|
const image = await produceImageOutput(input.image, (img) => {
|
|
6012
6010
|
const { data: src, width: srcW, height: srcH, channels: srcCh } = img;
|
|
6013
6011
|
const outCh = 4;
|
|
@@ -6017,7 +6015,7 @@ class ImageBorderTask extends Task43 {
|
|
|
6017
6015
|
const r = color.r;
|
|
6018
6016
|
const g = color.g;
|
|
6019
6017
|
const b = color.b;
|
|
6020
|
-
const a = color.a
|
|
6018
|
+
const a = color.a;
|
|
6021
6019
|
for (let i = 0;i < dst.length; i += outCh) {
|
|
6022
6020
|
dst[i] = r;
|
|
6023
6021
|
dst[i + 1] = g;
|
|
@@ -6564,6 +6562,8 @@ class ImagePosterizeTask extends Task51 {
|
|
|
6564
6562
|
}
|
|
6565
6563
|
}
|
|
6566
6564
|
Workflow26.prototype.imagePosterize = CreateWorkflow25(ImagePosterizeTask);
|
|
6565
|
+
// src/task/image/imageRasterCodecRegistry.ts
|
|
6566
|
+
import { getImageRasterCodec as getImageRasterCodec2, registerImageRasterCodec as registerImageRasterCodec2 } from "@workglow/util/media";
|
|
6567
6567
|
// src/task/image/ImageResizeTask.ts
|
|
6568
6568
|
import {
|
|
6569
6569
|
CreateWorkflow as CreateWorkflow26,
|
|
@@ -6769,6 +6769,7 @@ import {
|
|
|
6769
6769
|
Task as Task55,
|
|
6770
6770
|
Workflow as Workflow30
|
|
6771
6771
|
} from "@workglow/task-graph";
|
|
6772
|
+
import { resolveColor as resolveColor2 } from "@workglow/util/media";
|
|
6772
6773
|
function toRgbaImage(image) {
|
|
6773
6774
|
const { data, width, height, channels } = image;
|
|
6774
6775
|
const rgba = new Uint8ClampedArray(width * height * 4);
|
|
@@ -6832,16 +6833,6 @@ function compositeTextOverBackground(background, overlay) {
|
|
|
6832
6833
|
}
|
|
6833
6834
|
return { data: out, width: bg.width, height: bg.height, channels: 4 };
|
|
6834
6835
|
}
|
|
6835
|
-
function hasUsableBackgroundImage(value) {
|
|
6836
|
-
if (typeof value === "string") {
|
|
6837
|
-
return value.length > 0;
|
|
6838
|
-
}
|
|
6839
|
-
if (typeof value !== "object" || value === null) {
|
|
6840
|
-
return false;
|
|
6841
|
-
}
|
|
6842
|
-
const candidate = value;
|
|
6843
|
-
return typeof candidate.width === "number" && typeof candidate.height === "number" && typeof candidate.channels === "number" && candidate.data !== undefined;
|
|
6844
|
-
}
|
|
6845
6836
|
var IMAGE_TEXT_POSITION_LABELS = {
|
|
6846
6837
|
"top-left": "Top left",
|
|
6847
6838
|
"top-center": "Top center",
|
|
@@ -6853,17 +6844,18 @@ var IMAGE_TEXT_POSITION_LABELS = {
|
|
|
6853
6844
|
"bottom-center": "Bottom center",
|
|
6854
6845
|
"bottom-right": "Bottom right"
|
|
6855
6846
|
};
|
|
6847
|
+
var backgroundImageProperty = ImageBinaryOrDataUriSchema({
|
|
6848
|
+
title: "Image",
|
|
6849
|
+
description: "Background image to render the text onto"
|
|
6850
|
+
});
|
|
6856
6851
|
var inputSchema54 = {
|
|
6857
6852
|
type: "object",
|
|
6858
6853
|
properties: {
|
|
6859
|
-
image: ImageBinaryOrDataUriSchema({
|
|
6860
|
-
title: "Image",
|
|
6861
|
-
description: "Optional background image to render the text onto"
|
|
6862
|
-
}),
|
|
6863
6854
|
text: {
|
|
6864
6855
|
type: "string",
|
|
6865
6856
|
title: "Text",
|
|
6866
|
-
description: "Text to render (use \\n for line breaks)"
|
|
6857
|
+
description: "Text to render (use \\n for line breaks)",
|
|
6858
|
+
minLength: 1
|
|
6867
6859
|
},
|
|
6868
6860
|
font: {
|
|
6869
6861
|
type: "string",
|
|
@@ -6880,7 +6872,16 @@ var inputSchema54 = {
|
|
|
6880
6872
|
},
|
|
6881
6873
|
bold: { type: "boolean", title: "Bold", default: false },
|
|
6882
6874
|
italic: { type: "boolean", title: "Italic", default: false },
|
|
6883
|
-
color:
|
|
6875
|
+
color: ColorValueSchema({ title: "Color", description: "Text color" }),
|
|
6876
|
+
position: {
|
|
6877
|
+
type: "string",
|
|
6878
|
+
title: "Position",
|
|
6879
|
+
description: "Anchor position of the text block within the image",
|
|
6880
|
+
enum: [...IMAGE_TEXT_ANCHOR_POSITIONS],
|
|
6881
|
+
default: "middle-center",
|
|
6882
|
+
"x-ui-enum-labels": IMAGE_TEXT_POSITION_LABELS
|
|
6883
|
+
},
|
|
6884
|
+
image: backgroundImageProperty,
|
|
6884
6885
|
width: {
|
|
6885
6886
|
type: "integer",
|
|
6886
6887
|
title: "Width",
|
|
@@ -6892,18 +6893,18 @@ var inputSchema54 = {
|
|
|
6892
6893
|
title: "Height",
|
|
6893
6894
|
description: "Output height in pixels",
|
|
6894
6895
|
minimum: 1
|
|
6895
|
-
},
|
|
6896
|
-
position: {
|
|
6897
|
-
type: "string",
|
|
6898
|
-
title: "Position",
|
|
6899
|
-
description: "Anchor position of the text block within the image",
|
|
6900
|
-
enum: [...IMAGE_TEXT_ANCHOR_POSITIONS],
|
|
6901
|
-
default: "middle-center",
|
|
6902
|
-
"x-ui-enum-labels": IMAGE_TEXT_POSITION_LABELS
|
|
6903
6896
|
}
|
|
6904
6897
|
},
|
|
6905
|
-
required: ["text", "color"
|
|
6906
|
-
additionalProperties: false
|
|
6898
|
+
required: ["text", "color"],
|
|
6899
|
+
additionalProperties: false,
|
|
6900
|
+
if: {
|
|
6901
|
+
not: {
|
|
6902
|
+
required: ["image"]
|
|
6903
|
+
}
|
|
6904
|
+
},
|
|
6905
|
+
then: {
|
|
6906
|
+
required: ["width", "height"]
|
|
6907
|
+
}
|
|
6907
6908
|
};
|
|
6908
6909
|
var outputSchema53 = {
|
|
6909
6910
|
type: "object",
|
|
@@ -6913,6 +6914,16 @@ var outputSchema53 = {
|
|
|
6913
6914
|
required: ["image"],
|
|
6914
6915
|
additionalProperties: false
|
|
6915
6916
|
};
|
|
6917
|
+
function hasUsableBackgroundImage(value) {
|
|
6918
|
+
if (typeof value === "string") {
|
|
6919
|
+
return value.length > 0;
|
|
6920
|
+
}
|
|
6921
|
+
if (typeof value !== "object" || value === null) {
|
|
6922
|
+
return false;
|
|
6923
|
+
}
|
|
6924
|
+
const candidate = value;
|
|
6925
|
+
return typeof candidate.width === "number" && typeof candidate.height === "number" && typeof candidate.channels === "number" && candidate.data !== undefined;
|
|
6926
|
+
}
|
|
6916
6927
|
|
|
6917
6928
|
class ImageTextTask extends Task55 {
|
|
6918
6929
|
static type = "ImageTextTask";
|
|
@@ -6928,38 +6939,49 @@ class ImageTextTask extends Task55 {
|
|
|
6928
6939
|
getDefaultInputsFromStaticInputDefinitions() {
|
|
6929
6940
|
const defaults = super.getDefaultInputsFromStaticInputDefinitions();
|
|
6930
6941
|
delete defaults.image;
|
|
6942
|
+
delete defaults.width;
|
|
6943
|
+
delete defaults.height;
|
|
6931
6944
|
return defaults;
|
|
6932
6945
|
}
|
|
6933
6946
|
async executeReactive(input, _output, _context) {
|
|
6947
|
+
const color = resolveColor2(input.color);
|
|
6934
6948
|
const fontSize = input.fontSize ?? 24;
|
|
6935
6949
|
const font = input.font ?? "sans-serif";
|
|
6936
6950
|
const bold = input.bold ?? false;
|
|
6937
6951
|
const italic = input.italic ?? false;
|
|
6938
6952
|
const position = input.position ?? "middle-center";
|
|
6939
|
-
const
|
|
6940
|
-
text: input.text,
|
|
6941
|
-
font,
|
|
6942
|
-
fontSize,
|
|
6943
|
-
bold,
|
|
6944
|
-
italic,
|
|
6945
|
-
color: input.color,
|
|
6946
|
-
width: input.width,
|
|
6947
|
-
height: input.height,
|
|
6948
|
-
position
|
|
6949
|
-
};
|
|
6950
|
-
const backgroundImage = input.image;
|
|
6953
|
+
const backgroundImage = "image" in input ? input.image : undefined;
|
|
6951
6954
|
let image;
|
|
6952
6955
|
if (hasUsableBackgroundImage(backgroundImage)) {
|
|
6953
|
-
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
6956
|
+
image = await produceImageOutput(backgroundImage, async (background) => {
|
|
6957
|
+
const overlay = await renderImageTextToRgba({
|
|
6958
|
+
text: input.text,
|
|
6959
|
+
font,
|
|
6960
|
+
fontSize,
|
|
6961
|
+
bold,
|
|
6962
|
+
italic,
|
|
6963
|
+
color,
|
|
6964
|
+
width: background.width,
|
|
6965
|
+
height: background.height,
|
|
6966
|
+
position
|
|
6967
|
+
});
|
|
6959
6968
|
return compositeTextOverBackground(background, overlay);
|
|
6960
6969
|
});
|
|
6961
6970
|
} else {
|
|
6962
|
-
|
|
6971
|
+
if (!("width" in input) || !("height" in input) || typeof input.width !== "number" || typeof input.height !== "number") {
|
|
6972
|
+
throw new Error("ImageTextTask: width and height are required when no background image is provided");
|
|
6973
|
+
}
|
|
6974
|
+
image = await renderImageTextToRgba({
|
|
6975
|
+
text: input.text,
|
|
6976
|
+
font,
|
|
6977
|
+
fontSize,
|
|
6978
|
+
bold,
|
|
6979
|
+
italic,
|
|
6980
|
+
color,
|
|
6981
|
+
width: input.width,
|
|
6982
|
+
height: input.height,
|
|
6983
|
+
position
|
|
6984
|
+
});
|
|
6963
6985
|
}
|
|
6964
6986
|
return { image };
|
|
6965
6987
|
}
|
|
@@ -7035,11 +7057,12 @@ import {
|
|
|
7035
7057
|
Task as Task57,
|
|
7036
7058
|
Workflow as Workflow32
|
|
7037
7059
|
} from "@workglow/task-graph";
|
|
7060
|
+
import { resolveColor as resolveColor3 } from "@workglow/util/media";
|
|
7038
7061
|
var inputSchema56 = {
|
|
7039
7062
|
type: "object",
|
|
7040
7063
|
properties: {
|
|
7041
7064
|
image: ImageBinaryOrDataUriSchema({ title: "Image", description: "Source image" }),
|
|
7042
|
-
color:
|
|
7065
|
+
color: ColorValueSchema({ title: "Color", description: "Tint color" }),
|
|
7043
7066
|
amount: {
|
|
7044
7067
|
type: "number",
|
|
7045
7068
|
title: "Amount",
|
|
@@ -7073,7 +7096,7 @@ class ImageTintTask extends Task57 {
|
|
|
7073
7096
|
return outputSchema55;
|
|
7074
7097
|
}
|
|
7075
7098
|
async executeReactive(input, _output, _context) {
|
|
7076
|
-
const { r: tr, g: tg, b: tb } = input.color;
|
|
7099
|
+
const { r: tr, g: tg, b: tb } = resolveColor3(input.color);
|
|
7077
7100
|
const amount = input.amount ?? 0.5;
|
|
7078
7101
|
const invAmount = 1 - amount;
|
|
7079
7102
|
const tintR = tr * amount;
|
|
@@ -13923,13 +13946,13 @@ var inputSchema74 = {
|
|
|
13923
13946
|
var outputSchema73 = {
|
|
13924
13947
|
type: "object",
|
|
13925
13948
|
properties: {
|
|
13926
|
-
|
|
13949
|
+
text: {
|
|
13927
13950
|
type: "string",
|
|
13928
|
-
title: "
|
|
13951
|
+
title: "Text",
|
|
13929
13952
|
description: "Concatenation of all input strings"
|
|
13930
13953
|
}
|
|
13931
13954
|
},
|
|
13932
|
-
required: ["
|
|
13955
|
+
required: ["text"],
|
|
13933
13956
|
additionalProperties: false
|
|
13934
13957
|
};
|
|
13935
13958
|
|
|
@@ -13945,7 +13968,7 @@ class StringConcatTask extends Task80 {
|
|
|
13945
13968
|
return outputSchema73;
|
|
13946
13969
|
}
|
|
13947
13970
|
async executeReactive(input2, _output, _context) {
|
|
13948
|
-
return {
|
|
13971
|
+
return { text: Object.values(input2).join("") };
|
|
13949
13972
|
}
|
|
13950
13973
|
}
|
|
13951
13974
|
Workflow56.prototype.stringConcat = CreateWorkflow55(StringConcatTask);
|
|
@@ -13958,9 +13981,9 @@ import {
|
|
|
13958
13981
|
var inputSchema75 = {
|
|
13959
13982
|
type: "object",
|
|
13960
13983
|
properties: {
|
|
13961
|
-
|
|
13984
|
+
text: {
|
|
13962
13985
|
type: "string",
|
|
13963
|
-
title: "
|
|
13986
|
+
title: "Text",
|
|
13964
13987
|
description: "Input string to search in"
|
|
13965
13988
|
},
|
|
13966
13989
|
search: {
|
|
@@ -13969,19 +13992,19 @@ var inputSchema75 = {
|
|
|
13969
13992
|
description: "Substring to search for"
|
|
13970
13993
|
}
|
|
13971
13994
|
},
|
|
13972
|
-
required: ["
|
|
13995
|
+
required: ["text", "search"],
|
|
13973
13996
|
additionalProperties: false
|
|
13974
13997
|
};
|
|
13975
13998
|
var outputSchema74 = {
|
|
13976
13999
|
type: "object",
|
|
13977
14000
|
properties: {
|
|
13978
|
-
|
|
14001
|
+
included: {
|
|
13979
14002
|
type: "boolean",
|
|
13980
|
-
title: "
|
|
14003
|
+
title: "Included",
|
|
13981
14004
|
description: "Whether the string contains the search substring"
|
|
13982
14005
|
}
|
|
13983
14006
|
},
|
|
13984
|
-
required: ["
|
|
14007
|
+
required: ["included"],
|
|
13985
14008
|
additionalProperties: false
|
|
13986
14009
|
};
|
|
13987
14010
|
|
|
@@ -13997,7 +14020,7 @@ class StringIncludesTask extends Task81 {
|
|
|
13997
14020
|
return outputSchema74;
|
|
13998
14021
|
}
|
|
13999
14022
|
async executeReactive(input2, _output, _context) {
|
|
14000
|
-
return {
|
|
14023
|
+
return { included: input2.text.includes(input2.search) };
|
|
14001
14024
|
}
|
|
14002
14025
|
}
|
|
14003
14026
|
Workflow57.prototype.stringIncludes = CreateWorkflow56(StringIncludesTask);
|
|
@@ -14010,10 +14033,10 @@ import {
|
|
|
14010
14033
|
var inputSchema76 = {
|
|
14011
14034
|
type: "object",
|
|
14012
14035
|
properties: {
|
|
14013
|
-
|
|
14036
|
+
texts: {
|
|
14014
14037
|
type: "array",
|
|
14015
14038
|
items: { type: "string" },
|
|
14016
|
-
title: "
|
|
14039
|
+
title: "Texts",
|
|
14017
14040
|
description: "Array of strings to join"
|
|
14018
14041
|
},
|
|
14019
14042
|
separator: {
|
|
@@ -14023,19 +14046,19 @@ var inputSchema76 = {
|
|
|
14023
14046
|
default: ""
|
|
14024
14047
|
}
|
|
14025
14048
|
},
|
|
14026
|
-
required: ["
|
|
14049
|
+
required: ["texts"],
|
|
14027
14050
|
additionalProperties: false
|
|
14028
14051
|
};
|
|
14029
14052
|
var outputSchema75 = {
|
|
14030
14053
|
type: "object",
|
|
14031
14054
|
properties: {
|
|
14032
|
-
|
|
14055
|
+
text: {
|
|
14033
14056
|
type: "string",
|
|
14034
|
-
title: "
|
|
14057
|
+
title: "Text",
|
|
14035
14058
|
description: "Joined string"
|
|
14036
14059
|
}
|
|
14037
14060
|
},
|
|
14038
|
-
required: ["
|
|
14061
|
+
required: ["text"],
|
|
14039
14062
|
additionalProperties: false
|
|
14040
14063
|
};
|
|
14041
14064
|
|
|
@@ -14052,7 +14075,7 @@ class StringJoinTask extends Task82 {
|
|
|
14052
14075
|
}
|
|
14053
14076
|
async executeReactive(input2, _output, _context) {
|
|
14054
14077
|
const separator = input2.separator ?? "";
|
|
14055
|
-
return {
|
|
14078
|
+
return { text: input2.texts.join(separator) };
|
|
14056
14079
|
}
|
|
14057
14080
|
}
|
|
14058
14081
|
Workflow58.prototype.stringJoin = CreateWorkflow57(StringJoinTask);
|
|
@@ -14065,25 +14088,25 @@ import {
|
|
|
14065
14088
|
var inputSchema77 = {
|
|
14066
14089
|
type: "object",
|
|
14067
14090
|
properties: {
|
|
14068
|
-
|
|
14091
|
+
text: {
|
|
14069
14092
|
type: "string",
|
|
14070
|
-
title: "
|
|
14093
|
+
title: "Text",
|
|
14071
14094
|
description: "Input string"
|
|
14072
14095
|
}
|
|
14073
14096
|
},
|
|
14074
|
-
required: ["
|
|
14097
|
+
required: ["text"],
|
|
14075
14098
|
additionalProperties: false
|
|
14076
14099
|
};
|
|
14077
14100
|
var outputSchema76 = {
|
|
14078
14101
|
type: "object",
|
|
14079
14102
|
properties: {
|
|
14080
|
-
|
|
14103
|
+
length: {
|
|
14081
14104
|
type: "integer",
|
|
14082
|
-
title: "
|
|
14105
|
+
title: "Length",
|
|
14083
14106
|
description: "Length of the string"
|
|
14084
14107
|
}
|
|
14085
14108
|
},
|
|
14086
|
-
required: ["
|
|
14109
|
+
required: ["length"],
|
|
14087
14110
|
additionalProperties: false
|
|
14088
14111
|
};
|
|
14089
14112
|
|
|
@@ -14099,7 +14122,7 @@ class StringLengthTask extends Task83 {
|
|
|
14099
14122
|
return outputSchema76;
|
|
14100
14123
|
}
|
|
14101
14124
|
async executeReactive(input2, _output, _context) {
|
|
14102
|
-
return {
|
|
14125
|
+
return { length: input2.text.length };
|
|
14103
14126
|
}
|
|
14104
14127
|
}
|
|
14105
14128
|
Workflow59.prototype.stringLength = CreateWorkflow58(StringLengthTask);
|
|
@@ -14112,25 +14135,25 @@ import {
|
|
|
14112
14135
|
var inputSchema78 = {
|
|
14113
14136
|
type: "object",
|
|
14114
14137
|
properties: {
|
|
14115
|
-
|
|
14138
|
+
text: {
|
|
14116
14139
|
type: "string",
|
|
14117
|
-
title: "
|
|
14140
|
+
title: "Text",
|
|
14118
14141
|
description: "Input string"
|
|
14119
14142
|
}
|
|
14120
14143
|
},
|
|
14121
|
-
required: ["
|
|
14144
|
+
required: ["text"],
|
|
14122
14145
|
additionalProperties: false
|
|
14123
14146
|
};
|
|
14124
14147
|
var outputSchema77 = {
|
|
14125
14148
|
type: "object",
|
|
14126
14149
|
properties: {
|
|
14127
|
-
|
|
14150
|
+
text: {
|
|
14128
14151
|
type: "string",
|
|
14129
|
-
title: "
|
|
14152
|
+
title: "Text",
|
|
14130
14153
|
description: "Lowercased string"
|
|
14131
14154
|
}
|
|
14132
14155
|
},
|
|
14133
|
-
required: ["
|
|
14156
|
+
required: ["text"],
|
|
14134
14157
|
additionalProperties: false
|
|
14135
14158
|
};
|
|
14136
14159
|
|
|
@@ -14146,7 +14169,7 @@ class StringLowerCaseTask extends Task84 {
|
|
|
14146
14169
|
return outputSchema77;
|
|
14147
14170
|
}
|
|
14148
14171
|
async executeReactive(input2, _output, _context) {
|
|
14149
|
-
return {
|
|
14172
|
+
return { text: input2.text.toLowerCase() };
|
|
14150
14173
|
}
|
|
14151
14174
|
}
|
|
14152
14175
|
Workflow60.prototype.stringLowerCase = CreateWorkflow59(StringLowerCaseTask);
|
|
@@ -14159,9 +14182,9 @@ import {
|
|
|
14159
14182
|
var inputSchema79 = {
|
|
14160
14183
|
type: "object",
|
|
14161
14184
|
properties: {
|
|
14162
|
-
|
|
14185
|
+
text: {
|
|
14163
14186
|
type: "string",
|
|
14164
|
-
title: "
|
|
14187
|
+
title: "Text",
|
|
14165
14188
|
description: "Input string"
|
|
14166
14189
|
},
|
|
14167
14190
|
search: {
|
|
@@ -14175,19 +14198,19 @@ var inputSchema79 = {
|
|
|
14175
14198
|
description: "Replacement string"
|
|
14176
14199
|
}
|
|
14177
14200
|
},
|
|
14178
|
-
required: ["
|
|
14201
|
+
required: ["text", "search", "replace"],
|
|
14179
14202
|
additionalProperties: false
|
|
14180
14203
|
};
|
|
14181
14204
|
var outputSchema78 = {
|
|
14182
14205
|
type: "object",
|
|
14183
14206
|
properties: {
|
|
14184
|
-
|
|
14207
|
+
text: {
|
|
14185
14208
|
type: "string",
|
|
14186
|
-
title: "
|
|
14209
|
+
title: "Text",
|
|
14187
14210
|
description: "String with all occurrences replaced"
|
|
14188
14211
|
}
|
|
14189
14212
|
},
|
|
14190
|
-
required: ["
|
|
14213
|
+
required: ["text"],
|
|
14191
14214
|
additionalProperties: false
|
|
14192
14215
|
};
|
|
14193
14216
|
|
|
@@ -14203,7 +14226,7 @@ class StringReplaceTask extends Task85 {
|
|
|
14203
14226
|
return outputSchema78;
|
|
14204
14227
|
}
|
|
14205
14228
|
async executeReactive(input2, _output, _context) {
|
|
14206
|
-
return {
|
|
14229
|
+
return { text: input2.text.replaceAll(input2.search, input2.replace) };
|
|
14207
14230
|
}
|
|
14208
14231
|
}
|
|
14209
14232
|
Workflow61.prototype.stringReplace = CreateWorkflow60(StringReplaceTask);
|
|
@@ -14216,9 +14239,9 @@ import {
|
|
|
14216
14239
|
var inputSchema80 = {
|
|
14217
14240
|
type: "object",
|
|
14218
14241
|
properties: {
|
|
14219
|
-
|
|
14242
|
+
text: {
|
|
14220
14243
|
type: "string",
|
|
14221
|
-
title: "
|
|
14244
|
+
title: "Text",
|
|
14222
14245
|
description: "Input string"
|
|
14223
14246
|
},
|
|
14224
14247
|
start: {
|
|
@@ -14232,19 +14255,19 @@ var inputSchema80 = {
|
|
|
14232
14255
|
description: "End index (exclusive, supports negative indexing)"
|
|
14233
14256
|
}
|
|
14234
14257
|
},
|
|
14235
|
-
required: ["
|
|
14258
|
+
required: ["text", "start"],
|
|
14236
14259
|
additionalProperties: false
|
|
14237
14260
|
};
|
|
14238
14261
|
var outputSchema79 = {
|
|
14239
14262
|
type: "object",
|
|
14240
14263
|
properties: {
|
|
14241
|
-
|
|
14264
|
+
text: {
|
|
14242
14265
|
type: "string",
|
|
14243
|
-
title: "
|
|
14266
|
+
title: "Text",
|
|
14244
14267
|
description: "Extracted substring"
|
|
14245
14268
|
}
|
|
14246
14269
|
},
|
|
14247
|
-
required: ["
|
|
14270
|
+
required: ["text"],
|
|
14248
14271
|
additionalProperties: false
|
|
14249
14272
|
};
|
|
14250
14273
|
|
|
@@ -14260,7 +14283,7 @@ class StringSliceTask extends Task86 {
|
|
|
14260
14283
|
return outputSchema79;
|
|
14261
14284
|
}
|
|
14262
14285
|
async executeReactive(input2, _output, _context) {
|
|
14263
|
-
return {
|
|
14286
|
+
return { text: input2.text.slice(input2.start, input2.end) };
|
|
14264
14287
|
}
|
|
14265
14288
|
}
|
|
14266
14289
|
Workflow62.prototype.stringSlice = CreateWorkflow61(StringSliceTask);
|
|
@@ -14291,13 +14314,13 @@ var inputSchema81 = {
|
|
|
14291
14314
|
var outputSchema80 = {
|
|
14292
14315
|
type: "object",
|
|
14293
14316
|
properties: {
|
|
14294
|
-
|
|
14317
|
+
text: {
|
|
14295
14318
|
type: "string",
|
|
14296
|
-
title: "
|
|
14319
|
+
title: "Text",
|
|
14297
14320
|
description: "Template with placeholders replaced by values"
|
|
14298
14321
|
}
|
|
14299
14322
|
},
|
|
14300
|
-
required: ["
|
|
14323
|
+
required: ["text"],
|
|
14301
14324
|
additionalProperties: false
|
|
14302
14325
|
};
|
|
14303
14326
|
|
|
@@ -14313,11 +14336,11 @@ class StringTemplateTask extends Task87 {
|
|
|
14313
14336
|
return outputSchema80;
|
|
14314
14337
|
}
|
|
14315
14338
|
async executeReactive(input2, _output, _context) {
|
|
14316
|
-
let
|
|
14339
|
+
let text = input2.template;
|
|
14317
14340
|
for (const [key, value] of Object.entries(input2.values)) {
|
|
14318
|
-
|
|
14341
|
+
text = text.replaceAll(`{{${key}}}`, String(value));
|
|
14319
14342
|
}
|
|
14320
|
-
return {
|
|
14343
|
+
return { text };
|
|
14321
14344
|
}
|
|
14322
14345
|
}
|
|
14323
14346
|
Workflow63.prototype.stringTemplate = CreateWorkflow62(StringTemplateTask);
|
|
@@ -14330,25 +14353,25 @@ import {
|
|
|
14330
14353
|
var inputSchema82 = {
|
|
14331
14354
|
type: "object",
|
|
14332
14355
|
properties: {
|
|
14333
|
-
|
|
14356
|
+
text: {
|
|
14334
14357
|
type: "string",
|
|
14335
|
-
title: "
|
|
14358
|
+
title: "Text",
|
|
14336
14359
|
description: "Input string"
|
|
14337
14360
|
}
|
|
14338
14361
|
},
|
|
14339
|
-
required: ["
|
|
14362
|
+
required: ["text"],
|
|
14340
14363
|
additionalProperties: false
|
|
14341
14364
|
};
|
|
14342
14365
|
var outputSchema81 = {
|
|
14343
14366
|
type: "object",
|
|
14344
14367
|
properties: {
|
|
14345
|
-
|
|
14368
|
+
text: {
|
|
14346
14369
|
type: "string",
|
|
14347
|
-
title: "
|
|
14370
|
+
title: "Text",
|
|
14348
14371
|
description: "Trimmed string"
|
|
14349
14372
|
}
|
|
14350
14373
|
},
|
|
14351
|
-
required: ["
|
|
14374
|
+
required: ["text"],
|
|
14352
14375
|
additionalProperties: false
|
|
14353
14376
|
};
|
|
14354
14377
|
|
|
@@ -14364,7 +14387,7 @@ class StringTrimTask extends Task88 {
|
|
|
14364
14387
|
return outputSchema81;
|
|
14365
14388
|
}
|
|
14366
14389
|
async executeReactive(input2, _output, _context) {
|
|
14367
|
-
return {
|
|
14390
|
+
return { text: input2.text.trim() };
|
|
14368
14391
|
}
|
|
14369
14392
|
}
|
|
14370
14393
|
Workflow64.prototype.stringTrim = CreateWorkflow63(StringTrimTask);
|
|
@@ -14377,25 +14400,25 @@ import {
|
|
|
14377
14400
|
var inputSchema83 = {
|
|
14378
14401
|
type: "object",
|
|
14379
14402
|
properties: {
|
|
14380
|
-
|
|
14403
|
+
text: {
|
|
14381
14404
|
type: "string",
|
|
14382
|
-
title: "
|
|
14405
|
+
title: "Text",
|
|
14383
14406
|
description: "Input string"
|
|
14384
14407
|
}
|
|
14385
14408
|
},
|
|
14386
|
-
required: ["
|
|
14409
|
+
required: ["text"],
|
|
14387
14410
|
additionalProperties: false
|
|
14388
14411
|
};
|
|
14389
14412
|
var outputSchema82 = {
|
|
14390
14413
|
type: "object",
|
|
14391
14414
|
properties: {
|
|
14392
|
-
|
|
14415
|
+
text: {
|
|
14393
14416
|
type: "string",
|
|
14394
|
-
title: "
|
|
14417
|
+
title: "Text",
|
|
14395
14418
|
description: "Uppercased string"
|
|
14396
14419
|
}
|
|
14397
14420
|
},
|
|
14398
|
-
required: ["
|
|
14421
|
+
required: ["text"],
|
|
14399
14422
|
additionalProperties: false
|
|
14400
14423
|
};
|
|
14401
14424
|
|
|
@@ -14411,7 +14434,7 @@ class StringUpperCaseTask extends Task89 {
|
|
|
14411
14434
|
return outputSchema82;
|
|
14412
14435
|
}
|
|
14413
14436
|
async executeReactive(input2, _output, _context) {
|
|
14414
|
-
return {
|
|
14437
|
+
return { text: input2.text.toUpperCase() };
|
|
14415
14438
|
}
|
|
14416
14439
|
}
|
|
14417
14440
|
Workflow65.prototype.stringUpperCase = CreateWorkflow64(StringUpperCaseTask);
|
|
@@ -15309,13 +15332,12 @@ export {
|
|
|
15309
15332
|
searchMcpRegistryPage,
|
|
15310
15333
|
searchMcpRegistry,
|
|
15311
15334
|
safeFetch,
|
|
15312
|
-
resolveImageInput,
|
|
15313
15335
|
resolveAuthSecrets,
|
|
15314
15336
|
resetSafeFetch,
|
|
15315
15337
|
registerSafeFetch,
|
|
15316
15338
|
registerMcpTaskDeps,
|
|
15317
15339
|
registerMcpServer,
|
|
15318
|
-
registerImageRasterCodec,
|
|
15340
|
+
registerImageRasterCodec2 as registerImageRasterCodec,
|
|
15319
15341
|
registerCommonTasks2 as registerCommonTasks,
|
|
15320
15342
|
registerBrowserDeps,
|
|
15321
15343
|
produceImageOutput,
|
|
@@ -15336,16 +15358,14 @@ export {
|
|
|
15336
15358
|
lambda,
|
|
15337
15359
|
json,
|
|
15338
15360
|
javaScript,
|
|
15339
|
-
isDataUriImage,
|
|
15340
15361
|
getSafeFetchImpl,
|
|
15341
15362
|
getMcpTaskDeps,
|
|
15342
15363
|
getMcpServerConfig,
|
|
15343
15364
|
getMcpServer,
|
|
15344
|
-
getImageRasterCodec,
|
|
15365
|
+
getImageRasterCodec2 as getImageRasterCodec,
|
|
15345
15366
|
getGlobalMcpServers,
|
|
15346
15367
|
getGlobalMcpServerRepository,
|
|
15347
15368
|
getBrowserDeps,
|
|
15348
|
-
formatImageOutput,
|
|
15349
15369
|
fileLoader,
|
|
15350
15370
|
fetchUrl,
|
|
15351
15371
|
extractDataUriMimeType,
|
|
@@ -15442,6 +15462,7 @@ export {
|
|
|
15442
15462
|
ImageBinaryOrDataUriSchema,
|
|
15443
15463
|
HumanInputTask,
|
|
15444
15464
|
HumanApprovalTask,
|
|
15465
|
+
HexColorSchema,
|
|
15445
15466
|
FileLoaderTask,
|
|
15446
15467
|
FetchUrlTask,
|
|
15447
15468
|
FetchUrlJob,
|
|
@@ -15449,7 +15470,9 @@ export {
|
|
|
15449
15470
|
DebugLogTask,
|
|
15450
15471
|
DateFormatTask,
|
|
15451
15472
|
CredentialStoreOAuthProvider,
|
|
15473
|
+
ColorValueSchema,
|
|
15452
15474
|
ColorSchema,
|
|
15475
|
+
ColorFromSchemaOptions,
|
|
15453
15476
|
CDPBrowserBackend,
|
|
15454
15477
|
BunWebViewBackend,
|
|
15455
15478
|
BrowserWaitTask,
|
|
@@ -15483,4 +15506,4 @@ export {
|
|
|
15483
15506
|
ArrayTask
|
|
15484
15507
|
};
|
|
15485
15508
|
|
|
15486
|
-
//# debugId=
|
|
15509
|
+
//# debugId=C12051EC74980D7364756E2164756E21
|