@tamagui/cli 1.13.2 → 1.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/build.js +1 -83
- package/dist/cjs/build.js.map +2 -2
- package/dist/cjs/cli.js +8 -155
- package/dist/cjs/cli.js.map +2 -2
- package/dist/cjs/dev/createDevServer.js +1 -164
- package/dist/cjs/dev/createDevServer.js.map +2 -2
- package/dist/cjs/dev.js +1 -185
- package/dist/cjs/dev.js.map +2 -2
- package/dist/cjs/generate.js +1 -82
- package/dist/cjs/generate.js.map +2 -2
- package/dist/cjs/index.js +1 -8
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/studio.js +1 -94
- package/dist/cjs/studio.js.map +2 -2
- package/dist/cjs/tamaguiConfigUtils.js +1 -85
- package/dist/cjs/tamaguiConfigUtils.js.map +2 -2
- package/dist/cjs/test.js +1 -42
- package/dist/cjs/test.js.map +2 -2
- package/dist/cjs/types.js +1 -16
- package/dist/cjs/types.js.map +2 -2
- package/dist/cjs/update.js +1 -29
- package/dist/cjs/update.js.map +2 -2
- package/dist/cjs/utils/constants.js +1 -28
- package/dist/cjs/utils/constants.js.map +2 -2
- package/dist/cjs/utils.js +1 -115
- package/dist/cjs/utils.js.map +2 -2
- package/dist/cjs/vendor/debugger-app/index.js +1 -28
- package/dist/cjs/vendor/debugger-app/index.js.map +2 -2
- package/dist/cjs/vendor/debugger-app/src/debuggerWorker.js +1 -63
- package/dist/cjs/vendor/debugger-app/src/debuggerWorker.js.map +2 -2
- package/dist/cjs/vendor/debugger-app/src/index.css +1 -40
- package/dist/cjs/vendor/debugger-app/src/index.css.map +1 -1
- package/dist/cjs/vendor/debugger-app/src/index.js +1 -164
- package/dist/cjs/vendor/debugger-app/src/index.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/createServer.js +1 -128
- package/dist/cjs/vendor/repack/dev-server/src/createServer.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/index.js +1 -19
- package/dist/cjs/vendor/repack/dev-server/src/index.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/api/apiPlugin.js +1 -58
- package/dist/cjs/vendor/repack/dev-server/src/plugins/api/apiPlugin.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/api/index.js +1 -36
- package/dist/cjs/vendor/repack/dev-server/src/plugins/api/index.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/compiler/compilerPlugin.js +1 -98
- package/dist/cjs/vendor/repack/dev-server/src/plugins/compiler/compilerPlugin.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/compiler/index.js +1 -38
- package/dist/cjs/vendor/repack/dev-server/src/plugins/compiler/index.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/compiler/types.js +1 -16
- package/dist/cjs/vendor/repack/dev-server/src/plugins/compiler/types.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/devtools/devtoolsPlugin.js +1 -118
- package/dist/cjs/vendor/repack/dev-server/src/plugins/devtools/devtoolsPlugin.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/devtools/index.js +1 -36
- package/dist/cjs/vendor/repack/dev-server/src/plugins/devtools/index.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/favicon/faviconPlugin.js +1 -45
- package/dist/cjs/vendor/repack/dev-server/src/plugins/favicon/faviconPlugin.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/favicon/index.js +1 -36
- package/dist/cjs/vendor/repack/dev-server/src/plugins/favicon/index.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/multipart/index.js +1 -38
- package/dist/cjs/vendor/repack/dev-server/src/plugins/multipart/index.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/multipart/multipartPlugin.js +2 -81
- package/dist/cjs/vendor/repack/dev-server/src/plugins/multipart/multipartPlugin.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/multipart/types.js +1 -16
- package/dist/cjs/vendor/repack/dev-server/src/plugins/multipart/types.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/symbolicate/Symbolicator.js +1 -209
- package/dist/cjs/vendor/repack/dev-server/src/plugins/symbolicate/Symbolicator.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/symbolicate/index.js +1 -39
- package/dist/cjs/vendor/repack/dev-server/src/plugins/symbolicate/index.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/symbolicate/sybmolicatePlugin.js +1 -66
- package/dist/cjs/vendor/repack/dev-server/src/plugins/symbolicate/sybmolicatePlugin.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/symbolicate/types.js +1 -16
- package/dist/cjs/vendor/repack/dev-server/src/plugins/symbolicate/types.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/WebSocketRouter.js +1 -73
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/WebSocketRouter.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/WebSocketServer.js +1 -55
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/WebSocketServer.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/index.js +1 -39
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/index.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/servers/HermesInspectorProxy.js +1 -143
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/servers/HermesInspectorProxy.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketApiServer.js +1 -75
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketApiServer.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketDebuggerServer.js +1 -129
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketDebuggerServer.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketDevClientServer.js +1 -85
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketDevClientServer.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketEventsServer.js +1 -187
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketEventsServer.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketHMRServer.js +1 -99
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketHMRServer.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketMessageServer.js +1 -353
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketMessageServer.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/types.js +1 -16
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/types.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/wssPlugin.js +1 -78
- package/dist/cjs/vendor/repack/dev-server/src/plugins/wss/wssPlugin.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/src/types.js +1 -36
- package/dist/cjs/vendor/repack/dev-server/src/types.js.map +2 -2
- package/dist/cjs/vendor/repack/dev-server/vendor/metro-inspector-proxy/src/Device.js +1 -36
- package/dist/cjs/vendor/repack/dev-server/vendor/metro-inspector-proxy/src/Device.js.map +2 -2
- package/dist/esm/build.js +1 -48
- package/dist/esm/build.js.map +2 -2
- package/dist/esm/build.mjs +1 -48
- package/dist/esm/build.mjs.map +2 -2
- package/dist/esm/cli.js +8 -132
- package/dist/esm/cli.js.map +2 -2
- package/dist/esm/cli.mjs +8 -132
- package/dist/esm/cli.mjs.map +2 -2
- package/dist/esm/dev/createDevServer.js +1 -140
- package/dist/esm/dev/createDevServer.js.map +2 -2
- package/dist/esm/dev/createDevServer.mjs +1 -140
- package/dist/esm/dev/createDevServer.mjs.map +2 -2
- package/dist/esm/dev.js +1 -151
- package/dist/esm/dev.js.map +2 -2
- package/dist/esm/dev.mjs +1 -151
- package/dist/esm/dev.mjs.map +2 -2
- package/dist/esm/generate.js +1 -47
- package/dist/esm/generate.js.map +2 -2
- package/dist/esm/generate.mjs +1 -47
- package/dist/esm/generate.mjs.map +2 -2
- package/dist/esm/index.js +1 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +1 -7
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/studio.js +1 -59
- package/dist/esm/studio.js.map +2 -2
- package/dist/esm/studio.mjs +1 -59
- package/dist/esm/studio.mjs.map +2 -2
- package/dist/esm/tamaguiConfigUtils.js +1 -50
- package/dist/esm/tamaguiConfigUtils.js.map +2 -2
- package/dist/esm/tamaguiConfigUtils.mjs +1 -50
- package/dist/esm/tamaguiConfigUtils.mjs.map +2 -2
- package/dist/esm/test.js +1 -8
- package/dist/esm/test.js.map +2 -2
- package/dist/esm/test.mjs +1 -8
- package/dist/esm/test.mjs.map +2 -2
- package/dist/esm/update.js +1 -5
- package/dist/esm/update.js.map +2 -2
- package/dist/esm/update.mjs +1 -5
- package/dist/esm/update.mjs.map +2 -2
- package/dist/esm/utils/constants.js +1 -4
- package/dist/esm/utils/constants.js.map +2 -2
- package/dist/esm/utils/constants.mjs +1 -4
- package/dist/esm/utils/constants.mjs.map +2 -2
- package/dist/esm/utils.js +1 -77
- package/dist/esm/utils.js.map +2 -2
- package/dist/esm/utils.mjs +1 -77
- package/dist/esm/utils.mjs.map +2 -2
- package/dist/esm/vendor/debugger-app/index.js +1 -5
- package/dist/esm/vendor/debugger-app/index.js.map +2 -2
- package/dist/esm/vendor/debugger-app/index.mjs +1 -5
- package/dist/esm/vendor/debugger-app/index.mjs.map +2 -2
- package/dist/esm/vendor/debugger-app/src/debuggerWorker.js +1 -62
- package/dist/esm/vendor/debugger-app/src/debuggerWorker.js.map +2 -2
- package/dist/esm/vendor/debugger-app/src/debuggerWorker.mjs +1 -62
- package/dist/esm/vendor/debugger-app/src/debuggerWorker.mjs.map +2 -2
- package/dist/esm/vendor/debugger-app/src/index.css +1 -40
- package/dist/esm/vendor/debugger-app/src/index.css.map +1 -1
- package/dist/esm/vendor/debugger-app/src/index.js +1 -141
- package/dist/esm/vendor/debugger-app/src/index.js.map +2 -2
- package/dist/esm/vendor/debugger-app/src/index.mjs +1 -141
- package/dist/esm/vendor/debugger-app/src/index.mjs.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/createServer.js +1 -94
- package/dist/esm/vendor/repack/dev-server/src/createServer.js.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/createServer.mjs +1 -94
- package/dist/esm/vendor/repack/dev-server/src/createServer.mjs.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/index.js +1 -2
- package/dist/esm/vendor/repack/dev-server/src/index.js.map +1 -1
- package/dist/esm/vendor/repack/dev-server/src/index.mjs +1 -2
- package/dist/esm/vendor/repack/dev-server/src/index.mjs.map +1 -1
- package/dist/esm/vendor/repack/dev-server/src/plugins/api/apiPlugin.js +1 -36
- package/dist/esm/vendor/repack/dev-server/src/plugins/api/apiPlugin.js.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/api/apiPlugin.mjs +1 -36
- package/dist/esm/vendor/repack/dev-server/src/plugins/api/apiPlugin.mjs.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/api/index.js +1 -4
- package/dist/esm/vendor/repack/dev-server/src/plugins/api/index.js.map +1 -1
- package/dist/esm/vendor/repack/dev-server/src/plugins/api/index.mjs +1 -4
- package/dist/esm/vendor/repack/dev-server/src/plugins/api/index.mjs.map +1 -1
- package/dist/esm/vendor/repack/dev-server/src/plugins/compiler/compilerPlugin.js +1 -66
- package/dist/esm/vendor/repack/dev-server/src/plugins/compiler/compilerPlugin.js.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/compiler/compilerPlugin.mjs +1 -66
- package/dist/esm/vendor/repack/dev-server/src/plugins/compiler/compilerPlugin.mjs.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/compiler/index.js +1 -5
- package/dist/esm/vendor/repack/dev-server/src/plugins/compiler/index.js.map +1 -1
- package/dist/esm/vendor/repack/dev-server/src/plugins/compiler/index.mjs +1 -5
- package/dist/esm/vendor/repack/dev-server/src/plugins/compiler/index.mjs.map +1 -1
- package/dist/esm/vendor/repack/dev-server/src/plugins/devtools/devtoolsPlugin.js +1 -86
- package/dist/esm/vendor/repack/dev-server/src/plugins/devtools/devtoolsPlugin.js.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/devtools/devtoolsPlugin.mjs +1 -86
- package/dist/esm/vendor/repack/dev-server/src/plugins/devtools/devtoolsPlugin.mjs.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/devtools/index.js +1 -4
- package/dist/esm/vendor/repack/dev-server/src/plugins/devtools/index.js.map +1 -1
- package/dist/esm/vendor/repack/dev-server/src/plugins/devtools/index.mjs +1 -4
- package/dist/esm/vendor/repack/dev-server/src/plugins/devtools/index.mjs.map +1 -1
- package/dist/esm/vendor/repack/dev-server/src/plugins/favicon/faviconPlugin.js +1 -12
- package/dist/esm/vendor/repack/dev-server/src/plugins/favicon/faviconPlugin.js.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/favicon/faviconPlugin.mjs +1 -12
- package/dist/esm/vendor/repack/dev-server/src/plugins/favicon/faviconPlugin.mjs.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/favicon/index.js +1 -4
- package/dist/esm/vendor/repack/dev-server/src/plugins/favicon/index.js.map +1 -1
- package/dist/esm/vendor/repack/dev-server/src/plugins/favicon/index.mjs +1 -4
- package/dist/esm/vendor/repack/dev-server/src/plugins/favicon/index.mjs.map +1 -1
- package/dist/esm/vendor/repack/dev-server/src/plugins/multipart/index.js +1 -5
- package/dist/esm/vendor/repack/dev-server/src/plugins/multipart/index.js.map +1 -1
- package/dist/esm/vendor/repack/dev-server/src/plugins/multipart/index.mjs +1 -5
- package/dist/esm/vendor/repack/dev-server/src/plugins/multipart/index.mjs.map +1 -1
- package/dist/esm/vendor/repack/dev-server/src/plugins/multipart/multipartPlugin.js +2 -49
- package/dist/esm/vendor/repack/dev-server/src/plugins/multipart/multipartPlugin.js.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/multipart/multipartPlugin.mjs +2 -49
- package/dist/esm/vendor/repack/dev-server/src/plugins/multipart/multipartPlugin.mjs.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/symbolicate/Symbolicator.js +1 -185
- package/dist/esm/vendor/repack/dev-server/src/plugins/symbolicate/Symbolicator.js.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/symbolicate/Symbolicator.mjs +1 -185
- package/dist/esm/vendor/repack/dev-server/src/plugins/symbolicate/Symbolicator.mjs.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/symbolicate/index.js +1 -6
- package/dist/esm/vendor/repack/dev-server/src/plugins/symbolicate/index.js.map +1 -1
- package/dist/esm/vendor/repack/dev-server/src/plugins/symbolicate/index.mjs +1 -6
- package/dist/esm/vendor/repack/dev-server/src/plugins/symbolicate/index.mjs.map +1 -1
- package/dist/esm/vendor/repack/dev-server/src/plugins/symbolicate/sybmolicatePlugin.js +1 -34
- package/dist/esm/vendor/repack/dev-server/src/plugins/symbolicate/sybmolicatePlugin.js.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/symbolicate/sybmolicatePlugin.mjs +1 -34
- package/dist/esm/vendor/repack/dev-server/src/plugins/symbolicate/sybmolicatePlugin.mjs.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/WebSocketRouter.js +1 -49
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/WebSocketRouter.js.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/WebSocketRouter.mjs +1 -49
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/WebSocketRouter.mjs.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/WebSocketServer.js +1 -31
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/WebSocketServer.js.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/WebSocketServer.mjs +1 -31
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/WebSocketServer.mjs.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/index.js +1 -6
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/index.js.map +1 -1
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/index.mjs +1 -6
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/index.mjs.map +1 -1
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/HermesInspectorProxy.js +1 -109
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/HermesInspectorProxy.js.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/HermesInspectorProxy.mjs +1 -109
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/HermesInspectorProxy.mjs.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketApiServer.js +1 -51
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketApiServer.js.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketApiServer.mjs +1 -51
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketApiServer.mjs.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketDebuggerServer.js +1 -105
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketDebuggerServer.js.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketDebuggerServer.mjs +1 -105
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketDebuggerServer.mjs.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketDevClientServer.js +1 -61
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketDevClientServer.js.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketDevClientServer.mjs +1 -61
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketDevClientServer.mjs.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketEventsServer.js +1 -153
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketEventsServer.js.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketEventsServer.mjs +1 -153
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketEventsServer.mjs.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketHMRServer.js +1 -75
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketHMRServer.js.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketHMRServer.mjs +1 -75
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketHMRServer.mjs.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketMessageServer.js +1 -329
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketMessageServer.js.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketMessageServer.mjs +1 -329
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/servers/WebSocketMessageServer.mjs.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/wssPlugin.js +1 -46
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/wssPlugin.js.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/wssPlugin.mjs +1 -46
- package/dist/esm/vendor/repack/dev-server/src/plugins/wss/wssPlugin.mjs.map +2 -2
- package/dist/esm/vendor/repack/dev-server/src/types.js +1 -12
- package/dist/esm/vendor/repack/dev-server/src/types.js.map +1 -1
- package/dist/esm/vendor/repack/dev-server/src/types.mjs +1 -12
- package/dist/esm/vendor/repack/dev-server/src/types.mjs.map +1 -1
- package/dist/esm/vendor/repack/dev-server/vendor/metro-inspector-proxy/src/Device.js +1 -4
- package/dist/esm/vendor/repack/dev-server/vendor/metro-inspector-proxy/src/Device.js.map +1 -1
- package/dist/esm/vendor/repack/dev-server/vendor/metro-inspector-proxy/src/Device.mjs +1 -4
- package/dist/esm/vendor/repack/dev-server/vendor/metro-inspector-proxy/src/Device.mjs.map +1 -1
- package/package.json +4 -4
|
@@ -1,63 +1,2 @@
|
|
|
1
|
-
onmessage = function() {
|
|
2
|
-
var visibilityState;
|
|
3
|
-
var showVisibilityWarning = function() {
|
|
4
|
-
var hasWarned = false;
|
|
5
|
-
return function() {
|
|
6
|
-
if (hasWarned || console.warn.toString().includes("[native code]")) {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
hasWarned = true;
|
|
10
|
-
console.warn(
|
|
11
|
-
"Remote debugger is in a background tab which may cause apps to perform slowly. Fix this by foregrounding the tab (or opening it in a separate window)."
|
|
12
|
-
);
|
|
13
|
-
};
|
|
14
|
-
}();
|
|
15
|
-
var messageHandlers = {
|
|
16
|
-
executeApplicationScript: function(message, sendReply) {
|
|
17
|
-
for (var key in message.inject) {
|
|
18
|
-
self[key] = JSON.parse(message.inject[key]);
|
|
19
|
-
}
|
|
20
|
-
var error;
|
|
21
|
-
try {
|
|
22
|
-
importScripts(message.url);
|
|
23
|
-
} catch (err) {
|
|
24
|
-
error = err.message;
|
|
25
|
-
}
|
|
26
|
-
sendReply(null, error);
|
|
27
|
-
},
|
|
28
|
-
setDebuggerVisibility: function(message) {
|
|
29
|
-
visibilityState = message.visibilityState;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
return function(message) {
|
|
33
|
-
if (visibilityState === "hidden") {
|
|
34
|
-
showVisibilityWarning();
|
|
35
|
-
}
|
|
36
|
-
var object = message.data;
|
|
37
|
-
var sendReply = function(result, error2) {
|
|
38
|
-
postMessage({ replyID: object.id, result, error: error2 });
|
|
39
|
-
};
|
|
40
|
-
var handler = messageHandlers[object.method];
|
|
41
|
-
if (handler) {
|
|
42
|
-
handler(object, sendReply);
|
|
43
|
-
} else {
|
|
44
|
-
var returnValue = [[], [], [], 0];
|
|
45
|
-
var error;
|
|
46
|
-
try {
|
|
47
|
-
if (typeof __fbBatchedBridge === "object") {
|
|
48
|
-
returnValue = __fbBatchedBridge[object.method].apply(
|
|
49
|
-
null,
|
|
50
|
-
object.arguments
|
|
51
|
-
);
|
|
52
|
-
} else {
|
|
53
|
-
error = "Failed to call function, __fbBatchedBridge is undefined";
|
|
54
|
-
}
|
|
55
|
-
} catch (err) {
|
|
56
|
-
error = err.message;
|
|
57
|
-
} finally {
|
|
58
|
-
sendReply(JSON.stringify(returnValue), error);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
}();
|
|
1
|
+
onmessage=function(){var s,c=function(){var e=!1;return function(){e||console.warn.toString().includes("[native code]")||(e=!0,console.warn("Remote debugger is in a background tab which may cause apps to perform slowly. Fix this by foregrounding the tab (or opening it in a separate window)."))}}(),l={executeApplicationScript:function(e,i){for(var t in e.inject)self[t]=JSON.parse(e.inject[t]);var n;try{importScripts(e.url)}catch(r){n=r.message}i(null,n)},setDebuggerVisibility:function(e){s=e.visibilityState}};return function(e){s==="hidden"&&c();var i=e.data,t=function(o,d){postMessage({replyID:i.id,result:o,error:d})},n=l[i.method];if(n)n(i,t);else{var r=[[],[],[],0],a;try{typeof __fbBatchedBridge=="object"?r=__fbBatchedBridge[i.method].apply(null,i.arguments):a="Failed to call function, __fbBatchedBridge is undefined"}catch(o){a=o.message}finally{t(JSON.stringify(r),a)}}}}();
|
|
63
2
|
//# sourceMappingURL=debuggerWorker.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/vendor/debugger-app/src/debuggerWorker.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n/* global __fbBatchedBridge, importScripts */\n/* eslint no-unused-vars: 0 */\n/* eslint no-restricted-globals: 0 */\n\nonmessage = (function () {\n var visibilityState;\n var showVisibilityWarning = (function () {\n var hasWarned = false;\n return function () {\n // Wait until `YellowBox` gets initialized before displaying the warning.\n if (hasWarned || console.warn.toString().includes('[native code]')) {\n return;\n }\n hasWarned = true;\n console.warn(\n 'Remote debugger is in a background tab which may cause apps to ' +\n 'perform slowly. Fix this by foregrounding the tab (or opening it in ' +\n 'a separate window).'\n );\n };\n })();\n\n var messageHandlers = {\n executeApplicationScript: function (message, sendReply) {\n for (var key in message.inject) {\n self[key] = JSON.parse(message.inject[key]);\n }\n var error;\n try {\n importScripts(message.url);\n } catch (err) {\n error = err.message;\n }\n sendReply(null /* result */, error);\n },\n setDebuggerVisibility: function (message) {\n visibilityState = message.visibilityState;\n },\n };\n\n return function (message) {\n if (visibilityState === 'hidden') {\n showVisibilityWarning();\n }\n\n var object = message.data;\n\n var sendReply = function (result, error) {\n postMessage({ replyID: object.id, result: result, error: error });\n };\n\n var handler = messageHandlers[object.method];\n if (handler) {\n // Special cased handlers\n handler(object, sendReply);\n } else {\n // Other methods get called on the bridge\n var returnValue = [[], [], [], 0];\n var error;\n try {\n if (typeof __fbBatchedBridge === 'object') {\n returnValue = __fbBatchedBridge[object.method].apply(\n null,\n object.arguments\n );\n } else {\n error = 'Failed to call function, __fbBatchedBridge is undefined';\n }\n } catch (err) {\n error = err.message;\n } finally {\n sendReply(JSON.stringify(returnValue), error);\n }\n }\n };\n})();\n"],
|
|
5
|
-
"mappings": "AAYA,
|
|
6
|
-
"names": ["error"]
|
|
5
|
+
"mappings": "AAYA,UAAa,UAAY,CACvB,IAAIA,EACAC,EAAyB,UAAY,CACvC,IAAIC,EAAY,GAChB,OAAO,UAAY,CAEbA,GAAa,QAAQ,KAAK,SAAS,EAAE,SAAS,eAAe,IAGjEA,EAAY,GACZ,QAAQ,KACN,wJAGF,EACF,CACF,EAAG,EAECC,EAAkB,CACpB,yBAA0B,SAAUC,EAASC,EAAW,CACtD,QAASC,KAAOF,EAAQ,OACtB,KAAKE,CAAG,EAAI,KAAK,MAAMF,EAAQ,OAAOE,CAAG,CAAC,EAE5C,IAAIC,EACJ,GAAI,CACF,cAAcH,EAAQ,GAAG,CAC3B,OAASI,EAAP,CACAD,EAAQC,EAAI,OACd,CACAH,EAAU,KAAmBE,CAAK,CACpC,EACA,sBAAuB,SAAUH,EAAS,CACxCJ,EAAkBI,EAAQ,eAC5B,CACF,EAEA,OAAO,SAAUA,EAAS,CACpBJ,IAAoB,UACtBC,EAAsB,EAGxB,IAAIQ,EAASL,EAAQ,KAEjBC,EAAY,SAAUK,EAAQH,EAAO,CACvC,YAAY,CAAE,QAASE,EAAO,GAAI,OAAQC,EAAQ,MAAOH,CAAM,CAAC,CAClE,EAEII,EAAUR,EAAgBM,EAAO,MAAM,EAC3C,GAAIE,EAEFA,EAAQF,EAAQJ,CAAS,MACpB,CAEL,IAAIO,EAAc,CAAC,CAAC,EAAG,CAAC,EAAG,CAAC,EAAG,CAAC,EAC5BL,EACJ,GAAI,CACE,OAAO,mBAAsB,SAC/BK,EAAc,kBAAkBH,EAAO,MAAM,EAAE,MAC7C,KACAA,EAAO,SACT,EAEAF,EAAQ,yDAEZ,OAASC,EAAP,CACAD,EAAQC,EAAI,OACd,QAAE,CACAH,EAAU,KAAK,UAAUO,CAAW,EAAGL,CAAK,CAC9C,CACF,CACF,CACF,EAAG",
|
|
6
|
+
"names": ["visibilityState", "showVisibilityWarning", "hasWarned", "messageHandlers", "message", "sendReply", "key", "error", "err", "object", "result", "handler", "returnValue"]
|
|
7
7
|
}
|
|
@@ -1,63 +1,2 @@
|
|
|
1
|
-
onmessage = function() {
|
|
2
|
-
var visibilityState;
|
|
3
|
-
var showVisibilityWarning = function() {
|
|
4
|
-
var hasWarned = false;
|
|
5
|
-
return function() {
|
|
6
|
-
if (hasWarned || console.warn.toString().includes("[native code]")) {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
hasWarned = true;
|
|
10
|
-
console.warn(
|
|
11
|
-
"Remote debugger is in a background tab which may cause apps to perform slowly. Fix this by foregrounding the tab (or opening it in a separate window)."
|
|
12
|
-
);
|
|
13
|
-
};
|
|
14
|
-
}();
|
|
15
|
-
var messageHandlers = {
|
|
16
|
-
executeApplicationScript: function(message, sendReply) {
|
|
17
|
-
for (var key in message.inject) {
|
|
18
|
-
self[key] = JSON.parse(message.inject[key]);
|
|
19
|
-
}
|
|
20
|
-
var error;
|
|
21
|
-
try {
|
|
22
|
-
importScripts(message.url);
|
|
23
|
-
} catch (err) {
|
|
24
|
-
error = err.message;
|
|
25
|
-
}
|
|
26
|
-
sendReply(null, error);
|
|
27
|
-
},
|
|
28
|
-
setDebuggerVisibility: function(message) {
|
|
29
|
-
visibilityState = message.visibilityState;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
return function(message) {
|
|
33
|
-
if (visibilityState === "hidden") {
|
|
34
|
-
showVisibilityWarning();
|
|
35
|
-
}
|
|
36
|
-
var object = message.data;
|
|
37
|
-
var sendReply = function(result, error2) {
|
|
38
|
-
postMessage({ replyID: object.id, result, error: error2 });
|
|
39
|
-
};
|
|
40
|
-
var handler = messageHandlers[object.method];
|
|
41
|
-
if (handler) {
|
|
42
|
-
handler(object, sendReply);
|
|
43
|
-
} else {
|
|
44
|
-
var returnValue = [[], [], [], 0];
|
|
45
|
-
var error;
|
|
46
|
-
try {
|
|
47
|
-
if (typeof __fbBatchedBridge === "object") {
|
|
48
|
-
returnValue = __fbBatchedBridge[object.method].apply(
|
|
49
|
-
null,
|
|
50
|
-
object.arguments
|
|
51
|
-
);
|
|
52
|
-
} else {
|
|
53
|
-
error = "Failed to call function, __fbBatchedBridge is undefined";
|
|
54
|
-
}
|
|
55
|
-
} catch (err) {
|
|
56
|
-
error = err.message;
|
|
57
|
-
} finally {
|
|
58
|
-
sendReply(JSON.stringify(returnValue), error);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
}();
|
|
1
|
+
onmessage=function(){var s,c=function(){var e=!1;return function(){e||console.warn.toString().includes("[native code]")||(e=!0,console.warn("Remote debugger is in a background tab which may cause apps to perform slowly. Fix this by foregrounding the tab (or opening it in a separate window)."))}}(),l={executeApplicationScript:function(e,i){for(var t in e.inject)self[t]=JSON.parse(e.inject[t]);var n;try{importScripts(e.url)}catch(r){n=r.message}i(null,n)},setDebuggerVisibility:function(e){s=e.visibilityState}};return function(e){s==="hidden"&&c();var i=e.data,t=function(o,d){postMessage({replyID:i.id,result:o,error:d})},n=l[i.method];if(n)n(i,t);else{var r=[[],[],[],0],a;try{typeof __fbBatchedBridge=="object"?r=__fbBatchedBridge[i.method].apply(null,i.arguments):a="Failed to call function, __fbBatchedBridge is undefined"}catch(o){a=o.message}finally{t(JSON.stringify(r),a)}}}}();
|
|
63
2
|
//# sourceMappingURL=debuggerWorker.mjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/vendor/debugger-app/src/debuggerWorker.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n/* global __fbBatchedBridge, importScripts */\n/* eslint no-unused-vars: 0 */\n/* eslint no-restricted-globals: 0 */\n\nonmessage = (function () {\n var visibilityState;\n var showVisibilityWarning = (function () {\n var hasWarned = false;\n return function () {\n // Wait until `YellowBox` gets initialized before displaying the warning.\n if (hasWarned || console.warn.toString().includes('[native code]')) {\n return;\n }\n hasWarned = true;\n console.warn(\n 'Remote debugger is in a background tab which may cause apps to ' +\n 'perform slowly. Fix this by foregrounding the tab (or opening it in ' +\n 'a separate window).'\n );\n };\n })();\n\n var messageHandlers = {\n executeApplicationScript: function (message, sendReply) {\n for (var key in message.inject) {\n self[key] = JSON.parse(message.inject[key]);\n }\n var error;\n try {\n importScripts(message.url);\n } catch (err) {\n error = err.message;\n }\n sendReply(null /* result */, error);\n },\n setDebuggerVisibility: function (message) {\n visibilityState = message.visibilityState;\n },\n };\n\n return function (message) {\n if (visibilityState === 'hidden') {\n showVisibilityWarning();\n }\n\n var object = message.data;\n\n var sendReply = function (result, error) {\n postMessage({ replyID: object.id, result: result, error: error });\n };\n\n var handler = messageHandlers[object.method];\n if (handler) {\n // Special cased handlers\n handler(object, sendReply);\n } else {\n // Other methods get called on the bridge\n var returnValue = [[], [], [], 0];\n var error;\n try {\n if (typeof __fbBatchedBridge === 'object') {\n returnValue = __fbBatchedBridge[object.method].apply(\n null,\n object.arguments\n );\n } else {\n error = 'Failed to call function, __fbBatchedBridge is undefined';\n }\n } catch (err) {\n error = err.message;\n } finally {\n sendReply(JSON.stringify(returnValue), error);\n }\n }\n };\n})();\n"],
|
|
5
|
-
"mappings": "AAYA,
|
|
6
|
-
"names": ["error"]
|
|
5
|
+
"mappings": "AAYA,UAAa,UAAY,CACvB,IAAIA,EACAC,EAAyB,UAAY,CACvC,IAAIC,EAAY,GAChB,OAAO,UAAY,CAEbA,GAAa,QAAQ,KAAK,SAAS,EAAE,SAAS,eAAe,IAGjEA,EAAY,GACZ,QAAQ,KACN,wJAGF,EACF,CACF,EAAG,EAECC,EAAkB,CACpB,yBAA0B,SAAUC,EAASC,EAAW,CACtD,QAASC,KAAOF,EAAQ,OACtB,KAAKE,CAAG,EAAI,KAAK,MAAMF,EAAQ,OAAOE,CAAG,CAAC,EAE5C,IAAIC,EACJ,GAAI,CACF,cAAcH,EAAQ,GAAG,CAC3B,OAASI,EAAP,CACAD,EAAQC,EAAI,OACd,CACAH,EAAU,KAAmBE,CAAK,CACpC,EACA,sBAAuB,SAAUH,EAAS,CACxCJ,EAAkBI,EAAQ,eAC5B,CACF,EAEA,OAAO,SAAUA,EAAS,CACpBJ,IAAoB,UACtBC,EAAsB,EAGxB,IAAIQ,EAASL,EAAQ,KAEjBC,EAAY,SAAUK,EAAQH,EAAO,CACvC,YAAY,CAAE,QAASE,EAAO,GAAI,OAAQC,EAAQ,MAAOH,CAAM,CAAC,CAClE,EAEII,EAAUR,EAAgBM,EAAO,MAAM,EAC3C,GAAIE,EAEFA,EAAQF,EAAQJ,CAAS,MACpB,CAEL,IAAIO,EAAc,CAAC,CAAC,EAAG,CAAC,EAAG,CAAC,EAAG,CAAC,EAC5BL,EACJ,GAAI,CACE,OAAO,mBAAsB,SAC/BK,EAAc,kBAAkBH,EAAO,MAAM,EAAE,MAC7C,KACAA,EAAO,SACT,EAEAF,EAAQ,yDAEZ,OAASC,EAAP,CACAD,EAAQC,EAAI,OACd,QAAE,CACAH,EAAU,KAAK,UAAUO,CAAW,EAAGL,CAAK,CAC9C,CACF,CACF,CACF,EAAG",
|
|
6
|
+
"names": ["visibilityState", "showVisibilityWarning", "hasWarned", "messageHandlers", "message", "sendReply", "key", "error", "err", "object", "result", "handler", "returnValue"]
|
|
7
7
|
}
|
|
@@ -1,41 +1,2 @@
|
|
|
1
|
-
html,
|
|
2
|
-
body {
|
|
3
|
-
font-family:
|
|
4
|
-
Helvetica,
|
|
5
|
-
Verdana,
|
|
6
|
-
sans-serif;
|
|
7
|
-
font-size: large;
|
|
8
|
-
font-weight: 200;
|
|
9
|
-
height: 100%;
|
|
10
|
-
margin: 0;
|
|
11
|
-
padding: 0;
|
|
12
|
-
}
|
|
13
|
-
.shortcut {
|
|
14
|
-
border-radius: 4px;
|
|
15
|
-
color: #eee;
|
|
16
|
-
background-color: #333;
|
|
17
|
-
font-family: "Monaco", monospace;
|
|
18
|
-
font-size: medium;
|
|
19
|
-
letter-spacing: 3px;
|
|
20
|
-
padding: 4px;
|
|
21
|
-
}
|
|
22
|
-
.content {
|
|
23
|
-
padding: 10px;
|
|
24
|
-
}
|
|
25
|
-
.reload-btn {
|
|
26
|
-
padding: 5px 10px;
|
|
27
|
-
}
|
|
28
|
-
body.dark {
|
|
29
|
-
background-color: #242424;
|
|
30
|
-
color: #afafaf;
|
|
31
|
-
}
|
|
32
|
-
.dark .shortcut {
|
|
33
|
-
color: #c1c1c1;
|
|
34
|
-
}
|
|
35
|
-
.dark a {
|
|
36
|
-
color: #3b99fc;
|
|
37
|
-
}
|
|
38
|
-
input[type=checkbox] {
|
|
39
|
-
vertical-align: middle;
|
|
40
|
-
}
|
|
1
|
+
html,body{font-family:Helvetica,Verdana,sans-serif;font-size:large;font-weight:200;height:100%;margin:0;padding:0}.shortcut{border-radius:4px;color:#eee;background-color:#333;font-family:Monaco,monospace;font-size:medium;letter-spacing:3px;padding:4px}.content{padding:10px}.reload-btn{padding:5px 10px}body.dark{background-color:#242424;color:#afafaf}.dark .shortcut{color:#c1c1c1}.dark a{color:#3b99fc}input[type=checkbox]{vertical-align:middle}
|
|
41
2
|
/*# sourceMappingURL=index.css.map */
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/vendor/debugger-app/src/index.css"],
|
|
4
4
|
"sourcesContent": ["html,\nbody {\n font-family: Helvetica, Verdana, sans-serif;\n font-size: large;\n font-weight: 200;\n height: 100%;\n margin: 0;\n padding: 0;\n}\n.shortcut {\n border-radius: 4px;\n color: #eee;\n background-color: #333;\n font-family: 'Monaco', monospace;\n font-size: medium;\n letter-spacing: 3px;\n padding: 4px;\n}\n.content {\n padding: 10px;\n}\n.reload-btn {\n padding: 5px 10px;\n}\nbody.dark {\n background-color: #242424;\n color: #afafaf;\n}\n.dark .shortcut {\n color: #c1c1c1;\n}\n.dark a {\n color: #3b99fc;\n}\ninput[type='checkbox'] {\n vertical-align: middle;\n}\n"],
|
|
5
|
-
"mappings": "AAAA
|
|
5
|
+
"mappings": "AAAA,UAEE,yCACA,gBACA,gBACA,YALF,mBASA,UATA,kBAWE,WACA,sBACA,6BACA,iBACA,mBAfF,YAkBA,SAlBA,aAqBA,YArBA,iBAwBA,UACE,yBACA,cAEF,gBACE,cAEF,QACE,cAEF,qBACE",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,142 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import blueIcon from "./assets/blue-icon.png";
|
|
3
|
-
import grayIcon from "./assets/gray-icon.png";
|
|
4
|
-
import orangeIcon from "./assets/orange-icon.png";
|
|
5
|
-
import DebuggerWorker from "./debuggerWorker.js";
|
|
6
|
-
const isMacLike = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);
|
|
7
|
-
const refreshShortcut = isMacLike ? "\u2318R" : "Ctrl R";
|
|
8
|
-
window.onload = function() {
|
|
9
|
-
if (!isMacLike) {
|
|
10
|
-
document.getElementById("shortcut").innerHTML = "Ctrl\u21E7J";
|
|
11
|
-
}
|
|
12
|
-
Page.render();
|
|
13
|
-
};
|
|
14
|
-
window.onReloadClicked = function() {
|
|
15
|
-
var xhr = new XMLHttpRequest();
|
|
16
|
-
xhr.open("GET", `${window.location.origin}/reload`, true);
|
|
17
|
-
xhr.send();
|
|
18
|
-
};
|
|
19
|
-
const Page = window.Page = {
|
|
20
|
-
state: {
|
|
21
|
-
isDark: localStorage.getItem("darkTheme") === null ? window.matchMedia("(prefers-color-scheme: dark)").matches : localStorage.getItem("darkTheme") === "on",
|
|
22
|
-
isPriorityMaintained: localStorage.getItem("maintainPriority") === "on",
|
|
23
|
-
status: { type: "disconnected" },
|
|
24
|
-
visibilityState: document.visibilityState
|
|
25
|
-
},
|
|
26
|
-
setState(partialState) {
|
|
27
|
-
Page.state = Object.assign({}, Page.state, partialState);
|
|
28
|
-
Page.render();
|
|
29
|
-
},
|
|
30
|
-
render() {
|
|
31
|
-
const { isDark, isPriorityMaintained, status, visibilityState } = Page.state;
|
|
32
|
-
const statusNode = document.getElementById("status");
|
|
33
|
-
switch (status.type) {
|
|
34
|
-
case "connected":
|
|
35
|
-
statusNode.innerHTML = "Debugger session #" + status.id + " active.";
|
|
36
|
-
break;
|
|
37
|
-
case "error":
|
|
38
|
-
statusNode.innerHTML = status.error.reason || "Disconnected from proxy. Attempting reconnection. Is node server running?";
|
|
39
|
-
break;
|
|
40
|
-
case "connecting":
|
|
41
|
-
case "disconnected":
|
|
42
|
-
default:
|
|
43
|
-
statusNode.innerHTML = 'Waiting, press <span class="shortcut">' + refreshShortcut + "</span> in simulator to reload and connect.";
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
const linkNode = document.querySelector("link[rel=icon]");
|
|
47
|
-
if (status.type === "disconnected" || status.type === "error") {
|
|
48
|
-
linkNode.href = grayIcon;
|
|
49
|
-
} else {
|
|
50
|
-
if (visibilityState === "visible" || isPriorityMaintained) {
|
|
51
|
-
linkNode.href = blueIcon;
|
|
52
|
-
} else {
|
|
53
|
-
linkNode.href = orangeIcon;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
const darkCheckbox = document.getElementById("dark");
|
|
57
|
-
document.body.classList.toggle("dark", isDark);
|
|
58
|
-
darkCheckbox.checked = isDark;
|
|
59
|
-
localStorage.setItem("darkTheme", isDark ? "on" : "");
|
|
60
|
-
const maintainPriorityCheckbox = document.getElementById("maintain-priority");
|
|
61
|
-
maintainPriorityCheckbox.checked = isPriorityMaintained;
|
|
62
|
-
localStorage.setItem("maintainPriority", isPriorityMaintained ? "on" : "");
|
|
63
|
-
},
|
|
64
|
-
toggleDarkTheme() {
|
|
65
|
-
Page.setState({ isDark: !Page.state.isDark });
|
|
66
|
-
},
|
|
67
|
-
togglePriorityMaintenance() {
|
|
68
|
-
Page.setState({ isPriorityMaintained: !Page.state.isPriorityMaintained });
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
function connectToDebuggerProxy() {
|
|
72
|
-
const ws = new WebSocket(
|
|
73
|
-
"ws://" + window.location.host + "/debugger-proxy?role=debugger&name=Chrome"
|
|
74
|
-
);
|
|
75
|
-
let worker;
|
|
76
|
-
function createJSRuntime() {
|
|
77
|
-
worker = new DebuggerWorker();
|
|
78
|
-
worker.onmessage = function(message) {
|
|
79
|
-
ws.send(JSON.stringify(message.data));
|
|
80
|
-
};
|
|
81
|
-
window.onbeforeunload = function() {
|
|
82
|
-
return "If you reload this page, it is going to break the debugging session. Press " + refreshShortcut + " on the device to reload.";
|
|
83
|
-
};
|
|
84
|
-
updateVisibility();
|
|
85
|
-
}
|
|
86
|
-
function shutdownJSRuntime() {
|
|
87
|
-
if (worker) {
|
|
88
|
-
worker.terminate();
|
|
89
|
-
worker = null;
|
|
90
|
-
window.onbeforeunload = null;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
function updateVisibility() {
|
|
94
|
-
if (worker && !Page.state.isPriorityMaintained) {
|
|
95
|
-
worker.postMessage({
|
|
96
|
-
method: "setDebuggerVisibility",
|
|
97
|
-
visibilityState: document.visibilityState
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
Page.setState({ visibilityState: document.visibilityState });
|
|
101
|
-
}
|
|
102
|
-
ws.onopen = function() {
|
|
103
|
-
Page.setState({ status: { type: "connecting" } });
|
|
104
|
-
};
|
|
105
|
-
ws.onmessage = function(message) {
|
|
106
|
-
if (!message.data) {
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
const object = JSON.parse(message.data);
|
|
110
|
-
if (object.$event === "client-disconnected") {
|
|
111
|
-
shutdownJSRuntime();
|
|
112
|
-
Page.setState({ status: { type: "disconnected" } });
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
if (!object.method) {
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
if (object.method === "prepareJSRuntime") {
|
|
119
|
-
shutdownJSRuntime();
|
|
120
|
-
console.clear();
|
|
121
|
-
createJSRuntime();
|
|
122
|
-
ws.send(JSON.stringify({ replyID: object.id }));
|
|
123
|
-
Page.setState({ status: { type: "connected", id: object.id } });
|
|
124
|
-
} else if (object.method === "$disconnected") {
|
|
125
|
-
shutdownJSRuntime();
|
|
126
|
-
Page.setState({ status: { type: "disconnected" } });
|
|
127
|
-
} else {
|
|
128
|
-
worker.postMessage(object);
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
ws.onclose = function(error) {
|
|
132
|
-
shutdownJSRuntime();
|
|
133
|
-
Page.setState({ status: { type: "error", error } });
|
|
134
|
-
if (error.reason) {
|
|
135
|
-
console.warn(error.reason);
|
|
136
|
-
}
|
|
137
|
-
setTimeout(connectToDebuggerProxy, 500);
|
|
138
|
-
};
|
|
139
|
-
document.addEventListener("visibilitychange", updateVisibility, false);
|
|
140
|
-
}
|
|
141
|
-
connectToDebuggerProxy();
|
|
1
|
+
import"./index.css";import m from"./assets/blue-icon.png";import g from"./assets/gray-icon.png";import y from"./assets/orange-icon.png";import f from"./debuggerWorker.js";const c=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),d=c?"\u2318R":"Ctrl R";window.onload=function(){c||(document.getElementById("shortcut").innerHTML="Ctrl\u21E7J"),e.render()},window.onReloadClicked=function(){var t=new XMLHttpRequest;t.open("GET",`${window.location.origin}/reload`,!0),t.send()};const e=window.Page={state:{isDark:localStorage.getItem("darkTheme")===null?window.matchMedia("(prefers-color-scheme: dark)").matches:localStorage.getItem("darkTheme")==="on",isPriorityMaintained:localStorage.getItem("maintainPriority")==="on",status:{type:"disconnected"},visibilityState:document.visibilityState},setState(t){e.state=Object.assign({},e.state,t),e.render()},render(){const{isDark:t,isPriorityMaintained:n,status:s,visibilityState:r}=e.state,a=document.getElementById("status");switch(s.type){case"connected":a.innerHTML="Debugger session #"+s.id+" active.";break;case"error":a.innerHTML=s.error.reason||"Disconnected from proxy. Attempting reconnection. Is node server running?";break;case"connecting":case"disconnected":default:a.innerHTML='Waiting, press <span class="shortcut">'+d+"</span> in simulator to reload and connect.";break}const i=document.querySelector("link[rel=icon]");s.type==="disconnected"||s.type==="error"?i.href=g:r==="visible"||n?i.href=m:i.href=y;const o=document.getElementById("dark");document.body.classList.toggle("dark",t),o.checked=t,localStorage.setItem("darkTheme",t?"on":"");const u=document.getElementById("maintain-priority");u.checked=n,localStorage.setItem("maintainPriority",n?"on":"")},toggleDarkTheme(){e.setState({isDark:!e.state.isDark})},togglePriorityMaintenance(){e.setState({isPriorityMaintained:!e.state.isPriorityMaintained})}};function l(){const t=new WebSocket("ws://"+window.location.host+"/debugger-proxy?role=debugger&name=Chrome");let n;function s(){n=new f,n.onmessage=function(i){t.send(JSON.stringify(i.data))},window.onbeforeunload=function(){return"If you reload this page, it is going to break the debugging session. Press "+d+" on the device to reload."},a()}function r(){n&&(n.terminate(),n=null,window.onbeforeunload=null)}function a(){n&&!e.state.isPriorityMaintained&&n.postMessage({method:"setDebuggerVisibility",visibilityState:document.visibilityState}),e.setState({visibilityState:document.visibilityState})}t.onopen=function(){e.setState({status:{type:"connecting"}})},t.onmessage=function(i){if(!i.data)return;const o=JSON.parse(i.data);if(o.$event==="client-disconnected"){r(),e.setState({status:{type:"disconnected"}});return}o.method&&(o.method==="prepareJSRuntime"?(r(),console.clear(),s(),t.send(JSON.stringify({replyID:o.id})),e.setState({status:{type:"connected",id:o.id}})):o.method==="$disconnected"?(r(),e.setState({status:{type:"disconnected"}})):n.postMessage(o))},t.onclose=function(i){r(),e.setState({status:{type:"error",error:i}}),i.reason&&console.warn(i.reason),setTimeout(l,500)},document.addEventListener("visibilitychange",a,!1)}l();
|
|
142
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/vendor/debugger-app/src/index.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n/* eslint-env browser */\nimport './index.css';\nimport blueIcon from './assets/blue-icon.png';\nimport grayIcon from './assets/gray-icon.png';\nimport orangeIcon from './assets/orange-icon.png';\nimport DebuggerWorker from './debuggerWorker.js';\n\nconst isMacLike = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);\nconst refreshShortcut = isMacLike ? '\u2318R' : 'Ctrl R';\nwindow.onload = function () {\n if (!isMacLike) {\n document.getElementById('shortcut').innerHTML = 'Ctrl\u21E7J';\n }\n Page.render();\n};\n\nwindow.onReloadClicked = function () {\n var xhr = new XMLHttpRequest();\n xhr.open('GET', `${window.location.origin}/reload`, true);\n xhr.send();\n};\n\nconst Page = (window.Page = {\n state: {\n isDark:\n localStorage.getItem('darkTheme') === null\n ? window.matchMedia('(prefers-color-scheme: dark)').matches\n : localStorage.getItem('darkTheme') === 'on',\n isPriorityMaintained: localStorage.getItem('maintainPriority') === 'on',\n status: { type: 'disconnected' },\n visibilityState: document.visibilityState,\n },\n\n setState(partialState) {\n Page.state = Object.assign({}, Page.state, partialState);\n Page.render();\n },\n\n render() {\n const { isDark, isPriorityMaintained, status, visibilityState } =\n Page.state;\n\n const statusNode = document.getElementById('status');\n switch (status.type) {\n case 'connected':\n statusNode.innerHTML = 'Debugger session #' + status.id + ' active.';\n break;\n case 'error':\n statusNode.innerHTML =\n status.error.reason ||\n 'Disconnected from proxy. Attempting reconnection. Is node server running?';\n break;\n case 'connecting':\n case 'disconnected':\n // Fall through.\n default:\n statusNode.innerHTML =\n 'Waiting, press <span class=\"shortcut\">' +\n refreshShortcut +\n '</span> in simulator to reload and connect.';\n break;\n }\n\n const linkNode = document.querySelector('link[rel=icon]');\n if (status.type === 'disconnected' || status.type === 'error') {\n linkNode.href = grayIcon;\n } else {\n if (visibilityState === 'visible' || isPriorityMaintained) {\n linkNode.href = blueIcon;\n } else {\n linkNode.href = orangeIcon;\n }\n }\n\n const darkCheckbox = document.getElementById('dark');\n document.body.classList.toggle('dark', isDark);\n darkCheckbox.checked = isDark;\n localStorage.setItem('darkTheme', isDark ? 'on' : '');\n\n const maintainPriorityCheckbox =\n document.getElementById('maintain-priority');\n maintainPriorityCheckbox.checked = isPriorityMaintained;\n localStorage.setItem('maintainPriority', isPriorityMaintained ? 'on' : '');\n },\n\n toggleDarkTheme() {\n Page.setState({ isDark: !Page.state.isDark });\n },\n\n togglePriorityMaintenance() {\n Page.setState({ isPriorityMaintained: !Page.state.isPriorityMaintained });\n },\n});\n\nfunction connectToDebuggerProxy() {\n const ws = new WebSocket(\n 'ws://' + window.location.host + '/debugger-proxy?role=debugger&name=Chrome'\n );\n let worker;\n\n function createJSRuntime() {\n // This worker will run the application JavaScript code,\n // making sure that it's run in an environment without a global\n // document, to make it consistent with the JSC executor environment.\n worker = new DebuggerWorker();\n worker.onmessage = function (message) {\n ws.send(JSON.stringify(message.data));\n };\n window.onbeforeunload = function () {\n return (\n 'If you reload this page, it is going to break the debugging session. ' +\n 'Press ' +\n refreshShortcut +\n ' on the device to reload.'\n );\n };\n updateVisibility();\n }\n\n function shutdownJSRuntime() {\n if (worker) {\n worker.terminate();\n worker = null;\n window.onbeforeunload = null;\n }\n }\n\n function updateVisibility() {\n if (worker && !Page.state.isPriorityMaintained) {\n worker.postMessage({\n method: 'setDebuggerVisibility',\n visibilityState: document.visibilityState,\n });\n }\n Page.setState({ visibilityState: document.visibilityState });\n }\n\n ws.onopen = function () {\n Page.setState({ status: { type: 'connecting' } });\n };\n\n ws.onmessage = function (message) {\n if (!message.data) {\n return;\n }\n const object = JSON.parse(message.data);\n\n if (object.$event === 'client-disconnected') {\n shutdownJSRuntime();\n Page.setState({ status: { type: 'disconnected' } });\n return;\n }\n\n if (!object.method) {\n return;\n }\n\n // Special message that asks for a new JS runtime\n if (object.method === 'prepareJSRuntime') {\n shutdownJSRuntime();\n console.clear();\n createJSRuntime();\n ws.send(JSON.stringify({ replyID: object.id }));\n Page.setState({ status: { type: 'connected', id: object.id } });\n } else if (object.method === '$disconnected') {\n shutdownJSRuntime();\n Page.setState({ status: { type: 'disconnected' } });\n } else {\n worker.postMessage(object);\n }\n };\n\n ws.onclose = function (error) {\n shutdownJSRuntime();\n Page.setState({ status: { type: 'error', error } });\n if (error.reason) {\n console.warn(error.reason);\n }\n setTimeout(connectToDebuggerProxy, 500);\n };\n\n // Let debuggerWorker.js know when we're not visible so that we can warn about\n // poor performance when using remote debugging.\n document.addEventListener('visibilitychange', updateVisibility, false);\n}\n\nconnectToDebuggerProxy();\n"],
|
|
5
|
-
"mappings": "AASA,
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["blueIcon", "grayIcon", "orangeIcon", "DebuggerWorker", "isMacLike", "refreshShortcut", "Page", "xhr", "partialState", "isDark", "isPriorityMaintained", "status", "visibilityState", "statusNode", "linkNode", "darkCheckbox", "maintainPriorityCheckbox", "connectToDebuggerProxy", "ws", "worker", "createJSRuntime", "message", "updateVisibility", "shutdownJSRuntime", "object", "error"]
|
|
7
7
|
}
|
|
@@ -1,142 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import blueIcon from "./assets/blue-icon.png";
|
|
3
|
-
import grayIcon from "./assets/gray-icon.png";
|
|
4
|
-
import orangeIcon from "./assets/orange-icon.png";
|
|
5
|
-
import DebuggerWorker from "./debuggerWorker.js";
|
|
6
|
-
const isMacLike = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);
|
|
7
|
-
const refreshShortcut = isMacLike ? "\u2318R" : "Ctrl R";
|
|
8
|
-
window.onload = function() {
|
|
9
|
-
if (!isMacLike) {
|
|
10
|
-
document.getElementById("shortcut").innerHTML = "Ctrl\u21E7J";
|
|
11
|
-
}
|
|
12
|
-
Page.render();
|
|
13
|
-
};
|
|
14
|
-
window.onReloadClicked = function() {
|
|
15
|
-
var xhr = new XMLHttpRequest();
|
|
16
|
-
xhr.open("GET", `${window.location.origin}/reload`, true);
|
|
17
|
-
xhr.send();
|
|
18
|
-
};
|
|
19
|
-
const Page = window.Page = {
|
|
20
|
-
state: {
|
|
21
|
-
isDark: localStorage.getItem("darkTheme") === null ? window.matchMedia("(prefers-color-scheme: dark)").matches : localStorage.getItem("darkTheme") === "on",
|
|
22
|
-
isPriorityMaintained: localStorage.getItem("maintainPriority") === "on",
|
|
23
|
-
status: { type: "disconnected" },
|
|
24
|
-
visibilityState: document.visibilityState
|
|
25
|
-
},
|
|
26
|
-
setState(partialState) {
|
|
27
|
-
Page.state = Object.assign({}, Page.state, partialState);
|
|
28
|
-
Page.render();
|
|
29
|
-
},
|
|
30
|
-
render() {
|
|
31
|
-
const { isDark, isPriorityMaintained, status, visibilityState } = Page.state;
|
|
32
|
-
const statusNode = document.getElementById("status");
|
|
33
|
-
switch (status.type) {
|
|
34
|
-
case "connected":
|
|
35
|
-
statusNode.innerHTML = "Debugger session #" + status.id + " active.";
|
|
36
|
-
break;
|
|
37
|
-
case "error":
|
|
38
|
-
statusNode.innerHTML = status.error.reason || "Disconnected from proxy. Attempting reconnection. Is node server running?";
|
|
39
|
-
break;
|
|
40
|
-
case "connecting":
|
|
41
|
-
case "disconnected":
|
|
42
|
-
default:
|
|
43
|
-
statusNode.innerHTML = 'Waiting, press <span class="shortcut">' + refreshShortcut + "</span> in simulator to reload and connect.";
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
const linkNode = document.querySelector("link[rel=icon]");
|
|
47
|
-
if (status.type === "disconnected" || status.type === "error") {
|
|
48
|
-
linkNode.href = grayIcon;
|
|
49
|
-
} else {
|
|
50
|
-
if (visibilityState === "visible" || isPriorityMaintained) {
|
|
51
|
-
linkNode.href = blueIcon;
|
|
52
|
-
} else {
|
|
53
|
-
linkNode.href = orangeIcon;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
const darkCheckbox = document.getElementById("dark");
|
|
57
|
-
document.body.classList.toggle("dark", isDark);
|
|
58
|
-
darkCheckbox.checked = isDark;
|
|
59
|
-
localStorage.setItem("darkTheme", isDark ? "on" : "");
|
|
60
|
-
const maintainPriorityCheckbox = document.getElementById("maintain-priority");
|
|
61
|
-
maintainPriorityCheckbox.checked = isPriorityMaintained;
|
|
62
|
-
localStorage.setItem("maintainPriority", isPriorityMaintained ? "on" : "");
|
|
63
|
-
},
|
|
64
|
-
toggleDarkTheme() {
|
|
65
|
-
Page.setState({ isDark: !Page.state.isDark });
|
|
66
|
-
},
|
|
67
|
-
togglePriorityMaintenance() {
|
|
68
|
-
Page.setState({ isPriorityMaintained: !Page.state.isPriorityMaintained });
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
function connectToDebuggerProxy() {
|
|
72
|
-
const ws = new WebSocket(
|
|
73
|
-
"ws://" + window.location.host + "/debugger-proxy?role=debugger&name=Chrome"
|
|
74
|
-
);
|
|
75
|
-
let worker;
|
|
76
|
-
function createJSRuntime() {
|
|
77
|
-
worker = new DebuggerWorker();
|
|
78
|
-
worker.onmessage = function(message) {
|
|
79
|
-
ws.send(JSON.stringify(message.data));
|
|
80
|
-
};
|
|
81
|
-
window.onbeforeunload = function() {
|
|
82
|
-
return "If you reload this page, it is going to break the debugging session. Press " + refreshShortcut + " on the device to reload.";
|
|
83
|
-
};
|
|
84
|
-
updateVisibility();
|
|
85
|
-
}
|
|
86
|
-
function shutdownJSRuntime() {
|
|
87
|
-
if (worker) {
|
|
88
|
-
worker.terminate();
|
|
89
|
-
worker = null;
|
|
90
|
-
window.onbeforeunload = null;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
function updateVisibility() {
|
|
94
|
-
if (worker && !Page.state.isPriorityMaintained) {
|
|
95
|
-
worker.postMessage({
|
|
96
|
-
method: "setDebuggerVisibility",
|
|
97
|
-
visibilityState: document.visibilityState
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
Page.setState({ visibilityState: document.visibilityState });
|
|
101
|
-
}
|
|
102
|
-
ws.onopen = function() {
|
|
103
|
-
Page.setState({ status: { type: "connecting" } });
|
|
104
|
-
};
|
|
105
|
-
ws.onmessage = function(message) {
|
|
106
|
-
if (!message.data) {
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
const object = JSON.parse(message.data);
|
|
110
|
-
if (object.$event === "client-disconnected") {
|
|
111
|
-
shutdownJSRuntime();
|
|
112
|
-
Page.setState({ status: { type: "disconnected" } });
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
if (!object.method) {
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
if (object.method === "prepareJSRuntime") {
|
|
119
|
-
shutdownJSRuntime();
|
|
120
|
-
console.clear();
|
|
121
|
-
createJSRuntime();
|
|
122
|
-
ws.send(JSON.stringify({ replyID: object.id }));
|
|
123
|
-
Page.setState({ status: { type: "connected", id: object.id } });
|
|
124
|
-
} else if (object.method === "$disconnected") {
|
|
125
|
-
shutdownJSRuntime();
|
|
126
|
-
Page.setState({ status: { type: "disconnected" } });
|
|
127
|
-
} else {
|
|
128
|
-
worker.postMessage(object);
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
ws.onclose = function(error) {
|
|
132
|
-
shutdownJSRuntime();
|
|
133
|
-
Page.setState({ status: { type: "error", error } });
|
|
134
|
-
if (error.reason) {
|
|
135
|
-
console.warn(error.reason);
|
|
136
|
-
}
|
|
137
|
-
setTimeout(connectToDebuggerProxy, 500);
|
|
138
|
-
};
|
|
139
|
-
document.addEventListener("visibilitychange", updateVisibility, false);
|
|
140
|
-
}
|
|
141
|
-
connectToDebuggerProxy();
|
|
1
|
+
import"./index.css";import m from"./assets/blue-icon.png";import g from"./assets/gray-icon.png";import y from"./assets/orange-icon.png";import f from"./debuggerWorker.js";const c=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),d=c?"\u2318R":"Ctrl R";window.onload=function(){c||(document.getElementById("shortcut").innerHTML="Ctrl\u21E7J"),e.render()},window.onReloadClicked=function(){var t=new XMLHttpRequest;t.open("GET",`${window.location.origin}/reload`,!0),t.send()};const e=window.Page={state:{isDark:localStorage.getItem("darkTheme")===null?window.matchMedia("(prefers-color-scheme: dark)").matches:localStorage.getItem("darkTheme")==="on",isPriorityMaintained:localStorage.getItem("maintainPriority")==="on",status:{type:"disconnected"},visibilityState:document.visibilityState},setState(t){e.state=Object.assign({},e.state,t),e.render()},render(){const{isDark:t,isPriorityMaintained:n,status:s,visibilityState:r}=e.state,a=document.getElementById("status");switch(s.type){case"connected":a.innerHTML="Debugger session #"+s.id+" active.";break;case"error":a.innerHTML=s.error.reason||"Disconnected from proxy. Attempting reconnection. Is node server running?";break;case"connecting":case"disconnected":default:a.innerHTML='Waiting, press <span class="shortcut">'+d+"</span> in simulator to reload and connect.";break}const i=document.querySelector("link[rel=icon]");s.type==="disconnected"||s.type==="error"?i.href=g:r==="visible"||n?i.href=m:i.href=y;const o=document.getElementById("dark");document.body.classList.toggle("dark",t),o.checked=t,localStorage.setItem("darkTheme",t?"on":"");const u=document.getElementById("maintain-priority");u.checked=n,localStorage.setItem("maintainPriority",n?"on":"")},toggleDarkTheme(){e.setState({isDark:!e.state.isDark})},togglePriorityMaintenance(){e.setState({isPriorityMaintained:!e.state.isPriorityMaintained})}};function l(){const t=new WebSocket("ws://"+window.location.host+"/debugger-proxy?role=debugger&name=Chrome");let n;function s(){n=new f,n.onmessage=function(i){t.send(JSON.stringify(i.data))},window.onbeforeunload=function(){return"If you reload this page, it is going to break the debugging session. Press "+d+" on the device to reload."},a()}function r(){n&&(n.terminate(),n=null,window.onbeforeunload=null)}function a(){n&&!e.state.isPriorityMaintained&&n.postMessage({method:"setDebuggerVisibility",visibilityState:document.visibilityState}),e.setState({visibilityState:document.visibilityState})}t.onopen=function(){e.setState({status:{type:"connecting"}})},t.onmessage=function(i){if(!i.data)return;const o=JSON.parse(i.data);if(o.$event==="client-disconnected"){r(),e.setState({status:{type:"disconnected"}});return}o.method&&(o.method==="prepareJSRuntime"?(r(),console.clear(),s(),t.send(JSON.stringify({replyID:o.id})),e.setState({status:{type:"connected",id:o.id}})):o.method==="$disconnected"?(r(),e.setState({status:{type:"disconnected"}})):n.postMessage(o))},t.onclose=function(i){r(),e.setState({status:{type:"error",error:i}}),i.reason&&console.warn(i.reason),setTimeout(l,500)},document.addEventListener("visibilitychange",a,!1)}l();
|
|
142
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/vendor/debugger-app/src/index.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n/* eslint-env browser */\nimport './index.css';\nimport blueIcon from './assets/blue-icon.png';\nimport grayIcon from './assets/gray-icon.png';\nimport orangeIcon from './assets/orange-icon.png';\nimport DebuggerWorker from './debuggerWorker.js';\n\nconst isMacLike = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);\nconst refreshShortcut = isMacLike ? '\u2318R' : 'Ctrl R';\nwindow.onload = function () {\n if (!isMacLike) {\n document.getElementById('shortcut').innerHTML = 'Ctrl\u21E7J';\n }\n Page.render();\n};\n\nwindow.onReloadClicked = function () {\n var xhr = new XMLHttpRequest();\n xhr.open('GET', `${window.location.origin}/reload`, true);\n xhr.send();\n};\n\nconst Page = (window.Page = {\n state: {\n isDark:\n localStorage.getItem('darkTheme') === null\n ? window.matchMedia('(prefers-color-scheme: dark)').matches\n : localStorage.getItem('darkTheme') === 'on',\n isPriorityMaintained: localStorage.getItem('maintainPriority') === 'on',\n status: { type: 'disconnected' },\n visibilityState: document.visibilityState,\n },\n\n setState(partialState) {\n Page.state = Object.assign({}, Page.state, partialState);\n Page.render();\n },\n\n render() {\n const { isDark, isPriorityMaintained, status, visibilityState } =\n Page.state;\n\n const statusNode = document.getElementById('status');\n switch (status.type) {\n case 'connected':\n statusNode.innerHTML = 'Debugger session #' + status.id + ' active.';\n break;\n case 'error':\n statusNode.innerHTML =\n status.error.reason ||\n 'Disconnected from proxy. Attempting reconnection. Is node server running?';\n break;\n case 'connecting':\n case 'disconnected':\n // Fall through.\n default:\n statusNode.innerHTML =\n 'Waiting, press <span class=\"shortcut\">' +\n refreshShortcut +\n '</span> in simulator to reload and connect.';\n break;\n }\n\n const linkNode = document.querySelector('link[rel=icon]');\n if (status.type === 'disconnected' || status.type === 'error') {\n linkNode.href = grayIcon;\n } else {\n if (visibilityState === 'visible' || isPriorityMaintained) {\n linkNode.href = blueIcon;\n } else {\n linkNode.href = orangeIcon;\n }\n }\n\n const darkCheckbox = document.getElementById('dark');\n document.body.classList.toggle('dark', isDark);\n darkCheckbox.checked = isDark;\n localStorage.setItem('darkTheme', isDark ? 'on' : '');\n\n const maintainPriorityCheckbox =\n document.getElementById('maintain-priority');\n maintainPriorityCheckbox.checked = isPriorityMaintained;\n localStorage.setItem('maintainPriority', isPriorityMaintained ? 'on' : '');\n },\n\n toggleDarkTheme() {\n Page.setState({ isDark: !Page.state.isDark });\n },\n\n togglePriorityMaintenance() {\n Page.setState({ isPriorityMaintained: !Page.state.isPriorityMaintained });\n },\n});\n\nfunction connectToDebuggerProxy() {\n const ws = new WebSocket(\n 'ws://' + window.location.host + '/debugger-proxy?role=debugger&name=Chrome'\n );\n let worker;\n\n function createJSRuntime() {\n // This worker will run the application JavaScript code,\n // making sure that it's run in an environment without a global\n // document, to make it consistent with the JSC executor environment.\n worker = new DebuggerWorker();\n worker.onmessage = function (message) {\n ws.send(JSON.stringify(message.data));\n };\n window.onbeforeunload = function () {\n return (\n 'If you reload this page, it is going to break the debugging session. ' +\n 'Press ' +\n refreshShortcut +\n ' on the device to reload.'\n );\n };\n updateVisibility();\n }\n\n function shutdownJSRuntime() {\n if (worker) {\n worker.terminate();\n worker = null;\n window.onbeforeunload = null;\n }\n }\n\n function updateVisibility() {\n if (worker && !Page.state.isPriorityMaintained) {\n worker.postMessage({\n method: 'setDebuggerVisibility',\n visibilityState: document.visibilityState,\n });\n }\n Page.setState({ visibilityState: document.visibilityState });\n }\n\n ws.onopen = function () {\n Page.setState({ status: { type: 'connecting' } });\n };\n\n ws.onmessage = function (message) {\n if (!message.data) {\n return;\n }\n const object = JSON.parse(message.data);\n\n if (object.$event === 'client-disconnected') {\n shutdownJSRuntime();\n Page.setState({ status: { type: 'disconnected' } });\n return;\n }\n\n if (!object.method) {\n return;\n }\n\n // Special message that asks for a new JS runtime\n if (object.method === 'prepareJSRuntime') {\n shutdownJSRuntime();\n console.clear();\n createJSRuntime();\n ws.send(JSON.stringify({ replyID: object.id }));\n Page.setState({ status: { type: 'connected', id: object.id } });\n } else if (object.method === '$disconnected') {\n shutdownJSRuntime();\n Page.setState({ status: { type: 'disconnected' } });\n } else {\n worker.postMessage(object);\n }\n };\n\n ws.onclose = function (error) {\n shutdownJSRuntime();\n Page.setState({ status: { type: 'error', error } });\n if (error.reason) {\n console.warn(error.reason);\n }\n setTimeout(connectToDebuggerProxy, 500);\n };\n\n // Let debuggerWorker.js know when we're not visible so that we can warn about\n // poor performance when using remote debugging.\n document.addEventListener('visibilitychange', updateVisibility, false);\n}\n\nconnectToDebuggerProxy();\n"],
|
|
5
|
-
"mappings": "AASA,
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["blueIcon", "grayIcon", "orangeIcon", "DebuggerWorker", "isMacLike", "refreshShortcut", "Page", "xhr", "partialState", "isDark", "isPriorityMaintained", "status", "visibilityState", "statusNode", "linkNode", "darkCheckbox", "maintainPriorityCheckbox", "connectToDebuggerProxy", "ws", "worker", "createJSRuntime", "message", "updateVisibility", "shutdownJSRuntime", "object", "error"]
|
|
7
7
|
}
|