web-node 1.0.583 → 1.0.585

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 (2) hide show
  1. package/index.js +21 -8
  2. package/package.json +3 -10
package/index.js CHANGED
@@ -6,6 +6,7 @@ import * as __WEBPACK_EXTERNAL_MODULE_child_process__ from "child_process";
6
6
  import * as __WEBPACK_EXTERNAL_MODULE_clientnode__ from "clientnode";
7
7
  import * as __WEBPACK_EXTERNAL_MODULE_core_js_modules_es_array_includes_js_66c3fd7d__ from "core-js/modules/es.array.includes.js";
8
8
  import * as __WEBPACK_EXTERNAL_MODULE_fs__ from "fs";
9
+ import * as __WEBPACK_EXTERNAL_MODULE_node_url_50af3bb5__ from "node:url";
9
10
  import * as __WEBPACK_EXTERNAL_MODULE_path__ from "path";
10
11
  /******/ var __webpack_modules__ = ([
11
12
  /* 0 */
@@ -243,7 +244,8 @@ api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=argume
243
244
  * @returns Exported api file scope.
244
245
  */var loadFile=function loadFile(filePath,name,fallbackScope,doLogging){if(fallbackScope===void 0){fallbackScope=null}if(doLogging===void 0){doLogging=true}var reference;try{reference=currentRequire.resolve(filePath)}catch(_unused2){// Ignore error.
245
246
  }// Clear module cache to get actual new module scope.
246
- if(reference&&reference in currentRequire.cache)delete currentRequire.cache[reference];var scope;try{scope=currentRequire(filePath)}catch(error){if(fallbackScope){scope=fallbackScope;if(doLogging)log.warn("Couldn't load new api plugin file \"".concat(filePath,"\" for"),"plugin \"".concat(name,"\": ").concat((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.represent)(error),". Using"),"fallback one.")}else throw new Error("Couldn't load plugin file \"".concat(filePath,"\" for plugin ")+"\"".concat(name,"\": ").concat((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.represent)(error)),{cause:error})}if(Object.prototype.hasOwnProperty.call(scope,"default")&&scope.default)return scope.default;return scope};/**
247
+ if(reference&&reference in currentRequire.cache)delete currentRequire.cache[reference];var scope;try{// TODO: Will not work for esmodules i guess.
248
+ scope=currentRequire(filePath)}catch(error){if(fallbackScope){scope=fallbackScope;if(doLogging)log.warn("Couldn't load new api plugin file \"".concat(filePath,"\" for"),"plugin \"".concat(name,"\": ").concat((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.represent)(error),". Using"),"fallback one.")}else throw new Error("Couldn't load plugin file \"".concat(filePath,"\" for plugin ")+"\"".concat(name,"\": ").concat((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.represent)(error)),{cause:error})}if(Object.prototype.hasOwnProperty.call(scope,"default")&&scope.default)return scope.default;return scope};/**
247
249
  * Extends given configuration object with all plugin specific ones and returns
248
250
  * a topological sorted list of plugins with plugins specific meta information
249
251
  * stored.
@@ -387,6 +389,7 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
387
389
  /* harmony import */ var _configurator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
388
390
  /* harmony import */ var _pluginAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
389
391
  /* harmony import */ var clientnode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
392
+ /* harmony import */ var node_url__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9);
390
393
  var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_configurator_js__WEBPACK_IMPORTED_MODULE_0__, _pluginAPI_js__WEBPACK_IMPORTED_MODULE_1__]);
391
394
  ([_configurator_js__WEBPACK_IMPORTED_MODULE_0__, _pluginAPI_js__WEBPACK_IMPORTED_MODULE_1__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
392
395
  // #!/usr/bin/env babel-node
@@ -417,7 +420,10 @@ finished=false;closeHandler=function closeHandler(){if(!finished)(0,_pluginAPI_j
417
420
  "@typescript-eslint/unbound-method".
418
421
  */// eslint-disable-next-line @typescript-eslint/unbound-method
419
422
  if((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isFunction)(process.stdin["setRawMode"]))process.stdin.setRawMode(true);process.stdin.resume();process.stdin.setEncoding(configuration.core.encoding);process.stdin.on("data",function(key){void _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(){return _regenerator().w(function(_context2){while(1)switch(_context2.n){case 0:if(!(key==="\x03")){_context2.n=3;break}if(!cancelTriggered){_context2.n=1;break}log.warn("Stopping ungracefully.");_context2.n=2;break;case 1:cancelTriggered=true;log.info("You have requested to shut down all services. A","second request will force to stop ungracefully.");_context2.n=2;return (0,_pluginAPI_js__WEBPACK_IMPORTED_MODULE_1__/* .callStack */ .lT)({configuration:configuration,data:undefined,hook:"shouldExit",plugins:plugins,servicePromises:servicePromises,services:services});case 2:process.exit();case 3:process.stdout.write(key);case 4:return _context2.a(2)}},_callee2)}))()});// endregion
420
- _context3.p=25;_context3.n=26;return Promise.all(Object.keys(servicePromises).map(function(name){return servicePromises[name]}));case 26:_context3.n=28;break;case 27:_context3.p=27;_t5=_context3.v;case 28:exitTriggered=true;_context3.n=29;return (0,_pluginAPI_js__WEBPACK_IMPORTED_MODULE_1__/* .callStack */ .lT)({configuration:configuration,data:undefined,hook:"shouldExit",plugins:plugins,servicePromises:servicePromises,services:services});case 29:process.exit();_context3.n=38;break;case 30:_context3.p=30;_t6=_context3.v;_context3.n=31;return handleError({configuration:configuration,data:_t6,plugins:plugins,servicePromises:servicePromises,services:services});case 31:if(exitTriggered){_context3.n=35;break}_context3.p=32;_context3.n=33;return (0,_pluginAPI_js__WEBPACK_IMPORTED_MODULE_1__/* .callStack */ .lT)({configuration:configuration,data:undefined,hook:"shouldExit",plugins:plugins,servicePromises:servicePromises,services:services});case 33:_context3.n=35;break;case 34:_context3.p=34;_t7=_context3.v;_context3.n=35;return handleError({configuration:configuration,data:_t7,plugins:plugins,servicePromises:servicePromises,services:services});case 35:if(!configuration.core.debug){_context3.n=36;break}throw _t6;case 36:log.error(_t6);case 37:process.exit(1);case 38:return _context3.a(2)}},_callee3,null,[[32,34],[25,27],[15,17],[12,21,22,23],[10,30],[3,7,8,9]])}));function main(){return _main.apply(this,arguments)}return main}();if(__webpack_require__.c[__webpack_require__.s] === module)void main();/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (main);
423
+ _context3.p=25;_context3.n=26;return Promise.all(Object.keys(servicePromises).map(function(name){return servicePromises[name]}));case 26:_context3.n=28;break;case 27:_context3.p=27;_t5=_context3.v;case 28:exitTriggered=true;_context3.n=29;return (0,_pluginAPI_js__WEBPACK_IMPORTED_MODULE_1__/* .callStack */ .lT)({configuration:configuration,data:undefined,hook:"shouldExit",plugins:plugins,servicePromises:servicePromises,services:services});case 29:process.exit();_context3.n=38;break;case 30:_context3.p=30;_t6=_context3.v;_context3.n=31;return handleError({configuration:configuration,data:_t6,plugins:plugins,servicePromises:servicePromises,services:services});case 31:if(exitTriggered){_context3.n=35;break}_context3.p=32;_context3.n=33;return (0,_pluginAPI_js__WEBPACK_IMPORTED_MODULE_1__/* .callStack */ .lT)({configuration:configuration,data:undefined,hook:"shouldExit",plugins:plugins,servicePromises:servicePromises,services:services});case 33:_context3.n=35;break;case 34:_context3.p=34;_t7=_context3.v;_context3.n=35;return handleError({configuration:configuration,data:_t7,plugins:plugins,servicePromises:servicePromises,services:services});case 35:if(!configuration.core.debug){_context3.n=36;break}throw _t6;case 36:log.error(_t6);case 37:process.exit(1);case 38:return _context3.a(2)}},_callee3,null,[[32,34],[25,27],[15,17],[12,21,22,23],[10,30],[3,7,8,9]])}));function main(){return _main.apply(this,arguments)}return main}();/*
424
+ NOTE: "if (import.meta.main)" cannot be used since it will be modified by
425
+ bundler's during compile time.
426
+ */if("file:///__w/web-node/web-node/index.ts"===(0,node_url__WEBPACK_IMPORTED_MODULE_3__.pathToFileURL)(process.argv[1]).href)void main();/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (main);
421
427
  /* harmony export */ __webpack_require__.d(__webpack_exports__, [
422
428
  /* harmony export */ "Ay", 0, /* export default binding */ __WEBPACK_DEFAULT_EXPORT__
423
429
  /* harmony export */ ]);
@@ -429,7 +435,7 @@ __webpack_async_result__();
429
435
  /* 6 */
430
436
  /***/ ((module) => {
431
437
 
432
- module.exports = /*#__PURE__*/JSON.parse('{"name":"web-node","version":"1.0.583","description":"High level javaScript backend plugin system and configuration merger.","keywords":["api","backend","management","plugin","web"],"homepage":"https://torben.website/web-node","bugs":{"email":"info@torben.website","url":"https://github.com/thaibault/web-node/issues"},"license":"CC-BY-3.0","author":{"name":"Torben Sickert","email":"info@torben.website","url":"https://torben.website"},"files":["configurator.d.ts","index.d.ts","index.js","pluginAPI.d.ts","type.d.ts","unixCrypt.d.ts","unixCrypt.js"],"bin":"index.js","type":"module","repository":{"type":"git","url":"https://github.com/thaibault/web-node.git"},"scripts":{"build":"yarn build:types; yarn build:plain","build:plain":"weboptimizer build","build:types":"weboptimizer build:types","check":"yarn check:types; yarn lint","check:types":"weboptimizer check:types","clear":"weboptimizer clear","document":"weboptimizer document","lint":"weboptimizer lint","prepare":"yarn build","serve":"yarn build:plain && yarn start","start":"./index.js \'{plugin: {hotReloading: true}}\'","prepare:test":"yarn clear && cd dummyPlugin && shx touch yarn.lock && yarn build && cd ..","test":"yarn prepare:test && weboptimizer test","test:coverage":"yarn prepare:test && weboptimizer test:coverage","test:coverage:report":"yarn prepare:test && weboptimizer test:coverage:report","update:documentation":"web-documentation","watch":"weboptimizer build --watch"},"devDependencies":{"@babel/cli":"^8.0.4","@babel/eslint-parser":"^8.0.1","@babel/runtime":"^8.0.0","@eslint/js":"^10.0.1","@stylistic/eslint-plugin":"^5.10.0","@types/node":"^26.1.2","@types/webpack-env":"^1.18.8","@typescript-eslint/eslint-plugin":"^8.65.0","@typescript-eslint/parser":"^8.65.0","clientnode":"^4.0.1481","eslint":"^10.8.0","eslint-config-google":"^0.14.0","eslint-plugin-jsdoc":"^63.3.2","jest":"^30.4.2","jsdoc":"^4.0.5","shx":"^0.4.0","typescript-eslint":"^8.65.0","web-documentation":"^1.0.44","weboptimizer":"^4.0.48"},"peerDependencies":{"@babel/runtime":"*","clientnode":"*"},"peerDependenciesMeta":{"@babel/runtime":{"optional":true}},"engines":{"node":">=24","npm":">=11","yarn":">=4"},"resolutions":{"colors":"1.4.0","globals@npm:^14.0.0":"patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch","globals@npm:^11.1.0":"patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch","globals@npm:^9.18.0":"patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch"},"sideEffects":true,"webDocumentation":{"trackingCode":"UA-40192634-9"},"webNode":{"core":{"context":{"path":"./","type":"relative"},"debug":false,"encoding":"utf8","interDependencies":{},"name":"web-node","plugin":{"configuration":{"fileNames":["package.json","private-package.json"],"propertyNames":["webNode","webnode","web-node"]},"directories":{"external":{"nameRegularExpressionPattern":"^([a-zA-Z0-9-]+?)-?[wW]eb-?[nN]ode-?[pP]lugin$","path":{"__evaluate__":"`${currentPath}/node_modules/`"}},"internal":{"nameRegularExpressionPattern":"^([a-zA-Z0-9-_].*)$","path":{"__evaluate__":"`${currentPath}/plugins/`"}}},"hotReloading":false}}},"webOptimizer":{"assetPattern":{"javaScript":{"includeFilePathRegularExpression":"^(.+/)?index\\\\.js$","pattern":{"#":"This is how we can make our main exported artefact executable.","__evaluate__":"`#!/usr/bin/env node\\n// -*- coding: utf-8 -*-\\nif(import.meta.main)module.paths.unshift(\'/application/node_modules\');{1}`"}}},"injection":{"entry":{"__evaluate__":"2 < self.givenCommandLineArguments.length && self.givenCommandLineArguments[2].startsWith(\'test\') ? {testBundle: \'test\'} : {index: \'./index.ts\', unixCrypt: \'./unixCrypt.ts\'}"}},"module":{"optimizer":{"terser":{"terserOptions":{"compress":{"#":"To provide a logging output we need to exclude this feature.","drop_console":{"__evaluate__":"false"},"drop_debugger":{"__evaluate__":"false"}}}}}},"targetTechnology":{"boilerplate":"node","payload":"node"}},"packageManager":"yarn@4.14.1+sha512.64df448055b2d37ba269d7db535a469b8da93f8ef1140c25fd7a83c00a8fbaacb214ca0e02553b92a2c54cef78bb67d0b4817fab02001df0e24fac0faccc3b42"}');
438
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"web-node","version":"1.0.585","description":"High level javaScript backend plugin system and configuration merger.","keywords":["api","backend","management","plugin","web"],"homepage":"https://torben.website/web-node","bugs":{"email":"info@torben.website","url":"https://github.com/thaibault/web-node/issues"},"license":"CC-BY-3.0","author":{"name":"Torben Sickert","email":"info@torben.website","url":"https://torben.website"},"files":["configurator.d.ts","index.d.ts","index.js","pluginAPI.d.ts","type.d.ts","unixCrypt.d.ts","unixCrypt.js"],"bin":"index.js","type":"module","repository":{"type":"git","url":"https://github.com/thaibault/web-node.git"},"scripts":{"build":"yarn build:types; yarn build:plain","build:plain":"weboptimizer build","build:types":"weboptimizer build:types","check":"yarn check:types; yarn lint","check:types":"weboptimizer check:types","clear":"weboptimizer clear","document":"weboptimizer document","lint":"weboptimizer lint","prepare":"yarn build","serve":"yarn build:plain && yarn start","start":"./index.js \'{plugin: {hotReloading: true}}\'","prepare:test":"yarn clear && cd dummyPlugin && shx touch yarn.lock && yarn build && cd ..","test":"yarn prepare:test && weboptimizer test","test:coverage":"yarn prepare:test && weboptimizer test:coverage","test:coverage:report":"yarn prepare:test && weboptimizer test:coverage:report","update:documentation":"web-documentation","watch":"weboptimizer build --watch"},"devDependencies":{"@babel/cli":"^8.0.4","@babel/eslint-parser":"^8.0.1","@eslint/js":"^10.0.1","@stylistic/eslint-plugin":"^5.10.0","@types/node":"^26.1.2","@types/webpack-env":"^1.18.8","@typescript-eslint/eslint-plugin":"^8.65.0","@typescript-eslint/parser":"^8.65.0","clientnode":"^4.0.1482","eslint":"^10.8.0","eslint-config-google":"^0.14.0","eslint-plugin-jsdoc":"^63.3.2","jest":"^30.4.2","jsdoc":"^4.0.5","shx":"^0.4.0","typescript-eslint":"^8.65.0","web-documentation":"^1.0.45","weboptimizer":"^4.0.48"},"peerDependencies":{"clientnode":"*"},"engines":{"node":">=24","npm":">=11","yarn":">=4"},"resolutions":{"colors":"1.4.0","globals@npm:^14.0.0":"patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch","globals@npm:^11.1.0":"patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch","globals@npm:^9.18.0":"patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch"},"sideEffects":true,"webDocumentation":{"trackingCode":"UA-40192634-9"},"webNode":{"core":{"context":{"path":"./","type":"relative"},"debug":false,"encoding":"utf8","interDependencies":{},"name":"web-node","plugin":{"configuration":{"fileNames":["package.json","private-package.json"],"propertyNames":["webNode","webnode","web-node"]},"directories":{"external":{"nameRegularExpressionPattern":"^([a-zA-Z0-9-]+?)-?[wW]eb-?[nN]ode-?[pP]lugin$","path":{"__evaluate__":"`${currentPath}/node_modules/`"}},"internal":{"nameRegularExpressionPattern":"^([a-zA-Z0-9-_].*)$","path":{"__evaluate__":"`${currentPath}/plugins/`"}}},"hotReloading":false}}},"webOptimizer":{"assetPattern":{"javaScript":{"includeFilePathRegularExpression":"^(.+/)?index\\\\.js$","pattern":{"#":"This is how we can make our main exported artefact executable.","__evaluate__":"`#!/usr/bin/env node\\n// -*- coding: utf-8 -*-\\nif(import.meta.main)module.paths.unshift(\'/application/node_modules\');{1}`"}}},"injection":{"entry":{"__evaluate__":"2 < self.givenCommandLineArguments.length && self.givenCommandLineArguments[2].startsWith(\'test\') ? {testBundle: \'test\'} : {index: \'./index.ts\', unixCrypt: \'./unixCrypt.ts\'}"}},"module":{"optimizer":{"terser":{"terserOptions":{"compress":{"#":"To provide a logging output we need to exclude this feature.","drop_console":{"__evaluate__":"false"},"drop_debugger":{"__evaluate__":"false"}}}}}},"targetTechnology":{"boilerplate":"node","payload":"node"}},"packageManager":"yarn@4.14.1+sha512.64df448055b2d37ba269d7db535a469b8da93f8ef1140c25fd7a83c00a8fbaacb214ca0e02553b92a2c54cef78bb67d0b4817fab02001df0e24fac0faccc3b42"}');
433
439
 
434
440
  /***/ }),
435
441
  /* 7 */
@@ -451,6 +457,16 @@ const x = (y) => {
451
457
  const y = (x) => (() => (x))
452
458
  module.exports = x({ ["spawnSync"]: () => (__WEBPACK_EXTERNAL_MODULE_child_process__.spawnSync) });
453
459
 
460
+ /***/ }),
461
+ /* 9 */
462
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
463
+
464
+ const x = (y) => {
465
+ const x = {}; __webpack_require__.d(x, y); return x
466
+ }
467
+ const y = (x) => (() => (x))
468
+ module.exports = x({ ["pathToFileURL"]: () => (__WEBPACK_EXTERNAL_MODULE_node_url_50af3bb5__.pathToFileURL) });
469
+
454
470
  /***/ })
455
471
  /******/ ]);
456
472
  /************************************************************************/
@@ -481,9 +497,6 @@ module.exports = x({ ["spawnSync"]: () => (__WEBPACK_EXTERNAL_MODULE_child_proce
481
497
  /******/ return module.exports;
482
498
  /******/ }
483
499
  /******/
484
- /******/ // expose the module cache
485
- /******/ __webpack_require__.c = __webpack_module_cache__;
486
- /******/
487
500
  /************************************************************************/
488
501
  /******/ /* webpack/runtime/async module */
489
502
  /******/ (() => {
@@ -610,10 +623,10 @@ module.exports = x({ ["spawnSync"]: () => (__WEBPACK_EXTERNAL_MODULE_child_proce
610
623
  /******/
611
624
  /************************************************************************/
612
625
  /******/
613
- /******/ // module cache are used so entry inlining is disabled
614
626
  /******/ // startup
615
627
  /******/ // Load entry module and return exports
616
- /******/ let __webpack_exports__ = __webpack_require__(__webpack_require__.s = 5);
628
+ /******/ // This entry module used 'module' so it can't be inlined
629
+ /******/ let __webpack_exports__ = __webpack_require__(5);
617
630
  /******/ __webpack_exports__ = await __webpack_exports__;
618
631
  /******/ const __webpack_exports__callStack = __webpack_exports__.lT;
619
632
  /******/ const __webpack_exports__callStackSynchronous = __webpack_exports__.gl;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-node",
3
- "version": "1.0.583",
3
+ "version": "1.0.585",
4
4
  "description": "High level javaScript backend plugin system and configuration merger.",
5
5
  "keywords": [
6
6
  "api",
@@ -57,14 +57,13 @@
57
57
  "devDependencies": {
58
58
  "@babel/cli": "^8.0.4",
59
59
  "@babel/eslint-parser": "^8.0.1",
60
- "@babel/runtime": "^8.0.0",
61
60
  "@eslint/js": "^10.0.1",
62
61
  "@stylistic/eslint-plugin": "^5.10.0",
63
62
  "@types/node": "^26.1.2",
64
63
  "@types/webpack-env": "^1.18.8",
65
64
  "@typescript-eslint/eslint-plugin": "^8.65.0",
66
65
  "@typescript-eslint/parser": "^8.65.0",
67
- "clientnode": "^4.0.1481",
66
+ "clientnode": "^4.0.1482",
68
67
  "eslint": "^10.8.0",
69
68
  "eslint-config-google": "^0.14.0",
70
69
  "eslint-plugin-jsdoc": "^63.3.2",
@@ -72,18 +71,12 @@
72
71
  "jsdoc": "^4.0.5",
73
72
  "shx": "^0.4.0",
74
73
  "typescript-eslint": "^8.65.0",
75
- "web-documentation": "^1.0.44",
74
+ "web-documentation": "^1.0.45",
76
75
  "weboptimizer": "^4.0.48"
77
76
  },
78
77
  "peerDependencies": {
79
- "@babel/runtime": "*",
80
78
  "clientnode": "*"
81
79
  },
82
- "peerDependenciesMeta": {
83
- "@babel/runtime": {
84
- "optional": true
85
- }
86
- },
87
80
  "engines": {
88
81
  "node": ">=24",
89
82
  "npm": ">=11",