@rsbuild/core 1.7.2 → 2.0.0-alpha.0

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 (119) hide show
  1. package/compiled/css-loader/index.js +2 -2
  2. package/compiled/html-rspack-plugin/index.js +14 -14
  3. package/compiled/http-proxy-middleware/index.d.ts +2 -2
  4. package/compiled/postcss/index.js +1 -1
  5. package/compiled/postcss-loader/index.js +6 -6
  6. package/compiled/ws/index.js +59 -54
  7. package/compiled/ws/package.json +1 -1
  8. package/dist/131.js +1000 -1065
  9. package/dist/31.js +336 -0
  10. package/dist/710.js +445 -0
  11. package/dist/743.js +7 -0
  12. package/dist/{136.mjs → 88.js} +11 -13
  13. package/dist/client/hmr.js +0 -1
  14. package/dist/client/overlay.js +32 -21
  15. package/dist/connect.js +581 -0
  16. package/dist/connect.js.LICENSE.txt +54 -0
  17. package/dist/cors.js +188 -0
  18. package/dist/cors.js.LICENSE.txt +11 -0
  19. package/dist/launch-editor-middleware.js +439 -0
  20. package/dist/manifest-plugin.js +177 -0
  21. package/dist/memfs.js +3644 -0
  22. package/dist/{0~open.js → open.js} +21 -13
  23. package/dist/{0~range-parser.js → range-parser.js} +1 -1
  24. package/dist/remapping.js +196 -0
  25. package/dist/sirv.js +122 -0
  26. package/dist/tinyglobby.js +1463 -0
  27. package/dist/transformLoader.mjs +1 -1
  28. package/dist/transformRawLoader.mjs +1 -1
  29. package/dist-types/{provider/build.d.ts → build.d.ts} +2 -2
  30. package/dist-types/cli/commands.d.ts +1 -1
  31. package/dist-types/configChain.d.ts +0 -2
  32. package/dist-types/constants.d.ts +2 -3
  33. package/dist-types/{provider/createCompiler.d.ts → createCompiler.d.ts} +1 -1
  34. package/dist-types/defaultConfig.d.ts +1 -1
  35. package/dist-types/helpers/index.d.ts +1 -1
  36. package/dist-types/helpers/url.d.ts +0 -1
  37. package/dist-types/helpers/vendors.d.ts +0 -13
  38. package/dist-types/hooks.d.ts +3 -5
  39. package/dist-types/index.d.ts +1 -1
  40. package/dist-types/{provider/initConfigs.d.ts → initConfigs.d.ts} +1 -1
  41. package/dist-types/inspectConfig.d.ts +5 -33
  42. package/dist-types/pluginHelper.d.ts +1 -1
  43. package/dist-types/plugins/css.d.ts +1 -1
  44. package/dist-types/plugins/inlineChunk.d.ts +1 -1
  45. package/dist-types/plugins/minimize.d.ts +2 -2
  46. package/dist-types/{provider/rspackConfig.d.ts → rspackConfig.d.ts} +1 -1
  47. package/dist-types/server/assets-middleware/setupOutputFileSystem.d.ts +1 -1
  48. package/dist-types/server/browserLogs.d.ts +1 -1
  49. package/dist-types/server/devMiddlewares.d.ts +1 -1
  50. package/dist-types/server/devServer.d.ts +1 -1
  51. package/dist-types/server/gzipMiddleware.d.ts +1 -1
  52. package/dist-types/server/helper.d.ts +3 -2
  53. package/dist-types/server/proxy.d.ts +1 -1
  54. package/dist-types/server/socketServer.d.ts +1 -1
  55. package/dist-types/types/config.d.ts +7 -51
  56. package/dist-types/types/context.d.ts +3 -2
  57. package/dist-types/types/hooks.d.ts +9 -9
  58. package/dist-types/types/plugin.d.ts +3 -40
  59. package/dist-types/types/rsbuild.d.ts +6 -31
  60. package/dist-types/types/thirdParty.d.ts +1 -4
  61. package/package.json +14 -19
  62. package/compiled/@jridgewell/remapping/index.d.ts +0 -1
  63. package/compiled/@jridgewell/remapping/index.js +0 -1222
  64. package/compiled/@jridgewell/remapping/license +0 -19
  65. package/compiled/@jridgewell/remapping/package.json +0 -1
  66. package/compiled/@jridgewell/trace-mapping/index.d.ts +0 -194
  67. package/compiled/@jridgewell/trace-mapping/index.js +0 -1408
  68. package/compiled/@jridgewell/trace-mapping/license +0 -19
  69. package/compiled/@jridgewell/trace-mapping/package.json +0 -1
  70. package/compiled/connect/index.d.ts +0 -90
  71. package/compiled/connect/index.js +0 -1240
  72. package/compiled/connect/license +0 -25
  73. package/compiled/connect/package.json +0 -1
  74. package/compiled/cors/index.d.ts +0 -56
  75. package/compiled/cors/index.js +0 -371
  76. package/compiled/cors/license +0 -22
  77. package/compiled/cors/package.json +0 -1
  78. package/compiled/launch-editor-middleware/index.d.ts +0 -1
  79. package/compiled/launch-editor-middleware/index.js +0 -719
  80. package/compiled/launch-editor-middleware/license +0 -21
  81. package/compiled/launch-editor-middleware/package.json +0 -1
  82. package/compiled/memfs/index.d.ts +0 -1462
  83. package/compiled/memfs/index.js +0 -1
  84. package/compiled/memfs/license +0 -201
  85. package/compiled/memfs/package.json +0 -1
  86. package/compiled/mrmime/index.d.ts +0 -4
  87. package/compiled/mrmime/index.js +0 -456
  88. package/compiled/mrmime/package.json +0 -1
  89. package/compiled/picocolors/index.d.ts +0 -55
  90. package/compiled/picocolors/index.js +0 -108
  91. package/compiled/picocolors/license +0 -15
  92. package/compiled/picocolors/package.json +0 -1
  93. package/compiled/rspack-manifest-plugin/index.d.ts +0 -48
  94. package/compiled/rspack-manifest-plugin/index.js +0 -409
  95. package/compiled/rspack-manifest-plugin/license +0 -21
  96. package/compiled/rspack-manifest-plugin/package.json +0 -1
  97. package/compiled/sirv/index.d.ts +0 -1
  98. package/compiled/sirv/index.js +0 -274
  99. package/compiled/sirv/package.json +0 -1
  100. package/compiled/tinyglobby/index.d.ts +0 -46
  101. package/compiled/tinyglobby/index.js +0 -2664
  102. package/compiled/tinyglobby/license +0 -21
  103. package/compiled/tinyglobby/package.json +0 -1
  104. package/compiled/webpack-bundle-analyzer/index.d.ts +0 -160
  105. package/compiled/webpack-bundle-analyzer/index.js +0 -23
  106. package/compiled/webpack-bundle-analyzer/license +0 -20
  107. package/compiled/webpack-bundle-analyzer/package.json +0 -1
  108. package/compiled/webpack-bundle-analyzer/public/viewer.js +0 -16
  109. package/compiled/webpack-bundle-analyzer/public/viewer.js.LICENSE.txt +0 -10
  110. package/dist/2~open.cjs +0 -436
  111. package/dist/2~range-parser.cjs +0 -52
  112. package/dist/2~range-parser.cjs.LICENSE.txt +0 -6
  113. package/dist/index.cjs +0 -9456
  114. package/dist/index.cjs.LICENSE.txt +0 -26
  115. package/dist-types/plugins/bundleAnalyzer.d.ts +0 -2
  116. package/dist-types/plugins/performance.d.ts +0 -5
  117. package/dist-types/provider/helpers.d.ts +0 -12
  118. package/dist-types/provider/provider.d.ts +0 -2
  119. /package/dist/{0~range-parser.js.LICENSE.txt → range-parser.js.LICENSE.txt} +0 -0
package/dist/cors.js ADDED
@@ -0,0 +1,188 @@
1
+ /*! For license information please see cors.js.LICENSE.txt */
2
+ import { __webpack_require__ } from "./rslib-runtime.js";
3
+ __webpack_require__.add({
4
+ "../../node_modules/.pnpm/cors@2.8.5/node_modules/cors/lib/index.js" (module, __unused_rspack_exports, __webpack_require__) {
5
+ !function() {
6
+ 'use strict';
7
+ var assign = __webpack_require__("../../node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js"), vary = __webpack_require__("../../node_modules/.pnpm/vary@1.1.2/node_modules/vary/index.js"), defaults = {
8
+ origin: '*',
9
+ methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
10
+ preflightContinue: !1,
11
+ optionsSuccessStatus: 204
12
+ };
13
+ function isString(s) {
14
+ return 'string' == typeof s || s instanceof String;
15
+ }
16
+ function isOriginAllowed(origin, allowedOrigin) {
17
+ if (Array.isArray(allowedOrigin)) {
18
+ for(var i = 0; i < allowedOrigin.length; ++i)if (isOriginAllowed(origin, allowedOrigin[i])) return !0;
19
+ return !1;
20
+ }
21
+ return isString(allowedOrigin) ? origin === allowedOrigin : allowedOrigin instanceof RegExp ? allowedOrigin.test(origin) : !!allowedOrigin;
22
+ }
23
+ function configureOrigin(options, req) {
24
+ var requestOrigin = req.headers.origin, headers = [];
25
+ return options.origin && '*' !== options.origin ? (isString(options.origin) ? headers.push([
26
+ {
27
+ key: 'Access-Control-Allow-Origin',
28
+ value: options.origin
29
+ }
30
+ ]) : headers.push([
31
+ {
32
+ key: 'Access-Control-Allow-Origin',
33
+ value: !!isOriginAllowed(requestOrigin, options.origin) && requestOrigin
34
+ }
35
+ ]), headers.push([
36
+ {
37
+ key: 'Vary',
38
+ value: 'Origin'
39
+ }
40
+ ])) : headers.push([
41
+ {
42
+ key: 'Access-Control-Allow-Origin',
43
+ value: '*'
44
+ }
45
+ ]), headers;
46
+ }
47
+ function configureMethods(options) {
48
+ var methods = options.methods;
49
+ return methods.join && (methods = options.methods.join(',')), {
50
+ key: 'Access-Control-Allow-Methods',
51
+ value: methods
52
+ };
53
+ }
54
+ function configureCredentials(options) {
55
+ return !0 === options.credentials ? {
56
+ key: 'Access-Control-Allow-Credentials',
57
+ value: 'true'
58
+ } : null;
59
+ }
60
+ function configureAllowedHeaders(options, req) {
61
+ var allowedHeaders = options.allowedHeaders || options.headers, headers = [];
62
+ return allowedHeaders ? allowedHeaders.join && (allowedHeaders = allowedHeaders.join(',')) : (allowedHeaders = req.headers['access-control-request-headers'], headers.push([
63
+ {
64
+ key: 'Vary',
65
+ value: 'Access-Control-Request-Headers'
66
+ }
67
+ ])), allowedHeaders && allowedHeaders.length && headers.push([
68
+ {
69
+ key: 'Access-Control-Allow-Headers',
70
+ value: allowedHeaders
71
+ }
72
+ ]), headers;
73
+ }
74
+ function configureExposedHeaders(options) {
75
+ var headers = options.exposedHeaders;
76
+ return headers && (headers.join && (headers = headers.join(',')), headers && headers.length) ? {
77
+ key: 'Access-Control-Expose-Headers',
78
+ value: headers
79
+ } : null;
80
+ }
81
+ function configureMaxAge(options) {
82
+ var maxAge = ('number' == typeof options.maxAge || options.maxAge) && options.maxAge.toString();
83
+ return maxAge && maxAge.length ? {
84
+ key: 'Access-Control-Max-Age',
85
+ value: maxAge
86
+ } : null;
87
+ }
88
+ function applyHeaders(headers, res) {
89
+ for(var i = 0, n = headers.length; i < n; i++){
90
+ var header = headers[i];
91
+ header && (Array.isArray(header) ? applyHeaders(header, res) : 'Vary' === header.key && header.value ? vary(res, header.value) : header.value && res.setHeader(header.key, header.value));
92
+ }
93
+ }
94
+ function cors(options, req, res, next) {
95
+ var headers = [];
96
+ 'OPTIONS' === (req.method && req.method.toUpperCase && req.method.toUpperCase()) ? (headers.push(configureOrigin(options, req)), headers.push(configureCredentials(options, req)), headers.push(configureMethods(options, req)), headers.push(configureAllowedHeaders(options, req)), headers.push(configureMaxAge(options, req)), headers.push(configureExposedHeaders(options, req)), applyHeaders(headers, res), options.preflightContinue ? next() : (res.statusCode = options.optionsSuccessStatus, res.setHeader('Content-Length', '0'), res.end())) : (headers.push(configureOrigin(options, req)), headers.push(configureCredentials(options, req)), headers.push(configureExposedHeaders(options, req)), applyHeaders(headers, res), next());
97
+ }
98
+ module.exports = function middlewareWrapper(o) {
99
+ var optionsCallback = null;
100
+ return optionsCallback = 'function' == typeof o ? o : function(req, cb) {
101
+ cb(null, o);
102
+ }, function corsMiddleware(req, res, next) {
103
+ optionsCallback(req, function(err, options) {
104
+ if (err) next(err);
105
+ else {
106
+ var corsOptions = assign({}, defaults, options), originCallback = null;
107
+ corsOptions.origin && 'function' == typeof corsOptions.origin ? originCallback = corsOptions.origin : corsOptions.origin && (originCallback = function(origin, cb) {
108
+ cb(null, corsOptions.origin);
109
+ }), originCallback ? originCallback(req.headers.origin, function(err2, origin) {
110
+ err2 || !origin ? next(err2) : (corsOptions.origin = origin, cors(corsOptions, req, res, next));
111
+ }) : next();
112
+ }
113
+ });
114
+ };
115
+ };
116
+ }();
117
+ },
118
+ "../../node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js" (module) {
119
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols, hasOwnProperty = Object.prototype.hasOwnProperty, propIsEnumerable = Object.prototype.propertyIsEnumerable;
120
+ function toObject(val) {
121
+ if (null == val) throw TypeError('Object.assign cannot be called with null or undefined');
122
+ return Object(val);
123
+ }
124
+ module.exports = !function shouldUseNative() {
125
+ try {
126
+ if (!Object.assign) return !1;
127
+ var test1 = new String('abc');
128
+ if (test1[5] = 'de', '5' === Object.getOwnPropertyNames(test1)[0]) return !1;
129
+ for(var test2 = {}, i = 0; i < 10; i++)test2['_' + String.fromCharCode(i)] = i;
130
+ var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
131
+ return test2[n];
132
+ });
133
+ if ('0123456789' !== order2.join('')) return !1;
134
+ var test3 = {};
135
+ if ('abcdefghijklmnopqrst'.split('').forEach(function(letter) {
136
+ test3[letter] = letter;
137
+ }), 'abcdefghijklmnopqrst' !== Object.keys(Object.assign({}, test3)).join('')) return !1;
138
+ return !0;
139
+ } catch (err) {
140
+ return !1;
141
+ }
142
+ }() ? function(target, source) {
143
+ for(var from, symbols, to = toObject(target), s = 1; s < arguments.length; s++){
144
+ for(var key in from = Object(arguments[s]))hasOwnProperty.call(from, key) && (to[key] = from[key]);
145
+ if (getOwnPropertySymbols) {
146
+ symbols = getOwnPropertySymbols(from);
147
+ for(var i = 0; i < symbols.length; i++)propIsEnumerable.call(from, symbols[i]) && (to[symbols[i]] = from[symbols[i]]);
148
+ }
149
+ }
150
+ return to;
151
+ } : Object.assign;
152
+ },
153
+ "../../node_modules/.pnpm/vary@1.1.2/node_modules/vary/index.js" (module) {
154
+ module.exports = vary, module.exports.append = append;
155
+ var FIELD_NAME_REGEXP = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
156
+ function append(header, field) {
157
+ if ('string' != typeof header) throw TypeError('header argument is required');
158
+ if (!field) throw TypeError('field argument is required');
159
+ for(var fields = Array.isArray(field) ? field : parse(String(field)), j = 0; j < fields.length; j++)if (!FIELD_NAME_REGEXP.test(fields[j])) throw TypeError('field argument contains an invalid header name');
160
+ if ('*' === header) return header;
161
+ var val = header, vals = parse(header.toLowerCase());
162
+ if (-1 !== fields.indexOf('*') || -1 !== vals.indexOf('*')) return '*';
163
+ for(var i = 0; i < fields.length; i++){
164
+ var fld = fields[i].toLowerCase();
165
+ -1 === vals.indexOf(fld) && (vals.push(fld), val = val ? val + ', ' + fields[i] : fields[i]);
166
+ }
167
+ return val;
168
+ }
169
+ function parse(header) {
170
+ for(var end = 0, list = [], start = 0, i = 0, len = header.length; i < len; i++)switch(header.charCodeAt(i)){
171
+ case 0x20:
172
+ start === end && (start = end = i + 1);
173
+ break;
174
+ case 0x2c:
175
+ list.push(header.substring(start, end)), start = end = i + 1;
176
+ break;
177
+ default:
178
+ end = i + 1;
179
+ }
180
+ return list.push(header.substring(start, end)), list;
181
+ }
182
+ function vary(res, field) {
183
+ if (!res || !res.getHeader || !res.setHeader) throw TypeError('res argument is required');
184
+ var val = res.getHeader('Vary') || '';
185
+ (val = append(Array.isArray(val) ? val.join(', ') : String(val), field)) && res.setHeader('Vary', val);
186
+ }
187
+ }
188
+ });
@@ -0,0 +1,11 @@
1
+ /*
2
+ object-assign
3
+ (c) Sindre Sorhus
4
+ @license MIT
5
+ */
6
+
7
+ /*!
8
+ * vary
9
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
10
+ * MIT Licensed
11
+ */
@@ -0,0 +1,439 @@
1
+ import * as __rspack_external_child_process from "child_process";
2
+ import { __webpack_require__ } from "./rslib-runtime.js";
3
+ import "./131.js";
4
+ __webpack_require__.add({
5
+ "../../node_modules/.pnpm/launch-editor-middleware@2.12.0/node_modules/launch-editor-middleware/index.js" (module, __unused_rspack_exports, __webpack_require__) {
6
+ let path = __webpack_require__("path"), launch = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/index.js");
7
+ module.exports = (specifiedEditor, srcRoot, onErrorCallback)=>('function' == typeof specifiedEditor && (onErrorCallback = specifiedEditor, specifiedEditor = void 0), 'function' == typeof srcRoot && (onErrorCallback = srcRoot, srcRoot = void 0), srcRoot = srcRoot || process.cwd(), function launchEditorMiddleware(req, res) {
8
+ let url;
9
+ try {
10
+ let fullUrl = req.url.startsWith('http') ? req.url : `http://localhost${req.url}`;
11
+ url = new URL(fullUrl);
12
+ } catch (_err) {
13
+ res.statusCode = 500, res.end("launch-editor-middleware: invalid URL.");
14
+ return;
15
+ }
16
+ let file = url.searchParams.get('file');
17
+ file ? (launch(file.startsWith('file://') ? file : path.resolve(srcRoot, file), specifiedEditor, onErrorCallback), res.end()) : (res.statusCode = 500, res.end('launch-editor-middleware: required query param "file" is missing.'));
18
+ });
19
+ },
20
+ "../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/editor-info/linux.js" (module) {
21
+ module.exports = {
22
+ atom: 'atom',
23
+ Brackets: 'brackets',
24
+ 'code-insiders': 'code-insiders',
25
+ code: 'code',
26
+ vscodium: 'vscodium',
27
+ codium: 'codium',
28
+ cursor: 'cursor',
29
+ trae: 'trae',
30
+ emacs: 'emacs',
31
+ gvim: 'gvim',
32
+ idea: 'idea',
33
+ 'idea.sh': 'idea',
34
+ phpstorm: 'phpstorm',
35
+ 'phpstorm.sh': 'phpstorm',
36
+ pycharm: 'pycharm',
37
+ 'pycharm.sh': 'pycharm',
38
+ rubymine: 'rubymine',
39
+ 'rubymine.sh': 'rubymine',
40
+ sublime_text: 'subl',
41
+ vim: 'vim',
42
+ webstorm: 'webstorm',
43
+ 'webstorm.sh': 'webstorm',
44
+ goland: 'goland',
45
+ 'goland.sh': 'goland',
46
+ rider: 'rider',
47
+ 'rider.sh': 'rider',
48
+ zed: 'zed'
49
+ };
50
+ },
51
+ "../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/editor-info/macos.js" (module) {
52
+ module.exports = {
53
+ '/Applications/Atom.app/Contents/MacOS/Atom': 'atom',
54
+ '/Applications/Atom Beta.app/Contents/MacOS/Atom Beta': '/Applications/Atom Beta.app/Contents/MacOS/Atom Beta',
55
+ '/Applications/Brackets.app/Contents/MacOS/Brackets': 'brackets',
56
+ '/Applications/Sublime Text.app/Contents/MacOS/Sublime Text': '/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl',
57
+ '/Applications/Sublime Text.app/Contents/MacOS/sublime_text': '/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl',
58
+ '/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2': '/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl',
59
+ '/Applications/Sublime Text Dev.app/Contents/MacOS/Sublime Text': '/Applications/Sublime Text Dev.app/Contents/SharedSupport/bin/subl',
60
+ '/Applications/Visual Studio Code.app/Contents/MacOS/Electron': 'code',
61
+ '/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron': 'code-insiders',
62
+ '/Applications/VSCodium.app/Contents/MacOS/Electron': 'codium',
63
+ '/Applications/Cursor.app/Contents/MacOS/Cursor': 'cursor',
64
+ '/Applications/Trae.app/Contents/MacOS/Electron': 'trae',
65
+ '/Applications/AppCode.app/Contents/MacOS/appcode': '/Applications/AppCode.app/Contents/MacOS/appcode',
66
+ '/Applications/CLion.app/Contents/MacOS/clion': '/Applications/CLion.app/Contents/MacOS/clion',
67
+ '/Applications/IntelliJ IDEA.app/Contents/MacOS/idea': '/Applications/IntelliJ IDEA.app/Contents/MacOS/idea',
68
+ '/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea': '/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea',
69
+ '/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea': '/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea',
70
+ '/Applications/PhpStorm.app/Contents/MacOS/phpstorm': '/Applications/PhpStorm.app/Contents/MacOS/phpstorm',
71
+ '/Applications/PyCharm.app/Contents/MacOS/pycharm': '/Applications/PyCharm.app/Contents/MacOS/pycharm',
72
+ '/Applications/PyCharm CE.app/Contents/MacOS/pycharm': '/Applications/PyCharm CE.app/Contents/MacOS/pycharm',
73
+ '/Applications/RubyMine.app/Contents/MacOS/rubymine': '/Applications/RubyMine.app/Contents/MacOS/rubymine',
74
+ '/Applications/WebStorm.app/Contents/MacOS/webstorm': '/Applications/WebStorm.app/Contents/MacOS/webstorm',
75
+ '/Applications/MacVim.app/Contents/MacOS/MacVim': 'mvim',
76
+ '/Applications/GoLand.app/Contents/MacOS/goland': '/Applications/GoLand.app/Contents/MacOS/goland',
77
+ '/Applications/Rider.app/Contents/MacOS/rider': '/Applications/Rider.app/Contents/MacOS/rider',
78
+ '/Applications/Zed.app/Contents/MacOS/zed': 'zed'
79
+ };
80
+ },
81
+ "../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/editor-info/windows.js" (module) {
82
+ module.exports = [
83
+ 'Brackets.exe',
84
+ 'Code.exe',
85
+ 'Code - Insiders.exe',
86
+ 'VSCodium.exe',
87
+ 'Cursor.exe',
88
+ 'atom.exe',
89
+ 'sublime_text.exe',
90
+ 'notepad++.exe',
91
+ 'clion.exe',
92
+ 'clion64.exe',
93
+ 'idea.exe',
94
+ 'idea64.exe',
95
+ 'phpstorm.exe',
96
+ 'phpstorm64.exe',
97
+ 'pycharm.exe',
98
+ 'pycharm64.exe',
99
+ 'rubymine.exe',
100
+ 'rubymine64.exe',
101
+ 'webstorm.exe',
102
+ 'webstorm64.exe',
103
+ 'goland.exe',
104
+ 'goland64.exe',
105
+ 'rider.exe',
106
+ 'rider64.exe',
107
+ 'trae.exe'
108
+ ];
109
+ },
110
+ "../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/get-args.js" (module, __unused_rspack_exports, __webpack_require__) {
111
+ let path = __webpack_require__("path");
112
+ module.exports = function getArgumentsForPosition(editor, fileName, lineNumber, columnNumber = 1) {
113
+ switch(path.basename(editor).replace(/\.(exe|cmd|bat)$/i, '')){
114
+ case 'atom':
115
+ case 'Atom':
116
+ case 'Atom Beta':
117
+ case 'subl':
118
+ case 'sublime':
119
+ case 'sublime_text':
120
+ case 'wstorm':
121
+ case 'charm':
122
+ case 'zed':
123
+ return [
124
+ `${fileName}:${lineNumber}:${columnNumber}`
125
+ ];
126
+ case 'notepad++':
127
+ return [
128
+ '-n' + lineNumber,
129
+ '-c' + columnNumber,
130
+ fileName
131
+ ];
132
+ case 'vim':
133
+ case 'mvim':
134
+ return [
135
+ `+call cursor(${lineNumber}, ${columnNumber})`,
136
+ fileName
137
+ ];
138
+ case 'joe':
139
+ case 'gvim':
140
+ return [
141
+ `+${lineNumber}`,
142
+ fileName
143
+ ];
144
+ case 'emacs':
145
+ case 'emacsclient':
146
+ return [
147
+ `+${lineNumber}:${columnNumber}`,
148
+ fileName
149
+ ];
150
+ case 'rmate':
151
+ case 'mate':
152
+ case 'mine':
153
+ return [
154
+ '--line',
155
+ lineNumber,
156
+ fileName
157
+ ];
158
+ case 'code':
159
+ case 'Code':
160
+ case 'code-insiders':
161
+ case 'Code - Insiders':
162
+ case 'codium':
163
+ case 'trae':
164
+ case 'cursor':
165
+ case 'vscodium':
166
+ case 'VSCodium':
167
+ return [
168
+ '-r',
169
+ '-g',
170
+ `${fileName}:${lineNumber}:${columnNumber}`
171
+ ];
172
+ case 'appcode':
173
+ case 'clion':
174
+ case 'clion64':
175
+ case 'idea':
176
+ case 'idea64':
177
+ case 'phpstorm':
178
+ case 'phpstorm64':
179
+ case 'pycharm':
180
+ case 'pycharm64':
181
+ case 'rubymine':
182
+ case 'rubymine64':
183
+ case 'webstorm':
184
+ case 'webstorm64':
185
+ case 'goland':
186
+ case 'goland64':
187
+ case 'rider':
188
+ case 'rider64':
189
+ return [
190
+ '--line',
191
+ lineNumber,
192
+ '--column',
193
+ columnNumber,
194
+ fileName
195
+ ];
196
+ }
197
+ return process.env.LAUNCH_EDITOR ? [
198
+ fileName,
199
+ lineNumber,
200
+ columnNumber
201
+ ] : [
202
+ fileName
203
+ ];
204
+ };
205
+ },
206
+ "../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/guess.js" (module, __unused_rspack_exports, __webpack_require__) {
207
+ let path = __webpack_require__("path"), shellQuote = __webpack_require__("../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/index.js"), childProcess = __webpack_require__("child_process"), COMMON_EDITORS_MACOS = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/editor-info/macos.js"), COMMON_EDITORS_LINUX = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/editor-info/linux.js"), COMMON_EDITORS_WIN = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/editor-info/windows.js");
208
+ module.exports = function guessEditor(specifiedEditor) {
209
+ if (specifiedEditor) return shellQuote.parse(specifiedEditor);
210
+ if (process.env.LAUNCH_EDITOR) return [
211
+ process.env.LAUNCH_EDITOR
212
+ ];
213
+ if (process.versions.webcontainer) return [
214
+ process.env.EDITOR || 'code'
215
+ ];
216
+ try {
217
+ if ('darwin' === process.platform) {
218
+ let output = childProcess.execSync('ps x -o comm=', {
219
+ stdio: [
220
+ 'pipe',
221
+ 'pipe',
222
+ 'ignore'
223
+ ]
224
+ }).toString(), processNames = Object.keys(COMMON_EDITORS_MACOS), processList = output.split('\n');
225
+ for(let i = 0; i < processNames.length; i++){
226
+ let processName = processNames[i];
227
+ if (processList.includes(processName)) return [
228
+ COMMON_EDITORS_MACOS[processName]
229
+ ];
230
+ let processNameWithoutApplications = processName.replace('/Applications', '');
231
+ if (-1 !== output.indexOf(processNameWithoutApplications)) {
232
+ if (processName !== COMMON_EDITORS_MACOS[processName]) return [
233
+ COMMON_EDITORS_MACOS[processName]
234
+ ];
235
+ let runningProcess = processList.find((procName)=>procName.endsWith(processNameWithoutApplications));
236
+ if (void 0 !== runningProcess) return [
237
+ runningProcess
238
+ ];
239
+ }
240
+ }
241
+ } else if ('win32' === process.platform) {
242
+ let runningProcesses = childProcess.execSync('powershell -NoProfile -Command "[Console]::OutputEncoding=[Text.Encoding]::UTF8;Get-CimInstance -Query \\"select executablepath from win32_process where executablepath is not null\\" | % { $_.ExecutablePath }"', {
243
+ stdio: [
244
+ 'pipe',
245
+ 'pipe',
246
+ 'ignore'
247
+ ]
248
+ }).toString().split('\r\n');
249
+ for(let i = 0; i < runningProcesses.length; i++){
250
+ let fullProcessPath = runningProcesses[i].trim(), shortProcessName = path.basename(fullProcessPath);
251
+ if (-1 !== COMMON_EDITORS_WIN.indexOf(shortProcessName)) return [
252
+ fullProcessPath
253
+ ];
254
+ }
255
+ } else if ('linux' === process.platform) {
256
+ let output = childProcess.execSync('ps x --no-heading -o comm --sort=comm', {
257
+ stdio: [
258
+ 'pipe',
259
+ 'pipe',
260
+ 'ignore'
261
+ ]
262
+ }).toString(), processNames = Object.keys(COMMON_EDITORS_LINUX);
263
+ for(let i = 0; i < processNames.length; i++){
264
+ let processName = processNames[i];
265
+ if (-1 !== output.indexOf(processName)) return [
266
+ COMMON_EDITORS_LINUX[processName]
267
+ ];
268
+ }
269
+ }
270
+ } catch (ignoreError) {}
271
+ return process.env.VISUAL ? [
272
+ process.env.VISUAL
273
+ ] : process.env.EDITOR ? [
274
+ process.env.EDITOR
275
+ ] : [
276
+ null
277
+ ];
278
+ };
279
+ },
280
+ "../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/index.js" (module, __unused_rspack_exports, __webpack_require__) {
281
+ let fs = __webpack_require__("fs"), os = __webpack_require__("os"), path = __webpack_require__("path"), colors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"), childProcess = __webpack_require__("child_process"), guessEditor = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/guess.js"), getArgumentsForPosition = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/get-args.js");
282
+ function wrapErrorCallback(cb) {
283
+ return (fileName, errorMessage)=>{
284
+ console.log(), console.log(colors.red('Could not open ' + path.basename(fileName) + ' in the editor.')), errorMessage && ('.' !== errorMessage[errorMessage.length - 1] && (errorMessage += '.'), console.log(colors.red('The editor process exited with an error: ' + errorMessage))), console.log(), cb && cb(fileName, errorMessage);
285
+ };
286
+ }
287
+ function isTerminalEditor(editor) {
288
+ switch(editor){
289
+ case 'vim':
290
+ case 'emacs':
291
+ case 'nano':
292
+ return !0;
293
+ }
294
+ return !1;
295
+ }
296
+ let positionRE = /:(\d+)(:(\d+))?$/;
297
+ function parseFile(file) {
298
+ file.startsWith('file://') && (file = __webpack_require__("url").fileURLToPath(file));
299
+ let fileName = file.replace(positionRE, ''), match = file.match(positionRE);
300
+ return {
301
+ fileName,
302
+ lineNumber: match && match[1],
303
+ columnNumber: match && match[3]
304
+ };
305
+ }
306
+ let _childProcess = null;
307
+ module.exports = function launchEditor(file, specifiedEditor, onErrorCallback) {
308
+ let parsed = parseFile(file), { fileName } = parsed, { lineNumber, columnNumber } = parsed;
309
+ if (!fs.existsSync(fileName)) return;
310
+ 'function' == typeof specifiedEditor && (onErrorCallback = specifiedEditor, specifiedEditor = void 0), onErrorCallback = wrapErrorCallback(onErrorCallback);
311
+ let [editor, ...args] = guessEditor(specifiedEditor);
312
+ if (!editor) return void onErrorCallback(fileName, null);
313
+ if ('linux' === process.platform && fileName.startsWith('/mnt/') && /Microsoft/i.test(os.release()) && (fileName = path.relative('', fileName)), lineNumber) {
314
+ let extraArgs = getArgumentsForPosition(editor, fileName, lineNumber, columnNumber);
315
+ args.push.apply(args, extraArgs);
316
+ } else args.push(fileName);
317
+ if (_childProcess && isTerminalEditor(editor) && _childProcess.kill('SIGKILL'), 'win32' === process.platform) {
318
+ function escapeCmdArgs(cmdArgs) {
319
+ return cmdArgs.replace(/([&|<>,;=^])/g, '^$1');
320
+ }
321
+ function doubleQuoteIfNeeded(str) {
322
+ return str.includes('^') ? `^"${str}^"` : str.includes(' ') ? `"${str}"` : str;
323
+ }
324
+ let launchCommand = [
325
+ editor,
326
+ ...args.map(escapeCmdArgs)
327
+ ].map(doubleQuoteIfNeeded).join(' ');
328
+ _childProcess = childProcess.exec(launchCommand, {
329
+ stdio: 'inherit',
330
+ shell: !0
331
+ });
332
+ } else _childProcess = childProcess.spawn(editor, args, {
333
+ stdio: 'inherit'
334
+ });
335
+ _childProcess.on('exit', function(errorCode) {
336
+ _childProcess = null, errorCode && onErrorCallback(fileName, '(code ' + errorCode + ')');
337
+ }), _childProcess.on('error', function(error) {
338
+ let { code, message } = error;
339
+ 'ENOENT' === code && (message = `${message} ('${editor}' command does not exist in 'PATH')`), onErrorCallback(fileName, message);
340
+ });
341
+ };
342
+ },
343
+ "../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/index.js" (__unused_rspack_module, exports, __webpack_require__) {
344
+ exports.quote = __webpack_require__("../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/quote.js"), exports.parse = __webpack_require__("../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/parse.js");
345
+ },
346
+ "../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/parse.js" (module) {
347
+ for(var CONTROL = "(?:\\|\\||\\&\\&|;;|\\|\\&|\\<\\(|\\<\\<\\<|>>|>\\&|<\\&|[&;()|<>])", controlRE = RegExp('^' + CONTROL + '$'), META = '|&;()<> \\t', hash = /^#$/, TOKEN = '', i = 0; i < 4; i++)TOKEN += (0x100000000 * Math.random()).toString(16);
348
+ var startsWithToken = RegExp('^' + TOKEN);
349
+ function matchAll(s, r) {
350
+ for(var matchObj, origIndex = r.lastIndex, matches = []; matchObj = r.exec(s);)matches.push(matchObj), r.lastIndex === matchObj.index && (r.lastIndex += 1);
351
+ return r.lastIndex = origIndex, matches;
352
+ }
353
+ function getVar(env, pre, key) {
354
+ var r = 'function' == typeof env ? env(key) : env[key];
355
+ return (void 0 === r && '' != key ? r = '' : void 0 === r && (r = '$'), 'object' == typeof r) ? pre + TOKEN + JSON.stringify(r) + TOKEN : pre + r;
356
+ }
357
+ function parseInternal(string, env, opts) {
358
+ opts || (opts = {});
359
+ var BS = opts.escape || '\\', matches = matchAll(string, RegExp([
360
+ '(' + CONTROL + ')',
361
+ '(' + ('(\\' + BS + '[\'"' + META + ']|[^\\s\'"' + META) + "])+|\"((\\\\\"|[^\"])*?)\"|'((\\\\'|[^'])*?)')+"
362
+ ].join('|'), 'g'));
363
+ if (0 === matches.length) return [];
364
+ env || (env = {});
365
+ var commented = !1;
366
+ return matches.map(function(match) {
367
+ var i, s = match[0];
368
+ if (s && !commented) {
369
+ if (controlRE.test(s)) return {
370
+ op: s
371
+ };
372
+ var quote = !1, esc = !1, out = '', isGlob = !1;
373
+ for(i = 0; i < s.length; i++){
374
+ var c = s.charAt(i);
375
+ if (isGlob = isGlob || !quote && ('*' === c || '?' === c), esc) out += c, esc = !1;
376
+ else if (quote) c === quote ? quote = !1 : "'" == quote ? out += c : c === BS ? (i += 1, '"' === (c = s.charAt(i)) || c === BS || '$' === c ? out += c : out += BS + c) : '$' === c ? out += parseEnvVar() : out += c;
377
+ else if ('"' === c || "'" === c) quote = c;
378
+ else if (controlRE.test(c)) return {
379
+ op: s
380
+ };
381
+ else if (hash.test(c)) {
382
+ commented = !0;
383
+ var commentObj = {
384
+ comment: string.slice(match.index + i + 1)
385
+ };
386
+ if (out.length) return [
387
+ out,
388
+ commentObj
389
+ ];
390
+ return [
391
+ commentObj
392
+ ];
393
+ } else c === BS ? esc = !0 : '$' === c ? out += parseEnvVar() : out += c;
394
+ }
395
+ return isGlob ? {
396
+ op: 'glob',
397
+ pattern: out
398
+ } : out;
399
+ }
400
+ function parseEnvVar() {
401
+ i += 1;
402
+ var varend, varname, char = s.charAt(i);
403
+ if ('{' === char) {
404
+ if (i += 1, '}' === s.charAt(i)) throw Error('Bad substitution: ' + s.slice(i - 2, i + 1));
405
+ if ((varend = s.indexOf('}', i)) < 0) throw Error('Bad substitution: ' + s.slice(i));
406
+ varname = s.slice(i, varend), i = varend;
407
+ } else if (/[*@#?$!_-]/.test(char)) varname = char, i += 1;
408
+ else {
409
+ var slicedFromI = s.slice(i);
410
+ (varend = slicedFromI.match(/[^\w\d_]/)) ? (varname = slicedFromI.slice(0, varend.index), i += varend.index - 1) : (varname = slicedFromI, i = s.length);
411
+ }
412
+ return getVar(env, '', varname);
413
+ }
414
+ }).reduce(function(prev, arg) {
415
+ return void 0 === arg ? prev : prev.concat(arg);
416
+ }, []);
417
+ }
418
+ module.exports = function parse(s, env, opts) {
419
+ var mapped = parseInternal(s, env, opts);
420
+ return 'function' != typeof env ? mapped : mapped.reduce(function(acc, s) {
421
+ if ('object' == typeof s) return acc.concat(s);
422
+ var xs = s.split(RegExp('(' + TOKEN + '.*?' + TOKEN + ')', 'g'));
423
+ return 1 === xs.length ? acc.concat(xs[0]) : acc.concat(xs.filter(Boolean).map(function(x) {
424
+ return startsWithToken.test(x) ? JSON.parse(x.split(TOKEN)[1]) : x;
425
+ }));
426
+ }, []);
427
+ };
428
+ },
429
+ "../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/quote.js" (module) {
430
+ module.exports = function quote(xs) {
431
+ return xs.map(function(s) {
432
+ return '' === s ? '\'\'' : s && 'object' == typeof s ? s.op.replace(/(.)/g, '\\$1') : /["\s\\]/.test(s) && !/'/.test(s) ? "'" + s.replace(/(['])/g, '\\$1') + "'" : /["'\s]/.test(s) ? '"' + s.replace(/(["\\$`!])/g, '\\$1') + '"' : String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g, '$1\\$2');
433
+ }).join(' ');
434
+ };
435
+ },
436
+ child_process (module) {
437
+ module.exports = __rspack_external_child_process;
438
+ }
439
+ });