reverse-proxy-middleware 0.0.135 → 0.0.137
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/helper.d.ts +6 -5
- package/index.js +21 -32
- package/package.json +24 -12
package/helper.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { BufferedHTTPServerRequest, EvaluationParameters, EvaluationScopeStateAPIs, Forwarders, HTTPServerResponse, ResolvedHeaderTransformation, ResolvedForwarder, ResolvedForwarders } from './type';
|
|
2
2
|
export declare const EVALUATION_SCOPE_NAMES: readonly ["array", "datetime", "filesystem", "functions", "indicators", "logger", "module", "number", "object", "string", "utility", "data", "error", "request", "response", "stateAPI", "stateAPIs"];
|
|
3
|
+
declare const log: (...parameters: Array<unknown>) => Promise<void>;
|
|
3
4
|
export declare const logging: {
|
|
4
|
-
log:
|
|
5
|
-
debug:
|
|
6
|
-
info:
|
|
7
|
-
error:
|
|
8
|
-
warn:
|
|
5
|
+
log: typeof log;
|
|
6
|
+
debug: typeof log;
|
|
7
|
+
info: typeof log;
|
|
8
|
+
error: typeof log;
|
|
9
|
+
warn: typeof log;
|
|
9
10
|
};
|
|
10
11
|
export declare const applyStateAPIs: (request: BufferedHTTPServerRequest, response: HTTPServerResponse, forwarder: ResolvedForwarder) => Promise<{
|
|
11
12
|
result: boolean;
|
package/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// -*- coding: utf-8 -*-
|
|
3
|
+
|
|
3
4
|
import { createConnection as __WEBPACK_EXTERNAL_MODULE_net_createConnection__ } from "net";
|
|
4
5
|
import { connect as __WEBPACK_EXTERNAL_MODULE_tls_connect__ } from "tls";
|
|
5
6
|
import * as __WEBPACK_EXTERNAL_MODULE_clientnode__ from "clientnode";
|
|
@@ -121,7 +122,7 @@ var server={instance:CONFIGURATION.publicKeyPath&&CONFIGURATION.privateKeyPath?(
|
|
|
121
122
|
responding to client occurred.
|
|
122
123
|
*/void (0,clientnode__WEBPACK_IMPORTED_MODULE_0__.timeout)(function(){socket.buffer.finished=true});socket.on("close",function(){socket.buffer.finished=true;server.sockets.splice(server.sockets.indexOf(socket),1)})});server.instance.on("stream",function(stream,headers){server.streams.push(stream);onIncomingStream(stream,headers);stream.on("close",function(){server.streams.splice(server.streams.indexOf(stream),1)})});// endregion
|
|
123
124
|
// region start / stop
|
|
124
|
-
if(
|
|
125
|
+
if(import.meta.main){void _helper_js__WEBPACK_IMPORTED_MODULE_4__/* .logging */ .m9.info("Start server with configuration:",(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.represent)(CONFIGURATION));void _helper_js__WEBPACK_IMPORTED_MODULE_4__/* .logging */ .m9.debug("Apply resolved forwarder:",(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.represent)(FORWARDERS));server.start();var _iterator3=_createForOfIteratorHelper(clientnode__WEBPACK_IMPORTED_MODULE_0__.CLOSE_EVENT_NAMES),_step3;try{var _loop=function _loop(){var name=_step3.value;process.on(name,function(){void _helper_js__WEBPACK_IMPORTED_MODULE_4__/* .logging */ .m9.info("\nGot \"".concat(name,"\" signal: stopping server."));server.stop()})};for(_iterator3.s();!(_step3=_iterator3.n()).done;){_loop()}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}}// endregion
|
|
125
126
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (server);
|
|
126
127
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, [
|
|
127
128
|
/* harmony export */ "A", 0, /* export default binding */ __WEBPACK_DEFAULT_EXPORT__
|
|
@@ -211,9 +212,6 @@ module.exports = /*#__PURE__*/JSON.parse('{"HF":{"forwarders":{"base":{"headerTr
|
|
|
211
212
|
/******/ return module.exports;
|
|
212
213
|
/******/ }
|
|
213
214
|
/******/
|
|
214
|
-
/******/ // expose the module cache
|
|
215
|
-
/******/ __webpack_require__.c = __webpack_module_cache__;
|
|
216
|
-
/******/
|
|
217
215
|
/************************************************************************/
|
|
218
216
|
/******/ /* webpack/runtime/async module */
|
|
219
217
|
/******/ (() => {
|
|
@@ -292,43 +290,34 @@ module.exports = /*#__PURE__*/JSON.parse('{"HF":{"forwarders":{"base":{"headerTr
|
|
|
292
290
|
/******/ })();
|
|
293
291
|
/******/
|
|
294
292
|
/******/ /* webpack/runtime/define property getters */
|
|
295
|
-
/******/
|
|
296
|
-
/******/
|
|
297
|
-
/******/
|
|
298
|
-
/******/
|
|
299
|
-
/******/
|
|
300
|
-
/******/
|
|
301
|
-
/******/
|
|
302
|
-
/******/
|
|
303
|
-
/******/
|
|
304
|
-
/******/
|
|
305
|
-
/******/
|
|
306
|
-
/******/
|
|
307
|
-
/******/
|
|
308
|
-
/******/
|
|
309
|
-
/******/ } else if(binding === 0) { i++; }
|
|
310
|
-
/******/ }
|
|
311
|
-
/******/ } else {
|
|
312
|
-
/******/ for(var key in definition) {
|
|
313
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
314
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
315
|
-
/******/ }
|
|
293
|
+
/******/ // define getter/value functions for harmony exports
|
|
294
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
295
|
+
/******/ if(Array.isArray(definition)) {
|
|
296
|
+
/******/ var i = 0;
|
|
297
|
+
/******/ while(i < definition.length) {
|
|
298
|
+
/******/ var key = definition[i++];
|
|
299
|
+
/******/ var binding = definition[i++];
|
|
300
|
+
/******/ var descriptor = binding === 0 ? { enumerable: true, value: definition[i++] } : { enumerable: true, get: binding };
|
|
301
|
+
/******/ if(!__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, descriptor);
|
|
302
|
+
/******/ }
|
|
303
|
+
/******/ } else {
|
|
304
|
+
/******/ for(var key in definition) {
|
|
305
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
306
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
316
307
|
/******/ }
|
|
317
308
|
/******/ }
|
|
318
|
-
/******/ }
|
|
319
|
-
/******/ }
|
|
309
|
+
/******/ }
|
|
310
|
+
/******/ };
|
|
320
311
|
/******/
|
|
321
312
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
322
|
-
/******/ (
|
|
323
|
-
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
324
|
-
/******/ })();
|
|
313
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));
|
|
325
314
|
/******/
|
|
326
315
|
/************************************************************************/
|
|
327
316
|
/******/
|
|
328
|
-
/******/ // module cache are used so entry inlining is disabled
|
|
329
317
|
/******/ // startup
|
|
330
318
|
/******/ // Load entry module and return exports
|
|
331
|
-
/******/
|
|
319
|
+
/******/ // This entry module used 'module' so it can't be inlined
|
|
320
|
+
/******/ let __webpack_exports__ = __webpack_require__(2);
|
|
332
321
|
/******/ __webpack_exports__ = await __webpack_exports__;
|
|
333
322
|
/******/ const __webpack_exports__default = __webpack_exports__.A;
|
|
334
323
|
/******/ export { __webpack_exports__default as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reverse-proxy-middleware",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.137",
|
|
4
4
|
"description": "A reverse proxy blocking bot requests.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api",
|
|
@@ -63,25 +63,25 @@
|
|
|
63
63
|
"watch": "weboptimizer build --watch"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"clientnode": "^4.0.
|
|
66
|
+
"clientnode": "^4.0.1514"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@babel/cli": "^8.0.4",
|
|
70
70
|
"@babel/eslint-parser": "^8.0.1",
|
|
71
71
|
"@eslint/js": "^10.0.1",
|
|
72
72
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
73
|
-
"@types/node": "^26.
|
|
73
|
+
"@types/node": "^26.5.1",
|
|
74
74
|
"@types/webpack-env": "^1.18.8",
|
|
75
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
76
|
-
"@typescript-eslint/parser": "^8.
|
|
77
|
-
"eslint": "^10.
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "^8.70.0",
|
|
76
|
+
"@typescript-eslint/parser": "^8.70.0",
|
|
77
|
+
"eslint": "^10.10.0",
|
|
78
78
|
"eslint-config-google": "^0.14.0",
|
|
79
|
-
"eslint-plugin-jsdoc": "^64.
|
|
80
|
-
"jest": "^30.
|
|
79
|
+
"eslint-plugin-jsdoc": "^64.3.9",
|
|
80
|
+
"jest": "^30.5.1",
|
|
81
81
|
"jsdoc": "^4.0.5",
|
|
82
|
-
"typescript-eslint": "^8.
|
|
83
|
-
"web-documentation": "^1.0.
|
|
84
|
-
"weboptimizer": "^4.0.
|
|
82
|
+
"typescript-eslint": "^8.70.0",
|
|
83
|
+
"web-documentation": "^1.0.52",
|
|
84
|
+
"weboptimizer": "^4.0.79"
|
|
85
85
|
},
|
|
86
86
|
"resolutions": {
|
|
87
87
|
"colors": "1.4.0",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"includeFilePathRegularExpression": "^(.+/)?index\\.js$",
|
|
138
138
|
"pattern": {
|
|
139
139
|
"#": "This is how we can make our main exported artefact executable.",
|
|
140
|
-
"__evaluate__": "`#!/usr/bin/env node\n// -*- coding: utf-8 -*-\n{1}`"
|
|
140
|
+
"__evaluate__": "`#!/usr/bin/env node\n// -*- coding: utf-8 -*-\n${self.generic.assetPattern?.javaScript?.pattern ?? ''}\n{1}`"
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
},
|
|
@@ -161,6 +161,18 @@
|
|
|
161
161
|
"targetTechnology": {
|
|
162
162
|
"boilerplate": "node",
|
|
163
163
|
"payload": "node"
|
|
164
|
+
},
|
|
165
|
+
"webpack": {
|
|
166
|
+
"module": {
|
|
167
|
+
"parser": {
|
|
168
|
+
"javascript": {
|
|
169
|
+
"importMeta": {
|
|
170
|
+
"#": "NOTE: We want to have this preserved by webpack to get the runtime value for \"import.meta.main\".",
|
|
171
|
+
"main": false
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
164
176
|
}
|
|
165
177
|
},
|
|
166
178
|
"packageManager": "yarn@4.18.0"
|