@uipath/common 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/catch-error.js +6 -4
- package/dist/classified-failure.d.ts +2 -1
- package/dist/confirmation.d.ts +7 -1
- package/dist/error-codes.d.ts +7 -1
- package/dist/error-handler.js +10 -4
- package/dist/formatter.d.ts +7 -2
- package/dist/index.browser.d.ts +4 -2
- package/dist/index.browser.js +73 -24
- package/dist/index.d.ts +4 -1
- package/dist/index.js +541 -194
- package/dist/project-telemetry.d.ts +9 -0
- package/dist/relayed-output.d.ts +19 -0
- package/dist/sdk-user-agent.js +5 -3
- package/dist/sha256.d.ts +24 -0
- package/dist/stdin.d.ts +8 -4
- package/dist/telemetry/appinsights-span-fields.d.ts +36 -0
- package/dist/telemetry/browser-appinsights-telemetry-provider.d.ts +37 -0
- package/dist/telemetry/index.js +18 -11
- package/dist/telemetry/node.d.ts +1 -1
- package/dist/telemetry/pseudonymize.d.ts +1 -8
- package/dist/telemetry/session-id.d.ts +10 -0
- package/dist/telemetry/telemetry-config.d.ts +5 -0
- package/dist/telemetry/telemetry-dimensions.d.ts +6 -0
- package/dist/telemetry/telemetry-init.d.ts +11 -5
- package/dist/testing.js +263 -135
- package/dist/zip.js +30 -8
- package/package.json +2 -2
package/dist/catch-error.js
CHANGED
|
@@ -40,13 +40,15 @@ var ProjectDimensions = {
|
|
|
40
40
|
SolutionKey: "SolutionKey",
|
|
41
41
|
SolutionProjectKey: "SolutionProjectKey",
|
|
42
42
|
SolutionIdentityStatus: "SolutionIdentityStatus",
|
|
43
|
-
PreviousSolutionKey: "PreviousSolutionKey"
|
|
43
|
+
PreviousSolutionKey: "PreviousSolutionKey",
|
|
44
|
+
PreviousProjectKey: "PreviousProjectKey"
|
|
44
45
|
};
|
|
45
46
|
var GUID_KEY_DIMENSIONS = new Set([
|
|
46
47
|
ProjectDimensions.ProjectKey,
|
|
47
48
|
ProjectDimensions.SolutionKey,
|
|
48
49
|
ProjectDimensions.SolutionProjectKey,
|
|
49
|
-
ProjectDimensions.PreviousSolutionKey
|
|
50
|
+
ProjectDimensions.PreviousSolutionKey,
|
|
51
|
+
ProjectDimensions.PreviousProjectKey
|
|
50
52
|
]);
|
|
51
53
|
var ShipDimensions = {
|
|
52
54
|
ShipKind: "ShipKind",
|
|
@@ -145,7 +147,7 @@ var CURATED_DIMENSIONS = new Set([
|
|
|
145
147
|
...Object.values(ProjectDimensions)
|
|
146
148
|
]);
|
|
147
149
|
|
|
148
|
-
// src/
|
|
150
|
+
// src/sha256.ts
|
|
149
151
|
var SHA256_K = new Uint32Array([
|
|
150
152
|
1116352408,
|
|
151
153
|
1899447441,
|
|
@@ -425,4 +427,4 @@ export {
|
|
|
425
427
|
describeThrownValue
|
|
426
428
|
};
|
|
427
429
|
|
|
428
|
-
//# debugId=
|
|
430
|
+
//# debugId=4FBA3918E208A61964756E2164756E21
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ExtractErrorOptions } from "./error-handler";
|
|
1
2
|
import type { ErrorContext, FailureOutput } from "./formatter";
|
|
2
3
|
/**
|
|
3
4
|
* Build the standard failure envelope for `error`, classified.
|
|
@@ -16,7 +17,7 @@ import type { ErrorContext, FailureOutput } from "./formatter";
|
|
|
16
17
|
* to it before printing. A caller that only prints it uses `reportFailure`,
|
|
17
18
|
* which classifies, prints, and records the exit code in one call.
|
|
18
19
|
*/
|
|
19
|
-
export declare function classifiedFailure(message: string, error: unknown): Promise<FailureOutput>;
|
|
20
|
+
export declare function classifiedFailure(message: string, error: unknown, options?: ExtractErrorOptions): Promise<FailureOutput>;
|
|
20
21
|
/** Classify a failed session lookup while keeping its actionable next step. */
|
|
21
22
|
export declare function authContextFailure(error: unknown, sessionInstructions?: string): Promise<FailureOutput>;
|
|
22
23
|
/**
|
package/dist/confirmation.d.ts
CHANGED
|
@@ -24,5 +24,11 @@ export interface ConfirmationFlags {
|
|
|
24
24
|
* @param flags - the parsed command options (must carry `yes`/`force`).
|
|
25
25
|
* @param operation - a short description of what will happen, e.g.
|
|
26
26
|
* `"delete folder 'Finance'"`. Surfaced in the error message.
|
|
27
|
+
* @param options.instructions - replaces the default "Re-run with --yes to
|
|
28
|
+
* confirm." when the command needs more than `--yes`, so one refusal names
|
|
29
|
+
* every missing flag instead of one per retry.
|
|
27
30
|
*/
|
|
28
|
-
export declare function requireConfirmation(flags: ConfirmationFlags, operation: string
|
|
31
|
+
export declare function requireConfirmation(flags: ConfirmationFlags, operation: string, options?: {
|
|
32
|
+
reversible?: boolean;
|
|
33
|
+
instructions?: string;
|
|
34
|
+
}): boolean;
|
package/dist/error-codes.d.ts
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
* `formatter.ts` re-exports every name here, so `@uipath/common` consumers see
|
|
12
12
|
* one import site regardless of which file defines them.
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
import { type FailureResultType } from "./result-types";
|
|
15
|
+
export declare const CLI_ERROR_CODES: readonly ["invalid_argument", "confirmation_required", "authentication_required", "permission_denied", "local_permission_denied", "not_found", "not_enabled", "rate_limited", "network_error", "timeout", "server_error", "method_not_allowed", "not_supported", "configuration_error", "execution_failed", "unknown_error"];
|
|
15
16
|
export type CliErrorCode = (typeof CLI_ERROR_CODES)[number];
|
|
16
17
|
export declare const RETRY_HINTS: readonly ["RetryWillNotFix", "RetryLater", "RetryAfter1Second", "RetryAfter10Seconds", "RetryAfter30Seconds", "RetryAfter60Seconds"];
|
|
17
18
|
export type RetryHint = (typeof RETRY_HINTS)[number];
|
|
@@ -37,5 +38,10 @@ export declare function isRetryHint(value: unknown): value is RetryHint;
|
|
|
37
38
|
export declare function carriedErrorCode(error: unknown): CliErrorCode | undefined;
|
|
38
39
|
/** The `Retry` hint an error carries. See {@link carriedErrorCode}. */
|
|
39
40
|
export declare function carriedRetry(error: unknown): RetryHint | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* The failure `Result` an error carries. Only a canonical non-`Success` member
|
|
43
|
+
* counts; an unknown string would leave the envelope with no exit code.
|
|
44
|
+
*/
|
|
45
|
+
export declare function carriedResult(error: unknown): FailureResultType | undefined;
|
|
40
46
|
/** The `Retry` an `ErrorCode` implies when nothing more specific is known. */
|
|
41
47
|
export declare function defaultRetryForErrorCode(errorCode: CliErrorCode): RetryHint;
|
package/dist/error-handler.js
CHANGED
|
@@ -40,13 +40,15 @@ var ProjectDimensions = {
|
|
|
40
40
|
SolutionKey: "SolutionKey",
|
|
41
41
|
SolutionProjectKey: "SolutionProjectKey",
|
|
42
42
|
SolutionIdentityStatus: "SolutionIdentityStatus",
|
|
43
|
-
PreviousSolutionKey: "PreviousSolutionKey"
|
|
43
|
+
PreviousSolutionKey: "PreviousSolutionKey",
|
|
44
|
+
PreviousProjectKey: "PreviousProjectKey"
|
|
44
45
|
};
|
|
45
46
|
var GUID_KEY_DIMENSIONS = new Set([
|
|
46
47
|
ProjectDimensions.ProjectKey,
|
|
47
48
|
ProjectDimensions.SolutionKey,
|
|
48
49
|
ProjectDimensions.SolutionProjectKey,
|
|
49
|
-
ProjectDimensions.PreviousSolutionKey
|
|
50
|
+
ProjectDimensions.PreviousSolutionKey,
|
|
51
|
+
ProjectDimensions.PreviousProjectKey
|
|
50
52
|
]);
|
|
51
53
|
var ShipDimensions = {
|
|
52
54
|
ShipKind: "ShipKind",
|
|
@@ -145,7 +147,7 @@ var CURATED_DIMENSIONS = new Set([
|
|
|
145
147
|
...Object.values(ProjectDimensions)
|
|
146
148
|
]);
|
|
147
149
|
|
|
148
|
-
// src/
|
|
150
|
+
// src/sha256.ts
|
|
149
151
|
var SHA256_K = new Uint32Array([
|
|
150
152
|
1116352408,
|
|
151
153
|
1899447441,
|
|
@@ -424,10 +426,12 @@ function settlePromiseLike(thenable) {
|
|
|
424
426
|
// src/error-codes.ts
|
|
425
427
|
var CLI_ERROR_CODES = [
|
|
426
428
|
"invalid_argument",
|
|
429
|
+
"confirmation_required",
|
|
427
430
|
"authentication_required",
|
|
428
431
|
"permission_denied",
|
|
429
432
|
"local_permission_denied",
|
|
430
433
|
"not_found",
|
|
434
|
+
"not_enabled",
|
|
431
435
|
"rate_limited",
|
|
432
436
|
"network_error",
|
|
433
437
|
"timeout",
|
|
@@ -895,6 +899,8 @@ async function extractErrorDetails(error, options) {
|
|
|
895
899
|
}
|
|
896
900
|
if (parsedBody?.errorCode && typeof parsedBody.errorCode === "string") {
|
|
897
901
|
context.errorCode = parsedBody.errorCode;
|
|
902
|
+
} else if (typeof parsedBody?.errorCode === "number") {
|
|
903
|
+
context.errorCode = String(parsedBody.errorCode);
|
|
898
904
|
} else if (parsedBody?.code && typeof parsedBody.code === "string") {
|
|
899
905
|
context.errorCode = parsedBody.code;
|
|
900
906
|
}
|
|
@@ -982,4 +988,4 @@ export {
|
|
|
982
988
|
parseHttpStatusFromMessage
|
|
983
989
|
};
|
|
984
990
|
|
|
985
|
-
//# debugId=
|
|
991
|
+
//# debugId=F80A55A4DD91681864756E2164756E21
|
package/dist/formatter.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { isOutputFormat, OUTPUT_FORMATS, type OutputFormat } from "./output-form
|
|
|
3
3
|
import type { FailureResultType, ResultType } from "./result-types";
|
|
4
4
|
import { RESULTS } from "./result-types";
|
|
5
5
|
import { type CommandErrorClass, type TerminalOutcome } from "./telemetry/command-terminal.js";
|
|
6
|
-
export { CLI_ERROR_CODES, type CliErrorCode, carriedErrorCode, carriedRetry, isCliErrorCode, isRetryHint, RETRY_HINTS, type RetryHint, } from "./error-codes";
|
|
6
|
+
export { CLI_ERROR_CODES, type CliErrorCode, carriedErrorCode, carriedResult, carriedRetry, defaultRetryForErrorCode, isCliErrorCode, isRetryHint, RETRY_HINTS, type RetryHint, } from "./error-codes";
|
|
7
7
|
export { type FailureResultType, isOutputFormat, OUTPUT_FORMATS, type OutputFormat, RESULTS, type ResultType, };
|
|
8
8
|
/**
|
|
9
9
|
* Per-row highlight for interactive TABLE output only. Applied line-level
|
|
@@ -204,6 +204,11 @@ export declare function extractSingleMessage(payload: unknown): string | null;
|
|
|
204
204
|
* host awaits it immediately before calling this.
|
|
205
205
|
*/
|
|
206
206
|
export declare function validateOutputFilter(filter: string): Error | null;
|
|
207
|
+
/** What the filtered data shows about why an expression failed to evaluate. */
|
|
208
|
+
interface FilterEvaluationHint {
|
|
209
|
+
detail: string;
|
|
210
|
+
instructions: string;
|
|
211
|
+
}
|
|
207
212
|
/**
|
|
208
213
|
* Thrown when a `--output-filter` expression parses successfully but fails at
|
|
209
214
|
* evaluation time (e.g. type-coercion errors when functions receive unexpected
|
|
@@ -222,7 +227,7 @@ export declare class FilterEvaluationError extends Error {
|
|
|
222
227
|
readonly instructions: string;
|
|
223
228
|
readonly retry: RetryHint;
|
|
224
229
|
readonly result: FailureResultType;
|
|
225
|
-
constructor(filter: string, cause: unknown);
|
|
230
|
+
constructor(filter: string, cause: unknown, hint?: FilterEvaluationHint);
|
|
226
231
|
}
|
|
227
232
|
/**
|
|
228
233
|
* Thrown by `trackedAction` when `--output-filter` is combined with a command
|
package/dist/index.browser.d.ts
CHANGED
|
@@ -28,10 +28,12 @@ export * from "./output-sink";
|
|
|
28
28
|
export * from "./package-metadata-options";
|
|
29
29
|
export * from "./pass-through-tail";
|
|
30
30
|
export * from "./polling";
|
|
31
|
-
export { configureProjectContextTelemetry, configureProjectTelemetry, createIdentityCommandResolver, createProjectCommandResolver, findStaleProjectTargetRules, getProjectTelemetryCapture, isProjectTelemetryDisabled, type ProjectContextTelemetryResolver, type ProjectTargetRule, type ProjectTelemetryCapture, type ProjectTelemetryInput, type ProjectTelemetryResolver, } from "./project-telemetry.js";
|
|
31
|
+
export { configureProjectContextTelemetry, configureProjectTelemetry, createIdentityCommandResolver, createProjectCommandResolver, findStaleProjectTargetRules, getProjectTelemetryCapture, isProjectTelemetryDisabled, type ProjectContextTelemetryResolver, type ProjectTargetRule, type ProjectTelemetryCapture, type ProjectTelemetryInput, type ProjectTelemetryResolver, setProjectTelemetryTarget, } from "./project-telemetry.js";
|
|
32
|
+
export * from "./relayed-output";
|
|
32
33
|
export * from "./result-types";
|
|
33
34
|
export * from "./screen-logger";
|
|
34
35
|
export * from "./sdk-user-agent";
|
|
36
|
+
export { sha256Base64Url, sha256Hex } from "./sha256.js";
|
|
35
37
|
export * from "./singleton";
|
|
36
38
|
export { BrowserContextStorage } from "./telemetry/browser-context-storage.js";
|
|
37
39
|
export * from "./telemetry/command-attribution.js";
|
|
@@ -39,7 +41,7 @@ export * from "./telemetry/command-terminal.js";
|
|
|
39
41
|
export { ConsoleTelemetryProvider } from "./telemetry/console-telemetry-provider.js";
|
|
40
42
|
export type { IContextStorage } from "./telemetry/context-storage.js";
|
|
41
43
|
export * from "./telemetry/project-identity.js";
|
|
42
|
-
export { getConfiguredTelemetrySessionId, getTelemetrySessionId, getTelemetrySessionSource, TELEMETRY_SESSION_ID_ENV, TELEMETRY_SESSION_SOURCE_PROPERTY, } from "./telemetry/session-id.js";
|
|
44
|
+
export { getConfiguredTelemetrySessionId, getTelemetrySessionId, getTelemetrySessionSource, resetTelemetryInvocationIds, TELEMETRY_SESSION_ID_ENV, TELEMETRY_SESSION_SOURCE_PROPERTY, } from "./telemetry/session-id.js";
|
|
43
45
|
export * from "./telemetry/telemetry-dimensions.js";
|
|
44
46
|
export * from "./telemetry/telemetry-events.js";
|
|
45
47
|
export type { ITelemetryProvider } from "./telemetry/telemetry-provider.js";
|
package/dist/index.browser.js
CHANGED
|
@@ -72,7 +72,7 @@ __export(exports_buffer, {
|
|
|
72
72
|
File: () => File,
|
|
73
73
|
INSPECT_MAX_BYTES: () => INSPECT_MAX_BYTES,
|
|
74
74
|
atob: () => atob,
|
|
75
|
-
btoa: () =>
|
|
75
|
+
btoa: () => btoa2,
|
|
76
76
|
constants: () => constants,
|
|
77
77
|
default: () => buffer_default,
|
|
78
78
|
isAscii: () => isAscii,
|
|
@@ -749,7 +749,7 @@ function notimpl(name) {
|
|
|
749
749
|
throw Error(name + " is not implemented for node:buffer browser polyfill");
|
|
750
750
|
};
|
|
751
751
|
}
|
|
752
|
-
var lookup, revLookup, code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i, len, customInspectSymbol, INSPECT_MAX_BYTES = 50, kMaxLength = 2147483647, kStringMaxLength = 536870888,
|
|
752
|
+
var lookup, revLookup, code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i, len, customInspectSymbol, INSPECT_MAX_BYTES = 50, kMaxLength = 2147483647, kStringMaxLength = 536870888, btoa2, atob, File, Blob, constants, ERR_BUFFER_OUT_OF_BOUNDS, ERR_INVALID_ARG_TYPE, ERR_OUT_OF_RANGE, MAX_ARGUMENTS_LENGTH = 4096, INVALID_BASE64_RE, hexSliceLookupTable, resolveObjectURL, isUtf8, isAscii = (str) => {
|
|
753
753
|
for (let char of str)
|
|
754
754
|
if (char.charCodeAt(0) > 127)
|
|
755
755
|
return false;
|
|
@@ -763,7 +763,7 @@ var init_buffer = __esm(() => {
|
|
|
763
763
|
revLookup[45] = 62;
|
|
764
764
|
revLookup[95] = 63;
|
|
765
765
|
customInspectSymbol = typeof Symbol === "function" && typeof Symbol.for === "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
766
|
-
|
|
766
|
+
btoa2 = globalThis.btoa;
|
|
767
767
|
atob = globalThis.atob;
|
|
768
768
|
File = globalThis.File;
|
|
769
769
|
Blob = globalThis.Blob;
|
|
@@ -20616,13 +20616,15 @@ var ProjectDimensions = {
|
|
|
20616
20616
|
SolutionKey: "SolutionKey",
|
|
20617
20617
|
SolutionProjectKey: "SolutionProjectKey",
|
|
20618
20618
|
SolutionIdentityStatus: "SolutionIdentityStatus",
|
|
20619
|
-
PreviousSolutionKey: "PreviousSolutionKey"
|
|
20619
|
+
PreviousSolutionKey: "PreviousSolutionKey",
|
|
20620
|
+
PreviousProjectKey: "PreviousProjectKey"
|
|
20620
20621
|
};
|
|
20621
20622
|
var GUID_KEY_DIMENSIONS = new Set([
|
|
20622
20623
|
ProjectDimensions.ProjectKey,
|
|
20623
20624
|
ProjectDimensions.SolutionKey,
|
|
20624
20625
|
ProjectDimensions.SolutionProjectKey,
|
|
20625
|
-
ProjectDimensions.PreviousSolutionKey
|
|
20626
|
+
ProjectDimensions.PreviousSolutionKey,
|
|
20627
|
+
ProjectDimensions.PreviousProjectKey
|
|
20626
20628
|
]);
|
|
20627
20629
|
var ShipDimensions = {
|
|
20628
20630
|
ShipKind: "ShipKind",
|
|
@@ -20802,9 +20804,7 @@ async function withinProjectIdentityBudget(work, onTimeout) {
|
|
|
20802
20804
|
}
|
|
20803
20805
|
}
|
|
20804
20806
|
|
|
20805
|
-
// src/
|
|
20806
|
-
var PSEUDONYM_DOMAIN = "uipath-cli/telemetry/pseudonym/v1:";
|
|
20807
|
-
var PSEUDONYM_HEX_LENGTH = 32;
|
|
20807
|
+
// src/sha256.ts
|
|
20808
20808
|
var SHA256_K = new Uint32Array([
|
|
20809
20809
|
1116352408,
|
|
20810
20810
|
1899447441,
|
|
@@ -20884,7 +20884,7 @@ var SHA256_INITIAL_STATE = new Uint32Array([
|
|
|
20884
20884
|
function rotr(value, bits) {
|
|
20885
20885
|
return (value >>> bits | value << 32 - bits) >>> 0;
|
|
20886
20886
|
}
|
|
20887
|
-
function
|
|
20887
|
+
function sha256Words(input) {
|
|
20888
20888
|
const bytes = new TextEncoder().encode(input);
|
|
20889
20889
|
const paddedLength = bytes.length + 9 + 63 >> 6 << 6;
|
|
20890
20890
|
const buffer = new Uint8Array(paddedLength);
|
|
@@ -20940,12 +20940,27 @@ function sha256Hex(input) {
|
|
|
20940
20940
|
state[6] = state[6] + g >>> 0;
|
|
20941
20941
|
state[7] = state[7] + h >>> 0;
|
|
20942
20942
|
}
|
|
20943
|
+
return state;
|
|
20944
|
+
}
|
|
20945
|
+
function sha256Hex(input) {
|
|
20943
20946
|
let hex = "";
|
|
20944
|
-
for (const word of
|
|
20947
|
+
for (const word of sha256Words(input)) {
|
|
20945
20948
|
hex += word.toString(16).padStart(8, "0");
|
|
20946
20949
|
}
|
|
20947
20950
|
return hex;
|
|
20948
20951
|
}
|
|
20952
|
+
function sha256Base64Url(input) {
|
|
20953
|
+
const bytes = new Uint8Array(32);
|
|
20954
|
+
const view = new DataView(bytes.buffer);
|
|
20955
|
+
for (const [i, word] of sha256Words(input).entries()) {
|
|
20956
|
+
view.setUint32(i * 4, word);
|
|
20957
|
+
}
|
|
20958
|
+
return btoa(String.fromCharCode(...bytes)).replaceAll("+", "-").replaceAll("/", "_").replace(/=+$/, "");
|
|
20959
|
+
}
|
|
20960
|
+
|
|
20961
|
+
// src/telemetry/pseudonymize.ts
|
|
20962
|
+
var PSEUDONYM_DOMAIN = "uipath-cli/telemetry/pseudonym/v1:";
|
|
20963
|
+
var PSEUDONYM_HEX_LENGTH = 32;
|
|
20949
20964
|
function resolveSha256Hex() {
|
|
20950
20965
|
try {
|
|
20951
20966
|
const nodeCrypto = (init_crypto(), __toCommonJS(exports_crypto));
|
|
@@ -21318,13 +21333,25 @@ function catchError(fnOrPromise) {
|
|
|
21318
21333
|
function settlePromiseLike(thenable) {
|
|
21319
21334
|
return Promise.resolve(thenable).then((data) => [undefined, data]).catch((error) => [toError(error), undefined]);
|
|
21320
21335
|
}
|
|
21336
|
+
// src/result-types.ts
|
|
21337
|
+
var RESULTS = {
|
|
21338
|
+
Success: "Success",
|
|
21339
|
+
Failure: "Failure",
|
|
21340
|
+
ConfigError: "ConfigError",
|
|
21341
|
+
AuthenticationError: "AuthenticationError",
|
|
21342
|
+
ValidationError: "ValidationError",
|
|
21343
|
+
TimeoutError: "TimeoutError"
|
|
21344
|
+
};
|
|
21345
|
+
|
|
21321
21346
|
// src/error-codes.ts
|
|
21322
21347
|
var CLI_ERROR_CODES = [
|
|
21323
21348
|
"invalid_argument",
|
|
21349
|
+
"confirmation_required",
|
|
21324
21350
|
"authentication_required",
|
|
21325
21351
|
"permission_denied",
|
|
21326
21352
|
"local_permission_denied",
|
|
21327
21353
|
"not_found",
|
|
21354
|
+
"not_enabled",
|
|
21328
21355
|
"rate_limited",
|
|
21329
21356
|
"network_error",
|
|
21330
21357
|
"timeout",
|
|
@@ -21801,6 +21828,8 @@ async function extractErrorDetails(error, options) {
|
|
|
21801
21828
|
}
|
|
21802
21829
|
if (parsedBody?.errorCode && typeof parsedBody.errorCode === "string") {
|
|
21803
21830
|
context.errorCode = parsedBody.errorCode;
|
|
21831
|
+
} else if (typeof parsedBody?.errorCode === "number") {
|
|
21832
|
+
context.errorCode = String(parsedBody.errorCode);
|
|
21804
21833
|
} else if (parsedBody?.code && typeof parsedBody.code === "string") {
|
|
21805
21834
|
context.errorCode = parsedBody.code;
|
|
21806
21835
|
}
|
|
@@ -21954,20 +21983,10 @@ function instructionsFor(ctx, err) {
|
|
|
21954
21983
|
}
|
|
21955
21984
|
}
|
|
21956
21985
|
|
|
21957
|
-
// src/result-types.ts
|
|
21958
|
-
var RESULTS = {
|
|
21959
|
-
Success: "Success",
|
|
21960
|
-
Failure: "Failure",
|
|
21961
|
-
ConfigError: "ConfigError",
|
|
21962
|
-
AuthenticationError: "AuthenticationError",
|
|
21963
|
-
ValidationError: "ValidationError",
|
|
21964
|
-
TimeoutError: "TimeoutError"
|
|
21965
|
-
};
|
|
21966
|
-
|
|
21967
21986
|
// src/classified-failure.ts
|
|
21968
21987
|
var MAX_QUOTED_BODY_CHARS = 200;
|
|
21969
|
-
async function classifiedFailure(message, error) {
|
|
21970
|
-
const details = await extractErrorDetails(error);
|
|
21988
|
+
async function classifiedFailure(message, error, options) {
|
|
21989
|
+
const details = await extractErrorDetails(error, options);
|
|
21971
21990
|
return {
|
|
21972
21991
|
Result: details.result,
|
|
21973
21992
|
ErrorCode: details.errorCode,
|
|
@@ -24015,6 +24034,14 @@ function getProjectTelemetryCapture(command) {
|
|
|
24015
24034
|
const capture = command?.[CAPTURE];
|
|
24016
24035
|
return capture !== null && typeof capture === "object" ? capture : undefined;
|
|
24017
24036
|
}
|
|
24037
|
+
async function setProjectTelemetryTarget(command, target) {
|
|
24038
|
+
const capture = getProjectTelemetryCapture(command);
|
|
24039
|
+
if (!capture)
|
|
24040
|
+
return;
|
|
24041
|
+
const [error] = await catchError(() => capture.setTarget(target));
|
|
24042
|
+
if (error)
|
|
24043
|
+
logSkipped("project identity target", error);
|
|
24044
|
+
}
|
|
24018
24045
|
function createProjectCommandResolver(root, rules, read) {
|
|
24019
24046
|
return createIdentityCommandResolver(root, rules, async (target, command) => identityWithContext(command, await read(target)));
|
|
24020
24047
|
}
|
|
@@ -24087,6 +24114,15 @@ function findStaleProjectTargetRules(root) {
|
|
|
24087
24114
|
}
|
|
24088
24115
|
return problems;
|
|
24089
24116
|
}
|
|
24117
|
+
// src/relayed-output.ts
|
|
24118
|
+
var RELAYED_OUTPUT_SYMBOL = Symbol.for("@uipath/common/relayed-output");
|
|
24119
|
+
function markOutputRelayed(cmd) {
|
|
24120
|
+
cmd[RELAYED_OUTPUT_SYMBOL] = true;
|
|
24121
|
+
return cmd;
|
|
24122
|
+
}
|
|
24123
|
+
function isOutputRelayed(cmd) {
|
|
24124
|
+
return cmd[RELAYED_OUTPUT_SYMBOL] === true;
|
|
24125
|
+
}
|
|
24090
24126
|
// src/screen-logger.ts
|
|
24091
24127
|
var ScreenLogger;
|
|
24092
24128
|
((ScreenLogger) => {
|
|
@@ -24432,7 +24468,10 @@ var AUTH_ERROR_CODES = new Set([
|
|
|
24432
24468
|
var LOCAL_PERMISSION_CLI_ERROR_CODES = new Set([
|
|
24433
24469
|
"local_permission_denied"
|
|
24434
24470
|
]);
|
|
24435
|
-
var VALIDATION_ERROR_CODES = new Set([
|
|
24471
|
+
var VALIDATION_ERROR_CODES = new Set([
|
|
24472
|
+
"invalid_argument",
|
|
24473
|
+
"confirmation_required"
|
|
24474
|
+
]);
|
|
24436
24475
|
var NETWORK_HTTP_ERROR_CODES = new Set([
|
|
24437
24476
|
"network_error",
|
|
24438
24477
|
"rate_limited",
|
|
@@ -24772,6 +24811,10 @@ function getTelemetryOperationId() {
|
|
|
24772
24811
|
telemetryOperationIdSlot.set(generated);
|
|
24773
24812
|
return generated;
|
|
24774
24813
|
}
|
|
24814
|
+
function resetTelemetryInvocationIds() {
|
|
24815
|
+
telemetrySessionSlot.clear();
|
|
24816
|
+
telemetryOperationIdSlot.clear();
|
|
24817
|
+
}
|
|
24775
24818
|
// src/telemetry/telemetry-events.ts
|
|
24776
24819
|
var CommonTelemetryEvents = {
|
|
24777
24820
|
Start: "Application.Start",
|
|
@@ -25259,6 +25302,7 @@ export {
|
|
|
25259
25302
|
isGuid,
|
|
25260
25303
|
isHtmlDocument,
|
|
25261
25304
|
isOutputFormat,
|
|
25305
|
+
isOutputRelayed,
|
|
25262
25306
|
isProjectTelemetryDisabled,
|
|
25263
25307
|
isSuccessStatus,
|
|
25264
25308
|
isTerminalStatus,
|
|
@@ -25269,6 +25313,7 @@ export {
|
|
|
25269
25313
|
mapWithConcurrency,
|
|
25270
25314
|
markCommandStart,
|
|
25271
25315
|
markLongLivedHost,
|
|
25316
|
+
markOutputRelayed,
|
|
25272
25317
|
mimeTypeForFileName,
|
|
25273
25318
|
msToDuration,
|
|
25274
25319
|
normalizeSkillName,
|
|
@@ -25293,6 +25338,7 @@ export {
|
|
|
25293
25338
|
registerPackageMetadataOptions,
|
|
25294
25339
|
resetExitCode,
|
|
25295
25340
|
resetLoggerInstance,
|
|
25341
|
+
resetTelemetryInvocationIds,
|
|
25296
25342
|
resetTimings,
|
|
25297
25343
|
resolveEnvReference,
|
|
25298
25344
|
restoreConsole,
|
|
@@ -25307,8 +25353,11 @@ export {
|
|
|
25307
25353
|
setOutputFormat,
|
|
25308
25354
|
setOutputFormatExplicit,
|
|
25309
25355
|
setPackagerFactoryProvider,
|
|
25356
|
+
setProjectTelemetryTarget,
|
|
25310
25357
|
setSdkUserAgentHostToken,
|
|
25311
25358
|
setTimingCommand,
|
|
25359
|
+
sha256Base64Url,
|
|
25360
|
+
sha256Hex,
|
|
25312
25361
|
singleton,
|
|
25313
25362
|
solutionIdentityProperties,
|
|
25314
25363
|
splitScopeList,
|
|
@@ -25324,4 +25373,4 @@ export {
|
|
|
25324
25373
|
withinProjectIdentityBudget
|
|
25325
25374
|
};
|
|
25326
25375
|
|
|
25327
|
-
//# debugId=
|
|
25376
|
+
//# debugId=A38392119B11EC1D64756E2164756E21
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type { Command } from "commander";
|
|
1
2
|
export * from "./attachment-binding";
|
|
2
3
|
export * from "./auth-challenge";
|
|
3
4
|
export * from "./body-validators";
|
|
@@ -41,11 +42,13 @@ export { type PackagerToolModule, REGISTER_EXPORT, } from "./packager-tool-impor
|
|
|
41
42
|
export * from "./pass-through-tail";
|
|
42
43
|
export * from "./polling";
|
|
43
44
|
export * from "./preview";
|
|
44
|
-
export { configureProjectContextTelemetry, configureProjectTelemetry, createIdentityCommandResolver, createProjectCommandResolver, findStaleProjectTargetRules, getProjectTelemetryCapture, isProjectTelemetryDisabled, type ProjectContextTelemetryResolver, type ProjectTargetRule, type ProjectTelemetryCapture, type ProjectTelemetryInput, type ProjectTelemetryResolver, } from "./project-telemetry.js";
|
|
45
|
+
export { configureProjectContextTelemetry, configureProjectTelemetry, createIdentityCommandResolver, createProjectCommandResolver, findStaleProjectTargetRules, getProjectTelemetryCapture, isProjectTelemetryDisabled, type ProjectContextTelemetryResolver, type ProjectTargetRule, type ProjectTelemetryCapture, type ProjectTelemetryInput, type ProjectTelemetryResolver, setProjectTelemetryTarget, } from "./project-telemetry.js";
|
|
45
46
|
export * from "./registry";
|
|
47
|
+
export * from "./relayed-output";
|
|
46
48
|
export * from "./report-failure";
|
|
47
49
|
export * from "./screen-logger";
|
|
48
50
|
export * from "./sdk-user-agent";
|
|
51
|
+
export { sha256Base64Url, sha256Hex } from "./sha256.js";
|
|
49
52
|
export * from "./shell-quote";
|
|
50
53
|
export * from "./singleton";
|
|
51
54
|
export * from "./solution-project-types";
|