@uipath/project-packager 1.197.0 → 1.198.0-preview.100
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 +280 -26
- package/dist/index.js +348 -54
- package/dist/node.js +1475 -922
- package/dist/src/i18n/locales/en.d.ts +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/models/packager-parameters.d.ts +4 -0
- package/dist/src/models/project-cleanup-options.d.ts +14 -0
- package/dist/src/node.d.ts +1 -0
- package/dist/src/services/project-loader.d.ts +4 -2
- package/dist/src/services/project-packager.d.ts +14 -0
- package/dist/src/services/project-tool-executor.d.ts +3 -1
- package/dist/src/telemetry-names.d.ts +2 -0
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var de_default = {
|
|
|
6
6
|
projectLoader: {
|
|
7
7
|
errors: {
|
|
8
8
|
pathRequired: "Project directory path is required",
|
|
9
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
9
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
10
10
|
readFailed: "Failed to read project file: {path}",
|
|
11
11
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
12
12
|
}
|
|
@@ -89,7 +89,7 @@ var en = {
|
|
|
89
89
|
projectLoader: {
|
|
90
90
|
errors: {
|
|
91
91
|
pathRequired: "Project directory path is required",
|
|
92
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
92
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
93
93
|
readFailed: "Failed to read project file: {path}",
|
|
94
94
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
95
95
|
}
|
|
@@ -171,7 +171,7 @@ var es_default = {
|
|
|
171
171
|
projectLoader: {
|
|
172
172
|
errors: {
|
|
173
173
|
pathRequired: "Project directory path is required",
|
|
174
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
174
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
175
175
|
readFailed: "Failed to read project file: {path}",
|
|
176
176
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
177
177
|
}
|
|
@@ -253,7 +253,7 @@ var es_MX_default = {
|
|
|
253
253
|
projectLoader: {
|
|
254
254
|
errors: {
|
|
255
255
|
pathRequired: "Project directory path is required",
|
|
256
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
256
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
257
257
|
readFailed: "Failed to read project file: {path}",
|
|
258
258
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
259
259
|
}
|
|
@@ -335,7 +335,7 @@ var fr_default = {
|
|
|
335
335
|
projectLoader: {
|
|
336
336
|
errors: {
|
|
337
337
|
pathRequired: "Project directory path is required",
|
|
338
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
338
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
339
339
|
readFailed: "Failed to read project file: {path}",
|
|
340
340
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
341
341
|
}
|
|
@@ -417,7 +417,7 @@ var ja_default = {
|
|
|
417
417
|
projectLoader: {
|
|
418
418
|
errors: {
|
|
419
419
|
pathRequired: "Project directory path is required",
|
|
420
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
420
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
421
421
|
readFailed: "Failed to read project file: {path}",
|
|
422
422
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
423
423
|
}
|
|
@@ -499,7 +499,7 @@ var ko_default = {
|
|
|
499
499
|
projectLoader: {
|
|
500
500
|
errors: {
|
|
501
501
|
pathRequired: "Project directory path is required",
|
|
502
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
502
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
503
503
|
readFailed: "Failed to read project file: {path}",
|
|
504
504
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
505
505
|
}
|
|
@@ -581,7 +581,7 @@ var pt_default = {
|
|
|
581
581
|
projectLoader: {
|
|
582
582
|
errors: {
|
|
583
583
|
pathRequired: "Project directory path is required",
|
|
584
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
584
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
585
585
|
readFailed: "Failed to read project file: {path}",
|
|
586
586
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
587
587
|
}
|
|
@@ -663,7 +663,7 @@ var pt_BR_default = {
|
|
|
663
663
|
projectLoader: {
|
|
664
664
|
errors: {
|
|
665
665
|
pathRequired: "Project directory path is required",
|
|
666
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
666
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
667
667
|
readFailed: "Failed to read project file: {path}",
|
|
668
668
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
669
669
|
}
|
|
@@ -745,7 +745,7 @@ var ro_default = {
|
|
|
745
745
|
projectLoader: {
|
|
746
746
|
errors: {
|
|
747
747
|
pathRequired: "Project directory path is required",
|
|
748
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
748
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
749
749
|
readFailed: "Failed to read project file: {path}",
|
|
750
750
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
751
751
|
}
|
|
@@ -827,7 +827,7 @@ var ru_default = {
|
|
|
827
827
|
projectLoader: {
|
|
828
828
|
errors: {
|
|
829
829
|
pathRequired: "Project directory path is required",
|
|
830
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
830
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
831
831
|
readFailed: "Failed to read project file: {path}",
|
|
832
832
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
833
833
|
}
|
|
@@ -909,7 +909,7 @@ var tr_default = {
|
|
|
909
909
|
projectLoader: {
|
|
910
910
|
errors: {
|
|
911
911
|
pathRequired: "Project directory path is required",
|
|
912
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
912
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
913
913
|
readFailed: "Failed to read project file: {path}",
|
|
914
914
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
915
915
|
}
|
|
@@ -991,7 +991,7 @@ var zh_CN_default = {
|
|
|
991
991
|
projectLoader: {
|
|
992
992
|
errors: {
|
|
993
993
|
pathRequired: "Project directory path is required",
|
|
994
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
994
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
995
995
|
readFailed: "Failed to read project file: {path}",
|
|
996
996
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
997
997
|
}
|
|
@@ -1073,7 +1073,7 @@ var zh_TW_default = {
|
|
|
1073
1073
|
projectLoader: {
|
|
1074
1074
|
errors: {
|
|
1075
1075
|
pathRequired: "Project directory path is required",
|
|
1076
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1076
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
1077
1077
|
readFailed: "Failed to read project file: {path}",
|
|
1078
1078
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1079
1079
|
}
|
|
@@ -1155,7 +1155,7 @@ var zu_default = {
|
|
|
1155
1155
|
projectLoader: {
|
|
1156
1156
|
errors: {
|
|
1157
1157
|
pathRequired: "Project directory path is required",
|
|
1158
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1158
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
1159
1159
|
readFailed: "Failed to read project file: {path}",
|
|
1160
1160
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1161
1161
|
}
|
|
@@ -22494,6 +22494,7 @@ var loggerSingleton = singleton(SimpleLogger);
|
|
|
22494
22494
|
var logger = SimpleLogger.getInstance();
|
|
22495
22495
|
var formatSlot = singleton("OutputFormat");
|
|
22496
22496
|
var formatExplicitSlot = singleton("OutputFormatExplicit");
|
|
22497
|
+
var helpRequestedSlot = singleton("HelpRequested");
|
|
22497
22498
|
var filterSlot = singleton("OutputFilter");
|
|
22498
22499
|
var PollOutcome = {
|
|
22499
22500
|
Completed: "completed",
|
|
@@ -22537,34 +22538,7 @@ var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
|
22537
22538
|
function getGlobalTelemetryProperties() {
|
|
22538
22539
|
return telemetryPropsSlot.get();
|
|
22539
22540
|
}
|
|
22540
|
-
var USER_AGENT_HEADER = "User-Agent";
|
|
22541
22541
|
var sdkUserAgentHostToken = singleton("SdkUserAgentHostToken");
|
|
22542
|
-
function splitUserAgentTokens(value) {
|
|
22543
|
-
return value?.trim().split(/\s+/).filter(Boolean) ?? [];
|
|
22544
|
-
}
|
|
22545
|
-
function appendUserAgentToken(value, userAgent) {
|
|
22546
|
-
const tokens = splitUserAgentTokens(value);
|
|
22547
|
-
const seen = new Set(tokens);
|
|
22548
|
-
for (const token of splitUserAgentTokens(userAgent)) {
|
|
22549
|
-
if (!seen.has(token)) {
|
|
22550
|
-
tokens.push(token);
|
|
22551
|
-
seen.add(token);
|
|
22552
|
-
}
|
|
22553
|
-
}
|
|
22554
|
-
return tokens.join(" ");
|
|
22555
|
-
}
|
|
22556
|
-
function getEffectiveUserAgent(userAgent) {
|
|
22557
|
-
return appendUserAgentToken(sdkUserAgentHostToken.get(), userAgent);
|
|
22558
|
-
}
|
|
22559
|
-
function getHeaderName(headers, headerName) {
|
|
22560
|
-
return Object.keys(headers).find((key) => key.toLowerCase() === headerName.toLowerCase());
|
|
22561
|
-
}
|
|
22562
|
-
function addSdkUserAgentHeader(headers, userAgent) {
|
|
22563
|
-
const result = { ...headers ?? {} };
|
|
22564
|
-
const headerName = getHeaderName(result, USER_AGENT_HEADER);
|
|
22565
|
-
result[headerName ?? USER_AGENT_HEADER] = appendUserAgentToken(headerName ? result[headerName] : undefined, getEffectiveUserAgent(userAgent));
|
|
22566
|
-
return result;
|
|
22567
|
-
}
|
|
22568
22542
|
class BrowserContextStorage {
|
|
22569
22543
|
contextStack = [];
|
|
22570
22544
|
run(context, fn) {
|
|
@@ -22741,10 +22715,33 @@ class ConsoleTelemetryProvider {
|
|
|
22741
22715
|
console.debug(`[Telemetry] Dependency: ${name} [${type}] (${duration}ms, ${success ? "ok" : "fail"})`);
|
|
22742
22716
|
}
|
|
22743
22717
|
}
|
|
22718
|
+
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
|
|
22719
|
+
var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
22720
|
+
function getProcessEnv() {
|
|
22721
|
+
return globalThis.process?.env;
|
|
22722
|
+
}
|
|
22723
|
+
function parseInboundTraceparent(value) {
|
|
22724
|
+
if (!value) {
|
|
22725
|
+
return;
|
|
22726
|
+
}
|
|
22727
|
+
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
22728
|
+
if (!match) {
|
|
22729
|
+
return;
|
|
22730
|
+
}
|
|
22731
|
+
const [, traceId, parentSpanId] = match;
|
|
22732
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
22733
|
+
return;
|
|
22734
|
+
}
|
|
22735
|
+
return { traceId, parentSpanId };
|
|
22736
|
+
}
|
|
22737
|
+
function getInboundTraceContext() {
|
|
22738
|
+
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
22739
|
+
}
|
|
22744
22740
|
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
22745
22741
|
var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
|
|
22746
22742
|
var telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
22747
|
-
|
|
22743
|
+
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
22744
|
+
function getProcessEnv2() {
|
|
22748
22745
|
return globalThis.process?.env;
|
|
22749
22746
|
}
|
|
22750
22747
|
function normalizeSessionId(value) {
|
|
@@ -22755,11 +22752,21 @@ function normalizeSessionId(value) {
|
|
|
22755
22752
|
return trimmed || undefined;
|
|
22756
22753
|
}
|
|
22757
22754
|
function getConfiguredTelemetrySessionId() {
|
|
22758
|
-
return normalizeSessionId(
|
|
22755
|
+
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
22759
22756
|
}
|
|
22760
22757
|
function resolveTelemetrySessionId(existingSessionId) {
|
|
22761
22758
|
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
22762
22759
|
}
|
|
22760
|
+
function getTelemetryOperationId() {
|
|
22761
|
+
const existing = telemetryOperationIdSlot.get();
|
|
22762
|
+
if (existing) {
|
|
22763
|
+
return existing;
|
|
22764
|
+
}
|
|
22765
|
+
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
22766
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
22767
|
+
telemetryOperationIdSlot.set(generated);
|
|
22768
|
+
return generated;
|
|
22769
|
+
}
|
|
22763
22770
|
var KNOWN_AGENTS = [
|
|
22764
22771
|
{ envVar: "CLAUDECODE", value: "1", id: "claude-code" },
|
|
22765
22772
|
{ envVar: "CURSOR_AGENT", value: "1", id: "cursor" },
|
|
@@ -22886,6 +22893,140 @@ function getExecutionContextTelemetryProperties() {
|
|
|
22886
22893
|
...detected.ciProvider ? { ci_provider: detected.ciProvider } : {}
|
|
22887
22894
|
};
|
|
22888
22895
|
}
|
|
22896
|
+
var REDACTED = "[REDACTED]";
|
|
22897
|
+
var MAX_VALUE_LENGTH = 200;
|
|
22898
|
+
var SENSITIVE_NAME_TOKENS = new Set([
|
|
22899
|
+
"token",
|
|
22900
|
+
"tokens",
|
|
22901
|
+
"secret",
|
|
22902
|
+
"secrets",
|
|
22903
|
+
"password",
|
|
22904
|
+
"passwords",
|
|
22905
|
+
"pwd",
|
|
22906
|
+
"credential",
|
|
22907
|
+
"credentials",
|
|
22908
|
+
"auth",
|
|
22909
|
+
"authentication",
|
|
22910
|
+
"authorization",
|
|
22911
|
+
"authority",
|
|
22912
|
+
"cert",
|
|
22913
|
+
"certificate",
|
|
22914
|
+
"certificates"
|
|
22915
|
+
]);
|
|
22916
|
+
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
22917
|
+
"api",
|
|
22918
|
+
"access",
|
|
22919
|
+
"client",
|
|
22920
|
+
"private",
|
|
22921
|
+
"public",
|
|
22922
|
+
"signing",
|
|
22923
|
+
"encryption",
|
|
22924
|
+
"session",
|
|
22925
|
+
"master",
|
|
22926
|
+
"shared",
|
|
22927
|
+
"root",
|
|
22928
|
+
"ssh",
|
|
22929
|
+
"rsa",
|
|
22930
|
+
"aes",
|
|
22931
|
+
"hmac",
|
|
22932
|
+
"oauth"
|
|
22933
|
+
]);
|
|
22934
|
+
var UUID_PATTERN = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
|
|
22935
|
+
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
22936
|
+
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
22937
|
+
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
22938
|
+
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
22939
|
+
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
22940
|
+
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
22941
|
+
function shortHash(input) {
|
|
22942
|
+
let hash = 2166136261;
|
|
22943
|
+
for (let i2 = 0;i2 < input.length; i2++) {
|
|
22944
|
+
hash ^= input.charCodeAt(i2);
|
|
22945
|
+
hash = Math.imul(hash, 16777619);
|
|
22946
|
+
}
|
|
22947
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
22948
|
+
}
|
|
22949
|
+
function redactUrl(raw) {
|
|
22950
|
+
try {
|
|
22951
|
+
const url = new URL(raw);
|
|
22952
|
+
return `${url.protocol}//${url.host}`;
|
|
22953
|
+
} catch {
|
|
22954
|
+
return `url#${shortHash(raw)}`;
|
|
22955
|
+
}
|
|
22956
|
+
}
|
|
22957
|
+
function redactValueDetectors(value) {
|
|
22958
|
+
let out = value;
|
|
22959
|
+
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
22960
|
+
out = out.replace(URL_PATTERN, (match) => {
|
|
22961
|
+
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
22962
|
+
const core = trailing ? match.slice(0, -trailing.length) : match;
|
|
22963
|
+
return `${redactUrl(core)}${trailing}`;
|
|
22964
|
+
});
|
|
22965
|
+
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
22966
|
+
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
22967
|
+
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
22968
|
+
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
22969
|
+
if (out.length > MAX_VALUE_LENGTH) {
|
|
22970
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
22971
|
+
}
|
|
22972
|
+
return out;
|
|
22973
|
+
}
|
|
22974
|
+
function redactValue(value) {
|
|
22975
|
+
return redactValueDetectors(value);
|
|
22976
|
+
}
|
|
22977
|
+
function redactError(error) {
|
|
22978
|
+
const safe = new Error(redactValueDetectors(error.message ?? ""));
|
|
22979
|
+
safe.name = error.name;
|
|
22980
|
+
safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
|
|
22981
|
+
return safe;
|
|
22982
|
+
}
|
|
22983
|
+
function nameTokens(name) {
|
|
22984
|
+
return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s._-]+/).map((t) => t.toLowerCase()).filter(Boolean);
|
|
22985
|
+
}
|
|
22986
|
+
function isSensitiveName(name) {
|
|
22987
|
+
const tokens = nameTokens(name);
|
|
22988
|
+
for (let i2 = 0;i2 < tokens.length; i2++) {
|
|
22989
|
+
const token = tokens[i2];
|
|
22990
|
+
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
22991
|
+
return true;
|
|
22992
|
+
}
|
|
22993
|
+
if (token === "key" || token === "keys") {
|
|
22994
|
+
const prev = tokens[i2 - 1];
|
|
22995
|
+
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
22996
|
+
return true;
|
|
22997
|
+
}
|
|
22998
|
+
}
|
|
22999
|
+
}
|
|
23000
|
+
return false;
|
|
23001
|
+
}
|
|
23002
|
+
function redactProperty(name, value) {
|
|
23003
|
+
if (value === undefined || value === null) {
|
|
23004
|
+
return;
|
|
23005
|
+
}
|
|
23006
|
+
if (isSensitiveName(name)) {
|
|
23007
|
+
return REDACTED;
|
|
23008
|
+
}
|
|
23009
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
23010
|
+
return value;
|
|
23011
|
+
}
|
|
23012
|
+
if (typeof value !== "string") {
|
|
23013
|
+
return "[OBJECT]";
|
|
23014
|
+
}
|
|
23015
|
+
return redactValueDetectors(value);
|
|
23016
|
+
}
|
|
23017
|
+
function redactProperties(properties) {
|
|
23018
|
+
const out = {};
|
|
23019
|
+
for (const [name, value] of Object.entries(properties)) {
|
|
23020
|
+
const redacted = redactProperty(name, value);
|
|
23021
|
+
if (redacted !== undefined) {
|
|
23022
|
+
out[name] = redacted;
|
|
23023
|
+
}
|
|
23024
|
+
}
|
|
23025
|
+
return out;
|
|
23026
|
+
}
|
|
23027
|
+
var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
|
|
23028
|
+
var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
|
|
23029
|
+
var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
|
|
22889
23030
|
|
|
22890
23031
|
class TelemetryService {
|
|
22891
23032
|
telemetryProvider;
|
|
@@ -22913,11 +23054,15 @@ class TelemetryService {
|
|
|
22913
23054
|
trackException(error, properties) {
|
|
22914
23055
|
const context = this.getCurrentContext();
|
|
22915
23056
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
22916
|
-
this.telemetryProvider.trackException(error, enrichedProperties);
|
|
23057
|
+
this.telemetryProvider.trackException(redactError(error), enrichedProperties);
|
|
22917
23058
|
}
|
|
22918
23059
|
async trackRequest(name, fn, properties) {
|
|
23060
|
+
const parentContext = this.getCurrentContext();
|
|
23061
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
|
|
23062
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
22919
23063
|
const context = {
|
|
22920
|
-
operationId
|
|
23064
|
+
operationId,
|
|
23065
|
+
...parentId !== undefined ? { parentId } : {},
|
|
22921
23066
|
id: this.generateId()
|
|
22922
23067
|
};
|
|
22923
23068
|
const startTime = performance.now();
|
|
@@ -22935,6 +23080,45 @@ class TelemetryService {
|
|
|
22935
23080
|
throw error;
|
|
22936
23081
|
}
|
|
22937
23082
|
}
|
|
23083
|
+
trackRequestResult(name, durationMs, success, properties, context) {
|
|
23084
|
+
const requestContext = context ?? {
|
|
23085
|
+
operationId: this.operationId ?? getTelemetryOperationId(),
|
|
23086
|
+
id: this.generateId()
|
|
23087
|
+
};
|
|
23088
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
23089
|
+
this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
|
|
23090
|
+
}
|
|
23091
|
+
createRequestContext() {
|
|
23092
|
+
const operationId = this.operationId ?? getTelemetryOperationId();
|
|
23093
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
23094
|
+
return {
|
|
23095
|
+
operationId,
|
|
23096
|
+
...parentId !== undefined ? { parentId } : {},
|
|
23097
|
+
id: this.generateId()
|
|
23098
|
+
};
|
|
23099
|
+
}
|
|
23100
|
+
inboundParentIdFor(operationId) {
|
|
23101
|
+
const inbound = getInboundTraceContext();
|
|
23102
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
23103
|
+
}
|
|
23104
|
+
runWithContext(context, fn) {
|
|
23105
|
+
return this.contextStorage.run(context, fn);
|
|
23106
|
+
}
|
|
23107
|
+
createDependencyContext() {
|
|
23108
|
+
const parentContext = this.getCurrentContext();
|
|
23109
|
+
if (!parentContext) {
|
|
23110
|
+
return;
|
|
23111
|
+
}
|
|
23112
|
+
return {
|
|
23113
|
+
operationId: parentContext.operationId,
|
|
23114
|
+
parentId: parentContext.id,
|
|
23115
|
+
id: this.generateId()
|
|
23116
|
+
};
|
|
23117
|
+
}
|
|
23118
|
+
trackDependencyResult(name, type, durationMs, success, properties, context, resultCode) {
|
|
23119
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
23120
|
+
this.telemetryProvider.trackDependency(redactValue(name), type, durationMs, success, enrichedProperties, resultCode);
|
|
23121
|
+
}
|
|
22938
23122
|
async trackDependencyOperation(name, type, fn, properties) {
|
|
22939
23123
|
const parentContext = this.getCurrentContext();
|
|
22940
23124
|
if (!parentContext) {
|
|
@@ -22971,8 +23155,12 @@ class TelemetryService {
|
|
|
22971
23155
|
...getExecutionContextTelemetryProperties(),
|
|
22972
23156
|
...globalProperties,
|
|
22973
23157
|
...this.defaultProperties,
|
|
22974
|
-
...properties,
|
|
22975
|
-
...context
|
|
23158
|
+
...redactProperties(properties ?? {}),
|
|
23159
|
+
...context ? {
|
|
23160
|
+
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
23161
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
23162
|
+
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
23163
|
+
} : {}
|
|
22976
23164
|
};
|
|
22977
23165
|
if (sessionId === undefined) {
|
|
22978
23166
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
@@ -22982,7 +23170,16 @@ class TelemetryService {
|
|
|
22982
23170
|
return enriched;
|
|
22983
23171
|
}
|
|
22984
23172
|
generateId() {
|
|
22985
|
-
|
|
23173
|
+
const bytes = new Uint8Array(8);
|
|
23174
|
+
let hex = "";
|
|
23175
|
+
do {
|
|
23176
|
+
crypto.getRandomValues(bytes);
|
|
23177
|
+
hex = "";
|
|
23178
|
+
for (const byte of bytes) {
|
|
23179
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
23180
|
+
}
|
|
23181
|
+
} while (/^0+$/.test(hex));
|
|
23182
|
+
return hex;
|
|
22986
23183
|
}
|
|
22987
23184
|
}
|
|
22988
23185
|
var factorySlot = singleton("PackagerFactoryProvider");
|
|
@@ -23000,6 +23197,7 @@ var RulesConfigFileType;
|
|
|
23000
23197
|
class PackagerParameters {
|
|
23001
23198
|
inputPath;
|
|
23002
23199
|
downloadUrl;
|
|
23200
|
+
projectId;
|
|
23003
23201
|
logLevel = LogLevel2.Warn;
|
|
23004
23202
|
outputPath;
|
|
23005
23203
|
targetFramework;
|
|
@@ -23026,6 +23224,11 @@ class ProjectValidateOptions extends ProjectRestoreOptions {
|
|
|
23026
23224
|
class ProjectBuildOptions extends ProjectValidateOptions {
|
|
23027
23225
|
outputType;
|
|
23028
23226
|
}
|
|
23227
|
+
// src/models/project-cleanup-options.ts
|
|
23228
|
+
class ProjectCleanupOptions extends PackagerParameters {
|
|
23229
|
+
dryRun = false;
|
|
23230
|
+
skipImports = false;
|
|
23231
|
+
}
|
|
23029
23232
|
// src/models/project-pack-options.ts
|
|
23030
23233
|
class ProjectPackOptions extends ProjectBuildOptions {
|
|
23031
23234
|
destinationPath;
|
|
@@ -23313,13 +23516,72 @@ var ExtendedFolderDtoFeedTypeEnum = {
|
|
|
23313
23516
|
FolderHierarchy: "FolderHierarchy"
|
|
23314
23517
|
};
|
|
23315
23518
|
|
|
23519
|
+
// ../../common/dist/sdk-user-agent.js
|
|
23520
|
+
var PREFIX2 = "@uipath/common/";
|
|
23521
|
+
var _g2 = globalThis;
|
|
23522
|
+
function singleton2(ctorOrName) {
|
|
23523
|
+
const name = typeof ctorOrName === "string" ? ctorOrName : ctorOrName.name;
|
|
23524
|
+
const key = Symbol.for(PREFIX2 + name);
|
|
23525
|
+
return {
|
|
23526
|
+
get(fallback) {
|
|
23527
|
+
return _g2[key] ?? fallback;
|
|
23528
|
+
},
|
|
23529
|
+
set(value) {
|
|
23530
|
+
_g2[key] = value;
|
|
23531
|
+
},
|
|
23532
|
+
clear() {
|
|
23533
|
+
delete _g2[key];
|
|
23534
|
+
},
|
|
23535
|
+
getOrInit(factory, guard) {
|
|
23536
|
+
const existing = _g2[key];
|
|
23537
|
+
if (existing != null && typeof existing === "object") {
|
|
23538
|
+
if (!guard || guard(existing)) {
|
|
23539
|
+
return existing;
|
|
23540
|
+
}
|
|
23541
|
+
}
|
|
23542
|
+
const instance = factory();
|
|
23543
|
+
_g2[key] = instance;
|
|
23544
|
+
return instance;
|
|
23545
|
+
}
|
|
23546
|
+
};
|
|
23547
|
+
}
|
|
23548
|
+
var telemetryPropsSlot2 = singleton2("TelemetryDefaultProps");
|
|
23549
|
+
var USER_AGENT_HEADER = "User-Agent";
|
|
23550
|
+
var sdkUserAgentHostToken2 = singleton2("SdkUserAgentHostToken");
|
|
23551
|
+
function splitUserAgentTokens(value) {
|
|
23552
|
+
return value?.trim().split(/\s+/).filter(Boolean) ?? [];
|
|
23553
|
+
}
|
|
23554
|
+
function appendUserAgentToken(value, userAgent) {
|
|
23555
|
+
const tokens = splitUserAgentTokens(value);
|
|
23556
|
+
const seen = new Set(tokens);
|
|
23557
|
+
for (const token of splitUserAgentTokens(userAgent)) {
|
|
23558
|
+
if (!seen.has(token)) {
|
|
23559
|
+
tokens.push(token);
|
|
23560
|
+
seen.add(token);
|
|
23561
|
+
}
|
|
23562
|
+
}
|
|
23563
|
+
return tokens.join(" ");
|
|
23564
|
+
}
|
|
23565
|
+
function getEffectiveUserAgent(userAgent) {
|
|
23566
|
+
return appendUserAgentToken(sdkUserAgentHostToken2.get(), userAgent);
|
|
23567
|
+
}
|
|
23568
|
+
function getHeaderName(headers, headerName) {
|
|
23569
|
+
return Object.keys(headers).find((key) => key.toLowerCase() === headerName.toLowerCase());
|
|
23570
|
+
}
|
|
23571
|
+
function addSdkUserAgentHeader(headers, userAgent) {
|
|
23572
|
+
const result = { ...headers ?? {} };
|
|
23573
|
+
const headerName = getHeaderName(result, USER_AGENT_HEADER);
|
|
23574
|
+
result[headerName ?? USER_AGENT_HEADER] = appendUserAgentToken(headerName ? result[headerName] : undefined, getEffectiveUserAgent(userAgent));
|
|
23575
|
+
return result;
|
|
23576
|
+
}
|
|
23577
|
+
|
|
23316
23578
|
// src/publish/services/orchestrator-feeds-service.ts
|
|
23317
23579
|
import { translate as translate3 } from "@uipath/solutionpackager-tool-core";
|
|
23318
23580
|
// package.json
|
|
23319
23581
|
var package_default = {
|
|
23320
23582
|
name: "@uipath/project-packager",
|
|
23321
23583
|
license: "MIT",
|
|
23322
|
-
version: "1.
|
|
23584
|
+
version: "1.198.0-preview.100",
|
|
23323
23585
|
description: "UiPath Project Packager - core library for packing individual UiPath projects",
|
|
23324
23586
|
type: "module",
|
|
23325
23587
|
main: "./dist/index.js",
|
|
@@ -24008,6 +24270,7 @@ import {
|
|
|
24008
24270
|
class ProjectLoader {
|
|
24009
24271
|
fileSystem;
|
|
24010
24272
|
static WebAppManifestFileName = "webAppManifest.json";
|
|
24273
|
+
static ProjectJsonFileName = "project.json";
|
|
24011
24274
|
constructor(fileSystem) {
|
|
24012
24275
|
this.fileSystem = fileSystem;
|
|
24013
24276
|
}
|
|
@@ -24020,6 +24283,10 @@ class ProjectLoader {
|
|
|
24020
24283
|
if (projectFileExists) {
|
|
24021
24284
|
return await this.loadFromProjectFile(projectPath, projectFilePath);
|
|
24022
24285
|
}
|
|
24286
|
+
const projectJsonPath = Path2.join(projectPath, ProjectLoader.ProjectJsonFileName);
|
|
24287
|
+
if (await this.fileSystem.exists(projectJsonPath)) {
|
|
24288
|
+
return await this.loadFromProjectFile(projectPath, projectJsonPath, true);
|
|
24289
|
+
}
|
|
24023
24290
|
const webAppManifestPath = Path2.join(projectPath, ProjectLoader.WebAppManifestFileName);
|
|
24024
24291
|
const webAppManifestExists = await this.fileSystem.exists(webAppManifestPath);
|
|
24025
24292
|
if (webAppManifestExists) {
|
|
@@ -24027,11 +24294,12 @@ class ProjectLoader {
|
|
|
24027
24294
|
}
|
|
24028
24295
|
throw new Error(translate8.t("solutionpackager.projectLoader.errors.noProjectFile", {
|
|
24029
24296
|
projectFile: ProjectTool.ProjectFileName,
|
|
24297
|
+
projectJsonFile: ProjectLoader.ProjectJsonFileName,
|
|
24030
24298
|
manifestFile: ProjectLoader.WebAppManifestFileName,
|
|
24031
24299
|
path: projectPath
|
|
24032
24300
|
}));
|
|
24033
24301
|
}
|
|
24034
|
-
async loadFromProjectFile(projectPath, projectFilePath) {
|
|
24302
|
+
async loadFromProjectFile(projectPath, projectFilePath, useProjectJson = false) {
|
|
24035
24303
|
const fileContent = await this.fileSystem.readFile(projectFilePath);
|
|
24036
24304
|
if (!fileContent) {
|
|
24037
24305
|
throw new Error(translate8.t("solutionpackager.projectLoader.errors.readFailed", {
|
|
@@ -24040,7 +24308,8 @@ class ProjectLoader {
|
|
|
24040
24308
|
}
|
|
24041
24309
|
const json = typeof fileContent === "string" ? fileContent : new TextDecoder("utf-8").decode(fileContent);
|
|
24042
24310
|
const projectData = JSON.parse(json);
|
|
24043
|
-
const
|
|
24311
|
+
const outputType = useProjectJson ? projectData.designOptions?.outputType : undefined;
|
|
24312
|
+
const projectType = outputType ?? (projectData?.ProjectType || projectData?.type);
|
|
24044
24313
|
if (!projectData || !projectType) {
|
|
24045
24314
|
throw new Error(translate8.t("solutionpackager.projectLoader.errors.invalidProject", {
|
|
24046
24315
|
path: projectFilePath
|
|
@@ -24083,10 +24352,12 @@ var TelemetryNames;
|
|
|
24083
24352
|
TelemetryNames2["ProjectToolRestore"] = "ProjectPackager.Tool.Restore";
|
|
24084
24353
|
TelemetryNames2["ProjectToolValidate"] = "ProjectPackager.Tool.Validate";
|
|
24085
24354
|
TelemetryNames2["ProjectToolBuild"] = "ProjectPackager.Tool.Build";
|
|
24355
|
+
TelemetryNames2["ProjectToolCleanup"] = "ProjectPackager.Tool.Cleanup";
|
|
24086
24356
|
TelemetryNames2["ProjectPackagerPack"] = "ProjectPackager.Pack";
|
|
24087
24357
|
TelemetryNames2["ProjectPackagerRestore"] = "ProjectPackager.Restore";
|
|
24088
24358
|
TelemetryNames2["ProjectPackagerValidate"] = "ProjectPackager.Validate";
|
|
24089
24359
|
TelemetryNames2["ProjectPackagerBuild"] = "ProjectPackager.Build";
|
|
24360
|
+
TelemetryNames2["ProjectPackagerCleanup"] = "ProjectPackager.Cleanup";
|
|
24090
24361
|
TelemetryNames2["ProjectPackagerProjectLoaded"] = "ProjectPackager.ProjectLoaded";
|
|
24091
24362
|
})(TelemetryNames ||= {});
|
|
24092
24363
|
|
|
@@ -24176,6 +24447,12 @@ class ProjectToolExecutor {
|
|
|
24176
24447
|
projectType: project.Type
|
|
24177
24448
|
}));
|
|
24178
24449
|
}
|
|
24450
|
+
async cleanupAsync(options, project, context, cancellationToken) {
|
|
24451
|
+
return await this.executeToolOperationAsync(project, context, (tool) => this.telemetry.trackDependencyOperation("ProjectPackager.Tool.Cleanup" /* ProjectToolCleanup */, project.Type, async () => tool.cleanupAsync(options, cancellationToken), {
|
|
24452
|
+
projectId: project.Id,
|
|
24453
|
+
projectType: project.Type
|
|
24454
|
+
}));
|
|
24455
|
+
}
|
|
24179
24456
|
async executeToolOperationAsync(project, context, operation) {
|
|
24180
24457
|
try {
|
|
24181
24458
|
const tool = await this.toolsFactory.createProjectToolAsync(project, context);
|
|
@@ -24295,7 +24572,8 @@ class ProjectPackager {
|
|
|
24295
24572
|
logLevel: options.logLevel,
|
|
24296
24573
|
outputPath: options.outputPath
|
|
24297
24574
|
};
|
|
24298
|
-
|
|
24575
|
+
const context = this.createOperationContext(options, uiPathProject);
|
|
24576
|
+
return await this.projectExecutor.restoreAsync(restoreOptions, uiPathProject, context, cancellationToken);
|
|
24299
24577
|
}, cancellationToken);
|
|
24300
24578
|
}
|
|
24301
24579
|
async validateProjectAsync(options, cancellationToken) {
|
|
@@ -24393,6 +24671,20 @@ class ProjectPackager {
|
|
|
24393
24671
|
}
|
|
24394
24672
|
});
|
|
24395
24673
|
}
|
|
24674
|
+
async cleanupProjectAsync(options, cancellationToken) {
|
|
24675
|
+
return await this.executeProjectOperationAsync(options, "Cleanup", "ProjectPackager.Cleanup" /* ProjectPackagerCleanup */, async (uiPathProject, loadedProject) => {
|
|
24676
|
+
const cleanupOptions = {
|
|
24677
|
+
projectPath: loadedProject.projectPath,
|
|
24678
|
+
excludeConfiguredSources: options.excludeConfiguredSources ?? false,
|
|
24679
|
+
nuGetSourcesConfigPath: options.nuGetSourcesConfigPath,
|
|
24680
|
+
logLevel: options.logLevel,
|
|
24681
|
+
dryRun: options.dryRun ?? false,
|
|
24682
|
+
skipImports: options.skipImports ?? false
|
|
24683
|
+
};
|
|
24684
|
+
const context = this.createOperationContext(options, uiPathProject);
|
|
24685
|
+
return await this.projectExecutor.cleanupAsync(cleanupOptions, uiPathProject, context, cancellationToken);
|
|
24686
|
+
}, cancellationToken);
|
|
24687
|
+
}
|
|
24396
24688
|
async getPackageStreamsAsync(result) {
|
|
24397
24689
|
if (!result.isSuccess) {
|
|
24398
24690
|
throw new Error(translate9.t("solutionpackager.packager.errors.failedToGetStreams", {
|
|
@@ -24447,6 +24739,7 @@ class ProjectPackager {
|
|
|
24447
24739
|
id: crypto.randomUUID(),
|
|
24448
24740
|
projects: [uiPathProject],
|
|
24449
24741
|
downloadUrl: options.downloadUrl,
|
|
24742
|
+
projectId: options.projectId,
|
|
24450
24743
|
targetFramework: options.targetFramework ?? TargetFramework.Portable,
|
|
24451
24744
|
connection: options.connection,
|
|
24452
24745
|
logger: this.logger,
|
|
@@ -24506,6 +24799,7 @@ export {
|
|
|
24506
24799
|
ProjectPackager,
|
|
24507
24800
|
ProjectPackOptions,
|
|
24508
24801
|
ProjectLoader,
|
|
24802
|
+
ProjectCleanupOptions,
|
|
24509
24803
|
ProjectBuildOptionsValidator,
|
|
24510
24804
|
ProjectBuildOptions,
|
|
24511
24805
|
PackagerParametersValidator,
|
|
@@ -24516,4 +24810,4 @@ export {
|
|
|
24516
24810
|
BrowserContextStorage
|
|
24517
24811
|
};
|
|
24518
24812
|
|
|
24519
|
-
//# debugId=
|
|
24813
|
+
//# debugId=2B503C1E781E436B64756E2164756E21
|