Skip to content

Commit

Permalink
fix: upgrade @dcl/inspector to avoid retrocompat issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cazala committed Jan 30, 2024
1 parent 6e087cc commit 1068a8a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 22 deletions.
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ REACT_APP_FF_BUILDER_DCL_CONTROLLER_V2=
REACT_APP_FF_BUILDER_WORLDS_FOR_ENS_OWNERS=

; Local development of @dcl/inspector
REACT_APP_INSPECTOR_PORT=
VITE_INSPECTOR_PORT=

; Local development of @dcl/asset-packs
REACT_APP_BIN_INDEX_JS_DEV_PORT=
REACT_APP_BIN_INDEX_JS_DEV_PATH=
VITE_BIN_INDEX_JS_DEV_PATH=
VITE_BIN_INDEX_JS_DEV_PORT=
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@dcl/content-hash-tree": "^1.1.3",
"@dcl/crypto": "^3.4.5",
"@dcl/hashing": "^3.0.4",
"@dcl/inspector": "^7.3.39",
"@dcl/inspector": "^7.3.40",
"@dcl/mini-rpc": "^1.0.7",
"@dcl/schemas": "^9.4.1",
"@dcl/sdk": "^7.3.35",
Expand Down
10 changes: 5 additions & 5 deletions src/components/InspectorPage/InspectorPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ export default class InspectorPage extends React.PureComponent<Props, State> {
let binIndexJsUrl = `${PUBLIC_URL}/bin/index.js`

// use the local @dcl/inspector running on your machine
if (process.env.REACT_APP_INSPECTOR_PORT) {
htmlUrl = `http://localhost:${process.env.REACT_APP_INSPECTOR_PORT}`
if (process.env.VITE_INSPECTOR_PORT) {
htmlUrl = `http://localhost:${process.env.VITE_INSPECTOR_PORT}`
binIndexJsUrl = `${htmlUrl}/bin/index.js`
}

let queryParams = `?dataLayerRpcParentUrl=${window.location.origin}`

// use the local bin/index.js being watched and served on your machine
if (process.env.REACT_APP_BIN_INDEX_JS_DEV_PORT && process.env.REACT_APP_BIN_INDEX_JS_DEV_PATH) {
const b64 = btoa(process.env.REACT_APP_BIN_INDEX_JS_DEV_PATH)
binIndexJsUrl = `http://localhost:${process.env.REACT_APP_BIN_INDEX_JS_DEV_PORT}/content/contents/b64-${b64}`
if (process.env.VITE_BIN_INDEX_JS_DEV_PORT && process.env.VITE_BIN_INDEX_JS_DEV_PATH) {
const b64 = btoa(process.env.VITE_BIN_INDEX_JS_DEV_PATH)
binIndexJsUrl = `http://localhost:${process.env.VITE_BIN_INDEX_JS_DEV_PORT}/content/contents/b64-${b64}`
}

queryParams = queryParams.concat(`&binIndexJsUrl=${binIndexJsUrl}`)
Expand Down
5 changes: 4 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ export default defineConfig(({ mode }) => {
'process.env': {
// eslint-disable-next-line @typescript-eslint/naming-convention
VITE_REACT_APP_DCL_DEFAULT_ENV: envVariables.VITE_REACT_APP_DCL_DEFAULT_ENV,
VITE_BASE_URL: envVariables.VITE_BASE_URL
VITE_BASE_URL: envVariables.VITE_BASE_URL,
VITE_INSPECTOR_PORT: envVariables.VITE_INSPECTOR_PORT,
VITE_BIN_INDEX_JS_DEV_PORT: envVariables.VITE_BIN_INDEX_JS_DEV_PORT,
VITE_BIN_INDEX_JS_DEV_PATH: envVariables.VITE_BIN_INDEX_JS_DEV_PATH
},
global: {}
},
Expand Down

0 comments on commit 1068a8a

Please sign in to comment.