@uipath/flow-tool
Advanced tools
| import { | ||
| OutputFormatter, | ||
| RESULTS, | ||
| getOutputFormat, | ||
| getOutputFormatExplicit, | ||
| processContext | ||
| } from "./packager-tool-p1ts5b0h.js"; | ||
| import { | ||
| getFileSystem | ||
| } from "./packager-tool-1cb0d5e0.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| // ../builder-sdk/src/argv.ts | ||
| function addValue(argv, flag, value) { | ||
| if (typeof value === "string") { | ||
| argv.push(flag, value); | ||
| } | ||
| } | ||
| // ../builder-sdk/src/delegate.ts | ||
| import { spawn } from "node:child_process"; | ||
| import { createRequire } from "node:module"; | ||
| var MINIMUM_FLOW_SDK_VERSION = "1.1.0"; | ||
| function commandLabel(family, verb) { | ||
| return `uip maestro ${family} ${verb}`; | ||
| } | ||
| function fail(message, instructions) { | ||
| OutputFormatter.error({ | ||
| Result: RESULTS.Failure, | ||
| Message: message, | ||
| Instructions: instructions | ||
| }); | ||
| return 1; | ||
| } | ||
| function parseVersion(version) { | ||
| const match = /^(\d+)\.(\d+)\.(\d+)(-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/.exec(version); | ||
| if (!match) | ||
| return null; | ||
| return [ | ||
| Number(match[1]), | ||
| Number(match[2]), | ||
| Number(match[3]), | ||
| match[4] !== undefined | ||
| ]; | ||
| } | ||
| function versionMeetsFloor(version, floor) { | ||
| const installed = parseVersion(version); | ||
| const minimum = parseVersion(floor); | ||
| if (!installed || !minimum) | ||
| return false; | ||
| for (let index = 0;index < 3; index++) { | ||
| if (installed[index] !== minimum[index]) { | ||
| return installed[index] > minimum[index]; | ||
| } | ||
| } | ||
| return !installed[3] || minimum[3]; | ||
| } | ||
| async function runChild(cliPath, args, cwd, label) { | ||
| return await new Promise((resolve) => { | ||
| const child = spawn("node", [cliPath, ...args], { | ||
| cwd, | ||
| env: process.env, | ||
| stdio: "inherit" | ||
| }); | ||
| child.once("error", (error) => { | ||
| resolve(fail(`${label}: ${error.message}`, "Check that node is on PATH, then retry.")); | ||
| }); | ||
| child.once("exit", (code, signal) => { | ||
| if (code !== null) { | ||
| resolve(code); | ||
| return; | ||
| } | ||
| resolve(fail(`${label}: SDK process ended with signal ${signal ?? "unknown"}.`, "Retry the command.")); | ||
| }); | ||
| }); | ||
| } | ||
| async function delegateToFlowSdk({ | ||
| family, | ||
| commandVerb, | ||
| sdkVerb = commandVerb, | ||
| argv, | ||
| cwd | ||
| }) { | ||
| const fs = getFileSystem(); | ||
| const workspace = cwd ?? fs.env.cwd(); | ||
| const label = commandLabel(family, commandVerb); | ||
| let packagePath; | ||
| try { | ||
| packagePath = createRequire(import.meta.url).resolve("@uipath/flow-sdk/package.json", { paths: [workspace] }); | ||
| } catch { | ||
| return fail(`${label}: @uipath/flow-sdk is not installed in this workspace.`, "Add it to this project's dependencies: npm install --save-dev @uipath/flow-sdk (requires an .npmrc routing @uipath to https://npm.pkg.github.com/)."); | ||
| } | ||
| const packageText = await fs.readFile(packagePath, "utf-8"); | ||
| if (packageText === null) { | ||
| return fail(`${label}: could not read ${packagePath}.`, "Reinstall @uipath/flow-sdk, then retry."); | ||
| } | ||
| let version; | ||
| try { | ||
| const parsed = JSON.parse(packageText); | ||
| version = typeof parsed.version === "string" ? parsed.version : ""; | ||
| } catch { | ||
| version = ""; | ||
| } | ||
| if (!versionMeetsFloor(version, MINIMUM_FLOW_SDK_VERSION)) { | ||
| return fail(`${label}: found @uipath/flow-sdk ${version || "with no valid version"}; need >= ${MINIMUM_FLOW_SDK_VERSION}.`, "Run: npm install --save-dev @uipath/flow-sdk@latest."); | ||
| } | ||
| const cliPath = fs.path.join(fs.path.dirname(packagePath), "dist", "cli", "index.js"); | ||
| return await runChild(cliPath, [family, sdkVerb, ...argv], workspace, label); | ||
| } | ||
| // ../builder-sdk/src/examples.ts | ||
| function sdkCliExample(description, command, message) { | ||
| return [ | ||
| { | ||
| Description: description, | ||
| Command: command, | ||
| Output: { | ||
| Code: "SdkCliOutput", | ||
| Data: { Message: message } | ||
| } | ||
| } | ||
| ]; | ||
| } | ||
| // ../builder-sdk/src/commands/check.ts | ||
| var CHECK_EXAMPLES = { | ||
| flow: { input: "Order.flow.ts", message: "✓ no issues" }, | ||
| case: { input: "Claims.case.ts", message: "check: OK" }, | ||
| bpmn: { input: "Approval.bpmn.ts", message: "check: ok." } | ||
| }; | ||
| var registerCheckCommand = (program, family) => { | ||
| const command = program.previewCommand("check <input>").description("Run the authoring-time SDK analyzer on source or an artifact.").option("--source", "Check authored TypeScript").option("--compiled", "Check the compiled artifact"); | ||
| if (family === "flow") { | ||
| command.option("--library <dir>", "Connector library directory (source checks also honor $FLOW_SDK_LIBRARY_JSON)").option("--json", "Print compiled-check diagnostics as JSON").option("--uip", "Resolve missing schemas with the UiPath CLI").option("--max-errors <count>", "Stop after this many compiled-check errors").option("--script-determinism", "Check script blocks for non-deterministic calls").option("--quiet", "Suppress warnings and information"); | ||
| } | ||
| const example = CHECK_EXAMPLES[family]; | ||
| command.examples(sdkCliExample(`Check a ${family} source file before compiling it`, `uip maestro ${family} check ${example.input} --source`, example.message)).trackedAction(processContext, async (input, options) => { | ||
| const argv = [input]; | ||
| if (options.source) | ||
| argv.push("--source"); | ||
| if (options.compiled) | ||
| argv.push("--compiled"); | ||
| addValue(argv, "--library", options.library); | ||
| if (options.json || getOutputFormatExplicit() && getOutputFormat() === "json") | ||
| argv.push("--json"); | ||
| if (options.uip) | ||
| argv.push("--uip"); | ||
| addValue(argv, "--max-errors", options.maxErrors); | ||
| if (options.scriptDeterminism) | ||
| argv.push("--script-determinism"); | ||
| if (options.quiet) | ||
| argv.push("--quiet"); | ||
| const code = await delegateToFlowSdk({ | ||
| family, | ||
| commandVerb: "check", | ||
| argv | ||
| }); | ||
| if (code !== 0) | ||
| processContext.exit(code); | ||
| }); | ||
| }; | ||
| // ../builder-sdk/src/commands/compile.ts | ||
| var COMPILE_EXAMPLES = { | ||
| flow: { | ||
| source: "Order.flow.ts", | ||
| output: "Order.flow", | ||
| message: "compile: wrote Order.flow (3 nodes, 2 edges)" | ||
| }, | ||
| case: { | ||
| source: "Claims.case.ts", | ||
| output: "caseplan.json", | ||
| message: "compile: wrote caseplan.json (3 stage(s))" | ||
| }, | ||
| bpmn: { | ||
| source: "Approval.bpmn.ts", | ||
| output: "Approval.bpmn", | ||
| message: "compile: wrote Approval.bpmn (4 element(s))" | ||
| } | ||
| }; | ||
| var registerCompileCommand = (program, family) => { | ||
| const command = program.previewCommand("compile <source>").description(`Compile authored TypeScript to a ${family} artifact.`).option("-o, --output <file>", "Output artifact path").option("--library <dir>", "Connector library directory").option("--bindings <file>", "bindings.json path"); | ||
| if (family !== "bpmn") { | ||
| command.option("--connectors-local <dir>", "Connection-resolved connector overlay"); | ||
| } | ||
| if (family === "flow") { | ||
| command.option("--no-check", "Skip the source-level check"); | ||
| } | ||
| const example = COMPILE_EXAMPLES[family]; | ||
| command.examples(sdkCliExample(`Compile a ${family} source file to an artifact`, `uip maestro ${family} compile ${example.source} --output ${example.output}`, example.message)).trackedAction(processContext, async (source, options) => { | ||
| const argv = [source]; | ||
| addValue(argv, "-o", options.output); | ||
| addValue(argv, "--library", options.library); | ||
| addValue(argv, "--bindings", options.bindings); | ||
| addValue(argv, "--connectors-local", options.connectorsLocal); | ||
| if (options.check === false) | ||
| argv.push("--no-check"); | ||
| const code = await delegateToFlowSdk({ | ||
| family, | ||
| commandVerb: "compile", | ||
| argv | ||
| }); | ||
| if (code !== 0) | ||
| processContext.exit(code); | ||
| }); | ||
| }; | ||
| // ../builder-sdk/src/commands/decompile.ts | ||
| var DECOMPILE_EXAMPLES = { | ||
| flow: { | ||
| input: "Order.flow", | ||
| output: "Order.flow.ts", | ||
| message: "flow-decompile: wrote Order.flow.ts" | ||
| }, | ||
| case: { | ||
| input: "caseplan.json", | ||
| output: "Claims.case.ts", | ||
| message: "decompile: wrote Claims.case.ts" | ||
| } | ||
| }; | ||
| var registerDecompileCommand = (program, family) => { | ||
| const command = program.previewCommand("decompile <input>").description(`Convert a ${family === "flow" ? ".flow" : "caseplan.json"} artifact to authored TypeScript.`).option("-o, --output <file>", `Output ${family === "flow" ? ".flow.ts" : ".case.ts"} path`).option("--import <specifier>", "SDK import specifier in generated source"); | ||
| if (family === "flow") { | ||
| command.option("--strict", "Fail on unsupported constructs").option("--no-pipeline", "Do not emit a brownfield pipeline helper"); | ||
| } | ||
| const example = DECOMPILE_EXAMPLES[family]; | ||
| command.examples(sdkCliExample(`Convert a ${family} artifact back to authored TypeScript`, `uip maestro ${family} decompile ${example.input} --output ${example.output}`, example.message)).trackedAction(processContext, async (input, options) => { | ||
| const argv = [input]; | ||
| addValue(argv, "-o", options.output); | ||
| addValue(argv, "--import", options.import); | ||
| if (options.strict) | ||
| argv.push("--strict"); | ||
| if (options.pipeline === false) | ||
| argv.push("--no-pipeline"); | ||
| const code = await delegateToFlowSdk({ | ||
| family, | ||
| commandVerb: "decompile", | ||
| argv | ||
| }); | ||
| if (code !== 0) | ||
| processContext.exit(code); | ||
| }); | ||
| }; | ||
| // ../builder-sdk/src/commands/merge.ts | ||
| var registerMergeCommand = (program) => { | ||
| program.previewCommand("merge <original> <edited>").description("Merge an edited flow with its original artifact.").option("-o, --output <file>", "Merged output path").option("--baseline <file>", "Compiled pristine decompile").examples(sdkCliExample("Merge edited authored content into the original Flow artifact", "uip maestro flow merge Original.flow Edited.flow --output Merged.flow --baseline Baseline.flow", "flow-merge: wrote Merged.flow (3 nodes, 2 edges)")).trackedAction(processContext, async (original, edited, options) => { | ||
| const argv = [original, edited]; | ||
| addValue(argv, "-o", options.output); | ||
| addValue(argv, "--baseline", options.baseline); | ||
| const code = await delegateToFlowSdk({ | ||
| family: "flow", | ||
| commandVerb: "merge", | ||
| argv | ||
| }); | ||
| if (code !== 0) | ||
| processContext.exit(code); | ||
| }); | ||
| }; | ||
| // src/commands/authoring.ts | ||
| var registerFlowAuthoringCommands = (program) => { | ||
| registerCompileCommand(program, "flow"); | ||
| registerCheckCommand(program, "flow"); | ||
| registerDecompileCommand(program, "flow"); | ||
| registerMergeCommand(program); | ||
| }; | ||
| export { | ||
| registerFlowAuthoringCommands | ||
| }; | ||
| //# debugId=6AF445E2C0B26FAF64756E2164756E21 |
| import { | ||
| getGlobalThis | ||
| } from "./packager-tool-9qecd4wb.js"; | ||
| import { | ||
| AUTH_CANCELLED_ERROR_CODE | ||
| } from "./packager-tool-5arsyj36.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| // ../auth/src/strategies/browser-strategy.ts | ||
| class BrowserAuthStrategy { | ||
| async execute(url, _redirectUri, expectedState, opts) { | ||
| const global = getGlobalThis(); | ||
| if (!global?.window) { | ||
| throw new Error("Browser environment required for authentication"); | ||
| } | ||
| const screenWidth = global.window.screen?.width ?? 1024; | ||
| const screenHeight = global.window.screen?.height ?? 768; | ||
| const width = 600; | ||
| const height = 700; | ||
| const left = screenWidth / 2 - width / 2; | ||
| const top = screenHeight / 2 - height / 2; | ||
| if (!global.window.open) { | ||
| throw new Error("window.open is not available"); | ||
| } | ||
| const popupResult = global.window.open(url, "uip_auth", `width=${width},height=${height},left=${left},top=${top},resizable=yes,scrollbars=yes,status=yes`); | ||
| const popup = popupResult; | ||
| if (!popup) { | ||
| throw new Error(`Authentication popup was blocked by your browser. | ||
| ` + `To continue: | ||
| ` + `1. Look for a popup blocker icon in your address bar | ||
| ` + `2. Allow popups for this site | ||
| ` + `3. Try logging in again | ||
| ` + "If using an ad blocker, you may need to temporarily disable it."); | ||
| } | ||
| return new Promise((resolve, reject) => { | ||
| let timer; | ||
| const messageHandler = (event) => { | ||
| if (event.data?.type === "UIP_AUTH_CODE" && event.data.code) { | ||
| if (event.data.state !== expectedState) { | ||
| cleanup(); | ||
| reject(new Error("OAuth state mismatch — the callback state does not match the expected value. " + "This may indicate a CSRF attack. Please try signing in again.")); | ||
| popup.close(); | ||
| return; | ||
| } | ||
| cleanup(); | ||
| resolve(event.data.code); | ||
| popup.close(); | ||
| } else if (event.data?.type === "UIP_AUTH_ERROR") { | ||
| cleanup(); | ||
| const errorMsg = event.data.error || "Authentication failed"; | ||
| reject(new Error(`Authentication failed: ${errorMsg} | ||
| ` + "Please check your credentials and try again. " + "If the problem persists, verify your UiPath account is active.")); | ||
| popup.close(); | ||
| } | ||
| }; | ||
| const cleanup = () => { | ||
| global.window?.removeEventListener?.("message", messageHandler); | ||
| opts?.signal?.removeEventListener("abort", onAbort); | ||
| if (timer) | ||
| clearInterval(timer); | ||
| }; | ||
| const onAbort = () => { | ||
| cleanup(); | ||
| const err = new Error(`Authentication was cancelled. | ||
| ` + "The sign-in was cancelled before completing the login process. " + "Please try again and complete the authentication flow."); | ||
| err.code = AUTH_CANCELLED_ERROR_CODE; | ||
| reject(err); | ||
| popup.close(); | ||
| }; | ||
| if (opts?.signal) { | ||
| if (opts.signal.aborted) { | ||
| onAbort(); | ||
| return; | ||
| } | ||
| opts.signal.addEventListener("abort", onAbort, { once: true }); | ||
| } | ||
| if (global.window?.addEventListener) { | ||
| global.window.addEventListener("message", messageHandler); | ||
| } | ||
| timer = setInterval(() => { | ||
| if (popup.closed) { | ||
| cleanup(); | ||
| reject(new Error(`Authentication was cancelled. | ||
| ` + "The authentication popup was closed before completing the login process. " + "Please try again and complete the authentication flow.")); | ||
| } | ||
| }, 1000); | ||
| }); | ||
| } | ||
| } | ||
| export { | ||
| BrowserAuthStrategy | ||
| }; | ||
| //# debugId=B13A3005E9EE6C6564756E2164756E21 |
| import { | ||
| MANAGED_HTTP_NODE_TYPE, | ||
| buildConnectorHttpRequestDetail, | ||
| createNodeVariable, | ||
| findTerminalNodes, | ||
| getCollapsedSize, | ||
| getConnectorHttpRequestKey, | ||
| getExpandedShape, | ||
| getExpandedSize, | ||
| getLatestDefinitionByNodeType, | ||
| isContainerNodeManifest, | ||
| resolveNodeOutputTypeSchema | ||
| } from "./packager-tool-h3gpqv5a.js"; | ||
| import"./packager-tool-jqtspg41.js"; | ||
| import"./packager-tool-htc0z863.js"; | ||
| import"./packager-tool-fr5b9qs6.js"; | ||
| import"./packager-tool-gbgfwx8f.js"; | ||
| import { | ||
| MINIMUM_SUPPORTED_SCHEMA_VERSION, | ||
| generateNextId, | ||
| isSubflowNodeType | ||
| } from "./packager-tool-q9zrqwxw.js"; | ||
| import { | ||
| init_esm_shims | ||
| } from "./packager-tool-ahm4ymrp.js"; | ||
| import"./packager-tool-c19w8vg9.js"; | ||
| import"./packager-tool-973f0r2g.js"; | ||
| import"./packager-tool-c23zrhj8.js"; | ||
| import { | ||
| __require | ||
| } from "./packager-tool-wckvcay0.js"; | ||
| // ../../node_modules/@uipath/flow-converter/dist/conversion-MQ7TJMHW.js | ||
| init_esm_shims(); | ||
| init_esm_shims(); | ||
| init_esm_shims(); | ||
| function getManifestKey(nodeType, version) { | ||
| return `${nodeType}:${version}`; | ||
| } | ||
| function findManifestByNodeType(map, nodeType) { | ||
| const latestDef = getLatestDefinitionByNodeType(nodeType); | ||
| if (latestDef) { | ||
| const found = map.get(getManifestKey(nodeType, latestDef.version)); | ||
| if (found) | ||
| return found; | ||
| } | ||
| for (const manifest of map.values()) { | ||
| if (manifest.nodeType === nodeType) | ||
| return manifest; | ||
| } | ||
| return; | ||
| } | ||
| function isArtifactHandle(nodeHandleId, nodeConfig) { | ||
| return Boolean(nodeHandleId && nodeConfig && nodeConfig.handleConfiguration.some((handleGroup) => handleGroup.handles.some((h) => h.id === nodeHandleId && h.handleType === "artifact"))); | ||
| } | ||
| function shouldUseArtifactEdge(source, target, manifestMap) { | ||
| const sourceNodeConfig = manifestMap.get(getManifestKey(source.type, source.version)); | ||
| const targetNodeConfig = manifestMap.get(getManifestKey(target.type, target.version)); | ||
| return Boolean(isArtifactHandle(source.sourceHandle, sourceNodeConfig) && isArtifactHandle(target.targetHandle, targetNodeConfig)); | ||
| } | ||
| function resolveEdgeType(edge, nodes, manifestMap) { | ||
| const lookup = nodes instanceof Map ? (id) => nodes.get(id) : (id) => nodes.find((n) => n.id === id); | ||
| const sourceNode = lookup(edge.source); | ||
| const targetNode = lookup(edge.target); | ||
| if (sourceNode && targetNode) { | ||
| const isArtifact = shouldUseArtifactEdge({ type: sourceNode.data.type, version: sourceNode.data.typeVersion, sourceHandle: edge.sourceHandle }, { type: targetNode.data.type, version: targetNode.data.typeVersion, targetHandle: edge.targetHandle }, manifestMap); | ||
| if (isArtifact) { | ||
| return { ...edge, type: "artifact" }; | ||
| } | ||
| } | ||
| return edge; | ||
| } | ||
| init_esm_shims(); | ||
| function edgeToInstance(edge) { | ||
| const edgeData = {}; | ||
| if (edge.data?.label) { | ||
| edgeData.label = edge.data.label; | ||
| } | ||
| return { | ||
| id: edge.id, | ||
| sourceNodeId: edge.source, | ||
| sourcePort: edge.sourceHandle || "default", | ||
| targetNodeId: edge.target, | ||
| targetPort: edge.targetHandle || "default", | ||
| ...Object.keys(edgeData).length > 0 && { data: edgeData } | ||
| }; | ||
| } | ||
| function instanceToEdge(instance, type = "default") { | ||
| return { | ||
| id: instance.id, | ||
| source: instance.sourceNodeId, | ||
| sourceHandle: instance.sourcePort, | ||
| target: instance.targetNodeId, | ||
| targetHandle: instance.targetPort, | ||
| type, | ||
| ...instance.data && { data: instance.data } | ||
| }; | ||
| } | ||
| function nodeToInstance(node, offset = { x: 0, y: 0 }) { | ||
| const typeVersion = node.data?.typeVersion || "1.0.0"; | ||
| const display = node.data?.display || {}; | ||
| const inputs = node.data?.inputs || {}; | ||
| const ui = node.data?.ui || {}; | ||
| const width = node.width ?? node.measured?.width; | ||
| const height = node.height ?? node.measured?.height; | ||
| const variableUpdates = node.data?.variableUpdates; | ||
| const parentId = node.data?.parentId; | ||
| const allOutputs = node.data?.outputs; | ||
| const instanceOutputs = allOutputs ? Object.fromEntries(Object.entries(allOutputs).filter(([, def]) => def?.source != null)) : undefined; | ||
| return { | ||
| id: node.id, | ||
| type: node.type, | ||
| typeVersion, | ||
| ui: { | ||
| ...ui, | ||
| position: { | ||
| x: (node.position?.x ?? 0) - offset.x, | ||
| y: (node.position?.y ?? 0) - offset.y | ||
| }, | ||
| ...width && height ? { size: { width, height } } : {} | ||
| }, | ||
| display, | ||
| inputs: { | ||
| ...inputs, | ||
| ...node.data?.color !== undefined && { color: node.data.color }, | ||
| ...node.data?.content !== undefined && { content: node.data.content } | ||
| }, | ||
| ...instanceOutputs && Object.keys(instanceOutputs).length > 0 && { outputs: instanceOutputs }, | ||
| ...variableUpdates && variableUpdates.length > 0 && { variableUpdates }, | ||
| ...parentId && { parentId } | ||
| }; | ||
| } | ||
| function instanceToNode(instance, offset = { x: 0, y: 0 }) { | ||
| const position = instance.ui?.position ?? { x: 0, y: 0 }; | ||
| const color = instance.inputs?.color; | ||
| const content = instance.inputs?.content; | ||
| const variableUpdates = instance.variableUpdates; | ||
| return { | ||
| id: instance.id, | ||
| type: instance.type, | ||
| position: { | ||
| x: position.x + offset.x, | ||
| y: position.y + offset.y | ||
| }, | ||
| ...instance.ui?.size && { | ||
| width: instance.ui.size.width, | ||
| height: instance.ui.size.height | ||
| }, | ||
| data: { | ||
| type: instance.type, | ||
| typeVersion: instance.typeVersion, | ||
| display: instance.display || {}, | ||
| inputs: instance.inputs || {}, | ||
| ui: instance.ui || {}, | ||
| ...color !== undefined && { color }, | ||
| ...content !== undefined && { content }, | ||
| ...variableUpdates && variableUpdates.length > 0 && { variableUpdates }, | ||
| ...instance.parentId && { parentId: instance.parentId } | ||
| } | ||
| }; | ||
| } | ||
| init_esm_shims(); | ||
| init_esm_shims(); | ||
| function createBinding(options) { | ||
| return { | ||
| id: generateNextId("b", 8), | ||
| name: options.name, | ||
| type: "string", | ||
| resource: options.resource, | ||
| resourceKey: options.resourceKey ?? options.resource, | ||
| ...options.value && { default: options.value }, | ||
| ...options.propertyAttribute && { propertyAttribute: options.propertyAttribute }, | ||
| ...options.resourceSubType && { resourceSubType: options.resourceSubType } | ||
| }; | ||
| } | ||
| function createBindingsFromManifest(manifest) { | ||
| const model = manifest.model; | ||
| const bindingsTemplate = model?.bindings; | ||
| if (!bindingsTemplate?.values) | ||
| return []; | ||
| return bindingsTemplate.values.map((v) => createBinding({ | ||
| name: v.name, | ||
| value: v.default ?? "", | ||
| resource: bindingsTemplate.resource, | ||
| resourceKey: bindingsTemplate.resourceKey, | ||
| propertyAttribute: v.propertyAttribute, | ||
| resourceSubType: bindingsTemplate.resourceSubType | ||
| })); | ||
| } | ||
| init_esm_shims(); | ||
| init_esm_shims(); | ||
| var DEFAULT_TRIGGER_POSITION = { x: 256, y: 144 }; | ||
| init_esm_shims(); | ||
| init_esm_shims(); | ||
| init_esm_shims(); | ||
| init_esm_shims(); | ||
| init_esm_shims(); | ||
| var ARTIFACT_GROUP_SPACING = 96; | ||
| var ARTIFACT_HORIZONTAL_SPACING = ARTIFACT_GROUP_SPACING / 2; | ||
| init_esm_shims(); | ||
| init_esm_shims(); | ||
| var connectorHttpRequestProcessor = (definition, ctx) => { | ||
| const connectorKey = getConnectorHttpRequestKey(definition); | ||
| if (!connectorKey) | ||
| return; | ||
| const managed = ctx.getManifest(MANAGED_HTTP_NODE_TYPE); | ||
| if (!managed) | ||
| return; | ||
| return { | ||
| nodeType: managed.nodeType, | ||
| manifest: { | ||
| ...managed, | ||
| display: { | ||
| ...managed.display, | ||
| icon: definition.display?.icon ?? managed.display?.icon | ||
| }, | ||
| inputDefaults: { ...managed.inputDefaults, detail: buildConnectorHttpRequestDetail(connectorKey) } | ||
| } | ||
| }; | ||
| }; | ||
| var PROCESSORS = [connectorHttpRequestProcessor]; | ||
| function processManifest(definition, ctx) { | ||
| if (!definition) | ||
| return; | ||
| for (const processor of PROCESSORS) { | ||
| const result = processor(definition, ctx); | ||
| if (result) | ||
| return result; | ||
| } | ||
| return; | ||
| } | ||
| function resolveEffectiveManifest(rawNodeType, rawDefinition, ctx) { | ||
| const processed = processManifest(rawDefinition, ctx); | ||
| return { | ||
| nodeType: processed?.nodeType ?? rawNodeType, | ||
| manifest: processed?.manifest ?? rawDefinition | ||
| }; | ||
| } | ||
| init_esm_shims(); | ||
| var DEFAULT_ERROR_SCHEMA = { | ||
| $schema: "http://json-schema.org/draft-07/schema#", | ||
| type: "object", | ||
| required: ["code", "message", "detail", "category", "status"], | ||
| properties: { | ||
| code: { type: "string", description: "Error code as a string", descriptionKey: "subflowInterface_errorCode_description" }, | ||
| message: { type: "string", description: "High-level error message", descriptionKey: "subflowInterface_errorMessage_description" }, | ||
| detail: { type: "string", description: "Detailed error description", descriptionKey: "subflowInterface_errorDetail_description" }, | ||
| category: { type: "string", description: "Error category", descriptionKey: "subflowInterface_errorCategory_description" }, | ||
| status: { type: "integer", description: "HTTP status code", descriptionKey: "subflowInterface_errorStatus_description" } | ||
| }, | ||
| additionalProperties: false | ||
| }; | ||
| function getSubflowBaselineOutputs() { | ||
| return { | ||
| output: { type: "object" }, | ||
| error: { type: "object", schema: structuredClone(DEFAULT_ERROR_SCHEMA) } | ||
| }; | ||
| } | ||
| function buildSubflowOutputDefinition(globals) { | ||
| const properties = {}; | ||
| for (const v of globals) { | ||
| if (v.direction === "out") { | ||
| properties[v.id] = { | ||
| type: v.type || "object", | ||
| ...v.description && { description: v.description }, | ||
| ...v.schema ? v.schema : {} | ||
| }; | ||
| } | ||
| } | ||
| if (Object.keys(properties).length === 0) | ||
| return {}; | ||
| return { | ||
| output: { | ||
| type: "object", | ||
| properties | ||
| } | ||
| }; | ||
| } | ||
| function buildSubflowInputDefinition(globals) { | ||
| return globals.filter((v) => v.direction === "in"); | ||
| } | ||
| function buildSubflowPassThroughOutputDefinition(nodes, edges, manifestMap, nodeOutputsMap, subflows) { | ||
| if (nodes.length === 0) | ||
| return {}; | ||
| const terminalNodes = findTerminalNodes(nodes, edges, (n) => { | ||
| const manifest = manifestMap.get(getManifestKey(n.type, n.typeVersion)); | ||
| return manifest?.model?.type === "bpmn:StartEvent"; | ||
| }); | ||
| const terminalsWithOutputs = terminalNodes.map((n) => { | ||
| const manifest = manifestMap.get(getManifestKey(n.type, n.typeVersion)); | ||
| const manifestOutputDef = manifest?.outputDefinition; | ||
| let outputDef; | ||
| if (manifestOutputDef && Object.keys(manifestOutputDef).length > 0) { | ||
| outputDef = manifestOutputDef; | ||
| } else { | ||
| outputDef = nodeOutputsMap?.get(n.id); | ||
| if ((!outputDef || Object.keys(outputDef).length === 0) && isSubflowNodeType(n.type) && subflows) { | ||
| outputDef = computeSubflowEffectiveOutputDef(n.id, subflows, manifestMap); | ||
| } | ||
| } | ||
| if (!outputDef || Object.keys(outputDef).length === 0) | ||
| return null; | ||
| return { node: n, outputDef }; | ||
| }).filter((t) => t !== null); | ||
| if (terminalsWithOutputs.length === 0) | ||
| return {}; | ||
| const allKeys = /* @__PURE__ */ new Set; | ||
| for (const { outputDef } of terminalsWithOutputs) { | ||
| for (const key of Object.keys(outputDef)) { | ||
| allKeys.add(key); | ||
| } | ||
| } | ||
| const result = {}; | ||
| if (terminalsWithOutputs.length === 1) { | ||
| const { outputDef } = terminalsWithOutputs[0]; | ||
| for (const key of allKeys) { | ||
| result[key] = toSchemaType(outputDef[key]); | ||
| } | ||
| } else { | ||
| for (const key of allKeys) { | ||
| const properties = {}; | ||
| for (const { node, outputDef } of terminalsWithOutputs) { | ||
| if (key in outputDef) { | ||
| properties[node.id] = toSchemaType(outputDef[key]); | ||
| } | ||
| } | ||
| result[key] = { type: "object", properties }; | ||
| } | ||
| } | ||
| return result; | ||
| } | ||
| function toSchemaType(def) { | ||
| const { source: _, var: _v, ...schema } = def ?? {}; | ||
| return { type: "object", ...schema }; | ||
| } | ||
| function computeSubflowEffectiveOutputDef(subflowNodeId, subflows, manifestMap, visited) { | ||
| const seen = visited ?? /* @__PURE__ */ new Set; | ||
| if (seen.has(subflowNodeId)) | ||
| return; | ||
| seen.add(subflowNodeId); | ||
| const entry = subflows[subflowNodeId]; | ||
| if (!entry) | ||
| return; | ||
| const allGlobals = entry.variables?.globals ?? []; | ||
| const outputGlobals = allGlobals.filter((g) => g.direction === "out"); | ||
| if (outputGlobals.length > 0) { | ||
| return buildSubflowOutputDefinition(allGlobals); | ||
| } | ||
| const terminalNodes = findTerminalNodes(entry.nodes, entry.edges, (n) => { | ||
| const manifest = manifestMap.get(getManifestKey(n.type, n.typeVersion)); | ||
| return manifest?.model?.type === "bpmn:StartEvent"; | ||
| }); | ||
| const outputKeys = {}; | ||
| for (const n of terminalNodes) { | ||
| const manifest = manifestMap.get(getManifestKey(n.type, n.typeVersion)); | ||
| let outputDef = manifest?.outputDefinition; | ||
| if ((!outputDef || Object.keys(outputDef).length === 0) && isSubflowNodeType(n.type)) { | ||
| outputDef = computeSubflowEffectiveOutputDef(n.id, subflows, manifestMap, seen); | ||
| } | ||
| if (outputDef) { | ||
| for (const [key, val] of Object.entries(outputDef)) { | ||
| outputKeys[key] = val; | ||
| } | ||
| } | ||
| } | ||
| return Object.keys(outputKeys).length > 0 ? outputKeys : undefined; | ||
| } | ||
| init_esm_shims(); | ||
| var LOOP_NODE_TYPE = "core.logic.loop"; | ||
| function sanitizeNodeLabelLocal(label) { | ||
| const words = label.split(/[^a-zA-Z0-9]+/).filter(Boolean); | ||
| if (words.length === 0) | ||
| return "node"; | ||
| return words.map((word, index) => { | ||
| const lower = word.toLowerCase(); | ||
| if (index === 0) | ||
| return lower; | ||
| return lower.charAt(0).toUpperCase() + lower.slice(1); | ||
| }).join(""); | ||
| } | ||
| function lowerCaseFirstLetterLocal(str) { | ||
| if (!str) | ||
| return str; | ||
| return str.charAt(0).toLowerCase() + str.slice(1); | ||
| } | ||
| function generateNodeIdAndNameLocal(label, existingIds) { | ||
| const baseId = lowerCaseFirstLetterLocal(sanitizeNodeLabelLocal(label).replace("createNew", "")); | ||
| let index = 1; | ||
| let candidateId = `${baseId}${index}`; | ||
| while (existingIds.has(candidateId)) { | ||
| index++; | ||
| candidateId = `${baseId}${index}`; | ||
| } | ||
| return { | ||
| id: candidateId, | ||
| displayName: label ? index > 1 ? `${label} ${index}` : label : `Node${index > 1 ? ` ${index}` : ""}` | ||
| }; | ||
| } | ||
| function resolveDefinition(manifestDef, fileDef) { | ||
| const base = manifestDef ?? fileDef; | ||
| if (!base) | ||
| return; | ||
| if (manifestDef && fileDef) { | ||
| const isInSolution = !!fileDef.model?.projectId; | ||
| if (isInSolution) { | ||
| return { | ||
| ...manifestDef, | ||
| outputDefinition: fileDef.outputDefinition ?? manifestDef.outputDefinition, | ||
| inputDefinition: structuredClone(fileDef.inputDefinition ?? manifestDef.inputDefinition ?? {}), | ||
| form: fileDef.form ?? manifestDef.form | ||
| }; | ||
| } | ||
| } | ||
| return base; | ||
| } | ||
| function getInputDefaults(manifest) { | ||
| if (manifest.inputDefaults) | ||
| return structuredClone(manifest.inputDefaults); | ||
| if (manifest.inputDefinition) | ||
| return structuredClone(manifest.inputDefinition); | ||
| return {}; | ||
| } | ||
| function mapDefinitionToNodeData(initialData, definition) { | ||
| const inputDefaults = getInputDefaults(definition); | ||
| const { canvasLabel: _strippedFromManifest, ...definitionDisplay } = definition.display; | ||
| const display = { | ||
| ...definitionDisplay, | ||
| ...initialData.display, | ||
| label: definition.display.label | ||
| }; | ||
| const syntheticInstance = { | ||
| id: typeof initialData.nodeId === "string" ? initialData.nodeId : "", | ||
| type: definition.nodeType, | ||
| typeVersion: definition.version, | ||
| ui: { position: { x: 0, y: 0 } }, | ||
| display, | ||
| inputs: inputDefaults, | ||
| loading: typeof initialData.loading === "boolean" ? initialData.loading : undefined | ||
| }; | ||
| return hydrateNodeData(syntheticInstance, definition, []); | ||
| } | ||
| function reconcileInputs(inputs, model, definition, node) { | ||
| const out = { ...inputs }; | ||
| if (out.color === undefined && node?.color !== undefined) | ||
| out.color = node.color; | ||
| if (out.content === undefined && node?.content !== undefined) | ||
| out.content = node.content; | ||
| const manifestModel = definition?.model; | ||
| if (!model && !manifestModel?.source && !manifestModel?.entryPointId) { | ||
| return out; | ||
| } | ||
| if (out.entryPointId !== undefined && typeof out.entryPointId !== "string") | ||
| delete out.entryPointId; | ||
| if (out.source !== undefined && typeof out.source !== "string") | ||
| delete out.source; | ||
| if (!out.source && typeof model?.source === "string") | ||
| out.source = model.source; | ||
| if (!out.source && manifestModel?.source) | ||
| out.source = crypto.randomUUID(); | ||
| if (!out.entryPointId && manifestModel?.entryPointId) | ||
| out.entryPointId = crypto.randomUUID(); | ||
| if (out.entryPointId && out.isDefaultEntryPoint === undefined && model?.isDefaultEntryPoint !== undefined) { | ||
| out.isDefaultEntryPoint = model.isDefaultEntryPoint; | ||
| } | ||
| return out; | ||
| } | ||
| function hydrateNodeData(node, definition, nodeVariables = [], subflowEntry, manifestMap, subflows) { | ||
| const nodeVariableOutputs = {}; | ||
| const nodeOutputs = nodeVariables.filter((v) => v.binding.nodeId === node.id); | ||
| const manifestOutputs = definition?.outputDefinition ?? {}; | ||
| const manifestDefinesOutputs = definition?.outputDefinition != null; | ||
| nodeOutputs.forEach((variable) => { | ||
| if (variable.binding.outputId) { | ||
| if (manifestDefinesOutputs && !(variable.binding.outputId in manifestOutputs)) { | ||
| return; | ||
| } | ||
| const manifestOutput = manifestOutputs[variable.binding.outputId]; | ||
| nodeVariableOutputs[variable.binding.outputId] = { | ||
| type: variable.type, | ||
| ...variable.description && { description: variable.description }, | ||
| ...variable.schema && { schema: variable.schema }, | ||
| ...manifestOutput?.scope && { scope: manifestOutput.scope }, | ||
| ...manifestOutput?.source && { source: manifestOutput.source }, | ||
| ...manifestOutput?.var && { var: manifestOutput.var } | ||
| }; | ||
| } | ||
| }); | ||
| let subflowInputs = []; | ||
| let subflowOutputVars = []; | ||
| let subflowOutputs = subflowEntry ? getSubflowBaselineOutputs() : {}; | ||
| const hasExplicitOutputGlobals = subflowEntry?.variables?.globals?.some((g) => g.direction === "out") ?? false; | ||
| if (subflowEntry?.variables?.globals) { | ||
| subflowOutputs = { ...subflowOutputs, ...buildSubflowOutputDefinition(subflowEntry.variables.globals) }; | ||
| subflowInputs = buildSubflowInputDefinition(subflowEntry.variables.globals); | ||
| subflowOutputVars = subflowEntry.variables.globals.filter((g) => g.direction === "out"); | ||
| } | ||
| if (!hasExplicitOutputGlobals && subflowEntry && manifestMap) { | ||
| const passThrough = buildSubflowPassThroughOutputDefinition(subflowEntry.nodes, subflowEntry.edges, manifestMap, undefined, subflows); | ||
| if (Object.keys(passThrough).length > 0) { | ||
| subflowOutputs = { ...subflowOutputs, ...passThrough }; | ||
| } | ||
| } | ||
| const instanceOutputs = node.outputs ?? {}; | ||
| const effectiveOutputs = { ...manifestOutputs, ...nodeVariableOutputs, ...subflowOutputs }; | ||
| for (const [key, value] of Object.entries(instanceOutputs)) { | ||
| if (value && typeof value === "object" && effectiveOutputs[key] && typeof effectiveOutputs[key] === "object") { | ||
| effectiveOutputs[key] = { ...value, ...effectiveOutputs[key] }; | ||
| } else if (!(key in effectiveOutputs)) { | ||
| effectiveOutputs[key] = value; | ||
| } | ||
| } | ||
| const model = node.model; | ||
| const nodeInputs = reconcileInputs(node.inputs, model, definition, node); | ||
| const variableUpdates = node.variableUpdates; | ||
| const projectId = node.projectId ?? definition?.model?.projectId; | ||
| const liveIcon = manifestMap ? manifestMap.get(getManifestKey(node.type, node.typeVersion))?.display?.icon : definition?.display?.icon; | ||
| const { icon: _staleIcon, ...displayRest } = node.display ?? {}; | ||
| const display = liveIcon ? { ...displayRest, icon: liveIcon } : displayRest; | ||
| return { | ||
| nodeId: node.id, | ||
| type: node.type, | ||
| typeVersion: node.typeVersion, | ||
| display, | ||
| ui: node.ui, | ||
| ...node.ui?.collapsed !== undefined && { isCollapsed: node.ui.collapsed }, | ||
| ...Object.keys(nodeInputs).length > 0 && { inputs: nodeInputs }, | ||
| ...subflowInputs.length > 0 && { subflowInputs }, | ||
| ...subflowOutputVars.length > 0 && { subflowOutputs: subflowOutputVars }, | ||
| ...Object.keys(effectiveOutputs).length > 0 && { outputs: effectiveOutputs }, | ||
| ...hasExplicitOutputGlobals && { hasExplicitOutputGlobals }, | ||
| ...variableUpdates && { variableUpdates }, | ||
| ...node.parentId && { parentId: node.parentId }, | ||
| ...node.loading && { loading: node.loading }, | ||
| ...projectId && { projectId } | ||
| }; | ||
| } | ||
| function instanceToHydratedNode(instance, definition, options = {}) { | ||
| const base = instanceToNode(instance, options.offset); | ||
| base.data = hydrateNodeData(instance, definition, options.nodeVariables ?? [], options.subflowEntry, options.manifestMap, options.subflows); | ||
| return base; | ||
| } | ||
| function xyFlowToPackagingNode(nodes) { | ||
| return nodes.map((n) => ({ | ||
| id: n.id, | ||
| type: n.data.type, | ||
| typeVersion: n.data.typeVersion, | ||
| label: n.data.label, | ||
| name: n.data.name, | ||
| display: n.data.display, | ||
| inputs: n.data.inputs, | ||
| outputs: n.data.outputs | ||
| })); | ||
| } | ||
| function workflowToXYFlow(workflow, manifestMap) { | ||
| const definitions = workflow.definitions; | ||
| const bindings = workflow.bindings || []; | ||
| const globalVariables = workflow.variables?.globals || []; | ||
| const nodeVariables = workflow.variables?.nodes || []; | ||
| const workflowVariables = { | ||
| nodes: nodeVariables, | ||
| globals: globalVariables, | ||
| variableUpdates: workflow.variables?.variableUpdates | ||
| }; | ||
| const nodes = workflow.nodes.flatMap((node) => { | ||
| if (node.type === "stickyNote") { | ||
| return instanceToNode(node); | ||
| } | ||
| const manifestDef = manifestMap.get(getManifestKey(node.type, node.typeVersion)); | ||
| const fileDef = definitions.find((def) => def.nodeType === node.type && def.version === node.typeVersion); | ||
| const resolved = resolveDefinition(manifestDef, fileDef); | ||
| const { nodeType: effectiveType, manifest: definition } = resolveEffectiveManifest(node.type, resolved, { | ||
| getManifest: (type) => findManifestByNodeType(manifestMap, type) | ||
| }); | ||
| const effectiveNode = effectiveType === node.type ? node : { ...node, type: effectiveType, typeVersion: definition?.version ?? node.typeVersion }; | ||
| const base = instanceToHydratedNode(effectiveNode, definition, { | ||
| nodeVariables, | ||
| subflowEntry: workflow.subflows?.[node.id], | ||
| manifestMap, | ||
| subflows: workflow.subflows | ||
| }); | ||
| if (node.parentId) { | ||
| const parentNode = workflow.nodes.find((candidate) => candidate.id === node.parentId); | ||
| const parentManifestDef = parentNode ? manifestMap.get(getManifestKey(parentNode.type, parentNode.typeVersion)) : undefined; | ||
| const parentFileDef = parentNode ? definitions.find((def) => def.nodeType === parentNode.type && def.version === parentNode.typeVersion) : undefined; | ||
| const parentDefinition = resolveDefinition(parentManifestDef, parentFileDef); | ||
| if (parentNode?.type === LOOP_NODE_TYPE && isContainerNodeManifest(parentDefinition)) { | ||
| base.parentId = node.parentId; | ||
| base.extent = "parent"; | ||
| } | ||
| } | ||
| const isCollapsed = Boolean(node.ui?.collapsed); | ||
| if (isCollapsed && base.width !== undefined && base.height !== undefined) { | ||
| const collapsedSize = getCollapsedSize(); | ||
| base.width = collapsedSize.width; | ||
| base.height = collapsedSize.height; | ||
| } | ||
| return base; | ||
| }); | ||
| const orderedNodes = sortNodesParentFirst(nodes); | ||
| const edges = workflow.edges.map((connection) => resolveEdgeType(instanceToEdge(connection), orderedNodes, manifestMap)); | ||
| return { nodes: orderedNodes, edges, definitions, bindings, workflowVariables }; | ||
| } | ||
| function convertSubflowsToXYFlow(workflow, manifestMap) { | ||
| if (!workflow.subflows) | ||
| return; | ||
| const result = {}; | ||
| for (const [nodeId, entry] of Object.entries(workflow.subflows)) { | ||
| if (entry.nodes.length === 0) { | ||
| continue; | ||
| } | ||
| const converted = workflowToXYFlow({ ...workflow, nodes: entry.nodes, edges: entry.edges, variables: entry.variables }, manifestMap); | ||
| result[nodeId] = { | ||
| nodes: converted.nodes, | ||
| edges: converted.edges, | ||
| variables: converted.workflowVariables | ||
| }; | ||
| } | ||
| return Object.keys(result).length > 0 ? result : undefined; | ||
| } | ||
| function getNodeOrderParentId(node) { | ||
| return node.parentId ?? node.data?.parentId; | ||
| } | ||
| function sortNodesParentFirst(nodes) { | ||
| const nodeById = new Map(nodes.map((node) => [node.id, node])); | ||
| const childrenByParentId = /* @__PURE__ */ new Map; | ||
| for (const node of nodes) { | ||
| const parentId = getNodeOrderParentId(node); | ||
| if (!parentId || parentId === node.id || !nodeById.has(parentId)) | ||
| continue; | ||
| const children = childrenByParentId.get(parentId); | ||
| if (children) { | ||
| children.push(node); | ||
| } else { | ||
| childrenByParentId.set(parentId, [node]); | ||
| } | ||
| } | ||
| const sorted = []; | ||
| const added = /* @__PURE__ */ new Set; | ||
| const addNodeWithChildren = (node) => { | ||
| if (added.has(node.id)) | ||
| return; | ||
| added.add(node.id); | ||
| sorted.push(node); | ||
| for (const child of childrenByParentId.get(node.id) ?? []) { | ||
| addNodeWithChildren(child); | ||
| } | ||
| }; | ||
| for (const node of nodes) { | ||
| const parentId = getNodeOrderParentId(node); | ||
| if (!parentId || parentId === node.id || !nodeById.has(parentId)) { | ||
| addNodeWithChildren(node); | ||
| } | ||
| } | ||
| for (const node of nodes) { | ||
| addNodeWithChildren(node); | ||
| } | ||
| return sorted; | ||
| } | ||
| function xyFlowToWorkflow(workflowId, workflowVersion, workflowName, nodes, edges, definitions, bindings = [], variables = { nodes: [], globals: [] }, options = {}) { | ||
| const orderedNodes = sortNodesParentFirst(nodes); | ||
| const workflowNodes = orderedNodes.map((node) => { | ||
| const base = nodeToInstance(node); | ||
| const isCollapsed = Boolean(node.data.isCollapsed); | ||
| const instanceDisplay = node.data?.display || {}; | ||
| const expandedShape = getExpandedShape(instanceDisplay.shape); | ||
| const width = base.ui.size?.width; | ||
| const height = base.ui.size?.height; | ||
| const sizeValue = isCollapsed || !width || !height ? getExpandedSize(expandedShape) : { width, height }; | ||
| return { | ||
| ...base, | ||
| ui: { | ||
| ...base.ui, | ||
| collapsed: isCollapsed, | ||
| size: sizeValue | ||
| }, | ||
| display: { | ||
| ...base.display, | ||
| ...expandedShape !== undefined && { shape: expandedShape } | ||
| } | ||
| }; | ||
| }); | ||
| const workflowEdges = edges.map(edgeToInstance); | ||
| const { solutionId, projectId } = options; | ||
| const generatedVariables = generateNodeVariablesFromNodes(orderedNodes, variables, definitions); | ||
| return { | ||
| id: workflowId, | ||
| version: workflowVersion, | ||
| name: workflowName, | ||
| nodes: workflowNodes, | ||
| edges: workflowEdges, | ||
| definitions, | ||
| variables: { | ||
| ...generatedVariables.globals.length > 0 && { globals: generatedVariables.globals }, | ||
| ...generatedVariables.nodes.length > 0 && { nodes: generatedVariables.nodes }, | ||
| ...generatedVariables.variableUpdates && Object.keys(generatedVariables.variableUpdates).length > 0 && { variableUpdates: generatedVariables.variableUpdates } | ||
| }, | ||
| ...bindings && bindings.length > 0 && { bindings }, | ||
| ...solutionId && { solutionId }, | ||
| ...projectId && { projectId } | ||
| }; | ||
| } | ||
| function createWorkflowNodeFromManifest(manifest, id, position = { x: 0, y: 0 }, label) { | ||
| const node = { | ||
| id, | ||
| type: manifest.nodeType, | ||
| typeVersion: manifest.version, | ||
| ui: { position }, | ||
| display: { label: label ?? manifest.display?.label ?? id }, | ||
| inputs: getInputDefaults(manifest) | ||
| }; | ||
| if (manifest.model?.entryPointId) { | ||
| node.inputs = { ...node.inputs, entryPointId: crypto.randomUUID() }; | ||
| } | ||
| if (manifest.model?.source) { | ||
| node.inputs = { ...node.inputs, source: crypto.randomUUID() }; | ||
| } | ||
| return node; | ||
| } | ||
| function createEmptyWorkflow(id = crypto.randomUUID(), name = "Untitled Workflow", triggerManifest) { | ||
| const nodes = []; | ||
| let bindings = []; | ||
| if (triggerManifest) { | ||
| const label = triggerManifest.display?.label || triggerManifest.nodeType; | ||
| const { id: newTriggerID, displayName } = generateNodeIdAndNameLocal(label, /* @__PURE__ */ new Set); | ||
| const triggerNode = createWorkflowNodeFromManifest(triggerManifest, newTriggerID, { ...DEFAULT_TRIGGER_POSITION }, displayName); | ||
| if (triggerNode.inputs?.entryPointId) { | ||
| triggerNode.inputs.isDefaultEntryPoint = true; | ||
| } | ||
| nodes.push(triggerNode); | ||
| bindings = createBindingsFromManifest(triggerManifest); | ||
| } | ||
| return { | ||
| id, | ||
| version: MINIMUM_SUPPORTED_SCHEMA_VERSION, | ||
| name, | ||
| nodes, | ||
| edges: [], | ||
| definitions: [], | ||
| bindings | ||
| }; | ||
| } | ||
| function generateNodeVariablesFromNodes(nodes, variables, definitions = []) { | ||
| const generatedNodeVariables = []; | ||
| const contractResolvedIds = /* @__PURE__ */ new Set; | ||
| const definitionOutputs = /* @__PURE__ */ new Map; | ||
| for (const def of definitions) { | ||
| if (def.outputDefinition && Object.keys(def.outputDefinition).length > 0) { | ||
| definitionOutputs.set(def.nodeType, def.outputDefinition); | ||
| } | ||
| } | ||
| for (const node of nodes) { | ||
| const nodeOutputs = node.data?.outputs || {}; | ||
| const outputs = Object.keys(nodeOutputs).length > 0 ? nodeOutputs : definitionOutputs.get(node.type) ?? {}; | ||
| const nodeId = node.id; | ||
| for (const [outputKey, outputDef] of Object.entries(outputs)) { | ||
| if (outputDef && typeof outputDef === "object") { | ||
| const def = outputDef; | ||
| const resolved = node.type ? resolveNodeOutputTypeSchema(node.type, node.data?.inputs?.detail, outputKey) : undefined; | ||
| if (resolved) | ||
| contractResolvedIds.add(`${nodeId}.${outputKey}`); | ||
| generatedNodeVariables.push(createNodeVariable({ | ||
| nodeId, | ||
| outputId: outputKey, | ||
| type: (resolved?.jsonSchemaType ?? def.type) || "string", | ||
| subType: def.subType, | ||
| description: def.description, | ||
| schema: def.schema | ||
| })); | ||
| } | ||
| } | ||
| } | ||
| const globalVariables = variables.globals || []; | ||
| const nodeVariables = variables.nodes || []; | ||
| const nodeMap = new Map(nodes.map((n) => [n.id, n])); | ||
| const validNodeVariables = nodeVariables.filter((v) => { | ||
| const node = nodeMap.get(v.binding.nodeId); | ||
| if (!node) | ||
| return false; | ||
| if (contractResolvedIds.has(v.id)) | ||
| return false; | ||
| const nodeOutputs = node.data?.outputs || {}; | ||
| const outputs = Object.keys(nodeOutputs).length > 0 ? nodeOutputs : definitionOutputs.get(node.type) ?? {}; | ||
| return v.binding.outputId in outputs; | ||
| }); | ||
| const allNodeVariables = [...validNodeVariables, ...generatedNodeVariables.filter((g) => !validNodeVariables.some((v) => v.id === g.id))]; | ||
| const variableUpdatesMap = {}; | ||
| if (variables.variableUpdates) { | ||
| for (const [nodeId, updates] of Object.entries(variables.variableUpdates)) { | ||
| if (nodeMap.has(nodeId) && updates?.length) { | ||
| variableUpdatesMap[nodeId] = updates; | ||
| } | ||
| } | ||
| } | ||
| return { | ||
| globals: globalVariables, | ||
| nodes: allNodeVariables, | ||
| variableUpdates: variableUpdatesMap | ||
| }; | ||
| } | ||
| function applyGlobalInputOverrides(raw, inputs) { | ||
| if (!inputs || Object.keys(inputs).length === 0) | ||
| return; | ||
| const globals = raw?.variables?.globals; | ||
| if (!Array.isArray(globals)) | ||
| return; | ||
| for (const variable of globals) { | ||
| if (variable && typeof variable.id === "string" && Object.hasOwn(inputs, variable.id)) { | ||
| variable.defaultValue = inputs[variable.id]; | ||
| } | ||
| } | ||
| } | ||
| var warmSerializationChunks = () => Promise.all([import("./index-hzp6y5m7.js"), import("./serialization-JNQMGOXW-mj06e5pv.js")]); | ||
| async function flowJsonToBpmnXml(flowJson, options) { | ||
| const [{ fileFormatToInMemoryWorkflow }, { toXml }] = await warmSerializationChunks(); | ||
| const raw = JSON.parse(flowJson); | ||
| applyGlobalInputOverrides(raw, options?.inputs); | ||
| const workflow = fileFormatToInMemoryWorkflow(raw); | ||
| const manifestMap = /* @__PURE__ */ new Map; | ||
| for (const def of workflow.definitions ?? []) { | ||
| manifestMap.set(getManifestKey(def.nodeType, def.version ?? "1.0.0"), def); | ||
| } | ||
| const { nodes, edges, definitions, workflowVariables, bindings } = workflowToXYFlow(workflow, manifestMap); | ||
| return toXml(nodes, edges, definitions, bindings, workflowVariables, workflow.subflows, { | ||
| detached: options?.detached | ||
| }); | ||
| } | ||
| export { | ||
| xyFlowToWorkflow, | ||
| xyFlowToPackagingNode, | ||
| workflowToXYFlow, | ||
| warmSerializationChunks, | ||
| resolveDefinition, | ||
| reconcileInputs, | ||
| mapDefinitionToNodeData, | ||
| instanceToHydratedNode, | ||
| generateNodeVariablesFromNodes, | ||
| generateNodeIdAndNameLocal, | ||
| flowJsonToBpmnXml, | ||
| createWorkflowNodeFromManifest, | ||
| createEmptyWorkflow, | ||
| convertSubflowsToXYFlow, | ||
| applyGlobalInputOverrides | ||
| }; | ||
| //# debugId=46AEEB12B9F6F63764756E2164756E21 |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| import { | ||
| createMigration_invalidDownInput_message, | ||
| createMigration_invalidDownOutput_message, | ||
| createMigration_invalidInput_message, | ||
| createMigration_invalidOutput_message, | ||
| downgradeWorkflow_missingDown_message, | ||
| downgradeWorkflow_noPath_message, | ||
| en_default, | ||
| migrate_chain_noMigrationFound_message | ||
| } from "./packager-tool-y3dezh8k.js"; | ||
| import"./packager-tool-hk1gxnth.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| export { | ||
| migrate_chain_noMigrationFound_message, | ||
| downgradeWorkflow_noPath_message, | ||
| downgradeWorkflow_missingDown_message, | ||
| en_default as default, | ||
| createMigration_invalidOutput_message, | ||
| createMigration_invalidInput_message, | ||
| createMigration_invalidDownOutput_message, | ||
| createMigration_invalidDownInput_message | ||
| }; | ||
| //# debugId=C8D233F82FC96E3464756E2164756E21 |
| import"./packager-tool-wckvcay0.js"; | ||
| // ../../node_modules/@jmespath-community/jmespath/dist/index.mjs | ||
| var isObject = (obj) => { | ||
| return obj !== null && Object.prototype.toString.call(obj) === "[object Object]"; | ||
| }; | ||
| var strictDeepEqual = (first, second) => { | ||
| if (first === second) { | ||
| return true; | ||
| } | ||
| if (typeof first !== typeof second) { | ||
| return false; | ||
| } | ||
| if (Array.isArray(first) && Array.isArray(second)) { | ||
| if (first.length !== second.length) { | ||
| return false; | ||
| } | ||
| for (let i = 0;i < first.length; i += 1) { | ||
| if (!strictDeepEqual(first[i], second[i])) { | ||
| return false; | ||
| } | ||
| } | ||
| return true; | ||
| } | ||
| if (isObject(first) && isObject(second)) { | ||
| const firstEntries = Object.entries(first); | ||
| const secondKeys = new Set(Object.keys(second)); | ||
| if (firstEntries.length !== secondKeys.size) { | ||
| return false; | ||
| } | ||
| for (const [key, value] of firstEntries) { | ||
| if (!strictDeepEqual(value, second[key])) { | ||
| return false; | ||
| } | ||
| secondKeys.delete(key); | ||
| } | ||
| return secondKeys.size === 0; | ||
| } | ||
| return false; | ||
| }; | ||
| var isFalse = (obj) => { | ||
| if (obj === null || obj === undefined || obj === false) { | ||
| return true; | ||
| } | ||
| if (typeof obj === "string") { | ||
| return obj === ""; | ||
| } | ||
| if (typeof obj === "object") { | ||
| if (Array.isArray(obj)) { | ||
| return obj.length === 0; | ||
| } | ||
| if (obj === null) { | ||
| return true; | ||
| } | ||
| return Object.keys(obj).length === 0; | ||
| } | ||
| return false; | ||
| }; | ||
| var isAlpha = (ch) => { | ||
| return ch >= "a" && ch <= "z" || ch >= "A" && ch <= "Z" || ch === "_"; | ||
| }; | ||
| var isNum = (ch) => { | ||
| return ch >= "0" && ch <= "9" || ch === "-"; | ||
| }; | ||
| var isAlphaNum = (ch) => { | ||
| return ch >= "a" && ch <= "z" || ch >= "A" && ch <= "Z" || ch >= "0" && ch <= "9" || ch === "_"; | ||
| }; | ||
| var ensureInteger = (value) => { | ||
| if (!(typeof value === "number") || Math.floor(value) !== value) { | ||
| throw new Error("invalid-value: expecting an integer."); | ||
| } | ||
| return value; | ||
| }; | ||
| var ensurePositiveInteger = (value) => { | ||
| if (!(typeof value === "number") || value < 0 || Math.floor(value) !== value) { | ||
| throw new Error("invalid-value: expecting a non-negative integer."); | ||
| } | ||
| return value; | ||
| }; | ||
| var ensureNumbers = (...operands) => { | ||
| for (let i = 0;i < operands.length; i++) { | ||
| if (operands[i] === null || operands[i] === undefined) { | ||
| throw new Error("not-a-number: undefined"); | ||
| } | ||
| if (typeof operands[i] !== "number") { | ||
| throw new Error("not-a-number"); | ||
| } | ||
| } | ||
| }; | ||
| var notZero = (n) => { | ||
| n = +n; | ||
| if (!n) { | ||
| throw new Error("not-a-number: divide by zero"); | ||
| } | ||
| return n; | ||
| }; | ||
| var add = (left, right) => { | ||
| ensureNumbers(left, right); | ||
| const result = left + right; | ||
| return result; | ||
| }; | ||
| var sub = (left, right) => { | ||
| ensureNumbers(left, right); | ||
| const result = left - right; | ||
| return result; | ||
| }; | ||
| var mul = (left, right) => { | ||
| ensureNumbers(left, right); | ||
| const result = left * right; | ||
| return result; | ||
| }; | ||
| var divide = (left, right) => { | ||
| ensureNumbers(left, right); | ||
| const result = left / notZero(right); | ||
| return result; | ||
| }; | ||
| var div = (left, right) => { | ||
| ensureNumbers(left, right); | ||
| const result = Math.floor(left / notZero(right)); | ||
| return result; | ||
| }; | ||
| var mod = (left, right) => { | ||
| ensureNumbers(left, right); | ||
| const result = left % right; | ||
| return result; | ||
| }; | ||
| var findFirst = (subject, sub2, start, end) => { | ||
| if (!subject || !sub2) { | ||
| return null; | ||
| } | ||
| start = Math.max(ensureInteger(start = start || 0), 0); | ||
| end = Math.min(ensureInteger(end = end || subject.length), subject.length); | ||
| const offset = subject.slice(start, end).indexOf(sub2); | ||
| return offset === -1 ? null : offset + start; | ||
| }; | ||
| var findLast = (subject, sub2, start, end) => { | ||
| if (!subject || !sub2) { | ||
| return null; | ||
| } | ||
| start = Math.max(ensureInteger(start = start || 0), 0); | ||
| end = Math.min(ensureInteger(end = end || subject.length), subject.length); | ||
| const offset = subject.slice(start, end).lastIndexOf(sub2); | ||
| const result = offset === -1 ? null : offset + start; | ||
| return result; | ||
| }; | ||
| var lower = (subject) => subject.toLowerCase(); | ||
| var ensurePadFuncParams = (name, width, padding) => { | ||
| padding = padding || " "; | ||
| if (padding.length > 1) { | ||
| throw new Error(`invalid value, ${name} expects its 'pad' parameter to be a valid string with a single codepoint`); | ||
| } | ||
| ensurePositiveInteger(width); | ||
| return padding; | ||
| }; | ||
| var padLeft = (subject, width, padding) => { | ||
| padding = ensurePadFuncParams("pad_left", width, padding); | ||
| return subject && subject.padStart(width, padding) || ""; | ||
| }; | ||
| var padRight = (subject, width, padding) => { | ||
| padding = ensurePadFuncParams("pad_right", width, padding); | ||
| return subject && subject.padEnd(width, padding) || ""; | ||
| }; | ||
| var replace = (subject, string, by, count) => { | ||
| if (count === 0) { | ||
| return subject; | ||
| } | ||
| if (!count) { | ||
| return subject.split(string).join(by); | ||
| } | ||
| ensurePositiveInteger(count); | ||
| [...Array(count).keys()].map(() => subject = subject.replace(string, by)); | ||
| return subject; | ||
| }; | ||
| var split = (subject, search2, count) => { | ||
| if (subject.length == 0 && search2.length === 0) { | ||
| return []; | ||
| } | ||
| if (count === null || count === undefined) { | ||
| return subject.split(search2); | ||
| } | ||
| ensurePositiveInteger(count); | ||
| if (count === 0) { | ||
| return [subject]; | ||
| } | ||
| const split2 = subject.split(search2); | ||
| return [...split2.slice(0, count), split2.slice(count).join(search2)]; | ||
| }; | ||
| var trim = (subject, chars) => { | ||
| return trimLeft(trimRight(subject, chars), chars); | ||
| }; | ||
| var trimLeft = (subject, chars) => { | ||
| return trimImpl(subject, (list) => new RegExp(`^[${list}]*(.*?)`), chars); | ||
| }; | ||
| var trimRight = (subject, chars) => { | ||
| return trimImpl(subject, (list) => new RegExp(`(.*?)[${list}]*$`), chars); | ||
| }; | ||
| var trimImpl = (subject, regExper, chars) => { | ||
| const pattern = chars ? chars.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&") : "\\s "; | ||
| return subject.replace(regExper(pattern), "$1"); | ||
| }; | ||
| var upper = (subject) => subject.toUpperCase(); | ||
| var basicTokens = { | ||
| "(": "Lparen", | ||
| ")": "Rparen", | ||
| "*": "Star", | ||
| ",": "Comma", | ||
| ".": "Dot", | ||
| ":": "Colon", | ||
| "@": "Current", | ||
| "]": "Rbracket", | ||
| "{": "Lbrace", | ||
| "}": "Rbrace", | ||
| "+": "Plus", | ||
| "%": "Modulo", | ||
| "?": "Question", | ||
| "−": "Minus", | ||
| "×": "Multiply", | ||
| "÷": "Divide" | ||
| }; | ||
| var operatorStartToken = { | ||
| "!": true, | ||
| "<": true, | ||
| "=": true, | ||
| ">": true, | ||
| "&": true, | ||
| "|": true, | ||
| "/": true | ||
| }; | ||
| var skipChars = { | ||
| "\t": true, | ||
| "\n": true, | ||
| "\r": true, | ||
| " ": true | ||
| }; | ||
| var StreamLexer = class { | ||
| _current = 0; | ||
| _enable_legacy_literals = false; | ||
| tokenize(stream, options) { | ||
| const tokens = []; | ||
| this._current = 0; | ||
| this._enable_legacy_literals = options?.enable_legacy_literals || false; | ||
| let start; | ||
| let identifier; | ||
| let token; | ||
| while (this._current < stream.length) { | ||
| if (isAlpha(stream[this._current])) { | ||
| start = this._current; | ||
| identifier = this.consumeUnquotedIdentifier(stream); | ||
| tokens.push({ | ||
| start, | ||
| type: "UnquotedIdentifier", | ||
| value: identifier | ||
| }); | ||
| } else if (basicTokens[stream[this._current]] !== undefined) { | ||
| tokens.push({ | ||
| start: this._current, | ||
| type: basicTokens[stream[this._current]], | ||
| value: stream[this._current] | ||
| }); | ||
| this._current += 1; | ||
| } else if (stream[this._current] === "$") { | ||
| start = this._current; | ||
| if (this._current + 1 < stream.length && isAlpha(stream[this._current + 1])) { | ||
| this._current += 1; | ||
| identifier = this.consumeUnquotedIdentifier(stream); | ||
| tokens.push({ | ||
| start, | ||
| type: "Variable", | ||
| value: identifier | ||
| }); | ||
| } else { | ||
| tokens.push({ | ||
| start, | ||
| type: "Root", | ||
| value: stream[this._current] | ||
| }); | ||
| this._current += 1; | ||
| } | ||
| } else if (stream[this._current] === "-") { | ||
| if (this._current + 1 < stream.length && isNum(stream[this._current + 1])) { | ||
| const token2 = this.consumeNumber(stream); | ||
| token2 && tokens.push(token2); | ||
| } else { | ||
| const token2 = { | ||
| start: this._current, | ||
| type: "Minus", | ||
| value: "-" | ||
| }; | ||
| tokens.push(token2); | ||
| this._current += 1; | ||
| } | ||
| } else if (isNum(stream[this._current])) { | ||
| token = this.consumeNumber(stream); | ||
| tokens.push(token); | ||
| } else if (stream[this._current] === "[") { | ||
| token = this.consumeLBracket(stream); | ||
| tokens.push(token); | ||
| } else if (stream[this._current] === '"') { | ||
| start = this._current; | ||
| identifier = this.consumeQuotedIdentifier(stream); | ||
| tokens.push({ | ||
| start, | ||
| type: "QuotedIdentifier", | ||
| value: identifier | ||
| }); | ||
| } else if (stream[this._current] === `'`) { | ||
| start = this._current; | ||
| identifier = this.consumeRawStringLiteral(stream); | ||
| tokens.push({ | ||
| start, | ||
| type: "Literal", | ||
| value: identifier | ||
| }); | ||
| } else if (stream[this._current] === "`") { | ||
| start = this._current; | ||
| const literal = this.consumeLiteral(stream); | ||
| tokens.push({ | ||
| start, | ||
| type: "Literal", | ||
| value: literal | ||
| }); | ||
| } else if (operatorStartToken[stream[this._current]] !== undefined) { | ||
| token = this.consumeOperator(stream); | ||
| token && tokens.push(token); | ||
| } else if (skipChars[stream[this._current]] !== undefined) { | ||
| this._current += 1; | ||
| } else { | ||
| const error = new Error(`Syntax error: unknown character: ${stream[this._current]}`); | ||
| error.name = "LexerError"; | ||
| throw error; | ||
| } | ||
| } | ||
| return tokens; | ||
| } | ||
| consumeUnquotedIdentifier(stream) { | ||
| const start = this._current; | ||
| this._current += 1; | ||
| while (this._current < stream.length && isAlphaNum(stream[this._current])) { | ||
| this._current += 1; | ||
| } | ||
| return stream.slice(start, this._current); | ||
| } | ||
| consumeQuotedIdentifier(stream) { | ||
| const start = this._current; | ||
| this._current += 1; | ||
| const maxLength = stream.length; | ||
| while (stream[this._current] !== '"' && this._current < maxLength) { | ||
| let current = this._current; | ||
| if (stream[current] === "\\" && (stream[current + 1] === "\\" || stream[current + 1] === '"')) { | ||
| current += 2; | ||
| } else { | ||
| current += 1; | ||
| } | ||
| this._current = current; | ||
| } | ||
| this._current += 1; | ||
| const [value, ok] = this.parseJSON(stream.slice(start, this._current)); | ||
| if (!ok) { | ||
| const error = new Error(`syntax: unexpected end of JSON input`); | ||
| error.name = "LexerError"; | ||
| throw error; | ||
| } | ||
| return value; | ||
| } | ||
| consumeRawStringLiteral(stream) { | ||
| const start = this._current; | ||
| this._current += 1; | ||
| const maxLength = stream.length; | ||
| while (stream[this._current] !== `'` && this._current < maxLength) { | ||
| let current = this._current; | ||
| if (stream[current] === "\\" && (stream[current + 1] === "\\" || stream[current + 1] === `'`)) { | ||
| current += 2; | ||
| } else { | ||
| current += 1; | ||
| } | ||
| this._current = current; | ||
| } | ||
| this._current += 1; | ||
| const literal = stream.slice(start + 1, this._current - 1); | ||
| return replace(replace(literal, `\\\\`, `\\`), `\\'`, `'`); | ||
| } | ||
| consumeNumber(stream) { | ||
| const start = this._current; | ||
| this._current += 1; | ||
| const maxLength = stream.length; | ||
| while (isNum(stream[this._current]) && this._current < maxLength) { | ||
| this._current += 1; | ||
| } | ||
| const value = parseInt(stream.slice(start, this._current), 10); | ||
| return { start, value, type: "Number" }; | ||
| } | ||
| consumeLBracket(stream) { | ||
| const start = this._current; | ||
| this._current += 1; | ||
| if (stream[this._current] === "?") { | ||
| this._current += 1; | ||
| return { start, type: "Filter", value: "[?" }; | ||
| } | ||
| if (stream[this._current] === "]") { | ||
| this._current += 1; | ||
| return { start, type: "Flatten", value: "[]" }; | ||
| } | ||
| return { start, type: "Lbracket", value: "[" }; | ||
| } | ||
| consumeOrElse(stream, peek, token, orElse) { | ||
| const start = this._current; | ||
| this._current += 1; | ||
| if (this._current < stream.length && stream[this._current] === peek) { | ||
| this._current += 1; | ||
| return { | ||
| start, | ||
| type: orElse, | ||
| value: stream.slice(start, this._current) | ||
| }; | ||
| } | ||
| return { start, type: token, value: stream[start] }; | ||
| } | ||
| consumeOperator(stream) { | ||
| const start = this._current; | ||
| const startingChar = stream[start]; | ||
| switch (startingChar) { | ||
| case "!": | ||
| return this.consumeOrElse(stream, "=", "Not", "NE"); | ||
| case "<": | ||
| return this.consumeOrElse(stream, "=", "LT", "LTE"); | ||
| case ">": | ||
| return this.consumeOrElse(stream, "=", "GT", "GTE"); | ||
| case "=": | ||
| return this.consumeOrElse(stream, "=", "Assign", "EQ"); | ||
| case "&": | ||
| return this.consumeOrElse(stream, "&", "Expref", "And"); | ||
| case "|": | ||
| return this.consumeOrElse(stream, "|", "Pipe", "Or"); | ||
| case "/": | ||
| return this.consumeOrElse(stream, "/", "Divide", "Div"); | ||
| } | ||
| } | ||
| consumeLiteral(stream) { | ||
| this._current += 1; | ||
| const start = this._current; | ||
| const maxLength = stream.length; | ||
| while (stream[this._current] !== "`" && this._current < maxLength) { | ||
| let current = this._current; | ||
| if (stream[current] === "\\" && (stream[current + 1] === "\\" || stream[current + 1] === "`")) { | ||
| current += 2; | ||
| } else { | ||
| current += 1; | ||
| } | ||
| this._current = current; | ||
| } | ||
| let literalString = stream.slice(start, this._current).trimStart(); | ||
| literalString = literalString.replace("\\`", "`"); | ||
| let literal = null; | ||
| let ok = false; | ||
| if (this.looksLikeJSON(literalString)) { | ||
| [literal, ok] = this.parseJSON(literalString); | ||
| } | ||
| if (!ok && this._enable_legacy_literals) { | ||
| [literal, ok] = this.parseJSON(`"${literalString}"`); | ||
| } | ||
| if (!ok) { | ||
| const error = new Error(`Syntax error: unexpected end of JSON input or invalid format for a JSON literal: ${stream[this._current]}`); | ||
| error.name = "LexerError"; | ||
| throw error; | ||
| } | ||
| this._current += 1; | ||
| return literal; | ||
| } | ||
| looksLikeJSON(literalString) { | ||
| const startingChars = '[{"'; | ||
| const jsonLiterals = ["true", "false", "null"]; | ||
| const numberLooking = "-0123456789"; | ||
| if (literalString === "") { | ||
| return false; | ||
| } | ||
| if (startingChars.includes(literalString[0])) { | ||
| return true; | ||
| } | ||
| if (jsonLiterals.includes(literalString)) { | ||
| return true; | ||
| } | ||
| if (numberLooking.includes(literalString[0])) { | ||
| const [_, ok] = this.parseJSON(literalString); | ||
| return ok; | ||
| } | ||
| return false; | ||
| } | ||
| parseJSON(text) { | ||
| try { | ||
| const json = JSON.parse(text); | ||
| return [json, true]; | ||
| } catch { | ||
| return [null, false]; | ||
| } | ||
| } | ||
| }; | ||
| var Lexer = new StreamLexer; | ||
| var Lexer_default = Lexer; | ||
| var bindingPower = { | ||
| ["EOF"]: 0, | ||
| ["Variable"]: 0, | ||
| ["UnquotedIdentifier"]: 0, | ||
| ["QuotedIdentifier"]: 0, | ||
| ["Rbracket"]: 0, | ||
| ["Rparen"]: 0, | ||
| ["Comma"]: 0, | ||
| ["Rbrace"]: 0, | ||
| ["Number"]: 0, | ||
| ["Current"]: 0, | ||
| ["Expref"]: 0, | ||
| ["Root"]: 0, | ||
| ["Assign"]: 1, | ||
| ["Pipe"]: 1, | ||
| ["Question"]: 2, | ||
| ["Or"]: 3, | ||
| ["And"]: 4, | ||
| ["EQ"]: 5, | ||
| ["GT"]: 5, | ||
| ["LT"]: 5, | ||
| ["GTE"]: 5, | ||
| ["LTE"]: 5, | ||
| ["NE"]: 5, | ||
| ["Minus"]: 6, | ||
| ["Plus"]: 6, | ||
| ["Div"]: 7, | ||
| ["Divide"]: 7, | ||
| ["Modulo"]: 7, | ||
| ["Multiply"]: 7, | ||
| ["Flatten"]: 9, | ||
| ["Star"]: 20, | ||
| ["Filter"]: 21, | ||
| ["Dot"]: 40, | ||
| ["Not"]: 45, | ||
| ["Lbrace"]: 50, | ||
| ["Lbracket"]: 55, | ||
| ["Lparen"]: 60 | ||
| }; | ||
| var TokenParser = class _TokenParser { | ||
| index = 0; | ||
| tokens = []; | ||
| parse(expression, options) { | ||
| this.loadTokens(expression, options || { enable_legacy_literals: false }); | ||
| this.index = 0; | ||
| const ast = this.expression(0); | ||
| if (this.lookahead(0) !== "EOF") { | ||
| const token = this.lookaheadToken(0); | ||
| this.errorToken(token, `Syntax error: unexpected token type: ${token.type}, value: ${token.value}`); | ||
| } | ||
| return ast; | ||
| } | ||
| loadTokens(expression, options) { | ||
| this.tokens = Lexer_default.tokenize(expression, options); | ||
| this.tokens.push({ type: "EOF", value: "", start: expression.length }); | ||
| } | ||
| expression(rbp) { | ||
| const leftToken = this.lookaheadToken(0); | ||
| this.advance(); | ||
| let left = this.nud(leftToken); | ||
| let currentTokenType = this.lookahead(0); | ||
| while (rbp < bindingPower[currentTokenType]) { | ||
| this.advance(); | ||
| left = this.led(currentTokenType, left); | ||
| currentTokenType = this.lookahead(0); | ||
| } | ||
| return left; | ||
| } | ||
| lookahead(offset) { | ||
| return this.tokens[this.index + offset].type; | ||
| } | ||
| lookaheadToken(offset) { | ||
| return this.tokens[this.index + offset]; | ||
| } | ||
| advance() { | ||
| this.index += 1; | ||
| } | ||
| nud(token) { | ||
| switch (token.type) { | ||
| case "Variable": | ||
| return { type: "Variable", name: token.value }; | ||
| case "Literal": | ||
| return { type: "Literal", value: token.value }; | ||
| case "UnquotedIdentifier": { | ||
| if (_TokenParser.isKeyword(token, "let") && this.lookahead(0) === "Variable") { | ||
| return this.parseLetExpression(); | ||
| } else { | ||
| return { type: "Field", name: token.value }; | ||
| } | ||
| } | ||
| case "QuotedIdentifier": | ||
| if (this.lookahead(0) === "Lparen") { | ||
| throw new Error("Syntax error: quoted identifier not allowed for function names."); | ||
| } else { | ||
| return { type: "Field", name: token.value }; | ||
| } | ||
| case "Not": { | ||
| const child = this.expression(bindingPower.Not); | ||
| return { type: "NotExpression", child }; | ||
| } | ||
| case "Minus": { | ||
| const child = this.expression(bindingPower.Minus); | ||
| return { | ||
| type: "Unary", | ||
| operator: token.type, | ||
| operand: child | ||
| }; | ||
| } | ||
| case "Plus": { | ||
| const child = this.expression(bindingPower.Plus); | ||
| return { | ||
| type: "Unary", | ||
| operator: token.type, | ||
| operand: child | ||
| }; | ||
| } | ||
| case "Star": { | ||
| const left = { type: "Identity" }; | ||
| return { type: "ValueProjection", left, right: this.parseProjectionRHS(bindingPower.Star) }; | ||
| } | ||
| case "Filter": | ||
| return this.led(token.type, { type: "Identity" }); | ||
| case "Lbrace": | ||
| return this.parseMultiselectHash(); | ||
| case "Flatten": { | ||
| const left = { | ||
| type: "Flatten", | ||
| child: { type: "Identity" } | ||
| }; | ||
| const right = this.parseProjectionRHS(bindingPower.Flatten); | ||
| return { type: "Projection", left, right }; | ||
| } | ||
| case "Lbracket": { | ||
| if (this.lookahead(0) === "Number" || this.lookahead(0) === "Colon") { | ||
| const right = this.parseIndexExpression(); | ||
| return this.projectIfSlice({ type: "Identity" }, right); | ||
| } | ||
| if (this.lookahead(0) === "Star" && this.lookahead(1) === "Rbracket") { | ||
| this.advance(); | ||
| this.advance(); | ||
| const right = this.parseProjectionRHS(bindingPower.Star); | ||
| return { | ||
| left: { type: "Identity" }, | ||
| right, | ||
| type: "Projection" | ||
| }; | ||
| } | ||
| return this.parseMultiselectList(); | ||
| } | ||
| case "Current": | ||
| return { type: "Current" }; | ||
| case "Root": | ||
| return { type: "Root" }; | ||
| case "Expref": { | ||
| const child = this.expression(bindingPower.Expref); | ||
| return { type: "ExpressionReference", child }; | ||
| } | ||
| case "Lparen": { | ||
| const expression = this.expression(0); | ||
| this.match("Rparen"); | ||
| return expression; | ||
| } | ||
| default: | ||
| this.errorToken(token); | ||
| } | ||
| } | ||
| led(tokenName, left) { | ||
| switch (tokenName) { | ||
| case "Question": { | ||
| const trueExpr = this.expression(0); | ||
| this.match("Colon"); | ||
| const falseExpr = this.expression(0); | ||
| return { | ||
| type: "Ternary", | ||
| condition: left, | ||
| trueExpr, | ||
| falseExpr | ||
| }; | ||
| } | ||
| case "Dot": { | ||
| const rbp = bindingPower.Dot; | ||
| if (this.lookahead(0) !== "Star") { | ||
| const right2 = this.parseDotRHS(rbp); | ||
| return { type: "Subexpression", left, right: right2 }; | ||
| } | ||
| this.advance(); | ||
| const right = this.parseProjectionRHS(rbp); | ||
| return { type: "ValueProjection", left, right }; | ||
| } | ||
| case "Pipe": { | ||
| const right = this.expression(bindingPower.Pipe); | ||
| return { type: "Pipe", left, right }; | ||
| } | ||
| case "Or": { | ||
| const right = this.expression(bindingPower.Or); | ||
| return { type: "OrExpression", left, right }; | ||
| } | ||
| case "And": { | ||
| const right = this.expression(bindingPower.And); | ||
| return { type: "AndExpression", left, right }; | ||
| } | ||
| case "Lparen": { | ||
| if (left.type !== "Field") { | ||
| throw new Error("Syntax error: expected a Field node"); | ||
| } | ||
| const name = left.name; | ||
| const args = this.parseCommaSeparatedExpressionsUntilToken("Rparen"); | ||
| const node = { name, type: "Function", children: args }; | ||
| return node; | ||
| } | ||
| case "Filter": { | ||
| const condition = this.expression(0); | ||
| this.match("Rbracket"); | ||
| const right = this.lookahead(0) === "Flatten" ? { type: "Identity" } : this.parseProjectionRHS(bindingPower.Filter); | ||
| return { type: "FilterProjection", left, right, condition }; | ||
| } | ||
| case "Flatten": { | ||
| const leftNode = { type: "Flatten", child: left }; | ||
| const right = this.parseProjectionRHS(bindingPower.Flatten); | ||
| return { type: "Projection", left: leftNode, right }; | ||
| } | ||
| case "Assign": { | ||
| const leftNode = left; | ||
| const right = this.expression(0); | ||
| return { | ||
| type: "Binding", | ||
| variable: leftNode.name, | ||
| reference: right | ||
| }; | ||
| } | ||
| case "EQ": | ||
| case "NE": | ||
| case "GT": | ||
| case "GTE": | ||
| case "LT": | ||
| case "LTE": | ||
| return this.parseComparator(left, tokenName); | ||
| case "Plus": | ||
| case "Minus": | ||
| case "Multiply": | ||
| case "Star": | ||
| case "Divide": | ||
| case "Modulo": | ||
| case "Div": | ||
| return this.parseArithmetic(left, tokenName); | ||
| case "Lbracket": { | ||
| const token = this.lookaheadToken(0); | ||
| if (token.type === "Number" || token.type === "Colon") { | ||
| const right2 = this.parseIndexExpression(); | ||
| return this.projectIfSlice(left, right2); | ||
| } | ||
| this.match("Star"); | ||
| this.match("Rbracket"); | ||
| const right = this.parseProjectionRHS(bindingPower.Star); | ||
| return { type: "Projection", left, right }; | ||
| } | ||
| default: | ||
| return this.errorToken(this.lookaheadToken(0)); | ||
| } | ||
| } | ||
| static isKeyword(token, keyword) { | ||
| return token.type === "UnquotedIdentifier" && token.value === keyword; | ||
| } | ||
| match(tokenType) { | ||
| if (this.lookahead(0) === tokenType) { | ||
| this.advance(); | ||
| return; | ||
| } else { | ||
| const token = this.lookaheadToken(0); | ||
| this.errorToken(token, `Syntax error: expected ${tokenType}, got: ${token.type}`); | ||
| } | ||
| } | ||
| errorToken(token, message = "") { | ||
| const error = new Error(message || `Syntax error: invalid token (${token.type}): "${token.value}"`); | ||
| error.name = "ParserError"; | ||
| throw error; | ||
| } | ||
| parseIndexExpression() { | ||
| if (this.lookahead(0) === "Colon" || this.lookahead(1) === "Colon") { | ||
| return this.parseSliceExpression(); | ||
| } | ||
| const value = Number(this.lookaheadToken(0).value); | ||
| this.advance(); | ||
| this.match("Rbracket"); | ||
| return { type: "Index", value }; | ||
| } | ||
| projectIfSlice(left, right) { | ||
| const indexExpr = { | ||
| type: "IndexExpression", | ||
| left, | ||
| right | ||
| }; | ||
| if (right.type === "Slice") { | ||
| return { | ||
| left: indexExpr, | ||
| right: this.parseProjectionRHS(bindingPower.Star), | ||
| type: "Projection" | ||
| }; | ||
| } | ||
| return indexExpr; | ||
| } | ||
| parseSliceExpression() { | ||
| const parts = [null, null, null]; | ||
| let index = 0; | ||
| let current = this.lookaheadToken(0); | ||
| while (current.type != "Rbracket" && index < 3) { | ||
| if (current.type === "Colon") { | ||
| index++; | ||
| if (index === 3) { | ||
| this.errorToken(this.lookaheadToken(0), "Syntax error, too many colons in slice expression"); | ||
| } | ||
| this.advance(); | ||
| } else if (current.type === "Number") { | ||
| const part = this.lookaheadToken(0).value; | ||
| parts[index] = part; | ||
| this.advance(); | ||
| } else { | ||
| const next = this.lookaheadToken(0); | ||
| this.errorToken(next, `Syntax error, unexpected token: ${next.value}(${next.type})`); | ||
| } | ||
| current = this.lookaheadToken(0); | ||
| } | ||
| this.match("Rbracket"); | ||
| const [start, stop, step] = parts; | ||
| return { type: "Slice", start, stop, step }; | ||
| } | ||
| parseLetExpression() { | ||
| const separated = this.parseCommaSeparatedExpressionsUntilKeyword("in"); | ||
| const expression = this.expression(0); | ||
| const bindings = separated.map((binding) => binding); | ||
| return { | ||
| type: "LetExpression", | ||
| bindings, | ||
| expression | ||
| }; | ||
| } | ||
| parseCommaSeparatedExpressionsUntilKeyword(keyword) { | ||
| return this.parseCommaSeparatedExpressionsUntil(() => { | ||
| return _TokenParser.isKeyword(this.lookaheadToken(0), keyword); | ||
| }, () => { | ||
| this.advance(); | ||
| }); | ||
| } | ||
| parseCommaSeparatedExpressionsUntilToken(token) { | ||
| return this.parseCommaSeparatedExpressionsUntil(() => { | ||
| return this.lookahead(0) === token; | ||
| }, () => { | ||
| return this.match(token); | ||
| }); | ||
| } | ||
| parseCommaSeparatedExpressionsUntil(isEndToken, matchEndToken) { | ||
| const args = []; | ||
| let expression; | ||
| while (!isEndToken()) { | ||
| expression = this.expression(0); | ||
| if (this.lookahead(0) === "Comma") { | ||
| this.match("Comma"); | ||
| } | ||
| args.push(expression); | ||
| } | ||
| matchEndToken(); | ||
| return args; | ||
| } | ||
| parseComparator(left, comparator) { | ||
| const right = this.expression(bindingPower[comparator]); | ||
| return { type: "Comparator", name: comparator, left, right }; | ||
| } | ||
| parseArithmetic(left, operator) { | ||
| const right = this.expression(bindingPower[operator]); | ||
| return { type: "Arithmetic", operator, left, right }; | ||
| } | ||
| parseDotRHS(rbp) { | ||
| const lookahead = this.lookahead(0); | ||
| const exprTokens = ["UnquotedIdentifier", "QuotedIdentifier", "Star"]; | ||
| if (exprTokens.includes(lookahead)) { | ||
| return this.expression(rbp); | ||
| } | ||
| if (lookahead === "Lbracket") { | ||
| this.match("Lbracket"); | ||
| return this.parseMultiselectList(); | ||
| } | ||
| if (lookahead === "Lbrace") { | ||
| this.match("Lbrace"); | ||
| return this.parseMultiselectHash(); | ||
| } | ||
| const token = this.lookaheadToken(0); | ||
| this.errorToken(token, `Syntax error, unexpected token: ${token.value}(${token.type})`); | ||
| } | ||
| parseProjectionRHS(rbp) { | ||
| if (bindingPower[this.lookahead(0)] < 10) { | ||
| return { type: "Identity" }; | ||
| } | ||
| if (this.lookahead(0) === "Lbracket") { | ||
| return this.expression(rbp); | ||
| } | ||
| if (this.lookahead(0) === "Filter") { | ||
| return this.expression(rbp); | ||
| } | ||
| if (this.lookahead(0) === "Dot") { | ||
| this.match("Dot"); | ||
| return this.parseDotRHS(rbp); | ||
| } | ||
| const token = this.lookaheadToken(0); | ||
| this.errorToken(token, `Syntax error, unexpected token: ${token.value}(${token.type})`); | ||
| } | ||
| parseMultiselectList() { | ||
| const expressions = []; | ||
| while (this.lookahead(0) !== "Rbracket") { | ||
| const expression = this.expression(0); | ||
| expressions.push(expression); | ||
| if (this.lookahead(0) === "Comma") { | ||
| this.match("Comma"); | ||
| if (this.lookahead(0) === "Rbracket") { | ||
| throw new Error("Syntax error: unexpected token Rbracket"); | ||
| } | ||
| } | ||
| } | ||
| this.match("Rbracket"); | ||
| return { type: "MultiSelectList", children: expressions }; | ||
| } | ||
| parseMultiselectHash() { | ||
| const pairs = []; | ||
| const identifierTypes = ["UnquotedIdentifier", "QuotedIdentifier"]; | ||
| let keyToken; | ||
| let keyName; | ||
| let value; | ||
| for (;; ) { | ||
| keyToken = this.lookaheadToken(0); | ||
| if (!identifierTypes.includes(keyToken.type)) { | ||
| throw new Error(`Syntax error: expecting an identifier token, got: ${keyToken.type}`); | ||
| } | ||
| keyName = keyToken.value; | ||
| this.advance(); | ||
| this.match("Colon"); | ||
| value = this.expression(0); | ||
| pairs.push({ value, type: "KeyValuePair", name: keyName }); | ||
| if (this.lookahead(0) === "Comma") { | ||
| this.match("Comma"); | ||
| } else if (this.lookahead(0) === "Rbrace") { | ||
| this.match("Rbrace"); | ||
| break; | ||
| } | ||
| } | ||
| return { type: "MultiSelectHash", children: pairs }; | ||
| } | ||
| }; | ||
| var Parser = new TokenParser; | ||
| var Parser_default = Parser; | ||
| var Text = class _Text { | ||
| _text; | ||
| constructor(text) { | ||
| this._text = text; | ||
| } | ||
| get string() { | ||
| return this._text; | ||
| } | ||
| get length() { | ||
| return this.codePoints.length; | ||
| } | ||
| compareTo(other) { | ||
| return _Text.compare(this, new _Text(other)); | ||
| } | ||
| static get comparer() { | ||
| const stringComparer = (left, right) => { | ||
| return new _Text(left).compareTo(right); | ||
| }; | ||
| return stringComparer; | ||
| } | ||
| static compare(left, right) { | ||
| const leftCp = left.codePoints; | ||
| const rightCp = right.codePoints; | ||
| for (let index = 0;index < Math.min(leftCp.length, rightCp.length); index++) { | ||
| if (leftCp[index] === rightCp[index]) { | ||
| continue; | ||
| } | ||
| return leftCp[index] - rightCp[index] > 0 ? 1 : -1; | ||
| } | ||
| return leftCp.length - rightCp.length > 0 ? 1 : -1; | ||
| } | ||
| reverse() { | ||
| return String.fromCodePoint(...this.codePoints.reverse()); | ||
| } | ||
| get codePoints() { | ||
| const array = [...this._text].map((s) => s.codePointAt(0)); | ||
| return array; | ||
| } | ||
| }; | ||
| var createMathFunction = (mathFn) => ([value]) => mathFn(value); | ||
| var createStringFunction = (stringFn) => ([subject]) => stringFn(subject); | ||
| var createObjectFunction = (objFn) => ([obj]) => objFn(obj); | ||
| var Runtime = class { | ||
| _interpreter; | ||
| _functionTable; | ||
| _customFunctions = /* @__PURE__ */ new Set; | ||
| TYPE_NAME_TABLE = Object.freeze({ | ||
| [0]: "number", | ||
| [1]: "any", | ||
| [2]: "string", | ||
| [3]: "array", | ||
| [4]: "object", | ||
| [5]: "boolean", | ||
| [6]: "expression", | ||
| [7]: "null", | ||
| [8]: "Array<number>", | ||
| [10]: "Array<object>", | ||
| [9]: "Array<string>", | ||
| [11]: "Array<Array<any>>" | ||
| }); | ||
| constructor(interpreter) { | ||
| this._interpreter = interpreter; | ||
| this._functionTable = this.buildFunctionTable(); | ||
| } | ||
| buildFunctionTable() { | ||
| return { | ||
| abs: { _func: createMathFunction(Math.abs), _signature: [{ types: [0] }] }, | ||
| ceil: { _func: createMathFunction(Math.ceil), _signature: [{ types: [0] }] }, | ||
| floor: { _func: createMathFunction(Math.floor), _signature: [{ types: [0] }] }, | ||
| lower: { _func: createStringFunction(lower), _signature: [{ types: [2] }] }, | ||
| upper: { _func: createStringFunction(upper), _signature: [{ types: [2] }] }, | ||
| keys: { _func: createObjectFunction(Object.keys), _signature: [{ types: [4] }] }, | ||
| values: { _func: createObjectFunction(Object.values), _signature: [{ types: [4] }] }, | ||
| avg: { _func: this.functionAvg, _signature: [{ types: [8] }] }, | ||
| contains: { | ||
| _func: this.functionContains, | ||
| _signature: [ | ||
| { types: [2, 3] }, | ||
| { types: [1] } | ||
| ] | ||
| }, | ||
| ends_with: { | ||
| _func: this.functionEndsWith, | ||
| _signature: [{ types: [2] }, { types: [2] }] | ||
| }, | ||
| find_first: { | ||
| _func: this.functionFindFirst, | ||
| _signature: [ | ||
| { types: [2] }, | ||
| { types: [2] }, | ||
| { types: [0], optional: true }, | ||
| { types: [0], optional: true } | ||
| ] | ||
| }, | ||
| find_last: { | ||
| _func: this.functionFindLast, | ||
| _signature: [ | ||
| { types: [2] }, | ||
| { types: [2] }, | ||
| { types: [0], optional: true }, | ||
| { types: [0], optional: true } | ||
| ] | ||
| }, | ||
| from_items: { _func: this.functionFromItems, _signature: [{ types: [11] }] }, | ||
| group_by: { | ||
| _func: this.functionGroupBy, | ||
| _signature: [{ types: [3] }, { types: [6] }] | ||
| }, | ||
| items: { _func: this.functionItems, _signature: [{ types: [4] }] }, | ||
| join: { | ||
| _func: this.functionJoin, | ||
| _signature: [{ types: [2] }, { types: [9] }] | ||
| }, | ||
| length: { | ||
| _func: this.functionLength, | ||
| _signature: [{ types: [2, 3, 4] }] | ||
| }, | ||
| map: { | ||
| _func: this.functionMap, | ||
| _signature: [{ types: [6] }, { types: [3] }] | ||
| }, | ||
| max: { | ||
| _func: this.functionMax, | ||
| _signature: [{ types: [8, 9] }] | ||
| }, | ||
| max_by: { | ||
| _func: this.functionMaxBy, | ||
| _signature: [{ types: [3] }, { types: [6] }] | ||
| }, | ||
| merge: { _func: this.functionMerge, _signature: [{ types: [4], variadic: true }] }, | ||
| min: { | ||
| _func: this.functionMin, | ||
| _signature: [{ types: [8, 9] }] | ||
| }, | ||
| min_by: { | ||
| _func: this.functionMinBy, | ||
| _signature: [{ types: [3] }, { types: [6] }] | ||
| }, | ||
| not_null: { _func: this.functionNotNull, _signature: [{ types: [1], variadic: true }] }, | ||
| pad_left: { | ||
| _func: this.functionPadLeft, | ||
| _signature: [ | ||
| { types: [2] }, | ||
| { types: [0] }, | ||
| { types: [2], optional: true } | ||
| ] | ||
| }, | ||
| pad_right: { | ||
| _func: this.functionPadRight, | ||
| _signature: [ | ||
| { types: [2] }, | ||
| { types: [0] }, | ||
| { types: [2], optional: true } | ||
| ] | ||
| }, | ||
| replace: { | ||
| _func: this.functionReplace, | ||
| _signature: [ | ||
| { types: [2] }, | ||
| { types: [2] }, | ||
| { types: [2] }, | ||
| { types: [0], optional: true } | ||
| ] | ||
| }, | ||
| reverse: { | ||
| _func: this.functionReverse, | ||
| _signature: [{ types: [2, 3] }] | ||
| }, | ||
| sort: { | ||
| _func: this.functionSort, | ||
| _signature: [{ types: [9, 8] }] | ||
| }, | ||
| sort_by: { | ||
| _func: this.functionSortBy, | ||
| _signature: [{ types: [3] }, { types: [6] }] | ||
| }, | ||
| split: { | ||
| _func: this.functionSplit, | ||
| _signature: [ | ||
| { types: [2] }, | ||
| { types: [2] }, | ||
| { types: [0], optional: true } | ||
| ] | ||
| }, | ||
| starts_with: { | ||
| _func: this.functionStartsWith, | ||
| _signature: [{ types: [2] }, { types: [2] }] | ||
| }, | ||
| sum: { _func: this.functionSum, _signature: [{ types: [8] }] }, | ||
| to_array: { _func: this.functionToArray, _signature: [{ types: [1] }] }, | ||
| to_number: { _func: this.functionToNumber, _signature: [{ types: [1] }] }, | ||
| to_string: { _func: this.functionToString, _signature: [{ types: [1] }] }, | ||
| trim: { | ||
| _func: this.functionTrim, | ||
| _signature: [{ types: [2] }, { types: [2], optional: true }] | ||
| }, | ||
| trim_left: { | ||
| _func: this.functionTrimLeft, | ||
| _signature: [{ types: [2] }, { types: [2], optional: true }] | ||
| }, | ||
| trim_right: { | ||
| _func: this.functionTrimRight, | ||
| _signature: [{ types: [2] }, { types: [2], optional: true }] | ||
| }, | ||
| type: { _func: this.functionType, _signature: [{ types: [1] }] }, | ||
| zip: { _func: this.functionZip, _signature: [{ types: [3], variadic: true }] } | ||
| }; | ||
| } | ||
| registerFunction(name, customFunction, signature, options) { | ||
| const result = this._registerInternal(name, customFunction, signature, options); | ||
| if (!result.success) { | ||
| throw new Error(result.message); | ||
| } | ||
| } | ||
| _registerInternal(name, customFunction, signature, options = {}) { | ||
| if (!name || typeof name !== "string" || name.trim() === "") { | ||
| return { | ||
| success: false, | ||
| reason: "invalid-name", | ||
| message: "Function name must be a non-empty string" | ||
| }; | ||
| } | ||
| try { | ||
| this.validateInputSignatures(name, signature); | ||
| } catch (error) { | ||
| return { | ||
| success: false, | ||
| reason: "invalid-signature", | ||
| message: error instanceof Error ? error.message : "Invalid function signature" | ||
| }; | ||
| } | ||
| const { override = false, warn = false } = options; | ||
| const exists = name in this._functionTable; | ||
| if (exists && !override) { | ||
| return { | ||
| success: false, | ||
| reason: "already-exists", | ||
| message: `Function already defined: ${name}(). Use { override: true } to replace it.` | ||
| }; | ||
| } | ||
| if (exists && override && warn) { | ||
| console.warn(`Warning: Overriding existing function: ${name}()`); | ||
| } | ||
| this._functionTable[name] = { | ||
| _func: customFunction.bind(this), | ||
| _signature: signature | ||
| }; | ||
| this._customFunctions.add(name); | ||
| const message = exists ? `Function ${name}() overridden successfully` : `Function ${name}() registered successfully`; | ||
| return { success: true, message }; | ||
| } | ||
| register(name, customFunction, signature, options = {}) { | ||
| return this._registerInternal(name, customFunction, signature, options); | ||
| } | ||
| unregister(name) { | ||
| if (!this._customFunctions.has(name)) { | ||
| return false; | ||
| } | ||
| delete this._functionTable[name]; | ||
| this._customFunctions.delete(name); | ||
| return true; | ||
| } | ||
| isRegistered(name) { | ||
| return name in this._functionTable; | ||
| } | ||
| getRegistered() { | ||
| return Object.keys(this._functionTable); | ||
| } | ||
| getCustomFunctions() { | ||
| return Array.from(this._customFunctions); | ||
| } | ||
| clearCustomFunctions() { | ||
| for (const name of this._customFunctions) { | ||
| delete this._functionTable[name]; | ||
| } | ||
| this._customFunctions.clear(); | ||
| } | ||
| callFunction(name, resolvedArgs) { | ||
| const functionEntry = this._functionTable[name]; | ||
| if (functionEntry === undefined) { | ||
| throw new Error(`Unknown function: ${name}()`); | ||
| } | ||
| this.validateArgs(name, resolvedArgs, functionEntry._signature); | ||
| return functionEntry._func.call(this, resolvedArgs); | ||
| } | ||
| validateInputSignatures(name, signature) { | ||
| for (let i = 0;i < signature.length; i += 1) { | ||
| if ("variadic" in signature[i] && i !== signature.length - 1) { | ||
| throw new Error(`Invalid arity: ${name}() 'variadic' argument ${i + 1} must occur last`); | ||
| } | ||
| } | ||
| } | ||
| validateArgs(name, args, signature) { | ||
| this.validateInputSignatures(name, signature); | ||
| this.validateArity(name, args, signature); | ||
| this.validateTypes(name, args, signature); | ||
| } | ||
| validateArity(name, args, signature) { | ||
| const numberOfRequiredArgs = signature.filter((argSignature) => !(argSignature.optional ?? false)).length; | ||
| const lastArgIsVariadic = signature[signature.length - 1]?.variadic ?? false; | ||
| const tooFewArgs = args.length < numberOfRequiredArgs; | ||
| const tooManyArgs = args.length > signature.length; | ||
| if (lastArgIsVariadic && tooFewArgs || !lastArgIsVariadic && (tooFewArgs || tooManyArgs)) { | ||
| const tooFewModifier = tooFewArgs && (!lastArgIsVariadic && numberOfRequiredArgs > 1 || lastArgIsVariadic) ? "at least " : ""; | ||
| const pluralized = signature.length > 1; | ||
| throw new Error(`Invalid arity: ${name}() takes ${tooFewModifier}${numberOfRequiredArgs} argument${pluralized && "s" || ""} but received ${args.length}`); | ||
| } | ||
| } | ||
| validateTypes(name, args, signature) { | ||
| for (let i = 0;i < signature.length; i += 1) { | ||
| const currentSpec = signature[i].types; | ||
| const actualType = this.getTypeName(args[i]); | ||
| if (actualType === undefined) { | ||
| continue; | ||
| } | ||
| const typeMatched = currentSpec.some((expectedType) => this.typeMatches(actualType, expectedType, args[i])); | ||
| if (!typeMatched) { | ||
| const expected = currentSpec.map((typeId) => this.TYPE_NAME_TABLE[typeId]).join(" | "); | ||
| throw new Error(`Invalid type: ${name}() expected argument ${i + 1} to be type (${expected}) but received type ${this.TYPE_NAME_TABLE[actualType]} instead.`); | ||
| } | ||
| } | ||
| } | ||
| typeMatches(actual, expected, argValue) { | ||
| if (expected === 1) { | ||
| return true; | ||
| } | ||
| if (expected === 9 || expected === 8 || expected === 10 || expected === 11 || expected === 3) { | ||
| if (expected === 3) { | ||
| return actual === 3; | ||
| } | ||
| if (actual === 3) { | ||
| let subtype; | ||
| if (expected === 8) { | ||
| subtype = 0; | ||
| } else if (expected === 10) { | ||
| subtype = 4; | ||
| } else if (expected === 9) { | ||
| subtype = 2; | ||
| } else if (expected === 11) { | ||
| subtype = 3; | ||
| } | ||
| const array = argValue; | ||
| for (let i = 0;i < array.length; i += 1) { | ||
| const typeName = this.getTypeName(array[i]); | ||
| if (typeName !== undefined && subtype !== undefined && !this.typeMatches(typeName, subtype, array[i])) { | ||
| return false; | ||
| } | ||
| } | ||
| return true; | ||
| } | ||
| } else { | ||
| return actual === expected; | ||
| } | ||
| return false; | ||
| } | ||
| getTypeName(obj) { | ||
| if (obj === null) { | ||
| return 7; | ||
| } | ||
| if (typeof obj === "string") { | ||
| return 2; | ||
| } | ||
| if (typeof obj === "number") { | ||
| return 0; | ||
| } | ||
| if (typeof obj === "boolean") { | ||
| return 5; | ||
| } | ||
| if (Array.isArray(obj)) { | ||
| return 3; | ||
| } | ||
| if (typeof obj === "object") { | ||
| if (obj.expref) { | ||
| return 6; | ||
| } | ||
| return 4; | ||
| } | ||
| return; | ||
| } | ||
| createKeyFunction(exprefNode, allowedTypes) { | ||
| const interpreter = this._interpreter; | ||
| const keyFunc = (x) => { | ||
| const current = interpreter.visit(exprefNode, x); | ||
| if (!allowedTypes.includes(this.getTypeName(current))) { | ||
| const msg = `Invalid type: expected one of (${allowedTypes.map((t) => this.TYPE_NAME_TABLE[t]).join(" | ")}), received ${this.TYPE_NAME_TABLE[this.getTypeName(current)]}`; | ||
| throw new Error(msg); | ||
| } | ||
| return current; | ||
| }; | ||
| return keyFunc; | ||
| } | ||
| functionAvg = ([inputArray]) => { | ||
| if (!inputArray || inputArray.length == 0) { | ||
| return null; | ||
| } | ||
| let sum = 0; | ||
| for (let i = 0;i < inputArray.length; i += 1) { | ||
| sum += inputArray[i]; | ||
| } | ||
| return sum / inputArray.length; | ||
| }; | ||
| functionContains = ([ | ||
| searchable, | ||
| searchValue | ||
| ]) => { | ||
| if (Array.isArray(searchable)) { | ||
| const array = searchable; | ||
| return array.includes(searchValue); | ||
| } | ||
| if (typeof searchable === "string") { | ||
| const text = searchable; | ||
| if (typeof searchValue === "string") { | ||
| return text.includes(searchValue); | ||
| } | ||
| } | ||
| return null; | ||
| }; | ||
| functionEndsWith = (resolvedArgs) => { | ||
| const [searchStr, suffix] = resolvedArgs; | ||
| return searchStr.includes(suffix, searchStr.length - suffix.length); | ||
| }; | ||
| functionFindFirst = this.createFindFunction(findFirst); | ||
| functionFindLast = this.createFindFunction(findLast); | ||
| createFindFunction(findFn) { | ||
| return (resolvedArgs) => { | ||
| const subject = resolvedArgs[0]; | ||
| const search2 = resolvedArgs[1]; | ||
| const start = resolvedArgs.length > 2 ? resolvedArgs[2] : undefined; | ||
| const end = resolvedArgs.length > 3 ? resolvedArgs[3] : undefined; | ||
| return findFn(subject, search2, start, end); | ||
| }; | ||
| } | ||
| functionFromItems = ([array]) => { | ||
| array.map((pair) => { | ||
| if (pair.length != 2 || typeof pair[0] !== "string") { | ||
| throw new Error("invalid value, each array must contain two elements, a pair of string and value"); | ||
| } | ||
| }); | ||
| return Object.fromEntries(array); | ||
| }; | ||
| functionGroupBy = ([array, exprefNode]) => { | ||
| const keyFunction = this.createKeyFunction(exprefNode, [2]); | ||
| return array.reduce((acc, cur) => { | ||
| const k = keyFunction(cur ?? {}); | ||
| const target = acc[k] = acc[k] || []; | ||
| target.push(cur); | ||
| return acc; | ||
| }, {}); | ||
| }; | ||
| functionItems = ([inputValue]) => { | ||
| return Object.entries(inputValue); | ||
| }; | ||
| functionJoin = (resolvedArgs) => { | ||
| const [joinChar, listJoin] = resolvedArgs; | ||
| return listJoin.join(joinChar); | ||
| }; | ||
| functionLength = ([inputValue]) => { | ||
| if (typeof inputValue === "string") { | ||
| return new Text(inputValue).length; | ||
| } | ||
| if (Array.isArray(inputValue)) { | ||
| return inputValue.length; | ||
| } | ||
| return Object.keys(inputValue).length; | ||
| }; | ||
| functionMap = ([exprefNode, elements]) => { | ||
| if (!this._interpreter) { | ||
| return []; | ||
| } | ||
| const mapped = []; | ||
| const interpreter = this._interpreter; | ||
| for (let i = 0;i < elements.length; i += 1) { | ||
| mapped.push(interpreter.visit(exprefNode, elements[i])); | ||
| } | ||
| return mapped; | ||
| }; | ||
| functionMax = ([inputValue]) => { | ||
| if (!inputValue.length) { | ||
| return null; | ||
| } | ||
| const typeName = this.getTypeName(inputValue[0]); | ||
| if (typeName === 0) { | ||
| return Math.max(...inputValue); | ||
| } | ||
| const elements = inputValue; | ||
| let maxElement = elements[0]; | ||
| for (let i = 1;i < elements.length; i += 1) { | ||
| if (maxElement.localeCompare(elements[i]) < 0) { | ||
| maxElement = elements[i]; | ||
| } | ||
| } | ||
| return maxElement; | ||
| }; | ||
| functionMaxBy = (resolvedArgs) => { | ||
| const exprefNode = resolvedArgs[1]; | ||
| const resolvedArray = resolvedArgs[0]; | ||
| const keyFunction = this.createKeyFunction(exprefNode, [0, 2]); | ||
| let maxNumber = -Infinity; | ||
| let maxRecord; | ||
| let current; | ||
| for (let i = 0;i < resolvedArray.length; i += 1) { | ||
| current = keyFunction && keyFunction(resolvedArray[i]); | ||
| if (current !== undefined && current > maxNumber) { | ||
| maxNumber = current; | ||
| maxRecord = resolvedArray[i]; | ||
| } | ||
| } | ||
| return maxRecord || null; | ||
| }; | ||
| functionMerge = (resolvedArgs) => { | ||
| let merged = {}; | ||
| for (let i = 0;i < resolvedArgs.length; i += 1) { | ||
| const current = resolvedArgs[i]; | ||
| merged = Object.assign(merged, current); | ||
| } | ||
| return merged; | ||
| }; | ||
| functionMin = ([inputValue]) => { | ||
| if (!inputValue.length) { | ||
| return null; | ||
| } | ||
| const typeName = this.getTypeName(inputValue[0]); | ||
| if (typeName === 0) { | ||
| return Math.min(...inputValue); | ||
| } | ||
| const elements = inputValue; | ||
| let minElement = elements[0]; | ||
| for (let i = 1;i < elements.length; i += 1) { | ||
| if (elements[i].localeCompare(minElement) < 0) { | ||
| minElement = elements[i]; | ||
| } | ||
| } | ||
| return minElement; | ||
| }; | ||
| functionMinBy = (resolvedArgs) => { | ||
| const exprefNode = resolvedArgs[1]; | ||
| const resolvedArray = resolvedArgs[0]; | ||
| const keyFunction = this.createKeyFunction(exprefNode, [0, 2]); | ||
| let minNumber = Infinity; | ||
| let minRecord; | ||
| let current; | ||
| for (let i = 0;i < resolvedArray.length; i += 1) { | ||
| current = keyFunction && keyFunction(resolvedArray[i]); | ||
| if (current !== undefined && current < minNumber) { | ||
| minNumber = current; | ||
| minRecord = resolvedArray[i]; | ||
| } | ||
| } | ||
| return minRecord || null; | ||
| }; | ||
| functionNotNull = (resolvedArgs) => { | ||
| for (let i = 0;i < resolvedArgs.length; i += 1) { | ||
| if (this.getTypeName(resolvedArgs[i]) !== 7) { | ||
| return resolvedArgs[i]; | ||
| } | ||
| } | ||
| return null; | ||
| }; | ||
| functionPadLeft = this.createPadFunction(padLeft); | ||
| functionPadRight = this.createPadFunction(padRight); | ||
| createPadFunction(padFn) { | ||
| return (resolvedArgs) => { | ||
| const subject = resolvedArgs[0]; | ||
| const width = resolvedArgs[1]; | ||
| const padding = resolvedArgs.length > 2 ? resolvedArgs[2] : undefined; | ||
| return padFn(subject, width, padding); | ||
| }; | ||
| } | ||
| functionReplace = (resolvedArgs) => { | ||
| const subject = resolvedArgs[0]; | ||
| const string = resolvedArgs[1]; | ||
| const by = resolvedArgs[2]; | ||
| return replace(subject, string, by, resolvedArgs.length > 3 ? resolvedArgs[3] : undefined); | ||
| }; | ||
| functionSplit = (resolvedArgs) => { | ||
| const subject = resolvedArgs[0]; | ||
| const search2 = resolvedArgs[1]; | ||
| return split(subject, search2, resolvedArgs.length > 2 ? resolvedArgs[2] : undefined); | ||
| }; | ||
| functionReverse = ([inputValue]) => { | ||
| const typeName = this.getTypeName(inputValue); | ||
| if (typeName === 2) { | ||
| return new Text(inputValue).reverse(); | ||
| } | ||
| const reversedArray = inputValue.slice(0); | ||
| reversedArray.reverse(); | ||
| return reversedArray; | ||
| }; | ||
| functionSort = ([inputValue]) => { | ||
| if (inputValue.length == 0) { | ||
| return inputValue; | ||
| } | ||
| if (typeof inputValue[0] === "string") { | ||
| return [...inputValue].sort(Text.comparer); | ||
| } | ||
| return [...inputValue].sort(); | ||
| }; | ||
| functionSortBy = (resolvedArgs) => { | ||
| const sortedArray = resolvedArgs[0].slice(0); | ||
| if (sortedArray.length === 0) { | ||
| return sortedArray; | ||
| } | ||
| const interpreter = this._interpreter; | ||
| const exprefNode = resolvedArgs[1]; | ||
| const requiredType = this.getTypeName(interpreter.visit(exprefNode, sortedArray[0])); | ||
| if (requiredType !== undefined && ![0, 2].includes(requiredType)) { | ||
| throw new Error(`Invalid type: unexpected type (${this.TYPE_NAME_TABLE[requiredType]})`); | ||
| } | ||
| function throwInvalidTypeError(rt, item) { | ||
| throw new Error(`Invalid type: expected (${rt.TYPE_NAME_TABLE[requiredType]}), received ${rt.TYPE_NAME_TABLE[rt.getTypeName(item)]}`); | ||
| } | ||
| return sortedArray.sort((a, b) => { | ||
| const exprA = interpreter.visit(exprefNode, a); | ||
| const exprB = interpreter.visit(exprefNode, b); | ||
| if (this.getTypeName(exprA) !== requiredType) { | ||
| throwInvalidTypeError(this, exprA); | ||
| } else if (this.getTypeName(exprB) !== requiredType) { | ||
| throwInvalidTypeError(this, exprB); | ||
| } | ||
| if (requiredType === 2) { | ||
| return Text.comparer(exprA, exprB); | ||
| } | ||
| return exprA - exprB; | ||
| }); | ||
| }; | ||
| functionStartsWith = ([searchable, searchStr]) => { | ||
| return searchable.startsWith(searchStr); | ||
| }; | ||
| functionSum = ([inputValue]) => { | ||
| return inputValue.reduce((x, y) => x + y, 0); | ||
| }; | ||
| functionToArray = ([inputValue]) => { | ||
| if (this.getTypeName(inputValue) === 3) { | ||
| return inputValue; | ||
| } | ||
| return [inputValue]; | ||
| }; | ||
| functionToNumber = ([inputValue]) => { | ||
| const typeName = this.getTypeName(inputValue); | ||
| let convertedValue; | ||
| if (typeName === 0) { | ||
| return inputValue; | ||
| } | ||
| if (typeName === 2) { | ||
| convertedValue = +inputValue; | ||
| if (!isNaN(convertedValue)) { | ||
| return convertedValue; | ||
| } | ||
| } | ||
| return null; | ||
| }; | ||
| functionToString = ([inputValue]) => { | ||
| if (this.getTypeName(inputValue) === 2) { | ||
| return inputValue; | ||
| } | ||
| return JSON.stringify(inputValue); | ||
| }; | ||
| functionTrim = this.createTrimFunction(trim); | ||
| functionTrimLeft = this.createTrimFunction(trimLeft); | ||
| functionTrimRight = this.createTrimFunction(trimRight); | ||
| createTrimFunction(trimFn) { | ||
| return (resolvedArgs) => { | ||
| const subject = resolvedArgs[0]; | ||
| const chars = resolvedArgs.length > 1 ? resolvedArgs[1] : undefined; | ||
| return trimFn(subject, chars); | ||
| }; | ||
| } | ||
| functionType = ([inputValue]) => { | ||
| switch (this.getTypeName(inputValue)) { | ||
| case 0: | ||
| return "number"; | ||
| case 2: | ||
| return "string"; | ||
| case 3: | ||
| return "array"; | ||
| case 4: | ||
| return "object"; | ||
| case 5: | ||
| return "boolean"; | ||
| case 7: | ||
| return "null"; | ||
| default: | ||
| throw new Error("invalid-type"); | ||
| } | ||
| }; | ||
| functionZip = (array) => { | ||
| const length = Math.min(...array.map((arr) => arr.length)); | ||
| const result = Array(length).fill(null).map((_, index) => array.map((arr) => arr[index])); | ||
| return result; | ||
| }; | ||
| }; | ||
| var ScopeChain = class _ScopeChain { | ||
| inner = undefined; | ||
| data = {}; | ||
| get currentScopeData() { | ||
| return this.data; | ||
| } | ||
| withScope(data) { | ||
| const outer = new _ScopeChain; | ||
| outer.inner = this; | ||
| outer.data = data; | ||
| return outer; | ||
| } | ||
| getValue(identifier) { | ||
| if (Object.prototype.hasOwnProperty.call(this.data, identifier)) { | ||
| return this.data[identifier]; | ||
| } | ||
| if (this.inner) { | ||
| return this.inner.getValue(identifier); | ||
| } | ||
| return null; | ||
| } | ||
| }; | ||
| var emptyScopeChain = new ScopeChain; | ||
| var TreeInterpreter = class _TreeInterpreter { | ||
| runtime; | ||
| _rootValue = null; | ||
| _scope; | ||
| constructor() { | ||
| this.runtime = new Runtime(this); | ||
| this._scope = new ScopeChain; | ||
| } | ||
| withScope(scope) { | ||
| const interpreter = new _TreeInterpreter; | ||
| interpreter.runtime._functionTable = this.runtime._functionTable; | ||
| interpreter._rootValue = this._rootValue; | ||
| interpreter._scope = this._scope.withScope(scope); | ||
| return interpreter; | ||
| } | ||
| search(node, value) { | ||
| this._rootValue = value; | ||
| this._scope = emptyScopeChain; | ||
| return this.visit(node, value); | ||
| } | ||
| visit(node, value) { | ||
| switch (node.type) { | ||
| case "Ternary": { | ||
| const condition = this.visit(node.condition, value); | ||
| if (!isFalse(condition)) { | ||
| return this.visit(node.trueExpr, value); | ||
| } | ||
| return this.visit(node.falseExpr, value); | ||
| } | ||
| case "Field": | ||
| const identifier = node.name; | ||
| if (value === null || typeof value !== "object" || Array.isArray(value)) { | ||
| return null; | ||
| } | ||
| return value[identifier] ?? null; | ||
| case "LetExpression": { | ||
| const { bindings, expression } = node; | ||
| let scope = {}; | ||
| bindings.forEach((binding) => { | ||
| const reference = this.visit(binding, value); | ||
| scope = { | ||
| ...scope, | ||
| ...reference | ||
| }; | ||
| }); | ||
| return this.withScope(scope).visit(expression, value); | ||
| } | ||
| case "Binding": { | ||
| const { variable, reference } = node; | ||
| const result = this.visit(reference, value); | ||
| return { [variable]: result }; | ||
| } | ||
| case "Variable": { | ||
| const variable = node.name; | ||
| if (!this._scope.getValue(variable) && !Object.prototype.hasOwnProperty.call(this._scope.currentScopeData, variable)) { | ||
| throw new Error(`Error referencing undefined variable ${variable}`); | ||
| } | ||
| return this._scope.getValue(variable); | ||
| } | ||
| case "IndexExpression": | ||
| return this.visit(node.right, this.visit(node.left, value)); | ||
| case "Subexpression": { | ||
| const result = this.visit(node.left, value); | ||
| return result != null ? this.visit(node.right, result) ?? null : null; | ||
| } | ||
| case "Index": { | ||
| if (!Array.isArray(value)) { | ||
| return null; | ||
| } | ||
| const index = node.value < 0 ? value.length + node.value : node.value; | ||
| return value[index] ?? null; | ||
| } | ||
| case "Slice": { | ||
| if (!Array.isArray(value) && typeof value !== "string") { | ||
| return null; | ||
| } | ||
| const { start, stop, step } = this.computeSliceParams(value.length, node); | ||
| if (typeof value === "string") { | ||
| const chars = [...value]; | ||
| const sliced = this.slice(chars, start, stop, step); | ||
| return sliced.join(""); | ||
| } else { | ||
| return this.slice(value, start, stop, step); | ||
| } | ||
| } | ||
| case "Projection": { | ||
| const { left, right } = node; | ||
| let allowString = false; | ||
| if (left.type === "IndexExpression" && left.right.type === "Slice") { | ||
| allowString = true; | ||
| } | ||
| const base = this.visit(left, value); | ||
| if (allowString && typeof base === "string") { | ||
| return this.visit(right, base); | ||
| } | ||
| if (!Array.isArray(base)) { | ||
| return null; | ||
| } | ||
| const collected = []; | ||
| for (const elem of base) { | ||
| const current = this.visit(right, elem); | ||
| if (current !== null) { | ||
| collected.push(current); | ||
| } | ||
| } | ||
| return collected; | ||
| } | ||
| case "ValueProjection": { | ||
| const { left, right } = node; | ||
| const base = this.visit(left, value); | ||
| if (base === null || typeof base !== "object" || Array.isArray(base)) { | ||
| return null; | ||
| } | ||
| const collected = []; | ||
| const values = Object.values(base); | ||
| for (const elem of values) { | ||
| const current = this.visit(right, elem); | ||
| if (current !== null) { | ||
| collected.push(current); | ||
| } | ||
| } | ||
| return collected; | ||
| } | ||
| case "FilterProjection": { | ||
| const { left, right, condition } = node; | ||
| const base = this.visit(left, value); | ||
| if (!Array.isArray(base)) { | ||
| return null; | ||
| } | ||
| const results = []; | ||
| for (const elem of base) { | ||
| const matched = this.visit(condition, elem); | ||
| if (isFalse(matched)) { | ||
| continue; | ||
| } | ||
| const result = this.visit(right, elem); | ||
| if (result !== null) { | ||
| results.push(result); | ||
| } | ||
| } | ||
| return results; | ||
| } | ||
| case "Arithmetic": { | ||
| const first = this.visit(node.left, value); | ||
| const second = this.visit(node.right, value); | ||
| switch (node.operator) { | ||
| case "Plus": | ||
| return add(first, second); | ||
| case "Minus": | ||
| return sub(first, second); | ||
| case "Multiply": | ||
| case "Star": | ||
| return mul(first, second); | ||
| case "Divide": | ||
| return divide(first, second); | ||
| case "Modulo": | ||
| return mod(first, second); | ||
| case "Div": | ||
| return div(first, second); | ||
| default: | ||
| throw new Error(`Syntax error: unknown arithmetic operator: ${node.operator}`); | ||
| } | ||
| } | ||
| case "Unary": { | ||
| const operand = this.visit(node.operand, value); | ||
| switch (node.operator) { | ||
| case "Plus": | ||
| ensureNumbers(operand); | ||
| return operand; | ||
| case "Minus": | ||
| ensureNumbers(operand); | ||
| return -operand; | ||
| default: | ||
| throw new Error(`Syntax error: unknown arithmetic operator: ${node.operator}`); | ||
| } | ||
| } | ||
| case "Comparator": { | ||
| const first = this.visit(node.left, value); | ||
| const second = this.visit(node.right, value); | ||
| switch (node.name) { | ||
| case "EQ": | ||
| return strictDeepEqual(first, second); | ||
| case "NE": | ||
| return !strictDeepEqual(first, second); | ||
| } | ||
| if (typeof first !== "number" || typeof second !== "number") { | ||
| return null; | ||
| } | ||
| switch (node.name) { | ||
| case "GT": | ||
| return first > second; | ||
| case "GTE": | ||
| return first >= second; | ||
| case "LT": | ||
| return first < second; | ||
| case "LTE": | ||
| return first <= second; | ||
| } | ||
| } | ||
| case "Flatten": { | ||
| const original = this.visit(node.child, value); | ||
| return Array.isArray(original) ? original.flat() : null; | ||
| } | ||
| case "Root": | ||
| return this._rootValue; | ||
| case "MultiSelectList": { | ||
| const collected = []; | ||
| for (const child of node.children) { | ||
| collected.push(this.visit(child, value)); | ||
| } | ||
| return collected; | ||
| } | ||
| case "MultiSelectHash": { | ||
| const collected = {}; | ||
| for (const child of node.children) { | ||
| collected[child.name] = this.visit(child.value, value); | ||
| } | ||
| return collected; | ||
| } | ||
| case "OrExpression": { | ||
| const result = this.visit(node.left, value); | ||
| if (isFalse(result)) { | ||
| return this.visit(node.right, value); | ||
| } | ||
| return result; | ||
| } | ||
| case "AndExpression": { | ||
| const result = this.visit(node.left, value); | ||
| if (isFalse(result)) { | ||
| return result; | ||
| } | ||
| return this.visit(node.right, value); | ||
| } | ||
| case "NotExpression": | ||
| return isFalse(this.visit(node.child, value)); | ||
| case "Literal": | ||
| return node.value; | ||
| case "Pipe": | ||
| return this.visit(node.right, this.visit(node.left, value)); | ||
| case "Function": { | ||
| const args = []; | ||
| for (const child of node.children) { | ||
| args.push(this.visit(child, value)); | ||
| } | ||
| return this.runtime.callFunction(node.name, args); | ||
| } | ||
| case "ExpressionReference": | ||
| return { | ||
| expref: true, | ||
| ...node.child | ||
| }; | ||
| case "Current": | ||
| case "Identity": | ||
| return value; | ||
| } | ||
| } | ||
| computeSliceParams(arrayLength, sliceNode) { | ||
| let { start, stop, step } = sliceNode; | ||
| if (step === null) { | ||
| step = 1; | ||
| } else if (step === 0) { | ||
| const error = new Error("Invalid value: slice step cannot be 0"); | ||
| error.name = "RuntimeError"; | ||
| throw error; | ||
| } | ||
| start = start === null ? step < 0 ? arrayLength - 1 : 0 : this.capSliceRange(arrayLength, start, step); | ||
| stop = stop === null ? step < 0 ? -1 : arrayLength : this.capSliceRange(arrayLength, stop, step); | ||
| return { start, stop, step }; | ||
| } | ||
| capSliceRange(arrayLength, actualValue, step) { | ||
| let nextActualValue = actualValue; | ||
| if (nextActualValue < 0) { | ||
| nextActualValue += arrayLength; | ||
| if (nextActualValue < 0) { | ||
| nextActualValue = step < 0 ? -1 : 0; | ||
| } | ||
| } else if (nextActualValue >= arrayLength) { | ||
| nextActualValue = step < 0 ? arrayLength - 1 : arrayLength; | ||
| } | ||
| return nextActualValue; | ||
| } | ||
| slice(collection, start, end, step) { | ||
| const result = []; | ||
| if (step > 0) { | ||
| for (let i = start;i < end; i += step) { | ||
| result.push(collection[i]); | ||
| } | ||
| } else { | ||
| for (let i = start;i > end; i += step) { | ||
| result.push(collection[i]); | ||
| } | ||
| } | ||
| return result; | ||
| } | ||
| }; | ||
| var TreeInterpreterInstance = new TreeInterpreter; | ||
| var TreeInterpreter_default = TreeInterpreterInstance; | ||
| var TYPE_ANY = 1; | ||
| var TYPE_ARRAY = 3; | ||
| var TYPE_ARRAY_ARRAY = 11; | ||
| var TYPE_ARRAY_NUMBER = 8; | ||
| var TYPE_ARRAY_OBJECT = 10; | ||
| var TYPE_ARRAY_STRING = 9; | ||
| var TYPE_BOOLEAN = 5; | ||
| var TYPE_EXPREF = 6; | ||
| var TYPE_NULL = 7; | ||
| var TYPE_NUMBER = 0; | ||
| var TYPE_OBJECT = 4; | ||
| var TYPE_STRING = 2; | ||
| function compile(expression, options) { | ||
| const nodeTree = Parser_default.parse(expression, options); | ||
| return nodeTree; | ||
| } | ||
| function tokenize(expression, options) { | ||
| return Lexer_default.tokenize(expression, options); | ||
| } | ||
| var registerFunction = (functionName, customFunction, signature, options) => { | ||
| TreeInterpreter_default.runtime.registerFunction(functionName, customFunction, signature, options); | ||
| }; | ||
| var register = (name, customFunction, signature, options) => { | ||
| return TreeInterpreter_default.runtime.register(name, customFunction, signature, options); | ||
| }; | ||
| var unregisterFunction = (name) => { | ||
| return TreeInterpreter_default.runtime.unregister(name); | ||
| }; | ||
| var isRegistered = (name) => { | ||
| return TreeInterpreter_default.runtime.isRegistered(name); | ||
| }; | ||
| var getRegisteredFunctions = () => { | ||
| return TreeInterpreter_default.runtime.getRegistered(); | ||
| }; | ||
| var getCustomFunctions = () => { | ||
| return TreeInterpreter_default.runtime.getCustomFunctions(); | ||
| }; | ||
| var clearCustomFunctions = () => { | ||
| TreeInterpreter_default.runtime.clearCustomFunctions(); | ||
| }; | ||
| function search(data, expression, options) { | ||
| const nodeTree = Parser_default.parse(expression, options); | ||
| return TreeInterpreter_default.search(nodeTree, data); | ||
| } | ||
| function Scope() { | ||
| return new ScopeChain; | ||
| } | ||
| var TreeInterpreter2 = TreeInterpreter_default; | ||
| var jmespath = { | ||
| compile, | ||
| registerFunction, | ||
| register, | ||
| unregisterFunction, | ||
| isRegistered, | ||
| getRegisteredFunctions, | ||
| getCustomFunctions, | ||
| clearCustomFunctions, | ||
| search, | ||
| tokenize, | ||
| TreeInterpreter: TreeInterpreter2, | ||
| TYPE_ANY, | ||
| TYPE_ARRAY_NUMBER, | ||
| TYPE_ARRAY_STRING, | ||
| TYPE_ARRAY, | ||
| TYPE_BOOLEAN, | ||
| TYPE_EXPREF, | ||
| TYPE_NULL, | ||
| TYPE_NUMBER, | ||
| TYPE_OBJECT, | ||
| TYPE_STRING | ||
| }; | ||
| export { | ||
| unregisterFunction, | ||
| tokenize, | ||
| search, | ||
| registerFunction, | ||
| register, | ||
| jmespath, | ||
| isRegistered, | ||
| getRegisteredFunctions, | ||
| getCustomFunctions, | ||
| jmespath as default, | ||
| compile, | ||
| clearCustomFunctions, | ||
| TreeInterpreter2 as TreeInterpreter, | ||
| TYPE_STRING, | ||
| TYPE_OBJECT, | ||
| TYPE_NUMBER, | ||
| TYPE_NULL, | ||
| TYPE_EXPREF, | ||
| TYPE_BOOLEAN, | ||
| TYPE_ARRAY_STRING, | ||
| TYPE_ARRAY_OBJECT, | ||
| TYPE_ARRAY_NUMBER, | ||
| TYPE_ARRAY_ARRAY, | ||
| TYPE_ARRAY, | ||
| TYPE_ANY, | ||
| Scope | ||
| }; | ||
| //# debugId=FA9FB28BF9A093C864756E2164756E21 |
| import"./packager-tool-wckvcay0.js"; | ||
| // ../../node_modules/open/index.js | ||
| import process7 from "node:process"; | ||
| import path from "node:path"; | ||
| import { fileURLToPath } from "node:url"; | ||
| import childProcess3 from "node:child_process"; | ||
| import fs5, { constants as fsConstants2 } from "node:fs/promises"; | ||
| // ../../node_modules/wsl-utils/index.js | ||
| import { promisify as promisify2 } from "node:util"; | ||
| import childProcess2 from "node:child_process"; | ||
| import fs4, { constants as fsConstants } from "node:fs/promises"; | ||
| // ../../node_modules/wsl-utils/node_modules/is-wsl/index.js | ||
| import process from "node:process"; | ||
| import os from "node:os"; | ||
| import fs3 from "node:fs"; | ||
| // ../../node_modules/is-inside-container/index.js | ||
| import fs2 from "node:fs"; | ||
| // ../../node_modules/is-inside-container/node_modules/is-docker/index.js | ||
| import fs from "node:fs"; | ||
| var isDockerCached; | ||
| function hasDockerEnv() { | ||
| try { | ||
| fs.statSync("/.dockerenv"); | ||
| return true; | ||
| } catch { | ||
| return false; | ||
| } | ||
| } | ||
| function hasDockerCGroup() { | ||
| try { | ||
| return fs.readFileSync("/proc/self/cgroup", "utf8").includes("docker"); | ||
| } catch { | ||
| return false; | ||
| } | ||
| } | ||
| function isDocker() { | ||
| if (isDockerCached === undefined) { | ||
| isDockerCached = hasDockerEnv() || hasDockerCGroup(); | ||
| } | ||
| return isDockerCached; | ||
| } | ||
| // ../../node_modules/is-inside-container/index.js | ||
| var cachedResult; | ||
| var hasContainerEnv = () => { | ||
| try { | ||
| fs2.statSync("/run/.containerenv"); | ||
| return true; | ||
| } catch { | ||
| return false; | ||
| } | ||
| }; | ||
| function isInsideContainer() { | ||
| if (cachedResult === undefined) { | ||
| cachedResult = hasContainerEnv() || isDocker(); | ||
| } | ||
| return cachedResult; | ||
| } | ||
| // ../../node_modules/wsl-utils/node_modules/is-wsl/index.js | ||
| var isWsl = () => { | ||
| if (process.platform !== "linux") { | ||
| return false; | ||
| } | ||
| if (os.release().toLowerCase().includes("microsoft")) { | ||
| if (isInsideContainer()) { | ||
| return false; | ||
| } | ||
| return true; | ||
| } | ||
| try { | ||
| if (fs3.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft")) { | ||
| return !isInsideContainer(); | ||
| } | ||
| } catch {} | ||
| if (fs3.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop") || fs3.existsSync("/run/WSL")) { | ||
| return !isInsideContainer(); | ||
| } | ||
| return false; | ||
| }; | ||
| var is_wsl_default = process.env.__IS_WSL_TEST__ ? isWsl : isWsl(); | ||
| // ../../node_modules/powershell-utils/index.js | ||
| import process2 from "node:process"; | ||
| import { Buffer } from "node:buffer"; | ||
| import { promisify } from "node:util"; | ||
| import childProcess from "node:child_process"; | ||
| var execFile = promisify(childProcess.execFile); | ||
| var powerShellPath = () => `${process2.env.SYSTEMROOT || process2.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`; | ||
| var executePowerShell = async (command, options = {}) => { | ||
| const { | ||
| powerShellPath: psPath, | ||
| ...execFileOptions | ||
| } = options; | ||
| const encodedCommand = executePowerShell.encodeCommand(command); | ||
| return execFile(psPath ?? powerShellPath(), [ | ||
| ...executePowerShell.argumentsPrefix, | ||
| encodedCommand | ||
| ], { | ||
| encoding: "utf8", | ||
| ...execFileOptions | ||
| }); | ||
| }; | ||
| executePowerShell.argumentsPrefix = [ | ||
| "-NoProfile", | ||
| "-NonInteractive", | ||
| "-ExecutionPolicy", | ||
| "Bypass", | ||
| "-EncodedCommand" | ||
| ]; | ||
| executePowerShell.encodeCommand = (command) => Buffer.from(command, "utf16le").toString("base64"); | ||
| executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`; | ||
| // ../../node_modules/wsl-utils/utilities.js | ||
| function parseMountPointFromConfig(content) { | ||
| for (const line of content.split(` | ||
| `)) { | ||
| if (/^\s*#/.test(line)) { | ||
| continue; | ||
| } | ||
| const match = /^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(line); | ||
| if (!match) { | ||
| continue; | ||
| } | ||
| return match.groups.mountPoint.trim().replaceAll(/^["']|["']$/g, ""); | ||
| } | ||
| } | ||
| // ../../node_modules/wsl-utils/index.js | ||
| var execFile2 = promisify2(childProcess2.execFile); | ||
| var wslDrivesMountPoint = (() => { | ||
| const defaultMountPoint = "/mnt/"; | ||
| let mountPoint; | ||
| return async function() { | ||
| if (mountPoint) { | ||
| return mountPoint; | ||
| } | ||
| const configFilePath = "/etc/wsl.conf"; | ||
| let isConfigFileExists = false; | ||
| try { | ||
| await fs4.access(configFilePath, fsConstants.F_OK); | ||
| isConfigFileExists = true; | ||
| } catch {} | ||
| if (!isConfigFileExists) { | ||
| return defaultMountPoint; | ||
| } | ||
| const configContent = await fs4.readFile(configFilePath, { encoding: "utf8" }); | ||
| const parsedMountPoint = parseMountPointFromConfig(configContent); | ||
| if (parsedMountPoint === undefined) { | ||
| return defaultMountPoint; | ||
| } | ||
| mountPoint = parsedMountPoint; | ||
| mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`; | ||
| return mountPoint; | ||
| }; | ||
| })(); | ||
| var powerShellPathFromWsl = async () => { | ||
| const mountPoint = await wslDrivesMountPoint(); | ||
| return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`; | ||
| }; | ||
| var powerShellPath2 = is_wsl_default ? powerShellPathFromWsl : powerShellPath; | ||
| var canAccessPowerShellPromise; | ||
| var canAccessPowerShell = async () => { | ||
| canAccessPowerShellPromise ??= (async () => { | ||
| try { | ||
| const psPath = await powerShellPath2(); | ||
| await fs4.access(psPath, fsConstants.X_OK); | ||
| return true; | ||
| } catch { | ||
| return false; | ||
| } | ||
| })(); | ||
| return canAccessPowerShellPromise; | ||
| }; | ||
| var wslDefaultBrowser = async () => { | ||
| const psPath = await powerShellPath2(); | ||
| const command = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`; | ||
| const { stdout } = await executePowerShell(command, { powerShellPath: psPath }); | ||
| return stdout.trim(); | ||
| }; | ||
| var convertWslPathToWindows = async (path) => { | ||
| if (/^[a-z]+:\/\//i.test(path)) { | ||
| return path; | ||
| } | ||
| try { | ||
| const { stdout } = await execFile2("wslpath", ["-aw", path], { encoding: "utf8" }); | ||
| return stdout.trim(); | ||
| } catch { | ||
| return path; | ||
| } | ||
| }; | ||
| // ../../node_modules/open/node_modules/define-lazy-prop/index.js | ||
| function defineLazyProperty(object, propertyName, valueGetter) { | ||
| const define = (value) => Object.defineProperty(object, propertyName, { value, enumerable: true, writable: true }); | ||
| Object.defineProperty(object, propertyName, { | ||
| configurable: true, | ||
| enumerable: true, | ||
| get() { | ||
| const result = valueGetter(); | ||
| define(result); | ||
| return result; | ||
| }, | ||
| set(value) { | ||
| define(value); | ||
| } | ||
| }); | ||
| return object; | ||
| } | ||
| // ../../node_modules/default-browser/index.js | ||
| import { promisify as promisify6 } from "node:util"; | ||
| import process5 from "node:process"; | ||
| import { execFile as execFile6 } from "node:child_process"; | ||
| // ../../node_modules/default-browser-id/index.js | ||
| import { promisify as promisify3 } from "node:util"; | ||
| import process3 from "node:process"; | ||
| import { execFile as execFile3 } from "node:child_process"; | ||
| var execFileAsync = promisify3(execFile3); | ||
| async function defaultBrowserId() { | ||
| if (process3.platform !== "darwin") { | ||
| throw new Error("macOS only"); | ||
| } | ||
| const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]); | ||
| const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout); | ||
| const browserId = match?.groups.id ?? "com.apple.Safari"; | ||
| if (browserId === "com.apple.safari") { | ||
| return "com.apple.Safari"; | ||
| } | ||
| return browserId; | ||
| } | ||
| // ../../node_modules/run-applescript/index.js | ||
| import process4 from "node:process"; | ||
| import { promisify as promisify4 } from "node:util"; | ||
| import { execFile as execFile4, execFileSync } from "node:child_process"; | ||
| var execFileAsync2 = promisify4(execFile4); | ||
| async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) { | ||
| if (process4.platform !== "darwin") { | ||
| throw new Error("macOS only"); | ||
| } | ||
| const outputArguments = humanReadableOutput ? [] : ["-ss"]; | ||
| const execOptions = {}; | ||
| if (signal) { | ||
| execOptions.signal = signal; | ||
| } | ||
| const { stdout } = await execFileAsync2("osascript", ["-e", script, outputArguments], execOptions); | ||
| return stdout.trim(); | ||
| } | ||
| // ../../node_modules/bundle-name/index.js | ||
| async function bundleName(bundleId) { | ||
| return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string | ||
| tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`); | ||
| } | ||
| // ../../node_modules/default-browser/windows.js | ||
| import { promisify as promisify5 } from "node:util"; | ||
| import { execFile as execFile5 } from "node:child_process"; | ||
| var execFileAsync3 = promisify5(execFile5); | ||
| var windowsBrowserProgIds = { | ||
| MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" }, | ||
| MSEdgeBHTML: { name: "Edge Beta", id: "com.microsoft.edge.beta" }, | ||
| MSEdgeDHTML: { name: "Edge Dev", id: "com.microsoft.edge.dev" }, | ||
| AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" }, | ||
| ChromeHTML: { name: "Chrome", id: "com.google.chrome" }, | ||
| ChromeBHTML: { name: "Chrome Beta", id: "com.google.chrome.beta" }, | ||
| ChromeDHTML: { name: "Chrome Dev", id: "com.google.chrome.dev" }, | ||
| ChromiumHTM: { name: "Chromium", id: "org.chromium.Chromium" }, | ||
| BraveHTML: { name: "Brave", id: "com.brave.Browser" }, | ||
| BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" }, | ||
| BraveDHTML: { name: "Brave Dev", id: "com.brave.Browser.dev" }, | ||
| BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" }, | ||
| FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" }, | ||
| OperaStable: { name: "Opera", id: "com.operasoftware.Opera" }, | ||
| VivaldiHTM: { name: "Vivaldi", id: "com.vivaldi.Vivaldi" }, | ||
| "IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" } | ||
| }; | ||
| var _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds)); | ||
| class UnknownBrowserError extends Error { | ||
| } | ||
| async function defaultBrowser(_execFileAsync = execFileAsync3) { | ||
| const { stdout } = await _execFileAsync("reg", [ | ||
| "QUERY", | ||
| " HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice", | ||
| "/v", | ||
| "ProgId" | ||
| ]); | ||
| const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout); | ||
| if (!match) { | ||
| throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`); | ||
| } | ||
| const { id } = match.groups; | ||
| const dotIndex = id.lastIndexOf("."); | ||
| const hyphenIndex = id.lastIndexOf("-"); | ||
| const baseIdByDot = dotIndex === -1 ? undefined : id.slice(0, dotIndex); | ||
| const baseIdByHyphen = hyphenIndex === -1 ? undefined : id.slice(0, hyphenIndex); | ||
| return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? { name: id, id }; | ||
| } | ||
| // ../../node_modules/default-browser/index.js | ||
| var execFileAsync4 = promisify6(execFile6); | ||
| var titleize = (string) => string.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x) => x.toUpperCase()); | ||
| async function defaultBrowser2() { | ||
| if (process5.platform === "darwin") { | ||
| const id = await defaultBrowserId(); | ||
| const name = await bundleName(id); | ||
| return { name, id }; | ||
| } | ||
| if (process5.platform === "linux") { | ||
| const { stdout } = await execFileAsync4("xdg-mime", ["query", "default", "x-scheme-handler/http"]); | ||
| const id = stdout.trim(); | ||
| const name = titleize(id.replace(/.desktop$/, "").replace("-", " ")); | ||
| return { name, id }; | ||
| } | ||
| if (process5.platform === "win32") { | ||
| return defaultBrowser(); | ||
| } | ||
| throw new Error("Only macOS, Linux, and Windows are supported"); | ||
| } | ||
| // ../../node_modules/is-in-ssh/index.js | ||
| import process6 from "node:process"; | ||
| var isInSsh = Boolean(process6.env.SSH_CONNECTION || process6.env.SSH_CLIENT || process6.env.SSH_TTY); | ||
| var is_in_ssh_default = isInSsh; | ||
| // ../../node_modules/open/index.js | ||
| var fallbackAttemptSymbol = Symbol("fallbackAttempt"); | ||
| var __dirname2 = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : ""; | ||
| var localXdgOpenPath = path.join(__dirname2, "xdg-open"); | ||
| var { platform, arch } = process7; | ||
| var tryEachApp = async (apps, opener) => { | ||
| if (apps.length === 0) { | ||
| return; | ||
| } | ||
| const errors = []; | ||
| for (const app of apps) { | ||
| try { | ||
| return await opener(app); | ||
| } catch (error) { | ||
| errors.push(error); | ||
| } | ||
| } | ||
| throw new AggregateError(errors, "Failed to open in all supported apps"); | ||
| }; | ||
| var baseOpen = async (options) => { | ||
| options = { | ||
| wait: false, | ||
| background: false, | ||
| newInstance: false, | ||
| allowNonzeroExitCode: false, | ||
| ...options | ||
| }; | ||
| const isFallbackAttempt = options[fallbackAttemptSymbol] === true; | ||
| delete options[fallbackAttemptSymbol]; | ||
| if (Array.isArray(options.app)) { | ||
| return tryEachApp(options.app, (singleApp) => baseOpen({ | ||
| ...options, | ||
| app: singleApp, | ||
| [fallbackAttemptSymbol]: true | ||
| })); | ||
| } | ||
| let { name: app, arguments: appArguments = [] } = options.app ?? {}; | ||
| appArguments = [...appArguments]; | ||
| if (Array.isArray(app)) { | ||
| return tryEachApp(app, (appName) => baseOpen({ | ||
| ...options, | ||
| app: { | ||
| name: appName, | ||
| arguments: appArguments | ||
| }, | ||
| [fallbackAttemptSymbol]: true | ||
| })); | ||
| } | ||
| if (app === "browser" || app === "browserPrivate") { | ||
| const ids = { | ||
| "com.google.chrome": "chrome", | ||
| "google-chrome.desktop": "chrome", | ||
| "com.brave.browser": "brave", | ||
| "org.mozilla.firefox": "firefox", | ||
| "firefox.desktop": "firefox", | ||
| "com.microsoft.msedge": "edge", | ||
| "com.microsoft.edge": "edge", | ||
| "com.microsoft.edgemac": "edge", | ||
| "microsoft-edge.desktop": "edge", | ||
| "com.apple.safari": "safari" | ||
| }; | ||
| const flags = { | ||
| chrome: "--incognito", | ||
| brave: "--incognito", | ||
| firefox: "--private-window", | ||
| edge: "--inPrivate" | ||
| }; | ||
| let browser; | ||
| if (is_wsl_default) { | ||
| const progId = await wslDefaultBrowser(); | ||
| const browserInfo = _windowsBrowserProgIdMap.get(progId); | ||
| browser = browserInfo ?? {}; | ||
| } else { | ||
| browser = await defaultBrowser2(); | ||
| } | ||
| if (browser.id in ids) { | ||
| const browserName = ids[browser.id.toLowerCase()]; | ||
| if (app === "browserPrivate") { | ||
| if (browserName === "safari") { | ||
| throw new Error("Safari doesn't support opening in private mode via command line"); | ||
| } | ||
| appArguments.push(flags[browserName]); | ||
| } | ||
| return baseOpen({ | ||
| ...options, | ||
| app: { | ||
| name: apps[browserName], | ||
| arguments: appArguments | ||
| } | ||
| }); | ||
| } | ||
| throw new Error(`${browser.name} is not supported as a default browser`); | ||
| } | ||
| let command; | ||
| const cliArguments = []; | ||
| const childProcessOptions = {}; | ||
| let shouldUseWindowsInWsl = false; | ||
| if (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) { | ||
| shouldUseWindowsInWsl = await canAccessPowerShell(); | ||
| } | ||
| if (platform === "darwin") { | ||
| command = "open"; | ||
| if (options.wait) { | ||
| cliArguments.push("--wait-apps"); | ||
| } | ||
| if (options.background) { | ||
| cliArguments.push("--background"); | ||
| } | ||
| if (options.newInstance) { | ||
| cliArguments.push("--new"); | ||
| } | ||
| if (app) { | ||
| cliArguments.push("-a", app); | ||
| } | ||
| } else if (platform === "win32" || shouldUseWindowsInWsl) { | ||
| command = await powerShellPath2(); | ||
| cliArguments.push(...executePowerShell.argumentsPrefix); | ||
| if (!is_wsl_default) { | ||
| childProcessOptions.windowsVerbatimArguments = true; | ||
| } | ||
| if (is_wsl_default && options.target) { | ||
| options.target = await convertWslPathToWindows(options.target); | ||
| } | ||
| const encodedArguments = ["$ProgressPreference = 'SilentlyContinue';", "Start"]; | ||
| if (options.wait) { | ||
| encodedArguments.push("-Wait"); | ||
| } | ||
| if (app) { | ||
| encodedArguments.push(executePowerShell.escapeArgument(app)); | ||
| if (options.target) { | ||
| appArguments.push(options.target); | ||
| } | ||
| } else if (options.target) { | ||
| encodedArguments.push(executePowerShell.escapeArgument(options.target)); | ||
| } | ||
| if (appArguments.length > 0) { | ||
| appArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument)); | ||
| encodedArguments.push("-ArgumentList", appArguments.join(",")); | ||
| } | ||
| options.target = executePowerShell.encodeCommand(encodedArguments.join(" ")); | ||
| if (!options.wait) { | ||
| childProcessOptions.stdio = "ignore"; | ||
| } | ||
| } else { | ||
| if (app) { | ||
| command = app; | ||
| } else { | ||
| const isBundled = !__dirname2 || __dirname2 === "/"; | ||
| let exeLocalXdgOpen = false; | ||
| try { | ||
| await fs5.access(localXdgOpenPath, fsConstants2.X_OK); | ||
| exeLocalXdgOpen = true; | ||
| } catch {} | ||
| const useSystemXdgOpen = process7.versions.electron ?? (platform === "android" || isBundled || !exeLocalXdgOpen); | ||
| command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath; | ||
| } | ||
| if (appArguments.length > 0) { | ||
| cliArguments.push(...appArguments); | ||
| } | ||
| if (!options.wait) { | ||
| childProcessOptions.stdio = "ignore"; | ||
| childProcessOptions.detached = true; | ||
| } | ||
| } | ||
| if (platform === "darwin" && appArguments.length > 0) { | ||
| cliArguments.push("--args", ...appArguments); | ||
| } | ||
| if (options.target) { | ||
| cliArguments.push(options.target); | ||
| } | ||
| const subprocess = childProcess3.spawn(command, cliArguments, childProcessOptions); | ||
| if (options.wait) { | ||
| return new Promise((resolve, reject) => { | ||
| subprocess.once("error", reject); | ||
| subprocess.once("close", (exitCode) => { | ||
| if (!options.allowNonzeroExitCode && exitCode !== 0) { | ||
| reject(new Error(`Exited with code ${exitCode}`)); | ||
| return; | ||
| } | ||
| resolve(subprocess); | ||
| }); | ||
| }); | ||
| } | ||
| if (isFallbackAttempt) { | ||
| return new Promise((resolve, reject) => { | ||
| subprocess.once("error", reject); | ||
| subprocess.once("spawn", () => { | ||
| subprocess.once("close", (exitCode) => { | ||
| subprocess.off("error", reject); | ||
| if (exitCode !== 0) { | ||
| reject(new Error(`Exited with code ${exitCode}`)); | ||
| return; | ||
| } | ||
| subprocess.unref(); | ||
| resolve(subprocess); | ||
| }); | ||
| }); | ||
| }); | ||
| } | ||
| subprocess.unref(); | ||
| return new Promise((resolve, reject) => { | ||
| subprocess.once("error", reject); | ||
| subprocess.once("spawn", () => { | ||
| subprocess.off("error", reject); | ||
| resolve(subprocess); | ||
| }); | ||
| }); | ||
| }; | ||
| var open = (target, options) => { | ||
| if (typeof target !== "string") { | ||
| throw new TypeError("Expected a `target`"); | ||
| } | ||
| return baseOpen({ | ||
| ...options, | ||
| target | ||
| }); | ||
| }; | ||
| var openApp = (name, options) => { | ||
| if (typeof name !== "string" && !Array.isArray(name)) { | ||
| throw new TypeError("Expected a valid `name`"); | ||
| } | ||
| const { arguments: appArguments = [] } = options ?? {}; | ||
| if (appArguments !== undefined && appArguments !== null && !Array.isArray(appArguments)) { | ||
| throw new TypeError("Expected `appArguments` as Array type"); | ||
| } | ||
| return baseOpen({ | ||
| ...options, | ||
| app: { | ||
| name, | ||
| arguments: appArguments | ||
| } | ||
| }); | ||
| }; | ||
| function detectArchBinary(binary) { | ||
| if (typeof binary === "string" || Array.isArray(binary)) { | ||
| return binary; | ||
| } | ||
| const { [arch]: archBinary } = binary; | ||
| if (!archBinary) { | ||
| throw new Error(`${arch} is not supported`); | ||
| } | ||
| return archBinary; | ||
| } | ||
| function detectPlatformBinary({ [platform]: platformBinary }, { wsl } = {}) { | ||
| if (wsl && is_wsl_default) { | ||
| return detectArchBinary(wsl); | ||
| } | ||
| if (!platformBinary) { | ||
| throw new Error(`${platform} is not supported`); | ||
| } | ||
| return detectArchBinary(platformBinary); | ||
| } | ||
| var apps = { | ||
| browser: "browser", | ||
| browserPrivate: "browserPrivate" | ||
| }; | ||
| defineLazyProperty(apps, "chrome", () => detectPlatformBinary({ | ||
| darwin: "google chrome", | ||
| win32: "chrome", | ||
| linux: ["google-chrome", "google-chrome-stable", "chromium", "chromium-browser"] | ||
| }, { | ||
| wsl: { | ||
| ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe", | ||
| x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"] | ||
| } | ||
| })); | ||
| defineLazyProperty(apps, "brave", () => detectPlatformBinary({ | ||
| darwin: "brave browser", | ||
| win32: "brave", | ||
| linux: ["brave-browser", "brave"] | ||
| }, { | ||
| wsl: { | ||
| ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe", | ||
| x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"] | ||
| } | ||
| })); | ||
| defineLazyProperty(apps, "firefox", () => detectPlatformBinary({ | ||
| darwin: "firefox", | ||
| win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`, | ||
| linux: "firefox" | ||
| }, { | ||
| wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe" | ||
| })); | ||
| defineLazyProperty(apps, "edge", () => detectPlatformBinary({ | ||
| darwin: "microsoft edge", | ||
| win32: "msedge", | ||
| linux: ["microsoft-edge", "microsoft-edge-dev"] | ||
| }, { | ||
| wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe" | ||
| })); | ||
| defineLazyProperty(apps, "safari", () => detectPlatformBinary({ | ||
| darwin: "Safari" | ||
| })); | ||
| var open_default = open; | ||
| export { | ||
| openApp, | ||
| open_default as default, | ||
| apps | ||
| }; | ||
| //# debugId=75EAFE8AF98B350C64756E2164756E21 |
| import { | ||
| AGENT_NODE_TYPES, | ||
| AGENT_RESOURCE_PREFIX, | ||
| AGENT_TARGET_RUNTIME, | ||
| ANALYZE_FILES_SCHEMA, | ||
| AUTONOMOUS_AGENT_NODE_TYPE, | ||
| BATCH_TRANSFORM_SCHEMA, | ||
| BINDINGS_PATH_PREFIX, | ||
| BINDINGS_PLACEHOLDER_PATH_PREFIX, | ||
| BUILT_IN_TOOL_SCHEMAS, | ||
| CONNECTOR_EVENT_PREFIX, | ||
| CONNECTOR_TRIGGER_PREFIX, | ||
| CONVERSATIONAL_AGENT_ICON, | ||
| CONVERSATIONAL_AGENT_NODE_TYPE, | ||
| CONVERSATIONAL_AGENT_SETTINGS, | ||
| CONVERSATIONAL_OUTPUTS_MIN_VERSION, | ||
| CONVERSATIONAL_VOICE_END_CALL_NODE_TYPE, | ||
| CURRENT_WORKFLOW_VERSION, | ||
| DECISION_NODE_TYPE, | ||
| DEFAULT_CONVERSATIONAL_VOICE_MODEL, | ||
| DEFAULT_CONVERSATIONAL_VOICE_SETTINGS, | ||
| DEFAULT_LOCALE, | ||
| DEFAULT_STORAGE_VERSION, | ||
| DEFAULT_WORKFLOW_RUNTIME, | ||
| EMPTY_VARIABLES, | ||
| ESCALATION_QUICK_FORM_NODE_TYPE, | ||
| ESCALATION_TASK_TYPE, | ||
| ESCALATION_TYPE_CODE, | ||
| EntryPointType, | ||
| FLAT_SEP, | ||
| HITL_CODED_ACTION_NODE_TYPE, | ||
| HITL_DOC_VALIDATION_NODE_TYPE, | ||
| HITL_NODE_TYPE, | ||
| HITL_NODE_TYPES, | ||
| HITL_QUICK_FORM_NODE_TYPE, | ||
| JS_EXPRESSION_PREFIX, | ||
| JobAttachmentSchema, | ||
| LOOP_NODE_TYPE, | ||
| MINIMUM_SUPPORTED_SCHEMA_VERSION, | ||
| ProjectType, | ||
| RESERVED_WORDS, | ||
| RecipientType, | ||
| SUBFLOW_NODE_TYPE, | ||
| SUMMARIZE_SCHEMA, | ||
| SUPPORTED_LOCALES, | ||
| SWITCH_NODE_TYPE, | ||
| SYNTHETIC_GATEWAY_OUTPUT_KEYS, | ||
| TRIGGER_NODE_PREFIX, | ||
| TRIGGER_TYPE_PREFIXES, | ||
| VALIDATION_NAMESPACE, | ||
| VALID_IDENTIFIER_PATTERN, | ||
| VOICE_AGENT_NODE_TYPE, | ||
| VOICE_MODELS, | ||
| WEEKDAYS, | ||
| WORKFLOW_VERSIONS, | ||
| addNodePanelConfigSchema, | ||
| addNodePanelCreateActionSchema, | ||
| addNodePanelSearchScopeSchema, | ||
| agentEnforcementsSchema, | ||
| applyJsonPointer, | ||
| argumentBindingSchema, | ||
| bindingSchema, | ||
| buildInputSchema, | ||
| buildOutputSchema, | ||
| canAcceptMoreConnections, | ||
| categoryManifestSchema2, | ||
| checkCategoryConstraint, | ||
| clearValidatorCache, | ||
| cliRules, | ||
| coerceInputsViaSchema, | ||
| coerceToExpressionValue, | ||
| compareVersions, | ||
| conditionExpressionRule, | ||
| connectionConstraintSchema2, | ||
| constraintWithAddNodePanel, | ||
| containsRef, | ||
| createBindingPackage, | ||
| createDotNetTypeMapping, | ||
| createI18nRegistrar, | ||
| createInputSchemaFromAppSchema, | ||
| createOutcomeMappingFromSchema, | ||
| createOutputSchemaFromAppSchema, | ||
| createRefResolver, | ||
| currentAgentStorageSchema, | ||
| currentStorageSchema, | ||
| dataTransformRule, | ||
| decodeLiteral, | ||
| decodeLiteralForValidation, | ||
| decodeLiteralsForValidation, | ||
| deduplicateBindings, | ||
| deepEqual, | ||
| edgeSchema, | ||
| encodeLiteral, | ||
| evaluateCondition, | ||
| evaluateExpression, | ||
| evaluateTemplate, | ||
| executeWritePlan, | ||
| expectedTypeToFieldType, | ||
| expressionFieldTypeSchema, | ||
| expressionLikeSchema, | ||
| expressionModeSchema, | ||
| expressionValueSchema, | ||
| fileFormatToInMemoryWorkflow, | ||
| findDefaultEntryPointNodeId, | ||
| findDuplicateHitlChannelKeys, | ||
| generalRules, | ||
| generateBindingsJson, | ||
| generateEntryPointsJson, | ||
| generateNextId, | ||
| generateOperateJson, | ||
| generatePackageDescriptor, | ||
| generateRandomId, | ||
| generateWorkflowPackaging, | ||
| getAllEntryPoints, | ||
| getBindingResourceValue, | ||
| getBindingResources, | ||
| getBuiltInToolSchema, | ||
| getCronExpressionFromTimeCycleValue, | ||
| getDefaultAgentContent, | ||
| getEffectiveTriggerInputs, | ||
| getEntryPoints, | ||
| getFieldValidator, | ||
| getHitlFieldChannelKey, | ||
| getJsExpressionBody, | ||
| getManifestForNode, | ||
| getNodeLabel, | ||
| getNodeValidator, | ||
| getOutcomeNames, | ||
| getPersonasForModel, | ||
| getStartEventNodes, | ||
| getTimeCycleFromCronExpression, | ||
| getToolFields, | ||
| getVoiceModel, | ||
| governanceRule, | ||
| handleTargetSchema2, | ||
| idSchema, | ||
| inMemoryWorkflowToFileFormat, | ||
| isAgentNodeType, | ||
| isAgentResourceNode, | ||
| isAgentResourceNodeType, | ||
| isAgentToolNodeType, | ||
| isAutoDerivedFieldBinding, | ||
| isAutonomousAgentNodeType, | ||
| isBlockingSeverity, | ||
| isCallContextEmpty, | ||
| isContextNode, | ||
| isConversationalOrVoiceAgentNodeType, | ||
| isEmptyExpressionValue, | ||
| isEndNodeType, | ||
| isEscalationNode, | ||
| isExpression, | ||
| isExpressionValue, | ||
| isGatewayNodeType, | ||
| isHitlInputDirectionField, | ||
| isHitlNodeType, | ||
| isHitlOutputDirectionField, | ||
| isJsonSchema, | ||
| isLoopNodeType, | ||
| isMcpNode, | ||
| isMemoryNode, | ||
| isPlainObject, | ||
| isQuartzCron, | ||
| isQuickFormEscalationNode, | ||
| isStartEventNode, | ||
| isSubflowNodeType, | ||
| isToolNode, | ||
| isTriggerNodeType, | ||
| isValidQuartzCron, | ||
| isVoiceAgentNodeType, | ||
| layoutSchema, | ||
| manifestResponseSchema, | ||
| matchesTypePattern, | ||
| maxIterationsExceededMessage, | ||
| maxTokensExceededMessage, | ||
| meetsMinimumConnections, | ||
| mergeBindingResources, | ||
| minConnectionsRule, | ||
| modelNotAvailableMessage, | ||
| nodeLayoutSchema, | ||
| nodeManifestSchema, | ||
| nodeManifestSchema2, | ||
| nodeSchema2, | ||
| nodeVariableSchema, | ||
| normalizeInputDefinition, | ||
| normalizeLocale, | ||
| outputMappingRule, | ||
| parseCronToFrequency, | ||
| parsePointerTokens, | ||
| parseWorkflowJson, | ||
| planWriteThrough, | ||
| registerFlowSchemaI18n, | ||
| resolveAndConvertWorkflow, | ||
| resolveContextBindingPlaceholders, | ||
| resolveEscalationTaskType, | ||
| resolveNestedFieldSchema, | ||
| resolveRefs, | ||
| resolveSupportedLocale, | ||
| resolveTemplate, | ||
| runRules, | ||
| sanitizeFileName, | ||
| schemaErrorsToValidationErrors, | ||
| schemaValidationRule, | ||
| serializeFrequencyToCron, | ||
| shouldBlockAction, | ||
| stripAutoDerivedFieldBindings, | ||
| subflowEntrySchema, | ||
| subflowFileSchema5, | ||
| temperatureExceededMessage, | ||
| toJsonPointer, | ||
| triggerRequiredRule, | ||
| unresolveRefs, | ||
| validateConnection, | ||
| variableToJsonSchema, | ||
| variableUpdateSchema, | ||
| versionSchema2, | ||
| workflowConnectionSchema, | ||
| workflowFileSchema, | ||
| workflowManifestSchema, | ||
| workflowRuntimeSchema, | ||
| workflowSchema, | ||
| workflowSchemaV1_0, | ||
| workflowSchemaV1_0_0, | ||
| workflowSchemaV1_1, | ||
| workflowSchemaV1_10, | ||
| workflowSchemaV1_2, | ||
| workflowSchemaV1_3, | ||
| workflowSchemaV1_4, | ||
| workflowSchemaV1_5, | ||
| workflowSchemaV1_6, | ||
| workflowSchemaV1_7, | ||
| workflowSchemaV1_8, | ||
| workflowSchemaV1_9, | ||
| workflowVariableSchema, | ||
| workflowVariablesSchema | ||
| } from "./packager-tool-q9zrqwxw.js"; | ||
| import"./packager-tool-973f0r2g.js"; | ||
| import"./packager-tool-c23zrhj8.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| export { | ||
| workflowVariablesSchema, | ||
| workflowVariableSchema, | ||
| workflowSchemaV1_9, | ||
| workflowSchemaV1_8, | ||
| workflowSchemaV1_7, | ||
| workflowSchemaV1_6, | ||
| workflowSchemaV1_5, | ||
| workflowSchemaV1_4, | ||
| workflowSchemaV1_3, | ||
| workflowSchemaV1_2, | ||
| workflowSchemaV1_10, | ||
| workflowSchemaV1_1, | ||
| workflowSchemaV1_0_0, | ||
| workflowSchemaV1_0, | ||
| workflowSchema, | ||
| workflowRuntimeSchema, | ||
| workflowManifestSchema, | ||
| workflowFileSchema, | ||
| workflowConnectionSchema, | ||
| versionSchema2 as versionSchema, | ||
| variableUpdateSchema, | ||
| variableToJsonSchema, | ||
| validateConnection, | ||
| unresolveRefs, | ||
| triggerRequiredRule, | ||
| toJsonPointer, | ||
| temperatureExceededMessage, | ||
| subflowFileSchema5 as subflowFileSchema, | ||
| subflowEntrySchema, | ||
| stripAutoDerivedFieldBindings, | ||
| shouldBlockAction, | ||
| serializeFrequencyToCron, | ||
| schemaValidationRule, | ||
| schemaErrorsToValidationErrors, | ||
| sanitizeFileName, | ||
| runRules, | ||
| resolveTemplate, | ||
| resolveSupportedLocale, | ||
| resolveRefs, | ||
| resolveNestedFieldSchema, | ||
| resolveEscalationTaskType, | ||
| resolveContextBindingPlaceholders, | ||
| resolveAndConvertWorkflow, | ||
| registerFlowSchemaI18n, | ||
| planWriteThrough, | ||
| parseWorkflowJson, | ||
| parsePointerTokens, | ||
| parseCronToFrequency, | ||
| outputMappingRule, | ||
| normalizeLocale, | ||
| normalizeInputDefinition, | ||
| nodeVariableSchema, | ||
| nodeSchema2 as nodeSchema, | ||
| nodeManifestSchema2 as nodeManifestSchema, | ||
| nodeLayoutSchema, | ||
| modelNotAvailableMessage, | ||
| workflowSchemaV1_9 as minimumSupportedWorkflowFileSchema, | ||
| minConnectionsRule, | ||
| mergeBindingResources, | ||
| meetsMinimumConnections, | ||
| maxTokensExceededMessage, | ||
| maxIterationsExceededMessage, | ||
| matchesTypePattern, | ||
| manifestResponseSchema, | ||
| layoutSchema, | ||
| workflowSchemaV1_10 as latestWorkflowFileSchema, | ||
| isVoiceAgentNodeType, | ||
| isValidQuartzCron, | ||
| isTriggerNodeType, | ||
| isToolNode, | ||
| isSubflowNodeType, | ||
| isStartEventNode, | ||
| isQuickFormEscalationNode, | ||
| isQuartzCron, | ||
| isPlainObject, | ||
| isMemoryNode, | ||
| isMcpNode, | ||
| isLoopNodeType, | ||
| isJsonSchema, | ||
| isHitlOutputDirectionField, | ||
| isHitlNodeType, | ||
| isHitlInputDirectionField, | ||
| isGatewayNodeType, | ||
| isExpressionValue, | ||
| isExpression, | ||
| isEscalationNode, | ||
| isEndNodeType, | ||
| isEmptyExpressionValue, | ||
| isConversationalOrVoiceAgentNodeType, | ||
| isContextNode, | ||
| isCallContextEmpty, | ||
| isBlockingSeverity, | ||
| isAutonomousAgentNodeType, | ||
| isAutoDerivedFieldBinding, | ||
| isAgentToolNodeType, | ||
| isAgentResourceNodeType, | ||
| isAgentResourceNode, | ||
| isAgentNodeType, | ||
| inMemoryWorkflowToFileFormat, | ||
| idSchema, | ||
| handleTargetSchema2 as handleTargetSchema, | ||
| governanceRule, | ||
| getVoiceModel, | ||
| getToolFields, | ||
| getTimeCycleFromCronExpression, | ||
| getStartEventNodes, | ||
| getPersonasForModel, | ||
| getOutcomeNames, | ||
| getNodeValidator, | ||
| getNodeLabel, | ||
| getManifestForNode, | ||
| getJsExpressionBody, | ||
| getHitlFieldChannelKey, | ||
| getFieldValidator, | ||
| getEntryPoints, | ||
| getEffectiveTriggerInputs, | ||
| getDefaultAgentContent, | ||
| getCronExpressionFromTimeCycleValue, | ||
| getBuiltInToolSchema, | ||
| getBindingResources, | ||
| getBindingResourceValue, | ||
| getAllEntryPoints, | ||
| generateWorkflowPackaging, | ||
| generateRandomId, | ||
| generatePackageDescriptor, | ||
| generateOperateJson, | ||
| generateNextId, | ||
| generateEntryPointsJson, | ||
| generateBindingsJson, | ||
| generalRules, | ||
| findDuplicateHitlChannelKeys, | ||
| findDefaultEntryPointNodeId, | ||
| fileFormatToInMemoryWorkflow, | ||
| expressionValueSchema, | ||
| expressionModeSchema, | ||
| expressionLikeSchema, | ||
| expressionFieldTypeSchema, | ||
| expectedTypeToFieldType, | ||
| executeWritePlan, | ||
| evaluateTemplate, | ||
| evaluateExpression, | ||
| evaluateCondition, | ||
| encodeLiteral, | ||
| edgeSchema, | ||
| deepEqual, | ||
| deduplicateBindings, | ||
| decodeLiteralsForValidation, | ||
| decodeLiteralForValidation, | ||
| decodeLiteral, | ||
| dataTransformRule, | ||
| currentStorageSchema, | ||
| currentAgentStorageSchema, | ||
| createRefResolver, | ||
| createOutputSchemaFromAppSchema, | ||
| createOutcomeMappingFromSchema, | ||
| createInputSchemaFromAppSchema, | ||
| createI18nRegistrar, | ||
| createDotNetTypeMapping, | ||
| createBindingPackage, | ||
| containsRef, | ||
| constraintWithAddNodePanel, | ||
| connectionConstraintSchema2 as connectionConstraintSchema, | ||
| conditionExpressionRule, | ||
| compareVersions, | ||
| coerceToExpressionValue, | ||
| coerceInputsViaSchema, | ||
| cliRules, | ||
| clearValidatorCache, | ||
| checkCategoryConstraint, | ||
| categoryManifestSchema2 as categoryManifestSchema, | ||
| canAcceptMoreConnections, | ||
| buildOutputSchema, | ||
| buildInputSchema, | ||
| bindingSchema, | ||
| argumentBindingSchema, | ||
| applyJsonPointer, | ||
| nodeManifestSchema as apolloNodeManifestSchema, | ||
| agentEnforcementsSchema, | ||
| addNodePanelSearchScopeSchema, | ||
| addNodePanelCreateActionSchema, | ||
| addNodePanelConfigSchema, | ||
| WORKFLOW_VERSIONS, | ||
| WEEKDAYS, | ||
| VOICE_MODELS, | ||
| VOICE_AGENT_NODE_TYPE, | ||
| VALID_IDENTIFIER_PATTERN, | ||
| VALIDATION_NAMESPACE, | ||
| TRIGGER_TYPE_PREFIXES, | ||
| TRIGGER_NODE_PREFIX, | ||
| SYNTHETIC_GATEWAY_OUTPUT_KEYS, | ||
| SWITCH_NODE_TYPE, | ||
| SUPPORTED_LOCALES, | ||
| SUMMARIZE_SCHEMA, | ||
| SUBFLOW_NODE_TYPE, | ||
| RecipientType, | ||
| RESERVED_WORDS, | ||
| ProjectType, | ||
| MINIMUM_SUPPORTED_SCHEMA_VERSION, | ||
| LOOP_NODE_TYPE, | ||
| JobAttachmentSchema, | ||
| JS_EXPRESSION_PREFIX, | ||
| HITL_QUICK_FORM_NODE_TYPE, | ||
| HITL_NODE_TYPES, | ||
| HITL_NODE_TYPE, | ||
| HITL_DOC_VALIDATION_NODE_TYPE, | ||
| HITL_CODED_ACTION_NODE_TYPE, | ||
| FLAT_SEP, | ||
| EntryPointType, | ||
| ESCALATION_TYPE_CODE, | ||
| ESCALATION_TASK_TYPE, | ||
| ESCALATION_QUICK_FORM_NODE_TYPE, | ||
| EMPTY_VARIABLES, | ||
| DEFAULT_WORKFLOW_RUNTIME, | ||
| DEFAULT_STORAGE_VERSION, | ||
| DEFAULT_LOCALE, | ||
| DEFAULT_CONVERSATIONAL_VOICE_SETTINGS, | ||
| DEFAULT_CONVERSATIONAL_VOICE_MODEL, | ||
| DECISION_NODE_TYPE, | ||
| CURRENT_WORKFLOW_VERSION, | ||
| CONVERSATIONAL_VOICE_END_CALL_NODE_TYPE, | ||
| CONVERSATIONAL_OUTPUTS_MIN_VERSION, | ||
| CONVERSATIONAL_AGENT_SETTINGS, | ||
| CONVERSATIONAL_AGENT_NODE_TYPE, | ||
| CONVERSATIONAL_AGENT_ICON, | ||
| CONNECTOR_TRIGGER_PREFIX, | ||
| CONNECTOR_EVENT_PREFIX, | ||
| BUILT_IN_TOOL_SCHEMAS, | ||
| BINDINGS_PLACEHOLDER_PATH_PREFIX, | ||
| BINDINGS_PATH_PREFIX, | ||
| BATCH_TRANSFORM_SCHEMA, | ||
| AUTONOMOUS_AGENT_NODE_TYPE, | ||
| ANALYZE_FILES_SCHEMA, | ||
| AGENT_TARGET_RUNTIME, | ||
| AGENT_RESOURCE_PREFIX, | ||
| AGENT_NODE_TYPES | ||
| }; | ||
| //# debugId=7C6996CE83F1475F64756E2164756E21 |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| import { | ||
| catchError | ||
| } from "./packager-tool-qa9gftnj.js"; | ||
| import { | ||
| AUTH_CANCELLED_ERROR_CODE, | ||
| AUTH_TIMEOUT_ERROR_CODE, | ||
| DEFAULT_AUTH_TIMEOUT_MS | ||
| } from "./packager-tool-5arsyj36.js"; | ||
| import { | ||
| getFileSystem | ||
| } from "./packager-tool-1cb0d5e0.js"; | ||
| import { | ||
| __require | ||
| } from "./packager-tool-wckvcay0.js"; | ||
| // ../auth/src/getBaseHtml.ts | ||
| var escapeHtml = (value) => value.replace(/[&<>"']/g, (char) => { | ||
| switch (char) { | ||
| case "&": | ||
| return "&"; | ||
| case "<": | ||
| return "<"; | ||
| case ">": | ||
| return ">"; | ||
| case '"': | ||
| return """; | ||
| case "'": | ||
| return "'"; | ||
| default: | ||
| return char; | ||
| } | ||
| }); | ||
| var getBaseHtml = ({ title, message, type }) => { | ||
| const icon = type === "success" ? "✓" : "✕"; | ||
| const iconClass = type === "success" ? "icon-success" : "icon-error"; | ||
| const safeTitle = escapeHtml(title); | ||
| const safeMessage = escapeHtml(message); | ||
| return ` | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <title>${safeTitle} - UiPath CLI</title> | ||
| <link rel="preconnect" href="https://fonts.googleapis.com"> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
| <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400&family=Poppins:wght@600&display=swap" rel="stylesheet"> | ||
| <style> | ||
| :root { | ||
| --bg-page: #F6F6F6; | ||
| --bg-card: #FFFFFF; | ||
| --border-card: #D9D9D9; | ||
| --text-heading: #182126; | ||
| --text-body: #616161; | ||
| --text-footer: #9D9D9D; | ||
| --color-success: #16a34a; | ||
| --color-success-bg: #f0fdf4; | ||
| --color-error: #A32200; | ||
| --color-error-bg: #fef2f2; | ||
| --color-accent: #FA4616; | ||
| } | ||
| @media (prefers-color-scheme: dark) { | ||
| :root { | ||
| --bg-page: #182126; | ||
| --bg-card: #2D373C; | ||
| --border-card: #3C464B; | ||
| --text-heading: #F6F6F6; | ||
| --text-body: #B9B9B9; | ||
| --text-footer: #9D9D9D; | ||
| --color-success: #4ade80; | ||
| --color-success-bg: #052e16; | ||
| --color-error: #FA7678; | ||
| --color-error-bg: #450a0a; | ||
| --color-accent: #FA4616; | ||
| } | ||
| } | ||
| * { | ||
| margin: 0; | ||
| padding: 0; | ||
| box-sizing: border-box; | ||
| } | ||
| body { | ||
| font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; | ||
| background: var(--bg-page); | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| min-height: 100vh; | ||
| padding: 20px; | ||
| } | ||
| .container { | ||
| max-width: 480px; | ||
| width: 100%; | ||
| } | ||
| .card { | ||
| background: var(--bg-card); | ||
| border: 1px solid var(--border-card); | ||
| border-top: 3px solid var(--color-accent); | ||
| border-radius: 12px; | ||
| padding: 40px 32px; | ||
| text-align: center; | ||
| } | ||
| .logo { | ||
| display: flex; | ||
| justify-content: center; | ||
| margin-bottom: 24px; | ||
| } | ||
| .logo svg { | ||
| width: 160px; | ||
| height: auto; | ||
| } | ||
| .logo-dark { display: none; } | ||
| .logo-light { display: block; } | ||
| @media (prefers-color-scheme: dark) { | ||
| .logo-dark { display: block; } | ||
| .logo-light { display: none; } | ||
| } | ||
| .icon { | ||
| width: 56px; | ||
| height: 56px; | ||
| border-radius: 50%; | ||
| font-size: 28px; | ||
| display: inline-flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| margin-bottom: 16px; | ||
| font-weight: 600; | ||
| } | ||
| .icon-success { | ||
| background: var(--color-success-bg); | ||
| color: var(--color-success); | ||
| } | ||
| .icon-error { | ||
| background: var(--color-error-bg); | ||
| color: var(--color-error); | ||
| } | ||
| h1 { | ||
| font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; | ||
| color: var(--text-heading); | ||
| font-size: 24px; | ||
| font-weight: 600; | ||
| margin-bottom: 8px; | ||
| } | ||
| p { | ||
| color: var(--text-body); | ||
| font-size: 14px; | ||
| line-height: 1.5; | ||
| } | ||
| .footer { | ||
| margin-top: 24px; | ||
| padding-top: 24px; | ||
| border-top: 1px solid var(--border-card); | ||
| color: var(--text-footer); | ||
| font-size: 13px; | ||
| } | ||
| </style> | ||
| </head> | ||
| <body> | ||
| <div class="container"> | ||
| <div class="card"> | ||
| <div class="logo"> | ||
| <div class="logo-light"> | ||
| <svg aria-hidden="true" width="400" height="116" viewBox="0 0 400 116" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M62.6439 33.1429H60.885C56.2918 33.1429 53.4387 35.9377 53.4387 40.4355V76.6177C53.4387 93.7722 48.1098 100.769 35.0451 100.769C21.9804 100.769 16.6514 93.7405 16.6514 76.5097V40.4355C16.6514 35.9377 13.7982 33.1429 9.20575 33.1429H7.44592C2.85326 33.1429 0 35.9377 0 40.4355V76.6177C0 102.75 11.7912 116 35.0451 116C58.2991 116 70.0897 102.75 70.0897 76.6177V40.4355C70.0897 35.9377 67.2364 33.1429 62.6439 33.1429Z" fill="black"/><path d="M91.1326 55.0988H89.6751C84.9685 55.0988 82.0451 58.0021 82.0451 62.6744V108.425C82.0451 113.097 84.9685 116 89.6751 116H91.1326C95.8386 116 98.762 113.097 98.762 108.425V62.6744C98.762 58.0021 95.8386 55.0988 91.1326 55.0988Z" fill="#FA4616"/><path d="M111.322 26.7778C100.684 25.0967 92.2902 16.8376 90.5818 6.37143C90.5496 6.17388 90.2894 6.17388 90.2572 6.37143C88.5488 16.8376 80.1548 25.0967 69.5175 26.7778C69.3167 26.8094 69.3167 27.0656 69.5175 27.0973C80.1548 28.7781 88.5488 37.0375 90.2572 47.5037C90.2894 47.7012 90.5496 47.7012 90.5818 47.5037C92.2902 37.0375 100.684 28.7781 111.322 27.0973C111.522 27.0656 111.522 26.8095 111.322 26.7778ZM100.87 27.0174C95.5518 27.8578 91.3548 31.9875 90.5007 37.2206C90.4845 37.3194 90.3544 37.3194 90.3383 37.2206C89.4841 31.9875 85.2871 27.8578 79.9685 27.0174C79.868 27.0016 79.868 26.8735 79.9685 26.8577C85.2871 26.0171 89.4841 21.8876 90.3383 16.6545C90.3544 16.5557 90.4845 16.5557 90.5007 16.6545C91.3548 21.8876 95.5518 26.0171 100.87 26.8577C100.971 26.8735 100.971 27.0016 100.87 27.0174Z" fill="#FA4616"/><path d="M117.694 10.4371C112.376 11.2774 108.179 15.4071 107.325 20.6402C107.308 20.739 107.178 20.739 107.162 20.6402C106.308 15.4071 102.111 11.2774 96.7923 10.4371C96.6919 10.4212 96.6919 10.2931 96.7923 10.2773C102.111 9.43674 106.308 5.3072 107.162 0.0740898C107.178 -0.0246966 107.308 -0.0246966 107.325 0.0740898C108.179 5.3072 112.376 9.43672 117.694 10.2773C117.795 10.2931 117.795 10.4212 117.694 10.4371Z" fill="#FA4616"/><path d="M135.312 33.1429H119.087C114.445 33.1429 111.561 35.9675 111.561 40.5133V108.63C111.561 113.175 114.445 116 119.087 116H120.865C125.507 116 128.391 113.175 128.391 108.63V92.5058H135.423C163.58 92.5058 175.066 83.9066 175.066 62.8243C175.066 41.742 163.548 33.1429 135.312 33.1429ZM158.014 62.6068C158.014 73.4525 152.762 77.1123 137.201 77.1123H128.391V48.2095H137.201C152.762 48.2095 158.014 51.8421 158.014 62.6068Z" fill="black"/><path d="M237.564 48.4739H236.23C231.589 48.4739 228.705 51.2986 228.705 55.8444V55.8538C223.938 50.4474 216.554 47.2772 208.114 47.2772C199.516 47.2772 191.74 50.3711 186.22 55.9903C180.207 62.1094 177.029 70.9412 177.029 81.5299C177.029 92.1647 180.226 101.047 186.274 107.217C191.825 112.881 199.621 116 208.225 116C216.505 116 223.944 112.79 228.711 107.462C228.711 107.468 228.711 108.998 228.712 109.004C228.866 113.33 231.717 116 236.23 116H237.564C242.206 116 245.089 113.176 245.089 108.631V55.8444C245.089 51.2986 242.206 48.4739 237.564 48.4739ZM229.038 81.5299C229.038 93.9678 222.256 101.695 211.337 101.695C200.281 101.695 193.414 93.9678 193.414 81.5299C193.414 69.1579 200.196 61.473 211.115 61.473C222.003 61.473 229.038 69.3462 229.038 81.5299Z" fill="black"/><path d="M334.448 47.3426C325.733 47.3426 319.516 50.7418 315.624 55.0257V40.518C315.624 35.9693 312.738 33.1429 308.094 33.1429H306.759C302.115 33.1429 299.229 35.9693 299.229 40.518V108.625C299.229 113.174 302.115 116 306.759 116H308.094C312.738 116 315.624 113.174 315.624 108.625V81.2897C315.624 63.7895 324.146 61.7658 330.556 61.7658C341.32 61.7658 345.711 67.0126 345.711 79.8747V108.625C345.711 113.174 348.596 116 353.241 116H354.576C359.22 116 362.105 113.174 362.105 108.625V78.8939C362.105 57.6628 353.059 47.3426 334.448 47.3426Z" fill="black"/><path d="M294.515 107.664C294.284 105.472 292.945 102.34 286.565 102.34C279.021 102.34 275.431 100.037 275.431 86.9529V61.7659H286.675C291.313 61.7659 294.194 59.19 294.194 55.0447C294.194 50.9661 291.313 48.4318 286.675 48.4318H275.444V40.518C275.444 35.9693 272.541 33.1429 267.869 33.1429H266.526C261.854 33.1429 258.951 35.9693 258.951 40.518V48.4318H256.366C252.276 48.4318 249.736 50.9661 249.736 55.0447C249.736 59.19 252.617 61.7659 257.254 61.7659H258.951V88.369C258.951 107.737 266.645 116 284.677 116C284.707 116 284.736 115.999 284.765 115.998C285.813 115.997 286.937 115.981 288.081 115.881C290.354 115.67 292.073 114.886 293.191 113.546C294.305 112.213 294.75 109.871 294.515 107.664Z" fill="black"/><path d="M367.331 47.6328V36.4082H364.1C362.823 36.4082 362.105 35.8367 362.105 34.7755C362.105 33.7143 362.823 33.1428 364.1 33.1428H373.952C375.228 33.1428 375.946 33.7143 375.946 34.7755C375.946 35.8367 375.228 36.4082 373.952 36.4082H370.801V47.6328C370.801 48.939 370.203 49.6733 369.086 49.6733C367.969 49.6733 367.331 48.939 367.331 47.6328ZM377.822 49.7139C376.745 49.7139 376.174 48.8937 376.465 47.4695L379.018 34.9388C379.258 33.7553 379.976 33.1428 381.172 33.1428H381.771C382.887 33.1428 383.637 33.6775 384.044 34.7341L388.192 45.5096L392.38 34.7341C392.795 33.6652 393.577 33.1428 394.694 33.1428H395.252C396.449 33.1428 397.167 33.7553 397.406 34.9388L399.919 47.4695C400.206 48.8979 399.72 49.7143 398.643 49.7143C397.486 49.7143 396.772 49.1022 396.529 47.9183L394.415 37.6736L390.426 48.1226C390.007 49.2164 389.309 49.7139 388.232 49.7139C387.115 49.7139 386.417 49.2164 385.998 48.1226L382.01 37.6736L379.935 47.9183C379.696 49.1022 378.978 49.7139 377.822 49.7139Z" fill="black"/></svg> | ||
| </div> | ||
| <div class="logo-dark"> | ||
| <svg aria-hidden="true" width="400" height="116" viewBox="0 0 400 116" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M62.6439 33.1428H60.885C56.2918 33.1428 53.4387 35.9376 53.4387 40.4354V76.6177C53.4387 93.7722 48.1098 100.769 35.0451 100.769C21.9804 100.769 16.6514 93.7404 16.6514 76.5096V40.4354C16.6514 35.9377 13.7982 33.1428 9.20575 33.1428H7.44592C2.85326 33.1428 0 35.9377 0 40.4354V76.6177C0 102.75 11.7912 116 35.0451 116C58.2991 116 70.0897 102.75 70.0897 76.6177V40.4354C70.0897 35.9377 67.2364 33.1428 62.6439 33.1428Z" fill="white"/><path d="M91.1326 55.0989H89.6751C84.9685 55.0989 82.0451 58.0021 82.0451 62.6744V108.425C82.0451 113.097 84.9685 116 89.6751 116H91.1326C95.8386 116 98.762 113.097 98.762 108.425V62.6744C98.762 58.0021 95.8386 55.0989 91.1326 55.0989Z" fill="white"/><path d="M111.322 26.7778C100.684 25.0967 92.2902 16.8376 90.5818 6.37143C90.5496 6.17388 90.2894 6.17388 90.2572 6.37143C88.5488 16.8376 80.1548 25.0967 69.5175 26.7778C69.3167 26.8094 69.3167 27.0656 69.5175 27.0973C80.1548 28.7781 88.5488 37.0375 90.2572 47.5037C90.2894 47.7012 90.5496 47.7012 90.5818 47.5037C92.2902 37.0375 100.684 28.7781 111.322 27.0973C111.522 27.0656 111.522 26.8095 111.322 26.7778ZM100.87 27.0174C95.5518 27.8578 91.3548 31.9875 90.5007 37.2206C90.4845 37.3194 90.3544 37.3194 90.3383 37.2206C89.4841 31.9875 85.2871 27.8578 79.9685 27.0174C79.868 27.0016 79.868 26.8735 79.9685 26.8577C85.2871 26.0171 89.4841 21.8876 90.3383 16.6545C90.3544 16.5557 90.4845 16.5557 90.5007 16.6545C91.3548 21.8876 95.5518 26.0171 100.87 26.8577C100.971 26.8735 100.971 27.0016 100.87 27.0174Z" fill="white"/><path d="M117.694 10.4371C112.376 11.2774 108.179 15.4071 107.325 20.6402C107.308 20.739 107.178 20.739 107.162 20.6402C106.308 15.4071 102.111 11.2774 96.7923 10.4371C96.6919 10.4212 96.6919 10.2931 96.7923 10.2773C102.111 9.43674 106.308 5.3072 107.162 0.0740898C107.178 -0.0246966 107.308 -0.0246966 107.325 0.0740898C108.179 5.3072 112.376 9.43672 117.694 10.2773C117.795 10.2931 117.795 10.4212 117.694 10.4371Z" fill="white"/><path d="M135.312 33.1428H119.087C114.445 33.1428 111.561 35.9674 111.561 40.5133V108.63C111.561 113.175 114.445 116 119.087 116H120.865C125.507 116 128.391 113.175 128.391 108.63V92.5057H135.423C163.58 92.5057 175.066 83.9066 175.066 62.8243C175.066 41.7419 163.548 33.1428 135.312 33.1428ZM158.014 62.6067C158.014 73.4525 152.762 77.1123 137.201 77.1123H128.391V48.2095H137.201C152.762 48.2095 158.014 51.842 158.014 62.6067Z" fill="white"/><path d="M237.564 48.4739H236.23C231.589 48.4739 228.705 51.2986 228.705 55.8444V55.8538C223.938 50.4474 216.554 47.2772 208.114 47.2772C199.516 47.2772 191.74 50.3711 186.22 55.9903C180.207 62.1094 177.029 70.9412 177.029 81.5299C177.029 92.1647 180.226 101.047 186.274 107.217C191.825 112.881 199.621 116 208.225 116C216.505 116 223.944 112.79 228.711 107.462C228.711 107.468 228.711 108.998 228.712 109.004C228.866 113.33 231.717 116 236.23 116H237.564C242.206 116 245.089 113.176 245.089 108.631V55.8444C245.089 51.2986 242.206 48.4739 237.564 48.4739ZM229.038 81.5299C229.038 93.9678 222.256 101.695 211.337 101.695C200.281 101.695 193.414 93.9678 193.414 81.5299C193.414 69.1579 200.196 61.473 211.115 61.473C222.003 61.473 229.038 69.3462 229.038 81.5299Z" fill="white"/><path d="M334.448 47.3425C325.733 47.3425 319.516 50.7417 315.624 55.0256V40.5179C315.624 35.9693 312.738 33.1428 308.094 33.1428H306.759C302.115 33.1428 299.229 35.9693 299.229 40.5179V108.625C299.229 113.174 302.115 116 306.759 116H308.094C312.738 116 315.624 113.174 315.624 108.625V81.2897C315.624 63.7894 324.146 61.7657 330.556 61.7657C341.32 61.7657 345.711 67.0125 345.711 79.8746V108.625C345.711 113.174 348.596 116 353.241 116H354.576C359.22 116 362.105 113.174 362.105 108.625V78.8938C362.105 57.6627 353.059 47.3425 334.448 47.3425Z" fill="white"/><path d="M294.515 107.664C294.284 105.472 292.945 102.34 286.565 102.34C279.021 102.34 275.431 100.037 275.431 86.9529V61.7658H286.675C291.313 61.7658 294.194 59.19 294.194 55.0446C294.194 50.966 291.313 48.4317 286.675 48.4317H275.444V40.5179C275.444 35.9693 272.541 33.1428 267.869 33.1428H266.526C261.854 33.1428 258.951 35.9693 258.951 40.5179V48.4317H256.366C252.276 48.4317 249.736 50.966 249.736 55.0446C249.736 59.19 252.617 61.7658 257.254 61.7658H258.951V88.3689C258.951 107.737 266.645 116 284.677 116C284.707 116 284.736 115.999 284.765 115.998C285.813 115.997 286.937 115.981 288.081 115.881C290.354 115.67 292.073 114.885 293.191 113.546C294.305 112.213 294.75 109.87 294.515 107.664Z" fill="white"/><path d="M367.331 47.6328V36.4082H364.1C362.823 36.4082 362.105 35.8367 362.105 34.7755C362.105 33.7143 362.823 33.1428 364.1 33.1428H373.952C375.228 33.1428 375.946 33.7143 375.946 34.7755C375.946 35.8367 375.228 36.4082 373.952 36.4082H370.801V47.6328C370.801 48.939 370.203 49.6733 369.086 49.6733C367.969 49.6733 367.331 48.939 367.331 47.6328ZM377.822 49.7139C376.745 49.7139 376.174 48.8937 376.465 47.4695L379.018 34.9388C379.258 33.7553 379.976 33.1428 381.172 33.1428H381.771C382.887 33.1428 383.637 33.6775 384.044 34.7341L388.192 45.5096L392.38 34.7341C392.795 33.6652 393.577 33.1428 394.694 33.1428H395.252C396.449 33.1428 397.167 33.7553 397.406 34.9388L399.919 47.4695C400.206 48.8979 399.72 49.7143 398.643 49.7143C397.486 49.7143 396.772 49.1022 396.529 47.9183L394.415 37.6736L390.426 48.1226C390.007 49.2164 389.309 49.7139 388.232 49.7139C387.115 49.7139 386.417 49.2164 385.998 48.1226L382.01 37.6736L379.935 47.9183C379.696 49.1022 378.978 49.7139 377.822 49.7139Z" fill="white"/></svg> | ||
| </div> | ||
| </div> | ||
| <div class="icon ${iconClass}">${icon}</div> | ||
| <h1>${safeTitle}</h1> | ||
| <p>${safeMessage}</p> | ||
| <div class="footer">You can close this window</div> | ||
| </div> | ||
| </div> | ||
| </body> | ||
| </html>`; | ||
| }; | ||
| // ../auth/src/server.ts | ||
| var startServer = async ({ | ||
| redirectUri, | ||
| timeoutMs = DEFAULT_AUTH_TIMEOUT_MS, | ||
| onListening, | ||
| signal | ||
| }) => { | ||
| let http; | ||
| try { | ||
| http = await import("node:http"); | ||
| } catch { | ||
| throw new Error("Local server authentication is not supported in this environment."); | ||
| } | ||
| return new Promise((resolve, reject) => { | ||
| const server = http.createServer((req, res) => { | ||
| if (!req.url) { | ||
| res.writeHead(400, { | ||
| "Content-Type": "text/html; charset=utf-8", | ||
| Connection: "close" | ||
| }); | ||
| res.end(getBaseHtml({ | ||
| title: "Let's try that again", | ||
| message: "We got an unexpected request. Head back to your terminal and try signing in again.", | ||
| type: "error" | ||
| })); | ||
| server.close(); | ||
| reject(new Error("No URL received")); | ||
| return; | ||
| } | ||
| const url = new URL(req.url, redirectUri); | ||
| const error = url.searchParams.get("error"); | ||
| if (error) { | ||
| res.writeHead(400, { | ||
| "Content-Type": "text/html; charset=utf-8", | ||
| Connection: "close" | ||
| }); | ||
| res.end(getBaseHtml({ | ||
| title: "Let's try that again", | ||
| message: `The sign-in didn't go through: ${error}. Head back to your terminal and take another shot.`, | ||
| type: "error" | ||
| })); | ||
| server.close(); | ||
| reject(new Error(`OAuth error: ${error}`)); | ||
| return; | ||
| } | ||
| const code = url.searchParams.get("code"); | ||
| if (code) { | ||
| res.writeHead(200, { | ||
| "Content-Type": "text/html; charset=utf-8", | ||
| Connection: "close" | ||
| }); | ||
| res.end(getBaseHtml({ | ||
| title: "Ready to automate!", | ||
| message: "You're in. Head back to your terminal and let's get to work.", | ||
| type: "success" | ||
| })); | ||
| server.close(); | ||
| resolve(url); | ||
| return; | ||
| } | ||
| res.writeHead(400, { | ||
| "Content-Type": "text/html; charset=utf-8", | ||
| Connection: "close" | ||
| }); | ||
| res.end(getBaseHtml({ | ||
| title: "We hit a snag", | ||
| message: "No authorization came back from the server. Head back to your terminal and try once more.", | ||
| type: "error" | ||
| })); | ||
| server.close(); | ||
| reject(new Error("No authorization code received")); | ||
| return; | ||
| }); | ||
| let timeoutHandle; | ||
| const onAbort = () => { | ||
| clearTimeout(timeoutHandle); | ||
| server.close(); | ||
| const err = new Error("Authentication cancelled"); | ||
| err.code = AUTH_CANCELLED_ERROR_CODE; | ||
| reject(err); | ||
| }; | ||
| if (signal) { | ||
| if (signal.aborted) { | ||
| onAbort(); | ||
| return; | ||
| } | ||
| signal.addEventListener("abort", onAbort, { once: true }); | ||
| } | ||
| timeoutHandle = setTimeout(() => { | ||
| server.close(); | ||
| signal?.removeEventListener("abort", onAbort); | ||
| const err = new Error("Authentication timeout"); | ||
| err.code = AUTH_TIMEOUT_ERROR_CODE; | ||
| reject(err); | ||
| }, timeoutMs); | ||
| const bindHost = redirectUri.hostname === "localhost" ? "127.0.0.1" : redirectUri.hostname; | ||
| server.on("error", (err) => { | ||
| clearTimeout(timeoutHandle); | ||
| signal?.removeEventListener("abort", onAbort); | ||
| reject(err); | ||
| }); | ||
| server.listen(Number(redirectUri.port), bindHost, () => { | ||
| if (onListening) { | ||
| Promise.resolve(onListening()).catch((err) => { | ||
| server.close(); | ||
| clearTimeout(timeoutHandle); | ||
| reject(err); | ||
| }); | ||
| } | ||
| }); | ||
| server.on("close", () => { | ||
| clearTimeout(timeoutHandle); | ||
| signal?.removeEventListener("abort", onAbort); | ||
| }); | ||
| }); | ||
| }; | ||
| // ../auth/src/strategies/node-strategy.ts | ||
| class NodeAuthStrategy { | ||
| async execute(url, redirectUri, expectedState, opts) { | ||
| const fs = getFileSystem(); | ||
| const callbackUrl = await startServer({ | ||
| redirectUri, | ||
| timeoutMs: opts?.timeoutMs, | ||
| signal: opts?.signal, | ||
| onListening: async () => { | ||
| let safeUrl = ""; | ||
| for (const ch of url) { | ||
| const c = ch.charCodeAt(0); | ||
| if (c > 31 && (c < 128 || c > 159)) | ||
| safeUrl += ch; | ||
| } | ||
| if (opts?.noBrowser) { | ||
| if (!opts.onAuthUrl) { | ||
| throw new Error("Headless login (noBrowser) requires an onAuthUrl handler " + "to surface the authorize URL, but none was provided."); | ||
| } | ||
| opts.onAuthUrl(safeUrl); | ||
| return; | ||
| } | ||
| const [openError] = await catchError(fs.utils.open(url)); | ||
| if (!openError) | ||
| return; | ||
| const isSpawnError = "code" in openError && openError.code === "ENOENT"; | ||
| if (isSpawnError) { | ||
| throw new Error("Could not open a browser. No supported browser launcher was found. " + `On a headless or minimal system, use non-interactive login instead: | ||
| ` + ` uip login --client-id <id> --client-secret <secret> -t <tenant> | ||
| ` + "Or install a browser opener for your OS (e.g. xdg-utils on Linux).", { cause: openError }); | ||
| } | ||
| throw new Error("Could not open the browser automatically. " + `Visit this URL to authenticate: | ||
| ${safeUrl} | ||
| `, { cause: openError }); | ||
| } | ||
| }); | ||
| const returnedState = callbackUrl.searchParams.get("state"); | ||
| if (returnedState !== expectedState) { | ||
| throw new Error("OAuth state mismatch — the callback state does not match the expected value. " + "This may indicate a CSRF attack. Please try signing in again."); | ||
| } | ||
| const code = callbackUrl.searchParams.get("code"); | ||
| if (!code) { | ||
| throw new Error("No authorization code received"); | ||
| } | ||
| return code; | ||
| } | ||
| } | ||
| export { | ||
| NodeAuthStrategy | ||
| }; | ||
| //# debugId=AB5032F35BC145F164756E2164756E21 |
| import { | ||
| __require | ||
| } from "./packager-tool-wckvcay0.js"; | ||
| // ../filesystem/src/node.ts | ||
| import { randomUUID } from "node:crypto"; | ||
| import { existsSync } from "node:fs"; | ||
| import * as fs from "node:fs/promises"; | ||
| import * as os from "node:os"; | ||
| import * as path from "node:path"; | ||
| var LOCK_HEARTBEAT_MS = 5000; | ||
| var LOCK_STALE_MS = 15000; | ||
| var LOCK_MAX_WAIT_MS = 20000; | ||
| var LOCK_MAX_HOLD_MS = 60000; | ||
| var LOCK_RETRY_MIN_MS = 100; | ||
| var LOCK_RETRY_JITTER_MS = 200; | ||
| class NodeFileSystem { | ||
| path = { | ||
| join: path.join, | ||
| resolve: path.resolve, | ||
| relative: path.relative, | ||
| dirname: path.dirname, | ||
| isAbsolute: path.isAbsolute, | ||
| basename: path.basename | ||
| }; | ||
| env = { | ||
| cwd: process.cwd, | ||
| homedir: os.homedir, | ||
| tmpdir: os.tmpdir, | ||
| getenv: (key) => process.env[key] | ||
| }; | ||
| utils = { | ||
| open: async (url) => { | ||
| const { default: open } = await import("./index-hsadteg4.js"); | ||
| await open(url); | ||
| } | ||
| }; | ||
| async readFile(path2, options) { | ||
| try { | ||
| if (options) { | ||
| return await fs.readFile(path2, "utf-8"); | ||
| } | ||
| return await fs.readFile(path2); | ||
| } catch (error) { | ||
| if (this.isEnoent(error)) | ||
| return null; | ||
| throw error; | ||
| } | ||
| } | ||
| async writeFile(filePath, data) { | ||
| const dir = path.dirname(filePath); | ||
| if (dir) { | ||
| await fs.mkdir(dir, { recursive: true }); | ||
| } | ||
| await fs.writeFile(filePath, data); | ||
| } | ||
| async appendFile(filePath, data) { | ||
| const dir = path.dirname(filePath); | ||
| if (dir) { | ||
| await fs.mkdir(dir, { recursive: true }); | ||
| } | ||
| await fs.appendFile(filePath, data); | ||
| } | ||
| async readdir(dirPath) { | ||
| try { | ||
| return await fs.readdir(dirPath); | ||
| } catch (error) { | ||
| if (this.isEnoent(error)) | ||
| return []; | ||
| throw error; | ||
| } | ||
| } | ||
| async stat(filePath) { | ||
| try { | ||
| const stats = await fs.stat(filePath); | ||
| return { | ||
| isFile: () => stats.isFile(), | ||
| isDirectory: () => stats.isDirectory(), | ||
| size: stats.size, | ||
| mtimeMs: stats.mtimeMs | ||
| }; | ||
| } catch (error) { | ||
| if (this.isEnoent(error)) | ||
| return null; | ||
| throw error; | ||
| } | ||
| } | ||
| async exists(filePath) { | ||
| return existsSync(filePath); | ||
| } | ||
| async mkdir(dirPath) { | ||
| await fs.mkdir(dirPath, { recursive: true }); | ||
| } | ||
| async acquireLock(lockPath) { | ||
| const canonicalPath = await this.canonicalizeLockTarget(lockPath); | ||
| const lockFile = `${canonicalPath}.lock`; | ||
| const ownerId = randomUUID(); | ||
| const start = Date.now(); | ||
| while (true) { | ||
| try { | ||
| await fs.writeFile(lockFile, ownerId, { flag: "wx" }); | ||
| return this.createLockRelease(lockFile, ownerId); | ||
| } catch (error) { | ||
| if (!this.hasErrnoCode(error, "EEXIST")) { | ||
| throw error; | ||
| } | ||
| const stats = await fs.stat(lockFile).catch(() => null); | ||
| if (stats && Date.now() - stats.mtimeMs > LOCK_STALE_MS) { | ||
| const reclaimed = await fs.rm(lockFile, { force: true }).then(() => true).catch(() => false); | ||
| if (reclaimed) | ||
| continue; | ||
| } | ||
| if (Date.now() - start > LOCK_MAX_WAIT_MS) { | ||
| throw new Error(`ELOCKED: timed out waiting for lock on ${canonicalPath}`); | ||
| } | ||
| await new Promise((resolve2) => setTimeout(resolve2, LOCK_RETRY_MIN_MS + Math.random() * LOCK_RETRY_JITTER_MS)); | ||
| } | ||
| } | ||
| } | ||
| async canonicalizeLockTarget(lockPath) { | ||
| const absolute = path.resolve(lockPath); | ||
| const fullReal = await fs.realpath(absolute).catch(() => null); | ||
| if (fullReal) | ||
| return fullReal; | ||
| const parent = path.dirname(absolute); | ||
| const base = path.basename(absolute); | ||
| const canonicalParent = await fs.realpath(parent).catch(() => parent); | ||
| return path.join(canonicalParent, base); | ||
| } | ||
| createLockRelease(lockFile, ownerId) { | ||
| const heartbeatStart = Date.now(); | ||
| let heartbeatTimer; | ||
| let stopped = false; | ||
| const stopHeartbeat = () => { | ||
| stopped = true; | ||
| if (heartbeatTimer) | ||
| clearTimeout(heartbeatTimer); | ||
| }; | ||
| const scheduleNextHeartbeat = () => { | ||
| if (stopped) | ||
| return; | ||
| if (Date.now() - heartbeatStart >= LOCK_MAX_HOLD_MS) { | ||
| stopped = true; | ||
| return; | ||
| } | ||
| heartbeatTimer = setTimeout(() => { | ||
| runHeartbeat(); | ||
| }, LOCK_HEARTBEAT_MS); | ||
| heartbeatTimer.unref?.(); | ||
| }; | ||
| const runHeartbeat = async () => { | ||
| if (stopped) | ||
| return; | ||
| const current = await fs.readFile(lockFile, "utf-8").catch(() => null); | ||
| if (stopped) | ||
| return; | ||
| if (current !== ownerId) { | ||
| stopped = true; | ||
| return; | ||
| } | ||
| const now = Date.now() / 1000; | ||
| await fs.utimes(lockFile, now, now).catch(() => {}); | ||
| scheduleNextHeartbeat(); | ||
| }; | ||
| scheduleNextHeartbeat(); | ||
| let released = false; | ||
| return async () => { | ||
| if (released) | ||
| return; | ||
| released = true; | ||
| stopHeartbeat(); | ||
| const current = await fs.readFile(lockFile, "utf-8").catch(() => null); | ||
| if (current === ownerId) { | ||
| await fs.rm(lockFile, { force: true }); | ||
| } | ||
| }; | ||
| } | ||
| async rm(filePath) { | ||
| await fs.rm(filePath, { recursive: true, force: true }); | ||
| } | ||
| async rename(oldPath, newPath) { | ||
| await fs.rename(oldPath, newPath); | ||
| } | ||
| async realpath(filePath) { | ||
| try { | ||
| return await fs.realpath(filePath); | ||
| } catch (error) { | ||
| if (this.isEnoent(error)) | ||
| return filePath; | ||
| throw error; | ||
| } | ||
| } | ||
| async getTempDir() { | ||
| return await fs.mkdtemp(path.join(os.tmpdir(), "uipath-fs-")); | ||
| } | ||
| async copyDirectory(sourcePath, destPath) { | ||
| const sourceStats = await this.stat(sourcePath); | ||
| if (!sourceStats) { | ||
| throw new Error(`Source directory does not exist: ${sourcePath}`); | ||
| } | ||
| if (!sourceStats.isDirectory()) { | ||
| throw new Error(`Source path is not a directory: ${sourcePath}`); | ||
| } | ||
| await this.mkdir(destPath); | ||
| const entries = await this.readdir(sourcePath); | ||
| for (const entry of entries) { | ||
| const srcEntry = path.join(sourcePath, entry); | ||
| const destEntry = path.join(destPath, entry); | ||
| const entryStats = await this.stat(srcEntry); | ||
| if (!entryStats) | ||
| continue; | ||
| if (entryStats.isDirectory()) { | ||
| await this.copyDirectory(srcEntry, destEntry); | ||
| } else if (entryStats.isFile()) { | ||
| const content = await this.readFile(srcEntry); | ||
| if (content !== null) { | ||
| await this.writeFile(destEntry, content); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| isEnoent(error) { | ||
| return this.hasErrnoCode(error, "ENOENT"); | ||
| } | ||
| hasErrnoCode(error, code) { | ||
| return typeof error === "object" && error !== null && "code" in error && error.code === code; | ||
| } | ||
| } | ||
| // ../filesystem/src/index.ts | ||
| var fsInstance = new NodeFileSystem; | ||
| var getFileSystem = () => fsInstance; | ||
| export { getFileSystem }; | ||
| //# debugId=25EC9C9B4767723E64756E2164756E21 |
Sorry, the diff of this file is too big to display
| import { | ||
| toolsFactoryRepository | ||
| } from "./packager-tool-7yjpwj92.js"; | ||
| import { | ||
| FlowToolFactory | ||
| } from "./packager-tool-hcdc89cf.js"; | ||
| // src/packager-tool.ts | ||
| function registerPackagerFactories() { | ||
| toolsFactoryRepository.registerProjectToolFactory(new FlowToolFactory); | ||
| } | ||
| export { registerPackagerFactories }; | ||
| //# debugId=2A70E30168B92A8A64756E2164756E21 |
| // ../auth/src/constants.ts | ||
| var UIPATH_HOME_DIR = ".uipath"; | ||
| var AUTH_FILENAME = ".auth"; | ||
| var DEFAULT_BASE_URL = "https://cloud.uipath.com"; | ||
| var DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000; | ||
| var AUTH_TIMEOUT_ERROR_CODE = "EAUTHTIMEOUT"; | ||
| var AUTH_CANCELLED_ERROR_CODE = "EAUTHCANCELLED"; | ||
| export { UIPATH_HOME_DIR, AUTH_FILENAME, DEFAULT_BASE_URL, DEFAULT_AUTH_TIMEOUT_MS, AUTH_TIMEOUT_ERROR_CODE, AUTH_CANCELLED_ERROR_CODE }; | ||
| //# debugId=E98AE5255EE78AC164756E2164756E21 |
| import { | ||
| VALID_PROJECT_NAME_REGEX, | ||
| nodeModuleRegistry, | ||
| prepareProjectLocation, | ||
| tryRegisterProjectInParentSolution, | ||
| writeFlowWorkflow | ||
| } from "./packager-tool-2vme4a8e.js"; | ||
| import { | ||
| catchError, | ||
| ensureProjectArtifacts | ||
| } from "./packager-tool-p1ts5b0h.js"; | ||
| import { | ||
| getFileSystem | ||
| } from "./packager-tool-1cb0d5e0.js"; | ||
| import { | ||
| createWorkflow | ||
| } from "./packager-tool-hcdc89cf.js"; | ||
| // src/services/flow-init-service.ts | ||
| var safeMkdir = async (fs, dir) => { | ||
| const [err] = await catchError(fs.mkdir(dir)); | ||
| if (err && !(("code" in err) && err.code === "EEXIST")) { | ||
| throw err; | ||
| } | ||
| }; | ||
| async function flowInitAsync(name, options = {}) { | ||
| if (!VALID_PROJECT_NAME_REGEX.test(name)) { | ||
| throw new Error(`Invalid project name "${name}". Name can only contain letters, numbers, underscores (_), and hyphens (-).`); | ||
| } | ||
| const fs = getFileSystem(); | ||
| const baseDir = options.cwd ?? "."; | ||
| const { projectDir, autoCreatedSolution } = await prepareProjectLocation(fs, fs.path.resolve(baseDir, name), name, { skipRegistration: options.skipRegistration }); | ||
| const [statError] = await catchError(fs.stat(projectDir)); | ||
| const projectDirExists = !statError; | ||
| if (statError && !(("code" in statError) && (statError.code === "ENOENT" || statError.code === "PathNotFound"))) { | ||
| throw statError; | ||
| } | ||
| if (projectDirExists && !options.force) { | ||
| const existingEntries = await fs.readdir(projectDir); | ||
| if (existingEntries.length > 0) { | ||
| throw new Error(`Directory "${name}" already exists and is not empty. Use --force to overwrite.`); | ||
| } | ||
| } | ||
| await safeMkdir(fs, projectDir); | ||
| const triggerManifest = nodeModuleRegistry["core.trigger.manual"].latest; | ||
| const flowId = crypto.randomUUID(); | ||
| const workflow = createWorkflow({ | ||
| id: flowId, | ||
| name, | ||
| triggerManifest | ||
| }); | ||
| const projectUiproj = { | ||
| Name: name, | ||
| ProjectType: "Flow" | ||
| }; | ||
| await fs.writeFile(fs.path.join(projectDir, "project.uiproj"), `${JSON.stringify(projectUiproj, null, 2)} | ||
| `); | ||
| const flowFile = fs.path.join(projectDir, `${name}.flow`); | ||
| await writeFlowWorkflow(flowFile, workflow); | ||
| const operateJson = { | ||
| $schema: "https://cloud.uipath.com/draft/2024-12/operate", | ||
| projectId: flowId, | ||
| contentType: "Flow", | ||
| targetFramework: "Portable", | ||
| runtimeOptions: { | ||
| requiresUserInteraction: false, | ||
| isAttended: false | ||
| } | ||
| }; | ||
| await fs.writeFile(fs.path.join(projectDir, "operate.json"), `${JSON.stringify(operateJson, null, 2)} | ||
| `); | ||
| const registration = await tryRegisterProjectInParentSolution(fs, projectDir, { skipRegistration: options.skipRegistration }); | ||
| const projectArtifacts = await maybeGenerateProjectArtifacts(registration, name); | ||
| return { | ||
| projectName: name, | ||
| projectDir, | ||
| flowFile, | ||
| registration, | ||
| autoCreatedSolution, | ||
| projectArtifacts | ||
| }; | ||
| } | ||
| async function maybeGenerateProjectArtifacts(registration, projectName) { | ||
| if (registration.Status !== "Registered" && registration.Status !== "AlreadyRegistered" || !registration.Solution || !registration.ProjectId) { | ||
| return; | ||
| } | ||
| const fs = getFileSystem(); | ||
| return ensureProjectArtifacts({ | ||
| solutionDir: fs.path.dirname(registration.Solution), | ||
| projectId: registration.ProjectId, | ||
| projectName, | ||
| projectType: "Flow" | ||
| }); | ||
| } | ||
| export { flowInitAsync }; | ||
| //# debugId=8C4F37491906C06464756E2164756E21 |
Sorry, the diff of this file is too big to display
| //# debugId=7041B570F390EB6464756E2164756E21 |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| // ../auth/src/catch-error.ts | ||
| function isPromiseLike(value) { | ||
| return value !== null && typeof value === "object" && typeof value.then === "function"; | ||
| } | ||
| function catchError(fnOrPromise) { | ||
| if (isPromiseLike(fnOrPromise)) { | ||
| return settlePromiseLike(fnOrPromise); | ||
| } | ||
| try { | ||
| const result = fnOrPromise(); | ||
| if (isPromiseLike(result)) { | ||
| return settlePromiseLike(result); | ||
| } | ||
| return [undefined, result]; | ||
| } catch (error) { | ||
| return [ | ||
| error instanceof Error ? error : new Error(String(error)), | ||
| undefined | ||
| ]; | ||
| } | ||
| } | ||
| function settlePromiseLike(thenable) { | ||
| return Promise.resolve(thenable).then((data) => [undefined, data]).catch((error) => [ | ||
| error instanceof Error ? error : new Error(String(error)), | ||
| undefined | ||
| ]); | ||
| } | ||
| export { catchError }; | ||
| //# debugId=CD090F76722F72E364756E2164756E21 |
Sorry, the diff of this file is too big to display
| // ../../node_modules/@uipath/flow-migrations/dist/chunk-PF22ZHE3.js | ||
| var createMigration_invalidDownInput_message = "Invalid input for down-migration {{fromVersion}} → {{toVersion}}"; | ||
| var createMigration_invalidDownOutput_message = "Invalid output for down-migration {{fromVersion}} → {{toVersion}}"; | ||
| var createMigration_invalidInput_message = "Invalid input for migration {{fromVersion}} → {{toVersion}}"; | ||
| var createMigration_invalidOutput_message = "Invalid output for migration {{fromVersion}} → {{toVersion}}"; | ||
| var downgradeWorkflow_missingDown_message = "Downgrade path is missing {{fromVersion}} → {{toVersion}}"; | ||
| var downgradeWorkflow_noPath_message = "No downgrade path from {{fromVersion}} to {{toVersion}}"; | ||
| var migrate_chain_noMigrationFound_message = "No migration found from version {{current}}. Cannot reach {{toVersion}}."; | ||
| var en_default = { | ||
| createMigration_invalidDownInput_message, | ||
| createMigration_invalidDownOutput_message, | ||
| createMigration_invalidInput_message, | ||
| createMigration_invalidOutput_message, | ||
| downgradeWorkflow_missingDown_message, | ||
| downgradeWorkflow_noPath_message, | ||
| migrate_chain_noMigrationFound_message | ||
| }; | ||
| export { createMigration_invalidDownInput_message, createMigration_invalidDownOutput_message, createMigration_invalidInput_message, createMigration_invalidOutput_message, downgradeWorkflow_missingDown_message, downgradeWorkflow_noPath_message, migrate_chain_noMigrationFound_message, en_default }; | ||
| //# debugId=F2DA66301ADBA78364756E2164756E21 |
| import { | ||
| AGGREGATION_OPTIONS, | ||
| BpmnServiceType, | ||
| CONDITIONS_BY_TYPE, | ||
| CONDITION_LABELS, | ||
| DEBUG_WEBHOOK_START_EVENT_PREFIX, | ||
| DEFAULT_PACKAGE_INTENT, | ||
| ESCAPED_MUSTACHE_PLACEHOLDER, | ||
| FREE_TEXT_CONDITIONS, | ||
| LIST_CONDITIONS, | ||
| PASSTHROUGH_SCRIPT, | ||
| PRIMITIVE_GROUP_KEY, | ||
| PUBLISH_ENTRY_POINT_PREFIX, | ||
| TRANSFORMATIONS_BY_TYPE, | ||
| TRANSFORMATION_OPTIONS, | ||
| UnresolvedAgentInputTypeError, | ||
| VALUE_FREE_CONDITIONS, | ||
| buildAgentInputTypeResolver, | ||
| buildCollectionAccessor, | ||
| canPruneAgentInputs, | ||
| collectArtifactDescendants, | ||
| collectCompositeConnectorInputs, | ||
| collectInlineAgentClusterInputs, | ||
| collectInlineAgentInputsFromAgent, | ||
| compositeConnectorInputKey, | ||
| convertDotNotationToNested, | ||
| createNodeOutputMappings, | ||
| createOutputMapping, | ||
| deepTransformStrings, | ||
| deriveAgentInputVariables, | ||
| deriveMergedAgentInputVariables, | ||
| escapeStringForCode, | ||
| extractAgentInputName, | ||
| extractInputMetadata, | ||
| extractTelemetryData, | ||
| findTerminalNodeIds, | ||
| findTerminalNodes, | ||
| generateDataTransformScript, | ||
| generateFilterScript, | ||
| generateGroupByScript, | ||
| generateMapScript, | ||
| getConditionsForType, | ||
| getCuratedOutputFields, | ||
| getDebugWebhookStartEventId, | ||
| getOperationScript, | ||
| getTransformationsForType, | ||
| hasMustache, | ||
| implicitNodePrefix2, | ||
| isCompositeConnectorValue, | ||
| isDataTransform, | ||
| isFileType, | ||
| mapWebhookDebugEntryPoint, | ||
| mergeAnalyzeFilesInputs, | ||
| mergeCompositeConnectorInputs, | ||
| parseMustacheSegments, | ||
| protectJsonStrings, | ||
| restoreJsonStrings, | ||
| rewriteInputTokensToSource, | ||
| rewriteStringsDeep, | ||
| rewriteWebhookTriggerStartEventIdForDebug, | ||
| rewriteWebhookTriggersForDebug, | ||
| scanSourceRefsDeep, | ||
| serializeTemplateInterpolations, | ||
| stripVarsPrefix, | ||
| toServerlessWorkflow, | ||
| toXml | ||
| } from "./packager-tool-h3gpqv5a.js"; | ||
| import"./packager-tool-jqtspg41.js"; | ||
| import"./packager-tool-htc0z863.js"; | ||
| import"./packager-tool-fr5b9qs6.js"; | ||
| import"./packager-tool-gbgfwx8f.js"; | ||
| import"./packager-tool-q9zrqwxw.js"; | ||
| import"./packager-tool-ahm4ymrp.js"; | ||
| import"./packager-tool-c19w8vg9.js"; | ||
| import"./packager-tool-973f0r2g.js"; | ||
| import"./packager-tool-c23zrhj8.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| export { | ||
| toXml, | ||
| toServerlessWorkflow, | ||
| stripVarsPrefix, | ||
| serializeTemplateInterpolations, | ||
| scanSourceRefsDeep, | ||
| rewriteWebhookTriggersForDebug, | ||
| rewriteWebhookTriggerStartEventIdForDebug, | ||
| rewriteStringsDeep, | ||
| rewriteInputTokensToSource, | ||
| restoreJsonStrings, | ||
| protectJsonStrings, | ||
| parseMustacheSegments, | ||
| mergeCompositeConnectorInputs, | ||
| mergeAnalyzeFilesInputs, | ||
| mapWebhookDebugEntryPoint, | ||
| isFileType, | ||
| isDataTransform, | ||
| isCompositeConnectorValue, | ||
| implicitNodePrefix2 as implicitNodePrefix, | ||
| hasMustache, | ||
| getTransformationsForType, | ||
| getOperationScript, | ||
| getDebugWebhookStartEventId, | ||
| getCuratedOutputFields, | ||
| getConditionsForType, | ||
| generateMapScript, | ||
| generateGroupByScript, | ||
| generateFilterScript, | ||
| generateDataTransformScript, | ||
| findTerminalNodes, | ||
| findTerminalNodeIds, | ||
| extractTelemetryData, | ||
| extractInputMetadata, | ||
| extractAgentInputName, | ||
| escapeStringForCode, | ||
| deriveMergedAgentInputVariables, | ||
| deriveAgentInputVariables, | ||
| deepTransformStrings, | ||
| createOutputMapping, | ||
| createNodeOutputMappings, | ||
| convertDotNotationToNested, | ||
| compositeConnectorInputKey, | ||
| collectInlineAgentInputsFromAgent, | ||
| collectInlineAgentClusterInputs, | ||
| collectCompositeConnectorInputs, | ||
| collectArtifactDescendants, | ||
| canPruneAgentInputs, | ||
| buildCollectionAccessor, | ||
| buildAgentInputTypeResolver, | ||
| VALUE_FREE_CONDITIONS, | ||
| UnresolvedAgentInputTypeError, | ||
| TRANSFORMATION_OPTIONS, | ||
| TRANSFORMATIONS_BY_TYPE, | ||
| PUBLISH_ENTRY_POINT_PREFIX, | ||
| PRIMITIVE_GROUP_KEY, | ||
| PASSTHROUGH_SCRIPT, | ||
| LIST_CONDITIONS, | ||
| FREE_TEXT_CONDITIONS, | ||
| ESCAPED_MUSTACHE_PLACEHOLDER, | ||
| DEFAULT_PACKAGE_INTENT, | ||
| DEBUG_WEBHOOK_START_EVENT_PREFIX, | ||
| CONDITION_LABELS, | ||
| CONDITIONS_BY_TYPE, | ||
| BpmnServiceType, | ||
| AGGREGATION_OPTIONS | ||
| }; | ||
| //# debugId=B6DFD94A24099FAE64756E2164756E21 |
+19
-16
@@ -5,24 +5,27 @@ #!/usr/bin/env node | ||
| registerCommands | ||
| } from "./packager-tool-774q0xhb.js"; | ||
| import"./packager-tool-0j0gntbg.js"; | ||
| import"./packager-tool-jh2jacex.js"; | ||
| import"./packager-tool-rdkhh2x5.js"; | ||
| } from "./packager-tool-mtrz8981.js"; | ||
| import"./packager-tool-3gmj73c5.js"; | ||
| import"./packager-tool-9ae2gt84.js"; | ||
| import"./packager-tool-9qhez6bh.js"; | ||
| import"./packager-tool-7yjpwj92.js"; | ||
| import"./packager-tool-2vme4a8e.js"; | ||
| import"./packager-tool-9qecd4wb.js"; | ||
| import"./packager-tool-qa9gftnj.js"; | ||
| import"./packager-tool-5arsyj36.js"; | ||
| import { | ||
| Command | ||
| } from "./packager-tool-vd9zwk2j.js"; | ||
| import"./packager-tool-9qecd4wb.js"; | ||
| import"./packager-tool-4f38v0ry.js"; | ||
| import"./packager-tool-1ps2qeqg.js"; | ||
| import"./packager-tool-g46253qc.js"; | ||
| import"./packager-tool-kgkv7f24.js"; | ||
| import"./packager-tool-ek2dnj9h.js"; | ||
| } from "./packager-tool-p1ts5b0h.js"; | ||
| import"./packager-tool-1cb0d5e0.js"; | ||
| import"./packager-tool-hcdc89cf.js"; | ||
| import"./packager-tool-vz3b1ea9.js"; | ||
| import"./packager-tool-y3dezh8k.js"; | ||
| import"./packager-tool-hk1gxnth.js"; | ||
| import"./packager-tool-qz3cg5tg.js"; | ||
| import"./packager-tool-gbgfwx8f.js"; | ||
| import"./packager-tool-kvgt1s4z.js"; | ||
| import"./packager-tool-sc961w0q.js"; | ||
| import"./packager-tool-q9zrqwxw.js"; | ||
| import"./packager-tool-ahm4ymrp.js"; | ||
| import"./packager-tool-c19w8vg9.js"; | ||
| import"./packager-tool-973f0r2g.js"; | ||
| import"./packager-tool-c23zrhj8.js"; | ||
| import"./packager-tool-9bnpe8n1.js"; | ||
| import"./packager-tool-ahm4ymrp.js"; | ||
| import"./packager-tool-c19w8vg9.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
@@ -36,2 +39,2 @@ | ||
| //# debugId=6E58070649601CF664756E2164756E21 | ||
| //# debugId=3CB0CE91C914803864756E2164756E21 |
+15
-12
| import { | ||
| flowInitAsync | ||
| } from "./packager-tool-jh2jacex.js"; | ||
| import"./packager-tool-vd9zwk2j.js"; | ||
| } from "./packager-tool-9ae2gt84.js"; | ||
| import"./packager-tool-2vme4a8e.js"; | ||
| import"./packager-tool-9qecd4wb.js"; | ||
| import"./packager-tool-4f38v0ry.js"; | ||
| import"./packager-tool-1ps2qeqg.js"; | ||
| import"./packager-tool-g46253qc.js"; | ||
| import"./packager-tool-kgkv7f24.js"; | ||
| import"./packager-tool-ek2dnj9h.js"; | ||
| import"./packager-tool-qa9gftnj.js"; | ||
| import"./packager-tool-5arsyj36.js"; | ||
| import"./packager-tool-p1ts5b0h.js"; | ||
| import"./packager-tool-1cb0d5e0.js"; | ||
| import"./packager-tool-hcdc89cf.js"; | ||
| import"./packager-tool-vz3b1ea9.js"; | ||
| import"./packager-tool-y3dezh8k.js"; | ||
| import"./packager-tool-hk1gxnth.js"; | ||
| import"./packager-tool-qz3cg5tg.js"; | ||
| import"./packager-tool-gbgfwx8f.js"; | ||
| import"./packager-tool-kvgt1s4z.js"; | ||
| import"./packager-tool-sc961w0q.js"; | ||
| import"./packager-tool-q9zrqwxw.js"; | ||
| import"./packager-tool-ahm4ymrp.js"; | ||
| import"./packager-tool-c19w8vg9.js"; | ||
| import"./packager-tool-973f0r2g.js"; | ||
| import"./packager-tool-c23zrhj8.js"; | ||
| import"./packager-tool-9bnpe8n1.js"; | ||
| import"./packager-tool-ahm4ymrp.js"; | ||
| import"./packager-tool-c19w8vg9.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
@@ -24,2 +27,2 @@ export { | ||
| //# debugId=28CDD51E986914A164756E2164756E21 | ||
| //# debugId=C1CA6AD8BD1EC9CD64756E2164756E21 |
| import { | ||
| registerPackagerFactories | ||
| } from "./packager-tool-0j0gntbg.js"; | ||
| } from "./packager-tool-3gmj73c5.js"; | ||
| import"./packager-tool-7yjpwj92.js"; | ||
| import"./packager-tool-g46253qc.js"; | ||
| import"./packager-tool-kgkv7f24.js"; | ||
| import"./packager-tool-ek2dnj9h.js"; | ||
| import"./packager-tool-hcdc89cf.js"; | ||
| import"./packager-tool-vz3b1ea9.js"; | ||
| import"./packager-tool-y3dezh8k.js"; | ||
| import"./packager-tool-hk1gxnth.js"; | ||
| import"./packager-tool-qz3cg5tg.js"; | ||
| import"./packager-tool-gbgfwx8f.js"; | ||
| import"./packager-tool-kvgt1s4z.js"; | ||
| import"./packager-tool-sc961w0q.js"; | ||
| import"./packager-tool-q9zrqwxw.js"; | ||
| import"./packager-tool-ahm4ymrp.js"; | ||
| import"./packager-tool-c19w8vg9.js"; | ||
| import"./packager-tool-973f0r2g.js"; | ||
| import"./packager-tool-c23zrhj8.js"; | ||
| import"./packager-tool-9bnpe8n1.js"; | ||
| import"./packager-tool-ahm4ymrp.js"; | ||
| import"./packager-tool-c19w8vg9.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
@@ -21,2 +22,2 @@ export { | ||
| //# debugId=C51D29BA4D21587C64756E2164756E21 | ||
| //# debugId=9C12E841744085BE64756E2164756E21 |
@@ -10,4 +10,5 @@ import { type MigrationErrorTracker, type MigrationWorkflow } from "@uipath/flow-migrations"; | ||
| * | ||
| * `migrateWorkflow` does NOT throw on a failed step; it returns the ORIGINAL | ||
| * workflow with `migrated: false` and a populated `error: { step, message }`. | ||
| * `migrateWorkflowToFloor` does NOT throw on a failed step; it returns the | ||
| * ORIGINAL workflow with `migrated: false` and a populated | ||
| * `error: { step, message }`. | ||
| * The offending field paths are only reachable through the optional | ||
@@ -26,3 +27,3 @@ * `errorTracker`, not the returned `error`. `captureMigrationIssues` wires that | ||
| * validation issue). `step` and `rawMessage` come straight from | ||
| * `migrateWorkflow`'s returned `error`; `fieldPaths` come from | ||
| * `migrateWorkflowToFloor`'s returned `error`; `fieldPaths` come from | ||
| * `captureMigrationIssues`. | ||
@@ -41,14 +42,17 @@ */ | ||
| /** | ||
| * Run the forward migration Studio Web would run when opening this flow, in | ||
| * memory — no write, no network. Returns `{ ok: false, ... }` only when a | ||
| * migration STEP fails (the flow is at a known version but its shape is | ||
| * Run the floor migration Studio Web would run when opening this flow, in | ||
| * memory — no write, no network: upgrade to `runtimeVersion`, then project | ||
| * back down to the fleet write floor. Returns `{ ok: false, ... }` only when | ||
| * a migration STEP fails (the flow is at a known version but its shape is | ||
| * invalid for the next step); that flow will not open in Studio Web until | ||
| * fixed. | ||
| * | ||
| * Returns `{ ok: true }` when the flow migrates cleanly, is already current, | ||
| * OR when the chain can't be built at all — a missing/unknown/newer-than- | ||
| * bundled `version` makes `migrateWorkflow` throw before running any step. | ||
| * That last case means the CLI's bundled migrations are out of step with the | ||
| * flow (version skew), which is not a flow defect we should hard-fail on. | ||
| * Returns `{ ok: true }` when the flow migrates cleanly, is already at the | ||
| * floor, OR when the chain can't be built at all — a missing/unknown/newer- | ||
| * than-runtime `version` means the CLI's bundled migrations are out of step | ||
| * with the flow (version skew), which is not a flow defect we should | ||
| * hard-fail on. `migrateWorkflowToFloor` folds that case into its returned | ||
| * `error` instead of throwing, so probe chain-buildability up front with | ||
| * `getMigrationChain` to keep skew fail-open. | ||
| */ | ||
| export declare function checkForwardMigration(rawWorkflow: MigrationWorkflow): ForwardMigrationCheck; |
@@ -86,11 +86,17 @@ import type { NodeManifest } from "@uipath/flow-core"; | ||
| /** | ||
| * Forward-migration preflight (UV-15030). | ||
| * Floor-migration preflight (UV-15030). | ||
| * | ||
| * Studio Web runs the `@uipath/flow-migrations` chain when it opens a | ||
| * `.flow`; a flow that fails a migration step (e.g. 1.3->1.4) passes every | ||
| * Studio Web runs the `@uipath/flow-migrations` floor chain when it opens | ||
| * a `.flow` (up to the runtime version, projected back down to the write | ||
| * floor); a flow that fails a migration step (e.g. 1.3->1.4) passes every | ||
| * structural/semantic check here yet never opens in the browser. The CLI | ||
| * bundles the same engine, so we run it in-memory (no write, no network) | ||
| * and turn a failed step into a blocking error naming the offending | ||
| * fields. A flow that migrates cleanly, is already current, or carries an | ||
| * unknown/skewed version yields no issue — see `checkForwardMigration`. | ||
| * fields. A flow that round-trips cleanly through the floor pipeline or | ||
| * carries an unknown/skewed version yields no issue — see | ||
| * `checkForwardMigration`. | ||
| * | ||
| * `$ref` chunks are resolved before the check — the floor projection | ||
| * validates the full document shape (e.g. `layout.nodes`), which an | ||
| * unresolved `$ref` placeholder would fail. | ||
| */ | ||
@@ -97,0 +103,0 @@ private validateForwardMigration; |
+18
-15
| import { | ||
| metadata, | ||
| registerCommands | ||
| } from "./packager-tool-774q0xhb.js"; | ||
| import"./packager-tool-0j0gntbg.js"; | ||
| import"./packager-tool-jh2jacex.js"; | ||
| import"./packager-tool-rdkhh2x5.js"; | ||
| } from "./packager-tool-mtrz8981.js"; | ||
| import"./packager-tool-3gmj73c5.js"; | ||
| import"./packager-tool-9ae2gt84.js"; | ||
| import"./packager-tool-9qhez6bh.js"; | ||
| import"./packager-tool-7yjpwj92.js"; | ||
| import"./packager-tool-vd9zwk2j.js"; | ||
| import"./packager-tool-2vme4a8e.js"; | ||
| import"./packager-tool-9qecd4wb.js"; | ||
| import"./packager-tool-4f38v0ry.js"; | ||
| import"./packager-tool-1ps2qeqg.js"; | ||
| import"./packager-tool-g46253qc.js"; | ||
| import"./packager-tool-kgkv7f24.js"; | ||
| import"./packager-tool-ek2dnj9h.js"; | ||
| import"./packager-tool-qa9gftnj.js"; | ||
| import"./packager-tool-5arsyj36.js"; | ||
| import"./packager-tool-p1ts5b0h.js"; | ||
| import"./packager-tool-1cb0d5e0.js"; | ||
| import"./packager-tool-hcdc89cf.js"; | ||
| import"./packager-tool-vz3b1ea9.js"; | ||
| import"./packager-tool-y3dezh8k.js"; | ||
| import"./packager-tool-hk1gxnth.js"; | ||
| import"./packager-tool-qz3cg5tg.js"; | ||
| import"./packager-tool-gbgfwx8f.js"; | ||
| import"./packager-tool-kvgt1s4z.js"; | ||
| import"./packager-tool-sc961w0q.js"; | ||
| import"./packager-tool-q9zrqwxw.js"; | ||
| import"./packager-tool-ahm4ymrp.js"; | ||
| import"./packager-tool-c19w8vg9.js"; | ||
| import"./packager-tool-973f0r2g.js"; | ||
| import"./packager-tool-c23zrhj8.js"; | ||
| import"./packager-tool-9bnpe8n1.js"; | ||
| import"./packager-tool-ahm4ymrp.js"; | ||
| import"./packager-tool-c19w8vg9.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
@@ -30,2 +33,2 @@ export { | ||
| //# debugId=FEFDD8691754F44164756E2164756E21 | ||
| //# debugId=DCD9B041E506DF7F64756E2164756E21 |
@@ -8,3 +8,3 @@ import type { Workflow } from "@uipath/flow-core"; | ||
| } | ||
| /** Read a .flow file, resolve any `$ref` chunks, normalize layout into nodes, and migrate pre-current-version documents to the current schema in memory (the file is untouched until a caller writes back). */ | ||
| /** Read a .flow file, resolve any `$ref` chunks, normalize layout into nodes, and project the document to the fleet write floor in memory (the file is untouched until a caller writes back). */ | ||
| export declare function readFlowWorkflow(filePath: string): Promise<ReadFlowResult>; | ||
@@ -11,0 +11,0 @@ /** Write a workflow back to disk; pass `refMap` from `readFlowWorkflow` to preserve `$ref` chunks. */ |
+15
-12
| import { | ||
| FlowValidateService, | ||
| connectorNodeValidator | ||
| } from "./packager-tool-rdkhh2x5.js"; | ||
| } from "./packager-tool-9qhez6bh.js"; | ||
| import"./packager-tool-7yjpwj92.js"; | ||
| import"./packager-tool-vd9zwk2j.js"; | ||
| import"./packager-tool-2vme4a8e.js"; | ||
| import"./packager-tool-9qecd4wb.js"; | ||
| import"./packager-tool-4f38v0ry.js"; | ||
| import"./packager-tool-1ps2qeqg.js"; | ||
| import"./packager-tool-g46253qc.js"; | ||
| import"./packager-tool-kgkv7f24.js"; | ||
| import"./packager-tool-ek2dnj9h.js"; | ||
| import"./packager-tool-qa9gftnj.js"; | ||
| import"./packager-tool-5arsyj36.js"; | ||
| import"./packager-tool-p1ts5b0h.js"; | ||
| import"./packager-tool-1cb0d5e0.js"; | ||
| import"./packager-tool-hcdc89cf.js"; | ||
| import"./packager-tool-vz3b1ea9.js"; | ||
| import"./packager-tool-y3dezh8k.js"; | ||
| import"./packager-tool-hk1gxnth.js"; | ||
| import"./packager-tool-qz3cg5tg.js"; | ||
| import"./packager-tool-gbgfwx8f.js"; | ||
| import"./packager-tool-kvgt1s4z.js"; | ||
| import"./packager-tool-sc961w0q.js"; | ||
| import"./packager-tool-q9zrqwxw.js"; | ||
| import"./packager-tool-ahm4ymrp.js"; | ||
| import"./packager-tool-c19w8vg9.js"; | ||
| import"./packager-tool-973f0r2g.js"; | ||
| import"./packager-tool-c23zrhj8.js"; | ||
| import"./packager-tool-9bnpe8n1.js"; | ||
| import"./packager-tool-ahm4ymrp.js"; | ||
| import"./packager-tool-c19w8vg9.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
@@ -27,2 +30,2 @@ export { | ||
| //# debugId=7EA13B8E7AF48D6E64756E2164756E21 | ||
| //# debugId=3EC278E684EA70BA64756E2164756E21 |
+2
-2
| { | ||
| "name": "@uipath/flow-tool", | ||
| "license": "MIT", | ||
| "version": "1.200.0-preview.109", | ||
| "version": "1.201.0-preview.115", | ||
| "description": "Create, debug, and run UiPath Flow projects and jobs.", | ||
@@ -38,3 +38,3 @@ "private": false, | ||
| ], | ||
| "gitHead": "fcc01cdae81bbd0c25d3d4fc287537a9d19d99f4" | ||
| "gitHead": "f1086b73654d7728cb71f280588b3e0c77d535fc" | ||
| } |
| import { | ||
| getGlobalThis | ||
| } from "./packager-tool-9qecd4wb.js"; | ||
| import { | ||
| AUTH_CANCELLED_ERROR_CODE | ||
| } from "./packager-tool-1ps2qeqg.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| // ../auth/src/strategies/browser-strategy.ts | ||
| class BrowserAuthStrategy { | ||
| async execute(url, _redirectUri, expectedState, opts) { | ||
| const global = getGlobalThis(); | ||
| if (!global?.window) { | ||
| throw new Error("Browser environment required for authentication"); | ||
| } | ||
| const screenWidth = global.window.screen?.width ?? 1024; | ||
| const screenHeight = global.window.screen?.height ?? 768; | ||
| const width = 600; | ||
| const height = 700; | ||
| const left = screenWidth / 2 - width / 2; | ||
| const top = screenHeight / 2 - height / 2; | ||
| if (!global.window.open) { | ||
| throw new Error("window.open is not available"); | ||
| } | ||
| const popupResult = global.window.open(url, "uip_auth", `width=${width},height=${height},left=${left},top=${top},resizable=yes,scrollbars=yes,status=yes`); | ||
| const popup = popupResult; | ||
| if (!popup) { | ||
| throw new Error(`Authentication popup was blocked by your browser. | ||
| ` + `To continue: | ||
| ` + `1. Look for a popup blocker icon in your address bar | ||
| ` + `2. Allow popups for this site | ||
| ` + `3. Try logging in again | ||
| ` + "If using an ad blocker, you may need to temporarily disable it."); | ||
| } | ||
| return new Promise((resolve, reject) => { | ||
| let timer; | ||
| const messageHandler = (event) => { | ||
| if (event.data?.type === "UIP_AUTH_CODE" && event.data.code) { | ||
| if (event.data.state !== expectedState) { | ||
| cleanup(); | ||
| reject(new Error("OAuth state mismatch — the callback state does not match the expected value. " + "This may indicate a CSRF attack. Please try signing in again.")); | ||
| popup.close(); | ||
| return; | ||
| } | ||
| cleanup(); | ||
| resolve(event.data.code); | ||
| popup.close(); | ||
| } else if (event.data?.type === "UIP_AUTH_ERROR") { | ||
| cleanup(); | ||
| const errorMsg = event.data.error || "Authentication failed"; | ||
| reject(new Error(`Authentication failed: ${errorMsg} | ||
| ` + "Please check your credentials and try again. " + "If the problem persists, verify your UiPath account is active.")); | ||
| popup.close(); | ||
| } | ||
| }; | ||
| const cleanup = () => { | ||
| global.window?.removeEventListener?.("message", messageHandler); | ||
| opts?.signal?.removeEventListener("abort", onAbort); | ||
| if (timer) | ||
| clearInterval(timer); | ||
| }; | ||
| const onAbort = () => { | ||
| cleanup(); | ||
| const err = new Error(`Authentication was cancelled. | ||
| ` + "The sign-in was cancelled before completing the login process. " + "Please try again and complete the authentication flow."); | ||
| err.code = AUTH_CANCELLED_ERROR_CODE; | ||
| reject(err); | ||
| popup.close(); | ||
| }; | ||
| if (opts?.signal) { | ||
| if (opts.signal.aborted) { | ||
| onAbort(); | ||
| return; | ||
| } | ||
| opts.signal.addEventListener("abort", onAbort, { once: true }); | ||
| } | ||
| if (global.window?.addEventListener) { | ||
| global.window.addEventListener("message", messageHandler); | ||
| } | ||
| timer = setInterval(() => { | ||
| if (popup.closed) { | ||
| cleanup(); | ||
| reject(new Error(`Authentication was cancelled. | ||
| ` + "The authentication popup was closed before completing the login process. " + "Please try again and complete the authentication flow.")); | ||
| } | ||
| }, 1000); | ||
| }); | ||
| } | ||
| } | ||
| export { | ||
| BrowserAuthStrategy | ||
| }; | ||
| //# debugId=B13A3005E9EE6C6564756E2164756E21 |
| import { | ||
| MANAGED_HTTP_NODE_TYPE, | ||
| buildConnectorHttpRequestDetail, | ||
| createNodeVariable, | ||
| findTerminalNodes, | ||
| getCollapsedSize, | ||
| getConnectorHttpRequestKey, | ||
| getExpandedShape, | ||
| getExpandedSize, | ||
| getLatestDefinitionByNodeType, | ||
| isContainerNodeManifest, | ||
| resolveNodeOutputTypeSchema | ||
| } from "./packager-tool-3ahtr7dn.js"; | ||
| import { | ||
| CURRENT_WORKFLOW_VERSION, | ||
| generateNextId, | ||
| isSubflowNodeType | ||
| } from "./packager-tool-1q1bg65m.js"; | ||
| import"./packager-tool-jqtspg41.js"; | ||
| import"./packager-tool-hkrpcn6d.js"; | ||
| import"./packager-tool-fr5b9qs6.js"; | ||
| import"./packager-tool-9bnpe8n1.js"; | ||
| import { | ||
| init_esm_shims | ||
| } from "./packager-tool-ahm4ymrp.js"; | ||
| import"./packager-tool-c19w8vg9.js"; | ||
| import"./packager-tool-3yjtbs1y.js"; | ||
| import"./packager-tool-060a9knt.js"; | ||
| import { | ||
| __require | ||
| } from "./packager-tool-wckvcay0.js"; | ||
| // ../../node_modules/@uipath/flow-converter/dist/conversion-COFE4RVO.js | ||
| init_esm_shims(); | ||
| init_esm_shims(); | ||
| init_esm_shims(); | ||
| function getManifestKey(nodeType, version) { | ||
| return `${nodeType}:${version}`; | ||
| } | ||
| function findManifestByNodeType(map, nodeType) { | ||
| const latestDef = getLatestDefinitionByNodeType(nodeType); | ||
| if (latestDef) { | ||
| const found = map.get(getManifestKey(nodeType, latestDef.version)); | ||
| if (found) | ||
| return found; | ||
| } | ||
| for (const manifest of map.values()) { | ||
| if (manifest.nodeType === nodeType) | ||
| return manifest; | ||
| } | ||
| return; | ||
| } | ||
| function isArtifactHandle(nodeHandleId, nodeConfig) { | ||
| return Boolean(nodeHandleId && nodeConfig && nodeConfig.handleConfiguration.some((handleGroup) => handleGroup.handles.some((h) => h.id === nodeHandleId && h.handleType === "artifact"))); | ||
| } | ||
| function shouldUseArtifactEdge(source, target, manifestMap) { | ||
| const sourceNodeConfig = manifestMap.get(getManifestKey(source.type, source.version)); | ||
| const targetNodeConfig = manifestMap.get(getManifestKey(target.type, target.version)); | ||
| return Boolean(isArtifactHandle(source.sourceHandle, sourceNodeConfig) && isArtifactHandle(target.targetHandle, targetNodeConfig)); | ||
| } | ||
| function resolveEdgeType(edge, nodes, manifestMap) { | ||
| const lookup = nodes instanceof Map ? (id) => nodes.get(id) : (id) => nodes.find((n) => n.id === id); | ||
| const sourceNode = lookup(edge.source); | ||
| const targetNode = lookup(edge.target); | ||
| if (sourceNode && targetNode) { | ||
| const isArtifact = shouldUseArtifactEdge({ type: sourceNode.data.type, version: sourceNode.data.typeVersion, sourceHandle: edge.sourceHandle }, { type: targetNode.data.type, version: targetNode.data.typeVersion, targetHandle: edge.targetHandle }, manifestMap); | ||
| if (isArtifact) { | ||
| return { ...edge, type: "artifact" }; | ||
| } | ||
| } | ||
| return edge; | ||
| } | ||
| init_esm_shims(); | ||
| function edgeToInstance(edge) { | ||
| const edgeData = {}; | ||
| if (edge.data?.label) { | ||
| edgeData.label = edge.data.label; | ||
| } | ||
| return { | ||
| id: edge.id, | ||
| sourceNodeId: edge.source, | ||
| sourcePort: edge.sourceHandle || "default", | ||
| targetNodeId: edge.target, | ||
| targetPort: edge.targetHandle || "default", | ||
| ...Object.keys(edgeData).length > 0 && { data: edgeData } | ||
| }; | ||
| } | ||
| function instanceToEdge(instance, type = "default") { | ||
| return { | ||
| id: instance.id, | ||
| source: instance.sourceNodeId, | ||
| sourceHandle: instance.sourcePort, | ||
| target: instance.targetNodeId, | ||
| targetHandle: instance.targetPort, | ||
| type, | ||
| ...instance.data && { data: instance.data } | ||
| }; | ||
| } | ||
| function nodeToInstance(node, offset = { x: 0, y: 0 }) { | ||
| const typeVersion = node.data?.typeVersion || "1.0.0"; | ||
| const display = node.data?.display || {}; | ||
| const inputs = node.data?.inputs || {}; | ||
| const ui = node.data?.ui || {}; | ||
| const width = node.width ?? node.measured?.width; | ||
| const height = node.height ?? node.measured?.height; | ||
| const variableUpdates = node.data?.variableUpdates; | ||
| const parentId = node.data?.parentId; | ||
| const allOutputs = node.data?.outputs; | ||
| const instanceOutputs = allOutputs ? Object.fromEntries(Object.entries(allOutputs).filter(([, def]) => def?.source != null)) : undefined; | ||
| return { | ||
| id: node.id, | ||
| type: node.type, | ||
| typeVersion, | ||
| ui: { | ||
| ...ui, | ||
| position: { | ||
| x: (node.position?.x ?? 0) - offset.x, | ||
| y: (node.position?.y ?? 0) - offset.y | ||
| }, | ||
| ...width && height ? { size: { width, height } } : {} | ||
| }, | ||
| display, | ||
| inputs: { | ||
| ...inputs, | ||
| ...node.data?.color !== undefined && { color: node.data.color }, | ||
| ...node.data?.content !== undefined && { content: node.data.content } | ||
| }, | ||
| ...instanceOutputs && Object.keys(instanceOutputs).length > 0 && { outputs: instanceOutputs }, | ||
| ...variableUpdates && variableUpdates.length > 0 && { variableUpdates }, | ||
| ...parentId && { parentId } | ||
| }; | ||
| } | ||
| function instanceToNode(instance, offset = { x: 0, y: 0 }) { | ||
| const position = instance.ui?.position ?? { x: 0, y: 0 }; | ||
| const color = instance.inputs?.color; | ||
| const content = instance.inputs?.content; | ||
| const variableUpdates = instance.variableUpdates; | ||
| return { | ||
| id: instance.id, | ||
| type: instance.type, | ||
| position: { | ||
| x: position.x + offset.x, | ||
| y: position.y + offset.y | ||
| }, | ||
| ...instance.ui?.size && { | ||
| width: instance.ui.size.width, | ||
| height: instance.ui.size.height | ||
| }, | ||
| data: { | ||
| type: instance.type, | ||
| typeVersion: instance.typeVersion, | ||
| display: instance.display || {}, | ||
| inputs: instance.inputs || {}, | ||
| ui: instance.ui || {}, | ||
| ...color !== undefined && { color }, | ||
| ...content !== undefined && { content }, | ||
| ...variableUpdates && variableUpdates.length > 0 && { variableUpdates }, | ||
| ...instance.parentId && { parentId: instance.parentId } | ||
| } | ||
| }; | ||
| } | ||
| init_esm_shims(); | ||
| init_esm_shims(); | ||
| function createBinding(options) { | ||
| return { | ||
| id: generateNextId("b", 8), | ||
| name: options.name, | ||
| type: "string", | ||
| resource: options.resource, | ||
| resourceKey: options.resourceKey ?? options.resource, | ||
| ...options.value && { default: options.value }, | ||
| ...options.propertyAttribute && { propertyAttribute: options.propertyAttribute }, | ||
| ...options.resourceSubType && { resourceSubType: options.resourceSubType } | ||
| }; | ||
| } | ||
| function createBindingsFromManifest(manifest) { | ||
| const model = manifest.model; | ||
| const bindingsTemplate = model?.bindings; | ||
| if (!bindingsTemplate?.values) | ||
| return []; | ||
| return bindingsTemplate.values.map((v) => createBinding({ | ||
| name: v.name, | ||
| value: v.default ?? "", | ||
| resource: bindingsTemplate.resource, | ||
| resourceKey: bindingsTemplate.resourceKey, | ||
| propertyAttribute: v.propertyAttribute, | ||
| resourceSubType: bindingsTemplate.resourceSubType | ||
| })); | ||
| } | ||
| init_esm_shims(); | ||
| init_esm_shims(); | ||
| var DEFAULT_TRIGGER_POSITION = { x: 256, y: 144 }; | ||
| init_esm_shims(); | ||
| init_esm_shims(); | ||
| init_esm_shims(); | ||
| init_esm_shims(); | ||
| init_esm_shims(); | ||
| var ARTIFACT_GROUP_SPACING = 96; | ||
| var ARTIFACT_HORIZONTAL_SPACING = ARTIFACT_GROUP_SPACING / 2; | ||
| init_esm_shims(); | ||
| init_esm_shims(); | ||
| var connectorHttpRequestProcessor = (definition, ctx) => { | ||
| const connectorKey = getConnectorHttpRequestKey(definition); | ||
| if (!connectorKey) | ||
| return; | ||
| const managed = ctx.getManifest(MANAGED_HTTP_NODE_TYPE); | ||
| if (!managed) | ||
| return; | ||
| return { | ||
| nodeType: managed.nodeType, | ||
| manifest: { | ||
| ...managed, | ||
| display: { | ||
| ...managed.display, | ||
| icon: definition.display?.icon ?? managed.display?.icon | ||
| }, | ||
| inputDefaults: { ...managed.inputDefaults, detail: buildConnectorHttpRequestDetail(connectorKey) } | ||
| } | ||
| }; | ||
| }; | ||
| var PROCESSORS = [connectorHttpRequestProcessor]; | ||
| function processManifest(definition, ctx) { | ||
| if (!definition) | ||
| return; | ||
| for (const processor of PROCESSORS) { | ||
| const result = processor(definition, ctx); | ||
| if (result) | ||
| return result; | ||
| } | ||
| return; | ||
| } | ||
| function resolveEffectiveManifest(rawNodeType, rawDefinition, ctx) { | ||
| const processed = processManifest(rawDefinition, ctx); | ||
| return { | ||
| nodeType: processed?.nodeType ?? rawNodeType, | ||
| manifest: processed?.manifest ?? rawDefinition | ||
| }; | ||
| } | ||
| init_esm_shims(); | ||
| var DEFAULT_ERROR_SCHEMA = { | ||
| $schema: "http://json-schema.org/draft-07/schema#", | ||
| type: "object", | ||
| required: ["code", "message", "detail", "category", "status"], | ||
| properties: { | ||
| code: { type: "string", description: "Error code as a string", descriptionKey: "subflowInterface_errorCode_description" }, | ||
| message: { type: "string", description: "High-level error message", descriptionKey: "subflowInterface_errorMessage_description" }, | ||
| detail: { type: "string", description: "Detailed error description", descriptionKey: "subflowInterface_errorDetail_description" }, | ||
| category: { type: "string", description: "Error category", descriptionKey: "subflowInterface_errorCategory_description" }, | ||
| status: { type: "integer", description: "HTTP status code", descriptionKey: "subflowInterface_errorStatus_description" } | ||
| }, | ||
| additionalProperties: false | ||
| }; | ||
| function getSubflowBaselineOutputs() { | ||
| return { | ||
| output: { type: "object" }, | ||
| error: { type: "object", schema: structuredClone(DEFAULT_ERROR_SCHEMA) } | ||
| }; | ||
| } | ||
| function buildSubflowOutputDefinition(globals) { | ||
| const properties = {}; | ||
| for (const v of globals) { | ||
| if (v.direction === "out") { | ||
| properties[v.id] = { | ||
| type: v.type || "object", | ||
| ...v.description && { description: v.description }, | ||
| ...v.schema ? v.schema : {} | ||
| }; | ||
| } | ||
| } | ||
| if (Object.keys(properties).length === 0) | ||
| return {}; | ||
| return { | ||
| output: { | ||
| type: "object", | ||
| properties | ||
| } | ||
| }; | ||
| } | ||
| function buildSubflowInputDefinition(globals) { | ||
| return globals.filter((v) => v.direction === "in"); | ||
| } | ||
| function buildSubflowPassThroughOutputDefinition(nodes, edges, manifestMap, nodeOutputsMap, subflows) { | ||
| if (nodes.length === 0) | ||
| return {}; | ||
| const terminalNodes = findTerminalNodes(nodes, edges, (n) => { | ||
| const manifest = manifestMap.get(getManifestKey(n.type, n.typeVersion)); | ||
| return manifest?.model?.type === "bpmn:StartEvent"; | ||
| }); | ||
| const terminalsWithOutputs = terminalNodes.map((n) => { | ||
| const manifest = manifestMap.get(getManifestKey(n.type, n.typeVersion)); | ||
| const manifestOutputDef = manifest?.outputDefinition; | ||
| let outputDef; | ||
| if (manifestOutputDef && Object.keys(manifestOutputDef).length > 0) { | ||
| outputDef = manifestOutputDef; | ||
| } else { | ||
| outputDef = nodeOutputsMap?.get(n.id); | ||
| if ((!outputDef || Object.keys(outputDef).length === 0) && isSubflowNodeType(n.type) && subflows) { | ||
| outputDef = computeSubflowEffectiveOutputDef(n.id, subflows, manifestMap); | ||
| } | ||
| } | ||
| if (!outputDef || Object.keys(outputDef).length === 0) | ||
| return null; | ||
| return { node: n, outputDef }; | ||
| }).filter((t) => t !== null); | ||
| if (terminalsWithOutputs.length === 0) | ||
| return {}; | ||
| const allKeys = /* @__PURE__ */ new Set; | ||
| for (const { outputDef } of terminalsWithOutputs) { | ||
| for (const key of Object.keys(outputDef)) { | ||
| allKeys.add(key); | ||
| } | ||
| } | ||
| const result = {}; | ||
| if (terminalsWithOutputs.length === 1) { | ||
| const { outputDef } = terminalsWithOutputs[0]; | ||
| for (const key of allKeys) { | ||
| result[key] = toSchemaType(outputDef[key]); | ||
| } | ||
| } else { | ||
| for (const key of allKeys) { | ||
| const properties = {}; | ||
| for (const { node, outputDef } of terminalsWithOutputs) { | ||
| if (key in outputDef) { | ||
| properties[node.id] = toSchemaType(outputDef[key]); | ||
| } | ||
| } | ||
| result[key] = { type: "object", properties }; | ||
| } | ||
| } | ||
| return result; | ||
| } | ||
| function toSchemaType(def) { | ||
| const { source: _, var: _v, ...schema } = def ?? {}; | ||
| return { type: "object", ...schema }; | ||
| } | ||
| function computeSubflowEffectiveOutputDef(subflowNodeId, subflows, manifestMap, visited) { | ||
| const seen = visited ?? /* @__PURE__ */ new Set; | ||
| if (seen.has(subflowNodeId)) | ||
| return; | ||
| seen.add(subflowNodeId); | ||
| const entry = subflows[subflowNodeId]; | ||
| if (!entry) | ||
| return; | ||
| const allGlobals = entry.variables?.globals ?? []; | ||
| const outputGlobals = allGlobals.filter((g) => g.direction === "out"); | ||
| if (outputGlobals.length > 0) { | ||
| return buildSubflowOutputDefinition(allGlobals); | ||
| } | ||
| const terminalNodes = findTerminalNodes(entry.nodes, entry.edges, (n) => { | ||
| const manifest = manifestMap.get(getManifestKey(n.type, n.typeVersion)); | ||
| return manifest?.model?.type === "bpmn:StartEvent"; | ||
| }); | ||
| const outputKeys = {}; | ||
| for (const n of terminalNodes) { | ||
| const manifest = manifestMap.get(getManifestKey(n.type, n.typeVersion)); | ||
| let outputDef = manifest?.outputDefinition; | ||
| if ((!outputDef || Object.keys(outputDef).length === 0) && isSubflowNodeType(n.type)) { | ||
| outputDef = computeSubflowEffectiveOutputDef(n.id, subflows, manifestMap, seen); | ||
| } | ||
| if (outputDef) { | ||
| for (const [key, val] of Object.entries(outputDef)) { | ||
| outputKeys[key] = val; | ||
| } | ||
| } | ||
| } | ||
| return Object.keys(outputKeys).length > 0 ? outputKeys : undefined; | ||
| } | ||
| init_esm_shims(); | ||
| var LOOP_NODE_TYPE = "core.logic.loop"; | ||
| function sanitizeNodeLabelLocal(label) { | ||
| const words = label.split(/[^a-zA-Z0-9]+/).filter(Boolean); | ||
| if (words.length === 0) | ||
| return "node"; | ||
| return words.map((word, index) => { | ||
| const lower = word.toLowerCase(); | ||
| if (index === 0) | ||
| return lower; | ||
| return lower.charAt(0).toUpperCase() + lower.slice(1); | ||
| }).join(""); | ||
| } | ||
| function lowerCaseFirstLetterLocal(str) { | ||
| if (!str) | ||
| return str; | ||
| return str.charAt(0).toLowerCase() + str.slice(1); | ||
| } | ||
| function generateNodeIdAndNameLocal(label, existingIds) { | ||
| const baseId = lowerCaseFirstLetterLocal(sanitizeNodeLabelLocal(label).replace("createNew", "")); | ||
| let index = 1; | ||
| let candidateId = `${baseId}${index}`; | ||
| while (existingIds.has(candidateId)) { | ||
| index++; | ||
| candidateId = `${baseId}${index}`; | ||
| } | ||
| return { | ||
| id: candidateId, | ||
| displayName: label ? index > 1 ? `${label} ${index}` : label : `Node${index > 1 ? ` ${index}` : ""}` | ||
| }; | ||
| } | ||
| function resolveDefinition(manifestDef, fileDef) { | ||
| const base = manifestDef ?? fileDef; | ||
| if (!base) | ||
| return; | ||
| if (manifestDef && fileDef) { | ||
| const isInSolution = !!fileDef.model?.projectId; | ||
| if (isInSolution) { | ||
| return { | ||
| ...manifestDef, | ||
| outputDefinition: fileDef.outputDefinition ?? manifestDef.outputDefinition, | ||
| inputDefinition: structuredClone(fileDef.inputDefinition ?? manifestDef.inputDefinition ?? {}), | ||
| form: fileDef.form ?? manifestDef.form | ||
| }; | ||
| } | ||
| } | ||
| return base; | ||
| } | ||
| function getInputDefaults(manifest) { | ||
| if (manifest.inputDefaults) | ||
| return structuredClone(manifest.inputDefaults); | ||
| if (manifest.inputDefinition) | ||
| return structuredClone(manifest.inputDefinition); | ||
| return {}; | ||
| } | ||
| function mapDefinitionToNodeData(initialData, definition) { | ||
| const inputDefaults = getInputDefaults(definition); | ||
| const { canvasLabel: _strippedFromManifest, ...definitionDisplay } = definition.display; | ||
| const display = { | ||
| ...definitionDisplay, | ||
| ...initialData.display, | ||
| label: definition.display.label | ||
| }; | ||
| const syntheticInstance = { | ||
| id: typeof initialData.nodeId === "string" ? initialData.nodeId : "", | ||
| type: definition.nodeType, | ||
| typeVersion: definition.version, | ||
| ui: { position: { x: 0, y: 0 } }, | ||
| display, | ||
| inputs: inputDefaults, | ||
| loading: typeof initialData.loading === "boolean" ? initialData.loading : undefined | ||
| }; | ||
| return hydrateNodeData(syntheticInstance, definition, []); | ||
| } | ||
| function reconcileInputs(inputs, model, definition, node) { | ||
| const out = { ...inputs }; | ||
| if (out.color === undefined && node?.color !== undefined) | ||
| out.color = node.color; | ||
| if (out.content === undefined && node?.content !== undefined) | ||
| out.content = node.content; | ||
| const manifestModel = definition?.model; | ||
| if (!model && !manifestModel?.source && !manifestModel?.entryPointId) { | ||
| return out; | ||
| } | ||
| if (out.entryPointId !== undefined && typeof out.entryPointId !== "string") | ||
| delete out.entryPointId; | ||
| if (out.source !== undefined && typeof out.source !== "string") | ||
| delete out.source; | ||
| if (!out.source && typeof model?.source === "string") | ||
| out.source = model.source; | ||
| if (!out.source && manifestModel?.source) | ||
| out.source = crypto.randomUUID(); | ||
| if (!out.entryPointId && manifestModel?.entryPointId) | ||
| out.entryPointId = crypto.randomUUID(); | ||
| if (out.entryPointId && out.isDefaultEntryPoint === undefined && model?.isDefaultEntryPoint !== undefined) { | ||
| out.isDefaultEntryPoint = model.isDefaultEntryPoint; | ||
| } | ||
| return out; | ||
| } | ||
| function hydrateNodeData(node, definition, nodeVariables = [], subflowEntry, manifestMap, subflows) { | ||
| const nodeVariableOutputs = {}; | ||
| const nodeOutputs = nodeVariables.filter((v) => v.binding.nodeId === node.id); | ||
| const manifestOutputs = definition?.outputDefinition ?? {}; | ||
| const manifestDefinesOutputs = definition?.outputDefinition != null; | ||
| nodeOutputs.forEach((variable) => { | ||
| if (variable.binding.outputId) { | ||
| if (manifestDefinesOutputs && !(variable.binding.outputId in manifestOutputs)) { | ||
| return; | ||
| } | ||
| const manifestOutput = manifestOutputs[variable.binding.outputId]; | ||
| nodeVariableOutputs[variable.binding.outputId] = { | ||
| type: variable.type, | ||
| ...variable.description && { description: variable.description }, | ||
| ...variable.schema && { schema: variable.schema }, | ||
| ...manifestOutput?.scope && { scope: manifestOutput.scope }, | ||
| ...manifestOutput?.source && { source: manifestOutput.source }, | ||
| ...manifestOutput?.var && { var: manifestOutput.var } | ||
| }; | ||
| } | ||
| }); | ||
| let subflowInputs = []; | ||
| let subflowOutputVars = []; | ||
| let subflowOutputs = subflowEntry ? getSubflowBaselineOutputs() : {}; | ||
| const hasExplicitOutputGlobals = subflowEntry?.variables?.globals?.some((g) => g.direction === "out") ?? false; | ||
| if (subflowEntry?.variables?.globals) { | ||
| subflowOutputs = { ...subflowOutputs, ...buildSubflowOutputDefinition(subflowEntry.variables.globals) }; | ||
| subflowInputs = buildSubflowInputDefinition(subflowEntry.variables.globals); | ||
| subflowOutputVars = subflowEntry.variables.globals.filter((g) => g.direction === "out"); | ||
| } | ||
| if (!hasExplicitOutputGlobals && subflowEntry && manifestMap) { | ||
| const passThrough = buildSubflowPassThroughOutputDefinition(subflowEntry.nodes, subflowEntry.edges, manifestMap, undefined, subflows); | ||
| if (Object.keys(passThrough).length > 0) { | ||
| subflowOutputs = { ...subflowOutputs, ...passThrough }; | ||
| } | ||
| } | ||
| const instanceOutputs = node.outputs ?? {}; | ||
| const effectiveOutputs = { ...manifestOutputs, ...nodeVariableOutputs, ...subflowOutputs }; | ||
| for (const [key, value] of Object.entries(instanceOutputs)) { | ||
| if (value && typeof value === "object" && effectiveOutputs[key] && typeof effectiveOutputs[key] === "object") { | ||
| effectiveOutputs[key] = { ...value, ...effectiveOutputs[key] }; | ||
| } else if (!(key in effectiveOutputs)) { | ||
| effectiveOutputs[key] = value; | ||
| } | ||
| } | ||
| const model = node.model; | ||
| const nodeInputs = reconcileInputs(node.inputs, model, definition, node); | ||
| const variableUpdates = node.variableUpdates; | ||
| const projectId = node.projectId ?? definition?.model?.projectId; | ||
| const liveIcon = manifestMap ? manifestMap.get(getManifestKey(node.type, node.typeVersion))?.display?.icon : definition?.display?.icon; | ||
| const { icon: _staleIcon, ...displayRest } = node.display ?? {}; | ||
| const display = liveIcon ? { ...displayRest, icon: liveIcon } : displayRest; | ||
| return { | ||
| nodeId: node.id, | ||
| type: node.type, | ||
| typeVersion: node.typeVersion, | ||
| display, | ||
| ui: node.ui, | ||
| ...node.ui?.collapsed !== undefined && { isCollapsed: node.ui.collapsed }, | ||
| ...Object.keys(nodeInputs).length > 0 && { inputs: nodeInputs }, | ||
| ...subflowInputs.length > 0 && { subflowInputs }, | ||
| ...subflowOutputVars.length > 0 && { subflowOutputs: subflowOutputVars }, | ||
| ...Object.keys(effectiveOutputs).length > 0 && { outputs: effectiveOutputs }, | ||
| ...hasExplicitOutputGlobals && { hasExplicitOutputGlobals }, | ||
| ...variableUpdates && { variableUpdates }, | ||
| ...node.parentId && { parentId: node.parentId }, | ||
| ...node.loading && { loading: node.loading }, | ||
| ...projectId && { projectId } | ||
| }; | ||
| } | ||
| function instanceToHydratedNode(instance, definition, options = {}) { | ||
| const base = instanceToNode(instance, options.offset); | ||
| base.data = hydrateNodeData(instance, definition, options.nodeVariables ?? [], options.subflowEntry, options.manifestMap, options.subflows); | ||
| return base; | ||
| } | ||
| function xyFlowToPackagingNode(nodes) { | ||
| return nodes.map((n) => ({ | ||
| id: n.id, | ||
| type: n.data.type, | ||
| typeVersion: n.data.typeVersion, | ||
| label: n.data.label, | ||
| name: n.data.name, | ||
| display: n.data.display, | ||
| inputs: n.data.inputs, | ||
| outputs: n.data.outputs | ||
| })); | ||
| } | ||
| function workflowToXYFlow(workflow, manifestMap) { | ||
| const definitions = workflow.definitions; | ||
| const bindings = workflow.bindings || []; | ||
| const globalVariables = workflow.variables?.globals || []; | ||
| const nodeVariables = workflow.variables?.nodes || []; | ||
| const workflowVariables = { | ||
| nodes: nodeVariables, | ||
| globals: globalVariables, | ||
| variableUpdates: workflow.variables?.variableUpdates | ||
| }; | ||
| const nodes = workflow.nodes.flatMap((node) => { | ||
| if (node.type === "stickyNote") { | ||
| return instanceToNode(node); | ||
| } | ||
| const manifestDef = manifestMap.get(getManifestKey(node.type, node.typeVersion)); | ||
| const fileDef = definitions.find((def) => def.nodeType === node.type && def.version === node.typeVersion); | ||
| const resolved = resolveDefinition(manifestDef, fileDef); | ||
| const { nodeType: effectiveType, manifest: definition } = resolveEffectiveManifest(node.type, resolved, { | ||
| getManifest: (type) => findManifestByNodeType(manifestMap, type) | ||
| }); | ||
| const effectiveNode = effectiveType === node.type ? node : { ...node, type: effectiveType, typeVersion: definition?.version ?? node.typeVersion }; | ||
| const base = instanceToHydratedNode(effectiveNode, definition, { | ||
| nodeVariables, | ||
| subflowEntry: workflow.subflows?.[node.id], | ||
| manifestMap, | ||
| subflows: workflow.subflows | ||
| }); | ||
| if (node.parentId) { | ||
| const parentNode = workflow.nodes.find((candidate) => candidate.id === node.parentId); | ||
| const parentManifestDef = parentNode ? manifestMap.get(getManifestKey(parentNode.type, parentNode.typeVersion)) : undefined; | ||
| const parentFileDef = parentNode ? definitions.find((def) => def.nodeType === parentNode.type && def.version === parentNode.typeVersion) : undefined; | ||
| const parentDefinition = resolveDefinition(parentManifestDef, parentFileDef); | ||
| if (parentNode?.type === LOOP_NODE_TYPE && isContainerNodeManifest(parentDefinition)) { | ||
| base.parentId = node.parentId; | ||
| base.extent = "parent"; | ||
| } | ||
| } | ||
| const isCollapsed = Boolean(node.ui?.collapsed); | ||
| if (isCollapsed && base.width !== undefined && base.height !== undefined) { | ||
| const collapsedSize = getCollapsedSize(); | ||
| base.width = collapsedSize.width; | ||
| base.height = collapsedSize.height; | ||
| } | ||
| return base; | ||
| }); | ||
| const orderedNodes = sortNodesParentFirst(nodes); | ||
| const edges = workflow.edges.map((connection) => resolveEdgeType(instanceToEdge(connection), orderedNodes, manifestMap)); | ||
| return { nodes: orderedNodes, edges, definitions, bindings, workflowVariables }; | ||
| } | ||
| function convertSubflowsToXYFlow(workflow, manifestMap) { | ||
| if (!workflow.subflows) | ||
| return; | ||
| const result = {}; | ||
| for (const [nodeId, entry] of Object.entries(workflow.subflows)) { | ||
| if (entry.nodes.length === 0) { | ||
| continue; | ||
| } | ||
| const converted = workflowToXYFlow({ ...workflow, nodes: entry.nodes, edges: entry.edges, variables: entry.variables }, manifestMap); | ||
| result[nodeId] = { | ||
| nodes: converted.nodes, | ||
| edges: converted.edges, | ||
| variables: converted.workflowVariables | ||
| }; | ||
| } | ||
| return Object.keys(result).length > 0 ? result : undefined; | ||
| } | ||
| function getNodeOrderParentId(node) { | ||
| return node.parentId ?? node.data?.parentId; | ||
| } | ||
| function sortNodesParentFirst(nodes) { | ||
| const nodeById = new Map(nodes.map((node) => [node.id, node])); | ||
| const childrenByParentId = /* @__PURE__ */ new Map; | ||
| for (const node of nodes) { | ||
| const parentId = getNodeOrderParentId(node); | ||
| if (!parentId || parentId === node.id || !nodeById.has(parentId)) | ||
| continue; | ||
| const children = childrenByParentId.get(parentId); | ||
| if (children) { | ||
| children.push(node); | ||
| } else { | ||
| childrenByParentId.set(parentId, [node]); | ||
| } | ||
| } | ||
| const sorted = []; | ||
| const added = /* @__PURE__ */ new Set; | ||
| const addNodeWithChildren = (node) => { | ||
| if (added.has(node.id)) | ||
| return; | ||
| added.add(node.id); | ||
| sorted.push(node); | ||
| for (const child of childrenByParentId.get(node.id) ?? []) { | ||
| addNodeWithChildren(child); | ||
| } | ||
| }; | ||
| for (const node of nodes) { | ||
| const parentId = getNodeOrderParentId(node); | ||
| if (!parentId || parentId === node.id || !nodeById.has(parentId)) { | ||
| addNodeWithChildren(node); | ||
| } | ||
| } | ||
| for (const node of nodes) { | ||
| addNodeWithChildren(node); | ||
| } | ||
| return sorted; | ||
| } | ||
| function xyFlowToWorkflow(workflowId, workflowVersion, workflowName, nodes, edges, definitions, bindings = [], variables = { nodes: [], globals: [] }, options = {}) { | ||
| const orderedNodes = sortNodesParentFirst(nodes); | ||
| const workflowNodes = orderedNodes.map((node) => { | ||
| const base = nodeToInstance(node); | ||
| const isCollapsed = Boolean(node.data.isCollapsed); | ||
| const instanceDisplay = node.data?.display || {}; | ||
| const expandedShape = getExpandedShape(instanceDisplay.shape); | ||
| const width = base.ui.size?.width; | ||
| const height = base.ui.size?.height; | ||
| const sizeValue = isCollapsed || !width || !height ? getExpandedSize(expandedShape) : { width, height }; | ||
| return { | ||
| ...base, | ||
| ui: { | ||
| ...base.ui, | ||
| collapsed: isCollapsed, | ||
| size: sizeValue | ||
| }, | ||
| display: { | ||
| ...base.display, | ||
| ...expandedShape !== undefined && { shape: expandedShape } | ||
| } | ||
| }; | ||
| }); | ||
| const workflowEdges = edges.map(edgeToInstance); | ||
| const { solutionId, projectId } = options; | ||
| const generatedVariables = generateNodeVariablesFromNodes(orderedNodes, variables, definitions); | ||
| return { | ||
| id: workflowId, | ||
| version: workflowVersion, | ||
| name: workflowName, | ||
| nodes: workflowNodes, | ||
| edges: workflowEdges, | ||
| definitions, | ||
| variables: { | ||
| ...generatedVariables.globals.length > 0 && { globals: generatedVariables.globals }, | ||
| ...generatedVariables.nodes.length > 0 && { nodes: generatedVariables.nodes }, | ||
| ...generatedVariables.variableUpdates && Object.keys(generatedVariables.variableUpdates).length > 0 && { variableUpdates: generatedVariables.variableUpdates } | ||
| }, | ||
| ...bindings && bindings.length > 0 && { bindings }, | ||
| ...solutionId && { solutionId }, | ||
| ...projectId && { projectId } | ||
| }; | ||
| } | ||
| function createWorkflowNodeFromManifest(manifest, id, position = { x: 0, y: 0 }, label) { | ||
| const node = { | ||
| id, | ||
| type: manifest.nodeType, | ||
| typeVersion: manifest.version, | ||
| ui: { position }, | ||
| display: { label: label ?? manifest.display?.label ?? id }, | ||
| inputs: getInputDefaults(manifest) | ||
| }; | ||
| if (manifest.model?.entryPointId) { | ||
| node.inputs = { ...node.inputs, entryPointId: crypto.randomUUID() }; | ||
| } | ||
| if (manifest.model?.source) { | ||
| node.inputs = { ...node.inputs, source: crypto.randomUUID() }; | ||
| } | ||
| return node; | ||
| } | ||
| function createEmptyWorkflow(id = crypto.randomUUID(), name = "Untitled Workflow", triggerManifest) { | ||
| const nodes = []; | ||
| let bindings = []; | ||
| if (triggerManifest) { | ||
| const label = triggerManifest.display?.label || triggerManifest.nodeType; | ||
| const { id: newTriggerID, displayName } = generateNodeIdAndNameLocal(label, /* @__PURE__ */ new Set); | ||
| const triggerNode = createWorkflowNodeFromManifest(triggerManifest, newTriggerID, { ...DEFAULT_TRIGGER_POSITION }, displayName); | ||
| if (triggerNode.inputs?.entryPointId) { | ||
| triggerNode.inputs.isDefaultEntryPoint = true; | ||
| } | ||
| nodes.push(triggerNode); | ||
| bindings = createBindingsFromManifest(triggerManifest); | ||
| } | ||
| return { | ||
| id, | ||
| version: CURRENT_WORKFLOW_VERSION, | ||
| name, | ||
| nodes, | ||
| edges: [], | ||
| definitions: [], | ||
| bindings | ||
| }; | ||
| } | ||
| function generateNodeVariablesFromNodes(nodes, variables, definitions = []) { | ||
| const generatedNodeVariables = []; | ||
| const contractResolvedIds = /* @__PURE__ */ new Set; | ||
| const definitionOutputs = /* @__PURE__ */ new Map; | ||
| for (const def of definitions) { | ||
| if (def.outputDefinition && Object.keys(def.outputDefinition).length > 0) { | ||
| definitionOutputs.set(def.nodeType, def.outputDefinition); | ||
| } | ||
| } | ||
| for (const node of nodes) { | ||
| const nodeOutputs = node.data?.outputs || {}; | ||
| const outputs = Object.keys(nodeOutputs).length > 0 ? nodeOutputs : definitionOutputs.get(node.type) ?? {}; | ||
| const nodeId = node.id; | ||
| for (const [outputKey, outputDef] of Object.entries(outputs)) { | ||
| if (outputDef && typeof outputDef === "object") { | ||
| const def = outputDef; | ||
| const resolved = node.type ? resolveNodeOutputTypeSchema(node.type, node.data?.inputs?.detail, outputKey) : undefined; | ||
| if (resolved) | ||
| contractResolvedIds.add(`${nodeId}.${outputKey}`); | ||
| generatedNodeVariables.push(createNodeVariable({ | ||
| nodeId, | ||
| outputId: outputKey, | ||
| type: (resolved?.jsonSchemaType ?? def.type) || "string", | ||
| subType: def.subType, | ||
| description: def.description, | ||
| schema: def.schema | ||
| })); | ||
| } | ||
| } | ||
| } | ||
| const globalVariables = variables.globals || []; | ||
| const nodeVariables = variables.nodes || []; | ||
| const nodeMap = new Map(nodes.map((n) => [n.id, n])); | ||
| const validNodeVariables = nodeVariables.filter((v) => { | ||
| const node = nodeMap.get(v.binding.nodeId); | ||
| if (!node) | ||
| return false; | ||
| if (contractResolvedIds.has(v.id)) | ||
| return false; | ||
| const nodeOutputs = node.data?.outputs || {}; | ||
| const outputs = Object.keys(nodeOutputs).length > 0 ? nodeOutputs : definitionOutputs.get(node.type) ?? {}; | ||
| return v.binding.outputId in outputs; | ||
| }); | ||
| const allNodeVariables = [...validNodeVariables, ...generatedNodeVariables.filter((g) => !validNodeVariables.some((v) => v.id === g.id))]; | ||
| const variableUpdatesMap = {}; | ||
| if (variables.variableUpdates) { | ||
| for (const [nodeId, updates] of Object.entries(variables.variableUpdates)) { | ||
| if (nodeMap.has(nodeId) && updates?.length) { | ||
| variableUpdatesMap[nodeId] = updates; | ||
| } | ||
| } | ||
| } | ||
| return { | ||
| globals: globalVariables, | ||
| nodes: allNodeVariables, | ||
| variableUpdates: variableUpdatesMap | ||
| }; | ||
| } | ||
| function applyGlobalInputOverrides(raw, inputs) { | ||
| if (!inputs || Object.keys(inputs).length === 0) | ||
| return; | ||
| const globals = raw?.variables?.globals; | ||
| if (!Array.isArray(globals)) | ||
| return; | ||
| for (const variable of globals) { | ||
| if (variable && typeof variable.id === "string" && Object.hasOwn(inputs, variable.id)) { | ||
| variable.defaultValue = inputs[variable.id]; | ||
| } | ||
| } | ||
| } | ||
| var warmSerializationChunks = () => Promise.all([import("./index-nfn4t0c4.js"), import("./serialization-3RH6P643-zxj2yyfh.js")]); | ||
| async function flowJsonToBpmnXml(flowJson, options) { | ||
| const [{ fileFormatToInMemoryWorkflow }, { toXml }] = await warmSerializationChunks(); | ||
| const raw = JSON.parse(flowJson); | ||
| applyGlobalInputOverrides(raw, options?.inputs); | ||
| const workflow = fileFormatToInMemoryWorkflow(raw); | ||
| const manifestMap = /* @__PURE__ */ new Map; | ||
| for (const def of workflow.definitions ?? []) { | ||
| manifestMap.set(getManifestKey(def.nodeType, def.version ?? "1.0.0"), def); | ||
| } | ||
| const { nodes, edges, definitions, workflowVariables, bindings } = workflowToXYFlow(workflow, manifestMap); | ||
| return toXml(nodes, edges, definitions, bindings, workflowVariables, workflow.subflows, { | ||
| detached: options?.detached | ||
| }); | ||
| } | ||
| export { | ||
| xyFlowToWorkflow, | ||
| xyFlowToPackagingNode, | ||
| workflowToXYFlow, | ||
| warmSerializationChunks, | ||
| resolveDefinition, | ||
| reconcileInputs, | ||
| mapDefinitionToNodeData, | ||
| instanceToHydratedNode, | ||
| generateNodeVariablesFromNodes, | ||
| generateNodeIdAndNameLocal, | ||
| flowJsonToBpmnXml, | ||
| createWorkflowNodeFromManifest, | ||
| createEmptyWorkflow, | ||
| convertSubflowsToXYFlow, | ||
| applyGlobalInputOverrides | ||
| }; | ||
| //# debugId=701DCF1C5E48693464756E2164756E21 |
| import"./packager-tool-060a9knt.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| // ../../node_modules/@uipath/flow-converter/node_modules/@uipath/flow-schema/dist/de-LVBY3VVG.js | ||
| var agentInputRefs_nodeCollision_message = "Knoten „{{id}}“ enthält „{{sep}}“. Inline-Agents codieren Referenzen, indem sie Pfadsegmente mit „{{sep}}“ verbinden, sodass „$vars.{{id}}.output.field“ zur Runtime mit einem anderen Pfad kollidieren würde. Benennen Sie den Knoten um, um „{{sep}}“ zu entfernen."; | ||
| var agentInputRefs_reservedNamespace_message = "„$agent.{{ref}}“ ist ein Flow-interner Namespace für Agent-Runtime und kann nicht direkt in Prompts verwendet werden. Verweisen Sie über „$vars.{{ref}}“ oder „$metadata.{{ref}}“ auf die Flow-Variable."; | ||
| var agentInputRefs_unresolvedRef_message = "Prompt verweist auf „$vars.{{ref}}“ aber es gibt keine Workflow-Variable oder keinen Knoten „{{rootSegment}}“. Fügen Sie die Variable/den Knoten zum Flow hinzu, oder entfernen Sie den Verweis."; | ||
| var agentInputRefs_variableCollision_message = "Workflow-Variable „{{id}}“ enthält „{{sep}}“. Inline-Agents codieren Referenzen, indem sie Pfadsegmente mit „{{sep}}“ verbinden, sodass „{{id}}“ zur Runtime mit einem anderen Pfad kollidieren würde. Benennen Sie den Knoten um, um „{{sep}}“ zu entfernen."; | ||
| var conditionExpression_decisionWrapped_message = "Ungültige Bedingung für „{{nodeLabel}}“: {{error}}"; | ||
| var conditionExpression_empty_message = "Ausdruck ist leer"; | ||
| var conditionExpression_incomplete_message = "Unvollständiger Ausdruck"; | ||
| var conditionExpression_invalid_message = "Ungültiger Ausdruck"; | ||
| var conditionExpression_required_message = "Ein Bedingungsausdruck ist erforderlich"; | ||
| var dataTransform_customScriptMissing_message = "Benutzerdefinierter Skriptvorgang „{{nodeLabel}}“ hat kein Skript"; | ||
| var dataTransform_filterMissingField_message = "Bei Filterbedingung „{{nodeLabel}}“ fehlt ein Feld"; | ||
| var dataTransform_filterNoConditions_message = "Filtervorgang „{{nodeLabel}}“ hat keine Bedingungen"; | ||
| var dataTransform_groupByAggMissingField_message = "Bei „Gruppieren nach“ Aggregation „{{nodeLabel}}“ fehlt ein Feld"; | ||
| var dataTransform_groupByAggMissingOutputName_message = "Bei „Gruppieren nach“ Aggregation „{{nodeLabel}}“ fehlt ein Ausgabename"; | ||
| var dataTransform_groupByMissingField_message = "Bei „Gruppieren nach“-Vorgang „{{nodeLabel}}“ fehlt das Feld „Gruppieren nach“"; | ||
| var dataTransform_mapMissingField_message = "Bei Zuordnungsfeldzuordnung „{{nodeLabel}}“ fehlt ein Feld"; | ||
| var dataTransform_mapNoMappings_message = "Zuordnungsvorgang „{{nodeLabel}}“ erfordert mindestens eine Feldzuordnung, wenn die ursprünglichen Felder nicht beibehalten werden"; | ||
| var dataTransform_missingCollection_message = "Bei „{{nodeLabel}}“ fehlt eine Sammlungsvariable"; | ||
| var dataTransform_noOperations_message = "Für „{{nodeLabel}}“ sind keine Vorgänge konfiguriert"; | ||
| var escalation_appRequired_message = "{{label}}: Aktions-App ist erforderlich"; | ||
| var escalation_nameRequired_message = "{{label}}: Eskalationsname ist erforderlich."; | ||
| var escalation_quickFormDuplicateFieldLabel_message = "{{label}}: Mehrere Felder sind mit „{{fieldLabel}}“ beschriftet – die Eskalationsaufgabe würde nur eines von ihnen beibehalten. Legen Sie die Feldbeschriftungen eindeutig fest."; | ||
| var escalation_recipientRequired_message = "{{label}}: Eskalationsempfänger ist erforderlich"; | ||
| var governance_hitlRequired_message = "Agent muss über mindestens eine Eskalationsressource oder eine Leitplanke mit HITL-Aktion verfügen. Regel durch Governance-Richtlinie erzwungen: {{policyName}}"; | ||
| var governance_maxIterationsExceeded_message = "Max. Iterationen überschreiten {{maxIterations}}. Regel durch Governance-Richtlinie erzwungen: {{policyName}}"; | ||
| var governance_maxTokensExceeded_message = "Max. Token pro Antwort überschreiten {{maxTokens}}. Regel durch Governance-Richtlinie erzwungen: {{policyName}}"; | ||
| var governance_modelNotAvailable_message = "Das Modell {{model}} ist nicht zulässig. Dies wird durch die Governance-Richtlinie erzwungen: {{policyName}}"; | ||
| var governance_noAllowedModel_message = "Kein zulässiges Modell ausgewählt, erzwungen durch Governance-Richtlinie: {{policyName}}"; | ||
| var governance_temperatureExceeded_message = "Temperatur überschreitet {{maxTemperature}}. Regel durch Governance-Richtlinie erzwungen: {{policyName}}"; | ||
| var hitlQuickForm_emptySchema_message = "Das Schnellformular muss mindestens ein Feld haben"; | ||
| var hitlQuickForm_fieldLabelRequired_message = "Feldbeschriftung ist erforderlich"; | ||
| var outputMapping_missing_message = "Bei „{{nodeLabel}}“ fehlt die Ausgabezuordnung für „{{varId}}“"; | ||
| var schemaValidator_genericKeyword_message = "„{{fieldName}}“ für „{{nodeLabel}}“: {{detail}}"; | ||
| var schemaValidator_invalidEnum_message = "„{{fieldName}}“ für „{{nodeLabel}}“ muss einer der zulässigen Werte sein"; | ||
| var schemaValidator_invalidField_message = "„{{fieldName}}“ für „{{nodeLabel}}“ ist ungültig"; | ||
| var schemaValidator_invalidPattern_message = "„{{fieldName}}“ für „{{nodeLabel}}“ hat ein ungültiges Format"; | ||
| var schemaValidator_outOfRange_message = "„{{fieldName}}“ für „{{nodeLabel}}“ {{detail}}"; | ||
| var schemaValidator_required_message = "„{{fieldName}}“ ist für „{{nodeLabel}}“ erforderlich"; | ||
| var schemaValidator_typeMismatch_message = "„{{fieldName}}“ für „{{nodeLabel}}“ erwartet {{type}}"; | ||
| var schemaValidator_validation_genericError = "Validierungsfehler"; | ||
| var triggerRequired_message = "Workflow muss mindestens einen Triggerknoten haben"; | ||
| var de_default = { | ||
| agentInputRefs_nodeCollision_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_variableCollision_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_required_message, | ||
| dataTransform_customScriptMissing_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_noOperations_message, | ||
| escalation_appRequired_message, | ||
| escalation_nameRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_recipientRequired_message, | ||
| governance_hitlRequired_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_noAllowedModel_message, | ||
| governance_temperatureExceeded_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| outputMapping_missing_message, | ||
| schemaValidator_genericKeyword_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_validation_genericError, | ||
| triggerRequired_message | ||
| }; | ||
| export { | ||
| triggerRequired_message, | ||
| schemaValidator_validation_genericError, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_genericKeyword_message, | ||
| outputMapping_missing_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| governance_temperatureExceeded_message, | ||
| governance_noAllowedModel_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_hitlRequired_message, | ||
| escalation_recipientRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_nameRequired_message, | ||
| escalation_appRequired_message, | ||
| de_default as default, | ||
| dataTransform_noOperations_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_customScriptMissing_message, | ||
| conditionExpression_required_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| agentInputRefs_variableCollision_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_nodeCollision_message | ||
| }; | ||
| //# debugId=19C12F59B4A02A5B64756E2164756E21 |
| import { | ||
| agentInputRefs_nodeCollision_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_variableCollision_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_required_message, | ||
| conversationalVoiceEndCall_callContextInvalid_message, | ||
| conversationalVoice_callContextInvalid_message, | ||
| conversationalVoice_callContextRequired_message, | ||
| dataTransform_customScriptMissing_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_noOperations_message, | ||
| en_default, | ||
| escalation_appRequired_message, | ||
| escalation_nameRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_recipientRequired_message, | ||
| governance_hitlRequired_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_noAllowedModel_message, | ||
| governance_temperatureExceeded_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| outputMapping_missing_message, | ||
| schemaValidator_genericKeyword_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_validation_genericError, | ||
| triggerRequired_message | ||
| } from "./packager-tool-3yjtbs1y.js"; | ||
| import"./packager-tool-060a9knt.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| export { | ||
| triggerRequired_message, | ||
| schemaValidator_validation_genericError, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_genericKeyword_message, | ||
| outputMapping_missing_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| governance_temperatureExceeded_message, | ||
| governance_noAllowedModel_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_hitlRequired_message, | ||
| escalation_recipientRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_nameRequired_message, | ||
| escalation_appRequired_message, | ||
| en_default as default, | ||
| dataTransform_noOperations_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_customScriptMissing_message, | ||
| conversationalVoice_callContextRequired_message, | ||
| conversationalVoice_callContextInvalid_message, | ||
| conversationalVoiceEndCall_callContextInvalid_message, | ||
| conditionExpression_required_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| agentInputRefs_variableCollision_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_nodeCollision_message | ||
| }; | ||
| //# debugId=95621B250BA7E30764756E2164756E21 |
| import { | ||
| createMigration_invalidInput_message, | ||
| createMigration_invalidOutput_message, | ||
| en_default, | ||
| migrate_chain_noMigrationFound_message | ||
| } from "./packager-tool-ek2dnj9h.js"; | ||
| import"./packager-tool-hk1gxnth.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| export { | ||
| migrate_chain_noMigrationFound_message, | ||
| en_default as default, | ||
| createMigration_invalidOutput_message, | ||
| createMigration_invalidInput_message | ||
| }; | ||
| //# debugId=F825E11386834E3464756E2164756E21 |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| import"./packager-tool-060a9knt.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| // ../../node_modules/@uipath/flow-converter/node_modules/@uipath/flow-schema/dist/es-CI4AE5B5.js | ||
| var agentInputRefs_nodeCollision_message = 'El nodo "{{id}}" contiene "{{sep}}". Los agentes en línea codifican las referencias uniendo segmentos de ruta con "{{sep}}", por lo que "$vars.{{id}}.output.field" colisionaría con otra ruta en runtime. Cambie el nombre del nodo para eliminar "{{sep}}".'; | ||
| var agentInputRefs_reservedNamespace_message = '"$agent.{{ref}}" es un espacio de nombres interno de runtime de agentes y no puede utilizarse directamente en las solicitudes. Haga referencia a la variable de flujo a través de "$vars.{{ref}}" o "$metadata.{{ref}}" en su lugar.'; | ||
| var agentInputRefs_unresolvedRef_message = 'La solicitud hace referencia a "$vars.{{ref}}" pero no existe ninguna variable de flujo de trabajo o nodo "{{rootSegment}}". Añada la variable/nodo al flujo o elimine la referencia.'; | ||
| var agentInputRefs_variableCollision_message = 'La variable de flujo de trabajo "{{id}}" contiene "{{sep}}". Los agentes en línea codifican las referencias uniendo segmentos de ruta con "{{sep}}", por lo que "{{id}}" colisionaría con otra ruta en runtime. Cambie el nombre de la variable para eliminar "{{sep}}".'; | ||
| var conditionExpression_decisionWrapped_message = 'Condición no válida en "{{nodeLabel}}": {{error}}'; | ||
| var conditionExpression_empty_message = "La expresión está vacía"; | ||
| var conditionExpression_incomplete_message = "Expresión incompleta"; | ||
| var conditionExpression_invalid_message = "Expresión no válida"; | ||
| var conditionExpression_required_message = "Se requiere una expresión de condición"; | ||
| var dataTransform_customScriptMissing_message = 'La operación de script personalizado de "{{nodeLabel}}" no tiene script'; | ||
| var dataTransform_filterMissingField_message = 'A la condición de filtro de "{{nodeLabel}}" le falta un campo'; | ||
| var dataTransform_filterNoConditions_message = 'La operación de filtro de "{{nodeLabel}}" no tiene condiciones'; | ||
| var dataTransform_groupByAggMissingField_message = 'A la agregación Agrupar por de "{{nodeLabel}}" le falta un campo'; | ||
| var dataTransform_groupByAggMissingOutputName_message = 'A la agregación Agrupar por de "{{nodeLabel}}" le falta un nombre de salida'; | ||
| var dataTransform_groupByMissingField_message = 'A la operación Agrupar por de "{{nodeLabel}}" le falta el campo Agrupar por'; | ||
| var dataTransform_mapMissingField_message = 'A la asignación de campo de mapa de "{{nodeLabel}}" le falta un campo'; | ||
| var dataTransform_mapNoMappings_message = 'La operación de asignación de "{{nodeLabel}}" necesita al menos una asignación de campo cuando no se mantienen los campos originales'; | ||
| var dataTransform_missingCollection_message = 'A "{{nodeLabel}}" le falta una variable de colección'; | ||
| var dataTransform_noOperations_message = '"{{nodeLabel}}" no tiene operaciones configuradas'; | ||
| var escalation_appRequired_message = "{{label}}: se requiere la aplicación de acción"; | ||
| var escalation_nameRequired_message = "{{label}}: se requiere el nombre de la escalada"; | ||
| var escalation_quickFormDuplicateFieldLabel_message = '{{label}}: varios campos están etiquetados como "{{fieldLabel}}": la tarea de escalada mantendría solo uno de ellos. Hacer que las etiquetas de campo sean únicas'; | ||
| var escalation_recipientRequired_message = "{{label}}: se requiere el destinatario de la escalada"; | ||
| var governance_hitlRequired_message = "El agente debe tener al menos un recurso de escalada o una barrera de seguridad con acción HITL. Regla aplicada por la política de control: {{policyName}}"; | ||
| var governance_maxIterationsExceeded_message = "El número máximo de iteraciones supera {{maxIterations}}. Regla aplicada por la política de control: {{policyName}}"; | ||
| var governance_maxTokensExceeded_message = "El número máximo de tokens por respuesta supera {{maxTokens}}. Regla aplicada por la política de control: {{policyName}}"; | ||
| var governance_modelNotAvailable_message = "El modelo {{model}} no está permitido, según lo establecido por la política de control: {{policyName}}"; | ||
| var governance_noAllowedModel_message = "No se ha seleccionado ningún modelo permitido, impuesto por la política de control: {{policyName}}"; | ||
| var governance_temperatureExceeded_message = "La temperatura supera los {{maxTemperature}}. Regla aplicada por la política de control: {{policyName}}"; | ||
| var hitlQuickForm_emptySchema_message = "El formulario rápido debe tener al menos un campo"; | ||
| var hitlQuickForm_fieldLabelRequired_message = "La etiqueta del campo es obligatoria"; | ||
| var outputMapping_missing_message = 'A "{{nodeLabel}}" le falta la asignación de salida para "{{varId}}"'; | ||
| var schemaValidator_genericKeyword_message = '"{{fieldName}}" en "{{nodeLabel}}": {{detail}}'; | ||
| var schemaValidator_invalidEnum_message = '"{{fieldName}}" en "{{nodeLabel}}" debe ser uno de los valores permitidos'; | ||
| var schemaValidator_invalidField_message = '"{{fieldName}}" en "{{nodeLabel}}" no es válido'; | ||
| var schemaValidator_invalidPattern_message = '"{{fieldName}}" en "{{nodeLabel}}" tiene un formato no válido'; | ||
| var schemaValidator_outOfRange_message = '"{{fieldName}}" en "{{nodeLabel}}" {{detail}}'; | ||
| var schemaValidator_required_message = '"{{fieldName}}" es obligatorio en "{{nodeLabel}}"'; | ||
| var schemaValidator_typeMismatch_message = '"{{fieldName}}" en "{{nodeLabel}}" espera {{type}}'; | ||
| var schemaValidator_validation_genericError = "Error de validación"; | ||
| var triggerRequired_message = "El flujo de trabajo debe tener al menos un nodo desencadenador"; | ||
| var es_default = { | ||
| agentInputRefs_nodeCollision_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_variableCollision_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_required_message, | ||
| dataTransform_customScriptMissing_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_noOperations_message, | ||
| escalation_appRequired_message, | ||
| escalation_nameRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_recipientRequired_message, | ||
| governance_hitlRequired_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_noAllowedModel_message, | ||
| governance_temperatureExceeded_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| outputMapping_missing_message, | ||
| schemaValidator_genericKeyword_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_validation_genericError, | ||
| triggerRequired_message | ||
| }; | ||
| export { | ||
| triggerRequired_message, | ||
| schemaValidator_validation_genericError, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_genericKeyword_message, | ||
| outputMapping_missing_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| governance_temperatureExceeded_message, | ||
| governance_noAllowedModel_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_hitlRequired_message, | ||
| escalation_recipientRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_nameRequired_message, | ||
| escalation_appRequired_message, | ||
| es_default as default, | ||
| dataTransform_noOperations_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_customScriptMissing_message, | ||
| conditionExpression_required_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| agentInputRefs_variableCollision_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_nodeCollision_message | ||
| }; | ||
| //# debugId=0D1D2A8C1EB12FD664756E2164756E21 |
| import"./packager-tool-060a9knt.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| // ../../node_modules/@uipath/flow-converter/node_modules/@uipath/flow-schema/dist/es-MX-OLZNAYY5.js | ||
| var agentInputRefs_nodeCollision_message = 'El nodo "{{id}}" contiene "{{sep}}". Los agentes en línea codifican las referencias uniendo segmentos de ruta con "{{sep}}", por lo que "$vars.{{id}}.output.field" colisionaría con otra ruta en tiempo de ejecución. Cambie el nombre del nodo para eliminar "{{sep}}".'; | ||
| var agentInputRefs_reservedNamespace_message = '"$agent.{{ref}}" es un espacio de nombres de tiempo de ejecución del agente interno del flujo y no se puede usar directamente en solicitudes. Haga referencia a la variable de flujo a través de "$vars.{{ref}}" o "$metadata.{{ref}}" en su lugar.'; | ||
| var agentInputRefs_unresolvedRef_message = 'La solicitud hace referencia a "$vars.{{ref}}" pero no existe ninguna variable de flujo de trabajo ni nodo "{{rootSegment}}". Agregue la variable o el nodo al flujo o elimine la referencia.'; | ||
| var agentInputRefs_variableCollision_message = 'La variable de flujo de trabajo "{{id}}" contiene "{{sep}}". Los agentes en línea codifican las referencias uniendo segmentos de ruta con "{{sep}}", por lo que "{{id}}" colisionaría con otra ruta en tiempo de ejecución. Cambie el nombre de la variable para eliminar "{{sep}}".'; | ||
| var conditionExpression_decisionWrapped_message = 'Condición no válida en "{{nodeLabel}}": {{error}}'; | ||
| var conditionExpression_empty_message = "La expresión está vacía"; | ||
| var conditionExpression_incomplete_message = "Expresión incompleta"; | ||
| var conditionExpression_invalid_message = "Expresión no válida"; | ||
| var conditionExpression_required_message = "Se requiere una expresión de condición"; | ||
| var dataTransform_customScriptMissing_message = 'La operación de script personalizado "{{nodeLabel}}" no tiene script'; | ||
| var dataTransform_filterMissingField_message = 'A la condición de filtro "{{nodeLabel}}" le falta un campo'; | ||
| var dataTransform_filterNoConditions_message = 'La operación de filtro "{{nodeLabel}}" no tiene condiciones'; | ||
| var dataTransform_groupByAggMissingField_message = 'A la agregación de agrupación "{{nodeLabel}}" le falta un campo'; | ||
| var dataTransform_groupByAggMissingOutputName_message = 'A la agregación de agrupación "{{nodeLabel}}" le falta un nombre de salida'; | ||
| var dataTransform_groupByMissingField_message = 'A la operación de agrupación "{{nodeLabel}}" le falta el campo de agrupación'; | ||
| var dataTransform_mapMissingField_message = 'A la asignación de campos de mapa "{{nodeLabel}}" le falta un campo'; | ||
| var dataTransform_mapNoMappings_message = 'La operación de asignación "{{nodeLabel}}" necesita al menos una asignación de campo cuando no se conservan los campos originales'; | ||
| var dataTransform_missingCollection_message = 'A "{{nodeLabel}}" le falta una variable de colección'; | ||
| var dataTransform_noOperations_message = '"{{nodeLabel}}" no tiene operaciones configuradas'; | ||
| var escalation_appRequired_message = "{{label}}: Se requiere la aplicación de acción"; | ||
| var escalation_nameRequired_message = "{{label}}: Se requiere el nombre de la escalación"; | ||
| var escalation_quickFormDuplicateFieldLabel_message = '{{label}}: varios campos están etiquetados como "{{fieldLabel}}"; la tarea de escalamiento mantendrá solo uno de ellos. Hacer que las etiquetas de campo sean únicas'; | ||
| var escalation_recipientRequired_message = "{{label}}: Se requiere el destinatario de la escalación"; | ||
| var governance_hitlRequired_message = "El agente debe tener al menos un recurso de escalación o una medida de seguridad con acción de HITL. Regla aplicada por la política de gobernanza: {{policyName}}"; | ||
| var governance_maxIterationsExceeded_message = "El número máximo de iteraciones supera {{maxIterations}}. Regla aplicada por la política de gobernanza: {{policyName}}"; | ||
| var governance_maxTokensExceeded_message = "La cantidad máxima de tokens por respuesta supera {{maxTokens}}. Regla aplicada por la política de gobernanza: {{policyName}}"; | ||
| var governance_modelNotAvailable_message = "El modelo {{model}} no está permitido; lo aplica la política de gobernanza: {{policyName}}"; | ||
| var governance_noAllowedModel_message = "No se seleccionó ningún modelo permitido, aplicado por la política de gobernanza: {{policyName}}"; | ||
| var governance_temperatureExceeded_message = "La temperatura supera {{maxTemperature}}. Regla aplicada por la política de gobernanza: {{policyName}}"; | ||
| var hitlQuickForm_emptySchema_message = "El formulario rápido debe tener al menos un campo"; | ||
| var hitlQuickForm_fieldLabelRequired_message = "Se requiere la etiqueta de campo"; | ||
| var outputMapping_missing_message = 'A "{{nodeLabel}}" le falta la asignación de salida para "{{varId}}"'; | ||
| var schemaValidator_genericKeyword_message = '"{{fieldName}}" en "{{nodeLabel}}": {{detail}}'; | ||
| var schemaValidator_invalidEnum_message = '"{{fieldName}}" en "{{nodeLabel}}" debe ser uno de los valores permitidos'; | ||
| var schemaValidator_invalidField_message = '"{{fieldName}}" en "{{nodeLabel}}" no es válido'; | ||
| var schemaValidator_invalidPattern_message = '"{{fieldName}}" en "{{nodeLabel}}" tiene un formato no válido'; | ||
| var schemaValidator_outOfRange_message = '"{{fieldName}}" en "{{nodeLabel}}" {{detail}}'; | ||
| var schemaValidator_required_message = 'Se requiere "{{fieldName}}" en "{{nodeLabel}}"'; | ||
| var schemaValidator_typeMismatch_message = '"{{fieldName}}" en "{{nodeLabel}}" espera {{type}}'; | ||
| var schemaValidator_validation_genericError = "Error de validación"; | ||
| var triggerRequired_message = "El flujo de trabajo debe tener al menos un nodo desencadenante"; | ||
| var es_MX_default = { | ||
| agentInputRefs_nodeCollision_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_variableCollision_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_required_message, | ||
| dataTransform_customScriptMissing_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_noOperations_message, | ||
| escalation_appRequired_message, | ||
| escalation_nameRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_recipientRequired_message, | ||
| governance_hitlRequired_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_noAllowedModel_message, | ||
| governance_temperatureExceeded_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| outputMapping_missing_message, | ||
| schemaValidator_genericKeyword_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_validation_genericError, | ||
| triggerRequired_message | ||
| }; | ||
| export { | ||
| triggerRequired_message, | ||
| schemaValidator_validation_genericError, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_genericKeyword_message, | ||
| outputMapping_missing_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| governance_temperatureExceeded_message, | ||
| governance_noAllowedModel_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_hitlRequired_message, | ||
| escalation_recipientRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_nameRequired_message, | ||
| escalation_appRequired_message, | ||
| es_MX_default as default, | ||
| dataTransform_noOperations_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_customScriptMissing_message, | ||
| conditionExpression_required_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| agentInputRefs_variableCollision_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_nodeCollision_message | ||
| }; | ||
| //# debugId=098530943CAE464C64756E2164756E21 |
| import"./packager-tool-060a9knt.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| // ../../node_modules/@uipath/flow-converter/node_modules/@uipath/flow-schema/dist/fr-CCN6ZO5E.js | ||
| var agentInputRefs_nodeCollision_message = "Le nœud « {{id}} » contient « {{sep}} ». Les agents en ligne encodent les références en associant des segments de chemin à « {{sep}} », de sorte que « $vars.{{id}}.output.field » entre en conflit avec un autre chemin au moment de l’exécution. Renommez le nœud pour supprimer « {{sep}} »."; | ||
| var agentInputRefs_reservedNamespace_message = "« $agent.{{ref}} » désigne un espace de noms pour l’exécution d’agents interne au flux. Il ne peut pas être utilisé directement dans les invites. Utilisez la variable de flux via « $vars.{{ref}} » ou « $metadata.{{ref}} » ."; | ||
| var agentInputRefs_unresolvedRef_message = "L’invite fait utilise la variable « $vars.{{ref}} » mais aucune variable ou nœud de workflow « {{rootSegment}} » n’existe. Ajoutez la variable ou le nœud au flux ou supprimez la référence."; | ||
| var agentInputRefs_variableCollision_message = "La variable de workflow « {{id}} » contient « {{sep}} ». Les agents en ligne encodent les références en associant des segments de chemin à « {{sep}} », de sorte que « {{id}} » entre en conflit avec un autre chemin au moment de l’exécution. Renommez la variable pour supprimer « {{sep}} »."; | ||
| var conditionExpression_decisionWrapped_message = "Condition non valide au nœud « {{nodeLabel}} » : {{error}}"; | ||
| var conditionExpression_empty_message = "L’expression est vide"; | ||
| var conditionExpression_incomplete_message = "Expression incomplète"; | ||
| var conditionExpression_invalid_message = "Expression non valide"; | ||
| var conditionExpression_required_message = "Une expression de condition est requise"; | ||
| var dataTransform_customScriptMissing_message = "L’opération de script personnalisé « {{nodeLabel}} » n’a pas de script"; | ||
| var dataTransform_filterMissingField_message = "Il manque un champ à la condition de filtre « {{nodeLabel}} »"; | ||
| var dataTransform_filterNoConditions_message = "L’opération de filtrage « {{nodeLabel}} » n’a pas de condition"; | ||
| var dataTransform_groupByAggMissingField_message = "Il manque un champ à l’agrégation de regroupement « {{nodeLabel}} »"; | ||
| var dataTransform_groupByAggMissingOutputName_message = "Il manque un champ à l’agrégation de regroupement « {{nodeLabel}} »"; | ||
| var dataTransform_groupByMissingField_message = "Il manque le champ « regrouper par » à l’opération de regroupement « {{nodeLabel}} »"; | ||
| var dataTransform_mapMissingField_message = "Il manque un champ au mappage de champ « {{nodeLabel}} »"; | ||
| var dataTransform_mapNoMappings_message = "L’opération de mappage « {{nodeLabel}} » nécessite au moins un mappage de champ lorsque les champs d’origine ne sont pas conservés"; | ||
| var dataTransform_missingCollection_message = "Il manque une variable de collection à « {{nodeLabel}} »"; | ||
| var dataTransform_noOperations_message = "Aucune opération n’est configurée pour « {{nodeLabel}} »"; | ||
| var escalation_appRequired_message = "{{label}} : une application d’action est requise"; | ||
| var escalation_nameRequired_message = "{{label}} : le nom d’escalade est requis"; | ||
| var escalation_quickFormDuplicateFieldLabel_message = "{{label}} : plusieurs champs sont labellisés « {{fieldLabel}} ». La tâche d’escalade ne conserverait qu’un seul champ. Donnez des libellés uniques aux champs."; | ||
| var escalation_recipientRequired_message = "{{label}} : un destinataire d’escalade est requis"; | ||
| var governance_hitlRequired_message = "L’agent doit disposer d’au moins une ressource d’escalade ou d’un garde-fou avec l’action d’intervention humaine. Règle appliquée par la politique de gouvernance : {{policyName}}"; | ||
| var governance_maxIterationsExceeded_message = "Le nombre maximal d’itérations dépasse la valeur de {{maxIterations}}. Règle appliquée par la politique de gouvernance : {{policyName}}"; | ||
| var governance_maxTokensExceeded_message = "Le nombre maximal de jetons par réponse dépasse la valeur de {{maxTokens}}. Règle appliquée par la politique de gouvernance : {{policyName}}"; | ||
| var governance_modelNotAvailable_message = "Le modèle {{model}} n’est pas autorisé ; politique de gouvernance appliquée : {{policyName}}"; | ||
| var governance_noAllowedModel_message = "Aucun modèle autorisé n’a été sélectionné, politique de gouvernance appliquée : {{policyName}}"; | ||
| var governance_temperatureExceeded_message = "La température dépasse la valeur de {{maxTemperature}}. Règle appliquée par la politique de gouvernance : {{policyName}}"; | ||
| var hitlQuickForm_emptySchema_message = "Le formulaire rapide doit contenir au moins un champ"; | ||
| var hitlQuickForm_fieldLabelRequired_message = "Le libellé du champ est requis"; | ||
| var outputMapping_missing_message = "« {{nodeLabel}} » n’a pas de mappage de sortie pour « {{varId}} »"; | ||
| var schemaValidator_genericKeyword_message = "Le champ « {{fieldName}} » du nœud « {{nodeLabel}} » : {{detail}}"; | ||
| var schemaValidator_invalidEnum_message = "Le champ « {{fieldName}} » du nœud « {{nodeLabel}} » doit utiliser l’une des valeurs autorisées"; | ||
| var schemaValidator_invalidField_message = "Le champ « {{fieldName}} » du nœud « {{nodeLabel}} » n’est pas valide"; | ||
| var schemaValidator_invalidPattern_message = "Le champ « {{fieldName}} » du nœud « {{nodeLabel}} » ne respecte pas le bon format"; | ||
| var schemaValidator_outOfRange_message = "Le champ « {{fieldName}} » du nœud « {{nodeLabel}} » {{detail}}"; | ||
| var schemaValidator_required_message = "« {{fieldName}} » est requis pour « {{nodeLabel}} »"; | ||
| var schemaValidator_typeMismatch_message = "Le champ « {{fieldName}} » du nœud « {{nodeLabel}} » attend le type {{type}}"; | ||
| var schemaValidator_validation_genericError = "Erreur de validation"; | ||
| var triggerRequired_message = "Le workflow doit avoir au moins un nœud de déclencheur"; | ||
| var fr_default = { | ||
| agentInputRefs_nodeCollision_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_variableCollision_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_required_message, | ||
| dataTransform_customScriptMissing_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_noOperations_message, | ||
| escalation_appRequired_message, | ||
| escalation_nameRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_recipientRequired_message, | ||
| governance_hitlRequired_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_noAllowedModel_message, | ||
| governance_temperatureExceeded_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| outputMapping_missing_message, | ||
| schemaValidator_genericKeyword_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_validation_genericError, | ||
| triggerRequired_message | ||
| }; | ||
| export { | ||
| triggerRequired_message, | ||
| schemaValidator_validation_genericError, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_genericKeyword_message, | ||
| outputMapping_missing_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| governance_temperatureExceeded_message, | ||
| governance_noAllowedModel_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_hitlRequired_message, | ||
| escalation_recipientRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_nameRequired_message, | ||
| escalation_appRequired_message, | ||
| fr_default as default, | ||
| dataTransform_noOperations_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_customScriptMissing_message, | ||
| conditionExpression_required_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| agentInputRefs_variableCollision_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_nodeCollision_message | ||
| }; | ||
| //# debugId=BA3D6918DDF1D71164756E2164756E21 |
| import { | ||
| AGENT_NODE_TYPES, | ||
| AGENT_RESOURCE_PREFIX, | ||
| AGENT_TARGET_RUNTIME, | ||
| ANALYZE_FILES_SCHEMA, | ||
| AUTONOMOUS_AGENT_NODE_TYPE, | ||
| BATCH_TRANSFORM_SCHEMA, | ||
| BINDINGS_PATH_PREFIX, | ||
| BINDINGS_PLACEHOLDER_PATH_PREFIX, | ||
| BUILT_IN_TOOL_SCHEMAS, | ||
| CONNECTOR_EVENT_PREFIX, | ||
| CONNECTOR_TRIGGER_PREFIX, | ||
| CONVERSATIONAL_AGENT_ICON, | ||
| CONVERSATIONAL_AGENT_NODE_TYPE, | ||
| CONVERSATIONAL_AGENT_SETTINGS, | ||
| CONVERSATIONAL_OUTPUTS_MIN_VERSION, | ||
| CONVERSATIONAL_VOICE_END_CALL_NODE_TYPE, | ||
| CURRENT_WORKFLOW_VERSION, | ||
| DECISION_NODE_TYPE, | ||
| DEFAULT_CONVERSATIONAL_VOICE_MODEL, | ||
| DEFAULT_CONVERSATIONAL_VOICE_SETTINGS, | ||
| DEFAULT_LOCALE, | ||
| DEFAULT_STORAGE_VERSION, | ||
| DEFAULT_WORKFLOW_RUNTIME, | ||
| EMPTY_VARIABLES, | ||
| ESCALATION_QUICK_FORM_NODE_TYPE, | ||
| ESCALATION_TASK_TYPE, | ||
| ESCALATION_TYPE_CODE, | ||
| EntryPointType, | ||
| FLAT_SEP, | ||
| HITL_CODED_ACTION_NODE_TYPE, | ||
| HITL_DOC_VALIDATION_NODE_TYPE, | ||
| HITL_NODE_TYPE, | ||
| HITL_NODE_TYPES, | ||
| HITL_QUICK_FORM_NODE_TYPE, | ||
| JS_EXPRESSION_PREFIX, | ||
| JobAttachmentSchema, | ||
| LOOP_NODE_TYPE, | ||
| ProjectType, | ||
| RESERVED_WORDS, | ||
| RecipientType, | ||
| SUBFLOW_NODE_TYPE, | ||
| SUMMARIZE_SCHEMA, | ||
| SUPPORTED_LOCALES, | ||
| SWITCH_NODE_TYPE, | ||
| SYNTHETIC_GATEWAY_OUTPUT_KEYS, | ||
| TRIGGER_NODE_PREFIX, | ||
| TRIGGER_TYPE_PREFIXES, | ||
| VALIDATION_NAMESPACE, | ||
| VALID_IDENTIFIER_PATTERN, | ||
| VOICE_MODELS, | ||
| WEEKDAYS, | ||
| WORKFLOW_VERSIONS, | ||
| addNodePanelConfigSchema, | ||
| addNodePanelCreateActionSchema, | ||
| addNodePanelSearchScopeSchema, | ||
| agentEnforcementsSchema, | ||
| applyJsonPointer, | ||
| argumentBindingSchema, | ||
| bindingSchema, | ||
| buildInputSchema, | ||
| buildOutputSchema, | ||
| canAcceptMoreConnections, | ||
| categoryManifestSchema2, | ||
| checkCategoryConstraint, | ||
| clearValidatorCache, | ||
| cliRules, | ||
| coerceInputsViaSchema, | ||
| coerceToExpressionValue, | ||
| compareVersions, | ||
| conditionExpressionRule, | ||
| connectionConstraintSchema2, | ||
| constraintWithAddNodePanel, | ||
| containsRef, | ||
| createBindingPackage, | ||
| createDotNetTypeMapping, | ||
| createI18nRegistrar, | ||
| createInputSchemaFromAppSchema, | ||
| createOutcomeMappingFromSchema, | ||
| createOutputSchemaFromAppSchema, | ||
| createRefResolver, | ||
| dataTransformRule, | ||
| decodeLiteral, | ||
| decodeLiteralForValidation, | ||
| decodeLiteralsForValidation, | ||
| deduplicateBindings, | ||
| deepEqual, | ||
| edgeSchema, | ||
| encodeLiteral, | ||
| evaluateCondition, | ||
| evaluateExpression, | ||
| evaluateTemplate, | ||
| executeWritePlan, | ||
| expectedTypeToFieldType, | ||
| expressionFieldTypeSchema, | ||
| expressionLikeSchema, | ||
| expressionModeSchema, | ||
| expressionValueSchema, | ||
| fileFormatToInMemoryWorkflow, | ||
| findDefaultEntryPointNodeId, | ||
| findDuplicateHitlChannelKeys, | ||
| generalRules, | ||
| generateBindingsJson, | ||
| generateEntryPointsJson, | ||
| generateNextId, | ||
| generateOperateJson, | ||
| generatePackageDescriptor, | ||
| generateRandomId, | ||
| generateWorkflowPackaging, | ||
| getAllEntryPoints, | ||
| getBindingResourceValue, | ||
| getBindingResources, | ||
| getBuiltInToolSchema, | ||
| getCronExpressionFromTimeCycleValue, | ||
| getDefaultAgentContent, | ||
| getEffectiveTriggerInputs, | ||
| getEntryPoints, | ||
| getFieldValidator, | ||
| getHitlFieldChannelKey, | ||
| getJsExpressionBody, | ||
| getManifestForNode, | ||
| getNodeLabel, | ||
| getNodeValidator, | ||
| getOutcomeNames, | ||
| getPersonasForModel, | ||
| getStartEventNodes, | ||
| getTimeCycleFromCronExpression, | ||
| getToolFields, | ||
| getVoiceModel, | ||
| governanceRule, | ||
| handleTargetSchema2, | ||
| idSchema, | ||
| inMemoryWorkflowToFileFormat, | ||
| isAgentNodeType, | ||
| isAgentResourceNode, | ||
| isAgentResourceNodeType, | ||
| isAgentToolNodeType, | ||
| isAutoDerivedFieldBinding, | ||
| isAutonomousAgentNodeType, | ||
| isBlockingSeverity, | ||
| isCallContextEmpty, | ||
| isContextNode, | ||
| isConversationalAgentNodeType, | ||
| isEmptyExpressionValue, | ||
| isEndNodeType, | ||
| isEscalationNode, | ||
| isExpression, | ||
| isExpressionValue, | ||
| isGatewayNodeType, | ||
| isHitlInputDirectionField, | ||
| isHitlNodeType, | ||
| isHitlOutputDirectionField, | ||
| isJsonSchema, | ||
| isLoopNodeType, | ||
| isMcpNode, | ||
| isMemoryNode, | ||
| isPlainObject, | ||
| isQuartzCron, | ||
| isQuickFormEscalationNode, | ||
| isStartEventNode, | ||
| isSubflowNodeType, | ||
| isToolNode, | ||
| isTriggerNodeType, | ||
| isValidQuartzCron, | ||
| isVoiceConversationalNode, | ||
| layoutSchema, | ||
| manifestResponseSchema, | ||
| matchesTypePattern, | ||
| maxIterationsExceededMessage, | ||
| maxTokensExceededMessage, | ||
| meetsMinimumConnections, | ||
| mergeBindingResources, | ||
| minConnectionsRule, | ||
| modelNotAvailableMessage, | ||
| nodeLayoutSchema, | ||
| nodeManifestSchema, | ||
| nodeManifestSchema2, | ||
| nodeSchema2, | ||
| nodeVariableSchema, | ||
| normalizeInputDefinition, | ||
| normalizeLocale, | ||
| outputMappingRule, | ||
| parseCronToFrequency, | ||
| parsePointerTokens, | ||
| parseWorkflowJson, | ||
| planWriteThrough, | ||
| registerFlowSchemaI18n, | ||
| resolveAndConvertWorkflow, | ||
| resolveContextBindingPlaceholders, | ||
| resolveEscalationTaskType, | ||
| resolveNestedFieldSchema, | ||
| resolveRefs, | ||
| resolveSupportedLocale, | ||
| resolveTemplate, | ||
| runRules, | ||
| sanitizeFileName, | ||
| schemaErrorsToValidationErrors, | ||
| schemaValidationRule, | ||
| serializeFrequencyToCron, | ||
| shouldBlockAction, | ||
| stripAutoDerivedFieldBindings, | ||
| subflowEntrySchema, | ||
| subflowFileSchema5, | ||
| temperatureExceededMessage, | ||
| toJsonPointer, | ||
| triggerRequiredRule, | ||
| unresolveRefs, | ||
| validateConnection, | ||
| variableToJsonSchema, | ||
| variableUpdateSchema, | ||
| versionSchema2, | ||
| workflowConnectionSchema, | ||
| workflowFileSchema, | ||
| workflowManifestSchema, | ||
| workflowRuntimeSchema, | ||
| workflowSchema, | ||
| workflowSchemaV1_0, | ||
| workflowSchemaV1_0_0, | ||
| workflowSchemaV1_1, | ||
| workflowSchemaV1_2, | ||
| workflowSchemaV1_3, | ||
| workflowSchemaV1_4, | ||
| workflowSchemaV1_5, | ||
| workflowSchemaV1_6, | ||
| workflowSchemaV1_7, | ||
| workflowSchemaV1_8, | ||
| workflowSchemaV1_9, | ||
| workflowVariableSchema, | ||
| workflowVariablesSchema | ||
| } from "./packager-tool-1q1bg65m.js"; | ||
| import { | ||
| currentAgentStorageSchema, | ||
| currentStorageSchema | ||
| } from "./packager-tool-9bnpe8n1.js"; | ||
| import"./packager-tool-3yjtbs1y.js"; | ||
| import"./packager-tool-060a9knt.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| export { | ||
| workflowVariablesSchema, | ||
| workflowVariableSchema, | ||
| workflowSchemaV1_9, | ||
| workflowSchemaV1_8, | ||
| workflowSchemaV1_7, | ||
| workflowSchemaV1_6, | ||
| workflowSchemaV1_5, | ||
| workflowSchemaV1_4, | ||
| workflowSchemaV1_3, | ||
| workflowSchemaV1_2, | ||
| workflowSchemaV1_1, | ||
| workflowSchemaV1_0_0, | ||
| workflowSchemaV1_0, | ||
| workflowSchema, | ||
| workflowRuntimeSchema, | ||
| workflowManifestSchema, | ||
| workflowFileSchema, | ||
| workflowConnectionSchema, | ||
| versionSchema2 as versionSchema, | ||
| variableUpdateSchema, | ||
| variableToJsonSchema, | ||
| validateConnection, | ||
| unresolveRefs, | ||
| triggerRequiredRule, | ||
| toJsonPointer, | ||
| temperatureExceededMessage, | ||
| subflowFileSchema5 as subflowFileSchema, | ||
| subflowEntrySchema, | ||
| stripAutoDerivedFieldBindings, | ||
| shouldBlockAction, | ||
| serializeFrequencyToCron, | ||
| schemaValidationRule, | ||
| schemaErrorsToValidationErrors, | ||
| sanitizeFileName, | ||
| runRules, | ||
| resolveTemplate, | ||
| resolveSupportedLocale, | ||
| resolveRefs, | ||
| resolveNestedFieldSchema, | ||
| resolveEscalationTaskType, | ||
| resolveContextBindingPlaceholders, | ||
| resolveAndConvertWorkflow, | ||
| registerFlowSchemaI18n, | ||
| planWriteThrough, | ||
| parseWorkflowJson, | ||
| parsePointerTokens, | ||
| parseCronToFrequency, | ||
| outputMappingRule, | ||
| normalizeLocale, | ||
| normalizeInputDefinition, | ||
| nodeVariableSchema, | ||
| nodeSchema2 as nodeSchema, | ||
| nodeManifestSchema2 as nodeManifestSchema, | ||
| nodeLayoutSchema, | ||
| modelNotAvailableMessage, | ||
| minConnectionsRule, | ||
| mergeBindingResources, | ||
| meetsMinimumConnections, | ||
| maxTokensExceededMessage, | ||
| maxIterationsExceededMessage, | ||
| matchesTypePattern, | ||
| manifestResponseSchema, | ||
| layoutSchema, | ||
| workflowSchemaV1_9 as latestWorkflowFileSchema, | ||
| isVoiceConversationalNode, | ||
| isValidQuartzCron, | ||
| isTriggerNodeType, | ||
| isToolNode, | ||
| isSubflowNodeType, | ||
| isStartEventNode, | ||
| isQuickFormEscalationNode, | ||
| isQuartzCron, | ||
| isPlainObject, | ||
| isMemoryNode, | ||
| isMcpNode, | ||
| isLoopNodeType, | ||
| isJsonSchema, | ||
| isHitlOutputDirectionField, | ||
| isHitlNodeType, | ||
| isHitlInputDirectionField, | ||
| isGatewayNodeType, | ||
| isExpressionValue, | ||
| isExpression, | ||
| isEscalationNode, | ||
| isEndNodeType, | ||
| isEmptyExpressionValue, | ||
| isConversationalAgentNodeType, | ||
| isContextNode, | ||
| isCallContextEmpty, | ||
| isBlockingSeverity, | ||
| isAutonomousAgentNodeType, | ||
| isAutoDerivedFieldBinding, | ||
| isAgentToolNodeType, | ||
| isAgentResourceNodeType, | ||
| isAgentResourceNode, | ||
| isAgentNodeType, | ||
| inMemoryWorkflowToFileFormat, | ||
| idSchema, | ||
| handleTargetSchema2 as handleTargetSchema, | ||
| governanceRule, | ||
| getVoiceModel, | ||
| getToolFields, | ||
| getTimeCycleFromCronExpression, | ||
| getStartEventNodes, | ||
| getPersonasForModel, | ||
| getOutcomeNames, | ||
| getNodeValidator, | ||
| getNodeLabel, | ||
| getManifestForNode, | ||
| getJsExpressionBody, | ||
| getHitlFieldChannelKey, | ||
| getFieldValidator, | ||
| getEntryPoints, | ||
| getEffectiveTriggerInputs, | ||
| getDefaultAgentContent, | ||
| getCronExpressionFromTimeCycleValue, | ||
| getBuiltInToolSchema, | ||
| getBindingResources, | ||
| getBindingResourceValue, | ||
| getAllEntryPoints, | ||
| generateWorkflowPackaging, | ||
| generateRandomId, | ||
| generatePackageDescriptor, | ||
| generateOperateJson, | ||
| generateNextId, | ||
| generateEntryPointsJson, | ||
| generateBindingsJson, | ||
| generalRules, | ||
| findDuplicateHitlChannelKeys, | ||
| findDefaultEntryPointNodeId, | ||
| fileFormatToInMemoryWorkflow, | ||
| expressionValueSchema, | ||
| expressionModeSchema, | ||
| expressionLikeSchema, | ||
| expressionFieldTypeSchema, | ||
| expectedTypeToFieldType, | ||
| executeWritePlan, | ||
| evaluateTemplate, | ||
| evaluateExpression, | ||
| evaluateCondition, | ||
| encodeLiteral, | ||
| edgeSchema, | ||
| deepEqual, | ||
| deduplicateBindings, | ||
| decodeLiteralsForValidation, | ||
| decodeLiteralForValidation, | ||
| decodeLiteral, | ||
| dataTransformRule, | ||
| currentStorageSchema, | ||
| currentAgentStorageSchema, | ||
| createRefResolver, | ||
| createOutputSchemaFromAppSchema, | ||
| createOutcomeMappingFromSchema, | ||
| createInputSchemaFromAppSchema, | ||
| createI18nRegistrar, | ||
| createDotNetTypeMapping, | ||
| createBindingPackage, | ||
| containsRef, | ||
| constraintWithAddNodePanel, | ||
| connectionConstraintSchema2 as connectionConstraintSchema, | ||
| conditionExpressionRule, | ||
| compareVersions, | ||
| coerceToExpressionValue, | ||
| coerceInputsViaSchema, | ||
| cliRules, | ||
| clearValidatorCache, | ||
| checkCategoryConstraint, | ||
| categoryManifestSchema2 as categoryManifestSchema, | ||
| canAcceptMoreConnections, | ||
| buildOutputSchema, | ||
| buildInputSchema, | ||
| bindingSchema, | ||
| argumentBindingSchema, | ||
| applyJsonPointer, | ||
| nodeManifestSchema as apolloNodeManifestSchema, | ||
| agentEnforcementsSchema, | ||
| addNodePanelSearchScopeSchema, | ||
| addNodePanelCreateActionSchema, | ||
| addNodePanelConfigSchema, | ||
| WORKFLOW_VERSIONS, | ||
| WEEKDAYS, | ||
| VOICE_MODELS, | ||
| VALID_IDENTIFIER_PATTERN, | ||
| VALIDATION_NAMESPACE, | ||
| TRIGGER_TYPE_PREFIXES, | ||
| TRIGGER_NODE_PREFIX, | ||
| SYNTHETIC_GATEWAY_OUTPUT_KEYS, | ||
| SWITCH_NODE_TYPE, | ||
| SUPPORTED_LOCALES, | ||
| SUMMARIZE_SCHEMA, | ||
| SUBFLOW_NODE_TYPE, | ||
| RecipientType, | ||
| RESERVED_WORDS, | ||
| ProjectType, | ||
| LOOP_NODE_TYPE, | ||
| JobAttachmentSchema, | ||
| JS_EXPRESSION_PREFIX, | ||
| HITL_QUICK_FORM_NODE_TYPE, | ||
| HITL_NODE_TYPES, | ||
| HITL_NODE_TYPE, | ||
| HITL_DOC_VALIDATION_NODE_TYPE, | ||
| HITL_CODED_ACTION_NODE_TYPE, | ||
| FLAT_SEP, | ||
| EntryPointType, | ||
| ESCALATION_TYPE_CODE, | ||
| ESCALATION_TASK_TYPE, | ||
| ESCALATION_QUICK_FORM_NODE_TYPE, | ||
| EMPTY_VARIABLES, | ||
| DEFAULT_WORKFLOW_RUNTIME, | ||
| DEFAULT_STORAGE_VERSION, | ||
| DEFAULT_LOCALE, | ||
| DEFAULT_CONVERSATIONAL_VOICE_SETTINGS, | ||
| DEFAULT_CONVERSATIONAL_VOICE_MODEL, | ||
| DECISION_NODE_TYPE, | ||
| CURRENT_WORKFLOW_VERSION, | ||
| CONVERSATIONAL_VOICE_END_CALL_NODE_TYPE, | ||
| CONVERSATIONAL_OUTPUTS_MIN_VERSION, | ||
| CONVERSATIONAL_AGENT_SETTINGS, | ||
| CONVERSATIONAL_AGENT_NODE_TYPE, | ||
| CONVERSATIONAL_AGENT_ICON, | ||
| CONNECTOR_TRIGGER_PREFIX, | ||
| CONNECTOR_EVENT_PREFIX, | ||
| BUILT_IN_TOOL_SCHEMAS, | ||
| BINDINGS_PLACEHOLDER_PATH_PREFIX, | ||
| BINDINGS_PATH_PREFIX, | ||
| BATCH_TRANSFORM_SCHEMA, | ||
| AUTONOMOUS_AGENT_NODE_TYPE, | ||
| ANALYZE_FILES_SCHEMA, | ||
| AGENT_TARGET_RUNTIME, | ||
| AGENT_RESOURCE_PREFIX, | ||
| AGENT_NODE_TYPES | ||
| }; | ||
| //# debugId=505C3763FEA4D00864756E2164756E21 |
| import"./packager-tool-060a9knt.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| // ../../node_modules/@uipath/flow-converter/node_modules/@uipath/flow-schema/dist/ja-O2NEV5D6.js | ||
| var agentInputRefs_nodeCollision_message = "ノード「{{id}}」に「{{sep}}」が含まれています。インライン エージェントは、パス セグメントを「{{sep}}」と結合して参照をエンコードするため、「$vars.{{id}}.output.field」は実行時に別のパスと競合します。ノードの名前を変更して「{{sep}}」を削除してください。"; | ||
| var agentInputRefs_reservedNamespace_message = "「$agent.{{ref}}」はフロー内部のエージェント ランタイム名前空間であり、プロンプトで直接使用することはできません。代わりに「$vars.{{ref}}」または「$metadata.{{ref}}」を使用してフローの変数を参照してください。"; | ||
| var agentInputRefs_unresolvedRef_message = "プロンプトで「$vars.{{ref}}」が参照されていますが、ワークフロー変数またはノード「{{rootSegment}}」は存在しません。変数/ノードをフローに追加するか、参照を削除してください。"; | ||
| var agentInputRefs_variableCollision_message = "ワークフロー変数「{{id}}」に「{{sep}}」が含まれています。インライン エージェントは、パス セグメントを「{{sep}}」と結合して参照をエンコードするため、「{{id}}」は実行時に別のパスと競合します。変数の名前を変更して「{{sep}}」を削除してください。"; | ||
| var conditionExpression_decisionWrapped_message = "「{{nodeLabel}}」の条件が無効です: {{error}}"; | ||
| var conditionExpression_empty_message = "式が空です。"; | ||
| var conditionExpression_incomplete_message = "式が不完全です。"; | ||
| var conditionExpression_invalid_message = "この式は無効です。"; | ||
| var conditionExpression_required_message = "条件式は必須です。"; | ||
| var dataTransform_customScriptMissing_message = "「{{nodeLabel}}」カスタム スクリプト演算にスクリプトがありません。"; | ||
| var dataTransform_filterMissingField_message = "「{{nodeLabel}}」のフィルター演算にフィールドがありません。"; | ||
| var dataTransform_filterNoConditions_message = "「{{nodeLabel}}」のフィルター演算に条件がありません。"; | ||
| var dataTransform_groupByAggMissingField_message = "「{{nodeLabel}}」のグループ化集計にフィールドがありません。"; | ||
| var dataTransform_groupByAggMissingOutputName_message = "「{{nodeLabel}}」のグループ化集計に出力名がありません。"; | ||
| var dataTransform_groupByMissingField_message = "「{{nodeLabel}}」のグループ化演算にグループ化フィールドがありません。"; | ||
| var dataTransform_mapMissingField_message = "「{{nodeLabel}}」のマッピング フィールドのマッピングにフィールドがありません。"; | ||
| var dataTransform_mapNoMappings_message = "「{{nodeLabel}}」のマッピング演算では、元のフィールドが保持されない場合、少なくとも 1 つのフィールド マッピングが必要です。"; | ||
| var dataTransform_missingCollection_message = "「{{nodeLabel}}」にコレクション変数がありません。"; | ||
| var dataTransform_noOperations_message = "「{{nodeLabel}}」に演算が設定されていません。"; | ||
| var escalation_appRequired_message = "{{label}}: アクション アプリは必須です。"; | ||
| var escalation_nameRequired_message = "{{label}}: エスカレーション名は必須です。"; | ||
| var escalation_quickFormDuplicateFieldLabel_message = "{{label}}: 複数のフィールドに「{{fieldLabel}}」というラベルが付けられています。— エスカレーション タスクではそのうちの 1 つのみが保持されます。フィールドのラベルを一意にしてください。"; | ||
| var escalation_recipientRequired_message = "{{label}}: エスカレーションの受信者は必須です。"; | ||
| var governance_hitlRequired_message = "エージェントには、少なくとも 1 つのエスカレーション リソースまたは人間参加型 (HITL) アクションを含むガードレールが必要です。このルールは次のガバナンス ポリシーによって適用されています: {{policyName}}"; | ||
| var governance_maxIterationsExceeded_message = "繰り返しの最大回数が {{maxIterations}} を超えています。このルールは次のガバナンス ポリシーによって適用されています: {{policyName}}"; | ||
| var governance_maxTokensExceeded_message = "応答あたりの最大トークン数が {{maxTokens}} を超えています。このルールは次のガバナンス ポリシーによって適用されています: {{policyName}}"; | ||
| var governance_modelNotAvailable_message = "次のガバナンス ポリシーの適用により、モデル「{{model}}」は許可されません: {{policyName}}"; | ||
| var governance_noAllowedModel_message = "許可されたモデルが選択されていません。次のガバナンス ポリシーによって適用されています: {{policyName}}"; | ||
| var governance_temperatureExceeded_message = "温度が {{maxTemperature}} を超えています。このルールは次のガバナンス ポリシーによって適用されています: {{policyName}}"; | ||
| var hitlQuickForm_emptySchema_message = "クイック フォームには少なくとも 1 つのフィールドが必要です。"; | ||
| var hitlQuickForm_fieldLabelRequired_message = "フィールド ラベルは必須です。"; | ||
| var outputMapping_missing_message = "「{{nodeLabel}}」に「{{varId}}」の出力マッピングがありません。"; | ||
| var schemaValidator_genericKeyword_message = "「{{nodeLabel}}」の「{{fieldName}}」: {{detail}}"; | ||
| var schemaValidator_invalidEnum_message = "「{{nodeLabel}}」の「{{fieldName}}」は、許可されている値のいずれかである必要があります。"; | ||
| var schemaValidator_invalidField_message = "「{{nodeLabel}}」の「{{fieldName}}」が無効です。"; | ||
| var schemaValidator_invalidPattern_message = "「{{nodeLabel}}」の「{{fieldName}}」の形式が無効です。"; | ||
| var schemaValidator_outOfRange_message = "「{{nodeLabel}}」の「{{fieldName}}」- {{detail}}"; | ||
| var schemaValidator_required_message = "「{{nodeLabel}}」には「{{fieldName}}」が必要です。"; | ||
| var schemaValidator_typeMismatch_message = "「{{nodeLabel}}」の「{{fieldName}}」は「{{type}}」である必要があります。"; | ||
| var schemaValidator_validation_genericError = "検証エラー"; | ||
| var triggerRequired_message = "ワークフローには少なくとも 1 つのトリガー ノードが必要です。"; | ||
| var ja_default = { | ||
| agentInputRefs_nodeCollision_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_variableCollision_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_required_message, | ||
| dataTransform_customScriptMissing_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_noOperations_message, | ||
| escalation_appRequired_message, | ||
| escalation_nameRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_recipientRequired_message, | ||
| governance_hitlRequired_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_noAllowedModel_message, | ||
| governance_temperatureExceeded_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| outputMapping_missing_message, | ||
| schemaValidator_genericKeyword_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_validation_genericError, | ||
| triggerRequired_message | ||
| }; | ||
| export { | ||
| triggerRequired_message, | ||
| schemaValidator_validation_genericError, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_genericKeyword_message, | ||
| outputMapping_missing_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| governance_temperatureExceeded_message, | ||
| governance_noAllowedModel_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_hitlRequired_message, | ||
| escalation_recipientRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_nameRequired_message, | ||
| escalation_appRequired_message, | ||
| ja_default as default, | ||
| dataTransform_noOperations_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_customScriptMissing_message, | ||
| conditionExpression_required_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| agentInputRefs_variableCollision_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_nodeCollision_message | ||
| }; | ||
| //# debugId=8FE62466870D08B364756E2164756E21 |
| import"./packager-tool-060a9knt.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| // ../../node_modules/@uipath/flow-converter/node_modules/@uipath/flow-schema/dist/ko-7XWV2SEQ.js | ||
| var agentInputRefs_nodeCollision_message = '"{{id}}" 노드에 "{{sep}}"이(가) 포함되어 있습니다. 인라인 에이전트는 "{{sep}}"과(와) 경로 세그먼트를 결합하여 참조를 인코딩하므로, "$vars.{{id}}.output.field"가 런타임 시 다른 경로와 충돌하게 됩니다. 노드 이름을 변경하여 "{{sep}}"을(를) 제거하십시오.'; | ||
| var agentInputRefs_reservedNamespace_message = '"$gent.{{ref}}"은(는) 플로우 내부의 에이전트 런타임 네임스페이스이므로 프롬프트에서 직접 사용할 수 없습니다. 대신 "$vars.{{ref}}" 또는 "$metadata.{{ref}}"을(를) 통해 플로우 변수를 참조하십시오.'; | ||
| var agentInputRefs_unresolvedRef_message = '프롬프트가 "$vars.{{ref}}"을(를) 참조하고 있지만 워크플로우 변수나 노드 "{{rootSegment}}"이(가) 존재하지 않습니다. 변수/노드를 플로우에 추가하거나 참조를 제거하십시오.'; | ||
| var agentInputRefs_variableCollision_message = '워크플로우 변수 "{{id}}"에 "{{sep}}"이(가) 포함되어 있습니다. 인라인 에이전트는 "{{sep}}"과(와) 경로 세그먼트를 결합하여 참조를 인코딩하므로 "{{id}}"이(가) 런타임 시 다른 경로와 충돌합니다. 변수 이름을 변경하여 "{{sep}}"을(를) 제거하십시오.'; | ||
| var conditionExpression_decisionWrapped_message = '"{{nodeLabel}}"의 조건이 유효하지 않습니다. {{error}}'; | ||
| var conditionExpression_empty_message = "표현식이 비어 있습니다"; | ||
| var conditionExpression_incomplete_message = "불완전한 표현식"; | ||
| var conditionExpression_invalid_message = "유효하지 않은 표현식"; | ||
| var conditionExpression_required_message = "조건 표현식이 필요합니다"; | ||
| var dataTransform_customScriptMissing_message = '"{{nodeLabel}}" 사용자 지정 스크립트 작업에 스크립트가 없습니다'; | ||
| var dataTransform_filterMissingField_message = '"{{nodeLabel}}"필터 조건에 필드가 누락되었습니다'; | ||
| var dataTransform_filterNoConditions_message = '"{{nodeLabel}}" 필터 작업에 조건이 없습니다'; | ||
| var dataTransform_groupByAggMissingField_message = '"{{nodeLabel}}" 그룹화 집계에 필드가 누락되었습니다'; | ||
| var dataTransform_groupByAggMissingOutputName_message = '"{{nodeLabel}}" 그룹화 집계에 출력 이름이 누락되었습니다'; | ||
| var dataTransform_groupByMissingField_message = '"{{nodeLabel}}" 그룹화 작업에 그룹 기준 필드가 누락되었습니다'; | ||
| var dataTransform_mapMissingField_message = '"{{nodeLabel}}" 맵 필드 매핑에 필드가 누락되었습니다'; | ||
| var dataTransform_mapNoMappings_message = '원본 필드가 유지되지 않을 경우 "{{nodeLabel}}" 맵 작업에는 하나 이상의 필드 매핑이 필요합니다'; | ||
| var dataTransform_missingCollection_message = '"{{nodeLabel}}"에 컬렉션 변수가 누락되었습니다'; | ||
| var dataTransform_noOperations_message = '"{{nodeLabel}}"에 구성된 작업이 없습니다'; | ||
| var escalation_appRequired_message = "{{label}}: 액션 앱은 필수입니다"; | ||
| var escalation_nameRequired_message = "{{label}}: 에스컬레이션 이름은 필수입니다"; | ||
| var escalation_quickFormDuplicateFieldLabel_message = '{{label}}: 여러 필드에 "{{fieldLabel}}"(이)라는 레이블이 지정되어 있습니다 — 에스컬레이션 태스크에서는 그 중 하나만 유지합니다. 필드 레이블을 고유하게 설정하십시오'; | ||
| var escalation_recipientRequired_message = "{{label}}: 에스컬레이션 수신자는 필수입니다"; | ||
| var governance_hitlRequired_message = "에이전트에는 하나 이상의 에스컬레이션 리소스 또는 HITL 액션이 포함된 가드레일이 있어야 합니다. 거버넌스 정책에 의해 적용된 규칙: {{policyName}}"; | ||
| var governance_maxIterationsExceeded_message = "최대 반복 횟수가 {{maxIterations}}을(를) 초과합니다. 거버넌스 정책에 의해 적용된 규칙: {{policyName}}"; | ||
| var governance_maxTokensExceeded_message = "응답당 최대 토큰 수가 {{maxTokens}}을(를) 초과합니다. 거버넌스 정책에 의해 적용된 규칙: {{policyName}}"; | ||
| var governance_modelNotAvailable_message = "{{model}} 모델은 허용되지 않으며 {{policyName}} 거버넌스 정책에 의해 적용됩니다"; | ||
| var governance_noAllowedModel_message = "허용된 모델이 선택되지 않았으며 거버넌스 정책에 의해 강제 적용됩니다. {{policyName}}"; | ||
| var governance_temperatureExceeded_message = "온도가 {{maxTemperature}}를 초과합니다. 거버넌스 정책에 의해 적용된 규칙: {{policyName}}"; | ||
| var hitlQuickForm_emptySchema_message = "빠른 양식에는 하나 이상의 필드가 있어야 합니다"; | ||
| var hitlQuickForm_fieldLabelRequired_message = "필드 레이블은 필수입니다"; | ||
| var outputMapping_missing_message = '"{{nodeLabel}}"에 "{{varId}}"에 대한 출력 매핑이 없습니다'; | ||
| var schemaValidator_genericKeyword_message = '"{{nodeLabel}}"의 "{{fieldName}}": {{detail}}'; | ||
| var schemaValidator_invalidEnum_message = '"{{nodeLabel}}"의 "{{fieldName}}"은(는) 허용된 값 중 하나여야 합니다'; | ||
| var schemaValidator_invalidField_message = '"{{nodeLabel}}"의 "{{fieldName}}"이(가) 유효하지 않습니다'; | ||
| var schemaValidator_invalidPattern_message = '"{{nodeLabel}}"의 "{{fieldName}}" 형식이 잘못되었습니다'; | ||
| var schemaValidator_outOfRange_message = '"{{nodeLabel}}"의 "{{fieldName}}" {{detail}}'; | ||
| var schemaValidator_required_message = '"{{nodeLabel}}"에 "{{fieldName}}"이(가) 필요합니다'; | ||
| var schemaValidator_typeMismatch_message = '"{{nodeLabel}}"의 "{{fieldName}}"에는 {{type}}이(가) 필요합니다'; | ||
| var schemaValidator_validation_genericError = "유효성 검사 오류"; | ||
| var triggerRequired_message = "워크플로우에는 하나 이상의 트리거 노드가 있어야 합니다"; | ||
| var ko_default = { | ||
| agentInputRefs_nodeCollision_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_variableCollision_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_required_message, | ||
| dataTransform_customScriptMissing_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_noOperations_message, | ||
| escalation_appRequired_message, | ||
| escalation_nameRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_recipientRequired_message, | ||
| governance_hitlRequired_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_noAllowedModel_message, | ||
| governance_temperatureExceeded_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| outputMapping_missing_message, | ||
| schemaValidator_genericKeyword_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_validation_genericError, | ||
| triggerRequired_message | ||
| }; | ||
| export { | ||
| triggerRequired_message, | ||
| schemaValidator_validation_genericError, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_genericKeyword_message, | ||
| outputMapping_missing_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| governance_temperatureExceeded_message, | ||
| governance_noAllowedModel_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_hitlRequired_message, | ||
| escalation_recipientRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_nameRequired_message, | ||
| escalation_appRequired_message, | ||
| ko_default as default, | ||
| dataTransform_noOperations_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_customScriptMissing_message, | ||
| conditionExpression_required_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| agentInputRefs_variableCollision_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_nodeCollision_message | ||
| }; | ||
| //# debugId=CC68678F0B6C14B664756E2164756E21 |
Sorry, the diff of this file is too big to display
| import { | ||
| catchError, | ||
| getFileSystem, | ||
| startServer | ||
| } from "./packager-tool-4f38v0ry.js"; | ||
| import"./packager-tool-1ps2qeqg.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| // ../auth/src/strategies/node-strategy.ts | ||
| class NodeAuthStrategy { | ||
| async execute(url, redirectUri, expectedState, opts) { | ||
| const fs = getFileSystem(); | ||
| const callbackUrl = await startServer({ | ||
| redirectUri, | ||
| timeoutMs: opts?.timeoutMs, | ||
| signal: opts?.signal, | ||
| onListening: async () => { | ||
| let safeUrl = ""; | ||
| for (const ch of url) { | ||
| const c = ch.charCodeAt(0); | ||
| if (c > 31 && (c < 128 || c > 159)) | ||
| safeUrl += ch; | ||
| } | ||
| if (opts?.noBrowser) { | ||
| if (!opts.onAuthUrl) { | ||
| throw new Error("Headless login (noBrowser) requires an onAuthUrl handler " + "to surface the authorize URL, but none was provided."); | ||
| } | ||
| opts.onAuthUrl(safeUrl); | ||
| return; | ||
| } | ||
| const [openError] = await catchError(fs.utils.open(url)); | ||
| if (!openError) | ||
| return; | ||
| const isSpawnError = "code" in openError && openError.code === "ENOENT"; | ||
| if (isSpawnError) { | ||
| throw new Error("Could not open a browser. No supported browser launcher was found. " + `On a headless or minimal system, use non-interactive login instead: | ||
| ` + ` uip login --client-id <id> --client-secret <secret> -t <tenant> | ||
| ` + "Or install a browser opener for your OS (e.g. xdg-utils on Linux).", { cause: openError }); | ||
| } | ||
| throw new Error("Could not open the browser automatically. " + `Visit this URL to authenticate: | ||
| ${safeUrl} | ||
| `, { cause: openError }); | ||
| } | ||
| }); | ||
| const returnedState = callbackUrl.searchParams.get("state"); | ||
| if (returnedState !== expectedState) { | ||
| throw new Error("OAuth state mismatch — the callback state does not match the expected value. " + "This may indicate a CSRF attack. Please try signing in again."); | ||
| } | ||
| const code = callbackUrl.searchParams.get("code"); | ||
| if (!code) { | ||
| throw new Error("No authorization code received"); | ||
| } | ||
| return code; | ||
| } | ||
| } | ||
| export { | ||
| NodeAuthStrategy | ||
| }; | ||
| //# debugId=E5B2BD2B3B179D3D64756E2164756E21 |
| // ../../node_modules/@uipath/flow-converter/node_modules/@uipath/flow-schema/dist/chunk-QKQ47GQZ.js | ||
| var __glob = (map) => (path) => { | ||
| var fn = map[path]; | ||
| if (fn) | ||
| return fn(); | ||
| throw new Error("Module not found in bundle: " + path); | ||
| }; | ||
| export { __glob }; | ||
| //# debugId=E8BE33B9EB2E861E64756E2164756E21 |
| import { | ||
| toolsFactoryRepository | ||
| } from "./packager-tool-7yjpwj92.js"; | ||
| import { | ||
| FlowToolFactory | ||
| } from "./packager-tool-g46253qc.js"; | ||
| // src/packager-tool.ts | ||
| function registerPackagerFactories() { | ||
| toolsFactoryRepository.registerProjectToolFactory(new FlowToolFactory); | ||
| } | ||
| export { registerPackagerFactories }; | ||
| //# debugId=2A70E30168B92A8A64756E2164756E21 |
| // ../auth/src/constants.ts | ||
| var UIPATH_HOME_DIR = ".uipath"; | ||
| var AUTH_FILENAME = ".auth"; | ||
| var DEFAULT_BASE_URL = "https://cloud.uipath.com"; | ||
| var DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000; | ||
| var AUTH_CANCELLED_ERROR_CODE = "EAUTHCANCELLED"; | ||
| export { UIPATH_HOME_DIR, AUTH_FILENAME, DEFAULT_BASE_URL, DEFAULT_AUTH_TIMEOUT_MS, AUTH_CANCELLED_ERROR_CODE }; | ||
| //# debugId=6DCB1840782D2B3E64756E2164756E21 |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| // ../../node_modules/@uipath/flow-converter/node_modules/@uipath/flow-schema/dist/chunk-NVKDXTSG.js | ||
| var agentInputRefs_nodeCollision_message = 'Node "{{id}}" contains "{{sep}}". Inline agents encode references by joining path segments with "{{sep}}", so "$vars.{{id}}.output.field" would collide with another path at runtime. Rename the node to remove "{{sep}}".'; | ||
| var agentInputRefs_reservedNamespace_message = '"$agent.{{ref}}" is a Flow-internal agent-runtime namespace and cannot be used directly in prompts. Reference the flow variable via "$vars.{{ref}}" or "$metadata.{{ref}}" instead.'; | ||
| var agentInputRefs_unresolvedRef_message = 'Prompt references "$vars.{{ref}}" but no workflow variable or node "{{rootSegment}}" exists. Add the variable/node to the flow or remove the reference.'; | ||
| var agentInputRefs_variableCollision_message = 'Process variable "{{id}}" contains "{{sep}}". Inline agents encode references by joining path segments with "{{sep}}", so "{{id}}" would collide with another path at runtime. Rename the variable to remove "{{sep}}".'; | ||
| var conditionExpression_decisionWrapped_message = 'Invalid condition on "{{nodeLabel}}": {{error}}'; | ||
| var conditionExpression_empty_message = "Expression is empty"; | ||
| var conditionExpression_incomplete_message = "Incomplete expression"; | ||
| var conditionExpression_invalid_message = "Invalid expression"; | ||
| var conditionExpression_required_message = "Add a condition"; | ||
| var conversationalVoiceEndCall_callContextInvalid_message = "{{label}}: Call context must be bound to a call context object"; | ||
| var conversationalVoice_callContextInvalid_message = "{{label}}: Call context must be bound to a call context object"; | ||
| var conversationalVoice_callContextRequired_message = "{{label}}: Call context is required when voice is enabled"; | ||
| var dataTransform_customScriptMissing_message = '"{{nodeLabel}}" custom script operation has no script'; | ||
| var dataTransform_filterMissingField_message = '"{{nodeLabel}}" filter condition is missing a field'; | ||
| var dataTransform_filterNoConditions_message = '"{{nodeLabel}}" filter operation has no conditions'; | ||
| var dataTransform_groupByAggMissingField_message = '"{{nodeLabel}}" group by aggregation is missing a field'; | ||
| var dataTransform_groupByAggMissingOutputName_message = '"{{nodeLabel}}" group by aggregation is missing an output name'; | ||
| var dataTransform_groupByMissingField_message = '"{{nodeLabel}}" group by operation is missing the group by field'; | ||
| var dataTransform_mapMissingField_message = '"{{nodeLabel}}" map field mapping is missing a field'; | ||
| var dataTransform_mapNoMappings_message = '"{{nodeLabel}}" map operation needs at least one field mapping when original fields are not kept'; | ||
| var dataTransform_missingCollection_message = '"{{nodeLabel}}" is missing a collection variable'; | ||
| var dataTransform_noOperations_message = '"{{nodeLabel}}" has no operations configured'; | ||
| var escalation_appRequired_message = "Select an action app"; | ||
| var escalation_nameRequired_message = "{{label}}: Escalation name is required"; | ||
| var escalation_quickFormDuplicateFieldLabel_message = '{{label}}: Multiple fields are labeled "{{fieldLabel}}" — the escalation task would keep only one of them. Make field labels unique'; | ||
| var escalation_recipientRequired_message = "{{label}}: Escalation recipient is required"; | ||
| var governance_hitlRequired_message = "Agent must have at least one escalation resource or a guardrail with HITL action. Rule enforced by governance policy: {{policyName}}"; | ||
| var governance_maxIterationsExceeded_message = "Max iterations exceeds {{maxIterations}}. Rule enforced by governance policy: {{policyName}}"; | ||
| var governance_maxTokensExceeded_message = "Max tokens per response exceeds {{maxTokens}}. Rule enforced by governance policy: {{policyName}}"; | ||
| var governance_modelNotAvailable_message = "{{model}} model is not allowed, enforced by governance policy: {{policyName}}"; | ||
| var governance_noAllowedModel_message = "No allowed model selected, enforced by governance policy: {{policyName}}"; | ||
| var governance_temperatureExceeded_message = "Temperature exceeds {{maxTemperature}}. Rule enforced by governance policy: {{policyName}}"; | ||
| var hitlQuickForm_emptySchema_message = "Add at least one field"; | ||
| var hitlQuickForm_fieldLabelRequired_message = "Field label is required"; | ||
| var outputMapping_missing_message = '"{{nodeLabel}}" is missing output mapping for "{{varId}}"'; | ||
| var schemaValidator_genericKeyword_message = '"{{fieldName}}" on "{{nodeLabel}}": {{detail}}'; | ||
| var schemaValidator_invalidEnum_message = '"{{fieldName}}" on "{{nodeLabel}}" must be one of the allowed values'; | ||
| var schemaValidator_invalidField_message = '"{{fieldName}}" on "{{nodeLabel}}" is invalid'; | ||
| var schemaValidator_invalidPattern_message = '"{{fieldName}}" on "{{nodeLabel}}" has invalid format'; | ||
| var schemaValidator_outOfRange_message = '"{{fieldName}}" on "{{nodeLabel}}" {{detail}}'; | ||
| var schemaValidator_required_message = '"{{fieldName}}" is required on "{{nodeLabel}}"'; | ||
| var schemaValidator_typeMismatch_message = '"{{fieldName}}" on "{{nodeLabel}}" expects {{type}}'; | ||
| var schemaValidator_validation_genericError = "Validation error"; | ||
| var triggerRequired_message = "Process must have at least one trigger node"; | ||
| var en_default = { | ||
| agentInputRefs_nodeCollision_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_variableCollision_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_required_message, | ||
| conversationalVoiceEndCall_callContextInvalid_message, | ||
| conversationalVoice_callContextInvalid_message, | ||
| conversationalVoice_callContextRequired_message, | ||
| dataTransform_customScriptMissing_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_noOperations_message, | ||
| escalation_appRequired_message, | ||
| escalation_nameRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_recipientRequired_message, | ||
| governance_hitlRequired_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_noAllowedModel_message, | ||
| governance_temperatureExceeded_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| outputMapping_missing_message, | ||
| schemaValidator_genericKeyword_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_validation_genericError, | ||
| triggerRequired_message | ||
| }; | ||
| export { agentInputRefs_nodeCollision_message, agentInputRefs_reservedNamespace_message, agentInputRefs_unresolvedRef_message, agentInputRefs_variableCollision_message, conditionExpression_decisionWrapped_message, conditionExpression_empty_message, conditionExpression_incomplete_message, conditionExpression_invalid_message, conditionExpression_required_message, conversationalVoiceEndCall_callContextInvalid_message, conversationalVoice_callContextInvalid_message, conversationalVoice_callContextRequired_message, dataTransform_customScriptMissing_message, dataTransform_filterMissingField_message, dataTransform_filterNoConditions_message, dataTransform_groupByAggMissingField_message, dataTransform_groupByAggMissingOutputName_message, dataTransform_groupByMissingField_message, dataTransform_mapMissingField_message, dataTransform_mapNoMappings_message, dataTransform_missingCollection_message, dataTransform_noOperations_message, escalation_appRequired_message, escalation_nameRequired_message, escalation_quickFormDuplicateFieldLabel_message, escalation_recipientRequired_message, governance_hitlRequired_message, governance_maxIterationsExceeded_message, governance_maxTokensExceeded_message, governance_modelNotAvailable_message, governance_noAllowedModel_message, governance_temperatureExceeded_message, hitlQuickForm_emptySchema_message, hitlQuickForm_fieldLabelRequired_message, outputMapping_missing_message, schemaValidator_genericKeyword_message, schemaValidator_invalidEnum_message, schemaValidator_invalidField_message, schemaValidator_invalidPattern_message, schemaValidator_outOfRange_message, schemaValidator_required_message, schemaValidator_typeMismatch_message, schemaValidator_validation_genericError, triggerRequired_message, en_default }; | ||
| //# debugId=F3F131BAE4C5E82C64756E2164756E21 |
| import { | ||
| AUTH_CANCELLED_ERROR_CODE, | ||
| DEFAULT_AUTH_TIMEOUT_MS | ||
| } from "./packager-tool-1ps2qeqg.js"; | ||
| import { | ||
| __require | ||
| } from "./packager-tool-wckvcay0.js"; | ||
| // ../filesystem/src/node.ts | ||
| import { randomUUID } from "node:crypto"; | ||
| import { existsSync } from "node:fs"; | ||
| import * as fs6 from "node:fs/promises"; | ||
| import * as os2 from "node:os"; | ||
| import * as path2 from "node:path"; | ||
| // ../../node_modules/open/index.js | ||
| import process8 from "node:process"; | ||
| import path from "node:path"; | ||
| import { fileURLToPath } from "node:url"; | ||
| import childProcess3 from "node:child_process"; | ||
| import fs5, { constants as fsConstants2 } from "node:fs/promises"; | ||
| // ../../node_modules/wsl-utils/index.js | ||
| import { promisify as promisify2 } from "node:util"; | ||
| import childProcess2 from "node:child_process"; | ||
| import fs4, { constants as fsConstants } from "node:fs/promises"; | ||
| // ../../node_modules/wsl-utils/node_modules/is-wsl/index.js | ||
| import process2 from "node:process"; | ||
| import os from "node:os"; | ||
| import fs3 from "node:fs"; | ||
| // ../../node_modules/is-inside-container/index.js | ||
| import fs2 from "node:fs"; | ||
| // ../../node_modules/is-inside-container/node_modules/is-docker/index.js | ||
| import fs from "node:fs"; | ||
| var isDockerCached; | ||
| function hasDockerEnv() { | ||
| try { | ||
| fs.statSync("/.dockerenv"); | ||
| return true; | ||
| } catch { | ||
| return false; | ||
| } | ||
| } | ||
| function hasDockerCGroup() { | ||
| try { | ||
| return fs.readFileSync("/proc/self/cgroup", "utf8").includes("docker"); | ||
| } catch { | ||
| return false; | ||
| } | ||
| } | ||
| function isDocker() { | ||
| if (isDockerCached === undefined) { | ||
| isDockerCached = hasDockerEnv() || hasDockerCGroup(); | ||
| } | ||
| return isDockerCached; | ||
| } | ||
| // ../../node_modules/is-inside-container/index.js | ||
| var cachedResult; | ||
| var hasContainerEnv = () => { | ||
| try { | ||
| fs2.statSync("/run/.containerenv"); | ||
| return true; | ||
| } catch { | ||
| return false; | ||
| } | ||
| }; | ||
| function isInsideContainer() { | ||
| if (cachedResult === undefined) { | ||
| cachedResult = hasContainerEnv() || isDocker(); | ||
| } | ||
| return cachedResult; | ||
| } | ||
| // ../../node_modules/wsl-utils/node_modules/is-wsl/index.js | ||
| var isWsl = () => { | ||
| if (process2.platform !== "linux") { | ||
| return false; | ||
| } | ||
| if (os.release().toLowerCase().includes("microsoft")) { | ||
| if (isInsideContainer()) { | ||
| return false; | ||
| } | ||
| return true; | ||
| } | ||
| try { | ||
| if (fs3.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft")) { | ||
| return !isInsideContainer(); | ||
| } | ||
| } catch {} | ||
| if (fs3.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop") || fs3.existsSync("/run/WSL")) { | ||
| return !isInsideContainer(); | ||
| } | ||
| return false; | ||
| }; | ||
| var is_wsl_default = process2.env.__IS_WSL_TEST__ ? isWsl : isWsl(); | ||
| // ../../node_modules/powershell-utils/index.js | ||
| import process3 from "node:process"; | ||
| import { Buffer } from "node:buffer"; | ||
| import { promisify } from "node:util"; | ||
| import childProcess from "node:child_process"; | ||
| var execFile = promisify(childProcess.execFile); | ||
| var powerShellPath = () => `${process3.env.SYSTEMROOT || process3.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`; | ||
| var executePowerShell = async (command, options = {}) => { | ||
| const { | ||
| powerShellPath: psPath, | ||
| ...execFileOptions | ||
| } = options; | ||
| const encodedCommand = executePowerShell.encodeCommand(command); | ||
| return execFile(psPath ?? powerShellPath(), [ | ||
| ...executePowerShell.argumentsPrefix, | ||
| encodedCommand | ||
| ], { | ||
| encoding: "utf8", | ||
| ...execFileOptions | ||
| }); | ||
| }; | ||
| executePowerShell.argumentsPrefix = [ | ||
| "-NoProfile", | ||
| "-NonInteractive", | ||
| "-ExecutionPolicy", | ||
| "Bypass", | ||
| "-EncodedCommand" | ||
| ]; | ||
| executePowerShell.encodeCommand = (command) => Buffer.from(command, "utf16le").toString("base64"); | ||
| executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`; | ||
| // ../../node_modules/wsl-utils/utilities.js | ||
| function parseMountPointFromConfig(content) { | ||
| for (const line of content.split(` | ||
| `)) { | ||
| if (/^\s*#/.test(line)) { | ||
| continue; | ||
| } | ||
| const match = /^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(line); | ||
| if (!match) { | ||
| continue; | ||
| } | ||
| return match.groups.mountPoint.trim().replaceAll(/^["']|["']$/g, ""); | ||
| } | ||
| } | ||
| // ../../node_modules/wsl-utils/index.js | ||
| var execFile2 = promisify2(childProcess2.execFile); | ||
| var wslDrivesMountPoint = (() => { | ||
| const defaultMountPoint = "/mnt/"; | ||
| let mountPoint; | ||
| return async function() { | ||
| if (mountPoint) { | ||
| return mountPoint; | ||
| } | ||
| const configFilePath = "/etc/wsl.conf"; | ||
| let isConfigFileExists = false; | ||
| try { | ||
| await fs4.access(configFilePath, fsConstants.F_OK); | ||
| isConfigFileExists = true; | ||
| } catch {} | ||
| if (!isConfigFileExists) { | ||
| return defaultMountPoint; | ||
| } | ||
| const configContent = await fs4.readFile(configFilePath, { encoding: "utf8" }); | ||
| const parsedMountPoint = parseMountPointFromConfig(configContent); | ||
| if (parsedMountPoint === undefined) { | ||
| return defaultMountPoint; | ||
| } | ||
| mountPoint = parsedMountPoint; | ||
| mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`; | ||
| return mountPoint; | ||
| }; | ||
| })(); | ||
| var powerShellPathFromWsl = async () => { | ||
| const mountPoint = await wslDrivesMountPoint(); | ||
| return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`; | ||
| }; | ||
| var powerShellPath2 = is_wsl_default ? powerShellPathFromWsl : powerShellPath; | ||
| var canAccessPowerShellPromise; | ||
| var canAccessPowerShell = async () => { | ||
| canAccessPowerShellPromise ??= (async () => { | ||
| try { | ||
| const psPath = await powerShellPath2(); | ||
| await fs4.access(psPath, fsConstants.X_OK); | ||
| return true; | ||
| } catch { | ||
| return false; | ||
| } | ||
| })(); | ||
| return canAccessPowerShellPromise; | ||
| }; | ||
| var wslDefaultBrowser = async () => { | ||
| const psPath = await powerShellPath2(); | ||
| const command = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`; | ||
| const { stdout } = await executePowerShell(command, { powerShellPath: psPath }); | ||
| return stdout.trim(); | ||
| }; | ||
| var convertWslPathToWindows = async (path) => { | ||
| if (/^[a-z]+:\/\//i.test(path)) { | ||
| return path; | ||
| } | ||
| try { | ||
| const { stdout } = await execFile2("wslpath", ["-aw", path], { encoding: "utf8" }); | ||
| return stdout.trim(); | ||
| } catch { | ||
| return path; | ||
| } | ||
| }; | ||
| // ../../node_modules/open/node_modules/define-lazy-prop/index.js | ||
| function defineLazyProperty(object, propertyName, valueGetter) { | ||
| const define = (value) => Object.defineProperty(object, propertyName, { value, enumerable: true, writable: true }); | ||
| Object.defineProperty(object, propertyName, { | ||
| configurable: true, | ||
| enumerable: true, | ||
| get() { | ||
| const result = valueGetter(); | ||
| define(result); | ||
| return result; | ||
| }, | ||
| set(value) { | ||
| define(value); | ||
| } | ||
| }); | ||
| return object; | ||
| } | ||
| // ../../node_modules/default-browser/index.js | ||
| import { promisify as promisify6 } from "node:util"; | ||
| import process6 from "node:process"; | ||
| import { execFile as execFile6 } from "node:child_process"; | ||
| // ../../node_modules/default-browser-id/index.js | ||
| import { promisify as promisify3 } from "node:util"; | ||
| import process4 from "node:process"; | ||
| import { execFile as execFile3 } from "node:child_process"; | ||
| var execFileAsync = promisify3(execFile3); | ||
| async function defaultBrowserId() { | ||
| if (process4.platform !== "darwin") { | ||
| throw new Error("macOS only"); | ||
| } | ||
| const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]); | ||
| const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout); | ||
| const browserId = match?.groups.id ?? "com.apple.Safari"; | ||
| if (browserId === "com.apple.safari") { | ||
| return "com.apple.Safari"; | ||
| } | ||
| return browserId; | ||
| } | ||
| // ../../node_modules/run-applescript/index.js | ||
| import process5 from "node:process"; | ||
| import { promisify as promisify4 } from "node:util"; | ||
| import { execFile as execFile4, execFileSync } from "node:child_process"; | ||
| var execFileAsync2 = promisify4(execFile4); | ||
| async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) { | ||
| if (process5.platform !== "darwin") { | ||
| throw new Error("macOS only"); | ||
| } | ||
| const outputArguments = humanReadableOutput ? [] : ["-ss"]; | ||
| const execOptions = {}; | ||
| if (signal) { | ||
| execOptions.signal = signal; | ||
| } | ||
| const { stdout } = await execFileAsync2("osascript", ["-e", script, outputArguments], execOptions); | ||
| return stdout.trim(); | ||
| } | ||
| // ../../node_modules/bundle-name/index.js | ||
| async function bundleName(bundleId) { | ||
| return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string | ||
| tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`); | ||
| } | ||
| // ../../node_modules/default-browser/windows.js | ||
| import { promisify as promisify5 } from "node:util"; | ||
| import { execFile as execFile5 } from "node:child_process"; | ||
| var execFileAsync3 = promisify5(execFile5); | ||
| var windowsBrowserProgIds = { | ||
| MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" }, | ||
| MSEdgeBHTML: { name: "Edge Beta", id: "com.microsoft.edge.beta" }, | ||
| MSEdgeDHTML: { name: "Edge Dev", id: "com.microsoft.edge.dev" }, | ||
| AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" }, | ||
| ChromeHTML: { name: "Chrome", id: "com.google.chrome" }, | ||
| ChromeBHTML: { name: "Chrome Beta", id: "com.google.chrome.beta" }, | ||
| ChromeDHTML: { name: "Chrome Dev", id: "com.google.chrome.dev" }, | ||
| ChromiumHTM: { name: "Chromium", id: "org.chromium.Chromium" }, | ||
| BraveHTML: { name: "Brave", id: "com.brave.Browser" }, | ||
| BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" }, | ||
| BraveDHTML: { name: "Brave Dev", id: "com.brave.Browser.dev" }, | ||
| BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" }, | ||
| FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" }, | ||
| OperaStable: { name: "Opera", id: "com.operasoftware.Opera" }, | ||
| VivaldiHTM: { name: "Vivaldi", id: "com.vivaldi.Vivaldi" }, | ||
| "IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" } | ||
| }; | ||
| var _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds)); | ||
| class UnknownBrowserError extends Error { | ||
| } | ||
| async function defaultBrowser(_execFileAsync = execFileAsync3) { | ||
| const { stdout } = await _execFileAsync("reg", [ | ||
| "QUERY", | ||
| " HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice", | ||
| "/v", | ||
| "ProgId" | ||
| ]); | ||
| const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout); | ||
| if (!match) { | ||
| throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`); | ||
| } | ||
| const { id } = match.groups; | ||
| const dotIndex = id.lastIndexOf("."); | ||
| const hyphenIndex = id.lastIndexOf("-"); | ||
| const baseIdByDot = dotIndex === -1 ? undefined : id.slice(0, dotIndex); | ||
| const baseIdByHyphen = hyphenIndex === -1 ? undefined : id.slice(0, hyphenIndex); | ||
| return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? { name: id, id }; | ||
| } | ||
| // ../../node_modules/default-browser/index.js | ||
| var execFileAsync4 = promisify6(execFile6); | ||
| var titleize = (string) => string.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x) => x.toUpperCase()); | ||
| async function defaultBrowser2() { | ||
| if (process6.platform === "darwin") { | ||
| const id = await defaultBrowserId(); | ||
| const name = await bundleName(id); | ||
| return { name, id }; | ||
| } | ||
| if (process6.platform === "linux") { | ||
| const { stdout } = await execFileAsync4("xdg-mime", ["query", "default", "x-scheme-handler/http"]); | ||
| const id = stdout.trim(); | ||
| const name = titleize(id.replace(/.desktop$/, "").replace("-", " ")); | ||
| return { name, id }; | ||
| } | ||
| if (process6.platform === "win32") { | ||
| return defaultBrowser(); | ||
| } | ||
| throw new Error("Only macOS, Linux, and Windows are supported"); | ||
| } | ||
| // ../../node_modules/is-in-ssh/index.js | ||
| import process7 from "node:process"; | ||
| var isInSsh = Boolean(process7.env.SSH_CONNECTION || process7.env.SSH_CLIENT || process7.env.SSH_TTY); | ||
| var is_in_ssh_default = isInSsh; | ||
| // ../../node_modules/open/index.js | ||
| var fallbackAttemptSymbol = Symbol("fallbackAttempt"); | ||
| var __dirname2 = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : ""; | ||
| var localXdgOpenPath = path.join(__dirname2, "xdg-open"); | ||
| var { platform, arch } = process8; | ||
| var tryEachApp = async (apps, opener) => { | ||
| if (apps.length === 0) { | ||
| return; | ||
| } | ||
| const errors = []; | ||
| for (const app of apps) { | ||
| try { | ||
| return await opener(app); | ||
| } catch (error) { | ||
| errors.push(error); | ||
| } | ||
| } | ||
| throw new AggregateError(errors, "Failed to open in all supported apps"); | ||
| }; | ||
| var baseOpen = async (options) => { | ||
| options = { | ||
| wait: false, | ||
| background: false, | ||
| newInstance: false, | ||
| allowNonzeroExitCode: false, | ||
| ...options | ||
| }; | ||
| const isFallbackAttempt = options[fallbackAttemptSymbol] === true; | ||
| delete options[fallbackAttemptSymbol]; | ||
| if (Array.isArray(options.app)) { | ||
| return tryEachApp(options.app, (singleApp) => baseOpen({ | ||
| ...options, | ||
| app: singleApp, | ||
| [fallbackAttemptSymbol]: true | ||
| })); | ||
| } | ||
| let { name: app, arguments: appArguments = [] } = options.app ?? {}; | ||
| appArguments = [...appArguments]; | ||
| if (Array.isArray(app)) { | ||
| return tryEachApp(app, (appName) => baseOpen({ | ||
| ...options, | ||
| app: { | ||
| name: appName, | ||
| arguments: appArguments | ||
| }, | ||
| [fallbackAttemptSymbol]: true | ||
| })); | ||
| } | ||
| if (app === "browser" || app === "browserPrivate") { | ||
| const ids = { | ||
| "com.google.chrome": "chrome", | ||
| "google-chrome.desktop": "chrome", | ||
| "com.brave.browser": "brave", | ||
| "org.mozilla.firefox": "firefox", | ||
| "firefox.desktop": "firefox", | ||
| "com.microsoft.msedge": "edge", | ||
| "com.microsoft.edge": "edge", | ||
| "com.microsoft.edgemac": "edge", | ||
| "microsoft-edge.desktop": "edge", | ||
| "com.apple.safari": "safari" | ||
| }; | ||
| const flags = { | ||
| chrome: "--incognito", | ||
| brave: "--incognito", | ||
| firefox: "--private-window", | ||
| edge: "--inPrivate" | ||
| }; | ||
| let browser; | ||
| if (is_wsl_default) { | ||
| const progId = await wslDefaultBrowser(); | ||
| const browserInfo = _windowsBrowserProgIdMap.get(progId); | ||
| browser = browserInfo ?? {}; | ||
| } else { | ||
| browser = await defaultBrowser2(); | ||
| } | ||
| if (browser.id in ids) { | ||
| const browserName = ids[browser.id.toLowerCase()]; | ||
| if (app === "browserPrivate") { | ||
| if (browserName === "safari") { | ||
| throw new Error("Safari doesn't support opening in private mode via command line"); | ||
| } | ||
| appArguments.push(flags[browserName]); | ||
| } | ||
| return baseOpen({ | ||
| ...options, | ||
| app: { | ||
| name: apps[browserName], | ||
| arguments: appArguments | ||
| } | ||
| }); | ||
| } | ||
| throw new Error(`${browser.name} is not supported as a default browser`); | ||
| } | ||
| let command; | ||
| const cliArguments = []; | ||
| const childProcessOptions = {}; | ||
| let shouldUseWindowsInWsl = false; | ||
| if (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) { | ||
| shouldUseWindowsInWsl = await canAccessPowerShell(); | ||
| } | ||
| if (platform === "darwin") { | ||
| command = "open"; | ||
| if (options.wait) { | ||
| cliArguments.push("--wait-apps"); | ||
| } | ||
| if (options.background) { | ||
| cliArguments.push("--background"); | ||
| } | ||
| if (options.newInstance) { | ||
| cliArguments.push("--new"); | ||
| } | ||
| if (app) { | ||
| cliArguments.push("-a", app); | ||
| } | ||
| } else if (platform === "win32" || shouldUseWindowsInWsl) { | ||
| command = await powerShellPath2(); | ||
| cliArguments.push(...executePowerShell.argumentsPrefix); | ||
| if (!is_wsl_default) { | ||
| childProcessOptions.windowsVerbatimArguments = true; | ||
| } | ||
| if (is_wsl_default && options.target) { | ||
| options.target = await convertWslPathToWindows(options.target); | ||
| } | ||
| const encodedArguments = ["$ProgressPreference = 'SilentlyContinue';", "Start"]; | ||
| if (options.wait) { | ||
| encodedArguments.push("-Wait"); | ||
| } | ||
| if (app) { | ||
| encodedArguments.push(executePowerShell.escapeArgument(app)); | ||
| if (options.target) { | ||
| appArguments.push(options.target); | ||
| } | ||
| } else if (options.target) { | ||
| encodedArguments.push(executePowerShell.escapeArgument(options.target)); | ||
| } | ||
| if (appArguments.length > 0) { | ||
| appArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument)); | ||
| encodedArguments.push("-ArgumentList", appArguments.join(",")); | ||
| } | ||
| options.target = executePowerShell.encodeCommand(encodedArguments.join(" ")); | ||
| if (!options.wait) { | ||
| childProcessOptions.stdio = "ignore"; | ||
| } | ||
| } else { | ||
| if (app) { | ||
| command = app; | ||
| } else { | ||
| const isBundled = !__dirname2 || __dirname2 === "/"; | ||
| let exeLocalXdgOpen = false; | ||
| try { | ||
| await fs5.access(localXdgOpenPath, fsConstants2.X_OK); | ||
| exeLocalXdgOpen = true; | ||
| } catch {} | ||
| const useSystemXdgOpen = process8.versions.electron ?? (platform === "android" || isBundled || !exeLocalXdgOpen); | ||
| command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath; | ||
| } | ||
| if (appArguments.length > 0) { | ||
| cliArguments.push(...appArguments); | ||
| } | ||
| if (!options.wait) { | ||
| childProcessOptions.stdio = "ignore"; | ||
| childProcessOptions.detached = true; | ||
| } | ||
| } | ||
| if (platform === "darwin" && appArguments.length > 0) { | ||
| cliArguments.push("--args", ...appArguments); | ||
| } | ||
| if (options.target) { | ||
| cliArguments.push(options.target); | ||
| } | ||
| const subprocess = childProcess3.spawn(command, cliArguments, childProcessOptions); | ||
| if (options.wait) { | ||
| return new Promise((resolve, reject) => { | ||
| subprocess.once("error", reject); | ||
| subprocess.once("close", (exitCode) => { | ||
| if (!options.allowNonzeroExitCode && exitCode !== 0) { | ||
| reject(new Error(`Exited with code ${exitCode}`)); | ||
| return; | ||
| } | ||
| resolve(subprocess); | ||
| }); | ||
| }); | ||
| } | ||
| if (isFallbackAttempt) { | ||
| return new Promise((resolve, reject) => { | ||
| subprocess.once("error", reject); | ||
| subprocess.once("spawn", () => { | ||
| subprocess.once("close", (exitCode) => { | ||
| subprocess.off("error", reject); | ||
| if (exitCode !== 0) { | ||
| reject(new Error(`Exited with code ${exitCode}`)); | ||
| return; | ||
| } | ||
| subprocess.unref(); | ||
| resolve(subprocess); | ||
| }); | ||
| }); | ||
| }); | ||
| } | ||
| subprocess.unref(); | ||
| return new Promise((resolve, reject) => { | ||
| subprocess.once("error", reject); | ||
| subprocess.once("spawn", () => { | ||
| subprocess.off("error", reject); | ||
| resolve(subprocess); | ||
| }); | ||
| }); | ||
| }; | ||
| var open = (target, options) => { | ||
| if (typeof target !== "string") { | ||
| throw new TypeError("Expected a `target`"); | ||
| } | ||
| return baseOpen({ | ||
| ...options, | ||
| target | ||
| }); | ||
| }; | ||
| function detectArchBinary(binary) { | ||
| if (typeof binary === "string" || Array.isArray(binary)) { | ||
| return binary; | ||
| } | ||
| const { [arch]: archBinary } = binary; | ||
| if (!archBinary) { | ||
| throw new Error(`${arch} is not supported`); | ||
| } | ||
| return archBinary; | ||
| } | ||
| function detectPlatformBinary({ [platform]: platformBinary }, { wsl } = {}) { | ||
| if (wsl && is_wsl_default) { | ||
| return detectArchBinary(wsl); | ||
| } | ||
| if (!platformBinary) { | ||
| throw new Error(`${platform} is not supported`); | ||
| } | ||
| return detectArchBinary(platformBinary); | ||
| } | ||
| var apps = { | ||
| browser: "browser", | ||
| browserPrivate: "browserPrivate" | ||
| }; | ||
| defineLazyProperty(apps, "chrome", () => detectPlatformBinary({ | ||
| darwin: "google chrome", | ||
| win32: "chrome", | ||
| linux: ["google-chrome", "google-chrome-stable", "chromium", "chromium-browser"] | ||
| }, { | ||
| wsl: { | ||
| ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe", | ||
| x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"] | ||
| } | ||
| })); | ||
| defineLazyProperty(apps, "brave", () => detectPlatformBinary({ | ||
| darwin: "brave browser", | ||
| win32: "brave", | ||
| linux: ["brave-browser", "brave"] | ||
| }, { | ||
| wsl: { | ||
| ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe", | ||
| x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"] | ||
| } | ||
| })); | ||
| defineLazyProperty(apps, "firefox", () => detectPlatformBinary({ | ||
| darwin: "firefox", | ||
| win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`, | ||
| linux: "firefox" | ||
| }, { | ||
| wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe" | ||
| })); | ||
| defineLazyProperty(apps, "edge", () => detectPlatformBinary({ | ||
| darwin: "microsoft edge", | ||
| win32: "msedge", | ||
| linux: ["microsoft-edge", "microsoft-edge-dev"] | ||
| }, { | ||
| wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe" | ||
| })); | ||
| defineLazyProperty(apps, "safari", () => detectPlatformBinary({ | ||
| darwin: "Safari" | ||
| })); | ||
| var open_default = open; | ||
| // ../filesystem/src/node.ts | ||
| var LOCK_HEARTBEAT_MS = 5000; | ||
| var LOCK_STALE_MS = 15000; | ||
| var LOCK_MAX_WAIT_MS = 20000; | ||
| var LOCK_MAX_HOLD_MS = 60000; | ||
| var LOCK_RETRY_MIN_MS = 100; | ||
| var LOCK_RETRY_JITTER_MS = 200; | ||
| class NodeFileSystem { | ||
| path = { | ||
| join: path2.join, | ||
| resolve: path2.resolve, | ||
| relative: path2.relative, | ||
| dirname: path2.dirname, | ||
| isAbsolute: path2.isAbsolute, | ||
| basename: path2.basename | ||
| }; | ||
| env = { | ||
| cwd: process.cwd, | ||
| homedir: os2.homedir, | ||
| tmpdir: os2.tmpdir, | ||
| getenv: (key) => process.env[key] | ||
| }; | ||
| utils = { | ||
| open: async (url) => { | ||
| await open_default(url); | ||
| } | ||
| }; | ||
| async readFile(path3, options) { | ||
| try { | ||
| if (options) { | ||
| return await fs6.readFile(path3, "utf-8"); | ||
| } | ||
| return await fs6.readFile(path3); | ||
| } catch (error) { | ||
| if (this.isEnoent(error)) | ||
| return null; | ||
| throw error; | ||
| } | ||
| } | ||
| async writeFile(filePath, data) { | ||
| const dir = path2.dirname(filePath); | ||
| if (dir) { | ||
| await fs6.mkdir(dir, { recursive: true }); | ||
| } | ||
| await fs6.writeFile(filePath, data); | ||
| } | ||
| async appendFile(filePath, data) { | ||
| const dir = path2.dirname(filePath); | ||
| if (dir) { | ||
| await fs6.mkdir(dir, { recursive: true }); | ||
| } | ||
| await fs6.appendFile(filePath, data); | ||
| } | ||
| async readdir(dirPath) { | ||
| try { | ||
| return await fs6.readdir(dirPath); | ||
| } catch (error) { | ||
| if (this.isEnoent(error)) | ||
| return []; | ||
| throw error; | ||
| } | ||
| } | ||
| async stat(filePath) { | ||
| try { | ||
| const stats = await fs6.stat(filePath); | ||
| return { | ||
| isFile: () => stats.isFile(), | ||
| isDirectory: () => stats.isDirectory(), | ||
| size: stats.size, | ||
| mtimeMs: stats.mtimeMs | ||
| }; | ||
| } catch (error) { | ||
| if (this.isEnoent(error)) | ||
| return null; | ||
| throw error; | ||
| } | ||
| } | ||
| async exists(filePath) { | ||
| return existsSync(filePath); | ||
| } | ||
| async mkdir(dirPath) { | ||
| await fs6.mkdir(dirPath, { recursive: true }); | ||
| } | ||
| async acquireLock(lockPath) { | ||
| const canonicalPath = await this.canonicalizeLockTarget(lockPath); | ||
| const lockFile = `${canonicalPath}.lock`; | ||
| const ownerId = randomUUID(); | ||
| const start = Date.now(); | ||
| while (true) { | ||
| try { | ||
| await fs6.writeFile(lockFile, ownerId, { flag: "wx" }); | ||
| return this.createLockRelease(lockFile, ownerId); | ||
| } catch (error) { | ||
| if (!this.hasErrnoCode(error, "EEXIST")) { | ||
| throw error; | ||
| } | ||
| const stats = await fs6.stat(lockFile).catch(() => null); | ||
| if (stats && Date.now() - stats.mtimeMs > LOCK_STALE_MS) { | ||
| const reclaimed = await fs6.rm(lockFile, { force: true }).then(() => true).catch(() => false); | ||
| if (reclaimed) | ||
| continue; | ||
| } | ||
| if (Date.now() - start > LOCK_MAX_WAIT_MS) { | ||
| throw new Error(`ELOCKED: timed out waiting for lock on ${canonicalPath}`); | ||
| } | ||
| await new Promise((resolve2) => setTimeout(resolve2, LOCK_RETRY_MIN_MS + Math.random() * LOCK_RETRY_JITTER_MS)); | ||
| } | ||
| } | ||
| } | ||
| async canonicalizeLockTarget(lockPath) { | ||
| const absolute = path2.resolve(lockPath); | ||
| const fullReal = await fs6.realpath(absolute).catch(() => null); | ||
| if (fullReal) | ||
| return fullReal; | ||
| const parent = path2.dirname(absolute); | ||
| const base = path2.basename(absolute); | ||
| const canonicalParent = await fs6.realpath(parent).catch(() => parent); | ||
| return path2.join(canonicalParent, base); | ||
| } | ||
| createLockRelease(lockFile, ownerId) { | ||
| const heartbeatStart = Date.now(); | ||
| let heartbeatTimer; | ||
| let stopped = false; | ||
| const stopHeartbeat = () => { | ||
| stopped = true; | ||
| if (heartbeatTimer) | ||
| clearTimeout(heartbeatTimer); | ||
| }; | ||
| const scheduleNextHeartbeat = () => { | ||
| if (stopped) | ||
| return; | ||
| if (Date.now() - heartbeatStart >= LOCK_MAX_HOLD_MS) { | ||
| stopped = true; | ||
| return; | ||
| } | ||
| heartbeatTimer = setTimeout(() => { | ||
| runHeartbeat(); | ||
| }, LOCK_HEARTBEAT_MS); | ||
| heartbeatTimer.unref?.(); | ||
| }; | ||
| const runHeartbeat = async () => { | ||
| if (stopped) | ||
| return; | ||
| const current = await fs6.readFile(lockFile, "utf-8").catch(() => null); | ||
| if (stopped) | ||
| return; | ||
| if (current !== ownerId) { | ||
| stopped = true; | ||
| return; | ||
| } | ||
| const now = Date.now() / 1000; | ||
| await fs6.utimes(lockFile, now, now).catch(() => {}); | ||
| scheduleNextHeartbeat(); | ||
| }; | ||
| scheduleNextHeartbeat(); | ||
| let released = false; | ||
| return async () => { | ||
| if (released) | ||
| return; | ||
| released = true; | ||
| stopHeartbeat(); | ||
| const current = await fs6.readFile(lockFile, "utf-8").catch(() => null); | ||
| if (current === ownerId) { | ||
| await fs6.rm(lockFile, { force: true }); | ||
| } | ||
| }; | ||
| } | ||
| async rm(filePath) { | ||
| await fs6.rm(filePath, { recursive: true, force: true }); | ||
| } | ||
| async rename(oldPath, newPath) { | ||
| await fs6.rename(oldPath, newPath); | ||
| } | ||
| async realpath(filePath) { | ||
| try { | ||
| return await fs6.realpath(filePath); | ||
| } catch (error) { | ||
| if (this.isEnoent(error)) | ||
| return filePath; | ||
| throw error; | ||
| } | ||
| } | ||
| async getTempDir() { | ||
| return await fs6.mkdtemp(path2.join(os2.tmpdir(), "uipath-fs-")); | ||
| } | ||
| async copyDirectory(sourcePath, destPath) { | ||
| const sourceStats = await this.stat(sourcePath); | ||
| if (!sourceStats) { | ||
| throw new Error(`Source directory does not exist: ${sourcePath}`); | ||
| } | ||
| if (!sourceStats.isDirectory()) { | ||
| throw new Error(`Source path is not a directory: ${sourcePath}`); | ||
| } | ||
| await this.mkdir(destPath); | ||
| const entries = await this.readdir(sourcePath); | ||
| for (const entry of entries) { | ||
| const srcEntry = path2.join(sourcePath, entry); | ||
| const destEntry = path2.join(destPath, entry); | ||
| const entryStats = await this.stat(srcEntry); | ||
| if (!entryStats) | ||
| continue; | ||
| if (entryStats.isDirectory()) { | ||
| await this.copyDirectory(srcEntry, destEntry); | ||
| } else if (entryStats.isFile()) { | ||
| const content = await this.readFile(srcEntry); | ||
| if (content !== null) { | ||
| await this.writeFile(destEntry, content); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| isEnoent(error) { | ||
| return this.hasErrnoCode(error, "ENOENT"); | ||
| } | ||
| hasErrnoCode(error, code) { | ||
| return typeof error === "object" && error !== null && "code" in error && error.code === code; | ||
| } | ||
| } | ||
| // ../filesystem/src/index.ts | ||
| var fsInstance = new NodeFileSystem; | ||
| var getFileSystem = () => fsInstance; | ||
| // ../auth/src/catch-error.ts | ||
| function isPromiseLike(value) { | ||
| return value !== null && typeof value === "object" && typeof value.then === "function"; | ||
| } | ||
| function catchError(fnOrPromise) { | ||
| if (isPromiseLike(fnOrPromise)) { | ||
| return settlePromiseLike(fnOrPromise); | ||
| } | ||
| try { | ||
| const result = fnOrPromise(); | ||
| if (isPromiseLike(result)) { | ||
| return settlePromiseLike(result); | ||
| } | ||
| return [undefined, result]; | ||
| } catch (error) { | ||
| return [ | ||
| error instanceof Error ? error : new Error(String(error)), | ||
| undefined | ||
| ]; | ||
| } | ||
| } | ||
| function settlePromiseLike(thenable) { | ||
| return Promise.resolve(thenable).then((data) => [undefined, data]).catch((error) => [ | ||
| error instanceof Error ? error : new Error(String(error)), | ||
| undefined | ||
| ]); | ||
| } | ||
| // ../auth/src/getBaseHtml.ts | ||
| var escapeHtml = (value) => value.replace(/[&<>"']/g, (char) => { | ||
| switch (char) { | ||
| case "&": | ||
| return "&"; | ||
| case "<": | ||
| return "<"; | ||
| case ">": | ||
| return ">"; | ||
| case '"': | ||
| return """; | ||
| case "'": | ||
| return "'"; | ||
| default: | ||
| return char; | ||
| } | ||
| }); | ||
| var getBaseHtml = ({ title, message, type }) => { | ||
| const icon = type === "success" ? "✓" : "✕"; | ||
| const iconClass = type === "success" ? "icon-success" : "icon-error"; | ||
| const safeTitle = escapeHtml(title); | ||
| const safeMessage = escapeHtml(message); | ||
| return ` | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <title>${safeTitle} - UiPath CLI</title> | ||
| <link rel="preconnect" href="https://fonts.googleapis.com"> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
| <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400&family=Poppins:wght@600&display=swap" rel="stylesheet"> | ||
| <style> | ||
| :root { | ||
| --bg-page: #F6F6F6; | ||
| --bg-card: #FFFFFF; | ||
| --border-card: #D9D9D9; | ||
| --text-heading: #182126; | ||
| --text-body: #616161; | ||
| --text-footer: #9D9D9D; | ||
| --color-success: #16a34a; | ||
| --color-success-bg: #f0fdf4; | ||
| --color-error: #A32200; | ||
| --color-error-bg: #fef2f2; | ||
| --color-accent: #FA4616; | ||
| } | ||
| @media (prefers-color-scheme: dark) { | ||
| :root { | ||
| --bg-page: #182126; | ||
| --bg-card: #2D373C; | ||
| --border-card: #3C464B; | ||
| --text-heading: #F6F6F6; | ||
| --text-body: #B9B9B9; | ||
| --text-footer: #9D9D9D; | ||
| --color-success: #4ade80; | ||
| --color-success-bg: #052e16; | ||
| --color-error: #FA7678; | ||
| --color-error-bg: #450a0a; | ||
| --color-accent: #FA4616; | ||
| } | ||
| } | ||
| * { | ||
| margin: 0; | ||
| padding: 0; | ||
| box-sizing: border-box; | ||
| } | ||
| body { | ||
| font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; | ||
| background: var(--bg-page); | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| min-height: 100vh; | ||
| padding: 20px; | ||
| } | ||
| .container { | ||
| max-width: 480px; | ||
| width: 100%; | ||
| } | ||
| .card { | ||
| background: var(--bg-card); | ||
| border: 1px solid var(--border-card); | ||
| border-top: 3px solid var(--color-accent); | ||
| border-radius: 12px; | ||
| padding: 40px 32px; | ||
| text-align: center; | ||
| } | ||
| .logo { | ||
| display: flex; | ||
| justify-content: center; | ||
| margin-bottom: 24px; | ||
| } | ||
| .logo svg { | ||
| width: 160px; | ||
| height: auto; | ||
| } | ||
| .logo-dark { display: none; } | ||
| .logo-light { display: block; } | ||
| @media (prefers-color-scheme: dark) { | ||
| .logo-dark { display: block; } | ||
| .logo-light { display: none; } | ||
| } | ||
| .icon { | ||
| width: 56px; | ||
| height: 56px; | ||
| border-radius: 50%; | ||
| font-size: 28px; | ||
| display: inline-flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| margin-bottom: 16px; | ||
| font-weight: 600; | ||
| } | ||
| .icon-success { | ||
| background: var(--color-success-bg); | ||
| color: var(--color-success); | ||
| } | ||
| .icon-error { | ||
| background: var(--color-error-bg); | ||
| color: var(--color-error); | ||
| } | ||
| h1 { | ||
| font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; | ||
| color: var(--text-heading); | ||
| font-size: 24px; | ||
| font-weight: 600; | ||
| margin-bottom: 8px; | ||
| } | ||
| p { | ||
| color: var(--text-body); | ||
| font-size: 14px; | ||
| line-height: 1.5; | ||
| } | ||
| .footer { | ||
| margin-top: 24px; | ||
| padding-top: 24px; | ||
| border-top: 1px solid var(--border-card); | ||
| color: var(--text-footer); | ||
| font-size: 13px; | ||
| } | ||
| </style> | ||
| </head> | ||
| <body> | ||
| <div class="container"> | ||
| <div class="card"> | ||
| <div class="logo"> | ||
| <div class="logo-light"> | ||
| <svg aria-hidden="true" width="400" height="116" viewBox="0 0 400 116" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M62.6439 33.1429H60.885C56.2918 33.1429 53.4387 35.9377 53.4387 40.4355V76.6177C53.4387 93.7722 48.1098 100.769 35.0451 100.769C21.9804 100.769 16.6514 93.7405 16.6514 76.5097V40.4355C16.6514 35.9377 13.7982 33.1429 9.20575 33.1429H7.44592C2.85326 33.1429 0 35.9377 0 40.4355V76.6177C0 102.75 11.7912 116 35.0451 116C58.2991 116 70.0897 102.75 70.0897 76.6177V40.4355C70.0897 35.9377 67.2364 33.1429 62.6439 33.1429Z" fill="black"/><path d="M91.1326 55.0988H89.6751C84.9685 55.0988 82.0451 58.0021 82.0451 62.6744V108.425C82.0451 113.097 84.9685 116 89.6751 116H91.1326C95.8386 116 98.762 113.097 98.762 108.425V62.6744C98.762 58.0021 95.8386 55.0988 91.1326 55.0988Z" fill="#FA4616"/><path d="M111.322 26.7778C100.684 25.0967 92.2902 16.8376 90.5818 6.37143C90.5496 6.17388 90.2894 6.17388 90.2572 6.37143C88.5488 16.8376 80.1548 25.0967 69.5175 26.7778C69.3167 26.8094 69.3167 27.0656 69.5175 27.0973C80.1548 28.7781 88.5488 37.0375 90.2572 47.5037C90.2894 47.7012 90.5496 47.7012 90.5818 47.5037C92.2902 37.0375 100.684 28.7781 111.322 27.0973C111.522 27.0656 111.522 26.8095 111.322 26.7778ZM100.87 27.0174C95.5518 27.8578 91.3548 31.9875 90.5007 37.2206C90.4845 37.3194 90.3544 37.3194 90.3383 37.2206C89.4841 31.9875 85.2871 27.8578 79.9685 27.0174C79.868 27.0016 79.868 26.8735 79.9685 26.8577C85.2871 26.0171 89.4841 21.8876 90.3383 16.6545C90.3544 16.5557 90.4845 16.5557 90.5007 16.6545C91.3548 21.8876 95.5518 26.0171 100.87 26.8577C100.971 26.8735 100.971 27.0016 100.87 27.0174Z" fill="#FA4616"/><path d="M117.694 10.4371C112.376 11.2774 108.179 15.4071 107.325 20.6402C107.308 20.739 107.178 20.739 107.162 20.6402C106.308 15.4071 102.111 11.2774 96.7923 10.4371C96.6919 10.4212 96.6919 10.2931 96.7923 10.2773C102.111 9.43674 106.308 5.3072 107.162 0.0740898C107.178 -0.0246966 107.308 -0.0246966 107.325 0.0740898C108.179 5.3072 112.376 9.43672 117.694 10.2773C117.795 10.2931 117.795 10.4212 117.694 10.4371Z" fill="#FA4616"/><path d="M135.312 33.1429H119.087C114.445 33.1429 111.561 35.9675 111.561 40.5133V108.63C111.561 113.175 114.445 116 119.087 116H120.865C125.507 116 128.391 113.175 128.391 108.63V92.5058H135.423C163.58 92.5058 175.066 83.9066 175.066 62.8243C175.066 41.742 163.548 33.1429 135.312 33.1429ZM158.014 62.6068C158.014 73.4525 152.762 77.1123 137.201 77.1123H128.391V48.2095H137.201C152.762 48.2095 158.014 51.8421 158.014 62.6068Z" fill="black"/><path d="M237.564 48.4739H236.23C231.589 48.4739 228.705 51.2986 228.705 55.8444V55.8538C223.938 50.4474 216.554 47.2772 208.114 47.2772C199.516 47.2772 191.74 50.3711 186.22 55.9903C180.207 62.1094 177.029 70.9412 177.029 81.5299C177.029 92.1647 180.226 101.047 186.274 107.217C191.825 112.881 199.621 116 208.225 116C216.505 116 223.944 112.79 228.711 107.462C228.711 107.468 228.711 108.998 228.712 109.004C228.866 113.33 231.717 116 236.23 116H237.564C242.206 116 245.089 113.176 245.089 108.631V55.8444C245.089 51.2986 242.206 48.4739 237.564 48.4739ZM229.038 81.5299C229.038 93.9678 222.256 101.695 211.337 101.695C200.281 101.695 193.414 93.9678 193.414 81.5299C193.414 69.1579 200.196 61.473 211.115 61.473C222.003 61.473 229.038 69.3462 229.038 81.5299Z" fill="black"/><path d="M334.448 47.3426C325.733 47.3426 319.516 50.7418 315.624 55.0257V40.518C315.624 35.9693 312.738 33.1429 308.094 33.1429H306.759C302.115 33.1429 299.229 35.9693 299.229 40.518V108.625C299.229 113.174 302.115 116 306.759 116H308.094C312.738 116 315.624 113.174 315.624 108.625V81.2897C315.624 63.7895 324.146 61.7658 330.556 61.7658C341.32 61.7658 345.711 67.0126 345.711 79.8747V108.625C345.711 113.174 348.596 116 353.241 116H354.576C359.22 116 362.105 113.174 362.105 108.625V78.8939C362.105 57.6628 353.059 47.3426 334.448 47.3426Z" fill="black"/><path d="M294.515 107.664C294.284 105.472 292.945 102.34 286.565 102.34C279.021 102.34 275.431 100.037 275.431 86.9529V61.7659H286.675C291.313 61.7659 294.194 59.19 294.194 55.0447C294.194 50.9661 291.313 48.4318 286.675 48.4318H275.444V40.518C275.444 35.9693 272.541 33.1429 267.869 33.1429H266.526C261.854 33.1429 258.951 35.9693 258.951 40.518V48.4318H256.366C252.276 48.4318 249.736 50.9661 249.736 55.0447C249.736 59.19 252.617 61.7659 257.254 61.7659H258.951V88.369C258.951 107.737 266.645 116 284.677 116C284.707 116 284.736 115.999 284.765 115.998C285.813 115.997 286.937 115.981 288.081 115.881C290.354 115.67 292.073 114.886 293.191 113.546C294.305 112.213 294.75 109.871 294.515 107.664Z" fill="black"/><path d="M367.331 47.6328V36.4082H364.1C362.823 36.4082 362.105 35.8367 362.105 34.7755C362.105 33.7143 362.823 33.1428 364.1 33.1428H373.952C375.228 33.1428 375.946 33.7143 375.946 34.7755C375.946 35.8367 375.228 36.4082 373.952 36.4082H370.801V47.6328C370.801 48.939 370.203 49.6733 369.086 49.6733C367.969 49.6733 367.331 48.939 367.331 47.6328ZM377.822 49.7139C376.745 49.7139 376.174 48.8937 376.465 47.4695L379.018 34.9388C379.258 33.7553 379.976 33.1428 381.172 33.1428H381.771C382.887 33.1428 383.637 33.6775 384.044 34.7341L388.192 45.5096L392.38 34.7341C392.795 33.6652 393.577 33.1428 394.694 33.1428H395.252C396.449 33.1428 397.167 33.7553 397.406 34.9388L399.919 47.4695C400.206 48.8979 399.72 49.7143 398.643 49.7143C397.486 49.7143 396.772 49.1022 396.529 47.9183L394.415 37.6736L390.426 48.1226C390.007 49.2164 389.309 49.7139 388.232 49.7139C387.115 49.7139 386.417 49.2164 385.998 48.1226L382.01 37.6736L379.935 47.9183C379.696 49.1022 378.978 49.7139 377.822 49.7139Z" fill="black"/></svg> | ||
| </div> | ||
| <div class="logo-dark"> | ||
| <svg aria-hidden="true" width="400" height="116" viewBox="0 0 400 116" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M62.6439 33.1428H60.885C56.2918 33.1428 53.4387 35.9376 53.4387 40.4354V76.6177C53.4387 93.7722 48.1098 100.769 35.0451 100.769C21.9804 100.769 16.6514 93.7404 16.6514 76.5096V40.4354C16.6514 35.9377 13.7982 33.1428 9.20575 33.1428H7.44592C2.85326 33.1428 0 35.9377 0 40.4354V76.6177C0 102.75 11.7912 116 35.0451 116C58.2991 116 70.0897 102.75 70.0897 76.6177V40.4354C70.0897 35.9377 67.2364 33.1428 62.6439 33.1428Z" fill="white"/><path d="M91.1326 55.0989H89.6751C84.9685 55.0989 82.0451 58.0021 82.0451 62.6744V108.425C82.0451 113.097 84.9685 116 89.6751 116H91.1326C95.8386 116 98.762 113.097 98.762 108.425V62.6744C98.762 58.0021 95.8386 55.0989 91.1326 55.0989Z" fill="white"/><path d="M111.322 26.7778C100.684 25.0967 92.2902 16.8376 90.5818 6.37143C90.5496 6.17388 90.2894 6.17388 90.2572 6.37143C88.5488 16.8376 80.1548 25.0967 69.5175 26.7778C69.3167 26.8094 69.3167 27.0656 69.5175 27.0973C80.1548 28.7781 88.5488 37.0375 90.2572 47.5037C90.2894 47.7012 90.5496 47.7012 90.5818 47.5037C92.2902 37.0375 100.684 28.7781 111.322 27.0973C111.522 27.0656 111.522 26.8095 111.322 26.7778ZM100.87 27.0174C95.5518 27.8578 91.3548 31.9875 90.5007 37.2206C90.4845 37.3194 90.3544 37.3194 90.3383 37.2206C89.4841 31.9875 85.2871 27.8578 79.9685 27.0174C79.868 27.0016 79.868 26.8735 79.9685 26.8577C85.2871 26.0171 89.4841 21.8876 90.3383 16.6545C90.3544 16.5557 90.4845 16.5557 90.5007 16.6545C91.3548 21.8876 95.5518 26.0171 100.87 26.8577C100.971 26.8735 100.971 27.0016 100.87 27.0174Z" fill="white"/><path d="M117.694 10.4371C112.376 11.2774 108.179 15.4071 107.325 20.6402C107.308 20.739 107.178 20.739 107.162 20.6402C106.308 15.4071 102.111 11.2774 96.7923 10.4371C96.6919 10.4212 96.6919 10.2931 96.7923 10.2773C102.111 9.43674 106.308 5.3072 107.162 0.0740898C107.178 -0.0246966 107.308 -0.0246966 107.325 0.0740898C108.179 5.3072 112.376 9.43672 117.694 10.2773C117.795 10.2931 117.795 10.4212 117.694 10.4371Z" fill="white"/><path d="M135.312 33.1428H119.087C114.445 33.1428 111.561 35.9674 111.561 40.5133V108.63C111.561 113.175 114.445 116 119.087 116H120.865C125.507 116 128.391 113.175 128.391 108.63V92.5057H135.423C163.58 92.5057 175.066 83.9066 175.066 62.8243C175.066 41.7419 163.548 33.1428 135.312 33.1428ZM158.014 62.6067C158.014 73.4525 152.762 77.1123 137.201 77.1123H128.391V48.2095H137.201C152.762 48.2095 158.014 51.842 158.014 62.6067Z" fill="white"/><path d="M237.564 48.4739H236.23C231.589 48.4739 228.705 51.2986 228.705 55.8444V55.8538C223.938 50.4474 216.554 47.2772 208.114 47.2772C199.516 47.2772 191.74 50.3711 186.22 55.9903C180.207 62.1094 177.029 70.9412 177.029 81.5299C177.029 92.1647 180.226 101.047 186.274 107.217C191.825 112.881 199.621 116 208.225 116C216.505 116 223.944 112.79 228.711 107.462C228.711 107.468 228.711 108.998 228.712 109.004C228.866 113.33 231.717 116 236.23 116H237.564C242.206 116 245.089 113.176 245.089 108.631V55.8444C245.089 51.2986 242.206 48.4739 237.564 48.4739ZM229.038 81.5299C229.038 93.9678 222.256 101.695 211.337 101.695C200.281 101.695 193.414 93.9678 193.414 81.5299C193.414 69.1579 200.196 61.473 211.115 61.473C222.003 61.473 229.038 69.3462 229.038 81.5299Z" fill="white"/><path d="M334.448 47.3425C325.733 47.3425 319.516 50.7417 315.624 55.0256V40.5179C315.624 35.9693 312.738 33.1428 308.094 33.1428H306.759C302.115 33.1428 299.229 35.9693 299.229 40.5179V108.625C299.229 113.174 302.115 116 306.759 116H308.094C312.738 116 315.624 113.174 315.624 108.625V81.2897C315.624 63.7894 324.146 61.7657 330.556 61.7657C341.32 61.7657 345.711 67.0125 345.711 79.8746V108.625C345.711 113.174 348.596 116 353.241 116H354.576C359.22 116 362.105 113.174 362.105 108.625V78.8938C362.105 57.6627 353.059 47.3425 334.448 47.3425Z" fill="white"/><path d="M294.515 107.664C294.284 105.472 292.945 102.34 286.565 102.34C279.021 102.34 275.431 100.037 275.431 86.9529V61.7658H286.675C291.313 61.7658 294.194 59.19 294.194 55.0446C294.194 50.966 291.313 48.4317 286.675 48.4317H275.444V40.5179C275.444 35.9693 272.541 33.1428 267.869 33.1428H266.526C261.854 33.1428 258.951 35.9693 258.951 40.5179V48.4317H256.366C252.276 48.4317 249.736 50.966 249.736 55.0446C249.736 59.19 252.617 61.7658 257.254 61.7658H258.951V88.3689C258.951 107.737 266.645 116 284.677 116C284.707 116 284.736 115.999 284.765 115.998C285.813 115.997 286.937 115.981 288.081 115.881C290.354 115.67 292.073 114.885 293.191 113.546C294.305 112.213 294.75 109.87 294.515 107.664Z" fill="white"/><path d="M367.331 47.6328V36.4082H364.1C362.823 36.4082 362.105 35.8367 362.105 34.7755C362.105 33.7143 362.823 33.1428 364.1 33.1428H373.952C375.228 33.1428 375.946 33.7143 375.946 34.7755C375.946 35.8367 375.228 36.4082 373.952 36.4082H370.801V47.6328C370.801 48.939 370.203 49.6733 369.086 49.6733C367.969 49.6733 367.331 48.939 367.331 47.6328ZM377.822 49.7139C376.745 49.7139 376.174 48.8937 376.465 47.4695L379.018 34.9388C379.258 33.7553 379.976 33.1428 381.172 33.1428H381.771C382.887 33.1428 383.637 33.6775 384.044 34.7341L388.192 45.5096L392.38 34.7341C392.795 33.6652 393.577 33.1428 394.694 33.1428H395.252C396.449 33.1428 397.167 33.7553 397.406 34.9388L399.919 47.4695C400.206 48.8979 399.72 49.7143 398.643 49.7143C397.486 49.7143 396.772 49.1022 396.529 47.9183L394.415 37.6736L390.426 48.1226C390.007 49.2164 389.309 49.7139 388.232 49.7139C387.115 49.7139 386.417 49.2164 385.998 48.1226L382.01 37.6736L379.935 47.9183C379.696 49.1022 378.978 49.7139 377.822 49.7139Z" fill="white"/></svg> | ||
| </div> | ||
| </div> | ||
| <div class="icon ${iconClass}">${icon}</div> | ||
| <h1>${safeTitle}</h1> | ||
| <p>${safeMessage}</p> | ||
| <div class="footer">You can close this window</div> | ||
| </div> | ||
| </div> | ||
| </body> | ||
| </html>`; | ||
| }; | ||
| // ../auth/src/server.ts | ||
| var AUTH_TIMEOUT_ERROR_CODE = "EAUTHTIMEOUT"; | ||
| var startServer = async ({ | ||
| redirectUri, | ||
| timeoutMs = DEFAULT_AUTH_TIMEOUT_MS, | ||
| onListening, | ||
| signal | ||
| }) => { | ||
| let http; | ||
| try { | ||
| http = await import("node:http"); | ||
| } catch { | ||
| throw new Error("Local server authentication is not supported in this environment."); | ||
| } | ||
| return new Promise((resolve2, reject) => { | ||
| const server = http.createServer((req, res) => { | ||
| if (!req.url) { | ||
| res.writeHead(400, { | ||
| "Content-Type": "text/html; charset=utf-8", | ||
| Connection: "close" | ||
| }); | ||
| res.end(getBaseHtml({ | ||
| title: "Let's try that again", | ||
| message: "We got an unexpected request. Head back to your terminal and try signing in again.", | ||
| type: "error" | ||
| })); | ||
| server.close(); | ||
| reject(new Error("No URL received")); | ||
| return; | ||
| } | ||
| const url = new URL(req.url, redirectUri); | ||
| const error = url.searchParams.get("error"); | ||
| if (error) { | ||
| res.writeHead(400, { | ||
| "Content-Type": "text/html; charset=utf-8", | ||
| Connection: "close" | ||
| }); | ||
| res.end(getBaseHtml({ | ||
| title: "Let's try that again", | ||
| message: `The sign-in didn't go through: ${error}. Head back to your terminal and take another shot.`, | ||
| type: "error" | ||
| })); | ||
| server.close(); | ||
| reject(new Error(`OAuth error: ${error}`)); | ||
| return; | ||
| } | ||
| const code = url.searchParams.get("code"); | ||
| if (code) { | ||
| res.writeHead(200, { | ||
| "Content-Type": "text/html; charset=utf-8", | ||
| Connection: "close" | ||
| }); | ||
| res.end(getBaseHtml({ | ||
| title: "Ready to automate!", | ||
| message: "You're in. Head back to your terminal and let's get to work.", | ||
| type: "success" | ||
| })); | ||
| server.close(); | ||
| resolve2(url); | ||
| return; | ||
| } | ||
| res.writeHead(400, { | ||
| "Content-Type": "text/html; charset=utf-8", | ||
| Connection: "close" | ||
| }); | ||
| res.end(getBaseHtml({ | ||
| title: "We hit a snag", | ||
| message: "No authorization came back from the server. Head back to your terminal and try once more.", | ||
| type: "error" | ||
| })); | ||
| server.close(); | ||
| reject(new Error("No authorization code received")); | ||
| return; | ||
| }); | ||
| let timeoutHandle; | ||
| const onAbort = () => { | ||
| clearTimeout(timeoutHandle); | ||
| server.close(); | ||
| const err = new Error("Authentication cancelled"); | ||
| err.code = AUTH_CANCELLED_ERROR_CODE; | ||
| reject(err); | ||
| }; | ||
| if (signal) { | ||
| if (signal.aborted) { | ||
| onAbort(); | ||
| return; | ||
| } | ||
| signal.addEventListener("abort", onAbort, { once: true }); | ||
| } | ||
| timeoutHandle = setTimeout(() => { | ||
| server.close(); | ||
| signal?.removeEventListener("abort", onAbort); | ||
| const err = new Error("Authentication timeout"); | ||
| err.code = AUTH_TIMEOUT_ERROR_CODE; | ||
| reject(err); | ||
| }, timeoutMs); | ||
| const bindHost = redirectUri.hostname === "localhost" ? "127.0.0.1" : redirectUri.hostname; | ||
| server.on("error", (err) => { | ||
| clearTimeout(timeoutHandle); | ||
| signal?.removeEventListener("abort", onAbort); | ||
| reject(err); | ||
| }); | ||
| server.listen(Number(redirectUri.port), bindHost, () => { | ||
| if (onListening) { | ||
| Promise.resolve(onListening()).catch((err) => { | ||
| server.close(); | ||
| clearTimeout(timeoutHandle); | ||
| reject(err); | ||
| }); | ||
| } | ||
| }); | ||
| server.on("close", () => { | ||
| clearTimeout(timeoutHandle); | ||
| signal?.removeEventListener("abort", onAbort); | ||
| }); | ||
| }); | ||
| }; | ||
| export { getFileSystem, catchError, startServer }; | ||
| //# debugId=14B5757F539D1DD064756E2164756E21 |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| // ../../node_modules/@uipath/flow-migrations/dist/chunk-JLEB4WUS.js | ||
| var createMigration_invalidInput_message = "Invalid input for migration {{fromVersion}} → {{toVersion}}"; | ||
| var createMigration_invalidOutput_message = "Invalid output for migration {{fromVersion}} → {{toVersion}}"; | ||
| var migrate_chain_noMigrationFound_message = "No migration found from version {{current}}. Cannot reach {{toVersion}}."; | ||
| var en_default = { | ||
| createMigration_invalidInput_message, | ||
| createMigration_invalidOutput_message, | ||
| migrate_chain_noMigrationFound_message | ||
| }; | ||
| export { createMigration_invalidInput_message, createMigration_invalidOutput_message, migrate_chain_noMigrationFound_message, en_default }; | ||
| //# debugId=7E1F3D454038FA4264756E2164756E21 |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| import { | ||
| VALID_PROJECT_NAME_REGEX, | ||
| catchError, | ||
| ensureProjectArtifacts, | ||
| nodeModuleRegistry, | ||
| prepareProjectLocation, | ||
| tryRegisterProjectInParentSolution, | ||
| writeFlowWorkflow | ||
| } from "./packager-tool-vd9zwk2j.js"; | ||
| import { | ||
| getFileSystem | ||
| } from "./packager-tool-4f38v0ry.js"; | ||
| import { | ||
| createWorkflow | ||
| } from "./packager-tool-g46253qc.js"; | ||
| // src/services/flow-init-service.ts | ||
| var safeMkdir = async (fs, dir) => { | ||
| const [err] = await catchError(fs.mkdir(dir)); | ||
| if (err && !(("code" in err) && err.code === "EEXIST")) { | ||
| throw err; | ||
| } | ||
| }; | ||
| async function flowInitAsync(name, options = {}) { | ||
| if (!VALID_PROJECT_NAME_REGEX.test(name)) { | ||
| throw new Error(`Invalid project name "${name}". Name can only contain letters, numbers, underscores (_), and hyphens (-).`); | ||
| } | ||
| const fs = getFileSystem(); | ||
| const baseDir = options.cwd ?? "."; | ||
| const { projectDir, autoCreatedSolution } = await prepareProjectLocation(fs, fs.path.resolve(baseDir, name), name, { skipRegistration: options.skipRegistration }); | ||
| const [statError] = await catchError(fs.stat(projectDir)); | ||
| const projectDirExists = !statError; | ||
| if (statError && !(("code" in statError) && (statError.code === "ENOENT" || statError.code === "PathNotFound"))) { | ||
| throw statError; | ||
| } | ||
| if (projectDirExists && !options.force) { | ||
| const existingEntries = await fs.readdir(projectDir); | ||
| if (existingEntries.length > 0) { | ||
| throw new Error(`Directory "${name}" already exists and is not empty. Use --force to overwrite.`); | ||
| } | ||
| } | ||
| await safeMkdir(fs, projectDir); | ||
| const triggerManifest = nodeModuleRegistry["core.trigger.manual"].latest; | ||
| const flowId = crypto.randomUUID(); | ||
| const workflow = createWorkflow({ | ||
| id: flowId, | ||
| name, | ||
| triggerManifest | ||
| }); | ||
| const projectUiproj = { | ||
| Name: name, | ||
| ProjectType: "Flow" | ||
| }; | ||
| await fs.writeFile(fs.path.join(projectDir, "project.uiproj"), `${JSON.stringify(projectUiproj, null, 2)} | ||
| `); | ||
| const flowFile = fs.path.join(projectDir, `${name}.flow`); | ||
| await writeFlowWorkflow(flowFile, workflow); | ||
| const operateJson = { | ||
| $schema: "https://cloud.uipath.com/draft/2024-12/operate", | ||
| projectId: flowId, | ||
| contentType: "Flow", | ||
| targetFramework: "Portable", | ||
| runtimeOptions: { | ||
| requiresUserInteraction: false, | ||
| isAttended: false | ||
| } | ||
| }; | ||
| await fs.writeFile(fs.path.join(projectDir, "operate.json"), `${JSON.stringify(operateJson, null, 2)} | ||
| `); | ||
| const registration = await tryRegisterProjectInParentSolution(fs, projectDir, { skipRegistration: options.skipRegistration }); | ||
| const projectArtifacts = await maybeGenerateProjectArtifacts(registration, name); | ||
| return { | ||
| projectName: name, | ||
| projectDir, | ||
| flowFile, | ||
| registration, | ||
| autoCreatedSolution, | ||
| projectArtifacts | ||
| }; | ||
| } | ||
| async function maybeGenerateProjectArtifacts(registration, projectName) { | ||
| if (registration.Status !== "Registered" && registration.Status !== "AlreadyRegistered" || !registration.Solution || !registration.ProjectId) { | ||
| return; | ||
| } | ||
| const fs = getFileSystem(); | ||
| return ensureProjectArtifacts({ | ||
| solutionDir: fs.path.dirname(registration.Solution), | ||
| projectId: registration.ProjectId, | ||
| projectName, | ||
| projectType: "Flow" | ||
| }); | ||
| } | ||
| export { flowInitAsync }; | ||
| //# debugId=EB798ABBF0A2006664756E2164756E21 |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| import"./packager-tool-060a9knt.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| // ../../node_modules/@uipath/flow-converter/node_modules/@uipath/flow-schema/dist/pt-BR-Z4J3LEEO.js | ||
| var agentInputRefs_nodeCollision_message = 'O nó "{{id}}" contém "{{sep}}". Os agentes incorporados codificam referências combinando segmentos de caminho com "{{sep}}", assim "$vars.{{id}}.output.field" pode colidir com outro caminho no runtime. Renomeie o nó para remover "{{sep}}".'; | ||
| var agentInputRefs_reservedNamespace_message = '"$agent.{{ref}}" é um namespace de agente-runtime de fluxo interno e não pode ser usado diretamente em prompts. Faça referência à variável do fluxo em "$vars.{{ref}}" ou "$metadata.{{ref}}" em vez disso.'; | ||
| var agentInputRefs_unresolvedRef_message = 'Referências de prompt "$vars.{{ref}}", mas não existem nós nem variáveis de fluxo de trabalho "{{rootSegment}}". Adicione a variável/nó ao fluxo ou remova a referência.'; | ||
| var agentInputRefs_variableCollision_message = 'A variável do fluxo de trabalho "{{id}}" contém "{{sep}}". Os agentes incorporados codificam referências combinando segmentos de caminho com "{{sep}}", assim "{{id}}" pode colidir com outro caminho no runtime. Renomeie a variável para remover "{{sep}}".'; | ||
| var conditionExpression_decisionWrapped_message = 'Condição inválida em "{{nodeLabel}}": {{error}}'; | ||
| var conditionExpression_empty_message = "A expressão está vazia"; | ||
| var conditionExpression_incomplete_message = "Expressão incompleta"; | ||
| var conditionExpression_invalid_message = "Expressão inválida"; | ||
| var conditionExpression_required_message = "É obrigatória uma expressão de condição"; | ||
| var dataTransform_customScriptMissing_message = 'A operação de script personalizado "{{nodeLabel}}" não contém um script'; | ||
| var dataTransform_filterMissingField_message = 'A condição do filtro "{{nodeLabel}}" não contém um campo'; | ||
| var dataTransform_filterNoConditions_message = 'A operação do filtro "{{nodeLabel}}" não tem condições'; | ||
| var dataTransform_groupByAggMissingField_message = 'O grupo "{{nodeLabel}}" por agregação não contém um campo'; | ||
| var dataTransform_groupByAggMissingOutputName_message = 'O grupo "{{nodeLabel}}" por agregação não contém um nome de saída'; | ||
| var dataTransform_groupByMissingField_message = 'O grupo "{{nodeLabel}}" por operação não contém o grupo por campo'; | ||
| var dataTransform_mapMissingField_message = 'O mapeamento de campo do mapa "{{nodeLabel}}" não contém um campo'; | ||
| var dataTransform_mapNoMappings_message = 'A operação do mapa "{{nodeLabel}}" precisa de pelo menos um mapeamento de campo quando os campos originais não são mantidos'; | ||
| var dataTransform_missingCollection_message = '"{{nodeLabel}}" não contém uma variável de coleção'; | ||
| var dataTransform_noOperations_message = '"{{nodeLabel}}" não contém operações configuradas'; | ||
| var escalation_appRequired_message = "{{label}}: o aplicativo de ação é obrigatório"; | ||
| var escalation_nameRequired_message = "{{label}}: o nome do escalonamento é obrigatório"; | ||
| var escalation_quickFormDuplicateFieldLabel_message = '{{label}}: há vários campos rotulados como "{{fieldLabel}}". A tarefa de escalonamento manteria apenas um deles. Tornar os rótulos de campo exclusivos'; | ||
| var escalation_recipientRequired_message = "{{label}}: o destinatário de escalonamento é obrigatório"; | ||
| var governance_hitlRequired_message = "O agente deve ter pelo menos um recurso de escalonamento ou uma proteção com ação HITL. Regra aplicada conforme a política de governança: {{policyName}}"; | ||
| var governance_maxIterationsExceeded_message = "O número máximo de iterações excede {{maxIterations}}. Regra aplicada conforme a política de governança: {{policyName}}"; | ||
| var governance_maxTokensExceeded_message = "O número máximo de tokens por resposta excede {{maxTokens}}. Regra aplicada conforme a política de governança: {{policyName}}"; | ||
| var governance_modelNotAvailable_message = "O modelo {{model}} não é permitido, conforme a política de governança: {{policyName}}"; | ||
| var governance_noAllowedModel_message = "Nenhum modelo permitido selecionado, conforme a política de governança: {{policyName}}"; | ||
| var governance_temperatureExceeded_message = "A temperatura excede {{maxTemperature}}. Regra aplicada conforme a política de governança: {{policyName}}"; | ||
| var hitlQuickForm_emptySchema_message = "O formulário rápido deve ter pelo menos um campo"; | ||
| var hitlQuickForm_fieldLabelRequired_message = "O rótulo do campo é obrigatório"; | ||
| var outputMapping_missing_message = '"{{nodeLabel}}" não tem mapeamento de saída para "{{varId}}"'; | ||
| var schemaValidator_genericKeyword_message = '"{{fieldName}}" em "{{nodeLabel}}": {{detail}}'; | ||
| var schemaValidator_invalidEnum_message = '"{{fieldName}}" em "{{nodeLabel}}" deve ser um dos valores permitidos'; | ||
| var schemaValidator_invalidField_message = '"{{fieldName}}" em "{{nodeLabel}}" é inválido'; | ||
| var schemaValidator_invalidPattern_message = '"{{fieldName}}" em "{{nodeLabel}}" tem um formato inválido'; | ||
| var schemaValidator_outOfRange_message = '"{{fieldName}}" em "{{nodeLabel}}" {{detail}}'; | ||
| var schemaValidator_required_message = '"{{fieldName}}" é obrigatório em "{{nodeLabel}}"'; | ||
| var schemaValidator_typeMismatch_message = '"{{fieldName}}" em "{{nodeLabel}}" espera {{type}}'; | ||
| var schemaValidator_validation_genericError = "Erro de validação"; | ||
| var triggerRequired_message = "O fluxo de trabalho deve ter pelo menos um nó de gatilho"; | ||
| var pt_BR_default = { | ||
| agentInputRefs_nodeCollision_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_variableCollision_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_required_message, | ||
| dataTransform_customScriptMissing_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_noOperations_message, | ||
| escalation_appRequired_message, | ||
| escalation_nameRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_recipientRequired_message, | ||
| governance_hitlRequired_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_noAllowedModel_message, | ||
| governance_temperatureExceeded_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| outputMapping_missing_message, | ||
| schemaValidator_genericKeyword_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_validation_genericError, | ||
| triggerRequired_message | ||
| }; | ||
| export { | ||
| triggerRequired_message, | ||
| schemaValidator_validation_genericError, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_genericKeyword_message, | ||
| outputMapping_missing_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| governance_temperatureExceeded_message, | ||
| governance_noAllowedModel_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_hitlRequired_message, | ||
| escalation_recipientRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_nameRequired_message, | ||
| escalation_appRequired_message, | ||
| pt_BR_default as default, | ||
| dataTransform_noOperations_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_customScriptMissing_message, | ||
| conditionExpression_required_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| agentInputRefs_variableCollision_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_nodeCollision_message | ||
| }; | ||
| //# debugId=92F9DCE49C78313B64756E2164756E21 |
| import"./packager-tool-060a9knt.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| // ../../node_modules/@uipath/flow-converter/node_modules/@uipath/flow-schema/dist/pt-CRSN3TCU.js | ||
| var agentInputRefs_nodeCollision_message = 'O nó "{{id}}" contém "{{sep}}". Os agentes inline codificam referências ao unir os segmentos de caminho com "{{sep}}", pelo que "$vars.{{id}}.output.field" entraria em conflito com outro caminho no runtime. Mude o nome do nó para remover "{{sep}}".'; | ||
| var agentInputRefs_reservedNamespace_message = '"$agent.{{ref}}" é um espaço de nomes de runtime de agente interno do Fluxo e não pode ser utilizado diretamente em pedidos. Referencie a variável de fluxo através de "$vars.{{ref}}" ou "$metadata.{{ref}}" no seu lugar.'; | ||
| var agentInputRefs_unresolvedRef_message = 'O pedido referencia "$vars.{{ref}}" mas não existe nenhuma variável de fluxo de trabalho ou nó "{{rootSegment}}". Adicione a variável/nó ao fluxo ou remova a referência.'; | ||
| var agentInputRefs_variableCollision_message = 'A variável de fluxo de trabalho "{{id}}" contém "{{sep}}". Os agentes inline codificam referências ao unir segmentos de caminho com "{{sep}}", pelo que "{{id}}" entraria em conflito com outro caminho no runtime. Mude o nome da variável para remover "{{sep}}".'; | ||
| var conditionExpression_decisionWrapped_message = 'Condição inválida em "{{nodeLabel}}": {{error}}'; | ||
| var conditionExpression_empty_message = "A expressão está vazia"; | ||
| var conditionExpression_incomplete_message = "Expressão incompleta"; | ||
| var conditionExpression_invalid_message = "Expressão inválida"; | ||
| var conditionExpression_required_message = "É necessária uma expressão de condição"; | ||
| var dataTransform_customScriptMissing_message = 'A operação de script personalizada "{{nodeLabel}}" não tem script'; | ||
| var dataTransform_filterMissingField_message = 'A condição de filtro "{{nodeLabel}}" tem um campo em falta'; | ||
| var dataTransform_filterNoConditions_message = 'A operação de filtro "{{nodeLabel}}" não tem condições'; | ||
| var dataTransform_groupByAggMissingField_message = 'O grupo "{{nodeLabel}}" por agregação tem um campo em falta'; | ||
| var dataTransform_groupByAggMissingOutputName_message = 'O grupo "{{nodeLabel}}" por agregação tem um nome de saída em falta'; | ||
| var dataTransform_groupByMissingField_message = 'O grupo "{{nodeLabel}}" por operação não tem o grupo por campo'; | ||
| var dataTransform_mapMissingField_message = 'O mapeamento de campo do mapa "{{nodeLabel}}" tem um campo em falta'; | ||
| var dataTransform_mapNoMappings_message = 'A operação de mapa "{{nodeLabel}}" necessita de, pelo menos, um mapeamento de campo quando os campos originais não são mantidos'; | ||
| var dataTransform_missingCollection_message = '"{{nodeLabel}}" tem uma variável de coleção em falta'; | ||
| var dataTransform_noOperations_message = '"{{nodeLabel}}" não tem operações configuradas'; | ||
| var escalation_appRequired_message = "{{label}}: A aplicação Action é obrigatória"; | ||
| var escalation_nameRequired_message = "{{label}}: O nome do escalamento é necessário"; | ||
| var escalation_quickFormDuplicateFieldLabel_message = '{{label}}: Vários campos estão etiquetados como "{{fieldLabel}}" – a tarefa de escalamento iria manter apenas um deles. Tornar as etiquetas de campos únicas'; | ||
| var escalation_recipientRequired_message = "{{label}}: É necessários um destinatário de escalamento"; | ||
| var governance_hitlRequired_message = "O agente tem de ter, pelo menos, um recurso de escalamento ou uma barreira de proteção com ação HITL. Regra imposta pela política de governação: {{policyName}}"; | ||
| var governance_maxIterationsExceeded_message = "O máximo de iterações ultrapassa {{maxIterations}}. Regra imposta pela política de governação: {{policyName}}"; | ||
| var governance_maxTokensExceeded_message = "O máximo de tokens por resposta excede {{maxTokens}}. Regra imposta pela política de governação: {{policyName}}"; | ||
| var governance_modelNotAvailable_message = "O modelo {{model}} não é permitido, aplicado pela política de governação: {{policyName}}"; | ||
| var governance_noAllowedModel_message = "Não foi selecionado um modelo permitido, aplicado pela política de governação: {{policyName}}"; | ||
| var governance_temperatureExceeded_message = "A temperatura ultrapassa {{maxTemperature}}. Regra imposta pela política de governação: {{policyName}}"; | ||
| var hitlQuickForm_emptySchema_message = "O Formulário Rápido tem de ter, pelo menos, um campo"; | ||
| var hitlQuickForm_fieldLabelRequired_message = "A etiqueta de campo é obrigatória"; | ||
| var outputMapping_missing_message = '"{{nodeLabel}}" tem um mapeamento de saída em falta para "{{varId}}"'; | ||
| var schemaValidator_genericKeyword_message = '"{{fieldName}}" em "{{nodeLabel}}": {{detail}}'; | ||
| var schemaValidator_invalidEnum_message = '"{{fieldName}}" em "{{nodeLabel}}" tem de ser um dos valores permitidos'; | ||
| var schemaValidator_invalidField_message = '"{{fieldName}}" em "{{nodeLabel}}" é inválido'; | ||
| var schemaValidator_invalidPattern_message = '"{{fieldName}}" em "{{nodeLabel}}" tem um formato inválido'; | ||
| var schemaValidator_outOfRange_message = '"{{fieldName}}" em "{{nodeLabel}}" {{detail}}'; | ||
| var schemaValidator_required_message = '"{{fieldName}}" é necessário em "{{nodeLabel}}"'; | ||
| var schemaValidator_typeMismatch_message = '"{{fieldName}}" em "{{nodeLabel}}" espera {{type}}'; | ||
| var schemaValidator_validation_genericError = "Erro de validação"; | ||
| var triggerRequired_message = "O fluxo de trabalho tem de ter, pelo menos, um nó de acionador"; | ||
| var pt_default = { | ||
| agentInputRefs_nodeCollision_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_variableCollision_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_required_message, | ||
| dataTransform_customScriptMissing_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_noOperations_message, | ||
| escalation_appRequired_message, | ||
| escalation_nameRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_recipientRequired_message, | ||
| governance_hitlRequired_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_noAllowedModel_message, | ||
| governance_temperatureExceeded_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| outputMapping_missing_message, | ||
| schemaValidator_genericKeyword_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_validation_genericError, | ||
| triggerRequired_message | ||
| }; | ||
| export { | ||
| triggerRequired_message, | ||
| schemaValidator_validation_genericError, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_genericKeyword_message, | ||
| outputMapping_missing_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| governance_temperatureExceeded_message, | ||
| governance_noAllowedModel_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_hitlRequired_message, | ||
| escalation_recipientRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_nameRequired_message, | ||
| escalation_appRequired_message, | ||
| pt_default as default, | ||
| dataTransform_noOperations_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_customScriptMissing_message, | ||
| conditionExpression_required_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| agentInputRefs_variableCollision_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_nodeCollision_message | ||
| }; | ||
| //# debugId=BF42F0B1DD999FFF64756E2164756E21 |
| import"./packager-tool-060a9knt.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| // ../../node_modules/@uipath/flow-converter/node_modules/@uipath/flow-schema/dist/ro-WMQEVD7D.js | ||
| var agentInputRefs_nodeCollision_message = "Nodul „{{id}}” conține „{{sep}}”. Agenții inline codifică referințele prin unirea segmentelor de cale cu „{{sep}}”, astfel încât „$vars.{{id}}.output.field” ar intra în conflict cu o altă cale în timpul rulării. Redenumiți nodul pentru a elimina „{{sep}}”."; | ||
| var agentInputRefs_reservedNamespace_message = '"$agent.{{ref}}" este un spațiu de nume intern al runtime-ului agentului din Flow și nu poate fi utilizat direct în prompturi. Faceți referire în schimb la variabila de flux prin "$vars.{{ref}}" sau "$metadata.{{ref}}".'; | ||
| var agentInputRefs_unresolvedRef_message = 'Promptul face referire la "$vars.{{ref}}", dar nu există nicio variabilă workflow sau niciun nod „{{rootSegment}}”. Adăugați variabila/nodul în flux sau eliminați referința.'; | ||
| var agentInputRefs_variableCollision_message = "Variabila workflow „{{id}}” conține „{{sep}}”. Agenții inline codifică referințele prin unirea segmentelor de cale cu „{{sep}}”, astfel încât „{{id}}” ar intra în conflict cu o altă cale în timpul rulării. Redenumiți variabila pentru a elimina „{{sep}}”."; | ||
| var conditionExpression_decisionWrapped_message = "Condiție nevalidă pentru „{{nodeLabel}}”: {{error}}"; | ||
| var conditionExpression_empty_message = "Expresia este goală"; | ||
| var conditionExpression_incomplete_message = "Expresie incompletă"; | ||
| var conditionExpression_invalid_message = "Expresie invalidă"; | ||
| var conditionExpression_required_message = "Este necesară o expresie de condiție"; | ||
| var dataTransform_customScriptMissing_message = "Operațiunea de script personalizat „{{nodeLabel}}” nu are niciun script"; | ||
| var dataTransform_filterMissingField_message = "Condiției de filtrare „{{nodeLabel}}” îi lipsește un câmp"; | ||
| var dataTransform_filterNoConditions_message = "Operațiunea de filtrare „{{nodeLabel}}” nu are condiții"; | ||
| var dataTransform_groupByAggMissingField_message = "Agregării de grupare „{{nodeLabel}}” îi lipsește un câmp"; | ||
| var dataTransform_groupByAggMissingOutputName_message = "Agregării „group by” pentru „{{nodeLabel}}” îi lipsește un nume de ieșire"; | ||
| var dataTransform_groupByMissingField_message = "Operației „grupare după” pentru „{{nodeLabel}}” îi lipsește câmpul de grupare"; | ||
| var dataTransform_mapMissingField_message = "În maparea câmpurilor pentru „{{nodeLabel}}” lipsește un câmp"; | ||
| var dataTransform_mapNoMappings_message = "Operațiunea de mapare „{{nodeLabel}}” necesită cel puțin o mapare a câmpurilor atunci când câmpurile originale nu sunt păstrate"; | ||
| var dataTransform_missingCollection_message = "„{{nodeLabel}}” nu are o variabilă de colecție"; | ||
| var dataTransform_noOperations_message = '"{{nodeLabel}}" nu are nicio operațiune configurată'; | ||
| var escalation_appRequired_message = "{{label}}: Action App este necesară"; | ||
| var escalation_nameRequired_message = "{{label}}: Numele escaladării este obligatoriu"; | ||
| var escalation_quickFormDuplicateFieldLabel_message = "{{label}}: Mai multe câmpuri sunt etichetate „{{fieldLabel}}” — sarcina de escaladare ar păstra doar unul dintre ele. Faceți etichetele câmpurilor unice"; | ||
| var escalation_recipientRequired_message = "{{label}}: Destinatarul escaladării este obligatoriu"; | ||
| var governance_hitlRequired_message = "Agentul trebuie să aibă cel puțin o resursă de escaladare sau un guardrail cu acțiune HITL. Regula este impusă de politica de guvernanță: {{policyName}}"; | ||
| var governance_maxIterationsExceeded_message = "Numărul maxim de iterații depășește {{maxIterations}}. Regula este impusă de politica de guvernanță: {{policyName}}"; | ||
| var governance_maxTokensExceeded_message = "Numărul maxim de tokenuri per răspuns depășește {{maxTokens}}. Regula este aplicată de politica de guvernanță: {{policyName}}"; | ||
| var governance_modelNotAvailable_message = "{{model}} model nu este permis, impus de politica de guvernanță: {{policyName}}"; | ||
| var governance_noAllowedModel_message = "Nu este selectat niciun model permis, impus de politica de guvernanță: {{policyName}}"; | ||
| var governance_temperatureExceeded_message = "Temperatura depășește {{maxTemperature}}. Regula este aplicată prin politica de guvernanță: {{policyName}}"; | ||
| var hitlQuickForm_emptySchema_message = "Formularul rapid trebuie să aibă cel puțin un câmp"; | ||
| var hitlQuickForm_fieldLabelRequired_message = "Eticheta câmpului este obligatorie"; | ||
| var outputMapping_missing_message = '"{{nodeLabel}}" nu are mapare de ieșire pentru "{{varId}}"'; | ||
| var schemaValidator_genericKeyword_message = '"{{fieldName}}" pe "{{nodeLabel}}": {{detail}}'; | ||
| var schemaValidator_invalidEnum_message = '"{{fieldName}}" din "{{nodeLabel}}" trebuie să fie una dintre valorile permise'; | ||
| var schemaValidator_invalidField_message = '"{{fieldName}}" din "{{nodeLabel}}" este nevalid'; | ||
| var schemaValidator_invalidPattern_message = '"{{fieldName}}" din "{{nodeLabel}}" are un format nevalid'; | ||
| var schemaValidator_outOfRange_message = '"{{fieldName}}" pe "{{nodeLabel}}" {{detail}}'; | ||
| var schemaValidator_required_message = '"{{fieldName}}" este obligatoriu în "{{nodeLabel}}"'; | ||
| var schemaValidator_typeMismatch_message = "„{{fieldName}}” din „{{nodeLabel}}” așteaptă {{type}}"; | ||
| var schemaValidator_validation_genericError = "Eroare de validare"; | ||
| var triggerRequired_message = "Workflow trebuie să aibă cel puțin un nod de declanșare"; | ||
| var ro_default = { | ||
| agentInputRefs_nodeCollision_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_variableCollision_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_required_message, | ||
| dataTransform_customScriptMissing_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_noOperations_message, | ||
| escalation_appRequired_message, | ||
| escalation_nameRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_recipientRequired_message, | ||
| governance_hitlRequired_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_noAllowedModel_message, | ||
| governance_temperatureExceeded_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| outputMapping_missing_message, | ||
| schemaValidator_genericKeyword_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_validation_genericError, | ||
| triggerRequired_message | ||
| }; | ||
| export { | ||
| triggerRequired_message, | ||
| schemaValidator_validation_genericError, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_genericKeyword_message, | ||
| outputMapping_missing_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| governance_temperatureExceeded_message, | ||
| governance_noAllowedModel_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_hitlRequired_message, | ||
| escalation_recipientRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_nameRequired_message, | ||
| escalation_appRequired_message, | ||
| ro_default as default, | ||
| dataTransform_noOperations_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_customScriptMissing_message, | ||
| conditionExpression_required_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| agentInputRefs_variableCollision_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_nodeCollision_message | ||
| }; | ||
| //# debugId=70EB7328E64820B764756E2164756E21 |
| import"./packager-tool-060a9knt.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| // ../../node_modules/@uipath/flow-converter/node_modules/@uipath/flow-schema/dist/ru-WBLQ5B2U.js | ||
| var ru_default = {}; | ||
| export { | ||
| ru_default as default | ||
| }; | ||
| //# debugId=708932B1FEFB307E64756E2164756E21 |
| import { | ||
| AGGREGATION_OPTIONS, | ||
| BpmnServiceType, | ||
| CONDITIONS_BY_TYPE, | ||
| CONDITION_LABELS, | ||
| DEBUG_WEBHOOK_START_EVENT_PREFIX, | ||
| DEFAULT_PACKAGE_INTENT, | ||
| ESCAPED_MUSTACHE_PLACEHOLDER, | ||
| FREE_TEXT_CONDITIONS, | ||
| LIST_CONDITIONS, | ||
| PASSTHROUGH_SCRIPT, | ||
| PRIMITIVE_GROUP_KEY, | ||
| PUBLISH_ENTRY_POINT_PREFIX, | ||
| TRANSFORMATIONS_BY_TYPE, | ||
| TRANSFORMATION_OPTIONS, | ||
| UnresolvedAgentInputTypeError, | ||
| VALUE_FREE_CONDITIONS, | ||
| buildAgentInputTypeResolver, | ||
| buildCollectionAccessor, | ||
| collectArtifactDescendants, | ||
| collectCompositeConnectorInputs, | ||
| collectInlineAgentClusterInputs, | ||
| collectInlineAgentInputsFromAgent, | ||
| compositeConnectorInputKey, | ||
| convertDotNotationToNested, | ||
| createNodeOutputMappings, | ||
| createOutputMapping, | ||
| deepTransformStrings, | ||
| deriveAgentInputVariables, | ||
| deriveMergedAgentInputVariables, | ||
| escapeStringForCode, | ||
| extractAgentInputName, | ||
| extractInputMetadata, | ||
| extractTelemetryData, | ||
| findTerminalNodeIds, | ||
| findTerminalNodes, | ||
| generateDataTransformScript, | ||
| generateFilterScript, | ||
| generateGroupByScript, | ||
| generateMapScript, | ||
| getConditionsForType, | ||
| getCuratedOutputFields, | ||
| getDebugWebhookStartEventId, | ||
| getOperationScript, | ||
| getTransformationsForType, | ||
| hasMustache, | ||
| implicitNodePrefix2, | ||
| isCompositeConnectorValue, | ||
| isDataTransform, | ||
| isFileType, | ||
| mapWebhookDebugEntryPoint, | ||
| mergeAnalyzeFilesInputs, | ||
| mergeCompositeConnectorInputs, | ||
| parseMustacheSegments, | ||
| protectJsonStrings, | ||
| restoreJsonStrings, | ||
| rewriteInputTokensToSource, | ||
| rewriteStringsDeep, | ||
| rewriteWebhookTriggerStartEventIdForDebug, | ||
| rewriteWebhookTriggersForDebug, | ||
| scanSourceRefsDeep, | ||
| serializeTemplateInterpolations, | ||
| stripVarsPrefix, | ||
| toServerlessWorkflow, | ||
| toXml | ||
| } from "./packager-tool-3ahtr7dn.js"; | ||
| import"./packager-tool-1q1bg65m.js"; | ||
| import"./packager-tool-jqtspg41.js"; | ||
| import"./packager-tool-hkrpcn6d.js"; | ||
| import"./packager-tool-fr5b9qs6.js"; | ||
| import"./packager-tool-9bnpe8n1.js"; | ||
| import"./packager-tool-ahm4ymrp.js"; | ||
| import"./packager-tool-c19w8vg9.js"; | ||
| import"./packager-tool-3yjtbs1y.js"; | ||
| import"./packager-tool-060a9knt.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| export { | ||
| toXml, | ||
| toServerlessWorkflow, | ||
| stripVarsPrefix, | ||
| serializeTemplateInterpolations, | ||
| scanSourceRefsDeep, | ||
| rewriteWebhookTriggersForDebug, | ||
| rewriteWebhookTriggerStartEventIdForDebug, | ||
| rewriteStringsDeep, | ||
| rewriteInputTokensToSource, | ||
| restoreJsonStrings, | ||
| protectJsonStrings, | ||
| parseMustacheSegments, | ||
| mergeCompositeConnectorInputs, | ||
| mergeAnalyzeFilesInputs, | ||
| mapWebhookDebugEntryPoint, | ||
| isFileType, | ||
| isDataTransform, | ||
| isCompositeConnectorValue, | ||
| implicitNodePrefix2 as implicitNodePrefix, | ||
| hasMustache, | ||
| getTransformationsForType, | ||
| getOperationScript, | ||
| getDebugWebhookStartEventId, | ||
| getCuratedOutputFields, | ||
| getConditionsForType, | ||
| generateMapScript, | ||
| generateGroupByScript, | ||
| generateFilterScript, | ||
| generateDataTransformScript, | ||
| findTerminalNodes, | ||
| findTerminalNodeIds, | ||
| extractTelemetryData, | ||
| extractInputMetadata, | ||
| extractAgentInputName, | ||
| escapeStringForCode, | ||
| deriveMergedAgentInputVariables, | ||
| deriveAgentInputVariables, | ||
| deepTransformStrings, | ||
| createOutputMapping, | ||
| createNodeOutputMappings, | ||
| convertDotNotationToNested, | ||
| compositeConnectorInputKey, | ||
| collectInlineAgentInputsFromAgent, | ||
| collectInlineAgentClusterInputs, | ||
| collectCompositeConnectorInputs, | ||
| collectArtifactDescendants, | ||
| buildCollectionAccessor, | ||
| buildAgentInputTypeResolver, | ||
| VALUE_FREE_CONDITIONS, | ||
| UnresolvedAgentInputTypeError, | ||
| TRANSFORMATION_OPTIONS, | ||
| TRANSFORMATIONS_BY_TYPE, | ||
| PUBLISH_ENTRY_POINT_PREFIX, | ||
| PRIMITIVE_GROUP_KEY, | ||
| PASSTHROUGH_SCRIPT, | ||
| LIST_CONDITIONS, | ||
| FREE_TEXT_CONDITIONS, | ||
| ESCAPED_MUSTACHE_PLACEHOLDER, | ||
| DEFAULT_PACKAGE_INTENT, | ||
| DEBUG_WEBHOOK_START_EVENT_PREFIX, | ||
| CONDITION_LABELS, | ||
| CONDITIONS_BY_TYPE, | ||
| BpmnServiceType, | ||
| AGGREGATION_OPTIONS | ||
| }; | ||
| //# debugId=42A593898735610364756E2164756E21 |
| import"./packager-tool-060a9knt.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| // ../../node_modules/@uipath/flow-converter/node_modules/@uipath/flow-schema/dist/tr-UCMB7W3T.js | ||
| var agentInputRefs_nodeCollision_message = `"{{id}}" düğümü "{{sep}}" içeriyor. Satır içi agent'lar, yol segmentlerini "{{sep}}" ile birleştirerek başvuruları kodlar, böylece "$vars.{{id}}.output.field" çalışma zamanında başka bir yolla çakışabilir. "{{sep}}" öğesini kaldırmak için düğümü yeniden adlandırın.`; | ||
| var agentInputRefs_reservedNamespace_message = '"$agent.{{ref}}" bir Flow-dahili agent çalışma zamanı ad alanıdır ve doğrudan istemlerde kullanılamaz. "$vars.{{ref}}" aracılığıyla akış değişkenine veya onun yerine "$metadata.{{ref}}" değişkenine referans yapın.'; | ||
| var agentInputRefs_unresolvedRef_message = 'İstem "$vars.{{ref}}" başvurusunda bulunuyor ancak "{{rootSegment}}" iş akışı değişkeni veya düğümü yok. Değişkeni/düğümü akışa ekleyin veya başvuruyu kaldırın.'; | ||
| var agentInputRefs_variableCollision_message = `"{{id}}" iş akışı değişkeni "{{sep}}" içeriyor. Satır içi agent'lar, yol segmentlerini "{{sep}}" ile birleştirerek başvuruları kodlar, bu nedenle "{{id}}" çalışma zamanında başka bir yolla çakışır. "{{sep}}" öğesini kaldırmak için değişkeni yeniden adlandırın.`; | ||
| var conditionExpression_decisionWrapped_message = '"{{nodeLabel}}" için geçersiz koşul: {{error}}'; | ||
| var conditionExpression_empty_message = "İfade boş"; | ||
| var conditionExpression_incomplete_message = "Eksik ifade"; | ||
| var conditionExpression_invalid_message = "Geçersiz ifade"; | ||
| var conditionExpression_required_message = "Koşul ifadesi gereklidir"; | ||
| var dataTransform_customScriptMissing_message = '"{{nodeLabel}}" özel komut dosyası işleminde komut dosyası yok'; | ||
| var dataTransform_filterMissingField_message = '"{{nodeLabel}}" filtre koşulunda bir alan eksik'; | ||
| var dataTransform_filterNoConditions_message = '"{{nodeLabel}}" filtre işleminde hiçbir koşul yok'; | ||
| var dataTransform_groupByAggMissingField_message = '"{{nodeLabel}}" toplamaya göre grubunda bir alan eksik'; | ||
| var dataTransform_groupByAggMissingOutputName_message = '"{{nodeLabel}}" toplamaya göre bir çıkış adı eksik'; | ||
| var dataTransform_groupByMissingField_message = '"{{nodeLabel}}" işleme göre gruplandırmada alana göre grup eksik'; | ||
| var dataTransform_mapMissingField_message = '"{{nodeLabel}}" eşleme alanı eşlemesinde bir alan eksik'; | ||
| var dataTransform_mapNoMappings_message = 'Orijinal alanlar korunmadığında "{{nodeLabel}}" eşleme işlemi en az bir alan eşlemesi gerektiriyor'; | ||
| var dataTransform_missingCollection_message = '"{{nodeLabel}}" içinde koleksiyon değişkeni eksik'; | ||
| var dataTransform_noOperations_message = '"{{nodeLabel}}" yapılandırılmış bir işlem yok'; | ||
| var escalation_appRequired_message = "{{label}}: Eylem uygulaması gereklidir"; | ||
| var escalation_nameRequired_message = "{{label}}: Üst birime iletme adı gereklidir"; | ||
| var escalation_quickFormDuplicateFieldLabel_message = '{{label}}: Birden çok alan "{{fieldLabel}}" olarak etiketlendi — ilerletme görevi bunlardan sadece birini korur. Alan etiketlerini benzersiz yap'; | ||
| var escalation_recipientRequired_message = "{{label}}: Üst birime iletme alıcısı gereklidir"; | ||
| var governance_hitlRequired_message = "Agent'ın en az bir üst birime iletme kaynağı veya HITL eylemi içeren bir tasarım ve uygulama kuralı olması gerekir. Yönetim politikası tarafından zorunlu kılınan kural: {{policyName}}"; | ||
| var governance_maxIterationsExceeded_message = "Maksimum yineleme sayısı {{maxIterations}} değerini aşıyor. Yönetim politikası tarafından zorunlu kılınan kural: {{policyName}}"; | ||
| var governance_maxTokensExceeded_message = "Yanıt başına maksimum belirteç sayısı {{maxTokens}} değerini aşıyor. Yönetim politikası tarafından zorunlu kılınan kural: {{policyName}}"; | ||
| var governance_modelNotAvailable_message = "{{model}} modeline izin verilmiyor, yönetim politikası tarafından uygulanıyor: {{policyName}}"; | ||
| var governance_noAllowedModel_message = "İzin verilen model seçilmedi, yönetim politikası tarafından uygulandı: {{policyName}}"; | ||
| var governance_temperatureExceeded_message = "Sıcaklık {{maxTemperature}} değerini aşıyor. Yönetim politikası tarafından zorunlu kılınan kural: {{policyName}}"; | ||
| var hitlQuickForm_emptySchema_message = "Hızlı Form'da en az bir alan olmalıdır"; | ||
| var hitlQuickForm_fieldLabelRequired_message = "Alan etiketi gereklidir"; | ||
| var outputMapping_missing_message = '"{{nodeLabel}}", "{{varId}}" için çıkış eşlemesi eksik'; | ||
| var schemaValidator_genericKeyword_message = '"{{nodeLabel}}" üzerindeki "{{fieldName}}": {{detail}}'; | ||
| var schemaValidator_invalidEnum_message = '"{{fieldName}}" üzerindeki "{{nodeLabel}}" izin verilen değerlerden biri olmalıdır'; | ||
| var schemaValidator_invalidField_message = '"{{nodeLabel}}" üzerindeki "{{fieldName}}" geçersiz'; | ||
| var schemaValidator_invalidPattern_message = '{{nodeLabel}}" üzerindeki "{{fieldName}}" geçersiz biçime sahip'; | ||
| var schemaValidator_outOfRange_message = '"{{nodeLabel}}" üzerindeki "{{fieldName}}" {{detail}}'; | ||
| var schemaValidator_required_message = '"{{nodeLabel}}" için "{{fieldName}}" gereklidir'; | ||
| var schemaValidator_typeMismatch_message = '"{{nodeLabel}}" için "{{fieldName}}" {{type}} ile bitiyor'; | ||
| var schemaValidator_validation_genericError = "Doğrulama hatası"; | ||
| var triggerRequired_message = "İş akışında en az bir tetikleyici düğümü olmalıdır"; | ||
| var tr_default = { | ||
| agentInputRefs_nodeCollision_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_variableCollision_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_required_message, | ||
| dataTransform_customScriptMissing_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_noOperations_message, | ||
| escalation_appRequired_message, | ||
| escalation_nameRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_recipientRequired_message, | ||
| governance_hitlRequired_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_noAllowedModel_message, | ||
| governance_temperatureExceeded_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| outputMapping_missing_message, | ||
| schemaValidator_genericKeyword_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_validation_genericError, | ||
| triggerRequired_message | ||
| }; | ||
| export { | ||
| triggerRequired_message, | ||
| schemaValidator_validation_genericError, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_genericKeyword_message, | ||
| outputMapping_missing_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| governance_temperatureExceeded_message, | ||
| governance_noAllowedModel_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_hitlRequired_message, | ||
| escalation_recipientRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_nameRequired_message, | ||
| escalation_appRequired_message, | ||
| tr_default as default, | ||
| dataTransform_noOperations_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_customScriptMissing_message, | ||
| conditionExpression_required_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| agentInputRefs_variableCollision_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_nodeCollision_message | ||
| }; | ||
| //# debugId=27CA5E6BEEDB2B5C64756E2164756E21 |
| import"./packager-tool-060a9knt.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| // ../../node_modules/@uipath/flow-converter/node_modules/@uipath/flow-schema/dist/zh-CN-2QOHEFC5.js | ||
| var agentInputRefs_nodeCollision_message = "节点“{{id}}”包含“{{sep}}”。内联智能体通过用“{{sep}}”连接路径段来编码引用,因此“$vars.{{id}}.output.field”在运行时可能会与其他路径冲突。重命名节点以移除“{{sep}}”。"; | ||
| var agentInputRefs_reservedNamespace_message = "“$agent.{{ref}}”是流程内部的智能体运行时命名空间,不能在提示词中直接使用。请改为通过“$vars.{{ref}}”或“$metadata.{{ref}}”引用流程变量。"; | ||
| var agentInputRefs_unresolvedRef_message = "提示词引用了“$vars.{{ref}}”,但不存在相应的工作流变量或节点“{{rootSegment}}”。请将变量/节点添加到流程中,或移除此引用。"; | ||
| var agentInputRefs_variableCollision_message = "工作流变量“{{id}}”包含“{{sep}}”。内联智能体通过用“{{sep}}”连接路径段来编码引用,因此“{{id}}”在运行时不会与其他路径冲突。重命名变量以移除“{{sep}}”。"; | ||
| var conditionExpression_decisionWrapped_message = "“{{nodeLabel}}”上的条件无效:{{error}}"; | ||
| var conditionExpression_empty_message = "表达式为空"; | ||
| var conditionExpression_incomplete_message = "表达式不完整"; | ||
| var conditionExpression_invalid_message = "表达式无效"; | ||
| var conditionExpression_required_message = "条件表达式为必填项"; | ||
| var dataTransform_customScriptMissing_message = "“{{nodeLabel}}”的自定义脚本操作没有脚本"; | ||
| var dataTransform_filterMissingField_message = "“{{nodeLabel}}”的筛选条件缺少字段"; | ||
| var dataTransform_filterNoConditions_message = "“{{nodeLabel}}”筛选操作没有条件"; | ||
| var dataTransform_groupByAggMissingField_message = "“{{nodeLabel}}”的分组聚合缺少字段"; | ||
| var dataTransform_groupByAggMissingOutputName_message = "“{{nodeLabel}}”的分组聚合缺少输出名称"; | ||
| var dataTransform_groupByMissingField_message = "“{{nodeLabel}}”的分组操作缺少分组依据字段"; | ||
| var dataTransform_mapMissingField_message = "“{{nodeLabel}}”的映射字段映射缺少字段"; | ||
| var dataTransform_mapNoMappings_message = "“{{nodeLabel}}”的映射操作在未保留原始字段时需要至少一个字段映射"; | ||
| var dataTransform_missingCollection_message = "“{{nodeLabel}}”缺少集合变量"; | ||
| var dataTransform_noOperations_message = "“{{nodeLabel}}”没有配置任何操作"; | ||
| var escalation_appRequired_message = "{{label}}:操作应用程序为必填项"; | ||
| var escalation_nameRequired_message = "{{label}}:升级名称为必填项"; | ||
| var escalation_quickFormDuplicateFieldLabel_message = "{{label}}:多个字段被标记为“{{fieldLabel}}”— 升级任务将仅保留其中一个。请确保字段标签唯一"; | ||
| var escalation_recipientRequired_message = "{{label}}:升级处理人为必填项"; | ||
| var governance_hitlRequired_message = "智能体必须至少有一个升级资源或一个包含 HITL 操作的防护机制。规则由监管策略强制执行:{{policyName}}"; | ||
| var governance_maxIterationsExceeded_message = "最大迭代次数超过 {{maxIterations}}。规则由监管策略强制执行:{{policyName}}"; | ||
| var governance_maxTokensExceeded_message = "每次响应的最大令牌数超过 {{maxTokens}}。规则由监管策略强制执行:{{policyName}}"; | ||
| var governance_modelNotAvailable_message = "{{model}} 模型的使用违反监管策略 {{policyName}} 强制执行的限制"; | ||
| var governance_noAllowedModel_message = "未选择允许的模型,由监管策略强制执行:{{policyName}}"; | ||
| var governance_temperatureExceeded_message = "温度超过 {{maxTemperature}}。规则由监管策略强制执行:{{policyName}}"; | ||
| var hitlQuickForm_emptySchema_message = "快速表单必须至少包含一个字段"; | ||
| var hitlQuickForm_fieldLabelRequired_message = "字段标签为必填项"; | ||
| var outputMapping_missing_message = "“{{nodeLabel}}”缺少对“{{varId}}”的输出映射"; | ||
| var schemaValidator_genericKeyword_message = "“{{nodeLabel}}”上的“{{fieldName}}”:{{detail}}"; | ||
| var schemaValidator_invalidEnum_message = "“{{nodeLabel}}”上的“{{fieldName}}”必须是允许值之一"; | ||
| var schemaValidator_invalidField_message = "“{{nodeLabel}}”上的“{{fieldName}}”无效"; | ||
| var schemaValidator_invalidPattern_message = "“{{nodeLabel}}”上的“{{fieldName}}”格式无效"; | ||
| var schemaValidator_outOfRange_message = "“{{nodeLabel}}”上的“{{fieldName}}”{{detail}}"; | ||
| var schemaValidator_required_message = "“{{nodeLabel}}”上的“{{fieldName}}”为必填项"; | ||
| var schemaValidator_typeMismatch_message = "“{{nodeLabel}}”上的“{{fieldName}}”预期类型为 {{type}}"; | ||
| var schemaValidator_validation_genericError = "验证错误"; | ||
| var triggerRequired_message = "工作流必须至少有一个触发器节点"; | ||
| var zh_CN_default = { | ||
| agentInputRefs_nodeCollision_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_variableCollision_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_required_message, | ||
| dataTransform_customScriptMissing_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_noOperations_message, | ||
| escalation_appRequired_message, | ||
| escalation_nameRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_recipientRequired_message, | ||
| governance_hitlRequired_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_noAllowedModel_message, | ||
| governance_temperatureExceeded_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| outputMapping_missing_message, | ||
| schemaValidator_genericKeyword_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_validation_genericError, | ||
| triggerRequired_message | ||
| }; | ||
| export { | ||
| triggerRequired_message, | ||
| schemaValidator_validation_genericError, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_genericKeyword_message, | ||
| outputMapping_missing_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| governance_temperatureExceeded_message, | ||
| governance_noAllowedModel_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_hitlRequired_message, | ||
| escalation_recipientRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_nameRequired_message, | ||
| escalation_appRequired_message, | ||
| zh_CN_default as default, | ||
| dataTransform_noOperations_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_customScriptMissing_message, | ||
| conditionExpression_required_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| agentInputRefs_variableCollision_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_nodeCollision_message | ||
| }; | ||
| //# debugId=D9E47E320989E30064756E2164756E21 |
| import"./packager-tool-060a9knt.js"; | ||
| import"./packager-tool-wckvcay0.js"; | ||
| // ../../node_modules/@uipath/flow-converter/node_modules/@uipath/flow-schema/dist/zh-TW-Q5QSSTS6.js | ||
| var agentInputRefs_nodeCollision_message = "節點「{{id}}」包含「{{sep}}」。內嵌代理透過使用「{{sep}}」加入路徑區段來對參考進行編碼,因此「$vars.{{id}}.output.field」在執行階段可能會與另一個路徑發生衝突。重新命名節點以移除「{{sep}}」。"; | ||
| var agentInputRefs_reservedNamespace_message = "「$agent.{{ref}}」是流程內部代理執行階段命名空間,無法直接在提示詞中使用。請改用「$vars.{{ref}}」或「$metadata.{{ref}}」參考流程變數。"; | ||
| var agentInputRefs_unresolvedRef_message = "提示詞會參考「$vars.{{ref}}」但不存在工作流程變數或節點「{{rootSegment}}」。將變數/節點新增至流程或移除參考。"; | ||
| var agentInputRefs_variableCollision_message = "工作流程變數「{{id}}」包含「{{sep}}」。內嵌代理透過使用「{{sep}}」加入路徑區段來對參考進行編碼,因此「{{id}}」在執行階段可能會與另一個路徑發生衝突。重新命名變數以移除「{{sep}}」。"; | ||
| var conditionExpression_decisionWrapped_message = "「{{nodeLabel}}」中的條件無效: {{error}}"; | ||
| var conditionExpression_empty_message = "運算式為空白"; | ||
| var conditionExpression_incomplete_message = "運算式不完整"; | ||
| var conditionExpression_invalid_message = "運算式無效"; | ||
| var conditionExpression_required_message = "條件運算式為必填項"; | ||
| var dataTransform_customScriptMissing_message = "「{{nodeLabel}}」自訂指令碼作業沒有指令碼"; | ||
| var dataTransform_filterMissingField_message = "「{{nodeLabel}}」篩選條件缺少欄位"; | ||
| var dataTransform_filterNoConditions_message = "「{{nodeLabel}}」篩選作業沒有條件"; | ||
| var dataTransform_groupByAggMissingField_message = "依匯總分組的「{{nodeLabel}}」群組缺少欄位"; | ||
| var dataTransform_groupByAggMissingOutputName_message = "依匯總分組的「{{nodeLabel}}」群組缺少輸出名稱"; | ||
| var dataTransform_groupByMissingField_message = "依作業分組的「{{nodeLabel}}」群組依據作業缺少分組依據欄位"; | ||
| var dataTransform_mapMissingField_message = "「{{nodeLabel}}」映射欄位對應缺少一個欄位"; | ||
| var dataTransform_mapNoMappings_message = "未保留原始欄位時,「{{nodeLabel}}」映射作業至少需要一個欄位對應"; | ||
| var dataTransform_missingCollection_message = "「{{nodeLabel}}」缺少集合變數"; | ||
| var dataTransform_noOperations_message = "「{{nodeLabel}}」未配置作業"; | ||
| var escalation_appRequired_message = "{{label}}: 動作應用程式為必填項"; | ||
| var escalation_nameRequired_message = "{{label}}: 升級名稱為必填項"; | ||
| var escalation_quickFormDuplicateFieldLabel_message = "{{label}}: 多個欄位已標示為「{{fieldLabel}}」,升級任務將僅保留其中一個。將欄位標籤設為唯一"; | ||
| var escalation_recipientRequired_message = "{{label}}: 升級收件者為必填項"; | ||
| var governance_hitlRequired_message = "代理必須至少有一個升級資源或包含 HITL 動作的護欄。由以下監管原則強制執行規則: {{policyName}}"; | ||
| var governance_maxIterationsExceeded_message = "反覆運算次數上限超過 {{maxIterations}}。由以下監管原則強制執行的規則: {{policyName}}"; | ||
| var governance_maxTokensExceeded_message = "每個回應的權杖數量上限超過 {{maxTokens}}。由以下監管原則強制執行的規則: {{policyName}}"; | ||
| var governance_modelNotAvailable_message = "不允許使用 {{model}} 模型,由以下監管原則強制執行: {{policyName}}"; | ||
| var governance_noAllowedModel_message = "未選取允許的模型,由以下監管原則強制執行: {{policyName}}"; | ||
| var governance_temperatureExceeded_message = "溫度超過 {{maxTemperature}}。由以下監管原則強制執行的規則: {{policyName}}"; | ||
| var hitlQuickForm_emptySchema_message = "快速表單必須至少包含一個欄位"; | ||
| var hitlQuickForm_fieldLabelRequired_message = "「欄位標籤」為必填項"; | ||
| var outputMapping_missing_message = "「{{nodeLabel}}」缺少「{{varId}}」的輸出對應"; | ||
| var schemaValidator_genericKeyword_message = "「{{nodeLabel}}」上的「{{fieldName}}」: {{detail}}"; | ||
| var schemaValidator_invalidEnum_message = "「{{fieldName}}」上的「{{nodeLabel}}」必須是其中一個允許值"; | ||
| var schemaValidator_invalidField_message = "「{{fieldName}}」上的「{{nodeLabel}}」無效"; | ||
| var schemaValidator_invalidPattern_message = "「{{fieldName}}」上的「{{nodeLabel}}」的格式無效"; | ||
| var schemaValidator_outOfRange_message = "「{{nodeLabel}}」上的「{{fieldName}}」{{detail}}"; | ||
| var schemaValidator_required_message = "「{{fieldName}}」在「{{nodeLabel}}」上為必填項"; | ||
| var schemaValidator_typeMismatch_message = "「{{fieldName}}」上的「{{nodeLabel}}」應為{{type}}"; | ||
| var schemaValidator_validation_genericError = "驗證錯誤"; | ||
| var triggerRequired_message = "工作流程必須至少有一個觸發節點"; | ||
| var zh_TW_default = { | ||
| agentInputRefs_nodeCollision_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_variableCollision_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_required_message, | ||
| dataTransform_customScriptMissing_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_noOperations_message, | ||
| escalation_appRequired_message, | ||
| escalation_nameRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_recipientRequired_message, | ||
| governance_hitlRequired_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_noAllowedModel_message, | ||
| governance_temperatureExceeded_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| outputMapping_missing_message, | ||
| schemaValidator_genericKeyword_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_validation_genericError, | ||
| triggerRequired_message | ||
| }; | ||
| export { | ||
| triggerRequired_message, | ||
| schemaValidator_validation_genericError, | ||
| schemaValidator_typeMismatch_message, | ||
| schemaValidator_required_message, | ||
| schemaValidator_outOfRange_message, | ||
| schemaValidator_invalidPattern_message, | ||
| schemaValidator_invalidField_message, | ||
| schemaValidator_invalidEnum_message, | ||
| schemaValidator_genericKeyword_message, | ||
| outputMapping_missing_message, | ||
| hitlQuickForm_fieldLabelRequired_message, | ||
| hitlQuickForm_emptySchema_message, | ||
| governance_temperatureExceeded_message, | ||
| governance_noAllowedModel_message, | ||
| governance_modelNotAvailable_message, | ||
| governance_maxTokensExceeded_message, | ||
| governance_maxIterationsExceeded_message, | ||
| governance_hitlRequired_message, | ||
| escalation_recipientRequired_message, | ||
| escalation_quickFormDuplicateFieldLabel_message, | ||
| escalation_nameRequired_message, | ||
| escalation_appRequired_message, | ||
| zh_TW_default as default, | ||
| dataTransform_noOperations_message, | ||
| dataTransform_missingCollection_message, | ||
| dataTransform_mapNoMappings_message, | ||
| dataTransform_mapMissingField_message, | ||
| dataTransform_groupByMissingField_message, | ||
| dataTransform_groupByAggMissingOutputName_message, | ||
| dataTransform_groupByAggMissingField_message, | ||
| dataTransform_filterNoConditions_message, | ||
| dataTransform_filterMissingField_message, | ||
| dataTransform_customScriptMissing_message, | ||
| conditionExpression_required_message, | ||
| conditionExpression_invalid_message, | ||
| conditionExpression_incomplete_message, | ||
| conditionExpression_empty_message, | ||
| conditionExpression_decisionWrapped_message, | ||
| agentInputRefs_variableCollision_message, | ||
| agentInputRefs_unresolvedRef_message, | ||
| agentInputRefs_reservedNamespace_message, | ||
| agentInputRefs_nodeCollision_message | ||
| }; | ||
| //# debugId=C4B4B73FF6E06D5164756E2164756E21 |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 2 instances
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
18752851
-0.45%143
-6.54%459580
-0.14%48
23.08%