@prismatic-io/prism 3.3.0 → 4.2.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.
- package/bin/run +9 -8
- package/lib/auth.js +183 -201
- package/lib/commands/alerts/events/list.js +27 -57
- package/lib/commands/alerts/groups/create.js +18 -49
- package/lib/commands/alerts/groups/delete.js +10 -41
- package/lib/commands/alerts/groups/list.js +15 -47
- package/lib/commands/alerts/monitors/clear.js +10 -41
- package/lib/commands/alerts/monitors/create.js +27 -58
- package/lib/commands/alerts/monitors/delete.js +10 -41
- package/lib/commands/alerts/monitors/list.js +16 -48
- package/lib/commands/alerts/triggers/list.js +15 -47
- package/lib/commands/alerts/webhooks/create.js +18 -49
- package/lib/commands/alerts/webhooks/delete.js +10 -41
- package/lib/commands/alerts/webhooks/list.js +25 -57
- package/lib/commands/authorization-methods/list.js +20 -51
- package/lib/commands/components/actions/list.js +29 -61
- package/lib/commands/components/delete.js +10 -41
- package/lib/commands/components/dev/run.js +89 -0
- package/lib/commands/components/dev/test.js +218 -0
- package/lib/commands/components/init/action.js +12 -0
- package/lib/commands/components/init/component.js +12 -0
- package/lib/commands/components/init/connection.js +12 -0
- package/lib/commands/components/init/index.js +142 -0
- package/lib/commands/components/init/trigger.js +12 -0
- package/lib/commands/components/list.js +31 -60
- package/lib/commands/components/publish.js +29 -279
- package/lib/commands/components/triggers/list.js +29 -61
- package/lib/commands/customers/create.js +14 -45
- package/lib/commands/customers/credentials/create.js +19 -50
- package/lib/commands/customers/credentials/delete.js +10 -41
- package/lib/commands/customers/credentials/list.js +30 -59
- package/lib/commands/customers/credentials/update.js +16 -47
- package/lib/commands/customers/delete.js +10 -41
- package/lib/commands/customers/list.js +16 -48
- package/lib/commands/customers/update.js +15 -46
- package/lib/commands/customers/users/create.js +18 -49
- package/lib/commands/customers/users/delete.js +10 -41
- package/lib/commands/customers/users/list.js +21 -51
- package/lib/commands/customers/users/roles.js +18 -48
- package/lib/commands/customers/users/update.js +19 -50
- package/lib/commands/executions/step-result/get.js +36 -66
- package/lib/commands/instances/config-vars/list.js +32 -62
- package/lib/commands/instances/create.js +20 -51
- package/lib/commands/instances/delete.js +10 -41
- package/lib/commands/instances/deploy.js +20 -44
- package/lib/commands/instances/disable.js +11 -42
- package/lib/commands/instances/enable.js +11 -42
- package/lib/commands/instances/flow-configs/list.js +25 -55
- package/lib/commands/instances/flow-configs/test.js +62 -97
- package/lib/commands/instances/list.js +31 -59
- package/lib/commands/instances/update.js +15 -46
- package/lib/commands/integrations/available.js +13 -44
- package/lib/commands/integrations/create.js +14 -45
- package/lib/commands/integrations/delete.js +10 -41
- package/lib/commands/integrations/export.js +11 -68
- package/lib/commands/integrations/flows/list.js +22 -52
- package/lib/commands/integrations/flows/test.js +62 -96
- package/lib/commands/integrations/fork.js +15 -46
- package/lib/commands/integrations/import.js +12 -63
- package/lib/commands/integrations/list.js +25 -54
- package/lib/commands/integrations/publish.js +13 -44
- package/lib/commands/integrations/update.js +18 -49
- package/lib/commands/integrations/versions/index.js +26 -58
- package/lib/commands/login.js +16 -32
- package/lib/commands/logout.js +10 -22
- package/lib/commands/logs/severities/list.js +15 -47
- package/lib/commands/me/index.js +15 -60
- package/lib/commands/me/token/revoke.js +12 -0
- package/lib/commands/me/token.js +10 -22
- package/lib/commands/organization/credentials/create.js +17 -48
- package/lib/commands/organization/credentials/delete.js +10 -41
- package/lib/commands/organization/credentials/list.js +22 -54
- package/lib/commands/organization/credentials/update.js +16 -47
- package/lib/commands/organization/update.js +12 -43
- package/lib/commands/organization/updateAvatarUrl.js +14 -45
- package/lib/commands/organization/users/create.js +16 -47
- package/lib/commands/organization/users/delete.js +10 -41
- package/lib/commands/organization/users/list.js +16 -48
- package/lib/commands/organization/users/roles.js +18 -48
- package/lib/commands/organization/users/update.js +19 -50
- package/lib/config.js +24 -30
- package/lib/errors.js +48 -27
- package/lib/fields.js +6 -4
- package/lib/fs.js +6 -14
- package/lib/generate/action.js +43 -100
- package/lib/generate/index.js +27 -23
- package/lib/generate/input.js +28 -43
- package/lib/generate/parse.js +18 -76
- package/lib/generate/sourceFile.js +15 -44
- package/lib/generate/util.js +4 -106
- package/lib/graphql.js +37 -65
- package/lib/index.js +3 -3
- package/lib/utils/component/publish.js +219 -0
- package/lib/utils/component/query.js +23 -0
- package/lib/utils/date.js +14 -0
- package/lib/utils/execution/logs.js +86 -0
- package/lib/utils/integration/definition.js +101 -0
- package/lib/utils/integration/export.js +36 -0
- package/lib/utils/integration/import.js +46 -0
- package/lib/utils/integration/invoke.js +64 -0
- package/lib/utils/integration/query.js +59 -0
- package/lib/utils/serialize.js +8 -0
- package/lib/utils/user/query.js +24 -0
- package/lib/yeoman.js +24 -0
- package/oclif.manifest.json +1 -1
- package/package.json +50 -58
- package/lib/auth.js.map +0 -1
- package/lib/commands/alerts/events/list.js.map +0 -1
- package/lib/commands/alerts/groups/create.js.map +0 -1
- package/lib/commands/alerts/groups/delete.js.map +0 -1
- package/lib/commands/alerts/groups/list.js.map +0 -1
- package/lib/commands/alerts/monitors/clear.js.map +0 -1
- package/lib/commands/alerts/monitors/create.js.map +0 -1
- package/lib/commands/alerts/monitors/delete.js.map +0 -1
- package/lib/commands/alerts/monitors/list.js.map +0 -1
- package/lib/commands/alerts/triggers/list.js.map +0 -1
- package/lib/commands/alerts/webhooks/create.js.map +0 -1
- package/lib/commands/alerts/webhooks/delete.js.map +0 -1
- package/lib/commands/alerts/webhooks/list.js.map +0 -1
- package/lib/commands/authorization-methods/list.js.map +0 -1
- package/lib/commands/components/actions/list.js.map +0 -1
- package/lib/commands/components/delete.js.map +0 -1
- package/lib/commands/components/init.js +0 -224
- package/lib/commands/components/init.js.map +0 -1
- package/lib/commands/components/list.js.map +0 -1
- package/lib/commands/components/publish.js.map +0 -1
- package/lib/commands/components/triggers/list.js.map +0 -1
- package/lib/commands/customers/create.js.map +0 -1
- package/lib/commands/customers/credentials/create.js.map +0 -1
- package/lib/commands/customers/credentials/delete.js.map +0 -1
- package/lib/commands/customers/credentials/list.js.map +0 -1
- package/lib/commands/customers/credentials/update.js.map +0 -1
- package/lib/commands/customers/delete.js.map +0 -1
- package/lib/commands/customers/list.js.map +0 -1
- package/lib/commands/customers/update.js.map +0 -1
- package/lib/commands/customers/users/create.js.map +0 -1
- package/lib/commands/customers/users/delete.js.map +0 -1
- package/lib/commands/customers/users/list.js.map +0 -1
- package/lib/commands/customers/users/roles.js.map +0 -1
- package/lib/commands/customers/users/update.js.map +0 -1
- package/lib/commands/executions/step-result/get.js.map +0 -1
- package/lib/commands/instances/config-vars/list.js.map +0 -1
- package/lib/commands/instances/create.js.map +0 -1
- package/lib/commands/instances/delete.js.map +0 -1
- package/lib/commands/instances/deploy.js.map +0 -1
- package/lib/commands/instances/disable.js.map +0 -1
- package/lib/commands/instances/enable.js.map +0 -1
- package/lib/commands/instances/flow-configs/list.js.map +0 -1
- package/lib/commands/instances/flow-configs/test.js.map +0 -1
- package/lib/commands/instances/list.js.map +0 -1
- package/lib/commands/instances/update.js.map +0 -1
- package/lib/commands/integrations/available.js.map +0 -1
- package/lib/commands/integrations/create.js.map +0 -1
- package/lib/commands/integrations/delete.js.map +0 -1
- package/lib/commands/integrations/export.js.map +0 -1
- package/lib/commands/integrations/flows/list.js.map +0 -1
- package/lib/commands/integrations/flows/test.js.map +0 -1
- package/lib/commands/integrations/fork.js.map +0 -1
- package/lib/commands/integrations/import.js.map +0 -1
- package/lib/commands/integrations/list.js.map +0 -1
- package/lib/commands/integrations/publish.js.map +0 -1
- package/lib/commands/integrations/update.js.map +0 -1
- package/lib/commands/integrations/versions/index.js.map +0 -1
- package/lib/commands/login.js.map +0 -1
- package/lib/commands/logout.js.map +0 -1
- package/lib/commands/logs/severities/list.js.map +0 -1
- package/lib/commands/me/index.js.map +0 -1
- package/lib/commands/me/token.js.map +0 -1
- package/lib/commands/organization/credentials/create.js.map +0 -1
- package/lib/commands/organization/credentials/delete.js.map +0 -1
- package/lib/commands/organization/credentials/list.js.map +0 -1
- package/lib/commands/organization/credentials/update.js.map +0 -1
- package/lib/commands/organization/update.js.map +0 -1
- package/lib/commands/organization/updateAvatarUrl.js.map +0 -1
- package/lib/commands/organization/users/create.js.map +0 -1
- package/lib/commands/organization/users/delete.js.map +0 -1
- package/lib/commands/organization/users/list.js.map +0 -1
- package/lib/commands/organization/users/roles.js.map +0 -1
- package/lib/commands/organization/users/update.js.map +0 -1
- package/lib/config.js.map +0 -1
- package/lib/errors.js.map +0 -1
- package/lib/fields.js.map +0 -1
- package/lib/fs.js.map +0 -1
- package/lib/generate/action.js.map +0 -1
- package/lib/generate/client.js +0 -98
- package/lib/generate/client.js.map +0 -1
- package/lib/generate/connection.js +0 -86
- package/lib/generate/connection.js.map +0 -1
- package/lib/generate/index.js.map +0 -1
- package/lib/generate/input.js.map +0 -1
- package/lib/generate/parse.js.map +0 -1
- package/lib/generate/sourceFile.js.map +0 -1
- package/lib/generate/util.js.map +0 -1
- package/lib/graphql.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/templates/component/assets/icon.png +0 -0
- package/templates/component/jest.config.js +0 -4
- package/templates/component/openapi/client.ts +0 -73
- package/templates/component/openapi/request.ts +0 -161
- package/templates/component/package.json +0 -24
- package/templates/component/src/actions.ts +0 -33
- package/templates/component/src/client.ts +0 -7
- package/templates/component/src/connections.ts +0 -25
- package/templates/component/src/index.test.ts +0 -32
- package/templates/component/src/index.ts +0 -17
- package/templates/component/src/triggers.ts +0 -18
- package/templates/component/tsconfig.json +0 -19
- package/templates/component/webpack.config.js +0 -44
|
@@ -1,41 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
const
|
|
32
|
-
const graphql_1 =
|
|
33
|
-
class DeleteCommand extends
|
|
34
|
-
run() {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
mutation: graphql_1.gql `
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const graphql_1 = require("../../../graphql");
|
|
5
|
+
class DeleteCommand extends core_1.Command {
|
|
6
|
+
async run() {
|
|
7
|
+
const { args: { user }, } = await this.parse(DeleteCommand);
|
|
8
|
+
await (0, graphql_1.gqlRequest)({
|
|
9
|
+
document: (0, graphql_1.gql) `
|
|
39
10
|
mutation deleteUser($id: ID!) {
|
|
40
11
|
deleteUser(input: { id: $id }) {
|
|
41
12
|
user {
|
|
@@ -48,10 +19,9 @@ class DeleteCommand extends command_1.Command {
|
|
|
48
19
|
}
|
|
49
20
|
}
|
|
50
21
|
`,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
});
|
|
22
|
+
variables: {
|
|
23
|
+
id: user,
|
|
24
|
+
},
|
|
55
25
|
});
|
|
56
26
|
}
|
|
57
27
|
}
|
|
@@ -64,4 +34,3 @@ DeleteCommand.args = [
|
|
|
64
34
|
description: "ID of the user to delete",
|
|
65
35
|
},
|
|
66
36
|
];
|
|
67
|
-
//# sourceMappingURL=delete.js.map
|
|
@@ -1,42 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
const
|
|
32
|
-
const graphql_1 =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const result = yield graphql_1.default.query({
|
|
39
|
-
query: graphql_1.gql `
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const graphql_1 = require("../../../graphql");
|
|
5
|
+
class ListCommand extends core_1.Command {
|
|
6
|
+
async run() {
|
|
7
|
+
const { args: { customer }, flags, } = await this.parse(ListCommand);
|
|
8
|
+
const result = await (0, graphql_1.gqlRequest)({
|
|
9
|
+
document: (0, graphql_1.gql) `
|
|
40
10
|
query listCustomerUsers($id: ID!) {
|
|
41
11
|
customer(id: $id) {
|
|
42
12
|
users {
|
|
@@ -49,19 +19,18 @@ class ListCommand extends command_1.Command {
|
|
|
49
19
|
}
|
|
50
20
|
}
|
|
51
21
|
`,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
});
|
|
56
|
-
cli_ux_1.cli.table(result.data.customer.users.nodes, {
|
|
57
|
-
id: {
|
|
58
|
-
minWidth: 8,
|
|
59
|
-
extended: true,
|
|
60
|
-
},
|
|
61
|
-
name: {},
|
|
62
|
-
email: {},
|
|
63
|
-
}, Object.assign({}, flags));
|
|
22
|
+
variables: {
|
|
23
|
+
id: customer,
|
|
24
|
+
},
|
|
64
25
|
});
|
|
26
|
+
core_1.CliUx.ux.table(result.customer.users.nodes, {
|
|
27
|
+
id: {
|
|
28
|
+
minWidth: 8,
|
|
29
|
+
extended: true,
|
|
30
|
+
},
|
|
31
|
+
name: {},
|
|
32
|
+
email: {},
|
|
33
|
+
}, { ...flags });
|
|
65
34
|
}
|
|
66
35
|
}
|
|
67
36
|
exports.default = ListCommand;
|
|
@@ -73,5 +42,6 @@ ListCommand.args = [
|
|
|
73
42
|
required: true,
|
|
74
43
|
},
|
|
75
44
|
];
|
|
76
|
-
ListCommand.flags =
|
|
77
|
-
|
|
45
|
+
ListCommand.flags = {
|
|
46
|
+
...core_1.CliUx.ux.table.flags(),
|
|
47
|
+
};
|
|
@@ -1,42 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
const
|
|
32
|
-
const graphql_1 =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const result = yield graphql_1.default.query({
|
|
39
|
-
query: graphql_1.gql `
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const graphql_1 = require("../../../graphql");
|
|
5
|
+
class ListCommand extends core_1.Command {
|
|
6
|
+
async run() {
|
|
7
|
+
const { flags } = await this.parse(ListCommand);
|
|
8
|
+
const result = await (0, graphql_1.gqlRequest)({
|
|
9
|
+
document: (0, graphql_1.gql) `
|
|
40
10
|
query listCustomerRoles {
|
|
41
11
|
customerRoles {
|
|
42
12
|
id
|
|
@@ -45,19 +15,19 @@ class ListCommand extends command_1.Command {
|
|
|
45
15
|
}
|
|
46
16
|
}
|
|
47
17
|
`,
|
|
48
|
-
});
|
|
49
|
-
cli_ux_1.cli.table(result.data.customerRoles, {
|
|
50
|
-
id: {
|
|
51
|
-
minWidth: 8,
|
|
52
|
-
extended: true,
|
|
53
|
-
},
|
|
54
|
-
name: {},
|
|
55
|
-
description: {},
|
|
56
|
-
}, Object.assign({}, flags));
|
|
57
18
|
});
|
|
19
|
+
core_1.CliUx.ux.table(result.customerRoles, {
|
|
20
|
+
id: {
|
|
21
|
+
minWidth: 8,
|
|
22
|
+
extended: true,
|
|
23
|
+
},
|
|
24
|
+
name: {},
|
|
25
|
+
description: {},
|
|
26
|
+
}, { ...flags });
|
|
58
27
|
}
|
|
59
28
|
}
|
|
60
29
|
exports.default = ListCommand;
|
|
61
30
|
ListCommand.description = "List Roles you can grant to Customer Users";
|
|
62
|
-
ListCommand.flags =
|
|
63
|
-
|
|
31
|
+
ListCommand.flags = {
|
|
32
|
+
...core_1.CliUx.ux.table.flags(),
|
|
33
|
+
};
|
|
@@ -1,41 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
const
|
|
32
|
-
const graphql_1 =
|
|
33
|
-
class UpdateCommand extends
|
|
34
|
-
run() {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
mutation: graphql_1.gql `
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const graphql_1 = require("../../../graphql");
|
|
5
|
+
class UpdateCommand extends core_1.Command {
|
|
6
|
+
async run() {
|
|
7
|
+
const { args: { user }, flags: { name, phone, "dark-mode": darkMode, "dark-mode-os-sync": darkModeOsSync, }, } = await this.parse(UpdateCommand);
|
|
8
|
+
const result = await (0, graphql_1.gqlRequest)({
|
|
9
|
+
document: (0, graphql_1.gql) `
|
|
39
10
|
mutation updateUser(
|
|
40
11
|
$user: ID!
|
|
41
12
|
$name: String
|
|
@@ -62,16 +33,15 @@ class UpdateCommand extends command_1.Command {
|
|
|
62
33
|
}
|
|
63
34
|
}
|
|
64
35
|
`,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
});
|
|
73
|
-
this.log(result.data.updateUser.user.id);
|
|
36
|
+
variables: {
|
|
37
|
+
user,
|
|
38
|
+
name,
|
|
39
|
+
phone,
|
|
40
|
+
darkMode,
|
|
41
|
+
darkModeOsSync,
|
|
42
|
+
},
|
|
74
43
|
});
|
|
44
|
+
this.log(result.updateUser.user.id);
|
|
75
45
|
}
|
|
76
46
|
}
|
|
77
47
|
exports.default = UpdateCommand;
|
|
@@ -84,25 +54,24 @@ UpdateCommand.args = [
|
|
|
84
54
|
},
|
|
85
55
|
];
|
|
86
56
|
UpdateCommand.flags = {
|
|
87
|
-
name:
|
|
57
|
+
name: core_1.Flags.string({
|
|
88
58
|
char: "n",
|
|
89
59
|
description: "name of the user",
|
|
90
60
|
required: false,
|
|
91
61
|
}),
|
|
92
|
-
phone:
|
|
62
|
+
phone: core_1.Flags.string({
|
|
93
63
|
char: "p",
|
|
94
64
|
description: "phone number of the user",
|
|
95
65
|
required: false,
|
|
96
66
|
}),
|
|
97
|
-
"dark-mode":
|
|
67
|
+
"dark-mode": core_1.Flags.string({
|
|
98
68
|
char: "d",
|
|
99
69
|
description: "whether the user should have dark mode enabled",
|
|
100
70
|
required: false,
|
|
101
71
|
}),
|
|
102
|
-
"dark-mode-os-sync":
|
|
72
|
+
"dark-mode-os-sync": core_1.Flags.string({
|
|
103
73
|
char: "o",
|
|
104
74
|
description: "whether dark mode should sync with OS settings",
|
|
105
75
|
required: false,
|
|
106
76
|
}),
|
|
107
77
|
};
|
|
108
|
-
//# sourceMappingURL=update.js.map
|
|
@@ -1,50 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
31
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
32
4
|
};
|
|
33
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
6
|
exports.parseData = void 0;
|
|
35
7
|
const fs_1 = require("../../../fs");
|
|
36
|
-
const
|
|
37
|
-
const graphql_1 =
|
|
8
|
+
const core_1 = require("@oclif/core");
|
|
9
|
+
const graphql_1 = require("../../../graphql");
|
|
38
10
|
const axios_1 = __importDefault(require("axios"));
|
|
39
11
|
const msgpack_1 = require("@msgpack/msgpack");
|
|
40
12
|
const mime_types_1 = require("mime-types");
|
|
41
|
-
const deserialize = (data) => msgpack_1.decode(data);
|
|
42
|
-
|
|
13
|
+
const deserialize = (data) => (0, msgpack_1.decode)(data);
|
|
14
|
+
const parseData = (data, contentType = "") => {
|
|
43
15
|
if (data === null || data === undefined) {
|
|
44
16
|
return "";
|
|
45
17
|
}
|
|
46
18
|
// Some content-types require additional processing.
|
|
47
|
-
const dataType = mime_types_1.extension(contentType);
|
|
19
|
+
const dataType = (0, mime_types_1.extension)(contentType);
|
|
48
20
|
if (contentType.startsWith("text/") ||
|
|
49
21
|
(dataType && ["json", "xml", "csv", "xhtml"].includes(dataType))) {
|
|
50
22
|
// If the content-types specifies that the data is text/, or if the extension
|
|
@@ -54,7 +26,7 @@ exports.parseData = (data, contentType = "") => {
|
|
|
54
26
|
// If the payload is supposed to be JSON, ensure that it can be parsed.
|
|
55
27
|
return JSON.parse(data.toString());
|
|
56
28
|
}
|
|
57
|
-
catch
|
|
29
|
+
catch {
|
|
58
30
|
throw new Error("Received malformed JSON payload.");
|
|
59
31
|
}
|
|
60
32
|
}
|
|
@@ -65,14 +37,14 @@ exports.parseData = (data, contentType = "") => {
|
|
|
65
37
|
}
|
|
66
38
|
return JSON.stringify(data);
|
|
67
39
|
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
40
|
+
exports.parseData = parseData;
|
|
41
|
+
class GetCommand extends core_1.Command {
|
|
42
|
+
async run() {
|
|
43
|
+
var _a, _b;
|
|
44
|
+
const { flags } = await this.parse(GetCommand);
|
|
45
|
+
const { executionId, stepName, outputPath } = flags;
|
|
46
|
+
const result = await (0, graphql_1.gqlRequest)({
|
|
47
|
+
document: (0, graphql_1.gql) `
|
|
76
48
|
query getStepOutputDetails($executionId: ID!, $stepName: String!) {
|
|
77
49
|
executionResult(id: $executionId) {
|
|
78
50
|
id
|
|
@@ -85,49 +57,47 @@ class GetCommand extends command_1.Command {
|
|
|
85
57
|
}
|
|
86
58
|
}
|
|
87
59
|
`,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
60
|
+
variables: {
|
|
61
|
+
executionId: executionId,
|
|
62
|
+
stepName: stepName,
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
const stepResult = (_b = (_a = result === null || result === void 0 ? void 0 : result.executionResult) === null || _a === void 0 ? void 0 : _a.stepResults.nodes) === null || _b === void 0 ? void 0 : _b[0];
|
|
66
|
+
if (stepResult === null || stepResult === void 0 ? void 0 : stepResult.resultsUrl) {
|
|
67
|
+
const response = await axios_1.default.get(stepResult.resultsUrl, {
|
|
68
|
+
responseType: "arraybuffer",
|
|
92
69
|
});
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
const resultsBuffer = Buffer.from(yield response.data);
|
|
99
|
-
const { data: deserializedResult, contentType } = deserialize(resultsBuffer);
|
|
100
|
-
const output = exports.parseData(deserializedResult, contentType);
|
|
101
|
-
if (outputPath) {
|
|
102
|
-
yield fs_1.fs.writeFile(outputPath, output);
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
console.log(output);
|
|
106
|
-
}
|
|
70
|
+
const resultsBuffer = Buffer.from(await response.data);
|
|
71
|
+
const { data: deserializedResult, contentType } = deserialize(resultsBuffer);
|
|
72
|
+
const output = (0, exports.parseData)(deserializedResult, contentType);
|
|
73
|
+
if (outputPath) {
|
|
74
|
+
await fs_1.fs.writeFile(outputPath, output);
|
|
107
75
|
}
|
|
108
76
|
else {
|
|
109
|
-
console.
|
|
77
|
+
console.log(output);
|
|
110
78
|
}
|
|
111
|
-
}
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
console.error("No step results found. Did you enter the correct step name?");
|
|
82
|
+
}
|
|
112
83
|
}
|
|
113
84
|
}
|
|
114
85
|
exports.default = GetCommand;
|
|
115
86
|
GetCommand.description = "Gets the Result of a specified Step in an Instance Execution";
|
|
116
87
|
GetCommand.flags = {
|
|
117
|
-
executionId:
|
|
88
|
+
executionId: core_1.Flags.string({
|
|
118
89
|
char: "e",
|
|
119
90
|
required: true,
|
|
120
91
|
description: "ID of an Execution",
|
|
121
92
|
}),
|
|
122
|
-
stepName:
|
|
93
|
+
stepName: core_1.Flags.string({
|
|
123
94
|
char: "s",
|
|
124
95
|
required: true,
|
|
125
96
|
description: "Name of an Integration Step",
|
|
126
97
|
}),
|
|
127
|
-
outputPath:
|
|
98
|
+
outputPath: core_1.Flags.string({
|
|
128
99
|
char: "p",
|
|
129
100
|
required: false,
|
|
130
101
|
description: "Output result to a file. Output will be printed to stdout if this is omitted",
|
|
131
102
|
}),
|
|
132
103
|
};
|
|
133
|
-
//# sourceMappingURL=get.js.map
|
|
@@ -1,42 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
const
|
|
32
|
-
const graphql_1 =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const result = yield graphql_1.default.query({
|
|
39
|
-
query: graphql_1.gql `
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const graphql_1 = require("../../../graphql");
|
|
5
|
+
class ListCommand extends core_1.Command {
|
|
6
|
+
async run() {
|
|
7
|
+
const { args: { instance }, flags, } = await this.parse(ListCommand);
|
|
8
|
+
const result = await (0, graphql_1.gqlRequest)({
|
|
9
|
+
document: (0, graphql_1.gql) `
|
|
40
10
|
query listInstanceConfigVariables($id: ID!) {
|
|
41
11
|
instance(id: $id) {
|
|
42
12
|
configVariables {
|
|
@@ -53,30 +23,29 @@ class ListCommand extends command_1.Command {
|
|
|
53
23
|
}
|
|
54
24
|
}
|
|
55
25
|
`,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
});
|
|
60
|
-
cli_ux_1.cli.table(result.data.instance.configVariables.nodes, {
|
|
61
|
-
id: {
|
|
62
|
-
minWidth: 8,
|
|
63
|
-
extended: true,
|
|
64
|
-
},
|
|
65
|
-
requiredVariableId: {
|
|
66
|
-
get: (row) => row.requiredConfigVariable.id,
|
|
67
|
-
extended: true,
|
|
68
|
-
},
|
|
69
|
-
key: {
|
|
70
|
-
get: (row) => row.requiredConfigVariable.key,
|
|
71
|
-
},
|
|
72
|
-
value: {
|
|
73
|
-
get: (row) => row.value,
|
|
74
|
-
},
|
|
75
|
-
defaultValue: {
|
|
76
|
-
get: (row) => row.requiredConfigVariable.defaultValue,
|
|
77
|
-
},
|
|
78
|
-
}, Object.assign({}, flags));
|
|
26
|
+
variables: {
|
|
27
|
+
id: instance,
|
|
28
|
+
},
|
|
79
29
|
});
|
|
30
|
+
core_1.CliUx.ux.table(result.instance.configVariables.nodes, {
|
|
31
|
+
id: {
|
|
32
|
+
minWidth: 8,
|
|
33
|
+
extended: true,
|
|
34
|
+
},
|
|
35
|
+
requiredVariableId: {
|
|
36
|
+
get: (row) => row.requiredConfigVariable.id,
|
|
37
|
+
extended: true,
|
|
38
|
+
},
|
|
39
|
+
key: {
|
|
40
|
+
get: (row) => row.requiredConfigVariable.key,
|
|
41
|
+
},
|
|
42
|
+
value: {
|
|
43
|
+
get: (row) => row.value,
|
|
44
|
+
},
|
|
45
|
+
defaultValue: {
|
|
46
|
+
get: (row) => row.requiredConfigVariable.defaultValue,
|
|
47
|
+
},
|
|
48
|
+
}, { ...flags });
|
|
80
49
|
}
|
|
81
50
|
}
|
|
82
51
|
exports.default = ListCommand;
|
|
@@ -88,5 +57,6 @@ ListCommand.args = [
|
|
|
88
57
|
required: true,
|
|
89
58
|
},
|
|
90
59
|
];
|
|
91
|
-
ListCommand.flags =
|
|
92
|
-
|
|
60
|
+
ListCommand.flags = {
|
|
61
|
+
...core_1.CliUx.ux.table.flags(),
|
|
62
|
+
};
|