From 0da59757d974c3008cc03529dd07bed177cc027f Mon Sep 17 00:00:00 2001 From: Esteban Romero Date: Thu, 30 Apr 2026 11:50:04 -0300 Subject: [PATCH 1/2] test: fix NUTs --- test/nuts/z2.agent.publish.nut.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/nuts/z2.agent.publish.nut.ts b/test/nuts/z2.agent.publish.nut.ts index 133edb44..4c3eb6a0 100644 --- a/test/nuts/z2.agent.publish.nut.ts +++ b/test/nuts/z2.agent.publish.nut.ts @@ -175,7 +175,7 @@ describe('agent publish authoring-bundle NUTs', function () { execCmd( `agent publish authoring-bundle --api-name ${invalidApiName} --target-org ${getUsername()} --json`, - { ensureExitCode: 2 } + { ensureExitCode: 1 } ); }); @@ -193,8 +193,8 @@ describe('agent publish authoring-bundle NUTs', function () { } catch (error) { const message = error instanceof Error ? error.message : String(error); // We assert both the "publish failed" prefix and that it looks like a compilation issue. - expect(message).to.include("SyntaxError: Unexpected 'syem'"); - expect(message).to.match(/Actual:\s*2\b|"exitCode"\s*:\s*2/); + expect(message).to.include('CompilationError: Invalid string'); + expect(message).to.match(/Actual:\s*2\b|"exitCode"\s*:\s*1/); } }); From 966347dbe67883b9c540db8fe9b7e79ade268422 Mon Sep 17 00:00:00 2001 From: Esteban Romero Date: Thu, 30 Apr 2026 12:26:37 -0300 Subject: [PATCH 2/2] docs: add error codes to command help --- src/commands/agent/publish/authoring-bundle.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/commands/agent/publish/authoring-bundle.ts b/src/commands/agent/publish/authoring-bundle.ts index b7e3cf5d..18180b69 100644 --- a/src/commands/agent/publish/authoring-bundle.ts +++ b/src/commands/agent/publish/authoring-bundle.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { EOL } from 'node:os'; -import { SfCommand, Flags } from '@salesforce/sf-plugins-core'; +import { SfCommand, Flags, toHelpSection } from '@salesforce/sf-plugins-core'; import { MultiStageOutput } from '@oclif/multi-stage-output'; import { Messages, Lifecycle, SfError } from '@salesforce/core'; import { Agent } from '@salesforce/agents'; @@ -38,6 +38,11 @@ export default class AgentPublishAuthoringBundle extends SfCommand