@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
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
2
|
import { readFileSync } from 'node:fs';
|
|
3
|
-
import {
|
|
3
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
4
4
|
import { assertRequired } from '../../../../lib/assert.js';
|
|
5
5
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
6
|
-
import { resolvedSelectionsFromChangedFiles } from '../../../../lib/dependency-from-changes.js';
|
|
6
|
+
import { resolvedSelectionsFromChangedFiles, resolvedSelectionsFromPaths, } from '../../../../lib/dependency-from-changes.js';
|
|
7
|
+
import { resolveDependencySourceContext } from '../../../../lib/dependency-source-context.js';
|
|
7
8
|
import { findLocalMetadataPaths } from '../../../../lib/local-metadata-paths.js';
|
|
8
9
|
import { formatDependencyTable, MODULE_TYPES, normalizeDependencyItem, normalizeDependencySelection, parseJsonValue, PLATFORM_EXPERIENCES, RETRIEVE_MODES, } from '../../../../lib/metadata-common.js';
|
|
9
10
|
function readStdin() {
|
|
@@ -75,17 +76,24 @@ function metadataSelectionFromFlags(flags) {
|
|
|
75
76
|
}
|
|
76
77
|
return normalizeDependencySelection(selection);
|
|
77
78
|
}
|
|
78
|
-
function requestFromSelections(flags, selections) {
|
|
79
|
+
async function requestFromSelections(flags, selections) {
|
|
80
|
+
const sourceContext = await resolveDependencySourceContext({
|
|
81
|
+
pipelineId: flags['pipeline-id'],
|
|
82
|
+
platformExperience: flags['platform-experience'],
|
|
83
|
+
sourceCredentialId: flags['source-credential-id'],
|
|
84
|
+
sourceOrgId: flags['source-org-id'],
|
|
85
|
+
targetOrgId: flags['target-org-id'],
|
|
86
|
+
});
|
|
79
87
|
const body = {
|
|
80
88
|
compareOptions: {
|
|
81
|
-
sourceCredentialId:
|
|
82
|
-
sourceOrgId:
|
|
89
|
+
sourceCredentialId: sourceContext.sourceCredentialId,
|
|
90
|
+
sourceOrgId: sourceContext.sourceOrgId,
|
|
83
91
|
},
|
|
84
92
|
metadataSelections: selections.map((selection) => normalizeDependencySelection(selection)),
|
|
85
|
-
pipelineId:
|
|
93
|
+
pipelineId: sourceContext.pipelineId,
|
|
86
94
|
};
|
|
87
|
-
if (
|
|
88
|
-
body.compareOptions.targetOrgId =
|
|
95
|
+
if (sourceContext.targetOrgId) {
|
|
96
|
+
body.compareOptions.targetOrgId = sourceContext.targetOrgId;
|
|
89
97
|
}
|
|
90
98
|
if (flags['retrieve-mode']) {
|
|
91
99
|
body.compareOptions.retrieveMode = flags['retrieve-mode'];
|
|
@@ -98,13 +106,18 @@ function requestFromSelections(flags, selections) {
|
|
|
98
106
|
}
|
|
99
107
|
return {
|
|
100
108
|
body,
|
|
101
|
-
platformExperience:
|
|
109
|
+
platformExperience: sourceContext.platformExperience,
|
|
102
110
|
};
|
|
103
111
|
}
|
|
104
112
|
export async function buildDependencyRequest(flags) {
|
|
105
|
-
const inputModes = [
|
|
113
|
+
const inputModes = [
|
|
114
|
+
Boolean(flags.file),
|
|
115
|
+
flags.stdin,
|
|
116
|
+
flags['from-changes'],
|
|
117
|
+
Boolean(flags.path?.length),
|
|
118
|
+
].filter(Boolean).length;
|
|
106
119
|
if (inputModes > 1) {
|
|
107
|
-
throw new Error('Use only one input mode: --file, --stdin,
|
|
120
|
+
throw new Error('Use only one input mode: --file, --stdin, --from-changes, or --path.');
|
|
108
121
|
}
|
|
109
122
|
if (flags.file) {
|
|
110
123
|
return dependencyRequestFromJson(readFileSync(flags.file, 'utf8'));
|
|
@@ -114,16 +127,22 @@ export async function buildDependencyRequest(flags) {
|
|
|
114
127
|
}
|
|
115
128
|
if (flags['from-changes']) {
|
|
116
129
|
const resolvedSelections = await resolvedSelectionsFromChangedFiles(flags['base-ref'], flags['module-type']);
|
|
117
|
-
const request = requestFromSelections(flags, resolvedSelections.map(({ selection }) => selection));
|
|
130
|
+
const request = await requestFromSelections(flags, resolvedSelections.map(({ selection }) => selection));
|
|
131
|
+
request.localPathsBySelection = new Map(resolvedSelections.map(({ localPaths, selection }) => [`${selection.type}:${selection.name}`, localPaths]));
|
|
132
|
+
return request;
|
|
133
|
+
}
|
|
134
|
+
if (flags.path?.length) {
|
|
135
|
+
const resolvedSelections = resolvedSelectionsFromPaths(flags.path, flags['module-type']);
|
|
136
|
+
const request = await requestFromSelections(flags, resolvedSelections.map(({ selection }) => selection));
|
|
118
137
|
request.localPathsBySelection = new Map(resolvedSelections.map(({ localPaths, selection }) => [`${selection.type}:${selection.name}`, localPaths]));
|
|
119
138
|
return request;
|
|
120
139
|
}
|
|
121
140
|
if (!flags['metadata-name'] || !flags['metadata-type']) {
|
|
122
|
-
throw new Error('Requires `--metadata-name` and `--metadata-type`, or an input mode such as --file, --stdin,
|
|
141
|
+
throw new Error('Requires `--metadata-name` and `--metadata-type`, or an input mode such as --file, --stdin, --from-changes, or --path.');
|
|
123
142
|
}
|
|
124
143
|
return requestFromSelections(flags, [metadataSelectionFromFlags(flags)]);
|
|
125
144
|
}
|
|
126
|
-
async function enrichDependencyResult(result, localPathsBySelection, moduleType) {
|
|
145
|
+
export async function enrichDependencyResult(result, localPathsBySelection, moduleType) {
|
|
127
146
|
if (!Array.isArray(result.dependencies)) {
|
|
128
147
|
return result;
|
|
129
148
|
}
|
|
@@ -198,12 +217,13 @@ async function enrichDependencyResult(result, localPathsBySelection, moduleType)
|
|
|
198
217
|
}),
|
|
199
218
|
};
|
|
200
219
|
}
|
|
201
|
-
export default class DependencyGet extends
|
|
220
|
+
export default class DependencyGet extends CicdCommand {
|
|
202
221
|
static description = 'Retrieve metadata dependencies';
|
|
203
222
|
static examples = [
|
|
204
223
|
'<%= config.bin %> <%= command.id %> --metadata-name MyClass --metadata-type ApexClass --pipeline-id <id> --source-org-id <id> --source-credential-id <id>',
|
|
205
224
|
'cat request.json | <%= config.bin %> <%= command.id %> --stdin',
|
|
206
225
|
'<%= config.bin %> <%= command.id %> --from-changes --base-ref origin/main --retrieve-mode all --pipeline-id <id> --source-org-id <id> --source-credential-id <id>',
|
|
226
|
+
'<%= config.bin %> <%= command.id %> --path force-app/main/default/classes/MyClass.cls --pipeline-id <id> --source-credential-id <id> --source-org-id <id> --target-org-id <id> --platform-experience sfdx --retrieve-mode all --json',
|
|
207
227
|
];
|
|
208
228
|
static flags = {
|
|
209
229
|
'base-ref': Flags.string({
|
|
@@ -234,12 +254,15 @@ export default class DependencyGet extends AgentiaCommand {
|
|
|
234
254
|
description: 'Optional addon module type',
|
|
235
255
|
options: [...MODULE_TYPES],
|
|
236
256
|
}),
|
|
257
|
+
path: Flags.string({
|
|
258
|
+
description: 'Local Salesforce source file path to resolve into a metadata selection. Repeatable. Mutually exclusive with --file, --stdin, and --from-changes.',
|
|
259
|
+
multiple: true,
|
|
260
|
+
}),
|
|
237
261
|
'pipeline-id': Flags.string({
|
|
238
|
-
description: 'Pipeline Id',
|
|
262
|
+
description: 'Pipeline Id. Defaults to the active work item pipelineId, or the pipeline on the project default.',
|
|
239
263
|
}),
|
|
240
264
|
'platform-experience': Flags.string({
|
|
241
|
-
|
|
242
|
-
description: 'Platform experience header',
|
|
265
|
+
description: 'Platform experience header. Defaults to the active work item platform, then sfdx.',
|
|
243
266
|
options: [...PLATFORM_EXPERIENCES],
|
|
244
267
|
}),
|
|
245
268
|
'result-id': Flags.string({
|
|
@@ -250,17 +273,17 @@ export default class DependencyGet extends AgentiaCommand {
|
|
|
250
273
|
options: [...RETRIEVE_MODES],
|
|
251
274
|
}),
|
|
252
275
|
'source-credential-id': Flags.string({
|
|
253
|
-
description: 'Source org credential Id',
|
|
276
|
+
description: 'Source org credential Id. Defaults to the active work item source credential, or the project default credential.',
|
|
254
277
|
}),
|
|
255
278
|
'source-org-id': Flags.string({
|
|
256
|
-
description: 'Source org Id',
|
|
279
|
+
description: 'Source org Id. Defaults to the active work item sourceOrgId, or orgId from the resolved source credential/environment.',
|
|
257
280
|
}),
|
|
258
281
|
stdin: Flags.boolean({
|
|
259
282
|
default: false,
|
|
260
283
|
description: 'Read a JSON dependency request body from stdin',
|
|
261
284
|
}),
|
|
262
285
|
'target-org-id': Flags.string({
|
|
263
|
-
description: 'Target org Id',
|
|
286
|
+
description: 'Target org Id. Not inferred from work item or project defaults.',
|
|
264
287
|
}),
|
|
265
288
|
};
|
|
266
289
|
async run() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../lib/cicd-command.js';
|
|
3
3
|
import { AI_METADATA_ACTIONS, buildAiMetadataToolRequest, callAiMetadataTool, } from '../../../lib/metadata-explore.js';
|
|
4
|
-
export default class MetadataExplore extends
|
|
4
|
+
export default class MetadataExplore extends CicdCommand {
|
|
5
5
|
static description = [
|
|
6
6
|
'Explore Salesforce metadata through Org Intelligence.',
|
|
7
7
|
'Uses the project default credential when --credential-id is omitted;',
|
|
@@ -1,5 +1,5 @@
|
|
|
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 { assertRequired, COMPARISON_MODES, formatDiffTable, normalizeDiffRows, } from '../../../../lib/metadata-common.js';
|
|
5
5
|
export function buildMetadataCompareRequest(flags) {
|
|
@@ -31,7 +31,7 @@ function formatSectionSummary(section) {
|
|
|
31
31
|
}
|
|
32
32
|
return parts.join(', ');
|
|
33
33
|
}
|
|
34
|
-
export default class MetadataCompare extends
|
|
34
|
+
export default class MetadataCompare extends CicdCommand {
|
|
35
35
|
static description = 'Compare metadata between orgs or Git branches';
|
|
36
36
|
static examples = [
|
|
37
37
|
'<%= config.bin %> <%= command.id %> --comparison-mode BRANCH_COMPARE --pipeline-id <id> --source-org-id <id> --source-credential-id <id> --target-org-id <id>',
|
|
@@ -1,5 +1,5 @@
|
|
|
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 { assertRequired, formatIndexSummary, formatIndexTable, INDEX_SOURCES, MODULE_TYPES, normalizeIndexRows, ORDER_DIRECTIONS, PLATFORM_EXPERIENCES, splitCsv, } from '../../../lib/metadata-common.js';
|
|
5
5
|
export function buildMetadataIndexRequest(flags) {
|
|
@@ -45,7 +45,7 @@ export function buildMetadataIndexRequest(flags) {
|
|
|
45
45
|
}
|
|
46
46
|
return body;
|
|
47
47
|
}
|
|
48
|
-
export default class MetadataSearch extends
|
|
48
|
+
export default class MetadataSearch extends CicdCommand {
|
|
49
49
|
static description = 'Search the metadata index for an org';
|
|
50
50
|
static examples = [
|
|
51
51
|
'<%= config.bin %> <%= command.id %> --pipeline-id <id> --source-org-id <id> --source-credential-id <id>',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { assertRequired } from '../../../../lib/assert.js';
|
|
4
4
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
5
5
|
import { MODULE_TYPES } from '../../../../lib/metadata-common.js';
|
|
6
6
|
import { buildRefreshDeletedRequest, formatRefreshDeletedResult, resolveRefreshSourceFromEnv, } from '../../../../lib/metadata-refresh.js';
|
|
7
|
-
export default class MetadataRefreshDeleted extends
|
|
7
|
+
export default class MetadataRefreshDeleted extends CicdCommand {
|
|
8
8
|
static description = 'Refresh the deleted metadata index';
|
|
9
9
|
static examples = [
|
|
10
10
|
'<%= config.bin %> <%= command.id %> --env <environment-id>',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { assertRequired } from '../../../../lib/assert.js';
|
|
4
4
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
5
5
|
import { MODULE_TYPES, PLATFORM_EXPERIENCES, splitCsv, } from '../../../../lib/metadata-common.js';
|
|
6
6
|
import { buildRefreshIndexRequest, formatIndexRefreshResult, resolveRefreshSourceFromEnv, } from '../../../../lib/metadata-refresh.js';
|
|
7
|
-
export default class MetadataRefreshRun extends
|
|
7
|
+
export default class MetadataRefreshRun extends CicdCommand {
|
|
8
8
|
static description = 'Trigger a metadata index refresh';
|
|
9
9
|
static examples = [
|
|
10
10
|
'<%= config.bin %> <%= command.id %> --env <environment-id>',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { assertRequired } from '../../../../lib/assert.js';
|
|
4
4
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
5
5
|
import { MODULE_TYPES, PLATFORM_EXPERIENCES } from '../../../../lib/metadata-common.js';
|
|
6
6
|
import { formatIndexRefreshResult, refreshStatusEndpoint } from '../../../../lib/metadata-refresh.js';
|
|
7
|
-
export default class MetadataRefreshStatus extends
|
|
7
|
+
export default class MetadataRefreshStatus extends CicdCommand {
|
|
8
8
|
static description = 'Get metadata index refresh status';
|
|
9
9
|
static examples = [
|
|
10
10
|
'<%= config.bin %> <%= command.id %> --job-id <event-id>',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../lib/cicd-command.js';
|
|
3
3
|
import { configureNotification, formatConfigureNotificationSummary, NOTIFICATION_DESTINATION_TYPES, NOTIFICATION_EVENTS, NOTIFICATION_SUBSCRIPTIONS, NotificationConfigureInputError, withNotificationConfigureErrorTranslation, } from '../../../lib/notifications-configure.js';
|
|
4
|
-
export default class NotificationConfigure extends
|
|
4
|
+
export default class NotificationConfigure extends CicdCommand {
|
|
5
5
|
static description = 'Configure one Slack notification subscription for the current user on a pipeline';
|
|
6
6
|
static examples = [
|
|
7
7
|
'<%= config.bin %> <%= command.id %> --pipeline-id <pipeline-id> --event Promotion_Failed --destination-type user --destination-id U0123ABCD --subscription user',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../lib/cicd-command.js';
|
|
3
3
|
import { NotificationConfigureInputError } from '../../../lib/notifications-configure.js';
|
|
4
4
|
import { formatNotificationSubscriptionsTable, getNotificationSubscriptions, NotificationGetUserUnavailableError, } from '../../../lib/notifications-get.js';
|
|
5
|
-
export default class NotificationGet extends
|
|
5
|
+
export default class NotificationGet extends CicdCommand {
|
|
6
6
|
static description = 'List Slack notification subscriptions for the current user on a pipeline';
|
|
7
7
|
static examples = [
|
|
8
8
|
'<%= config.bin %> <%= command.id %> --pipeline-id <pipeline-id>',
|
|
@@ -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 { assertRequired } from '../../../../lib/assert.js';
|
|
4
4
|
import { activatePipelineAutomationRule } from '../../../../lib/pipeline-automation-ops.js';
|
|
5
5
|
import { assertSalesforceLifecycleId } from '../../../../lib/pipeline-lifecycle-id.js';
|
|
6
|
-
export default class PipelineAutomationActivate extends
|
|
6
|
+
export default class PipelineAutomationActivate extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
id: Args.string({
|
|
9
9
|
description: 'Automation rule Salesforce ID (not name)',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
2
2
|
import { assertRequired } from '../../../../lib/assert.js';
|
|
3
3
|
import { buildPipelineAutomationCreatePayload, pipelineAutomationMutationFlags, } from '../../../../lib/pipeline-automation-flags.js';
|
|
4
4
|
import { createPipelineAutomationRule } from '../../../../lib/pipeline-automation-ops.js';
|
|
5
5
|
import { formatPipelineAutomationRuleDetail, } from '../../../../lib/pipeline-automation-types.js';
|
|
6
|
-
export default class PipelineAutomationCreate extends
|
|
6
|
+
export default class PipelineAutomationCreate extends CicdCommand {
|
|
7
7
|
static description = 'Create an inactive Copado pipeline automation rule';
|
|
8
8
|
static examples = [
|
|
9
9
|
'<%= config.bin %> <%= command.id %> --pipeline-id <pipeline-id> --name "Promote after successful deploy" --scope promotion --execution-time Immediate --promotion-trigger automated --environment-id <env-id>',
|
|
@@ -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 { assertRequired } from '../../../../lib/assert.js';
|
|
4
4
|
import { deactivatePipelineAutomationRule } from '../../../../lib/pipeline-automation-ops.js';
|
|
5
5
|
import { assertSalesforceLifecycleId } from '../../../../lib/pipeline-lifecycle-id.js';
|
|
6
|
-
export default class PipelineAutomationDeactivate extends
|
|
6
|
+
export default class PipelineAutomationDeactivate extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
id: Args.string({
|
|
9
9
|
description: 'Automation rule Salesforce ID (not name)',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { confirm } from '@inquirer/prompts';
|
|
2
2
|
import { Args, Flags } from '@oclif/core';
|
|
3
|
-
import {
|
|
3
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
4
4
|
import { assertRequired } from '../../../../lib/assert.js';
|
|
5
5
|
import { deletePipelineAutomationRule } from '../../../../lib/pipeline-automation-ops.js';
|
|
6
|
-
export default class PipelineAutomationDelete extends
|
|
6
|
+
export default class PipelineAutomationDelete extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
id: Args.string({
|
|
9
9
|
description: 'Automation rule ID or 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 { assertRequired } from '../../../../lib/assert.js';
|
|
4
4
|
import { fetchPipelineAutomationRule } from '../../../../lib/pipeline-automation-ops.js';
|
|
5
5
|
import { formatPipelineAutomationRuleDetail, } from '../../../../lib/pipeline-automation-types.js';
|
|
6
|
-
export default class PipelineAutomationGet extends
|
|
6
|
+
export default class PipelineAutomationGet extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
id: Args.string({
|
|
9
9
|
description: 'Automation rule ID or name',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
2
2
|
import { assertRequired } from '../../../../lib/assert.js';
|
|
3
3
|
import { displayListPagination } from '../../../../lib/list-pagination.js';
|
|
4
4
|
import { pipelineAutomationListFlags } from '../../../../lib/pipeline-automation-flags.js';
|
|
5
5
|
import { fetchPipelineAutomationRules } from '../../../../lib/pipeline-automation-ops.js';
|
|
6
6
|
import { formatPipelineAutomationRuleTable, } from '../../../../lib/pipeline-automation-types.js';
|
|
7
|
-
export default class PipelineAutomationList extends
|
|
7
|
+
export default class PipelineAutomationList extends CicdCommand {
|
|
8
8
|
static description = 'List Copado pipeline automation rules';
|
|
9
9
|
static examples = [
|
|
10
10
|
'<%= config.bin %> <%= command.id %> --pipeline-id <pipeline-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 { openNavigationTarget } from '../../../../lib/navigation-open.js';
|
|
4
4
|
import { resolveNavigationTarget } from '../../../../lib/navigation.js';
|
|
5
5
|
import { assertSalesforceLifecycleId } from '../../../../lib/pipeline-lifecycle-id.js';
|
|
6
|
-
export default class PipelineAutomationOpen extends
|
|
6
|
+
export default class PipelineAutomationOpen extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
id: Args.string({
|
|
9
9
|
description: 'Automation rule Salesforce ID',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { assertRequired } from '../../../../lib/assert.js';
|
|
4
4
|
import { buildPipelineAutomationUpdatePayload, pipelineAutomationMutationFlags, } from '../../../../lib/pipeline-automation-flags.js';
|
|
5
5
|
import { updatePipelineAutomationRule } from '../../../../lib/pipeline-automation-ops.js';
|
|
6
6
|
import { formatPipelineAutomationRuleDetail, } from '../../../../lib/pipeline-automation-types.js';
|
|
7
|
-
export default class PipelineAutomationUpdate extends
|
|
7
|
+
export default class PipelineAutomationUpdate extends CicdCommand {
|
|
8
8
|
static args = {
|
|
9
9
|
id: Args.string({
|
|
10
10
|
description: 'Automation rule ID or name',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
2
2
|
import { assertRequired } from '../../../../lib/assert.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { buildPipelineConnectionCreatePayload, pipelineConnectionCreateFlags, readPipelineConnectionArrayFromFile, validatePipelineConnectionCreatePayload, } from '../../../../lib/pipeline-connection-flags.js';
|
|
5
5
|
import { normalizePipelineConnections, pipelineConnectionsEndpoint, } from '../../../../lib/pipeline-types.js';
|
|
6
|
-
export default class PipelineConnectionCreate extends
|
|
6
|
+
export default class PipelineConnectionCreate extends CicdCommand {
|
|
7
7
|
static description = 'Create one or more Copado pipeline connections';
|
|
8
8
|
static examples = [
|
|
9
9
|
'<%= config.bin %> <%= command.id %> --pipeline-id pipeline-1 --source-environment-id env-1 --destination-environment-id env-2 --branch main',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { confirm } from '@inquirer/prompts';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { assertRequired } from '../../../../lib/assert.js';
|
|
4
4
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
5
5
|
import { pipelineConnectionDeleteFlags, readPipelineConnectionIdsFromFile, } from '../../../../lib/pipeline-connection-flags.js';
|
|
6
6
|
import { pipelineConnectionsEndpoint } from '../../../../lib/pipeline-types.js';
|
|
7
|
-
export default class PipelineConnectionDelete extends
|
|
7
|
+
export default class PipelineConnectionDelete extends CicdCommand {
|
|
8
8
|
static description = 'Delete one or more Copado pipeline connections';
|
|
9
9
|
static examples = [
|
|
10
10
|
'<%= config.bin %> <%= command.id %> --pipeline-id pipeline-1 --connection-id conn-1 --yes',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { assertRequired } from '../../../../lib/assert.js';
|
|
4
4
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
5
5
|
import { formatPipelineConnectionTable, normalizePipelineDescribe, pipelineDescribeEndpoint, } from '../../../../lib/pipeline-types.js';
|
|
6
|
-
export default class PipelineConnectionList extends
|
|
6
|
+
export default class PipelineConnectionList extends CicdCommand {
|
|
7
7
|
static description = 'List connections for a Copado pipeline';
|
|
8
8
|
static examples = [
|
|
9
9
|
'<%= config.bin %> <%= command.id %> --pipeline-id <pipeline-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 PipelineConnectionOpen extends
|
|
5
|
+
export default class PipelineConnectionOpen extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
id: Args.string({
|
|
8
8
|
description: 'Pipeline connection ID',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
2
2
|
import { assertRequired } from '../../../../lib/assert.js';
|
|
3
3
|
import { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { buildPipelineConnectionUpdatePayload, pipelineConnectionUpdateFlags, readPipelineConnectionUpdateArrayFromFile, validatePipelineConnectionUpdatePayload, } from '../../../../lib/pipeline-connection-flags.js';
|
|
5
5
|
import { normalizePipelineConnections, pipelineConnectionsEndpoint, } from '../../../../lib/pipeline-types.js';
|
|
6
|
-
export default class PipelineConnectionUpdate extends
|
|
6
|
+
export default class PipelineConnectionUpdate extends CicdCommand {
|
|
7
7
|
static description = 'Update one or more Copado pipeline connections';
|
|
8
8
|
static examples = [
|
|
9
9
|
'<%= config.bin %> <%= command.id %> --pipeline-id pipeline-1 --connection-id conn-1 --destination-branch develop',
|
|
@@ -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 { buildPipelineCreatePayload, pipelineCreateFlags, validatePipelineMutationPayload, } from '../../../lib/pipeline-flags.js';
|
|
5
5
|
import { normalizePipeline, pipelineListEndpoint, } from '../../../lib/pipeline-types.js';
|
|
6
|
-
export default class PipelineCreate extends
|
|
6
|
+
export default class PipelineCreate extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
name: Args.string({
|
|
9
9
|
description: 'Name of the Copado pipeline to create',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../lib/cicd-command.js';
|
|
3
3
|
import { fetchPipeline } from '../../../lib/pipeline-get.js';
|
|
4
4
|
import { formatPipelineDetail } from '../../../lib/pipeline-types.js';
|
|
5
|
-
export default class PipelineGet extends
|
|
5
|
+
export default class PipelineGet extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
id: Args.string({
|
|
8
8
|
description: 'Pipeline Id',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CicdCommand } from '../../../lib/cicd-command.js';
|
|
2
2
|
import { displayListPagination, } from '../../../lib/list-pagination.js';
|
|
3
3
|
import { buildPipelineListFilters, pipelineListFlags } from '../../../lib/pipeline-flags.js';
|
|
4
4
|
import { fetchPipelines } from '../../../lib/pipeline-get.js';
|
|
5
5
|
import { formatPipelineTable } from '../../../lib/pipeline-types.js';
|
|
6
|
-
export default class PipelineList extends
|
|
6
|
+
export default class PipelineList extends CicdCommand {
|
|
7
7
|
static description = 'List Copado pipelines';
|
|
8
8
|
static examples = [
|
|
9
9
|
'<%= 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 PipelineOpen extends
|
|
5
|
+
export default class PipelineOpen extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
id: Args.string({
|
|
8
8
|
description: 'Pipeline ID',
|
|
@@ -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 { assertRequired } from '../../../../lib/assert.js';
|
|
4
4
|
import { assertSalesforceLifecycleId } from '../../../../lib/pipeline-lifecycle-id.js';
|
|
5
5
|
import { activatePipelineQualityGate } from '../../../../lib/pipeline-quality-gate-ops.js';
|
|
6
|
-
export default class PipelineQualityGateActivate extends
|
|
6
|
+
export default class PipelineQualityGateActivate extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
id: Args.string({
|
|
9
9
|
description: 'Quality gate Salesforce ID (not name)',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
2
2
|
import { assertRequired } from '../../../../lib/assert.js';
|
|
3
3
|
import { buildPipelineQualityGateCreatePayload, pipelineQualityGateCreateFlags, } from '../../../../lib/pipeline-quality-gate-flags.js';
|
|
4
4
|
import { createPipelineQualityGates } from '../../../../lib/pipeline-quality-gate-ops.js';
|
|
5
5
|
import { formatPipelineQualityGateTable } from '../../../../lib/pipeline-quality-gate-types.js';
|
|
6
|
-
export default class PipelineQualityGateCreate extends
|
|
6
|
+
export default class PipelineQualityGateCreate extends CicdCommand {
|
|
7
7
|
static description = 'Create inactive Copado pipeline quality gates';
|
|
8
8
|
static examples = [
|
|
9
9
|
'<%= config.bin %> <%= command.id %> --pipeline-id <pipeline-id> --tool Selenium --execution-sequence After --action Deployment --extension-configuration-id <ext-conf-id> --environment-id <env-id> --tests-from "User Story"',
|
|
@@ -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 { assertRequired } from '../../../../lib/assert.js';
|
|
4
4
|
import { assertSalesforceLifecycleId } from '../../../../lib/pipeline-lifecycle-id.js';
|
|
5
5
|
import { deactivatePipelineQualityGate } from '../../../../lib/pipeline-quality-gate-ops.js';
|
|
6
|
-
export default class PipelineQualityGateDeactivate extends
|
|
6
|
+
export default class PipelineQualityGateDeactivate extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
id: Args.string({
|
|
9
9
|
description: 'Quality gate Salesforce ID (not name)',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { confirm } from '@inquirer/prompts';
|
|
2
2
|
import { Args, Flags } from '@oclif/core';
|
|
3
|
-
import {
|
|
3
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
4
4
|
import { assertRequired } from '../../../../lib/assert.js';
|
|
5
5
|
import { deletePipelineQualityGate } from '../../../../lib/pipeline-quality-gate-ops.js';
|
|
6
|
-
export default class PipelineQualityGateDelete extends
|
|
6
|
+
export default class PipelineQualityGateDelete extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
id: Args.string({
|
|
9
9
|
description: 'Quality gate ID or 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 { assertRequired } from '../../../../lib/assert.js';
|
|
4
4
|
import { fetchPipelineQualityGate } from '../../../../lib/pipeline-quality-gate-ops.js';
|
|
5
5
|
import { formatPipelineQualityGateDetail, } from '../../../../lib/pipeline-quality-gate-types.js';
|
|
6
|
-
export default class PipelineQualityGateGet extends
|
|
6
|
+
export default class PipelineQualityGateGet extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
id: Args.string({
|
|
9
9
|
description: 'Quality gate ID or name',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
2
2
|
import { assertRequired } from '../../../../lib/assert.js';
|
|
3
3
|
import { displayListPagination } from '../../../../lib/list-pagination.js';
|
|
4
4
|
import { pipelineQualityGateListFlags } from '../../../../lib/pipeline-quality-gate-flags.js';
|
|
5
5
|
import { fetchPipelineQualityGates } from '../../../../lib/pipeline-quality-gate-ops.js';
|
|
6
6
|
import { formatPipelineQualityGateTable, } from '../../../../lib/pipeline-quality-gate-types.js';
|
|
7
|
-
export default class PipelineQualityGateList extends
|
|
7
|
+
export default class PipelineQualityGateList extends CicdCommand {
|
|
8
8
|
static description = 'List Copado pipeline quality gates';
|
|
9
9
|
static examples = [
|
|
10
10
|
'<%= config.bin %> <%= command.id %> --pipeline-id <pipeline-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 { openNavigationTarget } from '../../../../lib/navigation-open.js';
|
|
4
4
|
import { resolveNavigationTarget } from '../../../../lib/navigation.js';
|
|
5
5
|
import { assertSalesforceLifecycleId } from '../../../../lib/pipeline-lifecycle-id.js';
|
|
6
|
-
export default class PipelineQualityGateOpen extends
|
|
6
|
+
export default class PipelineQualityGateOpen extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
id: Args.string({
|
|
9
9
|
description: 'Quality gate Salesforce ID',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { assertRequired } from '../../../../lib/assert.js';
|
|
4
4
|
import { buildPipelineQualityGateUpdatePayload, pipelineQualityGateUpdateFlags, } from '../../../../lib/pipeline-quality-gate-flags.js';
|
|
5
5
|
import { updatePipelineQualityGate } from '../../../../lib/pipeline-quality-gate-ops.js';
|
|
6
6
|
import { formatPipelineQualityGateDetail, } from '../../../../lib/pipeline-quality-gate-types.js';
|
|
7
|
-
export default class PipelineQualityGateUpdate extends
|
|
7
|
+
export default class PipelineQualityGateUpdate extends CicdCommand {
|
|
8
8
|
static args = {
|
|
9
9
|
id: Args.string({
|
|
10
10
|
description: 'Quality gate ID or name',
|