@copado/agentia-cli 0.36.0-alpha.0 → 0.38.0-alpha.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.
Files changed (84) hide show
  1. package/README.md +591 -101
  2. package/dist/commands/auth/set.js +2 -3
  3. package/dist/commands/auth/set.js.map +1 -1
  4. package/dist/commands/environment/open.d.ts +15 -0
  5. package/dist/commands/environment/open.js +61 -0
  6. package/dist/commands/environment/open.js.map +1 -0
  7. package/dist/commands/job/open.d.ts +12 -0
  8. package/dist/commands/job/open.js +30 -0
  9. package/dist/commands/job/open.js.map +1 -0
  10. package/dist/commands/pipeline/open.d.ts +12 -0
  11. package/dist/commands/pipeline/open.js +30 -0
  12. package/dist/commands/pipeline/open.js.map +1 -0
  13. package/dist/commands/project/open.d.ts +12 -0
  14. package/dist/commands/project/open.js +45 -0
  15. package/dist/commands/project/open.js.map +1 -0
  16. package/dist/commands/promotion/open.d.ts +12 -0
  17. package/dist/commands/promotion/open.js +30 -0
  18. package/dist/commands/promotion/open.js.map +1 -0
  19. package/dist/commands/testing/build/abort.d.ts +26 -0
  20. package/dist/commands/testing/build/abort.js +38 -0
  21. package/dist/commands/testing/build/abort.js.map +1 -0
  22. package/dist/commands/testing/build/list.js +2 -2
  23. package/dist/commands/testing/build/list.js.map +1 -1
  24. package/dist/commands/testing/build/run.d.ts +8 -0
  25. package/dist/commands/testing/build/run.js +4 -2
  26. package/dist/commands/testing/build/run.js.map +1 -1
  27. package/dist/commands/testing/job/delete.d.ts +24 -0
  28. package/dist/commands/testing/job/delete.js +30 -0
  29. package/dist/commands/testing/job/delete.js.map +1 -0
  30. package/dist/commands/testing/job/list.js +2 -2
  31. package/dist/commands/testing/job/list.js.map +1 -1
  32. package/dist/commands/testing/job/run.d.ts +1 -0
  33. package/dist/commands/testing/job/run.js +2 -0
  34. package/dist/commands/testing/job/run.js.map +1 -0
  35. package/dist/commands/testing/job/update.d.ts +35 -0
  36. package/dist/commands/testing/job/update.js +125 -0
  37. package/dist/commands/testing/job/update.js.map +1 -0
  38. package/dist/commands/testing/project/delete.d.ts +22 -0
  39. package/dist/commands/testing/project/delete.js +29 -0
  40. package/dist/commands/testing/project/delete.js.map +1 -0
  41. package/dist/commands/testing/robot/delete.d.ts +21 -0
  42. package/dist/commands/testing/robot/delete.js +30 -0
  43. package/dist/commands/testing/robot/delete.js.map +1 -0
  44. package/dist/commands/testing/run.d.ts +8 -0
  45. package/dist/commands/testing/run.js +4 -2
  46. package/dist/commands/testing/run.js.map +1 -1
  47. package/dist/commands/testing/status.js +2 -2
  48. package/dist/commands/testing/status.js.map +1 -1
  49. package/dist/commands/testing/test/run.d.ts +34 -1
  50. package/dist/commands/testing/test/run.js +58 -1
  51. package/dist/commands/testing/test/run.js.map +1 -1
  52. package/dist/commands/testing/variable/create.d.ts +1 -1
  53. package/dist/commands/testing/variable/update.d.ts +21 -0
  54. package/dist/commands/testing/variable/update.js +63 -0
  55. package/dist/commands/testing/variable/update.js.map +1 -0
  56. package/dist/commands/work/open.d.ts +12 -0
  57. package/dist/commands/work/open.js +45 -0
  58. package/dist/commands/work/open.js.map +1 -0
  59. package/dist/lib/mcp/testing-tools.d.ts +84 -2
  60. package/dist/lib/mcp/testing-tools.js +197 -13
  61. package/dist/lib/mcp/testing-tools.js.map +1 -1
  62. package/dist/lib/mcp/tools.d.ts +143 -0
  63. package/dist/lib/mcp/tools.js +21 -2
  64. package/dist/lib/mcp/tools.js.map +1 -1
  65. package/dist/lib/navigation-open.d.ts +7 -0
  66. package/dist/lib/navigation-open.js +20 -0
  67. package/dist/lib/navigation-open.js.map +1 -0
  68. package/dist/lib/navigation.d.ts +14 -0
  69. package/dist/lib/navigation.js +57 -0
  70. package/dist/lib/navigation.js.map +1 -0
  71. package/dist/lib/project-default-id.d.ts +4 -0
  72. package/dist/lib/project-default-id.js +29 -0
  73. package/dist/lib/project-default-id.js.map +1 -0
  74. package/dist/lib/testing-flags.d.ts +26 -1
  75. package/dist/lib/testing-flags.js +61 -0
  76. package/dist/lib/testing-flags.js.map +1 -1
  77. package/dist/lib/testing-operations.d.ts +77 -5
  78. package/dist/lib/testing-operations.js +136 -15
  79. package/dist/lib/testing-operations.js.map +1 -1
  80. package/dist/lib/testing-types.d.ts +52 -1
  81. package/dist/lib/testing-types.js +65 -1
  82. package/dist/lib/testing-types.js.map +1 -1
  83. package/oclif.manifest.json +1538 -402
  84. package/package.json +1 -1
@@ -0,0 +1,35 @@
1
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
2
+ import { type TestingJob } from '../../../lib/testing-types.js';
3
+ export default class TestingJobUpdate extends AgentiaCommand {
4
+ static args: {
5
+ id: import("@oclif/core/interfaces").Arg<number, {
6
+ max?: number;
7
+ min?: number;
8
+ }>;
9
+ };
10
+ static description: string;
11
+ static examples: string[];
12
+ static flags: {
13
+ 'case-duration-change-detection': import("@oclif/core/interfaces").BooleanFlag<boolean>;
14
+ description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
+ 'hide-video-params': import("@oclif/core/interfaces").BooleanFlag<boolean>;
16
+ name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
+ 'no-case-duration-change-detection': import("@oclif/core/interfaces").BooleanFlag<boolean>;
18
+ 'parallel-mode': import("@oclif/core/interfaces").OptionFlag<"disabled" | "enabled" | undefined, import("@oclif/core/interfaces").CustomOptions>;
19
+ robot: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
20
+ 'screen-depth': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
21
+ 'screen-height': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
22
+ 'screen-width': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
23
+ 'show-video-params': import("@oclif/core/interfaces").BooleanFlag<boolean>;
24
+ 'suite-type': import("@oclif/core/interfaces").OptionFlag<"default" | "bitbar" | "browserstack" | "browserstackdesktop" | "lambdatest" | "lambdatestdesktop" | "mobile" | "paceconnectmobile" | "privatemobile" | "rpa" | "selenese" | "zap" | undefined, import("@oclif/core/interfaces").CustomOptions>;
25
+ timeout: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
26
+ project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
27
+ domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
28
+ org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
29
+ pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
30
+ };
31
+ run(): Promise<TestingJob>;
32
+ private analyticsFromFlags;
33
+ private screenFromFlags;
34
+ private videoParamsFromFlags;
35
+ }
@@ -0,0 +1,125 @@
1
+ import { Args, Flags } from '@oclif/core';
2
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
3
+ import { testingConnectionFlags, testingConnectionOptions, testingProjectFlag, } from '../../../lib/testing-flags.js';
4
+ import { updateTestingJob } from '../../../lib/testing-operations.js';
5
+ import { formatTestingRecord, TESTING_JOB_PARALLEL_MODES, TESTING_JOB_SUITE_TYPES, } from '../../../lib/testing-types.js';
6
+ export default class TestingJobUpdate extends AgentiaCommand {
7
+ static args = {
8
+ id: Args.integer({
9
+ description: 'CRT job/test ID.',
10
+ required: true,
11
+ }),
12
+ };
13
+ static description = 'Update Copado Robotic Testing job/test metadata';
14
+ static examples = [
15
+ '<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --name "Smoke"',
16
+ '<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --timeout 10m --parallel-mode enabled --json',
17
+ ];
18
+ static flags = {
19
+ ...testingConnectionFlags,
20
+ ...testingProjectFlag,
21
+ 'case-duration-change-detection': Flags.boolean({
22
+ description: 'Enable case duration change detection analytics.',
23
+ }),
24
+ description: Flags.string({
25
+ description: 'Job/test description.',
26
+ }),
27
+ 'hide-video-params': Flags.boolean({
28
+ description: 'Hide video parameters.',
29
+ }),
30
+ name: Flags.string({
31
+ description: 'Job/test name.',
32
+ }),
33
+ 'no-case-duration-change-detection': Flags.boolean({
34
+ description: 'Disable case duration change detection analytics.',
35
+ }),
36
+ 'parallel-mode': Flags.option({
37
+ description: 'Parallel execution mode.',
38
+ options: [...TESTING_JOB_PARALLEL_MODES],
39
+ })(),
40
+ robot: Flags.integer({
41
+ description: 'CRT robot ID that should execute this job/test.',
42
+ }),
43
+ 'screen-depth': Flags.integer({
44
+ description: 'Screen color depth. Must be provided with --screen-width and --screen-height.',
45
+ }),
46
+ 'screen-height': Flags.integer({
47
+ description: 'Screen height. Must be provided with --screen-width and --screen-depth.',
48
+ }),
49
+ 'screen-width': Flags.integer({
50
+ description: 'Screen width. Must be provided with --screen-height and --screen-depth.',
51
+ }),
52
+ 'show-video-params': Flags.boolean({
53
+ description: 'Show video parameters.',
54
+ }),
55
+ 'suite-type': Flags.option({
56
+ description: 'CRT suite/job type.',
57
+ options: [...TESTING_JOB_SUITE_TYPES],
58
+ })(),
59
+ timeout: Flags.string({
60
+ description: 'Build timeout, for example 10s, 10m, 10h, or 10d.',
61
+ }),
62
+ };
63
+ async run() {
64
+ const { args, flags } = await this.parse(TestingJobUpdate);
65
+ const screen = this.screenFromFlags(flags);
66
+ const showVideoParams = this.videoParamsFromFlags(flags);
67
+ const caseDurationChangeDetection = this.analyticsFromFlags(flags);
68
+ const job = await this.withSpinner('Updating testing job', () => updateTestingJob({
69
+ ...testingConnectionOptions(flags),
70
+ analytics: caseDurationChangeDetection === undefined ? undefined : { caseDurationChangeDetection },
71
+ description: flags.description,
72
+ jobId: args.id,
73
+ name: flags.name,
74
+ parallelExecution: flags['parallel-mode'],
75
+ projectId: flags.project,
76
+ robotId: flags.robot,
77
+ screen,
78
+ showVideoParams,
79
+ suiteType: flags['suite-type'],
80
+ timeout: flags.timeout,
81
+ }));
82
+ this.display(() => {
83
+ this.log('Testing job updated');
84
+ this.log(formatTestingRecord(job));
85
+ });
86
+ return job;
87
+ }
88
+ analyticsFromFlags(flags) {
89
+ if (flags['case-duration-change-detection'] === true && flags['no-case-duration-change-detection'] === true) {
90
+ this.error('Use either --case-duration-change-detection or --no-case-duration-change-detection, not both.', {
91
+ exit: 2,
92
+ });
93
+ }
94
+ if (flags['case-duration-change-detection'] === true)
95
+ return true;
96
+ if (flags['no-case-duration-change-detection'] === true)
97
+ return false;
98
+ return undefined;
99
+ }
100
+ screenFromFlags(flags) {
101
+ const values = [flags['screen-depth'], flags['screen-height'], flags['screen-width']];
102
+ const supplied = values.filter((value) => value !== undefined);
103
+ if (supplied.length === 0)
104
+ return undefined;
105
+ if (supplied.length !== values.length) {
106
+ this.error('Provide --screen-width, --screen-height, and --screen-depth together.', { exit: 2 });
107
+ }
108
+ const [depth, height, width] = values;
109
+ if (depth <= 0 || height <= 0 || width <= 0) {
110
+ this.error('Screen dimensions and depth must be positive integers.', { exit: 2 });
111
+ }
112
+ return { depth, height, width };
113
+ }
114
+ videoParamsFromFlags(flags) {
115
+ if (flags['show-video-params'] === true && flags['hide-video-params'] === true) {
116
+ this.error('Use either --show-video-params or --hide-video-params, not both.', { exit: 2 });
117
+ }
118
+ if (flags['show-video-params'] === true)
119
+ return true;
120
+ if (flags['hide-video-params'] === true)
121
+ return false;
122
+ return undefined;
123
+ }
124
+ }
125
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/testing/job/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,k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,KAAK,CAAC,uEAAuE,EAAE,EAAC,IAAI,EAAE,CAAC,EAAC,CAAC,CAAA;QAChG,CAAC;QAED,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,MAAkC,CAAA;QACjE,IAAI,KAAK,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;YAC5C,IAAI,CAAC,KAAK,CAAC,wDAAwD,EAAE,EAAC,IAAI,EAAE,CAAC,EAAC,CAAC,CAAA;QACjF,CAAC;QAED,OAAO,EAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAC,CAAA;IAC/B,CAAC;IAEO,oBAAoB,CAAC,KAAqE;QAChG,IAAI,KAAK,CAAC,mBAAmB,CAAC,KAAK,IAAI,IAAI,KAAK,CAAC,mBAAmB,CAAC,KAAK,IAAI,EAAE,CAAC;YAC/E,IAAI,CAAC,KAAK,CAAC,kEAAkE,EAAE,EAAC,IAAI,EAAE,CAAC,EAAC,CAAC,CAAA;QAC3F,CAAC;QAED,IAAI,KAAK,CAAC,mBAAmB,CAAC,KAAK,IAAI;YAAE,OAAO,IAAI,CAAA;QACpD,IAAI,KAAK,CAAC,mBAAmB,CAAC,KAAK,IAAI;YAAE,OAAO,KAAK,CAAA;QACrD,OAAO,SAAS,CAAA;IAClB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
2
+ type TestingProjectDeleteResult = {
3
+ deleted: true;
4
+ projectId: number;
5
+ };
6
+ export default class TestingProjectDelete extends AgentiaCommand {
7
+ static args: {
8
+ id: import("@oclif/core/interfaces").Arg<number, {
9
+ max?: number;
10
+ min?: number;
11
+ }>;
12
+ };
13
+ static description: string;
14
+ static examples: string[];
15
+ static flags: {
16
+ domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
+ org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
+ pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
19
+ };
20
+ run(): Promise<TestingProjectDeleteResult>;
21
+ }
22
+ export {};
@@ -0,0 +1,29 @@
1
+ import { Args } from '@oclif/core';
2
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
3
+ import { testingConnectionFlags, testingConnectionOptions } from '../../../lib/testing-flags.js';
4
+ import { deleteTestingProject } from '../../../lib/testing-operations.js';
5
+ export default class TestingProjectDelete extends AgentiaCommand {
6
+ static args = {
7
+ id: Args.integer({
8
+ description: 'CRT project ID.',
9
+ required: true,
10
+ }),
11
+ };
12
+ static description = 'Delete a Copado Robotic Testing project';
13
+ static examples = [
14
+ '<%= config.bin %> <%= command.id %> <project-id>',
15
+ '<%= config.bin %> <%= command.id %> <project-id> --json',
16
+ ];
17
+ static flags = {
18
+ ...testingConnectionFlags,
19
+ };
20
+ async run() {
21
+ const { args, flags } = await this.parse(TestingProjectDelete);
22
+ const result = await this.withSpinner('Deleting testing project', () => deleteTestingProject({ ...testingConnectionOptions(flags), projectId: args.id }));
23
+ this.display(() => {
24
+ this.log(`Deleted testing project ${result.projectId}.`);
25
+ });
26
+ return result;
27
+ }
28
+ }
29
+ //# sourceMappingURL=delete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../src/commands/testing/project/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAC,sBAAsB,EAAE,wBAAwB,EAAC,MAAM,+BAA+B,CAAA;AAC9F,OAAO,EAAC,oBAAoB,EAAC,MAAM,oCAAoC,CAAA;AAOvE,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,cAAc;IAC9D,MAAM,CAAU,IAAI,GAAG;QACrB,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC;YACf,WAAW,EAAE,iBAAiB;YAC9B,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAA;IACD,MAAM,CAAU,WAAW,GAAG,yCAAyC,CAAA;IACvE,MAAM,CAAU,QAAQ,GAAG;QACzB,kDAAkD;QAClD,yDAAyD;KAC1D,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,sBAAsB;KAC1B,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,IAAI,EAAE,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAA;QAC5D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,0BAA0B,EAAE,GAAG,EAAE,CACrE,oBAAoB,CAAC,EAAC,GAAG,wBAAwB,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,EAAC,CAAC,CAC/E,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,2BAA2B,MAAM,CAAC,SAAS,GAAG,CAAC,CAAA;QAC1D,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
2
+ type TestingRobotDeleteResult = {
3
+ deleted: true;
4
+ projectId: number;
5
+ robotId: number | string;
6
+ };
7
+ export default class TestingRobotDelete extends AgentiaCommand {
8
+ static args: {
9
+ id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
10
+ };
11
+ static description: string;
12
+ static examples: string[];
13
+ static flags: {
14
+ project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
15
+ domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
+ org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
+ pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
+ };
19
+ run(): Promise<TestingRobotDeleteResult>;
20
+ }
21
+ export {};
@@ -0,0 +1,30 @@
1
+ import { Args } from '@oclif/core';
2
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
3
+ import { testingConnectionFlags, testingConnectionOptions, testingProjectFlag, } from '../../../lib/testing-flags.js';
4
+ import { deleteTestingRobot } from '../../../lib/testing-operations.js';
5
+ export default class TestingRobotDelete extends AgentiaCommand {
6
+ static args = {
7
+ id: Args.string({
8
+ description: 'CRT robot ID.',
9
+ required: true,
10
+ }),
11
+ };
12
+ static description = 'Delete a Copado Robotic Testing robot';
13
+ static examples = [
14
+ '<%= config.bin %> <%= command.id %> <robot-id> --project <project-id>',
15
+ '<%= config.bin %> <%= command.id %> <robot-id> --project <project-id> --json',
16
+ ];
17
+ static flags = {
18
+ ...testingConnectionFlags,
19
+ ...testingProjectFlag,
20
+ };
21
+ async run() {
22
+ const { args, flags } = await this.parse(TestingRobotDelete);
23
+ const result = await this.withSpinner('Deleting testing robot', () => deleteTestingRobot({ ...testingConnectionOptions(flags), projectId: flags.project, robotId: args.id }));
24
+ this.display(() => {
25
+ this.log(`Deleted testing robot ${result.robotId}.`);
26
+ });
27
+ return result;
28
+ }
29
+ }
30
+ //# sourceMappingURL=delete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../src/commands/testing/robot/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAC,kBAAkB,EAAC,MAAM,oCAAoC,CAAA;AAQrE,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,cAAc;IAC5D,MAAM,CAAU,IAAI,GAAG;QACrB,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC;YACd,WAAW,EAAE,eAAe;YAC5B,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAA;IACD,MAAM,CAAU,WAAW,GAAG,uCAAuC,CAAA;IACrE,MAAM,CAAU,QAAQ,GAAG;QACzB,uEAAuE;QACvE,8EAA8E;KAC/E,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,sBAAsB;QACzB,GAAG,kBAAkB;KACtB,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,IAAI,EAAE,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAA;QAC1D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,wBAAwB,EAAE,GAAG,EAAE,CACnE,kBAAkB,CAAC,EAAC,GAAG,wBAAwB,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,EAAC,CAAC,CACrG,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,yBAAyB,MAAM,CAAC,OAAO,GAAG,CAAC,CAAA;QACtD,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC"}
@@ -10,6 +10,14 @@ export default class TestingRun extends AgentiaCommand {
10
10
  static description: string;
11
11
  static examples: string[];
12
12
  static flags: {
13
+ branch: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
+ exclude: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
+ include: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
+ param: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
+ record: import("@oclif/core/interfaces").OptionFlag<"none" | "failed" | "all" | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
+ 'rerun-failed': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
19
+ 'rerun-failed-from-latest': import("@oclif/core/interfaces").BooleanFlag<boolean>;
20
+ tag: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
21
  project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
14
22
  domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
23
  org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
@@ -1,6 +1,6 @@
1
1
  import { Args } from '@oclif/core';
2
2
  import { AgentiaCommand } from '../../lib/agentia-command.js';
3
- import { testingConnectionFlags, testingConnectionOptions, testingProjectFlag } from '../../lib/testing-flags.js';
3
+ import { testingConnectionFlags, testingProjectFlag, testingRunOptionFlags, testingRunOptions } from '../../lib/testing-flags.js';
4
4
  import { runTestingBuild } from '../../lib/testing-operations.js';
5
5
  import { formatTestingRecord } from '../../lib/testing-types.js';
6
6
  export default class TestingRun extends AgentiaCommand {
@@ -13,15 +13,17 @@ export default class TestingRun extends AgentiaCommand {
13
13
  static description = 'Run a Copado Robotic Testing test';
14
14
  static examples = [
15
15
  '<%= config.bin %> <%= command.id %> <job-id> --project <project-id>',
16
+ '<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --branch main --include smoke',
16
17
  '<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --json',
17
18
  ];
18
19
  static flags = {
19
20
  ...testingConnectionFlags,
20
21
  ...testingProjectFlag,
22
+ ...testingRunOptionFlags,
21
23
  };
22
24
  async run() {
23
25
  const { args, flags } = await this.parse(TestingRun);
24
- const result = await this.withSpinner('Running testing test', () => runTestingBuild({ ...testingConnectionOptions(flags), jobId: args.id, projectId: flags.project }));
26
+ const result = await this.withSpinner('Running testing test', () => runTestingBuild(testingRunOptions(flags, { jobId: args.id, projectId: flags.project })));
25
27
  this.display(() => {
26
28
  this.log('Testing run started');
27
29
  this.log(formatTestingRecord({ build: result.build, jobId: result.jobId, projectId: result.projectId }));
@@ -1 +1 @@
1
- {"version":3,"file":"run.js","sourceRoot":"","sources":["../../../src/commands/testing/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAC,sBAAsB,EAAE,wBAAwB,EAAE,kBAAkB,EAAC,MAAM,4BAA4B,CAAA;AAC/G,OAAO,EAAC,eAAe,EAAC,MAAM,iCAAiC,CAAA;AAC/D,OAAO,EAAC,mBAAmB,EAA6B,MAAM,4BAA4B,CAAA;AAE1F,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,cAAc;IACpD,MAAM,CAAU,IAAI,GAAG;QACrB,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC;YACf,WAAW,EAAE,yBAAyB;YACtC,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAA;IACD,MAAM,CAAU,WAAW,GAAG,mCAAmC,CAAA;IACjE,MAAM,CAAU,QAAQ,GAAG;QACzB,qEAAqE;QACrE,4EAA4E;KAC7E,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,sBAAsB;QACzB,GAAG,kBAAkB;KACtB,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,IAAI,EAAE,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;QAClD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,sBAAsB,EAAE,GAAG,EAAE,CACjE,eAAe,CAAC,EAAC,GAAG,wBAAwB,CAAC,KAAK,C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AA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,IAAI,EAAE,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;QAClD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,sBAAsB,EAAE,GAAG,EAAE,CACjE,eAAe,CAAC,iBAAiB,CAAC,KAAK,EAAE,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,EAAC,CAAC,CAAC,CACtF,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAA;YAC/B,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAC,CAAC,CAAC,CAAA;QACxG,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC"}
@@ -2,7 +2,7 @@ import { Flags } from '@oclif/core';
2
2
  import { AgentiaCommand } from '../../lib/agentia-command.js';
3
3
  import { testingConnectionFlags, testingConnectionOptions, testingProjectFlag } from '../../lib/testing-flags.js';
4
4
  import { listTestingBuilds } from '../../lib/testing-operations.js';
5
- import { formatTestingTable, TESTING_BUILD_STATUSES } from '../../lib/testing-types.js';
5
+ import { formatTestingBuildTable, TESTING_BUILD_STATUSES, } from '../../lib/testing-types.js';
6
6
  export default class TestingStatus extends AgentiaCommand {
7
7
  static description = 'List Copado Robotic Testing run status';
8
8
  static examples = [
@@ -39,7 +39,7 @@ export default class TestingStatus extends AgentiaCommand {
39
39
  this.log('No testing runs found.');
40
40
  return;
41
41
  }
42
- this.log(formatTestingTable(builds));
42
+ this.log(formatTestingBuildTable(builds));
43
43
  });
44
44
  return builds;
45
45
  }
@@ -1 +1 @@
1
- {"version":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WAAW,EAAE,wBAAwB;YACrC,OAAO,EAAE,CAAC,SAAS,CAAC;SACrB,CAAC,EAAE;QACJ,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC;YACnB,WAAW,EAAE,sBAAsB;YACnC,OAAO,EAAE,CAAC,GAAG,sBAAsB,CAAC;SACrC,CAAC,EAAE;KACL,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;QAC/C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,6BAA6B,EAAE,GAAG,EAAE,CACxE,iBAAiB,CAAC;YAChB,GAAG,wBAAwB,CAAC,KAAK,CAAC;YAClC,KAAK,EAAE,KAAK,CAAC,GAAG;YAChB,SAAS,EAAE,KAAK,CAAC,OAAO;YACxB,UAAU,EAAE,KAAK,CAAC,aAAa,CAAc;YAC7C,MAAM,EAAE,KAAK,CAAC,MAAwC;SACvD,CAAC,CACH,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACxB,IAAI,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAA;gBAClC,OAAM;YACR,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC,CAAA;QAC3C,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC"}
@@ -1 +1,34 @@
1
- export { default } from '../run.js';
1
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
2
+ import { type TestingBuildWaitResult } from '../../../lib/testing-operations.js';
3
+ import { type TestingBuild, type TestingBuildRunResult } from '../../../lib/testing-types.js';
4
+ type TestingTestRunResult = TestingBuildRunResult & {
5
+ finalBuild?: TestingBuild;
6
+ wait?: TestingBuildWaitResult;
7
+ };
8
+ export default class TestingTestRun extends AgentiaCommand {
9
+ static args: {
10
+ id: import("@oclif/core/interfaces").Arg<number, {
11
+ max?: number;
12
+ min?: number;
13
+ }>;
14
+ };
15
+ static description: string;
16
+ static examples: string[];
17
+ static flags: {
18
+ 'wait-for-result': import("@oclif/core/interfaces").BooleanFlag<boolean>;
19
+ branch: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
20
+ exclude: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
21
+ include: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
22
+ param: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
23
+ record: import("@oclif/core/interfaces").OptionFlag<"none" | "failed" | "all" | undefined, import("@oclif/core/interfaces").CustomOptions>;
24
+ 'rerun-failed': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
25
+ 'rerun-failed-from-latest': import("@oclif/core/interfaces").BooleanFlag<boolean>;
26
+ tag: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
27
+ project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
28
+ domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
29
+ org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
30
+ pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
31
+ };
32
+ run(): Promise<TestingTestRunResult>;
33
+ }
34
+ export {};
@@ -1,2 +1,59 @@
1
- export { default } from '../run.js';
1
+ import { Args, Flags } from '@oclif/core';
2
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
3
+ import { testingConnectionFlags, testingProjectFlag, testingRunOptionFlags, testingRunOptions, } from '../../../lib/testing-flags.js';
4
+ import { runTestingBuild, waitForTestingBuildResult } from '../../../lib/testing-operations.js';
5
+ import { formatTestingRecord, normalizeTestingId, } from '../../../lib/testing-types.js';
6
+ export default class TestingTestRun extends AgentiaCommand {
7
+ static args = {
8
+ id: Args.integer({
9
+ description: 'CRT job/test ID to run.',
10
+ required: true,
11
+ }),
12
+ };
13
+ static description = 'Run a Copado Robotic Testing test';
14
+ static examples = [
15
+ '<%= config.bin %> <%= command.id %> <job-id> --project <project-id>',
16
+ '<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --wait-for-result',
17
+ '<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --json',
18
+ ];
19
+ static flags = {
20
+ ...testingConnectionFlags,
21
+ ...testingProjectFlag,
22
+ ...testingRunOptionFlags,
23
+ 'wait-for-result': Flags.boolean({
24
+ default: false,
25
+ description: 'Poll CRT until the started build reaches a terminal result.',
26
+ }),
27
+ };
28
+ async run() {
29
+ const { args, flags } = await this.parse(TestingTestRun);
30
+ const runResult = await this.withSpinner('Running testing test', () => runTestingBuild(testingRunOptions(flags, { jobId: args.id, projectId: flags.project })));
31
+ if (!flags['wait-for-result']) {
32
+ this.display(() => {
33
+ this.log('Testing run started');
34
+ this.log(formatTestingRecord({ build: runResult.build, jobId: runResult.jobId, projectId: runResult.projectId }));
35
+ });
36
+ return runResult;
37
+ }
38
+ const buildId = normalizeTestingId(runResult.build);
39
+ const wait = await this.withSpinner('Waiting for testing result', () => waitForTestingBuildResult({
40
+ ...testingRunOptions(flags, { jobId: args.id, projectId: flags.project }),
41
+ buildId,
42
+ }));
43
+ const result = { ...runResult, finalBuild: wait.build, wait };
44
+ this.display(() => {
45
+ this.log('Testing run finished');
46
+ this.log(formatTestingRecord(formatWaitResult(result)));
47
+ });
48
+ return result;
49
+ }
50
+ }
51
+ function formatWaitResult(result) {
52
+ return {
53
+ buildId: result.wait?.buildId ?? normalizeTestingId(result.build),
54
+ finalBuild: result.finalBuild,
55
+ jobId: result.jobId,
56
+ projectId: result.projectId,
57
+ };
58
+ }
2
59
  //# sourceMappingURL=run.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"run.js","sourceRoot":"","sources":["../../../../src/commands/testing/test/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA"}
1
+ {"version":3,"file":"run.js","sourceRoot":"","sources":["../../../../src/commands/testing/test/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAC,eAAe,EAA+B,yBAAyB,EAAC,MAAM,oCAAoC,CAAA;AAC1H,OAAO,EACL,mBAAmB,EACnB,kBAAkB,GAGnB,MAAM,+BAA+B,CAAA;AAOtC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,cAAc;IACxD,MAAM,CAAU,IAAI,GAAG;QACrB,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC;YACf,WAAW,EAAE,yBAAyB;YACtC,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAA;IACD,MAAM,CAAU,WAAW,GAAG,mCAAmC,CAAA;IACjE,MAAM,CAAU,QAAQ,GAAG;QACzB,qEAAqE;QACrE,uFAAuF;QACvF,4EAA4E;KAC7E,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,sBAAsB;QACzB,GAAG,kBAAkB;QACrB,GAAG,qBAAqB;QACxB,iBAAiB,EAAE,KAAK,CAAC,OAAO,CAAC;YAC/B,OAAO,EAAE,KAAK;YACd,WAAW,EAAE,6DAA6D;SAC3E,CAAC;KACH,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,IAAI,EAAE,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC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,CAAC,CAAA;QACzD,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC;;AAGH,SAAS,gBAAgB,CAAC,MAA4B;IACpD,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC;QACjE,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,SAAS,EAAE,MAAM,CAAC,SAAS;KAC5B,CAAA;AACH,CAAC"}
@@ -8,7 +8,7 @@ export default class TestingVariableCreate extends AgentiaCommand {
8
8
  key: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
9
9
  robot: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
10
  sensitive: import("@oclif/core/interfaces").BooleanFlag<boolean>;
11
- type: import("@oclif/core/interfaces").OptionFlag<"clp" | "dataset" | "secret" | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ type: import("@oclif/core/interfaces").OptionFlag<"config" | "clp" | "dataset" | "secret" | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
12
  'user-specific': import("@oclif/core/interfaces").BooleanFlag<boolean>;
13
13
  value: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
14
  project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
@@ -0,0 +1,21 @@
1
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
2
+ export default class TestingVariableUpdate extends AgentiaCommand {
3
+ static args: {
4
+ id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
5
+ };
6
+ static description: string;
7
+ static examples: string[];
8
+ static flags: {
9
+ description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
+ key: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ 'not-sensitive': import("@oclif/core/interfaces").BooleanFlag<boolean>;
12
+ sensitive: import("@oclif/core/interfaces").BooleanFlag<boolean>;
13
+ type: import("@oclif/core/interfaces").OptionFlag<"config" | "clp" | "dataset" | "secret" | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
+ value: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
+ project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
16
+ domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
+ org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
+ pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
19
+ };
20
+ run(): Promise<unknown>;
21
+ }
@@ -0,0 +1,63 @@
1
+ import { Args, Flags } from '@oclif/core';
2
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
3
+ import { testingConnectionFlags, testingConnectionOptions, testingProjectFlag, } from '../../../lib/testing-flags.js';
4
+ import { updateTestingVariable } from '../../../lib/testing-operations.js';
5
+ import { formatTestingRecord, TESTING_VARIABLE_TYPES } from '../../../lib/testing-types.js';
6
+ export default class TestingVariableUpdate extends AgentiaCommand {
7
+ static args = {
8
+ id: Args.string({
9
+ description: 'CRT variable/secret ID.',
10
+ required: true,
11
+ }),
12
+ };
13
+ static description = 'Update a Copado Robotic Testing variable/secret';
14
+ static examples = [
15
+ '<%= config.bin %> <%= command.id %> <variable-id> --project <project-id> --value https://example.com',
16
+ '<%= config.bin %> <%= command.id %> <variable-id> --project <project-id> --not-sensitive --json',
17
+ ];
18
+ static flags = {
19
+ ...testingConnectionFlags,
20
+ ...testingProjectFlag,
21
+ description: Flags.string({
22
+ description: 'Variable description.',
23
+ }),
24
+ key: Flags.string({
25
+ description: 'Variable key.',
26
+ }),
27
+ 'not-sensitive': Flags.boolean({
28
+ description: 'Mark the variable as not sensitive.',
29
+ }),
30
+ sensitive: Flags.boolean({
31
+ description: 'Mark the variable as sensitive.',
32
+ }),
33
+ type: Flags.option({
34
+ description: 'CRT variable type.',
35
+ options: [...TESTING_VARIABLE_TYPES],
36
+ })(),
37
+ value: Flags.string({
38
+ description: 'Variable value. Avoid this flag for secrets if shell history is a concern.',
39
+ }),
40
+ };
41
+ async run() {
42
+ const { args, flags } = await this.parse(TestingVariableUpdate);
43
+ if (flags.sensitive === true && flags['not-sensitive'] === true) {
44
+ this.error('Use either --sensitive or --not-sensitive, not both.', { exit: 2 });
45
+ }
46
+ const result = await this.withSpinner('Updating testing variable', () => updateTestingVariable({
47
+ ...testingConnectionOptions(flags),
48
+ description: flags.description,
49
+ key: flags.key,
50
+ projectId: flags.project,
51
+ sensitive: flags.sensitive === true ? true : flags['not-sensitive'] === true ? false : undefined,
52
+ type: flags.type,
53
+ value: flags.value,
54
+ variableId: args.id,
55
+ }));
56
+ this.display(() => {
57
+ this.log('Testing variable updated');
58
+ this.log(formatTestingRecord(result));
59
+ });
60
+ return result;
61
+ }
62
+ }
63
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/testing/variable/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAC,qBAAqB,EAAC,MAAM,oCAAoC,CAAA;AACxE,OAAO,EAAC,mBAAmB,EAAE,sBAAsB,EAA2B,MAAM,+BAA+B,CAAA;AAEnH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,cAAc;IAC/D,MAAM,CAAU,IAAI,GAA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GAAG,EAAE,CACtE,qBAAqB,CAAC;YACpB,GAAG,wBAAwB,CAAC,KAAK,CAAC;YAClC,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,GAAG,EAAE,KAAK,CAAC,GAAG;YACd,SAAS,EAAE,KAAK,CAAC,OAAO;YACxB,SAAS,EAAE,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;YAChG,IAAI,EAAE,KAAK,CAAC,IAAuC;YACnD,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,UAAU,EAAE,IAAI,CAAC,EAAE;SACpB,CAAC,CACH,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAA;YACpC,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,MAAiC,CAAC,CAAC,CAAA;QAClE,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { AgentiaCommand } from '../../lib/agentia-command.js';
2
+ export default class WorkOpen extends AgentiaCommand {
3
+ static args: {
4
+ id: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
5
+ };
6
+ static description: string;
7
+ static examples: string[];
8
+ run(): Promise<{
9
+ provider: string;
10
+ url: string;
11
+ }>;
12
+ }