@uipath/integrationservice-tool 0.1.5 → 0.1.7
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 +435 -435
- package/dist/index.js +183 -118
- package/dist/tool.js +514 -379
- package/package.json +49 -49
package/dist/index.js
CHANGED
|
@@ -6,25 +6,43 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
6
6
|
var __defProp = Object.defineProperty;
|
|
7
7
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
function __accessProp(key) {
|
|
10
|
+
return this[key];
|
|
11
|
+
}
|
|
12
|
+
var __toESMCache_node;
|
|
13
|
+
var __toESMCache_esm;
|
|
9
14
|
var __toESM = (mod, isNodeMode, target) => {
|
|
15
|
+
var canCache = mod != null && typeof mod === "object";
|
|
16
|
+
if (canCache) {
|
|
17
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
18
|
+
var cached = cache.get(mod);
|
|
19
|
+
if (cached)
|
|
20
|
+
return cached;
|
|
21
|
+
}
|
|
10
22
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
11
23
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
12
24
|
for (let key of __getOwnPropNames(mod))
|
|
13
25
|
if (!__hasOwnProp.call(to, key))
|
|
14
26
|
__defProp(to, key, {
|
|
15
|
-
get: (
|
|
27
|
+
get: __accessProp.bind(mod, key),
|
|
16
28
|
enumerable: true
|
|
17
29
|
});
|
|
30
|
+
if (canCache)
|
|
31
|
+
cache.set(mod, to);
|
|
18
32
|
return to;
|
|
19
33
|
};
|
|
20
34
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
35
|
+
var __returnValue = (v) => v;
|
|
36
|
+
function __exportSetter(name, newValue) {
|
|
37
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
38
|
+
}
|
|
21
39
|
var __export = (target, all) => {
|
|
22
40
|
for (var name in all)
|
|
23
41
|
__defProp(target, name, {
|
|
24
42
|
get: all[name],
|
|
25
43
|
enumerable: true,
|
|
26
44
|
configurable: true,
|
|
27
|
-
set: (
|
|
45
|
+
set: __exportSetter.bind(all, name)
|
|
28
46
|
});
|
|
29
47
|
};
|
|
30
48
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
@@ -6776,7 +6794,7 @@ class SimpleLogger {
|
|
|
6776
6794
|
return 0 /* DEBUG */;
|
|
6777
6795
|
}
|
|
6778
6796
|
} catch {}
|
|
6779
|
-
return
|
|
6797
|
+
return DEFAULT_LOG_LEVEL;
|
|
6780
6798
|
}
|
|
6781
6799
|
static parseLevel(value) {
|
|
6782
6800
|
switch (value.toLowerCase()) {
|
|
@@ -6909,7 +6927,7 @@ class SimpleLogger {
|
|
|
6909
6927
|
function getLogFilePath() {
|
|
6910
6928
|
return logger.getLogFilePath();
|
|
6911
6929
|
}
|
|
6912
|
-
var GLOBAL_KEY = "__uipcli_log_file_path__", logger;
|
|
6930
|
+
var GLOBAL_KEY = "__uipcli_log_file_path__", DEFAULT_LOG_LEVEL = 3 /* ERROR */, logger;
|
|
6913
6931
|
var init_logger = __esm(() => {
|
|
6914
6932
|
init_output_context();
|
|
6915
6933
|
logger = SimpleLogger.getInstance();
|
|
@@ -7180,7 +7198,7 @@ var init_telemetry = __esm(() => {
|
|
|
7180
7198
|
init_logger_telemetry_provider();
|
|
7181
7199
|
init_node_appinsights_telemetry_provider();
|
|
7182
7200
|
sessionId = getOrCreateSessionId();
|
|
7183
|
-
DEFAULT_AI_CONNECTION_STRING = Buffer.from("
|
|
7201
|
+
DEFAULT_AI_CONNECTION_STRING = Buffer.from("SW5zdHJ1bWVudGF0aW9uS2V5PTliZDM3NDgyLTgxMGUtNDQyYS1hYWE2LWQzOGVmNjVjNjY3NDtJbmdlc3Rpb25FbmRwb2ludD1odHRwczovL3dlc3RldXJvcGUtNS5pbi5hcHBsaWNhdGlvbmluc2lnaHRzLmF6dXJlLmNvbS87TGl2ZUVuZHBvaW50PWh0dHBzOi8vd2VzdGV1cm9wZS5saXZlZGlhZ25vc3RpY3MubW9uaXRvci5henVyZS5jb20vO0FwcGxpY2F0aW9uSWQ9MzU2OTdlZjEtOGJkMC00ZjE5LWEyN2MtZDg3Y2NhYzY2ZDJj", "base64").toString("utf-8");
|
|
7184
7202
|
telemetry = new Proxy({}, {
|
|
7185
7203
|
get(_, prop) {
|
|
7186
7204
|
const instance = getTelemetryInstance();
|
|
@@ -7194,7 +7212,7 @@ var init_telemetry = __esm(() => {
|
|
|
7194
7212
|
var CommonTelemetryEvents;
|
|
7195
7213
|
var init_telemetry_events = __esm(() => {
|
|
7196
7214
|
CommonTelemetryEvents = {
|
|
7197
|
-
Error: "
|
|
7215
|
+
Error: "uip.error"
|
|
7198
7216
|
};
|
|
7199
7217
|
});
|
|
7200
7218
|
|
|
@@ -7245,11 +7263,6 @@ function logOutput(data, format = "table") {
|
|
|
7245
7263
|
printOutput(data, format, (msg) => sink.writeOut(`${msg}
|
|
7246
7264
|
`));
|
|
7247
7265
|
}
|
|
7248
|
-
function errorOutput(data, format = "table") {
|
|
7249
|
-
const sink = getOutputSink();
|
|
7250
|
-
printOutput(data, format, (msg) => sink.writeErr(`${msg}
|
|
7251
|
-
`));
|
|
7252
|
-
}
|
|
7253
7266
|
function printTable(data, logFn = console.log, externalLogValue) {
|
|
7254
7267
|
if (data.length === 0)
|
|
7255
7268
|
return;
|
|
@@ -7312,7 +7325,7 @@ var init_formatter = __esm(() => {
|
|
|
7312
7325
|
result: data.Result,
|
|
7313
7326
|
message: data.Message
|
|
7314
7327
|
});
|
|
7315
|
-
|
|
7328
|
+
logOutput(data, getOutputFormat());
|
|
7316
7329
|
}
|
|
7317
7330
|
OutputFormatter.error = error;
|
|
7318
7331
|
function log(data) {
|
|
@@ -7350,6 +7363,12 @@ var init_command_help = __esm(() => {
|
|
|
7350
7363
|
init_output_format_context();
|
|
7351
7364
|
});
|
|
7352
7365
|
|
|
7366
|
+
// ../common/src/constants.ts
|
|
7367
|
+
var UIPATH_HOME_DIR = ".uipath", AUTH_FILENAME = ".auth", CONFIG_FILENAME = "config.json", LOCAL_CONFIG_FILENAME = "uipath.config.json", DEFAULT_BASE_URL = "https://cloud.uipath.com", DEFAULT_AUTH_TIMEOUT_MS;
|
|
7368
|
+
var init_constants = __esm(() => {
|
|
7369
|
+
DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
|
|
7370
|
+
});
|
|
7371
|
+
|
|
7353
7372
|
// ../../node_modules/jsonpath-plus/dist/index-node-esm.js
|
|
7354
7373
|
import vm from "vm";
|
|
7355
7374
|
|
|
@@ -8755,13 +8774,36 @@ var init_jsonpath = __esm(() => {
|
|
|
8755
8774
|
init_index_node_esm();
|
|
8756
8775
|
});
|
|
8757
8776
|
// ../common/src/trackedAction.ts
|
|
8777
|
+
function deriveCommandPath(cmd) {
|
|
8778
|
+
const parts = [];
|
|
8779
|
+
let current = cmd;
|
|
8780
|
+
while (current) {
|
|
8781
|
+
const name = current.name();
|
|
8782
|
+
if (name) {
|
|
8783
|
+
parts.unshift(name);
|
|
8784
|
+
}
|
|
8785
|
+
current = current.parent;
|
|
8786
|
+
}
|
|
8787
|
+
if (parts.length > 1) {
|
|
8788
|
+
parts.shift();
|
|
8789
|
+
}
|
|
8790
|
+
return ["uip", ...parts.filter((p) => p !== "uip")].join(".");
|
|
8791
|
+
}
|
|
8792
|
+
var processContext;
|
|
8758
8793
|
var init_trackedAction = __esm(() => {
|
|
8759
8794
|
init_esm();
|
|
8760
8795
|
init_formatter();
|
|
8761
8796
|
init_logger();
|
|
8762
8797
|
init_telemetry();
|
|
8763
|
-
|
|
8798
|
+
processContext = {
|
|
8799
|
+
exit: (code) => {
|
|
8800
|
+
process.exitCode = code;
|
|
8801
|
+
}
|
|
8802
|
+
};
|
|
8803
|
+
Command2.prototype.trackedAction = function(context, fn, properties) {
|
|
8804
|
+
const command = this;
|
|
8764
8805
|
return this.action(async (...args) => {
|
|
8806
|
+
const telemetryName = deriveCommandPath(command);
|
|
8765
8807
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
8766
8808
|
const startTime = performance.now();
|
|
8767
8809
|
let errorMessage;
|
|
@@ -8792,6 +8834,7 @@ var init_trackedAction = __esm(() => {
|
|
|
8792
8834
|
var init_src = __esm(() => {
|
|
8793
8835
|
init_node_appinsights_telemetry_provider();
|
|
8794
8836
|
init_command_help();
|
|
8837
|
+
init_constants();
|
|
8795
8838
|
init_formatter();
|
|
8796
8839
|
init_jsonpath();
|
|
8797
8840
|
init_logger();
|
|
@@ -8799,7 +8842,6 @@ var init_src = __esm(() => {
|
|
|
8799
8842
|
init_output_format_context();
|
|
8800
8843
|
init_registry();
|
|
8801
8844
|
init_telemetry();
|
|
8802
|
-
init_telemetry_events();
|
|
8803
8845
|
init_trackedAction();
|
|
8804
8846
|
});
|
|
8805
8847
|
|
|
@@ -9646,8 +9688,8 @@ var {
|
|
|
9646
9688
|
// package.json
|
|
9647
9689
|
var package_default = {
|
|
9648
9690
|
name: "@uipath/integrationservice-tool",
|
|
9649
|
-
version: "0.1.
|
|
9650
|
-
description: "
|
|
9691
|
+
version: "0.1.7",
|
|
9692
|
+
description: "Manage Integration Service connectors, connections, and triggers.",
|
|
9651
9693
|
private: false,
|
|
9652
9694
|
maintainers: [
|
|
9653
9695
|
"aoltean16",
|
|
@@ -9660,7 +9702,7 @@ var package_default = {
|
|
|
9660
9702
|
directory: "packages/integrationservice-tool"
|
|
9661
9703
|
},
|
|
9662
9704
|
publishConfig: {
|
|
9663
|
-
registry: "https://
|
|
9705
|
+
registry: "https://registry.npmjs.org/"
|
|
9664
9706
|
},
|
|
9665
9707
|
keywords: [
|
|
9666
9708
|
"uipcli-tool"
|
|
@@ -15966,6 +16008,12 @@ class ElementsApi extends BaseAPI2 {
|
|
|
15966
16008
|
await this.upsertActivityPackVersionRaw(requestParameters, initOverrides);
|
|
15967
16009
|
}
|
|
15968
16010
|
}
|
|
16011
|
+
// ../auth/src/index.ts
|
|
16012
|
+
init_src();
|
|
16013
|
+
|
|
16014
|
+
// ../auth/src/config.ts
|
|
16015
|
+
init_src();
|
|
16016
|
+
|
|
15969
16017
|
// ../auth/src/utils/loadConfig.ts
|
|
15970
16018
|
init_src();
|
|
15971
16019
|
|
|
@@ -29552,11 +29600,11 @@ var loadConfigAsync = async () => {
|
|
|
29552
29600
|
const fs7 = await getFs();
|
|
29553
29601
|
let configPath = fs7.env.getenv("UIPATH_CONFIG_PATH");
|
|
29554
29602
|
if (!configPath) {
|
|
29555
|
-
const localPath = fs7.path.join(fs7.env.cwd(),
|
|
29603
|
+
const localPath = fs7.path.join(fs7.env.cwd(), LOCAL_CONFIG_FILENAME);
|
|
29556
29604
|
if (await fs7.exists(localPath)) {
|
|
29557
29605
|
configPath = localPath;
|
|
29558
29606
|
} else {
|
|
29559
|
-
configPath = fs7.path.join(fs7.env.homedir(),
|
|
29607
|
+
configPath = fs7.path.join(fs7.env.homedir(), UIPATH_HOME_DIR, CONFIG_FILENAME);
|
|
29560
29608
|
}
|
|
29561
29609
|
}
|
|
29562
29610
|
if (!await fs7.exists(configPath)) {
|
|
@@ -29589,7 +29637,6 @@ Please ensure your config file contains valid JSON.`;
|
|
|
29589
29637
|
};
|
|
29590
29638
|
|
|
29591
29639
|
// ../auth/src/config.ts
|
|
29592
|
-
var DEFAULT_BASE_URL = "https://cloud.uipath.com";
|
|
29593
29640
|
var DEFAULT_CLIENT_ID = "36dea5b8-e8bb-423d-8e7b-c808df8f1c00";
|
|
29594
29641
|
|
|
29595
29642
|
class InvalidBaseUrlError extends Error {
|
|
@@ -29684,10 +29731,10 @@ init_src2();
|
|
|
29684
29731
|
|
|
29685
29732
|
// ../auth/src/telemetry-events.ts
|
|
29686
29733
|
var AuthTelemetryEvents = {
|
|
29687
|
-
Login: "
|
|
29688
|
-
TenantSelected: "
|
|
29689
|
-
TokenRefresh: "
|
|
29690
|
-
Logout: "
|
|
29734
|
+
Login: "uip.auth.login",
|
|
29735
|
+
TenantSelected: "uip.auth.tenant-selected",
|
|
29736
|
+
TokenRefresh: "uip.auth.token-refresh",
|
|
29737
|
+
Logout: "uip.auth.logout"
|
|
29691
29738
|
};
|
|
29692
29739
|
|
|
29693
29740
|
// ../auth/src/tenantSelection.ts
|
|
@@ -30208,9 +30255,7 @@ var Qe = `${t("gray", h)} `;
|
|
|
30208
30255
|
// ../auth/src/utils/envFile.ts
|
|
30209
30256
|
init_src();
|
|
30210
30257
|
init_src2();
|
|
30211
|
-
var
|
|
30212
|
-
var DEFAULT_AUTH_DIR = ".uipath";
|
|
30213
|
-
var DEFAULT_ENV_FILENAME = `${DEFAULT_AUTH_DIR}/${DEFAULT_AUTH_FILENAME}`;
|
|
30258
|
+
var DEFAULT_ENV_FILENAME = `${UIPATH_HOME_DIR}/${AUTH_FILENAME}`;
|
|
30214
30259
|
var resolveEnvFilePathAsync = async (envFilePath = DEFAULT_ENV_FILENAME) => {
|
|
30215
30260
|
const fs7 = getFileSystem();
|
|
30216
30261
|
if (fs7.path.isAbsolute(envFilePath)) {
|
|
@@ -30567,10 +30612,11 @@ async function extractErrorMessage(error48) {
|
|
|
30567
30612
|
}
|
|
30568
30613
|
|
|
30569
30614
|
// src/utils/metadata-cache.ts
|
|
30615
|
+
init_src();
|
|
30570
30616
|
import * as fs7 from "node:fs/promises";
|
|
30571
30617
|
import * as os3 from "node:os";
|
|
30572
30618
|
import * as path3 from "node:path";
|
|
30573
|
-
var CACHE_BASE = path3.join(os3.homedir(),
|
|
30619
|
+
var CACHE_BASE = path3.join(os3.homedir(), UIPATH_HOME_DIR, "cache", "integrationservice");
|
|
30574
30620
|
async function readJsonFile(filePath) {
|
|
30575
30621
|
try {
|
|
30576
30622
|
const data = await fs7.readFile(filePath, "utf-8");
|
|
@@ -30612,111 +30658,96 @@ async function readCachedConnectors() {
|
|
|
30612
30658
|
// src/commands/connectors.ts
|
|
30613
30659
|
var registerConnectorsCommand = (program3) => {
|
|
30614
30660
|
const connectors = program3.command("connectors").description("Manage UiPath Integration Service connectors");
|
|
30615
|
-
connectors.command("list").description("List all connectors").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("-f, --filter <filter>", "Filter connectors by name or key").option("--refresh", "Force re-fetch from API, ignoring cache").
|
|
30616
|
-
|
|
30617
|
-
|
|
30618
|
-
|
|
30619
|
-
|
|
30620
|
-
|
|
30621
|
-
|
|
30622
|
-
logger.info(`Loaded ${connectors2.length} connectors from cache`);
|
|
30623
|
-
}
|
|
30661
|
+
connectors.command("list").description("List all connectors").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("-f, --filter <filter>", "Filter connectors by name or key").option("--refresh", "Force re-fetch from API, ignoring cache").trackedAction(processContext, async (options) => {
|
|
30662
|
+
logger.info(`Listing connectors${options.filter ? ` (filter: ${options.filter})` : ""}${options.refresh ? " [refresh]" : ""}`);
|
|
30663
|
+
let connectors2 = null;
|
|
30664
|
+
if (!options.refresh) {
|
|
30665
|
+
connectors2 = await readCachedConnectors();
|
|
30666
|
+
if (connectors2) {
|
|
30667
|
+
logger.info(`Loaded ${connectors2.length} connectors from cache`);
|
|
30624
30668
|
}
|
|
30625
|
-
|
|
30626
|
-
|
|
30627
|
-
|
|
30669
|
+
}
|
|
30670
|
+
if (!connectors2) {
|
|
30671
|
+
const [apiError, api2] = await catchError(createApiClient(ConnectorsApi, {
|
|
30672
|
+
tenant: options.tenant
|
|
30673
|
+
}));
|
|
30674
|
+
if (apiError) {
|
|
30675
|
+
OutputFormatter.error({
|
|
30676
|
+
Result: "Failure",
|
|
30677
|
+
Message: "Error listing connectors",
|
|
30678
|
+
Instructions: apiError.message
|
|
30628
30679
|
});
|
|
30629
|
-
|
|
30630
|
-
|
|
30631
|
-
if (connectors2.length > 0) {
|
|
30632
|
-
await cacheConnectors(connectors2);
|
|
30633
|
-
}
|
|
30680
|
+
processContext.exit(1);
|
|
30681
|
+
return;
|
|
30634
30682
|
}
|
|
30635
|
-
|
|
30636
|
-
|
|
30637
|
-
|
|
30683
|
+
const [fetchError, fetched] = await catchError(api2.apiV1ConnectorsGet({}));
|
|
30684
|
+
if (fetchError) {
|
|
30685
|
+
const errorMessage = await extractErrorMessage(fetchError);
|
|
30686
|
+
logger.error(`Error listing connectors: ${errorMessage}`);
|
|
30687
|
+
OutputFormatter.error({
|
|
30688
|
+
Result: "Failure",
|
|
30689
|
+
Message: "Error listing connectors",
|
|
30690
|
+
Instructions: errorMessage
|
|
30691
|
+
});
|
|
30692
|
+
processContext.exit(1);
|
|
30693
|
+
return;
|
|
30638
30694
|
}
|
|
30695
|
+
connectors2 = fetched;
|
|
30696
|
+
logger.info(`Fetched ${connectors2.length} connectors from API`);
|
|
30639
30697
|
if (connectors2.length > 0) {
|
|
30640
|
-
|
|
30641
|
-
Id: connector.id,
|
|
30642
|
-
Name: connector.name,
|
|
30643
|
-
Key: connector.key,
|
|
30644
|
-
Vendor: connector.vendorName,
|
|
30645
|
-
Active: connector.isActive ? "Yes" : "No",
|
|
30646
|
-
Version: connector.latestVersion,
|
|
30647
|
-
Stage: connector.lifecycleStage,
|
|
30648
|
-
DapCompatible: connector.dapCompatible ? "Yes" : "No"
|
|
30649
|
-
}));
|
|
30650
|
-
logger.info(`Returning ${data.length} connectors: ${JSON.stringify(data)}`);
|
|
30651
|
-
OutputFormatter.success({
|
|
30652
|
-
Result: "Success",
|
|
30653
|
-
Code: "ConnectorList",
|
|
30654
|
-
Data: data
|
|
30655
|
-
});
|
|
30656
|
-
} else {
|
|
30657
|
-
logger.warn("No connectors found after filtering");
|
|
30658
|
-
OutputFormatter.success({
|
|
30659
|
-
Result: "Success",
|
|
30660
|
-
Code: "Message",
|
|
30661
|
-
Data: {
|
|
30662
|
-
Message: "No connectors found."
|
|
30663
|
-
}
|
|
30664
|
-
});
|
|
30698
|
+
await cacheConnectors(connectors2);
|
|
30665
30699
|
}
|
|
30666
|
-
} catch (error48) {
|
|
30667
|
-
const errorMessage = await extractErrorMessage(error48);
|
|
30668
|
-
logger.error(`Error listing connectors: ${errorMessage}`);
|
|
30669
|
-
OutputFormatter.error({
|
|
30670
|
-
Result: "Failure",
|
|
30671
|
-
Message: "Error listing connectors",
|
|
30672
|
-
Instructions: errorMessage
|
|
30673
|
-
});
|
|
30674
|
-
process.exitCode = 1;
|
|
30675
30700
|
}
|
|
30676
|
-
|
|
30677
|
-
|
|
30678
|
-
|
|
30679
|
-
|
|
30680
|
-
|
|
30681
|
-
|
|
30682
|
-
});
|
|
30683
|
-
const connector = await api2.apiV1ConnectorsKeyOrIdGet({
|
|
30684
|
-
keyOrId: connectorKey
|
|
30685
|
-
});
|
|
30686
|
-
logger.info(`Fetched connector: ${JSON.stringify(connector)}`);
|
|
30687
|
-
const data = {
|
|
30701
|
+
if (options.filter) {
|
|
30702
|
+
const filterLower = options.filter.toLowerCase();
|
|
30703
|
+
connectors2 = connectors2.filter((c) => c.name.toLowerCase().includes(filterLower) || c.key.toLowerCase().includes(filterLower));
|
|
30704
|
+
}
|
|
30705
|
+
if (connectors2.length > 0) {
|
|
30706
|
+
const data = connectors2.map((connector) => ({
|
|
30688
30707
|
Id: connector.id,
|
|
30689
30708
|
Name: connector.name,
|
|
30690
30709
|
Key: connector.key,
|
|
30691
|
-
AppName: connector.appName,
|
|
30692
30710
|
Vendor: connector.vendorName,
|
|
30693
|
-
Description: connector.description || "No description",
|
|
30694
30711
|
Active: connector.isActive ? "Yes" : "No",
|
|
30695
30712
|
Version: connector.latestVersion,
|
|
30696
|
-
|
|
30697
|
-
|
|
30698
|
-
|
|
30699
|
-
|
|
30700
|
-
HasCruds: connector.hasCRUDs ? "Yes" : "No",
|
|
30701
|
-
HasMethods: connector.hasMethods ? "Yes" : "No",
|
|
30702
|
-
DapCompatible: connector.dapCompatible ? "Yes" : "No",
|
|
30703
|
-
MinDapVersion: connector.minimumDapVersion || "N/A",
|
|
30704
|
-
ActivityPackVersion: connector.activityPackVersion || "N/A",
|
|
30705
|
-
ActivityColor: connector.activityColor,
|
|
30706
|
-
Categories: connector.categories.join(", "),
|
|
30707
|
-
Tags: connector.tags,
|
|
30708
|
-
DocumentationUrl: connector.documentationUrl || "No documentation",
|
|
30709
|
-
Guid: connector.guid,
|
|
30710
|
-
Tier: connector.tier,
|
|
30711
|
-
CreatedAt: connector.createdAt ? new Date(connector.createdAt).toISOString() : "",
|
|
30712
|
-
UpdatedAt: connector.updatedAt ? new Date(connector.updatedAt).toISOString() : ""
|
|
30713
|
-
};
|
|
30713
|
+
Stage: connector.lifecycleStage,
|
|
30714
|
+
DapCompatible: connector.dapCompatible ? "Yes" : "No"
|
|
30715
|
+
}));
|
|
30716
|
+
logger.info(`Returning ${data.length} connectors: ${JSON.stringify(data)}`);
|
|
30714
30717
|
OutputFormatter.success({
|
|
30715
30718
|
Result: "Success",
|
|
30716
|
-
Code: "
|
|
30717
|
-
Data:
|
|
30719
|
+
Code: "ConnectorList",
|
|
30720
|
+
Data: data
|
|
30718
30721
|
});
|
|
30719
|
-
}
|
|
30722
|
+
} else {
|
|
30723
|
+
logger.warn("No connectors found after filtering");
|
|
30724
|
+
OutputFormatter.success({
|
|
30725
|
+
Result: "Success",
|
|
30726
|
+
Code: "Message",
|
|
30727
|
+
Data: {
|
|
30728
|
+
Message: "No connectors found."
|
|
30729
|
+
}
|
|
30730
|
+
});
|
|
30731
|
+
}
|
|
30732
|
+
});
|
|
30733
|
+
connectors.command("get").description("Get connector by key").argument("<connector-key>", "Connector key (e.g., uipath-zoho-desk)").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").trackedAction(processContext, async (connectorKey, options) => {
|
|
30734
|
+
logger.info(`Getting connector: ${connectorKey}`);
|
|
30735
|
+
const [apiError, api2] = await catchError(createApiClient(ConnectorsApi, {
|
|
30736
|
+
tenant: options.tenant
|
|
30737
|
+
}));
|
|
30738
|
+
if (apiError) {
|
|
30739
|
+
OutputFormatter.error({
|
|
30740
|
+
Result: "Failure",
|
|
30741
|
+
Message: `Error getting connector '${connectorKey}'`,
|
|
30742
|
+
Instructions: apiError.message
|
|
30743
|
+
});
|
|
30744
|
+
processContext.exit(1);
|
|
30745
|
+
return;
|
|
30746
|
+
}
|
|
30747
|
+
const [error48, connector] = await catchError(api2.apiV1ConnectorsKeyOrIdGet({
|
|
30748
|
+
keyOrId: connectorKey
|
|
30749
|
+
}));
|
|
30750
|
+
if (error48) {
|
|
30720
30751
|
const errorMessage = await extractErrorMessage(error48);
|
|
30721
30752
|
logger.error(`Error getting connector '${connectorKey}': ${errorMessage}`);
|
|
30722
30753
|
OutputFormatter.error({
|
|
@@ -30724,8 +30755,42 @@ var registerConnectorsCommand = (program3) => {
|
|
|
30724
30755
|
Message: errorMessage,
|
|
30725
30756
|
Instructions: `${error48 instanceof Error ? error48.message : String(error48)}`
|
|
30726
30757
|
});
|
|
30727
|
-
|
|
30758
|
+
processContext.exit(1);
|
|
30759
|
+
return;
|
|
30728
30760
|
}
|
|
30761
|
+
logger.info(`Fetched connector: ${JSON.stringify(connector)}`);
|
|
30762
|
+
const data = {
|
|
30763
|
+
Id: connector.id,
|
|
30764
|
+
Name: connector.name,
|
|
30765
|
+
Key: connector.key,
|
|
30766
|
+
AppName: connector.appName,
|
|
30767
|
+
Vendor: connector.vendorName,
|
|
30768
|
+
Description: connector.description || "No description",
|
|
30769
|
+
Active: connector.isActive ? "Yes" : "No",
|
|
30770
|
+
Version: connector.latestVersion,
|
|
30771
|
+
LifecycleStage: connector.lifecycleStage,
|
|
30772
|
+
DiscoveryType: connector.discoveryType,
|
|
30773
|
+
DefaultAuth: connector.defaultAuthenticationType,
|
|
30774
|
+
HasEvents: connector.hasEvents ? "Yes" : "No",
|
|
30775
|
+
HasCruds: connector.hasCRUDs ? "Yes" : "No",
|
|
30776
|
+
HasMethods: connector.hasMethods ? "Yes" : "No",
|
|
30777
|
+
DapCompatible: connector.dapCompatible ? "Yes" : "No",
|
|
30778
|
+
MinDapVersion: connector.minimumDapVersion || "N/A",
|
|
30779
|
+
ActivityPackVersion: connector.activityPackVersion || "N/A",
|
|
30780
|
+
ActivityColor: connector.activityColor,
|
|
30781
|
+
Categories: connector.categories.join(", "),
|
|
30782
|
+
Tags: connector.tags,
|
|
30783
|
+
DocumentationUrl: connector.documentationUrl || "No documentation",
|
|
30784
|
+
Guid: connector.guid,
|
|
30785
|
+
Tier: connector.tier,
|
|
30786
|
+
CreatedAt: connector.createdAt ? new Date(connector.createdAt).toISOString() : "",
|
|
30787
|
+
UpdatedAt: connector.updatedAt ? new Date(connector.updatedAt).toISOString() : ""
|
|
30788
|
+
};
|
|
30789
|
+
OutputFormatter.success({
|
|
30790
|
+
Result: "Success",
|
|
30791
|
+
Code: "Connector",
|
|
30792
|
+
Data: [data]
|
|
30793
|
+
});
|
|
30729
30794
|
});
|
|
30730
30795
|
};
|
|
30731
30796
|
|