@uipath/project-packager 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/browser.js +102 -38
- package/dist/index.js +102 -38
- package/dist/node.js +327 -155
- package/dist/src/i18n/locales/en.d.ts +1 -0
- package/dist/src/models/packager-parameters.d.ts +5 -0
- package/dist/src/models/project-models.d.ts +5 -0
- package/dist/src/services/project-loader.d.ts +8 -0
- package/package.json +6 -6
package/dist/node.js
CHANGED
|
@@ -6737,7 +6737,8 @@ var de_default = {
|
|
|
6737
6737
|
pathRequired: "Project directory path is required",
|
|
6738
6738
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
6739
6739
|
readFailed: "Failed to read project file: {path}",
|
|
6740
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
6740
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
6741
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
6741
6742
|
}
|
|
6742
6743
|
},
|
|
6743
6744
|
validator: {
|
|
@@ -6828,7 +6829,8 @@ var en = {
|
|
|
6828
6829
|
pathRequired: "Project directory path is required",
|
|
6829
6830
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
6830
6831
|
readFailed: "Failed to read project file: {path}",
|
|
6831
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
6832
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
6833
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
6832
6834
|
}
|
|
6833
6835
|
},
|
|
6834
6836
|
validator: {
|
|
@@ -6919,7 +6921,8 @@ var es_default = {
|
|
|
6919
6921
|
pathRequired: "Project directory path is required",
|
|
6920
6922
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
6921
6923
|
readFailed: "Failed to read project file: {path}",
|
|
6922
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
6924
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
6925
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
6923
6926
|
}
|
|
6924
6927
|
},
|
|
6925
6928
|
validator: {
|
|
@@ -7009,7 +7012,8 @@ var es_MX_default = {
|
|
|
7009
7012
|
pathRequired: "Project directory path is required",
|
|
7010
7013
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
7011
7014
|
readFailed: "Failed to read project file: {path}",
|
|
7012
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
7015
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
7016
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
7013
7017
|
}
|
|
7014
7018
|
},
|
|
7015
7019
|
validator: {
|
|
@@ -7099,7 +7103,8 @@ var fr_default = {
|
|
|
7099
7103
|
pathRequired: "Project directory path is required",
|
|
7100
7104
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
7101
7105
|
readFailed: "Failed to read project file: {path}",
|
|
7102
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
7106
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
7107
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
7103
7108
|
}
|
|
7104
7109
|
},
|
|
7105
7110
|
validator: {
|
|
@@ -7189,7 +7194,8 @@ var ja_default = {
|
|
|
7189
7194
|
pathRequired: "Project directory path is required",
|
|
7190
7195
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
7191
7196
|
readFailed: "Failed to read project file: {path}",
|
|
7192
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
7197
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
7198
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
7193
7199
|
}
|
|
7194
7200
|
},
|
|
7195
7201
|
validator: {
|
|
@@ -7279,7 +7285,8 @@ var ko_default = {
|
|
|
7279
7285
|
pathRequired: "Project directory path is required",
|
|
7280
7286
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
7281
7287
|
readFailed: "Failed to read project file: {path}",
|
|
7282
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
7288
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
7289
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
7283
7290
|
}
|
|
7284
7291
|
},
|
|
7285
7292
|
validator: {
|
|
@@ -7369,7 +7376,8 @@ var pt_default = {
|
|
|
7369
7376
|
pathRequired: "Project directory path is required",
|
|
7370
7377
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
7371
7378
|
readFailed: "Failed to read project file: {path}",
|
|
7372
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
7379
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
7380
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
7373
7381
|
}
|
|
7374
7382
|
},
|
|
7375
7383
|
validator: {
|
|
@@ -7459,7 +7467,8 @@ var pt_BR_default = {
|
|
|
7459
7467
|
pathRequired: "Project directory path is required",
|
|
7460
7468
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
7461
7469
|
readFailed: "Failed to read project file: {path}",
|
|
7462
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
7470
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
7471
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
7463
7472
|
}
|
|
7464
7473
|
},
|
|
7465
7474
|
validator: {
|
|
@@ -7549,7 +7558,8 @@ var ro_default = {
|
|
|
7549
7558
|
pathRequired: "Project directory path is required",
|
|
7550
7559
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
7551
7560
|
readFailed: "Failed to read project file: {path}",
|
|
7552
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
7561
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
7562
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
7553
7563
|
}
|
|
7554
7564
|
},
|
|
7555
7565
|
validator: {
|
|
@@ -7639,7 +7649,8 @@ var ru_default = {
|
|
|
7639
7649
|
pathRequired: "Project directory path is required",
|
|
7640
7650
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
7641
7651
|
readFailed: "Failed to read project file: {path}",
|
|
7642
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
7652
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
7653
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
7643
7654
|
}
|
|
7644
7655
|
},
|
|
7645
7656
|
validator: {
|
|
@@ -7729,7 +7740,8 @@ var tr_default = {
|
|
|
7729
7740
|
pathRequired: "Project directory path is required",
|
|
7730
7741
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
7731
7742
|
readFailed: "Failed to read project file: {path}",
|
|
7732
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
7743
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
7744
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
7733
7745
|
}
|
|
7734
7746
|
},
|
|
7735
7747
|
validator: {
|
|
@@ -7819,7 +7831,8 @@ var zh_CN_default = {
|
|
|
7819
7831
|
pathRequired: "Project directory path is required",
|
|
7820
7832
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
7821
7833
|
readFailed: "Failed to read project file: {path}",
|
|
7822
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
7834
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
7835
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
7823
7836
|
}
|
|
7824
7837
|
},
|
|
7825
7838
|
validator: {
|
|
@@ -7909,7 +7922,8 @@ var zh_TW_default = {
|
|
|
7909
7922
|
pathRequired: "Project directory path is required",
|
|
7910
7923
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
7911
7924
|
readFailed: "Failed to read project file: {path}",
|
|
7912
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
7925
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
7926
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
7913
7927
|
}
|
|
7914
7928
|
},
|
|
7915
7929
|
validator: {
|
|
@@ -7999,7 +8013,8 @@ var zu_default = {
|
|
|
7999
8013
|
pathRequired: "Project directory path is required",
|
|
8000
8014
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
8001
8015
|
readFailed: "Failed to read project file: {path}",
|
|
8002
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
8016
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
8017
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
8003
8018
|
}
|
|
8004
8019
|
},
|
|
8005
8020
|
validator: {
|
|
@@ -8144,13 +8159,15 @@ var ProjectDimensions = {
|
|
|
8144
8159
|
SolutionKey: "SolutionKey",
|
|
8145
8160
|
SolutionProjectKey: "SolutionProjectKey",
|
|
8146
8161
|
SolutionIdentityStatus: "SolutionIdentityStatus",
|
|
8147
|
-
PreviousSolutionKey: "PreviousSolutionKey"
|
|
8162
|
+
PreviousSolutionKey: "PreviousSolutionKey",
|
|
8163
|
+
PreviousProjectKey: "PreviousProjectKey"
|
|
8148
8164
|
};
|
|
8149
8165
|
var GUID_KEY_DIMENSIONS = new Set([
|
|
8150
8166
|
ProjectDimensions.ProjectKey,
|
|
8151
8167
|
ProjectDimensions.SolutionKey,
|
|
8152
8168
|
ProjectDimensions.SolutionProjectKey,
|
|
8153
|
-
ProjectDimensions.PreviousSolutionKey
|
|
8169
|
+
ProjectDimensions.PreviousSolutionKey,
|
|
8170
|
+
ProjectDimensions.PreviousProjectKey
|
|
8154
8171
|
]);
|
|
8155
8172
|
var ShipDimensions = {
|
|
8156
8173
|
ShipKind: "ShipKind",
|
|
@@ -8304,9 +8321,7 @@ async function withinProjectIdentityBudget(work, onTimeout) {
|
|
|
8304
8321
|
}
|
|
8305
8322
|
}
|
|
8306
8323
|
|
|
8307
|
-
// ../../common/src/
|
|
8308
|
-
var PSEUDONYM_DOMAIN = "uipath-cli/telemetry/pseudonym/v1:";
|
|
8309
|
-
var PSEUDONYM_HEX_LENGTH = 32;
|
|
8324
|
+
// ../../common/src/sha256.ts
|
|
8310
8325
|
var SHA256_K = new Uint32Array([
|
|
8311
8326
|
1116352408,
|
|
8312
8327
|
1899447441,
|
|
@@ -8386,7 +8401,7 @@ var SHA256_INITIAL_STATE = new Uint32Array([
|
|
|
8386
8401
|
function rotr(value, bits) {
|
|
8387
8402
|
return (value >>> bits | value << 32 - bits) >>> 0;
|
|
8388
8403
|
}
|
|
8389
|
-
function
|
|
8404
|
+
function sha256Words(input) {
|
|
8390
8405
|
const bytes = new TextEncoder().encode(input);
|
|
8391
8406
|
const paddedLength = bytes.length + 9 + 63 >> 6 << 6;
|
|
8392
8407
|
const buffer = new Uint8Array(paddedLength);
|
|
@@ -8442,12 +8457,19 @@ function sha256Hex(input) {
|
|
|
8442
8457
|
state[6] = state[6] + g >>> 0;
|
|
8443
8458
|
state[7] = state[7] + h >>> 0;
|
|
8444
8459
|
}
|
|
8460
|
+
return state;
|
|
8461
|
+
}
|
|
8462
|
+
function sha256Hex(input) {
|
|
8445
8463
|
let hex = "";
|
|
8446
|
-
for (const word of
|
|
8464
|
+
for (const word of sha256Words(input)) {
|
|
8447
8465
|
hex += word.toString(16).padStart(8, "0");
|
|
8448
8466
|
}
|
|
8449
8467
|
return hex;
|
|
8450
8468
|
}
|
|
8469
|
+
|
|
8470
|
+
// ../../common/src/telemetry/pseudonymize.ts
|
|
8471
|
+
var PSEUDONYM_DOMAIN = "uipath-cli/telemetry/pseudonym/v1:";
|
|
8472
|
+
var PSEUDONYM_HEX_LENGTH = 32;
|
|
8451
8473
|
function resolveSha256Hex() {
|
|
8452
8474
|
try {
|
|
8453
8475
|
const nodeCrypto = __require("node:crypto");
|
|
@@ -8843,13 +8865,25 @@ function settlePromiseLike(thenable) {
|
|
|
8843
8865
|
return Promise.resolve(thenable).then((data) => [undefined, data]).catch((error) => [toError(error), undefined]);
|
|
8844
8866
|
}
|
|
8845
8867
|
|
|
8868
|
+
// ../../common/src/result-types.ts
|
|
8869
|
+
var RESULTS = {
|
|
8870
|
+
Success: "Success",
|
|
8871
|
+
Failure: "Failure",
|
|
8872
|
+
ConfigError: "ConfigError",
|
|
8873
|
+
AuthenticationError: "AuthenticationError",
|
|
8874
|
+
ValidationError: "ValidationError",
|
|
8875
|
+
TimeoutError: "TimeoutError"
|
|
8876
|
+
};
|
|
8877
|
+
|
|
8846
8878
|
// ../../common/src/error-codes.ts
|
|
8847
8879
|
var CLI_ERROR_CODES = [
|
|
8848
8880
|
"invalid_argument",
|
|
8881
|
+
"confirmation_required",
|
|
8849
8882
|
"authentication_required",
|
|
8850
8883
|
"permission_denied",
|
|
8851
8884
|
"local_permission_denied",
|
|
8852
8885
|
"not_found",
|
|
8886
|
+
"not_enabled",
|
|
8853
8887
|
"rate_limited",
|
|
8854
8888
|
"network_error",
|
|
8855
8889
|
"timeout",
|
|
@@ -8888,6 +8922,12 @@ function carriedRetry(error) {
|
|
|
8888
8922
|
const retry = error.retry;
|
|
8889
8923
|
return isRetryHint(retry) ? retry : undefined;
|
|
8890
8924
|
}
|
|
8925
|
+
function carriedResult(error) {
|
|
8926
|
+
if (!error || typeof error !== "object")
|
|
8927
|
+
return;
|
|
8928
|
+
const result = error.result;
|
|
8929
|
+
return typeof result === "string" && result !== RESULTS.Success && Object.values(RESULTS).includes(result) ? result : undefined;
|
|
8930
|
+
}
|
|
8891
8931
|
function defaultRetryForErrorCode(errorCode) {
|
|
8892
8932
|
switch (errorCode) {
|
|
8893
8933
|
case "network_error":
|
|
@@ -9283,6 +9323,8 @@ async function extractErrorDetails(error, options) {
|
|
|
9283
9323
|
}
|
|
9284
9324
|
if (parsedBody?.errorCode && typeof parsedBody.errorCode === "string") {
|
|
9285
9325
|
context.errorCode = parsedBody.errorCode;
|
|
9326
|
+
} else if (typeof parsedBody?.errorCode === "number") {
|
|
9327
|
+
context.errorCode = String(parsedBody.errorCode);
|
|
9286
9328
|
} else if (parsedBody?.code && typeof parsedBody.code === "string") {
|
|
9287
9329
|
context.errorCode = parsedBody.code;
|
|
9288
9330
|
}
|
|
@@ -9339,15 +9381,6 @@ async function extractErrorDetails(error, options) {
|
|
|
9339
9381
|
...parsedErrors ? { parsedErrors } : {}
|
|
9340
9382
|
};
|
|
9341
9383
|
}
|
|
9342
|
-
// ../../common/src/result-types.ts
|
|
9343
|
-
var RESULTS = {
|
|
9344
|
-
Success: "Success",
|
|
9345
|
-
Failure: "Failure",
|
|
9346
|
-
ConfigError: "ConfigError",
|
|
9347
|
-
AuthenticationError: "AuthenticationError",
|
|
9348
|
-
ValidationError: "ValidationError",
|
|
9349
|
-
TimeoutError: "TimeoutError"
|
|
9350
|
-
};
|
|
9351
9384
|
// ../../../node_modules/commander/index.js
|
|
9352
9385
|
var exports_commander = {};
|
|
9353
9386
|
__exportCjs(exports_commander, {
|
|
@@ -9775,7 +9808,10 @@ var AUTH_ERROR_CODES = new Set([
|
|
|
9775
9808
|
var LOCAL_PERMISSION_CLI_ERROR_CODES = new Set([
|
|
9776
9809
|
"local_permission_denied"
|
|
9777
9810
|
]);
|
|
9778
|
-
var VALIDATION_ERROR_CODES = new Set([
|
|
9811
|
+
var VALIDATION_ERROR_CODES = new Set([
|
|
9812
|
+
"invalid_argument",
|
|
9813
|
+
"confirmation_required"
|
|
9814
|
+
]);
|
|
9779
9815
|
var NETWORK_HTTP_ERROR_CODES = new Set([
|
|
9780
9816
|
"network_error",
|
|
9781
9817
|
"rate_limited",
|
|
@@ -10004,6 +10040,109 @@ var CommonTelemetryEvents = {
|
|
|
10004
10040
|
// ../../common/src/telemetry/telemetry-init.ts
|
|
10005
10041
|
import { getFileSystem as getFileSystem5 } from "@uipath/filesystem";
|
|
10006
10042
|
|
|
10043
|
+
// ../../common/src/telemetry/global-telemetry-properties.ts
|
|
10044
|
+
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
10045
|
+
function getGlobalTelemetryProperties() {
|
|
10046
|
+
return telemetryPropsSlot.get();
|
|
10047
|
+
}
|
|
10048
|
+
|
|
10049
|
+
// ../../common/src/telemetry/trace-context.ts
|
|
10050
|
+
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
|
|
10051
|
+
var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
10052
|
+
function getProcessEnv() {
|
|
10053
|
+
return globalThis.process?.env;
|
|
10054
|
+
}
|
|
10055
|
+
function parseInboundTraceparent(value) {
|
|
10056
|
+
if (!value) {
|
|
10057
|
+
return;
|
|
10058
|
+
}
|
|
10059
|
+
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
10060
|
+
if (!match) {
|
|
10061
|
+
return;
|
|
10062
|
+
}
|
|
10063
|
+
const [, traceId, parentSpanId] = match;
|
|
10064
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
10065
|
+
return;
|
|
10066
|
+
}
|
|
10067
|
+
return { traceId, parentSpanId };
|
|
10068
|
+
}
|
|
10069
|
+
function getInboundTraceContext() {
|
|
10070
|
+
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
10071
|
+
}
|
|
10072
|
+
|
|
10073
|
+
// ../../common/src/telemetry/session-id.ts
|
|
10074
|
+
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
10075
|
+
var SESSION_ID_MAX_LENGTH = 64;
|
|
10076
|
+
var RANDOM_SESSION_ID_LENGTH = 32;
|
|
10077
|
+
var TELEMETRY_SESSION_SOURCE_PROPERTY = "SessionIdSource";
|
|
10078
|
+
var CONTROL_CHARACTERS = /\p{Cc}/gu;
|
|
10079
|
+
var INHERITED_SESSION_SOURCES = [
|
|
10080
|
+
{ envVar: "CLAUDE_CODE_SESSION_ID", source: "claude-code" },
|
|
10081
|
+
{ envVar: "CODEX_THREAD_ID", source: "codex" },
|
|
10082
|
+
{ envVar: "ANTIGRAVITY_TRAJECTORY_ID", source: "antigravity" },
|
|
10083
|
+
{ envVar: "TERM_SESSION_ID", source: "terminal" },
|
|
10084
|
+
{ envVar: "WT_SESSION", source: "terminal" }
|
|
10085
|
+
];
|
|
10086
|
+
var telemetrySessionSlot = singleton("TelemetrySession");
|
|
10087
|
+
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
10088
|
+
function getProcessEnv2() {
|
|
10089
|
+
return globalThis.process?.env;
|
|
10090
|
+
}
|
|
10091
|
+
function normalizeSessionId(value) {
|
|
10092
|
+
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
|
|
10093
|
+
return;
|
|
10094
|
+
}
|
|
10095
|
+
const cleaned = String(value).replace(CONTROL_CHARACTERS, "").trim().slice(0, SESSION_ID_MAX_LENGTH);
|
|
10096
|
+
return cleaned || undefined;
|
|
10097
|
+
}
|
|
10098
|
+
function getConfiguredTelemetrySessionId() {
|
|
10099
|
+
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
10100
|
+
}
|
|
10101
|
+
function getInheritedSession(env) {
|
|
10102
|
+
for (const candidate of INHERITED_SESSION_SOURCES) {
|
|
10103
|
+
const handle = normalizeSessionId(env[candidate.envVar]);
|
|
10104
|
+
if (handle) {
|
|
10105
|
+
return { id: handle, source: candidate.source };
|
|
10106
|
+
}
|
|
10107
|
+
}
|
|
10108
|
+
return;
|
|
10109
|
+
}
|
|
10110
|
+
function generateRandomSession() {
|
|
10111
|
+
const bytes = new Uint8Array(RANDOM_SESSION_ID_LENGTH / 2);
|
|
10112
|
+
crypto.getRandomValues(bytes);
|
|
10113
|
+
let hex = "";
|
|
10114
|
+
for (const byte of bytes) {
|
|
10115
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
10116
|
+
}
|
|
10117
|
+
return { id: hex, source: "random" };
|
|
10118
|
+
}
|
|
10119
|
+
function resolveTelemetrySession() {
|
|
10120
|
+
const existing = telemetrySessionSlot.get();
|
|
10121
|
+
if (existing) {
|
|
10122
|
+
return existing;
|
|
10123
|
+
}
|
|
10124
|
+
const declaredHandle = getConfiguredTelemetrySessionId();
|
|
10125
|
+
const resolved = declaredHandle ? { id: declaredHandle, source: "declared" } : getInheritedSession(getProcessEnv2() ?? {}) ?? generateRandomSession();
|
|
10126
|
+
telemetrySessionSlot.set(resolved);
|
|
10127
|
+
return resolved;
|
|
10128
|
+
}
|
|
10129
|
+
function getTelemetrySessionId() {
|
|
10130
|
+
return resolveTelemetrySession().id;
|
|
10131
|
+
}
|
|
10132
|
+
function getTelemetrySessionSource() {
|
|
10133
|
+
return resolveTelemetrySession().source;
|
|
10134
|
+
}
|
|
10135
|
+
function getTelemetryOperationId() {
|
|
10136
|
+
const existing = telemetryOperationIdSlot.get();
|
|
10137
|
+
if (existing) {
|
|
10138
|
+
return existing;
|
|
10139
|
+
}
|
|
10140
|
+
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
10141
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
10142
|
+
telemetryOperationIdSlot.set(generated);
|
|
10143
|
+
return generated;
|
|
10144
|
+
}
|
|
10145
|
+
|
|
10007
10146
|
// ../../common/src/registry.ts
|
|
10008
10147
|
import { execFileSync } from "node:child_process";
|
|
10009
10148
|
function readRegistryValue(keyPath, valueName) {
|
|
@@ -10250,108 +10389,6 @@ class NodeContextStorage {
|
|
|
10250
10389
|
return this.storage.getStore();
|
|
10251
10390
|
}
|
|
10252
10391
|
}
|
|
10253
|
-
// ../../common/src/telemetry/trace-context.ts
|
|
10254
|
-
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
|
|
10255
|
-
var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
10256
|
-
function getProcessEnv() {
|
|
10257
|
-
return globalThis.process?.env;
|
|
10258
|
-
}
|
|
10259
|
-
function parseInboundTraceparent(value) {
|
|
10260
|
-
if (!value) {
|
|
10261
|
-
return;
|
|
10262
|
-
}
|
|
10263
|
-
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
10264
|
-
if (!match) {
|
|
10265
|
-
return;
|
|
10266
|
-
}
|
|
10267
|
-
const [, traceId, parentSpanId] = match;
|
|
10268
|
-
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
10269
|
-
return;
|
|
10270
|
-
}
|
|
10271
|
-
return { traceId, parentSpanId };
|
|
10272
|
-
}
|
|
10273
|
-
function getInboundTraceContext() {
|
|
10274
|
-
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
10275
|
-
}
|
|
10276
|
-
|
|
10277
|
-
// ../../common/src/telemetry/session-id.ts
|
|
10278
|
-
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
10279
|
-
var SESSION_ID_MAX_LENGTH = 64;
|
|
10280
|
-
var RANDOM_SESSION_ID_LENGTH = 32;
|
|
10281
|
-
var TELEMETRY_SESSION_SOURCE_PROPERTY = "SessionIdSource";
|
|
10282
|
-
var CONTROL_CHARACTERS = /\p{Cc}/gu;
|
|
10283
|
-
var INHERITED_SESSION_SOURCES = [
|
|
10284
|
-
{ envVar: "CLAUDE_CODE_SESSION_ID", source: "claude-code" },
|
|
10285
|
-
{ envVar: "CODEX_THREAD_ID", source: "codex" },
|
|
10286
|
-
{ envVar: "ANTIGRAVITY_TRAJECTORY_ID", source: "antigravity" },
|
|
10287
|
-
{ envVar: "TERM_SESSION_ID", source: "terminal" },
|
|
10288
|
-
{ envVar: "WT_SESSION", source: "terminal" }
|
|
10289
|
-
];
|
|
10290
|
-
var telemetrySessionSlot = singleton("TelemetrySession");
|
|
10291
|
-
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
10292
|
-
function getProcessEnv2() {
|
|
10293
|
-
return globalThis.process?.env;
|
|
10294
|
-
}
|
|
10295
|
-
function normalizeSessionId(value) {
|
|
10296
|
-
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
|
|
10297
|
-
return;
|
|
10298
|
-
}
|
|
10299
|
-
const cleaned = String(value).replace(CONTROL_CHARACTERS, "").trim().slice(0, SESSION_ID_MAX_LENGTH);
|
|
10300
|
-
return cleaned || undefined;
|
|
10301
|
-
}
|
|
10302
|
-
function getConfiguredTelemetrySessionId() {
|
|
10303
|
-
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
10304
|
-
}
|
|
10305
|
-
function getInheritedSession(env) {
|
|
10306
|
-
for (const candidate of INHERITED_SESSION_SOURCES) {
|
|
10307
|
-
const handle = normalizeSessionId(env[candidate.envVar]);
|
|
10308
|
-
if (handle) {
|
|
10309
|
-
return { id: handle, source: candidate.source };
|
|
10310
|
-
}
|
|
10311
|
-
}
|
|
10312
|
-
return;
|
|
10313
|
-
}
|
|
10314
|
-
function generateRandomSession() {
|
|
10315
|
-
const bytes = new Uint8Array(RANDOM_SESSION_ID_LENGTH / 2);
|
|
10316
|
-
crypto.getRandomValues(bytes);
|
|
10317
|
-
let hex = "";
|
|
10318
|
-
for (const byte of bytes) {
|
|
10319
|
-
hex += byte.toString(16).padStart(2, "0");
|
|
10320
|
-
}
|
|
10321
|
-
return { id: hex, source: "random" };
|
|
10322
|
-
}
|
|
10323
|
-
function resolveTelemetrySession() {
|
|
10324
|
-
const existing = telemetrySessionSlot.get();
|
|
10325
|
-
if (existing) {
|
|
10326
|
-
return existing;
|
|
10327
|
-
}
|
|
10328
|
-
const declaredHandle = getConfiguredTelemetrySessionId();
|
|
10329
|
-
const resolved = declaredHandle ? { id: declaredHandle, source: "declared" } : getInheritedSession(getProcessEnv2() ?? {}) ?? generateRandomSession();
|
|
10330
|
-
telemetrySessionSlot.set(resolved);
|
|
10331
|
-
return resolved;
|
|
10332
|
-
}
|
|
10333
|
-
function getTelemetrySessionId() {
|
|
10334
|
-
return resolveTelemetrySession().id;
|
|
10335
|
-
}
|
|
10336
|
-
function getTelemetrySessionSource() {
|
|
10337
|
-
return resolveTelemetrySession().source;
|
|
10338
|
-
}
|
|
10339
|
-
function getTelemetryOperationId() {
|
|
10340
|
-
const existing = telemetryOperationIdSlot.get();
|
|
10341
|
-
if (existing) {
|
|
10342
|
-
return existing;
|
|
10343
|
-
}
|
|
10344
|
-
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
10345
|
-
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
10346
|
-
telemetryOperationIdSlot.set(generated);
|
|
10347
|
-
return generated;
|
|
10348
|
-
}
|
|
10349
|
-
// ../../common/src/telemetry/global-telemetry-properties.ts
|
|
10350
|
-
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
10351
|
-
function getGlobalTelemetryProperties() {
|
|
10352
|
-
return telemetryPropsSlot.get();
|
|
10353
|
-
}
|
|
10354
|
-
|
|
10355
10392
|
// ../../common/src/telemetry/span-clock.ts
|
|
10356
10393
|
function startSpanClock() {
|
|
10357
10394
|
const started = performance.now();
|
|
@@ -10566,6 +10603,7 @@ var MAX_SPOOL_AGE_MS = 72 * 60 * 60 * 1000;
|
|
|
10566
10603
|
// ../../common/src/telemetry/telemetry-init.ts
|
|
10567
10604
|
var telemetryInstanceSlot = singleton("TelemetryService");
|
|
10568
10605
|
var DEFAULT_AI_CONNECTION_STRING = atob("SW5zdHJ1bWVudGF0aW9uS2V5PTliZDM3NDgyLTgxMGUtNDQyYS1hYWE2LWQzOGVmNjVjNjY3NDtJbmdlc3Rpb25FbmRwb2ludD1odHRwczovL3dlc3RldXJvcGUtNS5pbi5hcHBsaWNhdGlvbmluc2lnaHRzLmF6dXJlLmNvbS87TGl2ZUVuZHBvaW50PWh0dHBzOi8vd2VzdGV1cm9wZS5saXZlZGlhZ25vc3RpY3MubW9uaXRvci5henVyZS5jb20vO0FwcGxpY2F0aW9uSWQ9MzU2OTdlZjEtOGJkMC00ZjE5LWEyN2MtZDg3Y2NhYzY2ZDJj");
|
|
10606
|
+
var browserProviderSlot = singleton("BrowserAppInsightsTelemetryProvider");
|
|
10569
10607
|
function getGlobalTelemetryInstance() {
|
|
10570
10608
|
const existing = telemetryInstanceSlot.get();
|
|
10571
10609
|
if (existing && typeof existing === "object" && "trackEvent" in existing && typeof existing.trackEvent === "function") {
|
|
@@ -10749,7 +10787,7 @@ function printOutput(data, format = "json", logFn, asciiSafe = false, tableRowSt
|
|
|
10749
10787
|
const pagedRows = extractPagedRows(data.Data);
|
|
10750
10788
|
const items = pagedRows ?? (Array.isArray(data.Data) ? data.Data : [data.Data]);
|
|
10751
10789
|
items.forEach((item) => {
|
|
10752
|
-
const values = Object.values(item).map((v) => v ?? "").join("\t");
|
|
10790
|
+
const values = item === null || typeof item !== "object" ? String(item ?? "") : Object.values(item).map((v) => v ?? "").join("\t");
|
|
10753
10791
|
logFn(values);
|
|
10754
10792
|
});
|
|
10755
10793
|
} else {
|
|
@@ -10764,7 +10802,8 @@ function printOutput(data, format = "json", logFn, asciiSafe = false, tableRowSt
|
|
|
10764
10802
|
default: {
|
|
10765
10803
|
const hasData = "Data" in data && data.Data != null;
|
|
10766
10804
|
const pagedRows = hasData ? extractPagedRows(data.Data) : null;
|
|
10767
|
-
const
|
|
10805
|
+
const resolvedRows = pagedRows ? pagedRows : Array.isArray(data.Data) ? data.Data : null;
|
|
10806
|
+
const rows = resolvedRows && isPrimitiveArray(resolvedRows) ? resolvedRows.map((entry) => ({ Value: entry })) : resolvedRows;
|
|
10768
10807
|
if (hasData && !(rows !== null && rows.length === 0)) {
|
|
10769
10808
|
const logValue = data.Log;
|
|
10770
10809
|
if (rows !== null) {
|
|
@@ -10821,6 +10860,9 @@ function printTable(data, logFn, externalLogValue, tableRowStyle) {
|
|
|
10821
10860
|
function isPlainObjectArray(value) {
|
|
10822
10861
|
return Array.isArray(value) && value.length > 0 && value.every(isPlainRecord);
|
|
10823
10862
|
}
|
|
10863
|
+
function isPrimitiveArray(value) {
|
|
10864
|
+
return Array.isArray(value) && value.length > 0 && value.every((entry) => entry === null || typeof entry !== "object");
|
|
10865
|
+
}
|
|
10824
10866
|
function isNonEmptyPlainObject(value) {
|
|
10825
10867
|
return isPlainRecord(value) && Object.keys(value).length > 0;
|
|
10826
10868
|
}
|
|
@@ -11167,12 +11209,12 @@ class FilterEvaluationError extends Error {
|
|
|
11167
11209
|
instructions;
|
|
11168
11210
|
retry = "RetryWillNotFix";
|
|
11169
11211
|
result = RESULTS.ValidationError;
|
|
11170
|
-
constructor(filter, cause) {
|
|
11212
|
+
constructor(filter, cause, hint) {
|
|
11171
11213
|
const underlying = cause instanceof Error ? cause.message : String(cause);
|
|
11172
|
-
super(`Filter '${filter}' failed to evaluate: ${underlying}`);
|
|
11214
|
+
super(`Filter '${filter}' failed to evaluate: ${underlying}` + (hint ? ` ${hint.detail}` : ""));
|
|
11173
11215
|
this.name = "FilterEvaluationError";
|
|
11174
11216
|
this.filter = filter;
|
|
11175
|
-
this.instructions = `The --output-filter expression '${filter}' failed at evaluation time. ` + "Note that --output-filter operates on the 'Data' field of the envelope, not the full object. " + "For example, on a list result use 'length(@)' instead of 'Data | length(@)'.";
|
|
11217
|
+
this.instructions = (hint ? `${hint.instructions} ` : "") + `The --output-filter expression '${filter}' failed at evaluation time. ` + "Note that --output-filter operates on the 'Data' field of the envelope, not the full object. " + "For example, on a list result use 'length(@)' instead of 'Data | length(@)'.";
|
|
11176
11218
|
}
|
|
11177
11219
|
}
|
|
11178
11220
|
|
|
@@ -11294,6 +11336,93 @@ function nameList(names, cap = 12) {
|
|
|
11294
11336
|
const rest = names.length - shown.length;
|
|
11295
11337
|
return shown.join(", ") + (rest > 0 ? `, and ${rest} more` : "");
|
|
11296
11338
|
}
|
|
11339
|
+
function notFieldsOn(names, scope) {
|
|
11340
|
+
return `${nameList(names)} ${names.length === 1 ? "is not a field" : "are not fields"} on the ${scope} it read`;
|
|
11341
|
+
}
|
|
11342
|
+
function failingFieldRead(ast, isList, fn, argIndex) {
|
|
11343
|
+
const [left, right, condition] = ast.children ?? [];
|
|
11344
|
+
let scopes = [];
|
|
11345
|
+
if (!isList) {
|
|
11346
|
+
scopes = [ast];
|
|
11347
|
+
} else if (ast.type === "FilterProjection" && left?.type === "Identity") {
|
|
11348
|
+
scopes = [condition, right];
|
|
11349
|
+
} else if (ast.type === "Projection" && (left?.type === "Identity" || left?.type === "Flatten" && left.children?.[0]?.type === "Identity")) {
|
|
11350
|
+
scopes = [right];
|
|
11351
|
+
}
|
|
11352
|
+
const reads = new Set;
|
|
11353
|
+
let tracked = 0;
|
|
11354
|
+
const visit = (node) => {
|
|
11355
|
+
if (!node)
|
|
11356
|
+
return;
|
|
11357
|
+
switch (node.type) {
|
|
11358
|
+
case "Function": {
|
|
11359
|
+
const arg = node.children?.[argIndex - 1];
|
|
11360
|
+
if (node.name === fn && arg?.type === "Field" && arg.name) {
|
|
11361
|
+
reads.add(arg.name);
|
|
11362
|
+
tracked++;
|
|
11363
|
+
}
|
|
11364
|
+
node.children?.forEach(visit);
|
|
11365
|
+
return;
|
|
11366
|
+
}
|
|
11367
|
+
case "AndExpression":
|
|
11368
|
+
case "OrExpression":
|
|
11369
|
+
case "NotExpression":
|
|
11370
|
+
case "Comparator":
|
|
11371
|
+
case "MultiSelectList":
|
|
11372
|
+
case "MultiSelectHash":
|
|
11373
|
+
node.children?.forEach(visit);
|
|
11374
|
+
return;
|
|
11375
|
+
case "KeyValuePair":
|
|
11376
|
+
visit(node.value);
|
|
11377
|
+
return;
|
|
11378
|
+
}
|
|
11379
|
+
};
|
|
11380
|
+
scopes.forEach(visit);
|
|
11381
|
+
const calls = (node) => {
|
|
11382
|
+
if (node === null || typeof node !== "object")
|
|
11383
|
+
return 0;
|
|
11384
|
+
const own = node.type === "Function" && node.name === fn ? 1 : 0;
|
|
11385
|
+
const next = node.type === "KeyValuePair" ? [node.value] : node.children ?? [];
|
|
11386
|
+
return own + next.reduce((sum, child) => sum + calls(child), 0);
|
|
11387
|
+
};
|
|
11388
|
+
return reads.size === 1 && tracked === calls(ast) ? [...reads][0] : undefined;
|
|
11389
|
+
}
|
|
11390
|
+
function fieldExpression(name) {
|
|
11391
|
+
return /^[A-Za-z_]\w*$/.test(name) ? name : JSON.stringify(name);
|
|
11392
|
+
}
|
|
11393
|
+
function evaluationHint(codec, filter, data, cause) {
|
|
11394
|
+
const underlying = cause instanceof Error ? cause.message : String(cause);
|
|
11395
|
+
const failure = /\b(\w+)\(\) expected argument (\d+) to be type (\S+) but received type null\b/.exec(underlying);
|
|
11396
|
+
if (!failure)
|
|
11397
|
+
return;
|
|
11398
|
+
const [, fn, position, expected] = failure;
|
|
11399
|
+
const name = failingFieldRead(codec.compile(filter), Array.isArray(data), fn, Number(position));
|
|
11400
|
+
if (name === undefined)
|
|
11401
|
+
return;
|
|
11402
|
+
const present = availableFields(data);
|
|
11403
|
+
if (present.length === 0)
|
|
11404
|
+
return;
|
|
11405
|
+
const scope = `${countRecords(data)} record(s)`;
|
|
11406
|
+
if (!present.includes(name)) {
|
|
11407
|
+
return {
|
|
11408
|
+
detail: `${notFieldsOn([name], scope)}. Available fields: ${nameList(present)}.`,
|
|
11409
|
+
instructions: "Use a field the records have; names are case-sensitive."
|
|
11410
|
+
};
|
|
11411
|
+
}
|
|
11412
|
+
const records = Array.isArray(data) ? data : [data];
|
|
11413
|
+
const unset = records.filter((r) => r?.[name] == null).length;
|
|
11414
|
+
const field = fieldExpression(name);
|
|
11415
|
+
let fallback;
|
|
11416
|
+
if (expected.split(",").includes("string")) {
|
|
11417
|
+
fallback = "''";
|
|
11418
|
+
} else if (expected.split(",").includes("array")) {
|
|
11419
|
+
fallback = "`[]`";
|
|
11420
|
+
}
|
|
11421
|
+
return {
|
|
11422
|
+
detail: `\`${name}\` is null or missing on ${unset} of the ${scope} it read.`,
|
|
11423
|
+
instructions: fallback ? `Give it a default where ${fn}() reads it, e.g. \`${field} || ${fallback}\`.` : `Filter out the records where \`${name}\` is null before ${fn}() reads it.`
|
|
11424
|
+
};
|
|
11425
|
+
}
|
|
11297
11426
|
function buildFilterWarning(filter, data, outcome) {
|
|
11298
11427
|
const present = availableFields(data);
|
|
11299
11428
|
const refs = referencedFields(filter);
|
|
@@ -11301,7 +11430,7 @@ function buildFilterWarning(filter, data, outcome) {
|
|
|
11301
11430
|
const unchecked = refs.nested.filter((name) => !present.includes(name));
|
|
11302
11431
|
const count = countRecords(data);
|
|
11303
11432
|
const scope = `${count} record(s)`;
|
|
11304
|
-
const isNotAField = (names) =>
|
|
11433
|
+
const isNotAField = (names) => notFieldsOn(names, scope);
|
|
11305
11434
|
const soundness = unchecked.length > 0 ? `${nameList(unchecked)} ${unchecked.length === 1 ? "reads" : "read"} below the top level, so ${unchecked.length === 1 ? "it was" : "they were"} not checked against the record keys` : refs.top.length > 0 ? "every field it names exists" : "";
|
|
11306
11435
|
const withSoundness = (base) => soundness ? `${base}, and ${soundness}` : base;
|
|
11307
11436
|
let detail;
|
|
@@ -11352,7 +11481,8 @@ function applyFilter(data, filter, onWarning) {
|
|
|
11352
11481
|
try {
|
|
11353
11482
|
result = codec.search(data, filter);
|
|
11354
11483
|
} catch (err) {
|
|
11355
|
-
|
|
11484
|
+
const [, hint] = catchError(() => evaluationHint(codec, filter, data, err));
|
|
11485
|
+
throw new FilterEvaluationError(filter, err, hint);
|
|
11356
11486
|
}
|
|
11357
11487
|
const inputCount = countRecords(data);
|
|
11358
11488
|
const warn = (outcome) => {
|
|
@@ -12235,7 +12365,7 @@ Command2.prototype.trackedAction = function(context, fn, properties) {
|
|
|
12235
12365
|
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
|
|
12236
12366
|
const typed = error;
|
|
12237
12367
|
const customInstructions = typeof typed.instructions === "string" ? typed.instructions : undefined;
|
|
12238
|
-
const customResult =
|
|
12368
|
+
const customResult = carriedResult(error);
|
|
12239
12369
|
const cancellationExitCode = typed.exitCode === 130 || isPromptCancellation(error) ? 130 : undefined;
|
|
12240
12370
|
const classified = cancellationExitCode === undefined ? await extractErrorDetails(error) : undefined;
|
|
12241
12371
|
const finalResult = customResult ?? classified?.result ?? RESULTS.Failure;
|
|
@@ -12599,6 +12729,8 @@ var FAILURE_STATUSES = new Set([
|
|
|
12599
12729
|
"canceled",
|
|
12600
12730
|
"stopped"
|
|
12601
12731
|
]);
|
|
12732
|
+
// ../../common/src/relayed-output.ts
|
|
12733
|
+
var RELAYED_OUTPUT_SYMBOL = Symbol.for("@uipath/common/relayed-output");
|
|
12602
12734
|
// ../../common/src/screen-logger.ts
|
|
12603
12735
|
var ScreenLogger;
|
|
12604
12736
|
((ScreenLogger) => {
|
|
@@ -14603,7 +14735,7 @@ var package_default = {
|
|
|
14603
14735
|
name: "@uipath/project-packager",
|
|
14604
14736
|
author: "UiPath",
|
|
14605
14737
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
14606
|
-
version: "1.
|
|
14738
|
+
version: "1.207.0-preview.307",
|
|
14607
14739
|
description: "UiPath Project Packager - core library for packing individual UiPath projects",
|
|
14608
14740
|
type: "module",
|
|
14609
14741
|
main: "./dist/index.js",
|
|
@@ -14659,7 +14791,7 @@ var package_default = {
|
|
|
14659
14791
|
},
|
|
14660
14792
|
devDependencies: {
|
|
14661
14793
|
"@types/node": "^25.5.2",
|
|
14662
|
-
"@uipath/resource-builder-tool": "
|
|
14794
|
+
"@uipath/resource-builder-tool": "1.0.0-s207-18596",
|
|
14663
14795
|
"@uipath/tool-agent": "^2.0.0",
|
|
14664
14796
|
"@uipath/packager-tool-apiworkflow": "workspace:*",
|
|
14665
14797
|
"@uipath/packager-tool-connector": "workspace:*",
|
|
@@ -15103,28 +15235,54 @@ class ProjectLoader {
|
|
|
15103
15235
|
path: projectFilePath
|
|
15104
15236
|
}));
|
|
15105
15237
|
}
|
|
15106
|
-
const
|
|
15107
|
-
const projectData = JSON.parse(json);
|
|
15238
|
+
const projectData = this.parseProjectFile(fileContent, projectFilePath);
|
|
15108
15239
|
const projectJson = useProjectJson ? projectData : undefined;
|
|
15109
|
-
const
|
|
15110
|
-
const
|
|
15111
|
-
|
|
15240
|
+
const designOptions = projectJson?.designOptions;
|
|
15241
|
+
const outputType = designOptions && typeof designOptions === "object" ? text(designOptions.outputType) : undefined;
|
|
15242
|
+
const projectType = outputType ?? (text(projectData?.ProjectType) || text(projectData?.type));
|
|
15243
|
+
if (!projectType) {
|
|
15112
15244
|
throw new Error(translate5.t("solutionpackager.projectLoader.errors.invalidProject", {
|
|
15113
15245
|
path: projectFilePath
|
|
15114
15246
|
}));
|
|
15115
15247
|
}
|
|
15116
|
-
const declaredName = projectJson?.name
|
|
15117
|
-
const declaredDescription = projectJson?.description
|
|
15118
|
-
const declaredAuthor = projectJson?.author
|
|
15248
|
+
const declaredName = text(projectJson?.name) || text(projectData.Name);
|
|
15249
|
+
const declaredDescription = text(projectJson?.description) || text(projectData.Description) || undefined;
|
|
15250
|
+
const declaredAuthor = text(projectJson?.author) || text(projectData.Author) || undefined;
|
|
15251
|
+
const declaredVersion = useProjectJson ? text(projectData.projectVersion) : await this.readProjectJsonVersion(projectPath);
|
|
15119
15252
|
return {
|
|
15120
15253
|
type: projectType,
|
|
15121
15254
|
name: declaredName || Path2.basename(projectPath),
|
|
15122
15255
|
projectPath,
|
|
15123
15256
|
projectFilePath,
|
|
15124
15257
|
description: declaredDescription,
|
|
15125
|
-
author: declaredAuthor
|
|
15258
|
+
author: declaredAuthor,
|
|
15259
|
+
version: declaredVersion || undefined
|
|
15126
15260
|
};
|
|
15127
15261
|
}
|
|
15262
|
+
parseProjectFile(fileContent, projectFilePath) {
|
|
15263
|
+
const json = typeof fileContent === "string" ? fileContent : new TextDecoder("utf-8").decode(fileContent);
|
|
15264
|
+
const [reason, parsed] = parseJson(json);
|
|
15265
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
15266
|
+
throw new Error(translate5.t("solutionpackager.projectLoader.errors.invalidJson", {
|
|
15267
|
+
path: projectFilePath,
|
|
15268
|
+
reason: reason ?? ""
|
|
15269
|
+
}).trim());
|
|
15270
|
+
}
|
|
15271
|
+
return parsed;
|
|
15272
|
+
}
|
|
15273
|
+
async readProjectJsonVersion(projectPath) {
|
|
15274
|
+
const projectJsonPath = Path2.join(projectPath, ProjectLoader.ProjectJsonFileName);
|
|
15275
|
+
if (!await this.fileSystem.exists(projectJsonPath))
|
|
15276
|
+
return;
|
|
15277
|
+
const fileContent = await this.fileSystem.readFile(projectJsonPath);
|
|
15278
|
+
if (!fileContent)
|
|
15279
|
+
return;
|
|
15280
|
+
try {
|
|
15281
|
+
return text(this.parseProjectFile(fileContent, projectJsonPath).projectVersion);
|
|
15282
|
+
} catch {
|
|
15283
|
+
return;
|
|
15284
|
+
}
|
|
15285
|
+
}
|
|
15128
15286
|
loadFromWebAppManifest(projectPath, webAppManifestPath) {
|
|
15129
15287
|
const folderName = Path2.basename(projectPath);
|
|
15130
15288
|
return {
|
|
@@ -15135,6 +15293,19 @@ class ProjectLoader {
|
|
|
15135
15293
|
};
|
|
15136
15294
|
}
|
|
15137
15295
|
}
|
|
15296
|
+
function parseJson(json) {
|
|
15297
|
+
try {
|
|
15298
|
+
return [undefined, JSON.parse(json)];
|
|
15299
|
+
} catch (error) {
|
|
15300
|
+
return [
|
|
15301
|
+
error instanceof Error ? error.message : String(error),
|
|
15302
|
+
undefined
|
|
15303
|
+
];
|
|
15304
|
+
}
|
|
15305
|
+
}
|
|
15306
|
+
function text(value) {
|
|
15307
|
+
return typeof value === "string" ? value.trim() : undefined;
|
|
15308
|
+
}
|
|
15138
15309
|
|
|
15139
15310
|
// src/services/project-pack-options-builder.ts
|
|
15140
15311
|
class ProjectPackOptionsBuilder {
|
|
@@ -15175,7 +15346,8 @@ class ProjectPackOptionsBuilder {
|
|
|
15175
15346
|
package: packageInfo,
|
|
15176
15347
|
skipDependencyOptimization: parameters.packOptions?.skipDependencyOptimization ?? false,
|
|
15177
15348
|
includeSources: parameters.packOptions?.includeSources ?? false,
|
|
15178
|
-
splitPackages: parameters.packOptions?.splitPackages ?? false
|
|
15349
|
+
splitPackages: parameters.packOptions?.splitPackages ?? false,
|
|
15350
|
+
skipBuild: parameters.packOptions?.skipBuild ?? false
|
|
15179
15351
|
};
|
|
15180
15352
|
}
|
|
15181
15353
|
}
|
|
@@ -16197,4 +16369,4 @@ export {
|
|
|
16197
16369
|
signNupkgsAsync
|
|
16198
16370
|
};
|
|
16199
16371
|
|
|
16200
|
-
//# debugId=
|
|
16372
|
+
//# debugId=3EC18B9F63BC050464756E2164756E21
|