@rsbuild/core 1.0.0 → 1.0.1-beta.1
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/README.md +1 -1
- package/bin/rsbuild.js +4 -2
- package/compiled/autoprefixer/index.d.ts +95 -0
- package/compiled/autoprefixer/index.js +7000 -0
- package/compiled/autoprefixer/license +20 -0
- package/compiled/autoprefixer/package.json +1 -0
- package/compiled/browserslist/index.d.ts +201 -0
- package/compiled/browserslist/index.js +1867 -0
- package/compiled/browserslist/license +20 -0
- package/compiled/browserslist/package.json +1 -0
- package/compiled/chokidar/index.d.ts +198 -0
- package/compiled/chokidar/index.js +5139 -0
- package/compiled/chokidar/license +21 -0
- package/compiled/chokidar/package.json +1 -0
- package/compiled/commander/{typings/index.d.ts → index.d.ts} +184 -102
- package/compiled/commander/index.js +2190 -1
- package/compiled/commander/package.json +1 -1
- package/compiled/connect/index.d.ts +90 -0
- package/compiled/connect/index.js +1240 -0
- package/compiled/connect/license +25 -0
- package/compiled/connect/package.json +1 -0
- package/compiled/connect-history-api-fallback/index.js +149 -1
- package/compiled/connect-history-api-fallback/package.json +1 -1
- package/compiled/css-loader/api.js +85 -0
- package/compiled/css-loader/getUrl.js +26 -0
- package/compiled/css-loader/index.d.ts +1 -0
- package/compiled/css-loader/index.js +7541 -0
- package/compiled/css-loader/license +20 -0
- package/compiled/css-loader/noSourceMaps.js +5 -0
- package/compiled/css-loader/package.json +1 -0
- package/compiled/css-loader/semver.js +1 -0
- package/compiled/css-loader/sourceMaps.js +16 -0
- package/compiled/dotenv/{lib/main.d.ts → index.d.ts} +25 -24
- package/compiled/dotenv/index.js +336 -1
- package/compiled/dotenv/package.json +1 -1
- package/compiled/dotenv-expand/index.d.ts +52 -0
- package/compiled/dotenv-expand/index.js +105 -1
- package/compiled/dotenv-expand/package.json +1 -1
- package/compiled/html-rspack-plugin/default_index.ejs +9 -0
- package/compiled/html-rspack-plugin/index.d.ts +284 -0
- package/compiled/html-rspack-plugin/index.js +1574 -0
- package/compiled/html-rspack-plugin/license +20 -0
- package/compiled/html-rspack-plugin/loader.js +162 -0
- package/compiled/html-rspack-plugin/package.json +1 -0
- package/compiled/http-compression/index.js +134 -1
- package/compiled/http-compression/package.json +1 -1
- package/compiled/http-proxy-middleware/index.d.ts +315 -0
- package/compiled/http-proxy-middleware/index.js +5251 -0
- package/compiled/http-proxy-middleware/license +22 -0
- package/compiled/http-proxy-middleware/package.json +1 -0
- package/compiled/jiti/index.d.ts +1 -0
- package/compiled/jiti/index.js +254 -1748
- package/compiled/jiti/package.json +1 -1
- package/compiled/launch-editor-middleware/index.d.ts +1 -0
- package/compiled/launch-editor-middleware/index.js +696 -0
- package/compiled/launch-editor-middleware/license +21 -0
- package/compiled/launch-editor-middleware/package.json +1 -0
- package/compiled/on-finished/index.d.ts +13 -0
- package/compiled/on-finished/index.js +197 -0
- package/compiled/on-finished/license +23 -0
- package/compiled/on-finished/package.json +1 -0
- package/compiled/open/index.d.ts +1 -153
- package/compiled/open/index.js +409 -1
- package/compiled/open/package.json +1 -1
- package/compiled/picocolors/index.d.ts +34 -0
- package/compiled/picocolors/index.js +97 -0
- package/compiled/picocolors/license +15 -0
- package/compiled/picocolors/package.json +1 -0
- package/compiled/postcss-load-config/index.d.ts +1 -0
- package/compiled/postcss-load-config/index.js +751 -0
- package/compiled/postcss-load-config/license +20 -0
- package/compiled/postcss-load-config/package.json +1 -0
- package/compiled/postcss-loader/index.d.ts +1 -0
- package/compiled/postcss-loader/index.js +8423 -0
- package/compiled/postcss-loader/license +20 -0
- package/compiled/postcss-loader/package.json +1 -0
- package/compiled/postcss-loader/semver.js +1 -0
- package/compiled/postcss-value-parser/index.d.ts +1 -0
- package/compiled/postcss-value-parser/index.js +495 -0
- package/compiled/postcss-value-parser/license +22 -0
- package/compiled/postcss-value-parser/package.json +1 -0
- package/compiled/rslog/index.d.ts +66 -0
- package/compiled/rslog/index.js +334 -0
- package/compiled/rslog/license +21 -0
- package/compiled/rslog/package.json +1 -0
- package/compiled/rspack-chain/index.d.ts +601 -0
- package/compiled/rspack-chain/index.js +1702 -0
- package/compiled/rspack-chain/license +373 -0
- package/compiled/rspack-chain/package.json +1 -0
- package/compiled/rspack-manifest-plugin/index.d.ts +1 -0
- package/compiled/rspack-manifest-plugin/index.js +5884 -0
- package/compiled/rspack-manifest-plugin/license +21 -0
- package/compiled/rspack-manifest-plugin/package.json +1 -0
- package/compiled/sirv/index.d.ts +1 -0
- package/compiled/sirv/index.js +701 -1
- package/compiled/sirv/package.json +1 -1
- package/compiled/style-loader/index.d.ts +1 -0
- package/compiled/style-loader/index.js +427 -0
- package/compiled/style-loader/license +20 -0
- package/compiled/style-loader/package.json +1 -0
- package/compiled/style-loader/runtime/injectStylesIntoLinkTag.js +29 -0
- package/compiled/style-loader/runtime/injectStylesIntoStyleTag.js +84 -0
- package/compiled/style-loader/runtime/insertBySelector.js +34 -0
- package/compiled/style-loader/runtime/insertStyleElement.js +10 -0
- package/compiled/style-loader/runtime/isEqualLocals.js +28 -0
- package/compiled/style-loader/runtime/isOldIE.js +17 -0
- package/compiled/style-loader/runtime/setAttributesWithAttributes.js +13 -0
- package/compiled/style-loader/runtime/setAttributesWithAttributesAndNonce.js +9 -0
- package/compiled/style-loader/runtime/setAttributesWithoutAttributes.js +10 -0
- package/compiled/style-loader/runtime/singletonStyleDomAPI.js +86 -0
- package/compiled/style-loader/runtime/styleDomAPI.js +61 -0
- package/compiled/style-loader/runtime/styleTagTransform.js +14 -0
- package/compiled/webpack-bundle-analyzer/index.d.ts +160 -0
- package/compiled/webpack-bundle-analyzer/index.js +13352 -0
- package/compiled/webpack-bundle-analyzer/license +20 -0
- package/compiled/webpack-bundle-analyzer/package.json +1 -0
- package/compiled/webpack-bundle-analyzer/public/viewer.js +16 -0
- package/compiled/webpack-bundle-analyzer/public/viewer.js.LICENSE.txt +10 -0
- package/compiled/webpack-dev-middleware/index.d.ts +1 -0
- package/compiled/webpack-dev-middleware/index.js +5672 -0
- package/compiled/webpack-dev-middleware/license +20 -0
- package/compiled/webpack-dev-middleware/package.json +1 -0
- package/compiled/webpack-dev-middleware/schema-utils.js +1 -0
- package/compiled/webpack-merge/index.d.ts +31 -0
- package/compiled/webpack-merge/index.js +1200 -0
- package/compiled/webpack-merge/license +20 -0
- package/compiled/webpack-merge/package.json +1 -0
- package/compiled/ws/index.d.ts +402 -0
- package/compiled/ws/index.js +3153 -0
- package/compiled/ws/license +20 -0
- package/compiled/ws/package.json +1 -0
- package/dist/client/hmr.js +249 -405
- package/dist/client/overlay.js +221 -0
- package/dist/{rspack-provider/plugins/basic.js → ignoreCssLoader.cjs} +12 -14
- package/dist/index.cjs +9011 -0
- package/dist/index.js +9082 -16
- package/dist/transformLoader.cjs +54 -0
- package/dist/transformRawLoader.cjs +65 -0
- package/dist-types/cli/commands.d.ts +20 -0
- package/dist-types/cli/init.d.ts +6 -0
- package/dist-types/cli/prepare.d.ts +1 -0
- package/dist-types/client/format.d.ts +5 -0
- package/dist-types/client/hmr.d.ts +1 -0
- package/dist-types/client/overlay.d.ts +1 -0
- package/dist-types/config.d.ts +63 -0
- package/dist-types/configChain.d.ts +162 -0
- package/dist-types/constants.d.ts +32 -0
- package/dist-types/createContext.d.ts +11 -0
- package/dist-types/createRsbuild.d.ts +2 -0
- package/dist-types/helpers/path.d.ts +10 -0
- package/dist-types/helpers.d.ts +57 -0
- package/dist-types/index.d.ts +24 -0
- package/dist-types/initHooks.d.ts +23 -0
- package/dist-types/initPlugins.d.ts +6 -0
- package/dist-types/internal.d.ts +20 -0
- package/dist-types/loadEnv.d.ts +27 -0
- package/dist-types/loader/ignoreCssLoader.d.ts +2 -0
- package/dist-types/loader/transformLoader.d.ts +5 -0
- package/dist-types/loader/transformRawLoader.d.ts +3 -0
- package/dist-types/logger.d.ts +4 -0
- package/dist-types/mergeConfig.d.ts +2 -0
- package/dist-types/package.json +1 -0
- package/dist-types/pluginHelper.d.ts +12 -0
- package/dist-types/pluginManager.d.ts +7 -0
- package/{dist → dist-types}/plugins/asset.d.ts +1 -1
- package/dist-types/plugins/basic.d.ts +5 -0
- package/dist-types/plugins/bundleAnalyzer.d.ts +2 -0
- package/dist-types/plugins/cache.d.ts +2 -0
- package/dist-types/plugins/cleanOutput.d.ts +2 -0
- package/dist-types/plugins/css.d.ts +10 -0
- package/dist-types/plugins/define.d.ts +2 -0
- package/dist-types/plugins/entry.d.ts +2 -0
- package/dist-types/plugins/externals.d.ts +2 -0
- package/{dist → dist-types}/plugins/fileSize.d.ts +1 -1
- package/dist-types/plugins/html.d.ts +9 -0
- package/dist-types/plugins/inlineChunk.d.ts +2 -0
- package/dist-types/plugins/lazyCompilation.d.ts +2 -0
- package/dist-types/plugins/manifest.d.ts +2 -0
- package/dist-types/plugins/minimize.d.ts +10 -0
- package/dist-types/plugins/moduleFederation.d.ts +2 -0
- package/dist-types/plugins/moment.d.ts +2 -0
- package/dist-types/plugins/nodeAddons.d.ts +2 -0
- package/dist-types/plugins/nonce.d.ts +2 -0
- package/{dist/plugins/startUrl.d.ts → dist-types/plugins/open.d.ts} +2 -1
- package/dist-types/plugins/output.d.ts +2 -0
- package/{dist → dist-types}/plugins/performance.d.ts +1 -1
- package/dist-types/plugins/progress.d.ts +2 -0
- package/dist-types/plugins/resolve.d.ts +2 -0
- package/dist-types/plugins/resourceHints.d.ts +2 -0
- package/dist-types/plugins/rsdoctor.d.ts +2 -0
- package/dist-types/plugins/rspackProfile.d.ts +2 -0
- package/dist-types/plugins/server.d.ts +2 -0
- package/dist-types/plugins/splitChunks.d.ts +4 -0
- package/dist-types/plugins/sri.d.ts +2 -0
- package/dist-types/plugins/swc.d.ts +7 -0
- package/dist-types/plugins/target.d.ts +2 -0
- package/dist-types/plugins/wasm.d.ts +2 -0
- package/dist-types/provider/build.d.ts +3 -0
- package/dist-types/provider/createCompiler.d.ts +33 -0
- package/dist-types/provider/initConfigs.d.ts +10 -0
- package/dist-types/provider/inspectConfig.d.ts +6 -0
- package/dist-types/provider/provider.d.ts +2 -0
- package/dist-types/provider/rspackConfig.d.ts +8 -0
- package/dist-types/rspack/HtmlAppIconPlugin.d.ts +13 -0
- package/dist-types/rspack/HtmlBasicPlugin.d.ts +37 -0
- package/dist-types/rspack/InlineChunkHtmlPlugin.d.ts +29 -0
- package/dist-types/rspack/preload/HtmlPreloadOrPrefetchPlugin.d.ts +29 -0
- package/dist-types/rspack/preload/helpers/determineAsValue.d.ts +22 -0
- package/dist-types/rspack/preload/helpers/doesChunkBelongToHtml.d.ts +29 -0
- package/dist-types/rspack/preload/helpers/extractChunks.d.ts +28 -0
- package/dist-types/rspack/preload/helpers/index.d.ts +4 -0
- package/dist-types/rspack/preload/helpers/type.d.ts +13 -0
- package/dist-types/server/compilerDevMiddleware.d.ts +30 -0
- package/dist-types/server/devMiddleware.d.ts +39 -0
- package/dist-types/server/devServer.d.ts +50 -0
- package/dist-types/server/environment.d.ts +7 -0
- package/dist-types/server/getDevMiddlewares.d.ts +25 -0
- package/dist-types/server/helper.d.ts +59 -0
- package/dist-types/server/httpServer.d.ts +8 -0
- package/dist-types/server/middlewares.d.ts +22 -0
- package/dist-types/server/prodServer.d.ts +25 -0
- package/dist-types/server/proxy.d.ts +6 -0
- package/dist-types/server/restart.d.ts +9 -0
- package/dist-types/server/runner/asModule.d.ts +2 -0
- package/dist-types/server/runner/basic.d.ts +25 -0
- package/dist-types/server/runner/cjs.d.ts +10 -0
- package/dist-types/server/runner/esm.d.ts +6 -0
- package/dist-types/server/runner/index.d.ts +8 -0
- package/dist-types/server/runner/type.d.ts +36 -0
- package/dist-types/server/socketServer.d.ts +22 -0
- package/dist-types/server/watchFiles.d.ts +11 -0
- package/dist-types/types/config/dev.d.ts +90 -0
- package/dist-types/types/config/html.d.ts +107 -0
- package/dist-types/types/config/index.d.ts +134 -0
- package/dist-types/types/config/output.d.ts +297 -0
- package/dist-types/types/config/performance.d.ts +123 -0
- package/dist-types/types/config/security.d.ts +18 -0
- package/dist-types/types/config/server.d.ts +106 -0
- package/dist-types/types/config/source.d.ts +79 -0
- package/dist-types/types/config/tools.d.ts +85 -0
- package/dist-types/types/context.d.ts +38 -0
- package/dist-types/types/hooks.d.ts +125 -0
- package/dist-types/types/index.d.ts +9 -0
- package/dist-types/types/plugin.d.ts +197 -0
- package/dist-types/types/rsbuild.d.ts +109 -0
- package/dist-types/types/rspack.d.ts +28 -0
- package/dist-types/types/stats.d.ts +17 -0
- package/dist-types/types/thirdParty.d.ts +168 -0
- package/dist-types/types/utils.d.ts +13 -0
- package/package.json +73 -43
- package/types.d.ts +36 -4
- package/compiled/dotenv-expand/lib/main.d.ts +0 -29
- package/compiled/jiti/types/jiti.d.ts +0 -19
- package/compiled/jiti/types/types.d.ts +0 -31
- package/compiled/open/license +0 -9
- package/compiled/sirv/sirv.d.ts +0 -27
- package/dist/cli/commands.d.ts +0 -20
- package/dist/cli/commands.js +0 -131
- package/dist/cli/config.d.ts +0 -9
- package/dist/cli/config.js +0 -110
- package/dist/cli/prepare.d.ts +0 -1
- package/dist/cli/prepare.js +0 -43
- package/dist/client/hmr/createSocketUrl.d.ts +0 -16
- package/dist/client/hmr/index.d.ts +0 -1
- package/dist/createRsbuild.d.ts +0 -10
- package/dist/createRsbuild.js +0 -100
- package/dist/index.d.ts +0 -10
- package/dist/loadEnv.d.ts +0 -5
- package/dist/loadEnv.js +0 -58
- package/dist/plugins/asset.js +0 -73
- package/dist/plugins/bundleAnalyzer.d.ts +0 -2
- package/dist/plugins/bundleAnalyzer.js +0 -59
- package/dist/plugins/cache.d.ts +0 -2
- package/dist/plugins/cache.js +0 -112
- package/dist/plugins/cleanOutput.d.ts +0 -2
- package/dist/plugins/cleanOutput.js +0 -47
- package/dist/plugins/define.d.ts +0 -2
- package/dist/plugins/define.js +0 -47
- package/dist/plugins/devtool.d.ts +0 -2
- package/dist/plugins/devtool.js +0 -46
- package/dist/plugins/entry.d.ts +0 -2
- package/dist/plugins/entry.js +0 -53
- package/dist/plugins/externals.d.ts +0 -2
- package/dist/plugins/externals.js +0 -48
- package/dist/plugins/fileSize.js +0 -158
- package/dist/plugins/html.d.ts +0 -15
- package/dist/plugins/html.js +0 -270
- package/dist/plugins/index.d.ts +0 -2
- package/dist/plugins/index.js +0 -61
- package/dist/plugins/inlineChunk.d.ts +0 -2
- package/dist/plugins/inlineChunk.js +0 -76
- package/dist/plugins/moment.d.ts +0 -2
- package/dist/plugins/moment.js +0 -68
- package/dist/plugins/networkPerformance.d.ts +0 -2
- package/dist/plugins/networkPerformance.js +0 -58
- package/dist/plugins/nodeAddons.d.ts +0 -2
- package/dist/plugins/nodeAddons.js +0 -70
- package/dist/plugins/performance.js +0 -63
- package/dist/plugins/preloadOrPrefetch.d.ts +0 -2
- package/dist/plugins/preloadOrPrefetch.js +0 -61
- package/dist/plugins/splitChunks.d.ts +0 -2
- package/dist/plugins/splitChunks.js +0 -228
- package/dist/plugins/startUrl.js +0 -148
- package/dist/plugins/target.d.ts +0 -2
- package/dist/plugins/target.js +0 -53
- package/dist/plugins/toml.d.ts +0 -2
- package/dist/plugins/toml.js +0 -36
- package/dist/plugins/wasm.d.ts +0 -2
- package/dist/plugins/wasm.js +0 -51
- package/dist/plugins/yaml.d.ts +0 -2
- package/dist/plugins/yaml.js +0 -36
- package/dist/rspack-plugins/HtmlBasicPlugin.d.ts +0 -19
- package/dist/rspack-plugins/HtmlBasicPlugin.js +0 -87
- package/dist/rspack-plugins/RemoveCssSourcemapPlugin.d.ts +0 -8
- package/dist/rspack-plugins/RemoveCssSourcemapPlugin.js +0 -51
- package/dist/rspack-provider/config.d.ts +0 -9
- package/dist/rspack-provider/config.js +0 -47
- package/dist/rspack-provider/core/build.d.ts +0 -19
- package/dist/rspack-provider/core/build.js +0 -79
- package/dist/rspack-provider/core/createCompiler.d.ts +0 -11
- package/dist/rspack-provider/core/createCompiler.js +0 -112
- package/dist/rspack-provider/core/createContext.d.ts +0 -13
- package/dist/rspack-provider/core/createContext.js +0 -133
- package/dist/rspack-provider/core/devMiddleware.d.ts +0 -3
- package/dist/rspack-provider/core/devMiddleware.js +0 -65
- package/dist/rspack-provider/core/initConfigs.d.ts +0 -14
- package/dist/rspack-provider/core/initConfigs.js +0 -78
- package/dist/rspack-provider/core/initHooks.d.ts +0 -19
- package/dist/rspack-provider/core/initHooks.js +0 -45
- package/dist/rspack-provider/core/initPlugins.d.ts +0 -9
- package/dist/rspack-provider/core/initPlugins.js +0 -87
- package/dist/rspack-provider/core/inspectConfig.d.ts +0 -19
- package/dist/rspack-provider/core/inspectConfig.js +0 -81
- package/dist/rspack-provider/core/rspackConfig.d.ts +0 -9
- package/dist/rspack-provider/core/rspackConfig.js +0 -132
- package/dist/rspack-provider/css-modules-typescript-pre-loader/index.d.ts +0 -6
- package/dist/rspack-provider/css-modules-typescript-pre-loader/index.js +0 -84
- package/dist/rspack-provider/css-modules-typescript-pre-loader/postcss-icss-extract-plugin.d.ts +0 -11
- package/dist/rspack-provider/css-modules-typescript-pre-loader/postcss-icss-extract-plugin.js +0 -67
- package/dist/rspack-provider/index.d.ts +0 -5
- package/dist/rspack-provider/index.js +0 -38
- package/dist/rspack-provider/plugins/basic.d.ts +0 -5
- package/dist/rspack-provider/plugins/css.d.ts +0 -29
- package/dist/rspack-provider/plugins/css.js +0 -199
- package/dist/rspack-provider/plugins/hmr.d.ts +0 -2
- package/dist/rspack-provider/plugins/hmr.js +0 -38
- package/dist/rspack-provider/plugins/less.d.ts +0 -2
- package/dist/rspack-provider/plugins/less.js +0 -78
- package/dist/rspack-provider/plugins/minimize.d.ts +0 -5
- package/dist/rspack-provider/plugins/minimize.js +0 -77
- package/dist/rspack-provider/plugins/output.d.ts +0 -2
- package/dist/rspack-provider/plugins/output.js +0 -65
- package/dist/rspack-provider/plugins/progress.d.ts +0 -2
- package/dist/rspack-provider/plugins/progress.js +0 -61
- package/dist/rspack-provider/plugins/resolve.d.ts +0 -2
- package/dist/rspack-provider/plugins/resolve.js +0 -54
- package/dist/rspack-provider/plugins/rspackProfile.d.ts +0 -5
- package/dist/rspack-provider/plugins/rspackProfile.js +0 -107
- package/dist/rspack-provider/plugins/sass.d.ts +0 -2
- package/dist/rspack-provider/plugins/sass.js +0 -83
- package/dist/rspack-provider/plugins/swc.d.ts +0 -7
- package/dist/rspack-provider/plugins/swc.js +0 -147
- package/dist/rspack-provider/plugins/transition.d.ts +0 -5
- package/dist/rspack-provider/plugins/transition.js +0 -42
- package/dist/rspack-provider/provider.d.ts +0 -8
- package/dist/rspack-provider/provider.js +0 -117
- package/dist/rspack-provider/shared.d.ts +0 -8
- package/dist/rspack-provider/shared.js +0 -116
- package/dist/server/dev-middleware/index.d.ts +0 -24
- package/dist/server/dev-middleware/index.js +0 -91
- package/dist/server/dev-middleware/socketServer.d.ts +0 -22
- package/dist/server/dev-middleware/socketServer.js +0 -164
- package/dist/server/devServer.d.ts +0 -34
- package/dist/server/devServer.js +0 -252
- package/dist/server/index.d.ts +0 -2
- package/dist/server/index.js +0 -31
- package/dist/server/middlewares.d.ts +0 -9
- package/dist/server/middlewares.js +0 -115
- package/dist/server/prodServer.d.ts +0 -33
- package/dist/server/prodServer.js +0 -197
- package/dist/server/proxy.d.ts +0 -9
- package/dist/server/proxy.js +0 -90
- package/dist/server/restart.d.ts +0 -11
- package/dist/server/restart.js +0 -65
- package/dist/types.d.ts +0 -19
- package/dist/types.js +0 -16
- package/static/template.html +0 -7
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017-present, Yuxi (Evan) You
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"launch-editor-middleware","author":"Evan You","version":"2.8.0","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { IncomingMessage, OutgoingMessage } from 'http';
|
|
3
|
+
|
|
4
|
+
declare function onFinished<T extends IncomingMessage | OutgoingMessage>(
|
|
5
|
+
msg: T,
|
|
6
|
+
listener: (err: Error | null, msg: T) => void,
|
|
7
|
+
): T;
|
|
8
|
+
|
|
9
|
+
declare namespace onFinished {
|
|
10
|
+
function isFinished(msg: IncomingMessage | OutgoingMessage): boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { onFinished as default };
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
(() => {
|
|
2
|
+
"use strict";
|
|
3
|
+
var __webpack_modules__ = {
|
|
4
|
+
261: (module) => {
|
|
5
|
+
/*!
|
|
6
|
+
* ee-first
|
|
7
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
8
|
+
* MIT Licensed
|
|
9
|
+
*/
|
|
10
|
+
module.exports = first;
|
|
11
|
+
function first(stuff, done) {
|
|
12
|
+
if (!Array.isArray(stuff))
|
|
13
|
+
throw new TypeError("arg must be an array of [ee, events...] arrays");
|
|
14
|
+
var cleanups = [];
|
|
15
|
+
for (var i = 0; i < stuff.length; i++) {
|
|
16
|
+
var arr = stuff[i];
|
|
17
|
+
if (!Array.isArray(arr) || arr.length < 2)
|
|
18
|
+
throw new TypeError("each array member must be [ee, events...]");
|
|
19
|
+
var ee = arr[0];
|
|
20
|
+
for (var j = 1; j < arr.length; j++) {
|
|
21
|
+
var event = arr[j];
|
|
22
|
+
var fn = listener(event, callback);
|
|
23
|
+
ee.on(event, fn);
|
|
24
|
+
cleanups.push({ ee, event, fn });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function callback() {
|
|
28
|
+
cleanup();
|
|
29
|
+
done.apply(null, arguments);
|
|
30
|
+
}
|
|
31
|
+
function cleanup() {
|
|
32
|
+
var x;
|
|
33
|
+
for (var i = 0; i < cleanups.length; i++) {
|
|
34
|
+
x = cleanups[i];
|
|
35
|
+
x.ee.removeListener(x.event, x.fn);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function thunk(fn) {
|
|
39
|
+
done = fn;
|
|
40
|
+
}
|
|
41
|
+
thunk.cancel = cleanup;
|
|
42
|
+
return thunk;
|
|
43
|
+
}
|
|
44
|
+
function listener(event, done) {
|
|
45
|
+
return function onevent(arg1) {
|
|
46
|
+
var args = new Array(arguments.length);
|
|
47
|
+
var ee = this;
|
|
48
|
+
var err = event === "error" ? arg1 : null;
|
|
49
|
+
for (var i = 0; i < args.length; i++) {
|
|
50
|
+
args[i] = arguments[i];
|
|
51
|
+
}
|
|
52
|
+
done(err, ee, event, args);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
772: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
57
|
+
/*!
|
|
58
|
+
* on-finished
|
|
59
|
+
* Copyright(c) 2013 Jonathan Ong
|
|
60
|
+
* Copyright(c) 2014 Douglas Christopher Wilson
|
|
61
|
+
* MIT Licensed
|
|
62
|
+
*/
|
|
63
|
+
module.exports = onFinished;
|
|
64
|
+
module.exports.isFinished = isFinished;
|
|
65
|
+
var asyncHooks = tryRequireAsyncHooks();
|
|
66
|
+
var first = __nccwpck_require__(261);
|
|
67
|
+
var defer =
|
|
68
|
+
typeof setImmediate === "function"
|
|
69
|
+
? setImmediate
|
|
70
|
+
: function (fn) {
|
|
71
|
+
process.nextTick(fn.bind.apply(fn, arguments));
|
|
72
|
+
};
|
|
73
|
+
function onFinished(msg, listener) {
|
|
74
|
+
if (isFinished(msg) !== false) {
|
|
75
|
+
defer(listener, null, msg);
|
|
76
|
+
return msg;
|
|
77
|
+
}
|
|
78
|
+
attachListener(msg, wrap(listener));
|
|
79
|
+
return msg;
|
|
80
|
+
}
|
|
81
|
+
function isFinished(msg) {
|
|
82
|
+
var socket = msg.socket;
|
|
83
|
+
if (typeof msg.finished === "boolean") {
|
|
84
|
+
return Boolean(msg.finished || (socket && !socket.writable));
|
|
85
|
+
}
|
|
86
|
+
if (typeof msg.complete === "boolean") {
|
|
87
|
+
return Boolean(
|
|
88
|
+
msg.upgrade ||
|
|
89
|
+
!socket ||
|
|
90
|
+
!socket.readable ||
|
|
91
|
+
(msg.complete && !msg.readable),
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
function attachFinishedListener(msg, callback) {
|
|
97
|
+
var eeMsg;
|
|
98
|
+
var eeSocket;
|
|
99
|
+
var finished = false;
|
|
100
|
+
function onFinish(error) {
|
|
101
|
+
eeMsg.cancel();
|
|
102
|
+
eeSocket.cancel();
|
|
103
|
+
finished = true;
|
|
104
|
+
callback(error);
|
|
105
|
+
}
|
|
106
|
+
eeMsg = eeSocket = first([[msg, "end", "finish"]], onFinish);
|
|
107
|
+
function onSocket(socket) {
|
|
108
|
+
msg.removeListener("socket", onSocket);
|
|
109
|
+
if (finished) return;
|
|
110
|
+
if (eeMsg !== eeSocket) return;
|
|
111
|
+
eeSocket = first([[socket, "error", "close"]], onFinish);
|
|
112
|
+
}
|
|
113
|
+
if (msg.socket) {
|
|
114
|
+
onSocket(msg.socket);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
msg.on("socket", onSocket);
|
|
118
|
+
if (msg.socket === undefined) {
|
|
119
|
+
patchAssignSocket(msg, onSocket);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function attachListener(msg, listener) {
|
|
123
|
+
var attached = msg.__onFinished;
|
|
124
|
+
if (!attached || !attached.queue) {
|
|
125
|
+
attached = msg.__onFinished = createListener(msg);
|
|
126
|
+
attachFinishedListener(msg, attached);
|
|
127
|
+
}
|
|
128
|
+
attached.queue.push(listener);
|
|
129
|
+
}
|
|
130
|
+
function createListener(msg) {
|
|
131
|
+
function listener(err) {
|
|
132
|
+
if (msg.__onFinished === listener) msg.__onFinished = null;
|
|
133
|
+
if (!listener.queue) return;
|
|
134
|
+
var queue = listener.queue;
|
|
135
|
+
listener.queue = null;
|
|
136
|
+
for (var i = 0; i < queue.length; i++) {
|
|
137
|
+
queue[i](err, msg);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
listener.queue = [];
|
|
141
|
+
return listener;
|
|
142
|
+
}
|
|
143
|
+
function patchAssignSocket(res, callback) {
|
|
144
|
+
var assignSocket = res.assignSocket;
|
|
145
|
+
if (typeof assignSocket !== "function") return;
|
|
146
|
+
res.assignSocket = function _assignSocket(socket) {
|
|
147
|
+
assignSocket.call(this, socket);
|
|
148
|
+
callback(socket);
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function tryRequireAsyncHooks() {
|
|
152
|
+
try {
|
|
153
|
+
return __nccwpck_require__(852);
|
|
154
|
+
} catch (e) {
|
|
155
|
+
return {};
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function wrap(fn) {
|
|
159
|
+
var res;
|
|
160
|
+
if (asyncHooks.AsyncResource) {
|
|
161
|
+
res = new asyncHooks.AsyncResource(fn.name || "bound-anonymous-fn");
|
|
162
|
+
}
|
|
163
|
+
if (!res || !res.runInAsyncScope) {
|
|
164
|
+
return fn;
|
|
165
|
+
}
|
|
166
|
+
return res.runInAsyncScope.bind(res, fn, null);
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
852: (module) => {
|
|
170
|
+
module.exports = require("async_hooks");
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
var __webpack_module_cache__ = {};
|
|
174
|
+
function __nccwpck_require__(moduleId) {
|
|
175
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
176
|
+
if (cachedModule !== undefined) {
|
|
177
|
+
return cachedModule.exports;
|
|
178
|
+
}
|
|
179
|
+
var module = (__webpack_module_cache__[moduleId] = { exports: {} });
|
|
180
|
+
var threw = true;
|
|
181
|
+
try {
|
|
182
|
+
__webpack_modules__[moduleId](
|
|
183
|
+
module,
|
|
184
|
+
module.exports,
|
|
185
|
+
__nccwpck_require__,
|
|
186
|
+
);
|
|
187
|
+
threw = false;
|
|
188
|
+
} finally {
|
|
189
|
+
if (threw) delete __webpack_module_cache__[moduleId];
|
|
190
|
+
}
|
|
191
|
+
return module.exports;
|
|
192
|
+
}
|
|
193
|
+
if (typeof __nccwpck_require__ !== "undefined")
|
|
194
|
+
__nccwpck_require__.ab = __dirname + "/";
|
|
195
|
+
var __webpack_exports__ = __nccwpck_require__(772);
|
|
196
|
+
module.exports = __webpack_exports__;
|
|
197
|
+
})();
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2013 Jonathan Ong <me@jongleberry.com>
|
|
4
|
+
Copyright (c) 2014 Douglas Christopher Wilson <doug@somethingdoug.com>
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
7
|
+
a copy of this software and associated documentation files (the
|
|
8
|
+
'Software'), to deal in the Software without restriction, including
|
|
9
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
10
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
11
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
12
|
+
the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be
|
|
15
|
+
included in all copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
18
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
19
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
20
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
21
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
22
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
23
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"on-finished","version":"2.4.1","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
package/compiled/open/index.d.ts
CHANGED
|
@@ -1,153 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
declare namespace open {
|
|
4
|
-
interface Options {
|
|
5
|
-
/**
|
|
6
|
-
Wait for the opened app to exit before fulfilling the promise. If `false` it's fulfilled immediately when opening the app.
|
|
7
|
-
|
|
8
|
-
Note that it waits for the app to exit, not just for the window to close.
|
|
9
|
-
|
|
10
|
-
On Windows, you have to explicitly specify an app for it to be able to wait.
|
|
11
|
-
|
|
12
|
-
@default false
|
|
13
|
-
*/
|
|
14
|
-
readonly wait?: boolean;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
__macOS only__
|
|
18
|
-
|
|
19
|
-
Do not bring the app to the foreground.
|
|
20
|
-
|
|
21
|
-
@default false
|
|
22
|
-
*/
|
|
23
|
-
readonly background?: boolean;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
__macOS only__
|
|
27
|
-
|
|
28
|
-
Open a new instance of the app even it's already running.
|
|
29
|
-
|
|
30
|
-
A new instance is always opened on other platforms.
|
|
31
|
-
|
|
32
|
-
@default false
|
|
33
|
-
*/
|
|
34
|
-
readonly newInstance?: boolean;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
Specify the `name` of the app to open the `target` with, and optionally, app `arguments`. `app` can be an array of apps to try to open and `name` can be an array of app names to try. If each app fails, the last error will be thrown.
|
|
38
|
-
|
|
39
|
-
The app name is platform dependent. Don't hard code it in reusable modules. For example, Chrome is `google chrome` on macOS, `google-chrome` on Linux and `chrome` on Windows. If possible, use [`open.apps`](#openapps) which auto-detects the correct binary to use.
|
|
40
|
-
|
|
41
|
-
You may also pass in the app's full path. For example on WSL, this can be `/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe` for the Windows installation of Chrome.
|
|
42
|
-
|
|
43
|
-
The app `arguments` are app dependent. Check the app's documentation for what arguments it accepts.
|
|
44
|
-
*/
|
|
45
|
-
readonly app?: App | readonly App[];
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
Allow the opened app to exit with nonzero exit code when the `wait` option is `true`.
|
|
49
|
-
|
|
50
|
-
We do not recommend setting this option. The convention for success is exit code zero.
|
|
51
|
-
|
|
52
|
-
@default false
|
|
53
|
-
*/
|
|
54
|
-
readonly allowNonzeroExitCode?: boolean;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
interface OpenAppOptions extends Omit<Options, 'app'> {
|
|
58
|
-
/**
|
|
59
|
-
Arguments passed to the app.
|
|
60
|
-
|
|
61
|
-
These arguments are app dependent. Check the app's documentation for what arguments it accepts.
|
|
62
|
-
*/
|
|
63
|
-
readonly arguments?: readonly string[];
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
type AppName =
|
|
67
|
-
| 'chrome'
|
|
68
|
-
| 'firefox'
|
|
69
|
-
| 'edge';
|
|
70
|
-
|
|
71
|
-
type App = {
|
|
72
|
-
name: string | readonly string[];
|
|
73
|
-
arguments?: readonly string[];
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// eslint-disable-next-line no-redeclare
|
|
78
|
-
declare const open: {
|
|
79
|
-
/**
|
|
80
|
-
Open stuff like URLs, files, executables. Cross-platform.
|
|
81
|
-
|
|
82
|
-
Uses the command `open` on macOS, `start` on Windows and `xdg-open` on other platforms.
|
|
83
|
-
|
|
84
|
-
There is a caveat for [double-quotes on Windows](https://github.com/sindresorhus/open#double-quotes-on-windows) where all double-quotes are stripped from the `target`.
|
|
85
|
-
|
|
86
|
-
@param target - The thing you want to open. Can be a URL, file, or executable. Opens in the default app for the file type. For example, URLs open in your default browser.
|
|
87
|
-
@returns The [spawned child process](https://nodejs.org/api/child_process.html#child_process_class_childprocess). You would normally not need to use this for anything, but it can be useful if you'd like to attach custom event listeners or perform other operations directly on the spawned process.
|
|
88
|
-
|
|
89
|
-
@example
|
|
90
|
-
```
|
|
91
|
-
import open = require('./open');
|
|
92
|
-
|
|
93
|
-
// Opens the image in the default image viewer
|
|
94
|
-
await open('unicorn.png', {wait: true});
|
|
95
|
-
console.log('The image viewer app closed');
|
|
96
|
-
|
|
97
|
-
// Opens the url in the default browser
|
|
98
|
-
await open('https://sindresorhus.com');
|
|
99
|
-
|
|
100
|
-
// Opens the URL in a specified browser.
|
|
101
|
-
await open('https://sindresorhus.com', {app: {name: 'firefox'}});
|
|
102
|
-
|
|
103
|
-
// Specify app arguments.
|
|
104
|
-
await open('https://sindresorhus.com', {app: {name: 'google chrome', arguments: ['--incognito']}});
|
|
105
|
-
```
|
|
106
|
-
*/
|
|
107
|
-
(
|
|
108
|
-
target: string,
|
|
109
|
-
options?: open.Options
|
|
110
|
-
): Promise<ChildProcess>;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
An object containing auto-detected binary names for common apps. Useful to work around cross-platform differences.
|
|
114
|
-
|
|
115
|
-
@example
|
|
116
|
-
```
|
|
117
|
-
import open = require('./open');
|
|
118
|
-
|
|
119
|
-
await open('https://google.com', {
|
|
120
|
-
app: {
|
|
121
|
-
name: open.apps.chrome
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
```
|
|
125
|
-
*/
|
|
126
|
-
apps: Record<open.AppName, string | readonly string[]>;
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
Open an app. Cross-platform.
|
|
130
|
-
|
|
131
|
-
Uses the command `open` on macOS, `start` on Windows and `xdg-open` on other platforms.
|
|
132
|
-
|
|
133
|
-
@param name - The app you want to open. Can be either builtin supported `open.apps` names or other name supported in platform.
|
|
134
|
-
@returns The [spawned child process](https://nodejs.org/api/child_process.html#child_process_class_childprocess). You would normally not need to use this for anything, but it can be useful if you'd like to attach custom event listeners or perform other operations directly on the spawned process.
|
|
135
|
-
|
|
136
|
-
@example
|
|
137
|
-
```
|
|
138
|
-
const {apps, openApp} = require('open');
|
|
139
|
-
|
|
140
|
-
// Open Firefox
|
|
141
|
-
await openApp(apps.firefox);
|
|
142
|
-
|
|
143
|
-
// Open Chrome incognito mode
|
|
144
|
-
await openApp(apps.chrome, {arguments: ['--incognito']});
|
|
145
|
-
|
|
146
|
-
// Open Xcode
|
|
147
|
-
await openApp('xcode');
|
|
148
|
-
```
|
|
149
|
-
*/
|
|
150
|
-
openApp: (name: open.App['name'], options?: open.OpenAppOptions) => Promise<ChildProcess>;
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
export = open;
|
|
1
|
+
export = any;
|