@uipath/platform-tool 1.205.0-preview.277 → 1.206.0-preview.279
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/README.md +46 -0
- package/dist/{index-sby22td6.js → index-nzr4mx5p.js} +2 -22
- package/dist/index.js +6 -7
- package/dist/{jmespath-231m3hyn.js → jmespath-ab6tdc42.js} +1 -1
- package/dist/{js-yaml-88tdqrtd.js → js-yaml-a2bk27p6.js} +1 -3
- package/dist/{tool-1de529jm.js → tool-epsr41wx.js} +12 -3
- package/dist/{tool-yn5h8ekg.js → tool-hcyjrc82.js} +1464 -854
- package/dist/tool.js +6 -7
- package/package.json +2 -2
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
+
__toESM,
|
|
2
3
|
__commonJS,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from "./tool-
|
|
4
|
+
__exportCjs,
|
|
5
|
+
__require
|
|
6
|
+
} from "./tool-epsr41wx.js";
|
|
6
7
|
|
|
7
8
|
// ../../node_modules/commander/lib/error.js
|
|
8
9
|
var require_error = __commonJS(function(exports) {
|
|
@@ -124,7 +125,7 @@ var require_help = __commonJS(function(exports) {
|
|
|
124
125
|
this.helpWidth = this.helpWidth ?? contextOptions.helpWidth ?? 80;
|
|
125
126
|
}
|
|
126
127
|
visibleCommands(cmd) {
|
|
127
|
-
const visibleCommands = cmd.commands.filter((
|
|
128
|
+
const visibleCommands = cmd.commands.filter((cmd) => !cmd._hidden);
|
|
128
129
|
const helpCommand = cmd._getHelpCommand();
|
|
129
130
|
if (helpCommand && !helpCommand._hidden) {
|
|
130
131
|
visibleCommands.push(helpCommand);
|
|
@@ -604,8 +605,8 @@ var require_option = __commonJS(function(exports) {
|
|
|
604
605
|
}
|
|
605
606
|
}
|
|
606
607
|
function camelcase(str) {
|
|
607
|
-
return str.split("-").reduce((
|
|
608
|
-
return
|
|
608
|
+
return str.split("-").reduce((str, word) => {
|
|
609
|
+
return str + word[0].toUpperCase() + word.slice(1);
|
|
609
610
|
});
|
|
610
611
|
}
|
|
611
612
|
function splitOptionFlags(flags) {
|
|
@@ -726,8 +727,8 @@ var require_suggestSimilar = __commonJS(function(exports) {
|
|
|
726
727
|
var require_command = __commonJS(function(exports) {
|
|
727
728
|
var EventEmitter = __require("node:events").EventEmitter;
|
|
728
729
|
var childProcess = __require("node:child_process");
|
|
729
|
-
var
|
|
730
|
-
var
|
|
730
|
+
var path = __require("node:path");
|
|
731
|
+
var fs = __require("node:fs");
|
|
731
732
|
var process2 = __require("node:process");
|
|
732
733
|
var { Argument, humanReadableArgName } = require_argument();
|
|
733
734
|
var { CommanderError } = require_error();
|
|
@@ -1176,44 +1177,44 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1176
1177
|
});
|
|
1177
1178
|
return source;
|
|
1178
1179
|
}
|
|
1179
|
-
_prepareUserArgs(
|
|
1180
|
-
if (
|
|
1180
|
+
_prepareUserArgs(argv2, parseOptions) {
|
|
1181
|
+
if (argv2 !== undefined && !Array.isArray(argv2)) {
|
|
1181
1182
|
throw new Error("first parameter to parse must be array or undefined");
|
|
1182
1183
|
}
|
|
1183
1184
|
parseOptions = parseOptions || {};
|
|
1184
|
-
if (
|
|
1185
|
+
if (argv2 === undefined && parseOptions.from === undefined) {
|
|
1185
1186
|
if (process2.versions?.electron) {
|
|
1186
1187
|
parseOptions.from = "electron";
|
|
1187
1188
|
}
|
|
1188
|
-
const
|
|
1189
|
-
if (
|
|
1189
|
+
const execArgv2 = process2.execArgv ?? [];
|
|
1190
|
+
if (execArgv2.includes("-e") || execArgv2.includes("--eval") || execArgv2.includes("-p") || execArgv2.includes("--print")) {
|
|
1190
1191
|
parseOptions.from = "eval";
|
|
1191
1192
|
}
|
|
1192
1193
|
}
|
|
1193
|
-
if (
|
|
1194
|
-
|
|
1194
|
+
if (argv2 === undefined) {
|
|
1195
|
+
argv2 = process2.argv;
|
|
1195
1196
|
}
|
|
1196
|
-
this.rawArgs =
|
|
1197
|
+
this.rawArgs = argv2.slice();
|
|
1197
1198
|
let userArgs;
|
|
1198
1199
|
switch (parseOptions.from) {
|
|
1199
1200
|
case undefined:
|
|
1200
1201
|
case "node":
|
|
1201
|
-
this._scriptPath =
|
|
1202
|
-
userArgs =
|
|
1202
|
+
this._scriptPath = argv2[1];
|
|
1203
|
+
userArgs = argv2.slice(2);
|
|
1203
1204
|
break;
|
|
1204
1205
|
case "electron":
|
|
1205
1206
|
if (process2.defaultApp) {
|
|
1206
|
-
this._scriptPath =
|
|
1207
|
-
userArgs =
|
|
1207
|
+
this._scriptPath = argv2[1];
|
|
1208
|
+
userArgs = argv2.slice(2);
|
|
1208
1209
|
} else {
|
|
1209
|
-
userArgs =
|
|
1210
|
+
userArgs = argv2.slice(1);
|
|
1210
1211
|
}
|
|
1211
1212
|
break;
|
|
1212
1213
|
case "user":
|
|
1213
|
-
userArgs =
|
|
1214
|
+
userArgs = argv2.slice(0);
|
|
1214
1215
|
break;
|
|
1215
1216
|
case "eval":
|
|
1216
|
-
userArgs =
|
|
1217
|
+
userArgs = argv2.slice(1);
|
|
1217
1218
|
break;
|
|
1218
1219
|
default:
|
|
1219
1220
|
throw new Error(`unexpected parse option { from: '${parseOptions.from}' }`);
|
|
@@ -1262,7 +1263,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1262
1263
|
this.processedArgs = [];
|
|
1263
1264
|
}
|
|
1264
1265
|
_checkForMissingExecutable(executableFile, executableDir, subcommandName) {
|
|
1265
|
-
if (
|
|
1266
|
+
if (fs.existsSync(executableFile))
|
|
1266
1267
|
return;
|
|
1267
1268
|
const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory";
|
|
1268
1269
|
const executableMissing = `'${executableFile}' does not exist
|
|
@@ -1276,12 +1277,12 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1276
1277
|
let launchWithNode = false;
|
|
1277
1278
|
const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
1278
1279
|
function findFile(baseDir, baseName) {
|
|
1279
|
-
const localBin =
|
|
1280
|
-
if (
|
|
1280
|
+
const localBin = path.resolve(baseDir, baseName);
|
|
1281
|
+
if (fs.existsSync(localBin))
|
|
1281
1282
|
return localBin;
|
|
1282
|
-
if (sourceExt.includes(
|
|
1283
|
+
if (sourceExt.includes(path.extname(baseName)))
|
|
1283
1284
|
return;
|
|
1284
|
-
const foundExt = sourceExt.find((ext) =>
|
|
1285
|
+
const foundExt = sourceExt.find((ext) => fs.existsSync(`${localBin}${ext}`));
|
|
1285
1286
|
if (foundExt)
|
|
1286
1287
|
return `${localBin}${foundExt}`;
|
|
1287
1288
|
return;
|
|
@@ -1293,23 +1294,23 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1293
1294
|
if (this._scriptPath) {
|
|
1294
1295
|
let resolvedScriptPath;
|
|
1295
1296
|
try {
|
|
1296
|
-
resolvedScriptPath =
|
|
1297
|
+
resolvedScriptPath = fs.realpathSync(this._scriptPath);
|
|
1297
1298
|
} catch {
|
|
1298
1299
|
resolvedScriptPath = this._scriptPath;
|
|
1299
1300
|
}
|
|
1300
|
-
executableDir =
|
|
1301
|
+
executableDir = path.resolve(path.dirname(resolvedScriptPath), executableDir);
|
|
1301
1302
|
}
|
|
1302
1303
|
if (executableDir) {
|
|
1303
1304
|
let localFile = findFile(executableDir, executableFile);
|
|
1304
1305
|
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
1305
|
-
const legacyName =
|
|
1306
|
+
const legacyName = path.basename(this._scriptPath, path.extname(this._scriptPath));
|
|
1306
1307
|
if (legacyName !== this._name) {
|
|
1307
1308
|
localFile = findFile(executableDir, `${legacyName}-${subcommand._name}`);
|
|
1308
1309
|
}
|
|
1309
1310
|
}
|
|
1310
1311
|
executableFile = localFile || executableFile;
|
|
1311
1312
|
}
|
|
1312
|
-
launchWithNode = sourceExt.includes(
|
|
1313
|
+
launchWithNode = sourceExt.includes(path.extname(executableFile));
|
|
1313
1314
|
let proc;
|
|
1314
1315
|
if (process2.platform !== "win32") {
|
|
1315
1316
|
if (launchWithNode) {
|
|
@@ -1736,18 +1737,18 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1736
1737
|
this.error(message, { code: "commander.missingMandatoryOptionValue" });
|
|
1737
1738
|
}
|
|
1738
1739
|
_conflictingOption(option, conflictingOption) {
|
|
1739
|
-
const findBestOptionFromValue = (
|
|
1740
|
-
const optionKey =
|
|
1740
|
+
const findBestOptionFromValue = (option) => {
|
|
1741
|
+
const optionKey = option.attributeName();
|
|
1741
1742
|
const optionValue = this.getOptionValue(optionKey);
|
|
1742
1743
|
const negativeOption = this.options.find((target) => target.negate && optionKey === target.attributeName());
|
|
1743
1744
|
const positiveOption = this.options.find((target) => !target.negate && optionKey === target.attributeName());
|
|
1744
1745
|
if (negativeOption && (negativeOption.presetArg === undefined && optionValue === false || negativeOption.presetArg !== undefined && optionValue === negativeOption.presetArg)) {
|
|
1745
1746
|
return negativeOption;
|
|
1746
1747
|
}
|
|
1747
|
-
return positiveOption ||
|
|
1748
|
+
return positiveOption || option;
|
|
1748
1749
|
};
|
|
1749
|
-
const getErrorMessage = (
|
|
1750
|
-
const bestOption = findBestOptionFromValue(
|
|
1750
|
+
const getErrorMessage = (option) => {
|
|
1751
|
+
const bestOption = findBestOptionFromValue(option);
|
|
1751
1752
|
const optionKey = bestOption.attributeName();
|
|
1752
1753
|
const source = this.getOptionValueSource(optionKey);
|
|
1753
1754
|
if (source === "env") {
|
|
@@ -1898,13 +1899,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1898
1899
|
cmd.helpGroup(this._defaultCommandGroup);
|
|
1899
1900
|
}
|
|
1900
1901
|
nameFromFilename(filename) {
|
|
1901
|
-
this._name =
|
|
1902
|
+
this._name = path.basename(filename, path.extname(filename));
|
|
1902
1903
|
return this;
|
|
1903
1904
|
}
|
|
1904
|
-
executableDir(
|
|
1905
|
-
if (
|
|
1905
|
+
executableDir(path) {
|
|
1906
|
+
if (path === undefined)
|
|
1906
1907
|
return this._executableDir;
|
|
1907
|
-
this._executableDir =
|
|
1908
|
+
this._executableDir = path;
|
|
1908
1909
|
return this;
|
|
1909
1910
|
}
|
|
1910
1911
|
helpInformation(contextOptions) {
|
|
@@ -2001,11 +2002,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2001
2002
|
}
|
|
2002
2003
|
help(contextOptions) {
|
|
2003
2004
|
this.outputHelp(contextOptions);
|
|
2004
|
-
let
|
|
2005
|
-
if (
|
|
2006
|
-
|
|
2005
|
+
let exitCode2 = Number(process2.exitCode ?? 0);
|
|
2006
|
+
if (exitCode2 === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) {
|
|
2007
|
+
exitCode2 = 1;
|
|
2007
2008
|
}
|
|
2008
|
-
this._exit(
|
|
2009
|
+
this._exit(exitCode2, "commander.help", "(outputHelp)");
|
|
2009
2010
|
}
|
|
2010
2011
|
addHelpText(position, text) {
|
|
2011
2012
|
const allowedValues = ["beforeAll", "before", "after", "afterAll"];
|
|
@@ -2077,35 +2078,15 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2077
2078
|
exports.useColor = useColor;
|
|
2078
2079
|
});
|
|
2079
2080
|
|
|
2080
|
-
// ../../node_modules/commander/index.js
|
|
2081
|
-
var require_commander = __commonJS(function(exports) {
|
|
2082
|
-
var { Argument } = require_argument();
|
|
2083
|
-
var { Command } = require_command();
|
|
2084
|
-
var { CommanderError, InvalidArgumentError } = require_error();
|
|
2085
|
-
var { Help } = require_help();
|
|
2086
|
-
var { Option } = require_option();
|
|
2087
|
-
exports.program = new Command;
|
|
2088
|
-
exports.createCommand = (name) => new Command(name);
|
|
2089
|
-
exports.createOption = (flags, description) => new Option(flags, description);
|
|
2090
|
-
exports.createArgument = (name, description) => new Argument(name, description);
|
|
2091
|
-
exports.Command = Command;
|
|
2092
|
-
exports.Option = Option;
|
|
2093
|
-
exports.Argument = Argument;
|
|
2094
|
-
exports.Help = Help;
|
|
2095
|
-
exports.CommanderError = CommanderError;
|
|
2096
|
-
exports.InvalidArgumentError = InvalidArgumentError;
|
|
2097
|
-
exports.InvalidOptionArgumentError = InvalidArgumentError;
|
|
2098
|
-
});
|
|
2099
|
-
|
|
2100
2081
|
// ../../node_modules/@uipath/license.accountant.typescript.client/dist/runtime.js
|
|
2101
2082
|
var require_runtime = __commonJS(function(exports) {
|
|
2102
2083
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
2103
2084
|
function adopt(value) {
|
|
2104
|
-
return value instanceof P ? value : new P(function(
|
|
2105
|
-
|
|
2085
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
2086
|
+
resolve(value);
|
|
2106
2087
|
});
|
|
2107
2088
|
}
|
|
2108
|
-
return new (P || (P = Promise))(function(
|
|
2089
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
2109
2090
|
function fulfilled(value) {
|
|
2110
2091
|
try {
|
|
2111
2092
|
step(generator.next(value));
|
|
@@ -2121,7 +2102,7 @@ var require_runtime = __commonJS(function(exports) {
|
|
|
2121
2102
|
}
|
|
2122
2103
|
}
|
|
2123
2104
|
function step(result) {
|
|
2124
|
-
result.done ?
|
|
2105
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
2125
2106
|
}
|
|
2126
2107
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2127
2108
|
});
|
|
@@ -13740,11 +13721,11 @@ var require_models = __commonJS(function(exports) {
|
|
|
13740
13721
|
var require_CopyAssignmentsAPI = __commonJS(function(exports) {
|
|
13741
13722
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
13742
13723
|
function adopt(value) {
|
|
13743
|
-
return value instanceof P ? value : new P(function(
|
|
13744
|
-
|
|
13724
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
13725
|
+
resolve(value);
|
|
13745
13726
|
});
|
|
13746
13727
|
}
|
|
13747
|
-
return new (P || (P = Promise))(function(
|
|
13728
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
13748
13729
|
function fulfilled(value) {
|
|
13749
13730
|
try {
|
|
13750
13731
|
step(generator.next(value));
|
|
@@ -13760,7 +13741,7 @@ var require_CopyAssignmentsAPI = __commonJS(function(exports) {
|
|
|
13760
13741
|
}
|
|
13761
13742
|
}
|
|
13762
13743
|
function step(result) {
|
|
13763
|
-
result.done ?
|
|
13744
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
13764
13745
|
}
|
|
13765
13746
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13766
13747
|
});
|
|
@@ -13809,11 +13790,11 @@ var require_CopyAssignmentsAPI = __commonJS(function(exports) {
|
|
|
13809
13790
|
var require_DatabaseMaintenanceAPI = __commonJS(function(exports) {
|
|
13810
13791
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
13811
13792
|
function adopt(value) {
|
|
13812
|
-
return value instanceof P ? value : new P(function(
|
|
13813
|
-
|
|
13793
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
13794
|
+
resolve(value);
|
|
13814
13795
|
});
|
|
13815
13796
|
}
|
|
13816
|
-
return new (P || (P = Promise))(function(
|
|
13797
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
13817
13798
|
function fulfilled(value) {
|
|
13818
13799
|
try {
|
|
13819
13800
|
step(generator.next(value));
|
|
@@ -13829,7 +13810,7 @@ var require_DatabaseMaintenanceAPI = __commonJS(function(exports) {
|
|
|
13829
13810
|
}
|
|
13830
13811
|
}
|
|
13831
13812
|
function step(result) {
|
|
13832
|
-
result.done ?
|
|
13813
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
13833
13814
|
}
|
|
13834
13815
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13835
13816
|
});
|
|
@@ -13872,11 +13853,11 @@ var require_DatabaseMaintenanceAPI = __commonJS(function(exports) {
|
|
|
13872
13853
|
var require_DeploymentTypeAPI = __commonJS(function(exports) {
|
|
13873
13854
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
13874
13855
|
function adopt(value) {
|
|
13875
|
-
return value instanceof P ? value : new P(function(
|
|
13876
|
-
|
|
13856
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
13857
|
+
resolve(value);
|
|
13877
13858
|
});
|
|
13878
13859
|
}
|
|
13879
|
-
return new (P || (P = Promise))(function(
|
|
13860
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
13880
13861
|
function fulfilled(value) {
|
|
13881
13862
|
try {
|
|
13882
13863
|
step(generator.next(value));
|
|
@@ -13892,7 +13873,7 @@ var require_DeploymentTypeAPI = __commonJS(function(exports) {
|
|
|
13892
13873
|
}
|
|
13893
13874
|
}
|
|
13894
13875
|
function step(result) {
|
|
13895
|
-
result.done ?
|
|
13876
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
13896
13877
|
}
|
|
13897
13878
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13898
13879
|
});
|
|
@@ -13937,11 +13918,11 @@ var require_DeploymentTypeAPI = __commonJS(function(exports) {
|
|
|
13937
13918
|
var require_EntitlementsAPI = __commonJS(function(exports) {
|
|
13938
13919
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
13939
13920
|
function adopt(value) {
|
|
13940
|
-
return value instanceof P ? value : new P(function(
|
|
13941
|
-
|
|
13921
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
13922
|
+
resolve(value);
|
|
13942
13923
|
});
|
|
13943
13924
|
}
|
|
13944
|
-
return new (P || (P = Promise))(function(
|
|
13925
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
13945
13926
|
function fulfilled(value) {
|
|
13946
13927
|
try {
|
|
13947
13928
|
step(generator.next(value));
|
|
@@ -13957,7 +13938,7 @@ var require_EntitlementsAPI = __commonJS(function(exports) {
|
|
|
13957
13938
|
}
|
|
13958
13939
|
}
|
|
13959
13940
|
function step(result) {
|
|
13960
|
-
result.done ?
|
|
13941
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
13961
13942
|
}
|
|
13962
13943
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13963
13944
|
});
|
|
@@ -14156,11 +14137,11 @@ var require_EntitlementsAPI = __commonJS(function(exports) {
|
|
|
14156
14137
|
var require_FallbackConfigurationAPI = __commonJS(function(exports) {
|
|
14157
14138
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
14158
14139
|
function adopt(value) {
|
|
14159
|
-
return value instanceof P ? value : new P(function(
|
|
14160
|
-
|
|
14140
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
14141
|
+
resolve(value);
|
|
14161
14142
|
});
|
|
14162
14143
|
}
|
|
14163
|
-
return new (P || (P = Promise))(function(
|
|
14144
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
14164
14145
|
function fulfilled(value) {
|
|
14165
14146
|
try {
|
|
14166
14147
|
step(generator.next(value));
|
|
@@ -14176,7 +14157,7 @@ var require_FallbackConfigurationAPI = __commonJS(function(exports) {
|
|
|
14176
14157
|
}
|
|
14177
14158
|
}
|
|
14178
14159
|
function step(result) {
|
|
14179
|
-
result.done ?
|
|
14160
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
14180
14161
|
}
|
|
14181
14162
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14182
14163
|
});
|
|
@@ -14263,11 +14244,11 @@ var require_FallbackConfigurationAPI = __commonJS(function(exports) {
|
|
|
14263
14244
|
var require_FolderConfigurationAPI = __commonJS(function(exports) {
|
|
14264
14245
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
14265
14246
|
function adopt(value) {
|
|
14266
|
-
return value instanceof P ? value : new P(function(
|
|
14267
|
-
|
|
14247
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
14248
|
+
resolve(value);
|
|
14268
14249
|
});
|
|
14269
14250
|
}
|
|
14270
|
-
return new (P || (P = Promise))(function(
|
|
14251
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
14271
14252
|
function fulfilled(value) {
|
|
14272
14253
|
try {
|
|
14273
14254
|
step(generator.next(value));
|
|
@@ -14283,7 +14264,7 @@ var require_FolderConfigurationAPI = __commonJS(function(exports) {
|
|
|
14283
14264
|
}
|
|
14284
14265
|
}
|
|
14285
14266
|
function step(result) {
|
|
14286
|
-
result.done ?
|
|
14267
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
14287
14268
|
}
|
|
14288
14269
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14289
14270
|
});
|
|
@@ -14374,11 +14355,11 @@ var require_FolderConfigurationAPI = __commonJS(function(exports) {
|
|
|
14374
14355
|
var require_LeaseAPI = __commonJS(function(exports) {
|
|
14375
14356
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
14376
14357
|
function adopt(value) {
|
|
14377
|
-
return value instanceof P ? value : new P(function(
|
|
14378
|
-
|
|
14358
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
14359
|
+
resolve(value);
|
|
14379
14360
|
});
|
|
14380
14361
|
}
|
|
14381
|
-
return new (P || (P = Promise))(function(
|
|
14362
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
14382
14363
|
function fulfilled(value) {
|
|
14383
14364
|
try {
|
|
14384
14365
|
step(generator.next(value));
|
|
@@ -14394,7 +14375,7 @@ var require_LeaseAPI = __commonJS(function(exports) {
|
|
|
14394
14375
|
}
|
|
14395
14376
|
}
|
|
14396
14377
|
function step(result) {
|
|
14397
|
-
result.done ?
|
|
14378
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
14398
14379
|
}
|
|
14399
14380
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14400
14381
|
});
|
|
@@ -15310,11 +15291,11 @@ var require_LeaseAPI = __commonJS(function(exports) {
|
|
|
15310
15291
|
var require_LicenseAccountantAPI = __commonJS(function(exports) {
|
|
15311
15292
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
15312
15293
|
function adopt(value) {
|
|
15313
|
-
return value instanceof P ? value : new P(function(
|
|
15314
|
-
|
|
15294
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
15295
|
+
resolve(value);
|
|
15315
15296
|
});
|
|
15316
15297
|
}
|
|
15317
|
-
return new (P || (P = Promise))(function(
|
|
15298
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
15318
15299
|
function fulfilled(value) {
|
|
15319
15300
|
try {
|
|
15320
15301
|
step(generator.next(value));
|
|
@@ -15330,7 +15311,7 @@ var require_LicenseAccountantAPI = __commonJS(function(exports) {
|
|
|
15330
15311
|
}
|
|
15331
15312
|
}
|
|
15332
15313
|
function step(result) {
|
|
15333
|
-
result.done ?
|
|
15314
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
15334
15315
|
}
|
|
15335
15316
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15336
15317
|
});
|
|
@@ -15382,11 +15363,11 @@ var require_LicenseAccountantAPI = __commonJS(function(exports) {
|
|
|
15382
15363
|
var require_LicenseChangedEventAPI = __commonJS(function(exports) {
|
|
15383
15364
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
15384
15365
|
function adopt(value) {
|
|
15385
|
-
return value instanceof P ? value : new P(function(
|
|
15386
|
-
|
|
15366
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
15367
|
+
resolve(value);
|
|
15387
15368
|
});
|
|
15388
15369
|
}
|
|
15389
|
-
return new (P || (P = Promise))(function(
|
|
15370
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
15390
15371
|
function fulfilled(value) {
|
|
15391
15372
|
try {
|
|
15392
15373
|
step(generator.next(value));
|
|
@@ -15402,7 +15383,7 @@ var require_LicenseChangedEventAPI = __commonJS(function(exports) {
|
|
|
15402
15383
|
}
|
|
15403
15384
|
}
|
|
15404
15385
|
function step(result) {
|
|
15405
|
-
result.done ?
|
|
15386
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
15406
15387
|
}
|
|
15407
15388
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15408
15389
|
});
|
|
@@ -15448,11 +15429,11 @@ var require_LicenseChangedEventAPI = __commonJS(function(exports) {
|
|
|
15448
15429
|
var require_LicenseMaintenanceAPI = __commonJS(function(exports) {
|
|
15449
15430
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
15450
15431
|
function adopt(value) {
|
|
15451
|
-
return value instanceof P ? value : new P(function(
|
|
15452
|
-
|
|
15432
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
15433
|
+
resolve(value);
|
|
15453
15434
|
});
|
|
15454
15435
|
}
|
|
15455
|
-
return new (P || (P = Promise))(function(
|
|
15436
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
15456
15437
|
function fulfilled(value) {
|
|
15457
15438
|
try {
|
|
15458
15439
|
step(generator.next(value));
|
|
@@ -15468,7 +15449,7 @@ var require_LicenseMaintenanceAPI = __commonJS(function(exports) {
|
|
|
15468
15449
|
}
|
|
15469
15450
|
}
|
|
15470
15451
|
function step(result) {
|
|
15471
|
-
result.done ?
|
|
15452
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
15472
15453
|
}
|
|
15473
15454
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15474
15455
|
});
|
|
@@ -15620,11 +15601,11 @@ var require_LicenseMaintenanceAPI = __commonJS(function(exports) {
|
|
|
15620
15601
|
var require_LicenseStatsAPI = __commonJS(function(exports) {
|
|
15621
15602
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
15622
15603
|
function adopt(value) {
|
|
15623
|
-
return value instanceof P ? value : new P(function(
|
|
15624
|
-
|
|
15604
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
15605
|
+
resolve(value);
|
|
15625
15606
|
});
|
|
15626
15607
|
}
|
|
15627
|
-
return new (P || (P = Promise))(function(
|
|
15608
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
15628
15609
|
function fulfilled(value) {
|
|
15629
15610
|
try {
|
|
15630
15611
|
step(generator.next(value));
|
|
@@ -15640,7 +15621,7 @@ var require_LicenseStatsAPI = __commonJS(function(exports) {
|
|
|
15640
15621
|
}
|
|
15641
15622
|
}
|
|
15642
15623
|
function step(result) {
|
|
15643
|
-
result.done ?
|
|
15624
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
15644
15625
|
}
|
|
15645
15626
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15646
15627
|
});
|
|
@@ -15752,11 +15733,11 @@ var require_LicenseStatsAPI = __commonJS(function(exports) {
|
|
|
15752
15733
|
var require_LimitAPI = __commonJS(function(exports) {
|
|
15753
15734
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
15754
15735
|
function adopt(value) {
|
|
15755
|
-
return value instanceof P ? value : new P(function(
|
|
15756
|
-
|
|
15736
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
15737
|
+
resolve(value);
|
|
15757
15738
|
});
|
|
15758
15739
|
}
|
|
15759
|
-
return new (P || (P = Promise))(function(
|
|
15740
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
15760
15741
|
function fulfilled(value) {
|
|
15761
15742
|
try {
|
|
15762
15743
|
step(generator.next(value));
|
|
@@ -15772,7 +15753,7 @@ var require_LimitAPI = __commonJS(function(exports) {
|
|
|
15772
15753
|
}
|
|
15773
15754
|
}
|
|
15774
15755
|
function step(result) {
|
|
15775
|
-
result.done ?
|
|
15756
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
15776
15757
|
}
|
|
15777
15758
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15778
15759
|
});
|
|
@@ -15998,11 +15979,11 @@ var require_LimitAPI = __commonJS(function(exports) {
|
|
|
15998
15979
|
var require_MessageBusAPI = __commonJS(function(exports) {
|
|
15999
15980
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
16000
15981
|
function adopt(value) {
|
|
16001
|
-
return value instanceof P ? value : new P(function(
|
|
16002
|
-
|
|
15982
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
15983
|
+
resolve(value);
|
|
16003
15984
|
});
|
|
16004
15985
|
}
|
|
16005
|
-
return new (P || (P = Promise))(function(
|
|
15986
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
16006
15987
|
function fulfilled(value) {
|
|
16007
15988
|
try {
|
|
16008
15989
|
step(generator.next(value));
|
|
@@ -16018,7 +15999,7 @@ var require_MessageBusAPI = __commonJS(function(exports) {
|
|
|
16018
15999
|
}
|
|
16019
16000
|
}
|
|
16020
16001
|
function step(result) {
|
|
16021
|
-
result.done ?
|
|
16002
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
16022
16003
|
}
|
|
16023
16004
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16024
16005
|
});
|
|
@@ -16166,11 +16147,11 @@ var require_MessageBusAPI = __commonJS(function(exports) {
|
|
|
16166
16147
|
var require_OperationConfigurationAPI = __commonJS(function(exports) {
|
|
16167
16148
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
16168
16149
|
function adopt(value) {
|
|
16169
|
-
return value instanceof P ? value : new P(function(
|
|
16170
|
-
|
|
16150
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
16151
|
+
resolve(value);
|
|
16171
16152
|
});
|
|
16172
16153
|
}
|
|
16173
|
-
return new (P || (P = Promise))(function(
|
|
16154
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
16174
16155
|
function fulfilled(value) {
|
|
16175
16156
|
try {
|
|
16176
16157
|
step(generator.next(value));
|
|
@@ -16186,7 +16167,7 @@ var require_OperationConfigurationAPI = __commonJS(function(exports) {
|
|
|
16186
16167
|
}
|
|
16187
16168
|
}
|
|
16188
16169
|
function step(result) {
|
|
16189
|
-
result.done ?
|
|
16170
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
16190
16171
|
}
|
|
16191
16172
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16192
16173
|
});
|
|
@@ -16234,11 +16215,11 @@ var require_OperationConfigurationAPI = __commonJS(function(exports) {
|
|
|
16234
16215
|
var require_PartitionMoveAPI = __commonJS(function(exports) {
|
|
16235
16216
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
16236
16217
|
function adopt(value) {
|
|
16237
|
-
return value instanceof P ? value : new P(function(
|
|
16238
|
-
|
|
16218
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
16219
|
+
resolve(value);
|
|
16239
16220
|
});
|
|
16240
16221
|
}
|
|
16241
|
-
return new (P || (P = Promise))(function(
|
|
16222
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
16242
16223
|
function fulfilled(value) {
|
|
16243
16224
|
try {
|
|
16244
16225
|
step(generator.next(value));
|
|
@@ -16254,7 +16235,7 @@ var require_PartitionMoveAPI = __commonJS(function(exports) {
|
|
|
16254
16235
|
}
|
|
16255
16236
|
}
|
|
16256
16237
|
function step(result) {
|
|
16257
|
-
result.done ?
|
|
16238
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
16258
16239
|
}
|
|
16259
16240
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16260
16241
|
});
|
|
@@ -16726,11 +16707,11 @@ var require_PartitionMoveAPI = __commonJS(function(exports) {
|
|
|
16726
16707
|
var require_PartitionOperationsAPI = __commonJS(function(exports) {
|
|
16727
16708
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
16728
16709
|
function adopt(value) {
|
|
16729
|
-
return value instanceof P ? value : new P(function(
|
|
16730
|
-
|
|
16710
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
16711
|
+
resolve(value);
|
|
16731
16712
|
});
|
|
16732
16713
|
}
|
|
16733
|
-
return new (P || (P = Promise))(function(
|
|
16714
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
16734
16715
|
function fulfilled(value) {
|
|
16735
16716
|
try {
|
|
16736
16717
|
step(generator.next(value));
|
|
@@ -16746,7 +16727,7 @@ var require_PartitionOperationsAPI = __commonJS(function(exports) {
|
|
|
16746
16727
|
}
|
|
16747
16728
|
}
|
|
16748
16729
|
function step(result) {
|
|
16749
|
-
result.done ?
|
|
16730
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
16750
16731
|
}
|
|
16751
16732
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16752
16733
|
});
|
|
@@ -16886,11 +16867,11 @@ var require_PartitionOperationsAPI = __commonJS(function(exports) {
|
|
|
16886
16867
|
var require_ReplayUsageEventAPI = __commonJS(function(exports) {
|
|
16887
16868
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
16888
16869
|
function adopt(value) {
|
|
16889
|
-
return value instanceof P ? value : new P(function(
|
|
16890
|
-
|
|
16870
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
16871
|
+
resolve(value);
|
|
16891
16872
|
});
|
|
16892
16873
|
}
|
|
16893
|
-
return new (P || (P = Promise))(function(
|
|
16874
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
16894
16875
|
function fulfilled(value) {
|
|
16895
16876
|
try {
|
|
16896
16877
|
step(generator.next(value));
|
|
@@ -16906,7 +16887,7 @@ var require_ReplayUsageEventAPI = __commonJS(function(exports) {
|
|
|
16906
16887
|
}
|
|
16907
16888
|
}
|
|
16908
16889
|
function step(result) {
|
|
16909
|
-
result.done ?
|
|
16890
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
16910
16891
|
}
|
|
16911
16892
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16912
16893
|
});
|
|
@@ -16955,11 +16936,11 @@ var require_ReplayUsageEventAPI = __commonJS(function(exports) {
|
|
|
16955
16936
|
var require_RuntimeConfigurationAPI = __commonJS(function(exports) {
|
|
16956
16937
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
16957
16938
|
function adopt(value) {
|
|
16958
|
-
return value instanceof P ? value : new P(function(
|
|
16959
|
-
|
|
16939
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
16940
|
+
resolve(value);
|
|
16960
16941
|
});
|
|
16961
16942
|
}
|
|
16962
|
-
return new (P || (P = Promise))(function(
|
|
16943
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
16963
16944
|
function fulfilled(value) {
|
|
16964
16945
|
try {
|
|
16965
16946
|
step(generator.next(value));
|
|
@@ -16975,7 +16956,7 @@ var require_RuntimeConfigurationAPI = __commonJS(function(exports) {
|
|
|
16975
16956
|
}
|
|
16976
16957
|
}
|
|
16977
16958
|
function step(result) {
|
|
16978
|
-
result.done ?
|
|
16959
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
16979
16960
|
}
|
|
16980
16961
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16981
16962
|
});
|
|
@@ -17122,11 +17103,11 @@ var require_RuntimeConfigurationAPI = __commonJS(function(exports) {
|
|
|
17122
17103
|
var require_UsageAPI = __commonJS(function(exports) {
|
|
17123
17104
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
17124
17105
|
function adopt(value) {
|
|
17125
|
-
return value instanceof P ? value : new P(function(
|
|
17126
|
-
|
|
17106
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
17107
|
+
resolve(value);
|
|
17127
17108
|
});
|
|
17128
17109
|
}
|
|
17129
|
-
return new (P || (P = Promise))(function(
|
|
17110
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
17130
17111
|
function fulfilled(value) {
|
|
17131
17112
|
try {
|
|
17132
17113
|
step(generator.next(value));
|
|
@@ -17142,7 +17123,7 @@ var require_UsageAPI = __commonJS(function(exports) {
|
|
|
17142
17123
|
}
|
|
17143
17124
|
}
|
|
17144
17125
|
function step(result) {
|
|
17145
|
-
result.done ?
|
|
17126
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
17146
17127
|
}
|
|
17147
17128
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
17148
17129
|
});
|
|
@@ -17697,11 +17678,11 @@ var require_UsageAPI = __commonJS(function(exports) {
|
|
|
17697
17678
|
var require_UsageBusinessFlowAPI = __commonJS(function(exports) {
|
|
17698
17679
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
17699
17680
|
function adopt(value) {
|
|
17700
|
-
return value instanceof P ? value : new P(function(
|
|
17701
|
-
|
|
17681
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
17682
|
+
resolve(value);
|
|
17702
17683
|
});
|
|
17703
17684
|
}
|
|
17704
|
-
return new (P || (P = Promise))(function(
|
|
17685
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
17705
17686
|
function fulfilled(value) {
|
|
17706
17687
|
try {
|
|
17707
17688
|
step(generator.next(value));
|
|
@@ -17717,7 +17698,7 @@ var require_UsageBusinessFlowAPI = __commonJS(function(exports) {
|
|
|
17717
17698
|
}
|
|
17718
17699
|
}
|
|
17719
17700
|
function step(result) {
|
|
17720
|
-
result.done ?
|
|
17701
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
17721
17702
|
}
|
|
17722
17703
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
17723
17704
|
});
|
|
@@ -17769,11 +17750,11 @@ var require_UsageBusinessFlowAPI = __commonJS(function(exports) {
|
|
|
17769
17750
|
var require_UsageCommandAPI = __commonJS(function(exports) {
|
|
17770
17751
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
17771
17752
|
function adopt(value) {
|
|
17772
|
-
return value instanceof P ? value : new P(function(
|
|
17773
|
-
|
|
17753
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
17754
|
+
resolve(value);
|
|
17774
17755
|
});
|
|
17775
17756
|
}
|
|
17776
|
-
return new (P || (P = Promise))(function(
|
|
17757
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
17777
17758
|
function fulfilled(value) {
|
|
17778
17759
|
try {
|
|
17779
17760
|
step(generator.next(value));
|
|
@@ -17789,7 +17770,7 @@ var require_UsageCommandAPI = __commonJS(function(exports) {
|
|
|
17789
17770
|
}
|
|
17790
17771
|
}
|
|
17791
17772
|
function step(result) {
|
|
17792
|
-
result.done ?
|
|
17773
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
17793
17774
|
}
|
|
17794
17775
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
17795
17776
|
});
|
|
@@ -17870,11 +17851,11 @@ var require_UsageCommandAPI = __commonJS(function(exports) {
|
|
|
17870
17851
|
var require_UsageEventAPI = __commonJS(function(exports) {
|
|
17871
17852
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
17872
17853
|
function adopt(value) {
|
|
17873
|
-
return value instanceof P ? value : new P(function(
|
|
17874
|
-
|
|
17854
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
17855
|
+
resolve(value);
|
|
17875
17856
|
});
|
|
17876
17857
|
}
|
|
17877
|
-
return new (P || (P = Promise))(function(
|
|
17858
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
17878
17859
|
function fulfilled(value) {
|
|
17879
17860
|
try {
|
|
17880
17861
|
step(generator.next(value));
|
|
@@ -17890,7 +17871,7 @@ var require_UsageEventAPI = __commonJS(function(exports) {
|
|
|
17890
17871
|
}
|
|
17891
17872
|
}
|
|
17892
17873
|
function step(result) {
|
|
17893
|
-
result.done ?
|
|
17874
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
17894
17875
|
}
|
|
17895
17876
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
17896
17877
|
});
|
|
@@ -18065,11 +18046,11 @@ var require_UsageEventAPI = __commonJS(function(exports) {
|
|
|
18065
18046
|
var require_UserLicenseAPI = __commonJS(function(exports) {
|
|
18066
18047
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
18067
18048
|
function adopt(value) {
|
|
18068
|
-
return value instanceof P ? value : new P(function(
|
|
18069
|
-
|
|
18049
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
18050
|
+
resolve(value);
|
|
18070
18051
|
});
|
|
18071
18052
|
}
|
|
18072
|
-
return new (P || (P = Promise))(function(
|
|
18053
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
18073
18054
|
function fulfilled(value) {
|
|
18074
18055
|
try {
|
|
18075
18056
|
step(generator.next(value));
|
|
@@ -18085,7 +18066,7 @@ var require_UserLicenseAPI = __commonJS(function(exports) {
|
|
|
18085
18066
|
}
|
|
18086
18067
|
}
|
|
18087
18068
|
function step(result) {
|
|
18088
|
-
result.done ?
|
|
18069
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
18089
18070
|
}
|
|
18090
18071
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18091
18072
|
});
|
|
@@ -19192,11 +19173,11 @@ var require_UserLicenseAPI = __commonJS(function(exports) {
|
|
|
19192
19173
|
var require_UserLicensingAPI = __commonJS(function(exports) {
|
|
19193
19174
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
19194
19175
|
function adopt(value) {
|
|
19195
|
-
return value instanceof P ? value : new P(function(
|
|
19196
|
-
|
|
19176
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
19177
|
+
resolve(value);
|
|
19197
19178
|
});
|
|
19198
19179
|
}
|
|
19199
|
-
return new (P || (P = Promise))(function(
|
|
19180
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
19200
19181
|
function fulfilled(value) {
|
|
19201
19182
|
try {
|
|
19202
19183
|
step(generator.next(value));
|
|
@@ -19212,7 +19193,7 @@ var require_UserLicensingAPI = __commonJS(function(exports) {
|
|
|
19212
19193
|
}
|
|
19213
19194
|
}
|
|
19214
19195
|
function step(result) {
|
|
19215
|
-
result.done ?
|
|
19196
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
19216
19197
|
}
|
|
19217
19198
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19218
19199
|
});
|
|
@@ -19414,11 +19395,11 @@ var require_UserLicensingAPI = __commonJS(function(exports) {
|
|
|
19414
19395
|
var require_UserUsageAPI = __commonJS(function(exports) {
|
|
19415
19396
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
19416
19397
|
function adopt(value) {
|
|
19417
|
-
return value instanceof P ? value : new P(function(
|
|
19418
|
-
|
|
19398
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
19399
|
+
resolve(value);
|
|
19419
19400
|
});
|
|
19420
19401
|
}
|
|
19421
|
-
return new (P || (P = Promise))(function(
|
|
19402
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
19422
19403
|
function fulfilled(value) {
|
|
19423
19404
|
try {
|
|
19424
19405
|
step(generator.next(value));
|
|
@@ -19434,7 +19415,7 @@ var require_UserUsageAPI = __commonJS(function(exports) {
|
|
|
19434
19415
|
}
|
|
19435
19416
|
}
|
|
19436
19417
|
function step(result) {
|
|
19437
|
-
result.done ?
|
|
19418
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
19438
19419
|
}
|
|
19439
19420
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19440
19421
|
});
|
|
@@ -19665,11 +19646,11 @@ var require_dist = __commonJS(function(exports) {
|
|
|
19665
19646
|
var require_runtime2 = __commonJS(function(exports) {
|
|
19666
19647
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
19667
19648
|
function adopt(value) {
|
|
19668
|
-
return value instanceof P ? value : new P(function(
|
|
19669
|
-
|
|
19649
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
19650
|
+
resolve(value);
|
|
19670
19651
|
});
|
|
19671
19652
|
}
|
|
19672
|
-
return new (P || (P = Promise))(function(
|
|
19653
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
19673
19654
|
function fulfilled(value) {
|
|
19674
19655
|
try {
|
|
19675
19656
|
step(generator.next(value));
|
|
@@ -19685,7 +19666,7 @@ var require_runtime2 = __commonJS(function(exports) {
|
|
|
19685
19666
|
}
|
|
19686
19667
|
}
|
|
19687
19668
|
function step(result) {
|
|
19688
|
-
result.done ?
|
|
19669
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
19689
19670
|
}
|
|
19690
19671
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19691
19672
|
});
|
|
@@ -19818,7 +19799,7 @@ var require_runtime2 = __commonJS(function(exports) {
|
|
|
19818
19799
|
if (response && (response.status >= 200 && response.status < 300)) {
|
|
19819
19800
|
return response;
|
|
19820
19801
|
}
|
|
19821
|
-
throw new
|
|
19802
|
+
throw new ResponseError(response, "Response returned an error code");
|
|
19822
19803
|
});
|
|
19823
19804
|
}
|
|
19824
19805
|
createFetchParams(context, initOverrides) {
|
|
@@ -19871,14 +19852,14 @@ var require_runtime2 = __commonJS(function(exports) {
|
|
|
19871
19852
|
return typeof FormData !== "undefined" && value instanceof FormData;
|
|
19872
19853
|
}
|
|
19873
19854
|
|
|
19874
|
-
class
|
|
19855
|
+
class ResponseError extends Error {
|
|
19875
19856
|
constructor(response, msg) {
|
|
19876
19857
|
super(msg);
|
|
19877
19858
|
this.response = response;
|
|
19878
19859
|
this.name = "ResponseError";
|
|
19879
19860
|
}
|
|
19880
19861
|
}
|
|
19881
|
-
exports.ResponseError =
|
|
19862
|
+
exports.ResponseError = ResponseError;
|
|
19882
19863
|
|
|
19883
19864
|
class FetchError extends Error {
|
|
19884
19865
|
constructor(cause, msg) {
|
|
@@ -23978,11 +23959,11 @@ var require_models2 = __commonJS(function(exports) {
|
|
|
23978
23959
|
var require_AccountAPI = __commonJS(function(exports) {
|
|
23979
23960
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
23980
23961
|
function adopt(value) {
|
|
23981
|
-
return value instanceof P ? value : new P(function(
|
|
23982
|
-
|
|
23962
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
23963
|
+
resolve(value);
|
|
23983
23964
|
});
|
|
23984
23965
|
}
|
|
23985
|
-
return new (P || (P = Promise))(function(
|
|
23966
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
23986
23967
|
function fulfilled(value) {
|
|
23987
23968
|
try {
|
|
23988
23969
|
step(generator.next(value));
|
|
@@ -23998,7 +23979,7 @@ var require_AccountAPI = __commonJS(function(exports) {
|
|
|
23998
23979
|
}
|
|
23999
23980
|
}
|
|
24000
23981
|
function step(result) {
|
|
24001
|
-
result.done ?
|
|
23982
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
24002
23983
|
}
|
|
24003
23984
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24004
23985
|
});
|
|
@@ -24256,11 +24237,11 @@ var require_AccountAPI = __commonJS(function(exports) {
|
|
|
24256
24237
|
var require_AccountLicenseAPI = __commonJS(function(exports) {
|
|
24257
24238
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
24258
24239
|
function adopt(value) {
|
|
24259
|
-
return value instanceof P ? value : new P(function(
|
|
24260
|
-
|
|
24240
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
24241
|
+
resolve(value);
|
|
24261
24242
|
});
|
|
24262
24243
|
}
|
|
24263
|
-
return new (P || (P = Promise))(function(
|
|
24244
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
24264
24245
|
function fulfilled(value) {
|
|
24265
24246
|
try {
|
|
24266
24247
|
step(generator.next(value));
|
|
@@ -24276,7 +24257,7 @@ var require_AccountLicenseAPI = __commonJS(function(exports) {
|
|
|
24276
24257
|
}
|
|
24277
24258
|
}
|
|
24278
24259
|
function step(result) {
|
|
24279
|
-
result.done ?
|
|
24260
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
24280
24261
|
}
|
|
24281
24262
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24282
24263
|
});
|
|
@@ -24486,11 +24467,11 @@ var require_AccountLicenseAPI = __commonJS(function(exports) {
|
|
|
24486
24467
|
var require_AccountLicenseActivationAPI = __commonJS(function(exports) {
|
|
24487
24468
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
24488
24469
|
function adopt(value) {
|
|
24489
|
-
return value instanceof P ? value : new P(function(
|
|
24490
|
-
|
|
24470
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
24471
|
+
resolve(value);
|
|
24491
24472
|
});
|
|
24492
24473
|
}
|
|
24493
|
-
return new (P || (P = Promise))(function(
|
|
24474
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
24494
24475
|
function fulfilled(value) {
|
|
24495
24476
|
try {
|
|
24496
24477
|
step(generator.next(value));
|
|
@@ -24506,7 +24487,7 @@ var require_AccountLicenseActivationAPI = __commonJS(function(exports) {
|
|
|
24506
24487
|
}
|
|
24507
24488
|
}
|
|
24508
24489
|
function step(result) {
|
|
24509
|
-
result.done ?
|
|
24490
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
24510
24491
|
}
|
|
24511
24492
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24512
24493
|
});
|
|
@@ -24779,11 +24760,11 @@ var require_AccountLicenseActivationAPI = __commonJS(function(exports) {
|
|
|
24779
24760
|
var require_ApiHealthAPI = __commonJS(function(exports) {
|
|
24780
24761
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
24781
24762
|
function adopt(value) {
|
|
24782
|
-
return value instanceof P ? value : new P(function(
|
|
24783
|
-
|
|
24763
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
24764
|
+
resolve(value);
|
|
24784
24765
|
});
|
|
24785
24766
|
}
|
|
24786
|
-
return new (P || (P = Promise))(function(
|
|
24767
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
24787
24768
|
function fulfilled(value) {
|
|
24788
24769
|
try {
|
|
24789
24770
|
step(generator.next(value));
|
|
@@ -24799,7 +24780,7 @@ var require_ApiHealthAPI = __commonJS(function(exports) {
|
|
|
24799
24780
|
}
|
|
24800
24781
|
}
|
|
24801
24782
|
function step(result) {
|
|
24802
|
-
result.done ?
|
|
24783
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
24803
24784
|
}
|
|
24804
24785
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24805
24786
|
});
|
|
@@ -24847,11 +24828,11 @@ var require_ApiHealthAPI = __commonJS(function(exports) {
|
|
|
24847
24828
|
var require_DeploymentTypeAPI2 = __commonJS(function(exports) {
|
|
24848
24829
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
24849
24830
|
function adopt(value) {
|
|
24850
|
-
return value instanceof P ? value : new P(function(
|
|
24851
|
-
|
|
24831
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
24832
|
+
resolve(value);
|
|
24852
24833
|
});
|
|
24853
24834
|
}
|
|
24854
|
-
return new (P || (P = Promise))(function(
|
|
24835
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
24855
24836
|
function fulfilled(value) {
|
|
24856
24837
|
try {
|
|
24857
24838
|
step(generator.next(value));
|
|
@@ -24867,7 +24848,7 @@ var require_DeploymentTypeAPI2 = __commonJS(function(exports) {
|
|
|
24867
24848
|
}
|
|
24868
24849
|
}
|
|
24869
24850
|
function step(result) {
|
|
24870
|
-
result.done ?
|
|
24851
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
24871
24852
|
}
|
|
24872
24853
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24873
24854
|
});
|
|
@@ -24912,11 +24893,11 @@ var require_DeploymentTypeAPI2 = __commonJS(function(exports) {
|
|
|
24912
24893
|
var require_FrontEndLicenseAPI = __commonJS(function(exports) {
|
|
24913
24894
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
24914
24895
|
function adopt(value) {
|
|
24915
|
-
return value instanceof P ? value : new P(function(
|
|
24916
|
-
|
|
24896
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
24897
|
+
resolve(value);
|
|
24917
24898
|
});
|
|
24918
24899
|
}
|
|
24919
|
-
return new (P || (P = Promise))(function(
|
|
24900
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
24920
24901
|
function fulfilled(value) {
|
|
24921
24902
|
try {
|
|
24922
24903
|
step(generator.next(value));
|
|
@@ -24932,7 +24913,7 @@ var require_FrontEndLicenseAPI = __commonJS(function(exports) {
|
|
|
24932
24913
|
}
|
|
24933
24914
|
}
|
|
24934
24915
|
function step(result) {
|
|
24935
|
-
result.done ?
|
|
24916
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
24936
24917
|
}
|
|
24937
24918
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24938
24919
|
});
|
|
@@ -25167,11 +25148,11 @@ var require_FrontEndLicenseAPI = __commonJS(function(exports) {
|
|
|
25167
25148
|
var require_HosterAPI = __commonJS(function(exports) {
|
|
25168
25149
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
25169
25150
|
function adopt(value) {
|
|
25170
|
-
return value instanceof P ? value : new P(function(
|
|
25171
|
-
|
|
25151
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
25152
|
+
resolve(value);
|
|
25172
25153
|
});
|
|
25173
25154
|
}
|
|
25174
|
-
return new (P || (P = Promise))(function(
|
|
25155
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
25175
25156
|
function fulfilled(value) {
|
|
25176
25157
|
try {
|
|
25177
25158
|
step(generator.next(value));
|
|
@@ -25187,7 +25168,7 @@ var require_HosterAPI = __commonJS(function(exports) {
|
|
|
25187
25168
|
}
|
|
25188
25169
|
}
|
|
25189
25170
|
function step(result) {
|
|
25190
|
-
result.done ?
|
|
25171
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
25191
25172
|
}
|
|
25192
25173
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
25193
25174
|
});
|
|
@@ -25491,11 +25472,11 @@ var require_HosterAPI = __commonJS(function(exports) {
|
|
|
25491
25472
|
var require_LeadsAPI = __commonJS(function(exports) {
|
|
25492
25473
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
25493
25474
|
function adopt(value) {
|
|
25494
|
-
return value instanceof P ? value : new P(function(
|
|
25495
|
-
|
|
25475
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
25476
|
+
resolve(value);
|
|
25496
25477
|
});
|
|
25497
25478
|
}
|
|
25498
|
-
return new (P || (P = Promise))(function(
|
|
25479
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
25499
25480
|
function fulfilled(value) {
|
|
25500
25481
|
try {
|
|
25501
25482
|
step(generator.next(value));
|
|
@@ -25511,7 +25492,7 @@ var require_LeadsAPI = __commonJS(function(exports) {
|
|
|
25511
25492
|
}
|
|
25512
25493
|
}
|
|
25513
25494
|
function step(result) {
|
|
25514
|
-
result.done ?
|
|
25495
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
25515
25496
|
}
|
|
25516
25497
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
25517
25498
|
});
|
|
@@ -25560,11 +25541,11 @@ var require_LeadsAPI = __commonJS(function(exports) {
|
|
|
25560
25541
|
var require_LicenseMaintenanceAPI2 = __commonJS(function(exports) {
|
|
25561
25542
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
25562
25543
|
function adopt(value) {
|
|
25563
|
-
return value instanceof P ? value : new P(function(
|
|
25564
|
-
|
|
25544
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
25545
|
+
resolve(value);
|
|
25565
25546
|
});
|
|
25566
25547
|
}
|
|
25567
|
-
return new (P || (P = Promise))(function(
|
|
25548
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
25568
25549
|
function fulfilled(value) {
|
|
25569
25550
|
try {
|
|
25570
25551
|
step(generator.next(value));
|
|
@@ -25580,7 +25561,7 @@ var require_LicenseMaintenanceAPI2 = __commonJS(function(exports) {
|
|
|
25580
25561
|
}
|
|
25581
25562
|
}
|
|
25582
25563
|
function step(result) {
|
|
25583
|
-
result.done ?
|
|
25564
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
25584
25565
|
}
|
|
25585
25566
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
25586
25567
|
});
|
|
@@ -25838,11 +25819,11 @@ var require_LicenseMaintenanceAPI2 = __commonJS(function(exports) {
|
|
|
25838
25819
|
var require_LicenseValidationAPI = __commonJS(function(exports) {
|
|
25839
25820
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
25840
25821
|
function adopt(value) {
|
|
25841
|
-
return value instanceof P ? value : new P(function(
|
|
25842
|
-
|
|
25822
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
25823
|
+
resolve(value);
|
|
25843
25824
|
});
|
|
25844
25825
|
}
|
|
25845
|
-
return new (P || (P = Promise))(function(
|
|
25826
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
25846
25827
|
function fulfilled(value) {
|
|
25847
25828
|
try {
|
|
25848
25829
|
step(generator.next(value));
|
|
@@ -25858,7 +25839,7 @@ var require_LicenseValidationAPI = __commonJS(function(exports) {
|
|
|
25858
25839
|
}
|
|
25859
25840
|
}
|
|
25860
25841
|
function step(result) {
|
|
25861
|
-
result.done ?
|
|
25842
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
25862
25843
|
}
|
|
25863
25844
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
25864
25845
|
});
|
|
@@ -25933,11 +25914,11 @@ var require_LicenseValidationAPI = __commonJS(function(exports) {
|
|
|
25933
25914
|
var require_PartitionMoveAPI2 = __commonJS(function(exports) {
|
|
25934
25915
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
25935
25916
|
function adopt(value) {
|
|
25936
|
-
return value instanceof P ? value : new P(function(
|
|
25937
|
-
|
|
25917
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
25918
|
+
resolve(value);
|
|
25938
25919
|
});
|
|
25939
25920
|
}
|
|
25940
|
-
return new (P || (P = Promise))(function(
|
|
25921
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
25941
25922
|
function fulfilled(value) {
|
|
25942
25923
|
try {
|
|
25943
25924
|
step(generator.next(value));
|
|
@@ -25953,7 +25934,7 @@ var require_PartitionMoveAPI2 = __commonJS(function(exports) {
|
|
|
25953
25934
|
}
|
|
25954
25935
|
}
|
|
25955
25936
|
function step(result) {
|
|
25956
|
-
result.done ?
|
|
25937
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
25957
25938
|
}
|
|
25958
25939
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
25959
25940
|
});
|
|
@@ -26425,11 +26406,11 @@ var require_PartitionMoveAPI2 = __commonJS(function(exports) {
|
|
|
26425
26406
|
var require_PartitionOperationsAPI2 = __commonJS(function(exports) {
|
|
26426
26407
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
26427
26408
|
function adopt(value) {
|
|
26428
|
-
return value instanceof P ? value : new P(function(
|
|
26429
|
-
|
|
26409
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
26410
|
+
resolve(value);
|
|
26430
26411
|
});
|
|
26431
26412
|
}
|
|
26432
|
-
return new (P || (P = Promise))(function(
|
|
26413
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
26433
26414
|
function fulfilled(value) {
|
|
26434
26415
|
try {
|
|
26435
26416
|
step(generator.next(value));
|
|
@@ -26445,7 +26426,7 @@ var require_PartitionOperationsAPI2 = __commonJS(function(exports) {
|
|
|
26445
26426
|
}
|
|
26446
26427
|
}
|
|
26447
26428
|
function step(result) {
|
|
26448
|
-
result.done ?
|
|
26429
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
26449
26430
|
}
|
|
26450
26431
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
26451
26432
|
});
|
|
@@ -26526,11 +26507,11 @@ var require_PartitionOperationsAPI2 = __commonJS(function(exports) {
|
|
|
26526
26507
|
var require_PartnerAccountAPI = __commonJS(function(exports) {
|
|
26527
26508
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
26528
26509
|
function adopt(value) {
|
|
26529
|
-
return value instanceof P ? value : new P(function(
|
|
26530
|
-
|
|
26510
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
26511
|
+
resolve(value);
|
|
26531
26512
|
});
|
|
26532
26513
|
}
|
|
26533
|
-
return new (P || (P = Promise))(function(
|
|
26514
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
26534
26515
|
function fulfilled(value) {
|
|
26535
26516
|
try {
|
|
26536
26517
|
step(generator.next(value));
|
|
@@ -26546,7 +26527,7 @@ var require_PartnerAccountAPI = __commonJS(function(exports) {
|
|
|
26546
26527
|
}
|
|
26547
26528
|
}
|
|
26548
26529
|
function step(result) {
|
|
26549
|
-
result.done ?
|
|
26530
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
26550
26531
|
}
|
|
26551
26532
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
26552
26533
|
});
|
|
@@ -26599,11 +26580,11 @@ var require_PartnerAccountAPI = __commonJS(function(exports) {
|
|
|
26599
26580
|
var require_PartnerLicenseAPI = __commonJS(function(exports) {
|
|
26600
26581
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
26601
26582
|
function adopt(value) {
|
|
26602
|
-
return value instanceof P ? value : new P(function(
|
|
26603
|
-
|
|
26583
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
26584
|
+
resolve(value);
|
|
26604
26585
|
});
|
|
26605
26586
|
}
|
|
26606
|
-
return new (P || (P = Promise))(function(
|
|
26587
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
26607
26588
|
function fulfilled(value) {
|
|
26608
26589
|
try {
|
|
26609
26590
|
step(generator.next(value));
|
|
@@ -26619,7 +26600,7 @@ var require_PartnerLicenseAPI = __commonJS(function(exports) {
|
|
|
26619
26600
|
}
|
|
26620
26601
|
}
|
|
26621
26602
|
function step(result) {
|
|
26622
|
-
result.done ?
|
|
26603
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
26623
26604
|
}
|
|
26624
26605
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
26625
26606
|
});
|
|
@@ -26882,11 +26863,11 @@ var require_PartnerLicenseAPI = __commonJS(function(exports) {
|
|
|
26882
26863
|
var require_QuotaAPI = __commonJS(function(exports) {
|
|
26883
26864
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
26884
26865
|
function adopt(value) {
|
|
26885
|
-
return value instanceof P ? value : new P(function(
|
|
26886
|
-
|
|
26866
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
26867
|
+
resolve(value);
|
|
26887
26868
|
});
|
|
26888
26869
|
}
|
|
26889
|
-
return new (P || (P = Promise))(function(
|
|
26870
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
26890
26871
|
function fulfilled(value) {
|
|
26891
26872
|
try {
|
|
26892
26873
|
step(generator.next(value));
|
|
@@ -26902,7 +26883,7 @@ var require_QuotaAPI = __commonJS(function(exports) {
|
|
|
26902
26883
|
}
|
|
26903
26884
|
}
|
|
26904
26885
|
function step(result) {
|
|
26905
|
-
result.done ?
|
|
26886
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
26906
26887
|
}
|
|
26907
26888
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
26908
26889
|
});
|
|
@@ -27292,11 +27273,11 @@ var require_QuotaAPI = __commonJS(function(exports) {
|
|
|
27292
27273
|
var require_ServiceLicenseAPI = __commonJS(function(exports) {
|
|
27293
27274
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
27294
27275
|
function adopt(value) {
|
|
27295
|
-
return value instanceof P ? value : new P(function(
|
|
27296
|
-
|
|
27276
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
27277
|
+
resolve(value);
|
|
27297
27278
|
});
|
|
27298
27279
|
}
|
|
27299
|
-
return new (P || (P = Promise))(function(
|
|
27280
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
27300
27281
|
function fulfilled(value) {
|
|
27301
27282
|
try {
|
|
27302
27283
|
step(generator.next(value));
|
|
@@ -27312,7 +27293,7 @@ var require_ServiceLicenseAPI = __commonJS(function(exports) {
|
|
|
27312
27293
|
}
|
|
27313
27294
|
}
|
|
27314
27295
|
function step(result) {
|
|
27315
|
-
result.done ?
|
|
27296
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
27316
27297
|
}
|
|
27317
27298
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
27318
27299
|
});
|
|
@@ -27668,11 +27649,11 @@ var require_ServiceLicenseAPI = __commonJS(function(exports) {
|
|
|
27668
27649
|
var require_ServiceLicenseWithoutAccountIdAPI = __commonJS(function(exports) {
|
|
27669
27650
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
27670
27651
|
function adopt(value) {
|
|
27671
|
-
return value instanceof P ? value : new P(function(
|
|
27672
|
-
|
|
27652
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
27653
|
+
resolve(value);
|
|
27673
27654
|
});
|
|
27674
27655
|
}
|
|
27675
|
-
return new (P || (P = Promise))(function(
|
|
27656
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
27676
27657
|
function fulfilled(value) {
|
|
27677
27658
|
try {
|
|
27678
27659
|
step(generator.next(value));
|
|
@@ -27688,7 +27669,7 @@ var require_ServiceLicenseWithoutAccountIdAPI = __commonJS(function(exports) {
|
|
|
27688
27669
|
}
|
|
27689
27670
|
}
|
|
27690
27671
|
function step(result) {
|
|
27691
|
-
result.done ?
|
|
27672
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
27692
27673
|
}
|
|
27693
27674
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
27694
27675
|
});
|
|
@@ -27739,11 +27720,11 @@ var require_ServiceLicenseWithoutAccountIdAPI = __commonJS(function(exports) {
|
|
|
27739
27720
|
var require_SubscriptionPlanAPI = __commonJS(function(exports) {
|
|
27740
27721
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
27741
27722
|
function adopt(value) {
|
|
27742
|
-
return value instanceof P ? value : new P(function(
|
|
27743
|
-
|
|
27723
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
27724
|
+
resolve(value);
|
|
27744
27725
|
});
|
|
27745
27726
|
}
|
|
27746
|
-
return new (P || (P = Promise))(function(
|
|
27727
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
27747
27728
|
function fulfilled(value) {
|
|
27748
27729
|
try {
|
|
27749
27730
|
step(generator.next(value));
|
|
@@ -27759,7 +27740,7 @@ var require_SubscriptionPlanAPI = __commonJS(function(exports) {
|
|
|
27759
27740
|
}
|
|
27760
27741
|
}
|
|
27761
27742
|
function step(result) {
|
|
27762
|
-
result.done ?
|
|
27743
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
27763
27744
|
}
|
|
27764
27745
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
27765
27746
|
});
|
|
@@ -27805,11 +27786,11 @@ var require_SubscriptionPlanAPI = __commonJS(function(exports) {
|
|
|
27805
27786
|
var require_TopUpsAPI = __commonJS(function(exports) {
|
|
27806
27787
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
27807
27788
|
function adopt(value) {
|
|
27808
|
-
return value instanceof P ? value : new P(function(
|
|
27809
|
-
|
|
27789
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
27790
|
+
resolve(value);
|
|
27810
27791
|
});
|
|
27811
27792
|
}
|
|
27812
|
-
return new (P || (P = Promise))(function(
|
|
27793
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
27813
27794
|
function fulfilled(value) {
|
|
27814
27795
|
try {
|
|
27815
27796
|
step(generator.next(value));
|
|
@@ -27825,7 +27806,7 @@ var require_TopUpsAPI = __commonJS(function(exports) {
|
|
|
27825
27806
|
}
|
|
27826
27807
|
}
|
|
27827
27808
|
function step(result) {
|
|
27828
|
-
result.done ?
|
|
27809
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
27829
27810
|
}
|
|
27830
27811
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
27831
27812
|
});
|
|
@@ -27939,11 +27920,11 @@ var require_TopUpsAPI = __commonJS(function(exports) {
|
|
|
27939
27920
|
var require_TrialPerSkuAPI = __commonJS(function(exports) {
|
|
27940
27921
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
27941
27922
|
function adopt(value) {
|
|
27942
|
-
return value instanceof P ? value : new P(function(
|
|
27943
|
-
|
|
27923
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
27924
|
+
resolve(value);
|
|
27944
27925
|
});
|
|
27945
27926
|
}
|
|
27946
|
-
return new (P || (P = Promise))(function(
|
|
27927
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
27947
27928
|
function fulfilled(value) {
|
|
27948
27929
|
try {
|
|
27949
27930
|
step(generator.next(value));
|
|
@@ -27959,7 +27940,7 @@ var require_TrialPerSkuAPI = __commonJS(function(exports) {
|
|
|
27959
27940
|
}
|
|
27960
27941
|
}
|
|
27961
27942
|
function step(result) {
|
|
27962
|
-
result.done ?
|
|
27943
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
27963
27944
|
}
|
|
27964
27945
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
27965
27946
|
});
|
|
@@ -28139,7 +28120,7 @@ var package_default = {
|
|
|
28139
28120
|
name: "@uipath/platform-tool",
|
|
28140
28121
|
author: "UiPath",
|
|
28141
28122
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
28142
|
-
version: "1.
|
|
28123
|
+
version: "1.206.0-preview.279",
|
|
28143
28124
|
description: "Manage UiPath platform-level resources such as tenant licensing.",
|
|
28144
28125
|
publishConfig: {
|
|
28145
28126
|
registry: "https://npm.pkg.github.com/"
|
|
@@ -28157,6 +28138,7 @@ var package_default = {
|
|
|
28157
28138
|
],
|
|
28158
28139
|
scripts: {
|
|
28159
28140
|
build: "bun ../../tools/build-tool.ts",
|
|
28141
|
+
typecheck: "tsc --noEmit",
|
|
28160
28142
|
package: "bun run build && bun pm pack",
|
|
28161
28143
|
test: "vitest run",
|
|
28162
28144
|
"test:coverage": "vitest run --coverage",
|
|
@@ -28307,7 +28289,7 @@ function isBrowser() {
|
|
|
28307
28289
|
}
|
|
28308
28290
|
|
|
28309
28291
|
// ../filesystem/src/node.ts
|
|
28310
|
-
import { randomUUID } from "node:crypto";
|
|
28292
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
28311
28293
|
import { existsSync } from "node:fs";
|
|
28312
28294
|
import * as fs from "node:fs/promises";
|
|
28313
28295
|
import * as os from "node:os";
|
|
@@ -28318,6 +28300,9 @@ var LOCK_MAX_WAIT_MS = 20000;
|
|
|
28318
28300
|
var LOCK_MAX_HOLD_MS = 60000;
|
|
28319
28301
|
var LOCK_RETRY_MIN_MS = 100;
|
|
28320
28302
|
var LOCK_RETRY_JITTER_MS = 200;
|
|
28303
|
+
var HASH_CHUNK_BYTES = 256 * 1024;
|
|
28304
|
+
var hashBuffers = [];
|
|
28305
|
+
var HASH_BUFFERS_KEPT = 64;
|
|
28321
28306
|
|
|
28322
28307
|
class NodeFileSystem {
|
|
28323
28308
|
path = {
|
|
@@ -28336,7 +28321,7 @@ class NodeFileSystem {
|
|
|
28336
28321
|
};
|
|
28337
28322
|
utils = {
|
|
28338
28323
|
open: async (url) => {
|
|
28339
|
-
const { default: open } = await import("./index-
|
|
28324
|
+
const { default: open } = await import("./index-nzr4mx5p.js");
|
|
28340
28325
|
await open(url);
|
|
28341
28326
|
}
|
|
28342
28327
|
};
|
|
@@ -28375,6 +28360,15 @@ class NodeFileSystem {
|
|
|
28375
28360
|
throw error;
|
|
28376
28361
|
}
|
|
28377
28362
|
}
|
|
28363
|
+
async readdirEntries(dirPath) {
|
|
28364
|
+
try {
|
|
28365
|
+
return await fs.readdir(dirPath, { withFileTypes: true });
|
|
28366
|
+
} catch (error) {
|
|
28367
|
+
if (this.isEnoent(error))
|
|
28368
|
+
return [];
|
|
28369
|
+
throw error;
|
|
28370
|
+
}
|
|
28371
|
+
}
|
|
28378
28372
|
async stat(filePath) {
|
|
28379
28373
|
try {
|
|
28380
28374
|
const stats = await fs.stat(filePath);
|
|
@@ -28382,7 +28376,8 @@ class NodeFileSystem {
|
|
|
28382
28376
|
isFile: () => stats.isFile(),
|
|
28383
28377
|
isDirectory: () => stats.isDirectory(),
|
|
28384
28378
|
size: stats.size,
|
|
28385
|
-
mtimeMs: stats.mtimeMs
|
|
28379
|
+
mtimeMs: stats.mtimeMs,
|
|
28380
|
+
ctimeMs: stats.ctimeMs
|
|
28386
28381
|
};
|
|
28387
28382
|
} catch (error) {
|
|
28388
28383
|
if (this.isEnoent(error))
|
|
@@ -28496,6 +28491,42 @@ class NodeFileSystem {
|
|
|
28496
28491
|
throw error;
|
|
28497
28492
|
}
|
|
28498
28493
|
}
|
|
28494
|
+
async hashFile(filePath) {
|
|
28495
|
+
let handle;
|
|
28496
|
+
try {
|
|
28497
|
+
handle = await fs.open(filePath, "r");
|
|
28498
|
+
} catch (error) {
|
|
28499
|
+
if (this.isEnoent(error))
|
|
28500
|
+
return null;
|
|
28501
|
+
throw error;
|
|
28502
|
+
}
|
|
28503
|
+
const buffer = hashBuffers.pop() ?? Buffer.allocUnsafe(HASH_CHUNK_BYTES);
|
|
28504
|
+
try {
|
|
28505
|
+
const opened = await handle.stat();
|
|
28506
|
+
const stats = {
|
|
28507
|
+
isFile: () => opened.isFile(),
|
|
28508
|
+
isDirectory: () => opened.isDirectory(),
|
|
28509
|
+
size: opened.size,
|
|
28510
|
+
mtimeMs: opened.mtimeMs,
|
|
28511
|
+
ctimeMs: opened.ctimeMs
|
|
28512
|
+
};
|
|
28513
|
+
const hash = createHash("sha256");
|
|
28514
|
+
let size = 0;
|
|
28515
|
+
for (;; ) {
|
|
28516
|
+
const { bytesRead } = await handle.read(buffer, 0, buffer.byteLength, null);
|
|
28517
|
+
if (bytesRead === 0)
|
|
28518
|
+
break;
|
|
28519
|
+
hash.update(buffer.subarray(0, bytesRead));
|
|
28520
|
+
size += bytesRead;
|
|
28521
|
+
}
|
|
28522
|
+
return { sha256: hash.digest("hex"), size, stats };
|
|
28523
|
+
} finally {
|
|
28524
|
+
if (hashBuffers.length < HASH_BUFFERS_KEPT) {
|
|
28525
|
+
hashBuffers.push(buffer);
|
|
28526
|
+
}
|
|
28527
|
+
await handle.close();
|
|
28528
|
+
}
|
|
28529
|
+
}
|
|
28499
28530
|
async realpath(filePath) {
|
|
28500
28531
|
try {
|
|
28501
28532
|
return await fs.realpath(filePath);
|
|
@@ -28606,8 +28637,8 @@ function resolveAuthProfileFilePath(profile) {
|
|
|
28606
28637
|
if (normalized === undefined) {
|
|
28607
28638
|
throw new AuthProfileValidationError(`"${DEFAULT_AUTH_PROFILE}" is the built-in profile and does not have a profile file path.`);
|
|
28608
28639
|
}
|
|
28609
|
-
const
|
|
28610
|
-
return
|
|
28640
|
+
const fs = getFileSystem();
|
|
28641
|
+
return fs.path.join(fs.env.homedir(), UIPATH_HOME_DIR, PROFILE_DIR, normalized, AUTH_FILENAME);
|
|
28611
28642
|
}
|
|
28612
28643
|
function getActiveAuthProfileFilePath() {
|
|
28613
28644
|
const profile = getActiveAuthProfile();
|
|
@@ -28780,6 +28811,8 @@ var ENV_AUTH_VARS = {
|
|
|
28780
28811
|
};
|
|
28781
28812
|
|
|
28782
28813
|
class EnvAuthConfigError extends Error {
|
|
28814
|
+
errorCode = "configuration_error";
|
|
28815
|
+
retry = "RetryWillNotFix";
|
|
28783
28816
|
constructor(message) {
|
|
28784
28817
|
super(message);
|
|
28785
28818
|
this.name = "EnvAuthConfigError";
|
|
@@ -28818,11 +28851,11 @@ var readAuthFromEnv = () => {
|
|
|
28818
28851
|
if (!rawUrl) {
|
|
28819
28852
|
throw new EnvAuthConfigError(`${ENV_AUTH_VARS.token} is not a JWT (treating it as an opaque token, ` + `e.g. a Personal Access Token). Set ${OPAQUE_TOKEN_BASE_URL_VAR} to the ` + `UiPath base URL if this is a PAT, or fix the token if it was meant to ` + `be a JWT (parse error: ${parseErrorMessage}).`);
|
|
28820
28853
|
}
|
|
28821
|
-
const
|
|
28854
|
+
const baseUrl = resolveBaseUrl(rawUrl, `Failed to validate ${OPAQUE_TOKEN_BASE_URL_VAR}`);
|
|
28822
28855
|
return {
|
|
28823
28856
|
loginStatus: "Logged in",
|
|
28824
28857
|
accessToken,
|
|
28825
|
-
baseUrl
|
|
28858
|
+
baseUrl,
|
|
28826
28859
|
organizationName,
|
|
28827
28860
|
organizationId,
|
|
28828
28861
|
tenantName,
|
|
@@ -28873,9 +28906,9 @@ function breakerPathFor(authPath) {
|
|
|
28873
28906
|
return `${authPath}${BREAKER_SUFFIX}`;
|
|
28874
28907
|
}
|
|
28875
28908
|
async function loadRefreshBreaker(authPath) {
|
|
28876
|
-
const
|
|
28909
|
+
const fs = getFileSystem();
|
|
28877
28910
|
try {
|
|
28878
|
-
const content = await
|
|
28911
|
+
const content = await fs.readFile(breakerPathFor(authPath), "utf-8");
|
|
28879
28912
|
if (!content)
|
|
28880
28913
|
return {};
|
|
28881
28914
|
const parsed = JSON.parse(content);
|
|
@@ -28886,20 +28919,20 @@ async function loadRefreshBreaker(authPath) {
|
|
|
28886
28919
|
}
|
|
28887
28920
|
async function saveRefreshBreaker(authPath, state) {
|
|
28888
28921
|
try {
|
|
28889
|
-
const
|
|
28890
|
-
const
|
|
28891
|
-
await
|
|
28892
|
-
const tempPath = `${
|
|
28893
|
-
await
|
|
28894
|
-
await
|
|
28922
|
+
const fs = getFileSystem();
|
|
28923
|
+
const path = breakerPathFor(authPath);
|
|
28924
|
+
await fs.mkdir(fs.path.dirname(path));
|
|
28925
|
+
const tempPath = `${path}.tmp`;
|
|
28926
|
+
await fs.writeFile(tempPath, JSON.stringify(state));
|
|
28927
|
+
await fs.rename(tempPath, path);
|
|
28895
28928
|
} catch {}
|
|
28896
28929
|
}
|
|
28897
28930
|
async function clearRefreshBreaker(authPath) {
|
|
28898
|
-
const
|
|
28899
|
-
const
|
|
28931
|
+
const fs = getFileSystem();
|
|
28932
|
+
const path = breakerPathFor(authPath);
|
|
28900
28933
|
try {
|
|
28901
|
-
if (await
|
|
28902
|
-
await
|
|
28934
|
+
if (await fs.exists(path)) {
|
|
28935
|
+
await fs.rm(path);
|
|
28903
28936
|
}
|
|
28904
28937
|
} catch {}
|
|
28905
28938
|
}
|
|
@@ -28920,13 +28953,13 @@ var ROBOT_USER_SERVICES_PIPE = "UiPathUserServices";
|
|
|
28920
28953
|
var ROBOT_USER_SERVICES_ALTERNATE_PIPE = `${ROBOT_USER_SERVICES_PIPE}Alternate`;
|
|
28921
28954
|
var PIPE_NAME_MAX_LENGTH = 103;
|
|
28922
28955
|
var getRobotIpcPipeNames = async () => {
|
|
28923
|
-
const
|
|
28924
|
-
const username =
|
|
28956
|
+
const fs = getFileSystem();
|
|
28957
|
+
const username = fs.env.getenv("USER") ?? fs.env.getenv("USERNAME");
|
|
28925
28958
|
if (!username) {
|
|
28926
28959
|
throw new Error("Unable to determine current username");
|
|
28927
28960
|
}
|
|
28928
|
-
const tempPath =
|
|
28929
|
-
return [ROBOT_USER_SERVICES_PIPE, ROBOT_USER_SERVICES_ALTERNATE_PIPE].map((baseName) =>
|
|
28961
|
+
const tempPath = fs.env.getenv("TMPDIR") ?? "/tmp/";
|
|
28962
|
+
return [ROBOT_USER_SERVICES_PIPE, ROBOT_USER_SERVICES_ALTERNATE_PIPE].map((baseName) => fs.path.join(tempPath, `${baseName}_${username}`).substring(0, PIPE_NAME_MAX_LENGTH));
|
|
28930
28963
|
};
|
|
28931
28964
|
var defaultIsRobotIpcAvailable = async () => {
|
|
28932
28965
|
if (process.platform === "win32") {
|
|
@@ -28936,20 +28969,20 @@ var defaultIsRobotIpcAvailable = async () => {
|
|
|
28936
28969
|
if (pipeNamesError || !pipeNames) {
|
|
28937
28970
|
return false;
|
|
28938
28971
|
}
|
|
28939
|
-
const
|
|
28972
|
+
const fs = getFileSystem();
|
|
28940
28973
|
for (const pipeName of pipeNames) {
|
|
28941
|
-
const [existsError, exists] = await catchError(
|
|
28974
|
+
const [existsError, exists] = await catchError(fs.exists(pipeName));
|
|
28942
28975
|
if (!existsError && exists === true) {
|
|
28943
28976
|
return true;
|
|
28944
28977
|
}
|
|
28945
28978
|
}
|
|
28946
28979
|
return false;
|
|
28947
28980
|
};
|
|
28948
|
-
var withTimeout = (promise, timeoutMs) => new Promise((
|
|
28981
|
+
var withTimeout = (promise, timeoutMs) => new Promise((resolve, reject) => {
|
|
28949
28982
|
const timer = setTimeout(() => reject(new Error(`Robot IPC call timed out after ${timeoutMs}ms`)), timeoutMs);
|
|
28950
28983
|
promise.then((value) => {
|
|
28951
28984
|
clearTimeout(timer);
|
|
28952
|
-
|
|
28985
|
+
resolve(value);
|
|
28953
28986
|
}, (error) => {
|
|
28954
28987
|
clearTimeout(timer);
|
|
28955
28988
|
reject(error);
|
|
@@ -29122,9 +29155,12 @@ var refreshAccessToken = async ({
|
|
|
29122
29155
|
body: tokenParams
|
|
29123
29156
|
});
|
|
29124
29157
|
const tokenData = await tokenResponse.json();
|
|
29125
|
-
if (
|
|
29158
|
+
if (tokenResponse.status === 400 || tokenResponse.status === 401) {
|
|
29126
29159
|
throw new TokenRefreshOAuthError;
|
|
29127
29160
|
}
|
|
29161
|
+
if (!tokenResponse.ok) {
|
|
29162
|
+
throw new Error(`Token refresh failed: HTTP ${tokenResponse.status}`);
|
|
29163
|
+
}
|
|
29128
29164
|
const newAccessToken = tokenData.access_token;
|
|
29129
29165
|
const newRefreshToken = tokenData.refresh_token;
|
|
29130
29166
|
if (typeof newAccessToken !== "string" || typeof newRefreshToken !== "string") {
|
|
@@ -29156,9 +29192,9 @@ var errorCode = (err) => {
|
|
|
29156
29192
|
}
|
|
29157
29193
|
return "EUNKNOWN";
|
|
29158
29194
|
};
|
|
29159
|
-
var probeAsync = async (
|
|
29195
|
+
var probeAsync = async (fs, candidate) => {
|
|
29160
29196
|
try {
|
|
29161
|
-
const stats = await
|
|
29197
|
+
const stats = await fs.stat(candidate);
|
|
29162
29198
|
if (stats === null) {
|
|
29163
29199
|
return { exists: false };
|
|
29164
29200
|
}
|
|
@@ -29185,36 +29221,36 @@ var probeAsync = async (fs2, candidate) => {
|
|
|
29185
29221
|
}
|
|
29186
29222
|
};
|
|
29187
29223
|
var resolveEnvFileLocationAsync = async (envFilePath = DEFAULT_ENV_FILENAME, opts) => {
|
|
29188
|
-
const
|
|
29189
|
-
if (
|
|
29190
|
-
const
|
|
29191
|
-
return
|
|
29224
|
+
const fs = getFileSystem();
|
|
29225
|
+
if (fs.path.isAbsolute(envFilePath)) {
|
|
29226
|
+
const probe = await probeAsync(fs, envFilePath);
|
|
29227
|
+
return probe.exists ? { exists: true, absolutePath: envFilePath, source: "absolute" } : {
|
|
29192
29228
|
exists: false,
|
|
29193
29229
|
absolutePath: envFilePath,
|
|
29194
29230
|
source: "absolute",
|
|
29195
|
-
...
|
|
29231
|
+
...probe.unusable ? { unusable: probe.unusable } : {}
|
|
29196
29232
|
};
|
|
29197
29233
|
}
|
|
29198
|
-
const cwd = opts?.cwd ??
|
|
29234
|
+
const cwd = opts?.cwd ?? fs.env.cwd();
|
|
29199
29235
|
let searchDir = cwd;
|
|
29200
29236
|
while (true) {
|
|
29201
|
-
const candidate =
|
|
29202
|
-
const
|
|
29203
|
-
if (
|
|
29237
|
+
const candidate = fs.path.join(searchDir, envFilePath);
|
|
29238
|
+
const probe = await probeAsync(fs, candidate);
|
|
29239
|
+
if (probe.exists) {
|
|
29204
29240
|
return {
|
|
29205
29241
|
exists: true,
|
|
29206
29242
|
absolutePath: candidate,
|
|
29207
29243
|
source: searchDir === cwd ? "cwd" : "ancestor"
|
|
29208
29244
|
};
|
|
29209
29245
|
}
|
|
29210
|
-
const parentDir =
|
|
29246
|
+
const parentDir = fs.path.dirname(searchDir);
|
|
29211
29247
|
if (parentDir === searchDir) {
|
|
29212
29248
|
break;
|
|
29213
29249
|
}
|
|
29214
29250
|
searchDir = parentDir;
|
|
29215
29251
|
}
|
|
29216
|
-
const homePath =
|
|
29217
|
-
const probe = await probeAsync(
|
|
29252
|
+
const homePath = fs.path.join(fs.env.homedir(), envFilePath);
|
|
29253
|
+
const probe = await probeAsync(fs, homePath);
|
|
29218
29254
|
if (probe.exists) {
|
|
29219
29255
|
return { exists: true, absolutePath: homePath, source: "home" };
|
|
29220
29256
|
}
|
|
@@ -29257,12 +29293,12 @@ var parseEnvContent = (content) => {
|
|
|
29257
29293
|
return env;
|
|
29258
29294
|
};
|
|
29259
29295
|
var loadEnvFileAsync = async ({ envPath }) => {
|
|
29260
|
-
const
|
|
29261
|
-
const absolutePath =
|
|
29262
|
-
if (!await
|
|
29296
|
+
const fs = getFileSystem();
|
|
29297
|
+
const absolutePath = fs.path.isAbsolute(envPath) ? envPath : fs.path.join(fs.env.cwd(), envPath);
|
|
29298
|
+
if (!await fs.exists(absolutePath)) {
|
|
29263
29299
|
throw new Error(`Environment file not found: ${envPath}`);
|
|
29264
29300
|
}
|
|
29265
|
-
const content = await
|
|
29301
|
+
const content = await fs.readFile(absolutePath, "utf-8");
|
|
29266
29302
|
if (content === null) {
|
|
29267
29303
|
throw new Error(`Environment file not found: ${envPath}`);
|
|
29268
29304
|
}
|
|
@@ -29273,10 +29309,10 @@ var saveEnvFileAsync = async ({
|
|
|
29273
29309
|
data,
|
|
29274
29310
|
merge = true
|
|
29275
29311
|
}) => {
|
|
29276
|
-
const
|
|
29277
|
-
const absolutePath =
|
|
29312
|
+
const fs = getFileSystem();
|
|
29313
|
+
const absolutePath = fs.path.isAbsolute(envPath) ? envPath : fs.path.join(fs.env.homedir(), envPath);
|
|
29278
29314
|
let existingData = {};
|
|
29279
|
-
if (merge && await
|
|
29315
|
+
if (merge && await fs.exists(absolutePath)) {
|
|
29280
29316
|
try {
|
|
29281
29317
|
existingData = await loadEnvFileAsync({ envPath: absolutePath });
|
|
29282
29318
|
} catch {}
|
|
@@ -29294,11 +29330,11 @@ var saveEnvFileAsync = async ({
|
|
|
29294
29330
|
const content = `${lines.join(`
|
|
29295
29331
|
`)}
|
|
29296
29332
|
`;
|
|
29297
|
-
const dir =
|
|
29298
|
-
await
|
|
29333
|
+
const dir = fs.path.dirname(absolutePath);
|
|
29334
|
+
await fs.mkdir(dir);
|
|
29299
29335
|
const tempPath = `${absolutePath}.tmp`;
|
|
29300
|
-
await
|
|
29301
|
-
await
|
|
29336
|
+
await fs.writeFile(tempPath, content);
|
|
29337
|
+
await fs.rename(tempPath, absolutePath);
|
|
29302
29338
|
};
|
|
29303
29339
|
|
|
29304
29340
|
// ../auth/src/loginStatus.ts
|
|
@@ -29422,11 +29458,11 @@ async function loadFileCredentials(loadEnvFile, absolutePath) {
|
|
|
29422
29458
|
return { credentials };
|
|
29423
29459
|
}
|
|
29424
29460
|
async function getGlobalCredsHint(getFs, loadEnvFile, absolutePath, envFilePath) {
|
|
29425
|
-
const
|
|
29426
|
-
const globalPath =
|
|
29461
|
+
const fs = getFs();
|
|
29462
|
+
const globalPath = fs.path.join(fs.env.homedir(), envFilePath);
|
|
29427
29463
|
if (absolutePath === globalPath)
|
|
29428
29464
|
return;
|
|
29429
|
-
if (!await
|
|
29465
|
+
if (!await fs.exists(globalPath))
|
|
29430
29466
|
return;
|
|
29431
29467
|
try {
|
|
29432
29468
|
const globalCreds = await loadEnvFile({ envPath: globalPath });
|
|
@@ -29843,26 +29879,38 @@ function errorMessage(error) {
|
|
|
29843
29879
|
}
|
|
29844
29880
|
|
|
29845
29881
|
// ../auth/src/authContext.ts
|
|
29882
|
+
class AuthContextUnavailableError extends Error {
|
|
29883
|
+
instructionContext;
|
|
29884
|
+
sessionHint;
|
|
29885
|
+
errorCode = "authentication_required";
|
|
29886
|
+
retry = "RetryWillNotFix";
|
|
29887
|
+
constructor(message, instructionContext = "auth", sessionHint) {
|
|
29888
|
+
super(message);
|
|
29889
|
+
this.instructionContext = instructionContext;
|
|
29890
|
+
this.sessionHint = sessionHint;
|
|
29891
|
+
this.name = "AuthContextUnavailableError";
|
|
29892
|
+
}
|
|
29893
|
+
}
|
|
29846
29894
|
var getAuthContext = async (options = {}) => {
|
|
29847
29895
|
const status = await getLoginStatusAsync({
|
|
29848
29896
|
ensureTokenValidityMinutes: options.ensureTokenValidityMinutes,
|
|
29849
29897
|
envFilePath: options.envFilePath
|
|
29850
29898
|
});
|
|
29851
29899
|
if (status.loginStatus !== "Logged in" || !status.baseUrl || !status.accessToken) {
|
|
29852
|
-
throw new
|
|
29900
|
+
throw new AuthContextUnavailableError(status.hint ? `Not logged in. ${status.hint}` : "Not logged in. Run 'uip login' first.", "auth", status.hint);
|
|
29853
29901
|
}
|
|
29854
|
-
const tenantName = options.tenant
|
|
29902
|
+
const tenantName = options.tenant || status.tenantName;
|
|
29855
29903
|
if (options.requireOrganizationId && !status.organizationId) {
|
|
29856
|
-
throw new
|
|
29904
|
+
throw new AuthContextUnavailableError("Organization ID not available. Ensure you are logged in with an organization context.", "identity");
|
|
29857
29905
|
}
|
|
29858
29906
|
if (options.requireOrganizationName && !status.organizationName) {
|
|
29859
|
-
throw new
|
|
29907
|
+
throw new AuthContextUnavailableError("Organization name not available. Ensure you are logged in with an organization context.", "identity");
|
|
29860
29908
|
}
|
|
29861
29909
|
if (options.requireTenantId && !status.tenantId) {
|
|
29862
|
-
throw new
|
|
29910
|
+
throw new AuthContextUnavailableError(`Tenant ID not available. Ensure UIPATH_TENANT_ID is set.${status.hint ? ` ${status.hint}` : ""}`, "identity", status.hint);
|
|
29863
29911
|
}
|
|
29864
|
-
if (options.requireTenantName && tenantName
|
|
29865
|
-
throw new
|
|
29912
|
+
if (options.requireTenantName && !tenantName) {
|
|
29913
|
+
throw new AuthContextUnavailableError("Tenant not provided and UIPATH_TENANT_NAME not set. Run 'uip login' to select a tenant, or use 'uip login tenant set <tenant>' to switch tenants.", "identity");
|
|
29866
29914
|
}
|
|
29867
29915
|
return {
|
|
29868
29916
|
baseUrl: status.baseUrl,
|
|
@@ -29881,6 +29929,208 @@ var TENANT_SELECTION_CODES = new Set([
|
|
|
29881
29929
|
TENANT_SELECTION_REQUIRED_CODE,
|
|
29882
29930
|
INVALID_TENANT_CODE
|
|
29883
29931
|
]);
|
|
29932
|
+
// ../common/src/telemetry/telemetry-dimensions.ts
|
|
29933
|
+
var BaseDimensions = {
|
|
29934
|
+
ApplicationName: "ApplicationName",
|
|
29935
|
+
ProductVersion: "ProductVersion",
|
|
29936
|
+
InstallationId: "InstallationId",
|
|
29937
|
+
CloudUserId: "CloudUserId",
|
|
29938
|
+
CloudTenantId: "CloudTenantId",
|
|
29939
|
+
CloudOrganizationId: "CloudOrganizationId",
|
|
29940
|
+
IsInternalUser: "IsInternalUser",
|
|
29941
|
+
Environment: "Environment",
|
|
29942
|
+
BaseUrl: "BaseUrl",
|
|
29943
|
+
Region: "Region",
|
|
29944
|
+
Agent: "Agent",
|
|
29945
|
+
AgentVersion: "AgentVersion",
|
|
29946
|
+
AgentModel: "AgentModel",
|
|
29947
|
+
ToolName: "ToolName",
|
|
29948
|
+
ToolVersion: "ToolVersion",
|
|
29949
|
+
ExecutionContext: "ExecutionContext",
|
|
29950
|
+
CiProvider: "CiProvider",
|
|
29951
|
+
SessionIdSource: "SessionIdSource",
|
|
29952
|
+
SessionId: "SessionId"
|
|
29953
|
+
};
|
|
29954
|
+
var CommandDimensions = {
|
|
29955
|
+
IsCommand: "IsCommand",
|
|
29956
|
+
IsReexec: "IsReexec",
|
|
29957
|
+
CommandName: "CommandName",
|
|
29958
|
+
ExitCode: "ExitCode",
|
|
29959
|
+
TerminalOutcome: "TerminalOutcome",
|
|
29960
|
+
ErrorClass: "ErrorClass",
|
|
29961
|
+
TerminalSignal: "TerminalSignal",
|
|
29962
|
+
ErrorMessage: "ErrorMessage",
|
|
29963
|
+
SkillName: "SkillName",
|
|
29964
|
+
ProductArea: "ProductArea",
|
|
29965
|
+
Mode: "Mode"
|
|
29966
|
+
};
|
|
29967
|
+
var ProjectDimensions = {
|
|
29968
|
+
ProjectKey: "ProjectKey",
|
|
29969
|
+
ProjectType: "ProjectType",
|
|
29970
|
+
ProjectIdentityStatus: "ProjectIdentityStatus",
|
|
29971
|
+
SolutionKey: "SolutionKey",
|
|
29972
|
+
SolutionProjectKey: "SolutionProjectKey",
|
|
29973
|
+
SolutionIdentityStatus: "SolutionIdentityStatus",
|
|
29974
|
+
PreviousSolutionKey: "PreviousSolutionKey"
|
|
29975
|
+
};
|
|
29976
|
+
var GUID_KEY_DIMENSIONS = new Set([
|
|
29977
|
+
ProjectDimensions.ProjectKey,
|
|
29978
|
+
ProjectDimensions.SolutionKey,
|
|
29979
|
+
ProjectDimensions.SolutionProjectKey,
|
|
29980
|
+
ProjectDimensions.PreviousSolutionKey
|
|
29981
|
+
]);
|
|
29982
|
+
var ShipDimensions = {
|
|
29983
|
+
ShipKind: "ShipKind",
|
|
29984
|
+
Target: "Target",
|
|
29985
|
+
ProjectType: "ProjectType",
|
|
29986
|
+
ProjectTypes: "ProjectTypes",
|
|
29987
|
+
ArtifactCorrelationKey: "ArtifactCorrelationKey",
|
|
29988
|
+
PackageName: "PackageName",
|
|
29989
|
+
PackageVersion: "PackageVersion",
|
|
29990
|
+
PackageVersionKey: "PackageVersionKey",
|
|
29991
|
+
DeploymentKey: "DeploymentKey",
|
|
29992
|
+
SolutionId: "SolutionId",
|
|
29993
|
+
FolderKey: "FolderKey",
|
|
29994
|
+
FeedId: "FeedId"
|
|
29995
|
+
};
|
|
29996
|
+
var ErrorDimensions = {
|
|
29997
|
+
Result: "Result",
|
|
29998
|
+
ErrorCode: "ErrorCode",
|
|
29999
|
+
Retry: "Retry",
|
|
30000
|
+
ErrorMessage: "ErrorMessage",
|
|
30001
|
+
HttpStatus: "HttpStatus",
|
|
30002
|
+
UpstreamErrorCode: "UpstreamErrorCode"
|
|
30003
|
+
};
|
|
30004
|
+
var AuthDimensions = {
|
|
30005
|
+
AuthenticationMethod: "AuthenticationMethod",
|
|
30006
|
+
Success: "Success",
|
|
30007
|
+
Reason: "Reason"
|
|
30008
|
+
};
|
|
30009
|
+
var SkillsDimensions = {
|
|
30010
|
+
SchemaVersion: "SchemaVersion",
|
|
30011
|
+
AgentType: "AgentType",
|
|
30012
|
+
SkillsVersion: "SkillsVersion",
|
|
30013
|
+
UipSubcommand: "UipSubcommand",
|
|
30014
|
+
FileExtension: "FileExtension",
|
|
30015
|
+
SubagentModel: "SubagentModel",
|
|
30016
|
+
SubagentType: "SubagentType",
|
|
30017
|
+
PermissionMode: "PermissionMode",
|
|
30018
|
+
EffortLevel: "EffortLevel",
|
|
30019
|
+
SessionSource: "SessionSource",
|
|
30020
|
+
Outcome: "Outcome",
|
|
30021
|
+
DurationMs: "DurationMs",
|
|
30022
|
+
Source: "Source"
|
|
30023
|
+
};
|
|
30024
|
+
var PackagerDimensions = {
|
|
30025
|
+
ProjectId: "ProjectId",
|
|
30026
|
+
ProjectType: "ProjectType",
|
|
30027
|
+
SolutionId: "SolutionId"
|
|
30028
|
+
};
|
|
30029
|
+
var ScopeDimensions = {
|
|
30030
|
+
FolderId: "FolderId"
|
|
30031
|
+
};
|
|
30032
|
+
var ID_DIMENSIONS = new Set([
|
|
30033
|
+
BaseDimensions.CloudUserId,
|
|
30034
|
+
BaseDimensions.CloudTenantId,
|
|
30035
|
+
BaseDimensions.CloudOrganizationId,
|
|
30036
|
+
BaseDimensions.InstallationId,
|
|
30037
|
+
ShipDimensions.ArtifactCorrelationKey,
|
|
30038
|
+
ShipDimensions.PackageVersionKey,
|
|
30039
|
+
ShipDimensions.DeploymentKey,
|
|
30040
|
+
ShipDimensions.SolutionId,
|
|
30041
|
+
ShipDimensions.FolderKey,
|
|
30042
|
+
ShipDimensions.FeedId,
|
|
30043
|
+
PackagerDimensions.ProjectId
|
|
30044
|
+
]);
|
|
30045
|
+
var NON_IDENTIFIER_PLACEHOLDER_PATTERN = /^(?:\[[A-Z_]+\]|<[^>]+>)$/;
|
|
30046
|
+
var RESERVED_DIMENSION_NAMES = new Set([
|
|
30047
|
+
...Object.values(BaseDimensions),
|
|
30048
|
+
...Object.values(CommandDimensions),
|
|
30049
|
+
...Object.values(ShipDimensions),
|
|
30050
|
+
...Object.values(ProjectDimensions),
|
|
30051
|
+
...Object.values(ErrorDimensions),
|
|
30052
|
+
...Object.values(AuthDimensions),
|
|
30053
|
+
...Object.values(SkillsDimensions),
|
|
30054
|
+
...Object.values(PackagerDimensions),
|
|
30055
|
+
...Object.values(ScopeDimensions)
|
|
30056
|
+
]);
|
|
30057
|
+
var CURATED_DIMENSIONS = new Set([
|
|
30058
|
+
BaseDimensions.ApplicationName,
|
|
30059
|
+
BaseDimensions.ProductVersion,
|
|
30060
|
+
BaseDimensions.InstallationId,
|
|
30061
|
+
BaseDimensions.CloudUserId,
|
|
30062
|
+
BaseDimensions.CloudTenantId,
|
|
30063
|
+
BaseDimensions.CloudOrganizationId,
|
|
30064
|
+
BaseDimensions.IsInternalUser,
|
|
30065
|
+
BaseDimensions.Environment,
|
|
30066
|
+
BaseDimensions.BaseUrl,
|
|
30067
|
+
BaseDimensions.Region,
|
|
30068
|
+
BaseDimensions.Agent,
|
|
30069
|
+
BaseDimensions.AgentVersion,
|
|
30070
|
+
BaseDimensions.ToolVersion,
|
|
30071
|
+
BaseDimensions.ExecutionContext,
|
|
30072
|
+
BaseDimensions.CiProvider,
|
|
30073
|
+
BaseDimensions.SessionIdSource,
|
|
30074
|
+
BaseDimensions.SessionId,
|
|
30075
|
+
...Object.values(CommandDimensions),
|
|
30076
|
+
...Object.values(ShipDimensions),
|
|
30077
|
+
...Object.values(ProjectDimensions)
|
|
30078
|
+
]);
|
|
30079
|
+
function lowercaseIdDimensionValues(properties) {
|
|
30080
|
+
let changed = false;
|
|
30081
|
+
const result = {
|
|
30082
|
+
...properties
|
|
30083
|
+
};
|
|
30084
|
+
for (const key of Object.keys(result)) {
|
|
30085
|
+
const value = result[key];
|
|
30086
|
+
if (!ID_DIMENSIONS.has(key) || typeof value !== "string" || NON_IDENTIFIER_PLACEHOLDER_PATTERN.test(value)) {
|
|
30087
|
+
continue;
|
|
30088
|
+
}
|
|
30089
|
+
const lowered = value.toLowerCase();
|
|
30090
|
+
if (lowered !== value) {
|
|
30091
|
+
result[key] = lowered;
|
|
30092
|
+
changed = true;
|
|
30093
|
+
}
|
|
30094
|
+
}
|
|
30095
|
+
return changed ? result : properties;
|
|
30096
|
+
}
|
|
30097
|
+
|
|
30098
|
+
// ../common/src/telemetry/project-identity.ts
|
|
30099
|
+
function projectKey(id) {
|
|
30100
|
+
if (typeof id !== "string")
|
|
30101
|
+
return;
|
|
30102
|
+
const key = id.trim().toLowerCase().replaceAll("-", "");
|
|
30103
|
+
return /^[0-9a-f]{32}$/.test(key) ? key : undefined;
|
|
30104
|
+
}
|
|
30105
|
+
function projectIdentityProperties(identity) {
|
|
30106
|
+
const key = identity.id ? projectKey(identity.id) : undefined;
|
|
30107
|
+
return {
|
|
30108
|
+
[ProjectDimensions.ProjectIdentityStatus]: identity.status === "resolved" && !key ? "invalid" : identity.status,
|
|
30109
|
+
[ProjectDimensions.ProjectType]: identity.projectType,
|
|
30110
|
+
...identity.status === "resolved" && key ? {
|
|
30111
|
+
[ProjectDimensions.ProjectKey]: key
|
|
30112
|
+
} : {}
|
|
30113
|
+
};
|
|
30114
|
+
}
|
|
30115
|
+
var PROJECT_IDENTITY_LOOKUP_BUDGET_MS = 1000;
|
|
30116
|
+
async function withinProjectIdentityBudget(work, onTimeout) {
|
|
30117
|
+
work.catch(() => {
|
|
30118
|
+
return;
|
|
30119
|
+
});
|
|
30120
|
+
let timer;
|
|
30121
|
+
const expired = new Promise((resolve) => {
|
|
30122
|
+
timer = setTimeout(() => {
|
|
30123
|
+
onTimeout?.();
|
|
30124
|
+
resolve(undefined);
|
|
30125
|
+
}, PROJECT_IDENTITY_LOOKUP_BUDGET_MS);
|
|
30126
|
+
});
|
|
30127
|
+
try {
|
|
30128
|
+
return await Promise.race([work, expired]);
|
|
30129
|
+
} finally {
|
|
30130
|
+
clearTimeout(timer);
|
|
30131
|
+
}
|
|
30132
|
+
}
|
|
30133
|
+
|
|
29884
30134
|
// ../common/src/telemetry/pseudonymize.ts
|
|
29885
30135
|
var PSEUDONYM_DOMAIN = "uipath-cli/telemetry/pseudonym/v1:";
|
|
29886
30136
|
var PSEUDONYM_HEX_LENGTH = 32;
|
|
@@ -30249,8 +30499,8 @@ function redactValueDetectors(value, maxLength = MAX_VALUE_LENGTH) {
|
|
|
30249
30499
|
return `${redactUrl(core)}${trailing}`;
|
|
30250
30500
|
});
|
|
30251
30501
|
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
30252
|
-
out = out.replace(UNC_PATH_PATTERN, (_match, before,
|
|
30253
|
-
const [core, trailing] = peelTrailingPunctuation(
|
|
30502
|
+
out = out.replace(UNC_PATH_PATTERN, (_match, before, path) => {
|
|
30503
|
+
const [core, trailing] = peelTrailingPunctuation(path);
|
|
30254
30504
|
return `${before}unc#${pseudonymize(core)}${trailing}`;
|
|
30255
30505
|
});
|
|
30256
30506
|
out = out.replace(EMAIL_PATTERN, (match) => `email#${pseudonymize(match)}`);
|
|
@@ -30344,6 +30594,8 @@ function redactProperty(name, value) {
|
|
|
30344
30594
|
if (isSensitiveName(name)) {
|
|
30345
30595
|
return REDACTED;
|
|
30346
30596
|
}
|
|
30597
|
+
if (GUID_KEY_DIMENSIONS.has(name))
|
|
30598
|
+
return projectKey(value);
|
|
30347
30599
|
if (typeof value === "boolean" || typeof value === "number") {
|
|
30348
30600
|
return value;
|
|
30349
30601
|
}
|
|
@@ -30418,6 +30670,63 @@ function settlePromiseLike2(thenable) {
|
|
|
30418
30670
|
return Promise.resolve(thenable).then((data) => [undefined, data]).catch((error) => [toError(error), undefined]);
|
|
30419
30671
|
}
|
|
30420
30672
|
|
|
30673
|
+
// ../common/src/error-codes.ts
|
|
30674
|
+
var CLI_ERROR_CODES = [
|
|
30675
|
+
"invalid_argument",
|
|
30676
|
+
"authentication_required",
|
|
30677
|
+
"permission_denied",
|
|
30678
|
+
"local_permission_denied",
|
|
30679
|
+
"not_found",
|
|
30680
|
+
"rate_limited",
|
|
30681
|
+
"network_error",
|
|
30682
|
+
"timeout",
|
|
30683
|
+
"server_error",
|
|
30684
|
+
"method_not_allowed",
|
|
30685
|
+
"not_supported",
|
|
30686
|
+
"configuration_error",
|
|
30687
|
+
"execution_failed",
|
|
30688
|
+
"unknown_error"
|
|
30689
|
+
];
|
|
30690
|
+
var RETRY_HINTS = [
|
|
30691
|
+
"RetryWillNotFix",
|
|
30692
|
+
"RetryLater",
|
|
30693
|
+
"RetryAfter1Second",
|
|
30694
|
+
"RetryAfter10Seconds",
|
|
30695
|
+
"RetryAfter30Seconds",
|
|
30696
|
+
"RetryAfter60Seconds"
|
|
30697
|
+
];
|
|
30698
|
+
var CLI_ERROR_CODE_VALUES = new Set(CLI_ERROR_CODES);
|
|
30699
|
+
var RETRY_HINT_VALUES = new Set(RETRY_HINTS);
|
|
30700
|
+
function isCliErrorCode(value) {
|
|
30701
|
+
return typeof value === "string" && CLI_ERROR_CODE_VALUES.has(value);
|
|
30702
|
+
}
|
|
30703
|
+
function isRetryHint(value) {
|
|
30704
|
+
return typeof value === "string" && RETRY_HINT_VALUES.has(value);
|
|
30705
|
+
}
|
|
30706
|
+
function carriedErrorCode(error) {
|
|
30707
|
+
if (!error || typeof error !== "object")
|
|
30708
|
+
return;
|
|
30709
|
+
const code = error.errorCode;
|
|
30710
|
+
return isCliErrorCode(code) ? code : undefined;
|
|
30711
|
+
}
|
|
30712
|
+
function carriedRetry(error) {
|
|
30713
|
+
if (!error || typeof error !== "object")
|
|
30714
|
+
return;
|
|
30715
|
+
const retry = error.retry;
|
|
30716
|
+
return isRetryHint(retry) ? retry : undefined;
|
|
30717
|
+
}
|
|
30718
|
+
function defaultRetryForErrorCode(errorCode) {
|
|
30719
|
+
switch (errorCode) {
|
|
30720
|
+
case "network_error":
|
|
30721
|
+
case "rate_limited":
|
|
30722
|
+
case "server_error":
|
|
30723
|
+
case "timeout":
|
|
30724
|
+
return "RetryLater";
|
|
30725
|
+
default:
|
|
30726
|
+
return "RetryWillNotFix";
|
|
30727
|
+
}
|
|
30728
|
+
}
|
|
30729
|
+
|
|
30421
30730
|
// ../common/src/error-graph.ts
|
|
30422
30731
|
function* walkErrorGraph(error) {
|
|
30423
30732
|
const queue = [error];
|
|
@@ -30462,6 +30771,40 @@ function findHttpStatusInGraph(error) {
|
|
|
30462
30771
|
return;
|
|
30463
30772
|
}
|
|
30464
30773
|
|
|
30774
|
+
// ../common/src/http-status.ts
|
|
30775
|
+
function classifyHttpStatus(status) {
|
|
30776
|
+
if (status === undefined)
|
|
30777
|
+
return;
|
|
30778
|
+
if (status === 400 || status === 409 || status === 413 || status === 422) {
|
|
30779
|
+
return { errorCode: "invalid_argument", retry: "RetryWillNotFix" };
|
|
30780
|
+
}
|
|
30781
|
+
if (status === 401) {
|
|
30782
|
+
return {
|
|
30783
|
+
errorCode: "authentication_required",
|
|
30784
|
+
retry: "RetryWillNotFix"
|
|
30785
|
+
};
|
|
30786
|
+
}
|
|
30787
|
+
if (status === 403) {
|
|
30788
|
+
return { errorCode: "permission_denied", retry: "RetryWillNotFix" };
|
|
30789
|
+
}
|
|
30790
|
+
if (status === 404) {
|
|
30791
|
+
return { errorCode: "not_found", retry: "RetryWillNotFix" };
|
|
30792
|
+
}
|
|
30793
|
+
if (status === 405) {
|
|
30794
|
+
return { errorCode: "method_not_allowed", retry: "RetryWillNotFix" };
|
|
30795
|
+
}
|
|
30796
|
+
if (status === 408) {
|
|
30797
|
+
return { errorCode: "timeout", retry: "RetryLater" };
|
|
30798
|
+
}
|
|
30799
|
+
if (status === 429) {
|
|
30800
|
+
return { errorCode: "rate_limited", retry: "RetryLater" };
|
|
30801
|
+
}
|
|
30802
|
+
if (status >= 500 && status < 600) {
|
|
30803
|
+
return { errorCode: "server_error", retry: "RetryLater" };
|
|
30804
|
+
}
|
|
30805
|
+
return;
|
|
30806
|
+
}
|
|
30807
|
+
|
|
30465
30808
|
// ../common/src/local-permission-codes.ts
|
|
30466
30809
|
var LOCAL_PERMISSION_ERROR_CODES = new Set([
|
|
30467
30810
|
"EACCES",
|
|
@@ -30474,6 +30817,8 @@ var DEFAULT_401 = "Unauthorized (401). The session is missing or expired, or its
|
|
|
30474
30817
|
var DEFAULT_403 = "Forbidden (403). The account lacks permission for this operation, or the token carries no scope for this API. Run `uip login status --detailed` to see the token's scopes.";
|
|
30475
30818
|
var DEFAULT_405 = "Method Not Allowed (405). The endpoint may not exist or the base URL may be incorrect.";
|
|
30476
30819
|
var DEFAULT_413 = "Payload too large (413). The upload exceeded the server or CDN size limit. Reduce the package size — for example, exclude unused dependencies or remove large files from the project — and try again.";
|
|
30820
|
+
var CLOUDFLARE_BLOCK_403 = "Forbidden (403) by Cloudflare, in front of the service: the answer is a Cloudflare HTML page, not the service's JSON, so the service did not see the request and did not check the account's roles or the token's scopes. Cloudflare blocks a request when its content matches a firewall rule (text that looks like SQL or script code, for example) or when it comes from a network the firewall does not allow.";
|
|
30821
|
+
var CLOUDFLARE_BLOCK_403_INSTRUCTIONS = "If the request carries text that looks like code, change that text and try again. Otherwise send the time of the request and the Cloudflare Ray ID, when the message gives one, to the owner of the service or UiPath support.";
|
|
30477
30822
|
var HTML_RESPONSE_MESSAGE = "Received HTML instead of the expected JSON response.";
|
|
30478
30823
|
var NETWORK_ERROR_CODES = new Set([
|
|
30479
30824
|
"ECONNREFUSED",
|
|
@@ -30499,8 +30844,8 @@ var TLS_ERROR_CODES = new Set([
|
|
|
30499
30844
|
var TLS_INSTRUCTIONS = "The server's TLS certificate could not be verified. Most often a " + "corporate proxy/firewall re-signs HTTPS with a root CA that Node does " + "not trust — set NODE_EXTRA_CA_CERTS to that CA's PEM file (and HTTPS_PROXY " + "if you connect through a proxy). If the certificate is instead expired or " + "its hostname does not match, fix the endpoint URL or the system clock. " + "Then retry.";
|
|
30500
30845
|
var NETWORK_INSTRUCTIONS = "Could not reach the UiPath service. Check your network connection and " + "VPN, confirm any HTTP_PROXY/HTTPS_PROXY/NO_PROXY settings are correct, " + "then retry.";
|
|
30501
30846
|
var LOCAL_PERMISSION_MESSAGE_PATTERN = new RegExp(`\\b(${[...LOCAL_PERMISSION_ERROR_CODES].join("|")})\\b`);
|
|
30502
|
-
function localPermissionInstructions(code,
|
|
30503
|
-
const target =
|
|
30847
|
+
function localPermissionInstructions(code, path) {
|
|
30848
|
+
const target = path !== undefined ? `'${path}'` : "a local file or resource";
|
|
30504
30849
|
if (code === "EROFS") {
|
|
30505
30850
|
return `The filesystem containing ${target} is read-only (EROFS), so the ` + "CLI could not write to it. This is a local environment problem, " + "not a UiPath service error — retrying will not help. Use a " + "writable location, or give this environment write access to the " + "path.";
|
|
30506
30851
|
}
|
|
@@ -30537,12 +30882,12 @@ function describePermissionError(error) {
|
|
|
30537
30882
|
const code = matchLocalPermissionCode(cur.code, message);
|
|
30538
30883
|
if (!code)
|
|
30539
30884
|
continue;
|
|
30540
|
-
const
|
|
30885
|
+
const path = localPermissionPath(cur.path, message);
|
|
30541
30886
|
return {
|
|
30542
30887
|
code,
|
|
30543
30888
|
message: message ?? code,
|
|
30544
|
-
...
|
|
30545
|
-
instructions: localPermissionInstructions(code,
|
|
30889
|
+
...path !== undefined ? { path } : {},
|
|
30890
|
+
instructions: localPermissionInstructions(code, path)
|
|
30546
30891
|
};
|
|
30547
30892
|
}
|
|
30548
30893
|
return;
|
|
@@ -30554,11 +30899,25 @@ function matchLocalPermissionCode(code, message) {
|
|
|
30554
30899
|
const match = message ? LOCAL_PERMISSION_MESSAGE_PATTERN.exec(message) : null;
|
|
30555
30900
|
return match ? match[1] : undefined;
|
|
30556
30901
|
}
|
|
30557
|
-
function localPermissionPath(
|
|
30558
|
-
if (typeof
|
|
30559
|
-
return
|
|
30902
|
+
function localPermissionPath(path, message) {
|
|
30903
|
+
if (typeof path === "string")
|
|
30904
|
+
return path;
|
|
30560
30905
|
return message ? /'([^']+)'/.exec(message)?.[1] : undefined;
|
|
30561
30906
|
}
|
|
30907
|
+
function readHeader(response, name) {
|
|
30908
|
+
const headers = response?.headers;
|
|
30909
|
+
if (!headers || typeof headers !== "object")
|
|
30910
|
+
return;
|
|
30911
|
+
if (typeof headers.get === "function") {
|
|
30912
|
+
const value = headers.get(name);
|
|
30913
|
+
if (value)
|
|
30914
|
+
return value;
|
|
30915
|
+
}
|
|
30916
|
+
const plain = headers;
|
|
30917
|
+
const key = Object.keys(plain).find((k) => k.toLowerCase() === name.toLowerCase());
|
|
30918
|
+
const value = key === undefined ? undefined : plain[key];
|
|
30919
|
+
return typeof value === "string" && value !== "" ? value : undefined;
|
|
30920
|
+
}
|
|
30562
30921
|
function isHtmlDocument(body) {
|
|
30563
30922
|
return /^\s*(<!doctype html|<html\b)/i.test(body);
|
|
30564
30923
|
}
|
|
@@ -30575,36 +30934,9 @@ function retryHintForRetryAfter(seconds) {
|
|
|
30575
30934
|
return "RetryAfter60Seconds";
|
|
30576
30935
|
}
|
|
30577
30936
|
function classifyError(status, error) {
|
|
30578
|
-
|
|
30579
|
-
|
|
30580
|
-
|
|
30581
|
-
if (status === 401) {
|
|
30582
|
-
return {
|
|
30583
|
-
errorCode: "authentication_required",
|
|
30584
|
-
retry: "RetryWillNotFix"
|
|
30585
|
-
};
|
|
30586
|
-
}
|
|
30587
|
-
if (status === 403) {
|
|
30588
|
-
return { errorCode: "permission_denied", retry: "RetryWillNotFix" };
|
|
30589
|
-
}
|
|
30590
|
-
if (status === 404) {
|
|
30591
|
-
return { errorCode: "not_found", retry: "RetryWillNotFix" };
|
|
30592
|
-
}
|
|
30593
|
-
if (status === 405) {
|
|
30594
|
-
return { errorCode: "method_not_allowed", retry: "RetryWillNotFix" };
|
|
30595
|
-
}
|
|
30596
|
-
if (status === 413) {
|
|
30597
|
-
return { errorCode: "invalid_argument", retry: "RetryWillNotFix" };
|
|
30598
|
-
}
|
|
30599
|
-
if (status === 408) {
|
|
30600
|
-
return { errorCode: "timeout", retry: "RetryLater" };
|
|
30601
|
-
}
|
|
30602
|
-
if (status === 429) {
|
|
30603
|
-
return { errorCode: "rate_limited", retry: "RetryLater" };
|
|
30604
|
-
}
|
|
30605
|
-
if (status !== undefined && status >= 500 && status < 600) {
|
|
30606
|
-
return { errorCode: "server_error", retry: "RetryLater" };
|
|
30607
|
-
}
|
|
30937
|
+
const byStatus = classifyHttpStatus(status);
|
|
30938
|
+
if (byStatus)
|
|
30939
|
+
return byStatus;
|
|
30608
30940
|
if (status === undefined && describePermissionError(error)) {
|
|
30609
30941
|
return {
|
|
30610
30942
|
errorCode: "local_permission_denied",
|
|
@@ -30620,6 +30952,17 @@ function classifyError(status, error) {
|
|
|
30620
30952
|
}
|
|
30621
30953
|
return { errorCode: "unknown_error", retry: "RetryWillNotFix" };
|
|
30622
30954
|
}
|
|
30955
|
+
function withCarriedClass(inferred, error) {
|
|
30956
|
+
const errorCode = carriedErrorCode(error);
|
|
30957
|
+
const retry = carriedRetry(error);
|
|
30958
|
+
if (errorCode === undefined || errorCode === inferred.errorCode) {
|
|
30959
|
+
return {
|
|
30960
|
+
errorCode: inferred.errorCode,
|
|
30961
|
+
retry: retry ?? inferred.retry
|
|
30962
|
+
};
|
|
30963
|
+
}
|
|
30964
|
+
return { errorCode, retry: retry ?? defaultRetryForErrorCode(errorCode) };
|
|
30965
|
+
}
|
|
30623
30966
|
function formatHttpStatusMessage(status, rawMessage, extractedMessage, inferredStatus) {
|
|
30624
30967
|
if (extractedMessage) {
|
|
30625
30968
|
return `HTTP ${status}: ${extractedMessage}`;
|
|
@@ -30675,9 +31018,14 @@ async function extractErrorDetails(error, options) {
|
|
|
30675
31018
|
const classificationStatus = status ?? findHttpStatusInGraph(error);
|
|
30676
31019
|
const classification = classifyError(classificationStatus, error);
|
|
30677
31020
|
let retry = classification.retry;
|
|
31021
|
+
const htmlForbidden = status === 403 && rawBody !== undefined && isHtmlDocument(rawBody);
|
|
31022
|
+
const rayId = htmlForbidden ? readHeader(response, "cf-ray") : undefined;
|
|
31023
|
+
const cloudflareBlock = htmlForbidden && (rayId !== undefined || /\bcloudflare\b/i.test(readHeader(response, "server") ?? ""));
|
|
30678
31024
|
if (status === 401) {
|
|
30679
31025
|
message = DEFAULT_401;
|
|
30680
31026
|
result = "AuthenticationError";
|
|
31027
|
+
} else if (cloudflareBlock) {
|
|
31028
|
+
message = rayId ? `${CLOUDFLARE_BLOCK_403} Cloudflare Ray ID: ${rayId}.` : CLOUDFLARE_BLOCK_403;
|
|
30681
31029
|
} else if (status === 403) {
|
|
30682
31030
|
message = options?.forbiddenMessage ?? DEFAULT_403;
|
|
30683
31031
|
result = "AuthenticationError";
|
|
@@ -30725,7 +31073,9 @@ async function extractErrorDetails(error, options) {
|
|
|
30725
31073
|
}
|
|
30726
31074
|
}
|
|
30727
31075
|
let details = rawMessage;
|
|
30728
|
-
if (
|
|
31076
|
+
if (htmlForbidden) {
|
|
31077
|
+
details = cloudflareBlock ? CLOUDFLARE_BLOCK_403_INSTRUCTIONS : HTML_RESPONSE_MESSAGE;
|
|
31078
|
+
} else if (rawBody) {
|
|
30729
31079
|
if (parsedBody) {
|
|
30730
31080
|
const extra = {};
|
|
30731
31081
|
if (parsedBody.errorCode)
|
|
@@ -30759,6 +31109,8 @@ async function extractErrorDetails(error, options) {
|
|
|
30759
31109
|
}
|
|
30760
31110
|
if (parsedBody?.requestId && typeof parsedBody.requestId === "string") {
|
|
30761
31111
|
context.requestId = parsedBody.requestId;
|
|
31112
|
+
} else if (cloudflareBlock && rayId) {
|
|
31113
|
+
context.requestId = rayId;
|
|
30762
31114
|
}
|
|
30763
31115
|
if (parsedBody?.traceId && typeof parsedBody.traceId === "string") {
|
|
30764
31116
|
context.traceId = parsedBody.traceId;
|
|
@@ -30767,16 +31119,7 @@ async function extractErrorDetails(error, options) {
|
|
|
30767
31119
|
context.path = permission.path;
|
|
30768
31120
|
}
|
|
30769
31121
|
if (status === 429) {
|
|
30770
|
-
const
|
|
30771
|
-
const headersObj = resp?.headers;
|
|
30772
|
-
let retryAfterValue;
|
|
30773
|
-
if (headersObj && typeof headersObj === "object" && typeof headersObj.get === "function") {
|
|
30774
|
-
retryAfterValue = headersObj.get("retry-after") ?? undefined;
|
|
30775
|
-
}
|
|
30776
|
-
if (!retryAfterValue && headersObj && typeof headersObj === "object") {
|
|
30777
|
-
const headers = headersObj;
|
|
30778
|
-
retryAfterValue = headers["retry-after"] ?? headers["Retry-After"];
|
|
30779
|
-
}
|
|
31122
|
+
const retryAfterValue = readHeader(response, "retry-after");
|
|
30780
31123
|
if (retryAfterValue) {
|
|
30781
31124
|
const seconds = Number(retryAfterValue);
|
|
30782
31125
|
if (!Number.isNaN(seconds)) {
|
|
@@ -30810,9 +31153,8 @@ async function extractErrorDetails(error, options) {
|
|
|
30810
31153
|
}
|
|
30811
31154
|
return {
|
|
30812
31155
|
result,
|
|
30813
|
-
errorCode: classification.errorCode,
|
|
31156
|
+
...withCarriedClass({ errorCode: classification.errorCode, retry }, error),
|
|
30814
31157
|
message,
|
|
30815
|
-
retry,
|
|
30816
31158
|
details,
|
|
30817
31159
|
...hasContext ? { context } : {},
|
|
30818
31160
|
...parsedErrors ? { parsedErrors } : {}
|
|
@@ -30822,10 +31164,183 @@ async function extractErrorMessage(error, options) {
|
|
|
30822
31164
|
const { message } = await extractErrorDetails(error, options);
|
|
30823
31165
|
return message;
|
|
30824
31166
|
}
|
|
30825
|
-
// ../common/src/
|
|
30826
|
-
function
|
|
30827
|
-
|
|
31167
|
+
// ../common/src/error-instructions.ts
|
|
31168
|
+
function extractHttpStatus(err) {
|
|
31169
|
+
if (!err || typeof err !== "object")
|
|
31170
|
+
return;
|
|
31171
|
+
const e = err;
|
|
31172
|
+
const structured = e.response?.status ?? e.status ?? e.statusCode;
|
|
31173
|
+
if (structured !== undefined)
|
|
31174
|
+
return structured;
|
|
31175
|
+
return typeof e.message === "string" ? parseHttpStatusFromMessage(e.message) : undefined;
|
|
31176
|
+
}
|
|
31177
|
+
var GENERIC = "Check authentication and parameters";
|
|
31178
|
+
function hasIdentityInstructionContext(err) {
|
|
31179
|
+
return err !== null && typeof err === "object" && "instructionContext" in err && err.instructionContext === "identity";
|
|
31180
|
+
}
|
|
31181
|
+
function instructionsFor(ctx, err) {
|
|
31182
|
+
if (ctx === "auth" && hasIdentityInstructionContext(err)) {
|
|
31183
|
+
return instructionsFor("identity");
|
|
31184
|
+
}
|
|
31185
|
+
switch (ctx) {
|
|
31186
|
+
case "auth":
|
|
31187
|
+
return "Run 'uip login' to authenticate. To inspect the current session, run 'uip whoami'.";
|
|
31188
|
+
case "auth-configuration":
|
|
31189
|
+
return "Fix the authentication settings named in Message, then retry.";
|
|
31190
|
+
case "identity":
|
|
31191
|
+
return "Select an active tenant with 'uip login tenant set <tenant>' and ensure your login includes an organization";
|
|
31192
|
+
case "input-parse":
|
|
31193
|
+
return "Ensure --inputs is valid JSON or pipe JSON via stdin";
|
|
31194
|
+
case "input-validate":
|
|
31195
|
+
return "Fix the flagged input fields to match the process's input schema";
|
|
31196
|
+
case "flag-format":
|
|
31197
|
+
return "Check the flag value format — see --help for the expected shape";
|
|
31198
|
+
case "permissions":
|
|
31199
|
+
return "Confirm your user has the required permissions in this folder/tenant, or re-authenticate with 'uip login' if your session has lapsed";
|
|
31200
|
+
case "backend": {
|
|
31201
|
+
const status = extractHttpStatus(err);
|
|
31202
|
+
if (status === 401) {
|
|
31203
|
+
return "Re-authenticate with 'uip login' — your session is invalid or expired";
|
|
31204
|
+
}
|
|
31205
|
+
if (status === 403) {
|
|
31206
|
+
return "Confirm your user has access to the resource, and the required permissions in this folder or tenant";
|
|
31207
|
+
}
|
|
31208
|
+
if (status === 404) {
|
|
31209
|
+
return "Verify the resource exists in the current folder/tenant";
|
|
31210
|
+
}
|
|
31211
|
+
if (status === 400 || status === 422) {
|
|
31212
|
+
return "Request was rejected — check flag values and inputs";
|
|
31213
|
+
}
|
|
31214
|
+
if (status === 405) {
|
|
31215
|
+
return "Check the command name and the base URL in use — the endpoint may not exist";
|
|
31216
|
+
}
|
|
31217
|
+
if (status === 408) {
|
|
31218
|
+
return "The request timed out — retry; if it persists, narrow the request (e.g. --limit on list commands)";
|
|
31219
|
+
}
|
|
31220
|
+
if (status === 409) {
|
|
31221
|
+
return "The resource already exists, or changed since it was read — list it to see the current state";
|
|
31222
|
+
}
|
|
31223
|
+
if (status === 413) {
|
|
31224
|
+
return "The upload is over the size limit — exclude unused dependencies or drop large files, then retry";
|
|
31225
|
+
}
|
|
31226
|
+
if (status === 429) {
|
|
31227
|
+
return "Rate limit reached — wait and retry; when the service suggests a delay, Retry and Context.retryAfter carry it";
|
|
31228
|
+
}
|
|
31229
|
+
if (status !== undefined && status >= 500 && status < 600) {
|
|
31230
|
+
return "The service returned a server error — retry; if it persists, check service status";
|
|
31231
|
+
}
|
|
31232
|
+
const permission = describePermissionError(err);
|
|
31233
|
+
if (permission) {
|
|
31234
|
+
return permission.instructions;
|
|
31235
|
+
}
|
|
31236
|
+
const connectivity = describeConnectivityError(err);
|
|
31237
|
+
if (connectivity) {
|
|
31238
|
+
return connectivity.instructions;
|
|
31239
|
+
}
|
|
31240
|
+
return GENERIC;
|
|
31241
|
+
}
|
|
31242
|
+
}
|
|
31243
|
+
}
|
|
31244
|
+
|
|
31245
|
+
// ../common/src/result-types.ts
|
|
31246
|
+
var RESULTS = {
|
|
31247
|
+
Success: "Success",
|
|
31248
|
+
Failure: "Failure",
|
|
31249
|
+
ConfigError: "ConfigError",
|
|
31250
|
+
AuthenticationError: "AuthenticationError",
|
|
31251
|
+
ValidationError: "ValidationError",
|
|
31252
|
+
TimeoutError: "TimeoutError"
|
|
31253
|
+
};
|
|
31254
|
+
|
|
31255
|
+
// ../common/src/classified-failure.ts
|
|
31256
|
+
async function authContextFailure(error, sessionInstructions) {
|
|
31257
|
+
const details = await extractErrorDetails(error);
|
|
31258
|
+
const missingIdentity = hasIdentityInstructionContext(error);
|
|
31259
|
+
return {
|
|
31260
|
+
Result: details.errorCode === "configuration_error" ? RESULTS.ConfigError : details.errorCode === "authentication_required" ? RESULTS.AuthenticationError : details.result,
|
|
31261
|
+
ErrorCode: details.errorCode,
|
|
31262
|
+
Message: details.message,
|
|
31263
|
+
Instructions: details.errorCode === "configuration_error" ? instructionsFor("auth-configuration") : details.errorCode === "authentication_required" && !missingIdentity && sessionInstructions !== undefined ? sessionInstructions : instructionsFor(details.errorCode === "authentication_required" ? "auth" : "backend", error),
|
|
31264
|
+
Retry: details.retry,
|
|
31265
|
+
...details.context ? { Context: details.context } : {}
|
|
31266
|
+
};
|
|
31267
|
+
}
|
|
31268
|
+
// ../../node_modules/commander/index.js
|
|
31269
|
+
var exports_commander = {};
|
|
31270
|
+
__exportCjs(exports_commander, {
|
|
31271
|
+
program: () => $program,
|
|
31272
|
+
createCommand: () => $createCommand,
|
|
31273
|
+
createOption: () => $createOption,
|
|
31274
|
+
createArgument: () => $createArgument,
|
|
31275
|
+
Command: () => $Command,
|
|
31276
|
+
Option: () => $Option,
|
|
31277
|
+
Argument: () => $Argument,
|
|
31278
|
+
Help: () => $Help,
|
|
31279
|
+
CommanderError: () => $CommanderError,
|
|
31280
|
+
InvalidArgumentError: () => $InvalidArgumentError,
|
|
31281
|
+
InvalidOptionArgumentError: () => $InvalidOptionArgumentError
|
|
31282
|
+
}, {
|
|
31283
|
+
program: (value) => $program = value,
|
|
31284
|
+
createCommand: (value) => $createCommand = value,
|
|
31285
|
+
createOption: (value) => $createOption = value,
|
|
31286
|
+
createArgument: (value) => $createArgument = value,
|
|
31287
|
+
Command: (value) => $Command = value,
|
|
31288
|
+
Option: (value) => $Option = value,
|
|
31289
|
+
Argument: (value) => $Argument = value,
|
|
31290
|
+
Help: (value) => $Help = value,
|
|
31291
|
+
CommanderError: (value) => $CommanderError = value,
|
|
31292
|
+
InvalidArgumentError: (value) => $InvalidArgumentError = value,
|
|
31293
|
+
InvalidOptionArgumentError: (value) => $InvalidOptionArgumentError = value
|
|
31294
|
+
});
|
|
31295
|
+
var { Argument } = require_argument();
|
|
31296
|
+
var { Command: Command2 } = require_command();
|
|
31297
|
+
var { CommanderError, InvalidArgumentError } = require_error();
|
|
31298
|
+
var { Help } = require_help();
|
|
31299
|
+
var { Option } = require_option();
|
|
31300
|
+
var $program = new Command2;
|
|
31301
|
+
var $createCommand = (name) => new Command2(name);
|
|
31302
|
+
var $createOption = (flags, description) => new Option(flags, description);
|
|
31303
|
+
var $createArgument = (name, description) => new Argument(name, description);
|
|
31304
|
+
var $Command = Command2;
|
|
31305
|
+
var $Option = Option;
|
|
31306
|
+
var $Argument = Argument;
|
|
31307
|
+
var $Help = Help;
|
|
31308
|
+
var $CommanderError = CommanderError;
|
|
31309
|
+
var $InvalidArgumentError = InvalidArgumentError;
|
|
31310
|
+
var $InvalidOptionArgumentError = InvalidArgumentError;
|
|
31311
|
+
|
|
31312
|
+
// ../../node_modules/commander/esm.mjs
|
|
31313
|
+
var {
|
|
31314
|
+
program,
|
|
31315
|
+
createCommand,
|
|
31316
|
+
createArgument,
|
|
31317
|
+
createOption,
|
|
31318
|
+
CommanderError: CommanderError2,
|
|
31319
|
+
InvalidArgumentError: InvalidArgumentError2,
|
|
31320
|
+
InvalidOptionArgumentError,
|
|
31321
|
+
Command,
|
|
31322
|
+
Argument: Argument2,
|
|
31323
|
+
Option: Option2,
|
|
31324
|
+
Help: Help2
|
|
31325
|
+
} = exports_commander;
|
|
31326
|
+
|
|
31327
|
+
// ../common/src/command-examples.ts
|
|
31328
|
+
var examplesByCommand = new WeakMap;
|
|
31329
|
+
Command.prototype.examples = function(examples) {
|
|
31330
|
+
examplesByCommand.set(this, examples);
|
|
31331
|
+
return this;
|
|
31332
|
+
};
|
|
31333
|
+
// ../common/src/preview.ts
|
|
31334
|
+
var previewSlot = singleton("PreviewBuild");
|
|
31335
|
+
function isPreviewBuild() {
|
|
31336
|
+
return previewSlot.get(false) ?? false;
|
|
30828
31337
|
}
|
|
31338
|
+
Command.prototype.previewCommand = function(nameAndArgs, opts) {
|
|
31339
|
+
if (isPreviewBuild()) {
|
|
31340
|
+
return this.command(nameAndArgs, opts);
|
|
31341
|
+
}
|
|
31342
|
+
return new Command(nameAndArgs.split(/\s+/)[0] ?? nameAndArgs);
|
|
31343
|
+
};
|
|
30829
31344
|
|
|
30830
31345
|
// ../common/src/output-context.ts
|
|
30831
31346
|
function createStorage() {
|
|
@@ -30860,8 +31375,8 @@ function getOutputSink() {
|
|
|
30860
31375
|
|
|
30861
31376
|
// ../common/src/logger.ts
|
|
30862
31377
|
var logFilePathSlot = singleton("logFilePath");
|
|
30863
|
-
function setGlobalLogFilePath(
|
|
30864
|
-
logFilePathSlot.set(
|
|
31378
|
+
function setGlobalLogFilePath(path) {
|
|
31379
|
+
logFilePathSlot.set(path);
|
|
30865
31380
|
}
|
|
30866
31381
|
function getGlobalLogFilePath() {
|
|
30867
31382
|
return logFilePathSlot.get("");
|
|
@@ -30929,14 +31444,14 @@ class SimpleLogger {
|
|
|
30929
31444
|
return this.fileLoggingEnabled || !!getGlobalLogFilePath();
|
|
30930
31445
|
}
|
|
30931
31446
|
writeToFile(formatted) {
|
|
30932
|
-
const
|
|
30933
|
-
if (!
|
|
31447
|
+
const path = this.logFilePath || getGlobalLogFilePath();
|
|
31448
|
+
if (!path)
|
|
30934
31449
|
return;
|
|
30935
31450
|
const timestamp = new Date().toISOString();
|
|
30936
31451
|
this.pendingWrites = Promise.all([
|
|
30937
31452
|
this.pendingWrites,
|
|
30938
31453
|
this.pendingInit
|
|
30939
|
-
]).then(() => getFileSystem().appendFile(
|
|
31454
|
+
]).then(() => getFileSystem().appendFile(path, `${timestamp} ${formatted}`).catch(() => {}));
|
|
30940
31455
|
}
|
|
30941
31456
|
write(formatted) {
|
|
30942
31457
|
if (this.isFileLoggingActive()) {
|
|
@@ -30986,17 +31501,17 @@ class SimpleLogger {
|
|
|
30986
31501
|
setGlobalLogFilePath("");
|
|
30987
31502
|
}
|
|
30988
31503
|
}
|
|
30989
|
-
setLogFile(
|
|
30990
|
-
this.logFilePath =
|
|
30991
|
-
setGlobalLogFilePath(
|
|
30992
|
-
if (!
|
|
31504
|
+
setLogFile(path) {
|
|
31505
|
+
this.logFilePath = path;
|
|
31506
|
+
setGlobalLogFilePath(path);
|
|
31507
|
+
if (!path)
|
|
30993
31508
|
return;
|
|
30994
31509
|
this.fileLoggingEnabled = true;
|
|
30995
|
-
const
|
|
31510
|
+
const fs = getFileSystem();
|
|
30996
31511
|
this.pendingInit = (async () => {
|
|
30997
31512
|
const [error] = await catchError2((async () => {
|
|
30998
|
-
await
|
|
30999
|
-
await
|
|
31513
|
+
await fs.mkdir(fs.path.dirname(path));
|
|
31514
|
+
await fs.writeFile(path, "");
|
|
31000
31515
|
})());
|
|
31001
31516
|
if (error)
|
|
31002
31517
|
this.fileLoggingEnabled = false;
|
|
@@ -31044,18 +31559,111 @@ function getLogFilePath() {
|
|
|
31044
31559
|
return logger.getLogFilePath();
|
|
31045
31560
|
}
|
|
31046
31561
|
|
|
31562
|
+
// ../common/src/timings.ts
|
|
31563
|
+
var TIMINGS_ENV_VAR = "UIP_TIMINGS";
|
|
31564
|
+
function createStorage2() {
|
|
31565
|
+
const [error, mod] = catchError2(() => __require("node:async_hooks"));
|
|
31566
|
+
if (error || typeof mod?.AsyncLocalStorage !== "function") {
|
|
31567
|
+
return {
|
|
31568
|
+
getStore: () => {
|
|
31569
|
+
return;
|
|
31570
|
+
},
|
|
31571
|
+
run: (_store, fn) => fn()
|
|
31572
|
+
};
|
|
31573
|
+
}
|
|
31574
|
+
return new mod.AsyncLocalStorage;
|
|
31575
|
+
}
|
|
31576
|
+
var storageSlot = singleton("TimingStorage");
|
|
31577
|
+
var stateSlot = singleton("Timings");
|
|
31578
|
+
var rootStartedSlot = singleton("TimingsRootStarted");
|
|
31579
|
+
var longLivedHostSlot = singleton("TimingsLongLivedHost");
|
|
31580
|
+
var storage = storageSlot.getOrInit(createStorage2, (value) => ("getStore" in value));
|
|
31581
|
+
function newState(baseline) {
|
|
31582
|
+
return { baseline, httpMs: 0, httpCalls: 0 };
|
|
31583
|
+
}
|
|
31584
|
+
function getState() {
|
|
31585
|
+
const scoped = storage.getStore();
|
|
31586
|
+
if (scoped) {
|
|
31587
|
+
return scoped;
|
|
31588
|
+
}
|
|
31589
|
+
const pinned = livePinnedState();
|
|
31590
|
+
if (pinned !== undefined) {
|
|
31591
|
+
return pinned;
|
|
31592
|
+
}
|
|
31593
|
+
return newState(processStartIsInvocationStart() ? 0 : performance.now());
|
|
31594
|
+
}
|
|
31595
|
+
function livePinnedState() {
|
|
31596
|
+
const pinned = stateSlot.get();
|
|
31597
|
+
return pinned !== undefined && "httpCalls" in pinned && !pinned.finished ? pinned : undefined;
|
|
31598
|
+
}
|
|
31599
|
+
function processStartIsInvocationStart() {
|
|
31600
|
+
return !rootStartedSlot.get(false) && !longLivedHostSlot.get(false);
|
|
31601
|
+
}
|
|
31602
|
+
function timingsEnabled() {
|
|
31603
|
+
if (typeof process === "undefined") {
|
|
31604
|
+
return false;
|
|
31605
|
+
}
|
|
31606
|
+
const value = process.env?.[TIMINGS_ENV_VAR];
|
|
31607
|
+
if (value === undefined) {
|
|
31608
|
+
return false;
|
|
31609
|
+
}
|
|
31610
|
+
const normalized = value.trim().toLowerCase();
|
|
31611
|
+
return normalized === "1" || normalized === "true";
|
|
31612
|
+
}
|
|
31613
|
+
function recordExitCode(exitCode) {
|
|
31614
|
+
if (!timingsEnabled()) {
|
|
31615
|
+
return;
|
|
31616
|
+
}
|
|
31617
|
+
getState().exitCode = exitCode;
|
|
31618
|
+
}
|
|
31619
|
+
function invocationStartedAt() {
|
|
31620
|
+
return new Date(performance.timeOrigin + getState().baseline);
|
|
31621
|
+
}
|
|
31622
|
+
function invocationElapsedMs() {
|
|
31623
|
+
return performance.now() - getState().baseline;
|
|
31624
|
+
}
|
|
31625
|
+
function markCommandStart() {
|
|
31626
|
+
if (!timingsEnabled()) {
|
|
31627
|
+
return;
|
|
31628
|
+
}
|
|
31629
|
+
getState().commandStart = performance.now();
|
|
31630
|
+
}
|
|
31631
|
+
function recordCommandDuration(durationMs) {
|
|
31632
|
+
if (!timingsEnabled()) {
|
|
31633
|
+
return;
|
|
31634
|
+
}
|
|
31635
|
+
getState().commandMs = durationMs;
|
|
31636
|
+
}
|
|
31637
|
+
|
|
31638
|
+
// ../common/src/exit-code.ts
|
|
31639
|
+
function setExitCode(code) {
|
|
31640
|
+
process.exitCode = code;
|
|
31641
|
+
recordExitCode(code);
|
|
31642
|
+
}
|
|
31643
|
+
var GENERIC_FAILURE_EXIT_CODE = 1;
|
|
31644
|
+
function recordCommandExit(code) {
|
|
31645
|
+
if (code === GENERIC_FAILURE_EXIT_CODE && getExitCode() !== 0) {
|
|
31646
|
+
return;
|
|
31647
|
+
}
|
|
31648
|
+
setExitCode(code);
|
|
31649
|
+
}
|
|
31650
|
+
function getExitCode() {
|
|
31651
|
+
const code = process.exitCode;
|
|
31652
|
+
return typeof code === "number" ? code : 0;
|
|
31653
|
+
}
|
|
31654
|
+
|
|
31047
31655
|
// ../common/src/output-codecs.ts
|
|
31048
31656
|
var yamlSlot = singleton("YamlCodec");
|
|
31049
31657
|
var jmespathSlot = singleton("JmespathCodec");
|
|
31050
31658
|
async function loadOutputCodecsAsync(needed) {
|
|
31051
31659
|
const loads = [];
|
|
31052
31660
|
if (needed.yaml && yamlSlot.get() === undefined) {
|
|
31053
|
-
loads.push(import("./js-yaml-
|
|
31661
|
+
loads.push(import("./js-yaml-a2bk27p6.js").then((mod) => {
|
|
31054
31662
|
yamlSlot.set(mod);
|
|
31055
31663
|
}));
|
|
31056
31664
|
}
|
|
31057
31665
|
if (needed.filter && jmespathSlot.get() === undefined) {
|
|
31058
|
-
loads.push(import("./jmespath-
|
|
31666
|
+
loads.push(import("./jmespath-ab6tdc42.js").then((m)=>__toESM(m.default,1)).then((mod) => {
|
|
31059
31667
|
jmespathSlot.set(mod);
|
|
31060
31668
|
}));
|
|
31061
31669
|
}
|
|
@@ -31080,155 +31688,6 @@ function getOutputFilter() {
|
|
|
31080
31688
|
return filterSlot.get();
|
|
31081
31689
|
}
|
|
31082
31690
|
|
|
31083
|
-
// ../common/src/telemetry/telemetry-dimensions.ts
|
|
31084
|
-
var BaseDimensions = {
|
|
31085
|
-
ApplicationName: "ApplicationName",
|
|
31086
|
-
ProductVersion: "ProductVersion",
|
|
31087
|
-
InstallationId: "InstallationId",
|
|
31088
|
-
CloudUserId: "CloudUserId",
|
|
31089
|
-
CloudTenantId: "CloudTenantId",
|
|
31090
|
-
CloudOrganizationId: "CloudOrganizationId",
|
|
31091
|
-
IsInternalUser: "IsInternalUser",
|
|
31092
|
-
Environment: "Environment",
|
|
31093
|
-
BaseUrl: "BaseUrl",
|
|
31094
|
-
Region: "Region",
|
|
31095
|
-
Agent: "Agent",
|
|
31096
|
-
AgentVersion: "AgentVersion",
|
|
31097
|
-
AgentModel: "AgentModel",
|
|
31098
|
-
ToolName: "ToolName",
|
|
31099
|
-
ToolVersion: "ToolVersion",
|
|
31100
|
-
ExecutionContext: "ExecutionContext",
|
|
31101
|
-
CiProvider: "CiProvider",
|
|
31102
|
-
SessionIdSource: "SessionIdSource",
|
|
31103
|
-
SessionId: "SessionId"
|
|
31104
|
-
};
|
|
31105
|
-
var CommandDimensions = {
|
|
31106
|
-
IsCommand: "IsCommand",
|
|
31107
|
-
IsReexec: "IsReexec",
|
|
31108
|
-
CommandName: "CommandName",
|
|
31109
|
-
ExitCode: "ExitCode",
|
|
31110
|
-
TerminalOutcome: "TerminalOutcome",
|
|
31111
|
-
ErrorClass: "ErrorClass",
|
|
31112
|
-
TerminalSignal: "TerminalSignal",
|
|
31113
|
-
ErrorMessage: "ErrorMessage",
|
|
31114
|
-
SkillName: "SkillName",
|
|
31115
|
-
ProductArea: "ProductArea",
|
|
31116
|
-
Mode: "Mode"
|
|
31117
|
-
};
|
|
31118
|
-
var ShipDimensions = {
|
|
31119
|
-
ShipKind: "ShipKind",
|
|
31120
|
-
Target: "Target",
|
|
31121
|
-
ProjectType: "ProjectType",
|
|
31122
|
-
ProjectTypes: "ProjectTypes",
|
|
31123
|
-
ArtifactCorrelationKey: "ArtifactCorrelationKey",
|
|
31124
|
-
PackageName: "PackageName",
|
|
31125
|
-
PackageVersion: "PackageVersion",
|
|
31126
|
-
PackageVersionKey: "PackageVersionKey",
|
|
31127
|
-
DeploymentKey: "DeploymentKey",
|
|
31128
|
-
SolutionId: "SolutionId",
|
|
31129
|
-
FolderKey: "FolderKey",
|
|
31130
|
-
FeedId: "FeedId"
|
|
31131
|
-
};
|
|
31132
|
-
var ErrorDimensions = {
|
|
31133
|
-
Result: "Result",
|
|
31134
|
-
ErrorCode: "ErrorCode",
|
|
31135
|
-
Retry: "Retry",
|
|
31136
|
-
ErrorMessage: "ErrorMessage",
|
|
31137
|
-
HttpStatus: "HttpStatus",
|
|
31138
|
-
UpstreamErrorCode: "UpstreamErrorCode"
|
|
31139
|
-
};
|
|
31140
|
-
var AuthDimensions = {
|
|
31141
|
-
AuthenticationMethod: "AuthenticationMethod",
|
|
31142
|
-
Success: "Success",
|
|
31143
|
-
Reason: "Reason"
|
|
31144
|
-
};
|
|
31145
|
-
var SkillsDimensions = {
|
|
31146
|
-
SchemaVersion: "SchemaVersion",
|
|
31147
|
-
AgentType: "AgentType",
|
|
31148
|
-
SkillsVersion: "SkillsVersion",
|
|
31149
|
-
UipSubcommand: "UipSubcommand",
|
|
31150
|
-
FileExtension: "FileExtension",
|
|
31151
|
-
SubagentModel: "SubagentModel",
|
|
31152
|
-
SubagentType: "SubagentType",
|
|
31153
|
-
PermissionMode: "PermissionMode",
|
|
31154
|
-
EffortLevel: "EffortLevel",
|
|
31155
|
-
SessionSource: "SessionSource",
|
|
31156
|
-
Outcome: "Outcome",
|
|
31157
|
-
DurationMs: "DurationMs",
|
|
31158
|
-
Source: "Source"
|
|
31159
|
-
};
|
|
31160
|
-
var PackagerDimensions = {
|
|
31161
|
-
ProjectId: "ProjectId",
|
|
31162
|
-
ProjectType: "ProjectType",
|
|
31163
|
-
SolutionId: "SolutionId"
|
|
31164
|
-
};
|
|
31165
|
-
var ScopeDimensions = {
|
|
31166
|
-
FolderId: "FolderId"
|
|
31167
|
-
};
|
|
31168
|
-
var ID_DIMENSIONS = new Set([
|
|
31169
|
-
BaseDimensions.CloudUserId,
|
|
31170
|
-
BaseDimensions.CloudTenantId,
|
|
31171
|
-
BaseDimensions.CloudOrganizationId,
|
|
31172
|
-
BaseDimensions.InstallationId,
|
|
31173
|
-
ShipDimensions.ArtifactCorrelationKey,
|
|
31174
|
-
ShipDimensions.PackageVersionKey,
|
|
31175
|
-
ShipDimensions.DeploymentKey,
|
|
31176
|
-
ShipDimensions.SolutionId,
|
|
31177
|
-
ShipDimensions.FolderKey,
|
|
31178
|
-
ShipDimensions.FeedId,
|
|
31179
|
-
PackagerDimensions.ProjectId
|
|
31180
|
-
]);
|
|
31181
|
-
var NON_IDENTIFIER_PLACEHOLDER_PATTERN = /^(?:\[[A-Z_]+\]|<[^>]+>)$/;
|
|
31182
|
-
var RESERVED_DIMENSION_NAMES = new Set([
|
|
31183
|
-
...Object.values(BaseDimensions),
|
|
31184
|
-
...Object.values(CommandDimensions),
|
|
31185
|
-
...Object.values(ShipDimensions),
|
|
31186
|
-
...Object.values(ErrorDimensions),
|
|
31187
|
-
...Object.values(AuthDimensions),
|
|
31188
|
-
...Object.values(SkillsDimensions),
|
|
31189
|
-
...Object.values(PackagerDimensions),
|
|
31190
|
-
...Object.values(ScopeDimensions)
|
|
31191
|
-
]);
|
|
31192
|
-
var CURATED_DIMENSIONS = new Set([
|
|
31193
|
-
BaseDimensions.ApplicationName,
|
|
31194
|
-
BaseDimensions.ProductVersion,
|
|
31195
|
-
BaseDimensions.InstallationId,
|
|
31196
|
-
BaseDimensions.CloudUserId,
|
|
31197
|
-
BaseDimensions.CloudTenantId,
|
|
31198
|
-
BaseDimensions.CloudOrganizationId,
|
|
31199
|
-
BaseDimensions.IsInternalUser,
|
|
31200
|
-
BaseDimensions.Environment,
|
|
31201
|
-
BaseDimensions.BaseUrl,
|
|
31202
|
-
BaseDimensions.Region,
|
|
31203
|
-
BaseDimensions.Agent,
|
|
31204
|
-
BaseDimensions.AgentVersion,
|
|
31205
|
-
BaseDimensions.ToolVersion,
|
|
31206
|
-
BaseDimensions.ExecutionContext,
|
|
31207
|
-
BaseDimensions.CiProvider,
|
|
31208
|
-
BaseDimensions.SessionIdSource,
|
|
31209
|
-
BaseDimensions.SessionId,
|
|
31210
|
-
...Object.values(CommandDimensions),
|
|
31211
|
-
...Object.values(ShipDimensions)
|
|
31212
|
-
]);
|
|
31213
|
-
function lowercaseIdDimensionValues(properties) {
|
|
31214
|
-
let changed = false;
|
|
31215
|
-
const result = {
|
|
31216
|
-
...properties
|
|
31217
|
-
};
|
|
31218
|
-
for (const key of Object.keys(result)) {
|
|
31219
|
-
const value = result[key];
|
|
31220
|
-
if (!ID_DIMENSIONS.has(key) || typeof value !== "string" || NON_IDENTIFIER_PLACEHOLDER_PATTERN.test(value)) {
|
|
31221
|
-
continue;
|
|
31222
|
-
}
|
|
31223
|
-
const lowered = value.toLowerCase();
|
|
31224
|
-
if (lowered !== value) {
|
|
31225
|
-
result[key] = lowered;
|
|
31226
|
-
changed = true;
|
|
31227
|
-
}
|
|
31228
|
-
}
|
|
31229
|
-
return changed ? result : properties;
|
|
31230
|
-
}
|
|
31231
|
-
|
|
31232
31691
|
// ../common/src/telemetry/command-terminal.ts
|
|
31233
31692
|
var recordedFailureSlot = singleton("CommandTelemetryFailure");
|
|
31234
31693
|
var AUTH_ERROR_CODES = new Set([
|
|
@@ -31347,17 +31806,8 @@ function terminalSignalFor(input, outcome) {
|
|
|
31347
31806
|
}
|
|
31348
31807
|
return outcome === "cancelled" ? "SIGINT" : undefined;
|
|
31349
31808
|
}
|
|
31350
|
-
function
|
|
31351
|
-
|
|
31352
|
-
return "auth";
|
|
31353
|
-
}
|
|
31354
|
-
if (status === 400 || status === 409 || status === 422) {
|
|
31355
|
-
return "validation";
|
|
31356
|
-
}
|
|
31357
|
-
if (status === 408) {
|
|
31358
|
-
return "timeout";
|
|
31359
|
-
}
|
|
31360
|
-
return "network_http";
|
|
31809
|
+
function classifyFailingHttpStatus(status) {
|
|
31810
|
+
return classifyFromErrorCode(classifyHttpStatus(status)?.errorCode) ?? "network_http";
|
|
31361
31811
|
}
|
|
31362
31812
|
function classifyFromResult(result) {
|
|
31363
31813
|
switch (result) {
|
|
@@ -31371,23 +31821,23 @@ function classifyFromResult(result) {
|
|
|
31371
31821
|
return;
|
|
31372
31822
|
}
|
|
31373
31823
|
}
|
|
31374
|
-
function classifyFromErrorCode(
|
|
31375
|
-
if (!
|
|
31824
|
+
function classifyFromErrorCode(errorCode) {
|
|
31825
|
+
if (!errorCode) {
|
|
31376
31826
|
return;
|
|
31377
31827
|
}
|
|
31378
|
-
if (AUTH_ERROR_CODES.has(
|
|
31828
|
+
if (AUTH_ERROR_CODES.has(errorCode)) {
|
|
31379
31829
|
return "auth";
|
|
31380
31830
|
}
|
|
31381
|
-
if (LOCAL_PERMISSION_CLI_ERROR_CODES.has(
|
|
31831
|
+
if (LOCAL_PERMISSION_CLI_ERROR_CODES.has(errorCode)) {
|
|
31382
31832
|
return "local_permission";
|
|
31383
31833
|
}
|
|
31384
|
-
if (VALIDATION_ERROR_CODES.has(
|
|
31834
|
+
if (VALIDATION_ERROR_CODES.has(errorCode)) {
|
|
31385
31835
|
return "validation";
|
|
31386
31836
|
}
|
|
31387
|
-
if (TIMEOUT_ERROR_CODES.has(
|
|
31837
|
+
if (TIMEOUT_ERROR_CODES.has(errorCode)) {
|
|
31388
31838
|
return "timeout";
|
|
31389
31839
|
}
|
|
31390
|
-
if (NETWORK_HTTP_ERROR_CODES.has(
|
|
31840
|
+
if (NETWORK_HTTP_ERROR_CODES.has(errorCode)) {
|
|
31391
31841
|
return "network_http";
|
|
31392
31842
|
}
|
|
31393
31843
|
return;
|
|
@@ -31437,7 +31887,7 @@ function classifyError2(input) {
|
|
|
31437
31887
|
}
|
|
31438
31888
|
const status = recorded?.context?.httpStatus ?? findHttpStatusInGraph(input.error);
|
|
31439
31889
|
if (status !== undefined) {
|
|
31440
|
-
return
|
|
31890
|
+
return classifyFailingHttpStatus(status);
|
|
31441
31891
|
}
|
|
31442
31892
|
return classifyFromResult(recorded?.result) ?? classifyFromErrorCode(recorded?.errorCode) ?? classifyFromError(input.error) ?? "unknown";
|
|
31443
31893
|
}
|
|
@@ -31469,6 +31919,7 @@ function buildCommandTerminalTelemetryProperties(input) {
|
|
|
31469
31919
|
var CommonTelemetryEvents = {
|
|
31470
31920
|
Start: "Application.Start",
|
|
31471
31921
|
Error: "Application.Error",
|
|
31922
|
+
ProjectActivity: "Cli.ProjectActivity",
|
|
31472
31923
|
ShipSucceeded: "Cli.ShipSucceeded"
|
|
31473
31924
|
};
|
|
31474
31925
|
|
|
@@ -31986,87 +32437,21 @@ class TelemetryService {
|
|
|
31986
32437
|
return hex;
|
|
31987
32438
|
}
|
|
31988
32439
|
}
|
|
31989
|
-
// ../common/src/timings.ts
|
|
31990
|
-
var TIMINGS_ENV_VAR = "UIP_TIMINGS";
|
|
31991
|
-
function createStorage2() {
|
|
31992
|
-
const [error, mod] = catchError2(() => __require("node:async_hooks"));
|
|
31993
|
-
if (error || typeof mod?.AsyncLocalStorage !== "function") {
|
|
31994
|
-
return {
|
|
31995
|
-
getStore: () => {
|
|
31996
|
-
return;
|
|
31997
|
-
},
|
|
31998
|
-
run: (_store, fn) => fn()
|
|
31999
|
-
};
|
|
32000
|
-
}
|
|
32001
|
-
return new mod.AsyncLocalStorage;
|
|
32002
|
-
}
|
|
32003
|
-
var storageSlot = singleton("TimingStorage");
|
|
32004
|
-
var stateSlot = singleton("Timings");
|
|
32005
|
-
var rootStartedSlot = singleton("TimingsRootStarted");
|
|
32006
|
-
var longLivedHostSlot = singleton("TimingsLongLivedHost");
|
|
32007
|
-
var storage = storageSlot.getOrInit(createStorage2, (value) => ("getStore" in value));
|
|
32008
|
-
function newState(baseline) {
|
|
32009
|
-
return { baseline, httpMs: 0, httpCalls: 0 };
|
|
32010
|
-
}
|
|
32011
|
-
function getState() {
|
|
32012
|
-
const scoped = storage.getStore();
|
|
32013
|
-
if (scoped) {
|
|
32014
|
-
return scoped;
|
|
32015
|
-
}
|
|
32016
|
-
const pinned = livePinnedState();
|
|
32017
|
-
if (pinned !== undefined) {
|
|
32018
|
-
return pinned;
|
|
32019
|
-
}
|
|
32020
|
-
return newState(processStartIsInvocationStart() ? 0 : performance.now());
|
|
32021
|
-
}
|
|
32022
|
-
function livePinnedState() {
|
|
32023
|
-
const pinned = stateSlot.get();
|
|
32024
|
-
return pinned !== undefined && "httpCalls" in pinned && !pinned.finished ? pinned : undefined;
|
|
32025
|
-
}
|
|
32026
|
-
function processStartIsInvocationStart() {
|
|
32027
|
-
return !rootStartedSlot.get(false) && !longLivedHostSlot.get(false);
|
|
32028
|
-
}
|
|
32029
|
-
function timingsEnabled() {
|
|
32030
|
-
if (typeof process === "undefined") {
|
|
32031
|
-
return false;
|
|
32032
|
-
}
|
|
32033
|
-
const value = process.env?.[TIMINGS_ENV_VAR];
|
|
32034
|
-
if (value === undefined) {
|
|
32035
|
-
return false;
|
|
32036
|
-
}
|
|
32037
|
-
const normalized = value.trim().toLowerCase();
|
|
32038
|
-
return normalized === "1" || normalized === "true";
|
|
32039
|
-
}
|
|
32040
|
-
function recordExitCode(exitCode) {
|
|
32041
|
-
if (!timingsEnabled()) {
|
|
32042
|
-
return;
|
|
32043
|
-
}
|
|
32044
|
-
getState().exitCode = exitCode;
|
|
32045
|
-
}
|
|
32046
|
-
function invocationStartedAt() {
|
|
32047
|
-
return new Date(performance.timeOrigin + getState().baseline);
|
|
32048
|
-
}
|
|
32049
|
-
function invocationElapsedMs() {
|
|
32050
|
-
return performance.now() - getState().baseline;
|
|
32051
|
-
}
|
|
32052
|
-
function markCommandStart() {
|
|
32053
|
-
if (!timingsEnabled()) {
|
|
32054
|
-
return;
|
|
32055
|
-
}
|
|
32056
|
-
getState().commandStart = performance.now();
|
|
32057
|
-
}
|
|
32058
|
-
function recordCommandDuration(durationMs) {
|
|
32059
|
-
if (!timingsEnabled()) {
|
|
32060
|
-
return;
|
|
32061
|
-
}
|
|
32062
|
-
getState().commandMs = durationMs;
|
|
32063
|
-
}
|
|
32064
32440
|
// ../common/src/telemetry/proxy-http-agent.ts
|
|
32065
32441
|
var slot = singleton("ProxyAuthHttpsAgent");
|
|
32066
32442
|
|
|
32067
32443
|
// ../common/src/telemetry/node-appinsights-telemetry-provider.ts
|
|
32068
32444
|
var providerSlot = singleton("TelemetryProvider");
|
|
32069
32445
|
|
|
32446
|
+
// ../common/src/telemetry/telemetry-config.ts
|
|
32447
|
+
function isTelemetryDisabled() {
|
|
32448
|
+
const value = process.env.UIPATH_TELEMETRY_DISABLED;
|
|
32449
|
+
return value === "1" || value === "true";
|
|
32450
|
+
}
|
|
32451
|
+
function isProjectTelemetryDisabled() {
|
|
32452
|
+
return isTelemetryDisabled() || process.env.UIPATH_PROJECT_TELEMETRY_DISABLED === "1" || process.env.UIPATH_PROJECT_TELEMETRY_DISABLED === "true";
|
|
32453
|
+
}
|
|
32454
|
+
|
|
32070
32455
|
// ../common/src/telemetry/telemetry-spool.ts
|
|
32071
32456
|
var sidecarEntrySlot = singleton("TelemetrySidecarEntry");
|
|
32072
32457
|
var MAX_SPOOL_AGE_MS = 72 * 60 * 60 * 1000;
|
|
@@ -32102,7 +32487,6 @@ var telemetry = new Proxy({}, {
|
|
|
32102
32487
|
return typeof value === "function" ? value.bind(instance) : value;
|
|
32103
32488
|
}
|
|
32104
32489
|
});
|
|
32105
|
-
|
|
32106
32490
|
// ../common/src/formatter.ts
|
|
32107
32491
|
var ANSI_STYLES = {
|
|
32108
32492
|
red: "\x1B[31m",
|
|
@@ -32112,46 +32496,6 @@ var ANSI_RESET = "\x1B[0m";
|
|
|
32112
32496
|
function styleLine(line, style) {
|
|
32113
32497
|
return style ? `${ANSI_STYLES[style]}${line}${ANSI_RESET}` : line;
|
|
32114
32498
|
}
|
|
32115
|
-
var CLI_ERROR_CODES = [
|
|
32116
|
-
"invalid_argument",
|
|
32117
|
-
"authentication_required",
|
|
32118
|
-
"permission_denied",
|
|
32119
|
-
"local_permission_denied",
|
|
32120
|
-
"not_found",
|
|
32121
|
-
"rate_limited",
|
|
32122
|
-
"network_error",
|
|
32123
|
-
"timeout",
|
|
32124
|
-
"server_error",
|
|
32125
|
-
"method_not_allowed",
|
|
32126
|
-
"not_supported",
|
|
32127
|
-
"configuration_error",
|
|
32128
|
-
"execution_failed",
|
|
32129
|
-
"unknown_error"
|
|
32130
|
-
];
|
|
32131
|
-
var RETRY_HINTS = [
|
|
32132
|
-
"RetryWillNotFix",
|
|
32133
|
-
"RetryLater",
|
|
32134
|
-
"RetryAfter1Second",
|
|
32135
|
-
"RetryAfter10Seconds",
|
|
32136
|
-
"RetryAfter30Seconds",
|
|
32137
|
-
"RetryAfter60Seconds"
|
|
32138
|
-
];
|
|
32139
|
-
var CLI_ERROR_CODE_VALUES = new Set(CLI_ERROR_CODES);
|
|
32140
|
-
var RETRY_HINT_VALUES = new Set(RETRY_HINTS);
|
|
32141
|
-
function isCliErrorCode(value) {
|
|
32142
|
-
return typeof value === "string" && CLI_ERROR_CODE_VALUES.has(value);
|
|
32143
|
-
}
|
|
32144
|
-
function isRetryHint(value) {
|
|
32145
|
-
return typeof value === "string" && RETRY_HINT_VALUES.has(value);
|
|
32146
|
-
}
|
|
32147
|
-
var RESULTS = {
|
|
32148
|
-
Success: "Success",
|
|
32149
|
-
Failure: "Failure",
|
|
32150
|
-
ConfigError: "ConfigError",
|
|
32151
|
-
AuthenticationError: "AuthenticationError",
|
|
32152
|
-
ValidationError: "ValidationError",
|
|
32153
|
-
TimeoutError: "TimeoutError"
|
|
32154
|
-
};
|
|
32155
32499
|
var EXIT_CODES = {
|
|
32156
32500
|
Success: 0,
|
|
32157
32501
|
Failure: 1,
|
|
@@ -32160,6 +32504,9 @@ var EXIT_CODES = {
|
|
|
32160
32504
|
ValidationError: 3,
|
|
32161
32505
|
TimeoutError: 4
|
|
32162
32506
|
};
|
|
32507
|
+
function exitCodeForResult(result) {
|
|
32508
|
+
return EXIT_CODES[result] ?? EXIT_CODES.Failure;
|
|
32509
|
+
}
|
|
32163
32510
|
|
|
32164
32511
|
class Pagination {
|
|
32165
32512
|
Returned;
|
|
@@ -32868,8 +33215,8 @@ function carriesOnlyNulls(value) {
|
|
|
32868
33215
|
}
|
|
32869
33216
|
return false;
|
|
32870
33217
|
}
|
|
32871
|
-
function nameList(names,
|
|
32872
|
-
const shown = names.slice(0,
|
|
33218
|
+
function nameList(names, cap = 12) {
|
|
33219
|
+
const shown = names.slice(0, cap).map((n) => `\`${n}\``);
|
|
32873
33220
|
const rest = names.length - shown.length;
|
|
32874
33221
|
return shown.join(", ") + (rest > 0 ? `, and ${rest} more` : "");
|
|
32875
33222
|
}
|
|
@@ -33006,59 +33353,19 @@ function defaultErrorCodeForResult(result) {
|
|
|
33006
33353
|
return "unknown_error";
|
|
33007
33354
|
}
|
|
33008
33355
|
}
|
|
33009
|
-
function parseHttpStatusFromMessage2(message) {
|
|
33010
|
-
const match = /^HTTP\s+(\d{3})(?::|\s|-|$)/i.exec(message.trim());
|
|
33011
|
-
if (!match)
|
|
33012
|
-
return;
|
|
33013
|
-
const status = Number(match[1]);
|
|
33014
|
-
return Number.isInteger(status) && status >= 100 && status <= 599 ? status : undefined;
|
|
33015
|
-
}
|
|
33016
|
-
function defaultErrorCodeForHttpStatus(status) {
|
|
33017
|
-
if (status === undefined)
|
|
33018
|
-
return;
|
|
33019
|
-
if (status === 400 || status === 409 || status === 422) {
|
|
33020
|
-
return "invalid_argument";
|
|
33021
|
-
}
|
|
33022
|
-
if (status === 401)
|
|
33023
|
-
return "authentication_required";
|
|
33024
|
-
if (status === 403)
|
|
33025
|
-
return "permission_denied";
|
|
33026
|
-
if (status === 404)
|
|
33027
|
-
return "not_found";
|
|
33028
|
-
if (status === 405)
|
|
33029
|
-
return "method_not_allowed";
|
|
33030
|
-
if (status === 408)
|
|
33031
|
-
return "timeout";
|
|
33032
|
-
if (status === 429)
|
|
33033
|
-
return "rate_limited";
|
|
33034
|
-
if (status >= 500 && status < 600)
|
|
33035
|
-
return "server_error";
|
|
33036
|
-
return;
|
|
33037
|
-
}
|
|
33038
33356
|
var LOCAL_PERMISSION_TEXT_PATTERN = new RegExp(`(?:\\b|\\()(?:${[...LOCAL_PERMISSION_ERROR_CODES].join("|")})(?::\\s|\\))`);
|
|
33039
33357
|
function defaultErrorCodeForFailure(data) {
|
|
33040
33358
|
if (data.Result === RESULTS.Failure) {
|
|
33041
|
-
const status = data.Context?.httpStatus ??
|
|
33042
|
-
const
|
|
33043
|
-
if (
|
|
33044
|
-
return
|
|
33359
|
+
const status = data.Context?.httpStatus ?? parseHttpStatusFromMessage(data.Message);
|
|
33360
|
+
const errorCode = classifyHttpStatus(status)?.errorCode;
|
|
33361
|
+
if (errorCode)
|
|
33362
|
+
return errorCode;
|
|
33045
33363
|
if (status === undefined && (LOCAL_PERMISSION_TEXT_PATTERN.test(data.Message) || LOCAL_PERMISSION_TEXT_PATTERN.test(data.Instructions))) {
|
|
33046
33364
|
return "local_permission_denied";
|
|
33047
33365
|
}
|
|
33048
33366
|
}
|
|
33049
33367
|
return defaultErrorCodeForResult(data.Result);
|
|
33050
33368
|
}
|
|
33051
|
-
function defaultRetryForErrorCode(errorCode2) {
|
|
33052
|
-
switch (errorCode2) {
|
|
33053
|
-
case "network_error":
|
|
33054
|
-
case "rate_limited":
|
|
33055
|
-
case "server_error":
|
|
33056
|
-
case "timeout":
|
|
33057
|
-
return "RetryLater";
|
|
33058
|
-
default:
|
|
33059
|
-
return "RetryWillNotFix";
|
|
33060
|
-
}
|
|
33061
|
-
}
|
|
33062
33369
|
var OutputFormatter;
|
|
33063
33370
|
((OutputFormatter) => {
|
|
33064
33371
|
function success(data, options) {
|
|
@@ -33090,7 +33397,7 @@ var OutputFormatter;
|
|
|
33090
33397
|
data.Log ??= getLogFilePath() || undefined;
|
|
33091
33398
|
data.ErrorCode ??= defaultErrorCodeForFailure(data);
|
|
33092
33399
|
data.Retry ??= defaultRetryForErrorCode(data.ErrorCode);
|
|
33093
|
-
const exitCode =
|
|
33400
|
+
const exitCode = exitCodeForResult(data.Result);
|
|
33094
33401
|
setExitCode(exitCode);
|
|
33095
33402
|
recordCommandFailureTelemetry({
|
|
33096
33403
|
result: data.Result,
|
|
@@ -33184,39 +33491,228 @@ var OutputFormatter;
|
|
|
33184
33491
|
}
|
|
33185
33492
|
OutputFormatter.formatToString = formatToString;
|
|
33186
33493
|
})(OutputFormatter ||= {});
|
|
33187
|
-
// ../../node_modules/commander/esm.mjs
|
|
33188
|
-
var import__2 = __toESM(require_commander(), 1);
|
|
33189
|
-
var {
|
|
33190
|
-
program,
|
|
33191
|
-
createCommand,
|
|
33192
|
-
createArgument,
|
|
33193
|
-
createOption,
|
|
33194
|
-
CommanderError,
|
|
33195
|
-
InvalidArgumentError,
|
|
33196
|
-
InvalidOptionArgumentError,
|
|
33197
|
-
Command,
|
|
33198
|
-
Argument,
|
|
33199
|
-
Option,
|
|
33200
|
-
Help
|
|
33201
|
-
} = import__2.default;
|
|
33202
33494
|
|
|
33203
|
-
// ../common/src/
|
|
33204
|
-
|
|
33205
|
-
|
|
33206
|
-
examplesByCommand.set(this, examples);
|
|
33207
|
-
return this;
|
|
33208
|
-
};
|
|
33209
|
-
// ../common/src/preview.ts
|
|
33210
|
-
var previewSlot = singleton("PreviewBuild");
|
|
33211
|
-
function isPreviewBuild() {
|
|
33212
|
-
return previewSlot.get(false) ?? false;
|
|
33495
|
+
// ../common/src/pass-through-tail.ts
|
|
33496
|
+
function maybeOption(arg) {
|
|
33497
|
+
return arg.length > 1 && arg[0] === "-";
|
|
33213
33498
|
}
|
|
33214
|
-
|
|
33215
|
-
|
|
33216
|
-
|
|
33499
|
+
function tokenizeTail(cmd, tail) {
|
|
33500
|
+
const find = (flag) => cmd.options.find((option) => option.long === flag || option.short === flag);
|
|
33501
|
+
const digitShort = cmd.options.some((option) => option.short !== undefined && /^-\d$/.test(option.short));
|
|
33502
|
+
const negativeNumber = (arg) => !digitShort && /^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(arg);
|
|
33503
|
+
const tokens = [];
|
|
33504
|
+
let firstUnknown = -1;
|
|
33505
|
+
let sentinel = -1;
|
|
33506
|
+
let variadic;
|
|
33507
|
+
let group;
|
|
33508
|
+
let groupIndex = 0;
|
|
33509
|
+
let i = 0;
|
|
33510
|
+
while (i < tail.length || group !== undefined) {
|
|
33511
|
+
const index = group === undefined ? i : groupIndex;
|
|
33512
|
+
const arg = group ?? tail[i++];
|
|
33513
|
+
group = undefined;
|
|
33514
|
+
if (arg === "--") {
|
|
33515
|
+
sentinel = index;
|
|
33516
|
+
tokens.push({ kind: "sentinel", index });
|
|
33517
|
+
for (let j = i;j < tail.length; j++) {
|
|
33518
|
+
tokens.push({
|
|
33519
|
+
kind: "operand",
|
|
33520
|
+
index: j,
|
|
33521
|
+
text: tail[j],
|
|
33522
|
+
literal: true
|
|
33523
|
+
});
|
|
33524
|
+
}
|
|
33525
|
+
break;
|
|
33526
|
+
}
|
|
33527
|
+
if (variadic && (!maybeOption(arg) || negativeNumber(arg))) {
|
|
33528
|
+
tokens.push({
|
|
33529
|
+
kind: "option",
|
|
33530
|
+
index,
|
|
33531
|
+
text: arg,
|
|
33532
|
+
option: variadic,
|
|
33533
|
+
value: arg
|
|
33534
|
+
});
|
|
33535
|
+
continue;
|
|
33536
|
+
}
|
|
33537
|
+
variadic = undefined;
|
|
33538
|
+
if (maybeOption(arg)) {
|
|
33539
|
+
const option = find(arg);
|
|
33540
|
+
if (option) {
|
|
33541
|
+
let value;
|
|
33542
|
+
if (option.required) {
|
|
33543
|
+
value = tail[i];
|
|
33544
|
+
if (value !== undefined)
|
|
33545
|
+
i++;
|
|
33546
|
+
} else if (option.optional) {
|
|
33547
|
+
const next = tail[i];
|
|
33548
|
+
if (next !== undefined && (!maybeOption(next) || negativeNumber(next))) {
|
|
33549
|
+
value = next;
|
|
33550
|
+
i++;
|
|
33551
|
+
}
|
|
33552
|
+
}
|
|
33553
|
+
tokens.push({
|
|
33554
|
+
kind: "option",
|
|
33555
|
+
index,
|
|
33556
|
+
text: arg,
|
|
33557
|
+
option,
|
|
33558
|
+
...value === undefined ? {} : { value }
|
|
33559
|
+
});
|
|
33560
|
+
variadic = option.variadic ? option : undefined;
|
|
33561
|
+
continue;
|
|
33562
|
+
}
|
|
33563
|
+
}
|
|
33564
|
+
if (arg.length > 2 && arg[0] === "-" && arg[1] !== "-") {
|
|
33565
|
+
const option = find(`-${arg[1]}`);
|
|
33566
|
+
if (option) {
|
|
33567
|
+
if (option.required || option.optional) {
|
|
33568
|
+
tokens.push({
|
|
33569
|
+
kind: "option",
|
|
33570
|
+
index,
|
|
33571
|
+
text: arg,
|
|
33572
|
+
option,
|
|
33573
|
+
value: arg.slice(2)
|
|
33574
|
+
});
|
|
33575
|
+
} else {
|
|
33576
|
+
tokens.push({ kind: "option", index, text: arg, option });
|
|
33577
|
+
group = `-${arg.slice(2)}`;
|
|
33578
|
+
groupIndex = index;
|
|
33579
|
+
}
|
|
33580
|
+
continue;
|
|
33581
|
+
}
|
|
33582
|
+
}
|
|
33583
|
+
if (/^--[^=]+=/.test(arg)) {
|
|
33584
|
+
const equals = arg.indexOf("=");
|
|
33585
|
+
const option = find(arg.slice(0, equals));
|
|
33586
|
+
if (option && (option.required || option.optional)) {
|
|
33587
|
+
tokens.push({
|
|
33588
|
+
kind: "option",
|
|
33589
|
+
index,
|
|
33590
|
+
text: arg,
|
|
33591
|
+
option,
|
|
33592
|
+
value: arg.slice(equals + 1)
|
|
33593
|
+
});
|
|
33594
|
+
continue;
|
|
33595
|
+
}
|
|
33596
|
+
}
|
|
33597
|
+
if (maybeOption(arg) && !negativeNumber(arg)) {
|
|
33598
|
+
const equals = arg.startsWith("--") ? arg.indexOf("=") : -1;
|
|
33599
|
+
if (firstUnknown === -1)
|
|
33600
|
+
firstUnknown = index;
|
|
33601
|
+
tokens.push({
|
|
33602
|
+
kind: "unknown",
|
|
33603
|
+
index,
|
|
33604
|
+
text: arg,
|
|
33605
|
+
flag: equals > 0 ? arg.slice(0, equals) : arg,
|
|
33606
|
+
...equals > 0 ? { inlineValue: arg.slice(equals + 1) } : {}
|
|
33607
|
+
});
|
|
33608
|
+
continue;
|
|
33609
|
+
}
|
|
33610
|
+
tokens.push({ kind: "operand", index, text: arg, literal: false });
|
|
33217
33611
|
}
|
|
33218
|
-
return
|
|
33219
|
-
}
|
|
33612
|
+
return { tokens, firstUnknown, sentinel };
|
|
33613
|
+
}
|
|
33614
|
+
|
|
33615
|
+
// ../common/src/project-telemetry.ts
|
|
33616
|
+
var RESOLVER = Symbol.for("@uipath/common/projectTelemetryResolver");
|
|
33617
|
+
var CAPTURE = Symbol.for("@uipath/common/projectTelemetryCapture");
|
|
33618
|
+
var CONTEXT_RESOLVER = Symbol.for("@uipath/common/projectContextTelemetryResolver");
|
|
33619
|
+
var RULES = Symbol.for("@uipath/common/projectTargetRules");
|
|
33620
|
+
function logSkipped(what, error) {
|
|
33621
|
+
logger.debug(`[project-telemetry] ${what} skipped: ${error instanceof Error ? error.message : String(error)}`);
|
|
33622
|
+
}
|
|
33623
|
+
function bounded(work, what) {
|
|
33624
|
+
return withinProjectIdentityBudget(work, () => logSkipped(what, `no answer within ${PROJECT_IDENTITY_LOOKUP_BUDGET_MS} ms`));
|
|
33625
|
+
}
|
|
33626
|
+
async function identityWithContext(command, identity) {
|
|
33627
|
+
const props = projectIdentityProperties(identity);
|
|
33628
|
+
if (!identity.projectDirectory || isProjectTelemetryDisabled())
|
|
33629
|
+
return props;
|
|
33630
|
+
for (let node = command;node; node = node.parent ?? undefined) {
|
|
33631
|
+
const resolver = node[CONTEXT_RESOLVER];
|
|
33632
|
+
if (typeof resolver !== "function")
|
|
33633
|
+
continue;
|
|
33634
|
+
try {
|
|
33635
|
+
return {
|
|
33636
|
+
...await resolver(identity.projectDirectory),
|
|
33637
|
+
...props
|
|
33638
|
+
};
|
|
33639
|
+
} catch (error) {
|
|
33640
|
+
logSkipped("solution context lookup", error);
|
|
33641
|
+
return props;
|
|
33642
|
+
}
|
|
33643
|
+
}
|
|
33644
|
+
return props;
|
|
33645
|
+
}
|
|
33646
|
+
function getProjectTelemetryResolver(command) {
|
|
33647
|
+
for (let node = command;node; node = node.parent) {
|
|
33648
|
+
const resolver = node[RESOLVER];
|
|
33649
|
+
if (typeof resolver === "function")
|
|
33650
|
+
return resolver;
|
|
33651
|
+
}
|
|
33652
|
+
return;
|
|
33653
|
+
}
|
|
33654
|
+
function attachProjectTelemetryCapture(command, capture) {
|
|
33655
|
+
command[CAPTURE] = capture;
|
|
33656
|
+
}
|
|
33657
|
+
class ProjectTelemetrySession {
|
|
33658
|
+
resolver;
|
|
33659
|
+
command;
|
|
33660
|
+
target;
|
|
33661
|
+
props = {};
|
|
33662
|
+
explicit = false;
|
|
33663
|
+
input;
|
|
33664
|
+
constructor(resolver, command) {
|
|
33665
|
+
this.resolver = resolver;
|
|
33666
|
+
this.command = command;
|
|
33667
|
+
}
|
|
33668
|
+
async setTarget(path) {
|
|
33669
|
+
this.target = path;
|
|
33670
|
+
if (this.input) {
|
|
33671
|
+
await this.resolve({
|
|
33672
|
+
...this.input,
|
|
33673
|
+
phase: "after",
|
|
33674
|
+
success: true
|
|
33675
|
+
});
|
|
33676
|
+
this.explicit = true;
|
|
33677
|
+
}
|
|
33678
|
+
}
|
|
33679
|
+
async setIdentity(identity) {
|
|
33680
|
+
try {
|
|
33681
|
+
const props = await bounded(identityWithContext(this.command, identity), "project identity capture");
|
|
33682
|
+
if (props !== undefined)
|
|
33683
|
+
this.setProperties(props);
|
|
33684
|
+
} catch (error) {
|
|
33685
|
+
logSkipped("project identity capture", error);
|
|
33686
|
+
}
|
|
33687
|
+
}
|
|
33688
|
+
setProperties(properties) {
|
|
33689
|
+
try {
|
|
33690
|
+
this.props = { ...properties };
|
|
33691
|
+
this.explicit = true;
|
|
33692
|
+
} catch (error) {
|
|
33693
|
+
logSkipped("project identity properties", error);
|
|
33694
|
+
}
|
|
33695
|
+
}
|
|
33696
|
+
properties() {
|
|
33697
|
+
return { ...this.props };
|
|
33698
|
+
}
|
|
33699
|
+
async resolve(input) {
|
|
33700
|
+
this.input = input;
|
|
33701
|
+
if (this.explicit)
|
|
33702
|
+
return;
|
|
33703
|
+
try {
|
|
33704
|
+
const props = await bounded(this.resolver({
|
|
33705
|
+
...input,
|
|
33706
|
+
target: this.target
|
|
33707
|
+
}), `project identity (${input.phase})`);
|
|
33708
|
+
if (props !== undefined) {
|
|
33709
|
+
this.props = props;
|
|
33710
|
+
}
|
|
33711
|
+
} catch (error) {
|
|
33712
|
+
logSkipped(`project identity (${input.phase})`, error);
|
|
33713
|
+
}
|
|
33714
|
+
}
|
|
33715
|
+
}
|
|
33220
33716
|
|
|
33221
33717
|
// ../common/src/telemetry/command-attribution.ts
|
|
33222
33718
|
var LEGACY_SKILL_NAMESPACE = "uipath:";
|
|
@@ -33462,8 +33958,7 @@ var pollSignalSlot = singleton("PollSignal");
|
|
|
33462
33958
|
var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
|
|
33463
33959
|
var processContext = {
|
|
33464
33960
|
exit: (code) => {
|
|
33465
|
-
|
|
33466
|
-
setExitCode(code);
|
|
33961
|
+
recordCommandExit(code);
|
|
33467
33962
|
},
|
|
33468
33963
|
get pollSignal() {
|
|
33469
33964
|
return pollSignalSlot.get();
|
|
@@ -33488,6 +33983,8 @@ function recordableArgValue(value, choices) {
|
|
|
33488
33983
|
function extractCommandParams(cmd) {
|
|
33489
33984
|
const params = {};
|
|
33490
33985
|
forEachSuppliedArgument(cmd, (name, value, choices, defaulted) => {
|
|
33986
|
+
if (name === undefined)
|
|
33987
|
+
return;
|
|
33491
33988
|
const recordable = recordableArgValue(value, choices);
|
|
33492
33989
|
params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = recordable === TELEMETRY_ARG_VALUE_WITHHELD && defaulted ? TELEMETRY_ARG_VALUE_DEFAULTED : recordable;
|
|
33493
33990
|
});
|
|
@@ -33503,7 +34000,8 @@ function isDefaultedPositional(cmd, index) {
|
|
|
33503
34000
|
function forEachSuppliedArgument(cmd, visit) {
|
|
33504
34001
|
const registered = cmd.registeredArguments ?? [];
|
|
33505
34002
|
const processed = cmd.processedArgs ?? [];
|
|
33506
|
-
|
|
34003
|
+
const bound = boundPositionalCount(cmd);
|
|
34004
|
+
for (let i = 0;i < bound; i++) {
|
|
33507
34005
|
const name = registered[i].name();
|
|
33508
34006
|
if (name && processed[i] !== undefined) {
|
|
33509
34007
|
visit(name, processed[i], registered[i].argChoices, isDefaultedPositional(cmd, i));
|
|
@@ -33518,6 +34016,71 @@ function forEachSuppliedArgument(cmd, visit) {
|
|
|
33518
34016
|
visit(key, value, choicesByAttribute.get(key), isDefaultedOption(cmd, key));
|
|
33519
34017
|
}
|
|
33520
34018
|
}
|
|
34019
|
+
forEachPassThroughToken(cmd, bound, (name, value) => {
|
|
34020
|
+
visit(name, value, name === undefined ? undefined : choicesByAttribute.get(name), false);
|
|
34021
|
+
});
|
|
34022
|
+
}
|
|
34023
|
+
function boundPositionalCount(cmd) {
|
|
34024
|
+
const registered = cmd.registeredArguments ?? [];
|
|
34025
|
+
if (registered.some((argument) => argument.variadic)) {
|
|
34026
|
+
return registered.length;
|
|
34027
|
+
}
|
|
34028
|
+
if ((cmd.args ?? []).length <= registered.length) {
|
|
34029
|
+
return registered.length;
|
|
34030
|
+
}
|
|
34031
|
+
const firstFlag = tokenizeTail(cmd, (cmd.args ?? []).slice(1)).tokens.find((token) => token.kind !== "operand")?.index ?? -1;
|
|
34032
|
+
return firstFlag === -1 ? registered.length : Math.min(registered.length, firstFlag + 1);
|
|
34033
|
+
}
|
|
34034
|
+
function forEachPassThroughToken(cmd, bound, visit) {
|
|
34035
|
+
const registered = cmd.registeredArguments ?? [];
|
|
34036
|
+
const fillsPositionals = !registered.some((argument) => argument.variadic);
|
|
34037
|
+
const { tokens, firstUnknown } = tokenizeTail(cmd, (cmd.args ?? []).slice(bound));
|
|
34038
|
+
const repeated = new Map;
|
|
34039
|
+
let nextPositional = bound;
|
|
34040
|
+
for (const token of tokens) {
|
|
34041
|
+
const pastUnknown = firstUnknown !== -1 && token.index > firstUnknown;
|
|
34042
|
+
if (token.kind === "sentinel")
|
|
34043
|
+
continue;
|
|
34044
|
+
if (token.kind === "operand") {
|
|
34045
|
+
const claimable = !pastUnknown && fillsPositionals && nextPositional < registered.length;
|
|
34046
|
+
const name = claimable ? registered[nextPositional++].name() : undefined;
|
|
34047
|
+
visit(name || undefined, token.text);
|
|
34048
|
+
continue;
|
|
34049
|
+
}
|
|
34050
|
+
if (token.kind === "unknown") {
|
|
34051
|
+
const bare = token.flag.replace(/^-+/, "");
|
|
34052
|
+
const key = bare.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
34053
|
+
const keyable = token.flag.startsWith("--") || token.flag.length === 2;
|
|
34054
|
+
if (!pastUnknown && keyable && /^[a-z][a-z0-9-]*$/i.test(bare) && key) {
|
|
34055
|
+
visit(key, token.inlineValue ?? true);
|
|
34056
|
+
} else {
|
|
34057
|
+
visit(undefined, token.text);
|
|
34058
|
+
if (token.inlineValue !== undefined) {
|
|
34059
|
+
visit(undefined, token.inlineValue);
|
|
34060
|
+
} else if (!token.flag.startsWith("--") && token.flag.length > 2) {
|
|
34061
|
+
visit(undefined, token.flag.slice(2));
|
|
34062
|
+
}
|
|
34063
|
+
}
|
|
34064
|
+
continue;
|
|
34065
|
+
}
|
|
34066
|
+
if (pastUnknown) {
|
|
34067
|
+
visit(undefined, token.text);
|
|
34068
|
+
if (token.value !== undefined)
|
|
34069
|
+
visit(undefined, token.value);
|
|
34070
|
+
continue;
|
|
34071
|
+
}
|
|
34072
|
+
const option = token.option;
|
|
34073
|
+
const name = option.attributeName();
|
|
34074
|
+
const value = option.negate ? false : option.required || option.optional ? token.value ?? true : true;
|
|
34075
|
+
const previous = repeated.get(name);
|
|
34076
|
+
if (previous) {
|
|
34077
|
+
previous.push(value);
|
|
34078
|
+
visit(name, previous);
|
|
34079
|
+
} else {
|
|
34080
|
+
repeated.set(name, [value]);
|
|
34081
|
+
visit(name, value);
|
|
34082
|
+
}
|
|
34083
|
+
}
|
|
33521
34084
|
}
|
|
33522
34085
|
function withheldArgumentValues(cmd) {
|
|
33523
34086
|
const values = [];
|
|
@@ -33579,11 +34142,13 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
33579
34142
|
const telemetryName = commandTelemetryName(commandParts);
|
|
33580
34143
|
const commandPath = commandInvocationPath(commandParts);
|
|
33581
34144
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
34145
|
+
const projectResolver = getProjectTelemetryResolver(command);
|
|
34146
|
+
const projectSession = projectResolver && !isProjectTelemetryDisabled() ? new ProjectTelemetrySession(projectResolver, command) : undefined;
|
|
33582
34147
|
markCommandStart();
|
|
33583
34148
|
const supplied = recordSuppliedArgumentValues(withheldArgumentValues(command));
|
|
33584
34149
|
try {
|
|
33585
34150
|
const startTime = performance.now();
|
|
33586
|
-
let
|
|
34151
|
+
let errorMessage;
|
|
33587
34152
|
let fallbackExitCode = EXIT_CODES.Success;
|
|
33588
34153
|
clearRecordedCommandFailureTelemetry();
|
|
33589
34154
|
const [error] = await catchError2(ensureInvocationRequestScope(() => {
|
|
@@ -33591,30 +34156,40 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
33591
34156
|
if (violation) {
|
|
33592
34157
|
return Promise.reject(violation);
|
|
33593
34158
|
}
|
|
34159
|
+
if (projectSession) {
|
|
34160
|
+
return projectSession.resolve({ command, args, phase: "before" }).then(() => {
|
|
34161
|
+
attachProjectTelemetryCapture(command, projectSession);
|
|
34162
|
+
return fn(...args);
|
|
34163
|
+
});
|
|
34164
|
+
}
|
|
33594
34165
|
return fn(...args);
|
|
33595
34166
|
}));
|
|
33596
34167
|
if (error) {
|
|
33597
|
-
|
|
33598
|
-
logger.debug(`[trackedAction] ${telemetryName} failed: ${
|
|
34168
|
+
errorMessage = error instanceof Error ? error.message : String(error);
|
|
34169
|
+
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
|
|
33599
34170
|
const typed = error;
|
|
33600
34171
|
const customInstructions = typeof typed.instructions === "string" ? typed.instructions : undefined;
|
|
33601
34172
|
const customResult = typeof typed.result === "string" && typed.result !== RESULTS.Success && Object.values(RESULTS).includes(typed.result) ? typed.result : undefined;
|
|
33602
|
-
const
|
|
34173
|
+
const cancellationExitCode = typed.exitCode === 130 || isPromptCancellation(error) ? 130 : undefined;
|
|
34174
|
+
const classified = cancellationExitCode === undefined ? await extractErrorDetails(error) : undefined;
|
|
34175
|
+
const finalResult = customResult ?? classified?.result ?? RESULTS.Failure;
|
|
33603
34176
|
const typedErrorCode = typed.errorCode ?? typed.ErrorCode;
|
|
33604
34177
|
const customErrorCode = isCliErrorCode(typedErrorCode) ? typedErrorCode : undefined;
|
|
33605
34178
|
const typedRetry = typed.retry ?? typed.Retry;
|
|
33606
34179
|
const customRetry = isRetryHint(typedRetry) ? typedRetry : undefined;
|
|
33607
34180
|
const typedContext = typed.context ?? typed.Context;
|
|
33608
34181
|
const customContext = isErrorContext(typedContext) ? typedContext : undefined;
|
|
33609
|
-
const cancellationExitCode = typed.exitCode === 130 || isPromptCancellation(error) ? 130 : undefined;
|
|
33610
34182
|
fallbackExitCode = cancellationExitCode ?? EXIT_CODES[finalResult];
|
|
34183
|
+
const errorCode = customErrorCode ?? classified?.errorCode;
|
|
34184
|
+
const retry = customRetry ?? classified?.retry;
|
|
34185
|
+
const errorContext = customContext ?? classified?.context;
|
|
33611
34186
|
OutputFormatter.error({
|
|
33612
34187
|
Result: finalResult,
|
|
33613
|
-
...
|
|
33614
|
-
Message:
|
|
34188
|
+
...errorCode ? { ErrorCode: errorCode } : {},
|
|
34189
|
+
Message: errorMessage,
|
|
33615
34190
|
Instructions: customInstructions ?? commandHelpHint(commandPath),
|
|
33616
|
-
...
|
|
33617
|
-
...
|
|
34191
|
+
...retry ? { Retry: retry } : {},
|
|
34192
|
+
...errorContext ? { Context: errorContext } : {}
|
|
33618
34193
|
});
|
|
33619
34194
|
context.exit(fallbackExitCode);
|
|
33620
34195
|
}
|
|
@@ -33623,6 +34198,14 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
33623
34198
|
const exitCode = fallbackExitCode === 130 ? fallbackExitCode : exitCodeFromProcess(fallbackExitCode);
|
|
33624
34199
|
const recordedFailure = takeRecordedCommandFailureTelemetry();
|
|
33625
34200
|
const success = !error && exitCode === 0;
|
|
34201
|
+
if (projectSession) {
|
|
34202
|
+
await projectSession.resolve({
|
|
34203
|
+
command,
|
|
34204
|
+
args,
|
|
34205
|
+
phase: "after",
|
|
34206
|
+
success
|
|
34207
|
+
});
|
|
34208
|
+
}
|
|
33626
34209
|
const terminalTelemetry = buildCommandTerminalTelemetryProperties({
|
|
33627
34210
|
error,
|
|
33628
34211
|
exitCode,
|
|
@@ -33640,16 +34223,19 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
33640
34223
|
}
|
|
33641
34224
|
const baseProperties = redactProperties({
|
|
33642
34225
|
...commandParams,
|
|
34226
|
+
...projectSession?.properties(),
|
|
33643
34227
|
...props,
|
|
33644
34228
|
...buildCommandTelemetryAttribution(commandPath, process.env.UIPATH_SKILL),
|
|
33645
34229
|
...buildAgentSessionTelemetry(process.env),
|
|
33646
34230
|
[CommandDimensions.CommandName]: commandPath,
|
|
33647
34231
|
[CommandDimensions.IsCommand]: "true",
|
|
33648
34232
|
...terminalTelemetry,
|
|
33649
|
-
...
|
|
34233
|
+
...errorMessage ? { [CommandDimensions.ErrorMessage]: errorMessage } : {}
|
|
33650
34234
|
});
|
|
33651
34235
|
emitInvocationRequest(telemetryName, success, baseProperties);
|
|
33652
34236
|
} finally {
|
|
34237
|
+
if (projectSession)
|
|
34238
|
+
attachProjectTelemetryCapture(command, undefined);
|
|
33653
34239
|
releaseSuppliedArgumentValues(supplied);
|
|
33654
34240
|
}
|
|
33655
34241
|
});
|
|
@@ -33922,14 +34508,14 @@ function parseOffset(raw, _previous) {
|
|
|
33922
34508
|
function parseBoundedInt(raw, optionName, bounds) {
|
|
33923
34509
|
const normalized = raw.trim();
|
|
33924
34510
|
if (normalized === "") {
|
|
33925
|
-
throw new
|
|
34511
|
+
throw new InvalidArgumentError2(`${optionName} requires a value (got empty).`);
|
|
33926
34512
|
}
|
|
33927
34513
|
if (!/^-?\d+$/.test(normalized)) {
|
|
33928
|
-
throw new
|
|
34514
|
+
throw new InvalidArgumentError2(`${optionName} must be an integer, got '${normalized}'.`);
|
|
33929
34515
|
}
|
|
33930
34516
|
const n = parseInt(normalized, 10);
|
|
33931
34517
|
if (n < bounds.min || n > bounds.max) {
|
|
33932
|
-
throw new
|
|
34518
|
+
throw new InvalidArgumentError2(`${optionName} must be between ${bounds.min} and ${bounds.max}, got ${n}.`);
|
|
33933
34519
|
}
|
|
33934
34520
|
return n;
|
|
33935
34521
|
}
|
|
@@ -34030,7 +34616,7 @@ function abortError(signal) {
|
|
|
34030
34616
|
return err;
|
|
34031
34617
|
}
|
|
34032
34618
|
function interruptibleSleep(ms, signal) {
|
|
34033
|
-
return new Promise((
|
|
34619
|
+
return new Promise((resolve, reject) => {
|
|
34034
34620
|
if (signal?.aborted) {
|
|
34035
34621
|
reject(abortError(signal));
|
|
34036
34622
|
return;
|
|
@@ -34043,7 +34629,7 @@ function interruptibleSleep(ms, signal) {
|
|
|
34043
34629
|
};
|
|
34044
34630
|
const timer = setTimeout(() => {
|
|
34045
34631
|
cleanup();
|
|
34046
|
-
|
|
34632
|
+
resolve();
|
|
34047
34633
|
}, ms);
|
|
34048
34634
|
if (signal) {
|
|
34049
34635
|
onAbort = () => {
|
|
@@ -34058,11 +34644,31 @@ function interruptibleSleep(ms, signal) {
|
|
|
34058
34644
|
function sanitizeMaxErrors(value) {
|
|
34059
34645
|
if (value === undefined)
|
|
34060
34646
|
return POLL_DEFAULTS.maxConsecutiveErrors;
|
|
34061
|
-
if (
|
|
34647
|
+
if (value < 0)
|
|
34062
34648
|
return 0;
|
|
34063
34649
|
return Math.floor(value);
|
|
34064
34650
|
}
|
|
34651
|
+
function requireFinite(value, field) {
|
|
34652
|
+
if (value !== undefined && !Number.isFinite(value)) {
|
|
34653
|
+
throw new RangeError(`pollUntil: ${field} must be a finite number, got ${String(value)}.`);
|
|
34654
|
+
}
|
|
34655
|
+
}
|
|
34656
|
+
function assertFiniteSettings(options) {
|
|
34657
|
+
requireFinite(options.timeoutMs, "timeoutMs");
|
|
34658
|
+
if (typeof options.intervalMs === "number") {
|
|
34659
|
+
requireFinite(options.intervalMs, "intervalMs");
|
|
34660
|
+
}
|
|
34661
|
+
requireFinite(options.maxConsecutiveErrors, "maxConsecutiveErrors");
|
|
34662
|
+
requireFinite(options.logIntervalMs, "logIntervalMs");
|
|
34663
|
+
if (typeof options.backoff === "object" && options.backoff !== null) {
|
|
34664
|
+
requireFinite(options.backoff.initialMs, "backoff.initialMs");
|
|
34665
|
+
requireFinite(options.backoff.multiplier, "backoff.multiplier");
|
|
34666
|
+
requireFinite(options.backoff.maxMs, "backoff.maxMs");
|
|
34667
|
+
requireFinite(options.backoff.jitter, "backoff.jitter");
|
|
34668
|
+
}
|
|
34669
|
+
}
|
|
34065
34670
|
function resolveConfig(options) {
|
|
34671
|
+
assertFiniteSettings(options);
|
|
34066
34672
|
const timeoutMs = Math.max(0, options.timeoutMs ?? POLL_DEFAULTS.timeoutMs);
|
|
34067
34673
|
const startTime = Date.now();
|
|
34068
34674
|
return {
|
|
@@ -34526,26 +35132,20 @@ var formatResponseError = async (err) => {
|
|
|
34526
35132
|
var import_license_accountant_typescript2 = __toESM(require_dist(), 1);
|
|
34527
35133
|
var import_license_resource_manager_typescript = __toESM(require_dist2(), 1);
|
|
34528
35134
|
var createPlatformContext = async (organizationOverride) => {
|
|
34529
|
-
const
|
|
34530
|
-
|
|
34531
|
-
throw new Error(status.hint ?? "Not logged in. Run 'uip login' first.");
|
|
34532
|
-
}
|
|
34533
|
-
const accountId = organizationOverride ?? status.organizationId;
|
|
35135
|
+
const auth = await getAuthContext({ requireOrganizationName: true });
|
|
35136
|
+
const accountId = organizationOverride ?? auth.organizationId;
|
|
34534
35137
|
if (!accountId) {
|
|
34535
35138
|
throw new Error("Organization account id not available. Provide --organization <account-id> or re-run 'uip login'.");
|
|
34536
35139
|
}
|
|
34537
|
-
if (!status.organizationName) {
|
|
34538
|
-
throw new Error("Organization name not available on the current login. Re-run 'uip login' to refresh credentials.");
|
|
34539
|
-
}
|
|
34540
35140
|
return {
|
|
34541
|
-
accessToken:
|
|
35141
|
+
accessToken: auth.accessToken,
|
|
34542
35142
|
accountId,
|
|
34543
|
-
baseUrl:
|
|
34544
|
-
organizationName:
|
|
35143
|
+
baseUrl: auth.baseUrl.replace(/\/+$/, ""),
|
|
35144
|
+
organizationName: auth.organizationName
|
|
34545
35145
|
};
|
|
34546
35146
|
};
|
|
34547
|
-
var licenseBasePath = (ctx) => `${ctx.baseUrl}/${ctx.organizationName}/license_`;
|
|
34548
|
-
var leaseBasePath = (ctx) => `${ctx.baseUrl}/${ctx.organizationName}/lease_`;
|
|
35147
|
+
var licenseBasePath = (ctx) => `${ctx.baseUrl}/${encodeURIComponent(ctx.organizationName)}/license_`;
|
|
35148
|
+
var leaseBasePath = (ctx) => `${ctx.baseUrl}/${encodeURIComponent(ctx.organizationName)}/lease_`;
|
|
34549
35149
|
var createPlatformApi = async (ConfigCtor, ApiCtor, basePath, organizationOverride) => {
|
|
34550
35150
|
const ctx = await createPlatformContext(organizationOverride);
|
|
34551
35151
|
const config = new ConfigCtor({
|
|
@@ -34806,27 +35406,14 @@ async function validateConsumablesOptions(options) {
|
|
|
34806
35406
|
return { mode, overrideRange: parsed };
|
|
34807
35407
|
}
|
|
34808
35408
|
async function resolveLoginAndTenants() {
|
|
34809
|
-
const [loginErr,
|
|
34810
|
-
if (loginErr
|
|
34811
|
-
OutputFormatter.error(
|
|
34812
|
-
Result: RESULTS.Failure,
|
|
34813
|
-
Message: "Not logged in.",
|
|
34814
|
-
Instructions: status?.hint ?? "Run 'uip login' first."
|
|
34815
|
-
});
|
|
35409
|
+
const [loginErr, auth] = await catchError2(getAuthContext({ requireOrganizationId: true }));
|
|
35410
|
+
if (loginErr) {
|
|
35411
|
+
OutputFormatter.error(await authContextFailure(loginErr, "Run 'uip login' first."));
|
|
34816
35412
|
processContext.exit(1);
|
|
34817
35413
|
return null;
|
|
34818
35414
|
}
|
|
34819
|
-
const accountId =
|
|
34820
|
-
|
|
34821
|
-
OutputFormatter.error({
|
|
34822
|
-
Result: RESULTS.Failure,
|
|
34823
|
-
Message: "Organization account id not available.",
|
|
34824
|
-
Instructions: "Re-run 'uip login' to refresh organization context."
|
|
34825
|
-
});
|
|
34826
|
-
processContext.exit(1);
|
|
34827
|
-
return null;
|
|
34828
|
-
}
|
|
34829
|
-
const [tenantsErr, tenantsResp] = await catchError2(fetchTenantsAndOrganizations(status.baseUrl, status.accessToken, status.organizationName || accountId));
|
|
35415
|
+
const accountId = auth.organizationId;
|
|
35416
|
+
const [tenantsErr, tenantsResp] = await catchError2(fetchTenantsAndOrganizations(auth.baseUrl, auth.accessToken, auth.organizationName || accountId));
|
|
34830
35417
|
if (tenantsErr || !tenantsResp) {
|
|
34831
35418
|
OutputFormatter.error({
|
|
34832
35419
|
Result: RESULTS.Failure,
|
|
@@ -34843,8 +35430,8 @@ async function resolveLoginAndTenants() {
|
|
|
34843
35430
|
tenantsById.set(t.id, t.name);
|
|
34844
35431
|
}
|
|
34845
35432
|
return {
|
|
34846
|
-
accessToken:
|
|
34847
|
-
baseUrl:
|
|
35433
|
+
accessToken: auth.accessToken,
|
|
35434
|
+
baseUrl: auth.baseUrl,
|
|
34848
35435
|
accountId,
|
|
34849
35436
|
tenants,
|
|
34850
35437
|
tenantsById
|
|
@@ -35116,8 +35703,8 @@ async function handleConsumablesGet(options) {
|
|
|
35116
35703
|
Data: rows
|
|
35117
35704
|
});
|
|
35118
35705
|
}
|
|
35119
|
-
var registerConsumablesCommand = (
|
|
35120
|
-
const licenses =
|
|
35706
|
+
var registerConsumablesCommand = (program) => {
|
|
35707
|
+
const licenses = program.commands.find((c) => c.name() === "licenses") ?? program.command("licenses").description("View and manage organization-level license resources.");
|
|
35121
35708
|
const consumables = licenses.commands.find((c) => c.name() === "consumables") ?? licenses.command("consumables").description("View consumable license usage across the organization and its tenants.");
|
|
35122
35709
|
consumables.command("get").description("Get a consumables report. Default --mode summary returns per-consumable allocation + per-tenant pool consumption. --mode daily returns the daily breakdown by service, and --mode folders returns the breakdown by folder, both scoped to a single tenant × consumable unit.").option("--mode <summary|daily|folders>", "Report shape. 'summary' (default) returns per-consumable allocation + per-tenant consumption. 'daily' returns one row per (date, service). 'folders' returns one row per folder. 'daily' and 'folders' both require --tenant, --unit, --start-date and --end-date.", "summary").option("--tenant <tenant-name>", "Scope the report to a single tenant (matched by name from the current organization's tenant list). Required when --mode daily.").option("--unit <code>", "Filter to a single consumable unit by product code (e.g. AIU, AGU, RU, PLTU). Case-insensitive. Required when --mode daily.").option("--start-date <iso-date>", "Start of the consumption window as an ISO 8601 date. Must be used together with --end-date. Overrides each consumable's bundle start. Required when --mode daily.").option("--end-date <iso-date>", "End of the consumption window as an ISO 8601 date. Must be used together with --start-date. Overrides each consumable's bundle end. Required when --mode daily.").examples(CONSUMABLES_GET_EXAMPLES).trackedAction(processContext, (options) => handleConsumablesGet(options));
|
|
35123
35710
|
};
|
|
@@ -35373,7 +35960,7 @@ var package_default2 = {
|
|
|
35373
35960
|
name: "@uipath/identity-sdk",
|
|
35374
35961
|
author: "UiPath",
|
|
35375
35962
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
35376
|
-
version: "1.
|
|
35963
|
+
version: "1.206.0",
|
|
35377
35964
|
repository: {
|
|
35378
35965
|
type: "git",
|
|
35379
35966
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -36147,15 +36734,20 @@ var formatGroupSummary = (group) => {
|
|
|
36147
36734
|
var resolveUniqueDirectoryGroup = async (groupInput, organizationOverride) => {
|
|
36148
36735
|
const [searchErr, matches] = await catchError2(searchDirectoryGroup(groupInput, organizationOverride));
|
|
36149
36736
|
if (searchErr) {
|
|
36737
|
+
const details = await extractErrorDetails(searchErr);
|
|
36150
36738
|
return {
|
|
36151
36739
|
ok: false,
|
|
36740
|
+
errorCode: details.errorCode,
|
|
36741
|
+
retry: details.retry,
|
|
36152
36742
|
message: `Error searching directory for group '${groupInput}'.`,
|
|
36153
|
-
instructions:
|
|
36743
|
+
instructions: details.message
|
|
36154
36744
|
};
|
|
36155
36745
|
}
|
|
36156
36746
|
if (matches.length === 0) {
|
|
36157
36747
|
return {
|
|
36158
36748
|
ok: false,
|
|
36749
|
+
errorCode: "not_found",
|
|
36750
|
+
retry: "RetryWillNotFix",
|
|
36159
36751
|
message: `No directory group found matching '${groupInput}'.`,
|
|
36160
36752
|
instructions: "Try a more specific name. The directory search is a 'starts with' match against local and directory groups."
|
|
36161
36753
|
};
|
|
@@ -36164,11 +36756,23 @@ var resolveUniqueDirectoryGroup = async (groupInput, organizationOverride) => {
|
|
|
36164
36756
|
const candidates = matches.slice(0, 10).map((m) => formatGroupSummary(m)).join("; ");
|
|
36165
36757
|
return {
|
|
36166
36758
|
ok: false,
|
|
36759
|
+
errorCode: "invalid_argument",
|
|
36760
|
+
retry: "RetryWillNotFix",
|
|
36167
36761
|
message: `Multiple directory groups matched '${groupInput}'.`,
|
|
36168
36762
|
instructions: `Refine your input — matches include: ${candidates}.`
|
|
36169
36763
|
};
|
|
36170
36764
|
}
|
|
36171
|
-
|
|
36765
|
+
const group = matches[0];
|
|
36766
|
+
if (!group.identifier) {
|
|
36767
|
+
return {
|
|
36768
|
+
ok: false,
|
|
36769
|
+
errorCode: "invalid_argument",
|
|
36770
|
+
retry: "RetryWillNotFix",
|
|
36771
|
+
message: `Directory group '${groupInput}' has no identifier.`,
|
|
36772
|
+
instructions: "Run 'uip admin groups list' to see the organization's groups and their IDs, then pass the name of a group that has one."
|
|
36773
|
+
};
|
|
36774
|
+
}
|
|
36775
|
+
return { ok: true, group, identifier: group.identifier };
|
|
36172
36776
|
};
|
|
36173
36777
|
var GROUPS_RULES_GET_EXAMPLES = [
|
|
36174
36778
|
{
|
|
@@ -36234,8 +36838,8 @@ var GROUPS_RULES_SET_EXAMPLES = [
|
|
|
36234
36838
|
}
|
|
36235
36839
|
}
|
|
36236
36840
|
];
|
|
36237
|
-
var registerGroupsCommand = (
|
|
36238
|
-
const groups =
|
|
36841
|
+
var registerGroupsCommand = (program) => {
|
|
36842
|
+
const groups = program.command("groups").description("Manage platform groups.");
|
|
36239
36843
|
const rules = groups.command("rules").description("View and manage group license-allocation rules.");
|
|
36240
36844
|
rules.command("get").description("List group license-allocation rules with their quota configuration and current usage.").option("--limit <number>", `Maximum number of results to return (default ${DEFAULT_LIMIT}).`).option("--offset <number>", `Number of results to skip (default ${DEFAULT_OFFSET}).`).option("--sort-by <field>", "Field to sort by. The License Accountant accepts Id, GlobalId, " + "GroupId, OrganizationId, UseExternalLicense, " + "UserBundleCodesAsJson, or UserBundleCodes; anything else is " + "rejected with HTTP 400. Optional.").option("--sort-order <order>", "Sort order: 'Asc' or 'Desc' (case-insensitive). Optional.").option("--organization <account-id>", "Organization account GUID (defaults to the org from the current login).").examples(GROUPS_RULES_GET_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
36241
36845
|
const [parseErr, parsed] = await catchError2(Promise.resolve().then(() => ({
|
|
@@ -36360,13 +36964,15 @@ var registerGroupsCommand = (program2) => {
|
|
|
36360
36964
|
if (!resolved.ok) {
|
|
36361
36965
|
OutputFormatter.error({
|
|
36362
36966
|
Result: RESULTS.Failure,
|
|
36967
|
+
ErrorCode: resolved.errorCode,
|
|
36363
36968
|
Message: resolved.message,
|
|
36364
|
-
Instructions: resolved.instructions
|
|
36969
|
+
Instructions: resolved.instructions,
|
|
36970
|
+
Retry: resolved.retry
|
|
36365
36971
|
});
|
|
36366
36972
|
processContext.exit(1);
|
|
36367
36973
|
return;
|
|
36368
36974
|
}
|
|
36369
|
-
const group = resolved
|
|
36975
|
+
const { group, identifier: groupId } = resolved;
|
|
36370
36976
|
const [clientErr, client] = await catchError2(createUserLicenseApi(options.organization));
|
|
36371
36977
|
if (clientErr) {
|
|
36372
36978
|
OutputFormatter.error({
|
|
@@ -36380,7 +36986,7 @@ var registerGroupsCommand = (program2) => {
|
|
|
36380
36986
|
const { api, accountId } = client;
|
|
36381
36987
|
const [ruleErr, ruleResponse] = await catchError2(api.getGroupRuleWithQuota({
|
|
36382
36988
|
organizationId: accountId,
|
|
36383
|
-
groupId
|
|
36989
|
+
groupId
|
|
36384
36990
|
}));
|
|
36385
36991
|
if (ruleErr) {
|
|
36386
36992
|
OutputFormatter.error({
|
|
@@ -36393,7 +36999,7 @@ var registerGroupsCommand = (program2) => {
|
|
|
36393
36999
|
}
|
|
36394
37000
|
const [usersErr, usersPage] = await catchError2(api.getBulkUserAllocationsFromGroup({
|
|
36395
37001
|
organizationId: accountId,
|
|
36396
|
-
groupId
|
|
37002
|
+
groupId,
|
|
36397
37003
|
top: limit,
|
|
36398
37004
|
skip: offset,
|
|
36399
37005
|
sortBy: options.sortBy,
|
|
@@ -36421,7 +37027,7 @@ var registerGroupsCommand = (program2) => {
|
|
|
36421
37027
|
const useExternalLicense = ruleResponse?.groupRule?.useExternalLicense ?? false;
|
|
36422
37028
|
const quotaSummary = [...quotaByCode.entries()].map(([code, q]) => `${code}=${q.currentUsage ?? "?"}/${q.limit ?? "∞"}`).join(", ");
|
|
36423
37029
|
const sink = getOutputSink();
|
|
36424
|
-
sink.writeErr(`Group rule for '${formatGroupSummary(group)}' (${
|
|
37030
|
+
sink.writeErr(`Group rule for '${formatGroupSummary(group)}' (${groupId})
|
|
36425
37031
|
`);
|
|
36426
37032
|
sink.writeErr(` entitled bundles: ${entitledBundles.join(", ") || "(none)"}
|
|
36427
37033
|
`);
|
|
@@ -36474,8 +37080,8 @@ var registerGroupsCommand = (program2) => {
|
|
|
36474
37080
|
});
|
|
36475
37081
|
});
|
|
36476
37082
|
rules.command("set").description("Set the user-bundle allocation rule (and optional per-bundle quotas) for a group. " + "The CLI resolves the group by name and requires exactly one match.").argument("<group>", "Group identifier (name prefix; must match exactly one directory group).").requiredOption("--input <path>", 'Path to a JSON file with the rule, e.g. [{"code":"RPADEVPRONU"},{"code":"ATTUNU","quota":10}].').option("--organization <account-id>", "Organization account GUID (defaults to the org from the current login).").examples(GROUPS_RULES_SET_EXAMPLES).trackedAction(processContext, async (groupInput, options) => {
|
|
36477
|
-
const
|
|
36478
|
-
const [readErr, raw] = await catchError2(
|
|
37083
|
+
const fs = getFileSystem();
|
|
37084
|
+
const [readErr, raw] = await catchError2(fs.readFile(options.input, "utf-8"));
|
|
36479
37085
|
if (readErr || raw === null) {
|
|
36480
37086
|
OutputFormatter.error({
|
|
36481
37087
|
Result: RESULTS.Failure,
|
|
@@ -36499,13 +37105,15 @@ var registerGroupsCommand = (program2) => {
|
|
|
36499
37105
|
if (!resolved.ok) {
|
|
36500
37106
|
OutputFormatter.error({
|
|
36501
37107
|
Result: RESULTS.Failure,
|
|
37108
|
+
ErrorCode: resolved.errorCode,
|
|
36502
37109
|
Message: resolved.message,
|
|
36503
|
-
Instructions: resolved.instructions
|
|
37110
|
+
Instructions: resolved.instructions,
|
|
37111
|
+
Retry: resolved.retry
|
|
36504
37112
|
});
|
|
36505
37113
|
processContext.exit(1);
|
|
36506
37114
|
return;
|
|
36507
37115
|
}
|
|
36508
|
-
const group = resolved
|
|
37116
|
+
const { group, identifier: groupId } = resolved;
|
|
36509
37117
|
const [clientErr, client] = await catchError2(createUserLicenseApi(options.organization));
|
|
36510
37118
|
if (clientErr) {
|
|
36511
37119
|
OutputFormatter.error({
|
|
@@ -36524,7 +37132,7 @@ var registerGroupsCommand = (program2) => {
|
|
|
36524
37132
|
}));
|
|
36525
37133
|
const [allocErr, response] = await catchError2(api.allocateGroupRuleWithQuota({
|
|
36526
37134
|
organizationId: accountId,
|
|
36527
|
-
groupId
|
|
37135
|
+
groupId,
|
|
36528
37136
|
groupRuleWithQuotaRequestDto: {
|
|
36529
37137
|
userBundleCodes,
|
|
36530
37138
|
quotas: quotas.length > 0 ? quotas : undefined
|
|
@@ -36700,8 +37308,8 @@ async function handleLicensesSummary(options) {
|
|
|
36700
37308
|
Data: [...robots, ...userLicenses, ...consumables]
|
|
36701
37309
|
});
|
|
36702
37310
|
}
|
|
36703
|
-
var registerLicensesCommand = (
|
|
36704
|
-
const licenses =
|
|
37311
|
+
var registerLicensesCommand = (program) => {
|
|
37312
|
+
const licenses = program.commands.find((c) => c.name() === "licenses") ?? program.command("licenses").description("View and manage organization-level license resources.");
|
|
36705
37313
|
licenses.command("summary").description("Get the consolidated organization license summary: robots (total & allocated), user-bundle licenses (total & used), and consumables (total, allocated & used).").option("--organization <account-id>", "Organization account GUID (defaults to the org from the current login).").examples(LICENSES_SUMMARY_EXAMPLES).trackedAction(processContext, (options) => handleLicensesSummary(options));
|
|
36706
37314
|
};
|
|
36707
37315
|
|
|
@@ -36977,12 +37585,12 @@ var registerFolderOutcomeBillingCommands = (tenants) => {
|
|
|
36977
37585
|
});
|
|
36978
37586
|
});
|
|
36979
37587
|
};
|
|
36980
|
-
var registerTenantsCommand = (
|
|
36981
|
-
const tenants =
|
|
37588
|
+
var registerTenantsCommand = (program) => {
|
|
37589
|
+
const tenants = program.command("tenants").description("Manage platform tenants");
|
|
36982
37590
|
const licenses = tenants.command("licenses").description("View and manage tenant license allocations.");
|
|
36983
37591
|
licenses.command("set").description("Set runtime licenses and consumables for a tenant. " + "The CLI fetches the tenant's existing service licenses and routes each input product " + "to the service license that already owns it.").argument("<tenant-key>", "Tenant key (GUID).").requiredOption("--input <path>", 'Path to a JSON file with the product delta, e.g. [{"code":"UNATT","quantity":5}]. Quantities overlay the current allocation by product code.').option("--organization <account-id>", "Organization account GUID (defaults to the org from the current login).").examples(TENANTS_LICENSES_SET_EXAMPLES).trackedAction(processContext, async (tenantKey, options) => {
|
|
36984
|
-
const
|
|
36985
|
-
const [readErr, raw] = await catchError2(
|
|
37592
|
+
const fs = getFileSystem();
|
|
37593
|
+
const [readErr, raw] = await catchError2(fs.readFile(options.input, "utf-8"));
|
|
36986
37594
|
if (readErr || raw === null) {
|
|
36987
37595
|
OutputFormatter.error({
|
|
36988
37596
|
Result: RESULTS.Failure,
|
|
@@ -37144,14 +37752,15 @@ var registerTenantsCommand = (program2) => {
|
|
|
37144
37752
|
|
|
37145
37753
|
// src/utils/user-resolver.ts
|
|
37146
37754
|
var resolveCurrentUserId = async () => {
|
|
37147
|
-
const [
|
|
37148
|
-
if (
|
|
37755
|
+
const [authErr, auth] = await catchError2(getAuthContext());
|
|
37756
|
+
if (authErr) {
|
|
37149
37757
|
return {
|
|
37150
37758
|
ok: false,
|
|
37151
|
-
message:
|
|
37759
|
+
message: authErr.message,
|
|
37760
|
+
authFailure: await authContextFailure(authErr)
|
|
37152
37761
|
};
|
|
37153
37762
|
}
|
|
37154
|
-
const [parseErr, claims] = await catchError2(Promise.resolve().then(() => parseJWT(
|
|
37763
|
+
const [parseErr, claims] = await catchError2(Promise.resolve().then(() => parseJWT(auth.accessToken)));
|
|
37155
37764
|
if (parseErr || !claims?.sub) {
|
|
37156
37765
|
return {
|
|
37157
37766
|
ok: false,
|
|
@@ -37167,7 +37776,8 @@ var resolveTargetUserId = async (userInput, organizationOverride) => {
|
|
|
37167
37776
|
return {
|
|
37168
37777
|
ok: false,
|
|
37169
37778
|
message: self.message,
|
|
37170
|
-
instructions: "Run 'uip login' first, or pass a user explicitly."
|
|
37779
|
+
instructions: "Run 'uip login' first, or pass a user explicitly.",
|
|
37780
|
+
...self.authFailure ? { authFailure: self.authFailure } : {}
|
|
37171
37781
|
};
|
|
37172
37782
|
}
|
|
37173
37783
|
return { ok: true, userId: self.userId };
|
|
@@ -37451,7 +38061,7 @@ async function handleTopUpGet(jobId, options) {
|
|
|
37451
38061
|
async function handleTopUpRequest(options) {
|
|
37452
38062
|
const resolved = await resolveCurrentUserId();
|
|
37453
38063
|
if (!resolved.ok) {
|
|
37454
|
-
OutputFormatter.error({
|
|
38064
|
+
OutputFormatter.error(resolved.authFailure ?? {
|
|
37455
38065
|
Result: RESULTS.Failure,
|
|
37456
38066
|
Message: resolved.message,
|
|
37457
38067
|
Instructions: "Run 'uip login' first."
|
|
@@ -37502,8 +38112,8 @@ async function handleTopUpRequest(options) {
|
|
|
37502
38112
|
}
|
|
37503
38113
|
});
|
|
37504
38114
|
}
|
|
37505
|
-
var registerTopUpsCommand = (
|
|
37506
|
-
const users =
|
|
38115
|
+
var registerTopUpsCommand = (program) => {
|
|
38116
|
+
const users = program.commands.find((c) => c.name() === "users") ?? program.command("users").description("Manage platform users.");
|
|
37507
38117
|
const topUps = users.commands.find((c) => c.name() === "top-ups") ?? users.command("top-ups").description("Grant and track per-user consumable top-ups.");
|
|
37508
38118
|
topUps.command("create").description("Grant a top-up to a user. The source pool is resolved automatically from the organization's active consumables (PLTU preferred, else AGU). " + "The user is resolved by name or email prefix and must be eligible for top-ups.").argument("<user>", "User identifier (name or email prefix; must match exactly one directory user).").option("--wait", "Wait until the top-up job finishes and report whether it was granted.").option("--count <n>", `Number of top-up units to grant (${MIN_COUNT}-${MAX_COUNT}).`, (raw) => parseBoundedInt(raw, "--count", {
|
|
37509
38119
|
min: MIN_COUNT,
|
|
@@ -37590,12 +38200,12 @@ var USERS_LICENSES_GET_EXAMPLES = [
|
|
|
37590
38200
|
}
|
|
37591
38201
|
}
|
|
37592
38202
|
];
|
|
37593
|
-
var registerUsersCommand = (
|
|
37594
|
-
const users =
|
|
38203
|
+
var registerUsersCommand = (program) => {
|
|
38204
|
+
const users = program.command("users").description("Manage platform users.");
|
|
37595
38205
|
const licenses = users.command("licenses").description("View and manage per-user license allocations.");
|
|
37596
38206
|
licenses.command("set").description("Allocate user bundle licenses to a directory user. " + "The CLI resolves the user by name or email prefix and requires exactly one match.").argument("<user>", "User identifier (name or email prefix; must match exactly one directory user).").requiredOption("--input <path>", 'Path to a JSON file with the desired user license allocation, e.g. [{"code":"RPADEVPRONU"},{"code":"ATTUNU"},{"code":"TSTNU"}].').option("--organization <account-id>", "Organization account GUID (defaults to the org from the current login).").examples(USERS_LICENSES_SET_EXAMPLES).trackedAction(processContext, async (userInput, options) => {
|
|
37597
|
-
const
|
|
37598
|
-
const [readErr, raw] = await catchError2(
|
|
38207
|
+
const fs = getFileSystem();
|
|
38208
|
+
const [readErr, raw] = await catchError2(fs.readFile(options.input, "utf-8"));
|
|
37599
38209
|
if (readErr || raw === null) {
|
|
37600
38210
|
OutputFormatter.error({
|
|
37601
38211
|
Result: RESULTS.Failure,
|
|
@@ -37735,7 +38345,7 @@ var registerUsersCommand = (program2) => {
|
|
|
37735
38345
|
return;
|
|
37736
38346
|
}
|
|
37737
38347
|
const { api, accountId } = client;
|
|
37738
|
-
const [getErr,
|
|
38348
|
+
const [getErr, licenses] = await catchError2(api.getAvailableUserLicensesForAccount({
|
|
37739
38349
|
organizationId: accountId
|
|
37740
38350
|
}));
|
|
37741
38351
|
if (getErr) {
|
|
@@ -37747,7 +38357,7 @@ var registerUsersCommand = (program2) => {
|
|
|
37747
38357
|
processContext.exit(1);
|
|
37748
38358
|
return;
|
|
37749
38359
|
}
|
|
37750
|
-
const data = (
|
|
38360
|
+
const data = (licenses ?? []).map((l) => {
|
|
37751
38361
|
const total = typeof l.total === "number" ? l.total : 0;
|
|
37752
38362
|
const allocated = typeof l.allocated === "number" ? l.allocated : 0;
|
|
37753
38363
|
return {
|
|
@@ -37960,7 +38570,7 @@ async function handleUsageList(options) {
|
|
|
37960
38570
|
async function handleUsageGet(userInput, options) {
|
|
37961
38571
|
const resolved = await resolveTargetUserId(userInput, options.organization);
|
|
37962
38572
|
if (!resolved.ok) {
|
|
37963
|
-
OutputFormatter.error({
|
|
38573
|
+
OutputFormatter.error(resolved.authFailure ?? {
|
|
37964
38574
|
Result: RESULTS.Failure,
|
|
37965
38575
|
Message: resolved.message,
|
|
37966
38576
|
Instructions: resolved.instructions
|
|
@@ -38004,30 +38614,30 @@ async function handleUsageGet(userInput, options) {
|
|
|
38004
38614
|
}
|
|
38005
38615
|
});
|
|
38006
38616
|
}
|
|
38007
|
-
var registerUsersUsageCommand = (
|
|
38008
|
-
const users =
|
|
38617
|
+
var registerUsersUsageCommand = (program) => {
|
|
38618
|
+
const users = program.commands.find((c) => c.name() === "users") ?? program.command("users").description("Manage platform users.");
|
|
38009
38619
|
const usage = users.commands.find((c) => c.name() === "usage") ?? users.command("usage").description("View per-user license consumption.");
|
|
38010
38620
|
usage.command("list").description("List users with license consumption in the organization, with monthly and top-up wallet percent-consumed columns.").option("--limit <number>", "Maximum number of users to return", parseLimit, DEFAULT_PAGE_SIZE).option("--offset <number>", "Number of users to skip", parseOffset, 0).option("--sort-by <field>", "Sort by a field of the user usage row (e.g. email, displayName).").option("--sort-order <asc|desc>", "Sort direction. Allowed: asc, desc (case-insensitive).").option("--license-codes <codes...>", "Space-separated user bundle license codes to filter by (e.g. RPADEVPRONU ATTUNU).").option("--organization <account-id>", "Organization account GUID (defaults to the org from the current login).").examples(USAGE_LIST_EXAMPLES).trackedAction(processContext, (options) => handleUsageList(options));
|
|
38011
38621
|
usage.command("get").description("Show per-user license consumption. Omit the user to see your own usage; pass a user (admin) to see theirs. " + "A passed user is resolved by name or email prefix and must match exactly one directory user.").argument("[user]", "User identifier (name or email prefix). Omit to show the logged-in user's own usage.").option("--organization <account-id>", "Organization account GUID (defaults to the org from the current login).").examples(USAGE_GET_EXAMPLES).trackedAction(processContext, (userInput, options) => handleUsageGet(userInput, options));
|
|
38012
38622
|
};
|
|
38013
38623
|
|
|
38014
38624
|
// src/tool.ts
|
|
38015
|
-
var
|
|
38625
|
+
var metadata2 = {
|
|
38016
38626
|
name: "platform-tool",
|
|
38017
38627
|
version: package_default.version,
|
|
38018
38628
|
description: "Manage UiPath platform-level resources such as tenant licensing.",
|
|
38019
38629
|
commandPrefix: "platform"
|
|
38020
38630
|
};
|
|
38021
|
-
var
|
|
38022
|
-
registerTenantsCommand(
|
|
38023
|
-
registerUsersCommand(
|
|
38024
|
-
registerUsersUsageCommand(
|
|
38025
|
-
registerTopUpsCommand(
|
|
38026
|
-
registerGroupsCommand(
|
|
38027
|
-
registerLicensesCommand(
|
|
38028
|
-
registerConsumablesCommand(
|
|
38631
|
+
var registerCommands2 = async (program) => {
|
|
38632
|
+
registerTenantsCommand(program);
|
|
38633
|
+
registerUsersCommand(program);
|
|
38634
|
+
registerUsersUsageCommand(program);
|
|
38635
|
+
registerTopUpsCommand(program);
|
|
38636
|
+
registerGroupsCommand(program);
|
|
38637
|
+
registerLicensesCommand(program);
|
|
38638
|
+
registerConsumablesCommand(program);
|
|
38029
38639
|
};
|
|
38030
38640
|
|
|
38031
|
-
export { Command,
|
|
38641
|
+
export { Command, metadata2, registerCommands2 };
|
|
38032
38642
|
|
|
38033
|
-
//# debugId=
|
|
38643
|
+
//# debugId=F08DD047FDD012D364756E2164756E21
|