@powerhousedao/reactor-workflow 6.2.3-dev.30 → 6.2.3-dev.32
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 +183 -9
- package/dist/index.d.ts +214 -40
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6880 -660
- package/dist/index.js.map +1 -1
- package/dist/loader-Gkx6I_Bo.js +91 -0
- package/dist/loader-Gkx6I_Bo.js.map +1 -0
- package/dist/{piece-registry-CAS4wiSA.js → piece-registry-BAm8pRDY.js} +1126 -167
- package/dist/piece-registry-BAm8pRDY.js.map +1 -0
- package/dist/{piece-registry-DbYbKifY.d.ts → piece-registry-iXg2XQxp.d.ts} +124 -23
- package/dist/piece-registry-iXg2XQxp.d.ts.map +1 -0
- package/dist/{redact-DM3JhxdF.js → redact-LRWHJGW9.js} +245 -5
- package/dist/redact-LRWHJGW9.js.map +1 -0
- package/dist/testing.d.ts +4 -15
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +4 -4
- package/dist/worker-entry.js +18 -8
- package/dist/worker-entry.js.map +1 -1
- package/package.json +9 -7
- package/dist/descriptor-BImUIBMP.js +0 -256
- package/dist/descriptor-BImUIBMP.js.map +0 -1
- package/dist/piece-registry-CAS4wiSA.js.map +0 -1
- package/dist/piece-registry-DbYbKifY.d.ts.map +0 -1
- package/dist/redact-DM3JhxdF.js.map +0 -1
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
import { B as unsupportedTrigger, G as getTriggers, W as getActions, z as unsupportedAuth } from "./redact-DM3JhxdF.js";
|
|
2
|
-
import { createRequire } from "node:module";
|
|
3
|
-
import { readFileSync, realpathSync } from "node:fs";
|
|
4
|
-
import path from "node:path";
|
|
5
|
-
import { pathToFileURL } from "node:url";
|
|
6
|
-
//#region src/pieces/activepieces/loader.ts
|
|
7
|
-
function resolveEntry(pieceDir) {
|
|
8
|
-
const raw = readFileSync(path.join(pieceDir, "package.json"), "utf8");
|
|
9
|
-
const pkg = JSON.parse(raw);
|
|
10
|
-
const dotExport = pkg.exports?.["."];
|
|
11
|
-
const candidates = [];
|
|
12
|
-
if (typeof dotExport === "string") candidates.push(dotExport);
|
|
13
|
-
if (dotExport && typeof dotExport === "object") {
|
|
14
|
-
const cond = dotExport;
|
|
15
|
-
for (const key of [
|
|
16
|
-
"import",
|
|
17
|
-
"require",
|
|
18
|
-
"default"
|
|
19
|
-
]) {
|
|
20
|
-
const value = cond[key];
|
|
21
|
-
if (typeof value === "string") candidates.push(value);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
candidates.push(pkg.main, pkg.module, "src/index.js", "index.js", "main.js");
|
|
25
|
-
const root = realpathSync(pieceDir);
|
|
26
|
-
const rootWithSep = root + path.sep;
|
|
27
|
-
for (const candidate of candidates) {
|
|
28
|
-
if (!candidate) continue;
|
|
29
|
-
const abs = path.resolve(pieceDir, candidate);
|
|
30
|
-
let real;
|
|
31
|
-
try {
|
|
32
|
-
real = realpathSync(abs);
|
|
33
|
-
} catch {
|
|
34
|
-
continue;
|
|
35
|
-
}
|
|
36
|
-
if (real !== root && !real.startsWith(rootWithSep)) continue;
|
|
37
|
-
return abs;
|
|
38
|
-
}
|
|
39
|
-
throw new Error(`No entry file found for piece bundle at ${pieceDir}`);
|
|
40
|
-
}
|
|
41
|
-
function isRecord(value) {
|
|
42
|
-
return typeof value === "object" && value !== null;
|
|
43
|
-
}
|
|
44
|
-
function findPiece(mod) {
|
|
45
|
-
const candidates = [
|
|
46
|
-
...Object.values(mod),
|
|
47
|
-
...isRecord(mod.default) ? Object.values(mod.default) : [],
|
|
48
|
-
mod.default
|
|
49
|
-
];
|
|
50
|
-
for (const candidate of candidates) if (isRecord(candidate) && candidate.constructor?.name === "Piece") return {
|
|
51
|
-
piece: candidate,
|
|
52
|
-
check: "constructor-name"
|
|
53
|
-
};
|
|
54
|
-
for (const candidate of candidates) if (isRecord(candidate) && typeof candidate.displayName === "string" && (isRecord(candidate.actions) || typeof candidate.actions === "function" || typeof candidate.getAction === "function")) return {
|
|
55
|
-
piece: candidate,
|
|
56
|
-
check: "structural"
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
function missingModule(entryPath, error) {
|
|
60
|
-
const code = error?.code;
|
|
61
|
-
if (code !== "ERR_MODULE_NOT_FOUND" && code !== "MODULE_NOT_FOUND") return;
|
|
62
|
-
const detail = error instanceof Error ? error.message : String(error);
|
|
63
|
-
return /* @__PURE__ */ new Error(`Piece at ${entryPath} could not be loaded: it imports a module that is not there. Its dependencies are installed with lifecycle scripts disabled, so one that compiles or downloads on install -- a native addon, a browser download -- cannot be prepared here. ${detail}`);
|
|
64
|
-
}
|
|
65
|
-
async function loadPiece(entryPath) {
|
|
66
|
-
let mod;
|
|
67
|
-
try {
|
|
68
|
-
mod = await import(
|
|
69
|
-
/* @vite-ignore */
|
|
70
|
-
pathToFileURL(entryPath).href
|
|
71
|
-
);
|
|
72
|
-
} catch (imported) {
|
|
73
|
-
try {
|
|
74
|
-
mod = createRequire(import.meta.url)(entryPath);
|
|
75
|
-
} catch (required) {
|
|
76
|
-
throw missingModule(entryPath, imported) ?? missingModule(entryPath, required) ?? required;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
const found = findPiece(mod);
|
|
80
|
-
if (!found) throw new Error(`No Piece export found in ${entryPath}. Export keys: ${Object.keys(mod).join(", ")}`);
|
|
81
|
-
return {
|
|
82
|
-
...found,
|
|
83
|
-
entryPath
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
async function loadPieceFromDir(pieceDir) {
|
|
87
|
-
return loadPiece(resolveEntry(pieceDir));
|
|
88
|
-
}
|
|
89
|
-
//#endregion
|
|
90
|
-
//#region src/pieces/activepieces/descriptor.ts
|
|
91
|
-
function describeHandshake(trigger) {
|
|
92
|
-
const strategy = trigger.handshakeConfiguration?.strategy;
|
|
93
|
-
if (!strategy || strategy === "NONE") return void 0;
|
|
94
|
-
return {
|
|
95
|
-
strategy,
|
|
96
|
-
paramName: trigger.handshakeConfiguration?.paramName
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
function optional(key, value) {
|
|
100
|
-
return value === void 0 ? {} : { [key]: value };
|
|
101
|
-
}
|
|
102
|
-
function describeOption(option) {
|
|
103
|
-
return {
|
|
104
|
-
label: option.label,
|
|
105
|
-
value: option.value,
|
|
106
|
-
...typeof option.description === "string" && option.description ? { description: option.description } : {},
|
|
107
|
-
...typeof option.icon === "string" && option.icon ? { icon: option.icon } : {}
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
function describeHints(prop) {
|
|
111
|
-
const hints = {};
|
|
112
|
-
if (prop.width === "half" || prop.width === "full") hints.width = prop.width;
|
|
113
|
-
for (const key of [
|
|
114
|
-
"icon",
|
|
115
|
-
"variant",
|
|
116
|
-
"display",
|
|
117
|
-
"formatProperty"
|
|
118
|
-
]) {
|
|
119
|
-
const value = prop[key];
|
|
120
|
-
if (typeof value === "string" && value !== "") hints[key] = value;
|
|
121
|
-
}
|
|
122
|
-
for (const key of [
|
|
123
|
-
"min",
|
|
124
|
-
"max",
|
|
125
|
-
"step"
|
|
126
|
-
]) {
|
|
127
|
-
const value = prop[key];
|
|
128
|
-
if (typeof value === "number" && Number.isFinite(value)) hints[key] = value;
|
|
129
|
-
}
|
|
130
|
-
if (Array.isArray(prop.reveals)) {
|
|
131
|
-
const reveals = prop.reveals.filter((name) => typeof name === "string");
|
|
132
|
-
if (reveals.length > 0) hints.reveals = reveals;
|
|
133
|
-
}
|
|
134
|
-
if (prop.refreshOnSearch === true) hints.refreshOnSearch = true;
|
|
135
|
-
return hints;
|
|
136
|
-
}
|
|
137
|
-
function describeGroups(groups) {
|
|
138
|
-
if (!Array.isArray(groups)) return void 0;
|
|
139
|
-
const described = groups.filter((group) => typeof group.key === "string" && typeof group.display === "string" && Array.isArray(group.props)).map((group) => ({
|
|
140
|
-
key: group.key,
|
|
141
|
-
display: group.display,
|
|
142
|
-
...group.label ? { label: group.label } : {},
|
|
143
|
-
...group.description ? { description: group.description } : {},
|
|
144
|
-
...group.icon ? { icon: group.icon } : {},
|
|
145
|
-
props: group.props.filter((name) => typeof name === "string")
|
|
146
|
-
}));
|
|
147
|
-
return described.length > 0 ? described : void 0;
|
|
148
|
-
}
|
|
149
|
-
function hasResolver(prop) {
|
|
150
|
-
return typeof prop.options === "function" || typeof prop.props === "function";
|
|
151
|
-
}
|
|
152
|
-
function toPropDescriptor(name, prop, resolverId) {
|
|
153
|
-
const dynamic = hasResolver(prop);
|
|
154
|
-
const descriptor = {
|
|
155
|
-
name,
|
|
156
|
-
displayName: prop.displayName ?? name,
|
|
157
|
-
type: prop.type ?? "UNKNOWN",
|
|
158
|
-
required: prop.required ?? false,
|
|
159
|
-
hasDynamicResolver: dynamic
|
|
160
|
-
};
|
|
161
|
-
if (typeof prop.description === "string" && prop.description !== "") descriptor.description = prop.description;
|
|
162
|
-
if (typeof prop.placeholder === "string" && prop.placeholder !== "") descriptor.placeholder = prop.placeholder;
|
|
163
|
-
if (prop.defaultValue !== void 0) descriptor.defaultValue = prop.defaultValue;
|
|
164
|
-
if (prop.advanced === true) descriptor.advanced = true;
|
|
165
|
-
if (dynamic && resolverId) descriptor.dynamicResolverId = resolverId;
|
|
166
|
-
if (dynamic && Array.isArray(prop.refreshers)) descriptor.refreshers = prop.refreshers.filter((entry) => typeof entry === "string");
|
|
167
|
-
if (typeof prop.options === "object" && Array.isArray(prop.options.options)) {
|
|
168
|
-
descriptor.staticOptions = prop.options.options.map(describeOption);
|
|
169
|
-
if (prop.options.disabled === true) descriptor.staticDisabled = true;
|
|
170
|
-
if (typeof prop.options.placeholder === "string") descriptor.staticPlaceholder = prop.options.placeholder;
|
|
171
|
-
}
|
|
172
|
-
Object.assign(descriptor, describeHints(prop));
|
|
173
|
-
if (prop.properties && typeof prop.properties === "object") {
|
|
174
|
-
const nested = describeProperties(prop.properties);
|
|
175
|
-
if (nested.length > 0) descriptor.properties = nested;
|
|
176
|
-
}
|
|
177
|
-
return descriptor;
|
|
178
|
-
}
|
|
179
|
-
function describeProperties(props, resolverIdFor) {
|
|
180
|
-
if (!props || typeof props !== "object") return [];
|
|
181
|
-
return Object.entries(props).filter((entry) => isPropertyObject(entry[1])).map(([propName, prop]) => toPropDescriptor(propName, prop, resolverIdFor?.(propName)));
|
|
182
|
-
}
|
|
183
|
-
function isPropertyObject(value) {
|
|
184
|
-
return value !== null && typeof value === "object";
|
|
185
|
-
}
|
|
186
|
-
function withUnsupported(feature) {
|
|
187
|
-
return feature ? { unsupported: feature } : {};
|
|
188
|
-
}
|
|
189
|
-
function describeAuthMethod(auth) {
|
|
190
|
-
if (!auth || typeof auth !== "object") return void 0;
|
|
191
|
-
const method = auth;
|
|
192
|
-
const props = method.props && typeof method.props === "object" ? describeProperties(method.props) : [];
|
|
193
|
-
return {
|
|
194
|
-
type: method.type ?? "UNKNOWN",
|
|
195
|
-
displayName: method.displayName,
|
|
196
|
-
description: method.description,
|
|
197
|
-
required: method.required,
|
|
198
|
-
...props.length > 0 ? { props } : {},
|
|
199
|
-
...withUnsupported(unsupportedAuth(method))
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
function buildDescriptor(piece, source) {
|
|
203
|
-
const actions = Object.entries(getActions(piece)).map(([actionName, action]) => ({
|
|
204
|
-
name: action.name ?? actionName,
|
|
205
|
-
displayName: action.displayName ?? actionName,
|
|
206
|
-
description: action.description,
|
|
207
|
-
requireAuth: action.requireAuth ?? false,
|
|
208
|
-
props: describeProperties(action.props, (propName) => `activepieces:${source.packageName}#${actionName}.${propName}`),
|
|
209
|
-
...action.outputSchema !== void 0 ? { outputSchema: action.outputSchema } : {},
|
|
210
|
-
...action.audience !== void 0 ? { audience: action.audience } : {},
|
|
211
|
-
...optional("propertyGroups", describeGroups(action.propertyGroups)),
|
|
212
|
-
...optional("classification", typeof action.classification === "string" ? action.classification : void 0),
|
|
213
|
-
...optional("errorHandlingOptions", action.errorHandlingOptions)
|
|
214
|
-
}));
|
|
215
|
-
const triggers = Object.entries(getTriggers(piece)).map(([triggerName, trigger]) => ({
|
|
216
|
-
name: trigger.name ?? triggerName,
|
|
217
|
-
displayName: trigger.displayName ?? triggerName,
|
|
218
|
-
description: trigger.description,
|
|
219
|
-
strategy: trigger.type ?? "UNKNOWN",
|
|
220
|
-
testStrategy: trigger.testStrategy,
|
|
221
|
-
requireAuth: trigger.requireAuth ?? false,
|
|
222
|
-
props: describeProperties(trigger.props, (propName) => `activepieces:${source.packageName}#${triggerName}.${propName}`),
|
|
223
|
-
...trigger.outputSchema !== void 0 ? { outputSchema: trigger.outputSchema } : {},
|
|
224
|
-
hasSampleData: trigger.sampleData !== void 0 && trigger.sampleData !== null,
|
|
225
|
-
...trigger.sampleData !== void 0 && trigger.sampleData !== null ? { sampleData: trigger.sampleData } : {},
|
|
226
|
-
handshake: describeHandshake(trigger),
|
|
227
|
-
...optional("propertyGroups", describeGroups(trigger.propertyGroups)),
|
|
228
|
-
...withUnsupported(unsupportedTrigger(trigger))
|
|
229
|
-
}));
|
|
230
|
-
const descriptor = {
|
|
231
|
-
id: `activepieces:${source.packageName}`,
|
|
232
|
-
source,
|
|
233
|
-
displayName: piece.displayName,
|
|
234
|
-
description: piece.description,
|
|
235
|
-
logoUrl: piece.logoUrl,
|
|
236
|
-
categories: piece.categories,
|
|
237
|
-
...piece.deprecated === true ? { deprecated: true } : {},
|
|
238
|
-
minimumSupportedRelease: piece.minimumSupportedRelease,
|
|
239
|
-
maximumSupportedRelease: piece.maximumSupportedRelease,
|
|
240
|
-
actions,
|
|
241
|
-
triggers,
|
|
242
|
-
...withUnsupported(unsupportedAuth(piece.auth))
|
|
243
|
-
};
|
|
244
|
-
if (Array.isArray(piece.auth)) {
|
|
245
|
-
const methods = piece.auth.map(describeAuthMethod).filter((method) => method !== void 0);
|
|
246
|
-
if (methods.length > 0) descriptor.auth = methods;
|
|
247
|
-
} else {
|
|
248
|
-
const method = describeAuthMethod(piece.auth);
|
|
249
|
-
if (method) descriptor.auth = method;
|
|
250
|
-
}
|
|
251
|
-
return descriptor;
|
|
252
|
-
}
|
|
253
|
-
//#endregion
|
|
254
|
-
export { loadPieceFromDir as i, describeProperties as n, loadPiece as r, buildDescriptor as t };
|
|
255
|
-
|
|
256
|
-
//# sourceMappingURL=descriptor-BImUIBMP.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"descriptor-BImUIBMP.js","names":[],"sources":["../src/pieces/activepieces/loader.ts","../src/pieces/activepieces/descriptor.ts"],"sourcesContent":["import { readFileSync, realpathSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport type { ApPiece } from \"./types.js\";\n\nexport interface LoadedPiece {\n piece: ApPiece;\n entryPath: string;\n // Which duck-type check identified the export.\n check: \"constructor-name\" | \"structural\";\n}\n\n// Resolves a bundle's entry file. Published bundles typically carry only\n// `main` (no `exports`, no `type` — they are CJS).\nexport function resolveEntry(pieceDir: string): string {\n const raw = readFileSync(path.join(pieceDir, \"package.json\"), \"utf8\");\n const pkg = JSON.parse(raw) as {\n main?: string;\n module?: string;\n exports?: Record<string, unknown>;\n };\n const dotExport = pkg.exports?.[\".\"];\n const candidates: (string | undefined)[] = [];\n if (typeof dotExport === \"string\") candidates.push(dotExport);\n if (dotExport && typeof dotExport === \"object\") {\n const cond = dotExport as Record<string, unknown>;\n for (const key of [\"import\", \"require\", \"default\"]) {\n const value = cond[key];\n if (typeof value === \"string\") candidates.push(value);\n }\n }\n candidates.push(pkg.main, pkg.module, \"src/index.js\", \"index.js\", \"main.js\");\n // A bundle's manifest (or a symlink inside it) must not point the entry\n // outside pieceDir; realpath so a symlink can't launder the escape.\n const root = realpathSync(pieceDir);\n const rootWithSep = root + path.sep;\n for (const candidate of candidates) {\n if (!candidate) continue;\n const abs = path.resolve(pieceDir, candidate);\n let real: string;\n try {\n real = realpathSync(abs);\n } catch {\n continue; // candidate doesn't exist; try the next one\n }\n if (real !== root && !real.startsWith(rootWithSep)) continue;\n return abs;\n }\n throw new Error(`No entry file found for piece bundle at ${pieceDir}`);\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null;\n}\n\n// Identify the piece by constructor name (their own loader's check), falling\n// back to structure for bundles minified without keepNames. No `instanceof`.\nfunction findPiece(\n mod: Record<string, unknown>,\n): Pick<LoadedPiece, \"piece\" | \"check\"> | undefined {\n const candidates: unknown[] = [\n ...Object.values(mod),\n ...(isRecord(mod.default) ? Object.values(mod.default) : []),\n mod.default,\n ];\n for (const candidate of candidates) {\n // `constructor?.name`: a bundle may export an Object.create(null), and the\n // real piece is usually beside it in the same module.\n if (isRecord(candidate) && candidate.constructor?.name === \"Piece\") {\n return {\n piece: candidate as unknown as ApPiece,\n check: \"constructor-name\",\n };\n }\n }\n for (const candidate of candidates) {\n if (\n isRecord(candidate) &&\n typeof candidate.displayName === \"string\" &&\n (isRecord(candidate.actions) ||\n typeof candidate.actions === \"function\" ||\n typeof candidate.getAction === \"function\")\n ) {\n return { piece: candidate as unknown as ApPiece, check: \"structural\" };\n }\n }\n return undefined;\n}\n\n// A module the piece names and node cannot find. Dependencies are installed\n// with scripts disabled, so a native or downloaded one looks like this.\nfunction missingModule(entryPath: string, error: unknown): Error | undefined {\n const code = (error as { code?: unknown } | null)?.code;\n if (code !== \"ERR_MODULE_NOT_FOUND\" && code !== \"MODULE_NOT_FOUND\") {\n return undefined;\n }\n const detail = error instanceof Error ? error.message : String(error);\n return new Error(\n `Piece at ${entryPath} could not be loaded: it imports a module that is ` +\n `not there. Its dependencies are installed with lifecycle scripts ` +\n `disabled, so one that compiles or downloads on install -- a native ` +\n `addon, a browser download -- cannot be prepared here. ${detail}`,\n );\n}\n\n// ESM-first `import()` — Node's CJS interop handles the typical CJS bundle —\n// with a `require` fallback.\nexport async function loadPiece(entryPath: string): Promise<LoadedPiece> {\n let mod: Record<string, unknown>;\n try {\n mod = (await import(\n /* @vite-ignore */ pathToFileURL(entryPath).href\n )) as Record<string, unknown>;\n } catch (imported) {\n try {\n const require = createRequire(import.meta.url);\n mod = require(entryPath) as Record<string, unknown>;\n } catch (required) {\n // The import's error names the missing module; require's often names\n // only the entry it was handed.\n throw (\n missingModule(entryPath, imported) ??\n missingModule(entryPath, required) ??\n required\n );\n }\n }\n const found = findPiece(mod);\n if (!found) {\n throw new Error(\n `No Piece export found in ${entryPath}. Export keys: ${Object.keys(mod).join(\", \")}`,\n );\n }\n return { ...found, entryPath };\n}\n\nexport async function loadPieceFromDir(pieceDir: string): Promise<LoadedPiece> {\n return loadPiece(resolveEntry(pieceDir));\n}\n","import {\n getActions,\n getTriggers,\n type ApPiece,\n type ApProperty,\n type ApPropertyType,\n type ApDropdownOption,\n type ApPropertyGroup,\n type ApTrigger,\n type ApTriggerStrategy,\n} from \"./types.js\";\nimport {\n unsupportedAuth,\n unsupportedTrigger,\n type UnsupportedFeature,\n} from \"./unsupported.js\";\n\nexport interface PiecePropDescriptor {\n name: string;\n displayName: string;\n description?: string;\n placeholder?: string;\n type: ApPropertyType;\n required: boolean;\n defaultValue?: unknown;\n // STATIC_DROPDOWN choices, extracted so the editor needs no runtime call.\n staticOptions?: ApDropdownOption[];\n // True when the prop carries a design-time resolver (DROPDOWN options() / DYNAMIC props()).\n hasDynamicResolver: boolean;\n // Synthesised domain-provider id: activepieces:<pkg>#<action>.<prop> (doc 08 §6.3).\n // Only top-level props get one; nested resolvers are not addressable yet.\n dynamicResolverId?: string;\n // Sibling prop names whose values feed the resolver; the editor re-runs\n // it when any of them changes.\n refreshers?: string[];\n // Nested shape: an ARRAY item's fields, or the props a DYNAMIC resolver\n // produced (see describeProperties). OBJECT props are free-form and carry none.\n properties?: PiecePropDescriptor[];\n // Activepieces' layout hint: rendered in the collapsed advanced section.\n advanced?: boolean;\n // Layout and control hints (see describeHints); absent when not declared.\n width?: \"half\" | \"full\";\n icon?: string;\n reveals?: string[];\n variant?: string;\n display?: string;\n min?: number;\n max?: number;\n step?: number;\n refreshOnSearch?: boolean;\n formatProperty?: string;\n // A STATIC_DROPDOWN's own state, beside its options.\n staticDisabled?: boolean;\n staticPlaceholder?: string;\n}\n\nexport interface PiecePropertyGroupDescriptor {\n key: string;\n display: string;\n label?: string;\n description?: string;\n icon?: string;\n props: string[];\n}\n\nexport interface PieceErrorHandlingDescriptor {\n retryOnFailure?: { defaultValue?: boolean; hide?: boolean };\n continueOnFailure?: { defaultValue?: boolean; hide?: boolean };\n}\n\nexport interface PieceActionDescriptor {\n name: string;\n displayName: string;\n description?: string;\n // UI metadata only — not a credential contract (spike finding).\n requireAuth: boolean;\n props: PiecePropDescriptor[];\n // Carried verbatim: it is what the expression picker builds a later step's\n // field list from, and a package piece has no published listing to read.\n outputSchema?: unknown;\n // Orders the action picker, so a package piece that declares it must be\n // ordered by it too rather than counting as unset.\n audience?: string;\n propertyGroups?: PiecePropertyGroupDescriptor[];\n classification?: string;\n errorHandlingOptions?: PieceErrorHandlingDescriptor;\n}\n\nexport interface PieceTriggerDescriptor {\n name: string;\n displayName: string;\n description?: string;\n strategy: ApTriggerStrategy;\n testStrategy?: string;\n requireAuth: boolean;\n props: PiecePropDescriptor[];\n propertyGroups?: PiecePropertyGroupDescriptor[];\n outputSchema?: unknown;\n hasSampleData: boolean;\n // The sample itself, not just whether there is one: a trigger that declares\n // no outputSchema is read for its shape instead.\n sampleData?: unknown;\n // How the sender proves the endpoint exists before it will register it.\n // Absent when the trigger declares no handshake, or declares NONE.\n handshake?: { strategy: string; paramName?: string };\n // A trigger feature the engine cannot run; the piece's own is on the piece.\n unsupported?: UnsupportedFeature;\n}\n\nexport interface PieceAuthDescriptor {\n type: ApPropertyType;\n displayName?: string;\n description?: string;\n required?: boolean;\n // CUSTOM_AUTH's own fields. Without them a connection form has nothing to\n // ask for, which is what a piece read from a package rather than a published\n // listing would otherwise leave the editor with.\n props?: PiecePropDescriptor[];\n // Set when this engine can't sign in this way (OAuth2, for one).\n unsupported?: UnsupportedFeature;\n}\n\n// NONE is how the framework spells \"no handshake\", so it is not carried:\n// a caller checking the field would otherwise have to know that too.\nfunction describeHandshake(\n trigger: ApTrigger,\n): { strategy: string; paramName?: string } | undefined {\n const strategy = trigger.handshakeConfiguration?.strategy;\n if (!strategy || strategy === \"NONE\") return undefined;\n return { strategy, paramName: trigger.handshakeConfiguration?.paramName };\n}\n\nexport interface PieceSource {\n packageName: string;\n version: string;\n}\n\n// Serializable descriptor of an adapted piece; the engine never learns\n// Activepieces exists (doc 08 §6.2).\nexport interface PieceDescriptor {\n id: string;\n source: PieceSource;\n displayName: string;\n description?: string;\n logoUrl?: string;\n categories?: string[];\n deprecated?: boolean;\n // A list when the piece offers several sign-in methods.\n auth?: PieceAuthDescriptor | PieceAuthDescriptor[];\n minimumSupportedRelease?: string;\n maximumSupportedRelease?: string;\n actions: PieceActionDescriptor[];\n triggers: PieceTriggerDescriptor[];\n // Set when no block of the piece can run here, e.g. an OAuth2 piece.\n unsupported?: UnsupportedFeature;\n}\n\nfunction optional<K extends string, V>(\n key: K,\n value: V | undefined,\n): Partial<Record<K, V>> {\n return value === undefined ? {} : ({ [key]: value } as Record<K, V>);\n}\n\nexport function describeOption(option: ApDropdownOption): ApDropdownOption {\n return {\n label: option.label,\n value: option.value,\n ...(typeof option.description === \"string\" && option.description\n ? { description: option.description }\n : {}),\n ...(typeof option.icon === \"string\" && option.icon\n ? { icon: option.icon }\n : {}),\n };\n}\n\n// Copied only when well-formed: a foreign bundle may carry anything here.\nfunction describeHints(prop: ApProperty): Partial<PiecePropDescriptor> {\n const hints: Partial<PiecePropDescriptor> = {};\n if (prop.width === \"half\" || prop.width === \"full\") hints.width = prop.width;\n const strings = [\"icon\", \"variant\", \"display\", \"formatProperty\"] as const;\n for (const key of strings) {\n const value = prop[key];\n if (typeof value === \"string\" && value !== \"\") hints[key] = value;\n }\n const numbers = [\"min\", \"max\", \"step\"] as const;\n for (const key of numbers) {\n const value = prop[key];\n if (typeof value === \"number\" && Number.isFinite(value)) hints[key] = value;\n }\n if (Array.isArray(prop.reveals)) {\n const reveals = prop.reveals.filter(\n (name): name is string => typeof name === \"string\",\n );\n if (reveals.length > 0) hints.reveals = reveals;\n }\n if (prop.refreshOnSearch === true) hints.refreshOnSearch = true;\n return hints;\n}\n\nfunction describeGroups(\n groups: ApPropertyGroup[] | undefined,\n): PiecePropertyGroupDescriptor[] | undefined {\n if (!Array.isArray(groups)) return undefined;\n const described = groups\n .filter(\n (group) =>\n typeof group.key === \"string\" &&\n typeof group.display === \"string\" &&\n Array.isArray(group.props),\n )\n .map((group) => ({\n key: group.key!,\n display: group.display!,\n ...(group.label ? { label: group.label } : {}),\n ...(group.description ? { description: group.description } : {}),\n ...(group.icon ? { icon: group.icon } : {}),\n props: group.props!.filter(\n (name): name is string => typeof name === \"string\",\n ),\n }));\n return described.length > 0 ? described : undefined;\n}\n\nfunction hasResolver(prop: ApProperty): boolean {\n return typeof prop.options === \"function\" || typeof prop.props === \"function\";\n}\n\nfunction toPropDescriptor(\n name: string,\n prop: ApProperty,\n resolverId?: string,\n): PiecePropDescriptor {\n const dynamic = hasResolver(prop);\n const descriptor: PiecePropDescriptor = {\n name,\n displayName: prop.displayName ?? name,\n type: prop.type ?? \"UNKNOWN\",\n required: prop.required ?? false,\n hasDynamicResolver: dynamic,\n };\n if (typeof prop.description === \"string\" && prop.description !== \"\") {\n descriptor.description = prop.description;\n }\n if (typeof prop.placeholder === \"string\" && prop.placeholder !== \"\") {\n descriptor.placeholder = prop.placeholder;\n }\n if (prop.defaultValue !== undefined) {\n descriptor.defaultValue = prop.defaultValue;\n }\n if (prop.advanced === true) descriptor.advanced = true;\n if (dynamic && resolverId) {\n descriptor.dynamicResolverId = resolverId;\n }\n if (dynamic && Array.isArray(prop.refreshers)) {\n descriptor.refreshers = prop.refreshers.filter(\n (entry): entry is string => typeof entry === \"string\",\n );\n }\n if (typeof prop.options === \"object\" && Array.isArray(prop.options.options)) {\n descriptor.staticOptions = prop.options.options.map(describeOption);\n if (prop.options.disabled === true) descriptor.staticDisabled = true;\n if (typeof prop.options.placeholder === \"string\") {\n descriptor.staticPlaceholder = prop.options.placeholder;\n }\n }\n Object.assign(descriptor, describeHints(prop));\n if (prop.properties && typeof prop.properties === \"object\") {\n const nested = describeProperties(prop.properties);\n if (nested.length > 0) descriptor.properties = nested;\n }\n return descriptor;\n}\n\n// Descriptor list for a props map: nested ARRAY items and what a DYNAMIC\n// resolver returns, so the editor never sees raw piece properties.\nexport function describeProperties(\n props: Record<string, ApProperty> | null | undefined,\n resolverIdFor?: (propName: string) => string,\n): PiecePropDescriptor[] {\n if (!props || typeof props !== \"object\") return [];\n return Object.entries(props)\n .filter((entry): entry is [string, ApProperty] =>\n isPropertyObject(entry[1]),\n )\n .map(([propName, prop]) =>\n toPropDescriptor(propName, prop, resolverIdFor?.(propName)),\n );\n}\n\n// Bundles are duck-typed; a props map may carry non-object junk.\nfunction isPropertyObject(value: unknown): value is ApProperty {\n return value !== null && typeof value === \"object\";\n}\n\nfunction withUnsupported(feature: UnsupportedFeature | undefined): {\n unsupported?: UnsupportedFeature;\n} {\n return feature ? { unsupported: feature } : {};\n}\n\n// Pure translation over a loaded piece; performs no I/O and never executes\n// piece code beyond the actions()/triggers() accessors.\nfunction describeAuthMethod(auth: unknown): PieceAuthDescriptor | undefined {\n if (!auth || typeof auth !== \"object\") return undefined;\n const method = auth as ApProperty;\n // CUSTOM_AUTH carries a record here; a DYNAMIC prop would carry a\n // resolver function, which is not an auth shape at all.\n const props =\n method.props && typeof method.props === \"object\"\n ? describeProperties(method.props)\n : [];\n return {\n type: method.type ?? \"UNKNOWN\",\n displayName: method.displayName,\n description: method.description,\n required: method.required,\n ...(props.length > 0 ? { props } : {}),\n ...withUnsupported(unsupportedAuth(method)),\n };\n}\n\nexport function buildDescriptor(\n piece: ApPiece,\n source: PieceSource,\n): PieceDescriptor {\n const actions = Object.entries(getActions(piece)).map(\n ([actionName, action]): PieceActionDescriptor => ({\n name: action.name ?? actionName,\n displayName: action.displayName ?? actionName,\n description: action.description,\n requireAuth: action.requireAuth ?? false,\n props: describeProperties(\n action.props,\n (propName) =>\n `activepieces:${source.packageName}#${actionName}.${propName}`,\n ),\n ...(action.outputSchema !== undefined\n ? { outputSchema: action.outputSchema }\n : {}),\n ...(action.audience !== undefined ? { audience: action.audience } : {}),\n ...optional(\"propertyGroups\", describeGroups(action.propertyGroups)),\n ...optional(\n \"classification\",\n typeof action.classification === \"string\"\n ? action.classification\n : undefined,\n ),\n ...optional(\"errorHandlingOptions\", action.errorHandlingOptions),\n }),\n );\n\n const triggers = Object.entries(getTriggers(piece)).map(\n ([triggerName, trigger]): PieceTriggerDescriptor => ({\n name: trigger.name ?? triggerName,\n displayName: trigger.displayName ?? triggerName,\n description: trigger.description,\n strategy: trigger.type ?? \"UNKNOWN\",\n testStrategy: trigger.testStrategy,\n requireAuth: trigger.requireAuth ?? false,\n props: describeProperties(\n trigger.props,\n (propName) =>\n `activepieces:${source.packageName}#${triggerName}.${propName}`,\n ),\n ...(trigger.outputSchema !== undefined\n ? { outputSchema: trigger.outputSchema }\n : {}),\n hasSampleData:\n trigger.sampleData !== undefined && trigger.sampleData !== null,\n ...(trigger.sampleData !== undefined && trigger.sampleData !== null\n ? { sampleData: trigger.sampleData }\n : {}),\n handshake: describeHandshake(trigger),\n ...optional(\"propertyGroups\", describeGroups(trigger.propertyGroups)),\n ...withUnsupported(unsupportedTrigger(trigger)),\n }),\n );\n\n const descriptor: PieceDescriptor = {\n id: `activepieces:${source.packageName}`,\n source,\n displayName: piece.displayName,\n description: piece.description,\n logoUrl: piece.logoUrl,\n categories: piece.categories,\n ...(piece.deprecated === true ? { deprecated: true } : {}),\n minimumSupportedRelease: piece.minimumSupportedRelease,\n maximumSupportedRelease: piece.maximumSupportedRelease,\n actions,\n triggers,\n ...withUnsupported(unsupportedAuth(piece.auth)),\n };\n // Several methods stay a list, in the piece's order; each says whether this\n // engine can run it.\n if (Array.isArray(piece.auth)) {\n const methods = piece.auth\n .map(describeAuthMethod)\n .filter((method) => method !== undefined);\n if (methods.length > 0) descriptor.auth = methods;\n } else {\n const method = describeAuthMethod(piece.auth);\n if (method) descriptor.auth = method;\n }\n return descriptor;\n}\n"],"mappings":";;;;;;AAeA,SAAgB,aAAa,UAA0B;CACrD,MAAM,MAAM,aAAa,KAAK,KAAK,UAAU,cAAc,GAAG,MAAM;CACpE,MAAM,MAAM,KAAK,MAAM,GAAG;CAK1B,MAAM,YAAY,IAAI,UAAU;CAChC,MAAM,aAAqC,CAAC;CAC5C,IAAI,OAAO,cAAc,UAAU,WAAW,KAAK,SAAS;CAC5D,IAAI,aAAa,OAAO,cAAc,UAAU;EAC9C,MAAM,OAAO;EACb,KAAK,MAAM,OAAO;GAAC;GAAU;GAAW;EAAS,GAAG;GAClD,MAAM,QAAQ,KAAK;GACnB,IAAI,OAAO,UAAU,UAAU,WAAW,KAAK,KAAK;EACtD;CACF;CACA,WAAW,KAAK,IAAI,MAAM,IAAI,QAAQ,gBAAgB,YAAY,SAAS;CAG3E,MAAM,OAAO,aAAa,QAAQ;CAClC,MAAM,cAAc,OAAO,KAAK;CAChC,KAAK,MAAM,aAAa,YAAY;EAClC,IAAI,CAAC,WAAW;EAChB,MAAM,MAAM,KAAK,QAAQ,UAAU,SAAS;EAC5C,IAAI;EACJ,IAAI;GACF,OAAO,aAAa,GAAG;EACzB,QAAQ;GACN;EACF;EACA,IAAI,SAAS,QAAQ,CAAC,KAAK,WAAW,WAAW,GAAG;EACpD,OAAO;CACT;CACA,MAAM,IAAI,MAAM,2CAA2C,UAAU;AACvE;AAEA,SAAS,SAAS,OAAkD;CAClE,OAAO,OAAO,UAAU,YAAY,UAAU;AAChD;AAIA,SAAS,UACP,KACkD;CAClD,MAAM,aAAwB;EAC5B,GAAG,OAAO,OAAO,GAAG;EACpB,GAAI,SAAS,IAAI,OAAO,IAAI,OAAO,OAAO,IAAI,OAAO,IAAI,CAAC;EAC1D,IAAI;CACN;CACA,KAAK,MAAM,aAAa,YAGtB,IAAI,SAAS,SAAS,KAAK,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