@uipath/solution-sdk 1.206.0-preview.306 → 1.207.0-preview.307
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/THIRD-PARTY-NOTICES.md +2 -2
- package/dist/deployment-search.js +5 -5
- package/dist/{embedded-file-reader-pxpwcq3n.js → embedded-file-reader-k94wt612.js} +16 -16
- package/dist/{first-party-service-6b9ajm57.js → first-party-service-qfg2m05s.js} +1 -1
- package/dist/{index-t1evhtnh.js → index-1bffghc6.js} +88 -21
- package/dist/{index-j1tcfaem.js → index-3j38eakj.js} +9 -5
- package/dist/{index-0b3srjv7.js → index-3stpkr4a.js} +30 -8
- package/dist/{index-y9qx7901.js → index-93ee30d0.js} +248 -132
- package/dist/index-b4cns9y6.js +48 -0
- package/dist/{index-amqqhge1.js → index-ewg6ygg0.js} +1 -1
- package/dist/{index-xnrbg4x3.js → index-knpm888a.js} +4 -2
- package/dist/{index-bpn15jyk.js → index-mgaz5jpa.js} +48 -6
- package/dist/{index-jjkypwge.js → index-s8jxyjgj.js} +15 -4
- 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 +3104 -765
- package/dist/solution-auth.js +3 -3
- package/dist/{solution-definition-helper-6zwd9hjs.js → solution-definition-helper-qjj01xh0.js} +1 -1
- 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/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`). */
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Utilities for reading, finding, and updating .uipx solution files.
|
|
3
3
|
*/
|
|
4
|
+
import { type CliErrorCode } from "@uipath/common";
|
|
4
5
|
import type { IFileSystem } from "@uipath/filesystem";
|
|
5
6
|
import type { UipxFile, UipxProject } from "./types";
|
|
7
|
+
/**
|
|
8
|
+
* A `.uipx` that cannot be found or read, classified at the source. Carries
|
|
9
|
+
* `errorCode` duck-typed (`carriedErrorCode`), so a command that reports it
|
|
10
|
+
* with `reportFailure` gets `not_found` / `invalid_argument` instead of the
|
|
11
|
+
* `unknown_error` a bare `Error` falls back to.
|
|
12
|
+
*/
|
|
13
|
+
export declare class SolutionFileError extends Error {
|
|
14
|
+
readonly errorCode: CliErrorCode;
|
|
15
|
+
constructor(message: string, errorCode: CliErrorCode);
|
|
16
|
+
}
|
|
6
17
|
/**
|
|
7
18
|
* Outcome of attempting to register a project in its parent `.uipx` solution.
|
|
8
19
|
*
|
|
@@ -154,8 +165,10 @@ export interface PrepareProjectLocationResult {
|
|
|
154
165
|
* - No parent solution found → scaffold `<baseDir>/<projectName>Solution/`
|
|
155
166
|
* and return its nested project path.
|
|
156
167
|
*
|
|
157
|
-
* The
|
|
158
|
-
* helper so the auto-scaffold behavior stays uniform.
|
|
168
|
+
* The member `*-init` tools (agent / case / flow / maestro bpmn / codedapp)
|
|
169
|
+
* share this helper so the auto-scaffold behavior stays uniform. `function
|
|
170
|
+
* init` deliberately does not: it initializes a project already on disk, so
|
|
171
|
+
* there is no new directory to place inside a solution.
|
|
159
172
|
*/
|
|
160
173
|
export declare function prepareProjectLocation(fs: IFileSystem, candidateProjectDir: string, projectName: string, options?: PrepareProjectLocationOptions): Promise<PrepareProjectLocationResult>;
|
|
161
174
|
/**
|
|
@@ -163,11 +176,18 @@ export declare function prepareProjectLocation(fs: IFileSystem, candidateProject
|
|
|
163
176
|
* Accepts a directory path or a .uipx file path.
|
|
164
177
|
*/
|
|
165
178
|
export declare function resolveSolutionDir(fs: IFileSystem, inputPath: string): string;
|
|
179
|
+
/** What {@link updateUipxSolutionId} changed, in the shape commands report it. */
|
|
180
|
+
export interface UipxSolutionIdUpdate {
|
|
181
|
+
Path: string;
|
|
182
|
+
From?: string;
|
|
183
|
+
To: string;
|
|
184
|
+
}
|
|
166
185
|
/**
|
|
167
|
-
*
|
|
168
|
-
*
|
|
186
|
+
* Point a .uipx at a Studio Web SolutionId, leaving the rest of the file's
|
|
187
|
+
* bytes alone. Returns what changed, or undefined when the file already had
|
|
188
|
+
* that id or could not be updated.
|
|
169
189
|
*/
|
|
170
|
-
export declare function updateUipxSolutionId(fs: IFileSystem, uipxPath: string, newSolutionId: string): Promise<
|
|
190
|
+
export declare function updateUipxSolutionId(fs: IFileSystem, uipxPath: string, newSolutionId: string): Promise<UipxSolutionIdUpdate | undefined>;
|
|
171
191
|
/**
|
|
172
192
|
* Find the .uipx solution file in the parent directory of a project path.
|
|
173
193
|
* Returns the solutionId and projectId, or undefined if not found.
|
|
@@ -180,7 +200,7 @@ export declare function findSolutionFile(fs: IFileSystem, projectPath: string):
|
|
|
180
200
|
* Update the .uipx solution file in the parent directory of a project path.
|
|
181
201
|
* Scans the parent dir for a .uipx file and updates its SolutionId.
|
|
182
202
|
*/
|
|
183
|
-
export declare function updateSolutionFile(fs: IFileSystem, projectPath: string, newSolutionId: string): Promise<
|
|
203
|
+
export declare function updateSolutionFile(fs: IFileSystem, projectPath: string, newSolutionId: string): Promise<UipxSolutionIdUpdate | undefined>;
|
|
184
204
|
export declare function tryRegisterProjectInParentSolution(fs: IFileSystem, projectDir: string, options?: RegisterProjectOptions): Promise<ProjectSolutionRegistration>;
|
|
185
205
|
export type ParentSolutionDiscovery = {
|
|
186
206
|
status: "found";
|
|
@@ -228,6 +248,16 @@ export declare function readSolutionManifest(fs: IFileSystem, solutionFile: stri
|
|
|
228
248
|
* project path and the manifest path is far more actionable.
|
|
229
249
|
*/
|
|
230
250
|
export declare function isProjectRegisteredInSolution(fs: IFileSystem, projectDir: string, solutionFile: string): Promise<boolean>;
|
|
251
|
+
/**
|
|
252
|
+
* The folder of the `projects` entry that is `projectDir`, relative to
|
|
253
|
+
* `solutionDir` and spelled as the manifest lists it (forward slashes), or
|
|
254
|
+
* `undefined` when no entry is. Entries match by real path, so a symlinked or
|
|
255
|
+
* differently cased spelling still finds the project (see
|
|
256
|
+
* {@link isProjectRegisteredInSolution}).
|
|
257
|
+
*/
|
|
258
|
+
export declare function findListedProjectDir(fs: IFileSystem, solutionDir: string, projectDir: string, projects: readonly {
|
|
259
|
+
ProjectRelativePath?: string;
|
|
260
|
+
}[]): Promise<string | undefined>;
|
|
231
261
|
/**
|
|
232
262
|
* Walks up from `startDir` to the filesystem root, returning the path of the
|
|
233
263
|
* single `.uipx` solution file found. Throws when none — or more than one in a
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Studio Web import-contract knowledge, kept out of the generic bundler.
|
|
3
|
-
*
|
|
4
|
-
* Studio Web's solution import accepts only `project.uiproj`-manifested
|
|
5
|
-
* projects for API Workflows: it drops a `project.json` Api project from a
|
|
6
|
-
* mixed solution, and fails an Api-only solution with HTTP 400 code 20001
|
|
7
|
-
* ("the project archive is corrupt or the compression isn't supported").
|
|
8
|
-
* Studio-Web-bound bundlers pass {@link assertStudioWebCompatibleProjects}
|
|
9
|
-
* to `bundleSolution`'s `validateProjects` hook so the defect is caught
|
|
10
|
-
* client-side, with its real cause, before anything is uploaded.
|
|
11
|
-
* UV-15161 / STUD-81261.
|
|
12
|
-
*
|
|
13
|
-
* This module is the rule's single shared home: tool packages must not
|
|
14
|
-
* import each other, so the two Studio-Web-bound callers (solution-tool's
|
|
15
|
-
* upload, agent-tool's debug) can only share the rule through solution-sdk.
|
|
16
|
-
*/
|
|
17
1
|
import type { UipxProject } from "./types";
|
|
18
2
|
/**
|
|
19
3
|
* Thrown by {@link assertStudioWebCompatibleProjects} when the `.uipx`
|
|
@@ -30,3 +14,22 @@ export declare class StudioWebIncompatibleProjectError extends Error {
|
|
|
30
14
|
* methods — a malformed value falls through to the regular bundle path.
|
|
31
15
|
*/
|
|
32
16
|
export declare function assertStudioWebCompatibleProjects(projects: UipxProject[]): void;
|
|
17
|
+
/**
|
|
18
|
+
* Thrown by {@link assertStudioWebValidFileNames} when a project file's name
|
|
19
|
+
* holds a character Studio Web refuses.
|
|
20
|
+
*/
|
|
21
|
+
export declare class StudioWebInvalidFileNameError extends Error {
|
|
22
|
+
readonly offendingPaths: string[];
|
|
23
|
+
constructor(offendingPaths: string[]);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Throws {@link StudioWebInvalidFileNameError} when the name of a file inside
|
|
27
|
+
* a project folder holds a character Studio Web refuses: an overwrite then
|
|
28
|
+
* fails with HTTP 500 code 20039 ("Path contains invalid characters") and an
|
|
29
|
+
* import with HTTP 400 code 20001 ("No projects were successfully imported"),
|
|
30
|
+
* and neither names the file. Measured on staging for each of `: * ? " < > |`
|
|
31
|
+
* and a control character. Only the last segment of each path is checked: a
|
|
32
|
+
* folder name holding one is accepted, and so is a file outside the project
|
|
33
|
+
* folders. STUD-81955.
|
|
34
|
+
*/
|
|
35
|
+
export declare function assertStudioWebValidFileNames(projectFilePaths: string[]): void;
|
package/dist/src/types.d.ts
CHANGED
|
@@ -12,8 +12,16 @@ export interface SolutionImportResponse {
|
|
|
12
12
|
id: string;
|
|
13
13
|
solutionId?: string;
|
|
14
14
|
projects: Array<{
|
|
15
|
+
/** The project id Studio Web assigned. */
|
|
15
16
|
id: string;
|
|
16
17
|
name: string;
|
|
18
|
+
/**
|
|
19
|
+
* The `.uipx` member id Studio Web stored as the project's design id
|
|
20
|
+
* when it imported the solution. `null` for a solution imported before
|
|
21
|
+
* Studio Web kept one; `Solution_GetSolution` backfills it, the import
|
|
22
|
+
* and overwrite responses do not.
|
|
23
|
+
*/
|
|
24
|
+
designId?: string | null;
|
|
17
25
|
}>;
|
|
18
26
|
}
|
|
19
27
|
/** A project of a Studio Web solution, as returned by Solution_GetSolution. */
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uipath/solution-sdk",
|
|
3
3
|
"author": "UiPath",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.207.0-preview.307",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/UiPath/cli.git",
|
|
@@ -43,6 +43,10 @@
|
|
|
43
43
|
"./project-context": {
|
|
44
44
|
"types": "./dist/src/project-context.d.ts",
|
|
45
45
|
"default": "./dist/project-context.js"
|
|
46
|
+
},
|
|
47
|
+
"./invocation-graph": {
|
|
48
|
+
"types": "./dist/src/invocation-graph.d.ts",
|
|
49
|
+
"default": "./dist/invocation-graph.js"
|
|
46
50
|
}
|
|
47
51
|
},
|
|
48
52
|
"bin": {
|
|
@@ -52,5 +56,5 @@
|
|
|
52
56
|
"dist"
|
|
53
57
|
],
|
|
54
58
|
"private": false,
|
|
55
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "a625ed8ac421089170db3cb8b95c497f3c7b0d62"
|
|
56
60
|
}
|