@prismatic-io/prism 5.2.1 → 5.2.3

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
  };
@@ -4,10 +4,13 @@ const core_1 = require("@oclif/core");
4
4
  const graphql_1 = require("../../graphql");
5
5
  class CreateCommand extends core_1.Command {
6
6
  async run() {
7
+ const { flags: { customerId, resourceId }, } = await this.parse(CreateCommand);
7
8
  const result = await (0, graphql_1.gqlRequest)({
8
9
  document: (0, graphql_1.gql) `
9
- mutation createOnPremiseResourceJWT {
10
- createOnPremiseResourceJWT(input: {}) {
10
+ mutation createOnPremiseResourceJWT($customerId: ID, $resourceId: ID) {
11
+ createOnPremiseResourceJWT(
12
+ input: { customerId: $customerId, resourceId: $resourceId }
13
+ ) {
11
14
  result {
12
15
  jwt
13
16
  }
@@ -18,11 +21,25 @@ class CreateCommand extends core_1.Command {
18
21
  }
19
22
  }
20
23
  `,
21
- variables: {},
24
+ variables: {
25
+ customerId,
26
+ resourceId,
27
+ },
22
28
  });
23
29
  this.log(result.createOnPremiseResourceJWT.result.jwt);
24
30
  }
25
31
  }
26
32
  exports.default = CreateCommand;
27
33
  CreateCommand.description = "Create a short-lived JWT that may be used to perform registration of an On-Premise Resource.";
28
- CreateCommand.flags = {};
34
+ CreateCommand.flags = {
35
+ customerId: core_1.Flags.string({
36
+ char: "c",
37
+ required: false,
38
+ description: "The ID of the customer for which to create the JWT. Only valid when authenticated as an Organization user.",
39
+ }),
40
+ resourceId: core_1.Flags.string({
41
+ char: "r",
42
+ required: false,
43
+ description: "An optional ID of an existing On-Premise Resource for which to generate a new JWT.",
44
+ }),
45
+ };
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.2.1",
2
+ "version": "5.2.3",
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": {
@@ -1242,7 +1256,24 @@
1242
1256
  "pluginAlias": "@prismatic-io/prism",
1243
1257
  "pluginType": "core",
1244
1258
  "aliases": [],
1245
- "flags": {},
1259
+ "flags": {
1260
+ "customerId": {
1261
+ "name": "customerId",
1262
+ "type": "option",
1263
+ "char": "c",
1264
+ "description": "The ID of the customer for which to create the JWT. Only valid when authenticated as an Organization user.",
1265
+ "required": false,
1266
+ "multiple": false
1267
+ },
1268
+ "resourceId": {
1269
+ "name": "resourceId",
1270
+ "type": "option",
1271
+ "char": "r",
1272
+ "description": "An optional ID of an existing On-Premise Resource for which to generate a new JWT.",
1273
+ "required": false,
1274
+ "multiple": false
1275
+ }
1276
+ },
1246
1277
  "args": {}
1247
1278
  },
1248
1279
  "organization:update": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismatic-io/prism",
3
- "version": "5.2.1",
3
+ "version": "5.2.3",
4
4
  "description": "Build, deploy, and support integrations in Prismatic from the comfort of your command line",
5
5
  "keywords": [
6
6
  "prismatic",