@copado/agentia-cli 0.112.0-alpha.0 → 0.114.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 +2014 -450
- package/dist/commands/ai/agent/ask.d.ts +3 -0
- package/dist/commands/ai/agent/ask.js +14 -0
- package/dist/commands/ai/agent/ask.js.map +1 -1
- package/dist/commands/ai/agent/chat.d.ts +3 -0
- package/dist/commands/ai/agent/chat.js +14 -0
- package/dist/commands/ai/agent/chat.js.map +1 -1
- package/dist/commands/cicd/work/set.js +22 -14
- package/dist/commands/cicd/work/set.js.map +1 -1
- package/dist/commands/testing/build/abort.d.ts +7 -1
- package/dist/commands/testing/build/abort.js +13 -3
- package/dist/commands/testing/build/abort.js.map +1 -1
- package/dist/commands/testing/build/get.d.ts +18 -0
- package/dist/commands/testing/build/get.js +38 -0
- package/dist/commands/testing/build/get.js.map +1 -0
- package/dist/commands/testing/build/latest.d.ts +12 -0
- package/dist/commands/testing/build/latest.js +40 -0
- package/dist/commands/testing/build/latest.js.map +1 -0
- package/dist/commands/testing/build/list.d.ts +6 -1
- package/dist/commands/testing/build/list.js +23 -1
- package/dist/commands/testing/build/list.js.map +1 -1
- package/dist/commands/testing/build/logs.d.ts +6 -0
- package/dist/commands/testing/build/logs.js +8 -1
- package/dist/commands/testing/build/logs.js.map +1 -1
- package/dist/commands/testing/build/run.d.ts +27 -4
- package/dist/commands/testing/build/run.js +4 -18
- package/dist/commands/testing/build/run.js.map +1 -1
- package/dist/commands/testing/build/search.d.ts +21 -0
- package/dist/commands/testing/build/search.js +57 -0
- package/dist/commands/testing/build/search.js.map +1 -0
- package/dist/commands/testing/create.d.ts +1 -15
- package/dist/commands/testing/create.js +1 -43
- package/dist/commands/testing/create.js.map +1 -1
- package/dist/commands/testing/data-table/create.d.ts +30 -0
- package/dist/commands/testing/data-table/create.js +52 -0
- package/dist/commands/testing/data-table/create.js.map +1 -0
- package/dist/commands/testing/data-table/delete.d.ts +25 -0
- package/dist/commands/testing/data-table/delete.js +40 -0
- package/dist/commands/testing/data-table/delete.js.map +1 -0
- package/dist/commands/testing/data-table/export.d.ts +33 -0
- package/dist/commands/testing/data-table/export.js +59 -0
- package/dist/commands/testing/data-table/export.js.map +1 -0
- package/dist/commands/testing/data-table/get.d.ts +21 -0
- package/dist/commands/testing/data-table/get.js +35 -0
- package/dist/commands/testing/data-table/get.js.map +1 -0
- package/dist/commands/testing/data-table/list.d.ts +16 -0
- package/dist/commands/testing/data-table/list.js +33 -0
- package/dist/commands/testing/data-table/list.js.map +1 -0
- package/dist/commands/testing/data-table/update.d.ts +34 -0
- package/dist/commands/testing/data-table/update.js +64 -0
- package/dist/commands/testing/data-table/update.js.map +1 -0
- package/dist/commands/testing/job/create.d.ts +18 -0
- package/dist/commands/testing/job/create.js +60 -4
- package/dist/commands/testing/job/create.js.map +1 -1
- package/dist/commands/testing/job/delete.d.ts +6 -1
- package/dist/commands/testing/job/delete.js +13 -3
- package/dist/commands/testing/job/delete.js.map +1 -1
- package/dist/commands/testing/job/refs.d.ts +17 -0
- package/dist/commands/testing/job/refs.js +30 -0
- package/dist/commands/testing/job/refs.js.map +1 -0
- package/dist/commands/testing/job/schedule/get.d.ts +23 -0
- package/dist/commands/testing/job/schedule/get.js +31 -0
- package/dist/commands/testing/job/schedule/get.js.map +1 -0
- package/dist/commands/testing/job/schedule/remove.d.ts +24 -0
- package/dist/commands/testing/job/schedule/remove.js +34 -0
- package/dist/commands/testing/job/schedule/remove.js.map +1 -0
- package/dist/commands/testing/job/schedule/set.d.ts +23 -0
- package/dist/commands/testing/job/schedule/set.js +39 -0
- package/dist/commands/testing/job/schedule/set.js.map +1 -0
- package/dist/commands/testing/job/update.d.ts +2 -0
- package/dist/commands/testing/job/update.js +7 -1
- package/dist/commands/testing/job/update.js.map +1 -1
- package/dist/commands/testing/job/upload.d.ts +6 -0
- package/dist/commands/testing/job/upload.js +22 -0
- package/dist/commands/testing/job/upload.js.map +1 -1
- package/dist/commands/testing/live/continue.d.ts +20 -0
- package/dist/commands/testing/live/continue.js +21 -0
- package/dist/commands/testing/live/continue.js.map +1 -0
- package/dist/commands/testing/live/execute.d.ts +30 -0
- package/dist/commands/testing/live/execute.js +43 -0
- package/dist/commands/testing/live/execute.js.map +1 -0
- package/dist/commands/testing/live/history.d.ts +23 -0
- package/dist/commands/testing/live/history.js +35 -0
- package/dist/commands/testing/live/history.js.map +1 -0
- package/dist/commands/testing/live/inspect.d.ts +18 -0
- package/dist/commands/testing/live/inspect.js +30 -0
- package/dist/commands/testing/live/inspect.js.map +1 -0
- package/dist/commands/testing/live/interrupt.d.ts +20 -0
- package/dist/commands/testing/live/interrupt.js +21 -0
- package/dist/commands/testing/live/interrupt.js.map +1 -0
- package/dist/commands/testing/live/recorder.d.ts +23 -0
- package/dist/commands/testing/live/recorder.js +134 -0
- package/dist/commands/testing/live/recorder.js.map +1 -0
- package/dist/commands/testing/live/reports.d.ts +20 -0
- package/dist/commands/testing/live/reports.js +31 -0
- package/dist/commands/testing/live/reports.js.map +1 -0
- package/dist/commands/testing/live/screenshot.d.ts +23 -0
- package/dist/commands/testing/live/screenshot.js +25 -0
- package/dist/commands/testing/live/screenshot.js.map +1 -0
- package/dist/commands/testing/live/set-options.d.ts +27 -0
- package/dist/commands/testing/live/set-options.js +28 -0
- package/dist/commands/testing/live/set-options.js.map +1 -0
- package/dist/commands/testing/live/start.d.ts +29 -0
- package/dist/commands/testing/live/start.js +53 -0
- package/dist/commands/testing/live/start.js.map +1 -0
- package/dist/commands/testing/live/status.d.ts +19 -0
- package/dist/commands/testing/live/status.js +27 -0
- package/dist/commands/testing/live/status.js.map +1 -0
- package/dist/commands/testing/live/stop.d.ts +24 -0
- package/dist/commands/testing/live/stop.js +38 -0
- package/dist/commands/testing/live/stop.js.map +1 -0
- package/dist/commands/testing/live/view.d.ts +16 -0
- package/dist/commands/testing/live/view.js +36 -0
- package/dist/commands/testing/live/view.js.map +1 -0
- package/dist/commands/testing/logs.d.ts +6 -0
- package/dist/commands/testing/logs.js +8 -1
- package/dist/commands/testing/logs.js.map +1 -1
- package/dist/commands/testing/project/create.d.ts +3 -0
- package/dist/commands/testing/project/create.js +17 -1
- package/dist/commands/testing/project/create.js.map +1 -1
- package/dist/commands/testing/project/delete.d.ts +7 -2
- package/dist/commands/testing/project/delete.js +15 -3
- package/dist/commands/testing/project/delete.js.map +1 -1
- package/dist/commands/testing/project/get.js +1 -1
- package/dist/commands/testing/project/get.js.map +1 -1
- package/dist/commands/testing/project/permission/get.d.ts +13 -0
- package/dist/commands/testing/project/permission/get.js +21 -0
- package/dist/commands/testing/project/permission/get.js.map +1 -0
- package/dist/commands/testing/project/permission/list.d.ts +13 -0
- package/dist/commands/testing/project/permission/list.js +21 -0
- package/dist/commands/testing/project/permission/list.js.map +1 -0
- package/dist/commands/testing/project/permission/set.d.ts +19 -0
- package/dist/commands/testing/project/permission/set.js +33 -0
- package/dist/commands/testing/project/permission/set.js.map +1 -0
- package/dist/commands/testing/project/permission/update.d.ts +19 -0
- package/dist/commands/testing/project/permission/update.js +33 -0
- package/dist/commands/testing/project/permission/update.js.map +1 -0
- package/dist/commands/testing/project/update.d.ts +14 -0
- package/dist/commands/testing/project/update.js +28 -0
- package/dist/commands/testing/project/update.js.map +1 -0
- package/dist/commands/testing/robot/create.d.ts +4 -1
- package/dist/commands/testing/robot/create.js +20 -5
- package/dist/commands/testing/robot/create.js.map +1 -1
- package/dist/commands/testing/robot/delete.d.ts +6 -1
- package/dist/commands/testing/robot/delete.js +13 -3
- package/dist/commands/testing/robot/delete.js.map +1 -1
- package/dist/commands/testing/robot/update.d.ts +19 -0
- package/dist/commands/testing/robot/update.js +49 -0
- package/dist/commands/testing/robot/update.js.map +1 -0
- package/dist/commands/testing/run.d.ts +27 -4
- package/dist/commands/testing/run.js +4 -11
- package/dist/commands/testing/run.js.map +1 -1
- package/dist/commands/testing/test/run.d.ts +27 -11
- package/dist/commands/testing/test/run.js +5 -37
- package/dist/commands/testing/test/run.js.map +1 -1
- package/dist/commands/testing/update.d.ts +6 -0
- package/dist/commands/testing/update.js +10 -0
- package/dist/commands/testing/update.js.map +1 -1
- package/dist/commands/testing/user-parameter/create.d.ts +19 -0
- package/dist/commands/testing/user-parameter/create.js +45 -0
- package/dist/commands/testing/user-parameter/create.js.map +1 -0
- package/dist/commands/testing/user-parameter/delete.d.ts +21 -0
- package/dist/commands/testing/user-parameter/delete.js +33 -0
- package/dist/commands/testing/user-parameter/delete.js.map +1 -0
- package/dist/commands/testing/user-parameter/get.d.ts +13 -0
- package/dist/commands/testing/user-parameter/get.js +21 -0
- package/dist/commands/testing/user-parameter/get.js.map +1 -0
- package/dist/commands/testing/user-parameter/list.d.ts +12 -0
- package/dist/commands/testing/user-parameter/list.js +23 -0
- package/dist/commands/testing/user-parameter/list.js.map +1 -0
- package/dist/commands/testing/user-parameter/update.d.ts +23 -0
- package/dist/commands/testing/user-parameter/update.js +45 -0
- package/dist/commands/testing/user-parameter/update.js.map +1 -0
- package/dist/commands/testing/variable/create.d.ts +6 -2
- package/dist/commands/testing/variable/create.js +14 -5
- package/dist/commands/testing/variable/create.js.map +1 -1
- package/dist/commands/testing/variable/delete.d.ts +6 -1
- package/dist/commands/testing/variable/delete.js +13 -3
- package/dist/commands/testing/variable/delete.js.map +1 -1
- package/dist/commands/testing/variable/get.d.ts +13 -0
- package/dist/commands/testing/variable/get.js +25 -0
- package/dist/commands/testing/variable/get.js.map +1 -0
- package/dist/commands/testing/variable/list.d.ts +4 -0
- package/dist/commands/testing/variable/list.js +15 -3
- package/dist/commands/testing/variable/list.js.map +1 -1
- package/dist/commands/testing/variable/update.d.ts +6 -2
- package/dist/commands/testing/variable/update.js +11 -5
- package/dist/commands/testing/variable/update.js.map +1 -1
- package/dist/lib/ai-chat-session.d.ts +2 -1
- package/dist/lib/ai-chat-session.js +8 -0
- package/dist/lib/ai-chat-session.js.map +1 -1
- package/dist/lib/ai-gateway.d.ts +5 -2
- package/dist/lib/ai-gateway.js +44 -5
- package/dist/lib/ai-gateway.js.map +1 -1
- package/dist/lib/ai-operations.d.ts +4 -2
- package/dist/lib/ai-operations.js +29 -3
- package/dist/lib/ai-operations.js.map +1 -1
- package/dist/lib/ai-types.d.ts +29 -0
- package/dist/lib/ai-types.js +25 -0
- package/dist/lib/ai-types.js.map +1 -1
- package/dist/lib/cicd-gateway.d.ts +6 -0
- package/dist/lib/cicd-gateway.js +13 -2
- package/dist/lib/cicd-gateway.js.map +1 -1
- package/dist/lib/credential-store.d.ts +3 -0
- package/dist/lib/credential-store.js +16 -0
- package/dist/lib/credential-store.js.map +1 -1
- package/dist/lib/credential-sync.d.ts +35 -0
- package/dist/lib/credential-sync.js +249 -0
- package/dist/lib/credential-sync.js.map +1 -0
- package/dist/lib/debug.js +3 -1
- package/dist/lib/debug.js.map +1 -1
- package/dist/lib/defaults-store.d.ts +18 -0
- package/dist/lib/defaults-store.js +182 -89
- package/dist/lib/defaults-store.js.map +1 -1
- package/dist/lib/environment-types.js +1 -1
- package/dist/lib/mcp/ai-tools.d.ts +3 -0
- package/dist/lib/mcp/ai-tools.js +6 -0
- package/dist/lib/mcp/ai-tools.js.map +1 -1
- package/dist/lib/mcp/command-id.js +3 -0
- package/dist/lib/mcp/command-id.js.map +1 -1
- package/dist/lib/mcp/redaction.d.ts +1 -2
- package/dist/lib/mcp/redaction.js +1 -23
- package/dist/lib/mcp/redaction.js.map +1 -1
- package/dist/lib/mcp/testing-live-tools.d.ts +126 -0
- package/dist/lib/mcp/testing-live-tools.js +215 -0
- package/dist/lib/mcp/testing-live-tools.js.map +1 -0
- package/dist/lib/mcp/testing-tools.d.ts +455 -9
- package/dist/lib/mcp/testing-tools.js +677 -37
- package/dist/lib/mcp/testing-tools.js.map +1 -1
- package/dist/lib/mcp/tools.d.ts +554 -14
- package/dist/lib/mcp/work-tools.js +7 -4
- package/dist/lib/mcp/work-tools.js.map +1 -1
- package/dist/lib/secret-redaction.d.ts +2 -0
- package/dist/lib/secret-redaction.js +24 -0
- package/dist/lib/secret-redaction.js.map +1 -0
- package/dist/lib/testing-config.d.ts +3 -0
- package/dist/lib/testing-config.js +9 -0
- package/dist/lib/testing-config.js.map +1 -1
- package/dist/lib/testing-confirmation.d.ts +14 -0
- package/dist/lib/testing-confirmation.js +17 -0
- package/dist/lib/testing-confirmation.js.map +1 -0
- package/dist/lib/testing-data-command.d.ts +21 -0
- package/dist/lib/testing-data-command.js +49 -0
- package/dist/lib/testing-data-command.js.map +1 -0
- package/dist/lib/testing-data-core.d.ts +22 -0
- package/dist/lib/testing-data-core.js +208 -0
- package/dist/lib/testing-data-core.js.map +1 -0
- package/dist/lib/testing-data-export.d.ts +1 -0
- package/dist/lib/testing-data-export.js +2 -0
- package/dist/lib/testing-data-export.js.map +1 -0
- package/dist/lib/testing-data-import.d.ts +1 -0
- package/dist/lib/testing-data-import.js +2 -0
- package/dist/lib/testing-data-import.js.map +1 -0
- package/dist/lib/testing-data-io.d.ts +21 -0
- package/dist/lib/testing-data-io.js +236 -0
- package/dist/lib/testing-data-io.js.map +1 -0
- package/dist/lib/testing-data-operations.d.ts +36 -0
- package/dist/lib/testing-data-operations.js +91 -0
- package/dist/lib/testing-data-operations.js.map +1 -0
- package/dist/lib/testing-data-types.d.ts +41 -0
- package/dist/lib/testing-data-types.js +3 -0
- package/dist/lib/testing-data-types.js.map +1 -0
- package/dist/lib/testing-flags.d.ts +62 -1
- package/dist/lib/testing-flags.js +177 -1
- package/dist/lib/testing-flags.js.map +1 -1
- package/dist/lib/testing-gateway.d.ts +17 -3
- package/dist/lib/testing-gateway.js +175 -45
- package/dist/lib/testing-gateway.js.map +1 -1
- package/dist/lib/testing-live-command.d.ts +24 -0
- package/dist/lib/testing-live-command.js +56 -0
- package/dist/lib/testing-live-command.js.map +1 -0
- package/dist/lib/testing-live-endpoints.d.ts +14 -0
- package/dist/lib/testing-live-endpoints.js +34 -0
- package/dist/lib/testing-live-endpoints.js.map +1 -0
- package/dist/lib/testing-live-history.d.ts +11 -0
- package/dist/lib/testing-live-history.js +96 -0
- package/dist/lib/testing-live-history.js.map +1 -0
- package/dist/lib/testing-live-operations.d.ts +118 -0
- package/dist/lib/testing-live-operations.js +676 -0
- package/dist/lib/testing-live-operations.js.map +1 -0
- package/dist/lib/testing-live-recorder.d.ts +14 -0
- package/dist/lib/testing-live-recorder.js +122 -0
- package/dist/lib/testing-live-recorder.js.map +1 -0
- package/dist/lib/testing-live-robot.d.ts +16 -0
- package/dist/lib/testing-live-robot.js +158 -0
- package/dist/lib/testing-live-robot.js.map +1 -0
- package/dist/lib/testing-live-state.d.ts +4 -0
- package/dist/lib/testing-live-state.js +90 -0
- package/dist/lib/testing-live-state.js.map +1 -0
- package/dist/lib/testing-live-types.d.ts +92 -0
- package/dist/lib/testing-live-types.js +2 -0
- package/dist/lib/testing-live-types.js.map +1 -0
- package/dist/lib/testing-operations.d.ts +157 -5
- package/dist/lib/testing-operations.js +829 -66
- package/dist/lib/testing-operations.js.map +1 -1
- package/dist/lib/testing-run-command.d.ts +25 -0
- package/dist/lib/testing-run-command.js +94 -0
- package/dist/lib/testing-run-command.js.map +1 -0
- package/dist/lib/testing-sanitization.d.ts +11 -0
- package/dist/lib/testing-sanitization.js +135 -0
- package/dist/lib/testing-sanitization.js.map +1 -0
- package/dist/lib/testing-schedule.d.ts +23 -0
- package/dist/lib/testing-schedule.js +48 -0
- package/dist/lib/testing-schedule.js.map +1 -0
- package/dist/lib/testing-secret-input.d.ts +12 -0
- package/dist/lib/testing-secret-input.js +56 -0
- package/dist/lib/testing-secret-input.js.map +1 -0
- package/dist/lib/testing-session.d.ts +8 -0
- package/dist/lib/testing-session.js +82 -0
- package/dist/lib/testing-session.js.map +1 -0
- package/dist/lib/testing-types.d.ts +143 -13
- package/dist/lib/testing-types.js +110 -5
- package/dist/lib/testing-types.js.map +1 -1
- package/dist/lib/testing-watch.d.ts +4 -0
- package/dist/lib/testing-watch.js +45 -0
- package/dist/lib/testing-watch.js.map +1 -0
- package/dist/lib/work-types.d.ts +1 -0
- package/dist/lib/work-types.js.map +1 -1
- package/oclif.manifest.json +7523 -2891
- package/package.json +12 -1
- package/templates/skills/agentia-testing/SKILL.md +9 -6
- package/templates/skills/agentia-testing/references/tests.md +70 -36
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { formatTestingRecord } from '../../lib/testing-types.js';
|
|
6
|
-
export default class TestingRun extends AgentiaCommand {
|
|
2
|
+
import { testingProjectFlag, testingRunOptionFlags } from '../../lib/testing-flags.js';
|
|
3
|
+
import { TestingRunCommand } from '../../lib/testing-run-command.js';
|
|
4
|
+
export default class TestingRun extends TestingRunCommand {
|
|
7
5
|
static args = {
|
|
8
6
|
id: Args.integer({
|
|
9
7
|
description: 'CRT job/test ID to run.',
|
|
@@ -22,12 +20,7 @@ export default class TestingRun extends AgentiaCommand {
|
|
|
22
20
|
};
|
|
23
21
|
async run() {
|
|
24
22
|
const { args, flags } = await this.parse(TestingRun);
|
|
25
|
-
|
|
26
|
-
this.display(() => {
|
|
27
|
-
this.log('Testing run started');
|
|
28
|
-
this.log(formatTestingRecord({ build: result.build, jobId: result.jobId, projectId: result.projectId }));
|
|
29
|
-
});
|
|
30
|
-
return result;
|
|
23
|
+
return this.executeTestingRun(flags, { jobId: args.id, projectId: flags.project }, 'run');
|
|
31
24
|
}
|
|
32
25
|
}
|
|
33
26
|
//# sourceMappingURL=run.js.map
|
|
@@ -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,
|
|
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,kBAAkB,EAAE,qBAAqB,EAAC,MAAM,4BAA4B,CAAA;AACpF,OAAO,EAAC,iBAAiB,EAAiC,MAAM,kCAAkC,CAAA;AAElG,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,iBAAiB;IACvD,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,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,OAAO,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,EAAC,EAAE,KAAK,CAAC,CAAA;IACzF,CAAC"}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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 {
|
|
1
|
+
import { TestingRunCommand, type TestingRunExecutionResult } from '../../../lib/testing-run-command.js';
|
|
2
|
+
export default class TestingTestRun extends TestingRunCommand {
|
|
9
3
|
static args: {
|
|
10
4
|
id: import("@oclif/core/interfaces").Arg<number, {
|
|
11
5
|
max?: number;
|
|
@@ -15,17 +9,39 @@ export default class TestingTestRun extends AgentiaCommand {
|
|
|
15
9
|
static description: string;
|
|
16
10
|
static examples: string[];
|
|
17
11
|
static flags: {
|
|
18
|
-
'wait-for-result': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
19
12
|
branch: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'console-colors': import("@oclif/core/interfaces").OptionFlag<"auto" | "off" | "on" | "ansi" | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'console-width': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
datatable: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
doc: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
18
|
exclude: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
'exit-on-error': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
'exit-on-failure': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
21
21
|
include: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
metadata: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
24
|
+
'no-exit-code': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
22
25
|
param: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
26
|
record: import("@oclif/core/interfaces").OptionFlag<"none" | "all" | "failed" | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
24
27
|
'rerun-failed': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
25
28
|
'rerun-failed-from-latest': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
29
|
+
'run-empty-suite': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
30
|
+
'run-type': import("@oclif/core/interfaces").OptionFlag<"regression" | "development" | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
31
|
+
'save-artifacts': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
32
|
+
'set-tag': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
33
|
+
skip: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
34
|
+
'skip-on-failure': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
35
|
+
'stream-logs': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
36
|
+
suite: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
26
37
|
tag: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
38
|
+
test: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
39
|
+
timeout: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
40
|
+
variable: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
41
|
+
'wait-for-result': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
42
|
+
watch: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
43
|
+
xunit: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
27
44
|
project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
28
45
|
};
|
|
29
|
-
run(): Promise<
|
|
46
|
+
run(): Promise<TestingRunExecutionResult>;
|
|
30
47
|
}
|
|
31
|
-
export {};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { Args
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { formatTestingRecord, normalizeTestingId, } from '../../../lib/testing-types.js';
|
|
6
|
-
export default class TestingTestRun extends AgentiaCommand {
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import { testingProjectFlag, testingRunOptionFlags, } from '../../../lib/testing-flags.js';
|
|
3
|
+
import { TestingRunCommand } from '../../../lib/testing-run-command.js';
|
|
4
|
+
export default class TestingTestRun extends TestingRunCommand {
|
|
7
5
|
static args = {
|
|
8
6
|
id: Args.integer({
|
|
9
7
|
description: 'CRT job/test ID to run.',
|
|
@@ -19,40 +17,10 @@ export default class TestingTestRun extends AgentiaCommand {
|
|
|
19
17
|
static flags = {
|
|
20
18
|
...testingProjectFlag,
|
|
21
19
|
...testingRunOptionFlags,
|
|
22
|
-
'wait-for-result': Flags.boolean({
|
|
23
|
-
default: false,
|
|
24
|
-
description: 'Poll CRT until the started build reaches a terminal result.',
|
|
25
|
-
}),
|
|
26
20
|
};
|
|
27
21
|
async run() {
|
|
28
22
|
const { args, flags } = await this.parse(TestingTestRun);
|
|
29
|
-
|
|
30
|
-
if (!flags['wait-for-result']) {
|
|
31
|
-
this.display(() => {
|
|
32
|
-
this.log('Testing run started');
|
|
33
|
-
this.log(formatTestingRecord({ build: runResult.build, jobId: runResult.jobId, projectId: runResult.projectId }));
|
|
34
|
-
});
|
|
35
|
-
return runResult;
|
|
36
|
-
}
|
|
37
|
-
const buildId = normalizeTestingId(runResult.build);
|
|
38
|
-
const wait = await this.withSpinner('Waiting for testing result', () => waitForTestingBuildResult({
|
|
39
|
-
...testingRunOptions(flags, { jobId: args.id, projectId: flags.project }),
|
|
40
|
-
buildId,
|
|
41
|
-
}));
|
|
42
|
-
const result = { ...runResult, finalBuild: wait.build, wait };
|
|
43
|
-
this.display(() => {
|
|
44
|
-
this.log('Testing run finished');
|
|
45
|
-
this.log(formatTestingRecord(formatWaitResult(result)));
|
|
46
|
-
});
|
|
47
|
-
return result;
|
|
23
|
+
return this.executeTestingRun(flags, { jobId: args.id, projectId: flags.project }, 'run');
|
|
48
24
|
}
|
|
49
25
|
}
|
|
50
|
-
function formatWaitResult(result) {
|
|
51
|
-
return {
|
|
52
|
-
buildId: result.wait?.buildId ?? normalizeTestingId(result.build),
|
|
53
|
-
finalBuild: result.finalBuild,
|
|
54
|
-
jobId: result.jobId,
|
|
55
|
-
projectId: result.projectId,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
26
|
//# 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,IAAI,
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../../../src/commands/testing/test/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAA;AAEhC,OAAO,EACL,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAC,iBAAiB,EAAiC,MAAM,qCAAqC,CAAA;AAErG,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,iBAAiB;IAC3D,MAAM,CAAU,IAAI,GAAG;QACrB,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC;YACf,WAAW,EAAE,yBAAyB;YACtC,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAA;IACD,MAAM,CAAU,WAAW,GAAG,mCAAmC,CAAA;IACjE,MAAM,CAAU,QAAQ,GAAG;QACzB,qEAAqE;QACrE,uFAAuF;QACvF,4EAA4E;KAC7E,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,kBAAkB;QACrB,GAAG,qBAAqB;KACzB,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,IAAI,EAAE,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAA;QACtD,OAAO,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,EAAC,EAAE,KAAK,CAAC,CAAA;IACzF,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AgentiaCommand } from '../../lib/agentia-command.js';
|
|
2
2
|
import { type TestingFileOperation } from '../../lib/testing-types.js';
|
|
3
3
|
export type TestingUpdateResult = {
|
|
4
|
+
dryRun?: true;
|
|
4
5
|
operations: TestingFileOperation[];
|
|
5
6
|
response: Record<string, unknown>;
|
|
6
7
|
};
|
|
@@ -16,6 +17,11 @@ export default class TestingUpdate extends AgentiaCommand {
|
|
|
16
17
|
static flags: {
|
|
17
18
|
'author-email': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
19
|
'author-name': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
'base-path': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
22
|
+
message: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
'parent-commit': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
24
|
+
'remote-prefix': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
25
|
add: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
26
|
remove: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
27
|
replace: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -27,11 +27,18 @@ export default class TestingUpdate extends AgentiaCommand {
|
|
|
27
27
|
default: DEFAULT_TESTING_AUTHOR.name,
|
|
28
28
|
description: 'Author name for CRT file history.',
|
|
29
29
|
}),
|
|
30
|
+
'base-path': Flags.string({ description: 'Require local upload files to stay within this directory.' }),
|
|
31
|
+
'dry-run': Flags.boolean({ default: false, description: 'Return a sanitized plan without making a request.' }),
|
|
32
|
+
message: Flags.string({ description: 'Commit message for CRT file history.' }),
|
|
33
|
+
'parent-commit': Flags.string({ description: 'Expected parent commit hash.' }),
|
|
34
|
+
'remote-prefix': Flags.string({ description: 'Validated remote path prefix for all operations.' }),
|
|
30
35
|
};
|
|
31
36
|
async run() {
|
|
32
37
|
const { args, flags } = await this.parse(TestingUpdate);
|
|
33
38
|
const operations = buildFileOperationsFromSpecs({
|
|
34
39
|
add: flags.add,
|
|
40
|
+
basePath: flags['base-path'],
|
|
41
|
+
remotePrefix: flags['remote-prefix'],
|
|
35
42
|
remove: flags.remove,
|
|
36
43
|
replace: flags.replace,
|
|
37
44
|
});
|
|
@@ -41,8 +48,11 @@ export default class TestingUpdate extends AgentiaCommand {
|
|
|
41
48
|
const result = await this.withSpinner('Updating testing test', () => uploadTestingJobFiles({
|
|
42
49
|
author: { email: flags['author-email'], name: flags['author-name'] },
|
|
43
50
|
branch: flags.branch,
|
|
51
|
+
commitMessage: flags.message,
|
|
52
|
+
dryRun: flags['dry-run'],
|
|
44
53
|
jobId: args.id,
|
|
45
54
|
operations,
|
|
55
|
+
parentCommitHash: flags['parent-commit'],
|
|
46
56
|
projectId: flags.project,
|
|
47
57
|
}));
|
|
48
58
|
this.display(() => {
|
|
@@ -1 +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,kBAAkB,EAClB,2BAA2B,GAC5B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAC,4BAA4B,EAAE,sBAAsB,EAAE,qBAAqB,EAAC,MAAM,iCAAiC,CAAA;AAC3H,OAAO,EAAC,mBAAmB,EAA4B,MAAM,4BAA4B,CAAA;
|
|
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,kBAAkB,EAClB,2BAA2B,GAC5B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAC,4BAA4B,EAAE,sBAAsB,EAAE,qBAAqB,EAAC,MAAM,iCAAiC,CAAA;AAC3H,OAAO,EAAC,mBAAmB,EAA4B,MAAM,4BAA4B,CAAA;AAQzF,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,cAAc;IACvD,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,mEAAmE,CAAA;IACjG,MAAM,CAAU,QAAQ,GAAG;QACzB,2FAA2F;QAC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I,CAAC,KAAK,CAAC,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,MAAM,EAAE,EAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,EAAC;YAClE,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,aAAa,EAAE,KAAK,CAAC,OAAO;YAC5B,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;YACxB,KAAK,EAAE,IAAI,CAAC,EAAE;YACd,UAAU;YACV,gBAAgB,EAAE,KAAK,CAAC,eAAe,CAAC;YACxC,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,19 @@
|
|
|
1
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
2
|
+
import { type TestingUserParameter } from '../../../lib/testing-types.js';
|
|
3
|
+
export default class TestingUserParameterCreate extends AgentiaCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static flags: {
|
|
7
|
+
'no-trim': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
trim: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
value: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
'value-file': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'value-stdin': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
key: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
sensitive: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
type: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
unique: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
};
|
|
18
|
+
run(): Promise<TestingUserParameter>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { testingSecretInputFlags } from '../../../lib/testing-flags.js';
|
|
4
|
+
import { createTestingUserParameter } from '../../../lib/testing-operations.js';
|
|
5
|
+
import { resolveTestingSecretInput } from '../../../lib/testing-secret-input.js';
|
|
6
|
+
import { formatTestingRecord } from '../../../lib/testing-types.js';
|
|
7
|
+
export default class TestingUserParameterCreate extends AgentiaCommand {
|
|
8
|
+
static description = 'Create an account-scoped Copado Robotic Testing user parameter';
|
|
9
|
+
static examples = [
|
|
10
|
+
'<%= config.bin %> <%= command.id %> --key BASE_URL --value https://example.com',
|
|
11
|
+
'<%= config.bin %> <%= command.id %> --key TOKEN --value-stdin --sensitive --unique --json',
|
|
12
|
+
];
|
|
13
|
+
static flags = {
|
|
14
|
+
description: Flags.string({ description: 'Parameter description.' }),
|
|
15
|
+
key: Flags.string({ description: 'Parameter key.', required: true }),
|
|
16
|
+
sensitive: Flags.boolean({ default: false, description: 'Mark the parameter as sensitive.' }),
|
|
17
|
+
type: Flags.option({ default: 'parameter', description: 'CRT user-parameter type.', options: ['parameter'] })(),
|
|
18
|
+
unique: Flags.boolean({ default: false, description: 'Reject an existing parameter with the same key.' }),
|
|
19
|
+
...testingSecretInputFlags,
|
|
20
|
+
};
|
|
21
|
+
async run() {
|
|
22
|
+
const { flags } = await this.parse(TestingUserParameterCreate);
|
|
23
|
+
const value = await resolveTestingSecretInput({
|
|
24
|
+
noTrim: flags['no-trim'],
|
|
25
|
+
trim: flags.trim,
|
|
26
|
+
value: flags.value,
|
|
27
|
+
valueFile: flags['value-file'],
|
|
28
|
+
valueStdin: flags['value-stdin'],
|
|
29
|
+
}, { label: 'CRT user-parameter value', required: true });
|
|
30
|
+
const result = await this.withSpinner('Creating testing user parameter', () => createTestingUserParameter({
|
|
31
|
+
description: flags.description,
|
|
32
|
+
key: flags.key,
|
|
33
|
+
sensitive: flags.sensitive,
|
|
34
|
+
type: 'parameter',
|
|
35
|
+
unique: flags.unique,
|
|
36
|
+
value: value,
|
|
37
|
+
}));
|
|
38
|
+
this.display(() => {
|
|
39
|
+
this.log('Testing user parameter created');
|
|
40
|
+
this.log(formatTestingRecord(result));
|
|
41
|
+
});
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/testing/user-parameter/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAC,uBAAuB,EAAC,MAAM,+BAA+B,CAAA;AACrE,OAAO,EAAC,0BAA0B,EAAC,MAAM,oCAAoC,CAAA;AAC7E,OAAO,EAAC,yBAAyB,EAAC,MAAM,sCAAsC,CAAA;AAC9E,OAAO,EAAC,mBAAmB,EAA4B,MAAM,+BAA+B,CAAA;AAE5F,MAAM,CAAC,OAA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AAC,WAAW,CAAC,iCAAiC,EAAE,GAAG,EAAE,CAC5E,0BAA0B,CAAC;YACzB,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,GAAG,EAAE,KAAK,CAAC,GAAG;YACd,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,IAAI,EAAE,WAAW;YACjB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,KAAK,EAAE,KAAe;SACvB,CAAC,CACH,CAAA;QACD,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAA;YAC1C,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAA;QACvC,CAAC,CAAC,CAAA;QACF,OAAO,MAAM,CAAA;IACf,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
2
|
+
export default class TestingUserParameterDelete extends AgentiaCommand {
|
|
3
|
+
static args: {
|
|
4
|
+
id: import("@oclif/core/interfaces").Arg<number, {
|
|
5
|
+
max?: number;
|
|
6
|
+
min?: number;
|
|
7
|
+
}>;
|
|
8
|
+
};
|
|
9
|
+
static description: string;
|
|
10
|
+
static examples: string[];
|
|
11
|
+
static flags: {
|
|
12
|
+
yes: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
};
|
|
14
|
+
run(): Promise<{
|
|
15
|
+
deleted: true;
|
|
16
|
+
parameterId: number | string;
|
|
17
|
+
} | {
|
|
18
|
+
cancelled: boolean;
|
|
19
|
+
parameterId: number;
|
|
20
|
+
}>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { confirmTestingAction } from '../../../lib/testing-confirmation.js';
|
|
4
|
+
import { testingYesFlag } from '../../../lib/testing-flags.js';
|
|
5
|
+
import { deleteTestingUserParameter } from '../../../lib/testing-operations.js';
|
|
6
|
+
export default class TestingUserParameterDelete extends AgentiaCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
id: Args.integer({ description: 'CRT user-parameter ID.', required: true }),
|
|
9
|
+
};
|
|
10
|
+
static description = 'Delete an account-scoped Copado Robotic Testing user parameter';
|
|
11
|
+
static examples = [
|
|
12
|
+
'<%= config.bin %> <%= command.id %> <parameter-id> --yes',
|
|
13
|
+
'<%= config.bin %> <%= command.id %> <parameter-id> --yes --json',
|
|
14
|
+
];
|
|
15
|
+
static flags = {
|
|
16
|
+
...testingYesFlag,
|
|
17
|
+
};
|
|
18
|
+
async run() {
|
|
19
|
+
const { args, flags } = await this.parse(TestingUserParameterDelete);
|
|
20
|
+
const confirmed = await confirmTestingAction({
|
|
21
|
+
action: 'User-parameter deletion',
|
|
22
|
+
json: this.jsonEnabled(),
|
|
23
|
+
message: `Delete testing user parameter ${args.id}?`,
|
|
24
|
+
yes: flags.yes,
|
|
25
|
+
});
|
|
26
|
+
if (!confirmed)
|
|
27
|
+
return { cancelled: true, parameterId: args.id };
|
|
28
|
+
const result = await this.withSpinner('Deleting testing user parameter', () => deleteTestingUserParameter({ parameterId: args.id }));
|
|
29
|
+
this.display(() => this.log(`Deleted testing user parameter ${args.id}.`));
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=delete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../src/commands/testing/user-parameter/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAC,oBAAoB,EAAC,MAAM,sCAAsC,CAAA;AACzE,OAAO,EAAC,cAAc,EAAC,MAAM,+BAA+B,CAAA;AAC5D,OAAO,EAAC,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ommand } from '../../../lib/agentia-command.js';
|
|
2
|
+
import { type TestingUserParameter } from '../../../lib/testing-types.js';
|
|
3
|
+
export default class TestingUserParameterGet 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
|
+
run(): Promise<TestingUserParameter>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { getTestingUserParameter } from '../../../lib/testing-operations.js';
|
|
4
|
+
import { formatTestingRecord } from '../../../lib/testing-types.js';
|
|
5
|
+
export default class TestingUserParameterGet extends AgentiaCommand {
|
|
6
|
+
static args = {
|
|
7
|
+
id: Args.integer({ description: 'CRT user-parameter ID.', required: true }),
|
|
8
|
+
};
|
|
9
|
+
static description = 'Get an account-scoped Copado Robotic Testing user parameter';
|
|
10
|
+
static examples = [
|
|
11
|
+
'<%= config.bin %> <%= command.id %> <parameter-id>',
|
|
12
|
+
'<%= config.bin %> <%= command.id %> <parameter-id> --json',
|
|
13
|
+
];
|
|
14
|
+
async run() {
|
|
15
|
+
const { args } = await this.parse(TestingUserParameterGet);
|
|
16
|
+
const result = await this.withSpinner('Fetching testing user parameter', () => getTestingUserParameter({ parameterId: args.id }));
|
|
17
|
+
this.display(() => this.log(formatTestingRecord(result)));
|
|
18
|
+
return result;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../src/commands/testing/user-parameter/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAC,uBAAuB,EAAC,MAAM,oCAAoC,CAAA;AAC1E,OAAO,EAAC,mBAAmB,EAA4B,MAAM,+BAA+B,CAAA;AAE5F,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,cAAc;IACjE,MAAM,CAAU,IAAI,GAAG;QACrB,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,EAAC,WAAW,EAAE,wBAAwB,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;KAC1E,CAAA;IACD,MAAM,CAAU,WAAW,GAAG,6DAA6D,CAAA;IAC3F,MAAM,CAAU,QAAQ,GAAG;QACzB,oDAAoD;QACpD,2DAA2D;KAC5D,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,IAAI,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAA;QACxD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,iCAAiC,EAAE,GAAG,EAAE,CAC5E,uBAAuB,CAAC,EAAC,WAAW,EAAE,IAAI,CAAC,EAAE,EAAC,CAAC,CAChD,CAAA;QACD,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QACzD,OAAO,MAAM,CAAA;IACf,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
2
|
+
import { type TestingUserParameter } from '../../../lib/testing-types.js';
|
|
3
|
+
export default class TestingUserParameterList 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
|
+
key: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
project: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<TestingUserParameter[]>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { listTestingUserParameters } from '../../../lib/testing-operations.js';
|
|
4
|
+
import { formatTestingTable } from '../../../lib/testing-types.js';
|
|
5
|
+
export default class TestingUserParameterList extends AgentiaCommand {
|
|
6
|
+
static description = 'List account-scoped Copado Robotic Testing user parameters';
|
|
7
|
+
static examples = [
|
|
8
|
+
'<%= config.bin %> <%= command.id %>',
|
|
9
|
+
'<%= config.bin %> <%= command.id %> --key BASE_URL --json',
|
|
10
|
+
];
|
|
11
|
+
static flags = {
|
|
12
|
+
job: Flags.integer({ description: 'Defensive client-side job scope filter.', min: 1 }),
|
|
13
|
+
key: Flags.string({ description: 'Exact parameter key filter.' }),
|
|
14
|
+
project: Flags.integer({ description: 'Defensive client-side project scope filter.', min: 1 }),
|
|
15
|
+
};
|
|
16
|
+
async run() {
|
|
17
|
+
const { flags } = await this.parse(TestingUserParameterList);
|
|
18
|
+
const result = await this.withSpinner('Fetching testing user parameters', () => listTestingUserParameters({ jobId: flags.job, key: flags.key, projectId: flags.project }));
|
|
19
|
+
this.display(() => this.log(result.length === 0 ? 'No testing user parameters found.' : formatTestingTable(result)));
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/testing/user-parameter/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,OAAO,EAAC,cAAc,E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 @@
|
|
|
1
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
2
|
+
import { type TestingUserParameter } from '../../../lib/testing-types.js';
|
|
3
|
+
export default class TestingUserParameterUpdate 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
|
+
'no-trim': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
trim: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
value: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'value-file': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'value-stdin': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
key: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
unique: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
21
|
+
};
|
|
22
|
+
run(): Promise<TestingUserParameter>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { testingSecretInputFlags } from '../../../lib/testing-flags.js';
|
|
4
|
+
import { updateTestingUserParameter } from '../../../lib/testing-operations.js';
|
|
5
|
+
import { resolveTestingSecretInput } from '../../../lib/testing-secret-input.js';
|
|
6
|
+
import { formatTestingRecord } from '../../../lib/testing-types.js';
|
|
7
|
+
export default class TestingUserParameterUpdate extends AgentiaCommand {
|
|
8
|
+
static args = {
|
|
9
|
+
id: Args.integer({ description: 'CRT user-parameter ID.', required: true }),
|
|
10
|
+
};
|
|
11
|
+
static description = 'Update an account-scoped Copado Robotic Testing user parameter';
|
|
12
|
+
static examples = [
|
|
13
|
+
'<%= config.bin %> <%= command.id %> <parameter-id> --description "Updated"',
|
|
14
|
+
'<%= config.bin %> <%= command.id %> <parameter-id> --value-file ./value.txt --no-trim --json',
|
|
15
|
+
];
|
|
16
|
+
static flags = {
|
|
17
|
+
description: Flags.string({ description: 'New parameter description.' }),
|
|
18
|
+
key: Flags.string({ description: 'New parameter key.' }),
|
|
19
|
+
unique: Flags.boolean({ default: false, description: 'Reject another parameter with the same new key.' }),
|
|
20
|
+
...testingSecretInputFlags,
|
|
21
|
+
};
|
|
22
|
+
async run() {
|
|
23
|
+
const { args, flags } = await this.parse(TestingUserParameterUpdate);
|
|
24
|
+
const value = await resolveTestingSecretInput({
|
|
25
|
+
noTrim: flags['no-trim'],
|
|
26
|
+
trim: flags.trim,
|
|
27
|
+
value: flags.value,
|
|
28
|
+
valueFile: flags['value-file'],
|
|
29
|
+
valueStdin: flags['value-stdin'],
|
|
30
|
+
}, { label: 'CRT user-parameter value', required: false });
|
|
31
|
+
const result = await this.withSpinner('Updating testing user parameter', () => updateTestingUserParameter({
|
|
32
|
+
description: flags.description,
|
|
33
|
+
key: flags.key,
|
|
34
|
+
parameterId: args.id,
|
|
35
|
+
unique: flags.unique,
|
|
36
|
+
value,
|
|
37
|
+
}));
|
|
38
|
+
this.display(() => {
|
|
39
|
+
this.log('Testing user parameter updated');
|
|
40
|
+
this.log(formatTestingRecord(result));
|
|
41
|
+
});
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/testing/user-parameter/update.ts"],"names":[],"mappings":"AAA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EAAE,KAAK,CAAC,KAAK;YAClB,SAAS,EAAE,KAAK,CAAC,YAAY,CAAC;YAC9B,UAAU,EAAE,KAAK,CAAC,aAAa,CAAC;SACjC,EAAE,EAAC,KAAK,EAAE,0BAA0B,EAAE,QAAQ,EAAE,KAAK,EAAC,CAAC,CAAA;QACxD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,iCAAiC,EAAE,GAAG,EAAE,CAC5E,0BAA0B,CAAC;YACzB,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,GAAG,EAAE,KAAK,CAAC,GAAG;YACd,WAAW,EAAE,IAAI,CAAC,EAAE;YACpB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,KAAK;SACN,CAAC,CACH,CAAA;QACD,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAA;YAC1C,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAA;QACvC,CAAC,CAAC,CAAA;QACF,OAAO,MAAM,CAAA;IACf,CAAC"}
|
|
@@ -3,14 +3,18 @@ export default class TestingVariableCreate extends AgentiaCommand {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
+
'no-trim': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
|
+
trim: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
value: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
'value-file': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
'value-stdin': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
6
11
|
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
12
|
job: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
13
|
key: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
14
|
robot: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
15
|
sensitive: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
-
type: import("@oclif/core/interfaces").OptionFlag<"config" | "
|
|
16
|
+
type: import("@oclif/core/interfaces").OptionFlag<"config" | "secret" | "clp" | "dataset", import("@oclif/core/interfaces").CustomOptions>;
|
|
12
17
|
'user-specific': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
|
-
value: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
18
|
project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
19
|
};
|
|
16
20
|
run(): Promise<unknown>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { testingProjectFlag, } from '../../../lib/testing-flags.js';
|
|
3
|
+
import { testingProjectFlag, testingSecretInputFlags, } from '../../../lib/testing-flags.js';
|
|
4
4
|
import { createTestingVariable } from '../../../lib/testing-operations.js';
|
|
5
|
+
import { resolveTestingSecretInput } from '../../../lib/testing-secret-input.js';
|
|
5
6
|
import { formatTestingRecord, TESTING_VARIABLE_TYPES } from '../../../lib/testing-types.js';
|
|
6
7
|
export default class TestingVariableCreate extends AgentiaCommand {
|
|
7
8
|
static description = 'Create a Copado Robotic Testing variable/secret';
|
|
@@ -16,6 +17,7 @@ export default class TestingVariableCreate extends AgentiaCommand {
|
|
|
16
17
|
}),
|
|
17
18
|
job: Flags.integer({
|
|
18
19
|
description: 'Scope the variable to a CRT job/test ID.',
|
|
20
|
+
exclusive: ['robot'],
|
|
19
21
|
}),
|
|
20
22
|
key: Flags.string({
|
|
21
23
|
description: 'Variable key.',
|
|
@@ -23,12 +25,14 @@ export default class TestingVariableCreate extends AgentiaCommand {
|
|
|
23
25
|
}),
|
|
24
26
|
robot: Flags.integer({
|
|
25
27
|
description: 'Scope the variable to a CRT robot ID.',
|
|
28
|
+
exclusive: ['job'],
|
|
26
29
|
}),
|
|
27
30
|
sensitive: Flags.boolean({
|
|
28
31
|
default: false,
|
|
29
32
|
description: 'Mark the variable as sensitive.',
|
|
30
33
|
}),
|
|
31
34
|
type: Flags.option({
|
|
35
|
+
default: 'secret',
|
|
32
36
|
description: 'CRT variable type.',
|
|
33
37
|
options: [...TESTING_VARIABLE_TYPES],
|
|
34
38
|
})(),
|
|
@@ -36,12 +40,17 @@ export default class TestingVariableCreate extends AgentiaCommand {
|
|
|
36
40
|
default: false,
|
|
37
41
|
description: 'Create a user-specific variable.',
|
|
38
42
|
}),
|
|
39
|
-
|
|
40
|
-
description: 'Variable value. Avoid this flag for secrets if shell history is a concern.',
|
|
41
|
-
}),
|
|
43
|
+
...testingSecretInputFlags,
|
|
42
44
|
};
|
|
43
45
|
async run() {
|
|
44
46
|
const { flags } = await this.parse(TestingVariableCreate);
|
|
47
|
+
const value = await resolveTestingSecretInput({
|
|
48
|
+
noTrim: flags['no-trim'],
|
|
49
|
+
trim: flags.trim,
|
|
50
|
+
value: flags.value,
|
|
51
|
+
valueFile: flags['value-file'],
|
|
52
|
+
valueStdin: flags['value-stdin'],
|
|
53
|
+
}, { label: 'CRT variable value', required: true });
|
|
45
54
|
const result = await this.withSpinner('Creating testing variable', () => createTestingVariable({
|
|
46
55
|
description: flags.description,
|
|
47
56
|
jobId: flags.job,
|
|
@@ -51,7 +60,7 @@ export default class TestingVariableCreate extends AgentiaCommand {
|
|
|
51
60
|
sensitive: flags.sensitive,
|
|
52
61
|
type: flags.type,
|
|
53
62
|
userSpecific: flags['user-specific'],
|
|
54
|
-
value
|
|
63
|
+
value,
|
|
55
64
|
}));
|
|
56
65
|
this.display(() => {
|
|
57
66
|
this.log('Testing variable created');
|