File tree Expand file tree Collapse file tree
packages/b2c-tooling-sdk/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,7 +31,8 @@ import {DEFAULT_MRT_ORIGIN} from '../clients/mrt.js';
3131 * Cloud origin resolution:
3232 * 1. --cloud-origin flag
3333 * 2. SFCC_MRT_CLOUD_ORIGIN environment variable
34- * 3. Default: https://cloud.mobify.com
34+ * 3. dw.json (mrtOrigin field)
35+ * 4. Default: https://cloud.mobify.com
3536 */
3637export abstract class MrtCommand < T extends typeof Command > extends BaseCommand < T > {
3738 static baseFlags = {
@@ -52,7 +53,7 @@ export abstract class MrtCommand<T extends typeof Command> extends BaseCommand<T
5253 env : 'SFCC_MRT_ENVIRONMENT' ,
5354 } ) ,
5455 'cloud-origin' : Flags . string ( {
55- description : `MRT cloud origin URL (default: ${ DEFAULT_MRT_ORIGIN } )` ,
56+ description : `MRT cloud origin URL (or set mrtOrigin in dw.json; default: ${ DEFAULT_MRT_ORIGIN } )` ,
5657 env : 'SFCC_MRT_CLOUD_ORIGIN' ,
5758 } ) ,
5859 'credentials-file' : Flags . string ( {
Original file line number Diff line number Diff line change @@ -59,6 +59,10 @@ export interface DwJsonConfig {
5959 mrtProject ?: string ;
6060 /** MRT environment name (e.g., staging, production) */
6161 mrtEnvironment ?: string ;
62+ /** MRT cloud origin URL */
63+ mrtOrigin ?: string ;
64+ /** MRT cloud origin URL (alias) */
65+ cloudOrigin ?: string ;
6266}
6367
6468/**
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ export function mapDwJsonToNormalizedConfig(json: DwJsonConfig): NormalizedConfi
5454 accountManagerHost : json [ 'account-manager-host' ] ,
5555 mrtProject : json . mrtProject ,
5656 mrtEnvironment : json . mrtEnvironment ,
57+ mrtOrigin : json . mrtOrigin || json . cloudOrigin ,
5758 } ;
5859}
5960
Original file line number Diff line number Diff line change @@ -208,6 +208,9 @@ export class ConfigResolver {
208208 if ( ! enrichedOptions . accountManagerHost && baseConfig . accountManagerHost ) {
209209 enrichedOptions . accountManagerHost = baseConfig . accountManagerHost ;
210210 }
211+ if ( ! enrichedOptions . cloudOrigin && baseConfig . mrtOrigin ) {
212+ enrichedOptions . cloudOrigin = baseConfig . mrtOrigin ;
213+ }
211214 }
212215 }
213216 }
You can’t perform that action at this time.
0 commit comments