@autifyhq/autify-cli 0.40.0 → 0.42.0

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.
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const getWebClient_1 = require("../../../autify/web/getWebClient");
5
+ class WebApiUpdateTestPlanVariable extends core_1.Command {
6
+ async run() {
7
+ const { flags } = await this.parse(WebApiUpdateTestPlanVariable);
8
+ const { configDir, userAgent } = this.config;
9
+ const client = (0, getWebClient_1.getWebClient)(configDir, userAgent);
10
+ const res = await client.updateTestPlanVariable(flags["test-plan-id"], flags["test-plan-variable-id"], JSON.parse(flags["update-test-plan-variable-request"]));
11
+ console.log(JSON.stringify(res.data, null, 2));
12
+ }
13
+ }
14
+ WebApiUpdateTestPlanVariable.description = "Update a url replacement for the test plan";
15
+ WebApiUpdateTestPlanVariable.examples = ["<%= config.bin %> <%= command.id %>"];
16
+ WebApiUpdateTestPlanVariable.flags = {
17
+ "test-plan-id": core_1.Flags.integer({
18
+ description: "For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15",
19
+ required: true,
20
+ }),
21
+ "test-plan-variable-id": core_1.Flags.integer({
22
+ description: "test_plan_variable id",
23
+ required: true,
24
+ }),
25
+ "update-test-plan-variable-request": core_1.Flags.string({
26
+ description: "The variable&#39;s new key and/or default_value&#39;s value to register",
27
+ required: true,
28
+ }),
29
+ };
30
+ exports.default = WebApiUpdateTestPlanVariable;