@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
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../src/vendor/repack/dev-server/src/plugins/multipart/multipartPlugin.ts"],
|
|
4
4
|
"sourcesContent": ["import type { IncomingHttpHeaders } from 'http'\nimport { PassThrough } from 'stream'\n\nimport type { FastifyInstance, FastifyReply } from 'fastify'\nimport fastifyPlugin from 'fastify-plugin'\n\nimport type { MultipartHandler } from './types'\n\n/**\n * Implementation is based on:\n * https://github.com/facebook/metro/blob/347b1d7ed87995d7951aaa9fd597c04b06013dac/packages/metro/src/Server/MultipartResponse.js\n */\n\nconst CRLF = '\\r\\n'\nconst BOUNDARY = '3beqjf3apnqeu3h5jqorms4i'\n\nasync function multipartPlugin(instance: FastifyInstance) {\n function asMultipart(this: FastifyReply): MultipartHandler | undefined {\n // We should check if is included in accept or if accept has multipart/* or */*,\n // but React Native will set accept to exactly `multipart/mixed`, so a simple check\n // will suffice.\n if (this.request.headers.accept !== 'multipart/mixed') {\n return undefined\n }\n\n const headers: IncomingHttpHeaders = {}\n const stream = new PassThrough()\n\n this.code(200)\n .header('Content-Type', `multipart/mixed; boundary=\"${BOUNDARY}\"`)\n .send(stream)\n\n function serializeHeaders(headers: IncomingHttpHeaders) {\n return Object.keys(headers)\n .map((key) => `${key}: ${headers[key]}`)\n .join(CRLF)\n }\n\n function writeChunk<T>(headers: IncomingHttpHeaders, data: T, isLast?: boolean) {\n let chunk = `${CRLF}--${BOUNDARY}${CRLF}`\n if (headers) {\n chunk += serializeHeaders(headers) + CRLF + CRLF\n }\n\n if (data) {\n chunk += data\n }\n\n if (isLast) {\n chunk += `${CRLF}--${BOUNDARY}--${CRLF}`\n }\n\n stream.write(chunk)\n }\n\n function setHeader(name: string, value: string | string[] | undefined) {\n headers[name] = value\n }\n\n function end<T>(data: T) {\n writeChunk(headers, data, true)\n stream.end()\n }\n\n return {\n writeChunk,\n setHeader,\n end,\n }\n }\n\n instance.decorateReply('asMultipart', asMultipart)\n}\n\nexport default fastifyPlugin(multipartPlugin, {\n name: 'multipart-plugin',\n})\n"],
|
|
5
|
-
"mappings": "AACA,
|
|
6
|
-
"names": ["headers"]
|
|
5
|
+
"mappings": "AACA,OAAS,eAAAA,MAAmB,SAG5B,OAAOC,MAAmB,iBAS1B,MAAMC,EAAO;AAAA,EACPC,EAAW,2BAEjB,eAAeC,EAAgBC,EAA2B,CACxD,SAASC,GAA8D,CAIrE,GAAI,KAAK,QAAQ,QAAQ,SAAW,kBAClC,OAGF,MAAMC,EAA+B,CAAC,EAChCC,EAAS,IAAIR,EAEnB,KAAK,KAAK,GAAG,EACV,OAAO,eAAgB,8BAA8BG,IAAW,EAChE,KAAKK,CAAM,EAEd,SAASC,EAAiBF,EAA8B,CACtD,OAAO,OAAO,KAAKA,CAAO,EACvB,IAAKG,GAAQ,GAAGA,MAAQH,EAAQG,CAAG,GAAG,EACtC,KAAKR,CAAI,CACd,CAEA,SAASS,EAAcJ,EAA8BK,EAASC,EAAkB,CAC9E,IAAIC,EAAQ,GAAGZ,MAASC,IAAWD,IAC/BK,IACFO,GAASL,EAAiBF,CAAO,EAAIL,EAAOA,GAG1CU,IACFE,GAASF,GAGPC,IACFC,GAAS,GAAGZ,MAASC,MAAaD,KAGpCM,EAAO,MAAMM,CAAK,CACpB,CAEA,SAASC,EAAUC,EAAcC,EAAsC,CACrEV,EAAQS,CAAI,EAAIC,CAClB,CAEA,SAASC,EAAON,EAAS,CACvBD,EAAWJ,EAASK,EAAM,EAAI,EAC9BJ,EAAO,IAAI,CACb,CAEA,MAAO,CACL,WAAAG,EACA,UAAAI,EACA,IAAAG,CACF,CACF,CAEAb,EAAS,cAAc,cAAeC,CAAW,CACnD,CAEA,IAAOa,EAAQlB,EAAcG,EAAiB,CAC5C,KAAM,kBACR,CAAC",
|
|
6
|
+
"names": ["PassThrough", "fastifyPlugin", "CRLF", "BOUNDARY", "multipartPlugin", "instance", "asMultipart", "headers", "stream", "serializeHeaders", "key", "writeChunk", "data", "isLast", "chunk", "setHeader", "name", "value", "end", "multipartPlugin_default"]
|
|
7
7
|
}
|
|
@@ -1,186 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { codeFrameColumns } from "@babel/code-frame";
|
|
3
|
-
import { SourceMapConsumer } from "source-map";
|
|
4
|
-
class Symbolicator {
|
|
5
|
-
/**
|
|
6
|
-
* Constructs new `Symbolicator` instance.
|
|
7
|
-
*
|
|
8
|
-
* @param delegate Delegate instance with symbolication functions.
|
|
9
|
-
*/
|
|
10
|
-
constructor(delegate) {
|
|
11
|
-
this.delegate = delegate;
|
|
12
|
-
/**
|
|
13
|
-
* Cache with initialized `SourceMapConsumer` to improve symbolication performance.
|
|
14
|
-
*/
|
|
15
|
-
this.sourceMapConsumerCache = {};
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Infer platform from stack frames.
|
|
19
|
-
* Usually at least one frame has `file` field with the bundle URL eg:
|
|
20
|
-
* `http://localhost:8081/index.bundle?platform=ios&...`, which can be used to infer platform.
|
|
21
|
-
*
|
|
22
|
-
* @param stack Array of stack frames.
|
|
23
|
-
* @returns Inferred platform or `undefined` if cannot infer.
|
|
24
|
-
*/
|
|
25
|
-
static inferPlatformFromStack(stack) {
|
|
26
|
-
for (const frame of stack) {
|
|
27
|
-
if (!frame.file) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const { searchParams, pathname } = new URL(frame.file, "file://");
|
|
31
|
-
const platform = searchParams.get("platform");
|
|
32
|
-
if (platform) {
|
|
33
|
-
return platform;
|
|
34
|
-
} else {
|
|
35
|
-
const [bundleFilename] = pathname.split("/").reverse();
|
|
36
|
-
const [, platformOrExtension, extension] = bundleFilename.split(".");
|
|
37
|
-
if (extension) {
|
|
38
|
-
return platformOrExtension;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Process raw React Native stack frames and transform them using Source Maps.
|
|
45
|
-
* Method will try to symbolicate as much data as possible, but if the Source Maps
|
|
46
|
-
* are not available, invalid or the original positions/data is not found in Source Maps,
|
|
47
|
-
* the method will return raw values - the same as supplied with `stack` parameter.
|
|
48
|
-
* For example out of 10 frames, it's possible that only first 7 will be symbolicated and the
|
|
49
|
-
* remaining 3 will be unchanged.
|
|
50
|
-
*
|
|
51
|
-
* @param logger Fastify logger instance.
|
|
52
|
-
* @param stack Raw stack frames.
|
|
53
|
-
* @returns Symbolicated stack frames.
|
|
54
|
-
*/
|
|
55
|
-
async process(logger, stack) {
|
|
56
|
-
logger.debug({ msg: "Filtering out unnecessary frames" });
|
|
57
|
-
const frames = [];
|
|
58
|
-
for (const frame of stack) {
|
|
59
|
-
const { file } = frame;
|
|
60
|
-
if ((file == null ? void 0 : file.startsWith("http")) && !file.includes("debuggerWorker")) {
|
|
61
|
-
frames.push(frame);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
try {
|
|
65
|
-
logger.debug({ msg: "Processing frames", frames });
|
|
66
|
-
const processedFrames = [];
|
|
67
|
-
for (const frame of frames) {
|
|
68
|
-
if (!this.sourceMapConsumerCache[frame.file]) {
|
|
69
|
-
logger.debug({
|
|
70
|
-
msg: "Loading raw source map data",
|
|
71
|
-
fileUrl: frame.file
|
|
72
|
-
});
|
|
73
|
-
const rawSourceMap = await this.delegate.getSourceMap(frame.file);
|
|
74
|
-
logger.debug({
|
|
75
|
-
msg: "Creating source map instance",
|
|
76
|
-
fileUrl: frame.file,
|
|
77
|
-
sourceMapLength: rawSourceMap.length
|
|
78
|
-
});
|
|
79
|
-
const sourceMapConsumer = await new SourceMapConsumer(rawSourceMap.toString());
|
|
80
|
-
logger.debug({
|
|
81
|
-
msg: "Saving source map instance into cache",
|
|
82
|
-
fileUrl: frame.file
|
|
83
|
-
});
|
|
84
|
-
this.sourceMapConsumerCache[frame.file] = sourceMapConsumer;
|
|
85
|
-
}
|
|
86
|
-
logger.debug({
|
|
87
|
-
msg: "Symbolicating frame",
|
|
88
|
-
frame
|
|
89
|
-
});
|
|
90
|
-
const processedFrame = this.processFrame(frame);
|
|
91
|
-
logger.debug({
|
|
92
|
-
msg: "Finished symbolicating frame",
|
|
93
|
-
frame
|
|
94
|
-
});
|
|
95
|
-
processedFrames.push(processedFrame);
|
|
96
|
-
}
|
|
97
|
-
const codeFrame = await this.getCodeFrame(logger, processedFrames) ?? null;
|
|
98
|
-
logger.debug({
|
|
99
|
-
msg: "Finished symbolicating frames",
|
|
100
|
-
processedFrames,
|
|
101
|
-
codeFrame
|
|
102
|
-
});
|
|
103
|
-
return {
|
|
104
|
-
stack: processedFrames,
|
|
105
|
-
codeFrame
|
|
106
|
-
};
|
|
107
|
-
} finally {
|
|
108
|
-
for (const key in this.sourceMapConsumerCache) {
|
|
109
|
-
this.sourceMapConsumerCache[key].destroy();
|
|
110
|
-
delete this.sourceMapConsumerCache[key];
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
processFrame(frame) {
|
|
115
|
-
if (!frame.lineNumber || !frame.column) {
|
|
116
|
-
return {
|
|
117
|
-
...frame,
|
|
118
|
-
collapse: false
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
const consumer = this.sourceMapConsumerCache[frame.file];
|
|
122
|
-
if (!consumer) {
|
|
123
|
-
return {
|
|
124
|
-
...frame,
|
|
125
|
-
collapse: false
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
const lookup = consumer.originalPositionFor({
|
|
129
|
-
line: frame.lineNumber,
|
|
130
|
-
column: frame.column
|
|
131
|
-
});
|
|
132
|
-
if (!lookup.source) {
|
|
133
|
-
return {
|
|
134
|
-
...frame,
|
|
135
|
-
collapse: false
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
return {
|
|
139
|
-
lineNumber: lookup.line || frame.lineNumber,
|
|
140
|
-
column: lookup.column || frame.column,
|
|
141
|
-
file: lookup.source,
|
|
142
|
-
methodName: lookup.name || frame.methodName,
|
|
143
|
-
collapse: false
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
async getCodeFrame(logger, processedFrames) {
|
|
147
|
-
for (const frame of processedFrames) {
|
|
148
|
-
if (frame.collapse || !frame.lineNumber || !frame.column) {
|
|
149
|
-
continue;
|
|
150
|
-
}
|
|
151
|
-
if (!this.delegate.shouldIncludeFrame(frame)) {
|
|
152
|
-
return void 0;
|
|
153
|
-
}
|
|
154
|
-
logger.debug({
|
|
155
|
-
msg: "Generating code frame",
|
|
156
|
-
frame
|
|
157
|
-
});
|
|
158
|
-
try {
|
|
159
|
-
return {
|
|
160
|
-
content: codeFrameColumns(
|
|
161
|
-
(await this.delegate.getSource(frame.file)).toString(),
|
|
162
|
-
{
|
|
163
|
-
start: { column: frame.column, line: frame.lineNumber }
|
|
164
|
-
},
|
|
165
|
-
{ forceColor: true }
|
|
166
|
-
),
|
|
167
|
-
location: {
|
|
168
|
-
row: frame.lineNumber,
|
|
169
|
-
column: frame.column
|
|
170
|
-
},
|
|
171
|
-
fileName: frame.file
|
|
172
|
-
};
|
|
173
|
-
} catch (error) {
|
|
174
|
-
logger.error({
|
|
175
|
-
msg: "Failed to create code frame",
|
|
176
|
-
error: error.message
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
return void 0;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
export {
|
|
184
|
-
Symbolicator
|
|
185
|
-
};
|
|
1
|
+
import{URL as m}from"url";import{codeFrameColumns as u}from"@babel/code-frame";import{SourceMapConsumer as l}from"source-map";class h{constructor(e){this.delegate=e;this.sourceMapConsumerCache={}}static inferPlatformFromStack(e){for(const s of e){if(!s.file)return;const{searchParams:r,pathname:t}=new m(s.file,"file://"),o=r.get("platform");if(o)return o;{const[a]=t.split("/").reverse(),[,c,n]=a.split(".");if(n)return c}}}async process(e,s){e.debug({msg:"Filtering out unnecessary frames"});const r=[];for(const t of s){const{file:o}=t;o!=null&&o.startsWith("http")&&!o.includes("debuggerWorker")&&r.push(t)}try{e.debug({msg:"Processing frames",frames:r});const t=[];for(const a of r){if(!this.sourceMapConsumerCache[a.file]){e.debug({msg:"Loading raw source map data",fileUrl:a.file});const n=await this.delegate.getSourceMap(a.file);e.debug({msg:"Creating source map instance",fileUrl:a.file,sourceMapLength:n.length});const i=await new l(n.toString());e.debug({msg:"Saving source map instance into cache",fileUrl:a.file}),this.sourceMapConsumerCache[a.file]=i}e.debug({msg:"Symbolicating frame",frame:a});const c=this.processFrame(a);e.debug({msg:"Finished symbolicating frame",frame:a}),t.push(c)}const o=await this.getCodeFrame(e,t)??null;return e.debug({msg:"Finished symbolicating frames",processedFrames:t,codeFrame:o}),{stack:t,codeFrame:o}}finally{for(const t in this.sourceMapConsumerCache)this.sourceMapConsumerCache[t].destroy(),delete this.sourceMapConsumerCache[t]}}processFrame(e){if(!e.lineNumber||!e.column)return{...e,collapse:!1};const s=this.sourceMapConsumerCache[e.file];if(!s)return{...e,collapse:!1};const r=s.originalPositionFor({line:e.lineNumber,column:e.column});return r.source?{lineNumber:r.line||e.lineNumber,column:r.column||e.column,file:r.source,methodName:r.name||e.methodName,collapse:!1}:{...e,collapse:!1}}async getCodeFrame(e,s){for(const r of s)if(!(r.collapse||!r.lineNumber||!r.column)){if(!this.delegate.shouldIncludeFrame(r))return;e.debug({msg:"Generating code frame",frame:r});try{return{content:u((await this.delegate.getSource(r.file)).toString(),{start:{column:r.column,line:r.lineNumber}},{forceColor:!0}),location:{row:r.lineNumber,column:r.column},fileName:r.file}}catch(t){e.error({msg:"Failed to create code frame",error:t.message})}return}}}export{h as Symbolicator};
|
|
186
2
|
//# sourceMappingURL=Symbolicator.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../src/vendor/repack/dev-server/src/plugins/symbolicate/Symbolicator.ts"],
|
|
4
4
|
"sourcesContent": ["import { URL } from 'url'\n\nimport { codeFrameColumns } from '@babel/code-frame'\nimport type { FastifyLoggerInstance } from 'fastify'\nimport { SourceMapConsumer } from 'source-map'\n\nimport type {\n CodeFrame,\n InputStackFrame,\n ReactNativeStackFrame,\n StackFrame,\n SymbolicatorDelegate,\n SymbolicatorResults,\n} from './types'\n\n/**\n * Class for transforming stack traces from React Native application with using Source Map.\n * Raw stack frames produced by React Native, points to some location from the bundle\n * eg `index.bundle?platform=ios:567:1234`. By using Source Map for that bundle `Symbolicator`\n * produces frames that point to source code inside your project eg `Hello.tsx:10:9`.\n */\nexport class Symbolicator {\n /**\n * Infer platform from stack frames.\n * Usually at least one frame has `file` field with the bundle URL eg:\n * `http://localhost:8081/index.bundle?platform=ios&...`, which can be used to infer platform.\n *\n * @param stack Array of stack frames.\n * @returns Inferred platform or `undefined` if cannot infer.\n */\n static inferPlatformFromStack(stack: ReactNativeStackFrame[]) {\n for (const frame of stack) {\n if (!frame.file) {\n return\n }\n\n const { searchParams, pathname } = new URL(frame.file, 'file://')\n const platform = searchParams.get('platform')\n if (platform) {\n return platform\n } else {\n const [bundleFilename] = pathname.split('/').reverse()\n const [, platformOrExtension, extension] = bundleFilename.split('.')\n if (extension) {\n return platformOrExtension\n }\n }\n }\n }\n\n /**\n * Cache with initialized `SourceMapConsumer` to improve symbolication performance.\n */\n sourceMapConsumerCache: Record<string, SourceMapConsumer> = {}\n\n /**\n * Constructs new `Symbolicator` instance.\n *\n * @param delegate Delegate instance with symbolication functions.\n */\n constructor(private delegate: SymbolicatorDelegate) {}\n\n /**\n * Process raw React Native stack frames and transform them using Source Maps.\n * Method will try to symbolicate as much data as possible, but if the Source Maps\n * are not available, invalid or the original positions/data is not found in Source Maps,\n * the method will return raw values - the same as supplied with `stack` parameter.\n * For example out of 10 frames, it's possible that only first 7 will be symbolicated and the\n * remaining 3 will be unchanged.\n *\n * @param logger Fastify logger instance.\n * @param stack Raw stack frames.\n * @returns Symbolicated stack frames.\n */\n async process(\n logger: FastifyLoggerInstance,\n stack: ReactNativeStackFrame[]\n ): Promise<SymbolicatorResults> {\n logger.debug({ msg: 'Filtering out unnecessary frames' })\n\n const frames: InputStackFrame[] = []\n for (const frame of stack) {\n const { file } = frame\n if (file?.startsWith('http') && !file.includes('debuggerWorker')) {\n frames.push(frame as InputStackFrame)\n }\n }\n\n try {\n logger.debug({ msg: 'Processing frames', frames })\n\n const processedFrames: StackFrame[] = []\n for (const frame of frames) {\n if (!this.sourceMapConsumerCache[frame.file]) {\n logger.debug({\n msg: 'Loading raw source map data',\n fileUrl: frame.file,\n })\n\n const rawSourceMap = await this.delegate.getSourceMap(frame.file)\n\n logger.debug({\n msg: 'Creating source map instance',\n fileUrl: frame.file,\n sourceMapLength: rawSourceMap.length,\n })\n const sourceMapConsumer = await new SourceMapConsumer(rawSourceMap.toString())\n\n logger.debug({\n msg: 'Saving source map instance into cache',\n fileUrl: frame.file,\n })\n this.sourceMapConsumerCache[frame.file] = sourceMapConsumer\n }\n\n logger.debug({\n msg: 'Symbolicating frame',\n frame,\n })\n const processedFrame = this.processFrame(frame)\n\n logger.debug({\n msg: 'Finished symbolicating frame',\n frame,\n })\n processedFrames.push(processedFrame)\n }\n\n const codeFrame = (await this.getCodeFrame(logger, processedFrames)) ?? null\n\n logger.debug({\n msg: 'Finished symbolicating frames',\n processedFrames,\n codeFrame,\n })\n\n return {\n stack: processedFrames,\n codeFrame,\n }\n } finally {\n for (const key in this.sourceMapConsumerCache) {\n this.sourceMapConsumerCache[key].destroy()\n delete this.sourceMapConsumerCache[key]\n }\n }\n }\n\n private processFrame(frame: InputStackFrame): StackFrame {\n if (!frame.lineNumber || !frame.column) {\n return {\n ...frame,\n collapse: false,\n }\n }\n\n const consumer = this.sourceMapConsumerCache[frame.file]\n if (!consumer) {\n return {\n ...frame,\n collapse: false,\n }\n }\n\n const lookup = consumer.originalPositionFor({\n line: frame.lineNumber,\n column: frame.column,\n })\n\n // If lookup fails, we get the same shape object, but with\n // all values set to null\n if (!lookup.source) {\n // It is better to gracefully return the original frame\n // than to throw an exception\n return {\n ...frame,\n collapse: false,\n }\n }\n\n return {\n lineNumber: lookup.line || frame.lineNumber,\n column: lookup.column || frame.column,\n file: lookup.source,\n methodName: lookup.name || frame.methodName,\n collapse: false,\n }\n }\n\n private async getCodeFrame(\n logger: FastifyLoggerInstance,\n processedFrames: StackFrame[]\n ): Promise<CodeFrame | undefined> {\n for (const frame of processedFrames) {\n if (frame.collapse || !frame.lineNumber || !frame.column) {\n continue\n }\n\n if (!this.delegate.shouldIncludeFrame(frame)) {\n return undefined\n }\n\n logger.debug({\n msg: 'Generating code frame',\n frame,\n })\n\n try {\n return {\n content: codeFrameColumns(\n (await this.delegate.getSource(frame.file)).toString(),\n {\n start: { column: frame.column, line: frame.lineNumber },\n },\n { forceColor: true }\n ),\n location: {\n row: frame.lineNumber,\n column: frame.column,\n },\n fileName: frame.file,\n }\n } catch (error) {\n logger.error({\n msg: 'Failed to create code frame',\n error: (error as Error).message,\n })\n }\n\n return undefined\n }\n }\n}\n"],
|
|
5
|
-
"mappings": "AAAA,
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "AAAA,OAAS,OAAAA,MAAW,MAEpB,OAAS,oBAAAC,MAAwB,oBAEjC,OAAS,qBAAAC,MAAyB,aAiB3B,MAAMC,CAAa,CAuCxB,YAAoBC,EAAgC,CAAhC,cAAAA,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ASL,GACN,MAAM,KAAK,SAAS,UAAUK,EAAM,IAAI,GAAG,SAAS,EACrD,CACE,MAAO,CAAE,OAAQA,EAAM,OAAQ,KAAMA,EAAM,UAAW,CACxD,EACA,CAAE,WAAY,EAAK,CACrB,EACA,SAAU,CACR,IAAKA,EAAM,WACX,OAAQA,EAAM,MAChB,EACA,SAAUA,EAAM,IAClB,CACF,OAASkB,EAAP,CACAX,EAAO,MAAM,CACX,IAAK,8BACL,MAAQW,EAAgB,OAC1B,CAAC,CACH,CAEA,OAEJ,CACF",
|
|
6
|
+
"names": ["URL", "codeFrameColumns", "SourceMapConsumer", "Symbolicator", "delegate", "stack", "frame", "searchParams", "pathname", "platform", "bundleFilename", "platformOrExtension", "extension", "logger", "frames", "file", "processedFrames", "rawSourceMap", "sourceMapConsumer", "processedFrame", "codeFrame", "key", "consumer", "lookup", "error"]
|
|
7
7
|
}
|
|
@@ -1,186 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { codeFrameColumns } from "@babel/code-frame";
|
|
3
|
-
import { SourceMapConsumer } from "source-map";
|
|
4
|
-
class Symbolicator {
|
|
5
|
-
/**
|
|
6
|
-
* Constructs new `Symbolicator` instance.
|
|
7
|
-
*
|
|
8
|
-
* @param delegate Delegate instance with symbolication functions.
|
|
9
|
-
*/
|
|
10
|
-
constructor(delegate) {
|
|
11
|
-
this.delegate = delegate;
|
|
12
|
-
/**
|
|
13
|
-
* Cache with initialized `SourceMapConsumer` to improve symbolication performance.
|
|
14
|
-
*/
|
|
15
|
-
this.sourceMapConsumerCache = {};
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Infer platform from stack frames.
|
|
19
|
-
* Usually at least one frame has `file` field with the bundle URL eg:
|
|
20
|
-
* `http://localhost:8081/index.bundle?platform=ios&...`, which can be used to infer platform.
|
|
21
|
-
*
|
|
22
|
-
* @param stack Array of stack frames.
|
|
23
|
-
* @returns Inferred platform or `undefined` if cannot infer.
|
|
24
|
-
*/
|
|
25
|
-
static inferPlatformFromStack(stack) {
|
|
26
|
-
for (const frame of stack) {
|
|
27
|
-
if (!frame.file) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const { searchParams, pathname } = new URL(frame.file, "file://");
|
|
31
|
-
const platform = searchParams.get("platform");
|
|
32
|
-
if (platform) {
|
|
33
|
-
return platform;
|
|
34
|
-
} else {
|
|
35
|
-
const [bundleFilename] = pathname.split("/").reverse();
|
|
36
|
-
const [, platformOrExtension, extension] = bundleFilename.split(".");
|
|
37
|
-
if (extension) {
|
|
38
|
-
return platformOrExtension;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Process raw React Native stack frames and transform them using Source Maps.
|
|
45
|
-
* Method will try to symbolicate as much data as possible, but if the Source Maps
|
|
46
|
-
* are not available, invalid or the original positions/data is not found in Source Maps,
|
|
47
|
-
* the method will return raw values - the same as supplied with `stack` parameter.
|
|
48
|
-
* For example out of 10 frames, it's possible that only first 7 will be symbolicated and the
|
|
49
|
-
* remaining 3 will be unchanged.
|
|
50
|
-
*
|
|
51
|
-
* @param logger Fastify logger instance.
|
|
52
|
-
* @param stack Raw stack frames.
|
|
53
|
-
* @returns Symbolicated stack frames.
|
|
54
|
-
*/
|
|
55
|
-
async process(logger, stack) {
|
|
56
|
-
logger.debug({ msg: "Filtering out unnecessary frames" });
|
|
57
|
-
const frames = [];
|
|
58
|
-
for (const frame of stack) {
|
|
59
|
-
const { file } = frame;
|
|
60
|
-
if ((file == null ? void 0 : file.startsWith("http")) && !file.includes("debuggerWorker")) {
|
|
61
|
-
frames.push(frame);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
try {
|
|
65
|
-
logger.debug({ msg: "Processing frames", frames });
|
|
66
|
-
const processedFrames = [];
|
|
67
|
-
for (const frame of frames) {
|
|
68
|
-
if (!this.sourceMapConsumerCache[frame.file]) {
|
|
69
|
-
logger.debug({
|
|
70
|
-
msg: "Loading raw source map data",
|
|
71
|
-
fileUrl: frame.file
|
|
72
|
-
});
|
|
73
|
-
const rawSourceMap = await this.delegate.getSourceMap(frame.file);
|
|
74
|
-
logger.debug({
|
|
75
|
-
msg: "Creating source map instance",
|
|
76
|
-
fileUrl: frame.file,
|
|
77
|
-
sourceMapLength: rawSourceMap.length
|
|
78
|
-
});
|
|
79
|
-
const sourceMapConsumer = await new SourceMapConsumer(rawSourceMap.toString());
|
|
80
|
-
logger.debug({
|
|
81
|
-
msg: "Saving source map instance into cache",
|
|
82
|
-
fileUrl: frame.file
|
|
83
|
-
});
|
|
84
|
-
this.sourceMapConsumerCache[frame.file] = sourceMapConsumer;
|
|
85
|
-
}
|
|
86
|
-
logger.debug({
|
|
87
|
-
msg: "Symbolicating frame",
|
|
88
|
-
frame
|
|
89
|
-
});
|
|
90
|
-
const processedFrame = this.processFrame(frame);
|
|
91
|
-
logger.debug({
|
|
92
|
-
msg: "Finished symbolicating frame",
|
|
93
|
-
frame
|
|
94
|
-
});
|
|
95
|
-
processedFrames.push(processedFrame);
|
|
96
|
-
}
|
|
97
|
-
const codeFrame = await this.getCodeFrame(logger, processedFrames) ?? null;
|
|
98
|
-
logger.debug({
|
|
99
|
-
msg: "Finished symbolicating frames",
|
|
100
|
-
processedFrames,
|
|
101
|
-
codeFrame
|
|
102
|
-
});
|
|
103
|
-
return {
|
|
104
|
-
stack: processedFrames,
|
|
105
|
-
codeFrame
|
|
106
|
-
};
|
|
107
|
-
} finally {
|
|
108
|
-
for (const key in this.sourceMapConsumerCache) {
|
|
109
|
-
this.sourceMapConsumerCache[key].destroy();
|
|
110
|
-
delete this.sourceMapConsumerCache[key];
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
processFrame(frame) {
|
|
115
|
-
if (!frame.lineNumber || !frame.column) {
|
|
116
|
-
return {
|
|
117
|
-
...frame,
|
|
118
|
-
collapse: false
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
const consumer = this.sourceMapConsumerCache[frame.file];
|
|
122
|
-
if (!consumer) {
|
|
123
|
-
return {
|
|
124
|
-
...frame,
|
|
125
|
-
collapse: false
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
const lookup = consumer.originalPositionFor({
|
|
129
|
-
line: frame.lineNumber,
|
|
130
|
-
column: frame.column
|
|
131
|
-
});
|
|
132
|
-
if (!lookup.source) {
|
|
133
|
-
return {
|
|
134
|
-
...frame,
|
|
135
|
-
collapse: false
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
return {
|
|
139
|
-
lineNumber: lookup.line || frame.lineNumber,
|
|
140
|
-
column: lookup.column || frame.column,
|
|
141
|
-
file: lookup.source,
|
|
142
|
-
methodName: lookup.name || frame.methodName,
|
|
143
|
-
collapse: false
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
async getCodeFrame(logger, processedFrames) {
|
|
147
|
-
for (const frame of processedFrames) {
|
|
148
|
-
if (frame.collapse || !frame.lineNumber || !frame.column) {
|
|
149
|
-
continue;
|
|
150
|
-
}
|
|
151
|
-
if (!this.delegate.shouldIncludeFrame(frame)) {
|
|
152
|
-
return void 0;
|
|
153
|
-
}
|
|
154
|
-
logger.debug({
|
|
155
|
-
msg: "Generating code frame",
|
|
156
|
-
frame
|
|
157
|
-
});
|
|
158
|
-
try {
|
|
159
|
-
return {
|
|
160
|
-
content: codeFrameColumns(
|
|
161
|
-
(await this.delegate.getSource(frame.file)).toString(),
|
|
162
|
-
{
|
|
163
|
-
start: { column: frame.column, line: frame.lineNumber }
|
|
164
|
-
},
|
|
165
|
-
{ forceColor: true }
|
|
166
|
-
),
|
|
167
|
-
location: {
|
|
168
|
-
row: frame.lineNumber,
|
|
169
|
-
column: frame.column
|
|
170
|
-
},
|
|
171
|
-
fileName: frame.file
|
|
172
|
-
};
|
|
173
|
-
} catch (error) {
|
|
174
|
-
logger.error({
|
|
175
|
-
msg: "Failed to create code frame",
|
|
176
|
-
error: error.message
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
return void 0;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
export {
|
|
184
|
-
Symbolicator
|
|
185
|
-
};
|
|
1
|
+
import{URL as m}from"url";import{codeFrameColumns as u}from"@babel/code-frame";import{SourceMapConsumer as l}from"source-map";class h{constructor(e){this.delegate=e;this.sourceMapConsumerCache={}}static inferPlatformFromStack(e){for(const s of e){if(!s.file)return;const{searchParams:r,pathname:t}=new m(s.file,"file://"),o=r.get("platform");if(o)return o;{const[a]=t.split("/").reverse(),[,c,n]=a.split(".");if(n)return c}}}async process(e,s){e.debug({msg:"Filtering out unnecessary frames"});const r=[];for(const t of s){const{file:o}=t;o!=null&&o.startsWith("http")&&!o.includes("debuggerWorker")&&r.push(t)}try{e.debug({msg:"Processing frames",frames:r});const t=[];for(const a of r){if(!this.sourceMapConsumerCache[a.file]){e.debug({msg:"Loading raw source map data",fileUrl:a.file});const n=await this.delegate.getSourceMap(a.file);e.debug({msg:"Creating source map instance",fileUrl:a.file,sourceMapLength:n.length});const i=await new l(n.toString());e.debug({msg:"Saving source map instance into cache",fileUrl:a.file}),this.sourceMapConsumerCache[a.file]=i}e.debug({msg:"Symbolicating frame",frame:a});const c=this.processFrame(a);e.debug({msg:"Finished symbolicating frame",frame:a}),t.push(c)}const o=await this.getCodeFrame(e,t)??null;return e.debug({msg:"Finished symbolicating frames",processedFrames:t,codeFrame:o}),{stack:t,codeFrame:o}}finally{for(const t in this.sourceMapConsumerCache)this.sourceMapConsumerCache[t].destroy(),delete this.sourceMapConsumerCache[t]}}processFrame(e){if(!e.lineNumber||!e.column)return{...e,collapse:!1};const s=this.sourceMapConsumerCache[e.file];if(!s)return{...e,collapse:!1};const r=s.originalPositionFor({line:e.lineNumber,column:e.column});return r.source?{lineNumber:r.line||e.lineNumber,column:r.column||e.column,file:r.source,methodName:r.name||e.methodName,collapse:!1}:{...e,collapse:!1}}async getCodeFrame(e,s){for(const r of s)if(!(r.collapse||!r.lineNumber||!r.column)){if(!this.delegate.shouldIncludeFrame(r))return;e.debug({msg:"Generating code frame",frame:r});try{return{content:u((await this.delegate.getSource(r.file)).toString(),{start:{column:r.column,line:r.lineNumber}},{forceColor:!0}),location:{row:r.lineNumber,column:r.column},fileName:r.file}}catch(t){e.error({msg:"Failed to create code frame",error:t.message})}return}}}export{h as Symbolicator};
|
|
186
2
|
//# sourceMappingURL=Symbolicator.mjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../src/vendor/repack/dev-server/src/plugins/symbolicate/Symbolicator.ts"],
|
|
4
4
|
"sourcesContent": ["import { URL } from 'url'\n\nimport { codeFrameColumns } from '@babel/code-frame'\nimport type { FastifyLoggerInstance } from 'fastify'\nimport { SourceMapConsumer } from 'source-map'\n\nimport type {\n CodeFrame,\n InputStackFrame,\n ReactNativeStackFrame,\n StackFrame,\n SymbolicatorDelegate,\n SymbolicatorResults,\n} from './types'\n\n/**\n * Class for transforming stack traces from React Native application with using Source Map.\n * Raw stack frames produced by React Native, points to some location from the bundle\n * eg `index.bundle?platform=ios:567:1234`. By using Source Map for that bundle `Symbolicator`\n * produces frames that point to source code inside your project eg `Hello.tsx:10:9`.\n */\nexport class Symbolicator {\n /**\n * Infer platform from stack frames.\n * Usually at least one frame has `file` field with the bundle URL eg:\n * `http://localhost:8081/index.bundle?platform=ios&...`, which can be used to infer platform.\n *\n * @param stack Array of stack frames.\n * @returns Inferred platform or `undefined` if cannot infer.\n */\n static inferPlatformFromStack(stack: ReactNativeStackFrame[]) {\n for (const frame of stack) {\n if (!frame.file) {\n return\n }\n\n const { searchParams, pathname } = new URL(frame.file, 'file://')\n const platform = searchParams.get('platform')\n if (platform) {\n return platform\n } else {\n const [bundleFilename] = pathname.split('/').reverse()\n const [, platformOrExtension, extension] = bundleFilename.split('.')\n if (extension) {\n return platformOrExtension\n }\n }\n }\n }\n\n /**\n * Cache with initialized `SourceMapConsumer` to improve symbolication performance.\n */\n sourceMapConsumerCache: Record<string, SourceMapConsumer> = {}\n\n /**\n * Constructs new `Symbolicator` instance.\n *\n * @param delegate Delegate instance with symbolication functions.\n */\n constructor(private delegate: SymbolicatorDelegate) {}\n\n /**\n * Process raw React Native stack frames and transform them using Source Maps.\n * Method will try to symbolicate as much data as possible, but if the Source Maps\n * are not available, invalid or the original positions/data is not found in Source Maps,\n * the method will return raw values - the same as supplied with `stack` parameter.\n * For example out of 10 frames, it's possible that only first 7 will be symbolicated and the\n * remaining 3 will be unchanged.\n *\n * @param logger Fastify logger instance.\n * @param stack Raw stack frames.\n * @returns Symbolicated stack frames.\n */\n async process(\n logger: FastifyLoggerInstance,\n stack: ReactNativeStackFrame[]\n ): Promise<SymbolicatorResults> {\n logger.debug({ msg: 'Filtering out unnecessary frames' })\n\n const frames: InputStackFrame[] = []\n for (const frame of stack) {\n const { file } = frame\n if (file?.startsWith('http') && !file.includes('debuggerWorker')) {\n frames.push(frame as InputStackFrame)\n }\n }\n\n try {\n logger.debug({ msg: 'Processing frames', frames })\n\n const processedFrames: StackFrame[] = []\n for (const frame of frames) {\n if (!this.sourceMapConsumerCache[frame.file]) {\n logger.debug({\n msg: 'Loading raw source map data',\n fileUrl: frame.file,\n })\n\n const rawSourceMap = await this.delegate.getSourceMap(frame.file)\n\n logger.debug({\n msg: 'Creating source map instance',\n fileUrl: frame.file,\n sourceMapLength: rawSourceMap.length,\n })\n const sourceMapConsumer = await new SourceMapConsumer(rawSourceMap.toString())\n\n logger.debug({\n msg: 'Saving source map instance into cache',\n fileUrl: frame.file,\n })\n this.sourceMapConsumerCache[frame.file] = sourceMapConsumer\n }\n\n logger.debug({\n msg: 'Symbolicating frame',\n frame,\n })\n const processedFrame = this.processFrame(frame)\n\n logger.debug({\n msg: 'Finished symbolicating frame',\n frame,\n })\n processedFrames.push(processedFrame)\n }\n\n const codeFrame = (await this.getCodeFrame(logger, processedFrames)) ?? null\n\n logger.debug({\n msg: 'Finished symbolicating frames',\n processedFrames,\n codeFrame,\n })\n\n return {\n stack: processedFrames,\n codeFrame,\n }\n } finally {\n for (const key in this.sourceMapConsumerCache) {\n this.sourceMapConsumerCache[key].destroy()\n delete this.sourceMapConsumerCache[key]\n }\n }\n }\n\n private processFrame(frame: InputStackFrame): StackFrame {\n if (!frame.lineNumber || !frame.column) {\n return {\n ...frame,\n collapse: false,\n }\n }\n\n const consumer = this.sourceMapConsumerCache[frame.file]\n if (!consumer) {\n return {\n ...frame,\n collapse: false,\n }\n }\n\n const lookup = consumer.originalPositionFor({\n line: frame.lineNumber,\n column: frame.column,\n })\n\n // If lookup fails, we get the same shape object, but with\n // all values set to null\n if (!lookup.source) {\n // It is better to gracefully return the original frame\n // than to throw an exception\n return {\n ...frame,\n collapse: false,\n }\n }\n\n return {\n lineNumber: lookup.line || frame.lineNumber,\n column: lookup.column || frame.column,\n file: lookup.source,\n methodName: lookup.name || frame.methodName,\n collapse: false,\n }\n }\n\n private async getCodeFrame(\n logger: FastifyLoggerInstance,\n processedFrames: StackFrame[]\n ): Promise<CodeFrame | undefined> {\n for (const frame of processedFrames) {\n if (frame.collapse || !frame.lineNumber || !frame.column) {\n continue\n }\n\n if (!this.delegate.shouldIncludeFrame(frame)) {\n return undefined\n }\n\n logger.debug({\n msg: 'Generating code frame',\n frame,\n })\n\n try {\n return {\n content: codeFrameColumns(\n (await this.delegate.getSource(frame.file)).toString(),\n {\n start: { column: frame.column, line: frame.lineNumber },\n },\n { forceColor: true }\n ),\n location: {\n row: frame.lineNumber,\n column: frame.column,\n },\n fileName: frame.file,\n }\n } catch (error) {\n logger.error({\n msg: 'Failed to create code frame',\n error: (error as Error).message,\n })\n }\n\n return undefined\n }\n }\n}\n"],
|
|
5
|
-
"mappings": "AAAA,
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "AAAA,OAAS,OAAAA,MAAW,MAEpB,OAAS,oBAAAC,MAAwB,oBAEjC,OAAS,qBAAAC,MAAyB,aAiB3B,MAA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,MAAAP,CACF,CAAC,EAED,GAAI,CACF,MAAO,CACL,QAASL,GACN,MAAM,KAAK,SAAS,UAAUK,EAAM,IAAI,GAAG,SAAS,EACrD,CACE,MAAO,CAAE,OAAQA,EAAM,OAAQ,KAAMA,EAAM,UAAW,CACxD,EACA,CAAE,WAAY,EAAK,CACrB,EACA,SAAU,CACR,IAAKA,EAAM,WACX,OAAQA,EAAM,MAChB,EACA,SAAUA,EAAM,IAClB,CACF,OAASkB,EAAP,CACAX,EAAO,MAAM,CACX,IAAK,8BACL,MAAQW,EAAgB,OAC1B,CAAC,CACH,CAEA,OAEJ,CACF",
|
|
6
|
+
"names": ["URL", "codeFrameColumns", "SourceMapConsumer", "Symbolicator", "delegate", "stack", "frame", "searchParams", "pathname", "platform", "bundleFilename", "platformOrExtension", "extension", "logger", "frames", "file", "processedFrames", "rawSourceMap", "sourceMapConsumer", "processedFrame", "codeFrame", "key", "consumer", "lookup", "error"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
export * from "./Symbolicator";
|
|
3
|
-
export * from "./types";
|
|
4
|
-
export {
|
|
5
|
-
default2 as default
|
|
6
|
-
};
|
|
1
|
+
import{default as e}from"./sybmolicatePlugin";export*from"./Symbolicator";export*from"./types";export{e as default};
|
|
7
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../src/vendor/repack/dev-server/src/plugins/symbolicate/index.ts"],
|
|
4
4
|
"sourcesContent": ["export { default } from './sybmolicatePlugin'\nexport * from './Symbolicator'\nexport * from './types'\n"],
|
|
5
|
-
"mappings": "AAAA,
|
|
5
|
+
"mappings": "AAAA,OAAS,WAAAA,MAAe,sBACxB,WAAc,iBACd,WAAc",
|
|
6
6
|
"names": ["default"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
export * from "./Symbolicator";
|
|
3
|
-
export * from "./types";
|
|
4
|
-
export {
|
|
5
|
-
default2 as default
|
|
6
|
-
};
|
|
1
|
+
import{default as e}from"./sybmolicatePlugin";export*from"./Symbolicator";export*from"./types";export{e as default};
|
|
7
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../src/vendor/repack/dev-server/src/plugins/symbolicate/index.ts"],
|
|
4
4
|
"sourcesContent": ["export { default } from './sybmolicatePlugin'\nexport * from './Symbolicator'\nexport * from './types'\n"],
|
|
5
|
-
"mappings": "AAAA,
|
|
5
|
+
"mappings": "AAAA,OAAS,WAAAA,MAAe,sBACxB,WAAc,iBACd,WAAc",
|
|
6
6
|
"names": ["default"]
|
|
7
7
|
}
|
|
@@ -1,35 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Symbolicator } from "./Symbolicator";
|
|
3
|
-
async function symbolicatePlugin(instance, {
|
|
4
|
-
delegate
|
|
5
|
-
}) {
|
|
6
|
-
const symbolicator = new Symbolicator(delegate.symbolicator);
|
|
7
|
-
instance.post("/symbolicate", async (request, reply) => {
|
|
8
|
-
try {
|
|
9
|
-
const { stack } = JSON.parse(request.body);
|
|
10
|
-
const platform = Symbolicator.inferPlatformFromStack(stack);
|
|
11
|
-
if (!platform) {
|
|
12
|
-
request.log.debug({ msg: "Received stack", stack });
|
|
13
|
-
reply.badRequest("Cannot infer platform from stack trace");
|
|
14
|
-
} else {
|
|
15
|
-
request.log.debug({ msg: "Starting symbolication", platform, stack });
|
|
16
|
-
const results = await symbolicator.process(request.log, stack);
|
|
17
|
-
reply.send(results);
|
|
18
|
-
}
|
|
19
|
-
} catch (error) {
|
|
20
|
-
request.log.error({
|
|
21
|
-
msg: "Failed to symbolicate",
|
|
22
|
-
error: error.message
|
|
23
|
-
});
|
|
24
|
-
reply.internalServerError();
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
var sybmolicatePlugin_default = fastifyPlugin(symbolicatePlugin, {
|
|
29
|
-
name: "symbolicate-plugin",
|
|
30
|
-
dependencies: ["fastify-sensible"]
|
|
31
|
-
});
|
|
32
|
-
export {
|
|
33
|
-
sybmolicatePlugin_default as default
|
|
34
|
-
};
|
|
1
|
+
import n from"fastify-plugin";import{Symbolicator as r}from"./Symbolicator";async function l(s,{delegate:i}){const c=new r(i.symbolicator);s.post("/symbolicate",async(e,a)=>{try{const{stack:t}=JSON.parse(e.body),o=r.inferPlatformFromStack(t);if(!o)e.log.debug({msg:"Received stack",stack:t}),a.badRequest("Cannot infer platform from stack trace");else{e.log.debug({msg:"Starting symbolication",platform:o,stack:t});const m=await c.process(e.log,t);a.send(m)}}catch(t){e.log.error({msg:"Failed to symbolicate",error:t.message}),a.internalServerError()}})}var g=n(l,{name:"symbolicate-plugin",dependencies:["fastify-sensible"]});export{g as default};
|
|
35
2
|
//# sourceMappingURL=sybmolicatePlugin.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../src/vendor/repack/dev-server/src/plugins/symbolicate/sybmolicatePlugin.ts"],
|
|
4
4
|
"sourcesContent": ["import type { FastifyInstance } from 'fastify'\nimport fastifyPlugin from 'fastify-plugin'\n\nimport type { Server } from '../../types'\nimport { Symbolicator } from './Symbolicator'\nimport type { ReactNativeStackFrame } from './types'\n\nasync function symbolicatePlugin(\n instance: FastifyInstance,\n {\n delegate,\n }: {\n delegate: Server.Delegate\n }\n) {\n const symbolicator = new Symbolicator(delegate.symbolicator)\n\n instance.post('/symbolicate', async (request, reply) => {\n // React Native sends stack as JSON but tests content-type to text/plain, so\n // we cannot use JSON schema to validate the body.\n\n try {\n const { stack } = JSON.parse(request.body as string) as {\n stack: ReactNativeStackFrame[]\n }\n const platform = Symbolicator.inferPlatformFromStack(stack)\n if (!platform) {\n request.log.debug({ msg: 'Received stack', stack })\n reply.badRequest('Cannot infer platform from stack trace')\n } else {\n request.log.debug({ msg: 'Starting symbolication', platform, stack })\n const results = await symbolicator.process(request.log, stack)\n reply.send(results)\n }\n } catch (error) {\n request.log.error({\n msg: 'Failed to symbolicate',\n error: (error as Error).message,\n })\n reply.internalServerError()\n }\n })\n}\n\nexport default fastifyPlugin(symbolicatePlugin, {\n name: 'symbolicate-plugin',\n dependencies: ['fastify-sensible'],\n})\n"],
|
|
5
|
-
"mappings": "AACA,
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "AACA,OAAOA,MAAmB,iBAG1B,OAAS,gBAAAC,MAAoB,iBAG7B,eAAeC,EACbC,EACA,CACE,SAAAC,CACF,EAGA,CACA,MAAMC,EAAe,IAAIJ,EAAaG,EAAS,YAAY,EAE3DD,EAAS,KAAK,eAAgB,MAAOG,EAASC,IAAU,CAItD,GAAI,CACF,KAAM,CAAE,MAAAC,CAAM,EAAI,KAAK,MAAMF,EAAQ,IAAc,EAG7CG,EAAWR,EAAa,uBAAuBO,CAAK,EAC1D,GAAI,CAACC,EACHH,EAAQ,IAAI,MAAM,CAAE,IAAK,iBAAkB,MAAAE,CAAM,CAAC,EAClDD,EAAM,WAAW,wCAAwC,MACpD,CACLD,EAAQ,IAAI,MAAM,CAAE,IAAK,yBAA0B,SAAAG,EAAU,MAAAD,CAAM,CAAC,EACpE,MAAME,EAAU,MAAML,EAAa,QAAQC,EAAQ,IAAKE,CAAK,EAC7DD,EAAM,KAAKG,CAAO,CACpB,CACF,OAASC,EAAP,CACAL,EAAQ,IAAI,MAAM,CAChB,IAAK,wBACL,MAAQK,EAAgB,OAC1B,CAAC,EACDJ,EAAM,oBAAoB,CAC5B,CACF,CAAC,CACH,CAEA,IAAOK,EAAQZ,EAAcE,EAAmB,CAC9C,KAAM,qBACN,aAAc,CAAC,kBAAkB,CACnC,CAAC",
|
|
6
|
+
"names": ["fastifyPlugin", "Symbolicator", "symbolicatePlugin", "instance", "delegate", "symbolicator", "request", "reply", "stack", "platform", "results", "error", "sybmolicatePlugin_default"]
|
|
7
7
|
}
|