@copado/agentia-cli 1.2.0 → 1.3.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/CHANGELOG.md +30 -1
- package/README.md +2205 -1530
- package/dist/commands/auth/get.js +21 -1
- package/dist/commands/auth/set.js +13 -0
- package/dist/commands/auth/unset.js +37 -0
- package/dist/commands/cicd/cloud/commit.js +2 -2
- package/dist/commands/cicd/cloud/promote.js +19 -5
- package/dist/commands/cicd/credential/auth/status.js +2 -2
- package/dist/commands/cicd/credential/auth/web/login.js +2 -2
- package/dist/commands/cicd/credential/create.js +2 -2
- package/dist/commands/cicd/credential/list.js +2 -2
- package/dist/commands/cicd/credential/open.js +2 -2
- package/dist/commands/cicd/credential/update.js +2 -2
- package/dist/commands/cicd/data/commit/create.js +2 -2
- package/dist/commands/cicd/data/commit/list.js +2 -2
- package/dist/commands/cicd/data/dataset-file/content.js +2 -2
- package/dist/commands/cicd/data/dataset-file/list.js +2 -2
- package/dist/commands/cicd/data/filter/add.js +2 -2
- package/dist/commands/cicd/data/filter/delete.js +2 -2
- package/dist/commands/cicd/data/filter/list.js +2 -2
- package/dist/commands/cicd/data/filter/update.js +2 -2
- package/dist/commands/cicd/data/formula/create.js +2 -2
- package/dist/commands/cicd/data/formula/list.js +2 -2
- package/dist/commands/cicd/data/formula/update.js +2 -2
- package/dist/commands/cicd/data/records/match.js +2 -2
- package/dist/commands/cicd/data/records/search.js +2 -2
- package/dist/commands/cicd/data/sobject/fields.js +2 -2
- package/dist/commands/cicd/data/sobject/relationships.js +2 -2
- package/dist/commands/cicd/data/sync/apply.js +2 -2
- package/dist/commands/cicd/data/sync/preview-updates.js +2 -2
- package/dist/commands/cicd/data/template/convert-old.js +2 -2
- package/dist/commands/cicd/data/template/create.js +2 -2
- package/dist/commands/cicd/data/template/delete.js +2 -2
- package/dist/commands/cicd/data/template/get-detail.js +2 -2
- package/dist/commands/cicd/data/template/get.js +2 -2
- package/dist/commands/cicd/data/template/list.js +2 -2
- package/dist/commands/cicd/data/template/open.js +2 -2
- package/dist/commands/cicd/data/template/save-detail.js +2 -2
- package/dist/commands/cicd/environment/auth/status.js +2 -2
- package/dist/commands/cicd/environment/auth/web/login.js +2 -2
- package/dist/commands/cicd/environment/create.js +2 -2
- package/dist/commands/cicd/environment/get.js +2 -2
- package/dist/commands/cicd/environment/list.js +2 -2
- package/dist/commands/cicd/environment/open.js +2 -2
- package/dist/commands/cicd/environment/update.js +2 -2
- package/dist/commands/cicd/extension/create.js +2 -2
- package/dist/commands/cicd/extension/install.js +2 -2
- package/dist/commands/cicd/extension/package.js +2 -2
- package/dist/commands/cicd/extension/publish.js +2 -2
- package/dist/commands/cicd/extension/uninstall.js +2 -2
- package/dist/commands/cicd/extension/validate.js +2 -2
- package/dist/commands/cicd/extension-configuration/get.js +2 -2
- package/dist/commands/cicd/extension-configuration/list.js +2 -2
- package/dist/commands/cicd/extension-configuration/open.js +2 -2
- package/dist/commands/cicd/function/defaults.js +2 -2
- package/dist/commands/cicd/function/delete.js +2 -2
- package/dist/commands/cicd/function/get.js +2 -2
- package/dist/commands/cicd/function/list.js +2 -2
- package/dist/commands/cicd/function/open.js +2 -2
- package/dist/commands/cicd/function/result/get.js +2 -2
- package/dist/commands/cicd/function/result/log/get.js +2 -2
- package/dist/commands/cicd/function/run-local.js +2 -2
- package/dist/commands/cicd/function/run.js +2 -2
- package/dist/commands/cicd/function/upsert.js +2 -2
- package/dist/commands/cicd/health-check.js +2 -2
- package/dist/commands/cicd/job/get.js +2 -2
- package/dist/commands/cicd/job/kill.js +2 -2
- package/dist/commands/cicd/job/list.js +2 -2
- package/dist/commands/cicd/job/log/get.js +2 -2
- package/dist/commands/cicd/job/open.js +2 -2
- package/dist/commands/cicd/job/pause.js +2 -2
- package/dist/commands/cicd/job/result-file/get.js +2 -2
- package/dist/commands/cicd/job/result-file/list.js +2 -2
- package/dist/commands/cicd/job/resume.js +2 -2
- package/dist/commands/cicd/job/run.js +2 -2
- package/dist/commands/cicd/metadata/content/compare.js +2 -2
- package/dist/commands/cicd/metadata/content/get.js +2 -2
- package/dist/commands/cicd/metadata/dependency/list.js +44 -21
- package/dist/commands/cicd/metadata/explore.js +2 -2
- package/dist/commands/cicd/metadata/index/compare.js +2 -2
- package/dist/commands/cicd/metadata/list.js +2 -2
- package/dist/commands/cicd/metadata/refresh/deleted.js +2 -2
- package/dist/commands/cicd/metadata/refresh/run.js +2 -2
- package/dist/commands/cicd/metadata/refresh/status.js +2 -2
- package/dist/commands/cicd/notification/configure.js +2 -2
- package/dist/commands/cicd/notification/get.js +2 -2
- package/dist/commands/cicd/pipeline/automation/activate.js +2 -2
- package/dist/commands/cicd/pipeline/automation/create.js +2 -2
- package/dist/commands/cicd/pipeline/automation/deactivate.js +2 -2
- package/dist/commands/cicd/pipeline/automation/delete.js +2 -2
- package/dist/commands/cicd/pipeline/automation/get.js +2 -2
- package/dist/commands/cicd/pipeline/automation/list.js +2 -2
- package/dist/commands/cicd/pipeline/automation/open.js +2 -2
- package/dist/commands/cicd/pipeline/automation/update.js +2 -2
- package/dist/commands/cicd/pipeline/connection/create.js +2 -2
- package/dist/commands/cicd/pipeline/connection/delete.js +2 -2
- package/dist/commands/cicd/pipeline/connection/list.js +2 -2
- package/dist/commands/cicd/pipeline/connection/open.js +2 -2
- package/dist/commands/cicd/pipeline/connection/update.js +2 -2
- package/dist/commands/cicd/pipeline/create.js +2 -2
- package/dist/commands/cicd/pipeline/get.js +2 -2
- package/dist/commands/cicd/pipeline/list.js +2 -2
- package/dist/commands/cicd/pipeline/open.js +2 -2
- package/dist/commands/cicd/pipeline/quality-gate/activate.js +2 -2
- package/dist/commands/cicd/pipeline/quality-gate/create.js +2 -2
- package/dist/commands/cicd/pipeline/quality-gate/deactivate.js +2 -2
- package/dist/commands/cicd/pipeline/quality-gate/delete.js +2 -2
- package/dist/commands/cicd/pipeline/quality-gate/get.js +2 -2
- package/dist/commands/cicd/pipeline/quality-gate/list.js +2 -2
- package/dist/commands/cicd/pipeline/quality-gate/open.js +2 -2
- package/dist/commands/cicd/pipeline/quality-gate/update.js +2 -2
- package/dist/commands/cicd/pipeline/stage-connection/create.js +2 -2
- package/dist/commands/cicd/pipeline/stage-connection/delete.js +2 -2
- package/dist/commands/cicd/pipeline/stage-connection/list.js +2 -2
- package/dist/commands/cicd/pipeline/stage-connection/open.js +2 -2
- package/dist/commands/cicd/pipeline/stage-connection/update.js +2 -2
- package/dist/commands/cicd/pipeline/update.js +2 -2
- package/dist/commands/cicd/project/create.js +2 -2
- package/dist/commands/cicd/project/default/get.js +2 -2
- package/dist/commands/cicd/project/default/set.js +2 -2
- package/dist/commands/cicd/project/default/unset.js +2 -2
- package/dist/commands/cicd/project/delete.js +2 -2
- package/dist/commands/cicd/project/get.js +2 -2
- package/dist/commands/cicd/project/list.js +2 -2
- package/dist/commands/cicd/project/open.js +2 -2
- package/dist/commands/cicd/project/update.js +2 -2
- package/dist/commands/cicd/promotion/conflict/get.js +2 -2
- package/dist/commands/cicd/promotion/conflict/list.js +2 -2
- package/dist/commands/cicd/promotion/conflict/resolve.js +2 -2
- package/dist/commands/cicd/promotion/conflict/unresolve.js +2 -2
- package/dist/commands/cicd/promotion/get.js +2 -2
- package/dist/commands/cicd/promotion/job-step/update.js +2 -2
- package/dist/commands/cicd/promotion/list.js +2 -2
- package/dist/commands/cicd/promotion/open.js +2 -2
- package/dist/commands/cicd/promotion/queue/list.js +28 -0
- package/dist/commands/cicd/promotion/queue/remove.js +37 -0
- package/dist/commands/cicd/promotion/run.js +2 -2
- package/dist/commands/cicd/repository/auth/https/configure.js +2 -2
- package/dist/commands/cicd/repository/auth/oauth/login.js +2 -2
- package/dist/commands/cicd/repository/auth/setup.js +2 -2
- package/dist/commands/cicd/repository/auth/ssh/configure.js +2 -2
- package/dist/commands/cicd/repository/create.js +2 -2
- package/dist/commands/cicd/repository/delete.js +2 -2
- package/dist/commands/cicd/repository/get.js +2 -2
- package/dist/commands/cicd/repository/list.js +2 -2
- package/dist/commands/cicd/repository/open.js +2 -2
- package/dist/commands/cicd/repository/reset.js +2 -2
- package/dist/commands/cicd/repository/update.js +2 -2
- package/dist/commands/cicd/repository/validate.js +2 -2
- package/dist/commands/cicd/stage/create.js +2 -2
- package/dist/commands/cicd/stage/delete.js +2 -2
- package/dist/commands/cicd/stage/get.js +2 -2
- package/dist/commands/cicd/stage/list.js +2 -2
- package/dist/commands/cicd/stage/open.js +2 -2
- package/dist/commands/cicd/stage/update.js +2 -2
- package/dist/commands/cicd/template/defaults.js +2 -2
- package/dist/commands/cicd/template/delete.js +2 -2
- package/dist/commands/cicd/template/get.js +2 -2
- package/dist/commands/cicd/template/list.js +2 -2
- package/dist/commands/cicd/template/upsert.js +2 -2
- package/dist/commands/cicd/user/get.js +2 -2
- package/dist/commands/cicd/work/ahead-behind.js +2 -2
- package/dist/commands/cicd/work/create.js +2 -2
- package/dist/commands/cicd/work/delete.js +2 -2
- package/dist/commands/cicd/work/deployment-step/create.js +2 -2
- package/dist/commands/cicd/work/deployment-step/delete.js +2 -2
- package/dist/commands/cicd/work/deployment-step/list.js +2 -2
- package/dist/commands/cicd/work/deployment-step/reorder.js +2 -2
- package/dist/commands/cicd/work/deployment-step/salesforce-flows.js +2 -2
- package/dist/commands/cicd/work/deployment-step/types.js +2 -2
- package/dist/commands/cicd/work/deployment-step/update.js +2 -2
- package/dist/commands/cicd/work/done.js +2 -2
- package/dist/commands/cicd/work/environment-sync.js +2 -2
- package/dist/commands/cicd/work/get.js +2 -2
- package/dist/commands/cicd/work/list.js +2 -2
- package/dist/commands/cicd/work/open.js +2 -2
- package/dist/commands/cicd/work/promote.js +2 -2
- package/dist/commands/cicd/work/publish.js +2 -2
- package/dist/commands/cicd/work/push.js +2 -2
- package/dist/commands/cicd/work/set.js +2 -2
- package/dist/commands/cicd/work/status.js +2 -2
- package/dist/commands/cicd/work/submit.js +2 -2
- package/dist/commands/cicd/work/test/apex.js +2 -2
- package/dist/commands/cicd/work/test.js +2 -2
- package/dist/commands/cicd/work/update.js +2 -2
- package/dist/commands/help-agent.js +15 -0
- package/dist/commands/help.js +38 -0
- package/dist/commands/history/clear.js +42 -0
- package/dist/commands/history/list.js +50 -0
- package/dist/commands/support.js +15 -0
- package/dist/commands/testing/browser/execute.js +49 -0
- package/dist/commands/testing/browser/history.js +49 -0
- package/dist/commands/testing/browser/inspect.js +35 -0
- package/dist/commands/testing/browser/recorder.js +52 -0
- package/dist/commands/testing/browser/reports.js +33 -0
- package/dist/commands/testing/browser/screenshot.js +27 -0
- package/dist/commands/testing/browser/set-options.js +35 -0
- package/dist/commands/testing/browser/start.js +51 -0
- package/dist/commands/testing/browser/status.js +26 -0
- package/dist/commands/testing/browser/stop.js +34 -0
- package/dist/commands/testing/browser/view.js +35 -0
- package/dist/commands/testing/job/runs/abort.js +1 -1
- package/dist/commands/testing/job/runs/get.js +1 -1
- package/dist/commands/testing/job/runs/list.js +1 -1
- package/dist/commands/testing/job/runs/logs.js +1 -1
- package/dist/commands/testing/job/runs/search.js +1 -1
- package/dist/hooks/init/cicd-connection.js +59 -0
- package/dist/lib/agentia-command.js +69 -6
- package/dist/lib/cicd-command.js +3 -0
- package/dist/lib/cicd-connection.js +22 -0
- package/dist/lib/cicd-gateway.js +2 -1
- package/dist/lib/command-history-sanitization.js +9 -0
- package/dist/lib/command-history.js +11 -0
- package/dist/lib/command-output-buffer.js +6 -1
- package/dist/lib/defaults-store.js +3 -1
- package/dist/lib/dependency-from-changes.js +3 -1
- package/dist/lib/dependency-source-context.js +3 -0
- package/dist/lib/help-agent-command.js +3 -0
- package/dist/lib/help-agent-interaction-history.js +10 -0
- package/dist/lib/help-agent-session.js +3 -0
- package/dist/lib/mcp/result.js +41 -3
- package/dist/lib/mcp/server.js +3 -2
- package/dist/lib/mcp/testing-browser-tools.js +194 -0
- package/dist/lib/mcp/testing-tools.js +4 -3
- package/dist/lib/mcp/tool-annotations.js +32 -12
- package/dist/lib/mcp/tools.js +88 -37
- package/dist/lib/promotion-queue.js +5 -0
- package/dist/lib/promotion-run.js +2 -1
- package/dist/lib/runtime.js +1 -1
- package/dist/lib/support-ai-context.js +11 -0
- package/dist/lib/support-ai-stream-parser.js +4 -0
- package/dist/lib/support-ai.js +9 -0
- package/dist/lib/testing-browser-command.js +6 -0
- package/dist/lib/testing-browser-operations.js +17 -0
- package/dist/lib/testing-browser-requests.js +11 -0
- package/dist/lib/testing-browser-robot.js +9 -0
- package/dist/lib/testing-browser-session.js +14 -0
- package/dist/lib/testing-browser-state.js +17 -0
- package/dist/lib/testing-browser-stream.js +7 -0
- package/dist/lib/testing-browser-types.js +3 -0
- package/dist/lib/testing-browser-viewer-key.js +7 -0
- package/dist/lib/testing-gateway.js +2 -1
- package/dist/lib/testing-operations.js +21 -1
- package/dist/lib/testing-sanitization.js +2 -1
- package/dist/lib/work-promote.js +2 -1
- package/oclif.manifest.json +3108 -1450
- package/package.json +11 -4
- package/templates/skills/agentia-ai/SKILL.md +6 -2
- package/templates/skills/agentia-ai/references/ai-agents.md +19 -1
- package/templates/skills/agentia-cicd/SKILL.md +2 -2
- package/templates/skills/agentia-cicd/references/environments-and-credentials.md +16 -0
- package/templates/skills/agentia-cicd/references/promotions.md +10 -1
- package/templates/skills/agentia-metadata/SKILL.md +9 -3
- package/templates/skills/agentia-metadata/references/metadata-dependency.md +70 -0
- package/templates/skills/agentia-metadata/references/metadata-explore.md +8 -4
- package/templates/skills/agentia-testing/SKILL.md +9 -4
- package/templates/skills/agentia-testing/references/browser-testing.md +93 -0
- package/templates/skills/agentia-testing/references/flow-automation.md +112 -0
- package/templates/skills/agentia-testing/references/qforce.md +88 -0
- package/templates/skills/agentia-testing/references/qweb.md +103 -0
- package/templates/skills/agentia-testing/references/tests.md +17 -9
- package/dist/commands/testing/live/continue.js +0 -16
- package/dist/commands/testing/live/execute.js +0 -43
- package/dist/commands/testing/live/history.js +0 -40
- package/dist/commands/testing/live/inspect.js +0 -31
- package/dist/commands/testing/live/interrupt.js +0 -16
- package/dist/commands/testing/live/recorder.js +0 -42
- package/dist/commands/testing/live/reports.js +0 -31
- package/dist/commands/testing/live/screenshot.js +0 -25
- package/dist/commands/testing/live/set-options.js +0 -35
- package/dist/commands/testing/live/start.js +0 -58
- package/dist/commands/testing/live/status.js +0 -24
- package/dist/commands/testing/live/stop.js +0 -36
- package/dist/commands/testing/live/view.js +0 -36
- package/dist/lib/mcp/testing-live-tools.js +0 -226
- package/dist/lib/testing-live-command.js +0 -8
- package/dist/lib/testing-live-operations.js +0 -25
- package/dist/lib/testing-live-recorder.js +0 -11
- package/dist/lib/testing-live-robot.js +0 -9
- package/dist/lib/testing-live-state.js +0 -12
- package/dist/lib/testing-live-types.js +0 -3
|
@@ -15,6 +15,7 @@ export default class AuthGet extends AgentiaCommand {
|
|
|
15
15
|
'<%= config.bin %> <%= command.id %> --cicd',
|
|
16
16
|
'<%= config.bin %> <%= command.id %> --crt',
|
|
17
17
|
'<%= config.bin %> <%= command.id %> --cicd --crt',
|
|
18
|
+
'<%= config.bin %> <%= command.id %> --cicd --json',
|
|
18
19
|
'<%= config.bin %> <%= command.id %> --json',
|
|
19
20
|
];
|
|
20
21
|
static flags = {
|
|
@@ -48,6 +49,10 @@ export default class AuthGet extends AgentiaCommand {
|
|
|
48
49
|
}
|
|
49
50
|
const selectedTypes = types.length > 0 ? types : ALL_CREDENTIAL_TYPES;
|
|
50
51
|
const credentials = selectedTypes.map((type) => this.buildCredentialResult(type));
|
|
52
|
+
const { listCicdNamedConnections, summarizeCicdNamedConnection } = await import('../../lib/cicd-connection.js');
|
|
53
|
+
const cicdConnections = selectedTypes.includes('cicd')
|
|
54
|
+
? listCicdNamedConnections().map((connection) => summarizeCicdNamedConnection(connection))
|
|
55
|
+
: undefined;
|
|
51
56
|
this.display(() => {
|
|
52
57
|
for (const type of ['cicd', 'ai', 'crt', 'adv']) {
|
|
53
58
|
if (!selectedTypes.includes(type))
|
|
@@ -60,10 +65,25 @@ export default class AuthGet extends AgentiaCommand {
|
|
|
60
65
|
this.log('');
|
|
61
66
|
this.log(this.formatCredentialLine(this.buildCredentialResult(type, scope)));
|
|
62
67
|
}
|
|
68
|
+
if (type === 'cicd' && cicdConnections !== undefined && cicdConnections.length > 0) {
|
|
69
|
+
this.log('');
|
|
70
|
+
this.log(ux.colorize('cyan', 'Named CICD connections'));
|
|
71
|
+
for (const connection of cicdConnections) {
|
|
72
|
+
const kind = connection.kind === undefined ? '' : ` [${connection.kind}]`;
|
|
73
|
+
const key = connection.set ? connection.masked : '(missing key)';
|
|
74
|
+
this.log(`Connection: ${connection.name}${kind}`);
|
|
75
|
+
this.log(`API Key: ${key}`);
|
|
76
|
+
this.log(`Server URL: ${connection.baseUrl}`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
63
79
|
}
|
|
64
80
|
});
|
|
65
81
|
const configFiles = this.buildConfigFileResults();
|
|
66
|
-
return {
|
|
82
|
+
return {
|
|
83
|
+
...(cicdConnections === undefined ? {} : { cicdConnections }),
|
|
84
|
+
configFiles,
|
|
85
|
+
credentials,
|
|
86
|
+
};
|
|
67
87
|
}
|
|
68
88
|
buildCicdCredentialResult(scope) {
|
|
69
89
|
const status = getCicdAuthStatus(scope);
|
|
@@ -15,6 +15,7 @@ export default class AuthSet extends AgentiaCommand {
|
|
|
15
15
|
'<%= config.bin %> <%= command.id %> --cicd <copado-api-key> --region na',
|
|
16
16
|
'<%= config.bin %> <%= command.id %> --cicd <copado-api-key> --custom-url https://dev.api.copado.com',
|
|
17
17
|
'<%= config.bin %> <%= command.id %> --cicd <copado-api-key>',
|
|
18
|
+
'<%= config.bin %> <%= command.id %> --cicd <copado-api-key> --custom-url https://test.api.copado.com --connection sandbox --kind sandbox',
|
|
18
19
|
'<%= config.bin %> <%= command.id %> --crt <pak> --crt-org <crt-org-id>',
|
|
19
20
|
'<%= config.bin %> <%= command.id %> --crt <pak> --crt-domain robotic.copado.com --crt-org <crt-org-id>',
|
|
20
21
|
'<%= config.bin %> <%= command.id %> --cicd <copado-api-key> --region na --crt <pak>',
|
|
@@ -43,6 +44,9 @@ export default class AuthSet extends AgentiaCommand {
|
|
|
43
44
|
cicd: Flags.string({
|
|
44
45
|
description: 'Copado API key for CICD authentication',
|
|
45
46
|
}),
|
|
47
|
+
connection: Flags.string({
|
|
48
|
+
description: 'Store a named CICD connection (keychain + config) without changing the active/default connection. Use with --cicd-connection on cicd commands.',
|
|
49
|
+
}),
|
|
46
50
|
crt: Flags.string({ description: 'PAK for CRT authentication (requires --crt-org)' }),
|
|
47
51
|
'crt-domain': Flags.string({
|
|
48
52
|
description: 'CRT domain hostname for robotic testing commands',
|
|
@@ -53,6 +57,10 @@ export default class AuthSet extends AgentiaCommand {
|
|
|
53
57
|
'custom-url': Flags.string({
|
|
54
58
|
description: 'CICD gateway base URL used instead of regional mapping',
|
|
55
59
|
}),
|
|
60
|
+
kind: Flags.option({
|
|
61
|
+
description: 'Tag a named CICD connection as sandbox or production (requires --connection)',
|
|
62
|
+
options: ['sandbox', 'production'],
|
|
63
|
+
})(),
|
|
56
64
|
local: Flags.boolean({
|
|
57
65
|
default: false,
|
|
58
66
|
description: 'Store authentication for the current project and user.',
|
|
@@ -75,10 +83,12 @@ export default class AuthSet extends AgentiaCommand {
|
|
|
75
83
|
aiOrg: flags['ai-org'],
|
|
76
84
|
aiWorkspace: flags['ai-workspace'],
|
|
77
85
|
cicd: flags.cicd,
|
|
86
|
+
connection: flags.connection,
|
|
78
87
|
crt: flags.crt,
|
|
79
88
|
crtDomain: flags['crt-domain'],
|
|
80
89
|
crtOrg: flags['crt-org'],
|
|
81
90
|
customUrl: flags['custom-url'],
|
|
91
|
+
kind: flags.kind,
|
|
82
92
|
region: flags.region,
|
|
83
93
|
scope: flags.local ? 'local' : 'global',
|
|
84
94
|
}));
|
|
@@ -92,6 +102,9 @@ export default class AuthSet extends AgentiaCommand {
|
|
|
92
102
|
for (const { label } of result.stored) {
|
|
93
103
|
this.log(`Stored ${label}.`);
|
|
94
104
|
}
|
|
105
|
+
if (result.connection !== undefined) {
|
|
106
|
+
this.log(`Stored named CICD connection "${result.connection}"${result.connectionKind === undefined ? '' : ` (${result.connectionKind})`}.`);
|
|
107
|
+
}
|
|
95
108
|
if (result.baseUrl !== undefined) {
|
|
96
109
|
this.log(`Stored CICD endpoint: ${result.baseUrl}.`);
|
|
97
110
|
}
|
|
@@ -11,6 +11,7 @@ export default class AuthUnset extends AgentiaCommand {
|
|
|
11
11
|
'<%= config.bin %> <%= command.id %> --adv',
|
|
12
12
|
'<%= config.bin %> <%= command.id %> --cicd',
|
|
13
13
|
'<%= config.bin %> <%= command.id %> --crt',
|
|
14
|
+
'<%= config.bin %> <%= command.id %> --connection sandbox --yes',
|
|
14
15
|
'<%= config.bin %> <%= command.id %> --cicd --crt --yes',
|
|
15
16
|
'<%= config.bin %> <%= command.id %> --json --yes',
|
|
16
17
|
];
|
|
@@ -24,6 +25,9 @@ export default class AuthUnset extends AgentiaCommand {
|
|
|
24
25
|
cicd: Flags.boolean({
|
|
25
26
|
description: 'Remove Copado API key and CICD endpoint configuration',
|
|
26
27
|
}),
|
|
28
|
+
connection: Flags.string({
|
|
29
|
+
description: 'Remove a named CICD connection (does not remove the active/default CICD auth)',
|
|
30
|
+
}),
|
|
27
31
|
crt: Flags.boolean({
|
|
28
32
|
description: 'Remove CRT PAK, domain, and organization configuration',
|
|
29
33
|
}),
|
|
@@ -46,6 +50,39 @@ export default class AuthUnset extends AgentiaCommand {
|
|
|
46
50
|
if (flags.local && flags.global) {
|
|
47
51
|
this.error('Use either --local or --global, not both.', { exit: 2 });
|
|
48
52
|
}
|
|
53
|
+
if (flags.connection !== undefined) {
|
|
54
|
+
if (flags.local || flags.global || flags.cicd || flags.crt || flags.ai || flags.adv) {
|
|
55
|
+
this.error('Use --connection alone (optionally with --yes).', { exit: 2 });
|
|
56
|
+
}
|
|
57
|
+
const { deleteCicdNamedConnection } = await import('../../lib/cicd-connection.js');
|
|
58
|
+
const requiresExplicitYes = (this.jsonEnabled() || !input.isTTY) && !hasAuthUnsetTestConfirm();
|
|
59
|
+
if (requiresExplicitYes && !flags.yes) {
|
|
60
|
+
this.error('Refusing to unset credentials without confirmation. Re-run with --yes.', { exit: 2 });
|
|
61
|
+
}
|
|
62
|
+
if (!flags.yes) {
|
|
63
|
+
const { confirm } = await import('@inquirer/prompts');
|
|
64
|
+
const accepted = await confirm({
|
|
65
|
+
default: false,
|
|
66
|
+
message: `Remove named CICD connection "${flags.connection}"?`,
|
|
67
|
+
});
|
|
68
|
+
if (!accepted) {
|
|
69
|
+
this.log('Auth unset cancelled. No credentials were removed.');
|
|
70
|
+
return { cancelled: true, removed: [] };
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const removed = await deleteCicdNamedConnection(flags.connection);
|
|
74
|
+
if (removed) {
|
|
75
|
+
this.log(`Removed named CICD connection "${flags.connection}".`);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
this.log(`Named CICD connection "${flags.connection}" was not configured.`);
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
removed: removed
|
|
82
|
+
? [{ label: `CICD connection "${flags.connection}"`, removed: true, type: 'cicd' }]
|
|
83
|
+
: [],
|
|
84
|
+
};
|
|
85
|
+
}
|
|
49
86
|
const types = resolveAuthUnsetTypes(flags);
|
|
50
87
|
const requiresExplicitYes = (this.jsonEnabled() || !input.isTTY) && !hasAuthUnsetTestConfirm();
|
|
51
88
|
if (requiresExplicitYes && !flags.yes) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
2
|
import { readFileSync } from 'node:fs';
|
|
3
|
-
import {
|
|
3
|
+
import { CicdCommand } from '../../../lib/cicd-command.js';
|
|
4
4
|
import { resolveWorkItemId, WorkActiveResolutionError } from '../../../lib/work-active.js';
|
|
5
5
|
import { buildWorkCommitRequest, formatWorkCommitResult, normalizeWorkCommitInput, performWorkCommit, resolveWorkCommitPlatformExperience, WORK_COMMIT_ACTIONS, WORK_COMMIT_DEFAULT_TIMEOUT_SECONDS, WORK_COMMIT_METADATA_CATEGORY_HELP, WorkCommitJobFailedError, WorkCommitTimeoutError, WorkCommitValidationError, } from '../../../lib/work-commit.js';
|
|
6
6
|
function readStdin() {
|
|
@@ -97,7 +97,7 @@ async function commitInputFromFlags(flags) {
|
|
|
97
97
|
}
|
|
98
98
|
return simpleInputFromFlags(flags);
|
|
99
99
|
}
|
|
100
|
-
export default class CloudCommit extends
|
|
100
|
+
export default class CloudCommit extends CicdCommand {
|
|
101
101
|
static args = {
|
|
102
102
|
id: Args.string({
|
|
103
103
|
description: 'User story ID (defaults to the active work item from `work set`)',
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { confirm } from '@inquirer/prompts';
|
|
2
2
|
import { Args, Flags } from '@oclif/core';
|
|
3
|
-
import {
|
|
4
|
-
import { formatPromotionRunResult, isPromotionRunExecutionError, parseIgnoredMetadataJson, performPromotionRun, PROMOTION_RUN_DEFAULT_TIMEOUT_SECONDS, promotionRunErrorJson, PromotionRunValidationError, resolvePromotionIdForWorkItem, } from '../../../lib/promotion-run.js';
|
|
3
|
+
import { CicdCommand } from '../../../lib/cicd-command.js';
|
|
4
|
+
import { formatPromotionRunResult, isPromotionRunExecutionError, NoPromotionForUserStoryError, parseIgnoredMetadataJson, performPromotionRun, PROMOTION_RUN_DEFAULT_TIMEOUT_SECONDS, promotionRunErrorJson, PromotionRunValidationError, resolvePromotionIdForWorkItem, } from '../../../lib/promotion-run.js';
|
|
5
5
|
import { resolveWorkItemId, WorkActiveResolutionError } from '../../../lib/work-active.js';
|
|
6
|
-
|
|
6
|
+
import { createForwardPromotionForUserStory, WorkPromoteValidationError } from '../../../lib/work-promote.js';
|
|
7
|
+
export default class CloudPromote extends CicdCommand {
|
|
7
8
|
static args = {
|
|
8
9
|
id: Args.string({
|
|
9
10
|
description: 'User Story ID (defaults to the active work item from `work set`)',
|
|
@@ -12,6 +13,7 @@ export default class CloudPromote extends AgentiaCommand {
|
|
|
12
13
|
};
|
|
13
14
|
static description = [
|
|
14
15
|
'Promote the explicit or active User Story through its Copado Promotion.',
|
|
16
|
+
'When no promotion contains the story, creates a forward Draft promotion, adds the story, then runs it.',
|
|
15
17
|
'Selects promote-only unless --deploy is passed.',
|
|
16
18
|
].join(' ');
|
|
17
19
|
static examples = [
|
|
@@ -80,7 +82,19 @@ export default class CloudPromote extends AgentiaCommand {
|
|
|
80
82
|
throw error;
|
|
81
83
|
}
|
|
82
84
|
try {
|
|
83
|
-
const promotionId = await this.withSpinner('Resolving User Story promotion', () =>
|
|
85
|
+
const promotionId = await this.withSpinner('Resolving User Story promotion', async () => {
|
|
86
|
+
try {
|
|
87
|
+
return await resolvePromotionIdForWorkItem(workItemId, promoteFlags['promotion-id']);
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
if (!(error instanceof NoPromotionForUserStoryError)) {
|
|
91
|
+
throw error;
|
|
92
|
+
}
|
|
93
|
+
const created = await createForwardPromotionForUserStory(workItemId);
|
|
94
|
+
this.display(() => this.log(`Created promotion ${created.name ?? created.id} for ${workItemId}.`));
|
|
95
|
+
return created.id;
|
|
96
|
+
}
|
|
97
|
+
});
|
|
84
98
|
if (promoteFlags['recreate-promotion-branch'] === true && !promoteFlags.yes) {
|
|
85
99
|
if (this.jsonEnabled() || !process.stdin.isTTY) {
|
|
86
100
|
this.error('Promotion branch recreation requires confirmation. Pass --yes for headless or JSON execution.', {
|
|
@@ -116,7 +130,7 @@ export default class CloudPromote extends AgentiaCommand {
|
|
|
116
130
|
return workResult;
|
|
117
131
|
}
|
|
118
132
|
catch (error) {
|
|
119
|
-
if (error instanceof PromotionRunValidationError) {
|
|
133
|
+
if (error instanceof PromotionRunValidationError || error instanceof WorkPromoteValidationError) {
|
|
120
134
|
this.error(error.message, { exit: 2 });
|
|
121
135
|
}
|
|
122
136
|
if (isPromotionRunExecutionError(error)) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Args, ux } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { runCredentialAuthStatus, } from '../../../../lib/environment-auth-status.js';
|
|
4
4
|
import { EnvironmentCredentialInputError } from '../../../../lib/environment-credential-flags.js';
|
|
5
5
|
import { formatEnvironmentAuthStatus } from '../../../../lib/environment-types.js';
|
|
6
|
-
export default class CredentialAuthStatus extends
|
|
6
|
+
export default class CredentialAuthStatus extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
id: Args.string({
|
|
9
9
|
description: 'Copado credential ID',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../../lib/cicd-command.js';
|
|
3
3
|
import { DEFAULT_AUTH_TIMEOUT_SECONDS, runCredentialWebLogin, } from '../../../../../lib/environment-auth.js';
|
|
4
4
|
import { EnvironmentCredentialInputError } from '../../../../../lib/environment-credential-flags.js';
|
|
5
|
-
export default class CredentialAuthWebLogin extends
|
|
5
|
+
export default class CredentialAuthWebLogin extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
id: Args.string({
|
|
8
8
|
description: 'Copado credential ID',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CicdCommand } from '../../../lib/cicd-command.js';
|
|
2
2
|
import { credentialCreateFlags, EnvironmentCredentialInputError, validateCredentialName, } from '../../../lib/environment-credential-flags.js';
|
|
3
3
|
import { createEnvironmentCredential, resolveEnvironmentOrgType, } from '../../../lib/environment-credential-operations.js';
|
|
4
|
-
export default class CredentialCreate extends
|
|
4
|
+
export default class CredentialCreate extends CicdCommand {
|
|
5
5
|
static description = 'Create a Copado environment credential';
|
|
6
6
|
static examples = [
|
|
7
7
|
'<%= config.bin %> <%= command.id %> --environmentid <environment-id> --name "CI User"',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CicdCommand } from '../../../lib/cicd-command.js';
|
|
2
2
|
import { buildCredentialListFilters, credentialListFlags } from '../../../lib/environment-credential-flags.js';
|
|
3
3
|
import { listCredentials } from '../../../lib/environment-credential-operations.js';
|
|
4
4
|
import { cellValue, table } from '../../../lib/format.js';
|
|
@@ -28,7 +28,7 @@ export function formatCredentialTable(credentials) {
|
|
|
28
28
|
}));
|
|
29
29
|
return table(header, rows);
|
|
30
30
|
}
|
|
31
|
-
export default class CredentialList extends
|
|
31
|
+
export default class CredentialList extends CicdCommand {
|
|
32
32
|
static description = 'List Copado credentials across environments';
|
|
33
33
|
static examples = [
|
|
34
34
|
'<%= config.bin %> <%= command.id %>',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../lib/cicd-command.js';
|
|
3
3
|
import { openNavigationTarget } from '../../../lib/navigation-open.js';
|
|
4
4
|
import { resolveNavigationTarget } from '../../../lib/navigation.js';
|
|
5
|
-
export default class CredentialOpen extends
|
|
5
|
+
export default class CredentialOpen extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
id: Args.string({
|
|
8
8
|
description: 'Copado credential ID',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../lib/cicd-command.js';
|
|
3
3
|
import { collectCredentialUpdateFlagKeys, credentialUpdateFlags, EnvironmentCredentialInputError, validateCredentialName, } from '../../../lib/environment-credential-flags.js';
|
|
4
4
|
import { sanitizeCredentialListItem, updateCredentialById, } from '../../../lib/environment-credential-operations.js';
|
|
5
|
-
export default class CredentialUpdate extends
|
|
5
|
+
export default class CredentialUpdate extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
id: Args.string({
|
|
8
8
|
description: 'Copado credential ID',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
2
2
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
3
3
|
import { assertJsonObject, jsonBodyFlags, readJsonBodyFromFileOrStdin, } from '../../../../lib/data-flags.js';
|
|
4
4
|
import { dataTemplatesCommitEndpoint, } from '../../../../lib/data-types.js';
|
|
5
|
-
export default class DataCommitCreate extends
|
|
5
|
+
export default class DataCommitCreate extends CicdCommand {
|
|
6
6
|
static description = 'Create a data commit for a user story';
|
|
7
7
|
static examples = [
|
|
8
8
|
'<%= config.bin %> <%= command.id %> --file commit.json',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { formatUserStoryDataCommitTable, userStoryDataCommitsEndpoint, } from '../../../../lib/data-types.js';
|
|
5
|
-
export default class DataCommitList extends
|
|
5
|
+
export default class DataCommitList extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
userStoryId: Args.string({
|
|
8
8
|
description: 'User story Id',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { datasetFileContentEndpoint, } from '../../../../lib/data-types.js';
|
|
5
5
|
const BASE64_DISPLAY_LIMIT = 120;
|
|
@@ -9,7 +9,7 @@ function truncateBase64(value) {
|
|
|
9
9
|
}
|
|
10
10
|
return `${value.slice(0, BASE64_DISPLAY_LIMIT)}… (${value.length} chars)`;
|
|
11
11
|
}
|
|
12
|
-
export default class DataDatasetFileContent extends
|
|
12
|
+
export default class DataDatasetFileContent extends CicdCommand {
|
|
13
13
|
static args = {
|
|
14
14
|
contentVersionId: Args.string({
|
|
15
15
|
description: 'ContentVersion Id',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { datasetFilesEndpoint, formatDatasetFileTable, } from '../../../../lib/data-types.js';
|
|
5
|
-
export default class DataDatasetFileList extends
|
|
5
|
+
export default class DataDatasetFileList extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
userStoryDataCommitId: Args.string({
|
|
8
8
|
description: 'User story data commit Id',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { assertJsonObject, jsonBodyFlags, readJsonBodyFromFileOrStdin, } from '../../../../lib/data-flags.js';
|
|
5
5
|
import { advancedFiltersEndpoint, } from '../../../../lib/data-types.js';
|
|
6
|
-
export default class DataFilterAdd extends
|
|
6
|
+
export default class DataFilterAdd extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
dataTemplateId: Args.string({
|
|
9
9
|
description: 'Data template Id',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { advancedFilterEndpoint } from '../../../../lib/data-types.js';
|
|
5
|
-
export default class DataFilterDelete extends
|
|
5
|
+
export default class DataFilterDelete extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
dataTemplateId: Args.string({
|
|
8
8
|
description: 'Data template Id',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { advancedFiltersEndpoint, formatAdvancedFilterTable, } from '../../../../lib/data-types.js';
|
|
5
|
-
export default class DataFilterList extends
|
|
5
|
+
export default class DataFilterList extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
dataTemplateId: Args.string({
|
|
8
8
|
description: 'Data template Id',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { assertJsonObject, jsonBodyFlags, readJsonBodyFromFileOrStdin, } from '../../../../lib/data-flags.js';
|
|
5
5
|
import { advancedFilterEndpoint, } from '../../../../lib/data-types.js';
|
|
6
|
-
export default class DataFilterUpdate extends
|
|
6
|
+
export default class DataFilterUpdate extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
dataTemplateId: Args.string({
|
|
9
9
|
description: 'Data template Id',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { dataTemplateRecordMatchingFormulasEndpoint, } from '../../../../lib/data-types.js';
|
|
5
5
|
function parseFields(fields) {
|
|
@@ -8,7 +8,7 @@ function parseFields(fields) {
|
|
|
8
8
|
.map((part) => part.trim())
|
|
9
9
|
.filter((part) => part.length > 0));
|
|
10
10
|
}
|
|
11
|
-
export default class DataFormulaCreate extends
|
|
11
|
+
export default class DataFormulaCreate extends CicdCommand {
|
|
12
12
|
static args = {
|
|
13
13
|
dataTemplateId: Args.string({
|
|
14
14
|
description: 'Data template Id',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { formatRecordMatchingFormulaTable, recordMatchingFormulasByObjectEndpoint, } from '../../../../lib/data-types.js';
|
|
5
|
-
export default class DataFormulaList extends
|
|
5
|
+
export default class DataFormulaList extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
objectApiName: Args.string({
|
|
8
8
|
description: 'sObject API name',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { assertJsonObject, jsonBodyFlags, readJsonBodyFromFileOrStdin, } from '../../../../lib/data-flags.js';
|
|
5
5
|
import { recordMatchingFormulaEndpoint, } from '../../../../lib/data-types.js';
|
|
@@ -9,7 +9,7 @@ function parseFields(fields) {
|
|
|
9
9
|
.map((part) => part.trim())
|
|
10
10
|
.filter((part) => part.length > 0));
|
|
11
11
|
}
|
|
12
|
-
export default class DataFormulaUpdate extends
|
|
12
|
+
export default class DataFormulaUpdate extends CicdCommand {
|
|
13
13
|
static args = {
|
|
14
14
|
formulaId: Args.string({
|
|
15
15
|
description: 'Record matching formula Id',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
2
2
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
3
3
|
import { assertJsonObject, jsonBodyFlags, readJsonBodyFromFileOrStdin, } from '../../../../lib/data-flags.js';
|
|
4
4
|
import { dataTemplatesRecordsMatchEndpoint, formatDataRecordTable, } from '../../../../lib/data-types.js';
|
|
5
|
-
export default class DataRecordsMatch extends
|
|
5
|
+
export default class DataRecordsMatch extends CicdCommand {
|
|
6
6
|
static description = 'Match a source data record to a destination org';
|
|
7
7
|
static examples = [
|
|
8
8
|
'<%= config.bin %> <%= command.id %> --file match.json',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { assertJsonObject, jsonBodyFlags, readJsonBodyFromFileOrStdin, } from '../../../../lib/data-flags.js';
|
|
5
5
|
import { dataTemplatesRecordsEndpoint, formatDataRecordTable, } from '../../../../lib/data-types.js';
|
|
6
|
-
export default class DataRecordsSearch extends
|
|
6
|
+
export default class DataRecordsSearch extends CicdCommand {
|
|
7
7
|
static description = 'Search data records for a data template';
|
|
8
8
|
static examples = [
|
|
9
9
|
'<%= config.bin %> <%= command.id %> --credential-id a0Y... --data-template-id a0X...',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { sobjectFieldsEndpoint } from '../../../../lib/data-types.js';
|
|
5
5
|
import { cellValue, table } from '../../../../lib/format.js';
|
|
@@ -18,7 +18,7 @@ function formatSObjectFieldsTable(payload) {
|
|
|
18
18
|
required: cellValue(field.required),
|
|
19
19
|
})));
|
|
20
20
|
}
|
|
21
|
-
export default class DataSObjectFields extends
|
|
21
|
+
export default class DataSObjectFields extends CicdCommand {
|
|
22
22
|
static args = {
|
|
23
23
|
sobjectApiName: Args.string({
|
|
24
24
|
description: 'sObject API name',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { sobjectRelationshipsEndpoint } from '../../../../lib/data-types.js';
|
|
5
5
|
import { cellValue, table } from '../../../../lib/format.js';
|
|
6
|
-
export default class DataSObjectRelationships extends
|
|
6
|
+
export default class DataSObjectRelationships extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
sobjectApiName: Args.string({
|
|
9
9
|
description: 'sObject API name',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
2
2
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
3
3
|
import { assertJsonArray, jsonBodyFlags, readJsonBodyFromFileOrStdin, } from '../../../../lib/data-flags.js';
|
|
4
4
|
import { dataTemplatesSyncEndpoint, formatSyncResultTable, } from '../../../../lib/data-types.js';
|
|
5
|
-
export default class DataSyncApply extends
|
|
5
|
+
export default class DataSyncApply extends CicdCommand {
|
|
6
6
|
static description = 'Apply data template field sync entries';
|
|
7
7
|
static examples = [
|
|
8
8
|
'<%= config.bin %> <%= command.id %> --file sync.json',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
2
2
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
3
3
|
import { assertJsonObject, jsonBodyFlags, readJsonBodyFromFileOrStdin, } from '../../../../lib/data-flags.js';
|
|
4
4
|
import { dataTemplateUpdatesEndpoint, } from '../../../../lib/data-types.js';
|
|
@@ -20,7 +20,7 @@ function formatPreviewTable(previews) {
|
|
|
20
20
|
templateId: cellValue(preview.templateId),
|
|
21
21
|
})));
|
|
22
22
|
}
|
|
23
|
-
export default class DataSyncPreviewUpdates extends
|
|
23
|
+
export default class DataSyncPreviewUpdates extends CicdCommand {
|
|
24
24
|
static description = 'Preview data template updates from metadata commit changes';
|
|
25
25
|
static examples = [
|
|
26
26
|
'<%= config.bin %> <%= command.id %> --file preview.json',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { dataTemplateConvertOldEndpoint } from '../../../../lib/data-types.js';
|
|
5
|
-
export default class DataTemplateConvertOld extends
|
|
5
|
+
export default class DataTemplateConvertOld extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
id: Args.string({
|
|
8
8
|
description: 'Legacy data template Id',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { DATA_TEMPLATES_BASE, } from '../../../../lib/data-types.js';
|
|
5
|
-
export default class DataTemplateCreate extends
|
|
5
|
+
export default class DataTemplateCreate extends CicdCommand {
|
|
6
6
|
static description = 'Create a Copado data template';
|
|
7
7
|
static examples = [
|
|
8
8
|
'<%= config.bin %> <%= command.id %> --credential-id a0Y... --template-name Accounts --api-name Accounts --main-object-api-name Account --main-object-label Account',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { dataTemplateEndpoint } from '../../../../lib/data-types.js';
|
|
5
|
-
export default class DataTemplateDelete extends
|
|
5
|
+
export default class DataTemplateDelete extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
id: Args.string({
|
|
8
8
|
description: 'Data template Id',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { dataTemplateDetailEndpoint } from '../../../../lib/data-types.js';
|
|
5
|
-
export default class DataTemplateGetDetail extends
|
|
5
|
+
export default class DataTemplateGetDetail extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
id: Args.string({
|
|
8
8
|
description: 'Data template Id',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { dataTemplateEndpoint } from '../../../../lib/data-types.js';
|
|
5
|
-
export default class DataTemplateGet extends
|
|
5
|
+
export default class DataTemplateGet extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
id: Args.string({
|
|
8
8
|
description: 'Data template Id',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { dataTemplatesListEndpoint, formatDataTemplateTable, normalizeDataTemplates, } from '../../../../lib/data-types.js';
|
|
5
|
-
export default class DataTemplateList extends
|
|
5
|
+
export default class DataTemplateList extends CicdCommand {
|
|
6
6
|
static description = 'List Copado data templates';
|
|
7
7
|
static examples = [
|
|
8
8
|
'<%= config.bin %> <%= command.id %>',
|