@prismatic-io/prism 4.7.0 → 4.7.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.
|
@@ -27,6 +27,11 @@ class ListCommand extends core_1.Command {
|
|
|
27
27
|
versionNumber
|
|
28
28
|
category
|
|
29
29
|
versionCreatedAt
|
|
30
|
+
customer {
|
|
31
|
+
id
|
|
32
|
+
externalId
|
|
33
|
+
name
|
|
34
|
+
}
|
|
30
35
|
}
|
|
31
36
|
pageInfo {
|
|
32
37
|
hasNextPage
|
|
@@ -63,6 +68,18 @@ class ListCommand extends core_1.Command {
|
|
|
63
68
|
get: ({ versionCreatedAt }) => (0, dayjs_1.default)(versionCreatedAt).format(),
|
|
64
69
|
},
|
|
65
70
|
category: { get: ({ category }) => category || "" },
|
|
71
|
+
customerId: {
|
|
72
|
+
extended: true,
|
|
73
|
+
get: ({ customer }) => { var _a; return (_a = customer === null || customer === void 0 ? void 0 : customer.id) !== null && _a !== void 0 ? _a : ""; },
|
|
74
|
+
},
|
|
75
|
+
customerName: {
|
|
76
|
+
extended: true,
|
|
77
|
+
get: ({ customer }) => { var _a; return (_a = customer === null || customer === void 0 ? void 0 : customer.name) !== null && _a !== void 0 ? _a : ""; },
|
|
78
|
+
},
|
|
79
|
+
customerExternalId: {
|
|
80
|
+
extended: true,
|
|
81
|
+
get: ({ customer }) => { var _a; return (_a = customer === null || customer === void 0 ? void 0 : customer.externalId) !== null && _a !== void 0 ? _a : ""; },
|
|
82
|
+
},
|
|
66
83
|
}, { ...flags });
|
|
67
84
|
}
|
|
68
85
|
}
|
|
@@ -4,14 +4,14 @@ const core_1 = require("@oclif/core");
|
|
|
4
4
|
const graphql_1 = require("../../graphql");
|
|
5
5
|
class UpdateCommand extends core_1.Command {
|
|
6
6
|
async run() {
|
|
7
|
-
const { args: { instance }, flags: { name, description, version }, } = await this.parse(UpdateCommand);
|
|
7
|
+
const { args: { instance }, flags: { name, description, version, deploy }, } = await this.parse(UpdateCommand);
|
|
8
8
|
const result = await (0, graphql_1.gqlRequest)({
|
|
9
9
|
document: (0, graphql_1.gql) `
|
|
10
10
|
mutation updateInstance(
|
|
11
11
|
$id: ID!
|
|
12
12
|
$name: String
|
|
13
13
|
$description: String
|
|
14
|
-
$version: ID
|
|
14
|
+
$version: ID
|
|
15
15
|
) {
|
|
16
16
|
updateInstance(
|
|
17
17
|
input: {
|
|
@@ -38,7 +38,29 @@ class UpdateCommand extends core_1.Command {
|
|
|
38
38
|
version,
|
|
39
39
|
},
|
|
40
40
|
});
|
|
41
|
-
|
|
41
|
+
if (!deploy) {
|
|
42
|
+
this.log(result.updateInstance.instance.id);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const deployResult = await (0, graphql_1.gqlRequest)({
|
|
46
|
+
document: (0, graphql_1.gql) `
|
|
47
|
+
mutation deployInstance($id: ID!) {
|
|
48
|
+
deployInstance(input: { id: $id }) {
|
|
49
|
+
instance {
|
|
50
|
+
id
|
|
51
|
+
}
|
|
52
|
+
errors {
|
|
53
|
+
field
|
|
54
|
+
messages
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
`,
|
|
59
|
+
variables: {
|
|
60
|
+
id: instance,
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
this.log(deployResult.deployInstance.instance.id);
|
|
42
64
|
}
|
|
43
65
|
}
|
|
44
66
|
exports.default = UpdateCommand;
|
|
@@ -62,6 +84,8 @@ UpdateCommand.flags = {
|
|
|
62
84
|
version: core_1.Flags.string({
|
|
63
85
|
char: "v",
|
|
64
86
|
description: "ID of integration version",
|
|
65
|
-
|
|
87
|
+
}),
|
|
88
|
+
deploy: core_1.Flags.boolean({
|
|
89
|
+
description: "Deploy the instance after updating",
|
|
66
90
|
}),
|
|
67
91
|
};
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.7.
|
|
2
|
+
"version": "4.7.1",
|
|
3
3
|
"commands": {
|
|
4
4
|
"login": {
|
|
5
5
|
"id": "login",
|
|
@@ -747,8 +747,13 @@
|
|
|
747
747
|
"type": "option",
|
|
748
748
|
"char": "v",
|
|
749
749
|
"description": "ID of integration version",
|
|
750
|
-
"required": false,
|
|
751
750
|
"multiple": false
|
|
751
|
+
},
|
|
752
|
+
"deploy": {
|
|
753
|
+
"name": "deploy",
|
|
754
|
+
"type": "boolean",
|
|
755
|
+
"description": "Deploy the instance after updating",
|
|
756
|
+
"allowNo": false
|
|
752
757
|
}
|
|
753
758
|
},
|
|
754
759
|
"args": {
|