Skip to content

Commit 8785482

Browse files
chore: switch from authoringbundles dir to aiAuthoringBundle
1 parent db3cac8 commit 8785482

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/utils/afscriptFinder.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { type AfScript } from '@salesforce/agents';
1010

1111
/**
1212
* Finds an .afscript file with the given API name in the project directory.
13-
* Searches for pattern: any/file/path/authoringbundles/<apiName>/<apiName>.afscript
13+
* Searches for pattern: any/file/path/aiAuthoringBundle/<apiName>/<apiName>.afscript
1414
*
1515
* @param projectDir - The root directory to start searching from
1616
* @param apiName - The API name to search for
@@ -20,9 +20,9 @@ export function findAndReadAfScript(projectDir: string, apiName: string): AfScri
2020
const walk = (dir: string): string | undefined => {
2121
const files = readdirSync(dir);
2222

23-
// If we find authoringbundles dir, check for the expected file structure
24-
if (files.includes('authoringbundles')) {
25-
const expectedPath = join(dir, 'authoringbundles', apiName, `${apiName}.afscript`);
23+
// If we find aiAuthoringBundle dir, check for the expected file structure
24+
if (files.includes('aiAuthoringBundle')) {
25+
const expectedPath = join(dir, 'aiAuthoringBundle', apiName, `${apiName}.afscript`);
2626
if (statSync(expectedPath, { throwIfNoEntry: false })?.isFile()) {
2727
return readFileSync(expectedPath, 'utf-8');
2828
}

test/nuts/agent.publish.nut.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ describe.skip('agent publish authoring-bundle NUTs', () => {
3333
});
3434

3535
it('should publish a valid authoring bundle', () => {
36-
const bundlePath = join(session.project.dir, 'force-app', 'main', 'default', 'authoringbundles');
36+
const bundlePath = join(session.project.dir, 'force-app', 'main', 'default', 'aiAuthoringBundle');
3737

3838
const result = execCmd<AgentPublishAuthoringBundleResult>(
3939
`agent publish authoring-bundle --api-name ${bundlePath} --json`,

test/nuts/agent.validate.nut.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe.skip('agent validate authoring-bundle NUTs', () => {
3434

3535
it('should validate a valid authoring bundle', () => {
3636
const username = session.orgs.get('default')!.username as string;
37-
const bundlePath = join(session.project.dir, 'force-app', 'main', 'default', 'authoringbundles');
37+
const bundlePath = join(session.project.dir, 'force-app', 'main', 'default', 'aiAuthoringBundle');
3838

3939
const result = execCmd<AgentValidateAuthoringBundleResult>(
4040
`agent validate authoring-bundle --api-name ${bundlePath} --target-org ${username} --json`,

0 commit comments

Comments
 (0)