Skip to content

Commit 269b8b9

Browse files
fix: update for new methods
1 parent 37ef2b0 commit 269b8b9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export default class AgentGenerateAuthoringBundle extends SfCommand<AgentGenerat
134134
// Write Agent file
135135
const conn = targetOrg.getConnection(flags['api-version']);
136136
const specContents = YAML.parse(readFileSync(spec, 'utf8')) as AgentJobSpec;
137-
const agent = await Agent.createAgent(conn, specContents);
137+
const agent = await Agent.createAgentScript(conn, { ...specContents, ...{ name, developerName: bundleApiName } });
138138
// Create output directory if it doesn't exist
139139
mkdirSync(targetOutputDir, { recursive: true });
140140
writeFileSync(agentPath, agent);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export default class AgentPublishAuthoringBundle extends SfCommand<AgentPublishA
103103
const conn = targetOrg.getConnection(flags['api-version']);
104104

105105
// First compile the .agent file to get the Agent JSON
106-
const agentJson = await Agent.compileAgent(
106+
const agentJson = await Agent.compileAgentScript(
107107
conn,
108108
readFileSync(join(authoringBundleDir, `${apiName}.agent`), 'utf8')
109109
);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export default class AgentValidateAuthoringBundle extends SfCommand<AgentValidat
105105
const conn = targetOrg.getConnection(flags['api-version']);
106106
// Call Agent.compileAgent() API
107107
await sleep(Duration.seconds(2));
108-
await Agent.compileAgent(conn, readFileSync(join(authoringBundleDir, `${apiName}.agent`), 'utf8'));
108+
await Agent.compileAgentScript(conn, readFileSync(join(authoringBundleDir, `${apiName}.agent`), 'utf8'));
109109
mso.updateData({ status: 'COMPLETED' });
110110
mso.stop('completed');
111111
return {

0 commit comments

Comments
 (0)