@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,25 @@
1
+ (The MIT License)
2
+
3
+ Copyright (c) 2010 Sencha Inc.
4
+ Copyright (c) 2011 LearnBoost
5
+ Copyright (c) 2011-2014 TJ Holowaychuk
6
+ Copyright (c) 2015 Douglas Christopher Wilson
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining
9
+ a copy of this software and associated documentation files (the
10
+ 'Software'), to deal in the Software without restriction, including
11
+ without limitation the rights to use, copy, modify, merge, publish,
12
+ distribute, sublicense, and/or sell copies of the Software, and to
13
+ permit persons to whom the Software is furnished to do so, subject to
14
+ the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be
17
+ included in all copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
20
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
23
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1 @@
1
+ {"name":"connect","author":"TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)","version":"3.7.0","license":"MIT","types":"index.d.ts","type":"commonjs"}
@@ -0,0 +1 @@
1
+ export = any;
@@ -0,0 +1,149 @@
1
+ (() => {
2
+ "use strict";
3
+ var __webpack_modules__ = {
4
+ 945: (module, exports, __nccwpck_require__) => {
5
+ var url = __nccwpck_require__(310);
6
+ exports = module.exports = function historyApiFallback(options) {
7
+ options = options || {};
8
+ var logger = getLogger(options);
9
+ return function (req, res, next) {
10
+ var headers = req.headers;
11
+ if (req.method !== "GET" && req.method !== "HEAD") {
12
+ logger(
13
+ "Not rewriting",
14
+ req.method,
15
+ req.url,
16
+ "because the method is not GET or HEAD.",
17
+ );
18
+ return next();
19
+ } else if (!headers || typeof headers.accept !== "string") {
20
+ logger(
21
+ "Not rewriting",
22
+ req.method,
23
+ req.url,
24
+ "because the client did not send an HTTP accept header.",
25
+ );
26
+ return next();
27
+ } else if (headers.accept.indexOf("application/json") === 0) {
28
+ logger(
29
+ "Not rewriting",
30
+ req.method,
31
+ req.url,
32
+ "because the client prefers JSON.",
33
+ );
34
+ return next();
35
+ } else if (!acceptsHtml(headers.accept, options)) {
36
+ logger(
37
+ "Not rewriting",
38
+ req.method,
39
+ req.url,
40
+ "because the client does not accept HTML.",
41
+ );
42
+ return next();
43
+ }
44
+ var parsedUrl = url.parse(req.url);
45
+ var rewriteTarget;
46
+ options.rewrites = options.rewrites || [];
47
+ for (var i = 0; i < options.rewrites.length; i++) {
48
+ var rewrite = options.rewrites[i];
49
+ var match = parsedUrl.pathname.match(rewrite.from);
50
+ if (match !== null) {
51
+ rewriteTarget = evaluateRewriteRule(
52
+ parsedUrl,
53
+ match,
54
+ rewrite.to,
55
+ req,
56
+ );
57
+ if (rewriteTarget.charAt(0) !== "/") {
58
+ logger(
59
+ "We recommend using an absolute path for the rewrite target.",
60
+ "Received a non-absolute rewrite target",
61
+ rewriteTarget,
62
+ "for URL",
63
+ req.url,
64
+ );
65
+ }
66
+ logger("Rewriting", req.method, req.url, "to", rewriteTarget);
67
+ req.url = rewriteTarget;
68
+ return next();
69
+ }
70
+ }
71
+ var pathname = parsedUrl.pathname;
72
+ if (
73
+ pathname.lastIndexOf(".") > pathname.lastIndexOf("/") &&
74
+ options.disableDotRule !== true
75
+ ) {
76
+ logger(
77
+ "Not rewriting",
78
+ req.method,
79
+ req.url,
80
+ "because the path includes a dot (.) character.",
81
+ );
82
+ return next();
83
+ }
84
+ rewriteTarget = options.index || "/index.html";
85
+ logger("Rewriting", req.method, req.url, "to", rewriteTarget);
86
+ req.url = rewriteTarget;
87
+ next();
88
+ };
89
+ };
90
+ function evaluateRewriteRule(parsedUrl, match, rule, req) {
91
+ if (typeof rule === "string") {
92
+ return rule;
93
+ } else if (typeof rule !== "function") {
94
+ throw new Error(
95
+ "Rewrite rule can only be of type string or function.",
96
+ );
97
+ }
98
+ return rule({ parsedUrl, match, request: req });
99
+ }
100
+ function acceptsHtml(header, options) {
101
+ options.htmlAcceptHeaders = options.htmlAcceptHeaders || [
102
+ "text/html",
103
+ "*/*",
104
+ ];
105
+ for (var i = 0; i < options.htmlAcceptHeaders.length; i++) {
106
+ if (header.indexOf(options.htmlAcceptHeaders[i]) !== -1) {
107
+ return true;
108
+ }
109
+ }
110
+ return false;
111
+ }
112
+ function getLogger(options) {
113
+ if (options && options.logger) {
114
+ return options.logger;
115
+ } else if (options && options.verbose) {
116
+ return console.log.bind(console);
117
+ }
118
+ return function () {};
119
+ }
120
+ },
121
+ 310: (module) => {
122
+ module.exports = require("url");
123
+ },
124
+ };
125
+ var __webpack_module_cache__ = {};
126
+ function __nccwpck_require__(moduleId) {
127
+ var cachedModule = __webpack_module_cache__[moduleId];
128
+ if (cachedModule !== undefined) {
129
+ return cachedModule.exports;
130
+ }
131
+ var module = (__webpack_module_cache__[moduleId] = { exports: {} });
132
+ var threw = true;
133
+ try {
134
+ __webpack_modules__[moduleId](
135
+ module,
136
+ module.exports,
137
+ __nccwpck_require__,
138
+ );
139
+ threw = false;
140
+ } finally {
141
+ if (threw) delete __webpack_module_cache__[moduleId];
142
+ }
143
+ return module.exports;
144
+ }
145
+ if (typeof __nccwpck_require__ !== "undefined")
146
+ __nccwpck_require__.ab = __dirname + "/";
147
+ var __webpack_exports__ = __nccwpck_require__(945);
148
+ module.exports = __webpack_exports__;
149
+ })();
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2022 Ben Blackmore and contributors
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":"connect-history-api-fallback","author":{"name":"Ben Ripkens","email":"bripkens@gmail.com"},"version":"2.0.0","license":"MIT","types":"index.d.ts","type":"commonjs"}
@@ -0,0 +1 @@
1
+ export = any;
@@ -0,0 +1,371 @@
1
+ (() => {
2
+ var __webpack_modules__ = {
3
+ 46: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
+ (function () {
5
+ "use strict";
6
+ var assign = __nccwpck_require__(715);
7
+ var vary = __nccwpck_require__(443);
8
+ var defaults = {
9
+ origin: "*",
10
+ methods: "GET,HEAD,PUT,PATCH,POST,DELETE",
11
+ preflightContinue: false,
12
+ optionsSuccessStatus: 204,
13
+ };
14
+ function isString(s) {
15
+ return typeof s === "string" || s instanceof String;
16
+ }
17
+ function isOriginAllowed(origin, allowedOrigin) {
18
+ if (Array.isArray(allowedOrigin)) {
19
+ for (var i = 0; i < allowedOrigin.length; ++i) {
20
+ if (isOriginAllowed(origin, allowedOrigin[i])) {
21
+ return true;
22
+ }
23
+ }
24
+ return false;
25
+ } else if (isString(allowedOrigin)) {
26
+ return origin === allowedOrigin;
27
+ } else if (allowedOrigin instanceof RegExp) {
28
+ return allowedOrigin.test(origin);
29
+ } else {
30
+ return !!allowedOrigin;
31
+ }
32
+ }
33
+ function configureOrigin(options, req) {
34
+ var requestOrigin = req.headers.origin,
35
+ headers = [],
36
+ isAllowed;
37
+ if (!options.origin || options.origin === "*") {
38
+ headers.push([{ key: "Access-Control-Allow-Origin", value: "*" }]);
39
+ } else if (isString(options.origin)) {
40
+ headers.push([
41
+ { key: "Access-Control-Allow-Origin", value: options.origin },
42
+ ]);
43
+ headers.push([{ key: "Vary", value: "Origin" }]);
44
+ } else {
45
+ isAllowed = isOriginAllowed(requestOrigin, options.origin);
46
+ headers.push([
47
+ {
48
+ key: "Access-Control-Allow-Origin",
49
+ value: isAllowed ? requestOrigin : false,
50
+ },
51
+ ]);
52
+ headers.push([{ key: "Vary", value: "Origin" }]);
53
+ }
54
+ return headers;
55
+ }
56
+ function configureMethods(options) {
57
+ var methods = options.methods;
58
+ if (methods.join) {
59
+ methods = options.methods.join(",");
60
+ }
61
+ return { key: "Access-Control-Allow-Methods", value: methods };
62
+ }
63
+ function configureCredentials(options) {
64
+ if (options.credentials === true) {
65
+ return { key: "Access-Control-Allow-Credentials", value: "true" };
66
+ }
67
+ return null;
68
+ }
69
+ function configureAllowedHeaders(options, req) {
70
+ var allowedHeaders = options.allowedHeaders || options.headers;
71
+ var headers = [];
72
+ if (!allowedHeaders) {
73
+ allowedHeaders = req.headers["access-control-request-headers"];
74
+ headers.push([
75
+ { key: "Vary", value: "Access-Control-Request-Headers" },
76
+ ]);
77
+ } else if (allowedHeaders.join) {
78
+ allowedHeaders = allowedHeaders.join(",");
79
+ }
80
+ if (allowedHeaders && allowedHeaders.length) {
81
+ headers.push([
82
+ { key: "Access-Control-Allow-Headers", value: allowedHeaders },
83
+ ]);
84
+ }
85
+ return headers;
86
+ }
87
+ function configureExposedHeaders(options) {
88
+ var headers = options.exposedHeaders;
89
+ if (!headers) {
90
+ return null;
91
+ } else if (headers.join) {
92
+ headers = headers.join(",");
93
+ }
94
+ if (headers && headers.length) {
95
+ return { key: "Access-Control-Expose-Headers", value: headers };
96
+ }
97
+ return null;
98
+ }
99
+ function configureMaxAge(options) {
100
+ var maxAge =
101
+ (typeof options.maxAge === "number" || options.maxAge) &&
102
+ options.maxAge.toString();
103
+ if (maxAge && maxAge.length) {
104
+ return { key: "Access-Control-Max-Age", value: maxAge };
105
+ }
106
+ return null;
107
+ }
108
+ function applyHeaders(headers, res) {
109
+ for (var i = 0, n = headers.length; i < n; i++) {
110
+ var header = headers[i];
111
+ if (header) {
112
+ if (Array.isArray(header)) {
113
+ applyHeaders(header, res);
114
+ } else if (header.key === "Vary" && header.value) {
115
+ vary(res, header.value);
116
+ } else if (header.value) {
117
+ res.setHeader(header.key, header.value);
118
+ }
119
+ }
120
+ }
121
+ }
122
+ function cors(options, req, res, next) {
123
+ var headers = [],
124
+ method =
125
+ req.method && req.method.toUpperCase && req.method.toUpperCase();
126
+ if (method === "OPTIONS") {
127
+ headers.push(configureOrigin(options, req));
128
+ headers.push(configureCredentials(options, req));
129
+ headers.push(configureMethods(options, req));
130
+ headers.push(configureAllowedHeaders(options, req));
131
+ headers.push(configureMaxAge(options, req));
132
+ headers.push(configureExposedHeaders(options, req));
133
+ applyHeaders(headers, res);
134
+ if (options.preflightContinue) {
135
+ next();
136
+ } else {
137
+ res.statusCode = options.optionsSuccessStatus;
138
+ res.setHeader("Content-Length", "0");
139
+ res.end();
140
+ }
141
+ } else {
142
+ headers.push(configureOrigin(options, req));
143
+ headers.push(configureCredentials(options, req));
144
+ headers.push(configureExposedHeaders(options, req));
145
+ applyHeaders(headers, res);
146
+ next();
147
+ }
148
+ }
149
+ function middlewareWrapper(o) {
150
+ var optionsCallback = null;
151
+ if (typeof o === "function") {
152
+ optionsCallback = o;
153
+ } else {
154
+ optionsCallback = function (req, cb) {
155
+ cb(null, o);
156
+ };
157
+ }
158
+ return function corsMiddleware(req, res, next) {
159
+ optionsCallback(req, function (err, options) {
160
+ if (err) {
161
+ next(err);
162
+ } else {
163
+ var corsOptions = assign({}, defaults, options);
164
+ var originCallback = null;
165
+ if (
166
+ corsOptions.origin &&
167
+ typeof corsOptions.origin === "function"
168
+ ) {
169
+ originCallback = corsOptions.origin;
170
+ } else if (corsOptions.origin) {
171
+ originCallback = function (origin, cb) {
172
+ cb(null, corsOptions.origin);
173
+ };
174
+ }
175
+ if (originCallback) {
176
+ originCallback(req.headers.origin, function (err2, origin) {
177
+ if (err2 || !origin) {
178
+ next(err2);
179
+ } else {
180
+ corsOptions.origin = origin;
181
+ cors(corsOptions, req, res, next);
182
+ }
183
+ });
184
+ } else {
185
+ next();
186
+ }
187
+ }
188
+ });
189
+ };
190
+ }
191
+ module.exports = middlewareWrapper;
192
+ })();
193
+ },
194
+ 715: (module) => {
195
+ "use strict";
196
+ /*
197
+ object-assign
198
+ (c) Sindre Sorhus
199
+ @license MIT
200
+ */ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
201
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
202
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
203
+ function toObject(val) {
204
+ if (val === null || val === undefined) {
205
+ throw new TypeError(
206
+ "Object.assign cannot be called with null or undefined",
207
+ );
208
+ }
209
+ return Object(val);
210
+ }
211
+ function shouldUseNative() {
212
+ try {
213
+ if (!Object.assign) {
214
+ return false;
215
+ }
216
+ var test1 = new String("abc");
217
+ test1[5] = "de";
218
+ if (Object.getOwnPropertyNames(test1)[0] === "5") {
219
+ return false;
220
+ }
221
+ var test2 = {};
222
+ for (var i = 0; i < 10; i++) {
223
+ test2["_" + String.fromCharCode(i)] = i;
224
+ }
225
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
226
+ return test2[n];
227
+ });
228
+ if (order2.join("") !== "0123456789") {
229
+ return false;
230
+ }
231
+ var test3 = {};
232
+ "abcdefghijklmnopqrst".split("").forEach(function (letter) {
233
+ test3[letter] = letter;
234
+ });
235
+ if (
236
+ Object.keys(Object.assign({}, test3)).join("") !==
237
+ "abcdefghijklmnopqrst"
238
+ ) {
239
+ return false;
240
+ }
241
+ return true;
242
+ } catch (err) {
243
+ return false;
244
+ }
245
+ }
246
+ module.exports = shouldUseNative()
247
+ ? Object.assign
248
+ : function (target, source) {
249
+ var from;
250
+ var to = toObject(target);
251
+ var symbols;
252
+ for (var s = 1; s < arguments.length; s++) {
253
+ from = Object(arguments[s]);
254
+ for (var key in from) {
255
+ if (hasOwnProperty.call(from, key)) {
256
+ to[key] = from[key];
257
+ }
258
+ }
259
+ if (getOwnPropertySymbols) {
260
+ symbols = getOwnPropertySymbols(from);
261
+ for (var i = 0; i < symbols.length; i++) {
262
+ if (propIsEnumerable.call(from, symbols[i])) {
263
+ to[symbols[i]] = from[symbols[i]];
264
+ }
265
+ }
266
+ }
267
+ }
268
+ return to;
269
+ };
270
+ },
271
+ 443: (module) => {
272
+ "use strict";
273
+ /*!
274
+ * vary
275
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
276
+ * MIT Licensed
277
+ */ module.exports = vary;
278
+ module.exports.append = append;
279
+ var FIELD_NAME_REGEXP = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
280
+ function append(header, field) {
281
+ if (typeof header !== "string") {
282
+ throw new TypeError("header argument is required");
283
+ }
284
+ if (!field) {
285
+ throw new TypeError("field argument is required");
286
+ }
287
+ var fields = !Array.isArray(field) ? parse(String(field)) : field;
288
+ for (var j = 0; j < fields.length; j++) {
289
+ if (!FIELD_NAME_REGEXP.test(fields[j])) {
290
+ throw new TypeError(
291
+ "field argument contains an invalid header name",
292
+ );
293
+ }
294
+ }
295
+ if (header === "*") {
296
+ return header;
297
+ }
298
+ var val = header;
299
+ var vals = parse(header.toLowerCase());
300
+ if (fields.indexOf("*") !== -1 || vals.indexOf("*") !== -1) {
301
+ return "*";
302
+ }
303
+ for (var i = 0; i < fields.length; i++) {
304
+ var fld = fields[i].toLowerCase();
305
+ if (vals.indexOf(fld) === -1) {
306
+ vals.push(fld);
307
+ val = val ? val + ", " + fields[i] : fields[i];
308
+ }
309
+ }
310
+ return val;
311
+ }
312
+ function parse(header) {
313
+ var end = 0;
314
+ var list = [];
315
+ var start = 0;
316
+ for (var i = 0, len = header.length; i < len; i++) {
317
+ switch (header.charCodeAt(i)) {
318
+ case 32:
319
+ if (start === end) {
320
+ start = end = i + 1;
321
+ }
322
+ break;
323
+ case 44:
324
+ list.push(header.substring(start, end));
325
+ start = end = i + 1;
326
+ break;
327
+ default:
328
+ end = i + 1;
329
+ break;
330
+ }
331
+ }
332
+ list.push(header.substring(start, end));
333
+ return list;
334
+ }
335
+ function vary(res, field) {
336
+ if (!res || !res.getHeader || !res.setHeader) {
337
+ throw new TypeError("res argument is required");
338
+ }
339
+ var val = res.getHeader("Vary") || "";
340
+ var header = Array.isArray(val) ? val.join(", ") : String(val);
341
+ if ((val = append(header, field))) {
342
+ res.setHeader("Vary", val);
343
+ }
344
+ }
345
+ },
346
+ };
347
+ var __webpack_module_cache__ = {};
348
+ function __nccwpck_require__(moduleId) {
349
+ var cachedModule = __webpack_module_cache__[moduleId];
350
+ if (cachedModule !== undefined) {
351
+ return cachedModule.exports;
352
+ }
353
+ var module = (__webpack_module_cache__[moduleId] = { exports: {} });
354
+ var threw = true;
355
+ try {
356
+ __webpack_modules__[moduleId](
357
+ module,
358
+ module.exports,
359
+ __nccwpck_require__,
360
+ );
361
+ threw = false;
362
+ } finally {
363
+ if (threw) delete __webpack_module_cache__[moduleId];
364
+ }
365
+ return module.exports;
366
+ }
367
+ if (typeof __nccwpck_require__ !== "undefined")
368
+ __nccwpck_require__.ab = __dirname + "/";
369
+ var __webpack_exports__ = __nccwpck_require__(46);
370
+ module.exports = __webpack_exports__;
371
+ })();
@@ -0,0 +1,22 @@
1
+ (The MIT License)
2
+
3
+ Copyright (c) 2013 Troy Goode <troygoode@gmail.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ 'Software'), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1 @@
1
+ {"name":"cors","author":"Troy Goode <troygoode@gmail.com> (https://github.com/troygoode/)","version":"2.8.5","license":"MIT","types":"index.d.ts","type":"commonjs"}
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+
3
+ /*
4
+ MIT License http://www.opensource.org/licenses/mit-license.php
5
+ Author Tobias Koppers @sokra
6
+ */
7
+ module.exports = function (cssWithMappingToString) {
8
+ var list = [];
9
+
10
+ // return the list of modules as css string
11
+ list.toString = function toString() {
12
+ return this.map(function (item) {
13
+ var content = "";
14
+ var needLayer = typeof item[5] !== "undefined";
15
+ if (item[4]) {
16
+ content += "@supports (".concat(item[4], ") {");
17
+ }
18
+ if (item[2]) {
19
+ content += "@media ".concat(item[2], " {");
20
+ }
21
+ if (needLayer) {
22
+ content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
23
+ }
24
+ content += cssWithMappingToString(item);
25
+ if (needLayer) {
26
+ content += "}";
27
+ }
28
+ if (item[2]) {
29
+ content += "}";
30
+ }
31
+ if (item[4]) {
32
+ content += "}";
33
+ }
34
+ return content;
35
+ }).join("");
36
+ };
37
+
38
+ // import a list of modules into the list
39
+ list.i = function i(modules, media, dedupe, supports, layer) {
40
+ if (typeof modules === "string") {
41
+ modules = [[null, modules, undefined]];
42
+ }
43
+ var alreadyImportedModules = {};
44
+ if (dedupe) {
45
+ for (var k = 0; k < this.length; k++) {
46
+ var id = this[k][0];
47
+ if (id != null) {
48
+ alreadyImportedModules[id] = true;
49
+ }
50
+ }
51
+ }
52
+ for (var _k = 0; _k < modules.length; _k++) {
53
+ var item = [].concat(modules[_k]);
54
+ if (dedupe && alreadyImportedModules[item[0]]) {
55
+ continue;
56
+ }
57
+ if (typeof layer !== "undefined") {
58
+ if (typeof item[5] === "undefined") {
59
+ item[5] = layer;
60
+ } else {
61
+ item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
62
+ item[5] = layer;
63
+ }
64
+ }
65
+ if (media) {
66
+ if (!item[2]) {
67
+ item[2] = media;
68
+ } else {
69
+ item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
70
+ item[2] = media;
71
+ }
72
+ }
73
+ if (supports) {
74
+ if (!item[4]) {
75
+ item[4] = "".concat(supports);
76
+ } else {
77
+ item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
78
+ item[4] = supports;
79
+ }
80
+ }
81
+ list.push(item);
82
+ }
83
+ };
84
+ return list;
85
+ };