@unito/integration-cli 0.60.7 → 0.60.9
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/boilerplate/package-lock.json +17 -17
- package/dist/src/commands/dev.d.ts +1 -0
- package/dist/src/commands/dev.js +14 -7
- package/dist/src/commands/test.js +14 -7
- package/dist/src/services/integrationsPlatformClient.d.ts +3 -2
- package/dist/src/services/integrationsPlatformClient.js +2 -1
- package/dist/src/services/oauth2.js +1 -4
- package/oclif.manifest.json +14 -1
- package/package.json +5 -4
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@unito/integration-sdk": "^0.x"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@types/node": "20.x",
|
|
15
|
+
"@types/node": "20.9.x",
|
|
16
16
|
"eslint": "8.x",
|
|
17
17
|
"npm-audit-resolver": "^3.0.0-RC.0",
|
|
18
18
|
"prettier": "3.x",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"typescript-eslint": "7.x"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|
|
24
|
-
"node": "
|
|
24
|
+
"node": "20.9"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"node_modules/@aashutoshrathi/word-wrap": {
|
|
@@ -554,9 +554,9 @@
|
|
|
554
554
|
"dev": true
|
|
555
555
|
},
|
|
556
556
|
"node_modules/@types/node": {
|
|
557
|
-
"version": "20.
|
|
558
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.
|
|
559
|
-
"integrity": "sha512-
|
|
557
|
+
"version": "20.9.5",
|
|
558
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.5.tgz",
|
|
559
|
+
"integrity": "sha512-Uq2xbNq0chGg+/WQEU0LJTSs/1nKxz6u1iemLcGomkSnKokbW1fbLqc3HOqCf2JP7KjlL4QkS7oZZTrOQHQYgQ==",
|
|
560
560
|
"dev": true,
|
|
561
561
|
"dependencies": {
|
|
562
562
|
"undici-types": "~5.26.4"
|
|
@@ -789,12 +789,12 @@
|
|
|
789
789
|
"dev": true
|
|
790
790
|
},
|
|
791
791
|
"node_modules/@unito/integration-api": {
|
|
792
|
-
"version": "0.43.
|
|
793
|
-
"resolved": "https://registry.npmjs.org/@unito/integration-api/-/integration-api-0.43.
|
|
794
|
-
"integrity": "sha512-
|
|
792
|
+
"version": "0.43.15",
|
|
793
|
+
"resolved": "https://registry.npmjs.org/@unito/integration-api/-/integration-api-0.43.15.tgz",
|
|
794
|
+
"integrity": "sha512-4Ii+UBtMEzgQpquBmg5zyzl/24YO5n7pAq0CbYrESGYNLA565w5vq2DKkQmsNpFTvz27rkF1lmI+HlqESg03Vg==",
|
|
795
795
|
"engines": {
|
|
796
|
-
"node": ">=
|
|
797
|
-
"npm": ">=
|
|
796
|
+
"node": ">=20",
|
|
797
|
+
"npm": ">=10"
|
|
798
798
|
}
|
|
799
799
|
},
|
|
800
800
|
"node_modules/@unito/integration-sdk": {
|
|
@@ -972,12 +972,12 @@
|
|
|
972
972
|
}
|
|
973
973
|
},
|
|
974
974
|
"node_modules/braces": {
|
|
975
|
-
"version": "3.0.
|
|
976
|
-
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.
|
|
977
|
-
"integrity": "sha512-
|
|
975
|
+
"version": "3.0.3",
|
|
976
|
+
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
|
977
|
+
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
|
978
978
|
"dev": true,
|
|
979
979
|
"dependencies": {
|
|
980
|
-
"fill-range": "^7.
|
|
980
|
+
"fill-range": "^7.1.1"
|
|
981
981
|
},
|
|
982
982
|
"engines": {
|
|
983
983
|
"node": ">=8"
|
|
@@ -1637,9 +1637,9 @@
|
|
|
1637
1637
|
}
|
|
1638
1638
|
},
|
|
1639
1639
|
"node_modules/fill-range": {
|
|
1640
|
-
"version": "7.
|
|
1641
|
-
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.
|
|
1642
|
-
"integrity": "sha512-
|
|
1640
|
+
"version": "7.1.1",
|
|
1641
|
+
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
|
1642
|
+
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
|
1643
1643
|
"dev": true,
|
|
1644
1644
|
"dependencies": {
|
|
1645
1645
|
"to-regex-range": "^5.0.1"
|
|
@@ -14,6 +14,7 @@ export default class Dev extends BaseCommand<typeof Dev> {
|
|
|
14
14
|
crawlMode: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
15
|
checks: import("@oclif/core/lib/interfaces").OptionFlag<string[], import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
16
|
'config-path': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
'skip-install': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
18
|
};
|
|
18
19
|
run(): Promise<void>;
|
|
19
20
|
}
|
package/dist/src/commands/dev.js
CHANGED
|
@@ -68,17 +68,24 @@ class Dev extends baseCommand_1.BaseCommand {
|
|
|
68
68
|
|
|
69
69
|
Usage: <%= config.bin %> <%= command.id %> --config-path=/myCustomConfig.json`,
|
|
70
70
|
}),
|
|
71
|
+
'skip-install': core_1.Flags.boolean({
|
|
72
|
+
description: 'whether or not to run npm install before starting the integration',
|
|
73
|
+
allowNo: true,
|
|
74
|
+
default: false,
|
|
75
|
+
}),
|
|
71
76
|
};
|
|
72
77
|
async run() {
|
|
73
78
|
(0, integrations_1.validateIsIntegrationDirectory)();
|
|
74
79
|
const { flags } = await this.parse(Dev);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
if (!flags['skip-install']) {
|
|
81
|
+
// Install NPM dependencies.
|
|
82
|
+
core_1.ux.action.start('Installing NPM dependencies', undefined, { stdout: true });
|
|
83
|
+
child_process_1.default.execSync('npm install', {
|
|
84
|
+
env: { ...process.env, NODE_ENV: 'development' },
|
|
85
|
+
stdio: ['ignore', 'ignore', 'inherit'],
|
|
86
|
+
});
|
|
87
|
+
core_1.ux.action.stop();
|
|
88
|
+
}
|
|
82
89
|
// Resolve the configuration.
|
|
83
90
|
const environment = flags.environment ?? GlobalConfiguration.Environment.Production;
|
|
84
91
|
const configuration = await (0, configuration_1.getConfiguration)(environment, flags['config-path']);
|
|
@@ -79,6 +79,11 @@ class Test extends baseCommand_1.BaseCommand {
|
|
|
79
79
|
|
|
80
80
|
Usage: <%= config.bin %> <%= command.id %> --config-path=/myCustomConfig.json`,
|
|
81
81
|
}),
|
|
82
|
+
'skip-install': core_1.Flags.boolean({
|
|
83
|
+
description: 'whether or not to run npm install before starting the integration',
|
|
84
|
+
allowNo: true,
|
|
85
|
+
default: false,
|
|
86
|
+
}),
|
|
82
87
|
};
|
|
83
88
|
async catch(error) {
|
|
84
89
|
/* istanbul ignore if */
|
|
@@ -90,13 +95,15 @@ class Test extends baseCommand_1.BaseCommand {
|
|
|
90
95
|
async run() {
|
|
91
96
|
(0, integrations_1.validateIsIntegrationDirectory)();
|
|
92
97
|
const { flags } = await this.parse(Test);
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
if (!flags['skip-install']) {
|
|
99
|
+
// Install NPM dependencies.
|
|
100
|
+
core_1.ux.action.start('Installing NPM dependencies', undefined, { stdout: true });
|
|
101
|
+
child_process_1.default.execSync('npm install', {
|
|
102
|
+
env: { ...process.env, NODE_ENV: 'development' },
|
|
103
|
+
stdio: ['ignore', 'ignore', 'inherit'],
|
|
104
|
+
});
|
|
105
|
+
core_1.ux.action.stop();
|
|
106
|
+
}
|
|
100
107
|
// Resolve the configuration.
|
|
101
108
|
const environment = flags.environment ?? GlobalConfiguration.Environment.Production;
|
|
102
109
|
const configuration = await (0, configuration_1.getConfiguration)(environment, flags['config-path']);
|
|
@@ -365,7 +365,7 @@ export declare function getCredentialAccount(xUnitoCredentialId: string, { xUnit
|
|
|
365
365
|
*/
|
|
366
366
|
export declare function postTrack(body: {
|
|
367
367
|
jwtToken: string;
|
|
368
|
-
event: 'AUTH_START' | 'AUTH_SUBMIT' | 'AUTH_ACTION' | 'AUTH_BLOCKED' | '
|
|
368
|
+
event: 'AUTH_START' | 'AUTH_SUBMIT' | 'AUTH_ACTION' | 'AUTH_BLOCKED' | 'USER_SUCCEEDS_CONNECTION' | 'USER_FAILED_CONNECTION';
|
|
369
369
|
payload?: {
|
|
370
370
|
[key: string]: any;
|
|
371
371
|
};
|
|
@@ -430,9 +430,10 @@ export declare function updateWebhookSubscription(xUnitoCredentialId: string, bo
|
|
|
430
430
|
/**
|
|
431
431
|
* Call an integration's graph
|
|
432
432
|
*/
|
|
433
|
-
export declare function getProxyGraph(xUnitoCredentialId: string, path: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
|
|
433
|
+
export declare function getProxyGraph(xUnitoCredentialId: string, path: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, accept, }?: {
|
|
434
434
|
xUnitoCorrelationId?: string;
|
|
435
435
|
xUnitoAdditionalLoggingContext?: string;
|
|
436
|
+
accept?: string;
|
|
436
437
|
}, opts?: Oazapfts.RequestOpts): Promise<any>;
|
|
437
438
|
/**
|
|
438
439
|
* Call an integration's graph
|
|
@@ -304,7 +304,7 @@ exports.updateWebhookSubscription = updateWebhookSubscription;
|
|
|
304
304
|
/**
|
|
305
305
|
* Call an integration's graph
|
|
306
306
|
*/
|
|
307
|
-
function getProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, } = {}, opts) {
|
|
307
|
+
function getProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, accept, } = {}, opts) {
|
|
308
308
|
return oazapfts.ok(oazapfts.fetchJson(`/proxy/graph${QS.query(QS.explode({
|
|
309
309
|
path,
|
|
310
310
|
}))}`, {
|
|
@@ -313,6 +313,7 @@ function getProxyGraph(xUnitoCredentialId, path, { xUnitoCorrelationId, xUnitoAd
|
|
|
313
313
|
'X-Unito-Credential-Id': xUnitoCredentialId,
|
|
314
314
|
'X-Unito-Correlation-Id': xUnitoCorrelationId,
|
|
315
315
|
'X-Unito-Additional-Logging-Context': xUnitoAdditionalLoggingContext,
|
|
316
|
+
Accept: accept,
|
|
316
317
|
}),
|
|
317
318
|
}));
|
|
318
319
|
}
|
|
@@ -55,9 +55,6 @@ class OAuth2Service {
|
|
|
55
55
|
if (!Object.values(configurationTypes_1.RequestContentType).includes(this.requestContentType)) {
|
|
56
56
|
throw new errors_1.UnsupportedContentTypeError(`Request content type not supported: ${this.requestContentType}`);
|
|
57
57
|
}
|
|
58
|
-
this.startServer = this.startServer.bind(this);
|
|
59
|
-
this.stopServer = this.stopServer.bind(this);
|
|
60
|
-
this.handleCallback = this.handleCallback.bind(this);
|
|
61
58
|
}
|
|
62
59
|
/**
|
|
63
60
|
* Initiate the authorization flow and redirects the user to the provider's authorization page.
|
|
@@ -234,7 +231,7 @@ class OAuth2Service {
|
|
|
234
231
|
app.get('/health', (_req, res) => {
|
|
235
232
|
res.send('pong');
|
|
236
233
|
});
|
|
237
|
-
app.get('/oauth2/callback', this.handleCallback);
|
|
234
|
+
app.get('/oauth2/callback', (req, res) => this.handleCallback(req, res));
|
|
238
235
|
this.server = app.listen(PORT, () => {
|
|
239
236
|
console.log(` Listening at port ${PORT}`);
|
|
240
237
|
});
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.60.
|
|
2
|
+
"version": "0.60.9",
|
|
3
3
|
"commands": {
|
|
4
4
|
"activity": {
|
|
5
5
|
"id": "activity",
|
|
@@ -136,6 +136,12 @@
|
|
|
136
136
|
"summary": "relative path to a custom \".unito.json\" file",
|
|
137
137
|
"description": "Use a custom configuration file instead of the default '.unito.json' or other environment specific\n ones.\n\n If you want to force the CLI to use a specific configuration file, you can use this flag to specify the relative\n path from your integration's root folder (with a leading '/').\n\n Usage: <%= config.bin %> <%= command.id %> --config-path=/myCustomConfig.json",
|
|
138
138
|
"multiple": false
|
|
139
|
+
},
|
|
140
|
+
"skip-install": {
|
|
141
|
+
"name": "skip-install",
|
|
142
|
+
"type": "boolean",
|
|
143
|
+
"description": "whether or not to run npm install before starting the integration",
|
|
144
|
+
"allowNo": true
|
|
139
145
|
}
|
|
140
146
|
},
|
|
141
147
|
"args": {}
|
|
@@ -428,6 +434,7 @@
|
|
|
428
434
|
"options": [
|
|
429
435
|
"getCollection",
|
|
430
436
|
"getItem",
|
|
437
|
+
"getBlob",
|
|
431
438
|
"createItem",
|
|
432
439
|
"updateItem",
|
|
433
440
|
"deleteItem",
|
|
@@ -510,6 +517,12 @@
|
|
|
510
517
|
"summary": "relative path to a custom \".unito.json\" file",
|
|
511
518
|
"description": "use a custom configuration file instead of the default '.unito.json' or other environment specific\n ones.\n\n If you want to force the CLI to use a specific configuration file, you can use this flag to specify the relative\n path from your integration's root folder (with a leading '/').\n\n Usage: <%= config.bin %> <%= command.id %> --config-path=/myCustomConfig.json",
|
|
512
519
|
"multiple": false
|
|
520
|
+
},
|
|
521
|
+
"skip-install": {
|
|
522
|
+
"name": "skip-install",
|
|
523
|
+
"type": "boolean",
|
|
524
|
+
"description": "whether or not to run npm install before starting the integration",
|
|
525
|
+
"allowNo": true
|
|
513
526
|
}
|
|
514
527
|
},
|
|
515
528
|
"args": {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unito/integration-cli",
|
|
3
|
-
"version": "0.60.
|
|
3
|
+
"version": "0.60.9",
|
|
4
4
|
"description": "Integration CLI",
|
|
5
5
|
"bin": {
|
|
6
6
|
"integration-cli": "./bin/run"
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"email": "hello@unito.io"
|
|
14
14
|
},
|
|
15
15
|
"engines": {
|
|
16
|
-
"node": ">=
|
|
16
|
+
"node": ">=20",
|
|
17
|
+
"npm": ">=10"
|
|
17
18
|
},
|
|
18
19
|
"scripts": {
|
|
19
20
|
"prepublishOnly": "npm run lint && npm run test",
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
],
|
|
37
38
|
"dependencies": {
|
|
38
39
|
"@oclif/core": "3.x",
|
|
39
|
-
"@unito/integration-debugger": "0.26.
|
|
40
|
+
"@unito/integration-debugger": "0.26.6",
|
|
40
41
|
"@oazapfts/runtime": "1.x",
|
|
41
42
|
"ajv": "8.x",
|
|
42
43
|
"ajv-formats": "2.x",
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
"@types/gradient-string": "1.x",
|
|
59
60
|
"@types/inquirer": "9.x",
|
|
60
61
|
"@types/mocha": "10.x",
|
|
61
|
-
"@types/node": "
|
|
62
|
+
"@types/node": "20.x",
|
|
62
63
|
"@types/openurl": "1.x",
|
|
63
64
|
"@types/tmp": "0.x",
|
|
64
65
|
"@typescript-eslint/eslint-plugin": "7.x",
|