@uipath/solution-sdk 1.206.0-preview.303 → 1.207.0-preview.305
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/deployment-search.js +5 -5
- package/dist/{index-t1evhtnh.js → index-1bffghc6.js} +88 -21
- package/dist/{index-0b3srjv7.js → index-3stpkr4a.js} +30 -8
- package/dist/{index-7g313657.js → index-56m247xv.js} +8 -4
- package/dist/{index-y9qx7901.js → index-93ee30d0.js} +248 -132
- package/dist/index-b4cns9y6.js +48 -0
- package/dist/{index-xnrbg4x3.js → index-knpm888a.js} +4 -2
- package/dist/{index-bpn15jyk.js → index-mgaz5jpa.js} +48 -6
- package/dist/{index-dfmtrvrq.js → index-tt6bptj4.js} +4 -4
- package/dist/index.js +57 -13
- package/dist/invocation-graph.js +82 -0
- package/dist/{jmespath-x4na7sj8.js → jmespath-d7vwhn8r.js} +1 -1
- package/dist/package-search.js +5 -5
- package/dist/project-context.js +3 -3
- package/dist/resources/index.js +176 -57
- package/dist/solution-auth.js +3 -3
- package/dist/src/index.d.ts +2 -2
- package/dist/src/invocation-graph.d.ts +107 -0
- package/dist/src/resources/services/local-resource-matcher.d.ts +23 -0
- package/dist/src/resources/services/remote-resources.d.ts +11 -0
- package/dist/src/resources/services/resource-name.d.ts +6 -0
- package/dist/src/resources/services/resource-refresh-service.d.ts +8 -0
- package/dist/src/resources/services/sync-resources-from-bindings.d.ts +7 -1
- package/dist/src/solution-auth.d.ts +3 -0
- package/dist/src/solution-file.d.ts +36 -6
- package/dist/src/studio-web-compat.d.ts +19 -16
- package/dist/src/types.d.ts +8 -0
- package/package.json +6 -2
package/dist/resources/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
__toESM,
|
|
3
3
|
__commonJS,
|
|
4
4
|
getFileSystem
|
|
5
|
-
} from "../index-
|
|
5
|
+
} from "../index-3stpkr4a.js";
|
|
6
6
|
import {
|
|
7
7
|
getSdkUserAgentToken,
|
|
8
8
|
addSdkUserAgentHeader,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
extractErrorMessage,
|
|
12
12
|
logger,
|
|
13
13
|
isGuid
|
|
14
|
-
} from "../index-
|
|
14
|
+
} from "../index-93ee30d0.js";
|
|
15
15
|
import {
|
|
16
16
|
ErrorCodes,
|
|
17
17
|
BadRequestException,
|
|
@@ -65,15 +65,22 @@ import {
|
|
|
65
65
|
resolveSessionIdentity,
|
|
66
66
|
getLoginStatusAsync,
|
|
67
67
|
getAuthContext
|
|
68
|
-
} from "../index-
|
|
68
|
+
} from "../index-mgaz5jpa.js";
|
|
69
69
|
import {
|
|
70
70
|
getSolutionAuthContext2
|
|
71
|
-
} from "../index-
|
|
71
|
+
} from "../index-knpm888a.js";
|
|
72
72
|
import {
|
|
73
|
+
MAX_RESOURCE_NAME_LENGTH2,
|
|
74
|
+
hasUnsafeNameChars2,
|
|
75
|
+
validateResourceName2,
|
|
76
|
+
assertValidResourceName2
|
|
77
|
+
} from "../index-b4cns9y6.js";
|
|
78
|
+
import {
|
|
79
|
+
SolutionFileError2,
|
|
73
80
|
normalizeProjectType2,
|
|
74
81
|
toPortableRelativePath2,
|
|
75
82
|
findSolutionFileUpward2
|
|
76
|
-
} from "../index-
|
|
83
|
+
} from "../index-1bffghc6.js";
|
|
77
84
|
|
|
78
85
|
// ../../node_modules/reflect-metadata/Reflect.js
|
|
79
86
|
var require_Reflect = __commonJS(function() {
|
|
@@ -3259,6 +3266,8 @@ I18nManager.registerTranslations("zh-cn", zh_CN);
|
|
|
3259
3266
|
I18nManager.registerTranslations("zh-tw", zh_TW);
|
|
3260
3267
|
I18nManager.registerTranslations("zu", zu);
|
|
3261
3268
|
I18nManager.setLocale("en");
|
|
3269
|
+
// ../packager/packager-core/src/services/project-identity.ts
|
|
3270
|
+
var MAX_IDENTITY_FILE_BYTES = 1024 * 1024;
|
|
3262
3271
|
// ../packager/packager-core/src/services/tools-factory-repository.ts
|
|
3263
3272
|
class ToolsFactoryRepository {
|
|
3264
3273
|
projectFactoryMap = new Map;
|
|
@@ -18823,7 +18832,7 @@ var package_default = {
|
|
|
18823
18832
|
name: "@uipath/orchestrator-sdk",
|
|
18824
18833
|
author: "UiPath",
|
|
18825
18834
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
18826
|
-
version: "1.
|
|
18835
|
+
version: "1.207.0",
|
|
18827
18836
|
repository: {
|
|
18828
18837
|
type: "git",
|
|
18829
18838
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -19083,6 +19092,37 @@ function UnattendedRobotDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
19083
19092
|
MachineMappingsCount: value["machineMappingsCount"]
|
|
19084
19093
|
};
|
|
19085
19094
|
}
|
|
19095
|
+
// ../orchestrator-sdk/generated/src/models/MachineRuntimeDto.ts
|
|
19096
|
+
var MachineRuntimeDtoTypeEnum = {
|
|
19097
|
+
NonProduction: "NonProduction",
|
|
19098
|
+
Attended: "Attended",
|
|
19099
|
+
Unattended: "Unattended",
|
|
19100
|
+
Development: "Development",
|
|
19101
|
+
Studio: "Studio",
|
|
19102
|
+
RpaDeveloper: "RpaDeveloper",
|
|
19103
|
+
StudioX: "StudioX",
|
|
19104
|
+
CitizenDeveloper: "CitizenDeveloper",
|
|
19105
|
+
Headless: "Headless",
|
|
19106
|
+
StudioPro: "StudioPro",
|
|
19107
|
+
RpaDeveloperPro: "RpaDeveloperPro",
|
|
19108
|
+
TestAutomation: "TestAutomation",
|
|
19109
|
+
AutomationCloud: "AutomationCloud",
|
|
19110
|
+
Serverless: "Serverless",
|
|
19111
|
+
AutomationKit: "AutomationKit",
|
|
19112
|
+
ServerlessTestAutomation: "ServerlessTestAutomation",
|
|
19113
|
+
AutomationCloudTestAutomation: "AutomationCloudTestAutomation",
|
|
19114
|
+
AttendedStudioWeb: "AttendedStudioWeb",
|
|
19115
|
+
Hosting: "Hosting",
|
|
19116
|
+
AssistantWeb: "AssistantWeb",
|
|
19117
|
+
ProcessOrchestration: "ProcessOrchestration",
|
|
19118
|
+
AgentService: "AgentService",
|
|
19119
|
+
AppTest: "AppTest",
|
|
19120
|
+
PerformanceTest: "PerformanceTest",
|
|
19121
|
+
BusinessRule: "BusinessRule",
|
|
19122
|
+
CaseManagement: "CaseManagement",
|
|
19123
|
+
Flow: "Flow",
|
|
19124
|
+
Local: "Local"
|
|
19125
|
+
};
|
|
19086
19126
|
// ../orchestrator-sdk/generated/src/models/UserDto.ts
|
|
19087
19127
|
function UserDtoFromJSON(json) {
|
|
19088
19128
|
return UserDtoFromJSONTyped(json, false);
|
|
@@ -19228,6 +19268,23 @@ function UserAssignRolesRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
19228
19268
|
roleIds: value["roleIds"]
|
|
19229
19269
|
};
|
|
19230
19270
|
}
|
|
19271
|
+
// ../orchestrator-sdk/generated/src/apis/MachinesApi.ts
|
|
19272
|
+
var MachinesGetRuntimesForFolderByFolderidProcessTypeEnum = {
|
|
19273
|
+
Undefined: "Undefined",
|
|
19274
|
+
Process: "Process",
|
|
19275
|
+
ProcessOrchestration: "ProcessOrchestration",
|
|
19276
|
+
WebApp: "WebApp",
|
|
19277
|
+
Agent: "Agent",
|
|
19278
|
+
TestAutomationProcess: "TestAutomationProcess",
|
|
19279
|
+
Api: "Api",
|
|
19280
|
+
McpServer: "MCPServer",
|
|
19281
|
+
BusinessRules: "BusinessRules",
|
|
19282
|
+
CaseManagement: "CaseManagement",
|
|
19283
|
+
Flow: "Flow",
|
|
19284
|
+
Function: "Function",
|
|
19285
|
+
System: "System",
|
|
19286
|
+
FlowAutomate: "FlowAutomate"
|
|
19287
|
+
};
|
|
19231
19288
|
// ../orchestrator-sdk/generated/src/apis/UsersApi.ts
|
|
19232
19289
|
class UsersApi extends BaseAPI {
|
|
19233
19290
|
async usersAssignRolesByIdRaw(requestParameters, initOverrides) {
|
|
@@ -19510,6 +19567,29 @@ async function createApiClient(ApiClass, options) {
|
|
|
19510
19567
|
const config = await createOrchestratorConfig(options);
|
|
19511
19568
|
return new ApiClass(config);
|
|
19512
19569
|
}
|
|
19570
|
+
// ../orchestrator-sdk/src/folder-runtimes.ts
|
|
19571
|
+
var FOLDER_RUNTIMES = {
|
|
19572
|
+
[MachinesGetRuntimesForFolderByFolderidProcessTypeEnum.Process]: [
|
|
19573
|
+
MachineRuntimeDtoTypeEnum.Serverless,
|
|
19574
|
+
MachineRuntimeDtoTypeEnum.AutomationCloud,
|
|
19575
|
+
MachineRuntimeDtoTypeEnum.AutomationCloudTestAutomation,
|
|
19576
|
+
MachineRuntimeDtoTypeEnum.AppTest,
|
|
19577
|
+
MachineRuntimeDtoTypeEnum.PerformanceTest,
|
|
19578
|
+
MachineRuntimeDtoTypeEnum.Unattended,
|
|
19579
|
+
MachineRuntimeDtoTypeEnum.NonProduction,
|
|
19580
|
+
MachineRuntimeDtoTypeEnum.TestAutomation
|
|
19581
|
+
],
|
|
19582
|
+
[MachinesGetRuntimesForFolderByFolderidProcessTypeEnum.TestAutomationProcess]: [
|
|
19583
|
+
MachineRuntimeDtoTypeEnum.Serverless,
|
|
19584
|
+
MachineRuntimeDtoTypeEnum.ServerlessTestAutomation,
|
|
19585
|
+
MachineRuntimeDtoTypeEnum.AutomationCloudTestAutomation,
|
|
19586
|
+
MachineRuntimeDtoTypeEnum.AutomationCloud,
|
|
19587
|
+
MachineRuntimeDtoTypeEnum.AppTest,
|
|
19588
|
+
MachineRuntimeDtoTypeEnum.TestAutomation,
|
|
19589
|
+
MachineRuntimeDtoTypeEnum.Unattended
|
|
19590
|
+
],
|
|
19591
|
+
[MachinesGetRuntimesForFolderByFolderidProcessTypeEnum.McpServer]: [MachineRuntimeDtoTypeEnum.Serverless]
|
|
19592
|
+
};
|
|
19513
19593
|
// ../orchestrator-sdk/src/knowledge-bundles.ts
|
|
19514
19594
|
var KB_INLINE_LIMITS = {
|
|
19515
19595
|
maxObjectBytes: 16 * 1024 * 1024,
|
|
@@ -19697,7 +19777,7 @@ async function readSolutionFile(filePath) {
|
|
|
19697
19777
|
const [parseError, solution] = catchError(() => JSON.parse(rawContent));
|
|
19698
19778
|
if (parseError) {
|
|
19699
19779
|
return [
|
|
19700
|
-
new
|
|
19780
|
+
new SolutionFileError2(`Invalid JSON in solution file: ${parseError.message}`, "invalid_argument"),
|
|
19701
19781
|
null
|
|
19702
19782
|
];
|
|
19703
19783
|
}
|
|
@@ -19709,7 +19789,10 @@ async function resolveSolutionFilePath(solutionFileOption, searchStartDir) {
|
|
|
19709
19789
|
const resolved = fs.path.resolve(fs.env.cwd(), solutionFileOption);
|
|
19710
19790
|
const exists = await fs.exists(resolved);
|
|
19711
19791
|
if (!exists) {
|
|
19712
|
-
return [
|
|
19792
|
+
return [
|
|
19793
|
+
new SolutionFileError2(`Solution file not found: ${resolved}`, "not_found"),
|
|
19794
|
+
null
|
|
19795
|
+
];
|
|
19713
19796
|
}
|
|
19714
19797
|
return [null, resolved];
|
|
19715
19798
|
}
|
|
@@ -19909,6 +19992,24 @@ function findMemberCloneResources(resources, memberProjectKeys) {
|
|
|
19909
19992
|
function hasPackageDependency(resource) {
|
|
19910
19993
|
return (resource.dependencies ?? []).some((dependency) => (dependency.kind ?? "").toLowerCase() === "package");
|
|
19911
19994
|
}
|
|
19995
|
+
var ORPHAN_CHECKED_KINDS = new Set(["process", "app"]);
|
|
19996
|
+
function findOrphanedDeclarations(resources, bound, boundKeys = new Set) {
|
|
19997
|
+
const depended = new Set(resources.flatMap((r) => (r.dependencies ?? []).map((d) => `${d.kind ?? ""}:${d.name ?? ""}`.toLowerCase())));
|
|
19998
|
+
return resources.filter((candidate) => {
|
|
19999
|
+
const kind = (candidate.kind ?? "").toLowerCase();
|
|
20000
|
+
if (!ORPHAN_CHECKED_KINDS.has(kind))
|
|
20001
|
+
return false;
|
|
20002
|
+
if (candidate.isArtefactResource === true || candidate.projectKey) {
|
|
20003
|
+
return false;
|
|
20004
|
+
}
|
|
20005
|
+
if (boundKeys.has((candidate.key ?? "").toLowerCase()))
|
|
20006
|
+
return false;
|
|
20007
|
+
const name = candidate.name ?? "";
|
|
20008
|
+
if (depended.has(`${kind}:${name}`.toLowerCase()))
|
|
20009
|
+
return false;
|
|
20010
|
+
return !bound.some((b) => b.kind.toLowerCase() === kind && nameSuffixRegex(b.name, false).test(name));
|
|
20011
|
+
});
|
|
20012
|
+
}
|
|
19912
20013
|
// src/resources/services/project-artifacts-service.ts
|
|
19913
20014
|
async function addProjectArtifactsToSolutionAsync(options) {
|
|
19914
20015
|
const error = await createProjectInSolutionBuilder(options.solutionDir, options.projectId, options.projectName, normalizeProjectType2(options.projectType), options.projectSubType);
|
|
@@ -19987,9 +20088,30 @@ function toCatalogReference(reference) {
|
|
|
19987
20088
|
};
|
|
19988
20089
|
}
|
|
19989
20090
|
async function exportResourceDefinitionAsync(importer, reference) {
|
|
19990
|
-
const payload = await importer.exportResourceAsync(reference);
|
|
20091
|
+
const [error, payload] = await catchError(importer.exportResourceAsync(reference));
|
|
20092
|
+
if (error) {
|
|
20093
|
+
throw withExportStatus(error);
|
|
20094
|
+
}
|
|
19991
20095
|
return payload.resourceDefinitions.find((d) => d.key === reference.key);
|
|
19992
20096
|
}
|
|
20097
|
+
|
|
20098
|
+
class ResourceExportError extends Error {
|
|
20099
|
+
status;
|
|
20100
|
+
constructor(message, status, cause) {
|
|
20101
|
+
super(message, { cause });
|
|
20102
|
+
this.status = status;
|
|
20103
|
+
this.name = "ResourceExportError";
|
|
20104
|
+
}
|
|
20105
|
+
}
|
|
20106
|
+
function withExportStatus(error) {
|
|
20107
|
+
if (!(error instanceof Error) || !("exceptionData" in error)) {
|
|
20108
|
+
return error;
|
|
20109
|
+
}
|
|
20110
|
+
const data = error.exceptionData;
|
|
20111
|
+
const text = typeof data === "object" && data !== null ? data.errorMessage : undefined;
|
|
20112
|
+
const match = typeof text === "string" ? /^HTTP (\d{3})\b/.exec(text) : null;
|
|
20113
|
+
return match ? new ResourceExportError(error.message, Number(match[1]), error) : error;
|
|
20114
|
+
}
|
|
19993
20115
|
function readSpecProperty(spec, name) {
|
|
19994
20116
|
if (!spec) {
|
|
19995
20117
|
return;
|
|
@@ -20294,47 +20416,6 @@ async function findResourcesByNameAsync(services, builder, { kind, name, subType
|
|
|
20294
20416
|
folderKey: row.folderKey ?? undefined
|
|
20295
20417
|
}));
|
|
20296
20418
|
}
|
|
20297
|
-
// src/resources/services/resource-name.ts
|
|
20298
|
-
var MAX_RESOURCE_NAME_LENGTH = 256;
|
|
20299
|
-
var UNSAFE_NAME_CHARS = /[\\/:*?"<>|]/;
|
|
20300
|
-
function hasControlChar(value) {
|
|
20301
|
-
for (let i = 0;i < value.length; i++) {
|
|
20302
|
-
if (value.charCodeAt(i) < 32)
|
|
20303
|
-
return true;
|
|
20304
|
-
}
|
|
20305
|
-
return false;
|
|
20306
|
-
}
|
|
20307
|
-
function validateResourceName(name, options = {}) {
|
|
20308
|
-
const optionName = options.optionName ?? "--name";
|
|
20309
|
-
if (name.trim() === "") {
|
|
20310
|
-
return {
|
|
20311
|
-
ok: false,
|
|
20312
|
-
message: `${optionName} must not be blank`,
|
|
20313
|
-
instructions: "Pass a non-empty resource name."
|
|
20314
|
-
};
|
|
20315
|
-
}
|
|
20316
|
-
if (name.length > MAX_RESOURCE_NAME_LENGTH) {
|
|
20317
|
-
return {
|
|
20318
|
-
ok: false,
|
|
20319
|
-
message: `${optionName} exceeds the ${MAX_RESOURCE_NAME_LENGTH}-character limit (got ${name.length})`,
|
|
20320
|
-
instructions: "Shorten the resource name. Orchestrator name limits are kind-specific (queues cap at 50, assets at 256)."
|
|
20321
|
-
};
|
|
20322
|
-
}
|
|
20323
|
-
if (UNSAFE_NAME_CHARS.test(name) || hasControlChar(name)) {
|
|
20324
|
-
return {
|
|
20325
|
-
ok: false,
|
|
20326
|
-
message: `${optionName} contains unsafe characters`,
|
|
20327
|
-
instructions: 'Resource names cannot contain path separators (/, \\), control characters, or any of: : * ? " < > |'
|
|
20328
|
-
};
|
|
20329
|
-
}
|
|
20330
|
-
return { ok: true };
|
|
20331
|
-
}
|
|
20332
|
-
function assertValidResourceName(name, options = {}) {
|
|
20333
|
-
const result = validateResourceName(name, options);
|
|
20334
|
-
if (!result.ok) {
|
|
20335
|
-
throw new Error(`${result.message}. ${result.instructions}`);
|
|
20336
|
-
}
|
|
20337
|
-
}
|
|
20338
20419
|
// src/resources/services/sync-resources-from-bindings.ts
|
|
20339
20420
|
var TYPE_IS_IDENTITY_REPLACE_OPTIONS = new Set([
|
|
20340
20421
|
"SameType",
|
|
@@ -20449,7 +20530,7 @@ function resolveBindingResourceIdentity(binding) {
|
|
|
20449
20530
|
};
|
|
20450
20531
|
}
|
|
20451
20532
|
}
|
|
20452
|
-
async function syncResourcesFromBindings(solutionDir, projectPaths, projectSubTypes, projectBindings, selfProvisioned) {
|
|
20533
|
+
async function syncResourcesFromBindings(solutionDir, projectPaths, projectSubTypes, projectBindings, selfProvisioned, options = {}) {
|
|
20453
20534
|
const result = {
|
|
20454
20535
|
created: 0,
|
|
20455
20536
|
imported: 0,
|
|
@@ -20461,7 +20542,7 @@ async function syncResourcesFromBindings(solutionDir, projectPaths, projectSubTy
|
|
|
20461
20542
|
};
|
|
20462
20543
|
const uipxProjects = await readUipxProjects(solutionDir);
|
|
20463
20544
|
const paths = projectPaths ?? uipxProjects.map((p) => p.path);
|
|
20464
|
-
if (paths.length === 0) {
|
|
20545
|
+
if (paths.length === 0 && projectPaths !== undefined) {
|
|
20465
20546
|
return result;
|
|
20466
20547
|
}
|
|
20467
20548
|
const bindingsJsonFallbackDirs = new Set(uipxProjects.filter((p) => BINDINGS_JSON_FALLBACK_TYPES.has(p.type.toLowerCase())).map((p) => p.path));
|
|
@@ -20489,7 +20570,11 @@ async function syncResourcesFromBindings(solutionDir, projectPaths, projectSubTy
|
|
|
20489
20570
|
result.projectResourcesCreated = reconcileOutcome.resourcesAdded;
|
|
20490
20571
|
const memberProjectKeys = new Set(uipxProjects.map((project) => project.id.toLowerCase()));
|
|
20491
20572
|
await pruneMemberClones(builder, memberProjectKeys, result);
|
|
20573
|
+
const reportUnbound = projectPaths === undefined && options.bindingsComplete !== false;
|
|
20492
20574
|
if (allBindings.length === 0) {
|
|
20575
|
+
if (reportUnbound) {
|
|
20576
|
+
await reportOrphanedDeclarations(services, builder, allBindings, result);
|
|
20577
|
+
}
|
|
20493
20578
|
const saveError = await saveAndDisposeBuilder(builder, solutionDir);
|
|
20494
20579
|
if (saveError) {
|
|
20495
20580
|
throw new Error(`Failed to save solution changes: ${saveError.message}`);
|
|
@@ -20674,6 +20759,9 @@ async function syncResourcesFromBindings(solutionDir, projectPaths, projectSubTy
|
|
|
20674
20759
|
});
|
|
20675
20760
|
result.warnings.push(catalogLookupWarning(result.catalogLookupFailure, keptUnchecked, result.unresolved));
|
|
20676
20761
|
}
|
|
20762
|
+
if (reportUnbound) {
|
|
20763
|
+
await reportOrphanedDeclarations(services, builder, allBindings, result);
|
|
20764
|
+
}
|
|
20677
20765
|
const saveError = await saveAndDisposeBuilder(builder, solutionDir);
|
|
20678
20766
|
if (saveError) {
|
|
20679
20767
|
throw new Error(`Failed to save solution changes: ${saveError.message}`);
|
|
@@ -20701,6 +20789,32 @@ async function pruneMemberClones(builder, memberProjectKeys, result) {
|
|
|
20701
20789
|
logger.info(`Removed duplicate ${clone.kind} "${clone.name}" (key: ${clone.key}) — the solution provisions this project itself`);
|
|
20702
20790
|
}
|
|
20703
20791
|
}
|
|
20792
|
+
async function reportOrphanedDeclarations(services, builder, bindings, result) {
|
|
20793
|
+
const [loadError, solution] = await catchError(builder.context.loadAsync());
|
|
20794
|
+
if (loadError || !solution) {
|
|
20795
|
+
logger.warn(`Skipping the unbound declaration check; failed to load solution: ${loadError?.message ?? "unknown"}`);
|
|
20796
|
+
return;
|
|
20797
|
+
}
|
|
20798
|
+
const [overwritesError, overwrites] = await catchError((async () => services.container.resolve(Tokens.IResourceOverwritesService).getTenantResourceOverwritesAsync(builder.context))());
|
|
20799
|
+
if (overwritesError) {
|
|
20800
|
+
logger.warn(`Skipping the unbound declaration check; failed to read resource overwrites: ${overwritesError.message}`);
|
|
20801
|
+
return;
|
|
20802
|
+
}
|
|
20803
|
+
const bound = bindings.flatMap((binding) => {
|
|
20804
|
+
const name = getResourceName(binding);
|
|
20805
|
+
return name ? [{ kind: resolveBindingResourceIdentity(binding).kind, name }] : [];
|
|
20806
|
+
});
|
|
20807
|
+
const boundKeys = new Set((overwrites ?? []).filter((o) => {
|
|
20808
|
+
const name = o.overwrite?.resourceName?.toLowerCase();
|
|
20809
|
+
const kind = o.overwrite?.kind?.toLowerCase();
|
|
20810
|
+
return bound.some((b) => b.name.toLowerCase() === name && (!kind || b.kind.toLowerCase() === kind));
|
|
20811
|
+
}).flatMap((o) => o.solutionResourceKey ? [o.solutionResourceKey.toLowerCase()] : []));
|
|
20812
|
+
for (const orphan of findOrphanedDeclarations(solution.resources ?? [], bound, boundKeys)) {
|
|
20813
|
+
const warning = `${orphan.kind} "${orphan.name}" is declared in the solution but no project binds it, and deploy still provisions it. If nothing needs it, remove it: uip solution resources remove ${orphan.key}`;
|
|
20814
|
+
result.warnings.push(warning);
|
|
20815
|
+
logger.warn(warning);
|
|
20816
|
+
}
|
|
20817
|
+
}
|
|
20704
20818
|
async function isUncheckedBindingCovered(builder, knownResourceKeys, kind, name, directCloudKey) {
|
|
20705
20819
|
if (directCloudKey) {
|
|
20706
20820
|
return knownResourceKeys.has(directCloudKey.toLowerCase());
|
|
@@ -21227,7 +21341,9 @@ async function resourceRefreshAsync(solutionPath = ".", options = {}) {
|
|
|
21227
21341
|
if (bindingsError) {
|
|
21228
21342
|
resolverWarnings.push(`Could not read the bindings projects contribute: ${bindingsError.message}. Those projects were synced from any bindings_v2.json on disk instead; fix the tool install and re-run 'uip solution resources refresh'.`);
|
|
21229
21343
|
}
|
|
21230
|
-
const [syncError, result] = await catchError(syncResourcesFromBindings(resolvedPath, undefined, projectSubTypes ?? new Map, projectBindings ?? new Map
|
|
21344
|
+
const [syncError, result] = await catchError(syncResourcesFromBindings(resolvedPath, undefined, projectSubTypes ?? new Map, projectBindings ?? new Map, undefined, {
|
|
21345
|
+
bindingsComplete: !bindingsError && (options.isProjectBindingsComplete?.() ?? true)
|
|
21346
|
+
}));
|
|
21231
21347
|
if (syncError) {
|
|
21232
21348
|
return {
|
|
21233
21349
|
ok: false,
|
|
@@ -21425,12 +21541,13 @@ function sortKeysDeep2(value) {
|
|
|
21425
21541
|
export {
|
|
21426
21542
|
CatalogLookupError,
|
|
21427
21543
|
EntryPointSpecEnhancer,
|
|
21428
|
-
MAX_RESOURCE_NAME_LENGTH,
|
|
21544
|
+
MAX_RESOURCE_NAME_LENGTH2 as MAX_RESOURCE_NAME_LENGTH,
|
|
21429
21545
|
ProjectManifestError,
|
|
21546
|
+
ResourceExportError,
|
|
21430
21547
|
addProjectArtifactsToSolutionAsync,
|
|
21431
21548
|
applyEntryPointEnhancementAsync,
|
|
21432
21549
|
assertSolutionManifest,
|
|
21433
|
-
assertValidResourceName,
|
|
21550
|
+
assertValidResourceName2 as assertValidResourceName,
|
|
21434
21551
|
computeEntryPointSpec,
|
|
21435
21552
|
createLocalResource,
|
|
21436
21553
|
createProjectInSolutionBuilder,
|
|
@@ -21443,6 +21560,7 @@ export {
|
|
|
21443
21560
|
findMatchingLocalResource,
|
|
21444
21561
|
findMatchingMemberResource,
|
|
21445
21562
|
findMemberCloneResources,
|
|
21563
|
+
findOrphanedDeclarations,
|
|
21446
21564
|
findProjectFile,
|
|
21447
21565
|
findResourceByKeyInRcs,
|
|
21448
21566
|
findResourceInRcs,
|
|
@@ -21451,6 +21569,7 @@ export {
|
|
|
21451
21569
|
getRemoteResourceClients,
|
|
21452
21570
|
hasAnyTemplateRow,
|
|
21453
21571
|
hasBareTemplateRow,
|
|
21572
|
+
hasUnsafeNameChars2 as hasUnsafeNameChars,
|
|
21454
21573
|
isMissingProjectTypeError,
|
|
21455
21574
|
isProjectManifestError,
|
|
21456
21575
|
isResourceKeyNotFound,
|
|
@@ -21481,8 +21600,8 @@ export {
|
|
|
21481
21600
|
toCatalogReference,
|
|
21482
21601
|
toResourceReference,
|
|
21483
21602
|
uniqueNameForResource,
|
|
21484
|
-
validateResourceName,
|
|
21603
|
+
validateResourceName2 as validateResourceName,
|
|
21485
21604
|
writeSolutionFile
|
|
21486
21605
|
};
|
|
21487
21606
|
|
|
21488
|
-
//# debugId=
|
|
21607
|
+
//# debugId=F6ECF8C9399BDAA764756E2164756E21
|
package/dist/solution-auth.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getSolutionAuthContext2
|
|
3
|
-
} from "./index-
|
|
4
|
-
import"./index-
|
|
5
|
-
import"./index-
|
|
3
|
+
} from "./index-knpm888a.js";
|
|
4
|
+
import"./index-mgaz5jpa.js";
|
|
5
|
+
import"./index-3stpkr4a.js";
|
|
6
6
|
export {
|
|
7
7
|
getSolutionAuthContext2 as getSolutionAuthContext
|
|
8
8
|
};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ export { buildSolutionPackageFromDir, bundleSolution, resolveSolutionDir, Uipign
|
|
|
5
5
|
export { getProjectDebugStatus, isDebugProvisioningSucceeded, isDebugProvisioningTerminal, type ProjectDebugStatusClientConfig, type ProjectDebugStatusError, type ProjectDebugStatusResponse, } from "./project-debug-status";
|
|
6
6
|
export { type PackageVersionSearchFilter, type PackageVersionSearchRow, type PackageVersionsClientConfig, searchPackageVersions, } from "./search-package-versions";
|
|
7
7
|
export type { AutoCreatedSolution, ParentSolutionDiscovery, PrepareProjectLocationOptions, PrepareProjectLocationResult, ProjectSolutionRegistration, RegisterProjectOptions, SolutionManifestCreation, } from "./solution-file";
|
|
8
|
-
export { autoScaffoldSolution, createSolutionManifest, findNearestParentUipxFile, findSolutionFile, findSolutionFileUpward, isProjectRegisteredInSolution, normalizeProjectType, prepareProjectLocation, readSolutionManifest, readUipxFile, toPortableRelativePath, tryRegisterProjectInParentSolution, updateSolutionFile, updateUipxSolutionId, } from "./solution-file";
|
|
8
|
+
export { autoScaffoldSolution, createSolutionManifest, findListedProjectDir, findNearestParentUipxFile, findSolutionFile, findSolutionFileUpward, isProjectRegisteredInSolution, normalizeProjectType, prepareProjectLocation, readSolutionManifest, readUipxFile, SolutionFileError, toPortableRelativePath, tryRegisterProjectInParentSolution, type UipxSolutionIdUpdate, updateSolutionFile, updateUipxSolutionId, } from "./solution-file";
|
|
9
9
|
export { getStudioWebSolutionProjects, type ListStudioWebSolutionsOptions, listStudioWebSolutions, type StudioWebSolutionsPage, } from "./solution-info";
|
|
10
|
-
export { StudioWebIncompatibleProjectError } from "./studio-web-compat";
|
|
10
|
+
export { StudioWebIncompatibleProjectError, StudioWebInvalidFileNameError, } from "./studio-web-compat";
|
|
11
11
|
export type { BundleResult, SolutionImportResponse, StudioWebConfig, StudioWebSolutionProject, UipxFile, UipxProject, } from "./types";
|
|
12
12
|
export type { SolutionUploadOperation } from "./upload-service";
|
|
13
13
|
export { buildSolutionUploadFailureOutput, importSolution, isSolutionUploadHttpError, overwriteSolution, SolutionUploadHttpError, solutionExistsOnStudioWeb, uploadOrOverwriteSolution, } from "./upload-service";
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The invocation graph of a solution: which projects the lead project can
|
|
3
|
+
* reach through process calls (Run Job, Start Job, Invoke Process, a Flow
|
|
4
|
+
* process node).
|
|
5
|
+
*
|
|
6
|
+
* Pure and dependency-free on purpose. The graph knows no file format: each
|
|
7
|
+
* project type answers for its own calls through `callsOf`, and the caller
|
|
8
|
+
* decides what a reachable project is used for (the just-in-time debug map
|
|
9
|
+
* today).
|
|
10
|
+
*
|
|
11
|
+
* Every rule leans the same way: when the graph cannot tell, it keeps every
|
|
12
|
+
* project of the solution. A project left out of a just-in-time map makes a
|
|
13
|
+
* call to it start the deployed process of that name, or fail, so the only
|
|
14
|
+
* safe error is a project too many.
|
|
15
|
+
*
|
|
16
|
+
* An edge matches a process name to a project name. Orchestrator matches a
|
|
17
|
+
* call to the name of an entry in the just-in-time map, and a project can
|
|
18
|
+
* contribute an entry under another name
|
|
19
|
+
* (`ProjectExecutor.buildJitProcessEntriesAsync`, for example an agent inside
|
|
20
|
+
* a Flow). A call to such an entry names no project, so it counts as a call to
|
|
21
|
+
* a process outside the solution and keeps every project. To prune a solution
|
|
22
|
+
* that makes such calls, match the entry names of each project here too.
|
|
23
|
+
*/
|
|
24
|
+
/** The one field of a solution project the graph reads. */
|
|
25
|
+
export interface InvocationGraphProject {
|
|
26
|
+
readonly name: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* One process call of a project, as its project type reports it.
|
|
30
|
+
*
|
|
31
|
+
* A `processName` that is null, absent or blank is a dynamic call: the name is
|
|
32
|
+
* an expression, so the target is not known before the run. The folder of a
|
|
33
|
+
* call is not read: Orchestrator matches a child job to a just-in-time entry
|
|
34
|
+
* by name, whatever folder the call names.
|
|
35
|
+
*/
|
|
36
|
+
export interface InvocationGraphCall {
|
|
37
|
+
readonly processName?: string | null;
|
|
38
|
+
readonly activityId?: string | null;
|
|
39
|
+
readonly workflowPath?: string | null;
|
|
40
|
+
}
|
|
41
|
+
/** What a project type says about the process calls of one project. */
|
|
42
|
+
export type ProjectProcessCalls = {
|
|
43
|
+
readonly status: "known";
|
|
44
|
+
readonly calls: readonly InvocationGraphCall[];
|
|
45
|
+
} | {
|
|
46
|
+
/** The project type cannot list the calls, for example for coded workflows. */
|
|
47
|
+
readonly status: "unknown";
|
|
48
|
+
readonly reason: string;
|
|
49
|
+
};
|
|
50
|
+
/** A process call from one project of the solution to another. */
|
|
51
|
+
export interface InvocationEdge<P extends InvocationGraphProject> {
|
|
52
|
+
readonly from: P;
|
|
53
|
+
readonly to: P;
|
|
54
|
+
readonly activityId?: string;
|
|
55
|
+
readonly workflowPath?: string;
|
|
56
|
+
}
|
|
57
|
+
/** Why the graph kept every project of the solution. */
|
|
58
|
+
export interface KeptAllProjects {
|
|
59
|
+
readonly kind: "dynamicCall" | "externalCall" | "unknown" | "failed";
|
|
60
|
+
/** The reachable project whose answer made the graph keep every project. */
|
|
61
|
+
readonly project: string;
|
|
62
|
+
readonly message: string;
|
|
63
|
+
}
|
|
64
|
+
export interface ReachableProjects<P extends InvocationGraphProject> {
|
|
65
|
+
/**
|
|
66
|
+
* The lead plus each project it reaches, in the order of the solution
|
|
67
|
+
* file. Every project of the solution when {@link keptAll} is set.
|
|
68
|
+
*/
|
|
69
|
+
readonly projects: readonly P[];
|
|
70
|
+
/** The edges found, including the ones before the walk stopped. */
|
|
71
|
+
readonly edges: readonly InvocationEdge<P>[];
|
|
72
|
+
/** Set when the graph could not tell and kept every project. */
|
|
73
|
+
readonly keptAll?: KeptAllProjects;
|
|
74
|
+
}
|
|
75
|
+
export interface ResolveReachableProjectsInput<P extends InvocationGraphProject> {
|
|
76
|
+
/** Every project of the solution, in the order of the solution file. */
|
|
77
|
+
readonly projects: readonly P[];
|
|
78
|
+
/** The project that runs. Always in the result. */
|
|
79
|
+
readonly lead: P;
|
|
80
|
+
/**
|
|
81
|
+
* Ask the project type of one project for its process calls. Called only
|
|
82
|
+
* for a reachable project, one at a time, and one time per project. A
|
|
83
|
+
* rejection keeps every project.
|
|
84
|
+
*/
|
|
85
|
+
readonly callsOf: (project: P) => Promise<ProjectProcessCalls>;
|
|
86
|
+
readonly cancellationToken?: AbortSignal;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Walk from the lead through the process calls of each reachable project.
|
|
90
|
+
*
|
|
91
|
+
* An edge joins a call to each project whose name equals the process name,
|
|
92
|
+
* without regard to case, as Orchestrator matches a child job to an entry of
|
|
93
|
+
* the just-in-time map. A call of a project to itself is not an edge.
|
|
94
|
+
*
|
|
95
|
+
* A call that names no project of the solution starts a process that the
|
|
96
|
+
* solution does not contain. That process runs in the same debug session, so
|
|
97
|
+
* Orchestrator matches each job it starts to the just-in-time map of the lead
|
|
98
|
+
* too. Its calls cannot be listed, so it can reach any project.
|
|
99
|
+
*
|
|
100
|
+
* The walk stops and keeps every project at the first dynamic call, at the
|
|
101
|
+
* first call to a process outside the solution, at the first project that
|
|
102
|
+
* answers "unknown", and at the first provider that fails.
|
|
103
|
+
* No further provider is asked then, because the answer cannot change.
|
|
104
|
+
*
|
|
105
|
+
* @throws the cancellation reason when `cancellationToken` aborts.
|
|
106
|
+
*/
|
|
107
|
+
export declare function resolveReachableProjectsAsync<P extends InvocationGraphProject>(input: ResolveReachableProjectsInput<P>): Promise<ReachableProjects<P>>;
|
|
@@ -61,3 +61,26 @@ export declare function findMatchingMemberResource(resources: ResourceDefinition
|
|
|
61
61
|
* suffixes an import that collides with it.
|
|
62
62
|
*/
|
|
63
63
|
export declare function findMemberCloneResources(resources: ResourceDefinition[], memberProjectKeys: ReadonlySet<string>): ResourceDefinition[];
|
|
64
|
+
/** A resource a project binding names, by `(kind, name)`. */
|
|
65
|
+
export interface BoundResourceName {
|
|
66
|
+
kind: string;
|
|
67
|
+
name: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Collect the process and app declarations nothing in the solution uses: no
|
|
71
|
+
* project's binding names them and no other resource depends on them.
|
|
72
|
+
*
|
|
73
|
+
* Reported, never deleted: a declaration does not record whether a binding
|
|
74
|
+
* created it or an author added it on purpose. A declaration is kept out of
|
|
75
|
+
* the list when it:
|
|
76
|
+
*
|
|
77
|
+
* - belongs to a project (`projectKey` / `isArtefactResource`) — reconcile
|
|
78
|
+
* owns those;
|
|
79
|
+
* - is named by a binding on `(kind, name | name_<N>)`, folder ignored — an
|
|
80
|
+
* import or virtual is homed in `solution_folder` whatever folder the
|
|
81
|
+
* binding names, and `addResourceWithUniqueName` may have suffixed it;
|
|
82
|
+
* - is the solution resource a binding reaches through the import overwrites
|
|
83
|
+
* (`boundKeys`) — an import renamed locally keeps its cloud name there;
|
|
84
|
+
* - is a `dependencies` entry of another resource (a trigger's process).
|
|
85
|
+
*/
|
|
86
|
+
export declare function findOrphanedDeclarations(resources: ResourceDefinition[], bound: readonly BoundResourceName[], boundKeys?: ReadonlySet<string>): ResourceDefinition[];
|
|
@@ -31,8 +31,19 @@ export declare function toCatalogReference(reference: CatalogReference): Resourc
|
|
|
31
31
|
/**
|
|
32
32
|
* The export carries the resource plus its transitive dependencies, so the
|
|
33
33
|
* definition is picked by key; `undefined` when the export holds none for it.
|
|
34
|
+
* A service's HTTP answer comes back as a {@link ResourceExportError}, so
|
|
35
|
+
* `extractErrorDetails` classifies it by its status.
|
|
34
36
|
*/
|
|
35
37
|
export declare function exportResourceDefinitionAsync(importer: IImportResourceHelper, reference: ResourceReferenceModel): Promise<EnhancedResourceDefinition | undefined>;
|
|
38
|
+
/**
|
|
39
|
+
* An export the owning service answered with an HTTP error. `status` is what
|
|
40
|
+
* `extractErrorDetails` reads, so a 404 is `not_found` and a 429 or 5xx can be
|
|
41
|
+
* retried. The SDK's own error stays as `cause`.
|
|
42
|
+
*/
|
|
43
|
+
export declare class ResourceExportError extends Error {
|
|
44
|
+
readonly status: number;
|
|
45
|
+
constructor(message: string, status: number, cause: unknown);
|
|
46
|
+
}
|
|
36
47
|
/** Reads a spec property by exact name, falling back to a case-insensitive match. */
|
|
37
48
|
export declare function readSpecProperty(spec: Record<string, unknown> | null | undefined, name: string): unknown;
|
|
38
49
|
/** Same row shape as `uip or packages entry-points`; the schemas stay JSON strings. */
|
|
@@ -7,6 +7,12 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/** Orchestrator's most permissive resource-name limit is 256 chars (Asset). */
|
|
9
9
|
export declare const MAX_RESOURCE_NAME_LENGTH = 256;
|
|
10
|
+
/**
|
|
11
|
+
* Whether a file or resource name holds a path separator, a control
|
|
12
|
+
* character, or any of `: * ? " < > |`. Studio Web refuses a project file
|
|
13
|
+
* whose name holds one, too (STUD-81955).
|
|
14
|
+
*/
|
|
15
|
+
export declare function hasUnsafeNameChars(name: string): boolean;
|
|
10
16
|
export type ResourceNameValidation = {
|
|
11
17
|
ok: true;
|
|
12
18
|
} | {
|
|
@@ -19,6 +19,14 @@ export interface ResourceRefreshOptions {
|
|
|
19
19
|
* so a caller can answer both from one collect.
|
|
20
20
|
*/
|
|
21
21
|
resolveProjectBindingsAsync?: () => Promise<ReadonlyMap<string, readonly ContributedBinding[]>>;
|
|
22
|
+
/**
|
|
23
|
+
* Whether every project's bindings were read. Asked after
|
|
24
|
+
* `resolveProjectBindingsAsync`; answer `false` when a project's tool
|
|
25
|
+
* reported an error (an unreadable `.flow` contributes no bindings), so
|
|
26
|
+
* refresh does not report a declaration that project still binds as
|
|
27
|
+
* unused. Treated as `true` when omitted.
|
|
28
|
+
*/
|
|
29
|
+
isProjectBindingsComplete?: () => boolean;
|
|
22
30
|
}
|
|
23
31
|
export interface ResourceRefreshSuccess {
|
|
24
32
|
ok: true;
|
|
@@ -87,8 +87,14 @@ export interface SelfProvisionedResource {
|
|
|
87
87
|
* @param selfProvisioned - Resources the solution provisions itself, by
|
|
88
88
|
* `(kind, name)`. A binding naming one is minted as a virtual without a
|
|
89
89
|
* Resource Catalog lookup, as a member project's declaration is.
|
|
90
|
+
* @param options.bindingsComplete - `false` when some project's bindings
|
|
91
|
+
* could not be read (its tool failed to load or reported an error), so a
|
|
92
|
+
* declaration no binding names may still be in use. Skips the unbound
|
|
93
|
+
* declaration check, which otherwise runs whenever every project is scanned.
|
|
90
94
|
*/
|
|
91
|
-
export declare function syncResourcesFromBindings(solutionDir: string, projectPaths?: string[], projectSubTypes?: ReadonlyMap<string, string>, projectBindings?: ReadonlyMap<string, readonly ContributedBinding[]>, selfProvisioned?: readonly SelfProvisionedResource[]
|
|
95
|
+
export declare function syncResourcesFromBindings(solutionDir: string, projectPaths?: string[], projectSubTypes?: ReadonlyMap<string, string>, projectBindings?: ReadonlyMap<string, readonly ContributedBinding[]>, selfProvisioned?: readonly SelfProvisionedResource[], options?: {
|
|
96
|
+
bindingsComplete?: boolean;
|
|
97
|
+
}): Promise<SyncResult>;
|
|
92
98
|
/**
|
|
93
99
|
* Mirror of SDK's private `addResourceWithUniqueName`
|
|
94
100
|
* (resource-builder-sdk index.js:673): if any other resource of the same
|
|
@@ -2,6 +2,9 @@ import { type SessionIdentity } from "@uipath/auth";
|
|
|
2
2
|
export interface SolutionAuthContext {
|
|
3
3
|
accessToken: string;
|
|
4
4
|
basePath: string;
|
|
5
|
+
/** Session coordinates for navigable browser links; absent on older hosts. */
|
|
6
|
+
baseUrl?: string;
|
|
7
|
+
organizationName?: string;
|
|
5
8
|
organizationId: string;
|
|
6
9
|
tenantName: string;
|
|
7
10
|
/** Who the session acts as, as the login status resolved it (see `AuthContext.identity`). */
|