@copado/agentia-cli 0.29.0-alpha.0 → 0.31.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 (108) hide show
  1. package/README.md +918 -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 +43 -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/list.d.ts +14 -0
  30. package/dist/commands/testing/job/list.js +32 -0
  31. package/dist/commands/testing/job/list.js.map +1 -0
  32. package/dist/commands/testing/job/upload.d.ts +29 -0
  33. package/dist/commands/testing/job/upload.js +57 -0
  34. package/dist/commands/testing/job/upload.js.map +1 -0
  35. package/dist/commands/testing/logs.d.ts +21 -0
  36. package/dist/commands/testing/logs.js +42 -0
  37. package/dist/commands/testing/logs.js.map +1 -0
  38. package/dist/commands/testing/project/create.d.ts +14 -0
  39. package/dist/commands/testing/project/create.js +36 -0
  40. package/dist/commands/testing/project/create.js.map +1 -0
  41. package/dist/commands/testing/project/list.d.ts +13 -0
  42. package/dist/commands/testing/project/list.js +31 -0
  43. package/dist/commands/testing/project/list.js.map +1 -0
  44. package/dist/commands/testing/robot/create.d.ts +19 -0
  45. package/dist/commands/testing/robot/create.js +60 -0
  46. package/dist/commands/testing/robot/create.js.map +1 -0
  47. package/dist/commands/testing/robot/list.d.ts +13 -0
  48. package/dist/commands/testing/robot/list.js +28 -0
  49. package/dist/commands/testing/robot/list.js.map +1 -0
  50. package/dist/commands/testing/run.d.ts +19 -0
  51. package/dist/commands/testing/run.js +32 -0
  52. package/dist/commands/testing/run.js.map +1 -0
  53. package/dist/commands/testing/status.d.ts +16 -0
  54. package/dist/commands/testing/status.js +47 -0
  55. package/dist/commands/testing/status.js.map +1 -0
  56. package/dist/commands/testing/test/create.d.ts +1 -0
  57. package/dist/commands/testing/test/create.js +2 -0
  58. package/dist/commands/testing/test/create.js.map +1 -0
  59. package/dist/commands/testing/test/logs.d.ts +1 -0
  60. package/dist/commands/testing/test/logs.js +2 -0
  61. package/dist/commands/testing/test/logs.js.map +1 -0
  62. package/dist/commands/testing/test/run.d.ts +1 -0
  63. package/dist/commands/testing/test/run.js +2 -0
  64. package/dist/commands/testing/test/run.js.map +1 -0
  65. package/dist/commands/testing/test/status.d.ts +1 -0
  66. package/dist/commands/testing/test/status.js +2 -0
  67. package/dist/commands/testing/test/status.js.map +1 -0
  68. package/dist/commands/testing/test/update.d.ts +1 -0
  69. package/dist/commands/testing/test/update.js +2 -0
  70. package/dist/commands/testing/test/update.js.map +1 -0
  71. package/dist/commands/testing/update.d.ts +29 -0
  72. package/dist/commands/testing/update.js +57 -0
  73. package/dist/commands/testing/update.js.map +1 -0
  74. package/dist/commands/testing/variable/create.d.ts +20 -0
  75. package/dist/commands/testing/variable/create.js +65 -0
  76. package/dist/commands/testing/variable/create.js.map +1 -0
  77. package/dist/commands/testing/variable/delete.d.ts +19 -0
  78. package/dist/commands/testing/variable/delete.js +30 -0
  79. package/dist/commands/testing/variable/delete.js.map +1 -0
  80. package/dist/commands/testing/variable/list.d.ts +15 -0
  81. package/dist/commands/testing/variable/list.js +40 -0
  82. package/dist/commands/testing/variable/list.js.map +1 -0
  83. package/dist/lib/credential-store.d.ts +4 -0
  84. package/dist/lib/credential-store.js +14 -0
  85. package/dist/lib/credential-store.js.map +1 -1
  86. package/dist/lib/mcp/testing-tools.d.ts +144 -0
  87. package/dist/lib/mcp/testing-tools.js +366 -0
  88. package/dist/lib/mcp/testing-tools.js.map +1 -0
  89. package/dist/lib/mcp/tools.d.ts +268 -0
  90. package/dist/lib/mcp/tools.js +3 -0
  91. package/dist/lib/mcp/tools.js.map +1 -1
  92. package/dist/lib/testing-config.d.ts +17 -0
  93. package/dist/lib/testing-config.js +68 -0
  94. package/dist/lib/testing-config.js.map +1 -0
  95. package/dist/lib/testing-flags.d.ts +33 -0
  96. package/dist/lib/testing-flags.js +70 -0
  97. package/dist/lib/testing-flags.js.map +1 -0
  98. package/dist/lib/testing-gateway.d.ts +33 -0
  99. package/dist/lib/testing-gateway.js +161 -0
  100. package/dist/lib/testing-gateway.js.map +1 -0
  101. package/dist/lib/testing-operations.d.ts +99 -0
  102. package/dist/lib/testing-operations.js +268 -0
  103. package/dist/lib/testing-operations.js.map +1 -0
  104. package/dist/lib/testing-types.d.ts +138 -0
  105. package/dist/lib/testing-types.js +190 -0
  106. package/dist/lib/testing-types.js.map +1 -0
  107. package/oclif.manifest.json +2323 -85
  108. package/package.json +4 -1
@@ -0,0 +1,56 @@
1
+ import { Args, Flags } from '@oclif/core';
2
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
3
+ import { testingBranchFlag, testingConnectionFlags, testingConnectionOptions, testingProjectFlag, } from '../../../lib/testing-flags.js';
4
+ import { downloadTestingJobFiles } from '../../../lib/testing-operations.js';
5
+ import { formatTestingTable } from '../../../lib/testing-types.js';
6
+ export default class TestingJobDownload extends AgentiaCommand {
7
+ static args = {
8
+ id: Args.integer({
9
+ description: 'CRT job/test ID.',
10
+ required: true,
11
+ }),
12
+ };
13
+ static description = 'Download files from a Copado Robotic Testing job/test';
14
+ static examples = [
15
+ '<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --file tests.robot',
16
+ '<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --file tests.robot --output-dir ./crt-files --json',
17
+ ];
18
+ static flags = {
19
+ ...testingConnectionFlags,
20
+ ...testingProjectFlag,
21
+ ...testingBranchFlag,
22
+ file: Flags.string({
23
+ char: 'f',
24
+ description: 'Remote CRT file path to download. Can be provided multiple times.',
25
+ multiple: true,
26
+ required: true,
27
+ }),
28
+ 'output-dir': Flags.string({
29
+ description: 'Directory to write downloaded files.',
30
+ }),
31
+ };
32
+ async run() {
33
+ const { args, flags } = await this.parse(TestingJobDownload);
34
+ const result = await this.withSpinner('Downloading testing job files', () => downloadTestingJobFiles({
35
+ ...testingConnectionOptions(flags),
36
+ branch: flags.branch,
37
+ files: flags.file,
38
+ jobId: args.id,
39
+ outputDir: flags['output-dir'],
40
+ projectId: flags.project,
41
+ }));
42
+ this.display(() => {
43
+ if (flags['output-dir'] !== undefined) {
44
+ this.log(`Downloaded files to ${flags['output-dir']}`);
45
+ }
46
+ if (result.files.length > 0) {
47
+ this.log(formatTestingTable(result.files));
48
+ }
49
+ else {
50
+ this.log('Downloaded file response did not include a file listing.');
51
+ }
52
+ });
53
+ return result;
54
+ }
55
+ }
56
+ //# sourceMappingURL=download.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"download.js","sourceRoot":"","sources":["../../../../src/commands/testing/job/download.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AAEvC,OAAO,EAAC,cAAc,EAAC,MAA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C,EAAE;YACd,SAAS,EAAE,KAAK,CAAC,YAAY,CAAC;YAC9B,SAAS,EAAE,KAAK,CAAC,OAAO;SACzB,CAAC,CACH,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,KAAK,CAAC,YAAY,CAAC,KAAK,SAAS,EAAE,CAAC;gBACtC,IAAI,CAAC,GAAG,CAAC,uBAAuB,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;YACxD,CAAC;YAED,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC5B,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;YAC5C,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,GAAG,CAAC,0DAA0D,CAAC,CAAA;YACtE,CAAC;QACH,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
2
+ import { type TestingFileEntry } from '../../../lib/testing-types.js';
3
+ export default class TestingJobFiles 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<TestingFileEntry[]>;
19
+ }
@@ -0,0 +1,35 @@
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 { listTestingJobFiles } from '../../../lib/testing-operations.js';
5
+ import { formatTestingTable } from '../../../lib/testing-types.js';
6
+ export default class TestingJobFiles extends AgentiaCommand {
7
+ static args = {
8
+ id: Args.integer({
9
+ description: 'CRT job/test ID.',
10
+ required: true,
11
+ }),
12
+ };
13
+ static description = 'List files for a Copado Robotic Testing job/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(TestingJobFiles);
24
+ const files = await this.withSpinner('Fetching testing job files', () => listTestingJobFiles({ ...testingConnectionOptions(flags), jobId: args.id, projectId: flags.project }));
25
+ this.display(() => {
26
+ if (files.length === 0) {
27
+ this.log('No testing job files found.');
28
+ return;
29
+ }
30
+ this.log(formatTestingTable(files));
31
+ });
32
+ return files;
33
+ }
34
+ }
35
+ //# sourceMappingURL=files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.js","sourceRoot":"","sources":["../../../../src/commands/testing/job/files.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,mBAAmB,EAAC,MAAM,oCAAoC,CAAA;AACtE,OAAO,EAAC,kBAAkB,EAAwB,MAAM,+BAA+B,CAAA;AAEvF,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,cAAc;IACzD,MAAM,CAAU,IAAI,GAAG;QACrB,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC;YACf,WAAW,EAAE,kBAAkB;YAC/B,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAA;IACD,MAAM,CAAU,WAAW,GAAG,kDAAkD,CAAA;IAChF,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,eAAe,CAAC,CAAA;QACvD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,4BAA4B,EAAE,GAAG,EAAE,CACtE,mBAAmB,CAAC,EAAC,GAAG,wBAAwB,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,EAAC,CAAC,CACpG,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACvB,IAAI,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAA;gBACvC,OAAM;YACR,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAA;QACrC,CAAC,CAAC,CAAA;QAEF,OAAO,KAAK,CAAA;IACd,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
2
+ import { type TestingJob } from '../../../lib/testing-types.js';
3
+ export default class TestingJobList extends AgentiaCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
+ project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
9
+ domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
+ org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ };
13
+ run(): Promise<TestingJob[]>;
14
+ }
@@ -0,0 +1,32 @@
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 { listTestingJobs } from '../../../lib/testing-operations.js';
5
+ import { formatTestingTable } from '../../../lib/testing-types.js';
6
+ export default class TestingJobList extends AgentiaCommand {
7
+ static description = 'List Copado Robotic Testing jobs/tests in a project';
8
+ static examples = [
9
+ '<%= config.bin %> <%= command.id %> --project <project-id>',
10
+ '<%= config.bin %> <%= command.id %> --project <project-id> --name "Smoke" --json',
11
+ ];
12
+ static flags = {
13
+ ...testingConnectionFlags,
14
+ ...testingProjectFlag,
15
+ name: Flags.string({
16
+ description: 'Case-insensitive exact job name to match client-side.',
17
+ }),
18
+ };
19
+ async run() {
20
+ const { flags } = await this.parse(TestingJobList);
21
+ const jobs = await this.withSpinner('Fetching testing jobs', () => listTestingJobs({ ...testingConnectionOptions(flags), name: flags.name, projectId: flags.project }));
22
+ this.display(() => {
23
+ if (jobs.length === 0) {
24
+ this.log('No testing jobs found.');
25
+ return;
26
+ }
27
+ this.log(formatTestingTable(jobs));
28
+ });
29
+ return jobs;
30
+ }
31
+ }
32
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/testing/job/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9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../../lib/testing-types.js';
3
+ export type TestingJobUploadResult = {
4
+ operations: TestingFileOperation[];
5
+ response: Record<string, unknown>;
6
+ };
7
+ export default class TestingJobUpload 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<TestingJobUploadResult>;
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 TestingJobUpload extends AgentiaCommand {
7
+ static args = {
8
+ id: Args.integer({
9
+ description: 'CRT job/test ID.',
10
+ required: true,
11
+ }),
12
+ };
13
+ static description = 'Upload file operations to a Copado Robotic Testing job/test';
14
+ static examples = [
15
+ '<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --add tests.robot',
16
+ '<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --replace local.robot:tests.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(TestingJobUpload);
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('Uploading testing job files', () => 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(`File operations uploaded: ${operations.length}`);
52
+ this.log(formatTestingRecord(result.response));
53
+ });
54
+ return result;
55
+ }
56
+ }
57
+ //# sourceMappingURL=upload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload.js","sourceRoot":"","sources":["../../../../src/commands/testing/job/upload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,KAAK,E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M;YACpB,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB,CAAC,CAAA;QAEF,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC5B,IAAI,CAAC,KAAK,CAAC,wDAAwD,EAAE,EAAC,IAAI,EAAE,CAAC,EAAC,CAAC,CAAA;QACjF,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,6BAA6B,EAAE,GAAG,EAAE,CACxE,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,EAAE,CAAC,CAAA;YAC1D,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,21 @@
1
+ import { AgentiaCommand } from '../../lib/agentia-command.js';
2
+ import { type TestingLogResult } from '../../lib/testing-types.js';
3
+ export default class TestingLogs 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
+ output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
+ job: import("@oclif/core/interfaces").OptionFlag<number, 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<TestingLogResult>;
21
+ }
@@ -0,0 +1,42 @@
1
+ import { Args } from '@oclif/core';
2
+ import { AgentiaCommand } from '../../lib/agentia-command.js';
3
+ import { testingConnectionFlags, testingConnectionOptions, testingJobFlag, testingOutputFlags, testingProjectFlag, } from '../../lib/testing-flags.js';
4
+ import { getTestingBuildLogs } from '../../lib/testing-operations.js';
5
+ export default class TestingLogs extends AgentiaCommand {
6
+ static args = {
7
+ id: Args.integer({
8
+ description: 'CRT build/run ID.',
9
+ required: true,
10
+ }),
11
+ };
12
+ static description = 'Get logs for a Copado Robotic Testing run';
13
+ static examples = [
14
+ '<%= config.bin %> <%= command.id %> <build-id> --project <project-id> --job <job-id>',
15
+ '<%= config.bin %> <%= command.id %> <build-id> --project <project-id> --job <job-id> --output log.html --json',
16
+ ];
17
+ static flags = {
18
+ ...testingConnectionFlags,
19
+ ...testingProjectFlag,
20
+ ...testingJobFlag,
21
+ ...testingOutputFlags,
22
+ };
23
+ async run() {
24
+ const { args, flags } = await this.parse(TestingLogs);
25
+ const result = await this.withSpinner('Fetching testing run logs', () => getTestingBuildLogs({
26
+ ...testingConnectionOptions(flags),
27
+ buildId: args.id,
28
+ jobId: flags.job,
29
+ output: flags.output,
30
+ projectId: flags.project,
31
+ }));
32
+ this.display(() => {
33
+ if (flags.output !== undefined) {
34
+ this.log(`Testing run logs written to ${flags.output}`);
35
+ return;
36
+ }
37
+ process.stdout.write(result.log);
38
+ });
39
+ return result;
40
+ }
41
+ }
42
+ //# sourceMappingURL=logs.js.map
@@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GAAG,EAAE;YAChB,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;gBAC/B,IAAI,CAAC,GAAG,CAAC,+BAA+B,KAAK,CAAC,MAAM,EAAE,CAAC,CAAA;gBACvD,OAAM;YACR,CAAC;YAED,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QAClC,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
2
+ import { type TestingProject } from '../../../lib/testing-types.js';
3
+ export default class TestingProjectCreate extends AgentiaCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
+ name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
9
+ domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
+ org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ };
13
+ run(): Promise<TestingProject>;
14
+ }
@@ -0,0 +1,36 @@
1
+ import { Flags } from '@oclif/core';
2
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
3
+ import { testingConnectionFlags, testingConnectionOptions } from '../../../lib/testing-flags.js';
4
+ import { createTestingProject } from '../../../lib/testing-operations.js';
5
+ import { formatTestingRecord } from '../../../lib/testing-types.js';
6
+ export default class TestingProjectCreate extends AgentiaCommand {
7
+ static description = 'Create a Copado Robotic Testing project';
8
+ static examples = [
9
+ '<%= config.bin %> <%= command.id %> --name "QA Tests"',
10
+ '<%= config.bin %> <%= command.id %> --name "QA Tests" --description "Smoke suite" --json',
11
+ ];
12
+ static flags = {
13
+ ...testingConnectionFlags,
14
+ description: Flags.string({
15
+ description: 'Project description.',
16
+ }),
17
+ name: Flags.string({
18
+ description: 'Project name.',
19
+ required: true,
20
+ }),
21
+ };
22
+ async run() {
23
+ const { flags } = await this.parse(TestingProjectCreate);
24
+ const project = await this.withSpinner('Creating testing project', () => createTestingProject({
25
+ ...testingConnectionOptions(flags),
26
+ description: flags.description,
27
+ name: flags.name,
28
+ }));
29
+ this.display(() => {
30
+ this.log('Testing project created');
31
+ this.log(formatTestingRecord(project));
32
+ });
33
+ return project;
34
+ }
35
+ }
36
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/testing/project/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,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;AACvE,OAAO,EAAC,mBAAmB,EAAsB,MAAM,+BAA+B,CAAA;AAEtF,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,cAAc;IAC9D,MAAM,CAAU,WAAW,GAAG,yCAAyC,CAAA;IACvE,MAAM,CAAU,QAAQ,GAAG;QACzB,uDAAuD;QACvD,0FAA0F;KAC3F,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,sBAAsB;QACzB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC;YACxB,WAAW,EAAE,sBAAsB;SACpC,CAAC;QACF,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE,eAAe;YAC5B,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAA;QACtD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,0BAA0B,EAAE,GAAG,EAAE,CACtE,oBAAoB,CAAC;YACnB,GAAG,wBAAwB,CAAC,KAAK,CAAC;YAClC,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,IAAI,EAAE,KAAK,CAAC,IAAI;SACjB,CAAC,CACH,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAA;YACnC,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAA;QACxC,CAAC,CAAC,CAAA;QAEF,OAAO,OAAO,CAAA;IAChB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
2
+ import { type TestingProject } from '../../../lib/testing-types.js';
3
+ export default class TestingProjectList extends AgentiaCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ name: import("@oclif/core/interfaces").OptionFlag<string | undefined, 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<TestingProject[]>;
13
+ }
@@ -0,0 +1,31 @@
1
+ import { Flags } from '@oclif/core';
2
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
3
+ import { testingConnectionFlags, testingConnectionOptions } from '../../../lib/testing-flags.js';
4
+ import { listTestingProjects } from '../../../lib/testing-operations.js';
5
+ import { formatTestingTable } from '../../../lib/testing-types.js';
6
+ export default class TestingProjectList extends AgentiaCommand {
7
+ static description = 'List Copado Robotic Testing projects';
8
+ static examples = [
9
+ '<%= config.bin %> <%= command.id %>',
10
+ '<%= config.bin %> <%= command.id %> --name "QA Tests" --json',
11
+ ];
12
+ static flags = {
13
+ ...testingConnectionFlags,
14
+ name: Flags.string({
15
+ description: 'Exact project name to match client-side.',
16
+ }),
17
+ };
18
+ async run() {
19
+ const { flags } = await this.parse(TestingProjectList);
20
+ const projects = await this.withSpinner('Fetching testing projects', () => listTestingProjects({ ...testingConnectionOptions(flags), name: flags.name }));
21
+ this.display(() => {
22
+ if (projects.length === 0) {
23
+ this.log('No testing projects found.');
24
+ return;
25
+ }
26
+ this.log(formatTestingTable(projects));
27
+ });
28
+ return projects;
29
+ }
30
+ }
31
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/testing/project/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAC,sBAAsB,EAAE,wBAAwB,EAAC,MAAM,+BAA+B,CAAA;AAC9F,OAAO,EAAC,mBAAmB,EAAC,MAAM,oCAAoC,CAAA;AACtE,OAAO,EAAC,kBAAkB,EAAsB,MAAM,+BAA+B,CAAA;AAErF,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,cAAc;IAC5D,MAAM,CAAU,WAAW,GAAG,sCAAsC,CAAA;IACpE,MAAM,CAAU,QAAQ,GAAG;QACzB,qCAAqC;QACrC,8DAA8D;KAC/D,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,sBAAsB;QACzB,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE,0CAA0C;SACxD,CAAC;KACH,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAA;QACpD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,2BAA2B,EAAE,GAAG,EAAE,CACxE,mBAAmB,CAAC,EAAC,GAAG,wBAAwB,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAC,CAAC,CAC5E,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC1B,IAAI,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAA;gBACtC,OAAM;YACR,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAA;QACxC,CAAC,CAAC,CAAA;QAEF,OAAO,QAAQ,CAAA;IACjB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { AgentiaCommand } from '../../../lib/agentia-command.js';
2
+ import { type TestingRobot } from '../../../lib/testing-types.js';
3
+ export default class TestingRobotCreate extends AgentiaCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ description: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
8
+ 'fw-version': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
9
+ kind: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
10
+ name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
11
+ os: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
12
+ 'robot-type': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
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<TestingRobot>;
19
+ }
@@ -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,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
+ }