Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/base/deployBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export type BaseDeployFlags = {
'target-org': Org;
'cpu-size': string;
network?: string;
'use-in-feature'?: string;
};

export type DeployResult = SharedResultProps & {
Expand Down Expand Up @@ -130,7 +129,6 @@ export abstract class DeployBase<TFlags extends BaseDeployFlags = BaseDeployFlag
const targetOrg = flags['target-org'];
const cpuSize = flags['cpu-size'] || 'CPU_2XL';
const network = flags.network;
const useInFeature = flags['use-in-feature'];

if (packageDir.length === 0) {
throw new SfError(messages.getMessage('error.flagEmpty', ['package-dir']), 'InvalidFlagValue');
Expand Down Expand Up @@ -160,8 +158,7 @@ export abstract class DeployBase<TFlags extends BaseDeployFlags = BaseDeployFlag
packageDir,
orgUsername,
cpuSize,
network,
useInFeature
network
);

this.log(cmdMessages.getMessage('info.deploymentComplete', [name, version]));
Expand Down
5 changes: 0 additions & 5 deletions src/commands/data-code-extension/function/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/
import { Messages } from '@salesforce/core';
import { Flags } from '@salesforce/sf-plugins-core';
import { DeployBase } from '../../../base/deployBase.js';

Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
Expand All @@ -29,10 +28,6 @@ export default class Deploy extends DeployBase {

public static readonly flags = {
...DeployBase.flags,
'use-in-feature': Flags.string({
summary: 'Feature where this function will be used.',
default: 'SearchIndexChunking',
}),
};

// eslint-disable-next-line class-methods-use-this
Expand Down
7 changes: 1 addition & 6 deletions src/utils/datacodeBinaryExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ export class DatacodeBinaryExecutor {
packageDir: string,
targetOrg: string,
cpuSize: string,
network?: string,
useInFeature?: string
network?: string
): Promise<DatacodeDeployExecutionResult> {
// Build args array for spawn (avoids shell-escaping issues and enables streaming)
const args = [
Expand All @@ -129,10 +128,6 @@ export class DatacodeBinaryExecutor {
args.push('--network', network);
}

if (useInFeature) {
args.push('--use-in-feature', useInFeature);
}

return new Promise((resolve, reject) => {
debug('deploy spawn: datacustomcode %o', args);
const child = spawn('datacustomcode', args, {
Expand Down
53 changes: 0 additions & 53 deletions test/commands/data-code-extension/deploy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,59 +232,6 @@ describe('data-code-extension deploy', () => {
expect(binaryDeployStub.firstCall.args[0]).to.equal('test-function');
});

it('should pass default use-in-feature to binary', async () => {
await FunctionDeploy.run([
'--name',
'test-function',
'--package-version',
'1.0.0',
'--description',
'Test function deployment',
'--package-dir',
testDir,
'--target-org',
'test@example.com',
]);

expect(binaryDeployStub.firstCall.args[7]).to.equal('SearchIndexChunking');
});

it('should pass explicit use-in-feature to binary', async () => {
await FunctionDeploy.run([
'--name',
'test-function',
'--package-version',
'1.0.0',
'--description',
'Test function deployment',
'--package-dir',
testDir,
'--target-org',
'test@example.com',
'--use-in-feature',
'CustomFeature',
]);

expect(binaryDeployStub.firstCall.args[7]).to.equal('CustomFeature');
});

it('should not pass use-in-feature for script deploy', async () => {
await ScriptDeploy.run([
'--name',
'test-script',
'--package-version',
'1.0.0',
'--description',
'Test script deployment',
'--package-dir',
testDir,
'--target-org',
'test@example.com',
]);

expect(binaryDeployStub.firstCall.args[7]).to.be.undefined;
});

it('should validate CPU size options', async () => {
try {
await FunctionDeploy.run([
Expand Down
Loading