Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MODIFY intance/create and intance/update files to add version flag as… #21

Merged
merged 6 commits into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prismatic-io/prism",
"version": "4.6.2",
"version": "4.6.3",
"description": "Build, deploy, and support integrations in Prismatic from the comfort of your command line",
"keywords": [
"prismatic",
Expand Down Expand Up @@ -163,4 +163,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/commands/instances/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class CreateCommand extends Command {
integration: Flags.string({
char: "i",
required: true,
description: "ID of the integration this is an instance of",
description: "ID of the integration or a specific integration version ID this is an instance of",
}),
customer: Flags.string({
char: "c",
Expand Down
16 changes: 11 additions & 5 deletions src/commands/instances/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,24 @@ export default class UpdateCommand extends Command {
char: "d",
description: "Description for the instance",
}),
version: Flags.string({
char: "v",
description: "ID of integration version",
required: false,
}),
};

async run() {
const {
args: { instance },
flags: { name, description },
flags: { name, description, version },
} = await this.parse(UpdateCommand);

const result = await gqlRequest({
document: gql`
mutation updateInstance($id: ID!, $name: String, $description: String) {
mutation updateInstance($id: ID!, $name: String, $description: String, $version: ID! ) {
updateInstance(
input: { id: $id, name: $name, description: $description }
input: { id: $id, name: $name, description: $description, integration: $version}
) {
instance {
id
Expand All @@ -47,8 +52,9 @@ export default class UpdateCommand extends Command {
`,
variables: {
id: instance,
name: name,
description: description,
name,
description,
version,
},
});

Expand Down