@uipath/maestro-tool 1.197.0 → 1.198.0-preview.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/packager-tool.js +91 -22
- package/dist/tool.js +1704 -414
- package/package.json +2 -2
package/dist/packager-tool.js
CHANGED
|
@@ -159765,6 +159765,10 @@ class ProjectTool {
|
|
|
159765
159765
|
this.logger.info("Pack operation is a noop");
|
|
159766
159766
|
return ToolResult.success();
|
|
159767
159767
|
}
|
|
159768
|
+
async cleanupAsync(_options, _cancellationToken) {
|
|
159769
|
+
this.logger.info("Cleanup operation is a noop");
|
|
159770
|
+
return ToolResult.success();
|
|
159771
|
+
}
|
|
159768
159772
|
async getUiProjectAsync(projectPath) {
|
|
159769
159773
|
const filePath = Path.join(projectPath, ProjectTool.ProjectFileName);
|
|
159770
159774
|
if (!await this.fileSystem.exists(filePath)) {
|
|
@@ -163942,7 +163946,7 @@ init_dist6();
|
|
|
163942
163946
|
// ../packager/packager-tool-flow/package.json
|
|
163943
163947
|
var package_default = {
|
|
163944
163948
|
name: "@uipath/packager-tool-flow",
|
|
163945
|
-
version: "1.
|
|
163949
|
+
version: "1.198.0-preview.80",
|
|
163946
163950
|
description: "UiPath Flow tool implementation",
|
|
163947
163951
|
type: "module",
|
|
163948
163952
|
exports: {
|
|
@@ -175885,10 +175889,14 @@ var PROCESS_NODE_PREFIXES = [
|
|
|
175885
175889
|
"uipath.core.agent.",
|
|
175886
175890
|
"uipath.core.api-workflow."
|
|
175887
175891
|
];
|
|
175888
|
-
var
|
|
175892
|
+
var CONNECTOR_TOOL_PREFIX = "uipath.agent.resource.tool.connector.";
|
|
175893
|
+
var UNRESOLVED_BINDING_PATTERN = /^<bindings\.[^>]+>$/;
|
|
175889
175894
|
function isProcessNode(nodeType) {
|
|
175890
175895
|
return PROCESS_NODE_PREFIXES.some((prefix2) => nodeType?.startsWith(prefix2));
|
|
175891
175896
|
}
|
|
175897
|
+
function isConnectorToolNode(nodeType) {
|
|
175898
|
+
return nodeType?.startsWith(CONNECTOR_TOOL_PREFIX) ?? false;
|
|
175899
|
+
}
|
|
175892
175900
|
function extractProcessGuid(nodeType) {
|
|
175893
175901
|
const match = nodeType.match(/^(?:uipath\.core\.rpa-workflow|uipath\.agent\.resource\.tool\.process|uipath\.core\.agent|uipath\.core\.api-workflow)\.([0-9a-f-]+)$/i);
|
|
175894
175902
|
if (!match) {
|
|
@@ -175940,13 +175948,50 @@ function resolveContextPlaceholders(context, storedName, storedFolder) {
|
|
|
175940
175948
|
}
|
|
175941
175949
|
}
|
|
175942
175950
|
}
|
|
175951
|
+
function createConnectorToolBindings(node, definition95) {
|
|
175952
|
+
const model = definition95.model;
|
|
175953
|
+
const detail = node.inputs?.detail;
|
|
175954
|
+
const connectionId = detail?.connectionId ?? "";
|
|
175955
|
+
const connectionFolderKey = detail?.connectionFolderKey ?? "";
|
|
175956
|
+
const values = model?.bindings?.values ?? [];
|
|
175957
|
+
const connValue = values.find((v2) => v2.propertyAttribute === "ConnectionId");
|
|
175958
|
+
const folderValue = values.find((v2) => v2.propertyAttribute === "FolderKey");
|
|
175959
|
+
const connectionBinding = createBinding2({
|
|
175960
|
+
name: connValue?.name ?? "connection",
|
|
175961
|
+
value: connectionId,
|
|
175962
|
+
resource: "Connection",
|
|
175963
|
+
resourceKey: connectionId,
|
|
175964
|
+
propertyAttribute: "ConnectionId"
|
|
175965
|
+
});
|
|
175966
|
+
const folderKeyBinding = createBinding2({
|
|
175967
|
+
name: folderValue?.name ?? "FolderKey",
|
|
175968
|
+
value: connectionFolderKey,
|
|
175969
|
+
resource: "Connection",
|
|
175970
|
+
resourceKey: connectionId,
|
|
175971
|
+
propertyAttribute: "FolderKey"
|
|
175972
|
+
});
|
|
175973
|
+
return { connectionBinding, folderKeyBinding };
|
|
175974
|
+
}
|
|
175975
|
+
function resolveConnectorContextPlaceholders(context, storedConnection, storedFolderKey) {
|
|
175976
|
+
if (!context)
|
|
175977
|
+
return;
|
|
175978
|
+
for (const entry of context) {
|
|
175979
|
+
if (typeof entry.value === "string" && UNRESOLVED_BINDING_PATTERN.test(entry.value)) {
|
|
175980
|
+
if (entry.name === "connection") {
|
|
175981
|
+
entry.default = storedConnection.default;
|
|
175982
|
+
entry.value = `=bindings.${storedConnection.id}`;
|
|
175983
|
+
} else if (entry.name === "folderKey") {
|
|
175984
|
+
entry.default = storedFolderKey.default;
|
|
175985
|
+
entry.value = `=bindings.${storedFolderKey.id}`;
|
|
175986
|
+
}
|
|
175987
|
+
}
|
|
175988
|
+
}
|
|
175989
|
+
}
|
|
175943
175990
|
function ensureProcessBindings(workflow, logger) {
|
|
175944
175991
|
const nodes = workflow.nodes ?? [];
|
|
175945
175992
|
const definitions = workflow.definitions ?? [];
|
|
175946
175993
|
let bindingsCreated = 0;
|
|
175947
175994
|
for (const node of nodes) {
|
|
175948
|
-
if (!isProcessNode(node.type))
|
|
175949
|
-
continue;
|
|
175950
175995
|
const nodeModel = node.model;
|
|
175951
175996
|
const defModel = definitions.find((d2) => d2.nodeType === node.type)?.model;
|
|
175952
175997
|
const hasUnresolved = [nodeModel, defModel].some((m2) => m2?.context?.some((entry) => typeof entry.value === "string" && UNRESOLVED_BINDING_PATTERN.test(entry.value)));
|
|
@@ -175955,25 +176000,49 @@ function ensureProcessBindings(workflow, logger) {
|
|
|
175955
176000
|
const definition95 = definitions.find((d2) => d2.nodeType === node.type);
|
|
175956
176001
|
if (!definition95)
|
|
175957
176002
|
continue;
|
|
175958
|
-
|
|
175959
|
-
|
|
175960
|
-
|
|
175961
|
-
|
|
175962
|
-
|
|
175963
|
-
|
|
176003
|
+
if (isProcessNode(node.type)) {
|
|
176004
|
+
let nameBinding;
|
|
176005
|
+
let folderBinding;
|
|
176006
|
+
try {
|
|
176007
|
+
({ nameBinding, folderBinding } = createProcessBindings(definition95));
|
|
176008
|
+
} catch (err2) {
|
|
176009
|
+
logger.warn(`Skipping binding resolution for node "${node.id}": ${err2 instanceof Error ? err2.message : String(err2)}`);
|
|
176010
|
+
continue;
|
|
176011
|
+
}
|
|
176012
|
+
const beforeCount = workflow.bindings?.length ?? 0;
|
|
176013
|
+
addBinding(workflow, nameBinding);
|
|
176014
|
+
addBinding(workflow, folderBinding);
|
|
176015
|
+
const storedBindings = workflow.bindings;
|
|
176016
|
+
const storedName = storedBindings.find((b2) => b2.resourceKey === nameBinding.resourceKey && b2.propertyAttribute === nameBinding.propertyAttribute) ?? nameBinding;
|
|
176017
|
+
const storedFolder = storedBindings.find((b2) => b2.resourceKey === folderBinding.resourceKey && b2.propertyAttribute === folderBinding.propertyAttribute) ?? folderBinding;
|
|
176018
|
+
resolveContextPlaceholders(nodeModel?.context, storedName, storedFolder);
|
|
176019
|
+
resolveContextPlaceholders(defModel?.context, storedName, storedFolder);
|
|
176020
|
+
const added = (workflow.bindings?.length ?? 0) - beforeCount;
|
|
176021
|
+
bindingsCreated += added;
|
|
176022
|
+
logger.info(`Resolved process bindings for node "${node.id}" (${node.type})`);
|
|
175964
176023
|
continue;
|
|
175965
176024
|
}
|
|
175966
|
-
|
|
175967
|
-
|
|
175968
|
-
|
|
175969
|
-
|
|
175970
|
-
|
|
175971
|
-
|
|
175972
|
-
|
|
175973
|
-
|
|
175974
|
-
|
|
175975
|
-
|
|
175976
|
-
|
|
176025
|
+
if (isConnectorToolNode(node.type)) {
|
|
176026
|
+
let connectionBinding;
|
|
176027
|
+
let folderKeyBinding;
|
|
176028
|
+
try {
|
|
176029
|
+
({ connectionBinding, folderKeyBinding } = createConnectorToolBindings(node, definition95));
|
|
176030
|
+
} catch (err2) {
|
|
176031
|
+
logger.warn(`Skipping connector binding resolution for node "${node.id}": ${err2 instanceof Error ? err2.message : String(err2)}`);
|
|
176032
|
+
continue;
|
|
176033
|
+
}
|
|
176034
|
+
const beforeCount = workflow.bindings?.length ?? 0;
|
|
176035
|
+
addBinding(workflow, connectionBinding);
|
|
176036
|
+
addBinding(workflow, folderKeyBinding);
|
|
176037
|
+
const storedBindings = workflow.bindings;
|
|
176038
|
+
const storedConn = storedBindings.find((b2) => b2.resourceKey === connectionBinding.resourceKey && b2.propertyAttribute === connectionBinding.propertyAttribute) ?? connectionBinding;
|
|
176039
|
+
const storedFk = storedBindings.find((b2) => b2.resourceKey === folderKeyBinding.resourceKey && b2.propertyAttribute === folderKeyBinding.propertyAttribute) ?? folderKeyBinding;
|
|
176040
|
+
resolveConnectorContextPlaceholders(nodeModel?.context, storedConn, storedFk);
|
|
176041
|
+
resolveConnectorContextPlaceholders(defModel?.context, storedConn, storedFk);
|
|
176042
|
+
const added = (workflow.bindings?.length ?? 0) - beforeCount;
|
|
176043
|
+
bindingsCreated += added;
|
|
176044
|
+
logger.info(`Resolved connector bindings for node "${node.id}" (${node.type})`);
|
|
176045
|
+
}
|
|
175977
176046
|
}
|
|
175978
176047
|
if (bindingsCreated > 0) {
|
|
175979
176048
|
logger.info(`ensureProcessBindings: created ${bindingsCreated} binding(s) for directly-authored nodes`);
|
|
@@ -178596,4 +178665,4 @@ toolsFactoryRepository2.registerProjectToolFactory(new BpmnToolFactory);
|
|
|
178596
178665
|
toolsFactoryRepository2.registerProjectToolFactory(new FlowToolFactory);
|
|
178597
178666
|
toolsFactoryRepository2.registerProjectToolFactory(new CaseToolFactory);
|
|
178598
178667
|
|
|
178599
|
-
//# debugId=
|
|
178668
|
+
//# debugId=C44479D3AD10B84164756E2164756E21
|