@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,37 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var types_exports = {};
|
|
20
|
-
__export(types_exports, {
|
|
21
|
-
Internal: () => Internal
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(types_exports);
|
|
24
|
-
var Internal;
|
|
25
|
-
((Internal2) => {
|
|
26
|
-
let EventTypes;
|
|
27
|
-
((EventTypes2) => {
|
|
28
|
-
EventTypes2["BuildStart"] = "BuildStart";
|
|
29
|
-
EventTypes2["BuildEnd"] = "BuildEnd";
|
|
30
|
-
EventTypes2["HmrEvent"] = "HmrEvent";
|
|
31
|
-
})(EventTypes = Internal2.EventTypes || (Internal2.EventTypes = {}));
|
|
32
|
-
})(Internal || (Internal = {}));
|
|
33
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
-
0 && (module.exports = {
|
|
35
|
-
Internal
|
|
36
|
-
});
|
|
1
|
+
"use strict";var i=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},c=(t,e,o,g)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of l(e))!m.call(t,r)&&r!==o&&i(t,r,{get:()=>e[r],enumerable:!(g=n(e,r))||g.enumerable});return t};var f=t=>c(i({},"__esModule",{value:!0}),t);var d={};p(d,{Internal:()=>s});module.exports=f(d);var s;(e=>{let t;(a=>(a.BuildStart="BuildStart",a.BuildEnd="BuildEnd",a.HmrEvent="HmrEvent"))(t=e.EventTypes||(e.EventTypes={}))})(s||(s={}));0&&(module.exports={Internal});
|
|
37
2
|
//# sourceMappingURL=types.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/vendor/repack/dev-server/src/types.ts"],
|
|
4
4
|
"sourcesContent": ["import { FastifyLoggerInstance } from 'fastify'\n\nimport type { CompilerDelegate } from './plugins/compiler'\nimport type { SymbolicatorDelegate } from './plugins/symbolicate'\nimport type { HmrDelegate } from './plugins/wss'\n\nexport type { CompilerDelegate } from './plugins/compiler'\nexport type {\n SymbolicatorDelegate,\n ReactNativeStackFrame,\n InputStackFrame,\n StackFrame,\n CodeFrame,\n SymbolicatorResults,\n} from './plugins/symbolicate'\nexport type { HmrDelegate } from './plugins/wss'\n\nexport namespace Server {\n /** Development server configuration. */\n export interface Config {\n /** Development server options to configure e.g: `port`, `host` etc. */\n options: Options\n\n /** Function to create a delegate, which implements crucial functionalities. */\n delegate: (context: DelegateContext) => Delegate\n }\n\n /** Development server options. */\n export interface Options {\n /** Root directory of the project. */\n rootDir: string\n\n /** Port under which to run the development server. */\n port: number\n\n /**\n * Hostname or IP address under which to run the development server.\n * When left unspecified, it will listen on all available network interfaces, similarly to listening on '0.0.0.0'.\n */\n host?: string\n\n /** Options for running the server as HTTPS. If `undefined`, the server will run as HTTP. */\n https?: {\n /** Path to certificate when running server as HTTPS. */\n cert?: string\n\n /** Path to certificate key when running server as HTTPS. */\n key?: string\n }\n }\n\n /**\n * A complete delegate with implementations for all server functionalities.\n */\n export interface Delegate {\n /** A compiler delegate. */\n compiler: CompilerDelegate\n\n /** A symbolicator delegate. */\n symbolicator: SymbolicatorDelegate\n\n /** A logger delegate. */\n logger: LoggerDelegate\n\n /** An HMR delegate. */\n hmr: HmrDelegate\n\n /** An messages delegate. */\n messages: MessagesDelegate\n\n /** An API delegate. */\n api?: Api.Delegate\n }\n\n /**\n * A delegate context used in `delegate` builder in {@link Config}.\n *\n * Allows to emit logs, notify about compilation events and broadcast events to connected clients.\n */\n export interface DelegateContext {\n /** A logger instance, useful for emitting logs from the delegate. */\n log: FastifyLoggerInstance\n\n /** Send notification about compilation start for given `platform`. */\n notifyBuildStart: (platform: string) => void\n\n /** Send notification about compilation end for given `platform`. */\n notifyBuildEnd: (platform: string) => void\n\n /**\n * Broadcast arbitrary event to all connected HMR clients for given `platform`.\n *\n * @param event Arbitrary event to broadcast.\n * @param platform Platform of the clients to which broadcast should be sent.\n * @param clientIds Ids of the client to which broadcast should be sent.\n * If `undefined` the broadcast will be sent to all connected clients for the given `platform`.\n */\n broadcastToHmrClients: <E = any>(\n event: E,\n platform: string,\n clientIds?: string[]\n ) => void\n\n /**\n * Broadcast arbitrary method-like event to all connected message clients.\n *\n * @param event Arbitrary method-like event to broadcast.\n */\n broadcastToMessageClients: <\n E extends { method: string; params?: Record<string, any> }\n >(\n event: E\n ) => void\n }\n\n /**\n * Delegate with implementation for logging functions.\n */\n export interface LoggerDelegate {\n /**\n * Callback for when a new log is emitted.\n *\n * @param log An object with log data.\n */\n onMessage: (log: any) => void\n }\n\n /**\n * Delegate with implementation for messages used in route handlers.\n */\n export interface MessagesDelegate {\n /** Get message to send as a reply for `GET /` route. */\n getHello: () => Object\n\n /** Get message to send as a reply for `GET /status` route. */\n getStatus: () => string\n }\n\n export namespace Api {\n /** A compilation asset representation for API clients. */\n export interface Asset {\n name: string\n size: number\n [key: string]: any\n }\n\n /** A compilation stats representation for API clients. */\n export interface CompilationStats {\n [key: string]: any\n }\n\n /**\n * Delegate with implementation for API endpoints.\n */\n export interface Delegate {\n /** Get all platforms - either with already existing compilations or all supported platforms. */\n getPlatforms: () => Promise<string[]>\n\n /**\n * Get all assets from compilation for given platform.\n * Should return `[]` if the compilation does not exists for given platform.\n */\n getAssets: (platform: string) => Promise<Asset[]>\n\n /**\n * Get compilation stats for a given platform.\n * Should return `null` if the compilation does not exists for given platform.\n */\n getCompilationStats: (platform: string) => Promise<CompilationStats | null>\n }\n }\n}\n\n/** Representation of the compilation progress. */\nexport interface ProgressData {\n /** Number of modules built. */\n completed: number\n\n /** Total number of modules detect as part of compilation. */\n total: number\n}\n\n/**\n * Type representing a function to send the progress.\n *\n * Used by {@link CompilerDelegate} in `getAsset` function to send the compilation\n * progress to the client who requested the asset.\n */\nexport type SendProgress = (data: ProgressData) => void\n\n/**\n * Internal types. Do not use.\n *\n * @internal\n */\nexport namespace Internal {\n export enum EventTypes {\n BuildStart = 'BuildStart',\n BuildEnd = 'BuildEnd',\n HmrEvent = 'HmrEvent',\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["Internal", "EventTypes"]
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,cAAAE,IAAA,eAAAC,EAAAH,GAmMO,IAAUE,MAAV,CACE,IAAKE,OACVA,EAAA,WAAa,aACbA,EAAA,SAAW,WACXA,EAAA,SAAW,aAHDA,EAAAF,EAAA,aAAAA,EAAA,kBADGA,MAAA",
|
|
6
|
+
"names": ["types_exports", "__export", "Internal", "__toCommonJS", "EventTypes"]
|
|
7
7
|
}
|
|
@@ -1,37 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var Device_exports = {};
|
|
30
|
-
__export(Device_exports, {
|
|
31
|
-
default: () => import_Device.default
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(Device_exports);
|
|
34
|
-
var import_Device = __toESM(require("./Device.cjs"));
|
|
35
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
-
0 && (module.exports = {});
|
|
1
|
+
"use strict";var m=Object.create;var t=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var c=(e,f)=>{for(var o in f)t(e,o,{get:f[o],enumerable:!0})},d=(e,f,o,a)=>{if(f&&typeof f=="object"||typeof f=="function")for(let r of u(f))!b.call(e,r)&&r!==o&&t(e,r,{get:()=>f[r],enumerable:!(a=p(f,r))||a.enumerable});return e};var g=(e,f,o)=>(o=e!=null?m(x(e)):{},d(f||!e||!e.__esModule?t(o,"default",{value:e,enumerable:!0}):o,e)),h=e=>d(t({},"__esModule",{value:!0}),e);var i={};c(i,{default:()=>l.default});module.exports=h(i);var l=g(require("./Device.cjs"));0&&(module.exports={});
|
|
37
2
|
//# sourceMappingURL=Device.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../src/vendor/repack/dev-server/vendor/metro-inspector-proxy/src/Device.js"],
|
|
4
4
|
"sourcesContent": ["export { default } from './Device.cjs';\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wCAAAE,EAAAF,GAAA,IAAAG,EAAwB",
|
|
6
|
+
"names": ["Device_exports", "__export", "__toCommonJS", "import_Device"]
|
|
7
7
|
}
|
package/dist/esm/build.js
CHANGED
|
@@ -1,49 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createExtractor, extractToClassNames } from "@tamagui/static";
|
|
3
|
-
import chokidar from "chokidar";
|
|
4
|
-
import { readFile } from "fs-extra";
|
|
5
|
-
const build = async (options) => {
|
|
6
|
-
const entry = options.pkgJson.source;
|
|
7
|
-
if (!entry) {
|
|
8
|
-
throw new Error(`Must add "source" to package.json pointing to your source directory`);
|
|
9
|
-
}
|
|
10
|
-
const sourceDir = dirname(entry);
|
|
11
|
-
const promises = [];
|
|
12
|
-
const targets = ["web"];
|
|
13
|
-
console.log("sourceDir", sourceDir, targets);
|
|
14
|
-
await new Promise((res) => {
|
|
15
|
-
chokidar.watch(sourceDir, {
|
|
16
|
-
// persistent: true,
|
|
17
|
-
}).on("add", (relativePath) => {
|
|
18
|
-
const sourcePath = resolve(process.cwd(), relativePath);
|
|
19
|
-
promises.push(
|
|
20
|
-
(async () => {
|
|
21
|
-
await Promise.all(
|
|
22
|
-
targets.map(async (target) => {
|
|
23
|
-
process.env.TAMAGUI_TARGET = target;
|
|
24
|
-
if (options.debug) {
|
|
25
|
-
process.env.NODE_ENV ||= "development";
|
|
26
|
-
}
|
|
27
|
-
const source = await readFile(sourcePath, "utf-8");
|
|
28
|
-
const extractor = createExtractor();
|
|
29
|
-
const out = await extractToClassNames({
|
|
30
|
-
extractor,
|
|
31
|
-
source,
|
|
32
|
-
sourcePath,
|
|
33
|
-
options: options.tamaguiOptions,
|
|
34
|
-
shouldPrintDebug: options.debug || false
|
|
35
|
-
});
|
|
36
|
-
})
|
|
37
|
-
);
|
|
38
|
-
})()
|
|
39
|
-
);
|
|
40
|
-
}).on("ready", () => {
|
|
41
|
-
res();
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
await Promise.all(promises);
|
|
45
|
-
};
|
|
46
|
-
export {
|
|
47
|
-
build
|
|
48
|
-
};
|
|
1
|
+
import{dirname as u,resolve as p}from"path";import{createExtractor as l,extractToClassNames as w}from"@tamagui/static";import f from"chokidar";import{readFile as g}from"fs-extra";const N=async o=>{const e=o.pkgJson.source;if(!e)throw new Error('Must add "source" to package.json pointing to your source directory');const r=u(e),s=[],t=["web"];console.log("sourceDir",r,t),await new Promise(i=>{f.watch(r,{}).on("add",c=>{const a=p(process.cwd(),c);s.push((async()=>{await Promise.all(t.map(async n=>{process.env.TAMAGUI_TARGET=n,o.debug&&(process.env.NODE_ENV||="development");const m=await g(a,"utf-8"),d=l(),v=await w({extractor:d,source:m,sourcePath:a,options:o.tamaguiOptions,shouldPrintDebug:o.debug||!1})}))})())}).on("ready",()=>{i()})}),await Promise.all(s)};export{N as build};
|
|
49
2
|
//# sourceMappingURL=build.js.map
|
package/dist/esm/build.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/build.ts"],
|
|
4
4
|
"sourcesContent": ["import { writeFile } from 'fs'\nimport { basename, dirname, join, resolve } from 'path'\n\nimport { createExtractor, extractToClassNames, loadTamagui } from '@tamagui/static'\nimport chokidar from 'chokidar'\nimport { readFile } from 'fs-extra'\n\nimport { ResolvedOptions } from './types.js'\n\nexport const build = async (options: ResolvedOptions) => {\n // const tamagui = await loadTamagui(options.tamaguiOptions)\n\n const entry = options.pkgJson.source\n if (!entry) {\n throw new Error(`Must add \"source\" to package.json pointing to your source directory`)\n }\n const sourceDir = dirname(entry)\n const promises: Promise<void>[] = []\n const targets = ['web']\n\n console.log('sourceDir', sourceDir, targets)\n\n await new Promise<void>((res) => {\n chokidar\n // prevent infinite loop but cause race condition if you just build directly\n .watch(sourceDir, {\n // persistent: true,\n })\n .on('add', (relativePath) => {\n const sourcePath = resolve(process.cwd(), relativePath)\n\n promises.push(\n (async () => {\n await Promise.all(\n targets.map(async (target) => {\n process.env.TAMAGUI_TARGET = target\n if (options.debug) {\n process.env.NODE_ENV ||= 'development'\n }\n const source = await readFile(sourcePath, 'utf-8')\n const extractor = createExtractor()\n const out = await extractToClassNames({\n extractor,\n source,\n sourcePath,\n options: options.tamaguiOptions,\n shouldPrintDebug: options.debug || false,\n })\n\n // await writeFile()\n })\n )\n })()\n )\n })\n .on('ready', () => {\n res()\n })\n })\n\n await Promise.all(promises)\n}\n"],
|
|
5
|
-
"mappings": "AACA,
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "AACA,OAAmB,WAAAA,EAAe,WAAAC,MAAe,OAEjD,OAAS,mBAAAC,EAAiB,uBAAAC,MAAwC,kBAClE,OAAOC,MAAc,WACrB,OAAS,YAAAC,MAAgB,WAIlB,MAAMC,EAAQ,MAAOC,GAA6B,CAGvD,MAAMC,EAAQD,EAAQ,QAAQ,OAC9B,GAAI,CAACC,EACH,MAAM,IAAI,MAAM,qEAAqE,EAEvF,MAAMC,EAAYT,EAAQQ,CAAK,EACzBE,EAA4B,CAAC,EAC7BC,EAAU,CAAC,KAAK,EAEtB,QAAQ,IAAI,YAAaF,EAAWE,CAAO,EAE3C,MAAM,IAAI,QAAeC,GAAQ,CAC/BR,EAEG,MAAMK,EAAW,CAElB,CAAC,EACA,GAAG,MAAQI,GAAiB,CAC3B,MAAMC,EAAab,EAAQ,QAAQ,IAAI,EAAGY,CAAY,EAEtDH,EAAS,MACN,SAAY,CACX,MAAM,QAAQ,IACZC,EAAQ,IAAI,MAAOI,GAAW,CAC5B,QAAQ,IAAI,eAAiBA,EACzBR,EAAQ,QACV,QAAQ,IAAI,WAAa,eAE3B,MAAMS,EAAS,MAAMX,EAASS,EAAY,OAAO,EAC3CG,EAAYf,EAAgB,EAC5BgB,EAAM,MAAMf,EAAoB,CACpC,UAAAc,EACA,OAAAD,EACA,WAAAF,EACA,QAASP,EAAQ,eACjB,iBAAkBA,EAAQ,OAAS,EACrC,CAAC,CAGH,CAAC,CACH,CACF,GAAG,CACL,CACF,CAAC,EACA,GAAG,QAAS,IAAM,CACjBK,EAAI,CACN,CAAC,CACL,CAAC,EAED,MAAM,QAAQ,IAAIF,CAAQ,CAC5B",
|
|
6
|
+
"names": ["dirname", "resolve", "createExtractor", "extractToClassNames", "chokidar", "readFile", "build", "options", "entry", "sourceDir", "promises", "targets", "res", "relativePath", "sourcePath", "target", "source", "extractor", "out"]
|
|
7
7
|
}
|
package/dist/esm/build.mjs
CHANGED
|
@@ -1,49 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createExtractor, extractToClassNames } from "@tamagui/static";
|
|
3
|
-
import chokidar from "chokidar";
|
|
4
|
-
import { readFile } from "fs-extra";
|
|
5
|
-
const build = async (options) => {
|
|
6
|
-
const entry = options.pkgJson.source;
|
|
7
|
-
if (!entry) {
|
|
8
|
-
throw new Error(`Must add "source" to package.json pointing to your source directory`);
|
|
9
|
-
}
|
|
10
|
-
const sourceDir = dirname(entry);
|
|
11
|
-
const promises = [];
|
|
12
|
-
const targets = ["web"];
|
|
13
|
-
console.log("sourceDir", sourceDir, targets);
|
|
14
|
-
await new Promise((res) => {
|
|
15
|
-
chokidar.watch(sourceDir, {
|
|
16
|
-
// persistent: true,
|
|
17
|
-
}).on("add", (relativePath) => {
|
|
18
|
-
const sourcePath = resolve(process.cwd(), relativePath);
|
|
19
|
-
promises.push(
|
|
20
|
-
(async () => {
|
|
21
|
-
await Promise.all(
|
|
22
|
-
targets.map(async (target) => {
|
|
23
|
-
process.env.TAMAGUI_TARGET = target;
|
|
24
|
-
if (options.debug) {
|
|
25
|
-
process.env.NODE_ENV ||= "development";
|
|
26
|
-
}
|
|
27
|
-
const source = await readFile(sourcePath, "utf-8");
|
|
28
|
-
const extractor = createExtractor();
|
|
29
|
-
const out = await extractToClassNames({
|
|
30
|
-
extractor,
|
|
31
|
-
source,
|
|
32
|
-
sourcePath,
|
|
33
|
-
options: options.tamaguiOptions,
|
|
34
|
-
shouldPrintDebug: options.debug || false
|
|
35
|
-
});
|
|
36
|
-
})
|
|
37
|
-
);
|
|
38
|
-
})()
|
|
39
|
-
);
|
|
40
|
-
}).on("ready", () => {
|
|
41
|
-
res();
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
await Promise.all(promises);
|
|
45
|
-
};
|
|
46
|
-
export {
|
|
47
|
-
build
|
|
48
|
-
};
|
|
1
|
+
import{dirname as u,resolve as p}from"path";import{createExtractor as l,extractToClassNames as w}from"@tamagui/static";import f from"chokidar";import{readFile as g}from"fs-extra";const N=async o=>{const e=o.pkgJson.source;if(!e)throw new Error('Must add "source" to package.json pointing to your source directory');const r=u(e),s=[],t=["web"];console.log("sourceDir",r,t),await new Promise(i=>{f.watch(r,{}).on("add",c=>{const a=p(process.cwd(),c);s.push((async()=>{await Promise.all(t.map(async n=>{process.env.TAMAGUI_TARGET=n,o.debug&&(process.env.NODE_ENV||="development");const m=await g(a,"utf-8"),d=l(),v=await w({extractor:d,source:m,sourcePath:a,options:o.tamaguiOptions,shouldPrintDebug:o.debug||!1})}))})())}).on("ready",()=>{i()})}),await Promise.all(s)};export{N as build};
|
|
49
2
|
//# sourceMappingURL=build.mjs.map
|
package/dist/esm/build.mjs.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/build.ts"],
|
|
4
4
|
"sourcesContent": ["import { writeFile } from 'fs'\nimport { basename, dirname, join, resolve } from 'path'\n\nimport { createExtractor, extractToClassNames, loadTamagui } from '@tamagui/static'\nimport chokidar from 'chokidar'\nimport { readFile } from 'fs-extra'\n\nimport { ResolvedOptions } from './types.js'\n\nexport const build = async (options: ResolvedOptions) => {\n // const tamagui = await loadTamagui(options.tamaguiOptions)\n\n const entry = options.pkgJson.source\n if (!entry) {\n throw new Error(`Must add \"source\" to package.json pointing to your source directory`)\n }\n const sourceDir = dirname(entry)\n const promises: Promise<void>[] = []\n const targets = ['web']\n\n console.log('sourceDir', sourceDir, targets)\n\n await new Promise<void>((res) => {\n chokidar\n // prevent infinite loop but cause race condition if you just build directly\n .watch(sourceDir, {\n // persistent: true,\n })\n .on('add', (relativePath) => {\n const sourcePath = resolve(process.cwd(), relativePath)\n\n promises.push(\n (async () => {\n await Promise.all(\n targets.map(async (target) => {\n process.env.TAMAGUI_TARGET = target\n if (options.debug) {\n process.env.NODE_ENV ||= 'development'\n }\n const source = await readFile(sourcePath, 'utf-8')\n const extractor = createExtractor()\n const out = await extractToClassNames({\n extractor,\n source,\n sourcePath,\n options: options.tamaguiOptions,\n shouldPrintDebug: options.debug || false,\n })\n\n // await writeFile()\n })\n )\n })()\n )\n })\n .on('ready', () => {\n res()\n })\n })\n\n await Promise.all(promises)\n}\n"],
|
|
5
|
-
"mappings": "AACA,
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "AACA,OAAmB,WAAAA,EAAe,WAAAC,MAAe,OAEjD,OAAS,mBAAAC,EAAiB,uBAAAC,MAAwC,kBAClE,OAAOC,MAAc,WACrB,OAAS,YAAAC,MAAgB,WAIlB,MAAMC,EAAQ,MAAOC,GAA6B,CAGvD,MAAMC,EAAQD,EAAQ,QAAQ,OAC9B,GAAI,CAACC,EACH,MAAM,IAAI,MAAM,qEAAqE,EAEvF,MAAMC,EAAYT,EAAQQ,CAAK,EACzBE,EAA4B,CAAC,EAC7BC,EAAU,CAAC,KAAK,EAEtB,QAAQ,IAAI,YAAaF,EAAWE,CAAO,EAE3C,MAAM,IAAI,QAAeC,GAAQ,CAC/BR,EAEG,MAAMK,EAAW,CAElB,CAAC,EACA,GAAG,MAAQI,GAAiB,CAC3B,MAAMC,EAAab,EAAQ,QAAQ,IAAI,EAAGY,CAAY,EAEtDH,EAAS,MACN,SAAY,CACX,MAAM,QAAQ,IACZC,EAAQ,IAAI,MAAOI,GAAW,CAC5B,QAAQ,IAAI,eAAiBA,EACzBR,EAAQ,QACV,QAAQ,IAAI,WAAa,eAE3B,MAAMS,EAAS,MAAMX,EAASS,EAAY,OAAO,EAC3CG,EAAYf,EAAgB,EAC5BgB,EAAM,MAAMf,EAAoB,CACpC,UAAAc,EACA,OAAAD,EACA,WAAAF,EACA,QAASP,EAAQ,eACjB,iBAAkBA,EAAQ,OAAS,EACrC,CAAC,CAGH,CAAC,CACH,CACF,GAAG,CACL,CACF,CAAC,EACA,GAAG,QAAS,IAAM,CACjBK,EAAI,CACN,CAAC,CACL,CAAC,EAED,MAAM,QAAQ,IAAIF,CAAQ,CAC5B",
|
|
6
|
+
"names": ["dirname", "resolve", "createExtractor", "extractToClassNames", "chokidar", "readFile", "build", "options", "entry", "sourceDir", "promises", "targets", "res", "relativePath", "sourcePath", "target", "source", "extractor", "out"]
|
|
7
7
|
}
|
package/dist/esm/cli.js
CHANGED
|
@@ -1,138 +1,14 @@
|
|
|
1
|
-
import arg from "
|
|
2
|
-
import
|
|
3
|
-
import { disposeAll, getOptions } from "./utils.js";
|
|
4
|
-
["exit", "SIGINT"].forEach((_) => {
|
|
5
|
-
process.on(_, () => {
|
|
6
|
-
process.stdout.write(`bye
|
|
7
|
-
`);
|
|
8
|
-
disposeAll();
|
|
9
|
-
});
|
|
10
|
-
});
|
|
11
|
-
const COMMAND_MAP = {
|
|
12
|
-
build: {
|
|
13
|
-
shorthands: ["b"],
|
|
14
|
-
description: `Use to pre-build a Tamagui component directory`,
|
|
15
|
-
flags: {
|
|
16
|
-
"--help": Boolean,
|
|
17
|
-
"--debug": Boolean,
|
|
18
|
-
"--verbose": Boolean
|
|
19
|
-
},
|
|
20
|
-
async run() {
|
|
21
|
-
const { _, ...flags2 } = arg(this.flags);
|
|
22
|
-
const { build } = await import("./build.js");
|
|
23
|
-
const options = await getOptions({
|
|
24
|
-
debug: flags2["--debug"] ? flags2["--verbose"] ? "verbose" : true : false
|
|
25
|
-
});
|
|
26
|
-
await build(options);
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
update: {
|
|
30
|
-
shorthands: [],
|
|
31
|
-
description: `Update all tamagui packages within a monorepo`,
|
|
32
|
-
flags: {},
|
|
33
|
-
async run() {
|
|
34
|
-
const { update } = await import("./update.js");
|
|
35
|
-
await update();
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
dev: {
|
|
39
|
-
shorthands: ["d"],
|
|
40
|
-
description: `Run tamagui vite`,
|
|
41
|
-
flags: {
|
|
42
|
-
"--help": Boolean,
|
|
43
|
-
"--debug": Boolean,
|
|
44
|
-
"--verbose": Boolean
|
|
45
|
-
},
|
|
46
|
-
async run() {
|
|
47
|
-
const { _, ...flags2 } = arg(this.flags);
|
|
48
|
-
const { dev } = await import("./dev.js");
|
|
49
|
-
const options = await getOptions({
|
|
50
|
-
debug: flags2["--debug"] ? flags2["--verbose"] ? "verbose" : true : false
|
|
51
|
-
});
|
|
52
|
-
await dev(options);
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
studio: {
|
|
56
|
-
shorthands: ["s"],
|
|
57
|
-
description: `Studio`,
|
|
58
|
-
flags: {},
|
|
59
|
-
async run() {
|
|
60
|
-
const { _, ...flags2 } = arg(this.flags);
|
|
61
|
-
const { studio } = await import("./studio.js");
|
|
62
|
-
const options = await getOptions({
|
|
63
|
-
debug: flags2["--debug"] ? flags2["--verbose"] ? "verbose" : true : false
|
|
64
|
-
});
|
|
65
|
-
await studio(options);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
const commandEntries = Object.keys(COMMAND_MAP).flatMap((command2) => {
|
|
70
|
-
const definition2 = COMMAND_MAP[command2];
|
|
71
|
-
const entries = [command2, ...definition2.shorthands].map((cmd) => {
|
|
72
|
-
return [cmd, definition2];
|
|
73
|
-
});
|
|
74
|
-
return entries;
|
|
75
|
-
});
|
|
76
|
-
const commands = Object.fromEntries(commandEntries);
|
|
77
|
-
const {
|
|
78
|
-
_: [command],
|
|
79
|
-
...flags
|
|
80
|
-
} = arg(
|
|
81
|
-
{
|
|
82
|
-
"--help": Boolean,
|
|
83
|
-
"--version": Boolean
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
permissive: true
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
if (flags["--version"]) {
|
|
90
|
-
console.log(require("../package.json").version);
|
|
91
|
-
process.exit(0);
|
|
92
|
-
}
|
|
93
|
-
if (!command && flags["--help"]) {
|
|
94
|
-
console.log(`$ tamagui
|
|
1
|
+
import a from"arg";import d from"chalk";import{disposeAll as p,getOptions as r}from"./utils.js";["exit","SIGINT"].forEach(e=>{process.on(e,()=>{process.stdout.write(`bye
|
|
2
|
+
`),p()})});const l={build:{shorthands:["b"],description:"Use to pre-build a Tamagui component directory",flags:{"--help":Boolean,"--debug":Boolean,"--verbose":Boolean},async run(){const{_:e,...o}=a(this.flags),{build:n}=await import("./build.js"),s=await r({debug:o["--debug"]?o["--verbose"]?"verbose":!0:!1});await n(s)}},update:{shorthands:[],description:"Update all tamagui packages within a monorepo",flags:{},async run(){const{update:e}=await import("./update.js");await e()}},dev:{shorthands:["d"],description:"Run tamagui vite",flags:{"--help":Boolean,"--debug":Boolean,"--verbose":Boolean},async run(){const{_:e,...o}=a(this.flags),{dev:n}=await import("./dev.js"),s=await r({debug:o["--debug"]?o["--verbose"]?"verbose":!0:!1});await n(s)}},studio:{shorthands:["s"],description:"Studio",flags:{},async run(){const{_:e,...o}=a(this.flags),{studio:n}=await import("./studio.js"),s=await r({debug:o["--debug"]?o["--verbose"]?"verbose":!0:!1});await n(s)}}},f=Object.keys(l).flatMap(e=>{const o=l[e];return[e,...o.shorthands].map(s=>[s,o])}),m=Object.fromEntries(f),{_:[t],...c}=a({"--help":Boolean,"--version":Boolean},{permissive:!0});c["--version"]&&(console.log(require("../package.json").version),process.exit(0)),!t&&c["--help"]&&(console.log(`$ tamagui
|
|
95
3
|
|
|
96
4
|
commands:
|
|
97
5
|
|
|
98
|
-
${Object.keys(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
if (!(command in commands)) {
|
|
104
|
-
console.error();
|
|
105
|
-
console.warn(chalk.yellow(`Not a valid command: ${command}`));
|
|
106
|
-
process.exit(1);
|
|
107
|
-
}
|
|
108
|
-
const definition = commands[command];
|
|
109
|
-
main();
|
|
110
|
-
async function main() {
|
|
111
|
-
if (flags["--help"]) {
|
|
112
|
-
console.log(`
|
|
113
|
-
$ tamagui ${command}: ${definition.description}
|
|
114
|
-
`);
|
|
115
|
-
console.log(
|
|
116
|
-
`Flags: ${Object.entries(definition.flags).map(([k, v]) => `${k} (${v.name})`)}`
|
|
117
|
-
);
|
|
118
|
-
process.exit(0);
|
|
119
|
-
}
|
|
120
|
-
const { _, ...cmdFlags } = arg(definition.flags);
|
|
121
|
-
if (cmdFlags["--help"]) {
|
|
122
|
-
console.log(`$ tamagui ${_}
|
|
6
|
+
${Object.keys(l).map(e=>` ${e}`).join(`
|
|
7
|
+
`)}`),process.exit(0)),t in m||(console.error(),console.warn(d.yellow(`Not a valid command: ${t}`)),process.exit(1));const i=m[t];g();async function g(){c["--help"]&&(console.log(`
|
|
8
|
+
$ tamagui ${t}: ${i.description}
|
|
9
|
+
`),console.log(`Flags: ${Object.entries(i.flags).map(([n,s])=>`${n} (${s.name})`)}`),process.exit(0));const{_:e,...o}=a(i.flags);o["--help"]&&(console.log(`$ tamagui ${e}
|
|
123
10
|
|
|
124
|
-
Flags: ${JSON.stringify(
|
|
11
|
+
Flags: ${JSON.stringify(o,null,2)}
|
|
125
12
|
|
|
126
|
-
`)
|
|
127
|
-
process.exit(0);
|
|
128
|
-
}
|
|
129
|
-
await definition.run();
|
|
130
|
-
console.log(`done`);
|
|
131
|
-
process.exit(0);
|
|
132
|
-
}
|
|
133
|
-
function showHelp(definition2, flags2) {
|
|
134
|
-
if (flags2["--help"]) {
|
|
135
|
-
console.log(`$ ${definition2}`);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
13
|
+
`),process.exit(0)),await i.run(),console.log("done"),process.exit(0)}function w(e,o){o["--help"]&&console.log(`$ ${e}`)}
|
|
138
14
|
//# sourceMappingURL=cli.js.map
|
package/dist/esm/cli.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/cli.ts"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable no-console */\nimport arg, { flag } from 'arg'\nimport chalk from 'chalk'\n\nimport { disposeAll, getOptions } from './utils.js'\n\n;['exit', 'SIGINT'].forEach((_) => {\n process.on(_, () => {\n process.stdout.write(`bye\\n`)\n disposeAll()\n })\n})\n\nconst COMMAND_MAP = {\n build: {\n shorthands: ['b'],\n description: `Use to pre-build a Tamagui component directory`,\n flags: {\n '--help': Boolean,\n '--debug': Boolean,\n '--verbose': Boolean,\n },\n async run() {\n const { _, ...flags } = arg(this.flags)\n const { build } = await import('./build.js')\n const options = await getOptions({\n debug: flags['--debug'] ? (flags['--verbose'] ? 'verbose' : true) : false,\n })\n await build(options)\n },\n },\n\n update: {\n shorthands: [],\n description: `Update all tamagui packages within a monorepo`,\n flags: {},\n async run() {\n const { update } = await import('./update.js')\n await update()\n },\n },\n\n dev: {\n shorthands: ['d'],\n description: `Run tamagui vite`,\n flags: {\n '--help': Boolean,\n '--debug': Boolean,\n '--verbose': Boolean,\n },\n async run() {\n const { _, ...flags } = arg(this.flags)\n const { dev } = await import('./dev.js')\n const options = await getOptions({\n debug: flags['--debug'] ? (flags['--verbose'] ? 'verbose' : true) : false,\n })\n await dev(options)\n },\n },\n\n studio: {\n shorthands: ['s'],\n description: `Studio`,\n flags: {},\n async run() {\n const { _, ...flags } = arg(this.flags)\n const { studio } = await import('./studio.js')\n const options = await getOptions({\n debug: flags['--debug'] ? (flags['--verbose'] ? 'verbose' : true) : false,\n })\n await studio(options)\n },\n },\n}\n\ntype CommandDefinitions = typeof COMMAND_MAP\ntype CommandKey = keyof typeof COMMAND_MAP\ntype CommandDefinition = CommandDefinitions[CommandKey]\n\nconst commandEntries = Object.keys(COMMAND_MAP).flatMap((command) => {\n const definition = COMMAND_MAP[command as CommandKey]\n const entries = [command, ...definition.shorthands].map((cmd) => {\n return [cmd, definition] as const\n })\n return entries\n})\n\nconst commands = Object.fromEntries(commandEntries) as any as Record<\n CommandKey,\n CommandDefinition\n>\n\nconst {\n _: [command],\n ...flags\n} = arg(\n {\n '--help': Boolean,\n '--version': Boolean,\n },\n {\n permissive: true,\n }\n)\n\nif (flags['--version']) {\n console.log(require('../package.json').version)\n process.exit(0)\n}\n\nif (!command && flags['--help']) {\n console.log(`$ tamagui\n\ncommands:\n\n${Object.keys(COMMAND_MAP)\n .map((key) => {\n return ` ${key}`\n })\n .join('\\n')}`)\n process.exit(0)\n}\n\nif (!(command in commands)) {\n console.error()\n console.warn(chalk.yellow(`Not a valid command: ${command}`))\n process.exit(1)\n}\n\nconst definition = commands[command] as CommandDefinition\n\nmain()\n\nasync function main() {\n if (flags['--help']) {\n console.log(`\\n$ tamagui ${command}: ${definition.description}\\n`)\n console.log(\n `Flags: ${Object.entries(definition.flags).map(([k, v]) => `${k} (${v.name})`)}`\n )\n process.exit(0)\n }\n\n const { _, ...cmdFlags } = arg(definition.flags)\n\n // help for any command\n if (cmdFlags['--help']) {\n console.log(`$ tamagui ${_}\n\n Flags: ${JSON.stringify(cmdFlags, null, 2)}\n\n`)\n process.exit(0)\n }\n\n await definition.run()\n console.log(`done`)\n process.exit(0)\n}\n\nfunction showHelp(definition: CommandDefinition, flags: { '--help'?: boolean }) {\n if (flags['--help']) {\n console.log(`$ ${definition}`)\n }\n}\n\n// async function main() {\n// const options = await getOptions({\n// host: flags['--host'],\n// })\n\n// switch (command) {\n// // build\n// case 'b':\n// case 'build': {\n// const { build } = await import('./build.js')\n// break\n// }\n\n// // generate\n// case 'generate':\n// case 'gen': {\n// const { generateTamaguiConfig: generateTamgauiConfig } = await import(\n// './tamaguiConfigUtils.js'\n// )\n// const { generateTypes } = await import('./generate.js')\n\n// if (props[0] === 'types') {\n// await generateTypes(options)\n// return\n// }\n// if (props[0] === 'config') {\n// await generateTamgauiConfig(options)\n// return\n// }\n\n// await Promise.all([\n// // all\n// generateTypes(options),\n// generateTamgauiConfig(options),\n// ])\n// break\n// }\n\n// // for now, dev === serve, eventually serve can be just prod mode\n// case 'dev': {\n// const { dev } = await import('./dev.js')\n// await dev(options)\n// break\n// }\n\n// default: {\n// if (!command || flags['--help']) {\n// }\n// // eslint-disable-next-line no-console\n// console.warn(chalk.yellow(`No command found ${command}`))\n// process.exit(1)\n// }\n// }\n// }\n"],
|
|
5
|
-
"mappings": "AACA,
|
|
6
|
-
"names": ["flags", "command", "definition"]
|
|
5
|
+
"mappings": "AACA,OAAOA,MAAmB,MAC1B,OAAOC,MAAW,QAElB,OAAS,cAAAC,EAAY,cAAAC,MAAkB,aAEtC,CAAC,OAAQ,QAAQ,EAAE,QAASC,GAAM,CACjC,QAAQ,GAAGA,EAAG,IAAM,CAClB,QAAQ,OAAO,MAAM;AAAA,CAAO,EAC5BF,EAAW,CACb,CAAC,CACH,CAAC,EAED,MAAMG,EAAc,CAClB,MAAO,CACL,WAAY,CAAC,GAAG,EAChB,YAAa,iDACb,MAAO,CACL,SAAU,QACV,UAAW,QACX,YAAa,OACf,EACA,MAAM,KAAM,CACV,KAAM,CAAE,EAAAD,EAAG,GAAGE,CAAM,EAAIN,EAAI,KAAK,KAAK,EAChC,CAAE,MAAAO,CAAM,EAAI,KAAM,QAAO,YAAY,EACrCC,EAAU,MAAML,EAAW,CAC/B,MAAOG,EAAM,SAAS,EAAKA,EAAM,WAAW,EAAI,UAAY,GAAQ,EACtE,CAAC,EACD,MAAMC,EAAMC,CAAO,CACrB,CACF,EAEA,OAAQ,CACN,WAAY,CAAC,EACb,YAAa,gDACb,MAAO,CAAC,EACR,MAAM,KAAM,CACV,KAAM,CAAE,OAAAC,CAAO,EAAI,KAAM,QAAO,aAAa,EAC7C,MAAMA,EAAO,CACf,CACF,EAEA,IAAK,CACH,WAAY,CAAC,GAAG,EAChB,YAAa,mBACb,MAAO,CACL,SAAU,QACV,UAAW,QACX,YAAa,OACf,EACA,MAAM,KAAM,CACV,KAAM,CAAE,EAAAL,EAAG,GAAGE,CAAM,EAAIN,EAAI,KAAK,KAAK,EAChC,CAAE,IAAAU,CAAI,EAAI,KAAM,QAAO,UAAU,EACjCF,EAAU,MAAML,EAAW,CAC/B,MAAOG,EAAM,SAAS,EAAKA,EAAM,WAAW,EAAI,UAAY,GAAQ,EACtE,CAAC,EACD,MAAMI,EAAIF,CAAO,CACnB,CACF,EAEA,OAAQ,CACN,WAAY,CAAC,GAAG,EAChB,YAAa,SACb,MAAO,CAAC,EACR,MAAM,KAAM,CACV,KAAM,CAAE,EAAAJ,EAAG,GAAGE,CAAM,EAAIN,EAAI,KAAK,KAAK,EAChC,CAAE,OAAAW,CAAO,EAAI,KAAM,QAAO,aAAa,EACvCH,EAAU,MAAML,EAAW,CAC/B,MAAOG,EAAM,SAAS,EAAKA,EAAM,WAAW,EAAI,UAAY,GAAQ,EACtE,CAAC,EACD,MAAMK,EAAOH,CAAO,CACtB,CACF,CACF,EAMMI,EAAiB,OAAO,KAAKP,CAAW,EAAE,QAASQ,GAAY,CACnE,MAAMC,EAAaT,EAAYQ,CAAqB,EAIpD,MAHgB,CAACA,EAAS,GAAGC,EAAW,UAAU,EAAE,IAAKC,GAChD,CAACA,EAAKD,CAAU,CACxB,CAEH,CAAC,EAEKE,EAAW,OAAO,YAAYJ,CAAc,EAK5C,CACJ,EAAG,CAACC,CAAO,EACX,GAAGP,CACL,EAAIN,EACF,CACE,SAAU,QACV,YAAa,OACf,EACA,CACE,WAAY,EACd,CACF,EAEIM,EAAM,WAAW,IACnB,QAAQ,IAAI,QAAQ,iBAAiB,EAAE,OAAO,EAC9C,QAAQ,KAAK,CAAC,GAGZ,CAACO,GAAWP,EAAM,QAAQ,IAC5B,QAAQ,IAAI;AAAA;AAAA;AAAA;AAAA,EAIZ,OAAO,KAAKD,CAAW,EACtB,IAAKY,GACG,KAAKA,GACb,EACA,KAAK;AAAA,CAAI,GAAG,EACb,QAAQ,KAAK,CAAC,GAGVJ,KAAWG,IACf,QAAQ,MAAM,EACd,QAAQ,KAAKf,EAAM,OAAO,wBAAwBY,GAAS,CAAC,EAC5D,QAAQ,KAAK,CAAC,GAGhB,MAAMC,EAAaE,EAASH,CAAO,EAEnCK,EAAK,EAEL,eAAeA,GAAO,CAChBZ,EAAM,QAAQ,IAChB,QAAQ,IAAI;AAAA,YAAeO,MAAYC,EAAW;AAAA,CAAe,EACjE,QAAQ,IACN,UAAU,OAAO,QAAQA,EAAW,KAAK,EAAE,IAAI,CAAC,CAACK,EAAGC,CAAC,IAAM,GAAGD,MAAMC,EAAE,OAAO,GAC/E,EACA,QAAQ,KAAK,CAAC,GAGhB,KAAM,CAAE,EAAAhB,EAAG,GAAGiB,CAAS,EAAIrB,EAAIc,EAAW,KAAK,EAG3CO,EAAS,QAAQ,IACnB,QAAQ,IAAI,aAAajB;AAAA;AAAA,aAEhB,KAAK,UAAUiB,EAAU,KAAM,CAAC;AAAA;AAAA,CAE5C,EACG,QAAQ,KAAK,CAAC,GAGhB,MAAMP,EAAW,IAAI,EACrB,QAAQ,IAAI,MAAM,EAClB,QAAQ,KAAK,CAAC,CAChB,CAEA,SAASQ,EAASR,EAA+BR,EAA+B,CAC1EA,EAAM,QAAQ,GAChB,QAAQ,IAAI,KAAKQ,GAAY,CAEjC",
|
|
6
|
+
"names": ["arg", "chalk", "disposeAll", "getOptions", "_", "COMMAND_MAP", "flags", "build", "options", "update", "dev", "studio", "commandEntries", "command", "definition", "cmd", "commands", "key", "main", "k", "v", "cmdFlags", "showHelp"]
|
|
7
7
|
}
|
package/dist/esm/cli.mjs
CHANGED
|
@@ -1,138 +1,14 @@
|
|
|
1
|
-
import arg from "
|
|
2
|
-
import
|
|
3
|
-
import { disposeAll, getOptions } from "./utils.js";
|
|
4
|
-
["exit", "SIGINT"].forEach((_) => {
|
|
5
|
-
process.on(_, () => {
|
|
6
|
-
process.stdout.write(`bye
|
|
7
|
-
`);
|
|
8
|
-
disposeAll();
|
|
9
|
-
});
|
|
10
|
-
});
|
|
11
|
-
const COMMAND_MAP = {
|
|
12
|
-
build: {
|
|
13
|
-
shorthands: ["b"],
|
|
14
|
-
description: `Use to pre-build a Tamagui component directory`,
|
|
15
|
-
flags: {
|
|
16
|
-
"--help": Boolean,
|
|
17
|
-
"--debug": Boolean,
|
|
18
|
-
"--verbose": Boolean
|
|
19
|
-
},
|
|
20
|
-
async run() {
|
|
21
|
-
const { _, ...flags2 } = arg(this.flags);
|
|
22
|
-
const { build } = await import("./build.js");
|
|
23
|
-
const options = await getOptions({
|
|
24
|
-
debug: flags2["--debug"] ? flags2["--verbose"] ? "verbose" : true : false
|
|
25
|
-
});
|
|
26
|
-
await build(options);
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
update: {
|
|
30
|
-
shorthands: [],
|
|
31
|
-
description: `Update all tamagui packages within a monorepo`,
|
|
32
|
-
flags: {},
|
|
33
|
-
async run() {
|
|
34
|
-
const { update } = await import("./update.js");
|
|
35
|
-
await update();
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
dev: {
|
|
39
|
-
shorthands: ["d"],
|
|
40
|
-
description: `Run tamagui vite`,
|
|
41
|
-
flags: {
|
|
42
|
-
"--help": Boolean,
|
|
43
|
-
"--debug": Boolean,
|
|
44
|
-
"--verbose": Boolean
|
|
45
|
-
},
|
|
46
|
-
async run() {
|
|
47
|
-
const { _, ...flags2 } = arg(this.flags);
|
|
48
|
-
const { dev } = await import("./dev.js");
|
|
49
|
-
const options = await getOptions({
|
|
50
|
-
debug: flags2["--debug"] ? flags2["--verbose"] ? "verbose" : true : false
|
|
51
|
-
});
|
|
52
|
-
await dev(options);
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
studio: {
|
|
56
|
-
shorthands: ["s"],
|
|
57
|
-
description: `Studio`,
|
|
58
|
-
flags: {},
|
|
59
|
-
async run() {
|
|
60
|
-
const { _, ...flags2 } = arg(this.flags);
|
|
61
|
-
const { studio } = await import("./studio.js");
|
|
62
|
-
const options = await getOptions({
|
|
63
|
-
debug: flags2["--debug"] ? flags2["--verbose"] ? "verbose" : true : false
|
|
64
|
-
});
|
|
65
|
-
await studio(options);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
const commandEntries = Object.keys(COMMAND_MAP).flatMap((command2) => {
|
|
70
|
-
const definition2 = COMMAND_MAP[command2];
|
|
71
|
-
const entries = [command2, ...definition2.shorthands].map((cmd) => {
|
|
72
|
-
return [cmd, definition2];
|
|
73
|
-
});
|
|
74
|
-
return entries;
|
|
75
|
-
});
|
|
76
|
-
const commands = Object.fromEntries(commandEntries);
|
|
77
|
-
const {
|
|
78
|
-
_: [command],
|
|
79
|
-
...flags
|
|
80
|
-
} = arg(
|
|
81
|
-
{
|
|
82
|
-
"--help": Boolean,
|
|
83
|
-
"--version": Boolean
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
permissive: true
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
if (flags["--version"]) {
|
|
90
|
-
console.log(require("../package.json").version);
|
|
91
|
-
process.exit(0);
|
|
92
|
-
}
|
|
93
|
-
if (!command && flags["--help"]) {
|
|
94
|
-
console.log(`$ tamagui
|
|
1
|
+
import a from"arg";import d from"chalk";import{disposeAll as p,getOptions as r}from"./utils.js";["exit","SIGINT"].forEach(e=>{process.on(e,()=>{process.stdout.write(`bye
|
|
2
|
+
`),p()})});const l={build:{shorthands:["b"],description:"Use to pre-build a Tamagui component directory",flags:{"--help":Boolean,"--debug":Boolean,"--verbose":Boolean},async run(){const{_:e,...o}=a(this.flags),{build:n}=await import("./build.js"),s=await r({debug:o["--debug"]?o["--verbose"]?"verbose":!0:!1});await n(s)}},update:{shorthands:[],description:"Update all tamagui packages within a monorepo",flags:{},async run(){const{update:e}=await import("./update.js");await e()}},dev:{shorthands:["d"],description:"Run tamagui vite",flags:{"--help":Boolean,"--debug":Boolean,"--verbose":Boolean},async run(){const{_:e,...o}=a(this.flags),{dev:n}=await import("./dev.js"),s=await r({debug:o["--debug"]?o["--verbose"]?"verbose":!0:!1});await n(s)}},studio:{shorthands:["s"],description:"Studio",flags:{},async run(){const{_:e,...o}=a(this.flags),{studio:n}=await import("./studio.js"),s=await r({debug:o["--debug"]?o["--verbose"]?"verbose":!0:!1});await n(s)}}},f=Object.keys(l).flatMap(e=>{const o=l[e];return[e,...o.shorthands].map(s=>[s,o])}),m=Object.fromEntries(f),{_:[t],...c}=a({"--help":Boolean,"--version":Boolean},{permissive:!0});c["--version"]&&(console.log(require("../package.json").version),process.exit(0)),!t&&c["--help"]&&(console.log(`$ tamagui
|
|
95
3
|
|
|
96
4
|
commands:
|
|
97
5
|
|
|
98
|
-
${Object.keys(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
if (!(command in commands)) {
|
|
104
|
-
console.error();
|
|
105
|
-
console.warn(chalk.yellow(`Not a valid command: ${command}`));
|
|
106
|
-
process.exit(1);
|
|
107
|
-
}
|
|
108
|
-
const definition = commands[command];
|
|
109
|
-
main();
|
|
110
|
-
async function main() {
|
|
111
|
-
if (flags["--help"]) {
|
|
112
|
-
console.log(`
|
|
113
|
-
$ tamagui ${command}: ${definition.description}
|
|
114
|
-
`);
|
|
115
|
-
console.log(
|
|
116
|
-
`Flags: ${Object.entries(definition.flags).map(([k, v]) => `${k} (${v.name})`)}`
|
|
117
|
-
);
|
|
118
|
-
process.exit(0);
|
|
119
|
-
}
|
|
120
|
-
const { _, ...cmdFlags } = arg(definition.flags);
|
|
121
|
-
if (cmdFlags["--help"]) {
|
|
122
|
-
console.log(`$ tamagui ${_}
|
|
6
|
+
${Object.keys(l).map(e=>` ${e}`).join(`
|
|
7
|
+
`)}`),process.exit(0)),t in m||(console.error(),console.warn(d.yellow(`Not a valid command: ${t}`)),process.exit(1));const i=m[t];g();async function g(){c["--help"]&&(console.log(`
|
|
8
|
+
$ tamagui ${t}: ${i.description}
|
|
9
|
+
`),console.log(`Flags: ${Object.entries(i.flags).map(([n,s])=>`${n} (${s.name})`)}`),process.exit(0));const{_:e,...o}=a(i.flags);o["--help"]&&(console.log(`$ tamagui ${e}
|
|
123
10
|
|
|
124
|
-
Flags: ${JSON.stringify(
|
|
11
|
+
Flags: ${JSON.stringify(o,null,2)}
|
|
125
12
|
|
|
126
|
-
`)
|
|
127
|
-
process.exit(0);
|
|
128
|
-
}
|
|
129
|
-
await definition.run();
|
|
130
|
-
console.log(`done`);
|
|
131
|
-
process.exit(0);
|
|
132
|
-
}
|
|
133
|
-
function showHelp(definition2, flags2) {
|
|
134
|
-
if (flags2["--help"]) {
|
|
135
|
-
console.log(`$ ${definition2}`);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
13
|
+
`),process.exit(0)),await i.run(),console.log("done"),process.exit(0)}function w(e,o){o["--help"]&&console.log(`$ ${e}`)}
|
|
138
14
|
//# sourceMappingURL=cli.mjs.map
|