Skip to content

Commit dc11eb1

Browse files
refactor: rename bundle-path flag to api-name, implementation is todo
1 parent c771796 commit dc11eb1

File tree

6 files changed

+17
-20
lines changed

6 files changed

+17
-20
lines changed

messages/agent.publish.authoring-bundle.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ Publishes an Agent Authoring Bundle by compiling the AF script and creating a ne
99
# examples
1010

1111
- Publish an Agent Authoring Bundle:
12-
<%= config.bin %> <%= command.id %> --bundle-path path/to/bundle --agent-name "My New Agent" --target-org [email protected]
12+
<%= config.bin %> <%= command.id %> --api-name path/to/bundle --agent-name "My New Agent" --target-org [email protected]
1313

14-
# flags.bundle-path.summary
14+
# flags.api-name.summary
1515

1616
Path to the Agent Authoring Bundle to publish
1717

messages/agent.validate.authoring-bundle.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ Validates an Agent Authoring Bundle by compiling the AF script and checking for
99
# examples
1010

1111
- Validate an Agent Authoring Bundle:
12-
<%= config.bin %> <%= command.id %> --bundle-path path/to/bundle
12+
<%= config.bin %> <%= command.id %> --api-name path/to/bundle
1313

14-
# flags.bundle-path.summary
14+
# flags.api-name.summary
1515

1616
Path to the Agent Authoring Bundle to validate
1717

src/commands/agent/publish/authoring-bundle.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ export default class AgentPublishAuthoringBundle extends SfCommand<AgentPublishA
3131
public static readonly flags = {
3232
'target-org': Flags.requiredOrg(),
3333
'api-version': Flags.orgApiVersion(),
34-
'bundle-path': Flags.string({
35-
char: 'p',
36-
summary: messages.getMessage('flags.bundle-path.summary'),
34+
'api-name': Flags.string({
35+
char: 'n',
36+
summary: messages.getMessage('flags.api-name.summary'),
3737
required: true,
3838
}),
3939
};
4040

4141
public async run(): Promise<AgentPublishAuthoringBundleResult> {
4242
const { flags } = await this.parse(AgentPublishAuthoringBundle);
43-
const bundlePath = resolve(flags['bundle-path']);
43+
const bundlePath = resolve(flags['api-name']);
4444

4545
// Validate bundle path exists
4646
if (!existsSync(bundlePath)) {

src/commands/agent/validate/authoring-bundle.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ export default class AgentValidateAuthoringBundle extends SfCommand<AgentValidat
2626
public static readonly flags = {
2727
'target-org': Flags.requiredOrg(),
2828
'api-version': Flags.orgApiVersion(),
29-
'bundle-path': Flags.string({
30-
char: 'p',
31-
summary: messages.getMessage('flags.bundle-path.summary'),
29+
'api-name': Flags.string({
30+
char: 'n',
31+
summary: messages.getMessage('flags.api-name.summary'),
3232
required: true,
3333
}),
3434
};
3535

3636
public async run(): Promise<AgentValidateAuthoringBundleResult> {
3737
const { flags } = await this.parse(AgentValidateAuthoringBundle);
38-
const bundlePath = resolve(flags['bundle-path']);
38+
const bundlePath = resolve(flags['api-name']);
3939

4040
// Validate bundle path exists
4141
if (!existsSync(bundlePath)) {

test/nuts/agent.publish.nut.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe.skip('agent publish authoring-bundle NUTs', () => {
3636
const bundlePath = join(session.project.dir, 'force-app', 'main', 'default', 'authoringbundles');
3737

3838
const result = execCmd<AgentPublishAuthoringBundleResult>(
39-
`agent publish authoring-bundle --bundle-path ${bundlePath} --json`,
39+
`agent publish authoring-bundle --api-name ${bundlePath} --json`,
4040
{ ensureExitCode: 0 }
4141
).jsonOutput?.result;
4242

@@ -52,7 +52,7 @@ describe.skip('agent publish authoring-bundle NUTs', () => {
5252
const agentName = 'Test Agent';
5353

5454
const result = execCmd<AgentPublishAuthoringBundleResult>(
55-
`agent publish authoring-bundle --bundle-path ${bundlePath} --agent-name "${agentName}" --target-org ${username} --json`,
55+
`agent publish authoring-bundle --api-name ${bundlePath} --agent-name "${agentName}" --target-org ${username} --json`,
5656
{ ensureExitCode: 1 }
5757
).jsonOutput;
5858

test/nuts/agent.validate.nut.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe.skip('agent validate authoring-bundle NUTs', () => {
3737
const bundlePath = join(session.project.dir, 'force-app', 'main', 'default', 'authoringbundles');
3838

3939
const result = execCmd<AgentValidateAuthoringBundleResult>(
40-
`agent validate authoring-bundle --bundle-path ${bundlePath} --target-org ${username} --json`,
40+
`agent validate authoring-bundle --api-name ${bundlePath} --target-org ${username} --json`,
4141
{ ensureExitCode: 0 }
4242
).jsonOutput?.result;
4343

@@ -50,12 +50,9 @@ describe.skip('agent validate authoring-bundle NUTs', () => {
5050
const username = session.orgs.get('default')!.username as string;
5151
const bundlePath = join(session.project.dir, 'invalid', 'path');
5252

53-
const { exitCode, stderr } = execCmd<AgentValidateAuthoringBundleResult>(
54-
`agent validate authoring-bundle --bundle-path ${bundlePath} --target-org ${username} --json`,
53+
execCmd<AgentValidateAuthoringBundleResult>(
54+
`agent validate authoring-bundle --api-name ${bundlePath} --target-org ${username} --json`,
5555
{ ensureExitCode: 1 }
5656
);
57-
58-
expect(exitCode).to.equal(1);
59-
expect(stderr).to.include('Invalid bundle path');
6057
});
6158
});

0 commit comments

Comments
 (0)