@copado/agentia-cli 1.2.0 → 1.4.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 +58 -1
- package/README.md +2299 -1615
- 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 +6 -5
- package/dist/commands/cicd/cloud/promote.js +44 -8
- 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 +4 -3
- 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 +4 -3
- 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 +4 -3
- 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 +12 -15
- 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 +4 -3
- 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 +13 -8
- 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 +4 -3
- 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 +4 -3
- 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 +4 -3
- 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 +4 -3
- 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 +4 -3
- 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/promotion/status.js +29 -0
- 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 +7 -10
- 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 +4 -3
- 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 +11 -14
- 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 +4 -4
- 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 +140 -64
- package/dist/commands/cicd/work/get.js +4 -4
- package/dist/commands/cicd/work/list.js +4 -3
- 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 +20 -35
- package/dist/commands/cicd/work/test.js +116 -11
- package/dist/commands/cicd/work/update.js +4 -4
- 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/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 +5 -1
- package/dist/lib/dependency-from-changes.js +3 -1
- package/dist/lib/dependency-source-context.js +3 -0
- package/dist/lib/function-list.js +3 -0
- package/dist/lib/git-worktree.js +4 -1
- 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/job-get.js +2 -1
- package/dist/lib/job-types.js +2 -1
- package/dist/lib/list-pagination.js +6 -1
- package/dist/lib/local-quality-gates.js +4 -1
- package/dist/lib/mcp/result.js +41 -3
- package/dist/lib/mcp/server.js +3 -2
- package/dist/lib/mcp/testing-browser-tools.js +179 -0
- package/dist/lib/mcp/testing-tools.js +4 -3
- package/dist/lib/mcp/tool-annotations.js +31 -12
- package/dist/lib/mcp/tools.js +115 -59
- package/dist/lib/mcp/work-tools.js +100 -47
- package/dist/lib/promotion-queue.js +5 -0
- package/dist/lib/promotion-run.js +4 -1
- package/dist/lib/promotion-status.js +12 -0
- package/dist/lib/quality-gates.js +13 -0
- package/dist/lib/repository-list.js +3 -0
- package/dist/lib/runtime.js +1 -1
- package/dist/lib/stock-quality-gates.js +2 -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/template-list.js +3 -0
- package/dist/lib/testing-browser-command.js +6 -0
- package/dist/lib/testing-browser-operations.js +16 -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 +13 -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-apex-test-failures.js +2 -1
- package/dist/lib/work-environment-sync-ready.js +7 -1
- package/dist/lib/work-environment-sync.js +8 -1
- package/dist/lib/work-local-run-tests.js +2 -1
- package/dist/lib/work-promote-deploy.js +3 -1
- package/dist/lib/work-promote.js +2 -1
- package/dist/lib/work-types.js +3 -1
- package/oclif.manifest.json +3544 -1828
- 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 +6 -5
- package/templates/skills/agentia-cicd/references/environments-and-credentials.md +16 -0
- package/templates/skills/agentia-cicd/references/jobs.md +3 -2
- package/templates/skills/agentia-cicd/references/promotions.md +26 -5
- package/templates/skills/agentia-cicd/references/work.md +25 -11
- 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 +92 -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/vendor/java/var-replace-command.jar +0 -0
- 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,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 %>',
|
|
@@ -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 DataTemplateOpen extends
|
|
5
|
+
export default class DataTemplateOpen extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
id: 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 { dataTemplateDetailEndpoint, normalizeDataTemplateSavePayload, } from '../../../../lib/data-types.js';
|
|
6
|
-
export default class DataTemplateSaveDetail extends
|
|
6
|
+
export default class DataTemplateSaveDetail extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
id: Args.string({
|
|
9
9
|
description: 'Data template Id',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Args, Flags, ux } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../../lib/cicd-command.js';
|
|
3
3
|
import { runEnvironmentAuthStatus } 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 EnvironmentAuthStatus extends
|
|
6
|
+
export default class EnvironmentAuthStatus extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
id: Args.string({
|
|
9
9
|
description: 'Copado environment ID (optional when --credentialid is provided)',
|
|
@@ -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, runEnvironmentWebLogin, } from '../../../../../lib/environment-auth.js';
|
|
4
4
|
import { EnvironmentCredentialInputError } from '../../../../../lib/environment-credential-flags.js';
|
|
5
|
-
export default class EnvironmentAuthWebLogin extends
|
|
5
|
+
export default class EnvironmentAuthWebLogin extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
id: Args.string({
|
|
8
8
|
description: 'Copado environment ID (optional when --credentialid is provided)',
|
|
@@ -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 { buildCreatePayload, ENVIRONMENT_STRING_VALIDATION_KEYS, environmentCreateFlags, validateNonEmptyStringFields, } from '../../../lib/environment-flags.js';
|
|
5
|
-
export default class EnvironmentCreate extends
|
|
5
|
+
export default class EnvironmentCreate extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
name: Args.string({
|
|
8
8
|
description: 'Name of the environment to create',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../lib/cicd-command.js';
|
|
3
3
|
import { sanitizeEnvironment } from '../../../lib/environment-credential-operations.js';
|
|
4
4
|
import { fetchEnvironment } from '../../../lib/environment-get.js';
|
|
5
5
|
import { formatEnvironmentDetail } from '../../../lib/environment-types.js';
|
|
6
|
-
export default class EnvironmentGet extends
|
|
6
|
+
export default class EnvironmentGet extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
id: Args.string({
|
|
9
9
|
description: 'Copado environment ID',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CicdCommand } from '../../../lib/cicd-command.js';
|
|
2
2
|
import { buildEnvironmentListFilters, environmentListFilterFlags } from '../../../lib/environment-flags.js';
|
|
3
3
|
import { fetchEnvironments } from '../../../lib/environment-get.js';
|
|
4
4
|
import { cellValue, table } from '../../../lib/format.js';
|
|
5
|
-
import { buildPaginatedListResult, displayListPagination, pickCursorPageMeta, } from '../../../lib/list-pagination.js';
|
|
5
|
+
import { buildPaginatedListResult, displayListPagination, emitPaginatedListWarnings, pickCursorPageMeta, } from '../../../lib/list-pagination.js';
|
|
6
6
|
export function normalizeEnvironmentsListPage(response) {
|
|
7
7
|
return buildPaginatedListResult(Array.isArray(response.data) ? response.data : [], pickCursorPageMeta(response));
|
|
8
8
|
}
|
|
@@ -41,7 +41,7 @@ export function formatEnvironmentTable(environments) {
|
|
|
41
41
|
}));
|
|
42
42
|
return table(header, rows);
|
|
43
43
|
}
|
|
44
|
-
export default class EnvironmentList extends
|
|
44
|
+
export default class EnvironmentList extends CicdCommand {
|
|
45
45
|
static description = 'List Copado environments';
|
|
46
46
|
static examples = [
|
|
47
47
|
'<%= config.bin %> <%= command.id %>',
|
|
@@ -53,6 +53,7 @@ export default class EnvironmentList extends AgentiaCommand {
|
|
|
53
53
|
const { flags } = await this.parse(EnvironmentList);
|
|
54
54
|
const filters = buildEnvironmentListFilters(flags);
|
|
55
55
|
const page = await this.withSpinner('Fetching environments', () => fetchEnvironments(filters));
|
|
56
|
+
emitPaginatedListWarnings(this.warn.bind(this), page);
|
|
56
57
|
this.display(() => {
|
|
57
58
|
if (page.data.length === 0) {
|
|
58
59
|
this.log('No environments found.');
|
|
@@ -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 { ProjectDefaultResolutionError, resolveProjectDefaultId } from '../../../lib/project-default-id.js';
|
|
6
|
-
export default class EnvironmentOpen extends
|
|
6
|
+
export default class EnvironmentOpen extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
id: Args.string({
|
|
9
9
|
description: 'Copado environment ID (defaults to the configured project default environment)',
|
|
@@ -1,10 +1,10 @@
|
|
|
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 { sanitizeEnvironment } from '../../../lib/environment-credential-operations.js';
|
|
5
5
|
import { buildMutationPayload, collectMutationFlagKeys, ENVIRONMENT_STRING_VALIDATION_KEYS, environmentUpdateFlags, validateNonEmptyStringFields, } from '../../../lib/environment-flags.js';
|
|
6
6
|
import { environmentEndpoint } from '../../../lib/environment-types.js';
|
|
7
|
-
export default class EnvironmentUpdate extends
|
|
7
|
+
export default class EnvironmentUpdate extends CicdCommand {
|
|
8
8
|
static args = {
|
|
9
9
|
id: Args.string({
|
|
10
10
|
description: 'Copado environment 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 { createExtension } from '../../../lib/extension/create.js';
|
|
4
|
-
export default class ExtensionCreate extends
|
|
4
|
+
export default class ExtensionCreate extends CicdCommand {
|
|
5
5
|
static description = 'Create or refresh a Copado extension manifest at copado/extension_manifest.json (scans copado/functions and copado/templates)';
|
|
6
6
|
static examples = [
|
|
7
7
|
'<%= config.bin %> <%= command.id %> --name my-extension --version 1.0.0',
|
|
@@ -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 { installExtension } from '../../../lib/extension/install.js';
|
|
5
5
|
import { parseVersionFromRef, versionTagName } from '../../../lib/extension/manifest.js';
|
|
6
|
-
export default class ExtensionInstall extends
|
|
6
|
+
export default class ExtensionInstall extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
source: Args.string({
|
|
9
9
|
description: 'Git repository URL, owner/repo slug, or local directory path',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../lib/cicd-command.js';
|
|
3
3
|
import { packageExtension } from '../../../lib/extension/package.js';
|
|
4
|
-
export default class ExtensionPackage extends
|
|
4
|
+
export default class ExtensionPackage extends CicdCommand {
|
|
5
5
|
static description = 'Validate a Copado extension for publish (requires semver version; optional --version bump)';
|
|
6
6
|
static examples = [
|
|
7
7
|
'<%= config.bin %> <%= command.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 { publishExtension } from '../../../lib/extension/publish.js';
|
|
4
|
-
export default class ExtensionPublish extends
|
|
4
|
+
export default class ExtensionPublish extends CicdCommand {
|
|
5
5
|
static description = 'Push the current extension commit and create an annotated semver git tag (vX.Y.Z) for install pinning';
|
|
6
6
|
static examples = [
|
|
7
7
|
'<%= config.bin %> <%= command.id %>',
|
|
@@ -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 { parseVersionFromRef, versionTagName } from '../../../lib/extension/manifest.js';
|
|
5
5
|
import { uninstallExtension } from '../../../lib/extension/uninstall.js';
|
|
6
|
-
export default class ExtensionUninstall extends
|
|
6
|
+
export default class ExtensionUninstall extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
source: Args.string({
|
|
9
9
|
description: 'Git repository URL, owner/repo slug, or local directory path',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../lib/cicd-command.js';
|
|
3
3
|
import { validateExtension } from '../../../lib/extension/manifest.js';
|
|
4
|
-
export default class ExtensionValidate extends
|
|
4
|
+
export default class ExtensionValidate extends CicdCommand {
|
|
5
5
|
static description = 'Validate a Copado extension manifest against copado/functions and copado/templates on disk';
|
|
6
6
|
static examples = [
|
|
7
7
|
'<%= 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 { fetchExtensionConfiguration } from '../../../lib/extension-configuration-ops.js';
|
|
4
4
|
import { formatExtensionConfigurationDetail, } from '../../../lib/extension-configuration-types.js';
|
|
5
|
-
export default class ExtensionConfigurationGet extends
|
|
5
|
+
export default class ExtensionConfigurationGet extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
id: Args.string({
|
|
8
8
|
description: 'Extension configuration ID or name',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../../lib/cicd-command.js';
|
|
3
3
|
import { fetchExtensionConfigurations } from '../../../lib/extension-configuration-ops.js';
|
|
4
4
|
import { formatExtensionConfigurationTable, } from '../../../lib/extension-configuration-types.js';
|
|
5
|
-
import { displayListPagination, listPaginationFlags } from '../../../lib/list-pagination.js';
|
|
6
|
-
export default class ExtensionConfigurationList extends
|
|
5
|
+
import { displayListPagination, emitPaginatedListWarnings, listPaginationFlags } from '../../../lib/list-pagination.js';
|
|
6
|
+
export default class ExtensionConfigurationList extends CicdCommand {
|
|
7
7
|
static description = 'List Copado extension configurations';
|
|
8
8
|
static examples = [
|
|
9
9
|
'<%= config.bin %> <%= command.id %>',
|
|
@@ -35,6 +35,7 @@ export default class ExtensionConfigurationList extends AgentiaCommand {
|
|
|
35
35
|
testType: flags['test-type'],
|
|
36
36
|
tool: flags.tool,
|
|
37
37
|
}));
|
|
38
|
+
emitPaginatedListWarnings(this.warn.bind(this), page);
|
|
38
39
|
this.display(() => {
|
|
39
40
|
if (page.data.length === 0) {
|
|
40
41
|
this.log('No extension configurations found.');
|
|
@@ -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 ExtensionConfigurationOpen extends
|
|
6
|
+
export default class ExtensionConfigurationOpen extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
id: Args.string({
|
|
9
9
|
description: 'Extension configuration Salesforce 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 { buildFunctionDefaultsPayload, functionDefaultsFlags } from '../../../lib/function-flags.js';
|
|
4
4
|
import { formatFunctionDetail, functionsEndpoint, normalizeFunction, } from '../../../lib/function-types.js';
|
|
5
|
-
export default class FunctionDefaults extends
|
|
5
|
+
export default class FunctionDefaults extends CicdCommand {
|
|
6
6
|
static description = 'Scaffold default Copado Function metadata and script without writing to Salesforce';
|
|
7
7
|
static examples = [
|
|
8
8
|
'<%= config.bin %> <%= command.id %> --name MyFunction',
|
|
@@ -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 { functionEndpoint } from '../../../lib/function-types.js';
|
|
5
|
-
export default class FunctionDelete extends
|
|
5
|
+
export default class FunctionDelete extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
'api-name': Args.string({
|
|
8
8
|
description: 'Function API name',
|
|
@@ -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 { formatFunctionDetail, functionEndpoint, normalizeFunction, } from '../../../lib/function-types.js';
|
|
5
|
-
export default class FunctionGet extends
|
|
5
|
+
export default class FunctionGet extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
'api-name': Args.string({
|
|
8
8
|
description: 'Function API name',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { formatFunctionTable, FUNCTION_LIST_TYPES,
|
|
5
|
-
import { buildListPaginationQuery, displayListPagination, listPaginationFlags, } from '../../../lib/list-pagination.js';
|
|
6
|
-
export default class FunctionList extends
|
|
2
|
+
import { CicdCommand } from '../../../lib/cicd-command.js';
|
|
3
|
+
import { fetchFunctions } from '../../../lib/function-list.js';
|
|
4
|
+
import { formatFunctionTable, FUNCTION_LIST_TYPES, } from '../../../lib/function-types.js';
|
|
5
|
+
import { buildListPaginationQuery, displayListPagination, emitPaginatedListWarnings, listPaginationFlags, } from '../../../lib/list-pagination.js';
|
|
6
|
+
export default class FunctionList extends CicdCommand {
|
|
7
7
|
static description = 'List Copado Functions';
|
|
8
8
|
static examples = [
|
|
9
9
|
'<%= config.bin %> <%= command.id %>',
|
|
@@ -34,17 +34,14 @@ export default class FunctionList extends AgentiaCommand {
|
|
|
34
34
|
async run() {
|
|
35
35
|
const { flags } = await this.parse(FunctionList);
|
|
36
36
|
const pagination = buildListPaginationQuery(flags);
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
type: flags.type,
|
|
44
|
-
}),
|
|
45
|
-
method: 'GET',
|
|
37
|
+
const page = await this.withSpinner('Fetching functions', () => fetchFunctions({
|
|
38
|
+
...pagination,
|
|
39
|
+
imageName: flags['image-name'],
|
|
40
|
+
name: flags.name,
|
|
41
|
+
size: flags.size,
|
|
42
|
+
type: flags.type,
|
|
46
43
|
}));
|
|
47
|
-
|
|
44
|
+
emitPaginatedListWarnings(this.warn.bind(this), page);
|
|
48
45
|
this.display(() => {
|
|
49
46
|
if (page.data.length === 0) {
|
|
50
47
|
this.log('No functions found.');
|
|
@@ -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 FunctionOpen extends
|
|
5
|
+
export default class FunctionOpen extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
id: Args.string({
|
|
8
8
|
description: 'Function 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 { formatFunctionResultStatus, functionResultEndpoint, normalizeFunctionResultStatus, } from '../../../../lib/function-types.js';
|
|
5
|
-
export default class FunctionResultGet extends
|
|
5
|
+
export default class FunctionResultGet extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
'result-id': Args.string({
|
|
8
8
|
description: 'Function result 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 { CicdGateway } from '../../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { functionResultLogEndpoint } from '../../../../../lib/function-types.js';
|
|
5
|
-
export default class FunctionResultLogGet extends
|
|
5
|
+
export default class FunctionResultLogGet extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
'result-id': Args.string({
|
|
8
8
|
description: 'Function result 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_FUNCTION_LOCAL_IMAGE, executeLocalFunctionRun, formatLocalFunctionRunResult, } from '../../../lib/function-local-run.js';
|
|
4
4
|
import { FUNCTION_RUNTIMES } from '../../../lib/function-types.js';
|
|
5
|
-
export default class FunctionRunLocal extends
|
|
5
|
+
export default class FunctionRunLocal extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
script: Args.string({
|
|
8
8
|
description: 'Path to the local function script (.sh, .js, or .py)',
|
|
@@ -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 { buildFunctionRunPayload, functionRunFlags } from '../../../lib/function-flags.js';
|
|
5
5
|
import { formatFunctionRunResult, functionRunEndpoint, normalizeFunctionRunResult, } from '../../../lib/function-types.js';
|
|
6
|
-
export default class FunctionRun extends
|
|
6
|
+
export default class FunctionRun extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
'api-name': Args.string({
|
|
9
9
|
description: 'Function API name',
|
|
@@ -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 { buildFunctionUpsertPayload, functionUpsertFlags } from '../../../lib/function-flags.js';
|
|
5
5
|
import { formatFunctionDetail, functionEndpoint, normalizeFunction, } from '../../../lib/function-types.js';
|
|
6
|
-
export default class FunctionUpsert extends
|
|
6
|
+
export default class FunctionUpsert extends CicdCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
'api-name': Args.string({
|
|
9
9
|
description: 'Function API name',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Flags, ux } from '@oclif/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CicdCommand } from '../../lib/cicd-command.js';
|
|
3
3
|
import { table } from '../../lib/format.js';
|
|
4
4
|
import { analyzeGitRepository, gitSizerRows } from '../../lib/git-sizer.js';
|
|
5
5
|
import { runOrganizationHealthChecks, } from '../../lib/health-check.js';
|
|
@@ -20,7 +20,7 @@ function displayStatus(status) {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
export default class HealthCheck extends
|
|
23
|
+
export default class HealthCheck extends CicdCommand {
|
|
24
24
|
static description = 'Run organization-scoped governance health checks';
|
|
25
25
|
static examples = [
|
|
26
26
|
'<%= 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 { fetchJob } from '../../../lib/job-get.js';
|
|
4
4
|
import { formatJobDetail } from '../../../lib/job-types.js';
|
|
5
|
-
export default class JobGet extends
|
|
5
|
+
export default class JobGet extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
id: Args.string({
|
|
8
8
|
description: 'JobExecution 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 { formatJobOperationResult, jobKillEndpoint, normalizeJobOperation, } from '../../../lib/job-types.js';
|
|
5
|
-
export default class JobKill extends
|
|
5
|
+
export default class JobKill extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
id: Args.string({
|
|
8
8
|
description: 'JobExecution 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 { fetchJobs } from '../../../lib/job-get.js';
|
|
4
4
|
import { formatJobTable } from '../../../lib/job-types.js';
|
|
5
|
-
import { buildListPaginationQuery, displayListPagination, listPaginationFlags, } from '../../../lib/list-pagination.js';
|
|
5
|
+
import { buildListPaginationQuery, displayListPagination, emitPaginatedListWarnings, listPaginationFlags, } from '../../../lib/list-pagination.js';
|
|
6
6
|
import { getUserContext } from '../../../lib/user-context.js';
|
|
7
|
-
export default class JobList extends
|
|
7
|
+
export default class JobList extends CicdCommand {
|
|
8
8
|
static description = 'List Copado job executions';
|
|
9
9
|
static examples = [
|
|
10
10
|
'<%= config.bin %> <%= command.id %>',
|
|
@@ -57,6 +57,7 @@ export default class JobList extends AgentiaCommand {
|
|
|
57
57
|
filters.ownerId = userId;
|
|
58
58
|
}
|
|
59
59
|
const page = await this.withSpinner('Fetching jobs', () => fetchJobs(filters));
|
|
60
|
+
emitPaginatedListWarnings(this.warn.bind(this), page);
|
|
60
61
|
this.display(() => {
|
|
61
62
|
if (page.data.length === 0) {
|
|
62
63
|
this.log('No jobs found.');
|
|
@@ -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 { CicdGateway } from '../../../../lib/cicd-gateway.js';
|
|
4
4
|
import { jobEndpoint, jobResultLogEndpoint, normalizeJob, resolveJobStepForLog, } from '../../../../lib/job-types.js';
|
|
5
|
-
export default class JobLogGet extends
|
|
5
|
+
export default class JobLogGet extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
id: Args.string({
|
|
8
8
|
description: 'JobExecution 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 JobOpen extends
|
|
5
|
+
export default class JobOpen extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
id: Args.string({
|
|
8
8
|
description: 'JobExecution 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 { formatJobOperationResult, jobPauseEndpoint, normalizeJobOperation, } from '../../../lib/job-types.js';
|
|
5
|
-
export default class JobPause extends
|
|
5
|
+
export default class JobPause extends CicdCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
id: Args.string({
|
|
8
8
|
description: 'JobExecution Id',
|