@ohos-ports/rsbuild-core 1.1.14-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.
Files changed (244) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +28 -0
  3. package/bin/rsbuild.js +20 -0
  4. package/compiled/chokidar/index.d.ts +345 -0
  5. package/compiled/chokidar/index.js +1778 -0
  6. package/compiled/chokidar/license +21 -0
  7. package/compiled/chokidar/package.json +1 -0
  8. package/compiled/connect/index.d.ts +90 -0
  9. package/compiled/connect/index.js +1240 -0
  10. package/compiled/connect/license +25 -0
  11. package/compiled/connect/package.json +1 -0
  12. package/compiled/connect-history-api-fallback/index.d.ts +1 -0
  13. package/compiled/connect-history-api-fallback/index.js +149 -0
  14. package/compiled/connect-history-api-fallback/license +21 -0
  15. package/compiled/connect-history-api-fallback/package.json +1 -0
  16. package/compiled/cors/index.d.ts +1 -0
  17. package/compiled/cors/index.js +371 -0
  18. package/compiled/cors/license +22 -0
  19. package/compiled/cors/package.json +1 -0
  20. package/compiled/css-loader/api.js +85 -0
  21. package/compiled/css-loader/getUrl.js +26 -0
  22. package/compiled/css-loader/index.d.ts +1 -0
  23. package/compiled/css-loader/index.js +8008 -0
  24. package/compiled/css-loader/license +20 -0
  25. package/compiled/css-loader/noSourceMaps.js +5 -0
  26. package/compiled/css-loader/package.json +1 -0
  27. package/compiled/css-loader/sourceMaps.js +16 -0
  28. package/compiled/html-rspack-plugin/default_index.ejs +9 -0
  29. package/compiled/html-rspack-plugin/index.d.ts +289 -0
  30. package/compiled/html-rspack-plugin/index.js +1583 -0
  31. package/compiled/html-rspack-plugin/license +20 -0
  32. package/compiled/html-rspack-plugin/loader.js +162 -0
  33. package/compiled/html-rspack-plugin/package.json +1 -0
  34. package/compiled/http-proxy-middleware/index.d.ts +318 -0
  35. package/compiled/http-proxy-middleware/index.js +5280 -0
  36. package/compiled/http-proxy-middleware/license +22 -0
  37. package/compiled/http-proxy-middleware/package.json +1 -0
  38. package/compiled/jiti/index.d.ts +1 -0
  39. package/compiled/jiti/index.js +416 -0
  40. package/compiled/jiti/license +21 -0
  41. package/compiled/jiti/package.json +1 -0
  42. package/compiled/launch-editor-middleware/index.d.ts +1 -0
  43. package/compiled/launch-editor-middleware/index.js +694 -0
  44. package/compiled/launch-editor-middleware/license +21 -0
  45. package/compiled/launch-editor-middleware/package.json +1 -0
  46. package/compiled/mrmime/index.d.ts +4 -0
  47. package/compiled/mrmime/index.js +452 -0
  48. package/compiled/mrmime/package.json +1 -0
  49. package/compiled/on-finished/index.d.ts +13 -0
  50. package/compiled/on-finished/index.js +197 -0
  51. package/compiled/on-finished/license +23 -0
  52. package/compiled/on-finished/package.json +1 -0
  53. package/compiled/open/index.d.ts +153 -0
  54. package/compiled/open/index.js +409 -0
  55. package/compiled/open/package.json +1 -0
  56. package/compiled/open/xdg-open +1066 -0
  57. package/compiled/picocolors/index.d.ts +55 -0
  58. package/compiled/picocolors/index.js +108 -0
  59. package/compiled/picocolors/license +15 -0
  60. package/compiled/picocolors/package.json +1 -0
  61. package/compiled/postcss/index.d.ts +1 -0
  62. package/compiled/postcss/index.js +5997 -0
  63. package/compiled/postcss/license +20 -0
  64. package/compiled/postcss/package.json +1 -0
  65. package/compiled/postcss-load-config/index.d.ts +1 -0
  66. package/compiled/postcss-load-config/index.js +739 -0
  67. package/compiled/postcss-load-config/license +20 -0
  68. package/compiled/postcss-load-config/package.json +1 -0
  69. package/compiled/postcss-loader/index.d.ts +1 -0
  70. package/compiled/postcss-loader/index.js +741 -0
  71. package/compiled/postcss-loader/license +20 -0
  72. package/compiled/postcss-loader/package.json +1 -0
  73. package/compiled/rsbuild-dev-middleware/index.d.ts +1 -0
  74. package/compiled/rsbuild-dev-middleware/index.js +6158 -0
  75. package/compiled/rsbuild-dev-middleware/license +20 -0
  76. package/compiled/rsbuild-dev-middleware/package.json +1 -0
  77. package/compiled/rslog/index.d.ts +66 -0
  78. package/compiled/rslog/index.js +334 -0
  79. package/compiled/rslog/license +21 -0
  80. package/compiled/rslog/package.json +1 -0
  81. package/compiled/rspack-chain/index.d.ts +611 -0
  82. package/compiled/rspack-chain/index.js +1740 -0
  83. package/compiled/rspack-chain/license +373 -0
  84. package/compiled/rspack-chain/package.json +1 -0
  85. package/compiled/rspack-manifest-plugin/index.d.ts +44 -0
  86. package/compiled/rspack-manifest-plugin/index.js +394 -0
  87. package/compiled/rspack-manifest-plugin/license +21 -0
  88. package/compiled/rspack-manifest-plugin/package.json +1 -0
  89. package/compiled/sirv/index.d.ts +1 -0
  90. package/compiled/sirv/index.js +709 -0
  91. package/compiled/sirv/package.json +1 -0
  92. package/compiled/style-loader/index.d.ts +1 -0
  93. package/compiled/style-loader/index.js +427 -0
  94. package/compiled/style-loader/license +20 -0
  95. package/compiled/style-loader/package.json +1 -0
  96. package/compiled/style-loader/runtime/injectStylesIntoLinkTag.js +29 -0
  97. package/compiled/style-loader/runtime/injectStylesIntoStyleTag.js +84 -0
  98. package/compiled/style-loader/runtime/insertBySelector.js +34 -0
  99. package/compiled/style-loader/runtime/insertStyleElement.js +10 -0
  100. package/compiled/style-loader/runtime/isEqualLocals.js +28 -0
  101. package/compiled/style-loader/runtime/isOldIE.js +17 -0
  102. package/compiled/style-loader/runtime/setAttributesWithAttributes.js +13 -0
  103. package/compiled/style-loader/runtime/setAttributesWithAttributesAndNonce.js +9 -0
  104. package/compiled/style-loader/runtime/setAttributesWithoutAttributes.js +10 -0
  105. package/compiled/style-loader/runtime/singletonStyleDomAPI.js +86 -0
  106. package/compiled/style-loader/runtime/styleDomAPI.js +61 -0
  107. package/compiled/style-loader/runtime/styleTagTransform.js +14 -0
  108. package/compiled/tinyglobby/index.d.ts +25 -0
  109. package/compiled/tinyglobby/index.js +2749 -0
  110. package/compiled/tinyglobby/index1.js +17 -0
  111. package/compiled/tinyglobby/license +21 -0
  112. package/compiled/tinyglobby/package.json +1 -0
  113. package/compiled/webpack-bundle-analyzer/index.d.ts +160 -0
  114. package/compiled/webpack-bundle-analyzer/index.js +13480 -0
  115. package/compiled/webpack-bundle-analyzer/license +20 -0
  116. package/compiled/webpack-bundle-analyzer/package.json +1 -0
  117. package/compiled/webpack-bundle-analyzer/public/viewer.js +16 -0
  118. package/compiled/webpack-bundle-analyzer/public/viewer.js.LICENSE.txt +10 -0
  119. package/compiled/webpack-merge/index.d.ts +31 -0
  120. package/compiled/webpack-merge/index.js +1200 -0
  121. package/compiled/webpack-merge/license +20 -0
  122. package/compiled/webpack-merge/package.json +1 -0
  123. package/compiled/ws/index.d.ts +401 -0
  124. package/compiled/ws/index.js +3153 -0
  125. package/compiled/ws/license +20 -0
  126. package/compiled/ws/package.json +1 -0
  127. package/dist/client/hmr.js +143 -0
  128. package/dist/client/overlay.js +210 -0
  129. package/dist/ignoreCssLoader.mjs +4 -0
  130. package/dist/index.cjs +7251 -0
  131. package/dist/index.js +7118 -0
  132. package/dist/transformLoader.mjs +22 -0
  133. package/dist/transformRawLoader.mjs +22 -0
  134. package/dist-types/cli/commands.d.ts +23 -0
  135. package/dist-types/cli/index.d.ts +1 -0
  136. package/dist-types/cli/init.d.ts +7 -0
  137. package/dist-types/cli/prepare.d.ts +1 -0
  138. package/dist-types/client/hmr.d.ts +1 -0
  139. package/dist-types/client/overlay.d.ts +1 -0
  140. package/dist-types/config.d.ts +90 -0
  141. package/dist-types/configChain.d.ts +139 -0
  142. package/dist-types/constants.d.ts +37 -0
  143. package/dist-types/createContext.d.ts +11 -0
  144. package/dist-types/createRsbuild.d.ts +2 -0
  145. package/dist-types/helpers/format.d.ts +5 -0
  146. package/dist-types/helpers/fs.d.ts +13 -0
  147. package/dist-types/helpers/index.d.ts +47 -0
  148. package/dist-types/helpers/path.d.ts +11 -0
  149. package/dist-types/helpers/stats.d.ts +9 -0
  150. package/dist-types/hooks.d.ts +48 -0
  151. package/dist-types/index.d.ts +26 -0
  152. package/dist-types/initPlugins.d.ts +6 -0
  153. package/dist-types/internal.d.ts +6 -0
  154. package/dist-types/loadEnv.d.ts +50 -0
  155. package/dist-types/loader/ignoreCssLoader.d.ts +2 -0
  156. package/dist-types/loader/transformLoader.d.ts +7 -0
  157. package/dist-types/loader/transformRawLoader.d.ts +3 -0
  158. package/dist-types/logger.d.ts +4 -0
  159. package/dist-types/mergeConfig.d.ts +2 -0
  160. package/dist-types/package.json +1 -0
  161. package/dist-types/pluginHelper.d.ts +12 -0
  162. package/dist-types/pluginManager.d.ts +9 -0
  163. package/dist-types/plugins/appIcon.d.ts +2 -0
  164. package/dist-types/plugins/asset.d.ts +3 -0
  165. package/dist-types/plugins/basic.d.ts +5 -0
  166. package/dist-types/plugins/bundleAnalyzer.d.ts +2 -0
  167. package/dist-types/plugins/cache.d.ts +2 -0
  168. package/dist-types/plugins/cleanOutput.d.ts +3 -0
  169. package/dist-types/plugins/css.d.ts +3 -0
  170. package/dist-types/plugins/define.d.ts +2 -0
  171. package/dist-types/plugins/entry.d.ts +2 -0
  172. package/dist-types/plugins/externals.d.ts +2 -0
  173. package/dist-types/plugins/fileSize.d.ts +4 -0
  174. package/dist-types/plugins/html.d.ts +9 -0
  175. package/dist-types/plugins/inlineChunk.d.ts +2 -0
  176. package/dist-types/plugins/lazyCompilation.d.ts +2 -0
  177. package/dist-types/plugins/manifest.d.ts +2 -0
  178. package/dist-types/plugins/minimize.d.ts +10 -0
  179. package/dist-types/plugins/moduleFederation.d.ts +2 -0
  180. package/dist-types/plugins/moment.d.ts +2 -0
  181. package/dist-types/plugins/nodeAddons.d.ts +2 -0
  182. package/dist-types/plugins/nonce.d.ts +2 -0
  183. package/dist-types/plugins/output.d.ts +2 -0
  184. package/dist-types/plugins/performance.d.ts +5 -0
  185. package/dist-types/plugins/progress.d.ts +2 -0
  186. package/dist-types/plugins/resolve.d.ts +2 -0
  187. package/dist-types/plugins/resourceHints.d.ts +2 -0
  188. package/dist-types/plugins/rsdoctor.d.ts +2 -0
  189. package/dist-types/plugins/rspackProfile.d.ts +2 -0
  190. package/dist-types/plugins/server.d.ts +2 -0
  191. package/dist-types/plugins/splitChunks.d.ts +4 -0
  192. package/dist-types/plugins/sri.d.ts +2 -0
  193. package/dist-types/plugins/swc.d.ts +7 -0
  194. package/dist-types/plugins/target.d.ts +2 -0
  195. package/dist-types/plugins/wasm.d.ts +2 -0
  196. package/dist-types/provider/build.d.ts +3 -0
  197. package/dist-types/provider/createCompiler.d.ts +27 -0
  198. package/dist-types/provider/helpers.d.ts +12 -0
  199. package/dist-types/provider/initConfigs.d.ts +10 -0
  200. package/dist-types/provider/inspectConfig.d.ts +6 -0
  201. package/dist-types/provider/provider.d.ts +2 -0
  202. package/dist-types/provider/rspackConfig.d.ts +8 -0
  203. package/dist-types/rspack/RsbuildHtmlPlugin.d.ts +37 -0
  204. package/dist-types/rspack/preload/HtmlPreloadOrPrefetchPlugin.d.ts +29 -0
  205. package/dist-types/rspack/preload/helpers/determineAsValue.d.ts +22 -0
  206. package/dist-types/rspack/preload/helpers/doesChunkBelongToHtml.d.ts +29 -0
  207. package/dist-types/rspack/preload/helpers/extractChunks.d.ts +28 -0
  208. package/dist-types/rspack/preload/helpers/index.d.ts +4 -0
  209. package/dist-types/rspack/preload/helpers/type.d.ts +13 -0
  210. package/dist-types/server/ansiHTML.d.ts +12 -0
  211. package/dist-types/server/cliShortcuts.d.ts +10 -0
  212. package/dist-types/server/compilerDevMiddleware.d.ts +31 -0
  213. package/dist-types/server/devMiddleware.d.ts +27 -0
  214. package/dist-types/server/devServer.d.ts +60 -0
  215. package/dist-types/server/environment.d.ts +8 -0
  216. package/dist-types/server/getDevMiddlewares.d.ts +25 -0
  217. package/dist-types/server/gzipMiddleware.d.ts +4 -0
  218. package/dist-types/server/helper.d.ts +71 -0
  219. package/dist-types/server/httpServer.d.ts +8 -0
  220. package/dist-types/server/middlewares.d.ts +34 -0
  221. package/dist-types/server/open.d.ts +10 -0
  222. package/dist-types/server/prodServer.d.ts +25 -0
  223. package/dist-types/server/proxy.d.ts +6 -0
  224. package/dist-types/server/restart.d.ts +14 -0
  225. package/dist-types/server/runner/asModule.d.ts +2 -0
  226. package/dist-types/server/runner/basic.d.ts +25 -0
  227. package/dist-types/server/runner/cjs.d.ts +10 -0
  228. package/dist-types/server/runner/esm.d.ts +6 -0
  229. package/dist-types/server/runner/index.d.ts +8 -0
  230. package/dist-types/server/runner/type.d.ts +36 -0
  231. package/dist-types/server/socketServer.d.ts +26 -0
  232. package/dist-types/server/watchFiles.d.ts +14 -0
  233. package/dist-types/types/config.d.ts +1309 -0
  234. package/dist-types/types/context.d.ts +52 -0
  235. package/dist-types/types/hooks.d.ts +146 -0
  236. package/dist-types/types/index.d.ts +8 -0
  237. package/dist-types/types/plugin.d.ts +329 -0
  238. package/dist-types/types/rsbuild.d.ts +156 -0
  239. package/dist-types/types/rspack.d.ts +16 -0
  240. package/dist-types/types/thirdParty.d.ts +176 -0
  241. package/dist-types/types/utils.d.ts +12 -0
  242. package/package.json +61 -0
  243. package/static/openChrome.applescript +95 -0
  244. package/types.d.ts +221 -0
@@ -0,0 +1,694 @@
1
+ (() => {
2
+ var __webpack_modules__ = {
3
+ 616: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
+ const url = __nccwpck_require__(310);
5
+ const path = __nccwpck_require__(17);
6
+ const launch = __nccwpck_require__(453);
7
+ module.exports = (specifiedEditor, srcRoot, onErrorCallback) => {
8
+ if (typeof specifiedEditor === "function") {
9
+ onErrorCallback = specifiedEditor;
10
+ specifiedEditor = undefined;
11
+ }
12
+ if (typeof srcRoot === "function") {
13
+ onErrorCallback = srcRoot;
14
+ srcRoot = undefined;
15
+ }
16
+ srcRoot = srcRoot || process.cwd();
17
+ return function launchEditorMiddleware(req, res) {
18
+ const { file } = url.parse(req.url, true).query || {};
19
+ if (!file) {
20
+ res.statusCode = 500;
21
+ res.end(
22
+ `launch-editor-middleware: required query param "file" is missing.`,
23
+ );
24
+ } else {
25
+ launch(
26
+ path.resolve(srcRoot, file),
27
+ specifiedEditor,
28
+ onErrorCallback,
29
+ );
30
+ res.end();
31
+ }
32
+ };
33
+ };
34
+ },
35
+ 812: (module) => {
36
+ module.exports = {
37
+ atom: "atom",
38
+ Brackets: "brackets",
39
+ "code-insiders": "code-insiders",
40
+ code: "code",
41
+ vscodium: "vscodium",
42
+ codium: "codium",
43
+ emacs: "emacs",
44
+ gvim: "gvim",
45
+ idea: "idea",
46
+ "idea.sh": "idea",
47
+ phpstorm: "phpstorm",
48
+ "phpstorm.sh": "phpstorm",
49
+ pycharm: "pycharm",
50
+ "pycharm.sh": "pycharm",
51
+ rubymine: "rubymine",
52
+ "rubymine.sh": "rubymine",
53
+ sublime_text: "subl",
54
+ vim: "vim",
55
+ webstorm: "webstorm",
56
+ "webstorm.sh": "webstorm",
57
+ goland: "goland",
58
+ "goland.sh": "goland",
59
+ rider: "rider",
60
+ "rider.sh": "rider",
61
+ };
62
+ },
63
+ 829: (module) => {
64
+ module.exports = {
65
+ "/Applications/Atom.app/Contents/MacOS/Atom": "atom",
66
+ "/Applications/Atom Beta.app/Contents/MacOS/Atom Beta":
67
+ "/Applications/Atom Beta.app/Contents/MacOS/Atom Beta",
68
+ "/Applications/Brackets.app/Contents/MacOS/Brackets": "brackets",
69
+ "/Applications/Sublime Text.app/Contents/MacOS/Sublime Text":
70
+ "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl",
71
+ "/Applications/Sublime Text.app/Contents/MacOS/sublime_text":
72
+ "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl",
73
+ "/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2":
74
+ "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl",
75
+ "/Applications/Sublime Text Dev.app/Contents/MacOS/Sublime Text":
76
+ "/Applications/Sublime Text Dev.app/Contents/SharedSupport/bin/subl",
77
+ "/Applications/Visual Studio Code.app/Contents/MacOS/Electron": "code",
78
+ "/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron":
79
+ "code-insiders",
80
+ "/Applications/VSCodium.app/Contents/MacOS/Electron": "codium",
81
+ "/Applications/Cursor.app/Contents/MacOS/Cursor": "cursor",
82
+ "/Applications/AppCode.app/Contents/MacOS/appcode":
83
+ "/Applications/AppCode.app/Contents/MacOS/appcode",
84
+ "/Applications/CLion.app/Contents/MacOS/clion":
85
+ "/Applications/CLion.app/Contents/MacOS/clion",
86
+ "/Applications/IntelliJ IDEA.app/Contents/MacOS/idea":
87
+ "/Applications/IntelliJ IDEA.app/Contents/MacOS/idea",
88
+ "/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea":
89
+ "/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea",
90
+ "/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea":
91
+ "/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea",
92
+ "/Applications/PhpStorm.app/Contents/MacOS/phpstorm":
93
+ "/Applications/PhpStorm.app/Contents/MacOS/phpstorm",
94
+ "/Applications/PyCharm.app/Contents/MacOS/pycharm":
95
+ "/Applications/PyCharm.app/Contents/MacOS/pycharm",
96
+ "/Applications/PyCharm CE.app/Contents/MacOS/pycharm":
97
+ "/Applications/PyCharm CE.app/Contents/MacOS/pycharm",
98
+ "/Applications/RubyMine.app/Contents/MacOS/rubymine":
99
+ "/Applications/RubyMine.app/Contents/MacOS/rubymine",
100
+ "/Applications/WebStorm.app/Contents/MacOS/webstorm":
101
+ "/Applications/WebStorm.app/Contents/MacOS/webstorm",
102
+ "/Applications/MacVim.app/Contents/MacOS/MacVim": "mvim",
103
+ "/Applications/GoLand.app/Contents/MacOS/goland":
104
+ "/Applications/GoLand.app/Contents/MacOS/goland",
105
+ "/Applications/Rider.app/Contents/MacOS/rider":
106
+ "/Applications/Rider.app/Contents/MacOS/rider",
107
+ "/Applications/Zed.app/Contents/MacOS/zed": "zed",
108
+ };
109
+ },
110
+ 902: (module) => {
111
+ module.exports = [
112
+ "Brackets.exe",
113
+ "Code.exe",
114
+ "Code - Insiders.exe",
115
+ "VSCodium.exe",
116
+ "atom.exe",
117
+ "sublime_text.exe",
118
+ "notepad++.exe",
119
+ "clion.exe",
120
+ "clion64.exe",
121
+ "idea.exe",
122
+ "idea64.exe",
123
+ "phpstorm.exe",
124
+ "phpstorm64.exe",
125
+ "pycharm.exe",
126
+ "pycharm64.exe",
127
+ "rubymine.exe",
128
+ "rubymine64.exe",
129
+ "webstorm.exe",
130
+ "webstorm64.exe",
131
+ "goland.exe",
132
+ "goland64.exe",
133
+ "rider.exe",
134
+ "rider64.exe",
135
+ ];
136
+ },
137
+ 542: (module, __unused_webpack_exports, __nccwpck_require__) => {
138
+ const path = __nccwpck_require__(17);
139
+ module.exports = function getArgumentsForPosition(
140
+ editor,
141
+ fileName,
142
+ lineNumber,
143
+ columnNumber = 1,
144
+ ) {
145
+ const editorBasename = path
146
+ .basename(editor)
147
+ .replace(/\.(exe|cmd|bat)$/i, "");
148
+ switch (editorBasename) {
149
+ case "atom":
150
+ case "Atom":
151
+ case "Atom Beta":
152
+ case "subl":
153
+ case "sublime":
154
+ case "sublime_text":
155
+ case "wstorm":
156
+ case "charm":
157
+ case "zed":
158
+ return [`${fileName}:${lineNumber}:${columnNumber}`];
159
+ case "notepad++":
160
+ return ["-n" + lineNumber, "-c" + columnNumber, fileName];
161
+ case "vim":
162
+ case "mvim":
163
+ return [`+call cursor(${lineNumber}, ${columnNumber})`, fileName];
164
+ case "joe":
165
+ case "gvim":
166
+ return ["+" + `${lineNumber}`, fileName];
167
+ case "emacs":
168
+ case "emacsclient":
169
+ return [`+${lineNumber}:${columnNumber}`, fileName];
170
+ case "rmate":
171
+ case "mate":
172
+ case "mine":
173
+ return ["--line", lineNumber, fileName];
174
+ case "code":
175
+ case "Code":
176
+ case "code-insiders":
177
+ case "Code - Insiders":
178
+ case "codium":
179
+ case "cursor":
180
+ case "vscodium":
181
+ case "VSCodium":
182
+ return ["-r", "-g", `${fileName}:${lineNumber}:${columnNumber}`];
183
+ case "appcode":
184
+ case "clion":
185
+ case "clion64":
186
+ case "idea":
187
+ case "idea64":
188
+ case "phpstorm":
189
+ case "phpstorm64":
190
+ case "pycharm":
191
+ case "pycharm64":
192
+ case "rubymine":
193
+ case "rubymine64":
194
+ case "webstorm":
195
+ case "webstorm64":
196
+ case "goland":
197
+ case "goland64":
198
+ case "rider":
199
+ case "rider64":
200
+ return ["--line", lineNumber, "--column", columnNumber, fileName];
201
+ }
202
+ if (process.env.LAUNCH_EDITOR) {
203
+ return [fileName, lineNumber, columnNumber];
204
+ }
205
+ return [fileName];
206
+ };
207
+ },
208
+ 250: (module, __unused_webpack_exports, __nccwpck_require__) => {
209
+ const path = __nccwpck_require__(17);
210
+ const shellQuote = __nccwpck_require__(522);
211
+ const childProcess = __nccwpck_require__(81);
212
+ const COMMON_EDITORS_MACOS = __nccwpck_require__(829);
213
+ const COMMON_EDITORS_LINUX = __nccwpck_require__(812);
214
+ const COMMON_EDITORS_WIN = __nccwpck_require__(902);
215
+ module.exports = function guessEditor(specifiedEditor) {
216
+ if (specifiedEditor) {
217
+ return shellQuote.parse(specifiedEditor);
218
+ }
219
+ if (process.env.LAUNCH_EDITOR) {
220
+ return [process.env.LAUNCH_EDITOR];
221
+ }
222
+ if (process.versions.webcontainer) {
223
+ return [process.env.EDITOR || "code"];
224
+ }
225
+ try {
226
+ if (process.platform === "darwin") {
227
+ const output = childProcess
228
+ .execSync("ps x -o comm=", { stdio: ["pipe", "pipe", "ignore"] })
229
+ .toString();
230
+ const processNames = Object.keys(COMMON_EDITORS_MACOS);
231
+ const processList = output.split("\n");
232
+ for (let i = 0; i < processNames.length; i++) {
233
+ const processName = processNames[i];
234
+ if (processList.includes(processName)) {
235
+ return [COMMON_EDITORS_MACOS[processName]];
236
+ }
237
+ const processNameWithoutApplications = processName.replace(
238
+ "/Applications",
239
+ "",
240
+ );
241
+ if (output.indexOf(processNameWithoutApplications) !== -1) {
242
+ if (processName !== COMMON_EDITORS_MACOS[processName]) {
243
+ return [COMMON_EDITORS_MACOS[processName]];
244
+ }
245
+ const runningProcess = processList.find((procName) =>
246
+ procName.endsWith(processNameWithoutApplications),
247
+ );
248
+ if (runningProcess !== undefined) {
249
+ return [runningProcess];
250
+ }
251
+ }
252
+ }
253
+ } else if (process.platform === "win32") {
254
+ const output = childProcess
255
+ .execSync(
256
+ 'powershell -NoProfile -Command "Get-CimInstance -Query \\"select executablepath from win32_process where executablepath is not null\\" | % { $_.ExecutablePath }"',
257
+ { stdio: ["pipe", "pipe", "ignore"] },
258
+ )
259
+ .toString();
260
+ const runningProcesses = output.split("\r\n");
261
+ for (let i = 0; i < runningProcesses.length; i++) {
262
+ const fullProcessPath = runningProcesses[i].trim();
263
+ const shortProcessName = path.basename(fullProcessPath);
264
+ if (COMMON_EDITORS_WIN.indexOf(shortProcessName) !== -1) {
265
+ return [fullProcessPath];
266
+ }
267
+ }
268
+ } else if (process.platform === "linux") {
269
+ const output = childProcess
270
+ .execSync("ps x --no-heading -o comm --sort=comm", {
271
+ stdio: ["pipe", "pipe", "ignore"],
272
+ })
273
+ .toString();
274
+ const processNames = Object.keys(COMMON_EDITORS_LINUX);
275
+ for (let i = 0; i < processNames.length; i++) {
276
+ const processName = processNames[i];
277
+ if (output.indexOf(processName) !== -1) {
278
+ return [COMMON_EDITORS_LINUX[processName]];
279
+ }
280
+ }
281
+ }
282
+ } catch (ignoreError) {}
283
+ if (process.env.VISUAL) {
284
+ return [process.env.VISUAL];
285
+ } else if (process.env.EDITOR) {
286
+ return [process.env.EDITOR];
287
+ }
288
+ return [null];
289
+ };
290
+ },
291
+ 453: (module, __unused_webpack_exports, __nccwpck_require__) => {
292
+ const fs = __nccwpck_require__(147);
293
+ const os = __nccwpck_require__(37);
294
+ const path = __nccwpck_require__(17);
295
+ const colors = __nccwpck_require__(272);
296
+ const childProcess = __nccwpck_require__(81);
297
+ const guessEditor = __nccwpck_require__(250);
298
+ const getArgumentsForPosition = __nccwpck_require__(542);
299
+ function wrapErrorCallback(cb) {
300
+ return (fileName, errorMessage) => {
301
+ console.log();
302
+ console.log(
303
+ colors.red(
304
+ "Could not open " + path.basename(fileName) + " in the editor.",
305
+ ),
306
+ );
307
+ if (errorMessage) {
308
+ if (errorMessage[errorMessage.length - 1] !== ".") {
309
+ errorMessage += ".";
310
+ }
311
+ console.log(
312
+ colors.red(
313
+ "The editor process exited with an error: " + errorMessage,
314
+ ),
315
+ );
316
+ }
317
+ console.log();
318
+ if (cb) cb(fileName, errorMessage);
319
+ };
320
+ }
321
+ function isTerminalEditor(editor) {
322
+ switch (editor) {
323
+ case "vim":
324
+ case "emacs":
325
+ case "nano":
326
+ return true;
327
+ }
328
+ return false;
329
+ }
330
+ const positionRE = /:(\d+)(:(\d+))?$/;
331
+ function parseFile(file) {
332
+ const fileName = file.replace(positionRE, "");
333
+ const match = file.match(positionRE);
334
+ const lineNumber = match && match[1];
335
+ const columnNumber = match && match[3];
336
+ return { fileName, lineNumber, columnNumber };
337
+ }
338
+ let _childProcess = null;
339
+ function launchEditor(file, specifiedEditor, onErrorCallback) {
340
+ const parsed = parseFile(file);
341
+ let { fileName } = parsed;
342
+ const { lineNumber, columnNumber } = parsed;
343
+ if (!fs.existsSync(fileName)) {
344
+ return;
345
+ }
346
+ if (typeof specifiedEditor === "function") {
347
+ onErrorCallback = specifiedEditor;
348
+ specifiedEditor = undefined;
349
+ }
350
+ onErrorCallback = wrapErrorCallback(onErrorCallback);
351
+ const [editor, ...args] = guessEditor(specifiedEditor);
352
+ if (!editor) {
353
+ onErrorCallback(fileName, null);
354
+ return;
355
+ }
356
+ if (
357
+ process.platform === "linux" &&
358
+ fileName.startsWith("/mnt/") &&
359
+ /Microsoft/i.test(os.release())
360
+ ) {
361
+ fileName = path.relative("", fileName);
362
+ }
363
+ if (lineNumber) {
364
+ const extraArgs = getArgumentsForPosition(
365
+ editor,
366
+ fileName,
367
+ lineNumber,
368
+ columnNumber,
369
+ );
370
+ args.push.apply(args, extraArgs);
371
+ } else {
372
+ args.push(fileName);
373
+ }
374
+ if (_childProcess && isTerminalEditor(editor)) {
375
+ _childProcess.kill("SIGKILL");
376
+ }
377
+ if (process.platform === "win32") {
378
+ function escapeCmdArgs(cmdArgs) {
379
+ return cmdArgs.replace(/([&|<>,;=^])/g, "^$1");
380
+ }
381
+ function doubleQuoteIfNeeded(str) {
382
+ if (str.includes("^")) {
383
+ return `^"${str}^"`;
384
+ } else if (str.includes(" ")) {
385
+ return `"${str}"`;
386
+ }
387
+ return str;
388
+ }
389
+ const launchCommand = [editor, ...args.map(escapeCmdArgs)]
390
+ .map(doubleQuoteIfNeeded)
391
+ .join(" ");
392
+ _childProcess = childProcess.exec(launchCommand, {
393
+ stdio: "inherit",
394
+ shell: true,
395
+ });
396
+ } else {
397
+ _childProcess = childProcess.spawn(editor, args, {
398
+ stdio: "inherit",
399
+ });
400
+ }
401
+ _childProcess.on("exit", function (errorCode) {
402
+ _childProcess = null;
403
+ if (errorCode) {
404
+ onErrorCallback(fileName, "(code " + errorCode + ")");
405
+ }
406
+ });
407
+ _childProcess.on("error", function (error) {
408
+ let { code, message } = error;
409
+ if ("ENOENT" === code) {
410
+ message = `${message} ('${editor}' command does not exist in 'PATH')`;
411
+ }
412
+ onErrorCallback(fileName, message);
413
+ });
414
+ }
415
+ module.exports = launchEditor;
416
+ },
417
+ 522: (__unused_webpack_module, exports, __nccwpck_require__) => {
418
+ "use strict";
419
+ exports.quote = __nccwpck_require__(392);
420
+ exports.parse = __nccwpck_require__(145);
421
+ },
422
+ 145: (module) => {
423
+ "use strict";
424
+ var CONTROL =
425
+ "(?:" +
426
+ [
427
+ "\\|\\|",
428
+ "\\&\\&",
429
+ ";;",
430
+ "\\|\\&",
431
+ "\\<\\(",
432
+ "\\<\\<\\<",
433
+ ">>",
434
+ ">\\&",
435
+ "<\\&",
436
+ "[&;()|<>]",
437
+ ].join("|") +
438
+ ")";
439
+ var controlRE = new RegExp("^" + CONTROL + "$");
440
+ var META = "|&;()<> \\t";
441
+ var SINGLE_QUOTE = '"((\\\\"|[^"])*?)"';
442
+ var DOUBLE_QUOTE = "'((\\\\'|[^'])*?)'";
443
+ var hash = /^#$/;
444
+ var SQ = "'";
445
+ var DQ = '"';
446
+ var DS = "$";
447
+ var TOKEN = "";
448
+ var mult = 4294967296;
449
+ for (var i = 0; i < 4; i++) {
450
+ TOKEN += (mult * Math.random()).toString(16);
451
+ }
452
+ var startsWithToken = new RegExp("^" + TOKEN);
453
+ function matchAll(s, r) {
454
+ var origIndex = r.lastIndex;
455
+ var matches = [];
456
+ var matchObj;
457
+ while ((matchObj = r.exec(s))) {
458
+ matches.push(matchObj);
459
+ if (r.lastIndex === matchObj.index) {
460
+ r.lastIndex += 1;
461
+ }
462
+ }
463
+ r.lastIndex = origIndex;
464
+ return matches;
465
+ }
466
+ function getVar(env, pre, key) {
467
+ var r = typeof env === "function" ? env(key) : env[key];
468
+ if (typeof r === "undefined" && key != "") {
469
+ r = "";
470
+ } else if (typeof r === "undefined") {
471
+ r = "$";
472
+ }
473
+ if (typeof r === "object") {
474
+ return pre + TOKEN + JSON.stringify(r) + TOKEN;
475
+ }
476
+ return pre + r;
477
+ }
478
+ function parseInternal(string, env, opts) {
479
+ if (!opts) {
480
+ opts = {};
481
+ }
482
+ var BS = opts.escape || "\\";
483
+ var BAREWORD = "(\\" + BS + "['\"" + META + "]|[^\\s'\"" + META + "])+";
484
+ var chunker = new RegExp(
485
+ [
486
+ "(" + CONTROL + ")",
487
+ "(" + BAREWORD + "|" + SINGLE_QUOTE + "|" + DOUBLE_QUOTE + ")+",
488
+ ].join("|"),
489
+ "g",
490
+ );
491
+ var matches = matchAll(string, chunker);
492
+ if (matches.length === 0) {
493
+ return [];
494
+ }
495
+ if (!env) {
496
+ env = {};
497
+ }
498
+ var commented = false;
499
+ return matches
500
+ .map(function (match) {
501
+ var s = match[0];
502
+ if (!s || commented) {
503
+ return void undefined;
504
+ }
505
+ if (controlRE.test(s)) {
506
+ return { op: s };
507
+ }
508
+ var quote = false;
509
+ var esc = false;
510
+ var out = "";
511
+ var isGlob = false;
512
+ var i;
513
+ function parseEnvVar() {
514
+ i += 1;
515
+ var varend;
516
+ var varname;
517
+ var char = s.charAt(i);
518
+ if (char === "{") {
519
+ i += 1;
520
+ if (s.charAt(i) === "}") {
521
+ throw new Error("Bad substitution: " + s.slice(i - 2, i + 1));
522
+ }
523
+ varend = s.indexOf("}", i);
524
+ if (varend < 0) {
525
+ throw new Error("Bad substitution: " + s.slice(i));
526
+ }
527
+ varname = s.slice(i, varend);
528
+ i = varend;
529
+ } else if (/[*@#?$!_-]/.test(char)) {
530
+ varname = char;
531
+ i += 1;
532
+ } else {
533
+ var slicedFromI = s.slice(i);
534
+ varend = slicedFromI.match(/[^\w\d_]/);
535
+ if (!varend) {
536
+ varname = slicedFromI;
537
+ i = s.length;
538
+ } else {
539
+ varname = slicedFromI.slice(0, varend.index);
540
+ i += varend.index - 1;
541
+ }
542
+ }
543
+ return getVar(env, "", varname);
544
+ }
545
+ for (i = 0; i < s.length; i++) {
546
+ var c = s.charAt(i);
547
+ isGlob = isGlob || (!quote && (c === "*" || c === "?"));
548
+ if (esc) {
549
+ out += c;
550
+ esc = false;
551
+ } else if (quote) {
552
+ if (c === quote) {
553
+ quote = false;
554
+ } else if (quote == SQ) {
555
+ out += c;
556
+ } else {
557
+ if (c === BS) {
558
+ i += 1;
559
+ c = s.charAt(i);
560
+ if (c === DQ || c === BS || c === DS) {
561
+ out += c;
562
+ } else {
563
+ out += BS + c;
564
+ }
565
+ } else if (c === DS) {
566
+ out += parseEnvVar();
567
+ } else {
568
+ out += c;
569
+ }
570
+ }
571
+ } else if (c === DQ || c === SQ) {
572
+ quote = c;
573
+ } else if (controlRE.test(c)) {
574
+ return { op: s };
575
+ } else if (hash.test(c)) {
576
+ commented = true;
577
+ var commentObj = { comment: string.slice(match.index + i + 1) };
578
+ if (out.length) {
579
+ return [out, commentObj];
580
+ }
581
+ return [commentObj];
582
+ } else if (c === BS) {
583
+ esc = true;
584
+ } else if (c === DS) {
585
+ out += parseEnvVar();
586
+ } else {
587
+ out += c;
588
+ }
589
+ }
590
+ if (isGlob) {
591
+ return { op: "glob", pattern: out };
592
+ }
593
+ return out;
594
+ })
595
+ .reduce(function (prev, arg) {
596
+ return typeof arg === "undefined" ? prev : prev.concat(arg);
597
+ }, []);
598
+ }
599
+ module.exports = function parse(s, env, opts) {
600
+ var mapped = parseInternal(s, env, opts);
601
+ if (typeof env !== "function") {
602
+ return mapped;
603
+ }
604
+ return mapped.reduce(function (acc, s) {
605
+ if (typeof s === "object") {
606
+ return acc.concat(s);
607
+ }
608
+ var xs = s.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g"));
609
+ if (xs.length === 1) {
610
+ return acc.concat(xs[0]);
611
+ }
612
+ return acc.concat(
613
+ xs.filter(Boolean).map(function (x) {
614
+ if (startsWithToken.test(x)) {
615
+ return JSON.parse(x.split(TOKEN)[1]);
616
+ }
617
+ return x;
618
+ }),
619
+ );
620
+ }, []);
621
+ };
622
+ },
623
+ 392: (module) => {
624
+ "use strict";
625
+ module.exports = function quote(xs) {
626
+ return xs
627
+ .map(function (s) {
628
+ if (s && typeof s === "object") {
629
+ return s.op.replace(/(.)/g, "\\$1");
630
+ }
631
+ if (/["\s]/.test(s) && !/'/.test(s)) {
632
+ return "'" + s.replace(/(['\\])/g, "\\$1") + "'";
633
+ }
634
+ if (/["'\s]/.test(s)) {
635
+ return '"' + s.replace(/(["\\$`!])/g, "\\$1") + '"';
636
+ }
637
+ return String(s).replace(
638
+ /([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g,
639
+ "$1\\$2",
640
+ );
641
+ })
642
+ .join(" ");
643
+ };
644
+ },
645
+ 272: (module) => {
646
+ "use strict";
647
+ module.exports = require("../picocolors");
648
+ },
649
+ 81: (module) => {
650
+ "use strict";
651
+ module.exports = require("child_process");
652
+ },
653
+ 147: (module) => {
654
+ "use strict";
655
+ module.exports = require("fs");
656
+ },
657
+ 37: (module) => {
658
+ "use strict";
659
+ module.exports = require("os");
660
+ },
661
+ 17: (module) => {
662
+ "use strict";
663
+ module.exports = require("path");
664
+ },
665
+ 310: (module) => {
666
+ "use strict";
667
+ module.exports = require("url");
668
+ },
669
+ };
670
+ var __webpack_module_cache__ = {};
671
+ function __nccwpck_require__(moduleId) {
672
+ var cachedModule = __webpack_module_cache__[moduleId];
673
+ if (cachedModule !== undefined) {
674
+ return cachedModule.exports;
675
+ }
676
+ var module = (__webpack_module_cache__[moduleId] = { exports: {} });
677
+ var threw = true;
678
+ try {
679
+ __webpack_modules__[moduleId](
680
+ module,
681
+ module.exports,
682
+ __nccwpck_require__,
683
+ );
684
+ threw = false;
685
+ } finally {
686
+ if (threw) delete __webpack_module_cache__[moduleId];
687
+ }
688
+ return module.exports;
689
+ }
690
+ if (typeof __nccwpck_require__ !== "undefined")
691
+ __nccwpck_require__.ab = __dirname + "/";
692
+ var __webpack_exports__ = __nccwpck_require__(616);
693
+ module.exports = __webpack_exports__;
694
+ })();