@copado/agentia-cli 1.0.0 → 1.2.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 +57 -0
- package/README.md +2252 -1529
- package/dist/commands/ai/agent/ask.js +4 -4
- package/dist/commands/ai/agent/chat.js +4 -4
- package/dist/commands/cicd/cloud/commit.js +7 -2
- package/dist/commands/cicd/credential/auth/status.js +38 -0
- package/dist/commands/cicd/credential/auth/web/login.js +54 -0
- package/dist/commands/cicd/credential/list.js +13 -17
- package/dist/commands/cicd/credential/open.js +30 -0
- package/dist/commands/cicd/credential/update.js +9 -12
- package/dist/commands/cicd/environment/auth/status.js +34 -13
- package/dist/commands/cicd/environment/auth/web/login.js +20 -4
- package/dist/commands/cicd/environment/open.js +6 -22
- package/dist/commands/cicd/extension/create.js +53 -0
- package/dist/commands/cicd/extension/install.js +127 -0
- package/dist/commands/cicd/extension/package.js +35 -0
- package/dist/commands/cicd/extension/publish.js +61 -0
- package/dist/commands/cicd/extension/uninstall.js +99 -0
- package/dist/commands/cicd/extension/validate.js +47 -0
- package/dist/commands/cicd/extension-configuration/get.js +24 -0
- package/dist/commands/cicd/extension-configuration/list.js +49 -0
- package/dist/commands/cicd/extension-configuration/open.js +38 -0
- package/dist/commands/cicd/metadata/content/get.js +1 -1
- package/dist/commands/cicd/metadata/dependency/list.js +2 -2
- package/dist/commands/cicd/metadata/explore.js +81 -0
- package/dist/commands/cicd/metadata/list.js +3 -3
- package/dist/commands/cicd/metadata/refresh/deleted.js +1 -1
- package/dist/commands/cicd/metadata/refresh/run.js +2 -2
- package/dist/commands/cicd/metadata/refresh/status.js +2 -2
- package/dist/commands/cicd/pipeline/automation/activate.js +39 -0
- package/dist/commands/cicd/pipeline/automation/create.js +33 -0
- package/dist/commands/cicd/pipeline/automation/deactivate.js +39 -0
- package/dist/commands/cicd/pipeline/automation/delete.js +45 -0
- package/dist/commands/cicd/pipeline/automation/get.js +32 -0
- package/dist/commands/cicd/pipeline/automation/list.js +38 -0
- package/dist/commands/cicd/pipeline/automation/open.js +38 -0
- package/dist/commands/cicd/pipeline/automation/update.js +38 -0
- package/dist/commands/cicd/pipeline/quality-gate/activate.js +39 -0
- package/dist/commands/cicd/pipeline/quality-gate/create.js +34 -0
- package/dist/commands/cicd/pipeline/quality-gate/deactivate.js +39 -0
- package/dist/commands/cicd/pipeline/quality-gate/delete.js +45 -0
- package/dist/commands/cicd/pipeline/quality-gate/get.js +32 -0
- package/dist/commands/cicd/pipeline/quality-gate/list.js +34 -0
- package/dist/commands/cicd/pipeline/quality-gate/open.js +38 -0
- package/dist/commands/cicd/pipeline/quality-gate/update.js +38 -0
- package/dist/commands/cicd/work/create.js +1 -0
- package/dist/commands/cicd/work/environment-sync.js +8 -7
- package/dist/commands/cicd/work/get.js +18 -2
- package/dist/commands/cicd/work/set.js +6 -4
- package/dist/commands/cicd/work/submit.js +3 -2
- package/dist/commands/cicd/work/update.js +1 -0
- package/dist/commands/plugins/install.js +2 -5
- package/dist/commands/setup/skills/create.js +29 -3
- package/dist/commands/setup/skills/list.js +55 -0
- package/dist/commands/setup/skills/update.js +37 -4
- package/dist/commands/setup.js +3 -3
- package/dist/commands/testing/data-table/create.js +1 -2
- package/dist/commands/testing/data-table/delete.js +1 -2
- package/dist/commands/testing/data-table/export.js +2 -6
- package/dist/commands/testing/data-table/get.js +2 -4
- package/dist/commands/testing/data-table/list.js +1 -2
- package/dist/commands/testing/data-table/update.js +3 -4
- package/dist/commands/testing/job/create.js +26 -22
- package/dist/commands/testing/job/delete.js +2 -2
- package/dist/commands/testing/job/files/download.js +73 -0
- package/dist/commands/testing/job/files/list.js +43 -0
- package/dist/commands/testing/job/{upload.js → files/upload.js} +13 -9
- package/dist/commands/testing/job/get.js +2 -2
- package/dist/commands/testing/job/list.js +1 -1
- package/dist/commands/testing/job/refs.js +4 -4
- package/dist/commands/testing/job/run.js +134 -1
- package/dist/commands/testing/{build → job/runs}/abort.js +10 -8
- package/dist/commands/testing/job/runs/get.js +42 -0
- package/dist/commands/testing/{build → job/runs}/list.js +19 -10
- package/dist/commands/testing/{logs.js → job/runs/logs.js} +9 -6
- package/dist/commands/testing/{build → job/runs}/search.js +9 -7
- package/dist/commands/testing/job/schedule/get.js +5 -11
- package/dist/commands/testing/job/schedule/remove.js +3 -3
- package/dist/commands/testing/job/schedule/set.js +3 -3
- package/dist/commands/testing/job/update.js +22 -65
- package/dist/commands/testing/live/continue.js +5 -10
- package/dist/commands/testing/live/execute.js +3 -3
- package/dist/commands/testing/live/history.js +7 -2
- package/dist/commands/testing/live/inspect.js +5 -4
- package/dist/commands/testing/live/interrupt.js +5 -10
- package/dist/commands/testing/live/recorder.js +23 -115
- package/dist/commands/testing/live/reports.js +3 -3
- package/dist/commands/testing/live/screenshot.js +3 -3
- package/dist/commands/testing/live/set-options.js +11 -4
- package/dist/commands/testing/live/start.js +9 -4
- package/dist/commands/testing/live/status.js +2 -5
- package/dist/commands/testing/live/stop.js +3 -5
- package/dist/commands/testing/live/view.js +2 -2
- package/dist/commands/testing/project/create.js +1 -17
- package/dist/commands/testing/project/get.js +0 -1
- package/dist/commands/testing/project/list.js +2 -2
- package/dist/commands/testing/project/permission/set.js +3 -7
- package/dist/commands/testing/project/permission/update.js +2 -2
- package/dist/commands/testing/robot/create.js +22 -25
- package/dist/commands/testing/robot/get.js +1 -1
- package/dist/commands/testing/robot/list.js +3 -3
- package/dist/commands/testing/robot/update.js +3 -3
- package/dist/commands/testing/user-parameter/create.js +3 -9
- package/dist/commands/testing/user-parameter/update.js +1 -7
- package/dist/commands/testing/variable/create.js +4 -9
- package/dist/commands/testing/variable/list.js +3 -3
- package/dist/commands/testing/variable/update.js +5 -12
- package/dist/help.js +17 -0
- package/dist/lib/ai-types.js +2 -1
- package/dist/lib/claude-mcp-config.js +15 -0
- package/dist/lib/credential-sync.js +1 -2
- package/dist/lib/defaults-store.js +4 -1
- package/dist/lib/environment-auth-status.js +2 -1
- package/dist/lib/environment-auth.js +2 -1
- package/dist/lib/environment-credential-flags.js +3 -1
- package/dist/lib/environment-credential-operations.js +8 -2
- package/dist/lib/environment-types.js +3 -1
- package/dist/lib/extension/assets.js +4 -0
- package/dist/lib/extension/create.js +3 -0
- package/dist/lib/extension/git.js +17 -0
- package/dist/lib/extension/index.js +27 -0
- package/dist/lib/extension/install.js +4 -0
- package/dist/lib/extension/manifest.js +21 -0
- package/dist/lib/extension/package.js +3 -0
- package/dist/lib/extension/paths.js +5 -0
- package/dist/lib/extension/publish.js +3 -0
- package/dist/lib/extension/sf-deploy.js +8 -0
- package/dist/lib/extension/source.js +7 -0
- package/dist/lib/extension/uninstall.js +3 -0
- package/dist/lib/extension-configuration-ops.js +4 -0
- package/dist/lib/extension-configuration-sanitize.js +7 -0
- package/dist/lib/extension-configuration-types.js +8 -0
- package/dist/lib/function-types.js +3 -1
- package/dist/lib/http-proxy.js +13 -0
- package/dist/lib/mcp/ai-tools.js +3 -3
- package/dist/lib/mcp/command-id.js +2 -0
- package/dist/lib/mcp/pipeline-automation-quality-tools.js +452 -0
- package/dist/lib/mcp/server.js +70 -1
- package/dist/lib/mcp/testing-live-tools.js +24 -13
- package/dist/lib/mcp/testing-tools.js +239 -550
- package/dist/lib/mcp/tool-annotations.js +27 -18
- package/dist/lib/mcp/tools.js +117 -32
- package/dist/lib/mcp/work-tools.js +37 -10
- package/dist/lib/metadata-explore.js +8 -0
- package/dist/lib/network-error.js +8 -0
- package/dist/lib/pipeline-automation-flags.js +12 -0
- package/dist/lib/pipeline-automation-ops.js +9 -0
- package/dist/lib/pipeline-automation-types.js +18 -0
- package/dist/lib/pipeline-lifecycle-id.js +3 -0
- package/dist/lib/pipeline-quality-gate-flags.js +12 -0
- package/dist/lib/pipeline-quality-gate-ops.js +9 -0
- package/dist/lib/pipeline-quality-gate-types.js +17 -0
- package/dist/lib/plugin-host/ai.js +2 -1
- package/dist/lib/plugin-skills.js +22 -0
- package/dist/lib/plugin-trust/gate.js +1 -2
- package/dist/lib/project-root.js +3 -1
- package/dist/lib/project-setup.js +5 -4
- package/dist/lib/runtime.js +1 -1
- package/dist/lib/salesforce-tooling-check.js +6 -0
- package/dist/lib/setup-skills.js +4 -1
- package/dist/lib/setup-templates.js +1 -4
- package/dist/lib/skill-packs.js +7 -0
- package/dist/lib/template-types.js +3 -1
- package/dist/lib/testing-archive.js +9 -0
- package/dist/lib/testing-data-table.js +39 -0
- package/dist/lib/testing-execution.js +22 -0
- package/dist/lib/testing-flags.js +6 -2
- package/dist/lib/testing-gateway.js +4 -1
- package/dist/lib/testing-live-command.js +3 -1
- package/dist/lib/testing-live-operations.js +7 -1
- package/dist/lib/testing-live-recorder.js +3 -1
- package/dist/lib/testing-live-state.js +8 -1
- package/dist/lib/testing-operations.js +6 -21
- package/dist/lib/testing-sanitization.js +2 -1
- package/dist/lib/testing-secret-input.js +2 -1
- package/dist/lib/testing-types.js +24 -3
- package/dist/lib/work-committed-metadata.js +4 -0
- package/dist/lib/work-environment-sync.js +3 -1
- package/dist/lib/work-flags.js +6 -1
- package/dist/lib/work-get.js +2 -1
- package/dist/lib/work-local-development-flow.js +4 -0
- package/dist/lib/work-submit-wait.js +3 -1
- package/oclif.manifest.json +9771 -9650
- package/package.json +35 -2
- package/templates/rules/cursor/agentia.mdc +29 -0
- package/templates/skills/agentia/SKILL.md +29 -0
- package/templates/skills/agentia-ai/SKILL.md +3 -4
- package/templates/skills/agentia-ai/references/ai-agents.md +2 -2
- package/templates/skills/agentia-cicd/SKILL.md +9 -4
- package/templates/skills/agentia-cicd/references/environments-and-credentials.md +19 -13
- package/templates/skills/agentia-cicd/references/extensions.md +52 -0
- package/templates/skills/agentia-cicd/references/pipelines.md +36 -2
- package/templates/skills/agentia-cicd/references/work.md +25 -8
- package/templates/skills/agentia-metadata/SKILL.md +140 -0
- package/templates/skills/agentia-metadata/references/metadata-explore.md +142 -0
- package/templates/skills/agentia-testing/SKILL.md +3 -3
- package/templates/skills/agentia-testing/references/tests.md +14 -14
- package/dist/commands/testing/build/get.js +0 -38
- package/dist/commands/testing/build/latest.js +0 -40
- package/dist/commands/testing/build/logs.js +0 -47
- package/dist/commands/testing/build/run.js +0 -26
- package/dist/commands/testing/create.js +0 -2
- package/dist/commands/testing/job/download.js +0 -54
- package/dist/commands/testing/job/files.js +0 -34
- package/dist/commands/testing/run.js +0 -26
- package/dist/commands/testing/status.js +0 -45
- package/dist/commands/testing/test/create.js +0 -2
- package/dist/commands/testing/test/logs.js +0 -2
- package/dist/commands/testing/test/run.js +0 -26
- package/dist/commands/testing/test/status.js +0 -2
- package/dist/commands/testing/test/update.js +0 -2
- package/dist/commands/testing/update.js +0 -65
- package/dist/lib/testing-data-command.js +0 -8
- package/dist/lib/testing-data-core.js +0 -20
- package/dist/lib/testing-data-export.js +0 -6
- package/dist/lib/testing-data-import.js +0 -6
- package/dist/lib/testing-data-io.js +0 -12
- package/dist/lib/testing-data-operations.js +0 -10
- package/dist/lib/testing-data-types.js +0 -4
- package/dist/lib/testing-live-endpoints.js +0 -6
- package/dist/lib/testing-live-history.js +0 -7
- package/dist/lib/testing-run-command.js +0 -3
- package/dist/lib/testing-schedule.js +0 -5
- package/dist/lib/testing-session.js +0 -5
- package/dist/lib/testing-watch.js +0 -4
- package/templates/AGENTS.md +0 -24
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { confirm } from '@inquirer/prompts';
|
|
2
|
+
import { Args, Flags } from '@oclif/core';
|
|
3
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
4
|
+
import { installExtension } from '../../../lib/extension/install.js';
|
|
5
|
+
import { parseVersionFromRef, versionTagName } from '../../../lib/extension/manifest.js';
|
|
6
|
+
export default class ExtensionInstall extends AgentiaCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
source: Args.string({
|
|
9
|
+
description: 'Git repository URL, owner/repo slug, or local directory path',
|
|
10
|
+
required: false,
|
|
11
|
+
}),
|
|
12
|
+
};
|
|
13
|
+
static description = 'Install a Copado extension from a git URL or local folder: upsert functions and job templates via the CICD Gateway; deploy force-app with Salesforce CLI unless excluded';
|
|
14
|
+
static examples = [
|
|
15
|
+
'<%= config.bin %> <%= command.id %> https://gitlab.com/org/my-ext.git --version 1.2.0 --yes',
|
|
16
|
+
'<%= config.bin %> <%= command.id %> ./my-extension --version 0.1.0 --exclude-sf-deploy --yes',
|
|
17
|
+
'<%= config.bin %> <%= command.id %> /tmp/my-extension.git --ref v0.1.0 --sf-alias destOrg --yes',
|
|
18
|
+
'<%= config.bin %> <%= command.id %> ./my-extension --version 1.2.0 --exclude-sf-deploy --yes --json',
|
|
19
|
+
];
|
|
20
|
+
static experimental = true;
|
|
21
|
+
static flags = {
|
|
22
|
+
'dry-run': Flags.boolean({
|
|
23
|
+
default: false,
|
|
24
|
+
description: 'Materialize and validate, print the install plan, but do not upsert or deploy',
|
|
25
|
+
}),
|
|
26
|
+
'exclude-sf-deploy': Flags.boolean({
|
|
27
|
+
default: false,
|
|
28
|
+
description: 'Skip Salesforce metadata deploy even when force-app is present',
|
|
29
|
+
}),
|
|
30
|
+
'ignore-unknown-assets': Flags.boolean({
|
|
31
|
+
default: false,
|
|
32
|
+
description: 'Ignore unsupported manifest asset arrays instead of failing',
|
|
33
|
+
}),
|
|
34
|
+
ref: Flags.string({
|
|
35
|
+
description: 'Git ref to install (tag, branch, or commit). Prefer --version for semver tags.',
|
|
36
|
+
required: false,
|
|
37
|
+
}),
|
|
38
|
+
'sf-alias': Flags.string({
|
|
39
|
+
description: 'Salesforce CLI org alias or username for force-app deploy (required when force-app is present unless --exclude-sf-deploy)',
|
|
40
|
+
required: false,
|
|
41
|
+
}),
|
|
42
|
+
source: Flags.string({
|
|
43
|
+
description: 'Git URL or local path (alternative to the positional source argument)',
|
|
44
|
+
required: false,
|
|
45
|
+
}),
|
|
46
|
+
url: Flags.string({
|
|
47
|
+
description: 'Deprecated alias of --source',
|
|
48
|
+
hidden: true,
|
|
49
|
+
required: false,
|
|
50
|
+
}),
|
|
51
|
+
version: Flags.string({
|
|
52
|
+
description: 'Semver version to install (checks out tag vX.Y.Z)',
|
|
53
|
+
required: false,
|
|
54
|
+
}),
|
|
55
|
+
yes: Flags.boolean({
|
|
56
|
+
char: 'y',
|
|
57
|
+
default: false,
|
|
58
|
+
description: 'Skip the interactive confirmation prompt (required for non-interactive / --json installs that are not --dry-run)',
|
|
59
|
+
}),
|
|
60
|
+
};
|
|
61
|
+
async run() {
|
|
62
|
+
const { args, flags } = await this.parse(ExtensionInstall);
|
|
63
|
+
const source = flags.source ?? flags.url ?? args.source;
|
|
64
|
+
if (source === undefined || source.trim().length === 0) {
|
|
65
|
+
this.error('Provide a git URL or local path as a positional argument or --source.', { exit: 2 });
|
|
66
|
+
}
|
|
67
|
+
await this.confirmInstallIfNeeded(source.trim(), {
|
|
68
|
+
dryRun: flags['dry-run'],
|
|
69
|
+
ref: flags.ref,
|
|
70
|
+
version: flags.version,
|
|
71
|
+
yes: flags.yes,
|
|
72
|
+
});
|
|
73
|
+
let result;
|
|
74
|
+
try {
|
|
75
|
+
result = await this.withSpinner('Installing extension', () => installExtension({
|
|
76
|
+
dryRun: flags['dry-run'],
|
|
77
|
+
excludeSfDeploy: flags['exclude-sf-deploy'],
|
|
78
|
+
ignoreUnknownAssets: flags['ignore-unknown-assets'],
|
|
79
|
+
ref: flags.ref,
|
|
80
|
+
sfAlias: flags['sf-alias'],
|
|
81
|
+
source,
|
|
82
|
+
version: flags.version,
|
|
83
|
+
// Confirmation already handled above (or skipped for --yes / --dry-run).
|
|
84
|
+
yes: true,
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
this.error(error instanceof Error ? error.message : String(error), { exit: 1 });
|
|
89
|
+
}
|
|
90
|
+
this.display(() => {
|
|
91
|
+
this.log(`${result.dryRun ? 'Dry-run install plan for' : 'Installed'} ${result.manifest.name}${result.manifest.version === undefined ? '' : `@${result.manifest.version}`}`);
|
|
92
|
+
this.log(`Source: ${result.source} (${result.ref})`);
|
|
93
|
+
this.log(`Functions: ${result.functions.map((item) => item.apiName).join(', ') || '(none)'}`);
|
|
94
|
+
this.log(`Templates: ${result.templates.map((item) => item.apiName).join(', ') || '(none)'}`);
|
|
95
|
+
if (result.forceAppDeployed) {
|
|
96
|
+
this.log('Salesforce source: deployed');
|
|
97
|
+
}
|
|
98
|
+
else if (result.salesforceSkipped) {
|
|
99
|
+
this.log('Salesforce source: skipped');
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
return result;
|
|
103
|
+
}
|
|
104
|
+
async confirmInstallIfNeeded(source, flags) {
|
|
105
|
+
if (flags.yes === true || flags.dryRun === true)
|
|
106
|
+
return;
|
|
107
|
+
const refLabel = this.resolveRefLabel(flags.ref, flags.version);
|
|
108
|
+
const message = `Install Copado extension from untrusted source ${source} (${refLabel})?`;
|
|
109
|
+
if (this.jsonEnabled()) {
|
|
110
|
+
this.error(`${message} Re-run with --yes to confirm.`, { exit: 1 });
|
|
111
|
+
}
|
|
112
|
+
const accepted = await confirm({ default: false, message });
|
|
113
|
+
if (!accepted) {
|
|
114
|
+
this.error('Extension install cancelled.', { exit: 1 });
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
resolveRefLabel(ref, version) {
|
|
118
|
+
if (ref !== undefined && ref.trim().length > 0)
|
|
119
|
+
return ref.trim();
|
|
120
|
+
if (version !== undefined && version.trim().length > 0) {
|
|
121
|
+
const parsed = parseVersionFromRef(version) ?? version.trim();
|
|
122
|
+
return versionTagName(parsed);
|
|
123
|
+
}
|
|
124
|
+
return 'default branch / latest tag / local folder';
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=install.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { packageExtension } from '../../../lib/extension/package.js';
|
|
4
|
+
export default class ExtensionPackage extends AgentiaCommand {
|
|
5
|
+
static description = 'Validate a Copado extension for publish (requires semver version; optional --version bump)';
|
|
6
|
+
static examples = [
|
|
7
|
+
'<%= config.bin %> <%= command.id %>',
|
|
8
|
+
'<%= config.bin %> <%= command.id %> --version 1.2.0 --json',
|
|
9
|
+
];
|
|
10
|
+
static experimental = true;
|
|
11
|
+
static flags = {
|
|
12
|
+
version: Flags.string({
|
|
13
|
+
description: 'Set or bump the manifest semver version before validating',
|
|
14
|
+
required: false,
|
|
15
|
+
}),
|
|
16
|
+
};
|
|
17
|
+
async run() {
|
|
18
|
+
const { flags } = await this.parse(ExtensionPackage);
|
|
19
|
+
let result;
|
|
20
|
+
try {
|
|
21
|
+
result = await packageExtension({ version: flags.version });
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
this.error(error instanceof Error ? error.message : String(error), { exit: 1 });
|
|
25
|
+
}
|
|
26
|
+
this.display(() => {
|
|
27
|
+
this.log(`Packaged extension ${result.manifest.name}@${result.manifest.version}`);
|
|
28
|
+
this.log(`Functions: ${(result.manifest.functions ?? []).length}`);
|
|
29
|
+
this.log(`Templates: ${(result.manifest.templates ?? []).length}`);
|
|
30
|
+
this.log(`Salesforce source: ${result.validation.forceAppPresent ? result.validation.salesforceSourceDir : '(none)'}`);
|
|
31
|
+
});
|
|
32
|
+
return { manifest: result.manifest };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=package.js.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { publishExtension } from '../../../lib/extension/publish.js';
|
|
4
|
+
export default class ExtensionPublish extends AgentiaCommand {
|
|
5
|
+
static description = 'Push the current extension commit and create an annotated semver git tag (vX.Y.Z) for install pinning';
|
|
6
|
+
static examples = [
|
|
7
|
+
'<%= config.bin %> <%= command.id %>',
|
|
8
|
+
'<%= config.bin %> <%= command.id %> --version 1.2.0 --remote origin --json',
|
|
9
|
+
'<%= config.bin %> <%= command.id %> --version 0.1.0 --local --force',
|
|
10
|
+
];
|
|
11
|
+
static experimental = true;
|
|
12
|
+
static flags = {
|
|
13
|
+
'allow-dirty': Flags.boolean({
|
|
14
|
+
description: 'Allow publish with a dirty working tree',
|
|
15
|
+
default: false,
|
|
16
|
+
}),
|
|
17
|
+
force: Flags.boolean({
|
|
18
|
+
description: 'Recreate the local tag and push even if the tag already exists',
|
|
19
|
+
default: false,
|
|
20
|
+
}),
|
|
21
|
+
local: Flags.boolean({
|
|
22
|
+
description: 'Create the annotated tag locally without pushing to a remote (offline / local e2e)',
|
|
23
|
+
default: false,
|
|
24
|
+
}),
|
|
25
|
+
remote: Flags.string({
|
|
26
|
+
description: 'Git remote to push (default origin; ignored with --local)',
|
|
27
|
+
default: 'origin',
|
|
28
|
+
}),
|
|
29
|
+
version: Flags.string({
|
|
30
|
+
description: 'Require this semver in the manifest before tagging (writes it only if already committed; fails if the bump is uncommitted)',
|
|
31
|
+
required: false,
|
|
32
|
+
}),
|
|
33
|
+
};
|
|
34
|
+
async run() {
|
|
35
|
+
const { flags } = await this.parse(ExtensionPublish);
|
|
36
|
+
let result;
|
|
37
|
+
try {
|
|
38
|
+
result = await this.withSpinner('Publishing extension', () => publishExtension({
|
|
39
|
+
allowDirty: flags['allow-dirty'],
|
|
40
|
+
force: flags.force,
|
|
41
|
+
local: flags.local,
|
|
42
|
+
remote: flags.remote,
|
|
43
|
+
version: flags.version,
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
this.error(error instanceof Error ? error.message : String(error), { exit: 1 });
|
|
48
|
+
}
|
|
49
|
+
this.display(() => {
|
|
50
|
+
this.log(`Published ${result.manifest.name}@${result.manifest.version}${result.localOnly ? ' (local tag only)' : ''}`);
|
|
51
|
+
if (result.remote !== undefined)
|
|
52
|
+
this.log(`Remote: ${result.remote}`);
|
|
53
|
+
this.log(`Branch: ${result.branch}`);
|
|
54
|
+
this.log(`Commit: ${result.commit}`);
|
|
55
|
+
this.log(`Tag: ${result.tag}`);
|
|
56
|
+
this.log(`Install: ${result.installCommand}`);
|
|
57
|
+
});
|
|
58
|
+
return result;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=publish.js.map
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { confirm } from '@inquirer/prompts';
|
|
2
|
+
import { Args, Flags } from '@oclif/core';
|
|
3
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
4
|
+
import { parseVersionFromRef, versionTagName } from '../../../lib/extension/manifest.js';
|
|
5
|
+
import { uninstallExtension } from '../../../lib/extension/uninstall.js';
|
|
6
|
+
export default class ExtensionUninstall extends AgentiaCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
source: Args.string({
|
|
9
|
+
description: 'Git repository URL, owner/repo slug, or local directory path',
|
|
10
|
+
required: false,
|
|
11
|
+
}),
|
|
12
|
+
};
|
|
13
|
+
static description = 'Uninstall a Copado extension by deleting the functions and job templates listed in its manifest from the authenticated Copado org';
|
|
14
|
+
static examples = [
|
|
15
|
+
'<%= config.bin %> <%= command.id %> ./my-extension --version 0.1.0 --yes',
|
|
16
|
+
'<%= config.bin %> <%= command.id %> https://gitlab.com/org/my-ext.git --ref v0.1.0 --yes --json',
|
|
17
|
+
];
|
|
18
|
+
static experimental = true;
|
|
19
|
+
static flags = {
|
|
20
|
+
'dry-run': Flags.boolean({
|
|
21
|
+
default: false,
|
|
22
|
+
description: 'Show which assets would be deleted without calling the gateway',
|
|
23
|
+
}),
|
|
24
|
+
ref: Flags.string({
|
|
25
|
+
description: 'Git ref to read the manifest from',
|
|
26
|
+
required: false,
|
|
27
|
+
}),
|
|
28
|
+
source: Flags.string({
|
|
29
|
+
description: 'Git URL or local path (alternative to the positional source argument)',
|
|
30
|
+
required: false,
|
|
31
|
+
}),
|
|
32
|
+
version: Flags.string({
|
|
33
|
+
description: 'Semver version whose tag (vX.Y.Z) supplies the manifest',
|
|
34
|
+
required: false,
|
|
35
|
+
}),
|
|
36
|
+
yes: Flags.boolean({
|
|
37
|
+
char: 'y',
|
|
38
|
+
default: false,
|
|
39
|
+
description: 'Skip the interactive confirmation prompt (required for non-interactive / --json uninstalls that are not --dry-run)',
|
|
40
|
+
}),
|
|
41
|
+
};
|
|
42
|
+
async run() {
|
|
43
|
+
const { args, flags } = await this.parse(ExtensionUninstall);
|
|
44
|
+
const source = flags.source ?? args.source;
|
|
45
|
+
if (source === undefined || source.trim().length === 0) {
|
|
46
|
+
this.error('Provide a git URL or local path as a positional argument or --source.', { exit: 2 });
|
|
47
|
+
}
|
|
48
|
+
await this.confirmUninstallIfNeeded(source.trim(), {
|
|
49
|
+
dryRun: flags['dry-run'],
|
|
50
|
+
ref: flags.ref,
|
|
51
|
+
version: flags.version,
|
|
52
|
+
yes: flags.yes,
|
|
53
|
+
});
|
|
54
|
+
let result;
|
|
55
|
+
try {
|
|
56
|
+
result = await this.withSpinner('Uninstalling extension', () => uninstallExtension({
|
|
57
|
+
dryRun: flags['dry-run'],
|
|
58
|
+
ref: flags.ref,
|
|
59
|
+
source,
|
|
60
|
+
version: flags.version,
|
|
61
|
+
// Confirmation already handled above (or skipped for --yes / --dry-run).
|
|
62
|
+
yes: true,
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
this.error(error instanceof Error ? error.message : String(error), { exit: 1 });
|
|
67
|
+
}
|
|
68
|
+
this.display(() => {
|
|
69
|
+
this.log(`${result.dryRun ? 'Dry-run uninstall plan for' : 'Uninstalled'} ${result.manifest.name}${result.manifest.version === undefined ? '' : `@${result.manifest.version}`}`);
|
|
70
|
+
this.log(`Source: ${result.source} (${result.ref})`);
|
|
71
|
+
this.log(`Functions: ${result.functions.map((item) => `${item.apiName}${item.deleted ? '' : ' (failed)'}`).join(', ') || '(none)'}`);
|
|
72
|
+
this.log(`Templates: ${result.templates.map((item) => `${item.apiName}${item.deleted ? '' : ' (failed)'}`).join(', ') || '(none)'}`);
|
|
73
|
+
});
|
|
74
|
+
return result;
|
|
75
|
+
}
|
|
76
|
+
async confirmUninstallIfNeeded(source, flags) {
|
|
77
|
+
if (flags.yes === true || flags.dryRun === true)
|
|
78
|
+
return;
|
|
79
|
+
const refLabel = this.resolveRefLabel(flags.ref, flags.version);
|
|
80
|
+
const message = `Uninstall Copado extension from ${source} (${refLabel})? This deletes listed functions and job templates from the authenticated Copado org.`;
|
|
81
|
+
if (this.jsonEnabled()) {
|
|
82
|
+
this.error(`${message} Re-run with --yes to confirm.`, { exit: 1 });
|
|
83
|
+
}
|
|
84
|
+
const accepted = await confirm({ default: false, message });
|
|
85
|
+
if (!accepted) {
|
|
86
|
+
this.error('Extension uninstall cancelled.', { exit: 1 });
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
resolveRefLabel(ref, version) {
|
|
90
|
+
if (ref !== undefined && ref.trim().length > 0)
|
|
91
|
+
return ref.trim();
|
|
92
|
+
if (version !== undefined && version.trim().length > 0) {
|
|
93
|
+
const parsed = parseVersionFromRef(version) ?? version.trim();
|
|
94
|
+
return versionTagName(parsed);
|
|
95
|
+
}
|
|
96
|
+
return 'default branch / latest tag / local folder';
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=uninstall.js.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { validateExtension } from '../../../lib/extension/manifest.js';
|
|
4
|
+
export default class ExtensionValidate extends AgentiaCommand {
|
|
5
|
+
static description = 'Validate a Copado extension manifest against copado/functions and copado/templates on disk';
|
|
6
|
+
static examples = [
|
|
7
|
+
'<%= config.bin %> <%= command.id %>',
|
|
8
|
+
'<%= config.bin %> <%= command.id %> --require-version --json',
|
|
9
|
+
];
|
|
10
|
+
static experimental = true;
|
|
11
|
+
static flags = {
|
|
12
|
+
'require-version': Flags.boolean({
|
|
13
|
+
description: 'Require a semver version field (needed for package/publish)',
|
|
14
|
+
default: false,
|
|
15
|
+
}),
|
|
16
|
+
};
|
|
17
|
+
async run() {
|
|
18
|
+
const { flags } = await this.parse(ExtensionValidate);
|
|
19
|
+
let result;
|
|
20
|
+
try {
|
|
21
|
+
result = await validateExtension(process.cwd(), { requireVersion: flags['require-version'] });
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
this.error(error instanceof Error ? error.message : String(error), { exit: 2 });
|
|
25
|
+
}
|
|
26
|
+
this.display(() => {
|
|
27
|
+
this.log(`Extension: ${result.manifest.name}`);
|
|
28
|
+
if (result.manifest.version !== undefined)
|
|
29
|
+
this.log(`Version: ${result.manifest.version}`);
|
|
30
|
+
this.log(`Salesforce source present: ${result.forceAppPresent ? 'yes' : 'no'} (${result.salesforceSourceDir})`);
|
|
31
|
+
if (result.ok) {
|
|
32
|
+
this.log('Validation passed.');
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
this.log('Validation failed:');
|
|
36
|
+
for (const issue of result.issues) {
|
|
37
|
+
this.log(`- ${issue.message}`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
if (!result.ok) {
|
|
42
|
+
this.error('Extension validation failed.', { exit: 1 });
|
|
43
|
+
}
|
|
44
|
+
return result;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=validate.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { fetchExtensionConfiguration } from '../../../lib/extension-configuration-ops.js';
|
|
4
|
+
import { formatExtensionConfigurationDetail, } from '../../../lib/extension-configuration-types.js';
|
|
5
|
+
export default class ExtensionConfigurationGet extends AgentiaCommand {
|
|
6
|
+
static args = {
|
|
7
|
+
id: Args.string({
|
|
8
|
+
description: 'Extension configuration ID or name',
|
|
9
|
+
required: true,
|
|
10
|
+
}),
|
|
11
|
+
};
|
|
12
|
+
static description = 'Get a Copado extension configuration';
|
|
13
|
+
static examples = [
|
|
14
|
+
'<%= config.bin %> <%= command.id %> <configuration-id>',
|
|
15
|
+
'<%= config.bin %> <%= command.id %> <configuration-id> --json',
|
|
16
|
+
];
|
|
17
|
+
async run() {
|
|
18
|
+
const { args } = await this.parse(ExtensionConfigurationGet);
|
|
19
|
+
const configuration = await this.withSpinner('Fetching extension configuration', () => fetchExtensionConfiguration(args.id));
|
|
20
|
+
this.display(() => this.log(formatExtensionConfigurationDetail(configuration)));
|
|
21
|
+
return configuration;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { fetchExtensionConfigurations } from '../../../lib/extension-configuration-ops.js';
|
|
4
|
+
import { formatExtensionConfigurationTable, } from '../../../lib/extension-configuration-types.js';
|
|
5
|
+
import { displayListPagination, listPaginationFlags } from '../../../lib/list-pagination.js';
|
|
6
|
+
export default class ExtensionConfigurationList extends AgentiaCommand {
|
|
7
|
+
static description = 'List Copado extension configurations';
|
|
8
|
+
static examples = [
|
|
9
|
+
'<%= config.bin %> <%= command.id %>',
|
|
10
|
+
'<%= config.bin %> <%= command.id %> --tool Selenium --active --json',
|
|
11
|
+
];
|
|
12
|
+
static flags = {
|
|
13
|
+
...listPaginationFlags,
|
|
14
|
+
active: Flags.boolean({
|
|
15
|
+
allowNo: true,
|
|
16
|
+
description: 'Filter by active status',
|
|
17
|
+
}),
|
|
18
|
+
name: Flags.string({
|
|
19
|
+
description: 'Filter by extension configuration name',
|
|
20
|
+
}),
|
|
21
|
+
'test-type': Flags.string({
|
|
22
|
+
description: 'Filter by test type',
|
|
23
|
+
}),
|
|
24
|
+
tool: Flags.string({
|
|
25
|
+
description: 'Filter by extension tool',
|
|
26
|
+
}),
|
|
27
|
+
};
|
|
28
|
+
async run() {
|
|
29
|
+
const { flags } = await this.parse(ExtensionConfigurationList);
|
|
30
|
+
const page = await this.withSpinner('Fetching extension configurations', () => fetchExtensionConfigurations({
|
|
31
|
+
active: flags.active,
|
|
32
|
+
cursor: flags.cursor,
|
|
33
|
+
name: flags.name,
|
|
34
|
+
pageSize: flags['page-size'],
|
|
35
|
+
testType: flags['test-type'],
|
|
36
|
+
tool: flags.tool,
|
|
37
|
+
}));
|
|
38
|
+
this.display(() => {
|
|
39
|
+
if (page.data.length === 0) {
|
|
40
|
+
this.log('No extension configurations found.');
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
this.log(formatExtensionConfigurationTable(page.data));
|
|
44
|
+
displayListPagination(this.log.bind(this), page);
|
|
45
|
+
});
|
|
46
|
+
return page;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { openNavigationTarget } from '../../../lib/navigation-open.js';
|
|
4
|
+
import { resolveNavigationTarget } from '../../../lib/navigation.js';
|
|
5
|
+
import { assertSalesforceLifecycleId } from '../../../lib/pipeline-lifecycle-id.js';
|
|
6
|
+
export default class ExtensionConfigurationOpen extends AgentiaCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
id: Args.string({
|
|
9
|
+
description: 'Extension configuration Salesforce ID',
|
|
10
|
+
required: true,
|
|
11
|
+
}),
|
|
12
|
+
};
|
|
13
|
+
static description = 'Open a Copado extension configuration in the browser';
|
|
14
|
+
static examples = [
|
|
15
|
+
'<%= config.bin %> <%= command.id %> <configuration-id>',
|
|
16
|
+
'<%= config.bin %> <%= command.id %> <configuration-id> --json',
|
|
17
|
+
];
|
|
18
|
+
async run() {
|
|
19
|
+
const { args } = await this.parse(ExtensionConfigurationOpen);
|
|
20
|
+
let configurationId;
|
|
21
|
+
try {
|
|
22
|
+
configurationId = assertSalesforceLifecycleId(args.id, 'Extension configuration ID');
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
this.error(error instanceof Error ? error.message : String(error), { exit: 2 });
|
|
26
|
+
}
|
|
27
|
+
const target = await this.withSpinner('Resolving navigation URL', () => resolveNavigationTarget({
|
|
28
|
+
id: configurationId,
|
|
29
|
+
resourceType: 'extension_configuration',
|
|
30
|
+
}));
|
|
31
|
+
await openNavigationTarget(target, {
|
|
32
|
+
jsonEnabled: this.jsonEnabled(),
|
|
33
|
+
log: this.log.bind(this),
|
|
34
|
+
});
|
|
35
|
+
return target;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=open.js.map
|
|
@@ -59,7 +59,7 @@ export function buildMetadataContentRequests(flags) {
|
|
|
59
59
|
return [buildMetadataContentRequest(flags)];
|
|
60
60
|
}
|
|
61
61
|
export default class MetadataContent extends AgentiaCommand {
|
|
62
|
-
static description = 'Retrieve metadata file content
|
|
62
|
+
static description = 'Retrieve metadata file content';
|
|
63
63
|
static examples = [
|
|
64
64
|
'<%= config.bin %> <%= command.id %> --metadata-type ApexClass --api-name MyClass --pipeline-id <id> --source-org-id <id>',
|
|
65
65
|
'<%= config.bin %> <%= command.id %> --metadata-type ApexClass --api-name MyClass --show',
|
|
@@ -199,7 +199,7 @@ async function enrichDependencyResult(result, localPathsBySelection, moduleType)
|
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
201
|
export default class DependencyGet extends AgentiaCommand {
|
|
202
|
-
static description = 'Retrieve metadata dependencies
|
|
202
|
+
static description = 'Retrieve metadata dependencies';
|
|
203
203
|
static examples = [
|
|
204
204
|
'<%= config.bin %> <%= command.id %> --metadata-name MyClass --metadata-type ApexClass --pipeline-id <id> --source-org-id <id> --source-credential-id <id>',
|
|
205
205
|
'cat request.json | <%= config.bin %> <%= command.id %> --stdin',
|
|
@@ -239,7 +239,7 @@ export default class DependencyGet extends AgentiaCommand {
|
|
|
239
239
|
}),
|
|
240
240
|
'platform-experience': Flags.string({
|
|
241
241
|
default: 'salesforce',
|
|
242
|
-
description: '
|
|
242
|
+
description: 'Platform experience header',
|
|
243
243
|
options: [...PLATFORM_EXPERIENCES],
|
|
244
244
|
}),
|
|
245
245
|
'result-id': Flags.string({
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { AI_METADATA_ACTIONS, buildAiMetadataToolRequest, callAiMetadataTool, } from '../../../lib/metadata-explore.js';
|
|
4
|
+
export default class MetadataExplore extends AgentiaCommand {
|
|
5
|
+
static description = [
|
|
6
|
+
'Explore Salesforce metadata through Org Intelligence.',
|
|
7
|
+
'Uses the project default credential when --credential-id is omitted;',
|
|
8
|
+
'otherwise pass --credential-id, or both --session-id and --endpoint.',
|
|
9
|
+
].join(' ');
|
|
10
|
+
static examples = [
|
|
11
|
+
'<%= config.bin %> <%= command.id %> --action list --object-type ApexClass',
|
|
12
|
+
"<%= config.bin %> <%= command.id %> --action list --object-type ApexClass --pattern 'Account*'",
|
|
13
|
+
'<%= config.bin %> <%= command.id %> --action read --object-type ApexClass --full-name MyClass',
|
|
14
|
+
'<%= config.bin %> <%= command.id %> --action find_references --object-type ApexClass --full-name MyClass',
|
|
15
|
+
"<%= config.bin %> <%= command.id %> --action search --pattern 'Cont*' --credential-id <id>",
|
|
16
|
+
'<%= config.bin %> <%= command.id %> --action describe_type --object-type CustomObject --json',
|
|
17
|
+
];
|
|
18
|
+
static experimental = true;
|
|
19
|
+
static flags = {
|
|
20
|
+
action: Flags.string({
|
|
21
|
+
description: 'Metadata action: list, search, read_documentation, describe_type, read, find_references, run_apex_tests',
|
|
22
|
+
options: [...AI_METADATA_ACTIONS],
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
'apex-unit-tests': Flags.string({
|
|
26
|
+
description: 'Comma-separated Apex test classes. Required for run_apex_tests.',
|
|
27
|
+
}),
|
|
28
|
+
// Deferred write/deploy flags (re-add with matching AI_METADATA_ACTIONS when shipping mutate):
|
|
29
|
+
// 'async-id': Flags.string({
|
|
30
|
+
// description: 'Deployment Id from a previous validate/deploy for deploy_validated or check_async_id',
|
|
31
|
+
// }),
|
|
32
|
+
'credential-id': Flags.string({
|
|
33
|
+
description: 'Copado credential Id for the target org. Defaults to the CICD project default credential when set.',
|
|
34
|
+
}),
|
|
35
|
+
endpoint: Flags.string({
|
|
36
|
+
description: 'Salesforce instance URL (with --session-id) when not using a credential. Exclusive with --credential-id.',
|
|
37
|
+
}),
|
|
38
|
+
'full-name': Flags.string({
|
|
39
|
+
description: 'Fully qualified metadata name (required for read; list results emit this as fullName)',
|
|
40
|
+
}),
|
|
41
|
+
// 'metadata-files': Flags.string({
|
|
42
|
+
// description:
|
|
43
|
+
// 'YAML/XML Metadata API files for validate (with --full-name). Each file starts with ~~~~~~~~~~ <pathname> <type> <name> ~~~~~~~~~',
|
|
44
|
+
// }),
|
|
45
|
+
'object-type': Flags.string({
|
|
46
|
+
description: 'Metadata type, for example ApexClass, CustomObject, or Flow',
|
|
47
|
+
}),
|
|
48
|
+
// 'organization-name': Flags.string({
|
|
49
|
+
// description: 'Optional label for logging; not used to select the target org',
|
|
50
|
+
// }),
|
|
51
|
+
pattern: Flags.string({
|
|
52
|
+
default: '*',
|
|
53
|
+
description: 'Wildcard pattern for list/search (name without namespace), for example Account* or *Info',
|
|
54
|
+
}),
|
|
55
|
+
'session-id': Flags.string({
|
|
56
|
+
description: 'Salesforce session Id (with --endpoint) when not using a credential. Exclusive with --credential-id.',
|
|
57
|
+
}),
|
|
58
|
+
// 'test-level': Flags.string({
|
|
59
|
+
// description:
|
|
60
|
+
// 'Salesforce test level for validate/deploy (NoTestRun, RunSpecifiedTests, RunLocalTests). Defaults from --apex-unit-tests when omitted.',
|
|
61
|
+
// }),
|
|
62
|
+
// 'validate-only': Flags.boolean({
|
|
63
|
+
// default: false,
|
|
64
|
+
// description: 'When true, write-style actions validate without deploying',
|
|
65
|
+
// }),
|
|
66
|
+
};
|
|
67
|
+
async run() {
|
|
68
|
+
const { flags } = await this.parse(MetadataExplore);
|
|
69
|
+
const body = await buildAiMetadataToolRequest(flags);
|
|
70
|
+
const output = await this.withSpinner('Running AI metadata tool', () => callAiMetadataTool(body));
|
|
71
|
+
const result = {
|
|
72
|
+
output,
|
|
73
|
+
...(body.credentialId === undefined ? {} : { credentialId: body.credentialId }),
|
|
74
|
+
};
|
|
75
|
+
this.display(() => {
|
|
76
|
+
process.stdout.write(output.endsWith('\n') ? output : `${output}\n`);
|
|
77
|
+
});
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=explore.js.map
|
|
@@ -46,7 +46,7 @@ export function buildMetadataIndexRequest(flags) {
|
|
|
46
46
|
return body;
|
|
47
47
|
}
|
|
48
48
|
export default class MetadataSearch extends AgentiaCommand {
|
|
49
|
-
static description = 'Search the metadata index for an org
|
|
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>',
|
|
52
52
|
'<%= config.bin %> <%= command.id %> --source Changed --metadata-types ApexClass --limit 100 --pipeline-id <id> --source-org-id <id> --source-credential-id <id>',
|
|
@@ -55,7 +55,7 @@ export default class MetadataSearch extends AgentiaCommand {
|
|
|
55
55
|
static flags = {
|
|
56
56
|
'avoid-source-tracking': Flags.boolean({
|
|
57
57
|
default: false,
|
|
58
|
-
description: 'Pass avoidSourceTracking=true to the
|
|
58
|
+
description: 'Pass avoidSourceTracking=true to the index route',
|
|
59
59
|
}),
|
|
60
60
|
'change-date-from': Flags.string({
|
|
61
61
|
description: 'Optional change-date-from filter (ISO datetime)',
|
|
@@ -92,7 +92,7 @@ export default class MetadataSearch extends AgentiaCommand {
|
|
|
92
92
|
}),
|
|
93
93
|
'platform-experience': Flags.string({
|
|
94
94
|
default: 'salesforce',
|
|
95
|
-
description: '
|
|
95
|
+
description: 'Platform experience header',
|
|
96
96
|
options: [...PLATFORM_EXPERIENCES],
|
|
97
97
|
}),
|
|
98
98
|
source: Flags.string({
|
|
@@ -5,7 +5,7 @@ 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
7
|
export default class MetadataRefreshDeleted extends AgentiaCommand {
|
|
8
|
-
static description = 'Refresh the deleted metadata index
|
|
8
|
+
static description = 'Refresh the deleted metadata index';
|
|
9
9
|
static examples = [
|
|
10
10
|
'<%= config.bin %> <%= command.id %> --env <environment-id>',
|
|
11
11
|
'<%= config.bin %> <%= command.id %> --env <environment-id> --module-type vlocity --json',
|
|
@@ -5,7 +5,7 @@ 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
7
|
export default class MetadataRefreshRun extends AgentiaCommand {
|
|
8
|
-
static description = 'Trigger a metadata index refresh
|
|
8
|
+
static description = 'Trigger a metadata index refresh';
|
|
9
9
|
static examples = [
|
|
10
10
|
'<%= config.bin %> <%= command.id %> --env <environment-id>',
|
|
11
11
|
'<%= config.bin %> <%= command.id %> --env <environment-id> --all --json',
|
|
@@ -30,7 +30,7 @@ export default class MetadataRefreshRun extends AgentiaCommand {
|
|
|
30
30
|
}),
|
|
31
31
|
'platform-experience': Flags.string({
|
|
32
32
|
default: 'salesforce',
|
|
33
|
-
description: '
|
|
33
|
+
description: 'Platform experience header',
|
|
34
34
|
options: [...PLATFORM_EXPERIENCES],
|
|
35
35
|
}),
|
|
36
36
|
'refresh-mode': Flags.string({
|