File tree Expand file tree Collapse file tree
commands/data-code-extension/function
test/commands/data-code-extension Expand file tree Collapse file tree Original file line number Diff line number Diff 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
3635export 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 ] ) ) ;
Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616import { Messages } from '@salesforce/core' ;
17- import { Flags } from '@salesforce/sf-plugins-core' ;
1817import { DeployBase } from '../../../base/deployBase.js' ;
1918
2019Messages . 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
Original file line number Diff line number Diff 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 , {
Original file line number Diff line number Diff 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 ( [
You can’t perform that action at this time.
0 commit comments