@uipath/ixp-tool 1.197.0 → 1.198.0-preview.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/dist/tool.js +76 -23
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2146,7 +2146,7 @@ var {
|
|
|
2146
2146
|
var package_default = {
|
|
2147
2147
|
name: "@uipath/ixp-tool",
|
|
2148
2148
|
license: "MIT",
|
|
2149
|
-
version: "1.
|
|
2149
|
+
version: "1.198.0-preview.80",
|
|
2150
2150
|
description: "Manage UiPath IXP projects, prompts, predictions, and model publishing.",
|
|
2151
2151
|
private: false,
|
|
2152
2152
|
repository: {
|
|
@@ -2196,4 +2196,4 @@ program2.name("ixp-tool").description("UiPath IXP Tool - Standalone CLI").versio
|
|
|
2196
2196
|
await registerCommands(program2);
|
|
2197
2197
|
program2.parse(process.argv);
|
|
2198
2198
|
|
|
2199
|
-
//# debugId=
|
|
2199
|
+
//# debugId=800C2FBF1A10309164756E2164756E21
|
package/dist/tool.js
CHANGED
|
@@ -21230,7 +21230,7 @@ var init_server = __esm(() => {
|
|
|
21230
21230
|
var package_default = {
|
|
21231
21231
|
name: "@uipath/ixp-tool",
|
|
21232
21232
|
license: "MIT",
|
|
21233
|
-
version: "1.
|
|
21233
|
+
version: "1.198.0-preview.80",
|
|
21234
21234
|
description: "Manage UiPath IXP projects, prompts, predictions, and model publishing.",
|
|
21235
21235
|
private: false,
|
|
21236
21236
|
repository: {
|
|
@@ -21333,8 +21333,15 @@ var TLS_ERROR_CODES = new Set([
|
|
|
21333
21333
|
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.";
|
|
21334
21334
|
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.";
|
|
21335
21335
|
function describeConnectivityError(error) {
|
|
21336
|
-
|
|
21337
|
-
|
|
21336
|
+
const queue = [error];
|
|
21337
|
+
const seen = new Set;
|
|
21338
|
+
for (let steps = 0;queue.length > 0 && steps < 32; steps++) {
|
|
21339
|
+
const current = queue.shift();
|
|
21340
|
+
if (current === null || typeof current !== "object")
|
|
21341
|
+
continue;
|
|
21342
|
+
if (seen.has(current))
|
|
21343
|
+
continue;
|
|
21344
|
+
seen.add(current);
|
|
21338
21345
|
const cur = current;
|
|
21339
21346
|
const code = typeof cur.code === "string" ? cur.code : undefined;
|
|
21340
21347
|
const message = typeof cur.message === "string" ? cur.message : undefined;
|
|
@@ -21354,7 +21361,10 @@ function describeConnectivityError(error) {
|
|
|
21354
21361
|
instructions: NETWORK_INSTRUCTIONS
|
|
21355
21362
|
};
|
|
21356
21363
|
}
|
|
21357
|
-
|
|
21364
|
+
if (cur.cause !== undefined)
|
|
21365
|
+
queue.push(cur.cause);
|
|
21366
|
+
if (Array.isArray(cur.errors))
|
|
21367
|
+
queue.push(...cur.errors);
|
|
21358
21368
|
}
|
|
21359
21369
|
return;
|
|
21360
21370
|
}
|
|
@@ -26585,6 +26595,7 @@ function getLogFilePath() {
|
|
|
26585
26595
|
// ../common/src/output-format-context.ts
|
|
26586
26596
|
var formatSlot = singleton("OutputFormat");
|
|
26587
26597
|
var formatExplicitSlot = singleton("OutputFormatExplicit");
|
|
26598
|
+
var helpRequestedSlot = singleton("HelpRequested");
|
|
26588
26599
|
var filterSlot = singleton("OutputFilter");
|
|
26589
26600
|
function getOutputFormat() {
|
|
26590
26601
|
return formatSlot.get("json");
|
|
@@ -27652,6 +27663,9 @@ var OutputFormatter;
|
|
|
27652
27663
|
if (opts?.warning) {
|
|
27653
27664
|
data.Warning = opts.warning;
|
|
27654
27665
|
}
|
|
27666
|
+
if (opts?.pagination) {
|
|
27667
|
+
data.Pagination = opts.pagination;
|
|
27668
|
+
}
|
|
27655
27669
|
success(data);
|
|
27656
27670
|
}
|
|
27657
27671
|
OutputFormatter.emitList = emitList;
|
|
@@ -28114,6 +28128,7 @@ var DEFAULT_PAGE_SIZE = 50;
|
|
|
28114
28128
|
var DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
|
|
28115
28129
|
// ../common/src/interactivity-context.ts
|
|
28116
28130
|
var modeSlot = singleton("InteractivityMode");
|
|
28131
|
+
var interactiveFlagSlot = singleton("InteractiveFlag");
|
|
28117
28132
|
// ../common/src/option-aliases.ts
|
|
28118
28133
|
function warnDeprecatedOptionAlias(deprecatedFlag, preferredFlag) {
|
|
28119
28134
|
getOutputSink().writeErr(`[WARN] ${deprecatedFlag} is deprecated. Use ${preferredFlag} instead.
|
|
@@ -29399,6 +29414,10 @@ function normalizeTokenRefreshUnavailableFailure() {
|
|
|
29399
29414
|
function errorMessage(error) {
|
|
29400
29415
|
return error instanceof Error ? error.message : String(error);
|
|
29401
29416
|
}
|
|
29417
|
+
|
|
29418
|
+
// ../auth/src/index.ts
|
|
29419
|
+
init_constants();
|
|
29420
|
+
|
|
29402
29421
|
// ../auth/src/interactive.ts
|
|
29403
29422
|
init_src();
|
|
29404
29423
|
|
|
@@ -29418,7 +29437,7 @@ init_server();
|
|
|
29418
29437
|
var package_default2 = {
|
|
29419
29438
|
name: "@uipath/ixp-sdk",
|
|
29420
29439
|
license: "MIT",
|
|
29421
|
-
version: "1.
|
|
29440
|
+
version: "1.198.0-preview.80",
|
|
29422
29441
|
description: "SDK for the UiPath IXP (Intelligent eXtraction Platform) API — projects, taxonomies, prompts, predictions, and model publishing.",
|
|
29423
29442
|
repository: {
|
|
29424
29443
|
type: "git",
|
|
@@ -30005,7 +30024,7 @@ var registerDataTypesCommand = (program2) => {
|
|
|
30005
30024
|
Data: response
|
|
30006
30025
|
}, { preserveDataKeys: true });
|
|
30007
30026
|
});
|
|
30008
|
-
dataTypes.command("delete").description("Delete a data type. IRREVERSIBLE: any field referencing it via field_type_id will break.").argument("<project-name>", "Project name").requiredOption("--name <name>", "Data type name to delete").addOption(
|
|
30027
|
+
dataTypes.command("delete").description("Delete a data type. IRREVERSIBLE: any field referencing it via field_type_id will break.").argument("<project-name>", "Project name").requiredOption("--name <name>", "Data type name to delete").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").examples(DATA_TYPES_DELETE_EXAMPLES).trackedAction(processContext, async (projectName, options) => {
|
|
30009
30028
|
if (!requireConfirmation(options, `delete data type '${options.name}'`))
|
|
30010
30029
|
return;
|
|
30011
30030
|
const [err, response] = await catchError((async () => {
|
|
@@ -30445,7 +30464,7 @@ var registerFieldsCommand = (program2) => {
|
|
|
30445
30464
|
Data: response
|
|
30446
30465
|
}, { preserveDataKeys: true });
|
|
30447
30466
|
});
|
|
30448
|
-
fields.command("change-type").description("Change a field's type. IRREVERSIBLE: existing annotations for this field are deleted.").argument("<project-name>", "Project name").requiredOption("--group <name>", "Field group (label_def) name").requiredOption("--field <name>", "Field name").requiredOption("--type <type-name>", "New field type — name of an entity_def in the project's taxonomy").addOption(
|
|
30467
|
+
fields.command("change-type").description("Change a field's type. IRREVERSIBLE: existing annotations for this field are deleted.").argument("<project-name>", "Project name").requiredOption("--group <name>", "Field group (label_def) name").requiredOption("--field <name>", "Field name").requiredOption("--type <type-name>", "New field type — name of an entity_def in the project's taxonomy").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").examples(FIELDS_CHANGE_TYPE_EXAMPLES).trackedAction(processContext, async (projectName, options) => {
|
|
30449
30468
|
if (!requireConfirmation(options, `change the type of field '${options.field}' (deletes its annotations)`))
|
|
30450
30469
|
return;
|
|
30451
30470
|
const [err, response] = await catchError((async () => {
|
|
@@ -30633,7 +30652,7 @@ var registerGroupsCommand = (program2) => {
|
|
|
30633
30652
|
Data: response
|
|
30634
30653
|
}, { preserveDataKeys: true });
|
|
30635
30654
|
});
|
|
30636
|
-
groups.command("delete").description("Delete a field group. IRREVERSIBLE: all annotations on all fields in the group are deleted.").argument("<project-name>", "Project name").requiredOption("--name <name>", "Field group name to delete").addOption(
|
|
30655
|
+
groups.command("delete").description("Delete a field group. IRREVERSIBLE: all annotations on all fields in the group are deleted.").argument("<project-name>", "Project name").requiredOption("--name <name>", "Field group name to delete").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").examples(GROUPS_DELETE_EXAMPLES).trackedAction(processContext, async (projectName, options) => {
|
|
30637
30656
|
if (!requireConfirmation(options, `delete group '${options.name}'`))
|
|
30638
30657
|
return;
|
|
30639
30658
|
const [err, response] = await catchError((async () => {
|
|
@@ -31234,6 +31253,10 @@ var registerLabellingsCommand = (program2) => {
|
|
|
31234
31253
|
// src/commands/projects.ts
|
|
31235
31254
|
init_src();
|
|
31236
31255
|
var MAX_TAXONOMY_DOCUMENTS = 8;
|
|
31256
|
+
var PROJECT_READY_MAX_ATTEMPTS = 8;
|
|
31257
|
+
var PROJECT_READY_DELAY_MS = 1000;
|
|
31258
|
+
var DOCUMENT_UPLOAD_MAX_ATTEMPTS = 8;
|
|
31259
|
+
var DOCUMENT_UPLOAD_DELAY_MS = 1000;
|
|
31237
31260
|
var PREPROCESSING_VALUES = ["none", "table_mini", "table"];
|
|
31238
31261
|
var IXP_MODEL_TAGS = ["live", "staging"];
|
|
31239
31262
|
function parseModelVersion(raw) {
|
|
@@ -31260,6 +31283,47 @@ function parseMetricsModelVersion(raw) {
|
|
|
31260
31283
|
}
|
|
31261
31284
|
return trimmed;
|
|
31262
31285
|
}
|
|
31286
|
+
function sleep(ms) {
|
|
31287
|
+
return new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
31288
|
+
}
|
|
31289
|
+
function isCreatedProjectPropagationError(error) {
|
|
31290
|
+
const message = error.message;
|
|
31291
|
+
return message.includes("[ProjectNotFoundError]") || message.includes("[IxpUpstreamError]") && message.includes("No such source") || message.includes("[SourceNotFoundError]") && message.includes("design source");
|
|
31292
|
+
}
|
|
31293
|
+
async function waitForCreatedProjectReady(config, projectName) {
|
|
31294
|
+
let lastError = new Error("Project readiness check failed without an error.");
|
|
31295
|
+
for (let attempt = 1;attempt <= PROJECT_READY_MAX_ATTEMPTS; attempt++) {
|
|
31296
|
+
const [taxonomyErr] = await catchError(getProjectTaxonomy(config, projectName));
|
|
31297
|
+
if (taxonomyErr) {
|
|
31298
|
+
lastError = taxonomyErr;
|
|
31299
|
+
} else {
|
|
31300
|
+
const [documentsErr] = await catchError(listDocuments(config, projectName, { limit: 1 }));
|
|
31301
|
+
if (!documentsErr) {
|
|
31302
|
+
return;
|
|
31303
|
+
}
|
|
31304
|
+
lastError = documentsErr;
|
|
31305
|
+
}
|
|
31306
|
+
if (!isCreatedProjectPropagationError(lastError)) {
|
|
31307
|
+
throw lastError;
|
|
31308
|
+
}
|
|
31309
|
+
if (attempt < PROJECT_READY_MAX_ATTEMPTS) {
|
|
31310
|
+
await sleep(PROJECT_READY_DELAY_MS * attempt);
|
|
31311
|
+
}
|
|
31312
|
+
}
|
|
31313
|
+
throw new Error(`Project not ready after ${PROJECT_READY_MAX_ATTEMPTS} attempts. It was created but the server may need more time before documents can be uploaded. Last error: ${lastError.message}`);
|
|
31314
|
+
}
|
|
31315
|
+
async function uploadCreatedProjectDocument(config, projectName, blob, filename) {
|
|
31316
|
+
for (let attempt = 1;; attempt++) {
|
|
31317
|
+
const [uploadErr, uploadResult] = await catchError(uploadDocument(config, projectName, blob, filename));
|
|
31318
|
+
if (!uploadErr) {
|
|
31319
|
+
return uploadResult;
|
|
31320
|
+
}
|
|
31321
|
+
if (!isCreatedProjectPropagationError(uploadErr) || attempt === DOCUMENT_UPLOAD_MAX_ATTEMPTS) {
|
|
31322
|
+
throw uploadErr;
|
|
31323
|
+
}
|
|
31324
|
+
await sleep(DOCUMENT_UPLOAD_DELAY_MS * attempt);
|
|
31325
|
+
}
|
|
31326
|
+
}
|
|
31263
31327
|
var PROJECTS_LIST_EXAMPLES = [
|
|
31264
31328
|
{
|
|
31265
31329
|
Description: "List all IXP training projects in the tenant",
|
|
@@ -31552,7 +31616,7 @@ var registerProjectsCommand = (program2) => {
|
|
|
31552
31616
|
Data: p
|
|
31553
31617
|
}, { preserveDataKeys: true });
|
|
31554
31618
|
});
|
|
31555
|
-
project.command("delete").description("Permanently delete a project — its documents, taxonomy, and trained models. Irreversible; requires --yes.").argument("<project-name>", "Project name").addOption(
|
|
31619
|
+
project.command("delete").description("Permanently delete a project — its documents, taxonomy, and trained models. Irreversible; requires --yes.").argument("<project-name>", "Project name").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").examples(PROJECTS_DELETE_EXAMPLES).trackedAction(processContext, async (projectName, options) => {
|
|
31556
31620
|
if (!requireConfirmation(options, `delete project '${projectName}'`))
|
|
31557
31621
|
return;
|
|
31558
31622
|
const [err, response] = await catchError((async () => {
|
|
@@ -31774,18 +31838,7 @@ var registerProjectsCommand = (program2) => {
|
|
|
31774
31838
|
if (!projectName) {
|
|
31775
31839
|
throw new Error("Project was created but the server did not return its name.");
|
|
31776
31840
|
}
|
|
31777
|
-
await (
|
|
31778
|
-
for (let attempt = 0;attempt < 10; attempt++) {
|
|
31779
|
-
const [readyErr] = await catchError(getProjectTaxonomy(config, projectName));
|
|
31780
|
-
if (!readyErr) {
|
|
31781
|
-
return;
|
|
31782
|
-
}
|
|
31783
|
-
if (attempt === 9) {
|
|
31784
|
-
throw new Error("Project not ready after 10 retries. It was created but the server may need more time before documents can be uploaded.");
|
|
31785
|
-
}
|
|
31786
|
-
await new Promise((r) => setTimeout(r, 2000 * (attempt + 1)));
|
|
31787
|
-
}
|
|
31788
|
-
})();
|
|
31841
|
+
await waitForCreatedProjectReady(config, projectName);
|
|
31789
31842
|
const attachmentRefs = [];
|
|
31790
31843
|
const failedUploads = [];
|
|
31791
31844
|
for (const filePath of allFiles) {
|
|
@@ -31796,7 +31849,7 @@ var registerProjectsCommand = (program2) => {
|
|
|
31796
31849
|
throw new Error(`Failed to read file: ${filePath}`);
|
|
31797
31850
|
}
|
|
31798
31851
|
const blob = new Blob([fileBuffer]);
|
|
31799
|
-
return await
|
|
31852
|
+
return await uploadCreatedProjectDocument(config, projectName, blob, filename);
|
|
31800
31853
|
})());
|
|
31801
31854
|
if (uploadErr) {
|
|
31802
31855
|
failedUploads.push({
|
|
@@ -31972,4 +32025,4 @@ export {
|
|
|
31972
32025
|
metadata
|
|
31973
32026
|
};
|
|
31974
32027
|
|
|
31975
|
-
//# debugId=
|
|
32028
|
+
//# debugId=0B593EC4FEE5235B64756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/ixp-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.198.0-preview.80",
|
|
5
5
|
"description": "Manage UiPath IXP projects, prompts, predictions, and model publishing.",
|
|
6
6
|
"private": false,
|
|
7
7
|
"repository": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "9b2c3c0f21a256d2f38dd28bc97e72e6f7b10a9c"
|
|
30
30
|
}
|