@uipath/orchestrator-tool 1.207.0 → 1.208.0-preview.410

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.
@@ -1,298 +0,0 @@
1
- // ../common/src/telemetry/telemetry-dimensions.ts
2
- var BaseDimensions = {
3
- ApplicationName: "ApplicationName",
4
- ProductVersion: "ProductVersion",
5
- InstallationId: "InstallationId",
6
- CloudUserId: "CloudUserId",
7
- CloudTenantId: "CloudTenantId",
8
- CloudOrganizationId: "CloudOrganizationId",
9
- IsInternalUser: "IsInternalUser",
10
- Environment: "Environment",
11
- BaseUrl: "BaseUrl",
12
- Region: "Region",
13
- Agent: "Agent",
14
- AgentVersion: "AgentVersion",
15
- AgentModel: "AgentModel",
16
- ToolName: "ToolName",
17
- ToolVersion: "ToolVersion",
18
- ExecutionContext: "ExecutionContext",
19
- CiProvider: "CiProvider",
20
- SessionIdSource: "SessionIdSource",
21
- SessionId: "SessionId",
22
- HostApp: "HostApp",
23
- HostAppSource: "HostAppSource"
24
- };
25
- var CommandDimensions = {
26
- IsCommand: "IsCommand",
27
- IsReexec: "IsReexec",
28
- CommandName: "CommandName",
29
- ExitCode: "ExitCode",
30
- TerminalOutcome: "TerminalOutcome",
31
- ErrorClass: "ErrorClass",
32
- TerminalSignal: "TerminalSignal",
33
- ErrorMessage: "ErrorMessage",
34
- SkillName: "SkillName",
35
- ProductArea: "ProductArea",
36
- Mode: "Mode"
37
- };
38
- var ProjectDimensions = {
39
- ProjectKey: "ProjectKey",
40
- ProjectType: "ProjectType",
41
- ProjectIdentityStatus: "ProjectIdentityStatus",
42
- SolutionKey: "SolutionKey",
43
- SolutionProjectKey: "SolutionProjectKey",
44
- SolutionIdentityStatus: "SolutionIdentityStatus",
45
- PreviousSolutionKey: "PreviousSolutionKey",
46
- PreviousProjectKey: "PreviousProjectKey"
47
- };
48
- var GUID_KEY_DIMENSIONS = new Set([
49
- ProjectDimensions.ProjectKey,
50
- ProjectDimensions.SolutionKey,
51
- ProjectDimensions.SolutionProjectKey,
52
- ProjectDimensions.PreviousSolutionKey,
53
- ProjectDimensions.PreviousProjectKey
54
- ]);
55
- var ShipDimensions = {
56
- ShipKind: "ShipKind",
57
- Target: "Target",
58
- ProjectType: "ProjectType",
59
- ProjectTypes: "ProjectTypes",
60
- ArtifactCorrelationKey: "ArtifactCorrelationKey",
61
- PackageName: "PackageName",
62
- PackageVersion: "PackageVersion",
63
- PackageVersionKey: "PackageVersionKey",
64
- DeploymentKey: "DeploymentKey",
65
- SolutionId: "SolutionId",
66
- FolderKey: "FolderKey",
67
- FeedId: "FeedId"
68
- };
69
- var ErrorDimensions = {
70
- Result: "Result",
71
- ErrorCode: "ErrorCode",
72
- Retry: "Retry",
73
- ErrorMessage: "ErrorMessage",
74
- HttpStatus: "HttpStatus",
75
- UpstreamErrorCode: "UpstreamErrorCode"
76
- };
77
- var AuthDimensions = {
78
- AuthenticationMethod: "AuthenticationMethod",
79
- Success: "Success",
80
- Reason: "Reason"
81
- };
82
- var SkillsDimensions = {
83
- SchemaVersion: "SchemaVersion",
84
- AgentType: "AgentType",
85
- SkillsVersion: "SkillsVersion",
86
- UipSubcommand: "UipSubcommand",
87
- FileExtension: "FileExtension",
88
- SubagentModel: "SubagentModel",
89
- SubagentType: "SubagentType",
90
- PermissionMode: "PermissionMode",
91
- EffortLevel: "EffortLevel",
92
- SessionSource: "SessionSource",
93
- Outcome: "Outcome",
94
- DurationMs: "DurationMs",
95
- Source: "Source"
96
- };
97
- var PackagerDimensions = {
98
- ProjectId: "ProjectId",
99
- ProjectType: "ProjectType",
100
- SolutionId: "SolutionId"
101
- };
102
- var ScopeDimensions = {
103
- FolderId: "FolderId"
104
- };
105
- var ID_DIMENSIONS = new Set([
106
- BaseDimensions.CloudUserId,
107
- BaseDimensions.CloudTenantId,
108
- BaseDimensions.CloudOrganizationId,
109
- BaseDimensions.InstallationId,
110
- ShipDimensions.ArtifactCorrelationKey,
111
- ShipDimensions.PackageVersionKey,
112
- ShipDimensions.DeploymentKey,
113
- ShipDimensions.SolutionId,
114
- ShipDimensions.FolderKey,
115
- ShipDimensions.FeedId,
116
- PackagerDimensions.ProjectId
117
- ]);
118
- var NON_IDENTIFIER_PLACEHOLDER_PATTERN = /^(?:\[[A-Z_]+\]|<[^>]+>)$/;
119
- var RESERVED_DIMENSION_NAMES = new Set([
120
- ...Object.values(BaseDimensions),
121
- ...Object.values(CommandDimensions),
122
- ...Object.values(ShipDimensions),
123
- ...Object.values(ProjectDimensions),
124
- ...Object.values(ErrorDimensions),
125
- ...Object.values(AuthDimensions),
126
- ...Object.values(SkillsDimensions),
127
- ...Object.values(PackagerDimensions),
128
- ...Object.values(ScopeDimensions)
129
- ]);
130
- var CURATED_DIMENSIONS = new Set([
131
- BaseDimensions.ApplicationName,
132
- BaseDimensions.ProductVersion,
133
- BaseDimensions.InstallationId,
134
- BaseDimensions.CloudUserId,
135
- BaseDimensions.CloudTenantId,
136
- BaseDimensions.CloudOrganizationId,
137
- BaseDimensions.IsInternalUser,
138
- BaseDimensions.Environment,
139
- BaseDimensions.BaseUrl,
140
- BaseDimensions.Region,
141
- BaseDimensions.Agent,
142
- BaseDimensions.AgentVersion,
143
- BaseDimensions.ToolVersion,
144
- BaseDimensions.ExecutionContext,
145
- BaseDimensions.CiProvider,
146
- BaseDimensions.SessionIdSource,
147
- BaseDimensions.SessionId,
148
- BaseDimensions.HostApp,
149
- BaseDimensions.HostAppSource,
150
- ...Object.values(CommandDimensions),
151
- ...Object.values(ShipDimensions),
152
- ...Object.values(ProjectDimensions)
153
- ]);
154
- function lowercaseIdDimensionValues(properties) {
155
- let changed = false;
156
- const result = {
157
- ...properties
158
- };
159
- for (const key of Object.keys(result)) {
160
- const value = result[key];
161
- if (!ID_DIMENSIONS.has(key) || typeof value !== "string" || NON_IDENTIFIER_PLACEHOLDER_PATTERN.test(value)) {
162
- continue;
163
- }
164
- const lowered = value.toLowerCase();
165
- if (lowered !== value) {
166
- result[key] = lowered;
167
- changed = true;
168
- }
169
- }
170
- return changed ? result : properties;
171
- }
172
-
173
- // ../common/src/singleton.ts
174
- var PREFIX = "@uipath/common/";
175
- var _g = globalThis;
176
- function singleton(name) {
177
- if (typeof name !== "string") {
178
- throw new TypeError("singleton() takes a string name. A class name is not stable across bundles.");
179
- }
180
- const key = Symbol.for(PREFIX + name);
181
- return {
182
- get(fallback) {
183
- return _g[key] ?? fallback;
184
- },
185
- set(value) {
186
- _g[key] = value;
187
- },
188
- clear() {
189
- delete _g[key];
190
- },
191
- getOrInit(factory, guard) {
192
- const existing = _g[key];
193
- if (existing != null && typeof existing === "object") {
194
- if (!guard || guard(existing)) {
195
- return existing;
196
- }
197
- }
198
- const instance = factory();
199
- _g[key] = instance;
200
- return instance;
201
- }
202
- };
203
- }
204
-
205
- // ../common/src/telemetry/telemetry-config.ts
206
- function isTelemetryDisabled() {
207
- const value = process.env.UIPATH_TELEMETRY_DISABLED;
208
- return value === "1" || value === "true";
209
- }
210
- function isProjectTelemetryDisabled() {
211
- return isTelemetryDisabled() || process.env.UIPATH_PROJECT_TELEMETRY_DISABLED === "1" || process.env.UIPATH_PROJECT_TELEMETRY_DISABLED === "true";
212
- }
213
-
214
- // ../common/src/telemetry/global-telemetry-properties.ts
215
- var telemetryPropsSlot = singleton("TelemetryDefaultProps");
216
- function getGlobalTelemetryProperties() {
217
- return telemetryPropsSlot.get();
218
- }
219
-
220
- // ../common/src/sdk-user-agent.ts
221
- var USER_AGENT_HEADER = "User-Agent";
222
- var AGENT_PROPERTY = BaseDimensions.Agent;
223
- var sdkUserAgentHostToken = singleton("SdkUserAgentHostToken");
224
- function userAgentPatchKey(userAgent) {
225
- return Symbol.for(`@uipath/common/sdk-user-agent/${userAgent}`);
226
- }
227
- function splitUserAgentTokens(value) {
228
- return value?.trim().split(/\s+/).filter(Boolean) ?? [];
229
- }
230
- function appendUserAgentToken(value, userAgent) {
231
- const tokens = splitUserAgentTokens(value);
232
- const seen = new Set(tokens);
233
- for (const token of splitUserAgentTokens(userAgent)) {
234
- if (!seen.has(token)) {
235
- tokens.push(token);
236
- seen.add(token);
237
- }
238
- }
239
- return tokens.join(" ");
240
- }
241
- function getEffectiveUserAgent(userAgent) {
242
- return appendUserAgentToken(sdkUserAgentHostToken.get(), userAgent);
243
- }
244
- function getHeaderName(headers, headerName) {
245
- return Object.keys(headers).find((key) => key.toLowerCase() === headerName.toLowerCase());
246
- }
247
- function getSdkUserAgentToken(pkg) {
248
- const packageName = pkg.name.replace(/^@uipath\//, "");
249
- return getEffectiveUserAgent(`${packageName}/${pkg.version}`);
250
- }
251
- function addSdkUserAgentHeader(headers, userAgent) {
252
- const result = { ...headers ?? {} };
253
- const headerName = getHeaderName(result, USER_AGENT_HEADER);
254
- result[headerName ?? USER_AGENT_HEADER] = appendUserAgentToken(headerName ? result[headerName] : undefined, getEffectiveUserAgent(userAgent));
255
- return result;
256
- }
257
- function asHeaderRecord(headers) {
258
- return typeof headers === "object" && headers !== null ? { ...headers } : {};
259
- }
260
- function withForwardedHeadersInitOverride(initOverrides, forward) {
261
- return async (requestContext) => {
262
- const initWithHeaders = {
263
- ...requestContext.init,
264
- headers: forward(asHeaderRecord(requestContext.init.headers))
265
- };
266
- const override = typeof initOverrides === "function" ? await initOverrides({
267
- ...requestContext,
268
- init: initWithHeaders
269
- }) : initOverrides;
270
- return {
271
- ...override ?? {},
272
- headers: forward(asHeaderRecord(override?.headers ?? initWithHeaders.headers))
273
- };
274
- };
275
- }
276
- function installRequestHeaderForwarding(BaseApiClass, patchKey, forward) {
277
- const prototype = BaseApiClass.prototype;
278
- if (prototype[patchKey]) {
279
- return;
280
- }
281
- if (typeof prototype.request !== "function") {
282
- throw new Error("Generated BaseAPI request function not found.");
283
- }
284
- const originalRequest = prototype.request;
285
- prototype.request = function requestWithForwardedHeaders(context, initOverrides) {
286
- return originalRequest.call(this, context, withForwardedHeadersInitOverride(initOverrides, forward));
287
- };
288
- Object.defineProperty(prototype, patchKey, {
289
- value: true
290
- });
291
- }
292
- function installSdkUserAgentHeader(BaseApiClass, userAgent) {
293
- installRequestHeaderForwarding(BaseApiClass, userAgentPatchKey(userAgent), (headers) => addSdkUserAgentHeader(headers, userAgent));
294
- }
295
-
296
- export { BaseDimensions, CommandDimensions, ProjectDimensions, GUID_KEY_DIMENSIONS, ShipDimensions, ErrorDimensions, SkillsDimensions, lowercaseIdDimensionValues, singleton, getGlobalTelemetryProperties, isProjectTelemetryDisabled, getSdkUserAgentToken, addSdkUserAgentHeader, installSdkUserAgentHeader };
297
-
298
- //# debugId=45FF227D99C3BF7264756E2164756E21