@ohos-ports/rsbuild-core 2.2.9-beta.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.
- package/LICENSE +21 -0
- package/README.md +27 -0
- package/bin/rsbuild.js +20 -0
- package/compiled/@rstackjs/load-config/index.d.ts +87 -0
- package/compiled/@rstackjs/load-config/license +21 -0
- package/compiled/@rstackjs/load-config/package.json +1 -0
- package/compiled/chokidar/index.d.ts +385 -0
- package/compiled/chokidar/license +21 -0
- package/compiled/chokidar/package.json +1 -0
- package/compiled/connect-next/index.d.ts +57 -0
- package/compiled/connect-next/license +26 -0
- package/compiled/connect-next/package.json +1 -0
- package/compiled/cors/index.d.ts +56 -0
- package/compiled/cors/license +22 -0
- package/compiled/cors/package.json +1 -0
- package/compiled/css-loader/api.js +85 -0
- package/compiled/css-loader/getUrl.js +26 -0
- package/compiled/css-loader/index.d.ts +1 -0
- package/compiled/css-loader/index.js +2 -0
- package/compiled/css-loader/license +20 -0
- package/compiled/css-loader/noSourceMaps.js +5 -0
- package/compiled/css-loader/package.json +1 -0
- package/compiled/css-loader/sourceMaps.js +16 -0
- package/compiled/html-rspack-plugin/default_index.ejs +9 -0
- package/compiled/html-rspack-plugin/htmlLoader.js +157 -0
- package/compiled/html-rspack-plugin/index.d.ts +395 -0
- package/compiled/html-rspack-plugin/index.js +2400 -0
- package/compiled/html-rspack-plugin/license +20 -0
- package/compiled/html-rspack-plugin/package.json +1 -0
- package/compiled/http-proxy-middleware/index.d.ts +455 -0
- package/compiled/http-proxy-middleware/license +22 -0
- package/compiled/http-proxy-middleware/package.json +1 -0
- package/compiled/jiti/LICENSE +21 -0
- package/compiled/jiti/README.md +258 -0
- package/compiled/jiti/dist/babel.cjs +47446 -0
- package/compiled/jiti/dist/jiti.cjs +5990 -0
- package/compiled/jiti/lib/jiti-cli.mjs +19 -0
- package/compiled/jiti/lib/jiti-hooks.mjs +89 -0
- package/compiled/jiti/lib/jiti-native.mjs +76 -0
- package/compiled/jiti/lib/jiti-register.d.mts +1 -0
- package/compiled/jiti/lib/jiti-register.mjs +2 -0
- package/compiled/jiti/lib/jiti-static.mjs +19 -0
- package/compiled/jiti/lib/jiti.cjs +24 -0
- package/compiled/jiti/lib/jiti.d.cts +8 -0
- package/compiled/jiti/lib/jiti.d.mts +8 -0
- package/compiled/jiti/lib/jiti.mjs +23 -0
- package/compiled/jiti/lib/types.d.ts +420 -0
- package/compiled/jiti/package.json +146 -0
- package/compiled/postcss/index.js +1 -0
- package/compiled/postcss/lib/at-rule.d.ts +139 -0
- package/compiled/postcss/lib/comment.d.ts +67 -0
- package/compiled/postcss/lib/container.d.ts +474 -0
- package/compiled/postcss/lib/css-syntax-error.d.ts +247 -0
- package/compiled/postcss/lib/declaration.d.ts +150 -0
- package/compiled/postcss/lib/document.d.ts +68 -0
- package/compiled/postcss/lib/fromJSON.d.ts +9 -0
- package/compiled/postcss/lib/input.d.ts +226 -0
- package/compiled/postcss/lib/lazy-result.d.ts +189 -0
- package/compiled/postcss/lib/list.d.ts +60 -0
- package/compiled/postcss/lib/no-work-result.d.ts +45 -0
- package/compiled/postcss/lib/node.d.ts +555 -0
- package/compiled/postcss/lib/parse.d.ts +9 -0
- package/compiled/postcss/lib/postcss.d.ts +464 -0
- package/compiled/postcss/lib/previous-map.d.ts +80 -0
- package/compiled/postcss/lib/processor.d.ts +114 -0
- package/compiled/postcss/lib/result.d.ts +204 -0
- package/compiled/postcss/lib/root.d.ts +86 -0
- package/compiled/postcss/lib/rule.d.ts +126 -0
- package/compiled/postcss/lib/source-map-js.d.ts +4 -0
- package/compiled/postcss/lib/stringifier.d.ts +45 -0
- package/compiled/postcss/lib/stringify.d.ts +9 -0
- package/compiled/postcss/lib/warning.d.ts +146 -0
- package/compiled/postcss/license +20 -0
- package/compiled/postcss/package.json +1 -0
- package/compiled/postcss-loader/index.d.ts +1 -0
- package/compiled/postcss-loader/index.js +721 -0
- package/compiled/postcss-loader/license +20 -0
- package/compiled/postcss-loader/package.json +1 -0
- package/compiled/rslog/index.d.ts +98 -0
- package/compiled/rslog/license +21 -0
- package/compiled/rslog/package.json +1 -0
- package/compiled/rspack-chain/license +22 -0
- package/compiled/rspack-chain/package.json +1 -0
- package/compiled/rspack-chain/types/index.d.ts +515 -0
- package/compiled/rspack-manifest-plugin/index.d.ts +52 -0
- package/compiled/rspack-manifest-plugin/license +21 -0
- package/compiled/rspack-manifest-plugin/package.json +1 -0
- package/compiled/style-loader/index.d.ts +1 -0
- package/compiled/style-loader/index.js +370 -0
- package/compiled/style-loader/license +20 -0
- package/compiled/style-loader/package.json +1 -0
- package/compiled/style-loader/runtime/injectStylesIntoLinkTag.js +29 -0
- package/compiled/style-loader/runtime/injectStylesIntoStyleTag.js +84 -0
- package/compiled/style-loader/runtime/insertBySelector.js +34 -0
- package/compiled/style-loader/runtime/insertStyleElement.js +10 -0
- package/compiled/style-loader/runtime/isEqualLocals.js +28 -0
- package/compiled/style-loader/runtime/isOldIE.js +17 -0
- package/compiled/style-loader/runtime/setAttributesWithAttributes.js +13 -0
- package/compiled/style-loader/runtime/setAttributesWithAttributesAndNonce.js +9 -0
- package/compiled/style-loader/runtime/setAttributesWithoutAttributes.js +10 -0
- package/compiled/style-loader/runtime/singletonStyleDomAPI.js +86 -0
- package/compiled/style-loader/runtime/styleDomAPI.js +61 -0
- package/compiled/style-loader/runtime/styleTagTransform.js +14 -0
- package/compiled/ws/index.d.ts +445 -0
- package/compiled/ws/license +21 -0
- package/compiled/ws/package.json +1 -0
- package/dist/build.d.ts +4 -0
- package/dist/c.js +10 -0
- package/dist/chokidar.js +2 -0
- package/dist/chokidar.js.LICENSE.txt +1 -0
- package/dist/cli/commands.d.ts +31 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/init.d.ts +7 -0
- package/dist/client/f~0.js +22 -0
- package/dist/client/hmr.js +267 -0
- package/dist/client/overlay.js +214 -0
- package/dist/configChain.d.ts +84 -0
- package/dist/connect-next.js +2 -0
- package/dist/connect-next.js.LICENSE.txt +57 -0
- package/dist/constants.d.ts +67 -0
- package/dist/cors.js +188 -0
- package/dist/cors.js.LICENSE.txt +11 -0
- package/dist/createCompiler.d.ts +6 -0
- package/dist/createContext.d.ts +12 -0
- package/dist/createRsbuild.d.ts +4 -0
- package/dist/cssUrlLoader.mjs +34 -0
- package/dist/defaultConfig.d.ts +23 -0
- package/dist/freshImport.js +90 -0
- package/dist/helpers/cachedImport.d.ts +2 -0
- package/dist/helpers/compiler.d.ts +5 -0
- package/dist/helpers/css.d.ts +3 -0
- package/dist/helpers/exitHook.d.ts +3 -0
- package/dist/helpers/format.d.ts +4 -0
- package/dist/helpers/fs.d.ts +16 -0
- package/dist/helpers/html.d.ts +2 -0
- package/dist/helpers/index.d.ts +29 -0
- package/dist/helpers/overlayConfig.d.ts +4 -0
- package/dist/helpers/packageJson.d.ts +9 -0
- package/dist/helpers/path.d.ts +22 -0
- package/dist/helpers/restartManager.d.ts +15 -0
- package/dist/helpers/stats.d.ts +17 -0
- package/dist/helpers/url.d.ts +11 -0
- package/dist/helpers/vendors.d.ts +12 -0
- package/dist/helpers/version.d.ts +7 -0
- package/dist/hooks.d.ts +41 -0
- package/dist/http-proxy-middleware.js +14 -0
- package/dist/http-proxy-middleware.js.LICENSE.txt +34 -0
- package/dist/ignoreCssLoader.mjs +9 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +1 -0
- package/dist/initConfigs.d.ts +18 -0
- package/dist/initPlugins.d.ts +7 -0
- package/dist/inspectConfig.d.ts +7 -0
- package/dist/launch-editor-middleware.js +1 -0
- package/dist/loadConfig.d.ts +31 -0
- package/dist/loadEnv.d.ts +54 -0
- package/dist/loader/cssUrlLoader.d.ts +9 -0
- package/dist/loader/ignoreCssLoader.d.ts +10 -0
- package/dist/loader/transformLoader.d.ts +8 -0
- package/dist/loader/transformRawLoader.d.ts +4 -0
- package/dist/loader/workerLoader.d.ts +6 -0
- package/dist/logger.d.ts +24 -0
- package/dist/m.js +10348 -0
- package/dist/m.js.LICENSE.txt +26 -0
- package/dist/manifest-plugin.js +1 -0
- package/dist/memfs.js +1 -0
- package/dist/mergeConfig.d.ts +7 -0
- package/dist/open.js +2 -0
- package/dist/pluginHelper.d.ts +4 -0
- package/dist/pluginManager.d.ts +19 -0
- package/dist/plugins/appIcon.d.ts +2 -0
- package/dist/plugins/asset.d.ts +3 -0
- package/dist/plugins/basic.d.ts +4 -0
- package/dist/plugins/cache.d.ts +2 -0
- package/dist/plugins/cleanOutput.d.ts +2 -0
- package/dist/plugins/css.d.ts +8 -0
- package/dist/plugins/define.d.ts +2 -0
- package/dist/plugins/entry.d.ts +2 -0
- package/dist/plugins/externals.d.ts +9 -0
- package/dist/plugins/fileSize.d.ts +7 -0
- package/dist/plugins/html.d.ts +9 -0
- package/dist/plugins/inlineChunk.d.ts +6 -0
- package/dist/plugins/lazyCompilation.d.ts +2 -0
- package/dist/plugins/manifest.d.ts +2 -0
- package/dist/plugins/minimize.d.ts +10 -0
- package/dist/plugins/moduleFederation.d.ts +2 -0
- package/dist/plugins/nodeAddons.d.ts +2 -0
- package/dist/plugins/nonce.d.ts +2 -0
- package/dist/plugins/output.d.ts +2 -0
- package/dist/plugins/progress.d.ts +2 -0
- package/dist/plugins/resolve.d.ts +2 -0
- package/dist/plugins/resourceHints.d.ts +2 -0
- package/dist/plugins/rsdoctor.d.ts +2 -0
- package/dist/plugins/rspackProfile.d.ts +4 -0
- package/dist/plugins/server.d.ts +3 -0
- package/dist/plugins/sourceMap.d.ts +2 -0
- package/dist/plugins/splitChunks.d.ts +4 -0
- package/dist/plugins/sri.d.ts +2 -0
- package/dist/plugins/swc.d.ts +4 -0
- package/dist/plugins/target.d.ts +2 -0
- package/dist/plugins/wasm.d.ts +2 -0
- package/dist/plugins/worker.d.ts +2 -0
- package/dist/r.js +7 -0
- package/dist/range-parser.js +55 -0
- package/dist/range-parser.js.LICENSE.txt +6 -0
- package/dist/remapping.js +201 -0
- package/dist/restart.d.ts +15 -0
- package/dist/rslib-runtime.js +49 -0
- package/dist/rspack-plugins/RsbuildHtmlPlugin.d.ts +37 -0
- package/dist/rspack-plugins/resource-hints/HtmlResourceHintsPlugin.d.ts +36 -0
- package/dist/rspack-plugins/resource-hints/doesChunkBelongToHtml.d.ts +27 -0
- package/dist/rspack-plugins/resource-hints/extractChunks.d.ts +22 -0
- package/dist/rspack-plugins/resource-hints/getResourceType.d.ts +21 -0
- package/dist/rspackConfig.d.ts +8 -0
- package/dist/server/ansiHTML.d.ts +3 -0
- package/dist/server/assets-middleware/getFileFromUrl.d.ts +11 -0
- package/dist/server/assets-middleware/index.d.ts +35 -0
- package/dist/server/assets-middleware/memoryFileSystem.d.ts +2 -0
- package/dist/server/assets-middleware/middleware.d.ts +7 -0
- package/dist/server/assets-middleware/parseTokenList.d.ts +1 -0
- package/dist/server/assets-middleware/setupOutputFileSystem.d.ts +3 -0
- package/dist/server/assets-middleware/setupWriteToDisk.d.ts +15 -0
- package/dist/server/browserLogs.d.ts +8 -0
- package/dist/server/buildManager.d.ts +32 -0
- package/dist/server/cliShortcuts.d.ts +19 -0
- package/dist/server/compileState.d.ts +5 -0
- package/dist/server/devMiddlewares.d.ts +18 -0
- package/dist/server/devServer.d.ts +47 -0
- package/dist/server/environment.d.ts +8 -0
- package/dist/server/gracefulShutdown.d.ts +8 -0
- package/dist/server/gzipMiddleware.d.ts +2 -0
- package/dist/server/helper.d.ts +118 -0
- package/dist/server/historyApiFallback.d.ts +10 -0
- package/dist/server/hmrFallback.d.ts +1 -0
- package/dist/server/httpServer.d.ts +7 -0
- package/dist/server/middlewares.d.ts +31 -0
- package/dist/server/open.d.ts +12 -0
- package/dist/server/overlay.d.ts +3 -0
- package/dist/server/previewServer.d.ts +4 -0
- package/dist/server/proxy.d.ts +7 -0
- package/dist/server/publicPathnames.d.ts +2 -0
- package/dist/server/runner/asModule.d.ts +2 -0
- package/dist/server/runner/basic.d.ts +25 -0
- package/dist/server/runner/cjs.d.ts +10 -0
- package/dist/server/runner/esm.d.ts +6 -0
- package/dist/server/runner/index.d.ts +6 -0
- package/dist/server/runner/type.d.ts +42 -0
- package/dist/server/serverSetup.d.ts +2 -0
- package/dist/server/socketServer.d.ts +113 -0
- package/dist/server/watchFiles.d.ts +15 -0
- package/dist/sirv.js +122 -0
- package/dist/tinyglobby.js +1 -0
- package/dist/trace-mapping.js +548 -0
- package/dist/transformLoader.mjs +36 -0
- package/dist/transformRawLoader.mjs +4 -0
- package/dist/types/config.d.ts +1796 -0
- package/dist/types/context.d.ts +89 -0
- package/dist/types/hooks.d.ts +261 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/plugin.d.ts +479 -0
- package/dist/types/rsbuild.d.ts +241 -0
- package/dist/types/rspack.d.ts +10 -0
- package/dist/types/thirdParty.d.ts +161 -0
- package/dist/types/utils.d.ts +16 -0
- package/dist/workerLoader.mjs +94 -0
- package/dist/ws.js +2 -0
- package/package.json +107 -0
- package/static/openChrome.applescript +95 -0
- package/types.d.ts +422 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright JS Foundation and other contributors
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
'Software'), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
17
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
18
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
19
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
20
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"html-rspack-plugin","author":"Jan Nicklas <j.nicklas@me.com> (https://github.com/jantimon)","version":"6.1.11","funding":{"type":"opencollective","url":"https://opencollective.com/html-webpack-plugin"},"license":"MIT","types":"index.d.ts","type":"commonjs"}
|
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
import * as http from 'node:http';
|
|
2
|
+
import http__default, { ServerResponse, IncomingMessage } from 'node:http';
|
|
3
|
+
import * as net from 'node:net';
|
|
4
|
+
import net__default, { Socket } from 'node:net';
|
|
5
|
+
import http2, { Http2ServerResponse, Http2ServerRequest } from 'node:http2';
|
|
6
|
+
import { EventEmitter } from 'node:events';
|
|
7
|
+
import * as stream from 'node:stream';
|
|
8
|
+
|
|
9
|
+
interface ProxyTargetDetailed {
|
|
10
|
+
host?: string;
|
|
11
|
+
port?: number | string;
|
|
12
|
+
protocol?: string;
|
|
13
|
+
hostname?: string;
|
|
14
|
+
pathname?: string;
|
|
15
|
+
socketPath?: string;
|
|
16
|
+
key?: string;
|
|
17
|
+
passphrase?: string;
|
|
18
|
+
pfx?: Buffer | string;
|
|
19
|
+
cert?: string;
|
|
20
|
+
ca?: string;
|
|
21
|
+
ciphers?: string;
|
|
22
|
+
secureProtocol?: string;
|
|
23
|
+
}
|
|
24
|
+
type ProxyTarget = string | URL | ProxyTargetDetailed;
|
|
25
|
+
interface ProxyServerOptions {
|
|
26
|
+
/** URL string to be parsed. */
|
|
27
|
+
target?: ProxyTarget;
|
|
28
|
+
/** URL string to be parsed. */
|
|
29
|
+
forward?: ProxyTarget;
|
|
30
|
+
/** Object to be passed to http(s).request. */
|
|
31
|
+
agent?: any;
|
|
32
|
+
/** Enable HTTP/2 listener, default is `false` */
|
|
33
|
+
http2?: boolean;
|
|
34
|
+
/** Object to be passed to https.createServer()
|
|
35
|
+
* or http2.createSecureServer() if the `http2` option is enabled
|
|
36
|
+
*/
|
|
37
|
+
ssl?: any;
|
|
38
|
+
/** If you want to proxy websockets. */
|
|
39
|
+
ws?: boolean;
|
|
40
|
+
/** Adds x- forward headers. */
|
|
41
|
+
xfwd?: boolean;
|
|
42
|
+
/** Verify SSL certificate. */
|
|
43
|
+
secure?: boolean;
|
|
44
|
+
/** Explicitly specify if we are proxying to another proxy. */
|
|
45
|
+
toProxy?: boolean;
|
|
46
|
+
/** Specify whether you want to prepend the target's path to the proxy path. */
|
|
47
|
+
prependPath?: boolean;
|
|
48
|
+
/** Specify whether you want to ignore the proxy path of the incoming request. */
|
|
49
|
+
ignorePath?: boolean;
|
|
50
|
+
/** Local interface string to bind for outgoing connections. */
|
|
51
|
+
localAddress?: string;
|
|
52
|
+
/** Changes the origin of the host header to the target URL. */
|
|
53
|
+
changeOrigin?: boolean;
|
|
54
|
+
/** specify whether you want to keep letter case of response header key */
|
|
55
|
+
preserveHeaderKeyCase?: boolean;
|
|
56
|
+
/** Basic authentication i.e. 'user:password' to compute an Authorization header. */
|
|
57
|
+
auth?: string;
|
|
58
|
+
/** Rewrites the location hostname on (301 / 302 / 307 / 308) redirects, Default: null. */
|
|
59
|
+
hostRewrite?: string;
|
|
60
|
+
/** Rewrites the location host/ port on (301 / 302 / 307 / 308) redirects based on requested host/ port.Default: false. */
|
|
61
|
+
autoRewrite?: boolean;
|
|
62
|
+
/** Rewrites the location protocol on (301 / 302 / 307 / 308) redirects to 'http' or 'https'.Default: null. */
|
|
63
|
+
protocolRewrite?: string;
|
|
64
|
+
/** Rewrites domain of set-cookie headers. */
|
|
65
|
+
cookieDomainRewrite?: false | string | {
|
|
66
|
+
[oldDomain: string]: string;
|
|
67
|
+
};
|
|
68
|
+
/** Rewrites path of set-cookie headers. Default: false */
|
|
69
|
+
cookiePathRewrite?: false | string | {
|
|
70
|
+
[oldPath: string]: string;
|
|
71
|
+
};
|
|
72
|
+
/** Object with extra headers to be added to target requests. */
|
|
73
|
+
headers?: {
|
|
74
|
+
[header: string]: string;
|
|
75
|
+
};
|
|
76
|
+
/** Timeout (in milliseconds) when proxy receives no response from target. Default: 120000 (2 minutes) */
|
|
77
|
+
proxyTimeout?: number;
|
|
78
|
+
/** Timeout (in milliseconds) for incoming requests */
|
|
79
|
+
timeout?: number;
|
|
80
|
+
/** If set to true, none of the webOutgoing passes are called and it's your responsibility to appropriately return the response by listening and acting on the proxyRes event */
|
|
81
|
+
selfHandleResponse?: boolean;
|
|
82
|
+
/** Follow HTTP redirects from target. `true` = max 5 hops; number = custom max. */
|
|
83
|
+
followRedirects?: boolean | number;
|
|
84
|
+
/** Buffer */
|
|
85
|
+
buffer?: stream.Stream;
|
|
86
|
+
}
|
|
87
|
+
type ResOfType<T extends "web" | "ws"> = T extends "ws" ? T extends "web" ? ServerResponse | Http2ServerResponse | Socket : Socket : T extends "web" ? ServerResponse | Http2ServerResponse : never;
|
|
88
|
+
type ProxyMiddleware<T extends ServerResponse | Http2ServerResponse | Socket> = (req: IncomingMessage | Http2ServerRequest, res: T, opts: ProxyServerOptions & {
|
|
89
|
+
target: URL | ProxyTargetDetailed;
|
|
90
|
+
forward: URL;
|
|
91
|
+
}, server: ProxyServer<IncomingMessage | Http2ServerRequest, ServerResponse | Http2ServerResponse>, head?: Buffer, callback?: (err: any, req: IncomingMessage | Http2ServerRequest, socket: T, url?: any) => void) => void | true;
|
|
92
|
+
interface ProxyServerEventMap<Req extends http__default.IncomingMessage | http2.Http2ServerRequest = http__default.IncomingMessage, Res extends http__default.ServerResponse | http2.Http2ServerResponse = http__default.ServerResponse> {
|
|
93
|
+
error: [err: Error, req?: Req, res?: Res | net__default.Socket, target?: URL | ProxyTarget];
|
|
94
|
+
start: [req: Req, res: Res, target: URL | ProxyTarget];
|
|
95
|
+
econnreset: [err: Error, req: Req, res: Res, target: URL | ProxyTarget];
|
|
96
|
+
proxyReq: [proxyReq: http__default.ClientRequest, req: Req, res: Res, options: ProxyServerOptions];
|
|
97
|
+
proxyReqWs: [proxyReq: http__default.ClientRequest, req: Req, socket: net__default.Socket, options: ProxyServerOptions, head: any];
|
|
98
|
+
proxyRes: [proxyRes: http__default.IncomingMessage, req: Req, res: Res];
|
|
99
|
+
end: [req: Req, res: Res, proxyRes: http__default.IncomingMessage];
|
|
100
|
+
open: [proxySocket: net__default.Socket];
|
|
101
|
+
/** @deprecated */
|
|
102
|
+
proxySocket: [proxySocket: net__default.Socket];
|
|
103
|
+
close: [proxyRes: Req, proxySocket: net__default.Socket, proxyHead: any];
|
|
104
|
+
}
|
|
105
|
+
declare class ProxyServer<Req extends http__default.IncomingMessage | http2.Http2ServerRequest = http__default.IncomingMessage, Res extends http__default.ServerResponse | http2.Http2ServerResponse = http__default.ServerResponse> extends EventEmitter<ProxyServerEventMap<Req, Res>> {
|
|
106
|
+
private _server?;
|
|
107
|
+
_webPasses: ProxyMiddleware<http__default.ServerResponse>[];
|
|
108
|
+
_wsPasses: ProxyMiddleware<net__default.Socket>[];
|
|
109
|
+
options: ProxyServerOptions;
|
|
110
|
+
web: (req: Req, res: Res, opts?: ProxyServerOptions, head?: any) => Promise<void>;
|
|
111
|
+
ws: (req: Req, socket: net__default.Socket, opts: ProxyServerOptions, head?: any) => Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* Creates the proxy server with specified options.
|
|
114
|
+
* @param options - Config object passed to the proxy
|
|
115
|
+
*/
|
|
116
|
+
constructor(options?: ProxyServerOptions);
|
|
117
|
+
/**
|
|
118
|
+
* A function that wraps the object in a webserver, for your convenience
|
|
119
|
+
* @param port - Port to listen on
|
|
120
|
+
* @param hostname - The hostname to listen on
|
|
121
|
+
* @param listeningListener - A callback function that is called when the server starts listening
|
|
122
|
+
*/
|
|
123
|
+
listen(port: number, hostname?: string, listeningListener?: () => void): this;
|
|
124
|
+
/**
|
|
125
|
+
* A function that closes the inner webserver and stops listening on given port
|
|
126
|
+
*/
|
|
127
|
+
close(callback?: () => void): void;
|
|
128
|
+
before<Type extends "ws" | "web">(type: Type, passName: string, pass: ProxyMiddleware<ResOfType<Type>>): void;
|
|
129
|
+
after<Type extends "ws" | "web">(type: Type, passName: string, pass: ProxyMiddleware<ResOfType<Type>>): void;
|
|
130
|
+
/** @internal */
|
|
131
|
+
_getPasses<Type extends "ws" | "web">(type: Type): ProxyMiddleware<ResOfType<Type>>[];
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Based on definition by DefinitelyTyped:
|
|
136
|
+
* https://github.com/DefinitelyTyped/DefinitelyTyped/blob/6f529c6c67a447190f86bfbf894d1061e41e07b7/types/http-proxy-middleware/index.d.ts
|
|
137
|
+
*/
|
|
138
|
+
|
|
139
|
+
type NextFunction<T = (err?: any) => void> = T;
|
|
140
|
+
interface RequestHandler<TReq extends http.IncomingMessage = http.IncomingMessage, TRes extends http.ServerResponse = http.ServerResponse, TNext = NextFunction> {
|
|
141
|
+
(req: TReq, res: TRes, next?: TNext): Promise<void>;
|
|
142
|
+
upgrade: (req: TReq, socket: net.Socket, head: Buffer) => void;
|
|
143
|
+
}
|
|
144
|
+
type Filter<TReq extends http.IncomingMessage = http.IncomingMessage> = string | string[] | ((pathname: string, req: TReq) => boolean | string | RegExpMatchArray | null);
|
|
145
|
+
/**
|
|
146
|
+
* @see {@link https://github.com/chimurai/http-proxy-middleware/tree/master#defineplugin-helper `definePlugin()`} to define a http-proxy-middleware plugin.
|
|
147
|
+
*/
|
|
148
|
+
interface Plugin<TReq extends http.IncomingMessage = http.IncomingMessage, TRes extends http.ServerResponse = http.ServerResponse> {
|
|
149
|
+
(proxyServer: ProxyServer<TReq, TRes>, options: Options<TReq, TRes>): void;
|
|
150
|
+
}
|
|
151
|
+
interface OnProxyEvent<TReq extends http.IncomingMessage = http.IncomingMessage, TRes extends http.ServerResponse = http.ServerResponse> {
|
|
152
|
+
error?: (err: Error, req: TReq, res: TRes | net.Socket, target?: string | Partial<URL>) => void;
|
|
153
|
+
proxyReq?: (proxyReq: http.ClientRequest, req: TReq, res: TRes, options: ProxyServerOptions) => void;
|
|
154
|
+
proxyReqWs?: (proxyReq: http.ClientRequest, req: TReq, socket: net.Socket, options: ProxyServerOptions, head: any) => void;
|
|
155
|
+
proxyRes?: (proxyRes: TReq, req: TReq, res: TRes) => void | Promise<void>;
|
|
156
|
+
open?: (proxySocket: net.Socket) => void;
|
|
157
|
+
close?: (proxyRes: TReq, proxySocket: net.Socket, proxyHead: any) => void;
|
|
158
|
+
start?: (req: TReq, res: TRes, target: string | Partial<URL>) => void;
|
|
159
|
+
end?: (req: TReq, res: TRes, proxyRes: TReq) => void;
|
|
160
|
+
econnreset?: (err: Error, req: TReq, res: TRes, target: string | Partial<URL>) => void;
|
|
161
|
+
}
|
|
162
|
+
type Logger = Pick<Console, 'info' | 'warn' | 'error'>;
|
|
163
|
+
type PathRewriteConfig<TReq extends http.IncomingMessage = http.IncomingMessage, TRes extends http.ServerResponse = http.ServerResponse> = {
|
|
164
|
+
[regexp: string]: string;
|
|
165
|
+
} | ((path: string, req: TReq,
|
|
166
|
+
/** `res` is undefined in WebSocket upgrade flows. */
|
|
167
|
+
res?: TRes | undefined, options?: Options<TReq, TRes>) => string | undefined) | ((path: string, req: TReq,
|
|
168
|
+
/** `res` is undefined in WebSocket upgrade flows. */
|
|
169
|
+
res?: TRes | undefined, options?: Options<TReq, TRes>) => Promise<string | undefined>);
|
|
170
|
+
interface Options<TReq extends http.IncomingMessage = http.IncomingMessage, TRes extends http.ServerResponse = http.ServerResponse> extends ProxyServerOptions {
|
|
171
|
+
/**
|
|
172
|
+
* Narrow down requests to proxy or not.
|
|
173
|
+
* Filter on {@link http.IncomingMessage.url `pathname`} which is relative to the proxy's "mounting" point in the server.
|
|
174
|
+
* Or use the {@link http.IncomingMessage `req`} object for more complex filtering.
|
|
175
|
+
* @link https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/pathFilter.md
|
|
176
|
+
* @since v3.0.0
|
|
177
|
+
*/
|
|
178
|
+
pathFilter?: Filter<TReq>;
|
|
179
|
+
/**
|
|
180
|
+
* Modify request paths before requests are send to the target.
|
|
181
|
+
* @example
|
|
182
|
+
* ```js
|
|
183
|
+
* createProxyMiddleware({
|
|
184
|
+
* pathRewrite: {
|
|
185
|
+
* '^/api/old-path': '/api/new-path', // rewrite path
|
|
186
|
+
* }
|
|
187
|
+
* });
|
|
188
|
+
* ```
|
|
189
|
+
* @since v0.15.0
|
|
190
|
+
* @since v0.21.0 - support `async` function
|
|
191
|
+
* @since v4.1.0 - `res` and `options` parameters added to custom function
|
|
192
|
+
*
|
|
193
|
+
* @link https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/pathRewrite.md
|
|
194
|
+
*/
|
|
195
|
+
pathRewrite?: PathRewriteConfig<TReq, TRes>;
|
|
196
|
+
/**
|
|
197
|
+
* Access the internal `httpxy` server instance to customize behavior
|
|
198
|
+
*
|
|
199
|
+
* @example
|
|
200
|
+
* ```js
|
|
201
|
+
* createProxyMiddleware({
|
|
202
|
+
* plugins: [(proxyServer, options) => {
|
|
203
|
+
* proxyServer.on('error', (error, req, res) => {
|
|
204
|
+
* console.error(error);
|
|
205
|
+
* });
|
|
206
|
+
* }]
|
|
207
|
+
* });
|
|
208
|
+
* ```
|
|
209
|
+
* @link https://github.com/chimurai/http-proxy-middleware#plugins-array
|
|
210
|
+
* @since v3.0.0
|
|
211
|
+
*/
|
|
212
|
+
plugins?: Plugin<TReq, TRes>[];
|
|
213
|
+
/**
|
|
214
|
+
* Eject pre-configured plugins.
|
|
215
|
+
* NOTE: register your own error handlers to prevent server from crashing.
|
|
216
|
+
*
|
|
217
|
+
* @link https://github.com/chimurai/http-proxy-middleware#ejectplugins-boolean-default-false
|
|
218
|
+
* @since v3.0.0
|
|
219
|
+
*/
|
|
220
|
+
ejectPlugins?: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Listen to `httpxy` events
|
|
223
|
+
* @see {@link OnProxyEvent} for available events
|
|
224
|
+
* @example
|
|
225
|
+
* ```js
|
|
226
|
+
* createProxyMiddleware({
|
|
227
|
+
* on: {
|
|
228
|
+
* error: (error, req, res, target) => {
|
|
229
|
+
* console.error(error);
|
|
230
|
+
* }
|
|
231
|
+
* }
|
|
232
|
+
* });
|
|
233
|
+
* ```
|
|
234
|
+
* @link https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/proxy-events.md
|
|
235
|
+
* @since v3.0.0
|
|
236
|
+
*/
|
|
237
|
+
on?: OnProxyEvent<TReq, TRes>;
|
|
238
|
+
/**
|
|
239
|
+
* Dynamically set the {@link Options.target `options.target`}.
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* ```js
|
|
243
|
+
* createProxyMiddleware({
|
|
244
|
+
* router: async (req, res, options) => {
|
|
245
|
+
* return 'http://127:0.0.1:3000';
|
|
246
|
+
* }
|
|
247
|
+
* });
|
|
248
|
+
* ```
|
|
249
|
+
*
|
|
250
|
+
* @since v0.16.0
|
|
251
|
+
* @since v4.1.0 - `res` and `options` parameters added to router function signature
|
|
252
|
+
*
|
|
253
|
+
* NOTE: `res` is undefined in WebSocket upgrade flows.
|
|
254
|
+
*
|
|
255
|
+
* @link https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/router.md
|
|
256
|
+
*/
|
|
257
|
+
router?: Record<string, ProxyServerOptions['target']> | ((req: TReq, res: TRes | undefined, options: Options<TReq, TRes>) => ProxyServerOptions['target']) | ((req: TReq, res: TRes | undefined, options: Options<TReq, TRes>) => Promise<ProxyServerOptions['target']>);
|
|
258
|
+
/**
|
|
259
|
+
* Log information from http-proxy-middleware
|
|
260
|
+
* @example
|
|
261
|
+
* ```js
|
|
262
|
+
* createProxyMiddleware({
|
|
263
|
+
* logger: console
|
|
264
|
+
* });
|
|
265
|
+
* ```
|
|
266
|
+
* @link https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/logger.md
|
|
267
|
+
* @since v3.0.0
|
|
268
|
+
*/
|
|
269
|
+
logger?: Logger;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Create proxy middleware for Express-like servers. ([list of servers with examples](https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/servers.md))
|
|
274
|
+
*
|
|
275
|
+
* @example Basic proxy to a single target.
|
|
276
|
+
* ```ts
|
|
277
|
+
* import { createProxyMiddleware } from 'http-proxy-middleware';
|
|
278
|
+
*
|
|
279
|
+
* const proxy = createProxyMiddleware({
|
|
280
|
+
* target: 'http://www.example.org',
|
|
281
|
+
* changeOrigin: true,
|
|
282
|
+
* });
|
|
283
|
+
* ```
|
|
284
|
+
*
|
|
285
|
+
* @example Proxy only matching paths and rewrite the forwarded path.
|
|
286
|
+
* ```ts
|
|
287
|
+
* import { createProxyMiddleware } from 'http-proxy-middleware';
|
|
288
|
+
*
|
|
289
|
+
* const proxy = createProxyMiddleware({
|
|
290
|
+
* target: 'http://localhost:3000',
|
|
291
|
+
* pathFilter: '/api',
|
|
292
|
+
* pathRewrite: {
|
|
293
|
+
* '^/api/': '/',
|
|
294
|
+
* },
|
|
295
|
+
* });
|
|
296
|
+
* ```
|
|
297
|
+
*
|
|
298
|
+
* @example Native path rewrite by mounting at a route (alternative to `pathRewrite`).
|
|
299
|
+
* ```ts
|
|
300
|
+
* import express from 'express';
|
|
301
|
+
* import { createProxyMiddleware } from 'http-proxy-middleware';
|
|
302
|
+
*
|
|
303
|
+
* const app = express();
|
|
304
|
+
* app.use(
|
|
305
|
+
* '/users',
|
|
306
|
+
* createProxyMiddleware({
|
|
307
|
+
* target: 'http://jsonplaceholder.typicode.com/users',
|
|
308
|
+
* changeOrigin: true,
|
|
309
|
+
* }),
|
|
310
|
+
* );
|
|
311
|
+
* ```
|
|
312
|
+
*
|
|
313
|
+
* @example Use framework-specific request/response types (Express).
|
|
314
|
+
* ```ts
|
|
315
|
+
* import type { Request, Response } from 'express';
|
|
316
|
+
* import { createProxyMiddleware } from 'http-proxy-middleware';
|
|
317
|
+
*
|
|
318
|
+
* const proxy = createProxyMiddleware<Request, Response>({
|
|
319
|
+
* target: 'http://www.example.org/api',
|
|
320
|
+
* changeOrigin: true,
|
|
321
|
+
* });
|
|
322
|
+
* ```
|
|
323
|
+
*
|
|
324
|
+
* @example Intercept and modify a proxied response body.
|
|
325
|
+
* ```ts
|
|
326
|
+
* import { createProxyMiddleware, responseInterceptor } from 'http-proxy-middleware';
|
|
327
|
+
*
|
|
328
|
+
* const proxy = createProxyMiddleware({
|
|
329
|
+
* target: 'http://www.example.org',
|
|
330
|
+
* selfHandleResponse: true,
|
|
331
|
+
* on: {
|
|
332
|
+
* proxyRes: responseInterceptor(async (responseBuffer) => {
|
|
333
|
+
* const response = responseBuffer.toString('utf8');
|
|
334
|
+
* return response.replace('Hello', 'Goodbye');
|
|
335
|
+
* }),
|
|
336
|
+
* },
|
|
337
|
+
* });
|
|
338
|
+
* ```
|
|
339
|
+
*
|
|
340
|
+
* @see https://github.com/chimurai/http-proxy-middleware/
|
|
341
|
+
* @see https://github.com/chimurai/http-proxy-middleware/#basic-usage
|
|
342
|
+
* @see https://github.com/chimurai/http-proxy-middleware/#intercept-and-manipulate-responses
|
|
343
|
+
* @see https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/servers.md
|
|
344
|
+
* @see https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/pathFilter.md
|
|
345
|
+
* @see https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/pathRewrite.md
|
|
346
|
+
* @see https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/response-interceptor.md
|
|
347
|
+
*/
|
|
348
|
+
declare function createProxyMiddleware<TReq extends http.IncomingMessage = http.IncomingMessage, TRes extends http.ServerResponse = http.ServerResponse, TNext = NextFunction>(options: Options<TReq, TRes>): RequestHandler<TReq, TRes, TNext>;
|
|
349
|
+
|
|
350
|
+
type Interceptor<TReq = http.IncomingMessage, TRes = http.ServerResponse> = (buffer: Buffer, proxyRes: http.IncomingMessage, req: TReq, res: TRes) => Promise<Buffer | string>;
|
|
351
|
+
/**
|
|
352
|
+
* Intercept responses from upstream.
|
|
353
|
+
* Automatically decompress (deflate, gzip, brotli, zstd).
|
|
354
|
+
* Give developer the opportunity to modify intercepted Buffer and http.ServerResponse
|
|
355
|
+
*
|
|
356
|
+
* NOTE: must set options.selfHandleResponse=true (prevent automatic call of res.end())
|
|
357
|
+
*
|
|
358
|
+
* @example
|
|
359
|
+
*
|
|
360
|
+
* ```ts
|
|
361
|
+
* createProxyMiddleware({
|
|
362
|
+
* target: 'http://example.com',
|
|
363
|
+
* selfHandleResponse: true, // MUST set selfHandleResponse=true
|
|
364
|
+
* on: {
|
|
365
|
+
* proxyRes: responseInterceptor(async (buffer, proxyRes, req, res) => {
|
|
366
|
+
* // modify intercepted buffer and return modified buffer
|
|
367
|
+
* const modifiedBuffer = Buffer.from(buffer.toString().replace(/Example/g, 'Demo'), 'utf8');
|
|
368
|
+
* return modifiedBuffer;
|
|
369
|
+
* }),
|
|
370
|
+
* }
|
|
371
|
+
* });
|
|
372
|
+
* ```
|
|
373
|
+
*/
|
|
374
|
+
declare function responseInterceptor<TReq extends http.IncomingMessage = http.IncomingMessage, TRes extends http.ServerResponse = http.ServerResponse>(interceptor: Interceptor<TReq, TRes>): (proxyRes: http.IncomingMessage, req: TReq, res: TRes) => Promise<void>;
|
|
375
|
+
|
|
376
|
+
type BodyParserLikeRequest = http.IncomingMessage & {
|
|
377
|
+
body?: any;
|
|
378
|
+
};
|
|
379
|
+
/**
|
|
380
|
+
* Fix proxied body if bodyParser is involved.
|
|
381
|
+
*
|
|
382
|
+
* @example
|
|
383
|
+
* ```ts
|
|
384
|
+
* createProxyMiddleware({
|
|
385
|
+
* target: 'http://example.com',
|
|
386
|
+
* on: {
|
|
387
|
+
* proxyReq: fixRequestBody,
|
|
388
|
+
* }
|
|
389
|
+
* });
|
|
390
|
+
* ```
|
|
391
|
+
*
|
|
392
|
+
* Alternative solution without using `fixRequestBody()`: put `http-proxy-middleware` before `bodyParser` in the middleware stack.
|
|
393
|
+
*
|
|
394
|
+
* @see {@link https://github.com/chimurai/http-proxy-middleware/issues/40 Github issue #40 - POST request body is not proxied}
|
|
395
|
+
*/
|
|
396
|
+
declare function fixRequestBody<TReq extends BodyParserLikeRequest = BodyParserLikeRequest>(proxyReq: http.ClientRequest, req: TReq): void;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Helper function to define a http-proxy-middleware plugin
|
|
400
|
+
* @see proxyServer {@link ProxyServer} - proxy server instance to which the plugin is being applied
|
|
401
|
+
* @see options {@link Options} - options object passed to `createProxyMiddleware`
|
|
402
|
+
*
|
|
403
|
+
* @example defining a plugin
|
|
404
|
+
* ```js
|
|
405
|
+
* export const myPlugin = definePlugin((proxyServer, options) => {
|
|
406
|
+
* // plugin implementation
|
|
407
|
+
* });
|
|
408
|
+
* ```
|
|
409
|
+
*
|
|
410
|
+
* @example using a plugin
|
|
411
|
+
* ```js
|
|
412
|
+
* createProxyMiddleware({
|
|
413
|
+
* target: 'http://example.com',
|
|
414
|
+
* plugins: [myPlugin],
|
|
415
|
+
* });
|
|
416
|
+
* ```
|
|
417
|
+
*
|
|
418
|
+
* @since 4.1.0
|
|
419
|
+
*/
|
|
420
|
+
declare function definePlugin<TReq extends http.IncomingMessage = http.IncomingMessage, TRes extends http.ServerResponse = http.ServerResponse>(fn: Plugin<TReq, TRes>): Plugin<TReq, TRes>;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Subscribe to {@link https://github.com/unjs/httpxy#events `httpxy` error events} to prevent server from crashing.
|
|
424
|
+
* Errors are logged with {@link https://www.npmjs.com/package/debug debug} library.
|
|
425
|
+
*/
|
|
426
|
+
declare const debugProxyErrorsPlugin: Plugin;
|
|
427
|
+
|
|
428
|
+
declare const errorResponsePlugin: Plugin;
|
|
429
|
+
|
|
430
|
+
declare const loggerPlugin: Plugin;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Implements option.on object to subscribe to `httpxy` events.
|
|
434
|
+
*
|
|
435
|
+
* @example
|
|
436
|
+
* ```js
|
|
437
|
+
* createProxyMiddleware({
|
|
438
|
+
* on: {
|
|
439
|
+
* error: (error, req, res, target) => {},
|
|
440
|
+
* proxyReq: (proxyReq, req, res, options) => {},
|
|
441
|
+
* proxyReqWs: (proxyReq, req, socket, options) => {},
|
|
442
|
+
* proxyRes: (proxyRes, req, res) => {},
|
|
443
|
+
* open: (proxySocket) => {},
|
|
444
|
+
* close: (proxyRes, proxySocket, proxyHead) => {},
|
|
445
|
+
* start: (req, res, target) => {},
|
|
446
|
+
* end: (req, res, proxyRes) => {},
|
|
447
|
+
* econnreset: (error, req, res, target) => {},
|
|
448
|
+
* }
|
|
449
|
+
* });
|
|
450
|
+
* ```
|
|
451
|
+
*/
|
|
452
|
+
declare const proxyEventsPlugin: Plugin;
|
|
453
|
+
|
|
454
|
+
export { createProxyMiddleware, debugProxyErrorsPlugin, definePlugin, errorResponsePlugin, fixRequestBody, loggerPlugin, proxyEventsPlugin, responseInterceptor };
|
|
455
|
+
export type { Filter, OnProxyEvent, Options, Plugin, RequestHandler };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 Steven Chim
|
|
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 all
|
|
13
|
+
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 THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"http-proxy-middleware","author":"Steven Chim","version":"4.2.0","license":"MIT","types":"index.d.ts","type":"module"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Pooya Parsa <pooya@pi0.io>
|
|
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 all
|
|
13
|
+
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 THE
|
|
21
|
+
SOFTWARE.
|