diff --git a/packages/@dcl/sdk-commands/src/commands/start/explorer-alpha.ts b/packages/@dcl/sdk-commands/src/commands/start/explorer-alpha.ts index 0e851f148..10e19a39c 100644 --- a/packages/@dcl/sdk-commands/src/commands/start/explorer-alpha.ts +++ b/packages/@dcl/sdk-commands/src/commands/start/explorer-alpha.ts @@ -4,11 +4,11 @@ const isWindows = /^win/.test(process.platform) export async function runExplorerAlpha( components: CliComponents, - opts: { cwd: string; realm: string; baseCoords: { x: number; y: number } } + opts: { cwd: string; realm: string; baseCoords: { x: number; y: number }; isHub: boolean } ) { - const { cwd, realm, baseCoords } = opts + const { cwd, realm, baseCoords, isHub } = opts - if (await runApp(components, { cwd, realm, baseCoords })) { + if (await runApp(components, { cwd, realm, baseCoords, isHub })) { return } @@ -17,11 +17,16 @@ export async function runExplorerAlpha( async function runApp( components: CliComponents, - { cwd, realm, baseCoords }: { cwd: string; realm: string; baseCoords: { x: number; y: number } } + { + cwd, + realm, + baseCoords, + isHub + }: { cwd: string; realm: string; baseCoords: { x: number; y: number }; isHub: boolean } ) { const cmd = isWindows ? 'start' : 'open' try { - const params = `realm=${realm}&position=${baseCoords.x},${baseCoords.y}&local-scene=true&debug=true` + const params = `realm=${realm}&position=${baseCoords.x},${baseCoords.y}&local-scene=true&debug=true&hub=${isHub}` const app = `decentraland://"${params}"` await components.spawner.exec(cwd, cmd, [app], { silent: true }) components.logger.info(`Desktop client: decentraland://${params}\n`) diff --git a/packages/@dcl/sdk-commands/src/commands/start/index.ts b/packages/@dcl/sdk-commands/src/commands/start/index.ts index ea9371b92..ab5b3dbd8 100644 --- a/packages/@dcl/sdk-commands/src/commands/start/index.ts +++ b/packages/@dcl/sdk-commands/src/commands/start/index.ts @@ -51,7 +51,8 @@ export const args = declareArgs({ '--skip-build': Boolean, '--desktop-client': Boolean, '--data-layer': Boolean, - '--explorer-alpha': Boolean + '--explorer-alpha': Boolean, + '--hub': Boolean }) export async function help(options: Options) { @@ -93,6 +94,7 @@ export async function main(options: Options) { const withDataLayer = options.args['--data-layer'] const enableWeb3 = options.args['--web3'] const explorerAlpha = options.args['--explorer-alpha'] + const isHub = !!options.args['--hub'] let hasSmartWearable = false @@ -230,7 +232,7 @@ export async function main(options: Options) { if (explorerAlpha) { const realm = new URL(sortedURLs[0]).origin - await runExplorerAlpha(components, { cwd: workingDirectory, realm, baseCoords }) + await runExplorerAlpha(components, { cwd: workingDirectory, realm, baseCoords, isHub }) } // Open preferably localhost/127.0.0.1