@uipath/maestro-tool 1.197.0 → 1.198.0-preview.100
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 +98 -23
- package/dist/tool.js +46365 -45665
- package/package.json +2 -2
package/dist/packager-tool.js
CHANGED
|
@@ -25047,6 +25047,7 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
25047
25047
|
return uriTokens.join("");
|
|
25048
25048
|
}
|
|
25049
25049
|
var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
25050
|
+
var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
|
|
25050
25051
|
function getParseError(parsed, matches) {
|
|
25051
25052
|
if (matches[2] !== undefined && parsed.path && parsed.path[0] !== "/") {
|
|
25052
25053
|
return 'URI path must start with "/" when authority is present.';
|
|
@@ -25076,6 +25077,11 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
25076
25077
|
uri2 = "//" + uri2;
|
|
25077
25078
|
}
|
|
25078
25079
|
}
|
|
25080
|
+
const authorityMatch = uri2.match(AUTHORITY_PREFIX);
|
|
25081
|
+
if (authorityMatch !== null && authorityMatch[1].indexOf("\\") !== -1) {
|
|
25082
|
+
parsed.error = "URI authority must not contain a literal backslash.";
|
|
25083
|
+
malformedAuthorityOrPort = true;
|
|
25084
|
+
}
|
|
25079
25085
|
const matches = uri2.match(URI_PARSE);
|
|
25080
25086
|
if (matches) {
|
|
25081
25087
|
parsed.scheme = matches[1];
|
|
@@ -25119,7 +25125,7 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
25119
25125
|
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
|
|
25120
25126
|
if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
25121
25127
|
try {
|
|
25122
|
-
parsed.host = URL
|
|
25128
|
+
parsed.host = new URL("http://" + parsed.host).hostname;
|
|
25123
25129
|
} catch (e) {
|
|
25124
25130
|
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
25125
25131
|
}
|
|
@@ -159765,6 +159771,10 @@ class ProjectTool {
|
|
|
159765
159771
|
this.logger.info("Pack operation is a noop");
|
|
159766
159772
|
return ToolResult.success();
|
|
159767
159773
|
}
|
|
159774
|
+
async cleanupAsync(_options, _cancellationToken) {
|
|
159775
|
+
this.logger.info("Cleanup operation is a noop");
|
|
159776
|
+
return ToolResult.success();
|
|
159777
|
+
}
|
|
159768
159778
|
async getUiProjectAsync(projectPath) {
|
|
159769
159779
|
const filePath = Path.join(projectPath, ProjectTool.ProjectFileName);
|
|
159770
159780
|
if (!await this.fileSystem.exists(filePath)) {
|
|
@@ -163942,7 +163952,7 @@ init_dist6();
|
|
|
163942
163952
|
// ../packager/packager-tool-flow/package.json
|
|
163943
163953
|
var package_default = {
|
|
163944
163954
|
name: "@uipath/packager-tool-flow",
|
|
163945
|
-
version: "1.
|
|
163955
|
+
version: "1.198.0-preview.100",
|
|
163946
163956
|
description: "UiPath Flow tool implementation",
|
|
163947
163957
|
type: "module",
|
|
163948
163958
|
exports: {
|
|
@@ -175885,10 +175895,14 @@ var PROCESS_NODE_PREFIXES = [
|
|
|
175885
175895
|
"uipath.core.agent.",
|
|
175886
175896
|
"uipath.core.api-workflow."
|
|
175887
175897
|
];
|
|
175888
|
-
var
|
|
175898
|
+
var CONNECTOR_TOOL_PREFIX = "uipath.agent.resource.tool.connector.";
|
|
175899
|
+
var UNRESOLVED_BINDING_PATTERN = /^<bindings\.[^>]+>$/;
|
|
175889
175900
|
function isProcessNode(nodeType) {
|
|
175890
175901
|
return PROCESS_NODE_PREFIXES.some((prefix2) => nodeType?.startsWith(prefix2));
|
|
175891
175902
|
}
|
|
175903
|
+
function isConnectorToolNode(nodeType) {
|
|
175904
|
+
return nodeType?.startsWith(CONNECTOR_TOOL_PREFIX) ?? false;
|
|
175905
|
+
}
|
|
175892
175906
|
function extractProcessGuid(nodeType) {
|
|
175893
175907
|
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
175908
|
if (!match) {
|
|
@@ -175940,13 +175954,50 @@ function resolveContextPlaceholders(context, storedName, storedFolder) {
|
|
|
175940
175954
|
}
|
|
175941
175955
|
}
|
|
175942
175956
|
}
|
|
175957
|
+
function createConnectorToolBindings(node, definition95) {
|
|
175958
|
+
const model = definition95.model;
|
|
175959
|
+
const detail = node.inputs?.detail;
|
|
175960
|
+
const connectionId = detail?.connectionId ?? "";
|
|
175961
|
+
const connectionFolderKey = detail?.connectionFolderKey ?? "";
|
|
175962
|
+
const values = model?.bindings?.values ?? [];
|
|
175963
|
+
const connValue = values.find((v2) => v2.propertyAttribute === "ConnectionId");
|
|
175964
|
+
const folderValue = values.find((v2) => v2.propertyAttribute === "FolderKey");
|
|
175965
|
+
const connectionBinding = createBinding2({
|
|
175966
|
+
name: connValue?.name ?? "connection",
|
|
175967
|
+
value: connectionId,
|
|
175968
|
+
resource: "Connection",
|
|
175969
|
+
resourceKey: connectionId,
|
|
175970
|
+
propertyAttribute: "ConnectionId"
|
|
175971
|
+
});
|
|
175972
|
+
const folderKeyBinding = createBinding2({
|
|
175973
|
+
name: folderValue?.name ?? "FolderKey",
|
|
175974
|
+
value: connectionFolderKey,
|
|
175975
|
+
resource: "Connection",
|
|
175976
|
+
resourceKey: connectionId,
|
|
175977
|
+
propertyAttribute: "FolderKey"
|
|
175978
|
+
});
|
|
175979
|
+
return { connectionBinding, folderKeyBinding };
|
|
175980
|
+
}
|
|
175981
|
+
function resolveConnectorContextPlaceholders(context, storedConnection, storedFolderKey) {
|
|
175982
|
+
if (!context)
|
|
175983
|
+
return;
|
|
175984
|
+
for (const entry of context) {
|
|
175985
|
+
if (typeof entry.value === "string" && UNRESOLVED_BINDING_PATTERN.test(entry.value)) {
|
|
175986
|
+
if (entry.name === "connection") {
|
|
175987
|
+
entry.default = storedConnection.default;
|
|
175988
|
+
entry.value = `=bindings.${storedConnection.id}`;
|
|
175989
|
+
} else if (entry.name === "folderKey") {
|
|
175990
|
+
entry.default = storedFolderKey.default;
|
|
175991
|
+
entry.value = `=bindings.${storedFolderKey.id}`;
|
|
175992
|
+
}
|
|
175993
|
+
}
|
|
175994
|
+
}
|
|
175995
|
+
}
|
|
175943
175996
|
function ensureProcessBindings(workflow, logger) {
|
|
175944
175997
|
const nodes = workflow.nodes ?? [];
|
|
175945
175998
|
const definitions = workflow.definitions ?? [];
|
|
175946
175999
|
let bindingsCreated = 0;
|
|
175947
176000
|
for (const node of nodes) {
|
|
175948
|
-
if (!isProcessNode(node.type))
|
|
175949
|
-
continue;
|
|
175950
176001
|
const nodeModel = node.model;
|
|
175951
176002
|
const defModel = definitions.find((d2) => d2.nodeType === node.type)?.model;
|
|
175952
176003
|
const hasUnresolved = [nodeModel, defModel].some((m2) => m2?.context?.some((entry) => typeof entry.value === "string" && UNRESOLVED_BINDING_PATTERN.test(entry.value)));
|
|
@@ -175955,25 +176006,49 @@ function ensureProcessBindings(workflow, logger) {
|
|
|
175955
176006
|
const definition95 = definitions.find((d2) => d2.nodeType === node.type);
|
|
175956
176007
|
if (!definition95)
|
|
175957
176008
|
continue;
|
|
175958
|
-
|
|
175959
|
-
|
|
175960
|
-
|
|
175961
|
-
|
|
175962
|
-
|
|
175963
|
-
|
|
176009
|
+
if (isProcessNode(node.type)) {
|
|
176010
|
+
let nameBinding;
|
|
176011
|
+
let folderBinding;
|
|
176012
|
+
try {
|
|
176013
|
+
({ nameBinding, folderBinding } = createProcessBindings(definition95));
|
|
176014
|
+
} catch (err2) {
|
|
176015
|
+
logger.warn(`Skipping binding resolution for node "${node.id}": ${err2 instanceof Error ? err2.message : String(err2)}`);
|
|
176016
|
+
continue;
|
|
176017
|
+
}
|
|
176018
|
+
const beforeCount = workflow.bindings?.length ?? 0;
|
|
176019
|
+
addBinding(workflow, nameBinding);
|
|
176020
|
+
addBinding(workflow, folderBinding);
|
|
176021
|
+
const storedBindings = workflow.bindings;
|
|
176022
|
+
const storedName = storedBindings.find((b2) => b2.resourceKey === nameBinding.resourceKey && b2.propertyAttribute === nameBinding.propertyAttribute) ?? nameBinding;
|
|
176023
|
+
const storedFolder = storedBindings.find((b2) => b2.resourceKey === folderBinding.resourceKey && b2.propertyAttribute === folderBinding.propertyAttribute) ?? folderBinding;
|
|
176024
|
+
resolveContextPlaceholders(nodeModel?.context, storedName, storedFolder);
|
|
176025
|
+
resolveContextPlaceholders(defModel?.context, storedName, storedFolder);
|
|
176026
|
+
const added = (workflow.bindings?.length ?? 0) - beforeCount;
|
|
176027
|
+
bindingsCreated += added;
|
|
176028
|
+
logger.info(`Resolved process bindings for node "${node.id}" (${node.type})`);
|
|
175964
176029
|
continue;
|
|
175965
176030
|
}
|
|
175966
|
-
|
|
175967
|
-
|
|
175968
|
-
|
|
175969
|
-
|
|
175970
|
-
|
|
175971
|
-
|
|
175972
|
-
|
|
175973
|
-
|
|
175974
|
-
|
|
175975
|
-
|
|
175976
|
-
|
|
176031
|
+
if (isConnectorToolNode(node.type)) {
|
|
176032
|
+
let connectionBinding;
|
|
176033
|
+
let folderKeyBinding;
|
|
176034
|
+
try {
|
|
176035
|
+
({ connectionBinding, folderKeyBinding } = createConnectorToolBindings(node, definition95));
|
|
176036
|
+
} catch (err2) {
|
|
176037
|
+
logger.warn(`Skipping connector binding resolution for node "${node.id}": ${err2 instanceof Error ? err2.message : String(err2)}`);
|
|
176038
|
+
continue;
|
|
176039
|
+
}
|
|
176040
|
+
const beforeCount = workflow.bindings?.length ?? 0;
|
|
176041
|
+
addBinding(workflow, connectionBinding);
|
|
176042
|
+
addBinding(workflow, folderKeyBinding);
|
|
176043
|
+
const storedBindings = workflow.bindings;
|
|
176044
|
+
const storedConn = storedBindings.find((b2) => b2.resourceKey === connectionBinding.resourceKey && b2.propertyAttribute === connectionBinding.propertyAttribute) ?? connectionBinding;
|
|
176045
|
+
const storedFk = storedBindings.find((b2) => b2.resourceKey === folderKeyBinding.resourceKey && b2.propertyAttribute === folderKeyBinding.propertyAttribute) ?? folderKeyBinding;
|
|
176046
|
+
resolveConnectorContextPlaceholders(nodeModel?.context, storedConn, storedFk);
|
|
176047
|
+
resolveConnectorContextPlaceholders(defModel?.context, storedConn, storedFk);
|
|
176048
|
+
const added = (workflow.bindings?.length ?? 0) - beforeCount;
|
|
176049
|
+
bindingsCreated += added;
|
|
176050
|
+
logger.info(`Resolved connector bindings for node "${node.id}" (${node.type})`);
|
|
176051
|
+
}
|
|
175977
176052
|
}
|
|
175978
176053
|
if (bindingsCreated > 0) {
|
|
175979
176054
|
logger.info(`ensureProcessBindings: created ${bindingsCreated} binding(s) for directly-authored nodes`);
|
|
@@ -178596,4 +178671,4 @@ toolsFactoryRepository2.registerProjectToolFactory(new BpmnToolFactory);
|
|
|
178596
178671
|
toolsFactoryRepository2.registerProjectToolFactory(new FlowToolFactory);
|
|
178597
178672
|
toolsFactoryRepository2.registerProjectToolFactory(new CaseToolFactory);
|
|
178598
178673
|
|
|
178599
|
-
//# debugId=
|
|
178674
|
+
//# debugId=34C1532B616A568964756E2164756E21
|