@copado/agentia-cli 0.37.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.
- package/README.md +430 -109
- package/dist/commands/auth/set.js +2 -3
- package/dist/commands/auth/set.js.map +1 -1
- package/dist/commands/testing/build/abort.d.ts +26 -0
- package/dist/commands/testing/build/abort.js +38 -0
- package/dist/commands/testing/build/abort.js.map +1 -0
- package/dist/commands/testing/build/list.js +2 -2
- package/dist/commands/testing/build/list.js.map +1 -1
- package/dist/commands/testing/build/run.d.ts +8 -0
- package/dist/commands/testing/build/run.js +4 -2
- package/dist/commands/testing/build/run.js.map +1 -1
- package/dist/commands/testing/job/delete.d.ts +24 -0
- package/dist/commands/testing/job/delete.js +30 -0
- package/dist/commands/testing/job/delete.js.map +1 -0
- package/dist/commands/testing/job/list.js +2 -2
- package/dist/commands/testing/job/list.js.map +1 -1
- package/dist/commands/testing/job/run.d.ts +1 -0
- package/dist/commands/testing/job/run.js +2 -0
- package/dist/commands/testing/job/run.js.map +1 -0
- package/dist/commands/testing/job/update.d.ts +35 -0
- package/dist/commands/testing/job/update.js +125 -0
- package/dist/commands/testing/job/update.js.map +1 -0
- package/dist/commands/testing/project/delete.d.ts +22 -0
- package/dist/commands/testing/project/delete.js +29 -0
- package/dist/commands/testing/project/delete.js.map +1 -0
- package/dist/commands/testing/robot/delete.d.ts +21 -0
- package/dist/commands/testing/robot/delete.js +30 -0
- package/dist/commands/testing/robot/delete.js.map +1 -0
- package/dist/commands/testing/run.d.ts +8 -0
- package/dist/commands/testing/run.js +4 -2
- package/dist/commands/testing/run.js.map +1 -1
- package/dist/commands/testing/status.js +2 -2
- package/dist/commands/testing/status.js.map +1 -1
- package/dist/commands/testing/test/run.d.ts +34 -1
- package/dist/commands/testing/test/run.js +58 -1
- package/dist/commands/testing/test/run.js.map +1 -1
- package/dist/commands/testing/variable/create.d.ts +1 -1
- package/dist/commands/testing/variable/update.d.ts +21 -0
- package/dist/commands/testing/variable/update.js +63 -0
- package/dist/commands/testing/variable/update.js.map +1 -0
- package/dist/lib/mcp/testing-tools.d.ts +84 -2
- package/dist/lib/mcp/testing-tools.js +197 -13
- package/dist/lib/mcp/testing-tools.js.map +1 -1
- package/dist/lib/mcp/tools.d.ts +137 -0
- package/dist/lib/testing-flags.d.ts +26 -1
- package/dist/lib/testing-flags.js +61 -0
- package/dist/lib/testing-flags.js.map +1 -1
- package/dist/lib/testing-operations.d.ts +77 -5
- package/dist/lib/testing-operations.js +136 -15
- package/dist/lib/testing-operations.js.map +1 -1
- package/dist/lib/testing-types.d.ts +52 -1
- package/dist/lib/testing-types.js +65 -1
- package/dist/lib/testing-types.js.map +1 -1
- package/oclif.manifest.json +940 -49
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../lib/agentia-command.js';
|
|
3
|
-
import { testingConnectionFlags,
|
|
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(
|
|
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,
|
|
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,kBAAkB,EAAE,qBAAqB,EAAE,iBAAiB,EAAC,MAAM,4BAA4B,CAAA;AAC/H,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,mGAAmG;QACnG,4EAA4E;KAC7E,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,sBAAsB;QACzB,GAAG,kBAAkB;QACrB,GAAG,qBAAqB;KACzB,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,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 {
|
|
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(
|
|
42
|
+
this.log(formatTestingBuildTable(builds));
|
|
43
43
|
});
|
|
44
44
|
return builds;
|
|
45
45
|
}
|
|
@@ -1 +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,
|
|
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,EACL,uBAAuB,EACvB,sBAAsB,GAGvB,MAAM,4BAA4B,CAAA;AAEnC,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,uBAAuB,CAAC,MAAM,CAAC,CAAC,CAAA;QAC3C,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC"}
|
|
@@ -1 +1,34 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
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;AA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AE,SAAS,CAAC,SAAS,EAAC,CAAC,CAAC,CAAA;YACjH,CAAC,CAAC,CAAA;YAEF,OAAO,SAAS,CAAA;QAClB,CAAC;QAED,MAAM,OAAO,GAAG,kBAAkB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;QACnD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,4BAA4B,EAAE,GAAG,EAAE,CACrE,yBAAyB,CAAC;YACxB,GAAG,iBAAiB,CAAC,KAAK,EAAE,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,EAAC,CAAC;YACvE,OAAO;SACR,CAAC,CACH,CAAA;QACD,MAAM,MAAM,GAAG,EAAC,GAAG,SAAS,EAAE,UAAU,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAC,CAAA;QAE3D,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAA;YAChC,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,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,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,CAAC,KAAK,CAAC,sDAAsD,EAAE,EAAC,IAAI,EAAE,CAAC,EAAC,CAAC,CAAA;QAC/E,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,2BAA2B,EAAE,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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
import { type TestingBuildStatus, type TestingVariableType } from '../testing-types.js';
|
|
2
|
+
import { type TestingBuildStatus, type TestingJobParallelMode, type TestingJobSuiteType, type TestingRecordBuildOption, type TestingVariableType } from '../testing-types.js';
|
|
3
3
|
type ConnectionArgs = {
|
|
4
4
|
domain?: string;
|
|
5
5
|
org?: number;
|
|
@@ -8,6 +8,16 @@ type ConnectionArgs = {
|
|
|
8
8
|
type ProjectArgs = ConnectionArgs & {
|
|
9
9
|
project: number;
|
|
10
10
|
};
|
|
11
|
+
type RunOptionArgs = {
|
|
12
|
+
branch?: string;
|
|
13
|
+
exclude?: string[];
|
|
14
|
+
include?: string[];
|
|
15
|
+
param?: string[];
|
|
16
|
+
record?: TestingRecordBuildOption;
|
|
17
|
+
rerunFailed?: number;
|
|
18
|
+
rerunFailedFromLatest?: boolean;
|
|
19
|
+
tag?: string;
|
|
20
|
+
};
|
|
11
21
|
declare function testingProjectList(args?: ConnectionArgs & {
|
|
12
22
|
name?: string;
|
|
13
23
|
}): Promise<{
|
|
@@ -24,6 +34,14 @@ declare function testingProjectGet(args: ConnectionArgs & {
|
|
|
24
34
|
}): Promise<{
|
|
25
35
|
result: import("../testing-types.js").TestingProject;
|
|
26
36
|
}>;
|
|
37
|
+
declare function testingProjectDelete(args: ConnectionArgs & {
|
|
38
|
+
id: number;
|
|
39
|
+
}): Promise<{
|
|
40
|
+
result: {
|
|
41
|
+
deleted: true;
|
|
42
|
+
projectId: number;
|
|
43
|
+
};
|
|
44
|
+
}>;
|
|
27
45
|
declare function testingRobotList(args: ProjectArgs): Promise<{
|
|
28
46
|
result: import("../testing-types.js").TestingRobot[];
|
|
29
47
|
}>;
|
|
@@ -32,6 +50,15 @@ declare function testingRobotGet(args: ProjectArgs & {
|
|
|
32
50
|
}): Promise<{
|
|
33
51
|
result: import("../testing-types.js").TestingRobot;
|
|
34
52
|
}>;
|
|
53
|
+
declare function testingRobotDelete(args: ProjectArgs & {
|
|
54
|
+
id: string;
|
|
55
|
+
}): Promise<{
|
|
56
|
+
result: {
|
|
57
|
+
deleted: true;
|
|
58
|
+
projectId: number;
|
|
59
|
+
robotId: number | string;
|
|
60
|
+
};
|
|
61
|
+
}>;
|
|
35
62
|
declare function testingRobotCreate(args: ProjectArgs & {
|
|
36
63
|
description?: string;
|
|
37
64
|
fwVersion?: string;
|
|
@@ -52,6 +79,32 @@ declare function testingJobGet(args: ProjectArgs & {
|
|
|
52
79
|
}): Promise<{
|
|
53
80
|
result: import("../testing-types.js").TestingJob;
|
|
54
81
|
}>;
|
|
82
|
+
declare function testingJobUpdate(args: ProjectArgs & {
|
|
83
|
+
caseDurationChangeDetection?: boolean;
|
|
84
|
+
description?: string;
|
|
85
|
+
hideVideoParams?: boolean;
|
|
86
|
+
id: number;
|
|
87
|
+
name?: string;
|
|
88
|
+
parallelMode?: TestingJobParallelMode;
|
|
89
|
+
robot?: number;
|
|
90
|
+
screenDepth?: number;
|
|
91
|
+
screenHeight?: number;
|
|
92
|
+
screenWidth?: number;
|
|
93
|
+
showVideoParams?: boolean;
|
|
94
|
+
suiteType?: TestingJobSuiteType;
|
|
95
|
+
timeout?: string;
|
|
96
|
+
}): Promise<{
|
|
97
|
+
result: import("../testing-types.js").TestingJob;
|
|
98
|
+
}>;
|
|
99
|
+
declare function testingJobDelete(args: ProjectArgs & {
|
|
100
|
+
id: number;
|
|
101
|
+
}): Promise<{
|
|
102
|
+
result: {
|
|
103
|
+
deleted: true;
|
|
104
|
+
jobId: number;
|
|
105
|
+
projectId: number;
|
|
106
|
+
};
|
|
107
|
+
}>;
|
|
55
108
|
declare function testingJobCreate(args: ProjectArgs & {
|
|
56
109
|
description?: string;
|
|
57
110
|
dir?: string[];
|
|
@@ -88,7 +141,7 @@ declare function testingJobDownload(args: ProjectArgs & {
|
|
|
88
141
|
}): Promise<{
|
|
89
142
|
result: import("../testing-types.js").TestingDownloadResult;
|
|
90
143
|
}>;
|
|
91
|
-
declare function testingBuildRun(args: ProjectArgs & {
|
|
144
|
+
declare function testingBuildRun(args: ProjectArgs & RunOptionArgs & {
|
|
92
145
|
job: number;
|
|
93
146
|
}): Promise<{
|
|
94
147
|
result: import("../testing-types.js").TestingBuildRunResult;
|
|
@@ -107,6 +160,17 @@ declare function testingBuildLogs(args: ProjectArgs & {
|
|
|
107
160
|
}): Promise<{
|
|
108
161
|
result: import("../testing-types.js").TestingLogResult;
|
|
109
162
|
}>;
|
|
163
|
+
declare function testingBuildAbort(args: ProjectArgs & {
|
|
164
|
+
build: number;
|
|
165
|
+
job: number;
|
|
166
|
+
}): Promise<{
|
|
167
|
+
result: {
|
|
168
|
+
build: import("../testing-types.js").TestingRecord;
|
|
169
|
+
buildId: number;
|
|
170
|
+
jobId: number;
|
|
171
|
+
projectId: number;
|
|
172
|
+
};
|
|
173
|
+
}>;
|
|
110
174
|
declare function testingVariableList(args: ProjectArgs & {
|
|
111
175
|
job?: number;
|
|
112
176
|
robot?: number;
|
|
@@ -125,6 +189,17 @@ declare function testingVariableCreate(args: ProjectArgs & {
|
|
|
125
189
|
}): Promise<{
|
|
126
190
|
result: unknown;
|
|
127
191
|
}>;
|
|
192
|
+
declare function testingVariableUpdate(args: ProjectArgs & {
|
|
193
|
+
description?: string;
|
|
194
|
+
id: string;
|
|
195
|
+
key?: string;
|
|
196
|
+
notSensitive?: boolean;
|
|
197
|
+
sensitive?: boolean;
|
|
198
|
+
type?: TestingVariableType;
|
|
199
|
+
value?: string;
|
|
200
|
+
}): Promise<{
|
|
201
|
+
result: unknown;
|
|
202
|
+
}>;
|
|
128
203
|
declare function testingVariableDelete(args: ProjectArgs & {
|
|
129
204
|
id: string;
|
|
130
205
|
}): Promise<{
|
|
@@ -134,21 +209,27 @@ declare function testingVariableDelete(args: ProjectArgs & {
|
|
|
134
209
|
};
|
|
135
210
|
}>;
|
|
136
211
|
export declare const agentiaMcpTestingToolHandlers: {
|
|
212
|
+
testingBuildAbort: typeof testingBuildAbort;
|
|
137
213
|
testingBuildList: typeof testingBuildList;
|
|
138
214
|
testingBuildLogs: typeof testingBuildLogs;
|
|
139
215
|
testingBuildRun: typeof testingBuildRun;
|
|
140
216
|
testingCreate: typeof testingJobCreate;
|
|
141
217
|
testingJobCreate: typeof testingJobCreate;
|
|
218
|
+
testingJobDelete: typeof testingJobDelete;
|
|
142
219
|
testingJobDownload: typeof testingJobDownload;
|
|
143
220
|
testingJobFiles: typeof testingJobFiles;
|
|
144
221
|
testingJobGet: typeof testingJobGet;
|
|
145
222
|
testingJobList: typeof testingJobList;
|
|
223
|
+
testingJobRun: typeof testingBuildRun;
|
|
224
|
+
testingJobUpdate: typeof testingJobUpdate;
|
|
146
225
|
testingJobUpload: typeof testingJobUpload;
|
|
147
226
|
testingLogs: typeof testingBuildLogs;
|
|
148
227
|
testingProjectCreate: typeof testingProjectCreate;
|
|
228
|
+
testingProjectDelete: typeof testingProjectDelete;
|
|
149
229
|
testingProjectGet: typeof testingProjectGet;
|
|
150
230
|
testingProjectList: typeof testingProjectList;
|
|
151
231
|
testingRobotCreate: typeof testingRobotCreate;
|
|
232
|
+
testingRobotDelete: typeof testingRobotDelete;
|
|
152
233
|
testingRobotGet: typeof testingRobotGet;
|
|
153
234
|
testingRobotList: typeof testingRobotList;
|
|
154
235
|
testingRun: typeof testingBuildRun;
|
|
@@ -157,6 +238,7 @@ export declare const agentiaMcpTestingToolHandlers: {
|
|
|
157
238
|
testingVariableCreate: typeof testingVariableCreate;
|
|
158
239
|
testingVariableDelete: typeof testingVariableDelete;
|
|
159
240
|
testingVariableList: typeof testingVariableList;
|
|
241
|
+
testingVariableUpdate: typeof testingVariableUpdate;
|
|
160
242
|
};
|
|
161
243
|
export declare function registerAgentiaMcpTestingTools(server: McpServer): void;
|
|
162
244
|
export {};
|