Skip to content

Commit 02c0a47

Browse files
authored
Merge pull request #26 from salesforcecli/use-in-feature-fix-2
Revert --use-in-feature override
2 parents 0362420 + 6926c77 commit 02c0a47

4 files changed

Lines changed: 2 additions & 68 deletions

File tree

src/base/deployBase.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export type BaseDeployFlags = {
3030
'target-org': Org;
3131
'cpu-size': string;
3232
network?: string;
33-
'use-in-feature'?: string;
3433
};
3534

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

135133
if (packageDir.length === 0) {
136134
throw new SfError(messages.getMessage('error.flagEmpty', ['package-dir']), 'InvalidFlagValue');
@@ -160,8 +158,7 @@ export abstract class DeployBase<TFlags extends BaseDeployFlags = BaseDeployFlag
160158
packageDir,
161159
orgUsername,
162160
cpuSize,
163-
network,
164-
useInFeature
161+
network
165162
);
166163

167164
this.log(cmdMessages.getMessage('info.deploymentComplete', [name, version]));

src/commands/data-code-extension/function/deploy.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* limitations under the License.
1515
*/
1616
import { Messages } from '@salesforce/core';
17-
import { Flags } from '@salesforce/sf-plugins-core';
1817
import { DeployBase } from '../../../base/deployBase.js';
1918

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

3029
public static readonly flags = {
3130
...DeployBase.flags,
32-
'use-in-feature': Flags.string({
33-
summary: 'Feature where this function will be used.',
34-
default: 'SearchIndexChunking',
35-
}),
3631
};
3732

3833
// eslint-disable-next-line class-methods-use-this

src/utils/datacodeBinaryExecutor.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ export class DatacodeBinaryExecutor {
105105
packageDir: string,
106106
targetOrg: string,
107107
cpuSize: string,
108-
network?: string,
109-
useInFeature?: string
108+
network?: string
110109
): Promise<DatacodeDeployExecutionResult> {
111110
// Build args array for spawn (avoids shell-escaping issues and enables streaming)
112111
const args = [
@@ -129,10 +128,6 @@ export class DatacodeBinaryExecutor {
129128
args.push('--network', network);
130129
}
131130

132-
if (useInFeature) {
133-
args.push('--use-in-feature', useInFeature);
134-
}
135-
136131
return new Promise((resolve, reject) => {
137132
debug('deploy spawn: datacustomcode %o', args);
138133
const child = spawn('datacustomcode', args, {

test/commands/data-code-extension/deploy.test.ts

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -232,59 +232,6 @@ describe('data-code-extension deploy', () => {
232232
expect(binaryDeployStub.firstCall.args[0]).to.equal('test-function');
233233
});
234234

235-
it('should pass default use-in-feature to binary', async () => {
236-
await FunctionDeploy.run([
237-
'--name',
238-
'test-function',
239-
'--package-version',
240-
'1.0.0',
241-
'--description',
242-
'Test function deployment',
243-
'--package-dir',
244-
testDir,
245-
'--target-org',
246-
'test@example.com',
247-
]);
248-
249-
expect(binaryDeployStub.firstCall.args[7]).to.equal('SearchIndexChunking');
250-
});
251-
252-
it('should pass explicit use-in-feature to binary', async () => {
253-
await FunctionDeploy.run([
254-
'--name',
255-
'test-function',
256-
'--package-version',
257-
'1.0.0',
258-
'--description',
259-
'Test function deployment',
260-
'--package-dir',
261-
testDir,
262-
'--target-org',
263-
'test@example.com',
264-
'--use-in-feature',
265-
'CustomFeature',
266-
]);
267-
268-
expect(binaryDeployStub.firstCall.args[7]).to.equal('CustomFeature');
269-
});
270-
271-
it('should not pass use-in-feature for script deploy', async () => {
272-
await ScriptDeploy.run([
273-
'--name',
274-
'test-script',
275-
'--package-version',
276-
'1.0.0',
277-
'--description',
278-
'Test script deployment',
279-
'--package-dir',
280-
testDir,
281-
'--target-org',
282-
'test@example.com',
283-
]);
284-
285-
expect(binaryDeployStub.firstCall.args[7]).to.be.undefined;
286-
});
287-
288235
it('should validate CPU size options', async () => {
289236
try {
290237
await FunctionDeploy.run([

0 commit comments

Comments
 (0)