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 eb9d1f471..0e851f148 100644 --- a/packages/@dcl/sdk-commands/src/commands/start/explorer-alpha.ts +++ b/packages/@dcl/sdk-commands/src/commands/start/explorer-alpha.ts @@ -21,7 +21,7 @@ async function runApp( ) { const cmd = isWindows ? 'start' : 'open' try { - const params = `realm=${realm}&position=${baseCoords.x},${baseCoords.y}&local-scene=true` + const params = `realm=${realm}&position=${baseCoords.x},${baseCoords.y}&local-scene=true&debug=true` 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/server/realm.ts b/packages/@dcl/sdk-commands/src/commands/start/server/realm.ts index 1be29c964..0bd8b6094 100644 --- a/packages/@dcl/sdk-commands/src/commands/start/server/realm.ts +++ b/packages/@dcl/sdk-commands/src/commands/start/server/realm.ts @@ -9,11 +9,15 @@ import { upgradeWebSocketResponse } from '@well-known-components/http-server/dis * It runs using @dcl/mini-comms implementing RFC-5 */ -export function setupRealmAndComms(components: PreviewComponents, router: Router) { +export function setupRealmAndComms( + components: PreviewComponents, + router: Router, + localSceneParcels: string[] = [] +) { router.get('/about', async (ctx) => { const host = ctx.url.host - const body: AboutResponse = { + const body: AboutResponse & { configurations: { localSceneParcels: string[] } } = { acceptingUsers: true, bff: { healthy: false, publicUrl: host }, comms: { @@ -24,6 +28,7 @@ export function setupRealmAndComms(components: PreviewComponents, router: Router configurations: { networkId: 0, globalScenesUrn: [], + localSceneParcels, scenesUrn: [], realmName: 'LocalPreview' }, diff --git a/packages/@dcl/sdk-commands/src/commands/start/server/routes.ts b/packages/@dcl/sdk-commands/src/commands/start/server/routes.ts index 532b0dc8d..7e06bc929 100644 --- a/packages/@dcl/sdk-commands/src/commands/start/server/routes.ts +++ b/packages/@dcl/sdk-commands/src/commands/start/server/routes.ts @@ -30,7 +30,14 @@ export async function wireRouter(components: PreviewComponents, workspace: Works return next() }) - setupRealmAndComms(components, router) + const localSceneParcels: string[] = [] + for (const project of workspace.projects) { + for (const parcel of project.scene.scene.parcels) { + localSceneParcels.push(parcel) + } + } + + setupRealmAndComms(components, router, localSceneParcels) await setupEcs6Endpoints(components, router, workspace) components.server.setContext(components)