@uipath/flow-tool 1.197.0 → 1.198.0-preview.81
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/init.js +117 -26
- package/dist/packager-tool.js +91 -22
- package/dist/services/flow-eval-file-store.d.ts +11 -0
- package/dist/services/flow-migration-check.d.ts +51 -0
- package/dist/services/flow-validate-service.d.ts +12 -0
- package/dist/services/packaging-utils.d.ts +25 -1
- package/dist/tool.js +1699 -381
- package/dist/validation.js +1229 -1052
- package/package.json +2 -2
package/dist/tool.js
CHANGED
|
@@ -70711,6 +70711,10 @@ class ProjectTool {
|
|
|
70711
70711
|
this.logger.info("Pack operation is a noop");
|
|
70712
70712
|
return ToolResult.success();
|
|
70713
70713
|
}
|
|
70714
|
+
async cleanupAsync(_options, _cancellationToken) {
|
|
70715
|
+
this.logger.info("Cleanup operation is a noop");
|
|
70716
|
+
return ToolResult.success();
|
|
70717
|
+
}
|
|
70714
70718
|
async getUiProjectAsync(projectPath) {
|
|
70715
70719
|
const filePath = Path.join(projectPath, ProjectTool.ProjectFileName);
|
|
70716
70720
|
if (!await this.fileSystem.exists(filePath)) {
|
|
@@ -182187,6 +182191,7 @@ __export(exports_node, {
|
|
|
182187
182191
|
ProjectPackager: () => ProjectPackager,
|
|
182188
182192
|
ProjectPackOptions: () => ProjectPackOptions,
|
|
182189
182193
|
ProjectLoader: () => ProjectLoader,
|
|
182194
|
+
ProjectCleanupOptions: () => ProjectCleanupOptions,
|
|
182190
182195
|
ProjectBuildOptionsValidator: () => ProjectBuildOptionsValidator,
|
|
182191
182196
|
ProjectBuildOptions: () => ProjectBuildOptions,
|
|
182192
182197
|
PackagerParametersValidator: () => PackagerParametersValidator,
|
|
@@ -182678,18 +182683,18 @@ function getOutputFormat2() {
|
|
|
182678
182683
|
function getOutputFilter2() {
|
|
182679
182684
|
return filterSlot2.get();
|
|
182680
182685
|
}
|
|
182681
|
-
function
|
|
182686
|
+
function isRecord5(value) {
|
|
182682
182687
|
return value !== null && typeof value === "object";
|
|
182683
182688
|
}
|
|
182684
182689
|
function stringField2(value, field) {
|
|
182685
|
-
if (!
|
|
182690
|
+
if (!isRecord5(value)) {
|
|
182686
182691
|
return;
|
|
182687
182692
|
}
|
|
182688
182693
|
const raw = value[field];
|
|
182689
182694
|
return typeof raw === "string" ? raw : undefined;
|
|
182690
182695
|
}
|
|
182691
182696
|
function numberField2(value, field) {
|
|
182692
|
-
if (!
|
|
182697
|
+
if (!isRecord5(value)) {
|
|
182693
182698
|
return;
|
|
182694
182699
|
}
|
|
182695
182700
|
const raw = value[field];
|
|
@@ -182721,7 +182726,7 @@ function isCancellationError2(error95, exitCode, pollSignal) {
|
|
|
182721
182726
|
if (exitCode === 130) {
|
|
182722
182727
|
return true;
|
|
182723
182728
|
}
|
|
182724
|
-
if (!
|
|
182729
|
+
if (!isRecord5(error95)) {
|
|
182725
182730
|
return false;
|
|
182726
182731
|
}
|
|
182727
182732
|
if (numberField2(error95, "exitCode") === 130) {
|
|
@@ -183702,32 +183707,6 @@ function exitCodeFromProcess2(fallback) {
|
|
|
183702
183707
|
function isPreviewBuild2() {
|
|
183703
183708
|
return previewSlot2.get(false) ?? false;
|
|
183704
183709
|
}
|
|
183705
|
-
function splitUserAgentTokens2(value) {
|
|
183706
|
-
return value?.trim().split(/\s+/).filter(Boolean) ?? [];
|
|
183707
|
-
}
|
|
183708
|
-
function appendUserAgentToken2(value, userAgent) {
|
|
183709
|
-
const tokens = splitUserAgentTokens2(value);
|
|
183710
|
-
const seen = new Set(tokens);
|
|
183711
|
-
for (const token of splitUserAgentTokens2(userAgent)) {
|
|
183712
|
-
if (!seen.has(token)) {
|
|
183713
|
-
tokens.push(token);
|
|
183714
|
-
seen.add(token);
|
|
183715
|
-
}
|
|
183716
|
-
}
|
|
183717
|
-
return tokens.join(" ");
|
|
183718
|
-
}
|
|
183719
|
-
function getEffectiveUserAgent2(userAgent) {
|
|
183720
|
-
return appendUserAgentToken2(sdkUserAgentHostToken2.get(), userAgent);
|
|
183721
|
-
}
|
|
183722
|
-
function getHeaderName2(headers, headerName) {
|
|
183723
|
-
return Object.keys(headers).find((key) => key.toLowerCase() === headerName.toLowerCase());
|
|
183724
|
-
}
|
|
183725
|
-
function addSdkUserAgentHeader2(headers, userAgent) {
|
|
183726
|
-
const result = { ...headers ?? {} };
|
|
183727
|
-
const headerName = getHeaderName2(result, USER_AGENT_HEADER2);
|
|
183728
|
-
result[headerName ?? USER_AGENT_HEADER2] = appendUserAgentToken2(headerName ? result[headerName] : undefined, getEffectiveUserAgent2(userAgent));
|
|
183729
|
-
return result;
|
|
183730
|
-
}
|
|
183731
183710
|
|
|
183732
183711
|
class ConsoleTelemetryProvider2 {
|
|
183733
183712
|
async trackEvent(eventName, _properties) {
|
|
@@ -183847,6 +183826,7 @@ class BaseNodePackagerFactory {
|
|
|
183847
183826
|
class PackagerParameters {
|
|
183848
183827
|
inputPath;
|
|
183849
183828
|
downloadUrl;
|
|
183829
|
+
projectId;
|
|
183850
183830
|
logLevel = LogLevel.Warn;
|
|
183851
183831
|
outputPath;
|
|
183852
183832
|
targetFramework;
|
|
@@ -184186,6 +184166,7 @@ class PackagerParametersValidator {
|
|
|
184186
184166
|
class ProjectLoader {
|
|
184187
184167
|
fileSystem;
|
|
184188
184168
|
static WebAppManifestFileName = "webAppManifest.json";
|
|
184169
|
+
static ProjectJsonFileName = "project.json";
|
|
184189
184170
|
constructor(fileSystem) {
|
|
184190
184171
|
this.fileSystem = fileSystem;
|
|
184191
184172
|
}
|
|
@@ -184198,6 +184179,10 @@ class ProjectLoader {
|
|
|
184198
184179
|
if (projectFileExists) {
|
|
184199
184180
|
return await this.loadFromProjectFile(projectPath, projectFilePath);
|
|
184200
184181
|
}
|
|
184182
|
+
const projectJsonPath = Path.join(projectPath, ProjectLoader.ProjectJsonFileName);
|
|
184183
|
+
if (await this.fileSystem.exists(projectJsonPath)) {
|
|
184184
|
+
return await this.loadFromProjectFile(projectPath, projectJsonPath, true);
|
|
184185
|
+
}
|
|
184201
184186
|
const webAppManifestPath = Path.join(projectPath, ProjectLoader.WebAppManifestFileName);
|
|
184202
184187
|
const webAppManifestExists = await this.fileSystem.exists(webAppManifestPath);
|
|
184203
184188
|
if (webAppManifestExists) {
|
|
@@ -184205,11 +184190,12 @@ class ProjectLoader {
|
|
|
184205
184190
|
}
|
|
184206
184191
|
throw new Error(translate.t("solutionpackager.projectLoader.errors.noProjectFile", {
|
|
184207
184192
|
projectFile: ProjectTool.ProjectFileName,
|
|
184193
|
+
projectJsonFile: ProjectLoader.ProjectJsonFileName,
|
|
184208
184194
|
manifestFile: ProjectLoader.WebAppManifestFileName,
|
|
184209
184195
|
path: projectPath
|
|
184210
184196
|
}));
|
|
184211
184197
|
}
|
|
184212
|
-
async loadFromProjectFile(projectPath, projectFilePath) {
|
|
184198
|
+
async loadFromProjectFile(projectPath, projectFilePath, useProjectJson = false) {
|
|
184213
184199
|
const fileContent = await this.fileSystem.readFile(projectFilePath);
|
|
184214
184200
|
if (!fileContent) {
|
|
184215
184201
|
throw new Error(translate.t("solutionpackager.projectLoader.errors.readFailed", {
|
|
@@ -184218,7 +184204,8 @@ class ProjectLoader {
|
|
|
184218
184204
|
}
|
|
184219
184205
|
const json5 = typeof fileContent === "string" ? fileContent : new TextDecoder("utf-8").decode(fileContent);
|
|
184220
184206
|
const projectData = JSON.parse(json5);
|
|
184221
|
-
const
|
|
184207
|
+
const outputType = useProjectJson ? projectData.designOptions?.outputType : undefined;
|
|
184208
|
+
const projectType = outputType ?? (projectData?.ProjectType || projectData?.type);
|
|
184222
184209
|
if (!projectData || !projectType) {
|
|
184223
184210
|
throw new Error(translate.t("solutionpackager.projectLoader.errors.invalidProject", {
|
|
184224
184211
|
path: projectFilePath
|
|
@@ -184311,6 +184298,12 @@ class ProjectToolExecutor {
|
|
|
184311
184298
|
projectType: project.Type
|
|
184312
184299
|
}));
|
|
184313
184300
|
}
|
|
184301
|
+
async cleanupAsync(options, project, context, cancellationToken) {
|
|
184302
|
+
return await this.executeToolOperationAsync(project, context, (tool) => this.telemetry.trackDependencyOperation("ProjectPackager.Tool.Cleanup", project.Type, async () => tool.cleanupAsync(options, cancellationToken), {
|
|
184303
|
+
projectId: project.Id,
|
|
184304
|
+
projectType: project.Type
|
|
184305
|
+
}));
|
|
184306
|
+
}
|
|
184314
184307
|
async executeToolOperationAsync(project, context, operation) {
|
|
184315
184308
|
try {
|
|
184316
184309
|
const tool = await this.toolsFactory.createProjectToolAsync(project, context);
|
|
@@ -184421,7 +184414,8 @@ class ProjectPackager {
|
|
|
184421
184414
|
logLevel: options.logLevel,
|
|
184422
184415
|
outputPath: options.outputPath
|
|
184423
184416
|
};
|
|
184424
|
-
|
|
184417
|
+
const context = this.createOperationContext(options, uiPathProject);
|
|
184418
|
+
return await this.projectExecutor.restoreAsync(restoreOptions, uiPathProject, context, cancellationToken);
|
|
184425
184419
|
}, cancellationToken);
|
|
184426
184420
|
}
|
|
184427
184421
|
async validateProjectAsync(options, cancellationToken) {
|
|
@@ -184519,6 +184513,20 @@ class ProjectPackager {
|
|
|
184519
184513
|
}
|
|
184520
184514
|
});
|
|
184521
184515
|
}
|
|
184516
|
+
async cleanupProjectAsync(options, cancellationToken) {
|
|
184517
|
+
return await this.executeProjectOperationAsync(options, "Cleanup", "ProjectPackager.Cleanup", async (uiPathProject, loadedProject) => {
|
|
184518
|
+
const cleanupOptions = {
|
|
184519
|
+
projectPath: loadedProject.projectPath,
|
|
184520
|
+
excludeConfiguredSources: options.excludeConfiguredSources ?? false,
|
|
184521
|
+
nuGetSourcesConfigPath: options.nuGetSourcesConfigPath,
|
|
184522
|
+
logLevel: options.logLevel,
|
|
184523
|
+
dryRun: options.dryRun ?? false,
|
|
184524
|
+
skipImports: options.skipImports ?? false
|
|
184525
|
+
};
|
|
184526
|
+
const context = this.createOperationContext(options, uiPathProject);
|
|
184527
|
+
return await this.projectExecutor.cleanupAsync(cleanupOptions, uiPathProject, context, cancellationToken);
|
|
184528
|
+
}, cancellationToken);
|
|
184529
|
+
}
|
|
184522
184530
|
async getPackageStreamsAsync(result) {
|
|
184523
184531
|
if (!result.isSuccess) {
|
|
184524
184532
|
throw new Error(translate.t("solutionpackager.packager.errors.failedToGetStreams", {
|
|
@@ -184573,6 +184581,7 @@ class ProjectPackager {
|
|
|
184573
184581
|
id: crypto.randomUUID(),
|
|
184574
184582
|
projects: [uiPathProject],
|
|
184575
184583
|
downloadUrl: options.downloadUrl,
|
|
184584
|
+
projectId: options.projectId,
|
|
184576
184585
|
targetFramework: options.targetFramework ?? TargetFramework.Portable,
|
|
184577
184586
|
connection: options.connection,
|
|
184578
184587
|
logger: this.logger,
|
|
@@ -184752,6 +184761,58 @@ class NugetFeedPublisher {
|
|
|
184752
184761
|
}
|
|
184753
184762
|
}
|
|
184754
184763
|
}
|
|
184764
|
+
function singleton22(ctorOrName) {
|
|
184765
|
+
const name2 = typeof ctorOrName === "string" ? ctorOrName : ctorOrName.name;
|
|
184766
|
+
const key = Symbol.for(PREFIX22 + name2);
|
|
184767
|
+
return {
|
|
184768
|
+
get(fallback) {
|
|
184769
|
+
return _g22[key] ?? fallback;
|
|
184770
|
+
},
|
|
184771
|
+
set(value) {
|
|
184772
|
+
_g22[key] = value;
|
|
184773
|
+
},
|
|
184774
|
+
clear() {
|
|
184775
|
+
delete _g22[key];
|
|
184776
|
+
},
|
|
184777
|
+
getOrInit(factory, guard) {
|
|
184778
|
+
const existing = _g22[key];
|
|
184779
|
+
if (existing != null && typeof existing === "object") {
|
|
184780
|
+
if (!guard || guard(existing)) {
|
|
184781
|
+
return existing;
|
|
184782
|
+
}
|
|
184783
|
+
}
|
|
184784
|
+
const instance3 = factory();
|
|
184785
|
+
_g22[key] = instance3;
|
|
184786
|
+
return instance3;
|
|
184787
|
+
}
|
|
184788
|
+
};
|
|
184789
|
+
}
|
|
184790
|
+
function splitUserAgentTokens2(value) {
|
|
184791
|
+
return value?.trim().split(/\s+/).filter(Boolean) ?? [];
|
|
184792
|
+
}
|
|
184793
|
+
function appendUserAgentToken2(value, userAgent) {
|
|
184794
|
+
const tokens = splitUserAgentTokens2(value);
|
|
184795
|
+
const seen = new Set(tokens);
|
|
184796
|
+
for (const token of splitUserAgentTokens2(userAgent)) {
|
|
184797
|
+
if (!seen.has(token)) {
|
|
184798
|
+
tokens.push(token);
|
|
184799
|
+
seen.add(token);
|
|
184800
|
+
}
|
|
184801
|
+
}
|
|
184802
|
+
return tokens.join(" ");
|
|
184803
|
+
}
|
|
184804
|
+
function getEffectiveUserAgent2(userAgent) {
|
|
184805
|
+
return appendUserAgentToken2(sdkUserAgentHostToken22.get(), userAgent);
|
|
184806
|
+
}
|
|
184807
|
+
function getHeaderName2(headers, headerName) {
|
|
184808
|
+
return Object.keys(headers).find((key) => key.toLowerCase() === headerName.toLowerCase());
|
|
184809
|
+
}
|
|
184810
|
+
function addSdkUserAgentHeader2(headers, userAgent) {
|
|
184811
|
+
const result = { ...headers ?? {} };
|
|
184812
|
+
const headerName = getHeaderName2(result, USER_AGENT_HEADER2);
|
|
184813
|
+
result[headerName ?? USER_AGENT_HEADER2] = appendUserAgentToken2(headerName ? result[headerName] : undefined, getEffectiveUserAgent2(userAgent));
|
|
184814
|
+
return result;
|
|
184815
|
+
}
|
|
184755
184816
|
|
|
184756
184817
|
class OrchestratorFeedsService {
|
|
184757
184818
|
logger;
|
|
@@ -187212,7 +187273,7 @@ var de_default10, en4, es_default10, es_MX_default6, fr_default10, ja_default10,
|
|
|
187212
187273
|
}, __toESM22 = (mod22, isNodeMode, target) => (target = mod22 != null ? __create22(__getProtoOf22(mod22)) : {}, __copyProps2(isNodeMode || !mod22 || !mod22.__esModule ? __defProp22(target, "default", {
|
|
187213
187274
|
value: mod22,
|
|
187214
187275
|
enumerable: true
|
|
187215
|
-
}) : target, mod22)), require_common2, require_exception2, require_snippet2, require_type2, require_schema2, require_str2, require_seq2, require_map3, require_failsafe2, require_null2, require_bool2, require_int2, require_float2, require_json2, require_core4, require_timestamp2, require_merge3, require_binary2, require_omap2, require_pairs3, require_set2, require_default2, require_loader2, require_dumper2, import_js_yaml2, Type2, Schema2, FAILSAFE_SCHEMA2, JSON_SCHEMA2, CORE_SCHEMA2, DEFAULT_SCHEMA2, load2, loadAll2, dump2, YAMLException2, types4, safeLoad2, safeLoadAll2, safeDump2, index_vite_proxy_tmp_default2, logFilePathSlot2, LogLevel3, DEFAULT_LOG_LEVEL2 = 3, SimpleLogger2, loggerSingleton2, logger3, formatSlot2, formatExplicitSlot2, filterSlot2, recordedFailureSlot2, AUTH_ERROR_CODES2, VALIDATION_ERROR_CODES2, NETWORK_HTTP_ERROR_CODES2, TIMEOUT_ERROR_CODES2, NETWORK_OS_ERROR_CODES2, TIMEOUT_OS_ERROR_CODES2, TLS_ERROR_CODES22, MISSING_DEPENDENCY_CODES2, INTERNAL_ERROR_NAMES2, CommonTelemetryEvents2, KNOWN_AGENTS2, LOCAL_HOSTS2, authSignalSlot2, isTruthy2 = (value) => value !== undefined && value !== "" && value !== "0" && value.toLowerCase() !== "false", isEqual2 = (value, expected) => value?.toLowerCase() === expected, CI_SIGNATURES2, TELEMETRY_SESSION_ID_ENV2 = "UIPATH_SESSION_ID", TELEMETRY_SESSION_ID_PROPERTY2 = "session_id", telemetrySessionIdSlot2, telemetryPropsSlot2, providerSlot2, telemetryInstanceSlot2, DEFAULT_AI_CONNECTION_STRING2, _localTelemetryInstance2, telemetry2, CLI_ERROR_CODES2, RETRY_HINTS2, RESULTS2, EXIT_CODES2, FilterEvaluationError2, OutputFormatter2, LEGACY_SKILL_NAMESPACE2 = "uipath:", MAX_SKILL_NAME_LENGTH2 = 80, SKILL_NAME_PATTERN2, SKILL_ATTRIBUTION2, KNOWN_SKILL_NAMES2, COMMAND_ATTRIBUTION2, REDACTED2 = "[REDACTED]", MAX_VALUE_LENGTH2 = 200, SENSITIVE_NAME_TOKENS2, SENSITIVE_KEY_PREFIXES2, UUID_PATTERN3, EMAIL_PATTERN2, JWT_PATTERN2, LONG_TOKEN_PATTERN2, USER_HOME_PATTERN2, URL_PATTERN2, URL_TRAILING_PUNCT2, pollSignalSlot2, cliErrorCodeValues2, retryHintValues2, guardInstalledSlot2, savedOriginalsSlot2, DEFAULT_AUTH_TIMEOUT_MS3, modeSlot2, PollOutcome2, REASON_BY_OUTCOME2, TERMINAL_STATUSES2, FAILURE_STATUSES2, previewSlot2, ScreenLogger2,
|
|
187276
|
+
}) : target, mod22)), require_common2, require_exception2, require_snippet2, require_type2, require_schema2, require_str2, require_seq2, require_map3, require_failsafe2, require_null2, require_bool2, require_int2, require_float2, require_json2, require_core4, require_timestamp2, require_merge3, require_binary2, require_omap2, require_pairs3, require_set2, require_default2, require_loader2, require_dumper2, import_js_yaml2, Type2, Schema2, FAILSAFE_SCHEMA2, JSON_SCHEMA2, CORE_SCHEMA2, DEFAULT_SCHEMA2, load2, loadAll2, dump2, YAMLException2, types4, safeLoad2, safeLoadAll2, safeDump2, index_vite_proxy_tmp_default2, logFilePathSlot2, LogLevel3, DEFAULT_LOG_LEVEL2 = 3, SimpleLogger2, loggerSingleton2, logger3, formatSlot2, formatExplicitSlot2, helpRequestedSlot2, filterSlot2, recordedFailureSlot2, AUTH_ERROR_CODES2, VALIDATION_ERROR_CODES2, NETWORK_HTTP_ERROR_CODES2, TIMEOUT_ERROR_CODES2, NETWORK_OS_ERROR_CODES2, TIMEOUT_OS_ERROR_CODES2, TLS_ERROR_CODES22, MISSING_DEPENDENCY_CODES2, INTERNAL_ERROR_NAMES2, CommonTelemetryEvents2, KNOWN_AGENTS2, LOCAL_HOSTS2, authSignalSlot2, isTruthy2 = (value) => value !== undefined && value !== "" && value !== "0" && value.toLowerCase() !== "false", isEqual2 = (value, expected) => value?.toLowerCase() === expected, CI_SIGNATURES2, TELEMETRY_SESSION_ID_ENV2 = "UIPATH_SESSION_ID", TELEMETRY_SESSION_ID_PROPERTY2 = "session_id", telemetrySessionIdSlot2, telemetryPropsSlot2, providerSlot2, telemetryInstanceSlot2, DEFAULT_AI_CONNECTION_STRING2, _localTelemetryInstance2, telemetry2, CLI_ERROR_CODES2, RETRY_HINTS2, RESULTS2, EXIT_CODES2, FilterEvaluationError2, OutputFormatter2, LEGACY_SKILL_NAMESPACE2 = "uipath:", MAX_SKILL_NAME_LENGTH2 = 80, SKILL_NAME_PATTERN2, SKILL_ATTRIBUTION2, KNOWN_SKILL_NAMES2, COMMAND_ATTRIBUTION2, REDACTED2 = "[REDACTED]", MAX_VALUE_LENGTH2 = 200, SENSITIVE_NAME_TOKENS2, SENSITIVE_KEY_PREFIXES2, UUID_PATTERN3, EMAIL_PATTERN2, JWT_PATTERN2, LONG_TOKEN_PATTERN2, USER_HOME_PATTERN2, URL_PATTERN2, URL_TRAILING_PUNCT2, pollSignalSlot2, cliErrorCodeValues2, retryHintValues2, guardInstalledSlot2, savedOriginalsSlot2, DEFAULT_AUTH_TIMEOUT_MS3, modeSlot2, interactiveFlagSlot2, PollOutcome2, REASON_BY_OUTCOME2, TERMINAL_STATUSES2, FAILURE_STATUSES2, previewSlot2, ScreenLogger2, sdkUserAgentHostToken2, shippedKeysSlot2, factorySlot2, globalLogHandler = (logMessage) => {
|
|
187216
187277
|
const formattedMessage = logMessage.toFormattedString();
|
|
187217
187278
|
switch (logMessage.logLevel) {
|
|
187218
187279
|
case LogLevel.Debug:
|
|
@@ -187228,7 +187289,7 @@ var de_default10, en4, es_default10, es_MX_default6, fr_default10, ja_default10,
|
|
|
187228
187289
|
console.error(formattedMessage);
|
|
187229
187290
|
break;
|
|
187230
187291
|
}
|
|
187231
|
-
}, RulesConfigFileType, ProjectRestoreOptions, ProjectValidateOptions, ProjectBuildOptions, ProjectPackOptions, TelemetryNames, LICENSE_TYPES, DEFAULT_PROFILE_KEY = "StudioWeb", ACQUIRE_LICENSE_PATH = "/orchestrator_/api/StudioWeb/AcquireLicense", GOVERNANCE_SUBFOLDER = "governance", GOVERNANCE_FILE_NAME = "governance-policy.json", errorMessage2 = (error95) => error95 instanceof Error ? error95.message : String(error95), t14 = (key, params) => translate.t(`solutionpackager.governance.${key}`, params), ProjectBuildOptionsValidator, ProjectPackOptionsValidator, ProjectValidateOptionsValidator, NodeProjectPackagerFactory, PublishDestinationKind, NUGET_V3_PACKAGE_PUBLISH_TYPE = "PackagePublish/2.0.0", PackageFeedDtoPurposeEnum, PackageFeedDtoAuthenticationTypeEnum, ExtendedFolderDtoFeedTypeEnum, package_default6, HEADER_TENANT_ID = "X-UIPATH-TenantId", FEEDS_PATH = "/api/PackageFeeds/GetFeeds", FOLDERS_PATH = "/api/FoldersNavigation/GetAllFoldersForCurrentUser", SDK_USER_AGENT4, OrchestratorResponseError, HEADER_FOLDER_ID = "X-UIPATH-OrganizationUnitId", HEADER_TENANT_ID2 = "X-UIPATH-TenantId", HEADER_NUGET_API_KEY = "X-NuGet-ApiKey", ORCHESTRATOR_RELATIVE_URL = "/orchestrator_", PROCESSES_UPLOAD_PATH = "/odata/Processes/UiPath.Server.Configuration.OData.UploadPackage", LIBRARIES_UPLOAD_PATH = "/odata/Libraries/UiPath.Server.Configuration.OData.UploadPackage", NodeProjectPublisherFactory;
|
|
187292
|
+
}, RulesConfigFileType, ProjectRestoreOptions, ProjectValidateOptions, ProjectBuildOptions, ProjectCleanupOptions, ProjectPackOptions, TelemetryNames, LICENSE_TYPES, DEFAULT_PROFILE_KEY = "StudioWeb", ACQUIRE_LICENSE_PATH = "/orchestrator_/api/StudioWeb/AcquireLicense", GOVERNANCE_SUBFOLDER = "governance", GOVERNANCE_FILE_NAME = "governance-policy.json", errorMessage2 = (error95) => error95 instanceof Error ? error95.message : String(error95), t14 = (key, params) => translate.t(`solutionpackager.governance.${key}`, params), ProjectBuildOptionsValidator, ProjectPackOptionsValidator, ProjectValidateOptionsValidator, NodeProjectPackagerFactory, PublishDestinationKind, NUGET_V3_PACKAGE_PUBLISH_TYPE = "PackagePublish/2.0.0", PackageFeedDtoPurposeEnum, PackageFeedDtoAuthenticationTypeEnum, ExtendedFolderDtoFeedTypeEnum, PREFIX22 = "@uipath/common/", _g22, telemetryPropsSlot22, USER_AGENT_HEADER2 = "User-Agent", sdkUserAgentHostToken22, package_default6, HEADER_TENANT_ID = "X-UIPATH-TenantId", FEEDS_PATH = "/api/PackageFeeds/GetFeeds", FOLDERS_PATH = "/api/FoldersNavigation/GetAllFoldersForCurrentUser", SDK_USER_AGENT4, OrchestratorResponseError, HEADER_FOLDER_ID = "X-UIPATH-OrganizationUnitId", HEADER_TENANT_ID2 = "X-UIPATH-TenantId", HEADER_NUGET_API_KEY = "X-NuGet-ApiKey", ORCHESTRATOR_RELATIVE_URL = "/orchestrator_", PROCESSES_UPLOAD_PATH = "/odata/Processes/UiPath.Server.Configuration.OData.UploadPackage", LIBRARIES_UPLOAD_PATH = "/odata/Libraries/UiPath.Server.Configuration.OData.UploadPackage", NodeProjectPublisherFactory;
|
|
187232
187293
|
var init_node2 = __esm(() => {
|
|
187233
187294
|
init_dist3();
|
|
187234
187295
|
init_dist9();
|
|
@@ -187252,7 +187313,7 @@ var init_node2 = __esm(() => {
|
|
|
187252
187313
|
projectLoader: {
|
|
187253
187314
|
errors: {
|
|
187254
187315
|
pathRequired: "Project directory path is required",
|
|
187255
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
187316
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
187256
187317
|
readFailed: "Failed to read project file: {path}",
|
|
187257
187318
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
187258
187319
|
}
|
|
@@ -187333,7 +187394,7 @@ var init_node2 = __esm(() => {
|
|
|
187333
187394
|
projectLoader: {
|
|
187334
187395
|
errors: {
|
|
187335
187396
|
pathRequired: "Project directory path is required",
|
|
187336
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
187397
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
187337
187398
|
readFailed: "Failed to read project file: {path}",
|
|
187338
187399
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
187339
187400
|
}
|
|
@@ -187414,7 +187475,7 @@ var init_node2 = __esm(() => {
|
|
|
187414
187475
|
projectLoader: {
|
|
187415
187476
|
errors: {
|
|
187416
187477
|
pathRequired: "Project directory path is required",
|
|
187417
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
187478
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
187418
187479
|
readFailed: "Failed to read project file: {path}",
|
|
187419
187480
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
187420
187481
|
}
|
|
@@ -187495,7 +187556,7 @@ var init_node2 = __esm(() => {
|
|
|
187495
187556
|
projectLoader: {
|
|
187496
187557
|
errors: {
|
|
187497
187558
|
pathRequired: "Project directory path is required",
|
|
187498
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
187559
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
187499
187560
|
readFailed: "Failed to read project file: {path}",
|
|
187500
187561
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
187501
187562
|
}
|
|
@@ -187576,7 +187637,7 @@ var init_node2 = __esm(() => {
|
|
|
187576
187637
|
projectLoader: {
|
|
187577
187638
|
errors: {
|
|
187578
187639
|
pathRequired: "Project directory path is required",
|
|
187579
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
187640
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
187580
187641
|
readFailed: "Failed to read project file: {path}",
|
|
187581
187642
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
187582
187643
|
}
|
|
@@ -187657,7 +187718,7 @@ var init_node2 = __esm(() => {
|
|
|
187657
187718
|
projectLoader: {
|
|
187658
187719
|
errors: {
|
|
187659
187720
|
pathRequired: "Project directory path is required",
|
|
187660
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
187721
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
187661
187722
|
readFailed: "Failed to read project file: {path}",
|
|
187662
187723
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
187663
187724
|
}
|
|
@@ -187738,7 +187799,7 @@ var init_node2 = __esm(() => {
|
|
|
187738
187799
|
projectLoader: {
|
|
187739
187800
|
errors: {
|
|
187740
187801
|
pathRequired: "Project directory path is required",
|
|
187741
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
187802
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
187742
187803
|
readFailed: "Failed to read project file: {path}",
|
|
187743
187804
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
187744
187805
|
}
|
|
@@ -187819,7 +187880,7 @@ var init_node2 = __esm(() => {
|
|
|
187819
187880
|
projectLoader: {
|
|
187820
187881
|
errors: {
|
|
187821
187882
|
pathRequired: "Project directory path is required",
|
|
187822
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
187883
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
187823
187884
|
readFailed: "Failed to read project file: {path}",
|
|
187824
187885
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
187825
187886
|
}
|
|
@@ -187900,7 +187961,7 @@ var init_node2 = __esm(() => {
|
|
|
187900
187961
|
projectLoader: {
|
|
187901
187962
|
errors: {
|
|
187902
187963
|
pathRequired: "Project directory path is required",
|
|
187903
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
187964
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
187904
187965
|
readFailed: "Failed to read project file: {path}",
|
|
187905
187966
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
187906
187967
|
}
|
|
@@ -187981,7 +188042,7 @@ var init_node2 = __esm(() => {
|
|
|
187981
188042
|
projectLoader: {
|
|
187982
188043
|
errors: {
|
|
187983
188044
|
pathRequired: "Project directory path is required",
|
|
187984
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
188045
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
187985
188046
|
readFailed: "Failed to read project file: {path}",
|
|
187986
188047
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
187987
188048
|
}
|
|
@@ -188062,7 +188123,7 @@ var init_node2 = __esm(() => {
|
|
|
188062
188123
|
projectLoader: {
|
|
188063
188124
|
errors: {
|
|
188064
188125
|
pathRequired: "Project directory path is required",
|
|
188065
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
188126
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
188066
188127
|
readFailed: "Failed to read project file: {path}",
|
|
188067
188128
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
188068
188129
|
}
|
|
@@ -188143,7 +188204,7 @@ var init_node2 = __esm(() => {
|
|
|
188143
188204
|
projectLoader: {
|
|
188144
188205
|
errors: {
|
|
188145
188206
|
pathRequired: "Project directory path is required",
|
|
188146
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
188207
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
188147
188208
|
readFailed: "Failed to read project file: {path}",
|
|
188148
188209
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
188149
188210
|
}
|
|
@@ -188224,7 +188285,7 @@ var init_node2 = __esm(() => {
|
|
|
188224
188285
|
projectLoader: {
|
|
188225
188286
|
errors: {
|
|
188226
188287
|
pathRequired: "Project directory path is required",
|
|
188227
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
188288
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
188228
188289
|
readFailed: "Failed to read project file: {path}",
|
|
188229
188290
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
188230
188291
|
}
|
|
@@ -188305,7 +188366,7 @@ var init_node2 = __esm(() => {
|
|
|
188305
188366
|
projectLoader: {
|
|
188306
188367
|
errors: {
|
|
188307
188368
|
pathRequired: "Project directory path is required",
|
|
188308
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
188369
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
188309
188370
|
readFailed: "Failed to read project file: {path}",
|
|
188310
188371
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
188311
188372
|
}
|
|
@@ -188386,7 +188447,7 @@ var init_node2 = __esm(() => {
|
|
|
188386
188447
|
projectLoader: {
|
|
188387
188448
|
errors: {
|
|
188388
188449
|
pathRequired: "Project directory path is required",
|
|
188389
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
188450
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
188390
188451
|
readFailed: "Failed to read project file: {path}",
|
|
188391
188452
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
188392
188453
|
}
|
|
@@ -193732,6 +193793,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
193732
193793
|
logger3 = SimpleLogger2.getInstance();
|
|
193733
193794
|
formatSlot2 = singleton3("OutputFormat");
|
|
193734
193795
|
formatExplicitSlot2 = singleton3("OutputFormatExplicit");
|
|
193796
|
+
helpRequestedSlot2 = singleton3("HelpRequested");
|
|
193735
193797
|
filterSlot2 = singleton3("OutputFilter");
|
|
193736
193798
|
recordedFailureSlot2 = singleton3("CommandTelemetryFailure");
|
|
193737
193799
|
AUTH_ERROR_CODES2 = new Set([
|
|
@@ -193968,6 +194030,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
193968
194030
|
if (opts?.warning) {
|
|
193969
194031
|
data.Warning = opts.warning;
|
|
193970
194032
|
}
|
|
194033
|
+
if (opts?.pagination) {
|
|
194034
|
+
data.Pagination = opts.pagination;
|
|
194035
|
+
}
|
|
193971
194036
|
success5(data);
|
|
193972
194037
|
}
|
|
193973
194038
|
OutputFormatter22.emitList = emitList;
|
|
@@ -194187,6 +194252,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
194187
194252
|
savedOriginalsSlot2 = singleton3("ConsoleGuardOriginals");
|
|
194188
194253
|
DEFAULT_AUTH_TIMEOUT_MS3 = 5 * 60 * 1000;
|
|
194189
194254
|
modeSlot2 = singleton3("InteractivityMode");
|
|
194255
|
+
interactiveFlagSlot2 = singleton3("InteractiveFlag");
|
|
194190
194256
|
PollOutcome2 = {
|
|
194191
194257
|
Completed: "completed",
|
|
194192
194258
|
Timeout: "timeout",
|
|
@@ -194251,6 +194317,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
194251
194317
|
ProjectBuildOptions = class ProjectBuildOptions extends ProjectValidateOptions {
|
|
194252
194318
|
outputType;
|
|
194253
194319
|
};
|
|
194320
|
+
ProjectCleanupOptions = class ProjectCleanupOptions extends PackagerParameters {
|
|
194321
|
+
dryRun = false;
|
|
194322
|
+
skipImports = false;
|
|
194323
|
+
};
|
|
194254
194324
|
ProjectPackOptions = class ProjectPackOptions extends ProjectBuildOptions {
|
|
194255
194325
|
destinationPath;
|
|
194256
194326
|
package;
|
|
@@ -194262,10 +194332,12 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
194262
194332
|
TelemetryNames2["ProjectToolRestore"] = "ProjectPackager.Tool.Restore";
|
|
194263
194333
|
TelemetryNames2["ProjectToolValidate"] = "ProjectPackager.Tool.Validate";
|
|
194264
194334
|
TelemetryNames2["ProjectToolBuild"] = "ProjectPackager.Tool.Build";
|
|
194335
|
+
TelemetryNames2["ProjectToolCleanup"] = "ProjectPackager.Tool.Cleanup";
|
|
194265
194336
|
TelemetryNames2["ProjectPackagerPack"] = "ProjectPackager.Pack";
|
|
194266
194337
|
TelemetryNames2["ProjectPackagerRestore"] = "ProjectPackager.Restore";
|
|
194267
194338
|
TelemetryNames2["ProjectPackagerValidate"] = "ProjectPackager.Validate";
|
|
194268
194339
|
TelemetryNames2["ProjectPackagerBuild"] = "ProjectPackager.Build";
|
|
194340
|
+
TelemetryNames2["ProjectPackagerCleanup"] = "ProjectPackager.Cleanup";
|
|
194269
194341
|
TelemetryNames2["ProjectPackagerProjectLoaded"] = "ProjectPackager.ProjectLoaded";
|
|
194270
194342
|
})(TelemetryNames ||= {});
|
|
194271
194343
|
LICENSE_TYPES = {
|
|
@@ -194339,10 +194411,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
194339
194411
|
PersonalWorkspace: "PersonalWorkspace",
|
|
194340
194412
|
FolderHierarchy: "FolderHierarchy"
|
|
194341
194413
|
};
|
|
194414
|
+
_g22 = globalThis;
|
|
194415
|
+
telemetryPropsSlot22 = singleton22("TelemetryDefaultProps");
|
|
194416
|
+
sdkUserAgentHostToken22 = singleton22("SdkUserAgentHostToken");
|
|
194342
194417
|
package_default6 = {
|
|
194343
194418
|
name: "@uipath/project-packager",
|
|
194344
194419
|
license: "MIT",
|
|
194345
|
-
version: "1.
|
|
194420
|
+
version: "1.198.0-preview.81",
|
|
194346
194421
|
description: "UiPath Project Packager - core library for packing individual UiPath projects",
|
|
194347
194422
|
type: "module",
|
|
194348
194423
|
main: "./dist/index.js",
|
|
@@ -286218,7 +286293,7 @@ import"./packager-tool.js";
|
|
|
286218
286293
|
var package_default = {
|
|
286219
286294
|
name: "@uipath/flow-tool",
|
|
286220
286295
|
license: "MIT",
|
|
286221
|
-
version: "1.
|
|
286296
|
+
version: "1.198.0-preview.81",
|
|
286222
286297
|
description: "Create, debug, and run UiPath Flow projects and jobs.",
|
|
286223
286298
|
private: false,
|
|
286224
286299
|
repository: {
|
|
@@ -286344,8 +286419,15 @@ var TLS_ERROR_CODES = new Set([
|
|
|
286344
286419
|
var TLS_INSTRUCTIONS = "The server's TLS certificate could not be verified. Most often a " + "corporate proxy/firewall re-signs HTTPS with a root CA that Node does " + "not trust — set NODE_EXTRA_CA_CERTS to that CA's PEM file (and HTTPS_PROXY " + "if you connect through a proxy). If the certificate is instead expired or " + "its hostname does not match, fix the endpoint URL or the system clock. " + "Then retry.";
|
|
286345
286420
|
var NETWORK_INSTRUCTIONS = "Could not reach the UiPath service. Check your network connection and " + "VPN, confirm any HTTP_PROXY/HTTPS_PROXY/NO_PROXY settings are correct, " + "then retry.";
|
|
286346
286421
|
function describeConnectivityError(error) {
|
|
286347
|
-
|
|
286348
|
-
|
|
286422
|
+
const queue = [error];
|
|
286423
|
+
const seen = new Set;
|
|
286424
|
+
for (let steps = 0;queue.length > 0 && steps < 32; steps++) {
|
|
286425
|
+
const current = queue.shift();
|
|
286426
|
+
if (current === null || typeof current !== "object")
|
|
286427
|
+
continue;
|
|
286428
|
+
if (seen.has(current))
|
|
286429
|
+
continue;
|
|
286430
|
+
seen.add(current);
|
|
286349
286431
|
const cur = current;
|
|
286350
286432
|
const code = typeof cur.code === "string" ? cur.code : undefined;
|
|
286351
286433
|
const message = typeof cur.message === "string" ? cur.message : undefined;
|
|
@@ -286365,7 +286447,10 @@ function describeConnectivityError(error) {
|
|
|
286365
286447
|
instructions: NETWORK_INSTRUCTIONS
|
|
286366
286448
|
};
|
|
286367
286449
|
}
|
|
286368
|
-
|
|
286450
|
+
if (cur.cause !== undefined)
|
|
286451
|
+
queue.push(cur.cause);
|
|
286452
|
+
if (Array.isArray(cur.errors))
|
|
286453
|
+
queue.push(...cur.errors);
|
|
286369
286454
|
}
|
|
286370
286455
|
return;
|
|
286371
286456
|
}
|
|
@@ -291655,6 +291740,7 @@ function getLogFilePath() {
|
|
|
291655
291740
|
// ../common/src/output-format-context.ts
|
|
291656
291741
|
var formatSlot = singleton("OutputFormat");
|
|
291657
291742
|
var formatExplicitSlot = singleton("OutputFormatExplicit");
|
|
291743
|
+
var helpRequestedSlot = singleton("HelpRequested");
|
|
291658
291744
|
var filterSlot = singleton("OutputFilter");
|
|
291659
291745
|
function getOutputFormat() {
|
|
291660
291746
|
return formatSlot.get("json");
|
|
@@ -292722,6 +292808,9 @@ var OutputFormatter;
|
|
|
292722
292808
|
if (opts?.warning) {
|
|
292723
292809
|
data.Warning = opts.warning;
|
|
292724
292810
|
}
|
|
292811
|
+
if (opts?.pagination) {
|
|
292812
|
+
data.Pagination = opts.pagination;
|
|
292813
|
+
}
|
|
292725
292814
|
success(data);
|
|
292726
292815
|
}
|
|
292727
292816
|
OutputFormatter.emitList = emitList;
|
|
@@ -293236,6 +293325,7 @@ function instructionsFor(ctx, err) {
|
|
|
293236
293325
|
}
|
|
293237
293326
|
// ../common/src/interactivity-context.ts
|
|
293238
293327
|
var modeSlot = singleton("InteractivityMode");
|
|
293328
|
+
var interactiveFlagSlot = singleton("InteractiveFlag");
|
|
293239
293329
|
// ../common/src/option-aliases.ts
|
|
293240
293330
|
function warnDeprecatedOptionAlias(deprecatedFlag, preferredFlag) {
|
|
293241
293331
|
getOutputSink().writeErr(`[WARN] ${deprecatedFlag} is deprecated. Use ${preferredFlag} instead.
|
|
@@ -294236,7 +294326,7 @@ init_dist3();
|
|
|
294236
294326
|
// ../packager/packager-tool-flow/package.json
|
|
294237
294327
|
var package_default2 = {
|
|
294238
294328
|
name: "@uipath/packager-tool-flow",
|
|
294239
|
-
version: "1.
|
|
294329
|
+
version: "1.198.0-preview.81",
|
|
294240
294330
|
description: "UiPath Flow tool implementation",
|
|
294241
294331
|
type: "module",
|
|
294242
294332
|
exports: {
|
|
@@ -306126,10 +306216,14 @@ var PROCESS_NODE_PREFIXES = [
|
|
|
306126
306216
|
"uipath.core.agent.",
|
|
306127
306217
|
"uipath.core.api-workflow."
|
|
306128
306218
|
];
|
|
306129
|
-
var
|
|
306219
|
+
var CONNECTOR_TOOL_PREFIX = "uipath.agent.resource.tool.connector.";
|
|
306220
|
+
var UNRESOLVED_BINDING_PATTERN = /^<bindings\.[^>]+>$/;
|
|
306130
306221
|
function isProcessNode(nodeType) {
|
|
306131
306222
|
return PROCESS_NODE_PREFIXES.some((prefix2) => nodeType?.startsWith(prefix2));
|
|
306132
306223
|
}
|
|
306224
|
+
function isConnectorToolNode(nodeType) {
|
|
306225
|
+
return nodeType?.startsWith(CONNECTOR_TOOL_PREFIX) ?? false;
|
|
306226
|
+
}
|
|
306133
306227
|
function extractProcessGuid(nodeType) {
|
|
306134
306228
|
const match = nodeType.match(/^(?:uipath\.core\.rpa-workflow|uipath\.agent\.resource\.tool\.process|uipath\.core\.agent|uipath\.core\.api-workflow)\.([0-9a-f-]+)$/i);
|
|
306135
306229
|
if (!match) {
|
|
@@ -306181,13 +306275,50 @@ function resolveContextPlaceholders(context, storedName, storedFolder) {
|
|
|
306181
306275
|
}
|
|
306182
306276
|
}
|
|
306183
306277
|
}
|
|
306278
|
+
function createConnectorToolBindings(node2, definition95) {
|
|
306279
|
+
const model = definition95.model;
|
|
306280
|
+
const detail = node2.inputs?.detail;
|
|
306281
|
+
const connectionId = detail?.connectionId ?? "";
|
|
306282
|
+
const connectionFolderKey = detail?.connectionFolderKey ?? "";
|
|
306283
|
+
const values = model?.bindings?.values ?? [];
|
|
306284
|
+
const connValue = values.find((v2) => v2.propertyAttribute === "ConnectionId");
|
|
306285
|
+
const folderValue = values.find((v2) => v2.propertyAttribute === "FolderKey");
|
|
306286
|
+
const connectionBinding = createBinding({
|
|
306287
|
+
name: connValue?.name ?? "connection",
|
|
306288
|
+
value: connectionId,
|
|
306289
|
+
resource: "Connection",
|
|
306290
|
+
resourceKey: connectionId,
|
|
306291
|
+
propertyAttribute: "ConnectionId"
|
|
306292
|
+
});
|
|
306293
|
+
const folderKeyBinding = createBinding({
|
|
306294
|
+
name: folderValue?.name ?? "FolderKey",
|
|
306295
|
+
value: connectionFolderKey,
|
|
306296
|
+
resource: "Connection",
|
|
306297
|
+
resourceKey: connectionId,
|
|
306298
|
+
propertyAttribute: "FolderKey"
|
|
306299
|
+
});
|
|
306300
|
+
return { connectionBinding, folderKeyBinding };
|
|
306301
|
+
}
|
|
306302
|
+
function resolveConnectorContextPlaceholders(context, storedConnection, storedFolderKey) {
|
|
306303
|
+
if (!context)
|
|
306304
|
+
return;
|
|
306305
|
+
for (const entry of context) {
|
|
306306
|
+
if (typeof entry.value === "string" && UNRESOLVED_BINDING_PATTERN.test(entry.value)) {
|
|
306307
|
+
if (entry.name === "connection") {
|
|
306308
|
+
entry.default = storedConnection.default;
|
|
306309
|
+
entry.value = `=bindings.${storedConnection.id}`;
|
|
306310
|
+
} else if (entry.name === "folderKey") {
|
|
306311
|
+
entry.default = storedFolderKey.default;
|
|
306312
|
+
entry.value = `=bindings.${storedFolderKey.id}`;
|
|
306313
|
+
}
|
|
306314
|
+
}
|
|
306315
|
+
}
|
|
306316
|
+
}
|
|
306184
306317
|
function ensureProcessBindings(workflow, logger3) {
|
|
306185
306318
|
const nodes = workflow.nodes ?? [];
|
|
306186
306319
|
const definitions = workflow.definitions ?? [];
|
|
306187
306320
|
let bindingsCreated = 0;
|
|
306188
306321
|
for (const node2 of nodes) {
|
|
306189
|
-
if (!isProcessNode(node2.type))
|
|
306190
|
-
continue;
|
|
306191
306322
|
const nodeModel = node2.model;
|
|
306192
306323
|
const defModel = definitions.find((d2) => d2.nodeType === node2.type)?.model;
|
|
306193
306324
|
const hasUnresolved = [nodeModel, defModel].some((m2) => m2?.context?.some((entry) => typeof entry.value === "string" && UNRESOLVED_BINDING_PATTERN.test(entry.value)));
|
|
@@ -306196,25 +306327,49 @@ function ensureProcessBindings(workflow, logger3) {
|
|
|
306196
306327
|
const definition95 = definitions.find((d2) => d2.nodeType === node2.type);
|
|
306197
306328
|
if (!definition95)
|
|
306198
306329
|
continue;
|
|
306199
|
-
|
|
306200
|
-
|
|
306201
|
-
|
|
306202
|
-
|
|
306203
|
-
|
|
306204
|
-
|
|
306330
|
+
if (isProcessNode(node2.type)) {
|
|
306331
|
+
let nameBinding;
|
|
306332
|
+
let folderBinding;
|
|
306333
|
+
try {
|
|
306334
|
+
({ nameBinding, folderBinding } = createProcessBindings(definition95));
|
|
306335
|
+
} catch (err2) {
|
|
306336
|
+
logger3.warn(`Skipping binding resolution for node "${node2.id}": ${err2 instanceof Error ? err2.message : String(err2)}`);
|
|
306337
|
+
continue;
|
|
306338
|
+
}
|
|
306339
|
+
const beforeCount = workflow.bindings?.length ?? 0;
|
|
306340
|
+
addBinding(workflow, nameBinding);
|
|
306341
|
+
addBinding(workflow, folderBinding);
|
|
306342
|
+
const storedBindings = workflow.bindings;
|
|
306343
|
+
const storedName = storedBindings.find((b3) => b3.resourceKey === nameBinding.resourceKey && b3.propertyAttribute === nameBinding.propertyAttribute) ?? nameBinding;
|
|
306344
|
+
const storedFolder = storedBindings.find((b3) => b3.resourceKey === folderBinding.resourceKey && b3.propertyAttribute === folderBinding.propertyAttribute) ?? folderBinding;
|
|
306345
|
+
resolveContextPlaceholders(nodeModel?.context, storedName, storedFolder);
|
|
306346
|
+
resolveContextPlaceholders(defModel?.context, storedName, storedFolder);
|
|
306347
|
+
const added = (workflow.bindings?.length ?? 0) - beforeCount;
|
|
306348
|
+
bindingsCreated += added;
|
|
306349
|
+
logger3.info(`Resolved process bindings for node "${node2.id}" (${node2.type})`);
|
|
306205
306350
|
continue;
|
|
306206
306351
|
}
|
|
306207
|
-
|
|
306208
|
-
|
|
306209
|
-
|
|
306210
|
-
|
|
306211
|
-
|
|
306212
|
-
|
|
306213
|
-
|
|
306214
|
-
|
|
306215
|
-
|
|
306216
|
-
|
|
306217
|
-
|
|
306352
|
+
if (isConnectorToolNode(node2.type)) {
|
|
306353
|
+
let connectionBinding;
|
|
306354
|
+
let folderKeyBinding;
|
|
306355
|
+
try {
|
|
306356
|
+
({ connectionBinding, folderKeyBinding } = createConnectorToolBindings(node2, definition95));
|
|
306357
|
+
} catch (err2) {
|
|
306358
|
+
logger3.warn(`Skipping connector binding resolution for node "${node2.id}": ${err2 instanceof Error ? err2.message : String(err2)}`);
|
|
306359
|
+
continue;
|
|
306360
|
+
}
|
|
306361
|
+
const beforeCount = workflow.bindings?.length ?? 0;
|
|
306362
|
+
addBinding(workflow, connectionBinding);
|
|
306363
|
+
addBinding(workflow, folderKeyBinding);
|
|
306364
|
+
const storedBindings = workflow.bindings;
|
|
306365
|
+
const storedConn = storedBindings.find((b3) => b3.resourceKey === connectionBinding.resourceKey && b3.propertyAttribute === connectionBinding.propertyAttribute) ?? connectionBinding;
|
|
306366
|
+
const storedFk = storedBindings.find((b3) => b3.resourceKey === folderKeyBinding.resourceKey && b3.propertyAttribute === folderKeyBinding.propertyAttribute) ?? folderKeyBinding;
|
|
306367
|
+
resolveConnectorContextPlaceholders(nodeModel?.context, storedConn, storedFk);
|
|
306368
|
+
resolveConnectorContextPlaceholders(defModel?.context, storedConn, storedFk);
|
|
306369
|
+
const added = (workflow.bindings?.length ?? 0) - beforeCount;
|
|
306370
|
+
bindingsCreated += added;
|
|
306371
|
+
logger3.info(`Resolved connector bindings for node "${node2.id}" (${node2.type})`);
|
|
306372
|
+
}
|
|
306218
306373
|
}
|
|
306219
306374
|
if (bindingsCreated > 0) {
|
|
306220
306375
|
logger3.info(`ensureProcessBindings: created ${bindingsCreated} binding(s) for directly-authored nodes`);
|
|
@@ -311687,6 +311842,10 @@ var getAuthContext = async (options = {}) => {
|
|
|
311687
311842
|
tenantName
|
|
311688
311843
|
};
|
|
311689
311844
|
};
|
|
311845
|
+
|
|
311846
|
+
// ../auth/src/index.ts
|
|
311847
|
+
init_constants();
|
|
311848
|
+
|
|
311690
311849
|
// ../auth/src/interactive.ts
|
|
311691
311850
|
init_src();
|
|
311692
311851
|
|
|
@@ -337129,7 +337288,7 @@ class TextApiResponse {
|
|
|
337129
337288
|
var package_default3 = {
|
|
337130
337289
|
name: "@uipath/integrationservice-sdk",
|
|
337131
337290
|
license: "MIT",
|
|
337132
|
-
version: "1.
|
|
337291
|
+
version: "1.198.0-preview.81",
|
|
337133
337292
|
repository: {
|
|
337134
337293
|
type: "git",
|
|
337135
337294
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -342869,6 +343028,20 @@ var API_DOMAIN_MAP = new Map([
|
|
|
342869
343028
|
[SessionsApi, "connections"],
|
|
342870
343029
|
[ElementsApi, "elements"]
|
|
342871
343030
|
]);
|
|
343031
|
+
function baseApiClassName(name2) {
|
|
343032
|
+
let end = name2.length;
|
|
343033
|
+
while (end > 0 && name2[end - 1] >= "0" && name2[end - 1] <= "9") {
|
|
343034
|
+
end--;
|
|
343035
|
+
}
|
|
343036
|
+
return name2.slice(0, end);
|
|
343037
|
+
}
|
|
343038
|
+
var API_DOMAIN_BY_NAME = new Map([...API_DOMAIN_MAP].map(([ApiClass, domain5]) => [
|
|
343039
|
+
baseApiClassName(ApiClass.name),
|
|
343040
|
+
domain5
|
|
343041
|
+
]));
|
|
343042
|
+
function resolveApiDomain(ApiClass) {
|
|
343043
|
+
return API_DOMAIN_MAP.get(ApiClass) ?? API_DOMAIN_BY_NAME.get(baseApiClassName(ApiClass.name));
|
|
343044
|
+
}
|
|
342872
343045
|
async function getValidatedAuthContext(options) {
|
|
342873
343046
|
const ctx = await getAuthContext({
|
|
342874
343047
|
tenant: options?.tenant,
|
|
@@ -342905,7 +343078,7 @@ async function createElementsConfig(options) {
|
|
|
342905
343078
|
});
|
|
342906
343079
|
}
|
|
342907
343080
|
async function createApiClient(ApiClass, options) {
|
|
342908
|
-
const domain5 =
|
|
343081
|
+
const domain5 = resolveApiDomain(ApiClass);
|
|
342909
343082
|
if (!domain5) {
|
|
342910
343083
|
throw new Error(`Unknown API class: ${ApiClass.name}`);
|
|
342911
343084
|
}
|
|
@@ -344754,7 +344927,9 @@ var ENABLED_MANIFEST_FLAGS = new Set([
|
|
|
344754
344927
|
MANIFEST_FEATURE_FLAGS2.CONNECTOR_NODES,
|
|
344755
344928
|
MANIFEST_FEATURE_FLAGS2.EXTRACT_DOCUMENT,
|
|
344756
344929
|
MANIFEST_FEATURE_FLAGS2.HITL,
|
|
344757
|
-
MANIFEST_FEATURE_FLAGS2.LOOP_CONTAINER
|
|
344930
|
+
MANIFEST_FEATURE_FLAGS2.LOOP_CONTAINER,
|
|
344931
|
+
MANIFEST_FEATURE_FLAGS2.BATCH_TRANSFORM,
|
|
344932
|
+
MANIFEST_FEATURE_FLAGS2.SUMMARIZE
|
|
344758
344933
|
]);
|
|
344759
344934
|
async function pullRemoteNodes() {
|
|
344760
344935
|
const loginStatus2 = await getLoginStatusAsync();
|
|
@@ -345620,7 +345795,7 @@ class TextApiResponse2 {
|
|
|
345620
345795
|
var package_default4 = {
|
|
345621
345796
|
name: "@uipath/orchestrator-sdk",
|
|
345622
345797
|
license: "MIT",
|
|
345623
|
-
version: "1.
|
|
345798
|
+
version: "1.198.0",
|
|
345624
345799
|
repository: {
|
|
345625
345800
|
type: "git",
|
|
345626
345801
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -353750,6 +353925,65 @@ var registerSharedProcessesCommands = (program2, config5) => {
|
|
|
353750
353925
|
};
|
|
353751
353926
|
// src/services/packaging-utils.ts
|
|
353752
353927
|
init_dist2();
|
|
353928
|
+
|
|
353929
|
+
// src/services/flow-eval-file-store.ts
|
|
353930
|
+
async function ensureDirectory(fs9, path4) {
|
|
353931
|
+
if (await fs9.exists(path4)) {
|
|
353932
|
+
return;
|
|
353933
|
+
}
|
|
353934
|
+
const parent = fs9.path.dirname(path4);
|
|
353935
|
+
if (parent && parent !== path4 && !await fs9.exists(parent)) {
|
|
353936
|
+
await ensureDirectory(fs9, parent);
|
|
353937
|
+
}
|
|
353938
|
+
const [error95] = await catchError(fs9.mkdir(path4));
|
|
353939
|
+
if (error95 && !await fs9.exists(path4)) {
|
|
353940
|
+
throw error95;
|
|
353941
|
+
}
|
|
353942
|
+
}
|
|
353943
|
+
|
|
353944
|
+
class FlowEvalFileStore {
|
|
353945
|
+
fs;
|
|
353946
|
+
constructor(fs9) {
|
|
353947
|
+
this.fs = fs9;
|
|
353948
|
+
}
|
|
353949
|
+
async readJsonFiles(dir3) {
|
|
353950
|
+
const [readDirError, files] = await catchError(this.fs.readdir(dir3));
|
|
353951
|
+
if (readDirError) {
|
|
353952
|
+
return [];
|
|
353953
|
+
}
|
|
353954
|
+
const items = [];
|
|
353955
|
+
for (const file5 of files) {
|
|
353956
|
+
if (!file5.endsWith(".json")) {
|
|
353957
|
+
continue;
|
|
353958
|
+
}
|
|
353959
|
+
const filePath = this.fs.path.join(dir3, file5);
|
|
353960
|
+
const [readError, raw] = await catchError(this.fs.readFile(filePath, "utf-8"));
|
|
353961
|
+
if (readError) {
|
|
353962
|
+
throw new Error(`Failed to read JSON file "${filePath}": ${readError.message}`);
|
|
353963
|
+
}
|
|
353964
|
+
if (raw === null) {
|
|
353965
|
+
continue;
|
|
353966
|
+
}
|
|
353967
|
+
const [parseError, data] = catchError(() => JSON.parse(String(raw)));
|
|
353968
|
+
if (parseError) {
|
|
353969
|
+
throw new Error(`Invalid JSON in "${filePath}": ${parseError.message}`);
|
|
353970
|
+
}
|
|
353971
|
+
data.fileName = file5;
|
|
353972
|
+
items.push(data);
|
|
353973
|
+
}
|
|
353974
|
+
return items;
|
|
353975
|
+
}
|
|
353976
|
+
async writeJsonFile(path4, value) {
|
|
353977
|
+
await ensureDirectory(this.fs, this.fs.path.dirname(path4));
|
|
353978
|
+
await this.fs.writeFile(path4, `${JSON.stringify(value, null, 2)}
|
|
353979
|
+
`);
|
|
353980
|
+
}
|
|
353981
|
+
async remove(path4) {
|
|
353982
|
+
await this.fs.rm(path4);
|
|
353983
|
+
}
|
|
353984
|
+
}
|
|
353985
|
+
|
|
353986
|
+
// src/services/packaging-utils.ts
|
|
353753
353987
|
var AUTONOMOUS_AGENT_NODE_TYPE2 = "uipath.agent.autonomous";
|
|
353754
353988
|
var CONVERSATIONAL_AGENT_NODE_TYPE2 = "uipath.agent.conversational";
|
|
353755
353989
|
var INLINE_AGENT_TYPES = [
|
|
@@ -353787,6 +354021,110 @@ function fileNodesToPackagingNodes(nodes) {
|
|
|
353787
354021
|
...node2.model ? { model: node2.model } : {}
|
|
353788
354022
|
}));
|
|
353789
354023
|
}
|
|
354024
|
+
function isRecord2(value) {
|
|
354025
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
354026
|
+
}
|
|
354027
|
+
function toResourceList(value) {
|
|
354028
|
+
if (!Array.isArray(value))
|
|
354029
|
+
return;
|
|
354030
|
+
const resources = value.filter(isRecord2);
|
|
354031
|
+
return resources.length === value.length ? resources : undefined;
|
|
354032
|
+
}
|
|
354033
|
+
function normalizePackagingBindingsJson(value) {
|
|
354034
|
+
if (!isRecord2(value))
|
|
354035
|
+
return;
|
|
354036
|
+
const resources = toResourceList(value.resources);
|
|
354037
|
+
if (!resources)
|
|
354038
|
+
return;
|
|
354039
|
+
return {
|
|
354040
|
+
...value,
|
|
354041
|
+
version: typeof value.version === "string" ? value.version : "2.0",
|
|
354042
|
+
resources
|
|
354043
|
+
};
|
|
354044
|
+
}
|
|
354045
|
+
function emptyPackagingBindingsJson() {
|
|
354046
|
+
return { version: "2.0", resources: [] };
|
|
354047
|
+
}
|
|
354048
|
+
function mergePackagingBindingsJson(bindingsJsons) {
|
|
354049
|
+
const first = bindingsJsons.find((bindingsJson) => bindingsJson !== undefined);
|
|
354050
|
+
return {
|
|
354051
|
+
...first ?? emptyPackagingBindingsJson(),
|
|
354052
|
+
resources: mergeBindingResources(bindingsJsons.flatMap((bindingsJson) => bindingsJson?.resources ?? []))
|
|
354053
|
+
};
|
|
354054
|
+
}
|
|
354055
|
+
async function readBindingsJsonFile(fs9, filePath) {
|
|
354056
|
+
if (!await fs9.exists(filePath))
|
|
354057
|
+
return;
|
|
354058
|
+
const [readErr, raw] = await catchError(fs9.readFile(filePath, "utf-8"));
|
|
354059
|
+
if (readErr || typeof raw !== "string")
|
|
354060
|
+
return;
|
|
354061
|
+
const [parseErr, parsed] = catchError(() => JSON.parse(raw));
|
|
354062
|
+
if (parseErr) {
|
|
354063
|
+
logger.warn(`Could not parse ${filePath}: ${parseErr.message}`);
|
|
354064
|
+
return;
|
|
354065
|
+
}
|
|
354066
|
+
const bindingsJson = normalizePackagingBindingsJson(parsed);
|
|
354067
|
+
if (!bindingsJson) {
|
|
354068
|
+
logger.warn(`Ignoring invalid bindings file ${filePath}`);
|
|
354069
|
+
return;
|
|
354070
|
+
}
|
|
354071
|
+
return bindingsJson;
|
|
354072
|
+
}
|
|
354073
|
+
async function readInlineAgentBindingsJson(fs9, agentDir) {
|
|
354074
|
+
for (const filePath of [
|
|
354075
|
+
fs9.path.join(agentDir, ".agent-builder", "bindings.json"),
|
|
354076
|
+
fs9.path.join(agentDir, "bindings.json")
|
|
354077
|
+
]) {
|
|
354078
|
+
const bindingsJson = await readBindingsJsonFile(fs9, filePath);
|
|
354079
|
+
if (bindingsJson)
|
|
354080
|
+
return bindingsJson;
|
|
354081
|
+
}
|
|
354082
|
+
return;
|
|
354083
|
+
}
|
|
354084
|
+
async function readInlineAgentResourcesAndFeatures(fs9, agentDir) {
|
|
354085
|
+
const readJsonDir = async (dir3, fileName, discriminator) => {
|
|
354086
|
+
const [dirErr, folders] = await catchError(fs9.readdir(dir3));
|
|
354087
|
+
if (dirErr || !folders)
|
|
354088
|
+
return [];
|
|
354089
|
+
const out = [];
|
|
354090
|
+
for (const folder of folders) {
|
|
354091
|
+
const file5 = fs9.path.join(dir3, folder, fileName);
|
|
354092
|
+
const [readErr, raw] = await catchError(fs9.readFile(file5, "utf-8"));
|
|
354093
|
+
if (readErr || !raw)
|
|
354094
|
+
continue;
|
|
354095
|
+
const [parseErr, parsed] = await catchError(Promise.resolve(raw).then((s2) => JSON.parse(s2)));
|
|
354096
|
+
if (parseErr || !parsed?.[discriminator])
|
|
354097
|
+
continue;
|
|
354098
|
+
out.push(parsed);
|
|
354099
|
+
}
|
|
354100
|
+
return out;
|
|
354101
|
+
};
|
|
354102
|
+
const resources = await readJsonDir(fs9.path.join(agentDir, "resources"), "resource.json", "$resourceType");
|
|
354103
|
+
const features = await readJsonDir(fs9.path.join(agentDir, "features"), "feature.json", "$featureType");
|
|
354104
|
+
return { resources, features };
|
|
354105
|
+
}
|
|
354106
|
+
async function readInlineAgentJson(fs9, projectDir, source) {
|
|
354107
|
+
const agentJsonPath = fs9.path.join(projectDir, source, "agent.json");
|
|
354108
|
+
if (!await fs9.exists(agentJsonPath))
|
|
354109
|
+
return;
|
|
354110
|
+
const [readErr, raw] = await catchError(fs9.readFile(agentJsonPath, "utf-8"));
|
|
354111
|
+
if (readErr || !raw)
|
|
354112
|
+
return;
|
|
354113
|
+
const [parseErr, agent] = await catchError(Promise.resolve(raw).then((s2) => JSON.parse(s2)));
|
|
354114
|
+
if (parseErr || !agent)
|
|
354115
|
+
return;
|
|
354116
|
+
return agent;
|
|
354117
|
+
}
|
|
354118
|
+
function asRecordList(value) {
|
|
354119
|
+
return Array.isArray(value) ? value : [];
|
|
354120
|
+
}
|
|
354121
|
+
function mergeNamedItems(fileItems, inlineItems) {
|
|
354122
|
+
const fileNames = new Set(fileItems.map((item) => item.name));
|
|
354123
|
+
return [
|
|
354124
|
+
...fileItems,
|
|
354125
|
+
...inlineItems.filter((item) => !fileNames.has(item.name))
|
|
354126
|
+
];
|
|
354127
|
+
}
|
|
353790
354128
|
async function packageInlineAgents(fs9, projectDir, nodes) {
|
|
353791
354129
|
const result = [];
|
|
353792
354130
|
for (const node2 of nodes) {
|
|
@@ -353797,14 +354135,8 @@ async function packageInlineAgents(fs9, projectDir, nodes) {
|
|
|
353797
354135
|
continue;
|
|
353798
354136
|
if (/[/\\.]/.test(source))
|
|
353799
354137
|
continue;
|
|
353800
|
-
const
|
|
353801
|
-
if (!
|
|
353802
|
-
continue;
|
|
353803
|
-
const [readErr, raw] = await catchError(fs9.readFile(agentJsonPath, "utf-8"));
|
|
353804
|
-
if (readErr || !raw)
|
|
353805
|
-
continue;
|
|
353806
|
-
const [parseErr, agent] = await catchError(Promise.resolve(raw).then((s2) => JSON.parse(s2)));
|
|
353807
|
-
if (parseErr || !agent)
|
|
354138
|
+
const agent = await readInlineAgentJson(fs9, projectDir, source);
|
|
354139
|
+
if (!agent)
|
|
353808
354140
|
continue;
|
|
353809
354141
|
const inputSchema = agent.inputSchema ?? {
|
|
353810
354142
|
type: "object",
|
|
@@ -353814,6 +354146,10 @@ async function packageInlineAgents(fs9, projectDir, nodes) {
|
|
|
353814
354146
|
type: "object",
|
|
353815
354147
|
properties: {}
|
|
353816
354148
|
};
|
|
354149
|
+
const { resources: fileResources, features: fileFeatures } = await readInlineAgentResourcesAndFeatures(fs9, fs9.path.join(projectDir, source));
|
|
354150
|
+
agent.resources = mergeNamedItems(fileResources, asRecordList(agent.resources));
|
|
354151
|
+
agent.features = mergeNamedItems(fileFeatures, asRecordList(agent.features));
|
|
354152
|
+
const bindingsJson = await readInlineAgentBindingsJson(fs9, fs9.path.join(projectDir, source));
|
|
353817
354153
|
result.push({
|
|
353818
354154
|
source,
|
|
353819
354155
|
entryPoint: {
|
|
@@ -353824,12 +354160,32 @@ async function packageInlineAgents(fs9, projectDir, nodes) {
|
|
|
353824
354160
|
output: outputSchema,
|
|
353825
354161
|
displayName: agent.name ?? "Agent"
|
|
353826
354162
|
},
|
|
353827
|
-
agentJson: agent
|
|
354163
|
+
agentJson: agent,
|
|
354164
|
+
...bindingsJson ? { bindingsJson } : {}
|
|
353828
354165
|
});
|
|
353829
354166
|
logger.info(`Packaged inline agent "${source}" for entry-points`);
|
|
353830
354167
|
}
|
|
353831
354168
|
return result;
|
|
353832
354169
|
}
|
|
354170
|
+
async function stageInlineAgentPackageFiles(fs9, sourceProjectPath, stagingProjectDir, inlineAgents, formatLogMessage) {
|
|
354171
|
+
for (const agent of inlineAgents) {
|
|
354172
|
+
const srcDir = fs9.path.join(sourceProjectPath, agent.source);
|
|
354173
|
+
const destDir = fs9.path.join(stagingProjectDir, agent.source);
|
|
354174
|
+
if (await fs9.exists(srcDir)) {
|
|
354175
|
+
await fs9.copyDirectory(srcDir, destDir);
|
|
354176
|
+
}
|
|
354177
|
+
const agentBuilderDir = fs9.path.join(destDir, ".agent-builder");
|
|
354178
|
+
await ensureDirectory(fs9, agentBuilderDir);
|
|
354179
|
+
await fs9.writeFile(fs9.path.join(agentBuilderDir, "agent.json"), JSON.stringify({
|
|
354180
|
+
...agent.agentJson,
|
|
354181
|
+
resources: agent.agentJson.resources ?? [],
|
|
354182
|
+
features: agent.agentJson.features ?? []
|
|
354183
|
+
}, null, 2));
|
|
354184
|
+
await fs9.writeFile(fs9.path.join(agentBuilderDir, "bindings.json"), `${JSON.stringify(agent.bindingsJson ?? emptyPackagingBindingsJson(), null, 2)}
|
|
354185
|
+
`);
|
|
354186
|
+
logger.info(formatLogMessage(agent.source));
|
|
354187
|
+
}
|
|
354188
|
+
}
|
|
353833
354189
|
function buildInlineAgentDescriptors(nodes) {
|
|
353834
354190
|
const out = [];
|
|
353835
354191
|
for (const node2 of nodes) {
|
|
@@ -353848,17 +354204,30 @@ function buildInlineAgentDescriptors(nodes) {
|
|
|
353848
354204
|
}
|
|
353849
354205
|
return out;
|
|
353850
354206
|
}
|
|
353851
|
-
async function writePackagingArtifacts(fs9, projectDir, projectId, packagingNodes, bindings, variables, bpmnFileName, startEventId, flowFileName, definitions = []) {
|
|
353852
|
-
const entryPoints =
|
|
354207
|
+
async function writePackagingArtifacts(fs9, projectDir, projectId, packagingNodes, bindings, variables, bpmnFileName, startEventId, flowFileName, definitions = [], options = {}) {
|
|
354208
|
+
const { entryPoints } = await writePackagingArtifactsDetailed(fs9, projectDir, projectId, packagingNodes, bindings, variables, bpmnFileName, startEventId, flowFileName, definitions, options);
|
|
354209
|
+
return entryPoints;
|
|
354210
|
+
}
|
|
354211
|
+
async function writePackagingArtifactsDetailed(fs9, projectDir, projectId, packagingNodes, bindings, variables, bpmnFileName, startEventId, flowFileName, definitions = [], options = {}) {
|
|
354212
|
+
const flowEntryPoints = getEntryPoints(bpmnFileName, packagingNodes, variables, definitions, ProjectType.Flow);
|
|
354213
|
+
const entryPoints = [
|
|
354214
|
+
...flowEntryPoints,
|
|
354215
|
+
...options.additionalEntryPoints ?? []
|
|
354216
|
+
];
|
|
353853
354217
|
await fs9.writeFile(fs9.path.join(projectDir, "entry-points.json"), `${JSON.stringify(generateEntryPointsJson(entryPoints), null, 2)}
|
|
353854
354218
|
`);
|
|
353855
354219
|
const bindingResources = getBindingResources(packagingNodes, bindings, definitions);
|
|
353856
|
-
|
|
354220
|
+
const bindingsJson = normalizePackagingBindingsJson(generateBindingsJson(bindingResources)) ?? emptyPackagingBindingsJson();
|
|
354221
|
+
const stagedBindingsJson = mergePackagingBindingsJson([
|
|
354222
|
+
bindingsJson,
|
|
354223
|
+
...options.additionalBindingsJsons ?? []
|
|
354224
|
+
]);
|
|
354225
|
+
await fs9.writeFile(fs9.path.join(projectDir, "bindings_v2.json"), `${JSON.stringify(stagedBindingsJson, null, 2)}
|
|
353857
354226
|
`);
|
|
353858
354227
|
const mainEntryPoint = `/${bpmnFileName}#${startEventId}`;
|
|
353859
354228
|
await fs9.writeFile(fs9.path.join(projectDir, "operate.json"), `${JSON.stringify(generateOperateJson(projectId, mainEntryPoint), null, 2)}
|
|
353860
354229
|
`);
|
|
353861
|
-
const packageDescriptorJson = {
|
|
354230
|
+
const packageDescriptorJson = options.packageDescriptorJson ?? {
|
|
353862
354231
|
$schema: "https://cloud.uipath.com/draft/2024-12/package-descriptor",
|
|
353863
354232
|
files: {
|
|
353864
354233
|
"operate.json": "operate.json",
|
|
@@ -353870,7 +354239,7 @@ async function writePackagingArtifacts(fs9, projectDir, projectId, packagingNode
|
|
|
353870
354239
|
};
|
|
353871
354240
|
await fs9.writeFile(fs9.path.join(projectDir, "package-descriptor.json"), `${JSON.stringify(packageDescriptorJson, null, 2)}
|
|
353872
354241
|
`);
|
|
353873
|
-
return entryPoints;
|
|
354242
|
+
return { entryPoints, bindingsJson: stagedBindingsJson };
|
|
353874
354243
|
}
|
|
353875
354244
|
function backfillNodeModelsFromDefinitions(nodes, definitions) {
|
|
353876
354245
|
if (definitions.length === 0)
|
|
@@ -355155,7 +355524,7 @@ function querystringSingleKey4(key, value, keyPrefix = "") {
|
|
|
355155
355524
|
var package_default5 = {
|
|
355156
355525
|
name: "@uipath/solution-sdk",
|
|
355157
355526
|
license: "MIT",
|
|
355158
|
-
version: "1.
|
|
355527
|
+
version: "1.198.0-preview.81",
|
|
355159
355528
|
repository: {
|
|
355160
355529
|
type: "git",
|
|
355161
355530
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -355234,7 +355603,7 @@ async function readUipxFile(fs9, solutionDir) {
|
|
|
355234
355603
|
return { uipx, uipxFileName };
|
|
355235
355604
|
}
|
|
355236
355605
|
function validateUipxFile(parsed, uipxFileName) {
|
|
355237
|
-
if (!
|
|
355606
|
+
if (!isRecord3(parsed)) {
|
|
355238
355607
|
throw new Error(`Invalid .uipx file: ${uipxFileName} must contain a JSON object.`);
|
|
355239
355608
|
}
|
|
355240
355609
|
if (typeof parsed.SolutionId !== "string" || !parsed.SolutionId.trim()) {
|
|
@@ -355244,7 +355613,7 @@ function validateUipxFile(parsed, uipxFileName) {
|
|
|
355244
355613
|
throw new Error("Invalid .uipx file: missing Projects.");
|
|
355245
355614
|
}
|
|
355246
355615
|
for (const [index, project] of parsed.Projects.entries()) {
|
|
355247
|
-
if (!
|
|
355616
|
+
if (!isRecord3(project)) {
|
|
355248
355617
|
throw new Error(`Invalid .uipx file: Projects[${index}] must be an object.`);
|
|
355249
355618
|
}
|
|
355250
355619
|
if (typeof project.ProjectRelativePath !== "string" || !project.ProjectRelativePath.trim()) {
|
|
@@ -355254,7 +355623,7 @@ function validateUipxFile(parsed, uipxFileName) {
|
|
|
355254
355623
|
}
|
|
355255
355624
|
return parsed;
|
|
355256
355625
|
}
|
|
355257
|
-
function
|
|
355626
|
+
function isRecord3(value) {
|
|
355258
355627
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
355259
355628
|
}
|
|
355260
355629
|
async function updateUipxSolutionId(fs9, uipxPath, newSolutionId) {
|
|
@@ -355512,11 +355881,11 @@ async function readProjectManifest(fs9, filePath, useProjectJson) {
|
|
|
355512
355881
|
null
|
|
355513
355882
|
];
|
|
355514
355883
|
}
|
|
355515
|
-
if (!
|
|
355884
|
+
if (!isRecord3(parsed)) {
|
|
355516
355885
|
return [new Error(`Invalid project file: ${filePath}`), null];
|
|
355517
355886
|
}
|
|
355518
355887
|
const designOptions = parsed.designOptions;
|
|
355519
|
-
const outputType = useProjectJson &&
|
|
355888
|
+
const outputType = useProjectJson && isRecord3(designOptions) ? readString(designOptions.outputType) : undefined;
|
|
355520
355889
|
const projectType = outputType ?? readString(parsed.ProjectType);
|
|
355521
355890
|
if (!projectType) {
|
|
355522
355891
|
return [new Error(`ProjectType not found in ${filePath}`), null];
|
|
@@ -355543,7 +355912,7 @@ async function readSolutionManifest(fs9, solutionFile) {
|
|
|
355543
355912
|
null
|
|
355544
355913
|
];
|
|
355545
355914
|
}
|
|
355546
|
-
if (!
|
|
355915
|
+
if (!isRecord3(parsed)) {
|
|
355547
355916
|
return [
|
|
355548
355917
|
new Error(`Invalid solution file: ${solutionFile} must contain a JSON object.`),
|
|
355549
355918
|
null
|
|
@@ -355557,7 +355926,7 @@ async function readSolutionManifest(fs9, solutionFile) {
|
|
|
355557
355926
|
}
|
|
355558
355927
|
const projects = [];
|
|
355559
355928
|
for (const [index, project] of parsed.Projects.entries()) {
|
|
355560
|
-
if (!
|
|
355929
|
+
if (!isRecord3(project)) {
|
|
355561
355930
|
return [
|
|
355562
355931
|
new Error(`Invalid solution file: Projects[${index}] must be an object.`),
|
|
355563
355932
|
null
|
|
@@ -355978,6 +356347,15 @@ class FetchError5 extends Error {
|
|
|
355978
356347
|
this.cause = cause;
|
|
355979
356348
|
}
|
|
355980
356349
|
}
|
|
356350
|
+
|
|
356351
|
+
class RequiredError5 extends Error {
|
|
356352
|
+
field;
|
|
356353
|
+
name = "RequiredError";
|
|
356354
|
+
constructor(field, msg) {
|
|
356355
|
+
super(msg);
|
|
356356
|
+
this.field = field;
|
|
356357
|
+
}
|
|
356358
|
+
}
|
|
355981
356359
|
function querystring5(params, prefix2 = "") {
|
|
355982
356360
|
return Object.keys(params).map((key) => querystringSingleKey5(key, params[key], prefix2)).filter((part) => part.length > 0).join("&");
|
|
355983
356361
|
}
|
|
@@ -355999,6 +356377,941 @@ function querystringSingleKey5(key, value, keyPrefix = "") {
|
|
|
355999
356377
|
}
|
|
356000
356378
|
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
|
356001
356379
|
}
|
|
356380
|
+
function canConsumeForm2(consumes) {
|
|
356381
|
+
for (const consume of consumes) {
|
|
356382
|
+
if (consume.contentType === "multipart/form-data") {
|
|
356383
|
+
return true;
|
|
356384
|
+
}
|
|
356385
|
+
}
|
|
356386
|
+
return false;
|
|
356387
|
+
}
|
|
356388
|
+
|
|
356389
|
+
class JSONApiResponse5 {
|
|
356390
|
+
raw;
|
|
356391
|
+
transformer;
|
|
356392
|
+
constructor(raw, transformer = (jsonValue) => jsonValue) {
|
|
356393
|
+
this.raw = raw;
|
|
356394
|
+
this.transformer = transformer;
|
|
356395
|
+
}
|
|
356396
|
+
async value() {
|
|
356397
|
+
return this.transformer(await this.raw.json());
|
|
356398
|
+
}
|
|
356399
|
+
}
|
|
356400
|
+
// ../studioweb-sdk/generated/src/models/AccessStatus.ts
|
|
356401
|
+
function AccessStatusFromJSON(json5) {
|
|
356402
|
+
return AccessStatusFromJSONTyped(json5, false);
|
|
356403
|
+
}
|
|
356404
|
+
function AccessStatusFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356405
|
+
return json5;
|
|
356406
|
+
}
|
|
356407
|
+
// ../studioweb-sdk/generated/src/models/PinnedProject.ts
|
|
356408
|
+
function PinnedProjectFromJSON(json5) {
|
|
356409
|
+
return PinnedProjectFromJSONTyped(json5, false);
|
|
356410
|
+
}
|
|
356411
|
+
function PinnedProjectFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356412
|
+
if (json5 == null) {
|
|
356413
|
+
return json5;
|
|
356414
|
+
}
|
|
356415
|
+
return {
|
|
356416
|
+
id: json5["id"] == null ? undefined : json5["id"],
|
|
356417
|
+
projectDbModelId: json5["projectDbModelId"] == null ? undefined : json5["projectDbModelId"],
|
|
356418
|
+
userId: json5["userId"] == null ? undefined : json5["userId"],
|
|
356419
|
+
creationTime: json5["creationTime"] == null ? undefined : new Date(json5["creationTime"]),
|
|
356420
|
+
project: json5["project"] == null ? undefined : ProjectDbModelFromJSON(json5["project"])
|
|
356421
|
+
};
|
|
356422
|
+
}
|
|
356423
|
+
|
|
356424
|
+
// ../studioweb-sdk/generated/src/models/ProjectStructure.ts
|
|
356425
|
+
function ProjectStructureFromJSON(json5) {
|
|
356426
|
+
return ProjectStructureFromJSONTyped(json5, false);
|
|
356427
|
+
}
|
|
356428
|
+
function ProjectStructureFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356429
|
+
return json5;
|
|
356430
|
+
}
|
|
356431
|
+
|
|
356432
|
+
// ../studioweb-sdk/generated/src/models/ProjectAppliedProfileModel.ts
|
|
356433
|
+
function ProjectAppliedProfileModelFromJSON(json5) {
|
|
356434
|
+
return ProjectAppliedProfileModelFromJSONTyped(json5, false);
|
|
356435
|
+
}
|
|
356436
|
+
function ProjectAppliedProfileModelFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356437
|
+
if (json5 == null) {
|
|
356438
|
+
return json5;
|
|
356439
|
+
}
|
|
356440
|
+
return {
|
|
356441
|
+
projectId: json5["projectId"] == null ? undefined : json5["projectId"],
|
|
356442
|
+
workflowId: json5["workflowId"] == null ? undefined : json5["workflowId"],
|
|
356443
|
+
userProfileId: json5["userProfileId"] == null ? undefined : json5["userProfileId"],
|
|
356444
|
+
project: json5["project"] == null ? undefined : ProjectDbModelFromJSON(json5["project"]),
|
|
356445
|
+
profile: json5["profile"] == null ? undefined : UserBindingProfileModelFromJSON(json5["profile"])
|
|
356446
|
+
};
|
|
356447
|
+
}
|
|
356448
|
+
|
|
356449
|
+
// ../studioweb-sdk/generated/src/models/PropertyBindingModel.ts
|
|
356450
|
+
function PropertyBindingModelFromJSON(json5) {
|
|
356451
|
+
return PropertyBindingModelFromJSONTyped(json5, false);
|
|
356452
|
+
}
|
|
356453
|
+
function PropertyBindingModelFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356454
|
+
if (json5 == null) {
|
|
356455
|
+
return json5;
|
|
356456
|
+
}
|
|
356457
|
+
return {
|
|
356458
|
+
id: json5["id"] == null ? undefined : json5["id"],
|
|
356459
|
+
profileId: json5["profileId"] == null ? undefined : json5["profileId"],
|
|
356460
|
+
workflowId: json5["workflowId"] == null ? undefined : json5["workflowId"],
|
|
356461
|
+
activityIdRef: json5["activityIdRef"] == null ? undefined : json5["activityIdRef"],
|
|
356462
|
+
propertyName: json5["propertyName"] == null ? undefined : json5["propertyName"],
|
|
356463
|
+
contractName: json5["contractName"] == null ? undefined : json5["contractName"],
|
|
356464
|
+
resourceKey: json5["resourceKey"] == null ? undefined : json5["resourceKey"],
|
|
356465
|
+
propertyValue: json5["propertyValue"] == null ? undefined : json5["propertyValue"],
|
|
356466
|
+
profile: json5["profile"] == null ? undefined : UserBindingProfileModelFromJSON(json5["profile"])
|
|
356467
|
+
};
|
|
356468
|
+
}
|
|
356469
|
+
|
|
356470
|
+
// ../studioweb-sdk/generated/src/models/UserBindingProfileModel.ts
|
|
356471
|
+
function UserBindingProfileModelFromJSON(json5) {
|
|
356472
|
+
return UserBindingProfileModelFromJSONTyped3(json5, false);
|
|
356473
|
+
}
|
|
356474
|
+
function UserBindingProfileModelFromJSONTyped3(json5, ignoreDiscriminator) {
|
|
356475
|
+
if (json5 == null) {
|
|
356476
|
+
return json5;
|
|
356477
|
+
}
|
|
356478
|
+
return {
|
|
356479
|
+
id: json5["id"] == null ? undefined : json5["id"],
|
|
356480
|
+
userId: json5["userId"] == null ? undefined : json5["userId"],
|
|
356481
|
+
tenantId: json5["tenantId"] == null ? undefined : json5["tenantId"],
|
|
356482
|
+
projectId: json5["projectId"] == null ? undefined : json5["projectId"],
|
|
356483
|
+
workflowId: json5["workflowId"] == null ? undefined : json5["workflowId"],
|
|
356484
|
+
bindingsJson: json5["bindingsJson"] == null ? undefined : json5["bindingsJson"],
|
|
356485
|
+
userPropertyBindings: json5["userPropertyBindings"] == null ? undefined : json5["userPropertyBindings"].map(PropertyBindingModelFromJSON),
|
|
356486
|
+
project: json5["project"] == null ? undefined : ProjectDbModelFromJSON(json5["project"]),
|
|
356487
|
+
appliedTo: json5["appliedTo"] == null ? undefined : ProjectAppliedProfileModelFromJSON(json5["appliedTo"])
|
|
356488
|
+
};
|
|
356489
|
+
}
|
|
356490
|
+
|
|
356491
|
+
// ../studioweb-sdk/generated/src/models/ProjectAppModel.ts
|
|
356492
|
+
function ProjectAppModelFromJSON(json5) {
|
|
356493
|
+
return ProjectAppModelFromJSONTyped(json5, false);
|
|
356494
|
+
}
|
|
356495
|
+
function ProjectAppModelFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356496
|
+
if (json5 == null) {
|
|
356497
|
+
return json5;
|
|
356498
|
+
}
|
|
356499
|
+
return {
|
|
356500
|
+
id: json5["id"] == null ? undefined : json5["id"],
|
|
356501
|
+
projectId: json5["projectId"] == null ? undefined : json5["projectId"],
|
|
356502
|
+
appId: json5["appId"] == null ? undefined : json5["appId"],
|
|
356503
|
+
isFileSystemEnabled: json5["isFileSystemEnabled"] == null ? undefined : json5["isFileSystemEnabled"],
|
|
356504
|
+
project: json5["project"] == null ? undefined : ProjectDbModelFromJSON(json5["project"])
|
|
356505
|
+
};
|
|
356506
|
+
}
|
|
356507
|
+
|
|
356508
|
+
// ../studioweb-sdk/generated/src/models/ProjectLockModel.ts
|
|
356509
|
+
function ProjectLockModelFromJSON(json5) {
|
|
356510
|
+
return ProjectLockModelFromJSONTyped(json5, false);
|
|
356511
|
+
}
|
|
356512
|
+
function ProjectLockModelFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356513
|
+
if (json5 == null) {
|
|
356514
|
+
return json5;
|
|
356515
|
+
}
|
|
356516
|
+
return {
|
|
356517
|
+
projectId: json5["projectId"] == null ? undefined : json5["projectId"],
|
|
356518
|
+
key: json5["key"] == null ? undefined : json5["key"],
|
|
356519
|
+
userId: json5["userId"] == null ? undefined : json5["userId"],
|
|
356520
|
+
expirationDate: json5["expirationDate"] == null ? undefined : new Date(json5["expirationDate"]),
|
|
356521
|
+
rowVersion: json5["rowVersion"] == null ? undefined : json5["rowVersion"],
|
|
356522
|
+
project: json5["project"] == null ? undefined : ProjectDbModelFromJSON(json5["project"]),
|
|
356523
|
+
solutionId: json5["solutionId"] == null ? undefined : json5["solutionId"]
|
|
356524
|
+
};
|
|
356525
|
+
}
|
|
356526
|
+
|
|
356527
|
+
// ../studioweb-sdk/generated/src/models/TestManagerMetadataModel.ts
|
|
356528
|
+
function TestManagerMetadataModelFromJSON(json5) {
|
|
356529
|
+
return TestManagerMetadataModelFromJSONTyped(json5, false);
|
|
356530
|
+
}
|
|
356531
|
+
function TestManagerMetadataModelFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356532
|
+
if (json5 == null) {
|
|
356533
|
+
return json5;
|
|
356534
|
+
}
|
|
356535
|
+
return {
|
|
356536
|
+
id: json5["id"] == null ? undefined : json5["id"],
|
|
356537
|
+
studioWebProjectId: json5["studioWebProjectId"] == null ? undefined : json5["studioWebProjectId"],
|
|
356538
|
+
project: json5["project"] == null ? undefined : ProjectDbModelFromJSON(json5["project"]),
|
|
356539
|
+
testManagerProjectId: json5["testManagerProjectId"] == null ? undefined : json5["testManagerProjectId"],
|
|
356540
|
+
creationTime: json5["creationTime"] == null ? undefined : new Date(json5["creationTime"])
|
|
356541
|
+
};
|
|
356542
|
+
}
|
|
356543
|
+
|
|
356544
|
+
// ../studioweb-sdk/generated/src/models/TargetFramework.ts
|
|
356545
|
+
function TargetFrameworkFromJSON(json5) {
|
|
356546
|
+
return TargetFrameworkFromJSONTyped(json5, false);
|
|
356547
|
+
}
|
|
356548
|
+
function TargetFrameworkFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356549
|
+
return json5;
|
|
356550
|
+
}
|
|
356551
|
+
|
|
356552
|
+
// ../studioweb-sdk/generated/src/models/ProjectStatus.ts
|
|
356553
|
+
function ProjectStatusFromJSON(json5) {
|
|
356554
|
+
return ProjectStatusFromJSONTyped(json5, false);
|
|
356555
|
+
}
|
|
356556
|
+
function ProjectStatusFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356557
|
+
return json5;
|
|
356558
|
+
}
|
|
356559
|
+
|
|
356560
|
+
// ../studioweb-sdk/generated/src/models/SharingPermissions.ts
|
|
356561
|
+
function SharingPermissionsFromJSON(json5) {
|
|
356562
|
+
return SharingPermissionsFromJSONTyped(json5, false);
|
|
356563
|
+
}
|
|
356564
|
+
function SharingPermissionsFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356565
|
+
return json5;
|
|
356566
|
+
}
|
|
356567
|
+
|
|
356568
|
+
// ../studioweb-sdk/generated/src/models/SharedProject.ts
|
|
356569
|
+
function SharedProjectFromJSON(json5) {
|
|
356570
|
+
return SharedProjectFromJSONTyped(json5, false);
|
|
356571
|
+
}
|
|
356572
|
+
function SharedProjectFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356573
|
+
if (json5 == null) {
|
|
356574
|
+
return json5;
|
|
356575
|
+
}
|
|
356576
|
+
return {
|
|
356577
|
+
id: json5["id"] == null ? undefined : json5["id"],
|
|
356578
|
+
projectId: json5["projectId"] == null ? undefined : json5["projectId"],
|
|
356579
|
+
entityId: json5["entityId"] == null ? undefined : json5["entityId"],
|
|
356580
|
+
organizationId: json5["organizationId"] == null ? undefined : json5["organizationId"],
|
|
356581
|
+
isHidden: json5["isHidden"] == null ? undefined : json5["isHidden"],
|
|
356582
|
+
creationTime: json5["creationTime"] == null ? undefined : new Date(json5["creationTime"]),
|
|
356583
|
+
isGroup: json5["isGroup"] == null ? undefined : json5["isGroup"],
|
|
356584
|
+
permissions: json5["permissions"] == null ? undefined : SharingPermissionsFromJSON(json5["permissions"]),
|
|
356585
|
+
project: json5["project"] == null ? undefined : ProjectDbModelFromJSON(json5["project"])
|
|
356586
|
+
};
|
|
356587
|
+
}
|
|
356588
|
+
|
|
356589
|
+
// ../studioweb-sdk/generated/src/models/UserMessageDbModel.ts
|
|
356590
|
+
function UserMessageDbModelFromJSON(json5) {
|
|
356591
|
+
return UserMessageDbModelFromJSONTyped(json5, false);
|
|
356592
|
+
}
|
|
356593
|
+
function UserMessageDbModelFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356594
|
+
if (json5 == null) {
|
|
356595
|
+
return json5;
|
|
356596
|
+
}
|
|
356597
|
+
return {
|
|
356598
|
+
id: json5["id"] == null ? undefined : json5["id"],
|
|
356599
|
+
message: json5["message"] == null ? undefined : json5["message"],
|
|
356600
|
+
creationTime: json5["creationTime"] == null ? undefined : new Date(json5["creationTime"]),
|
|
356601
|
+
projectDbModelId: json5["projectDbModelId"] == null ? undefined : json5["projectDbModelId"],
|
|
356602
|
+
project: json5["project"] == null ? undefined : ProjectDbModelFromJSON(json5["project"])
|
|
356603
|
+
};
|
|
356604
|
+
}
|
|
356605
|
+
|
|
356606
|
+
// ../studioweb-sdk/generated/src/models/ProjectConnectionModel.ts
|
|
356607
|
+
function ProjectConnectionModelFromJSON(json5) {
|
|
356608
|
+
return ProjectConnectionModelFromJSONTyped(json5, false);
|
|
356609
|
+
}
|
|
356610
|
+
function ProjectConnectionModelFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356611
|
+
if (json5 == null) {
|
|
356612
|
+
return json5;
|
|
356613
|
+
}
|
|
356614
|
+
return {
|
|
356615
|
+
connectionId: json5["connectionId"] == null ? undefined : json5["connectionId"],
|
|
356616
|
+
connector: json5["connector"] == null ? undefined : json5["connector"],
|
|
356617
|
+
projectId: json5["projectId"] == null ? undefined : json5["projectId"],
|
|
356618
|
+
project: json5["project"] == null ? undefined : ProjectDbModelFromJSON(json5["project"]),
|
|
356619
|
+
usedInWorkflow: json5["usedInWorkflow"] == null ? undefined : json5["usedInWorkflow"],
|
|
356620
|
+
usedInTrigger: json5["usedInTrigger"] == null ? undefined : json5["usedInTrigger"],
|
|
356621
|
+
workflowFileId: json5["workflowFileId"] == null ? undefined : json5["workflowFileId"]
|
|
356622
|
+
};
|
|
356623
|
+
}
|
|
356624
|
+
|
|
356625
|
+
// ../studioweb-sdk/generated/src/models/TriggerMetadataModel.ts
|
|
356626
|
+
function TriggerMetadataModelFromJSON(json5) {
|
|
356627
|
+
return TriggerMetadataModelFromJSONTyped(json5, false);
|
|
356628
|
+
}
|
|
356629
|
+
function TriggerMetadataModelFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356630
|
+
if (json5 == null) {
|
|
356631
|
+
return json5;
|
|
356632
|
+
}
|
|
356633
|
+
return {
|
|
356634
|
+
projectId: json5["projectId"] == null ? undefined : json5["projectId"],
|
|
356635
|
+
connectionId: json5["connectionId"] == null ? undefined : json5["connectionId"],
|
|
356636
|
+
connection: json5["connection"] == null ? undefined : ConnectionMetadataModelFromJSON(json5["connection"]),
|
|
356637
|
+
projectConnection: json5["projectConnection"] == null ? undefined : ProjectConnectionModelFromJSON(json5["projectConnection"]),
|
|
356638
|
+
operation: json5["operation"] == null ? undefined : json5["operation"],
|
|
356639
|
+
triggerId: json5["triggerId"] == null ? undefined : json5["triggerId"],
|
|
356640
|
+
defaultDisplayName: json5["defaultDisplayName"] == null ? undefined : json5["defaultDisplayName"],
|
|
356641
|
+
displayName: json5["displayName"] == null ? undefined : json5["displayName"],
|
|
356642
|
+
project: json5["project"] == null ? undefined : ProjectDbModelFromJSON(json5["project"])
|
|
356643
|
+
};
|
|
356644
|
+
}
|
|
356645
|
+
|
|
356646
|
+
// ../studioweb-sdk/generated/src/models/ConnectionMetadataModel.ts
|
|
356647
|
+
function ConnectionMetadataModelFromJSON(json5) {
|
|
356648
|
+
return ConnectionMetadataModelFromJSONTyped2(json5, false);
|
|
356649
|
+
}
|
|
356650
|
+
function ConnectionMetadataModelFromJSONTyped2(json5, ignoreDiscriminator) {
|
|
356651
|
+
if (json5 == null) {
|
|
356652
|
+
return json5;
|
|
356653
|
+
}
|
|
356654
|
+
return {
|
|
356655
|
+
connectionId: json5["connectionId"] == null ? undefined : json5["connectionId"],
|
|
356656
|
+
connector: json5["connector"] == null ? undefined : json5["connector"],
|
|
356657
|
+
projects: json5["projects"] == null ? undefined : json5["projects"].map(ProjectDbModelFromJSON),
|
|
356658
|
+
triggers: json5["triggers"] == null ? undefined : json5["triggers"].map(TriggerMetadataModelFromJSON)
|
|
356659
|
+
};
|
|
356660
|
+
}
|
|
356661
|
+
|
|
356662
|
+
// ../studioweb-sdk/generated/src/models/ProjectMetadataModel.ts
|
|
356663
|
+
function ProjectMetadataModelFromJSON(json5) {
|
|
356664
|
+
return ProjectMetadataModelFromJSONTyped(json5, false);
|
|
356665
|
+
}
|
|
356666
|
+
function ProjectMetadataModelFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356667
|
+
if (json5 == null) {
|
|
356668
|
+
return json5;
|
|
356669
|
+
}
|
|
356670
|
+
return {
|
|
356671
|
+
projectId: json5["projectId"] == null ? undefined : json5["projectId"],
|
|
356672
|
+
hasTestCases: json5["hasTestCases"] == null ? undefined : json5["hasTestCases"],
|
|
356673
|
+
mcIgnorableApplied: json5["mcIgnorableApplied"] == null ? undefined : new Date(json5["mcIgnorableApplied"]),
|
|
356674
|
+
lastScanDate: json5["lastScanDate"] == null ? undefined : new Date(json5["lastScanDate"]),
|
|
356675
|
+
project: json5["project"] == null ? undefined : ProjectDbModelFromJSON(json5["project"])
|
|
356676
|
+
};
|
|
356677
|
+
}
|
|
356678
|
+
|
|
356679
|
+
// ../studioweb-sdk/generated/src/models/PublishStatus.ts
|
|
356680
|
+
function PublishStatusFromJSON(json5) {
|
|
356681
|
+
return PublishStatusFromJSONTyped(json5, false);
|
|
356682
|
+
}
|
|
356683
|
+
function PublishStatusFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356684
|
+
return json5;
|
|
356685
|
+
}
|
|
356686
|
+
|
|
356687
|
+
// ../studioweb-sdk/generated/src/models/PublishResultModel.ts
|
|
356688
|
+
function PublishResultModelFromJSON(json5) {
|
|
356689
|
+
return PublishResultModelFromJSONTyped(json5, false);
|
|
356690
|
+
}
|
|
356691
|
+
function PublishResultModelFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356692
|
+
if (json5 == null) {
|
|
356693
|
+
return json5;
|
|
356694
|
+
}
|
|
356695
|
+
return {
|
|
356696
|
+
id: json5["id"] == null ? undefined : json5["id"],
|
|
356697
|
+
projectId: json5["projectId"] == null ? undefined : json5["projectId"],
|
|
356698
|
+
creationTime: json5["creationTime"] == null ? undefined : new Date(json5["creationTime"]),
|
|
356699
|
+
status: json5["status"] == null ? undefined : PublishStatusFromJSON(json5["status"]),
|
|
356700
|
+
message: json5["message"] == null ? undefined : json5["message"],
|
|
356701
|
+
tenantId: json5["tenantId"] == null ? undefined : json5["tenantId"],
|
|
356702
|
+
feedId: json5["feedId"] == null ? undefined : json5["feedId"],
|
|
356703
|
+
version: json5["version"] == null ? undefined : json5["version"],
|
|
356704
|
+
userId: json5["userId"] == null ? undefined : json5["userId"],
|
|
356705
|
+
project: json5["project"] == null ? undefined : ProjectDbModelFromJSON(json5["project"]),
|
|
356706
|
+
iconUrl: json5["iconUrl"] == null ? undefined : json5["iconUrl"]
|
|
356707
|
+
};
|
|
356708
|
+
}
|
|
356709
|
+
|
|
356710
|
+
// ../studioweb-sdk/generated/src/models/SapContext.ts
|
|
356711
|
+
function SapContextFromJSON(json5) {
|
|
356712
|
+
return SapContextFromJSONTyped(json5, false);
|
|
356713
|
+
}
|
|
356714
|
+
function SapContextFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356715
|
+
if (json5 == null) {
|
|
356716
|
+
return json5;
|
|
356717
|
+
}
|
|
356718
|
+
return {
|
|
356719
|
+
id: json5["id"] == null ? undefined : json5["id"],
|
|
356720
|
+
projectId: json5["projectId"] == null ? undefined : json5["projectId"],
|
|
356721
|
+
tenantId: json5["tenantId"] == null ? undefined : json5["tenantId"],
|
|
356722
|
+
isPrimaryProject: json5["isPrimaryProject"] == null ? undefined : json5["isPrimaryProject"],
|
|
356723
|
+
externalProjectId: json5["externalProjectId"] == null ? undefined : json5["externalProjectId"],
|
|
356724
|
+
baseCallbackPath: json5["baseCallbackPath"] == null ? undefined : json5["baseCallbackPath"],
|
|
356725
|
+
project: json5["project"] == null ? undefined : ProjectDbModelFromJSON(json5["project"])
|
|
356726
|
+
};
|
|
356727
|
+
}
|
|
356728
|
+
|
|
356729
|
+
// ../studioweb-sdk/generated/src/models/ProjectPackageModel.ts
|
|
356730
|
+
function ProjectPackageModelFromJSON(json5) {
|
|
356731
|
+
return ProjectPackageModelFromJSONTyped(json5, false);
|
|
356732
|
+
}
|
|
356733
|
+
function ProjectPackageModelFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356734
|
+
if (json5 == null) {
|
|
356735
|
+
return json5;
|
|
356736
|
+
}
|
|
356737
|
+
return {
|
|
356738
|
+
id: json5["id"] == null ? undefined : json5["id"],
|
|
356739
|
+
name: json5["name"] == null ? undefined : json5["name"],
|
|
356740
|
+
version: json5["version"] == null ? undefined : json5["version"],
|
|
356741
|
+
project: json5["project"] == null ? undefined : ProjectDbModelFromJSON(json5["project"])
|
|
356742
|
+
};
|
|
356743
|
+
}
|
|
356744
|
+
|
|
356745
|
+
// ../studioweb-sdk/generated/src/models/ProjectDbModel.ts
|
|
356746
|
+
function ProjectDbModelFromJSON(json5) {
|
|
356747
|
+
return ProjectDbModelFromJSONTyped16(json5, false);
|
|
356748
|
+
}
|
|
356749
|
+
function ProjectDbModelFromJSONTyped16(json5, ignoreDiscriminator) {
|
|
356750
|
+
if (json5 == null) {
|
|
356751
|
+
return json5;
|
|
356752
|
+
}
|
|
356753
|
+
return {
|
|
356754
|
+
id: json5["id"] == null ? undefined : json5["id"],
|
|
356755
|
+
designId: json5["designId"] == null ? undefined : json5["designId"],
|
|
356756
|
+
previousProjectId: json5["previousProjectId"] == null ? undefined : json5["previousProjectId"],
|
|
356757
|
+
userId: json5["userId"] == null ? undefined : json5["userId"],
|
|
356758
|
+
organisationId: json5["organisationId"] == null ? undefined : json5["organisationId"],
|
|
356759
|
+
name: json5["name"] == null ? undefined : json5["name"],
|
|
356760
|
+
solutionId: json5["solutionId"] == null ? undefined : json5["solutionId"],
|
|
356761
|
+
deletionDate: json5["deletionDate"] == null ? undefined : new Date(json5["deletionDate"]),
|
|
356762
|
+
status: json5["status"] == null ? undefined : ProjectStatusFromJSON(json5["status"]),
|
|
356763
|
+
fakeProjectTemplateEdit: json5["fakeProjectTemplateEdit"] == null ? undefined : json5["fakeProjectTemplateEdit"],
|
|
356764
|
+
isHidden: json5["isHidden"] == null ? undefined : json5["isHidden"],
|
|
356765
|
+
targetFramework: json5["targetFramework"] == null ? undefined : TargetFrameworkFromJSON(json5["targetFramework"]),
|
|
356766
|
+
projectType: json5["projectType"] == null ? undefined : json5["projectType"],
|
|
356767
|
+
creationTime: json5["creationTime"] == null ? undefined : new Date(json5["creationTime"]),
|
|
356768
|
+
lastModifiedTime: json5["lastModifiedTime"] == null ? undefined : new Date(json5["lastModifiedTime"]),
|
|
356769
|
+
expressionLanguage: json5["expressionLanguage"] == null ? undefined : json5["expressionLanguage"],
|
|
356770
|
+
nameLower: json5["nameLower"] == null ? undefined : json5["nameLower"],
|
|
356771
|
+
description: json5["description"] == null ? undefined : json5["description"],
|
|
356772
|
+
descriptionLower: json5["descriptionLower"] == null ? undefined : json5["descriptionLower"],
|
|
356773
|
+
jitVersion: json5["jitVersion"] == null ? undefined : json5["jitVersion"],
|
|
356774
|
+
dependencies: json5["dependencies"] == null ? undefined : json5["dependencies"].map(ProjectPackageModelFromJSON),
|
|
356775
|
+
pinDate: json5["pinDate"] == null ? undefined : new Date(json5["pinDate"]),
|
|
356776
|
+
lock: json5["lock"] == null ? undefined : ProjectLockModelFromJSON(json5["lock"]),
|
|
356777
|
+
hasTrigger: json5["hasTrigger"] == null ? undefined : json5["hasTrigger"],
|
|
356778
|
+
tenantId: json5["tenantId"] == null ? undefined : json5["tenantId"],
|
|
356779
|
+
sapContext: json5["sapContext"] == null ? undefined : SapContextFromJSON(json5["sapContext"]),
|
|
356780
|
+
rowVersion: json5["rowVersion"] == null ? undefined : json5["rowVersion"],
|
|
356781
|
+
disableAutoUpdateUntilDate: json5["disableAutoUpdateUntilDate"] == null ? undefined : new Date(json5["disableAutoUpdateUntilDate"]),
|
|
356782
|
+
structure: json5["structure"] == null ? undefined : ProjectStructureFromJSON(json5["structure"]),
|
|
356783
|
+
userMessage: json5["userMessage"] == null ? undefined : UserMessageDbModelFromJSON(json5["userMessage"]),
|
|
356784
|
+
triggerType: json5["triggerType"] == null ? undefined : json5["triggerType"],
|
|
356785
|
+
trigger: json5["trigger"] == null ? undefined : TriggerMetadataModelFromJSON(json5["trigger"]),
|
|
356786
|
+
connections: json5["connections"] == null ? undefined : json5["connections"].map(ConnectionMetadataModelFromJSON),
|
|
356787
|
+
pins: json5["pins"] == null ? undefined : json5["pins"].map(PinnedProjectFromJSON),
|
|
356788
|
+
bindingProfiles: json5["bindingProfiles"] == null ? undefined : json5["bindingProfiles"].map(UserBindingProfileModelFromJSON),
|
|
356789
|
+
lastAppliedProfileId: json5["lastAppliedProfileId"] == null ? undefined : json5["lastAppliedProfileId"],
|
|
356790
|
+
lastAppliedProfile: json5["lastAppliedProfile"] == null ? undefined : UserBindingProfileModelFromJSON(json5["lastAppliedProfile"]),
|
|
356791
|
+
hasDefaultName: json5["hasDefaultName"] == null ? undefined : json5["hasDefaultName"],
|
|
356792
|
+
projectAppliedProfiles: json5["projectAppliedProfiles"] == null ? undefined : json5["projectAppliedProfiles"].map(ProjectAppliedProfileModelFromJSON),
|
|
356793
|
+
projectConnections: json5["projectConnections"] == null ? undefined : json5["projectConnections"].map(ProjectConnectionModelFromJSON),
|
|
356794
|
+
additionalBindingProperties: json5["additionalBindingProperties"] == null ? undefined : json5["additionalBindingProperties"].map(AdditionalBindingPropertiesFromJSON),
|
|
356795
|
+
publishHistory: json5["publishHistory"] == null ? undefined : json5["publishHistory"].map(PublishResultModelFromJSON),
|
|
356796
|
+
projectAppMetadata: json5["projectAppMetadata"] == null ? undefined : ProjectAppModelFromJSON(json5["projectAppMetadata"]),
|
|
356797
|
+
testManagerMetadata: json5["testManagerMetadata"] == null ? undefined : TestManagerMetadataModelFromJSON(json5["testManagerMetadata"]),
|
|
356798
|
+
shares: json5["shares"] == null ? undefined : json5["shares"].map(SharedProjectFromJSON),
|
|
356799
|
+
metadata: json5["metadata"] == null ? undefined : ProjectMetadataModelFromJSON(json5["metadata"]),
|
|
356800
|
+
isPreview: json5["isPreview"] == null ? undefined : json5["isPreview"],
|
|
356801
|
+
errorList: json5["errorList"] == null ? undefined : json5["errorList"],
|
|
356802
|
+
requirePreprocessing: json5["requirePreprocessing"] == null ? undefined : json5["requirePreprocessing"],
|
|
356803
|
+
relativePath: json5["relativePath"] == null ? undefined : json5["relativePath"]
|
|
356804
|
+
};
|
|
356805
|
+
}
|
|
356806
|
+
|
|
356807
|
+
// ../studioweb-sdk/generated/src/models/AdditionalBindingProperties.ts
|
|
356808
|
+
function AdditionalBindingPropertiesFromJSON(json5) {
|
|
356809
|
+
return AdditionalBindingPropertiesFromJSONTyped2(json5, false);
|
|
356810
|
+
}
|
|
356811
|
+
function AdditionalBindingPropertiesFromJSONTyped2(json5, ignoreDiscriminator) {
|
|
356812
|
+
if (json5 == null) {
|
|
356813
|
+
return json5;
|
|
356814
|
+
}
|
|
356815
|
+
return {
|
|
356816
|
+
projectId: json5["projectId"] == null ? undefined : json5["projectId"],
|
|
356817
|
+
project: json5["project"] == null ? undefined : ProjectDbModelFromJSON(json5["project"]),
|
|
356818
|
+
workflowFileId: json5["workflowFileId"] == null ? undefined : json5["workflowFileId"],
|
|
356819
|
+
resourceType: json5["resourceType"] == null ? undefined : json5["resourceType"],
|
|
356820
|
+
resourceKey: json5["resourceKey"] == null ? undefined : json5["resourceKey"],
|
|
356821
|
+
purpose: json5["purpose"] == null ? undefined : json5["purpose"]
|
|
356822
|
+
};
|
|
356823
|
+
}
|
|
356824
|
+
// ../studioweb-sdk/generated/src/models/AdditionalBindingPropertiesDto.ts
|
|
356825
|
+
function AdditionalBindingPropertiesDtoFromJSON(json5) {
|
|
356826
|
+
return AdditionalBindingPropertiesDtoFromJSONTyped(json5, false);
|
|
356827
|
+
}
|
|
356828
|
+
function AdditionalBindingPropertiesDtoFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356829
|
+
if (json5 == null) {
|
|
356830
|
+
return json5;
|
|
356831
|
+
}
|
|
356832
|
+
return {
|
|
356833
|
+
resourceType: json5["resourceType"] == null ? undefined : json5["resourceType"],
|
|
356834
|
+
resourceKey: json5["resourceKey"] == null ? undefined : json5["resourceKey"],
|
|
356835
|
+
purpose: json5["purpose"] == null ? undefined : json5["purpose"],
|
|
356836
|
+
workflowFileId: json5["workflowFileId"] == null ? undefined : json5["workflowFileId"]
|
|
356837
|
+
};
|
|
356838
|
+
}
|
|
356839
|
+
// ../studioweb-sdk/generated/src/models/AppUsageType.ts
|
|
356840
|
+
function AppUsageTypeFromJSON(json5) {
|
|
356841
|
+
return AppUsageTypeFromJSONTyped(json5, false);
|
|
356842
|
+
}
|
|
356843
|
+
function AppUsageTypeFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356844
|
+
return json5;
|
|
356845
|
+
}
|
|
356846
|
+
// ../studioweb-sdk/generated/src/models/FileType.ts
|
|
356847
|
+
function FileTypeFromJSON(json5) {
|
|
356848
|
+
return FileTypeFromJSONTyped(json5, false);
|
|
356849
|
+
}
|
|
356850
|
+
function FileTypeFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356851
|
+
return json5;
|
|
356852
|
+
}
|
|
356853
|
+
|
|
356854
|
+
// ../studioweb-sdk/generated/src/models/FileDto.ts
|
|
356855
|
+
function FileDtoFromJSON(json5) {
|
|
356856
|
+
return FileDtoFromJSONTyped(json5, false);
|
|
356857
|
+
}
|
|
356858
|
+
function FileDtoFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356859
|
+
if (json5 == null) {
|
|
356860
|
+
return json5;
|
|
356861
|
+
}
|
|
356862
|
+
return {
|
|
356863
|
+
id: json5["id"] == null ? undefined : json5["id"],
|
|
356864
|
+
name: json5["name"] == null ? undefined : json5["name"],
|
|
356865
|
+
isMain: json5["isMain"] == null ? undefined : json5["isMain"],
|
|
356866
|
+
fileType: json5["fileType"] == null ? undefined : FileTypeFromJSON(json5["fileType"]),
|
|
356867
|
+
isEntryPoint: json5["isEntryPoint"] == null ? undefined : json5["isEntryPoint"],
|
|
356868
|
+
ignoredFromPublish: json5["ignoredFromPublish"] == null ? undefined : json5["ignoredFromPublish"],
|
|
356869
|
+
appFormId: json5["appFormId"] == null ? undefined : json5["appFormId"],
|
|
356870
|
+
externalAutomationId: json5["externalAutomationId"] == null ? undefined : json5["externalAutomationId"],
|
|
356871
|
+
testCaseId: json5["testCaseId"] == null ? undefined : json5["testCaseId"],
|
|
356872
|
+
contentSignature: json5["contentSignature"] == null ? undefined : json5["contentSignature"]
|
|
356873
|
+
};
|
|
356874
|
+
}
|
|
356875
|
+
// ../studioweb-sdk/generated/src/models/SpecialFolderType.ts
|
|
356876
|
+
function SpecialFolderTypeFromJSON(json5) {
|
|
356877
|
+
return SpecialFolderTypeFromJSONTyped(json5, false);
|
|
356878
|
+
}
|
|
356879
|
+
function SpecialFolderTypeFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356880
|
+
return json5;
|
|
356881
|
+
}
|
|
356882
|
+
|
|
356883
|
+
// ../studioweb-sdk/generated/src/models/FolderDto.ts
|
|
356884
|
+
function FolderDtoFromJSON2(json5) {
|
|
356885
|
+
return FolderDtoFromJSONTyped4(json5, false);
|
|
356886
|
+
}
|
|
356887
|
+
function FolderDtoFromJSONTyped4(json5, ignoreDiscriminator) {
|
|
356888
|
+
if (json5 == null) {
|
|
356889
|
+
return json5;
|
|
356890
|
+
}
|
|
356891
|
+
return {
|
|
356892
|
+
id: json5["id"] == null ? undefined : json5["id"],
|
|
356893
|
+
name: json5["name"] == null ? undefined : json5["name"],
|
|
356894
|
+
folders: json5["folders"] == null ? undefined : json5["folders"].map(FolderDtoFromJSON2),
|
|
356895
|
+
files: json5["files"] == null ? undefined : json5["files"].map(FileDtoFromJSON),
|
|
356896
|
+
folderType: json5["folderType"] == null ? undefined : SpecialFolderTypeFromJSON(json5["folderType"])
|
|
356897
|
+
};
|
|
356898
|
+
}
|
|
356899
|
+
// ../studioweb-sdk/generated/src/models/MetadataConnectionDto.ts
|
|
356900
|
+
function MetadataConnectionDtoFromJSON(json5) {
|
|
356901
|
+
return MetadataConnectionDtoFromJSONTyped(json5, false);
|
|
356902
|
+
}
|
|
356903
|
+
function MetadataConnectionDtoFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356904
|
+
if (json5 == null) {
|
|
356905
|
+
return json5;
|
|
356906
|
+
}
|
|
356907
|
+
return {
|
|
356908
|
+
connectionId: json5["connectionId"] == null ? undefined : json5["connectionId"],
|
|
356909
|
+
connector: json5["connector"] == null ? undefined : json5["connector"],
|
|
356910
|
+
purpose: json5["purpose"] == null ? undefined : json5["purpose"],
|
|
356911
|
+
workflowFileId: json5["workflowFileId"] == null ? undefined : json5["workflowFileId"]
|
|
356912
|
+
};
|
|
356913
|
+
}
|
|
356914
|
+
// ../studioweb-sdk/generated/src/models/MetadataTriggerDto.ts
|
|
356915
|
+
function MetadataTriggerDtoFromJSON(json5) {
|
|
356916
|
+
return MetadataTriggerDtoFromJSONTyped(json5, false);
|
|
356917
|
+
}
|
|
356918
|
+
function MetadataTriggerDtoFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356919
|
+
if (json5 == null) {
|
|
356920
|
+
return json5;
|
|
356921
|
+
}
|
|
356922
|
+
return {
|
|
356923
|
+
connection: json5["connection"] == null ? undefined : MetadataConnectionDtoFromJSON(json5["connection"]),
|
|
356924
|
+
operation: json5["operation"] == null ? undefined : json5["operation"],
|
|
356925
|
+
triggerId: json5["triggerId"] == null ? undefined : json5["triggerId"],
|
|
356926
|
+
defaultDisplayName: json5["defaultDisplayName"] == null ? undefined : json5["defaultDisplayName"],
|
|
356927
|
+
displayName: json5["displayName"] == null ? undefined : json5["displayName"]
|
|
356928
|
+
};
|
|
356929
|
+
}
|
|
356930
|
+
// ../studioweb-sdk/generated/src/models/PackageDto.ts
|
|
356931
|
+
function PackageDtoFromJSON(json5) {
|
|
356932
|
+
return PackageDtoFromJSONTyped(json5, false);
|
|
356933
|
+
}
|
|
356934
|
+
function PackageDtoFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356935
|
+
if (json5 == null) {
|
|
356936
|
+
return json5;
|
|
356937
|
+
}
|
|
356938
|
+
return {
|
|
356939
|
+
name: json5["name"],
|
|
356940
|
+
version: json5["version"],
|
|
356941
|
+
isRestricted: json5["isRestricted"] == null ? undefined : json5["isRestricted"]
|
|
356942
|
+
};
|
|
356943
|
+
}
|
|
356944
|
+
// ../studioweb-sdk/generated/src/models/TestManagerMetadataDto.ts
|
|
356945
|
+
function TestManagerMetadataDtoFromJSON(json5) {
|
|
356946
|
+
return TestManagerMetadataDtoFromJSONTyped(json5, false);
|
|
356947
|
+
}
|
|
356948
|
+
function TestManagerMetadataDtoFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356949
|
+
if (json5 == null) {
|
|
356950
|
+
return json5;
|
|
356951
|
+
}
|
|
356952
|
+
return {
|
|
356953
|
+
testManagerProjectId: json5["testManagerProjectId"] == null ? undefined : json5["testManagerProjectId"],
|
|
356954
|
+
creationTime: json5["creationTime"] == null ? undefined : new Date(json5["creationTime"])
|
|
356955
|
+
};
|
|
356956
|
+
}
|
|
356957
|
+
|
|
356958
|
+
// ../studioweb-sdk/generated/src/models/ProjectErrorCode.ts
|
|
356959
|
+
function ProjectErrorCodeFromJSON(json5) {
|
|
356960
|
+
return ProjectErrorCodeFromJSONTyped(json5, false);
|
|
356961
|
+
}
|
|
356962
|
+
function ProjectErrorCodeFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356963
|
+
return json5;
|
|
356964
|
+
}
|
|
356965
|
+
|
|
356966
|
+
// ../studioweb-sdk/generated/src/models/ProjectErrorInformation.ts
|
|
356967
|
+
function ProjectErrorInformationFromJSON(json5) {
|
|
356968
|
+
return ProjectErrorInformationFromJSONTyped(json5, false);
|
|
356969
|
+
}
|
|
356970
|
+
function ProjectErrorInformationFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356971
|
+
if (json5 == null) {
|
|
356972
|
+
return json5;
|
|
356973
|
+
}
|
|
356974
|
+
return {
|
|
356975
|
+
errorCode: json5["errorCode"] == null ? undefined : ProjectErrorCodeFromJSON(json5["errorCode"]),
|
|
356976
|
+
metadata: json5["metadata"] == null ? undefined : json5["metadata"],
|
|
356977
|
+
errorMessage: json5["errorMessage"] == null ? undefined : json5["errorMessage"],
|
|
356978
|
+
locationId: json5["locationId"] == null ? undefined : json5["locationId"],
|
|
356979
|
+
isSpecialLocation: json5["isSpecialLocation"] == null ? undefined : json5["isSpecialLocation"]
|
|
356980
|
+
};
|
|
356981
|
+
}
|
|
356982
|
+
|
|
356983
|
+
// ../studioweb-sdk/generated/src/models/SapContextDto.ts
|
|
356984
|
+
function SapContextDtoFromJSON(json5) {
|
|
356985
|
+
return SapContextDtoFromJSONTyped(json5, false);
|
|
356986
|
+
}
|
|
356987
|
+
function SapContextDtoFromJSONTyped(json5, ignoreDiscriminator) {
|
|
356988
|
+
if (json5 == null) {
|
|
356989
|
+
return json5;
|
|
356990
|
+
}
|
|
356991
|
+
return {
|
|
356992
|
+
tenantId: json5["tenantId"] == null ? undefined : json5["tenantId"],
|
|
356993
|
+
isPrimaryProject: json5["isPrimaryProject"] == null ? undefined : json5["isPrimaryProject"],
|
|
356994
|
+
externalProjectId: json5["externalProjectId"] == null ? undefined : json5["externalProjectId"]
|
|
356995
|
+
};
|
|
356996
|
+
}
|
|
356997
|
+
|
|
356998
|
+
// ../studioweb-sdk/generated/src/models/WorkflowUiState.ts
|
|
356999
|
+
function WorkflowUiStateFromJSON(json5) {
|
|
357000
|
+
return WorkflowUiStateFromJSONTyped(json5, false);
|
|
357001
|
+
}
|
|
357002
|
+
function WorkflowUiStateFromJSONTyped(json5, ignoreDiscriminator) {
|
|
357003
|
+
if (json5 == null) {
|
|
357004
|
+
return json5;
|
|
357005
|
+
}
|
|
357006
|
+
return {
|
|
357007
|
+
id: json5["id"] == null ? undefined : json5["id"],
|
|
357008
|
+
workflowId: json5["workflowId"] == null ? undefined : json5["workflowId"],
|
|
357009
|
+
json: json5["json"] == null ? undefined : json5["json"],
|
|
357010
|
+
projectId: json5["projectId"] == null ? undefined : json5["projectId"]
|
|
357011
|
+
};
|
|
357012
|
+
}
|
|
357013
|
+
|
|
357014
|
+
// ../studioweb-sdk/generated/src/models/TargetPlatform.ts
|
|
357015
|
+
function TargetPlatformFromJSON(json5) {
|
|
357016
|
+
return TargetPlatformFromJSONTyped(json5, false);
|
|
357017
|
+
}
|
|
357018
|
+
function TargetPlatformFromJSONTyped(json5, ignoreDiscriminator) {
|
|
357019
|
+
return json5;
|
|
357020
|
+
}
|
|
357021
|
+
|
|
357022
|
+
// ../studioweb-sdk/generated/src/models/ProjectDto.ts
|
|
357023
|
+
function ProjectDtoFromJSON2(json5) {
|
|
357024
|
+
return ProjectDtoFromJSONTyped(json5, false);
|
|
357025
|
+
}
|
|
357026
|
+
function ProjectDtoFromJSONTyped(json5, ignoreDiscriminator) {
|
|
357027
|
+
if (json5 == null) {
|
|
357028
|
+
return json5;
|
|
357029
|
+
}
|
|
357030
|
+
return {
|
|
357031
|
+
id: json5["id"] == null ? undefined : json5["id"],
|
|
357032
|
+
designId: json5["designId"] == null ? undefined : json5["designId"],
|
|
357033
|
+
expressionLanguage: json5["expressionLanguage"] == null ? undefined : json5["expressionLanguage"],
|
|
357034
|
+
projectType: json5["projectType"] == null ? undefined : json5["projectType"],
|
|
357035
|
+
name: json5["name"] == null ? undefined : json5["name"],
|
|
357036
|
+
description: json5["description"] == null ? undefined : json5["description"],
|
|
357037
|
+
tenantId: json5["tenantId"] == null ? undefined : json5["tenantId"],
|
|
357038
|
+
status: json5["status"] == null ? undefined : ProjectStatusFromJSON(json5["status"]),
|
|
357039
|
+
message: json5["message"] == null ? undefined : json5["message"],
|
|
357040
|
+
lastModifiedTime: json5["lastModifiedTime"] == null ? undefined : new Date(json5["lastModifiedTime"]),
|
|
357041
|
+
pinDate: json5["pinDate"] == null ? undefined : new Date(json5["pinDate"]),
|
|
357042
|
+
triggerType: json5["triggerType"] == null ? undefined : json5["triggerType"],
|
|
357043
|
+
trigger: json5["trigger"] == null ? undefined : MetadataTriggerDtoFromJSON(json5["trigger"]),
|
|
357044
|
+
connections: json5["connections"] == null ? undefined : json5["connections"].map(MetadataConnectionDtoFromJSON),
|
|
357045
|
+
lockedBy: json5["lockedBy"] == null ? undefined : json5["lockedBy"],
|
|
357046
|
+
isSharedByMe: json5["isSharedByMe"] == null ? undefined : json5["isSharedByMe"],
|
|
357047
|
+
isSharedWithMe: json5["isSharedWithMe"] == null ? undefined : json5["isSharedWithMe"],
|
|
357048
|
+
projectAppId: json5["projectAppId"] == null ? undefined : json5["projectAppId"],
|
|
357049
|
+
isSwFileSystemEnabledForApps: json5["isSwFileSystemEnabledForApps"] == null ? undefined : json5["isSwFileSystemEnabledForApps"],
|
|
357050
|
+
ownerId: json5["ownerId"] == null ? undefined : json5["ownerId"],
|
|
357051
|
+
sapContext: json5["sapContext"] == null ? undefined : SapContextDtoFromJSON(json5["sapContext"]),
|
|
357052
|
+
hasDefaultName: json5["hasDefaultName"] == null ? undefined : json5["hasDefaultName"],
|
|
357053
|
+
errorList: json5["errorList"] == null ? undefined : json5["errorList"].map(ProjectErrorInformationFromJSON),
|
|
357054
|
+
solutionId: json5["solutionId"] == null ? undefined : json5["solutionId"],
|
|
357055
|
+
testManagerMetadata: json5["testManagerMetadata"] == null ? undefined : TestManagerMetadataDtoFromJSON(json5["testManagerMetadata"]),
|
|
357056
|
+
isPreview: json5["isPreview"] == null ? undefined : json5["isPreview"],
|
|
357057
|
+
lastPublishedVersion: json5["lastPublishedVersion"] == null ? undefined : PublishResultModelFromJSON(json5["lastPublishedVersion"]),
|
|
357058
|
+
publishedToFeeds: json5["publishedToFeeds"] == null ? undefined : json5["publishedToFeeds"],
|
|
357059
|
+
sortIndex: json5["sortIndex"] == null ? undefined : json5["sortIndex"],
|
|
357060
|
+
hasTestCases: json5["hasTestCases"] == null ? undefined : json5["hasTestCases"],
|
|
357061
|
+
isApp: json5["isApp"] == null ? undefined : json5["isApp"],
|
|
357062
|
+
targetPlatform: json5["targetPlatform"] == null ? undefined : TargetPlatformFromJSON(json5["targetPlatform"]),
|
|
357063
|
+
creationTime: json5["creationTime"] == null ? undefined : new Date(json5["creationTime"]),
|
|
357064
|
+
userId: json5["userId"] == null ? undefined : json5["userId"],
|
|
357065
|
+
rootFolder: json5["rootFolder"] == null ? undefined : FolderDtoFromJSON2(json5["rootFolder"]),
|
|
357066
|
+
dependencies: json5["dependencies"] == null ? undefined : json5["dependencies"].map(PackageDtoFromJSON),
|
|
357067
|
+
uiStateWorkflows: json5["uiStateWorkflows"] == null ? undefined : json5["uiStateWorkflows"].map(WorkflowUiStateFromJSON),
|
|
357068
|
+
hasTrigger: json5["hasTrigger"] == null ? undefined : json5["hasTrigger"],
|
|
357069
|
+
disableAutoUpdate: json5["disableAutoUpdate"] == null ? undefined : json5["disableAutoUpdate"],
|
|
357070
|
+
userAccessStatus: json5["userAccessStatus"] == null ? undefined : AccessStatusFromJSON(json5["userAccessStatus"]),
|
|
357071
|
+
hasUnsavedEdits: json5["hasUnsavedEdits"] == null ? undefined : json5["hasUnsavedEdits"],
|
|
357072
|
+
projectJson: json5["projectJson"] == null ? undefined : json5["projectJson"],
|
|
357073
|
+
isReadOnly: json5["isReadOnly"] == null ? undefined : json5["isReadOnly"],
|
|
357074
|
+
version: json5["version"] == null ? undefined : json5["version"],
|
|
357075
|
+
additionalBindingProperties: json5["additionalBindingProperties"] == null ? undefined : json5["additionalBindingProperties"].map(AdditionalBindingPropertiesDtoFromJSON),
|
|
357076
|
+
workflowsWithErrors: json5["workflowsWithErrors"] == null ? undefined : json5["workflowsWithErrors"],
|
|
357077
|
+
requirePreprocessing: json5["requirePreprocessing"] == null ? undefined : json5["requirePreprocessing"],
|
|
357078
|
+
permissions: json5["permissions"] == null ? undefined : SharingPermissionsFromJSON(json5["permissions"]),
|
|
357079
|
+
projectSubType: json5["projectSubType"] == null ? undefined : json5["projectSubType"],
|
|
357080
|
+
appUsageType: json5["appUsageType"] == null ? undefined : AppUsageTypeFromJSON(json5["appUsageType"]),
|
|
357081
|
+
parentProjectId: json5["parentProjectId"] == null ? undefined : json5["parentProjectId"],
|
|
357082
|
+
jitVersion: json5["jitVersion"] == null ? undefined : json5["jitVersion"]
|
|
357083
|
+
};
|
|
357084
|
+
}
|
|
357085
|
+
// ../studioweb-sdk/generated/src/models/SolutionStatus.ts
|
|
357086
|
+
function SolutionStatusFromJSON(json5) {
|
|
357087
|
+
return SolutionStatusFromJSONTyped(json5, false);
|
|
357088
|
+
}
|
|
357089
|
+
function SolutionStatusFromJSONTyped(json5, ignoreDiscriminator) {
|
|
357090
|
+
return json5;
|
|
357091
|
+
}
|
|
357092
|
+
|
|
357093
|
+
// ../studioweb-sdk/generated/src/models/SolutionPublishStatus.ts
|
|
357094
|
+
function SolutionPublishStatusFromJSON(json5) {
|
|
357095
|
+
return SolutionPublishStatusFromJSONTyped(json5, false);
|
|
357096
|
+
}
|
|
357097
|
+
function SolutionPublishStatusFromJSONTyped(json5, ignoreDiscriminator) {
|
|
357098
|
+
return json5;
|
|
357099
|
+
}
|
|
357100
|
+
|
|
357101
|
+
// ../studioweb-sdk/generated/src/models/SolutionDto.ts
|
|
357102
|
+
function SolutionDtoFromJSON(json5) {
|
|
357103
|
+
return SolutionDtoFromJSONTyped(json5, false);
|
|
357104
|
+
}
|
|
357105
|
+
function SolutionDtoFromJSONTyped(json5, ignoreDiscriminator) {
|
|
357106
|
+
if (json5 == null) {
|
|
357107
|
+
return json5;
|
|
357108
|
+
}
|
|
357109
|
+
return {
|
|
357110
|
+
id: json5["id"] == null ? undefined : json5["id"],
|
|
357111
|
+
name: json5["name"] == null ? undefined : json5["name"],
|
|
357112
|
+
description: json5["description"] == null ? undefined : json5["description"],
|
|
357113
|
+
userId: json5["userId"] == null ? undefined : json5["userId"],
|
|
357114
|
+
organizationId: json5["organizationId"] == null ? undefined : json5["organizationId"],
|
|
357115
|
+
status: json5["status"] == null ? undefined : SolutionStatusFromJSON(json5["status"]),
|
|
357116
|
+
projects: json5["projects"] == null ? undefined : json5["projects"].map(ProjectDtoFromJSON2),
|
|
357117
|
+
isSharedWithMe: json5["isSharedWithMe"] == null ? undefined : json5["isSharedWithMe"],
|
|
357118
|
+
isSharedByMe: json5["isSharedByMe"] == null ? undefined : json5["isSharedByMe"],
|
|
357119
|
+
permissions: json5["permissions"] == null ? undefined : SharingPermissionsFromJSON(json5["permissions"]),
|
|
357120
|
+
lastModifiedTime: json5["lastModifiedTime"] == null ? undefined : new Date(json5["lastModifiedTime"]),
|
|
357121
|
+
resourcesLastModifiedTime: json5["resourcesLastModifiedTime"] == null ? undefined : new Date(json5["resourcesLastModifiedTime"]),
|
|
357122
|
+
hasDraftEdits: json5["hasDraftEdits"] == null ? undefined : json5["hasDraftEdits"],
|
|
357123
|
+
publishStatus: json5["publishStatus"] == null ? undefined : SolutionPublishStatusFromJSON(json5["publishStatus"]),
|
|
357124
|
+
lastAccessedTenantId: json5["lastAccessedTenantId"] == null ? undefined : json5["lastAccessedTenantId"],
|
|
357125
|
+
automationHubIdeaUrl: json5["automationHubIdeaUrl"] == null ? undefined : json5["automationHubIdeaUrl"]
|
|
357126
|
+
};
|
|
357127
|
+
}
|
|
357128
|
+
// ../studioweb-sdk/generated/src/apis/SolutionApi.ts
|
|
357129
|
+
class SolutionApi extends BaseAPI5 {
|
|
357130
|
+
async solutionGetSolutionRaw(requestParameters, initOverrides) {
|
|
357131
|
+
if (requestParameters["solutionId"] == null) {
|
|
357132
|
+
throw new RequiredError5("solutionId", 'Required parameter "solutionId" was null or undefined when calling solutionGetSolution().');
|
|
357133
|
+
}
|
|
357134
|
+
const queryParameters = {};
|
|
357135
|
+
if (requestParameters["includeReconciliationContext"] != null) {
|
|
357136
|
+
queryParameters["includeReconciliationContext"] = requestParameters["includeReconciliationContext"];
|
|
357137
|
+
}
|
|
357138
|
+
if (requestParameters["apiVersion"] != null) {
|
|
357139
|
+
queryParameters["api-version"] = requestParameters["apiVersion"];
|
|
357140
|
+
}
|
|
357141
|
+
const headerParameters = {};
|
|
357142
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
357143
|
+
const token = this.configuration.accessToken;
|
|
357144
|
+
const tokenString = await token("Bearer", []);
|
|
357145
|
+
if (tokenString) {
|
|
357146
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
357147
|
+
}
|
|
357148
|
+
}
|
|
357149
|
+
let urlPath = `/api/Solution/{solutionId}`;
|
|
357150
|
+
urlPath = urlPath.replace(`{${"solutionId"}}`, encodeURIComponent(String(requestParameters["solutionId"])));
|
|
357151
|
+
const response = await this.request({
|
|
357152
|
+
path: urlPath,
|
|
357153
|
+
method: "GET",
|
|
357154
|
+
headers: headerParameters,
|
|
357155
|
+
query: queryParameters
|
|
357156
|
+
}, initOverrides);
|
|
357157
|
+
return new JSONApiResponse5(response, (jsonValue) => SolutionDtoFromJSON(jsonValue));
|
|
357158
|
+
}
|
|
357159
|
+
async solutionGetSolution(requestParameters, initOverrides) {
|
|
357160
|
+
const response = await this.solutionGetSolutionRaw(requestParameters, initOverrides);
|
|
357161
|
+
return await response.value();
|
|
357162
|
+
}
|
|
357163
|
+
async solutionImportSolutionRaw(requestParameters, initOverrides) {
|
|
357164
|
+
if (requestParameters["uploadFile"] == null) {
|
|
357165
|
+
throw new RequiredError5("uploadFile", 'Required parameter "uploadFile" was null or undefined when calling solutionImportSolution().');
|
|
357166
|
+
}
|
|
357167
|
+
const queryParameters = {};
|
|
357168
|
+
if (requestParameters["apiVersion"] != null) {
|
|
357169
|
+
queryParameters["api-version"] = requestParameters["apiVersion"];
|
|
357170
|
+
}
|
|
357171
|
+
const headerParameters = {};
|
|
357172
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
357173
|
+
const token = this.configuration.accessToken;
|
|
357174
|
+
const tokenString = await token("Bearer", []);
|
|
357175
|
+
if (tokenString) {
|
|
357176
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
357177
|
+
}
|
|
357178
|
+
}
|
|
357179
|
+
const consumes = [
|
|
357180
|
+
{ contentType: "multipart/form-data" }
|
|
357181
|
+
];
|
|
357182
|
+
const canConsumeForm3 = canConsumeForm2(consumes);
|
|
357183
|
+
let formParams;
|
|
357184
|
+
let useForm = false;
|
|
357185
|
+
useForm = canConsumeForm3;
|
|
357186
|
+
if (useForm) {
|
|
357187
|
+
formParams = new FormData;
|
|
357188
|
+
} else {
|
|
357189
|
+
formParams = new URLSearchParams;
|
|
357190
|
+
}
|
|
357191
|
+
if (requestParameters["uploadFile"] != null) {
|
|
357192
|
+
formParams.append("uploadFile", requestParameters["uploadFile"]);
|
|
357193
|
+
}
|
|
357194
|
+
if (requestParameters["isHidden"] != null) {
|
|
357195
|
+
formParams.append("isHidden", requestParameters["isHidden"]);
|
|
357196
|
+
}
|
|
357197
|
+
if (requestParameters["createSnapshot"] != null) {
|
|
357198
|
+
formParams.append("createSnapshot", requestParameters["createSnapshot"]);
|
|
357199
|
+
}
|
|
357200
|
+
let urlPath = `/api/Solution/Import`;
|
|
357201
|
+
const response = await this.request({
|
|
357202
|
+
path: urlPath,
|
|
357203
|
+
method: "POST",
|
|
357204
|
+
headers: headerParameters,
|
|
357205
|
+
query: queryParameters,
|
|
357206
|
+
body: formParams
|
|
357207
|
+
}, initOverrides);
|
|
357208
|
+
return new JSONApiResponse5(response, (jsonValue) => SolutionDtoFromJSON(jsonValue));
|
|
357209
|
+
}
|
|
357210
|
+
async solutionImportSolution(requestParameters, initOverrides) {
|
|
357211
|
+
const response = await this.solutionImportSolutionRaw(requestParameters, initOverrides);
|
|
357212
|
+
return await response.value();
|
|
357213
|
+
}
|
|
357214
|
+
async solutionOverwriteSolutionRaw(requestParameters, initOverrides) {
|
|
357215
|
+
if (requestParameters["solutionId"] == null) {
|
|
357216
|
+
throw new RequiredError5("solutionId", 'Required parameter "solutionId" was null or undefined when calling solutionOverwriteSolution().');
|
|
357217
|
+
}
|
|
357218
|
+
if (requestParameters["uploadFile"] == null) {
|
|
357219
|
+
throw new RequiredError5("uploadFile", 'Required parameter "uploadFile" was null or undefined when calling solutionOverwriteSolution().');
|
|
357220
|
+
}
|
|
357221
|
+
const queryParameters = {};
|
|
357222
|
+
if (requestParameters["apiVersion"] != null) {
|
|
357223
|
+
queryParameters["api-version"] = requestParameters["apiVersion"];
|
|
357224
|
+
}
|
|
357225
|
+
const headerParameters = {};
|
|
357226
|
+
if (requestParameters["xUiPathSWLockKey"] != null) {
|
|
357227
|
+
headerParameters["x-UiPath-SW-LockKey"] = String(requestParameters["xUiPathSWLockKey"]);
|
|
357228
|
+
}
|
|
357229
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
357230
|
+
const token = this.configuration.accessToken;
|
|
357231
|
+
const tokenString = await token("Bearer", []);
|
|
357232
|
+
if (tokenString) {
|
|
357233
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
357234
|
+
}
|
|
357235
|
+
}
|
|
357236
|
+
const consumes = [
|
|
357237
|
+
{ contentType: "multipart/form-data" }
|
|
357238
|
+
];
|
|
357239
|
+
const canConsumeForm3 = canConsumeForm2(consumes);
|
|
357240
|
+
let formParams;
|
|
357241
|
+
let useForm = false;
|
|
357242
|
+
useForm = canConsumeForm3;
|
|
357243
|
+
if (useForm) {
|
|
357244
|
+
formParams = new FormData;
|
|
357245
|
+
} else {
|
|
357246
|
+
formParams = new URLSearchParams;
|
|
357247
|
+
}
|
|
357248
|
+
if (requestParameters["uploadFile"] != null) {
|
|
357249
|
+
formParams.append("uploadFile", requestParameters["uploadFile"]);
|
|
357250
|
+
}
|
|
357251
|
+
if (requestParameters["isHidden"] != null) {
|
|
357252
|
+
formParams.append("isHidden", requestParameters["isHidden"]);
|
|
357253
|
+
}
|
|
357254
|
+
if (requestParameters["createSnapshot"] != null) {
|
|
357255
|
+
formParams.append("createSnapshot", requestParameters["createSnapshot"]);
|
|
357256
|
+
}
|
|
357257
|
+
let urlPath = `/api/Solution/{solutionId}/Overwrite`;
|
|
357258
|
+
urlPath = urlPath.replace(`{${"solutionId"}}`, encodeURIComponent(String(requestParameters["solutionId"])));
|
|
357259
|
+
const response = await this.request({
|
|
357260
|
+
path: urlPath,
|
|
357261
|
+
method: "POST",
|
|
357262
|
+
headers: headerParameters,
|
|
357263
|
+
query: queryParameters,
|
|
357264
|
+
body: formParams
|
|
357265
|
+
}, initOverrides);
|
|
357266
|
+
return new JSONApiResponse5(response, (jsonValue) => SolutionDtoFromJSON(jsonValue));
|
|
357267
|
+
}
|
|
357268
|
+
async solutionOverwriteSolution(requestParameters, initOverrides) {
|
|
357269
|
+
const response = await this.solutionOverwriteSolutionRaw(requestParameters, initOverrides);
|
|
357270
|
+
return await response.value();
|
|
357271
|
+
}
|
|
357272
|
+
}
|
|
357273
|
+
// ../studioweb-sdk/src/client.ts
|
|
357274
|
+
function studioWebBasePath(config5, organizationName) {
|
|
357275
|
+
return `${config5.baseUrl}/${organizationName}/studio_/backend`;
|
|
357276
|
+
}
|
|
357277
|
+
function buildStudioWebConfiguration(config5, organizationName) {
|
|
357278
|
+
const headers = {};
|
|
357279
|
+
if (config5.tenantId) {
|
|
357280
|
+
headers["x-uipath-tenantid"] = config5.tenantId;
|
|
357281
|
+
}
|
|
357282
|
+
return new Configuration5({
|
|
357283
|
+
basePath: studioWebBasePath(config5, organizationName),
|
|
357284
|
+
accessToken: config5.authToken,
|
|
357285
|
+
headers
|
|
357286
|
+
});
|
|
357287
|
+
}
|
|
357288
|
+
function createSolutionApi(config5, organizationName) {
|
|
357289
|
+
return new SolutionApi(buildStudioWebConfiguration(config5, organizationName));
|
|
357290
|
+
}
|
|
357291
|
+
// ../solution-sdk/src/solution-info.ts
|
|
357292
|
+
async function getStudioWebSolutionProjects(config5, organizationName, solutionId) {
|
|
357293
|
+
const api4 = createSolutionApi(config5, organizationName);
|
|
357294
|
+
try {
|
|
357295
|
+
const solution = await api4.solutionGetSolution({ solutionId });
|
|
357296
|
+
return (solution.projects ?? []).flatMap((project) => project.id ? [
|
|
357297
|
+
{
|
|
357298
|
+
id: project.id,
|
|
357299
|
+
designId: project.designId ?? undefined,
|
|
357300
|
+
name: project.name ?? undefined,
|
|
357301
|
+
projectType: project.projectType ?? undefined
|
|
357302
|
+
}
|
|
357303
|
+
] : []);
|
|
357304
|
+
} catch (error95) {
|
|
357305
|
+
if (error95 instanceof ResponseError5) {
|
|
357306
|
+
if (error95.response.status === 404) {
|
|
357307
|
+
return;
|
|
357308
|
+
}
|
|
357309
|
+
const text = await error95.response.text().catch(() => "");
|
|
357310
|
+
throw new Error(`Studio Web solution lookup failed (${error95.response.status}): ${text}`);
|
|
357311
|
+
}
|
|
357312
|
+
throw error95;
|
|
357313
|
+
}
|
|
357314
|
+
}
|
|
356002
357315
|
// ../solution-sdk/src/upload-service.ts
|
|
356003
357316
|
class HttpError extends Error {
|
|
356004
357317
|
status;
|
|
@@ -356353,12 +357666,15 @@ class FlowDebugService {
|
|
|
356353
357666
|
await this.writeFlowProjectPackage(projectStagingDir, flowData, bpmnXml, flowFileName);
|
|
356354
357667
|
logger.info(`Generated BPMN package for sibling flow "${flowFileName.replace(/\.flow$/i, "")}"`);
|
|
356355
357668
|
}
|
|
356356
|
-
async writeFlowProjectPackage(projectDir, flowData, bpmnXml, flowFileName) {
|
|
357669
|
+
async writeFlowProjectPackage(projectDir, flowData, bpmnXml, flowFileName, inlineAgentPackages = []) {
|
|
356357
357670
|
const bpmnFileName = `${flowFileName.replace(/\.flow$/i, "")}.bpmn`;
|
|
356358
357671
|
await writeFlowWorkflow(this.fs.path.join(projectDir, flowFileName), flowData);
|
|
356359
357672
|
await this.fs.writeFile(this.fs.path.join(projectDir, bpmnFileName), bpmnXml);
|
|
356360
357673
|
const startEventId = extractStartEventId(bpmnXml);
|
|
356361
|
-
const entryPoints = await
|
|
357674
|
+
const { entryPoints } = await writePackagingArtifactsDetailed(this.fs, projectDir, flowData.id, fileNodesToPackagingNodes(flowData.nodes), flowData.bindings ?? [], flowData.variables ?? {}, bpmnFileName, startEventId, flowFileName, flowData.definitions ?? [], {
|
|
357675
|
+
additionalEntryPoints: inlineAgentPackages.map((agent) => agent.entryPoint),
|
|
357676
|
+
additionalBindingsJsons: inlineAgentPackages.map((agent) => agent.bindingsJson)
|
|
357677
|
+
});
|
|
356362
357678
|
await writeResolvedFlow(this.fs, projectDir, flowFileName.replace(/\.flow$/i, ""), flowData);
|
|
356363
357679
|
return { bpmnFileName, startEventId, entryPoints };
|
|
356364
357680
|
}
|
|
@@ -356489,31 +357805,10 @@ class FlowDebugService {
|
|
|
356489
357805
|
const stagingProjectDir = this.fs.path.join(stagingDir, flowProjectRelDir);
|
|
356490
357806
|
await this.fs.mkdir(stagingProjectDir);
|
|
356491
357807
|
await this.fs.writeFile(this.fs.path.join(stagingProjectDir, "project.uiproj"), projectUiprojContent);
|
|
356492
|
-
const { bpmnFileName, startEventId, entryPoints } = await this.writeFlowProjectPackage(stagingProjectDir, flowData, bpmnXml, `${safeName}.flow`);
|
|
356493
357808
|
const inlineAgentPackages = await packageInlineAgents(this.fs, absoluteProjectPath, flowData.nodes);
|
|
356494
|
-
|
|
356495
|
-
const srcDir = this.fs.path.join(absoluteProjectPath, agent.source);
|
|
356496
|
-
const destDir = this.fs.path.join(stagingProjectDir, agent.source);
|
|
356497
|
-
if (await this.fs.exists(srcDir)) {
|
|
356498
|
-
await this.fs.copyDirectory(srcDir, destDir);
|
|
356499
|
-
}
|
|
356500
|
-
const agentBuilderDir = this.fs.path.join(destDir, ".agent-builder");
|
|
356501
|
-
await this.fs.mkdir(agentBuilderDir);
|
|
356502
|
-
await this.fs.writeFile(this.fs.path.join(agentBuilderDir, "agent.json"), JSON.stringify({
|
|
356503
|
-
...agent.agentJson,
|
|
356504
|
-
resources: agent.agentJson.resources ?? [],
|
|
356505
|
-
features: agent.agentJson.features ?? []
|
|
356506
|
-
}, null, 2));
|
|
356507
|
-
await this.fs.writeFile(this.fs.path.join(agentBuilderDir, "bindings.json"), JSON.stringify({ version: "2.0", resources: [] }, null, 2));
|
|
356508
|
-
logger.info(`Staged inline agent "${agent.source}" for debug`);
|
|
356509
|
-
}
|
|
357809
|
+
const { bpmnFileName, startEventId, entryPoints } = await this.writeFlowProjectPackage(stagingProjectDir, flowData, bpmnXml, `${safeName}.flow`, inlineAgentPackages);
|
|
356510
357810
|
if (inlineAgentPackages.length > 0) {
|
|
356511
|
-
|
|
356512
|
-
...entryPoints,
|
|
356513
|
-
...inlineAgentPackages.map((a2) => a2.entryPoint)
|
|
356514
|
-
];
|
|
356515
|
-
await this.fs.writeFile(this.fs.path.join(stagingProjectDir, "entry-points.json"), `${JSON.stringify(generateEntryPointsJson(allEntryPoints), null, 2)}
|
|
356516
|
-
`);
|
|
357811
|
+
await stageInlineAgentPackageFiles(this.fs, absoluteProjectPath, stagingProjectDir, inlineAgentPackages, (source) => `Staged inline agent "${source}" for debug`);
|
|
356517
357812
|
}
|
|
356518
357813
|
const inlineAgents = buildInlineAgentDescriptors(flowData.nodes);
|
|
356519
357814
|
const startNodeId = entryPoints[0]?.filePath.split("#")[1] ?? startEventId;
|
|
@@ -356709,6 +358004,10 @@ function buildHttpFailureOutput(err2) {
|
|
|
356709
358004
|
Context: Context2
|
|
356710
358005
|
};
|
|
356711
358006
|
}
|
|
358007
|
+
function summarizePlatformBody(body) {
|
|
358008
|
+
const trimmed = body.trim().replace(/\s+/g, " ");
|
|
358009
|
+
return trimmed.length > 200 ? `${trimmed.slice(0, 200)}…` : trimmed;
|
|
358010
|
+
}
|
|
356712
358011
|
function pickInstructions(err2) {
|
|
356713
358012
|
const isOpaque5xx = err2.httpStatus >= 500 && err2.httpStatus < 600 && (err2.parsedErrorCode === undefined || err2.parsedErrorCode === "0");
|
|
356714
358013
|
if (isOpaque5xx && err2.parsedTraceId) {
|
|
@@ -356718,7 +358017,14 @@ function pickInstructions(err2) {
|
|
|
356718
358017
|
return `Authentication/authorization rejected by ${err2.method} ${err2.endpoint}. ` + `Run 'uip login' and verify the active tenant has access.`;
|
|
356719
358018
|
}
|
|
356720
358019
|
if (err2.httpStatus === 404) {
|
|
356721
|
-
|
|
358020
|
+
const isStructured = err2.parsedErrorMessage !== undefined || err2.parsedErrorCode !== undefined;
|
|
358021
|
+
if (!isStructured) {
|
|
358022
|
+
const body = summarizePlatformBody(err2.body);
|
|
358023
|
+
const bodySuffix = body ? ` Platform response: "${body}".` : "";
|
|
358024
|
+
return `${err2.method} ${err2.endpoint} returned 404 during '${err2.stage ?? "request"}', ` + `but the response was not a structured Orchestrator error — the request likely ` + `did not reach the tenant. This usually means the organization or tenant in your ` + `login session is wrong or was renamed. Run 'uip login tenant list' to see the ` + `current tenant names, re-select with 'uip login tenant set <name>' (or re-run ` + `'uip login'), then retry. Do not create a new workspace or retry as-is — the ` + `resource likely exists under the current tenant name.${bodySuffix}`;
|
|
358025
|
+
}
|
|
358026
|
+
const detail2 = err2.parsedErrorMessage ? ` Backend reported: "${err2.parsedErrorMessage}".` : "";
|
|
358027
|
+
return `${err2.method} ${err2.endpoint} returned 404 during '${err2.stage ?? "request"}'. ` + `The target resource may not exist — verify upstream IDs (solutionId, instanceId) ` + `and re-run.${detail2}`;
|
|
356722
358028
|
}
|
|
356723
358029
|
const detail = err2.parsedErrorMessage ? ` Backend reported: "${err2.parsedErrorMessage}".` : "";
|
|
356724
358030
|
return `${err2.method} ${err2.endpoint} failed with HTTP ${err2.httpStatus} during ` + `'${err2.stage ?? "request"}'.${detail} Inspect the response body for details ` + `and retry once before reporting.`;
|
|
@@ -357505,63 +358811,6 @@ var registerEdgeCommand = (program2) => {
|
|
|
357505
358811
|
// src/services/flow-eval-service.ts
|
|
357506
358812
|
init_src();
|
|
357507
358813
|
|
|
357508
|
-
// src/services/flow-eval-file-store.ts
|
|
357509
|
-
async function ensureDirectory(fs9, path4) {
|
|
357510
|
-
if (await fs9.exists(path4)) {
|
|
357511
|
-
return;
|
|
357512
|
-
}
|
|
357513
|
-
const parent = fs9.path.dirname(path4);
|
|
357514
|
-
if (parent && parent !== path4 && !await fs9.exists(parent)) {
|
|
357515
|
-
await ensureDirectory(fs9, parent);
|
|
357516
|
-
}
|
|
357517
|
-
const [error95] = await catchError(fs9.mkdir(path4));
|
|
357518
|
-
if (error95 && !await fs9.exists(path4)) {
|
|
357519
|
-
throw error95;
|
|
357520
|
-
}
|
|
357521
|
-
}
|
|
357522
|
-
|
|
357523
|
-
class FlowEvalFileStore {
|
|
357524
|
-
fs;
|
|
357525
|
-
constructor(fs9) {
|
|
357526
|
-
this.fs = fs9;
|
|
357527
|
-
}
|
|
357528
|
-
async readJsonFiles(dir3) {
|
|
357529
|
-
const [readDirError, files] = await catchError(this.fs.readdir(dir3));
|
|
357530
|
-
if (readDirError) {
|
|
357531
|
-
return [];
|
|
357532
|
-
}
|
|
357533
|
-
const items = [];
|
|
357534
|
-
for (const file5 of files) {
|
|
357535
|
-
if (!file5.endsWith(".json")) {
|
|
357536
|
-
continue;
|
|
357537
|
-
}
|
|
357538
|
-
const filePath = this.fs.path.join(dir3, file5);
|
|
357539
|
-
const [readError, raw] = await catchError(this.fs.readFile(filePath, "utf-8"));
|
|
357540
|
-
if (readError) {
|
|
357541
|
-
throw new Error(`Failed to read JSON file "${filePath}": ${readError.message}`);
|
|
357542
|
-
}
|
|
357543
|
-
if (raw === null) {
|
|
357544
|
-
continue;
|
|
357545
|
-
}
|
|
357546
|
-
const [parseError, data] = catchError(() => JSON.parse(String(raw)));
|
|
357547
|
-
if (parseError) {
|
|
357548
|
-
throw new Error(`Invalid JSON in "${filePath}": ${parseError.message}`);
|
|
357549
|
-
}
|
|
357550
|
-
data.fileName = file5;
|
|
357551
|
-
items.push(data);
|
|
357552
|
-
}
|
|
357553
|
-
return items;
|
|
357554
|
-
}
|
|
357555
|
-
async writeJsonFile(path4, value) {
|
|
357556
|
-
await ensureDirectory(this.fs, this.fs.path.dirname(path4));
|
|
357557
|
-
await this.fs.writeFile(path4, `${JSON.stringify(value, null, 2)}
|
|
357558
|
-
`);
|
|
357559
|
-
}
|
|
357560
|
-
async remove(path4) {
|
|
357561
|
-
await this.fs.rm(path4);
|
|
357562
|
-
}
|
|
357563
|
-
}
|
|
357564
|
-
|
|
357565
358814
|
// src/services/flow-eval-files.ts
|
|
357566
358815
|
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
357567
358816
|
var EVALUATION_FILES_DIR = "evaluationFiles";
|
|
@@ -358037,7 +359286,7 @@ function evaluatorCanUseSharedExpectedOutput(typeId) {
|
|
|
358037
359286
|
return getEvaluatorTypeDefinition(typeId)?.criteriaFields.some((field) => field.key === "expectedOutput" && field.type === "object") ?? false;
|
|
358038
359287
|
}
|
|
358039
359288
|
// src/services/flow-eval-utils.ts
|
|
358040
|
-
function
|
|
359289
|
+
function isRecord4(value) {
|
|
358041
359290
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
358042
359291
|
}
|
|
358043
359292
|
var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
@@ -358080,7 +359329,7 @@ function buildDefaultCriteria(evaluators, expectedOutput, searchText) {
|
|
|
358080
359329
|
criterias[key] = { searchText };
|
|
358081
359330
|
} else {
|
|
358082
359331
|
const defaultCriteria = evaluator.evaluatorConfig.defaultEvaluationCriteria;
|
|
358083
|
-
criterias[key] =
|
|
359332
|
+
criterias[key] = isRecord4(defaultCriteria) ? defaultCriteria : null;
|
|
358084
359333
|
}
|
|
358085
359334
|
}
|
|
358086
359335
|
return criterias;
|
|
@@ -358123,13 +359372,13 @@ function readFlowGlobalsAsInputs(flowContent) {
|
|
|
358123
359372
|
} catch {
|
|
358124
359373
|
return inputs;
|
|
358125
359374
|
}
|
|
358126
|
-
if (!
|
|
359375
|
+
if (!isRecord4(parsed)) {
|
|
358127
359376
|
return inputs;
|
|
358128
359377
|
}
|
|
358129
|
-
const variables =
|
|
359378
|
+
const variables = isRecord4(parsed.variables) ? parsed.variables : undefined;
|
|
358130
359379
|
const globals = Array.isArray(variables?.globals) ? variables.globals : [];
|
|
358131
359380
|
for (const entry of globals) {
|
|
358132
|
-
if (!
|
|
359381
|
+
if (!isRecord4(entry)) {
|
|
358133
359382
|
continue;
|
|
358134
359383
|
}
|
|
358135
359384
|
if (entry.direction !== "in" || typeof entry.id !== "string") {
|
|
@@ -358165,7 +359414,7 @@ function readWorkflowId(flowContent) {
|
|
|
358165
359414
|
if (parseError) {
|
|
358166
359415
|
return;
|
|
358167
359416
|
}
|
|
358168
|
-
if (!
|
|
359417
|
+
if (!isRecord4(parsed) || typeof parsed.id !== "string") {
|
|
358169
359418
|
return;
|
|
358170
359419
|
}
|
|
358171
359420
|
if (parsed.id === "" || parsed.id.includes("/") || parsed.id.includes("\\") || parsed.id.includes("..")) {
|
|
@@ -358281,20 +359530,20 @@ class FlowEvalPathResolver {
|
|
|
358281
359530
|
}
|
|
358282
359531
|
function readStartNodeId(flowContent) {
|
|
358283
359532
|
const parsed = JSON.parse(flowContent);
|
|
358284
|
-
if (!
|
|
359533
|
+
if (!isRecord4(parsed) || !Array.isArray(parsed.nodes)) {
|
|
358285
359534
|
return;
|
|
358286
359535
|
}
|
|
358287
|
-
const nodes = parsed.nodes.filter(
|
|
359536
|
+
const nodes = parsed.nodes.filter(isRecord4);
|
|
358288
359537
|
const defaultEntry = nodes.find((node2) => {
|
|
358289
|
-
const inputs =
|
|
359538
|
+
const inputs = isRecord4(node2.inputs) ? node2.inputs : undefined;
|
|
358290
359539
|
if (inputs?.isDefaultEntryPoint === true) {
|
|
358291
359540
|
return true;
|
|
358292
359541
|
}
|
|
358293
|
-
const model =
|
|
359542
|
+
const model = isRecord4(node2.model) ? node2.model : undefined;
|
|
358294
359543
|
return model?.isDefaultEntryPoint === true;
|
|
358295
359544
|
});
|
|
358296
359545
|
const startNode = defaultEntry ?? nodes.find((node2) => {
|
|
358297
|
-
const model =
|
|
359546
|
+
const model = isRecord4(node2.model) ? node2.model : undefined;
|
|
358298
359547
|
return model?.type === "bpmn:StartEvent" || node2.type === "core.trigger.manual";
|
|
358299
359548
|
}) ?? nodes[0];
|
|
358300
359549
|
return typeof startNode?.id === "string" ? startNode.id : undefined;
|
|
@@ -358591,12 +359840,12 @@ function readFlowGlobalsAsOutputs(flowContent) {
|
|
|
358591
359840
|
} catch {
|
|
358592
359841
|
return outputs;
|
|
358593
359842
|
}
|
|
358594
|
-
if (!
|
|
359843
|
+
if (!isRecord4(parsed))
|
|
358595
359844
|
return outputs;
|
|
358596
|
-
const variables =
|
|
359845
|
+
const variables = isRecord4(parsed.variables) ? parsed.variables : undefined;
|
|
358597
359846
|
const globals = Array.isArray(variables?.globals) ? variables.globals : [];
|
|
358598
359847
|
for (const entry of globals) {
|
|
358599
|
-
if (!
|
|
359848
|
+
if (!isRecord4(entry))
|
|
358600
359849
|
continue;
|
|
358601
359850
|
if (entry.direction !== "out")
|
|
358602
359851
|
continue;
|
|
@@ -358645,11 +359894,11 @@ function extractNodeOutputSchema(flowContent, componentId, wrapAllOutputs) {
|
|
|
358645
359894
|
} catch {
|
|
358646
359895
|
return { schema: undefined, nodeFound: false };
|
|
358647
359896
|
}
|
|
358648
|
-
if (!
|
|
359897
|
+
if (!isRecord4(parsed)) {
|
|
358649
359898
|
return { schema: undefined, nodeFound: false };
|
|
358650
359899
|
}
|
|
358651
359900
|
const nodes = Array.isArray(parsed.nodes) ? parsed.nodes : [];
|
|
358652
|
-
const node2 = nodes.find((n) =>
|
|
359901
|
+
const node2 = nodes.find((n) => isRecord4(n) && n.id === componentId);
|
|
358653
359902
|
if (!node2) {
|
|
358654
359903
|
return { schema: undefined, nodeFound: false };
|
|
358655
359904
|
}
|
|
@@ -358666,7 +359915,7 @@ function extractNodeOutputSchema(flowContent, componentId, wrapAllOutputs) {
|
|
|
358666
359915
|
return { schema: schema70, nodeFound: true };
|
|
358667
359916
|
}
|
|
358668
359917
|
}
|
|
358669
|
-
const outputs =
|
|
359918
|
+
const outputs = isRecord4(node2.outputs) ? node2.outputs : undefined;
|
|
358670
359919
|
if (outputs && Object.keys(outputs).length > 0) {
|
|
358671
359920
|
if (!wrapAllOutputs && "output" in outputs) {
|
|
358672
359921
|
return { schema: outputs.output, nodeFound: true };
|
|
@@ -358679,37 +359928,37 @@ function extractNodeOutputSchema(flowContent, componentId, wrapAllOutputs) {
|
|
|
358679
359928
|
return { schema: undefined, nodeFound: true };
|
|
358680
359929
|
}
|
|
358681
359930
|
function extractConnectorOutputSchema(node2) {
|
|
358682
|
-
if (!
|
|
359931
|
+
if (!isRecord4(node2.inputs))
|
|
358683
359932
|
return;
|
|
358684
359933
|
const detail = node2.inputs.detail;
|
|
358685
359934
|
let detailObj;
|
|
358686
359935
|
if (typeof detail === "string") {
|
|
358687
359936
|
try {
|
|
358688
359937
|
const parsed = JSON.parse(detail);
|
|
358689
|
-
if (!
|
|
359938
|
+
if (!isRecord4(parsed))
|
|
358690
359939
|
return;
|
|
358691
359940
|
detailObj = parsed;
|
|
358692
359941
|
} catch {
|
|
358693
359942
|
return;
|
|
358694
359943
|
}
|
|
358695
|
-
} else if (
|
|
359944
|
+
} else if (isRecord4(detail)) {
|
|
358696
359945
|
detailObj = detail;
|
|
358697
359946
|
} else {
|
|
358698
359947
|
return;
|
|
358699
359948
|
}
|
|
358700
|
-
const config5 =
|
|
359949
|
+
const config5 = isRecord4(detailObj.configuration) ? detailObj.configuration : undefined;
|
|
358701
359950
|
if (!config5)
|
|
358702
359951
|
return;
|
|
358703
|
-
const fieldsContainer =
|
|
359952
|
+
const fieldsContainer = isRecord4(config5.fieldsContainer) ? config5.fieldsContainer : undefined;
|
|
358704
359953
|
if (!fieldsContainer)
|
|
358705
359954
|
return;
|
|
358706
359955
|
const schema70 = fieldsContainer.outputJsonSchema;
|
|
358707
|
-
if (!schema70 || !
|
|
359956
|
+
if (!schema70 || !isRecord4(schema70))
|
|
358708
359957
|
return;
|
|
358709
359958
|
return schema70;
|
|
358710
359959
|
}
|
|
358711
359960
|
function extractAgentOutputSchema(node2) {
|
|
358712
|
-
if (!
|
|
359961
|
+
if (!isRecord4(node2.inputs))
|
|
358713
359962
|
return;
|
|
358714
359963
|
const agentOutputVariables = node2.inputs.agentOutputVariables;
|
|
358715
359964
|
if (!Array.isArray(agentOutputVariables) || agentOutputVariables.length === 0) {
|
|
@@ -358717,10 +359966,10 @@ function extractAgentOutputSchema(node2) {
|
|
|
358717
359966
|
}
|
|
358718
359967
|
const properties = {};
|
|
358719
359968
|
for (const v2 of agentOutputVariables) {
|
|
358720
|
-
if (!
|
|
359969
|
+
if (!isRecord4(v2) || typeof v2.id !== "string")
|
|
358721
359970
|
continue;
|
|
358722
359971
|
const type = typeof v2.type === "string" ? v2.type : "string";
|
|
358723
|
-
if (
|
|
359972
|
+
if (isRecord4(v2.schema)) {
|
|
358724
359973
|
properties[v2.id] = v2.schema;
|
|
358725
359974
|
} else {
|
|
358726
359975
|
properties[v2.id] = { type };
|
|
@@ -358742,20 +359991,20 @@ function cleanOutputSchema(schema70) {
|
|
|
358742
359991
|
return unwrapOutputProperty(stripped);
|
|
358743
359992
|
}
|
|
358744
359993
|
function stripAnnotations(value) {
|
|
358745
|
-
if (!
|
|
359994
|
+
if (!isRecord4(value))
|
|
358746
359995
|
return value;
|
|
358747
359996
|
const result = {};
|
|
358748
359997
|
for (const [k2, v2] of Object.entries(value)) {
|
|
358749
359998
|
if (ANNOTATION_KEYS.has(k2))
|
|
358750
359999
|
continue;
|
|
358751
|
-
result[k2] = Array.isArray(v2) ? v2.map(stripAnnotations) :
|
|
360000
|
+
result[k2] = Array.isArray(v2) ? v2.map(stripAnnotations) : isRecord4(v2) ? stripAnnotations(v2) : v2;
|
|
358752
360001
|
}
|
|
358753
360002
|
return result;
|
|
358754
360003
|
}
|
|
358755
360004
|
function unwrapOutputProperty(schema70) {
|
|
358756
|
-
if (!
|
|
360005
|
+
if (!isRecord4(schema70))
|
|
358757
360006
|
return schema70;
|
|
358758
|
-
const props =
|
|
360007
|
+
const props = isRecord4(schema70.properties) ? schema70.properties : undefined;
|
|
358759
360008
|
if (!props || !("output" in props))
|
|
358760
360009
|
return schema70;
|
|
358761
360010
|
return props.output;
|
|
@@ -359002,20 +360251,20 @@ function asRecordArray(value, label) {
|
|
|
359002
360251
|
throw new Error(`${label} response must be an array`);
|
|
359003
360252
|
}
|
|
359004
360253
|
return value.map((item, index) => {
|
|
359005
|
-
if (!
|
|
360254
|
+
if (!isRecord4(item)) {
|
|
359006
360255
|
throw new Error(`${label} response item ${index} must be an object`);
|
|
359007
360256
|
}
|
|
359008
360257
|
return item;
|
|
359009
360258
|
});
|
|
359010
360259
|
}
|
|
359011
360260
|
function readRecord(value) {
|
|
359012
|
-
return
|
|
360261
|
+
return isRecord4(value) ? value : undefined;
|
|
359013
360262
|
}
|
|
359014
360263
|
function readRecordArray(value) {
|
|
359015
360264
|
if (!Array.isArray(value)) {
|
|
359016
360265
|
return;
|
|
359017
360266
|
}
|
|
359018
|
-
return value.filter(
|
|
360267
|
+
return value.filter(isRecord4);
|
|
359019
360268
|
}
|
|
359020
360269
|
function optionalNumber(value) {
|
|
359021
360270
|
return typeof value === "number" ? value : null;
|
|
@@ -359107,7 +360356,7 @@ function readRemoteEvalRun(record5) {
|
|
|
359107
360356
|
}
|
|
359108
360357
|
];
|
|
359109
360358
|
}),
|
|
359110
|
-
error: typeof record5.error === "string" ||
|
|
360359
|
+
error: typeof record5.error === "string" || isRecord4(record5.error) ? record5.error : null,
|
|
359111
360360
|
errorMessage: typeof record5.errorMessage === "string" ? record5.errorMessage : null,
|
|
359112
360361
|
createdAt: typeof record5.createdAt === "string" ? record5.createdAt : undefined,
|
|
359113
360362
|
updatedAt: typeof record5.updatedAt === "string" ? record5.updatedAt : undefined
|
|
@@ -359128,7 +360377,7 @@ class FlowEvalRunApi {
|
|
|
359128
360377
|
}
|
|
359129
360378
|
async getEvalSetRun(config5, workloadId, evalSetRunId) {
|
|
359130
360379
|
const response = await this.requestJson(config5, `/unifiedEvals/workloads/${encodeURIComponent(workloadId)}/evalSetRuns/${encodeURIComponent(evalSetRunId)}?workloadType=Flow`, { method: "GET" });
|
|
359131
|
-
if (!
|
|
360380
|
+
if (!isRecord4(response)) {
|
|
359132
360381
|
throw new Error("Eval set run response must be an object");
|
|
359133
360382
|
}
|
|
359134
360383
|
return readRemoteEvalSetRun(response);
|
|
@@ -359322,36 +360571,13 @@ class FlowLocalWorkspaceEvalPreparer {
|
|
|
359322
360571
|
const bindings = flowData.bindings ?? [];
|
|
359323
360572
|
const workflowVariables = flowData.variables ?? {};
|
|
359324
360573
|
const definitions = flowData.definitions ?? [];
|
|
359325
|
-
const entryPoints = await writePackagingArtifacts(this.fs, stagingProjectDir, flowData.id, packagingNodes, bindings, workflowVariables, bpmnFileName, startEventId, flowFileName, definitions);
|
|
359326
|
-
await writeResolvedFlow(this.fs, stagingProjectDir, flowBaseName, flowData);
|
|
359327
|
-
await this.stageInlineAgents(stagingProjectDir, sourceProjectPath, flowData, entryPoints);
|
|
359328
|
-
}
|
|
359329
|
-
async stageInlineAgents(stagingProjectDir, sourceProjectPath, flowData, entryPoints) {
|
|
359330
360574
|
const inlineAgentPackages = await packageInlineAgents(this.fs, sourceProjectPath, flowData.nodes);
|
|
359331
|
-
|
|
359332
|
-
|
|
359333
|
-
|
|
359334
|
-
|
|
359335
|
-
|
|
359336
|
-
|
|
359337
|
-
const agentBuilderDir = this.fs.path.join(destDir, ".agent-builder");
|
|
359338
|
-
await ensureDirectory(this.fs, agentBuilderDir);
|
|
359339
|
-
await this.fs.writeFile(this.fs.path.join(agentBuilderDir, "agent.json"), JSON.stringify({
|
|
359340
|
-
...agent.agentJson,
|
|
359341
|
-
resources: agent.agentJson.resources ?? [],
|
|
359342
|
-
features: agent.agentJson.features ?? []
|
|
359343
|
-
}, null, 2));
|
|
359344
|
-
await this.fs.writeFile(this.fs.path.join(agentBuilderDir, "bindings.json"), JSON.stringify({ version: "2.0", resources: [] }, null, 2));
|
|
359345
|
-
logger.info(`Staged inline agent "${agent.source}" for eval debug`);
|
|
359346
|
-
}
|
|
359347
|
-
if (inlineAgentPackages.length > 0) {
|
|
359348
|
-
const allEntryPoints = [
|
|
359349
|
-
...entryPoints,
|
|
359350
|
-
...inlineAgentPackages.map((agent) => agent.entryPoint)
|
|
359351
|
-
];
|
|
359352
|
-
await this.fs.writeFile(this.fs.path.join(stagingProjectDir, "entry-points.json"), `${JSON.stringify(generateEntryPointsJson(allEntryPoints), null, 2)}
|
|
359353
|
-
`);
|
|
359354
|
-
}
|
|
360575
|
+
await writePackagingArtifactsDetailed(this.fs, stagingProjectDir, flowData.id, packagingNodes, bindings, workflowVariables, bpmnFileName, startEventId, flowFileName, definitions, {
|
|
360576
|
+
additionalEntryPoints: inlineAgentPackages.map((agent) => agent.entryPoint),
|
|
360577
|
+
additionalBindingsJsons: inlineAgentPackages.map((agent) => agent.bindingsJson)
|
|
360578
|
+
});
|
|
360579
|
+
await writeResolvedFlow(this.fs, stagingProjectDir, flowBaseName, flowData);
|
|
360580
|
+
await stageInlineAgentPackageFiles(this.fs, sourceProjectPath, stagingProjectDir, inlineAgentPackages, (source) => `Staged inline agent "${source}" for eval debug`);
|
|
359355
360581
|
}
|
|
359356
360582
|
createApiConfig(config5) {
|
|
359357
360583
|
return {
|
|
@@ -359406,7 +360632,7 @@ function firstString(values) {
|
|
|
359406
360632
|
}
|
|
359407
360633
|
function readFlowStringProperty(flowContent, property) {
|
|
359408
360634
|
const [parseError, parsed] = catchError(() => JSON.parse(flowContent));
|
|
359409
|
-
if (parseError || !
|
|
360635
|
+
if (parseError || !isRecord4(parsed)) {
|
|
359410
360636
|
return;
|
|
359411
360637
|
}
|
|
359412
360638
|
const value = parsed[property];
|
|
@@ -359462,15 +360688,15 @@ function withInlineAgentExecutorInfo(project) {
|
|
|
359462
360688
|
}
|
|
359463
360689
|
function extractInlineAgentProjects(flowContent, currentProjectId) {
|
|
359464
360690
|
const parsed = JSON.parse(flowContent);
|
|
359465
|
-
if (!
|
|
360691
|
+
if (!isRecord4(parsed) || !Array.isArray(parsed.nodes)) {
|
|
359466
360692
|
return [];
|
|
359467
360693
|
}
|
|
359468
360694
|
const seen = new Set;
|
|
359469
|
-
return parsed.nodes.filter(
|
|
360695
|
+
return parsed.nodes.filter(isRecord4).flatMap((node2) => {
|
|
359470
360696
|
const nodeType = typeof node2.type === "string" ? node2.type : "";
|
|
359471
|
-
const model =
|
|
359472
|
-
const inputs =
|
|
359473
|
-
const display =
|
|
360697
|
+
const model = isRecord4(node2.model) ? node2.model : undefined;
|
|
360698
|
+
const inputs = isRecord4(node2.inputs) ? node2.inputs : undefined;
|
|
360699
|
+
const display = isRecord4(node2.display) ? node2.display : undefined;
|
|
359474
360700
|
const serviceType = typeof model?.serviceType === "string" ? model.serviceType.toLowerCase() : "";
|
|
359475
360701
|
const lowerType = nodeType.toLowerCase();
|
|
359476
360702
|
const isAgent = lowerType.startsWith("uipath.agent") || serviceType.includes("agent");
|
|
@@ -359511,7 +360737,7 @@ class FlowEvalRunContextResolver {
|
|
|
359511
360737
|
this.pathResolver = pathResolver;
|
|
359512
360738
|
this.localWorkspacePreparer = localWorkspacePreparer;
|
|
359513
360739
|
}
|
|
359514
|
-
async resolveTarget(projectPath, evalSet, options, requireSolutionId) {
|
|
360740
|
+
async resolveTarget(projectPath, evalSet, options, requireSolutionId, config5) {
|
|
359515
360741
|
const absoluteProjectPath = await this.pathResolver.resolveFlowProjectPath(projectPath);
|
|
359516
360742
|
const solutionDir = this.fs.path.dirname(absoluteProjectPath);
|
|
359517
360743
|
const projectRelDir = toForwardSlash2(this.fs.path.relative(solutionDir, absoluteProjectPath));
|
|
@@ -359529,17 +360755,23 @@ class FlowEvalRunContextResolver {
|
|
|
359529
360755
|
throw new Error("Could not resolve Flow project metadata from a parent .uipx or SolutionStorage.json file. Use a flow project extracted with 'uip solution download --extract', or provide --project-id.");
|
|
359530
360756
|
}
|
|
359531
360757
|
const localProjectDebugId = await this.readLocalProjectId(absoluteProjectPath);
|
|
359532
|
-
|
|
360758
|
+
let studioWebProjectId = options.projectId ?? (localWorkspaceMarker ? storageProject?.CloudProjectId ?? storageProject?.ProjectId ?? uipxProject?.Id ?? localProjectDebugId : isVsixLocalProject ? flowProjectId ?? localProjectDebugId ?? storageProject?.CloudProjectId ?? storageProject?.ProjectId ?? uipxProject?.Id : localProjectDebugId ?? storageProject?.CloudProjectId ?? storageProject?.ProjectId ?? uipxProject?.Id);
|
|
360759
|
+
const projectIdFromUipxManifest = options.projectId === undefined && localWorkspaceMarker === undefined && !isVsixLocalProject && localProjectDebugId === undefined && storageProject?.CloudProjectId === undefined && storageProject?.ProjectId === undefined && uipxProject?.Id !== undefined;
|
|
359533
360760
|
const isLocalWorkspace = localWorkspaceMarker !== undefined;
|
|
359534
360761
|
const solutionId = options.solutionId ?? (isLocalWorkspace ? localWorkspaceMarker.SolutionId ?? solutionStorage?.SolutionId ?? uipxResult?.uipx.SolutionId : isVsixLocalProject ? vsixLocalSolutionId ?? solutionStorage?.SolutionId ?? uipxResult?.uipx.SolutionId : solutionStorage?.SolutionId ?? uipxResult?.uipx.SolutionId);
|
|
359535
360762
|
if (!studioWebProjectId) {
|
|
359536
360763
|
throw new Error("Could not resolve Flow project ID. Provide --project-id or run from a project listed in the parent .uipx or SolutionStorage.json file.");
|
|
359537
360764
|
}
|
|
360765
|
+
let cloudProjects;
|
|
360766
|
+
if (projectIdFromUipxManifest && config5 && solutionId) {
|
|
360767
|
+
cloudProjects = await this.fetchCloudProjects(config5, solutionId);
|
|
360768
|
+
studioWebProjectId = this.mapDesignIdToCloudProjectId(cloudProjects, studioWebProjectId, this.fs.path.basename(absoluteProjectPath), solutionId);
|
|
360769
|
+
}
|
|
359538
360770
|
const workloadId = readWorkflowId(flowContent) ?? studioWebProjectId;
|
|
359539
360771
|
if (requireSolutionId && !solutionId) {
|
|
359540
360772
|
throw new Error("Could not resolve solution ID. Provide --solution-id or run from a project whose parent directory contains a .uipx or SolutionStorage.json file.");
|
|
359541
360773
|
}
|
|
359542
|
-
const additionalProjects = await this.resolveAdditionalProjects(studioWebProjectId, flowContent, uipxResult?.uipx.Projects ?? [], solutionStorage, uipxProject?.Id);
|
|
360774
|
+
const additionalProjects = await this.resolveAdditionalProjects(studioWebProjectId, flowContent, uipxResult?.uipx.Projects ?? [], solutionStorage, uipxProject?.Id, cloudProjects);
|
|
359543
360775
|
return {
|
|
359544
360776
|
projectPath: absoluteProjectPath,
|
|
359545
360777
|
evalSet,
|
|
@@ -359624,7 +360856,22 @@ class FlowEvalRunContextResolver {
|
|
|
359624
360856
|
};
|
|
359625
360857
|
});
|
|
359626
360858
|
}
|
|
359627
|
-
async
|
|
360859
|
+
async fetchCloudProjects(config5, solutionId) {
|
|
360860
|
+
const cloudProjects = await getStudioWebSolutionProjects(config5, config5.organizationName, solutionId);
|
|
360861
|
+
if (cloudProjects === undefined) {
|
|
360862
|
+
throw new Error(`Solution ${solutionId} was not found in Studio Web. Upload it first with 'uip solution upload', or pass --solution-id and --project-id explicitly.`);
|
|
360863
|
+
}
|
|
360864
|
+
return cloudProjects;
|
|
360865
|
+
}
|
|
360866
|
+
mapDesignIdToCloudProjectId(cloudProjects, designProjectId, projectName, solutionId) {
|
|
360867
|
+
const match = cloudProjects.find((project) => project.designId === designProjectId) ?? cloudProjects.find((project) => project.name === projectName);
|
|
360868
|
+
if (!match) {
|
|
360869
|
+
const available = cloudProjects.map((project) => `${project.name ?? "?"} (${project.id})`).join(", ");
|
|
360870
|
+
throw new Error(`Project "${projectName}" (design ID ${designProjectId}) is not part of solution ${solutionId} in Studio Web. Available projects: ${available || "none"}. Re-upload the solution with 'uip solution upload' or pass --project-id.`);
|
|
360871
|
+
}
|
|
360872
|
+
return match.id;
|
|
360873
|
+
}
|
|
360874
|
+
async resolveAdditionalProjects(currentProjectId, flowContent, uipxProjects, solutionStorage, currentDesignProjectId, cloudProjects) {
|
|
359628
360875
|
const byId = new Map;
|
|
359629
360876
|
for (const project of extractInlineAgentProjects(flowContent, currentProjectId)) {
|
|
359630
360877
|
byId.set(project.id, project);
|
|
@@ -359634,7 +360881,7 @@ class FlowEvalRunContextResolver {
|
|
|
359634
360881
|
continue;
|
|
359635
360882
|
}
|
|
359636
360883
|
const storageProject = solutionStorage?.Projects?.find((storage) => storage.ProjectId === project.Id || storage.ProjectRelativePath === project.ProjectRelativePath);
|
|
359637
|
-
const id2 = storageProject?.CloudProjectId ?? storageProject?.ProjectId ?? project.Id;
|
|
360884
|
+
const id2 = storageProject?.CloudProjectId ?? storageProject?.ProjectId ?? cloudProjects?.find((cloudProject) => cloudProject.designId === project.Id)?.id ?? project.Id;
|
|
359638
360885
|
if (id2 === currentProjectId || byId.has(id2)) {
|
|
359639
360886
|
continue;
|
|
359640
360887
|
}
|
|
@@ -359667,7 +360914,7 @@ class FlowEvalRunContextResolver {
|
|
|
359667
360914
|
return;
|
|
359668
360915
|
}
|
|
359669
360916
|
const [parseError, parsed] = catchError(() => JSON.parse(String(content)));
|
|
359670
|
-
if (parseError || !
|
|
360917
|
+
if (parseError || !isRecord4(parsed)) {
|
|
359671
360918
|
return;
|
|
359672
360919
|
}
|
|
359673
360920
|
return typeof parsed.projectId === "string" && isUUID(parsed.projectId) ? parsed.projectId : undefined;
|
|
@@ -359696,10 +360943,10 @@ class FlowEvalRunContextResolver {
|
|
|
359696
360943
|
}
|
|
359697
360944
|
const content = await this.fs.readFile(storagePath, "utf-8");
|
|
359698
360945
|
const parsed = JSON.parse(String(content));
|
|
359699
|
-
if (!
|
|
360946
|
+
if (!isRecord4(parsed)) {
|
|
359700
360947
|
throw new Error("SolutionStorage.json must be a JSON object");
|
|
359701
360948
|
}
|
|
359702
|
-
const projects = Array.isArray(parsed.Projects) ? parsed.Projects.filter(
|
|
360949
|
+
const projects = Array.isArray(parsed.Projects) ? parsed.Projects.filter(isRecord4).map((project) => ({
|
|
359703
360950
|
ProjectId: typeof project.ProjectId === "string" ? project.ProjectId : undefined,
|
|
359704
360951
|
ProjectRelativePath: typeof project.ProjectRelativePath === "string" ? project.ProjectRelativePath : undefined,
|
|
359705
360952
|
CloudProjectId: typeof project.CloudProjectId === "string" ? project.CloudProjectId : undefined
|
|
@@ -359725,13 +360972,13 @@ class FlowEvalRunService {
|
|
|
359725
360972
|
this.pathResolver = new FlowEvalPathResolver(fs9);
|
|
359726
360973
|
this.contextResolver = new FlowEvalRunContextResolver(fs9, this.pathResolver);
|
|
359727
360974
|
}
|
|
359728
|
-
async resolveRemoteEvalTarget(projectPath, setIdOrName, options = {}, requireSolutionId = false) {
|
|
360975
|
+
async resolveRemoteEvalTarget(projectPath, setIdOrName, options = {}, requireSolutionId = false, config5) {
|
|
359729
360976
|
const absoluteProjectPath = await this.pathResolver.resolveFlowProjectPath(projectPath);
|
|
359730
360977
|
const evalSet = await this.requireEvalSet(absoluteProjectPath, setIdOrName);
|
|
359731
|
-
return this.contextResolver.resolveTarget(absoluteProjectPath, evalSet, options, requireSolutionId);
|
|
360978
|
+
return this.contextResolver.resolveTarget(absoluteProjectPath, evalSet, options, requireSolutionId, config5);
|
|
359732
360979
|
}
|
|
359733
360980
|
async resolveRemoteEvalContext(projectPath, setIdOrName, config5, options = {}) {
|
|
359734
|
-
const target = await this.resolveRemoteEvalTarget(projectPath, setIdOrName, options, true);
|
|
360981
|
+
const target = await this.resolveRemoteEvalTarget(projectPath, setIdOrName, options, true, config5);
|
|
359735
360982
|
const context = await this.contextResolver.buildExecutionContext(target, config5, options);
|
|
359736
360983
|
return {
|
|
359737
360984
|
evalSet: target.evalSet,
|
|
@@ -360057,11 +361304,11 @@ async function exportRows(exportFormat, rows) {
|
|
|
360057
361304
|
}
|
|
360058
361305
|
throw new Error(`Unknown export format "${exportFormat}". Use "json" or "csv".`);
|
|
360059
361306
|
}
|
|
360060
|
-
async function resolveRemoteTarget(service, options, requireSolutionId = false) {
|
|
361307
|
+
async function resolveRemoteTarget(service, options, config5, requireSolutionId = false) {
|
|
360061
361308
|
return service.resolveRemoteEvalTarget(options.path, options.set, {
|
|
360062
361309
|
solutionId: options.solutionId,
|
|
360063
361310
|
projectId: options.projectId
|
|
360064
|
-
}, requireSolutionId);
|
|
361311
|
+
}, requireSolutionId, config5);
|
|
360065
361312
|
}
|
|
360066
361313
|
function registerEvalRunCommand(evalCmd) {
|
|
360067
361314
|
const runCmd = evalCmd.command("run").description("Run Flow evaluation sets in Studio Web");
|
|
@@ -360100,7 +361347,7 @@ function registerEvalRunCommand(evalCmd) {
|
|
|
360100
361347
|
const [error95] = await catchError((async () => {
|
|
360101
361348
|
const config5 = await resolveStudioWebConfig();
|
|
360102
361349
|
const service = new FlowEvalRunService;
|
|
360103
|
-
const target = await resolveRemoteTarget(service, options);
|
|
361350
|
+
const target = await resolveRemoteTarget(service, options, config5);
|
|
360104
361351
|
const [run, evaluators] = await Promise.all([
|
|
360105
361352
|
service.getRemoteEvalSetRun(config5, target.workloadId, evalSetRunId),
|
|
360106
361353
|
service.listEvaluators(target.projectPath)
|
|
@@ -360125,7 +361372,7 @@ function registerEvalRunCommand(evalCmd) {
|
|
|
360125
361372
|
const [error95] = await catchError((async () => {
|
|
360126
361373
|
const config5 = await resolveStudioWebConfig();
|
|
360127
361374
|
const service = new FlowEvalRunService;
|
|
360128
|
-
const target = await resolveRemoteTarget(service, options);
|
|
361375
|
+
const target = await resolveRemoteTarget(service, options, config5);
|
|
360129
361376
|
let evalRuns = await service.getRemoteEvalRuns(config5, target.workloadId, evalSetRunId);
|
|
360130
361377
|
if (options.onlyFailed) {
|
|
360131
361378
|
evalRuns = evalRuns.filter(isFailedRemoteRun);
|
|
@@ -360158,7 +361405,7 @@ function registerEvalRunCommand(evalCmd) {
|
|
|
360158
361405
|
const [error95] = await catchError((async () => {
|
|
360159
361406
|
const config5 = await resolveStudioWebConfig();
|
|
360160
361407
|
const service = new FlowEvalRunService;
|
|
360161
|
-
const target = await resolveRemoteTarget(service, options);
|
|
361408
|
+
const target = await resolveRemoteTarget(service, options, config5);
|
|
360162
361409
|
const runs = await service.listRemoteEvalSetRuns(config5, target.workloadId, target.evalSet.id);
|
|
360163
361410
|
if (runs.length === 0) {
|
|
360164
361411
|
OutputFormatter.success({
|
|
@@ -360183,7 +361430,7 @@ function registerEvalRunCommand(evalCmd) {
|
|
|
360183
361430
|
const [error95] = await catchError((async () => {
|
|
360184
361431
|
const config5 = await resolveStudioWebConfig();
|
|
360185
361432
|
const service = new FlowEvalRunService;
|
|
360186
|
-
const target = await resolveRemoteTarget(service, options);
|
|
361433
|
+
const target = await resolveRemoteTarget(service, options, config5);
|
|
360187
361434
|
const [runsA, runsB, runMetaA, runMetaB] = await Promise.all([
|
|
360188
361435
|
service.getRemoteEvalRuns(config5, target.workloadId, evalSetRunId),
|
|
360189
361436
|
service.getRemoteEvalRuns(config5, target.workloadId, options.compareTo),
|
|
@@ -360610,20 +361857,6 @@ function typeToFieldType(type) {
|
|
|
360610
361857
|
};
|
|
360611
361858
|
return map6[type] ?? "text";
|
|
360612
361859
|
}
|
|
360613
|
-
function typeToVariableType(type) {
|
|
360614
|
-
const normalized = type ?? "string";
|
|
360615
|
-
const map6 = {
|
|
360616
|
-
text: "string",
|
|
360617
|
-
date: "string",
|
|
360618
|
-
string: "string",
|
|
360619
|
-
number: "number",
|
|
360620
|
-
boolean: "boolean",
|
|
360621
|
-
object: "object",
|
|
360622
|
-
array: "array",
|
|
360623
|
-
file: "file"
|
|
360624
|
-
};
|
|
360625
|
-
return map6[normalized] ?? "string";
|
|
360626
|
-
}
|
|
360627
361860
|
function toVariableId(name2) {
|
|
360628
361861
|
const words = name2.match(/[a-zA-Z0-9]+/g) ?? [];
|
|
360629
361862
|
const [first, ...rest] = words;
|
|
@@ -360636,12 +361869,6 @@ function toVariableId(name2) {
|
|
|
360636
361869
|
...rest.map((word) => `${word.charAt(0).toUpperCase()}${word.slice(1)}`)
|
|
360637
361870
|
].join("");
|
|
360638
361871
|
}
|
|
360639
|
-
function assertValidVariableId(variableId, fieldName) {
|
|
360640
|
-
const error95 = validateIdentifier(variableId, []);
|
|
360641
|
-
if (error95) {
|
|
360642
|
-
throw new Error(`Invalid HITL output variable '${variableId}' for schema field '${fieldName}': ${error95}`);
|
|
360643
|
-
}
|
|
360644
|
-
}
|
|
360645
361872
|
function toOutputVariableId(field) {
|
|
360646
361873
|
return field.variable ?? toVariableId(field.name);
|
|
360647
361874
|
}
|
|
@@ -360655,19 +361882,22 @@ function toRuntimeSchema(schema70) {
|
|
|
360655
361882
|
direction: "input"
|
|
360656
361883
|
};
|
|
360657
361884
|
if (f2.binding) {
|
|
360658
|
-
|
|
360659
|
-
field.binding = expr;
|
|
360660
|
-
field.variable = expr;
|
|
361885
|
+
field.binding = `=js:$vars.${f2.binding}`;
|
|
360661
361886
|
}
|
|
360662
361887
|
fields.push(field);
|
|
360663
361888
|
}
|
|
360664
361889
|
for (const f2 of schema70.outputs ?? []) {
|
|
361890
|
+
const variableId = toOutputVariableId(f2);
|
|
361891
|
+
const validationError = validateIdentifier(variableId, []);
|
|
361892
|
+
if (validationError) {
|
|
361893
|
+
throw new Error(`Invalid HITL output variable '${variableId}' for schema field '${f2.name}': ${validationError}`);
|
|
361894
|
+
}
|
|
360665
361895
|
const field = {
|
|
360666
361896
|
id: toSlug(f2.name),
|
|
360667
361897
|
label: f2.name,
|
|
360668
361898
|
type: typeToFieldType(f2.type ?? "string"),
|
|
360669
361899
|
direction: "output",
|
|
360670
|
-
variable:
|
|
361900
|
+
variable: variableId
|
|
360671
361901
|
};
|
|
360672
361902
|
if (f2.required !== undefined) {
|
|
360673
361903
|
field.required = f2.required;
|
|
@@ -360675,12 +361905,19 @@ function toRuntimeSchema(schema70) {
|
|
|
360675
361905
|
fields.push(field);
|
|
360676
361906
|
}
|
|
360677
361907
|
for (const f2 of schema70.inOuts ?? []) {
|
|
360678
|
-
|
|
361908
|
+
const field = {
|
|
360679
361909
|
id: toSlug(f2.name),
|
|
360680
361910
|
label: f2.name,
|
|
360681
361911
|
type: typeToFieldType(f2.type ?? "string"),
|
|
360682
361912
|
direction: "inOut"
|
|
360683
|
-
}
|
|
361913
|
+
};
|
|
361914
|
+
if (f2.binding) {
|
|
361915
|
+
field.binding = `=js:$vars.${f2.binding}`;
|
|
361916
|
+
}
|
|
361917
|
+
if (f2.variable) {
|
|
361918
|
+
field.variable = f2.variable;
|
|
361919
|
+
}
|
|
361920
|
+
fields.push(field);
|
|
360684
361921
|
}
|
|
360685
361922
|
const rawOutcomes = schema70.outcomes ?? [{ name: "Submit" }];
|
|
360686
361923
|
const outcomes = rawOutcomes.map((o2, index) => ({
|
|
@@ -360696,24 +361933,6 @@ function toRuntimeSchema(schema70) {
|
|
|
360696
361933
|
outcomes
|
|
360697
361934
|
};
|
|
360698
361935
|
}
|
|
360699
|
-
function materializeHitlOutputVariables(workflow, schema70) {
|
|
360700
|
-
const globals = workflow.variables?.globals ?? [];
|
|
360701
|
-
const existingIds = new Set(globals.map((variable) => variable.id));
|
|
360702
|
-
const pendingIds = new Set;
|
|
360703
|
-
for (const field of schema70.outputs ?? []) {
|
|
360704
|
-
const variableId = toOutputVariableId(field);
|
|
360705
|
-
assertValidVariableId(variableId, field.name);
|
|
360706
|
-
if (existingIds.has(variableId) || pendingIds.has(variableId)) {
|
|
360707
|
-
continue;
|
|
360708
|
-
}
|
|
360709
|
-
addVariable(workflow, createWorkflowVariable({
|
|
360710
|
-
id: variableId,
|
|
360711
|
-
direction: "out",
|
|
360712
|
-
type: typeToVariableType(field.type)
|
|
360713
|
-
}));
|
|
360714
|
-
pendingIds.add(variableId);
|
|
360715
|
-
}
|
|
360716
|
-
}
|
|
360717
361936
|
var HITL_HANDLES = [
|
|
360718
361937
|
{
|
|
360719
361938
|
position: "left",
|
|
@@ -360747,7 +361966,7 @@ var HITL_HANDLES = [
|
|
|
360747
361966
|
];
|
|
360748
361967
|
function buildHitlManifest(label) {
|
|
360749
361968
|
return {
|
|
360750
|
-
nodeType: "uipath.human-in-the-loop",
|
|
361969
|
+
nodeType: "uipath.human-in-the-loop.quick-form",
|
|
360751
361970
|
version: "1.0",
|
|
360752
361971
|
sortOrder: 50,
|
|
360753
361972
|
category: "human-task",
|
|
@@ -360792,33 +362011,21 @@ function buildHitlManifest(label) {
|
|
|
360792
362011
|
}
|
|
360793
362012
|
};
|
|
360794
362013
|
}
|
|
360795
|
-
|
|
360796
|
-
|
|
360797
|
-
|
|
360798
|
-
|
|
360799
|
-
|
|
360800
|
-
|
|
360801
|
-
|
|
360802
|
-
|
|
360803
|
-
|
|
360804
|
-
|
|
360805
|
-
|
|
360806
|
-
|
|
360807
|
-
|
|
362014
|
+
function buildHitlOutputs() {
|
|
362015
|
+
return {
|
|
362016
|
+
output: {
|
|
362017
|
+
type: "object",
|
|
362018
|
+
source: "=result",
|
|
362019
|
+
var: "output",
|
|
362020
|
+
description: "Task result data"
|
|
362021
|
+
},
|
|
362022
|
+
status: {
|
|
362023
|
+
type: "string",
|
|
362024
|
+
source: "=result.Action",
|
|
362025
|
+
var: "status",
|
|
362026
|
+
description: "Task completion outcome"
|
|
360808
362027
|
}
|
|
360809
|
-
|
|
360810
|
-
if (!varName || RESERVED.has(varName))
|
|
360811
|
-
continue;
|
|
360812
|
-
if (validateIdentifier(varName, []))
|
|
360813
|
-
continue;
|
|
360814
|
-
outputs[varName] = {
|
|
360815
|
-
type: typeToVariableType(field.type ?? "string"),
|
|
360816
|
-
source: `=result.${field.id}`,
|
|
360817
|
-
var: varName,
|
|
360818
|
-
custom: true
|
|
360819
|
-
};
|
|
360820
|
-
}
|
|
360821
|
-
return outputs;
|
|
362028
|
+
};
|
|
360822
362029
|
}
|
|
360823
362030
|
function buildAssignee(assignee) {
|
|
360824
362031
|
return {
|
|
@@ -360835,7 +362042,6 @@ async function addHitlNode(filePath, options) {
|
|
|
360835
362042
|
const manifest = buildHitlManifest(displayLabel);
|
|
360836
362043
|
const node2 = addNode(workflow, manifest, id2, options.position ?? { x: 0, y: 0 }, displayLabel);
|
|
360837
362044
|
const runtimeSchema = toRuntimeSchema(options.schema ?? {});
|
|
360838
|
-
materializeHitlOutputVariables(workflow, options.schema ?? {});
|
|
360839
362045
|
node2.inputs = {
|
|
360840
362046
|
...node2.inputs,
|
|
360841
362047
|
type: "quick",
|
|
@@ -360848,11 +362054,11 @@ async function addHitlNode(filePath, options) {
|
|
|
360848
362054
|
},
|
|
360849
362055
|
priority: options.priority ?? "Low"
|
|
360850
362056
|
};
|
|
360851
|
-
node2.outputs = buildHitlOutputs(
|
|
362057
|
+
node2.outputs = buildHitlOutputs();
|
|
360852
362058
|
await writeWorkflow(filePath, workflow);
|
|
360853
362059
|
return {
|
|
360854
362060
|
nodeId: id2,
|
|
360855
|
-
nodeType: "uipath.human-in-the-loop",
|
|
362061
|
+
nodeType: "uipath.human-in-the-loop.quick-form",
|
|
360856
362062
|
label: displayLabel,
|
|
360857
362063
|
definitionAdded: (workflow.definitions ?? []).length > definitionsBefore
|
|
360858
362064
|
};
|
|
@@ -361500,6 +362706,73 @@ function registerJobCommand(program2) {
|
|
|
361500
362706
|
|
|
361501
362707
|
// src/services/flow-migrate-service.ts
|
|
361502
362708
|
init_src();
|
|
362709
|
+
|
|
362710
|
+
// src/services/flow-migration-check.ts
|
|
362711
|
+
init_i18next();
|
|
362712
|
+
if (!instance.isInitialized) {
|
|
362713
|
+
instance.init({
|
|
362714
|
+
lng: "en",
|
|
362715
|
+
fallbackLng: "en",
|
|
362716
|
+
defaultNS: "validation",
|
|
362717
|
+
resources: {},
|
|
362718
|
+
interpolation: { escapeValue: false }
|
|
362719
|
+
});
|
|
362720
|
+
}
|
|
362721
|
+
registerFlowMigrationsI18n(instance);
|
|
362722
|
+
function captureMigrationIssues() {
|
|
362723
|
+
const paths = [];
|
|
362724
|
+
const tracker = {
|
|
362725
|
+
trackError: (_error, _severity, details) => {
|
|
362726
|
+
if (!("issues" in details))
|
|
362727
|
+
return;
|
|
362728
|
+
const issues = details.issues;
|
|
362729
|
+
if (!Array.isArray(issues))
|
|
362730
|
+
return;
|
|
362731
|
+
for (const issue6 of issues) {
|
|
362732
|
+
if (!issue6 || typeof issue6 !== "object")
|
|
362733
|
+
continue;
|
|
362734
|
+
if (!("path" in issue6))
|
|
362735
|
+
continue;
|
|
362736
|
+
const path4 = issue6.path;
|
|
362737
|
+
if (Array.isArray(path4) && path4.length > 0) {
|
|
362738
|
+
paths.push(path4.map(String).join("."));
|
|
362739
|
+
}
|
|
362740
|
+
}
|
|
362741
|
+
}
|
|
362742
|
+
};
|
|
362743
|
+
return { tracker, fieldPaths: () => [...new Set(paths)] };
|
|
362744
|
+
}
|
|
362745
|
+
function formatMigrationFailureMessage(step, rawMessage, fieldPaths) {
|
|
362746
|
+
const parts = [`Workflow migration failed at ${step}: ${rawMessage}.`];
|
|
362747
|
+
if (fieldPaths.length > 0) {
|
|
362748
|
+
const shown = fieldPaths.slice(0, 10);
|
|
362749
|
+
const extra = fieldPaths.length > shown.length ? `, +${fieldPaths.length - shown.length} more` : "";
|
|
362750
|
+
parts.push(`Offending field(s): ${shown.join(", ")}${extra}.`);
|
|
362751
|
+
}
|
|
362752
|
+
parts.push("Fix the flagged field(s) or re-scaffold the affected node, then re-run.");
|
|
362753
|
+
return parts.join(" ");
|
|
362754
|
+
}
|
|
362755
|
+
function checkForwardMigration(rawWorkflow) {
|
|
362756
|
+
const { tracker, fieldPaths } = captureMigrationIssues();
|
|
362757
|
+
let result;
|
|
362758
|
+
try {
|
|
362759
|
+
result = migrateWorkflow(migrations38, rawWorkflow, currentVersion9, tracker);
|
|
362760
|
+
} catch {
|
|
362761
|
+
return { ok: true };
|
|
362762
|
+
}
|
|
362763
|
+
if (!result.error)
|
|
362764
|
+
return { ok: true };
|
|
362765
|
+
const paths = fieldPaths();
|
|
362766
|
+
return {
|
|
362767
|
+
ok: false,
|
|
362768
|
+
step: result.error.step,
|
|
362769
|
+
rawMessage: result.error.message,
|
|
362770
|
+
message: formatMigrationFailureMessage(result.error.step, result.error.message, paths),
|
|
362771
|
+
fieldPaths: paths
|
|
362772
|
+
};
|
|
362773
|
+
}
|
|
362774
|
+
|
|
362775
|
+
// src/services/flow-migrate-service.ts
|
|
361503
362776
|
var buildNodeMigrationRegistry = () => {
|
|
361504
362777
|
const registry7 = {};
|
|
361505
362778
|
for (const [nodeType, mod2] of Object.entries(nodeModuleRegistry2)) {
|
|
@@ -361514,7 +362787,11 @@ var migrateFlow = async (filePath, options = {}) => {
|
|
|
361514
362787
|
const raw = await fs9.readFile(filePath, "utf-8");
|
|
361515
362788
|
const workflow = JSON.parse(raw);
|
|
361516
362789
|
const fromVersion = String(workflow.version ?? "");
|
|
361517
|
-
const
|
|
362790
|
+
const { tracker, fieldPaths } = captureMigrationIssues();
|
|
362791
|
+
const wfResult = migrateWorkflow(migrations38, workflow, currentVersion9, tracker);
|
|
362792
|
+
if (wfResult.error) {
|
|
362793
|
+
throw new Error(formatMigrationFailureMessage(wfResult.error.step, wfResult.error.message, fieldPaths()));
|
|
362794
|
+
}
|
|
361518
362795
|
const migrated = wfResult.migrated ? wfResult.workflow : workflow;
|
|
361519
362796
|
const workflowSteps = wfResult.steps.map((s2) => `${s2.from} -> ${s2.to}`);
|
|
361520
362797
|
const registry7 = buildNodeMigrationRegistry();
|
|
@@ -362106,6 +363383,36 @@ function patchOutputTypeToFile(definitions, nodeType) {
|
|
|
362106
363383
|
def.outputDefinition.output.type = "file";
|
|
362107
363384
|
}
|
|
362108
363385
|
}
|
|
363386
|
+
function buildAgentToolParamsFromMetadata(metadata, method) {
|
|
363387
|
+
const fieldsRaw = metadata.fields ?? {};
|
|
363388
|
+
const fields = Array.isArray(fieldsRaw) ? fieldsRaw : Object.values(fieldsRaw);
|
|
363389
|
+
const httpMethod = normalizeHttpMethod(method);
|
|
363390
|
+
const methodMap = metadata.metadata?.method ?? {};
|
|
363391
|
+
const methodInfo = methodMap[method] ?? Object.values(methodMap).find((m2) => m2.method === httpMethod);
|
|
363392
|
+
const prompt = (f2) => `{{prompt: "${f2.description || f2.displayName || f2.name}"}}`;
|
|
363393
|
+
const bodyParameters = {};
|
|
363394
|
+
for (const field of fields) {
|
|
363395
|
+
const fm = field.method?.[method] ?? field.method?.[httpMethod];
|
|
363396
|
+
if (!fm || !fm.request && !fm.requestCurated)
|
|
363397
|
+
continue;
|
|
363398
|
+
const enumArr = field.enum && Array.isArray(field.enum) ? field.enum : [];
|
|
363399
|
+
if (enumArr.length === 1) {
|
|
363400
|
+
const only = enumArr[0];
|
|
363401
|
+
bodyParameters[field.name] = typeof only === "string" ? only : only.value ?? only.name;
|
|
363402
|
+
} else {
|
|
363403
|
+
bodyParameters[field.name] = prompt(field);
|
|
363404
|
+
}
|
|
363405
|
+
}
|
|
363406
|
+
const queryParameters = {};
|
|
363407
|
+
const pathParameters = {};
|
|
363408
|
+
for (const param of methodInfo?.parameters ?? []) {
|
|
363409
|
+
if (param.type !== "query" && param.type !== "path")
|
|
363410
|
+
continue;
|
|
363411
|
+
const value = param.defaultValue != null && param.defaultValue !== "" ? param.defaultValue : prompt(param);
|
|
363412
|
+
(param.type === "query" ? queryParameters : pathParameters)[param.name] = value;
|
|
363413
|
+
}
|
|
363414
|
+
return { bodyParameters, queryParameters, pathParameters };
|
|
363415
|
+
}
|
|
362109
363416
|
async function configureActivity(workflow, node2, config5) {
|
|
362110
363417
|
const definitions = workflow.definitions ?? [];
|
|
362111
363418
|
const context = getModelContext(node2, definitions);
|
|
@@ -362173,7 +363480,17 @@ async function configureActivity(workflow, node2, config5) {
|
|
|
362173
363480
|
[filterInputName]: result.ceqlExpression
|
|
362174
363481
|
};
|
|
362175
363482
|
}
|
|
362176
|
-
|
|
363483
|
+
const configObj = buildActivityEssentialConfiguration(resolvedInstanceParameters, methodInfo, savedFilterTrees, config5.customFieldsRequestDetails ?? null);
|
|
363484
|
+
if ((node2.type ?? "").startsWith("uipath.agent.resource.tool.connector.")) {
|
|
363485
|
+
const { bodyParameters, queryParameters, pathParameters } = buildAgentToolParamsFromMetadata(metadata, config5.method);
|
|
363486
|
+
if (!detail.bodyParameters && Object.keys(bodyParameters).length > 0)
|
|
363487
|
+
detail.bodyParameters = bodyParameters;
|
|
363488
|
+
if (!detail.queryParameters && Object.keys(queryParameters).length > 0)
|
|
363489
|
+
detail.queryParameters = queryParameters;
|
|
363490
|
+
if (!detail.pathParameters && Object.keys(pathParameters).length > 0)
|
|
363491
|
+
detail.pathParameters = pathParameters;
|
|
363492
|
+
}
|
|
363493
|
+
detail.configuration = `=jsonString:${JSON.stringify(configObj)}`;
|
|
362177
363494
|
const params = methodInfo.parameters ?? [];
|
|
362178
363495
|
const rawMultipartParams = extractMultipartParameters(params);
|
|
362179
363496
|
const { multipartParams, bodyParameters: cleanedBodyParameters } = inlineMultipartFileValues(rawMultipartParams, detail.bodyParameters);
|
|
@@ -362305,7 +363622,7 @@ async function configureConnectorNode(filePath, nodeId, rawDetail) {
|
|
|
362305
363622
|
detailPopulated: true
|
|
362306
363623
|
};
|
|
362307
363624
|
}
|
|
362308
|
-
if (!nodeType.startsWith("uipath.connector")) {
|
|
363625
|
+
if (!nodeType.startsWith("uipath.connector") && !nodeType.startsWith("uipath.agent.resource.tool.connector.")) {
|
|
362309
363626
|
throw new Error(`Node '${nodeId}' is not a connector type node, no operation done.`);
|
|
362310
363627
|
}
|
|
362311
363628
|
if (isEventDrivenConnectorType(nodeType)) {
|
|
@@ -363797,41 +365114,21 @@ Packing flow project...
|
|
|
363797
365114
|
const packagingNodes = fileNodesToPackagingNodes(flowContent.nodes);
|
|
363798
365115
|
const startEventId = extractStartEventId(bpmn);
|
|
363799
365116
|
const projectId = flowContent.id || await ensureProjectId2(projectPath, this.fs);
|
|
363800
|
-
const entryPoints = await writePackagingArtifacts(this.fs, stagingDir, projectId, packagingNodes, flowContent.bindings ?? [], flowContent.variables ?? {}, bpmnFileName, startEventId, `${safeName}.flow`, flowContent.definitions ?? []);
|
|
363801
|
-
await writeResolvedFlow(this.fs, stagingDir, safeName, flowContent);
|
|
363802
365117
|
const inlineAgents = await packageInlineAgents(this.fs, projectPath, flowContent.nodes);
|
|
363803
365118
|
if (inlineAgents.length > 0) {
|
|
363804
365119
|
logger.info(`Found ${inlineAgents.length} inline agent(s) to package`);
|
|
363805
365120
|
}
|
|
363806
|
-
|
|
363807
|
-
|
|
363808
|
-
|
|
363809
|
-
|
|
363810
|
-
|
|
363811
|
-
|
|
363812
|
-
|
|
363813
|
-
|
|
363814
|
-
|
|
363815
|
-
...agent.agentJson,
|
|
363816
|
-
resources: agent.agentJson.resources ?? [],
|
|
363817
|
-
features: agent.agentJson.features ?? []
|
|
363818
|
-
};
|
|
363819
|
-
await this.fs.writeFile(this.fs.path.join(agentBuilderDir, "agent.json"), JSON.stringify(builderAgent, null, 2));
|
|
363820
|
-
await this.fs.writeFile(this.fs.path.join(agentBuilderDir, "bindings.json"), JSON.stringify({ version: "2.0", resources: [] }, null, 2));
|
|
363821
|
-
logger.info(`Packaged inline agent "${agent.source}"`);
|
|
363822
|
-
}
|
|
365121
|
+
const packageDescriptorJson = inlineAgents.length > 0 ? generatePackageDescriptor([{ name: bpmnFileName }], [{ name: `${safeName}.flow` }], inlineAgents.map((agent) => ({
|
|
365122
|
+
name: `${agent.source}/agent.json`
|
|
365123
|
+
}))) : undefined;
|
|
365124
|
+
await writePackagingArtifactsDetailed(this.fs, stagingDir, projectId, packagingNodes, flowContent.bindings ?? [], flowContent.variables ?? {}, bpmnFileName, startEventId, `${safeName}.flow`, flowContent.definitions ?? [], {
|
|
365125
|
+
additionalEntryPoints: inlineAgents.map((agent) => agent.entryPoint),
|
|
365126
|
+
additionalBindingsJsons: inlineAgents.map((agent) => agent.bindingsJson),
|
|
365127
|
+
...packageDescriptorJson ? { packageDescriptorJson } : {}
|
|
365128
|
+
});
|
|
365129
|
+
await writeResolvedFlow(this.fs, stagingDir, safeName, flowContent);
|
|
363823
365130
|
if (inlineAgents.length > 0) {
|
|
363824
|
-
|
|
363825
|
-
...entryPoints,
|
|
363826
|
-
...inlineAgents.map((a2) => a2.entryPoint)
|
|
363827
|
-
];
|
|
363828
|
-
await this.fs.writeFile(this.fs.path.join(stagingDir, "entry-points.json"), `${JSON.stringify(generateEntryPointsJson(allEntryPoints), null, 2)}
|
|
363829
|
-
`);
|
|
363830
|
-
const agentFiles = inlineAgents.map((a2) => ({
|
|
363831
|
-
name: `${a2.source}/agent.json`
|
|
363832
|
-
}));
|
|
363833
|
-
await this.fs.writeFile(this.fs.path.join(stagingDir, "package-descriptor.json"), `${JSON.stringify(generatePackageDescriptor([{ name: bpmnFileName }], [{ name: `${safeName}.flow` }], agentFiles), null, 2)}
|
|
363834
|
-
`);
|
|
365131
|
+
await stageInlineAgentPackageFiles(this.fs, projectPath, stagingDir, inlineAgents, (source) => `Packaged inline agent "${source}"`);
|
|
363835
365132
|
const operateContent = await this.fs.readFile(this.fs.path.join(stagingDir, "operate.json"), "utf-8");
|
|
363836
365133
|
if (operateContent) {
|
|
363837
365134
|
const operateJson = JSON.parse(operateContent);
|
|
@@ -366377,6 +367674,7 @@ Validating: ${absolutePath}
|
|
|
366377
367674
|
const currentManifests = this.validateCurrentManifests ? await this.loadCurrentManifestMap() : new Map;
|
|
366378
367675
|
const flowDir = this.fs.path.dirname(absolutePath);
|
|
366379
367676
|
const hydrationDiagnoses = await this.resolveAgentPrompts(workflow.nodes, flowDir);
|
|
367677
|
+
issues.push(...this.validateForwardMigration(content));
|
|
366380
367678
|
issues.push(...this.validateGraph(workflow, "", rawDefErrorHandling, currentManifests));
|
|
366381
367679
|
issues.push(...this.validateGlobalVariableUniqueness(workflow, ""));
|
|
366382
367680
|
issues.push(...this.validateGlobalTriggerBindings(workflow, ""));
|
|
@@ -366412,6 +367710,26 @@ Validating: ${absolutePath}
|
|
|
366412
367710
|
issues
|
|
366413
367711
|
};
|
|
366414
367712
|
}
|
|
367713
|
+
validateForwardMigration(content) {
|
|
367714
|
+
let raw;
|
|
367715
|
+
try {
|
|
367716
|
+
raw = JSON.parse(content);
|
|
367717
|
+
} catch {
|
|
367718
|
+
return [];
|
|
367719
|
+
}
|
|
367720
|
+
if (!raw || typeof raw !== "object")
|
|
367721
|
+
return [];
|
|
367722
|
+
const check5 = checkForwardMigration(raw);
|
|
367723
|
+
if (check5.ok)
|
|
367724
|
+
return [];
|
|
367725
|
+
return [
|
|
367726
|
+
{
|
|
367727
|
+
path: "version",
|
|
367728
|
+
message: `[MIGRATION] ${check5.message}`,
|
|
367729
|
+
severity: "error"
|
|
367730
|
+
}
|
|
367731
|
+
];
|
|
367732
|
+
}
|
|
366415
367733
|
async resolveAgentPrompts(nodes, flowDir) {
|
|
366416
367734
|
const diagnoses = new Map;
|
|
366417
367735
|
for (const node2 of nodes) {
|
|
@@ -367419,7 +368737,7 @@ function querystringSingleKey6(key, value, keyPrefix = "") {
|
|
|
367419
368737
|
var package_default7 = {
|
|
367420
368738
|
name: "@uipath/agent-sdk",
|
|
367421
368739
|
license: "MIT",
|
|
367422
|
-
version: "1.
|
|
368740
|
+
version: "1.198.0-preview.81",
|
|
367423
368741
|
description: "SDK for the UiPath Agent Runtime API — evaluation execution and debug sessions.",
|
|
367424
368742
|
repository: {
|
|
367425
368743
|
type: "git",
|
|
@@ -368167,4 +369485,4 @@ export {
|
|
|
368167
369485
|
metadata
|
|
368168
369486
|
};
|
|
368169
369487
|
|
|
368170
|
-
//# debugId=
|
|
369488
|
+
//# debugId=3EFF0A65F75BFBC064756E2164756E21
|