@prismatic-io/prism 5.2.0 → 5.2.2
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.
|
@@ -5,7 +5,7 @@ const graphql_1 = require("../../graphql");
|
|
|
5
5
|
const fields_1 = require("../../fields");
|
|
6
6
|
class CreateCommand extends core_1.Command {
|
|
7
7
|
async run() {
|
|
8
|
-
const { flags: { name, description, integration, customer, "config-vars": configVars, }, } = await this.parse(CreateCommand);
|
|
8
|
+
const { flags: { name, description, integration, customer, "config-vars": configVars, label, }, } = await this.parse(CreateCommand);
|
|
9
9
|
const result = await (0, graphql_1.gqlRequest)({
|
|
10
10
|
document: (0, graphql_1.gql) `
|
|
11
11
|
mutation createInstance(
|
|
@@ -14,6 +14,7 @@ class CreateCommand extends core_1.Command {
|
|
|
14
14
|
$integration: ID!
|
|
15
15
|
$customer: ID!
|
|
16
16
|
$configVariables: [InputInstanceConfigVariable]
|
|
17
|
+
$labels: [String]
|
|
17
18
|
) {
|
|
18
19
|
createInstance(
|
|
19
20
|
input: {
|
|
@@ -22,6 +23,7 @@ class CreateCommand extends core_1.Command {
|
|
|
22
23
|
integration: $integration
|
|
23
24
|
customer: $customer
|
|
24
25
|
configVariables: $configVariables
|
|
26
|
+
labels: $labels
|
|
25
27
|
}
|
|
26
28
|
) {
|
|
27
29
|
instance {
|
|
@@ -40,6 +42,7 @@ class CreateCommand extends core_1.Command {
|
|
|
40
42
|
integration,
|
|
41
43
|
customer,
|
|
42
44
|
configVariables: (0, fields_1.parseJsonOrUndefined)(configVars),
|
|
45
|
+
labels: label,
|
|
43
46
|
},
|
|
44
47
|
});
|
|
45
48
|
this.log(result.createInstance.instance.id);
|
|
@@ -73,4 +76,9 @@ CreateCommand.flags = {
|
|
|
73
76
|
char: "v",
|
|
74
77
|
description: "config variables to bind to steps of your instance",
|
|
75
78
|
}),
|
|
79
|
+
label: core_1.Flags.string({
|
|
80
|
+
char: "l",
|
|
81
|
+
description: "a label or set of labels to apply to the instance",
|
|
82
|
+
multiple: true,
|
|
83
|
+
}),
|
|
76
84
|
};
|
|
@@ -4,7 +4,7 @@ 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, deploy }, } = await this.parse(UpdateCommand);
|
|
7
|
+
const { args: { instance }, flags: { name, description, version, deploy, label }, } = await this.parse(UpdateCommand);
|
|
8
8
|
const result = await (0, graphql_1.gqlRequest)({
|
|
9
9
|
document: (0, graphql_1.gql) `
|
|
10
10
|
mutation updateInstance(
|
|
@@ -12,6 +12,7 @@ class UpdateCommand extends core_1.Command {
|
|
|
12
12
|
$name: String
|
|
13
13
|
$description: String
|
|
14
14
|
$version: ID
|
|
15
|
+
$labels: [String]
|
|
15
16
|
) {
|
|
16
17
|
updateInstance(
|
|
17
18
|
input: {
|
|
@@ -19,6 +20,7 @@ class UpdateCommand extends core_1.Command {
|
|
|
19
20
|
name: $name
|
|
20
21
|
description: $description
|
|
21
22
|
integration: $version
|
|
23
|
+
labels: $labels
|
|
22
24
|
}
|
|
23
25
|
) {
|
|
24
26
|
instance {
|
|
@@ -36,6 +38,7 @@ class UpdateCommand extends core_1.Command {
|
|
|
36
38
|
name,
|
|
37
39
|
description,
|
|
38
40
|
version,
|
|
41
|
+
labels: label,
|
|
39
42
|
},
|
|
40
43
|
});
|
|
41
44
|
if (!deploy) {
|
|
@@ -88,4 +91,9 @@ UpdateCommand.flags = {
|
|
|
88
91
|
deploy: core_1.Flags.boolean({
|
|
89
92
|
description: "Deploy the instance after updating",
|
|
90
93
|
}),
|
|
94
|
+
label: core_1.Flags.string({
|
|
95
|
+
char: "l",
|
|
96
|
+
description: "a label or set of labels to apply to the instance",
|
|
97
|
+
multiple: true,
|
|
98
|
+
}),
|
|
91
99
|
};
|
|
@@ -70,7 +70,11 @@ const createComponentPackage = async () => {
|
|
|
70
70
|
const zip = (0, archiver_1.default)("zip", { zlib: { level: 9 } });
|
|
71
71
|
const pathPromise = tempy_1.default.write(zip, { extension: "zip" });
|
|
72
72
|
// Zip all files in the current directory (since we found the index.js entrypoint)
|
|
73
|
-
zip
|
|
73
|
+
// Set all files' dates to the Unix epoch so that the zip hash is deterministic
|
|
74
|
+
zip.directory(process.cwd(), false, (entry) => ({
|
|
75
|
+
...entry,
|
|
76
|
+
date: new Date(0),
|
|
77
|
+
}));
|
|
74
78
|
await zip.finalize();
|
|
75
79
|
return pathPromise;
|
|
76
80
|
};
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "5.2.
|
|
2
|
+
"version": "5.2.2",
|
|
3
3
|
"commands": {
|
|
4
4
|
"login": {
|
|
5
5
|
"id": "login",
|
|
@@ -453,6 +453,13 @@
|
|
|
453
453
|
"description": "config variables to bind to steps of your instance",
|
|
454
454
|
"required": false,
|
|
455
455
|
"multiple": false
|
|
456
|
+
},
|
|
457
|
+
"label": {
|
|
458
|
+
"name": "label",
|
|
459
|
+
"type": "option",
|
|
460
|
+
"char": "l",
|
|
461
|
+
"description": "a label or set of labels to apply to the instance",
|
|
462
|
+
"multiple": true
|
|
456
463
|
}
|
|
457
464
|
},
|
|
458
465
|
"args": {}
|
|
@@ -669,6 +676,13 @@
|
|
|
669
676
|
"type": "boolean",
|
|
670
677
|
"description": "Deploy the instance after updating",
|
|
671
678
|
"allowNo": false
|
|
679
|
+
},
|
|
680
|
+
"label": {
|
|
681
|
+
"name": "label",
|
|
682
|
+
"type": "option",
|
|
683
|
+
"char": "l",
|
|
684
|
+
"description": "a label or set of labels to apply to the instance",
|
|
685
|
+
"multiple": true
|
|
672
686
|
}
|
|
673
687
|
},
|
|
674
688
|
"args": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prismatic-io/prism",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.2",
|
|
4
4
|
"description": "Build, deploy, and support integrations in Prismatic from the comfort of your command line",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"prismatic",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@oclif/plugin-warn-if-update-available": "2.0.48",
|
|
48
48
|
"@prismatic-io/generator-spectral": "3.0.1",
|
|
49
49
|
"@prismatic-io/spectral": "8.0.1",
|
|
50
|
-
"archiver": "
|
|
50
|
+
"archiver": "6.0.1",
|
|
51
51
|
"axios": "1.6.2",
|
|
52
52
|
"camelcase": "6.2.0",
|
|
53
53
|
"chardet": "1.5.1",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@oclif/test": "2.4.6",
|
|
78
|
-
"@types/archiver": "
|
|
78
|
+
"@types/archiver": "6.0.2",
|
|
79
79
|
"@types/fs-extra": "9.0.1",
|
|
80
80
|
"@types/glob": "7.1.4",
|
|
81
81
|
"@types/inquirer": "8.2.1",
|