@uipath/authz-commands 1.207.0-preview.381 → 1.207.0-preview.383
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/index.js +70 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3975,7 +3975,9 @@ var BaseDimensions = {
|
|
|
3975
3975
|
ExecutionContext: "ExecutionContext",
|
|
3976
3976
|
CiProvider: "CiProvider",
|
|
3977
3977
|
SessionIdSource: "SessionIdSource",
|
|
3978
|
-
SessionId: "SessionId"
|
|
3978
|
+
SessionId: "SessionId",
|
|
3979
|
+
HostApp: "HostApp",
|
|
3980
|
+
HostAppSource: "HostAppSource"
|
|
3979
3981
|
};
|
|
3980
3982
|
var CommandDimensions = {
|
|
3981
3983
|
IsCommand: "IsCommand",
|
|
@@ -4100,6 +4102,8 @@ var CURATED_DIMENSIONS = new Set([
|
|
|
4100
4102
|
BaseDimensions.CiProvider,
|
|
4101
4103
|
BaseDimensions.SessionIdSource,
|
|
4102
4104
|
BaseDimensions.SessionId,
|
|
4105
|
+
BaseDimensions.HostApp,
|
|
4106
|
+
BaseDimensions.HostAppSource,
|
|
4103
4107
|
...Object.values(CommandDimensions),
|
|
4104
4108
|
...Object.values(ShipDimensions),
|
|
4105
4109
|
...Object.values(ProjectDimensions)
|
|
@@ -7180,6 +7184,69 @@ class NodeContextStorage {
|
|
|
7180
7184
|
return this.storage.getStore();
|
|
7181
7185
|
}
|
|
7182
7186
|
}
|
|
7187
|
+
// ../../common/src/telemetry/host-app.ts
|
|
7188
|
+
var TELEMETRY_HOST_APP_ENV = "UIPATH_HOST_APP";
|
|
7189
|
+
var DECLARABLE_HOST_APPS = [
|
|
7190
|
+
"studio-desktop",
|
|
7191
|
+
"vscode",
|
|
7192
|
+
"cursor",
|
|
7193
|
+
"windsurf",
|
|
7194
|
+
"kiro",
|
|
7195
|
+
"antigravity",
|
|
7196
|
+
"jetbrains",
|
|
7197
|
+
"terminal"
|
|
7198
|
+
];
|
|
7199
|
+
var isSet = (value) => value !== undefined && value.trim() !== "";
|
|
7200
|
+
function declaredHostApp(env) {
|
|
7201
|
+
const raw = env[TELEMETRY_HOST_APP_ENV]?.trim().toLowerCase();
|
|
7202
|
+
if (!raw)
|
|
7203
|
+
return;
|
|
7204
|
+
return DECLARABLE_HOST_APPS.includes(raw) ? raw : "other";
|
|
7205
|
+
}
|
|
7206
|
+
function inferredHostApp(env) {
|
|
7207
|
+
if (isSet(env.UIPATH_STUDIO_PID))
|
|
7208
|
+
return "studio-desktop";
|
|
7209
|
+
if (env.TERMINAL_EMULATOR === "JetBrains-JediTerm")
|
|
7210
|
+
return "jetbrains";
|
|
7211
|
+
if (env.TERM_PROGRAM?.toLowerCase() === "vscode" || env.CLAUDE_CODE_ENTRYPOINT === "claude-vscode") {
|
|
7212
|
+
return "vscode";
|
|
7213
|
+
}
|
|
7214
|
+
if (isSet(env.TERM_PROGRAM) || isSet(env.WT_SESSION))
|
|
7215
|
+
return "terminal";
|
|
7216
|
+
return;
|
|
7217
|
+
}
|
|
7218
|
+
function detectHostAppFromEnv(env) {
|
|
7219
|
+
const declared = declaredHostApp(env);
|
|
7220
|
+
if (declared)
|
|
7221
|
+
return { hostApp: declared, source: "declared" };
|
|
7222
|
+
const inferred = inferredHostApp(env);
|
|
7223
|
+
if (inferred)
|
|
7224
|
+
return { hostApp: inferred, source: "inferred" };
|
|
7225
|
+
return { hostApp: "unknown", source: "none" };
|
|
7226
|
+
}
|
|
7227
|
+
var hostAppSlot = singleton("TelemetryHostApp");
|
|
7228
|
+
function getTelemetryHostApp() {
|
|
7229
|
+
const proc = globalThis.process;
|
|
7230
|
+
if (!proc?.env || proc.platform === "browser")
|
|
7231
|
+
return;
|
|
7232
|
+
const env = proc.env;
|
|
7233
|
+
const existing = hostAppSlot.get();
|
|
7234
|
+
if (existing)
|
|
7235
|
+
return existing;
|
|
7236
|
+
const detected = detectHostAppFromEnv(env);
|
|
7237
|
+
hostAppSlot.set(detected);
|
|
7238
|
+
return detected;
|
|
7239
|
+
}
|
|
7240
|
+
function getHostAppTelemetryProperties() {
|
|
7241
|
+
const detected = getTelemetryHostApp();
|
|
7242
|
+
if (!detected)
|
|
7243
|
+
return {};
|
|
7244
|
+
return {
|
|
7245
|
+
[BaseDimensions.HostApp]: detected.hostApp,
|
|
7246
|
+
[BaseDimensions.HostAppSource]: detected.source
|
|
7247
|
+
};
|
|
7248
|
+
}
|
|
7249
|
+
|
|
7183
7250
|
// ../../common/src/telemetry/span-clock.ts
|
|
7184
7251
|
function startSpanClock() {
|
|
7185
7252
|
const started = performance.now();
|
|
@@ -7354,6 +7421,7 @@ class TelemetryService {
|
|
|
7354
7421
|
...this.defaultProperties,
|
|
7355
7422
|
...redactProperties(properties ?? {}),
|
|
7356
7423
|
[TELEMETRY_SESSION_SOURCE_PROPERTY]: getTelemetrySessionSource(),
|
|
7424
|
+
...getHostAppTelemetryProperties(),
|
|
7357
7425
|
[BaseDimensions.SessionId]: this.telemetryProvider.getSessionId?.() ?? getTelemetrySessionId()
|
|
7358
7426
|
};
|
|
7359
7427
|
return lowercaseIdDimensionValues(enriched);
|
|
@@ -12241,4 +12309,4 @@ export {
|
|
|
12241
12309
|
registerCommands
|
|
12242
12310
|
};
|
|
12243
12311
|
|
|
12244
|
-
//# debugId=
|
|
12312
|
+
//# debugId=20260C55CB94BB6F64756E2164756E21
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uipath/authz-commands",
|
|
3
3
|
"author": "UiPath",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
|
-
"version": "1.207.0-preview.
|
|
5
|
+
"version": "1.207.0-preview.383",
|
|
6
6
|
"description": "Admin CLI commands for the UiPath Authorization service. Library composed by admin-tool, not a standalone CLI tool.",
|
|
7
7
|
"private": false,
|
|
8
8
|
"repository": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "85d84703860a43424852e068d6d3f867832f6d30"
|
|
30
30
|
}
|