@unito/integration-cli 0.60.12 → 0.60.14
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/src/commands/dev.d.ts +1 -0
- package/dist/src/commands/dev.js +7 -0
- package/dist/src/commands/test.js +8 -1
- package/dist/src/services/integrationsPlatformClient.d.ts +15 -3
- package/dist/src/services/integrationsPlatformClient.js +4 -2
- package/oclif.manifest.json +16 -2
- package/package.json +2 -2
|
@@ -11,6 +11,7 @@ export default class Dev extends BaseCommand<typeof Dev> {
|
|
|
11
11
|
'credential-id': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
12
|
'test-account': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
13
|
'read-only': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
15
|
crawlMode: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
16
|
checks: import("@oclif/core/lib/interfaces").OptionFlag<string[], import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
17
|
'config-path': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
package/dist/src/commands/dev.js
CHANGED
|
@@ -48,6 +48,10 @@ class Dev extends baseCommand_1.BaseCommand {
|
|
|
48
48
|
description: 'whether or not to only perform read operations',
|
|
49
49
|
allowNo: true,
|
|
50
50
|
}),
|
|
51
|
+
timeout: core_1.Flags.integer({
|
|
52
|
+
description: `timeout in seconds passed as 'X-Unito-Operation-Deadline' header to the integration. Set to 0 for no timeout.`,
|
|
53
|
+
default: 0, // Dev mode has no timeout by default.
|
|
54
|
+
}),
|
|
51
55
|
crawlMode: core_1.Flags.string({
|
|
52
56
|
description: 'mode to use while crawling the integration graph',
|
|
53
57
|
options: Object.values(configuration_1.CrawlMode),
|
|
@@ -137,6 +141,9 @@ class Dev extends baseCommand_1.BaseCommand {
|
|
|
137
141
|
if (readOnly) {
|
|
138
142
|
commandArguments.push('--read-only');
|
|
139
143
|
}
|
|
144
|
+
if (flags.timeout) {
|
|
145
|
+
commandArguments.push(`--timeout=${flags.timeout}`);
|
|
146
|
+
}
|
|
140
147
|
if (configuration.graphRelativeUrl) {
|
|
141
148
|
commandArguments.push(`--graph-relative-url=${configuration.graphRelativeUrl}`);
|
|
142
149
|
}
|
|
@@ -54,6 +54,10 @@ class Test extends baseCommand_1.BaseCommand {
|
|
|
54
54
|
description: 'whether or not to only perform read operations',
|
|
55
55
|
allowNo: true,
|
|
56
56
|
}),
|
|
57
|
+
timeout: core_1.Flags.integer({
|
|
58
|
+
description: `timeout in seconds passed as 'X-Unito-Operation-Deadline' header to the integration. Set to 0 for no timeout.`,
|
|
59
|
+
default: 20, // Test mode has a default timeout of 20 seconds.
|
|
60
|
+
}),
|
|
57
61
|
crawlMode: core_1.Flags.string({
|
|
58
62
|
description: 'mode to use while crawling the integration graph',
|
|
59
63
|
options: Object.values(configuration_1.CrawlMode),
|
|
@@ -80,7 +84,7 @@ class Test extends baseCommand_1.BaseCommand {
|
|
|
80
84
|
Usage: <%= config.bin %> <%= command.id %> --config-path=/myCustomConfig.json`,
|
|
81
85
|
}),
|
|
82
86
|
'skip-install': core_1.Flags.boolean({
|
|
83
|
-
description: 'whether or not to run npm install before starting the integration',
|
|
87
|
+
description: 'whether or not to run npm install before starting the integration. Useful when npx linking modules to the integration.',
|
|
84
88
|
allowNo: true,
|
|
85
89
|
default: false,
|
|
86
90
|
}),
|
|
@@ -158,6 +162,9 @@ class Test extends baseCommand_1.BaseCommand {
|
|
|
158
162
|
if (readOnly) {
|
|
159
163
|
commandArguments.push('--read-only');
|
|
160
164
|
}
|
|
165
|
+
if (flags.timeout) {
|
|
166
|
+
commandArguments.push(`--timeout=${flags.timeout}`);
|
|
167
|
+
}
|
|
161
168
|
if (configuration.graphRelativeUrl) {
|
|
162
169
|
commandArguments.push(`--graph-relative-url=${configuration.graphRelativeUrl}`);
|
|
163
170
|
}
|
|
@@ -148,12 +148,22 @@ export type Credential = Base & {
|
|
|
148
148
|
integrationId: number;
|
|
149
149
|
/** The name of the integration. */
|
|
150
150
|
integrationName: string;
|
|
151
|
+
/** The display name of the integration. */
|
|
152
|
+
integrationDisplayName?: string;
|
|
151
153
|
/** The id of the authorization. */
|
|
152
154
|
authorizationId: number;
|
|
153
155
|
/** The scope of the credential. */
|
|
154
156
|
scope: 'development' | 'compliance' | 'production' | 'service';
|
|
155
157
|
/** The id of the Unito User for which this credential belongs to. */
|
|
156
158
|
unitoUserId: string | null;
|
|
159
|
+
/** The id of the credential account. */
|
|
160
|
+
credentialAccountId?: string | null;
|
|
161
|
+
/** The last time we tried to obtain the latest credential account. */
|
|
162
|
+
lastCredentialAccountAccessAt?: string | null;
|
|
163
|
+
/** The first time obtaining the latest credential account failed. */
|
|
164
|
+
firstFailedCredentialAccountAccessAt?: string | null;
|
|
165
|
+
/** The last time the credential was refreshed. */
|
|
166
|
+
lastRefreshedAt?: string | null;
|
|
157
167
|
/** The payload of the credential, which conforms to the schema (ex. variables) of the authorization. */
|
|
158
168
|
payload: {
|
|
159
169
|
[key: string]: any;
|
|
@@ -220,7 +230,7 @@ export declare function createIntegration(body?: {
|
|
|
220
230
|
*/
|
|
221
231
|
export declare function publishIntegration(body?: {
|
|
222
232
|
/** The archive of the integration, including the .unito.json file. */
|
|
223
|
-
file
|
|
233
|
+
file?: Blob;
|
|
224
234
|
}, opts?: Oazapfts.RequestOpts): Promise<Integration>;
|
|
225
235
|
/**
|
|
226
236
|
* Find an integration by exact name
|
|
@@ -438,16 +448,18 @@ export declare function getProxyGraph(xUnitoCredentialId: string, path: string,
|
|
|
438
448
|
/**
|
|
439
449
|
* Call an integration's graph
|
|
440
450
|
*/
|
|
441
|
-
export declare function patchProxyGraph(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
|
|
451
|
+
export declare function patchProxyGraph(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, }?: {
|
|
442
452
|
xUnitoCorrelationId?: string;
|
|
443
453
|
xUnitoAdditionalLoggingContext?: string;
|
|
454
|
+
contentType?: string;
|
|
444
455
|
}, opts?: Oazapfts.RequestOpts): Promise<any>;
|
|
445
456
|
/**
|
|
446
457
|
* Call an integration's graph
|
|
447
458
|
*/
|
|
448
|
-
export declare function postProxyGraph(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
|
|
459
|
+
export declare function postProxyGraph(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, }?: {
|
|
449
460
|
xUnitoCorrelationId?: string;
|
|
450
461
|
xUnitoAdditionalLoggingContext?: string;
|
|
462
|
+
contentType?: string;
|
|
451
463
|
}, opts?: Oazapfts.RequestOpts): Promise<any>;
|
|
452
464
|
/**
|
|
453
465
|
* Call an integration's graph
|
|
@@ -330,7 +330,7 @@ function getProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAd
|
|
|
330
330
|
/**
|
|
331
331
|
* Call an integration's graph
|
|
332
332
|
*/
|
|
333
|
-
function patchProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
333
|
+
function patchProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, } = {}, opts) {
|
|
334
334
|
return oazapfts.ok(oazapfts.fetchJson(`/proxy/graph${QS.query(QS.explode({
|
|
335
335
|
path,
|
|
336
336
|
}))}`, oazapfts.json({
|
|
@@ -341,13 +341,14 @@ function patchProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId,
|
|
|
341
341
|
'X-Unito-Credential-Id': xUnitoCredentialId,
|
|
342
342
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
343
343
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
344
|
+
'Content-Type': contentType,
|
|
344
345
|
}),
|
|
345
346
|
})));
|
|
346
347
|
}
|
|
347
348
|
/**
|
|
348
349
|
* Call an integration's graph
|
|
349
350
|
*/
|
|
350
|
-
function postProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
351
|
+
function postProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, } = {}, opts) {
|
|
351
352
|
return oazapfts.ok(oazapfts.fetchJson(`/proxy/graph${QS.query(QS.explode({
|
|
352
353
|
path,
|
|
353
354
|
}))}`, oazapfts.json({
|
|
@@ -358,6 +359,7 @@ function postProxyGraph(xUnitoCredentialId, path, body, { xUnitoCorrelationId, x
|
|
|
358
359
|
'X-Unito-Credential-Id': xUnitoCredentialId,
|
|
359
360
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
360
361
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
362
|
+
'Content-Type': contentType,
|
|
361
363
|
}),
|
|
362
364
|
})));
|
|
363
365
|
}
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.60.
|
|
2
|
+
"version": "0.60.14",
|
|
3
3
|
"commands": {
|
|
4
4
|
"activity": {
|
|
5
5
|
"id": "activity",
|
|
@@ -111,6 +111,13 @@
|
|
|
111
111
|
"description": "whether or not to only perform read operations",
|
|
112
112
|
"allowNo": true
|
|
113
113
|
},
|
|
114
|
+
"timeout": {
|
|
115
|
+
"name": "timeout",
|
|
116
|
+
"type": "option",
|
|
117
|
+
"description": "timeout in seconds passed as 'X-Unito-Operation-Deadline' header to the integration. Set to 0 for no timeout.",
|
|
118
|
+
"multiple": false,
|
|
119
|
+
"default": 0
|
|
120
|
+
},
|
|
114
121
|
"crawlMode": {
|
|
115
122
|
"name": "crawlMode",
|
|
116
123
|
"type": "option",
|
|
@@ -485,6 +492,13 @@
|
|
|
485
492
|
"description": "whether or not to only perform read operations",
|
|
486
493
|
"allowNo": true
|
|
487
494
|
},
|
|
495
|
+
"timeout": {
|
|
496
|
+
"name": "timeout",
|
|
497
|
+
"type": "option",
|
|
498
|
+
"description": "timeout in seconds passed as 'X-Unito-Operation-Deadline' header to the integration. Set to 0 for no timeout.",
|
|
499
|
+
"multiple": false,
|
|
500
|
+
"default": 20
|
|
501
|
+
},
|
|
488
502
|
"crawlMode": {
|
|
489
503
|
"name": "crawlMode",
|
|
490
504
|
"type": "option",
|
|
@@ -521,7 +535,7 @@
|
|
|
521
535
|
"skip-install": {
|
|
522
536
|
"name": "skip-install",
|
|
523
537
|
"type": "boolean",
|
|
524
|
-
"description": "whether or not to run npm install before starting the integration",
|
|
538
|
+
"description": "whether or not to run npm install before starting the integration. Useful when npx linking modules to the integration.",
|
|
525
539
|
"allowNo": true
|
|
526
540
|
}
|
|
527
541
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unito/integration-cli",
|
|
3
|
-
"version": "0.60.
|
|
3
|
+
"version": "0.60.14",
|
|
4
4
|
"description": "Integration CLI",
|
|
5
5
|
"bin": {
|
|
6
6
|
"integration-cli": "./bin/run"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@oclif/core": "3.x",
|
|
40
|
-
"@unito/integration-debugger": "0.26.
|
|
40
|
+
"@unito/integration-debugger": "0.26.9",
|
|
41
41
|
"@oazapfts/runtime": "1.x",
|
|
42
42
|
"ajv": "8.x",
|
|
43
43
|
"ajv-formats": "2.x",
|