@prismatic-io/prism 3.2.3 → 4.1.1
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 +75 -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 +203 -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 +16 -59
- 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 +36 -41
- package/lib/generate/client.js +11 -16
- package/lib/generate/connection.js +4 -13
- package/lib/generate/index.js +29 -19
- package/lib/generate/input.js +28 -43
- package/lib/generate/parse.js +38 -44
- package/lib/generate/sourceFile.js +11 -7
- package/lib/generate/util.js +9 -7
- 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 +23 -0
- package/oclif.manifest.json +1 -1
- package/package.json +48 -54
- package/templates/component/openapi/client.ts +11 -9
- package/templates/component/openapi/request.ts +6 -4
- 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.map +0 -1
- 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/jest.config.js +0 -4
- 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 PublishCommand 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 PublishCommand extends core_1.Command {
|
|
6
|
+
async run() {
|
|
7
|
+
const { args: { integration }, flags: { comment }, } = await this.parse(PublishCommand);
|
|
8
|
+
const result = await (0, graphql_1.gqlRequest)({
|
|
9
|
+
document: (0, graphql_1.gql) `
|
|
39
10
|
mutation publishIntegration($id: ID!, $comment: String) {
|
|
40
11
|
publishIntegration(input: { id: $id, comment: $comment }) {
|
|
41
12
|
integration {
|
|
@@ -48,13 +19,12 @@ class PublishCommand extends command_1.Command {
|
|
|
48
19
|
}
|
|
49
20
|
}
|
|
50
21
|
`,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
});
|
|
56
|
-
this.log(result.data.publishIntegration.integration.id);
|
|
22
|
+
variables: {
|
|
23
|
+
id: integration,
|
|
24
|
+
comment,
|
|
25
|
+
},
|
|
57
26
|
});
|
|
27
|
+
this.log(result.publishIntegration.integration.id);
|
|
58
28
|
}
|
|
59
29
|
}
|
|
60
30
|
exports.default = PublishCommand;
|
|
@@ -67,10 +37,9 @@ PublishCommand.args = [
|
|
|
67
37
|
},
|
|
68
38
|
];
|
|
69
39
|
PublishCommand.flags = {
|
|
70
|
-
comment:
|
|
40
|
+
comment: core_1.Flags.string({
|
|
71
41
|
char: "c",
|
|
72
42
|
required: false,
|
|
73
43
|
description: "comment about changes in this publication",
|
|
74
44
|
}),
|
|
75
45
|
};
|
|
76
|
-
//# sourceMappingURL=publish.js.map
|
|
@@ -1,42 +1,13 @@
|
|
|
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 =
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const graphql_1 = require("../../graphql");
|
|
33
5
|
const fields_1 = require("../../fields");
|
|
34
|
-
class UpdateCommand extends
|
|
35
|
-
run() {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
mutation: graphql_1.gql `
|
|
6
|
+
class UpdateCommand extends core_1.Command {
|
|
7
|
+
async run() {
|
|
8
|
+
const { args: { integration }, flags: { name, description, "test-config-vars": testConfigVars }, } = await this.parse(UpdateCommand);
|
|
9
|
+
const result = await (0, graphql_1.gqlRequest)({
|
|
10
|
+
document: (0, graphql_1.gql) `
|
|
40
11
|
mutation updateIntegration(
|
|
41
12
|
$id: ID!
|
|
42
13
|
$name: String
|
|
@@ -61,15 +32,14 @@ class UpdateCommand extends command_1.Command {
|
|
|
61
32
|
}
|
|
62
33
|
}
|
|
63
34
|
`,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
});
|
|
71
|
-
this.log(result.data.updateIntegration.integration.id);
|
|
35
|
+
variables: {
|
|
36
|
+
id: integration,
|
|
37
|
+
name,
|
|
38
|
+
description,
|
|
39
|
+
testConfigVars: (0, fields_1.parseJsonOrUndefined)(testConfigVars),
|
|
40
|
+
},
|
|
72
41
|
});
|
|
42
|
+
this.log(result.updateIntegration.integration.id);
|
|
73
43
|
}
|
|
74
44
|
}
|
|
75
45
|
exports.default = UpdateCommand;
|
|
@@ -82,19 +52,18 @@ UpdateCommand.args = [
|
|
|
82
52
|
},
|
|
83
53
|
];
|
|
84
54
|
UpdateCommand.flags = {
|
|
85
|
-
name:
|
|
55
|
+
name: core_1.Flags.string({
|
|
86
56
|
char: "n",
|
|
87
57
|
description: "new name to give the integration",
|
|
88
58
|
}),
|
|
89
|
-
description:
|
|
59
|
+
description: core_1.Flags.string({
|
|
90
60
|
char: "d",
|
|
91
61
|
description: "new description to give the integration",
|
|
92
62
|
}),
|
|
93
|
-
"test-config-vars":
|
|
63
|
+
"test-config-vars": core_1.Flags.string({
|
|
94
64
|
description: "JSON-formatted config variables to be used for testing",
|
|
95
65
|
}),
|
|
96
|
-
"default-config-vars":
|
|
66
|
+
"default-config-vars": core_1.Flags.string({
|
|
97
67
|
description: "JSON-formatted default values for config variables that are replaced with instance or test config variables",
|
|
98
68
|
}),
|
|
99
69
|
};
|
|
100
|
-
//# sourceMappingURL=update.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 { flags, args: { integration }, } = await this.parse(ListCommand);
|
|
8
|
+
const result = await (0, graphql_1.gqlRequest)({
|
|
9
|
+
document: (0, graphql_1.gql) `
|
|
40
10
|
query listIntegrationVersions($integrationId: ID!) {
|
|
41
11
|
integration(id: $integrationId) {
|
|
42
12
|
versionSequence(
|
|
@@ -54,31 +24,30 @@ class ListCommand extends command_1.Command {
|
|
|
54
24
|
}
|
|
55
25
|
}
|
|
56
26
|
`,
|
|
57
|
-
|
|
58
|
-
});
|
|
59
|
-
cli_ux_1.cli.table(result.data.integration.versionSequence.nodes, {
|
|
60
|
-
versionNumber: {
|
|
61
|
-
header: "Version",
|
|
62
|
-
},
|
|
63
|
-
versionCreatedAt: {
|
|
64
|
-
header: "Created At",
|
|
65
|
-
get: (row) => new Date(row.versionCreatedAt).toISOString(),
|
|
66
|
-
},
|
|
67
|
-
versionCreatedBy: {
|
|
68
|
-
header: "Created By",
|
|
69
|
-
get: (row) => { var _a, _b; return (_b = (_a = row.versionCreatedBy) === null || _a === void 0 ? void 0 : _a.email) !== null && _b !== void 0 ? _b : ""; },
|
|
70
|
-
},
|
|
71
|
-
versionComment: {
|
|
72
|
-
header: "Comment",
|
|
73
|
-
get: (row) => { var _a; return (_a = row.versionComment) !== null && _a !== void 0 ? _a : ""; },
|
|
74
|
-
},
|
|
75
|
-
}, Object.assign({}, flags));
|
|
27
|
+
variables: { integrationId: integration },
|
|
76
28
|
});
|
|
29
|
+
core_1.CliUx.ux.table(result.integration.versionSequence.nodes, {
|
|
30
|
+
versionNumber: {
|
|
31
|
+
header: "Version",
|
|
32
|
+
},
|
|
33
|
+
versionCreatedAt: {
|
|
34
|
+
header: "Created At",
|
|
35
|
+
get: (row) => new Date(row.versionCreatedAt).toISOString(),
|
|
36
|
+
},
|
|
37
|
+
versionCreatedBy: {
|
|
38
|
+
header: "Created By",
|
|
39
|
+
get: (row) => { var _a, _b; return (_b = (_a = row.versionCreatedBy) === null || _a === void 0 ? void 0 : _a.email) !== null && _b !== void 0 ? _b : ""; },
|
|
40
|
+
},
|
|
41
|
+
versionComment: {
|
|
42
|
+
header: "Comment",
|
|
43
|
+
get: (row) => { var _a; return (_a = row.versionComment) !== null && _a !== void 0 ? _a : ""; },
|
|
44
|
+
},
|
|
45
|
+
}, { ...flags });
|
|
77
46
|
}
|
|
78
47
|
}
|
|
79
48
|
exports.default = ListCommand;
|
|
80
49
|
ListCommand.description = "List Integration versions";
|
|
81
|
-
ListCommand.flags =
|
|
50
|
+
ListCommand.flags = { ...core_1.CliUx.ux.table.flags() };
|
|
82
51
|
ListCommand.args = [
|
|
83
52
|
{
|
|
84
53
|
name: "integration",
|
|
@@ -86,4 +55,3 @@ ListCommand.args = [
|
|
|
86
55
|
description: "ID of an integration",
|
|
87
56
|
},
|
|
88
57
|
];
|
|
89
|
-
//# sourceMappingURL=index.js.map
|
package/lib/commands/login.js
CHANGED
|
@@ -1,49 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
16
4
|
const auth_1 = require("../auth");
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
this.log("Login complete!");
|
|
31
|
-
this.exit();
|
|
32
|
-
});
|
|
5
|
+
class LoginCommand extends core_1.Command {
|
|
6
|
+
async run() {
|
|
7
|
+
const { flags: { force, url }, } = await this.parse(LoginCommand);
|
|
8
|
+
if (!force && (await (0, auth_1.isLoggedIn)())) {
|
|
9
|
+
this.log("You are already logged in and ready to go!");
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
if (!url) {
|
|
13
|
+
await core_1.CliUx.ux.anykey("Press any key to open prismatic.io in your default browser");
|
|
14
|
+
}
|
|
15
|
+
await (0, auth_1.login)({ url });
|
|
16
|
+
this.log("Login complete!");
|
|
17
|
+
this.exit();
|
|
33
18
|
}
|
|
34
19
|
}
|
|
35
20
|
exports.default = LoginCommand;
|
|
36
21
|
LoginCommand.description = "Log in to your Prismatic account";
|
|
37
22
|
LoginCommand.flags = {
|
|
38
|
-
force:
|
|
23
|
+
force: core_1.Flags.boolean({
|
|
39
24
|
char: "f",
|
|
40
25
|
default: false,
|
|
41
26
|
description: "re-authenticate, even if you are already logged in",
|
|
42
27
|
}),
|
|
43
|
-
url:
|
|
28
|
+
url: core_1.Flags.boolean({
|
|
44
29
|
char: "u",
|
|
45
30
|
default: false,
|
|
46
31
|
description: "returns a challenge url without automatically opening a browser",
|
|
47
32
|
}),
|
|
48
33
|
};
|
|
49
|
-
//# sourceMappingURL=login.js.map
|
package/lib/commands/logout.js
CHANGED
|
@@ -1,35 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
13
4
|
const config_1 = require("../config");
|
|
14
5
|
const auth_1 = require("../auth");
|
|
15
|
-
class LogoutCommand extends
|
|
16
|
-
run() {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
this.log("Logout complete!");
|
|
24
|
-
});
|
|
6
|
+
class LogoutCommand extends core_1.Command {
|
|
7
|
+
async run() {
|
|
8
|
+
const { flags: { browser }, } = await this.parse(LogoutCommand);
|
|
9
|
+
if (browser) {
|
|
10
|
+
await (0, auth_1.logout)();
|
|
11
|
+
}
|
|
12
|
+
await (0, config_1.deleteConfig)();
|
|
13
|
+
this.log("Logout complete!");
|
|
25
14
|
}
|
|
26
15
|
}
|
|
27
16
|
exports.default = LogoutCommand;
|
|
28
17
|
LogoutCommand.description = "Log out of your Prismatic account";
|
|
29
18
|
LogoutCommand.flags = {
|
|
30
|
-
browser:
|
|
19
|
+
browser: core_1.Flags.boolean({
|
|
31
20
|
char: "b",
|
|
32
21
|
description: "additionally log out of your default browser's session",
|
|
33
22
|
}),
|
|
34
23
|
};
|
|
35
|
-
//# sourceMappingURL=logout.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 { flags } = await this.parse(ListCommand);
|
|
8
|
+
const result = await (0, graphql_1.gqlRequest)({
|
|
9
|
+
document: (0, graphql_1.gql) `
|
|
40
10
|
query listLogSeverityLevels {
|
|
41
11
|
logSeverityLevels {
|
|
42
12
|
id
|
|
@@ -44,18 +14,16 @@ class ListCommand extends command_1.Command {
|
|
|
44
14
|
}
|
|
45
15
|
}
|
|
46
16
|
`,
|
|
47
|
-
});
|
|
48
|
-
cli_ux_1.cli.table(result.data.logSeverityLevels, {
|
|
49
|
-
id: {
|
|
50
|
-
minWidth: 8,
|
|
51
|
-
extended: true,
|
|
52
|
-
},
|
|
53
|
-
name: {},
|
|
54
|
-
}, Object.assign({}, flags));
|
|
55
17
|
});
|
|
18
|
+
core_1.CliUx.ux.table(result.logSeverityLevels, {
|
|
19
|
+
id: {
|
|
20
|
+
minWidth: 8,
|
|
21
|
+
extended: true,
|
|
22
|
+
},
|
|
23
|
+
name: {},
|
|
24
|
+
}, { ...flags });
|
|
56
25
|
}
|
|
57
26
|
}
|
|
58
27
|
exports.default = ListCommand;
|
|
59
28
|
ListCommand.description = "List Log Severities for use by Alert Triggers";
|
|
60
|
-
ListCommand.flags =
|
|
61
|
-
//# sourceMappingURL=list.js.map
|
|
29
|
+
ListCommand.flags = { ...core_1.CliUx.ux.table.flags() };
|
package/lib/commands/me/index.js
CHANGED
|
@@ -1,67 +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
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
org {
|
|
43
|
-
name
|
|
44
|
-
}
|
|
45
|
-
customer {
|
|
46
|
-
name
|
|
47
|
-
}
|
|
48
|
-
}
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const auth_1 = require("../../auth");
|
|
5
|
+
const query_1 = require("../../utils/user/query");
|
|
6
|
+
class WhoAmICommand extends core_1.Command {
|
|
7
|
+
async run() {
|
|
8
|
+
const me = await (0, query_1.whoAmI)();
|
|
9
|
+
const { name, email, org, customer } = me;
|
|
10
|
+
this.log("Name:", name);
|
|
11
|
+
this.log("Email:", email);
|
|
12
|
+
if (org) {
|
|
13
|
+
this.log("Organization:", org.name);
|
|
49
14
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
this.log("Name:", name);
|
|
55
|
-
this.log("Email:", email);
|
|
56
|
-
if (org) {
|
|
57
|
-
this.log("Organization:", org.name);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
this.log("Customer:", customer.name);
|
|
61
|
-
}
|
|
62
|
-
});
|
|
15
|
+
else if (customer) {
|
|
16
|
+
this.log("Customer:", customer.name);
|
|
17
|
+
}
|
|
18
|
+
this.log("Endpoint URL:", auth_1.prismaticUrl);
|
|
63
19
|
}
|
|
64
20
|
}
|
|
65
21
|
exports.default = WhoAmICommand;
|
|
66
22
|
WhoAmICommand.description = "Print your user profile information";
|
|
67
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const auth_1 = require("../../../auth");
|
|
5
|
+
class PrintTokenCommand extends core_1.Command {
|
|
6
|
+
async run() {
|
|
7
|
+
await (0, auth_1.revokeRefreshToken)();
|
|
8
|
+
this.log("All refresh tokens for your user have been revoked.");
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.default = PrintTokenCommand;
|
|
12
|
+
PrintTokenCommand.description = "Revoke all refresh tokens for your user";
|
package/lib/commands/me/token.js
CHANGED
|
@@ -1,37 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
13
4
|
const auth_1 = require("../../auth");
|
|
14
5
|
const config_1 = require("../../config");
|
|
15
|
-
class PrintTokenCommand extends
|
|
16
|
-
run() {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
this.log(token);
|
|
24
|
-
});
|
|
6
|
+
class PrintTokenCommand extends core_1.Command {
|
|
7
|
+
async run() {
|
|
8
|
+
const { flags: { type: tokenType }, } = await this.parse(PrintTokenCommand);
|
|
9
|
+
//refresh before logging token
|
|
10
|
+
await (0, auth_1.getAccessToken)();
|
|
11
|
+
const config = await (0, config_1.readConfig)();
|
|
12
|
+
const token = tokenType === "access" ? config === null || config === void 0 ? void 0 : config.accessToken : config === null || config === void 0 ? void 0 : config.refreshToken;
|
|
13
|
+
this.log(token);
|
|
25
14
|
}
|
|
26
15
|
}
|
|
27
16
|
exports.default = PrintTokenCommand;
|
|
28
17
|
PrintTokenCommand.description = "Print your authorization tokens";
|
|
29
18
|
PrintTokenCommand.flags = {
|
|
30
|
-
type:
|
|
19
|
+
type: core_1.Flags.string({
|
|
31
20
|
char: "t",
|
|
32
21
|
description: "Which token type to print",
|
|
33
22
|
options: ["access", "refresh"],
|
|
34
23
|
default: "access",
|
|
35
24
|
}),
|
|
36
25
|
};
|
|
37
|
-
//# sourceMappingURL=token.js.map
|