@uipath/project-packager 1.202.0 → 1.203.0-preview.160
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/browser.js +1993 -181
- package/dist/index.js +1946 -200
- package/dist/node.js +2352 -383
- package/dist/src/i18n/locales/en.d.ts +14 -7
- package/dist/src/index.d.ts +4 -3
- package/dist/src/node.d.ts +2 -2
- package/dist/src/services/governance-policy-service.d.ts +57 -4
- package/dist/src/services/pack-service.d.ts +18 -0
- package/dist/src/services/project-packager.d.ts +1 -1
- package/dist/tests/public-surface.spec.d.ts +1 -0
- package/package.json +7 -5
|
@@ -32,18 +32,25 @@ export declare const en: {
|
|
|
32
32
|
readonly info: {
|
|
33
33
|
readonly alreadyProvided: "Governance policy file already provided, skipping download.";
|
|
34
34
|
readonly saved: "Governance policy saved to {path}";
|
|
35
|
-
readonly
|
|
36
|
-
readonly
|
|
37
|
-
readonly
|
|
35
|
+
readonly resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.";
|
|
36
|
+
readonly ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.";
|
|
37
|
+
readonly suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}";
|
|
38
|
+
readonly suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}";
|
|
39
|
+
readonly noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}";
|
|
38
40
|
readonly licenseStatus: "AcquireLicense returned {status}, using {fallback}.";
|
|
39
41
|
readonly licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}";
|
|
40
42
|
readonly licenseFailed: "AcquireLicense failed: {error}. Using {fallback}.";
|
|
41
43
|
};
|
|
42
44
|
readonly errors: {
|
|
43
|
-
readonly connectionIncomplete: "Connection info incomplete,
|
|
44
|
-
readonly
|
|
45
|
-
readonly
|
|
46
|
-
readonly
|
|
45
|
+
readonly connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.";
|
|
46
|
+
readonly unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.";
|
|
47
|
+
readonly retryAfter: "The policy service asked for {seconds} seconds before another try.";
|
|
48
|
+
readonly tenantPolicyWins: "The AutomationOps policy published for {product} applies to this tenant, so the governance file at {path} cannot replace it.";
|
|
49
|
+
readonly failedToSave: "Failed to save governance policy: {error}";
|
|
50
|
+
readonly fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler.";
|
|
51
|
+
};
|
|
52
|
+
readonly instructions: {
|
|
53
|
+
readonly tenantPolicyWins: "Drop --governance-file-path so the tenant's policy is used, or ask an administrator to change the policy published in AutomationOps.";
|
|
47
54
|
};
|
|
48
55
|
};
|
|
49
56
|
readonly signing: {
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "./i18n/index.js";
|
|
2
|
+
export { type PolicyAudit, type PolicyResolution, type PolicySubject, resolvePolicyAsync, type UnknownReason, } from "@uipath/aops-policy-sdk/resolver";
|
|
2
3
|
export type { IContextStorage, ITelemetryProvider, ITelemetryService, TelemetryContext, TelemetryProperties, } from "@uipath/common";
|
|
3
4
|
export { BrowserContextStorage, ConsoleTelemetryProvider, TelemetryService, } from "@uipath/common";
|
|
4
5
|
export type { PackagerConfig } from "./models/packager-config.js";
|
|
@@ -15,10 +16,10 @@ export { ProjectPublishOptions, PublishDestinationKind, } from "./publish/models
|
|
|
15
16
|
export type { IProjectPublisher } from "./publish/services/project-publisher.js";
|
|
16
17
|
export { ProjectPublisher } from "./publish/services/project-publisher.js";
|
|
17
18
|
export type { IGovernancePolicyService } from "./services/governance-policy-service.js";
|
|
18
|
-
export { GovernancePolicyService } from "./services/governance-policy-service.js";
|
|
19
|
+
export { GovernancePolicyError, GovernancePolicyService, } from "./services/governance-policy-service.js";
|
|
19
20
|
export { resolveProducedNupkgsAsync } from "./services/nupkg-resolver.js";
|
|
20
|
-
export type { IPackService } from "./services/pack-service.js";
|
|
21
|
-
export { PackService } from "./services/pack-service.js";
|
|
21
|
+
export type { IPackService, PackageIdTooLongError, } from "./services/pack-service.js";
|
|
22
|
+
export { isPackageIdTooLongError, PACKAGE_ID_TOO_LONG, PackService, } from "./services/pack-service.js";
|
|
22
23
|
export type { IPackageSignService } from "./services/package-sign-service.js";
|
|
23
24
|
export { signNupkgsAsync } from "./services/package-signer.js";
|
|
24
25
|
export type { IPackagerParametersValidator } from "./services/packager-parameters-validator.js";
|
package/dist/src/node.d.ts
CHANGED
|
@@ -28,8 +28,8 @@ export { DotnetDiscoveryService } from "./services/dotnet-discovery-service.js";
|
|
|
28
28
|
export type { IGovernancePolicyService } from "./services/governance-policy-service.js";
|
|
29
29
|
export { GovernancePolicyService } from "./services/governance-policy-service.js";
|
|
30
30
|
export { resolveProducedNupkgsAsync } from "./services/nupkg-resolver.js";
|
|
31
|
-
export type { IPackService } from "./services/pack-service.js";
|
|
32
|
-
export { PackService } from "./services/pack-service.js";
|
|
31
|
+
export type { IPackService, PackageIdTooLongError, } from "./services/pack-service.js";
|
|
32
|
+
export { isPackageIdTooLongError, PACKAGE_ID_TOO_LONG, PackService, } from "./services/pack-service.js";
|
|
33
33
|
export type { IPackageSignService } from "./services/package-sign-service.js";
|
|
34
34
|
export { NodePackageSignService } from "./services/package-sign-service.js";
|
|
35
35
|
export { signNupkgsAsync } from "./services/package-signer.js";
|
|
@@ -1,7 +1,41 @@
|
|
|
1
1
|
import { type ConnectionInfo, type IFileSystem, type ITemporaryStorageService } from "@uipath/solutionpackager-tool-core";
|
|
2
2
|
import { type ValidateOptions } from "../models/packager-parameters.js";
|
|
3
|
+
/**
|
|
4
|
+
* What the caller is about to do with the analysis.
|
|
5
|
+
*
|
|
6
|
+
* `analyze` reports on a project and produces nothing shippable, so a
|
|
7
|
+
* developer testing a candidate policy file locally is always legitimate.
|
|
8
|
+
* `pack` produces an artefact that leaves the machine, so a supplied policy
|
|
9
|
+
* file is refused there in exactly one case: the tenant was asked and a
|
|
10
|
+
* published policy came back. Adding a flag to your own pipeline must not lift
|
|
11
|
+
* an organisation's policy.
|
|
12
|
+
*
|
|
13
|
+
* Every other answer keeps the file — nobody publishes one, the question went
|
|
14
|
+
* unanswered, or there was no tenant to ask. Not knowing is not grounds to
|
|
15
|
+
* withhold the only rules available; that would leave the pack less checked,
|
|
16
|
+
* not more.
|
|
17
|
+
*/
|
|
18
|
+
export type GovernanceUsage = "analyze" | "pack";
|
|
3
19
|
export interface IGovernancePolicyService {
|
|
4
|
-
resolveGovernancePolicyAsync(validateOptions: ValidateOptions, connectionInfo?: ConnectionInfo, cancellationToken?: AbortSignal): Promise<void>;
|
|
20
|
+
resolveGovernancePolicyAsync(validateOptions: ValidateOptions, connectionInfo?: ConnectionInfo, cancellationToken?: AbortSignal, usage?: GovernanceUsage): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The tenant publishes a policy that a supplied governance file cannot replace.
|
|
24
|
+
*
|
|
25
|
+
* The only hard failure this service produces. Nothing else about governance
|
|
26
|
+
* stops a command: an unanswerable question warns and carries on. This case is
|
|
27
|
+
* different because the question *was* answered — the organisation governs
|
|
28
|
+
* this tenant — so letting a flag on one developer's pipeline override it
|
|
29
|
+
* would be the escalation, not an exception to it.
|
|
30
|
+
*
|
|
31
|
+
* Callers read the guidance off it with `carriedInstructions` from
|
|
32
|
+
* `@uipath/common` — duck-typed, because each packager bundles its own copy of
|
|
33
|
+
* this class and `instanceof` does not survive the trip between bundles.
|
|
34
|
+
*/
|
|
35
|
+
export declare class GovernancePolicyError extends Error {
|
|
36
|
+
readonly instructions: string;
|
|
37
|
+
name: string;
|
|
38
|
+
constructor(message: string, instructions: string);
|
|
5
39
|
}
|
|
6
40
|
export declare class GovernancePolicyService implements IGovernancePolicyService {
|
|
7
41
|
private readonly fileSystem;
|
|
@@ -9,10 +43,29 @@ export declare class GovernancePolicyService implements IGovernancePolicyService
|
|
|
9
43
|
private readonly fetchFn;
|
|
10
44
|
private readonly logger;
|
|
11
45
|
constructor(fileSystem: IFileSystem, temporaryStorage: ITemporaryStorageService, fetchFn?: typeof fetch);
|
|
12
|
-
resolveGovernancePolicyAsync(validateOptions: ValidateOptions, connectionInfo?: ConnectionInfo, cancellationToken?: AbortSignal): Promise<void>;
|
|
13
|
-
private
|
|
46
|
+
resolveGovernancePolicyAsync(validateOptions: ValidateOptions, connectionInfo?: ConnectionInfo, cancellationToken?: AbortSignal, usage?: GovernanceUsage): Promise<void>;
|
|
47
|
+
private applyResolutionAsync;
|
|
48
|
+
private savePolicyAsync;
|
|
49
|
+
/**
|
|
50
|
+
* Say what could not be resolved, then carry on with the rules shipped
|
|
51
|
+
* with the WorkflowCompiler.
|
|
52
|
+
*
|
|
53
|
+
* Not knowing whether a tenant is governed is not the same as knowing it
|
|
54
|
+
* is not, and the warning is what keeps the two apart for anyone reading
|
|
55
|
+
* the log. It is deliberately not an exit code: breaking a build because
|
|
56
|
+
* the policy service was briefly unreachable would be a worse bug than
|
|
57
|
+
* the silent fallback this replaces.
|
|
58
|
+
*/
|
|
59
|
+
private warnAndUseShippedRules;
|
|
60
|
+
/**
|
|
61
|
+
* The reason, the detail, the URL asked, and the wait the server asked for
|
|
62
|
+
* when it named one — everything needed to tell a bad minute apart from a
|
|
63
|
+
* misconfigured product without turning the log into a stack trace.
|
|
64
|
+
*/
|
|
65
|
+
private describeUnknown;
|
|
66
|
+
private resolveCloudOrigin;
|
|
14
67
|
/**
|
|
15
|
-
* Resolves the license type to use in the policy
|
|
68
|
+
* Resolves the license type to use in the policy request.
|
|
16
69
|
*
|
|
17
70
|
* Calls the Orchestrator AcquireLicense endpoint to get the user's robotType.
|
|
18
71
|
* The robotType enum names (Development, Attended, StudioPro, etc.) are the
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Marker on the error {@link PackService.sanitizePackageId} throws when the id
|
|
3
|
+
* it was handed is longer than NuGet allows.
|
|
4
|
+
*
|
|
5
|
+
* A `code` property rather than a class the caller checks with `instanceof`:
|
|
6
|
+
* every tool bundles its own copy of this package, so class identity does not
|
|
7
|
+
* survive a bundle boundary while a duck-typed field does. Same reason the
|
|
8
|
+
* cross-bundle singletons in `@uipath/common` are duck-typed.
|
|
9
|
+
*/
|
|
10
|
+
export declare const PACKAGE_ID_TOO_LONG = "PACKAGE_ID_TOO_LONG";
|
|
11
|
+
export interface PackageIdTooLongError extends Error {
|
|
12
|
+
code: typeof PACKAGE_ID_TOO_LONG;
|
|
13
|
+
/** The sanitized id, as it would have been published. */
|
|
14
|
+
packageId: string;
|
|
15
|
+
maxLength: number;
|
|
16
|
+
}
|
|
17
|
+
/** True when `error` is the failure {@link PackService.sanitizePackageId} raises for an over-long id. */
|
|
18
|
+
export declare function isPackageIdTooLongError(error: unknown): error is PackageIdTooLongError;
|
|
1
19
|
/**
|
|
2
20
|
* Interface for NuGet package operations
|
|
3
21
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ITelemetryService } from "@uipath/common";
|
|
2
2
|
import { type IFileSystem, ToolResult } from "@uipath/solutionpackager-tool-core";
|
|
3
3
|
import type { ProjectBuildOptions } from "../models/project-build-options.js";
|
|
4
4
|
import type { ProjectCleanupOptions } from "../models/project-cleanup-options.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/project-packager",
|
|
3
|
+
"author": "UiPath",
|
|
3
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
4
|
-
"version": "1.
|
|
5
|
+
"version": "1.203.0-preview.160",
|
|
5
6
|
"description": "UiPath Project Packager - core library for packing individual UiPath projects",
|
|
6
7
|
"type": "module",
|
|
7
8
|
"main": "./dist/index.js",
|
|
@@ -32,12 +33,13 @@
|
|
|
32
33
|
"dist"
|
|
33
34
|
],
|
|
34
35
|
"dependencies": {
|
|
35
|
-
"@uipath/
|
|
36
|
-
"@uipath/
|
|
37
|
-
"@uipath/
|
|
36
|
+
"@uipath/aops-policy-sdk": "1.203.0",
|
|
37
|
+
"@uipath/filesystem": "1.203.0",
|
|
38
|
+
"@uipath/solutionpackager-tool-core": "1.203.0",
|
|
39
|
+
"@uipath/common": "1.203.0"
|
|
38
40
|
},
|
|
39
41
|
"peerDependencies": {
|
|
40
42
|
"fflate": "^0.8.2"
|
|
41
43
|
},
|
|
42
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "3a42062ba731afca4595ba9aa8a80afc9667528d"
|
|
43
45
|
}
|