@@ -34,7 +34,7 @@ export function parseAutorunExecutorOptions(
3434 options : Partial < AutorunCommandExecutorOptions > ,
3535 normalizedContext : NormalizedExecutorContext ,
3636) : AutorunCommandExecutorOptions {
37- const { projectPrefix, persist, upload, command } = options ;
37+ const { projectPrefix, persist, upload, command, output } = options ;
3838 const needsUploadParams =
3939 command === 'upload' || command === 'autorun' || command === undefined ;
4040 const uploadCfg = uploadConfig (
@@ -46,48 +46,11 @@ export function parseAutorunExecutorOptions(
4646 ...parsePrintConfigExecutorOptions ( options ) ,
4747 ...parseAutorunExecutorOnlyOptions ( options ) ,
4848 ...globalConfig ( options , normalizedContext ) ,
49+ ...( output ? { output } : { } ) ,
4950 persist : persistConfig ( { projectPrefix, ...persist } , normalizedContext ) ,
5051 // @TODO This is a hack to avoid validation errors of upload config for commands that dont need it.
5152 // Fix: use utils and execute the core logic directly
5253 // Blocked by Nx plugins can't compile to es6
5354 ...( needsUploadParams && hasApiToken ? { upload : uploadCfg } : { } ) ,
5455 } ;
5556}
56-
57- /**
58- * Deeply merges executor options.
59- *
60- * @param targetOptions - The original options from the target configuration.
61- * @param cliOptions - The options from Nx, combining target options and CLI arguments.
62- * @returns A new object with deeply merged properties.
63- *
64- * Nx performs a shallow merge by default, where command-line arguments can override entire objects
65- * (e.g., `--persist.filename` replaces the entire `persist` object).
66- * This function ensures that nested properties are deeply merged,
67- * preserving the original target options where CLI arguments are not provided.
68- */
69- export function mergeExecutorOptions (
70- targetOptions : Partial < AutorunCommandExecutorOptions > ,
71- cliOptions : Partial < AutorunCommandExecutorOptions > ,
72- ) : AutorunCommandExecutorOptions {
73- return {
74- ...targetOptions ,
75- ...cliOptions ,
76- ...( targetOptions ?. persist || cliOptions ?. persist
77- ? {
78- persist : {
79- ...targetOptions ?. persist ,
80- ...cliOptions ?. persist ,
81- } ,
82- }
83- : { } ) ,
84- ...( targetOptions ?. upload || cliOptions ?. upload
85- ? {
86- upload : {
87- ...targetOptions ?. upload ,
88- ...cliOptions ?. upload ,
89- } ,
90- }
91- : { } ) ,
92- } ;
93- }
0 commit comments