@copado/agentia-cli 0.29.0-alpha.0 → 0.33.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 (117) hide show
  1. package/README.md +1015 -54
  2. package/dist/commands/auth/get.d.ts +2 -0
  3. package/dist/commands/auth/get.js +13 -2
  4. package/dist/commands/auth/get.js.map +1 -1
  5. package/dist/commands/auth/set.d.ts +6 -0
  6. package/dist/commands/auth/set.js +44 -4
  7. package/dist/commands/auth/set.js.map +1 -1
  8. package/dist/commands/testing/build/list.d.ts +16 -0
  9. package/dist/commands/testing/build/list.js +47 -0
  10. package/dist/commands/testing/build/list.js.map +1 -0
  11. package/dist/commands/testing/build/logs.d.ts +21 -0
  12. package/dist/commands/testing/build/logs.js +42 -0
  13. package/dist/commands/testing/build/logs.js.map +1 -0
  14. package/dist/commands/testing/build/run.d.ts +19 -0
  15. package/dist/commands/testing/build/run.js +39 -0
  16. package/dist/commands/testing/build/run.js.map +1 -0
  17. package/dist/commands/testing/create.d.ts +18 -0
  18. package/dist/commands/testing/create.js +46 -0
  19. package/dist/commands/testing/create.js.map +1 -0
  20. package/dist/commands/testing/job/create.d.ts +18 -0
  21. package/dist/commands/testing/job/create.js +46 -0
  22. package/dist/commands/testing/job/create.js.map +1 -0
  23. package/dist/commands/testing/job/download.d.ts +22 -0
  24. package/dist/commands/testing/job/download.js +56 -0
  25. package/dist/commands/testing/job/download.js.map +1 -0
  26. package/dist/commands/testing/job/files.d.ts +19 -0
  27. package/dist/commands/testing/job/files.js +35 -0
  28. package/dist/commands/testing/job/files.js.map +1 -0
  29. package/dist/commands/testing/job/get.d.ts +16 -0
  30. package/dist/commands/testing/job/get.js +31 -0
  31. package/dist/commands/testing/job/get.js.map +1 -0
  32. package/dist/commands/testing/job/list.d.ts +14 -0
  33. package/dist/commands/testing/job/list.js +32 -0
  34. package/dist/commands/testing/job/list.js.map +1 -0
  35. package/dist/commands/testing/job/upload.d.ts +29 -0
  36. package/dist/commands/testing/job/upload.js +57 -0
  37. package/dist/commands/testing/job/upload.js.map +1 -0
  38. package/dist/commands/testing/logs.d.ts +21 -0
  39. package/dist/commands/testing/logs.js +42 -0
  40. package/dist/commands/testing/logs.js.map +1 -0
  41. package/dist/commands/testing/project/create.d.ts +14 -0
  42. package/dist/commands/testing/project/create.js +36 -0
  43. package/dist/commands/testing/project/create.js.map +1 -0
  44. package/dist/commands/testing/project/get.d.ts +15 -0
  45. package/dist/commands/testing/project/get.js +30 -0
  46. package/dist/commands/testing/project/get.js.map +1 -0
  47. package/dist/commands/testing/project/list.d.ts +13 -0
  48. package/dist/commands/testing/project/list.js +31 -0
  49. package/dist/commands/testing/project/list.js.map +1 -0
  50. package/dist/commands/testing/robot/create.d.ts +19 -0
  51. package/dist/commands/testing/robot/create.js +60 -0
  52. package/dist/commands/testing/robot/create.js.map +1 -0
  53. package/dist/commands/testing/robot/get.d.ts +16 -0
  54. package/dist/commands/testing/robot/get.js +31 -0
  55. package/dist/commands/testing/robot/get.js.map +1 -0
  56. package/dist/commands/testing/robot/list.d.ts +13 -0
  57. package/dist/commands/testing/robot/list.js +28 -0
  58. package/dist/commands/testing/robot/list.js.map +1 -0
  59. package/dist/commands/testing/run.d.ts +19 -0
  60. package/dist/commands/testing/run.js +32 -0
  61. package/dist/commands/testing/run.js.map +1 -0
  62. package/dist/commands/testing/status.d.ts +16 -0
  63. package/dist/commands/testing/status.js +47 -0
  64. package/dist/commands/testing/status.js.map +1 -0
  65. package/dist/commands/testing/test/create.d.ts +1 -0
  66. package/dist/commands/testing/test/create.js +2 -0
  67. package/dist/commands/testing/test/create.js.map +1 -0
  68. package/dist/commands/testing/test/logs.d.ts +1 -0
  69. package/dist/commands/testing/test/logs.js +2 -0
  70. package/dist/commands/testing/test/logs.js.map +1 -0
  71. package/dist/commands/testing/test/run.d.ts +1 -0
  72. package/dist/commands/testing/test/run.js +2 -0
  73. package/dist/commands/testing/test/run.js.map +1 -0
  74. package/dist/commands/testing/test/status.d.ts +1 -0
  75. package/dist/commands/testing/test/status.js +2 -0
  76. package/dist/commands/testing/test/status.js.map +1 -0
  77. package/dist/commands/testing/test/update.d.ts +1 -0
  78. package/dist/commands/testing/test/update.js +2 -0
  79. package/dist/commands/testing/test/update.js.map +1 -0
  80. package/dist/commands/testing/update.d.ts +29 -0
  81. package/dist/commands/testing/update.js +57 -0
  82. package/dist/commands/testing/update.js.map +1 -0
  83. package/dist/commands/testing/variable/create.d.ts +20 -0
  84. package/dist/commands/testing/variable/create.js +65 -0
  85. package/dist/commands/testing/variable/create.js.map +1 -0
  86. package/dist/commands/testing/variable/delete.d.ts +19 -0
  87. package/dist/commands/testing/variable/delete.js +30 -0
  88. package/dist/commands/testing/variable/delete.js.map +1 -0
  89. package/dist/commands/testing/variable/list.d.ts +15 -0
  90. package/dist/commands/testing/variable/list.js +40 -0
  91. package/dist/commands/testing/variable/list.js.map +1 -0
  92. package/dist/lib/credential-store.d.ts +4 -0
  93. package/dist/lib/credential-store.js +14 -0
  94. package/dist/lib/credential-store.js.map +1 -1
  95. package/dist/lib/mcp/testing-tools.d.ts +162 -0
  96. package/dist/lib/mcp/testing-tools.js +401 -0
  97. package/dist/lib/mcp/testing-tools.js.map +1 -0
  98. package/dist/lib/mcp/tools.d.ts +299 -0
  99. package/dist/lib/mcp/tools.js +3 -0
  100. package/dist/lib/mcp/tools.js.map +1 -1
  101. package/dist/lib/testing-config.d.ts +17 -0
  102. package/dist/lib/testing-config.js +68 -0
  103. package/dist/lib/testing-config.js.map +1 -0
  104. package/dist/lib/testing-flags.d.ts +33 -0
  105. package/dist/lib/testing-flags.js +70 -0
  106. package/dist/lib/testing-flags.js.map +1 -0
  107. package/dist/lib/testing-gateway.d.ts +33 -0
  108. package/dist/lib/testing-gateway.js +161 -0
  109. package/dist/lib/testing-gateway.js.map +1 -0
  110. package/dist/lib/testing-operations.d.ts +110 -0
  111. package/dist/lib/testing-operations.js +284 -0
  112. package/dist/lib/testing-operations.js.map +1 -0
  113. package/dist/lib/testing-types.d.ts +138 -0
  114. package/dist/lib/testing-types.js +190 -0
  115. package/dist/lib/testing-types.js.map +1 -0
  116. package/oclif.manifest.json +3239 -799
  117. package/package.json +4 -1
@@ -0,0 +1,60 @@
1
+ import { Flags } from '@oclif/core';
2
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
3
+ import { testingConnectionFlags, testingConnectionOptions, testingProjectFlag, } from '../../../lib/testing-flags.js';
4
+ import { createTestingRobot } from '../../../lib/testing-operations.js';
5
+ import { formatTestingRecord } from '../../../lib/testing-types.js';
6
+ export default class TestingRobotCreate extends AgentiaCommand {
7
+ static description = 'Create a Copado Robotic Testing robot';
8
+ static examples = [
9
+ '<%= config.bin %> <%= command.id %> --project <project-id> --name "Cloud Robot"',
10
+ '<%= config.bin %> <%= command.id %> --project <project-id> --name "QConnect Robot" --kind QConnect --json',
11
+ ];
12
+ static flags = {
13
+ ...testingConnectionFlags,
14
+ ...testingProjectFlag,
15
+ description: Flags.string({
16
+ default: '',
17
+ description: 'Robot description.',
18
+ }),
19
+ 'fw-version': Flags.string({
20
+ default: 'stable',
21
+ description: 'Robot framework version.',
22
+ }),
23
+ kind: Flags.option({
24
+ default: 'cloud',
25
+ description: 'Robot run environment.',
26
+ options: ['cloud', 'QConnect'],
27
+ })(),
28
+ name: Flags.string({
29
+ description: 'Robot name.',
30
+ required: true,
31
+ }),
32
+ os: Flags.string({
33
+ default: 'linux',
34
+ description: 'Robot operating system.',
35
+ }),
36
+ 'robot-type': Flags.string({
37
+ default: 'default',
38
+ description: 'CRT robot type.',
39
+ }),
40
+ };
41
+ async run() {
42
+ const { flags } = await this.parse(TestingRobotCreate);
43
+ const robot = await this.withSpinner('Creating testing robot', () => createTestingRobot({
44
+ ...testingConnectionOptions(flags),
45
+ description: flags.description,
46
+ fwVersion: flags['fw-version'],
47
+ kind: flags.kind,
48
+ name: flags.name,
49
+ os: flags.os,
50
+ projectId: flags.project,
51
+ robotType: flags['robot-type'],
52
+ }));
53
+ this.display(() => {
54
+ this.log('Testing robot created');
55
+ this.log(formatTestingRecord(robot));
56
+ });
57
+ return robot;
58
+ }
59
+ }
60
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/testing/robot/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,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;AACrE,OAAO,EAAC,mBAAmB,EAAoB,MAAM,+BAA+B,CAAA;AAEpF,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,cAAc;IAC5D,MAAM,CAAU,WAAW,GAAG,uCAAuC,CAAA;IACrE,MAAM,CAAU,QAAQ,GAAG;QACzB,iFAAiF;QACjF,2GAA2G;KAC5G,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,sBAAsB;QACzB,GAAG,kBAAkB;QACrB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC;YACxB,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,oBAAoB;SAClC,CAAC;QACF,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC;YACzB,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,0BAA0B;SACxC,CAAC;QACF,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;YACjB,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,wBAAwB;YACrC,OAAO,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC;SAC/B,CAAC,EAAE;QACJ,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE,aAAa;YAC1B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC;YACf,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,yBAAyB;SACvC,CAAC;QACF,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC;YACzB,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,iBAAiB;SAC/B,CAAC;KACH,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAA;QACpD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,wBAAwB,EAAE,GAAG,EAAE,CAClE,kBAAkB,CAAC;YACjB,GAAG,wBAAwB,CAAC,KAAK,CAAC;YAClC,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,SAAS,EAAE,KAAK,CAAC,YAAY,CAAC;YAC9B,IAAI,EAAE,KAAK,CAAC,IAA4B;YACxC,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,EAAE,EAAE,KAAK,CAAC,EAAE;YACZ,SAAS,EAAE,KAAK,CAAC,OAAO;YACxB,SAAS,EAAE,KAAK,CAAC,YAAY,CAAC;SAC/B,CAAC,CACH,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAA;YACjC,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAA;QACtC,CAAC,CAAC,CAAA;QAEF,OAAO,KAAK,CAAA;IACd,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
2
+ import { type TestingRobot } from '../../../lib/testing-types.js';
3
+ export default class TestingRobotGet extends AgentiaCommand {
4
+ static args: {
5
+ id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
6
+ };
7
+ static description: string;
8
+ static examples: string[];
9
+ static flags: {
10
+ project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
11
+ domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
+ };
15
+ run(): Promise<TestingRobot>;
16
+ }
@@ -0,0 +1,31 @@
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 { getTestingRobot } from '../../../lib/testing-operations.js';
5
+ import { formatTestingRecord } from '../../../lib/testing-types.js';
6
+ export default class TestingRobotGet extends AgentiaCommand {
7
+ static args = {
8
+ id: Args.string({
9
+ description: 'CRT robot ID.',
10
+ required: true,
11
+ }),
12
+ };
13
+ static description = 'Get a Copado Robotic Testing robot from the project robot list';
14
+ static examples = [
15
+ '<%= config.bin %> <%= command.id %> <robot-id> --project <project-id>',
16
+ '<%= config.bin %> <%= command.id %> <robot-id> --project <project-id> --json',
17
+ ];
18
+ static flags = {
19
+ ...testingConnectionFlags,
20
+ ...testingProjectFlag,
21
+ };
22
+ async run() {
23
+ const { args, flags } = await this.parse(TestingRobotGet);
24
+ const robot = await this.withSpinner('Fetching testing robot', () => getTestingRobot({ ...testingConnectionOptions(flags), projectId: flags.project, robotId: args.id }));
25
+ this.display(() => {
26
+ this.log(formatTestingRecord(robot));
27
+ });
28
+ return robot;
29
+ }
30
+ }
31
+ //# sourceMappingURL=get.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../src/commands/testing/robot/get.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,eAAe,EAAC,MAAM,oCAAoC,CAAA;AAClE,OAAO,EAAC,mBAAmB,EAAoB,MAAM,+BAA+B,CAAA;AAEpF,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,cAAc;IACzD,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,gEAAgE,CAAA;IAC9F,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,eAAe,CAAC,CAAA;QACvD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,wBAAwB,EAAE,GAAG,EAAE,CAClE,eAAe,CAAC,EAAC,GAAG,wBAAwB,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,EAAC,CAAC,CAClG,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAA;QACtC,CAAC,CAAC,CAAA;QAEF,OAAO,KAAK,CAAA;IACd,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
2
+ import { type TestingRobot } from '../../../lib/testing-types.js';
3
+ export default class TestingRobotList extends AgentiaCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
8
+ domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
+ org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
+ pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ };
12
+ run(): Promise<TestingRobot[]>;
13
+ }
@@ -0,0 +1,28 @@
1
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
2
+ import { testingConnectionFlags, testingConnectionOptions, testingProjectFlag, } from '../../../lib/testing-flags.js';
3
+ import { listTestingRobots } from '../../../lib/testing-operations.js';
4
+ import { formatTestingTable } from '../../../lib/testing-types.js';
5
+ export default class TestingRobotList extends AgentiaCommand {
6
+ static description = 'List Copado Robotic Testing robots in a project';
7
+ static examples = [
8
+ '<%= config.bin %> <%= command.id %> --project <project-id>',
9
+ '<%= config.bin %> <%= command.id %> --project <project-id> --json',
10
+ ];
11
+ static flags = {
12
+ ...testingConnectionFlags,
13
+ ...testingProjectFlag,
14
+ };
15
+ async run() {
16
+ const { flags } = await this.parse(TestingRobotList);
17
+ const robots = await this.withSpinner('Fetching testing robots', () => listTestingRobots({ ...testingConnectionOptions(flags), projectId: flags.project }));
18
+ this.display(() => {
19
+ if (robots.length === 0) {
20
+ this.log('No testing robots found.');
21
+ return;
22
+ }
23
+ this.log(formatTestingTable(robots));
24
+ });
25
+ return robots;
26
+ }
27
+ }
28
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/testing/robot/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAC,iBAAiB,EAAC,MAAM,oCAAoC,CAAA;AACpE,OAAO,EAAC,kBAAkB,EAAoB,MAAM,+BAA+B,CAAA;AAEnF,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,cAAc;IAC1D,MAAM,CAAU,WAAW,GAAG,iDAAiD,CAAA;IAC/E,MAAM,CAAU,QAAQ,GAAG;QACzB,4DAA4D;QAC5D,mEAAmE;KACpE,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,sBAAsB;QACzB,GAAG,kBAAkB;KACtB,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAA;QAClD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,yBAAyB,EAAE,GAAG,EAAE,CACpE,iBAAiB,CAAC,EAAC,GAAG,wBAAwB,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,EAAC,CAAC,CAClF,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACxB,IAAI,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAA;gBACpC,OAAM;YACR,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAA;QACtC,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { AgentiaCommand } from '../../lib/agentia-command.js';
2
+ import { type TestingBuildRunResult } from '../../lib/testing-types.js';
3
+ export default class TestingRun 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
+ project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
14
+ domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
+ org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
+ pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
+ };
18
+ run(): Promise<TestingBuildRunResult>;
19
+ }
@@ -0,0 +1,32 @@
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 { runTestingBuild } from '../../lib/testing-operations.js';
5
+ import { formatTestingRecord } from '../../lib/testing-types.js';
6
+ export default class TestingRun 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> --json',
17
+ ];
18
+ static flags = {
19
+ ...testingConnectionFlags,
20
+ ...testingProjectFlag,
21
+ };
22
+ async run() {
23
+ 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 }));
25
+ this.display(() => {
26
+ this.log('Testing run started');
27
+ this.log(formatTestingRecord({ build: result.build, jobId: result.jobId, projectId: result.projectId }));
28
+ });
29
+ return result;
30
+ }
31
+ }
32
+ //# sourceMappingURL=run.js.map
@@ -0,0 +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,O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AAC,CAAC,CAAA;QACxG,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { AgentiaCommand } from '../../lib/agentia-command.js';
2
+ import { type TestingBuild } from '../../lib/testing-types.js';
3
+ export default class TestingStatus extends AgentiaCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ job: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
+ 'result-size': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
9
+ status: import("@oclif/core/interfaces").OptionFlag<"failed" | "aborted" | "executing" | "finished" | "queued" | "succeeded" | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
+ project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
11
+ domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
+ };
15
+ run(): Promise<TestingBuild[]>;
16
+ }
@@ -0,0 +1,47 @@
1
+ import { Flags } from '@oclif/core';
2
+ import { AgentiaCommand } from '../../lib/agentia-command.js';
3
+ import { testingConnectionFlags, testingConnectionOptions, testingProjectFlag } from '../../lib/testing-flags.js';
4
+ import { listTestingBuilds } from '../../lib/testing-operations.js';
5
+ import { formatTestingTable, TESTING_BUILD_STATUSES } from '../../lib/testing-types.js';
6
+ export default class TestingStatus extends AgentiaCommand {
7
+ static description = 'List Copado Robotic Testing run status';
8
+ static examples = [
9
+ '<%= config.bin %> <%= command.id %> --project <project-id>',
10
+ '<%= config.bin %> <%= command.id %> --project <project-id> --job <job-id> --status executing --json',
11
+ ];
12
+ static flags = {
13
+ ...testingConnectionFlags,
14
+ ...testingProjectFlag,
15
+ job: Flags.integer({
16
+ description: 'Limit status to one CRT job/test ID.',
17
+ }),
18
+ 'result-size': Flags.option({
19
+ default: 'compact',
20
+ description: 'CRT build result size.',
21
+ options: ['compact'],
22
+ })(),
23
+ status: Flags.option({
24
+ description: 'Build status filter.',
25
+ options: [...TESTING_BUILD_STATUSES],
26
+ })(),
27
+ };
28
+ async run() {
29
+ const { flags } = await this.parse(TestingStatus);
30
+ const builds = await this.withSpinner('Fetching testing run status', () => listTestingBuilds({
31
+ ...testingConnectionOptions(flags),
32
+ jobId: flags.job,
33
+ projectId: flags.project,
34
+ resultSize: flags['result-size'],
35
+ status: flags.status,
36
+ }));
37
+ this.display(() => {
38
+ if (builds.length === 0) {
39
+ this.log('No testing runs found.');
40
+ return;
41
+ }
42
+ this.log(formatTestingTable(builds));
43
+ });
44
+ return builds;
45
+ }
46
+ }
47
+ //# sourceMappingURL=status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/commands/testing/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAC,sBAAsB,EAAE,wBAAwB,EAAE,kBAAkB,EAAC,MAAM,4BAA4B,CAAA;AAC/G,OAAO,EAAC,iBAAiB,EAAC,MAAM,iCAAiC,CAAA;AACjE,OAAO,EAAC,kBAAkB,EAAE,sBAAsB,EAA6C,MAAM,4BAA4B,CAAA;AAEjI,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,cAAc;IACvD,MAAM,CAAU,WAAW,GAAG,wCAAwC,CAAA;IACtE,MAAM,CAAU,QAAQ,GAAG;QACzB,4DAA4D;QAC5D,qGAAqG;KACtG,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,sBAAsB;QACzB,GAAG,kBAAkB;QACrB,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC;YACjB,WAAW,EAAE,sCAAsC;SACpD,CAAC;QACF,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC;YAC1B,OAAO,EAAE,SAAS;YAClB,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,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAA;QACtC,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC"}
@@ -0,0 +1 @@
1
+ export { default } from '../create.js';
@@ -0,0 +1,2 @@
1
+ export { default } from '../create.js';
2
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/testing/test/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAA"}
@@ -0,0 +1 @@
1
+ export { default } from '../logs.js';
@@ -0,0 +1,2 @@
1
+ export { default } from '../logs.js';
2
+ //# sourceMappingURL=logs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs.js","sourceRoot":"","sources":["../../../../src/commands/testing/test/logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAA"}
@@ -0,0 +1 @@
1
+ export { default } from '../run.js';
@@ -0,0 +1,2 @@
1
+ export { default } from '../run.js';
2
+ //# sourceMappingURL=run.js.map
@@ -0,0 +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"}
@@ -0,0 +1 @@
1
+ export { default } from '../status.js';
@@ -0,0 +1,2 @@
1
+ export { default } from '../status.js';
2
+ //# sourceMappingURL=status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.js","sourceRoot":"","sources":["../../../../src/commands/testing/test/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAA"}
@@ -0,0 +1 @@
1
+ export { default } from '../update.js';
@@ -0,0 +1,2 @@
1
+ export { default } from '../update.js';
2
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/testing/test/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAA"}
@@ -0,0 +1,29 @@
1
+ import { AgentiaCommand } from '../../lib/agentia-command.js';
2
+ import { type TestingFileOperation } from '../../lib/testing-types.js';
3
+ export type TestingUpdateResult = {
4
+ operations: TestingFileOperation[];
5
+ response: Record<string, unknown>;
6
+ };
7
+ export default class TestingUpdate extends AgentiaCommand {
8
+ static args: {
9
+ id: import("@oclif/core/interfaces").Arg<number, {
10
+ max?: number;
11
+ min?: number;
12
+ }>;
13
+ };
14
+ static description: string;
15
+ static examples: string[];
16
+ static flags: {
17
+ 'author-email': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
18
+ 'author-name': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
19
+ add: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
20
+ remove: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
21
+ replace: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
22
+ branch: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
23
+ project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
24
+ domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
25
+ org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
26
+ pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
27
+ };
28
+ run(): Promise<TestingUpdateResult>;
29
+ }
@@ -0,0 +1,57 @@
1
+ import { Args, Flags } from '@oclif/core';
2
+ import { AgentiaCommand } from '../../lib/agentia-command.js';
3
+ import { testingBranchFlag, testingConnectionFlags, testingConnectionOptions, testingProjectFlag, testingUploadOperationFlags, } from '../../lib/testing-flags.js';
4
+ import { buildFileOperationsFromSpecs, DEFAULT_TESTING_AUTHOR, uploadTestingJobFiles } from '../../lib/testing-operations.js';
5
+ import { formatTestingRecord } from '../../lib/testing-types.js';
6
+ export default class TestingUpdate extends AgentiaCommand {
7
+ static args = {
8
+ id: Args.integer({
9
+ description: 'CRT job/test ID.',
10
+ required: true,
11
+ }),
12
+ };
13
+ static description = 'Update a Copado Robotic Testing test by uploading file operations';
14
+ static examples = [
15
+ '<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --replace tests.robot',
16
+ '<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --add new.robot --remove old.robot --json',
17
+ ];
18
+ static flags = {
19
+ ...testingConnectionFlags,
20
+ ...testingProjectFlag,
21
+ ...testingBranchFlag,
22
+ ...testingUploadOperationFlags,
23
+ 'author-email': Flags.string({
24
+ default: DEFAULT_TESTING_AUTHOR.email,
25
+ description: 'Author email for CRT file history.',
26
+ }),
27
+ 'author-name': Flags.string({
28
+ default: DEFAULT_TESTING_AUTHOR.name,
29
+ description: 'Author name for CRT file history.',
30
+ }),
31
+ };
32
+ async run() {
33
+ const { args, flags } = await this.parse(TestingUpdate);
34
+ const operations = buildFileOperationsFromSpecs({
35
+ add: flags.add,
36
+ remove: flags.remove,
37
+ replace: flags.replace,
38
+ });
39
+ if (operations.length === 0) {
40
+ this.error('Provide at least one of --add, --replace, or --remove.', { exit: 2 });
41
+ }
42
+ const result = await this.withSpinner('Updating testing test', () => uploadTestingJobFiles({
43
+ ...testingConnectionOptions(flags),
44
+ author: { email: flags['author-email'], name: flags['author-name'] },
45
+ branch: flags.branch,
46
+ jobId: args.id,
47
+ operations,
48
+ projectId: flags.project,
49
+ }));
50
+ this.display(() => {
51
+ this.log(`Testing test updated with ${operations.length} file operation(s).`);
52
+ this.log(formatTestingRecord(result.response));
53
+ });
54
+ return result;
55
+ }
56
+ }
57
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/commands/testing/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB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,wDAAwD,EAAE,EAAC,IAAI,EAAE,CAAC,EAAC,CAAC,CAAA;QACjF,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,uBAAuB,EAAE,GAAG,EAAE,CAClE,qBAAqB,CAAC;YACpB,GAAG,wBAAwB,CAAC,KAAK,CAAC;YAClC,MAAM,EAAE,EAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,EAAC;YAClE,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,KAAK,EAAE,IAAI,CAAC,EAAE;YACd,UAAU;YACV,SAAS,EAAE,KAAK,CAAC,OAAO;SACzB,CAAC,CACH,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,6BAA6B,UAAU,CAAC,MAAM,qBAAqB,CAAC,CAAA;YAC7E,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAA;QAChD,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
2
+ export default class TestingVariableCreate extends AgentiaCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
+ job: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
+ key: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
9
+ robot: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
+ sensitive: import("@oclif/core/interfaces").BooleanFlag<boolean>;
11
+ type: import("@oclif/core/interfaces").OptionFlag<"clp" | "dataset" | "secret" | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ 'user-specific': import("@oclif/core/interfaces").BooleanFlag<boolean>;
13
+ value: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
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<unknown>;
20
+ }
@@ -0,0 +1,65 @@
1
+ import { Flags } from '@oclif/core';
2
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
3
+ import { testingConnectionFlags, testingConnectionOptions, testingProjectFlag, } from '../../../lib/testing-flags.js';
4
+ import { createTestingVariable } from '../../../lib/testing-operations.js';
5
+ import { formatTestingRecord, TESTING_VARIABLE_TYPES } from '../../../lib/testing-types.js';
6
+ export default class TestingVariableCreate extends AgentiaCommand {
7
+ static description = 'Create a Copado Robotic Testing variable/secret';
8
+ static examples = [
9
+ '<%= config.bin %> <%= command.id %> --project <project-id> --key BASE_URL --value https://example.com',
10
+ '<%= config.bin %> <%= command.id %> --project <project-id> --key TOKEN --value secret --sensitive --json',
11
+ ];
12
+ static flags = {
13
+ ...testingConnectionFlags,
14
+ ...testingProjectFlag,
15
+ description: Flags.string({
16
+ description: 'Variable description.',
17
+ }),
18
+ job: Flags.integer({
19
+ description: 'Scope the variable to a CRT job/test ID.',
20
+ }),
21
+ key: Flags.string({
22
+ description: 'Variable key.',
23
+ required: true,
24
+ }),
25
+ robot: Flags.integer({
26
+ description: 'Scope the variable to a CRT robot ID.',
27
+ }),
28
+ sensitive: Flags.boolean({
29
+ default: false,
30
+ description: 'Mark the variable as sensitive.',
31
+ }),
32
+ type: Flags.option({
33
+ description: 'CRT variable type.',
34
+ options: [...TESTING_VARIABLE_TYPES],
35
+ })(),
36
+ 'user-specific': Flags.boolean({
37
+ default: false,
38
+ description: 'Create a user-specific variable.',
39
+ }),
40
+ value: Flags.string({
41
+ description: 'Variable value. Avoid this flag for secrets if shell history is a concern.',
42
+ }),
43
+ };
44
+ async run() {
45
+ const { flags } = await this.parse(TestingVariableCreate);
46
+ const result = await this.withSpinner('Creating testing variable', () => createTestingVariable({
47
+ ...testingConnectionOptions(flags),
48
+ description: flags.description,
49
+ jobId: flags.job,
50
+ key: flags.key,
51
+ projectId: flags.project,
52
+ robotId: flags.robot,
53
+ sensitive: flags.sensitive,
54
+ type: flags.type,
55
+ userSpecific: flags['user-specific'],
56
+ value: flags.value,
57
+ }));
58
+ this.display(() => {
59
+ this.log('Testing variable created');
60
+ this.log(formatTestingRecord(result));
61
+ });
62
+ return result;
63
+ }
64
+ }
65
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/testing/variable/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,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,WAAW,GAAG,iDAAiD,CAAA;IAC/E,MAAM,CAAU,QAAQ,GAAG;QACzB,uGAAuG;QACvG,0GAA0G;KAC3G,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,sBAAsB;QACzB,GAAG,kBAAkB;QACrB,WAAW,EAAE,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EAAE,KAAK,CAAC,IAAuC;YACnD,YAAY,EAAE,KAAK,CAAC,eAAe,CAAC;YACpC,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB,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,19 @@
1
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
2
+ export type TestingVariableDeleteResult = {
3
+ projectId: number;
4
+ variableId: string;
5
+ };
6
+ export default class TestingVariableDelete extends AgentiaCommand {
7
+ static args: {
8
+ id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
9
+ };
10
+ static description: string;
11
+ static examples: string[];
12
+ static flags: {
13
+ project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
14
+ domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
+ org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
+ pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
+ };
18
+ run(): Promise<TestingVariableDeleteResult>;
19
+ }
@@ -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 { deleteTestingVariable } from '../../../lib/testing-operations.js';
5
+ export default class TestingVariableDelete extends AgentiaCommand {
6
+ static args = {
7
+ id: Args.string({
8
+ description: 'CRT variable/secret ID.',
9
+ required: true,
10
+ }),
11
+ };
12
+ static description = 'Delete a Copado Robotic Testing variable/secret';
13
+ static examples = [
14
+ '<%= config.bin %> <%= command.id %> <variable-id> --project <project-id>',
15
+ '<%= config.bin %> <%= command.id %> <variable-id> --project <project-id> --json',
16
+ ];
17
+ static flags = {
18
+ ...testingConnectionFlags,
19
+ ...testingProjectFlag,
20
+ };
21
+ async run() {
22
+ const { args, flags } = await this.parse(TestingVariableDelete);
23
+ const result = await this.withSpinner('Deleting testing variable', () => deleteTestingVariable({ ...testingConnectionOptions(flags), projectId: flags.project, variableId: args.id }));
24
+ this.display(() => {
25
+ this.log(`Deleted testing variable ${args.id}.`);
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/variable/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,qBAAqB,EAAC,MAAM,oCAAoC,CAAA;AAOxE,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,cAAc;IAC/D,MAAM,CAAU,IAAI,GAAG;QACrB,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC;YACd,WAAW,EAAE,yBAAyB;YACtC,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAA;IACD,MAAM,CAAU,WAAW,GAAG,iDAAiD,CAAA;IAC/E,MAAM,CAAU,QAAQ,GAAG;QACzB,0EAA0E;QAC1E,iFAAiF;KAClF,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,qBAAqB,CAAC,CAAA;QAC7D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,2BAA2B,EAAE,GAAG,EAAE,CACtE,qBAAqB,CAAC,EAAC,GAAG,wBAAwB,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,EAAC,CAAC,CAC3G,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,4BAA4B,IAAI,CAAC,EAAE,GAAG,CAAC,CAAA;QAClD,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
2
+ import { type TestingVariable } from '../../../lib/testing-types.js';
3
+ export default class TestingVariableList extends AgentiaCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ job: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
+ robot: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
+ project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
10
+ domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ };
14
+ run(): Promise<TestingVariable[]>;
15
+ }