@unito/integration-cli 0.67.0 → 1.0.0
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.
|
@@ -13,7 +13,6 @@ const configuration_1 = require("../resources/configuration");
|
|
|
13
13
|
const decryption_1 = require("../resources/decryption");
|
|
14
14
|
const credentials_1 = require("../resources/credentials");
|
|
15
15
|
const METHOD_MAP = {
|
|
16
|
-
get: 'GET',
|
|
17
16
|
getItem: 'GET',
|
|
18
17
|
getCollection: 'GET',
|
|
19
18
|
createItem: 'POST',
|
|
@@ -23,8 +22,8 @@ const METHOD_MAP = {
|
|
|
23
22
|
class Graph extends baseCommand_1.BaseCommand {
|
|
24
23
|
static description = 'Query a running integration graph and print the response';
|
|
25
24
|
static examples = [
|
|
26
|
-
'<%= config.bin %> <%= command.id %> --path=/sobjects/Opportunity/records/abc123',
|
|
27
|
-
'<%= config.bin %> <%= command.id %>
|
|
25
|
+
'<%= config.bin %> <%= command.id %> getItem --path=/sobjects/Opportunity/records/abc123',
|
|
26
|
+
'<%= config.bin %> <%= command.id %> getCollection --path=/sobjects/Opportunity --port=9201',
|
|
28
27
|
`<%= config.bin %> <%= command.id %> createItem --path=/sobjects/Task/records --body='{"Name":"New Task"}'`,
|
|
29
28
|
'<%= config.bin %> <%= command.id %> updateItem --path=/sobjects/Task/records/abc123 --body=\'{"Name":"Updated"}\'',
|
|
30
29
|
'<%= config.bin %> <%= command.id %> deleteItem --path=/sobjects/Task/records/abc123',
|
|
@@ -33,8 +32,8 @@ class Graph extends baseCommand_1.BaseCommand {
|
|
|
33
32
|
operation: core_1.Args.string({
|
|
34
33
|
description: 'Operation to perform on the graph path',
|
|
35
34
|
required: false,
|
|
36
|
-
default: '
|
|
37
|
-
options: ['
|
|
35
|
+
default: 'getItem',
|
|
36
|
+
options: ['getItem', 'getCollection', 'createItem', 'updateItem', 'deleteItem'],
|
|
38
37
|
}),
|
|
39
38
|
};
|
|
40
39
|
async catch(error) {
|
|
@@ -143,8 +143,8 @@ describe('graph', () => {
|
|
|
143
143
|
json: () => Promise.resolve(MOCK_RESPONSE),
|
|
144
144
|
}))
|
|
145
145
|
.stdout()
|
|
146
|
-
.command(['graph', '
|
|
147
|
-
.it('accepts explicit "
|
|
146
|
+
.command(['graph', 'getItem', '--path=/sobjects/Opportunity'])
|
|
147
|
+
.it('accepts explicit "getItem" operation arg', ctx => {
|
|
148
148
|
(0, test_1.expect)(ctx.stdout).to.contain('"label": "Opportunity"');
|
|
149
149
|
});
|
|
150
150
|
test_1.test
|
|
@@ -360,8 +360,8 @@ describe('graph', () => {
|
|
|
360
360
|
json: () => Promise.resolve(MOCK_RESPONSE),
|
|
361
361
|
}))
|
|
362
362
|
.stdout()
|
|
363
|
-
.command(['graph', '
|
|
364
|
-
.it('
|
|
363
|
+
.command(['graph', 'getItem', '--path=/sobjects/Opportunity', '--body={"ignored":true}'])
|
|
364
|
+
.it('getItem operations ignore --body flag', () => {
|
|
365
365
|
const fetchStub = global.fetch;
|
|
366
366
|
const [, options] = fetchStub.firstCall.args;
|
|
367
367
|
(0, test_1.expect)(options.method).to.equal('GET');
|
package/oclif.manifest.json
CHANGED
|
@@ -257,11 +257,10 @@
|
|
|
257
257
|
"aliases": [],
|
|
258
258
|
"args": {
|
|
259
259
|
"operation": {
|
|
260
|
-
"default": "
|
|
260
|
+
"default": "getItem",
|
|
261
261
|
"description": "Operation to perform on the graph path",
|
|
262
262
|
"name": "operation",
|
|
263
263
|
"options": [
|
|
264
|
-
"get",
|
|
265
264
|
"getItem",
|
|
266
265
|
"getCollection",
|
|
267
266
|
"createItem",
|
|
@@ -273,8 +272,8 @@
|
|
|
273
272
|
},
|
|
274
273
|
"description": "Query a running integration graph and print the response",
|
|
275
274
|
"examples": [
|
|
276
|
-
"<%= config.bin %> <%= command.id %> --path=/sobjects/Opportunity/records/abc123",
|
|
277
|
-
"<%= config.bin %> <%= command.id %>
|
|
275
|
+
"<%= config.bin %> <%= command.id %> getItem --path=/sobjects/Opportunity/records/abc123",
|
|
276
|
+
"<%= config.bin %> <%= command.id %> getCollection --path=/sobjects/Opportunity --port=9201",
|
|
278
277
|
"<%= config.bin %> <%= command.id %> createItem --path=/sobjects/Task/records --body='{\"Name\":\"New Task\"}'",
|
|
279
278
|
"<%= config.bin %> <%= command.id %> updateItem --path=/sobjects/Task/records/abc123 --body='{\"Name\":\"Updated\"}'",
|
|
280
279
|
"<%= config.bin %> <%= command.id %> deleteItem --path=/sobjects/Task/records/abc123"
|
|
@@ -1000,5 +999,5 @@
|
|
|
1000
999
|
]
|
|
1001
1000
|
}
|
|
1002
1001
|
},
|
|
1003
|
-
"version": "0.
|
|
1002
|
+
"version": "1.0.0"
|
|
1004
1003
|
}
|