web-node 1.0.589 → 1.0.591

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/index.js CHANGED
@@ -1,11 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  // -*- coding: utf-8 -*-
3
- if(import.meta.main)module.paths.unshift('/application/node_modules');import {fileURLToPath as __webpack_fileURLToPath__} from "node:url";
3
+
4
+ import {fileURLToPath as __webpack_fileURLToPath__} from "node:url";
4
5
  var __webpack_dirname__ = __webpack_fileURLToPath__(import.meta.url.replace(/\/(?:[^\/]*)$/, ""));
5
6
  import * as __WEBPACK_EXTERNAL_MODULE_child_process__ from "child_process";
6
7
  import * as __WEBPACK_EXTERNAL_MODULE_clientnode__ from "clientnode";
7
8
  import * as __WEBPACK_EXTERNAL_MODULE_core_js_modules_es_array_includes_js_66c3fd7d__ from "core-js/modules/es.array.includes.js";
8
9
  import * as __WEBPACK_EXTERNAL_MODULE_fs__ from "fs";
10
+ import * as __WEBPACK_EXTERNAL_MODULE_fs_promises_cc1b69f3__ from "fs/promises";
9
11
  import * as __WEBPACK_EXTERNAL_MODULE_node_url_50af3bb5__ from "node:url";
10
12
  import * as __WEBPACK_EXTERNAL_MODULE_path__ from "path";
11
13
  /******/ var __webpack_modules__ = ([
@@ -33,16 +35,17 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
33
35
  /* harmony export */ vF: () => (/* binding */ loadConfiguration)
34
36
  /* harmony export */ });
35
37
  /* unused harmony export log */
36
- /* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
37
- /* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
38
+ /* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
39
+ /* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
38
40
  /* harmony import */ var clientnode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
39
41
  /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
40
- /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4);
41
- /* harmony import */ var _configurator_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2);
42
+ /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4);
43
+ /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5);
44
+ /* harmony import */ var _configurator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2);
42
45
  /* module decorator */ module = __webpack_require__.hmd(module);
43
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_configurator_js__WEBPACK_IMPORTED_MODULE_5__]);
46
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_configurator_js__WEBPACK_IMPORTED_MODULE_6__]);
44
47
  var __webpack_async_dependencies_result__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
45
- _configurator_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_async_dependencies_result__[0];
48
+ _configurator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_async_dependencies_result__[0];
46
49
  // #!/usr/bin/env babel-node
47
50
  // -*- coding: utf-8 -*-
48
51
  /** @module pluginAPI *//* !
@@ -122,7 +125,7 @@ register('./main-module-hook.js', {
122
125
  NOTE: We have to back up, remove and restore all plugin specific
123
126
  package configuration to avoid evaluation non web node#
124
127
  configuration structures.
125
- */pluginPackageConfigurationBackup={};for(_i=0,_Object$entries=Object.entries(configuration);_i<_Object$entries.length;_i++){_Object$entries$_i=_slicedToArray(_Object$entries[_i],2),name=_Object$entries$_i[0],subConfiguration=_Object$entries$_i[1];if(subConfiguration.package){pluginPackageConfigurationBackup[name]=subConfiguration.package;delete subConfiguration.package}}now=new Date;evaluationOptions={scope:_objectSpread(_objectSpread({},clientnode__WEBPACK_IMPORTED_MODULE_2__.UTILITY_SCOPE),{},{currentPath:process.cwd(),fs:fs__WEBPACK_IMPORTED_MODULE_3__["default"],path:path__WEBPACK_IMPORTED_MODULE_4__["default"],module:module,webNodePath:__webpack_dirname__,now:now,nowUTCTimestamp:(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.getUTCTimestamp)(now)})};_context2.n=1;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.evaluateAsyncDynamicData)((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.evaluateDynamicData)((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.removeKeysInEvaluation)(configuration),evaluationOptions),evaluationOptions);case 1:configuration=_context2.v;for(_i2=0,_Object$entries2=Object.entries(pluginPackageConfigurationBackup);_i2<_Object$entries2.length;_i2++){_Object$entries2$_i=_slicedToArray(_Object$entries2[_i2],2),_name=_Object$entries2$_i[0],pluginPackageConfiguration=_Object$entries2$_i[1];configuration[_name].package=pluginPackageConfiguration}return _context2.a(2,configuration)}},_callee2)}));function evaluateConfiguration(_x2){return _evaluateConfiguration.apply(this,arguments)}return evaluateConfiguration}();/**
128
+ */pluginPackageConfigurationBackup={};for(_i=0,_Object$entries=Object.entries(configuration);_i<_Object$entries.length;_i++){_Object$entries$_i=_slicedToArray(_Object$entries[_i],2),name=_Object$entries$_i[0],subConfiguration=_Object$entries$_i[1];if(subConfiguration.package){pluginPackageConfigurationBackup[name]=subConfiguration.package;delete subConfiguration.package}}now=new Date;evaluationOptions={scope:_objectSpread(_objectSpread({},clientnode__WEBPACK_IMPORTED_MODULE_2__.UTILITY_SCOPE),{},{currentPath:process.cwd(),fs:fs_promises__WEBPACK_IMPORTED_MODULE_4__["default"],path:path__WEBPACK_IMPORTED_MODULE_5__["default"],module:module,webNodePath:__webpack_dirname__,now:now,nowUTCTimestamp:(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.getUTCTimestamp)(now)})};_context2.n=1;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.evaluateAsyncDynamicData)((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.evaluateDynamicData)((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.removeKeysInEvaluation)(configuration),_objectSpread(_objectSpread({},evaluationOptions),{},{scope:_objectSpread(_objectSpread({},evaluationOptions.scope),{},{fs:fs__WEBPACK_IMPORTED_MODULE_3__["default"]})})),evaluationOptions);case 1:configuration=_context2.v;for(_i2=0,_Object$entries2=Object.entries(pluginPackageConfigurationBackup);_i2<_Object$entries2.length;_i2++){_Object$entries2$_i=_slicedToArray(_Object$entries2[_i2],2),_name=_Object$entries2$_i[0],pluginPackageConfiguration=_Object$entries2$_i[1];configuration[_name].package=pluginPackageConfiguration}return _context2.a(2,configuration)}},_callee2)}));function evaluateConfiguration(_x2){return _evaluateConfiguration.apply(this,arguments)}return evaluateConfiguration}();/**
126
129
  * Checks for changed plugin api file in given plugins and reloads them if
127
130
  * necessary (new timestamp).
128
131
  * @param plugins - List of plugins to search for updates in.
@@ -143,7 +146,7 @@ for(_i3=0,_Object$entries3=Object.entries(pluginChange.oldScope);_i3<_Object$ent
143
146
  * which should be updated.
144
147
  * @param plugins - List of plugins to search for updates in.
145
148
  * @returns A list with plugin changes.
146
- */var hotReloadFiles=/*#__PURE__*/function(){var _hotReloadFiles=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(type,target,plugins){var pluginChanges,_iterator5,_step5,plugin,index,_iterator6,_step6,filePath,timestamp,oldScope,_t3,_t4;return _regenerator().w(function(_context5){while(1)switch(_context5.p=_context5.n){case 0:pluginChanges=[];_iterator5=_createForOfIteratorHelper(plugins);_context5.p=1;_iterator5.s();case 2:if((_step5=_iterator5.n()).done){_context5.n=12;break}plugin=_step5.value;if(!plugin[target]){_context5.n=11;break}index=0;_iterator6=_createForOfIteratorHelper(plugin["".concat(type,"FilePaths")]);_context5.p=3;_iterator6.s();case 4:if((_step6=_iterator6.n()).done){_context5.n=8;break}filePath=_step6.value;timestamp=(0,fs__WEBPACK_IMPORTED_MODULE_3__.statSync)(filePath).mtime.getTime();if(!(plugin["".concat(type,"FileLoadTimestamps")][index]<timestamp)){_context5.n=6;break}log.info("Determined updated file \"".concat(filePath,"\"."),"Doing a reload.");oldScope=plugin[target];_context5.n=5;return loadFile(filePath,plugin.name,plugin[target]);case 5:plugin[target]=_context5.v;log.info("File \"".concat(filePath,"\" reloaded."));pluginChanges.push({newScope:plugin[target],oldScope:oldScope,plugin:plugin,target:target});case 6:plugin["".concat(type,"FileLoadTimestamps")][index]=timestamp;index+=1;case 7:_context5.n=4;break;case 8:_context5.n=10;break;case 9:_context5.p=9;_t3=_context5.v;_iterator6.e(_t3);case 10:_context5.p=10;_iterator6.f();return _context5.f(10);case 11:_context5.n=2;break;case 12:_context5.n=14;break;case 13:_context5.p=13;_t4=_context5.v;_iterator5.e(_t4);case 14:_context5.p=14;_iterator5.f();return _context5.f(14);case 15:return _context5.a(2,pluginChanges)}},_callee5,null,[[3,9,10,11],[1,13,14,15]])}));function hotReloadFiles(_x6,_x7,_x8){return _hotReloadFiles.apply(this,arguments)}return hotReloadFiles}();/**
149
+ */var hotReloadFiles=/*#__PURE__*/function(){var _hotReloadFiles=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(type,target,plugins){var pluginChanges,_iterator5,_step5,plugin,index,_iterator6,_step6,filePath,timestamp,oldScope,_t3,_t4;return _regenerator().w(function(_context5){while(1)switch(_context5.p=_context5.n){case 0:pluginChanges=[];_iterator5=_createForOfIteratorHelper(plugins);_context5.p=1;_iterator5.s();case 2:if((_step5=_iterator5.n()).done){_context5.n=13;break}plugin=_step5.value;if(!plugin[target]){_context5.n=12;break}index=0;_iterator6=_createForOfIteratorHelper(plugin["".concat(type,"FilePaths")]);_context5.p=3;_iterator6.s();case 4:if((_step6=_iterator6.n()).done){_context5.n=9;break}filePath=_step6.value;_context5.n=5;return (0,fs_promises__WEBPACK_IMPORTED_MODULE_4__.stat)(filePath);case 5:timestamp=_context5.v.mtime.getTime();if(!(plugin["".concat(type,"FileLoadTimestamps")][index]<timestamp)){_context5.n=7;break}log.info("Determined updated file \"".concat(filePath,"\"."),"Doing a reload.");oldScope=plugin[target];_context5.n=6;return loadFile(filePath,plugin.name,plugin[target]);case 6:plugin[target]=_context5.v;log.info("File \"".concat(filePath,"\" reloaded."));pluginChanges.push({newScope:plugin[target],oldScope:oldScope,plugin:plugin,target:target});case 7:plugin["".concat(type,"FileLoadTimestamps")][index]=timestamp;index+=1;case 8:_context5.n=4;break;case 9:_context5.n=11;break;case 10:_context5.p=10;_t3=_context5.v;_iterator6.e(_t3);case 11:_context5.p=11;_iterator6.f();return _context5.f(11);case 12:_context5.n=2;break;case 13:_context5.n=15;break;case 14:_context5.p=14;_t4=_context5.v;_iterator5.e(_t4);case 15:_context5.p=15;_iterator5.f();return _context5.f(15);case 16:return _context5.a(2,pluginChanges)}},_callee5,null,[[3,10,11,12],[1,14,15,16]])}));function hotReloadFiles(_x6,_x7,_x8){return _hotReloadFiles.apply(this,arguments)}return hotReloadFiles}();/**
147
150
  * Extends given configuration object with given plugin specific ones and
148
151
  * returns a plugin specific meta information object.
149
152
  * @param name - Name of plugin to extend.
@@ -153,7 +156,7 @@ for(_i3=0,_Object$entries3=Object.entries(pluginChange.oldScope);_i3<_Object$ent
153
156
  * @param pluginPath - Path to given plugin.
154
157
  * @param encoding - Encoding to use to read and write from child process's.
155
158
  * @returns An object of plugin specific meta information.
156
- */var load=/*#__PURE__*/function(){var _load=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(name,internalName,plugins,metaConfiguration,pluginPath,encoding){var configurationFilePaths,packageConfiguration,_iterator7,_step7,fileName,filePath,sourceConfiguration,apiFilePaths,configuration,_t5;return _regenerator().w(function(_context6){while(1)switch(_context6.p=_context6.n){case 0:if(encoding===void 0){encoding="utf8"}configurationFilePaths=[];packageConfiguration={};_iterator7=_createForOfIteratorHelper(metaConfiguration.fileNames);_context6.p=1;_iterator7.s();case 2:if((_step7=_iterator7.n()).done){_context6.n=6;break}fileName=_step7.value;filePath=(0,path__WEBPACK_IMPORTED_MODULE_4__.resolve)(pluginPath,fileName);_context6.n=3;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isFile)(filePath);case 3:if(!_context6.v){_context6.n=5;break}_context6.n=4;return loadFile(filePath,name);case 4:sourceConfiguration=_context6.v;(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.extend)(true,/*
159
+ */var load=/*#__PURE__*/function(){var _load=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(name,internalName,plugins,metaConfiguration,pluginPath,encoding){var configurationFilePaths,packageConfiguration,_iterator7,_step7,fileName,filePath,sourceConfiguration,apiFilePaths,configuration,_t5;return _regenerator().w(function(_context6){while(1)switch(_context6.p=_context6.n){case 0:if(encoding===void 0){encoding="utf8"}configurationFilePaths=[];packageConfiguration={};_iterator7=_createForOfIteratorHelper(metaConfiguration.fileNames);_context6.p=1;_iterator7.s();case 2:if((_step7=_iterator7.n()).done){_context6.n=6;break}fileName=_step7.value;filePath=(0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(pluginPath,fileName);_context6.n=3;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isFile)(filePath);case 3:if(!_context6.v){_context6.n=5;break}_context6.n=4;return loadFile(filePath,name);case 4:sourceConfiguration=_context6.v;(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.extend)(true,/*
157
160
  NOTE: Source and target configuration got modified.
158
161
  While the target configuration receives the modifications
159
162
  the source configuration will lose their modification
@@ -172,15 +175,14 @@ for(_i3=0,_Object$entries3=Object.entries(pluginChange.oldScope);_i3<_Object$ent
172
175
  * @param configuration - Plugin specific configurations.
173
176
  * @param configurationFilePaths - Plugin specific configuration file paths.
174
177
  * @returns Plugin meta information object.
175
- */var loadAPI=/*#__PURE__*/function(){var _loadAPI=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(relativeFilePaths,pluginPath,name,internalName,plugins,encoding,configuration,configurationFilePaths){var filePath,_iterator8,_step8,fileName,api,nativeAPI,pluginConfiguration,_t6,_t7,_t8,_t9,_t0,_t1,_t10,_t11,_t12,_t13,_t14,_t15,_t16,_t17,_t18,_t19;return _regenerator().w(function(_context7){while(1)switch(_context7.p=_context7.n){case 0:if(encoding===void 0){encoding="utf8"}if(configuration===void 0){configuration=null}if(configurationFilePaths===void 0){configurationFilePaths=[]}filePath=(0,path__WEBPACK_IMPORTED_MODULE_4__.resolve)(pluginPath,relativeFilePaths[0]);_context7.n=1;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isFile)(filePath);case 1:if(_context7.v){_context7.n=10;break}// Determine entry file if given one does not exist.
176
- _iterator8=_createForOfIteratorHelper((0,fs__WEBPACK_IMPORTED_MODULE_3__.readdirSync)(pluginPath));_context7.p=2;_iterator8.s();case 3:if((_step8=_iterator8.n()).done){_context7.n=7;break}fileName=_step8.value;_t6=!configurationFilePaths.map(function(filePath){return (0,path__WEBPACK_IMPORTED_MODULE_4__.basename)(filePath)}).includes(fileName);if(!_t6){_context7.n=5;break}_context7.n=4;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isFile)((0,path__WEBPACK_IMPORTED_MODULE_4__.resolve)(pluginPath,fileName));case 4:_t6=_context7.v;case 5:if(!_t6){_context7.n=6;break}filePath=(0,path__WEBPACK_IMPORTED_MODULE_4__.resolve)(pluginPath,filePath);if(!["index","main"].includes((0,path__WEBPACK_IMPORTED_MODULE_4__.basename)(filePath,(0,path__WEBPACK_IMPORTED_MODULE_4__.extname)(fileName)))){_context7.n=6;break}return _context7.a(3,7);case 6:_context7.n=3;break;case 7:_context7.n=9;break;case 8:_context7.p=8;_t7=_context7.v;_iterator8.e(_t7);case 9:_context7.p=9;_iterator8.f();return _context7.f(9);case 10:api=null;nativeAPI=false;_t8=configuration&&(/*
178
+ */var loadAPI=/*#__PURE__*/function(){var _loadAPI=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8(relativeFilePaths,pluginPath,name,internalName,plugins,encoding,configuration,configurationFilePaths){var filePath,_iterator8,_step8,fileName,api,nativeAPI,pluginConfiguration,_t6,_t7,_t8,_t9,_t0,_t1,_t10,_t11,_t12,_t13,_t14,_t15,_t16,_t17,_t18,_t19,_t20,_t21,_t22;return _regenerator().w(function(_context8){while(1)switch(_context8.p=_context8.n){case 0:if(encoding===void 0){encoding="utf8"}if(configuration===void 0){configuration=null}if(configurationFilePaths===void 0){configurationFilePaths=[]}filePath=(0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(pluginPath,relativeFilePaths[0]);_context8.n=1;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isFile)(filePath);case 1:if(_context8.v){_context8.n=11;break}_t6=_createForOfIteratorHelper;_context8.n=2;return (0,fs_promises__WEBPACK_IMPORTED_MODULE_4__.readdir)(pluginPath);case 2:_iterator8=_t6(_context8.v);_context8.p=3;_iterator8.s();case 4:if((_step8=_iterator8.n()).done){_context8.n=8;break}fileName=_step8.value;_t7=!configurationFilePaths.map(function(filePath){return (0,path__WEBPACK_IMPORTED_MODULE_5__.basename)(filePath)}).includes(fileName);if(!_t7){_context8.n=6;break}_context8.n=5;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isFile)((0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(pluginPath,fileName));case 5:_t7=_context8.v;case 6:if(!_t7){_context8.n=7;break}filePath=(0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(pluginPath,filePath);if(!["index","main"].includes((0,path__WEBPACK_IMPORTED_MODULE_5__.basename)(filePath,(0,path__WEBPACK_IMPORTED_MODULE_5__.extname)(fileName)))){_context8.n=7;break}return _context8.a(3,8);case 7:_context8.n=4;break;case 8:_context8.n=10;break;case 9:_context8.p=9;_t8=_context8.v;_iterator8.e(_t8);case 10:_context8.p=10;_iterator8.f();return _context8.f(10);case 11:api=null;nativeAPI=false;_t9=configuration&&(/*
177
179
  NOTE: Check if a webNode plugin configuration is available
178
180
  indicating a backend responsibility for api file.
179
181
 
180
182
  NOTE: One key is always there representing the whole package
181
183
  configuration.
182
- */Object.keys(configuration).length>1||Object.prototype.hasOwnProperty.call(configuration,internalName)&&Object.keys(configuration[internalName]).length>1);if(!_t8){_context7.n=12;break}_context7.n=11;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isFile)(filePath);case 11:_t8=_context7.v;case 12:if(!_t8){_context7.n=13;break}if(filePath.endsWith(".js")){nativeAPI=true;api=function api(state){var _ref;for(var _len3=arguments.length,parameters=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++){parameters[_key3-1]=arguments[_key3]}if(plugins[name].scope&&state.hook in plugins[name].scope)return(_ref=plugins[name].scope)[state.hook].apply(_ref,[state].concat(parameters,[module]));throw new Error("NotImplemented: API method \"".concat(state.hook,"\" is not ")+"implemented in plugin \"".concat(name,"\"."))}}else// NOTE: Any executable file can represent an api.
183
- api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=arguments.length,parameters=new Array(_len4>1?_len4-1:0),_key4=1;_key4<_len4;_key4++){parameters[_key4-1]=arguments[_key4]}var childProcessResult=(0,child_process__WEBPACK_IMPORTED_MODULE_1__.spawnSync)(filePath,[hook].concat(_toConsumableArray(parameters.map(function(item){return JSON.stringify(item)}))),{cwd:process.cwd(),encoding:encoding,env:process.env,input:JSON.stringify(data),shell:true,stdio:"inherit"});if(childProcessResult.status===404)return data;var jsonIndicatorPrefix="##!JSON!##";if(childProcessResult.stdout.startsWith(jsonIndicatorPrefix))return JSON.parse(childProcessResult.stdout.substring(jsonIndicatorPrefix.length));return data};case 13:pluginConfiguration=configuration!==null&&configuration!==void 0?configuration:_defineProperty({},internalName,{package:{}});_t9=api;_t0=api?[(0,fs__WEBPACK_IMPORTED_MODULE_3__.statSync)(filePath).mtime.getTime()]:[];_t1=api?[filePath]:[];_t10=pluginConfiguration;_t11=configurationFilePaths;_t12=configurationFilePaths.map(function(filePath){return (0,fs__WEBPACK_IMPORTED_MODULE_3__.statSync)(filePath).mtime.getTime()});_t13=Object.prototype.hasOwnProperty.call(pluginConfiguration,internalName)&&pluginConfiguration[internalName].dependencies?pluginConfiguration[internalName].dependencies:[];_t14=internalName;_t15=name;_t16=pluginConfiguration[internalName].package;_t17=pluginPath;if(!nativeAPI){_context7.n=15;break}_context7.n=14;return loadFile(filePath,name);case 14:_t18=_context7.v;_context7.n=16;break;case 15:_t18=null;case 16:_t19=_t18;return _context7.a(2,{api:_t9,apiFileLoadTimestamps:_t0,apiFilePaths:_t1,configuration:_t10,configurationFilePaths:_t11,configurationFileLoadTimestamps:_t12,dependencies:_t13,internalName:_t14,name:_t15,packageConfiguration:_t16,path:_t17,scope:_t19})}},_callee7,null,[[2,8,9,10]])}));function loadAPI(_x13,_x14,_x15,_x16,_x17,_x18,_x19,_x20){return _loadAPI.apply(this,arguments)}return loadAPI}();/**
184
+ */Object.keys(configuration).length>1||Object.prototype.hasOwnProperty.call(configuration,internalName)&&Object.keys(configuration[internalName]).length>1);if(!_t9){_context8.n=13;break}_context8.n=12;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isFile)(filePath);case 12:_t9=_context8.v;case 13:if(!_t9){_context8.n=14;break}if(filePath.endsWith(".js")){nativeAPI=true;api=function api(state){var _ref;for(var _len3=arguments.length,parameters=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++){parameters[_key3-1]=arguments[_key3]}if(plugins[name].scope&&state.hook in plugins[name].scope)return(_ref=plugins[name].scope)[state.hook].apply(_ref,[state].concat(parameters,[module]));throw new Error("NotImplemented: API method \"".concat(state.hook,"\" is not ")+"implemented in plugin \"".concat(name,"\"."))}}else// NOTE: Any executable file can represent an api.
185
+ api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=arguments.length,parameters=new Array(_len4>1?_len4-1:0),_key4=1;_key4<_len4;_key4++){parameters[_key4-1]=arguments[_key4]}var childProcessResult=(0,child_process__WEBPACK_IMPORTED_MODULE_1__.spawnSync)(filePath,[hook].concat(_toConsumableArray(parameters.map(function(item){return JSON.stringify(item)}))),{cwd:process.cwd(),encoding:encoding,env:process.env,input:JSON.stringify(data),shell:true,stdio:"inherit"});if(childProcessResult.status===404)return data;var jsonIndicatorPrefix="##!JSON!##";if(childProcessResult.stdout.startsWith(jsonIndicatorPrefix))return JSON.parse(childProcessResult.stdout.substring(jsonIndicatorPrefix.length));return data};case 14:pluginConfiguration=configuration!==null&&configuration!==void 0?configuration:_defineProperty({},internalName,{package:{}});_t0=api;if(!api){_context8.n=16;break}_context8.n=15;return (0,fs_promises__WEBPACK_IMPORTED_MODULE_4__.stat)(filePath);case 15:_t10=_context8.v.mtime.getTime();_t1=[_t10];_context8.n=17;break;case 16:_t1=[];case 17:_t11=_t1;_t12=api?[filePath]:[];_t13=pluginConfiguration;_t14=configurationFilePaths;_context8.n=18;return Promise.all(configurationFilePaths.map(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(filePath){return _regenerator().w(function(_context7){while(1)switch(_context7.n){case 0:_context7.n=1;return (0,fs_promises__WEBPACK_IMPORTED_MODULE_4__.stat)(filePath);case 1:return _context7.a(2,_context7.v.mtime.getTime())}},_callee7)}))));case 18:_t15=_context8.v;_t16=Object.prototype.hasOwnProperty.call(pluginConfiguration,internalName)&&pluginConfiguration[internalName].dependencies?pluginConfiguration[internalName].dependencies:[];_t17=internalName;_t18=name;_t19=pluginConfiguration[internalName].package;_t20=pluginPath;if(!nativeAPI){_context8.n=20;break}_context8.n=19;return loadFile(filePath,name);case 19:_t21=_context8.v;_context8.n=21;break;case 20:_t21=null;case 21:_t22=_t21;return _context8.a(2,{api:_t0,apiFileLoadTimestamps:_t11,apiFilePaths:_t12,configuration:_t13,configurationFilePaths:_t14,configurationFileLoadTimestamps:_t15,dependencies:_t16,internalName:_t17,name:_t18,packageConfiguration:_t19,path:_t20,scope:_t22})}},_callee8,null,[[3,9,10,11]])}));function loadAPI(_x13,_x14,_x15,_x16,_x17,_x18,_x19,_x20){return _loadAPI.apply(this,arguments)}return loadAPI}();/**
184
186
  * Loads plugin specific configuration object.
185
187
  * @param name - Property name where to inject resolved configuration into
186
188
  * global one.
@@ -204,7 +206,7 @@ api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=argume
204
206
  */var loadConfigurations=function loadConfigurations(plugins,configuration){/*
205
207
  First clear current configuration content key by key to let old top
206
208
  level configuration object instance untouched.
207
- */for(var _i4=0,_Object$keys=Object.keys(configuration);_i4<_Object$keys.length;_i4++){var key=_Object$keys[_i4];delete configuration[key]};(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.extend)(configuration,(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.copy)(_configurator_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A));var _iterator0=_createForOfIteratorHelper(plugins),_step0;try{for(_iterator0.s();!(_step0=_iterator0.n()).done;){var plugin=_step0.value;if(Object.prototype.hasOwnProperty.call(plugin,"configuration")){var pluginConfiguration=(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.copy)(plugin.configuration);(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.extend)(true,(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.modifyObject)(configuration,pluginConfiguration),/*
209
+ */for(var _i4=0,_Object$keys=Object.keys(configuration);_i4<_Object$keys.length;_i4++){var key=_Object$keys[_i4];delete configuration[key]};(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.extend)(configuration,(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.copy)(_configurator_js__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A));var _iterator0=_createForOfIteratorHelper(plugins),_step0;try{for(_iterator0.s();!(_step0=_iterator0.n()).done;){var plugin=_step0.value;if(Object.prototype.hasOwnProperty.call(plugin,"configuration")){var pluginConfiguration=(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.copy)(plugin.configuration);(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.extend)(true,(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.modifyObject)(configuration,pluginConfiguration),/*
208
210
  NOTE: Should be resolved via preceding
209
211
  "object.modifyObject" call.
210
212
  */pluginConfiguration);/*
@@ -220,7 +222,7 @@ api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=argume
220
222
  * If a "null" is given an error will be thrown.
221
223
  * @param doLogging - Enables logging.
222
224
  * @returns Exported api file scope.
223
- */var loadFile=/*#__PURE__*/function(){var _loadFile=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8(filePath,name,fallbackScope,doLogging){var options,scope,_t20;return _regenerator().w(function(_context8){while(1)switch(_context8.p=_context8.n){case 0:if(fallbackScope===void 0){fallbackScope=null}if(doLogging===void 0){doLogging=true}// Clear module cache if possible in the future.
225
+ */var loadFile=/*#__PURE__*/function(){var _loadFile=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9(filePath,name,fallbackScope,doLogging){var options,scope,_t23;return _regenerator().w(function(_context9){while(1)switch(_context9.p=_context9.n){case 0:if(fallbackScope===void 0){fallbackScope=null}if(doLogging===void 0){doLogging=true}// Clear module cache if possible in the future.
224
226
  /*
225
227
  let reference: string | undefined
226
228
  try {
@@ -231,17 +233,17 @@ api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=argume
231
233
 
232
234
  if (reference)
233
235
  // Clear the module cache.
234
- */options={};if((0,path__WEBPACK_IMPORTED_MODULE_4__.extname)(filePath)===".json")options.with={type:"json"};_context8.p=1;_context8.n=2;return import(/* webpackIgnore: true */"".concat(filePath,"?timestamp=").concat(String(Date.now())),options);case 2:scope=_context8.v;_context8.n=5;break;case 3:_context8.p=3;_t20=_context8.v;if(!fallbackScope){_context8.n=4;break}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)(_t20),". Using"),"fallback one.");_context8.n=5;break;case 4:throw new Error("Couldn't load plugin file \"".concat(filePath,"\" for plugin ")+"\"".concat(name,"\": ").concat((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.represent)(_t20)),{cause:_t20});case 5:if(!(Object.prototype.hasOwnProperty.call(scope,"default")&&scope.default)){_context8.n=6;break}return _context8.a(2,scope.default);case 6:return _context8.a(2,scope)}},_callee8,null,[[1,3]])}));function loadFile(_x21,_x22,_x23,_x24){return _loadFile.apply(this,arguments)}return loadFile}();/**
236
+ */options={};if((0,path__WEBPACK_IMPORTED_MODULE_5__.extname)(filePath)===".json")options.with={type:"json"};_context9.p=1;_context9.n=2;return import(/* webpackIgnore: true */"".concat(filePath,"?timestamp=").concat(String(Date.now())),options);case 2:scope=_context9.v;_context9.n=5;break;case 3:_context9.p=3;_t23=_context9.v;if(!fallbackScope){_context9.n=4;break}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)(_t23),". Using"),"fallback one.");_context9.n=5;break;case 4:throw new Error("Couldn't load plugin file \"".concat(filePath,"\" for plugin ")+"\"".concat(name,"\": ").concat((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.represent)(_t23)),{cause:_t23});case 5:if(!(Object.prototype.hasOwnProperty.call(scope,"default")&&scope.default)){_context9.n=6;break}return _context9.a(2,scope.default);case 6:return _context9.a(2,scope)}},_callee9,null,[[1,3]])}));function loadFile(_x22,_x23,_x24,_x25){return _loadFile.apply(this,arguments)}return loadFile}();/**
235
237
  * Extends given configuration object with all plugin specific ones and returns
236
238
  * a topological sorted list of plugins with plugins specific meta information
237
239
  * stored.
238
240
  * @param configuration - Configuration object to extend and use.
239
241
  * @returns A topological sorted list of plugins objects.
240
- */var loadAll=/*#__PURE__*/function(){var _loadAll=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9(configuration){var plugins,_i5,_Object$values,directory,compiledRegularExpression,_iterator1,_step1,pluginName,currentPluginPath,internalName,temporaryPlugins,_i6,_Object$values2,plugin,_iterator10,_step10,name,sortedPlugins,_iterator11,_step11,_pluginName,_i7,_Object$entries4,_Object$entries4$_i,_name2,_plugin,_t21,_t22,_t23,_t24;return _regenerator().w(function(_context9){while(1)switch(_context9.p=_context9.n){case 0:plugins={};/*
242
+ */var loadAll=/*#__PURE__*/function(){var _loadAll=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0(configuration){var plugins,_i5,_Object$values,directory,compiledRegularExpression,_iterator1,_step1,pluginName,currentPluginPath,internalName,temporaryPlugins,_i6,_Object$values2,plugin,_iterator10,_step10,name,sortedPlugins,_iterator11,_step11,_pluginName,_i7,_Object$entries4,_Object$entries4$_i,_name2,_plugin,_t24,_t25,_t26,_t27,_t28;return _regenerator().w(function(_context0){while(1)switch(_context0.p=_context0.n){case 0:plugins={};/*
241
243
  Load main plugin configuration at first.
242
244
 
243
245
  NOTE: If application's main is this itself avoid loading it twice.
244
- */if(!(configuration.name!=="web-node")){_context9.n=2;break}_context9.n=1;return load(configuration.name,determineInternalName(configuration.name,new RegExp(configuration.core.plugin.directories.external.nameRegularExpressionPattern)),plugins,configuration.core.plugin.configuration,configuration.core.context.path,configuration.core.encoding);case 1:plugins[configuration.name]=_context9.v;case 2:_i5=0,_Object$values=Object.values(configuration.core.plugin.directories);case 3:if(!(_i5<_Object$values.length)){_context9.n=14;break}directory=_Object$values[_i5];_context9.n=4;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isDirectory)(directory.path);case 4:if(!_context9.v){_context9.n=13;break}compiledRegularExpression=new RegExp(directory.nameRegularExpressionPattern);_iterator1=_createForOfIteratorHelper((0,fs__WEBPACK_IMPORTED_MODULE_3__.readdirSync)(directory.path));_context9.p=5;_iterator1.s();case 6:if((_step1=_iterator1.n()).done){_context9.n=10;break}pluginName=_step1.value;if(compiledRegularExpression.test(pluginName)){_context9.n=7;break}return _context9.a(3,9);case 7:currentPluginPath=(0,path__WEBPACK_IMPORTED_MODULE_4__.resolve)(directory.path,pluginName);internalName=determineInternalName(pluginName,compiledRegularExpression);_context9.n=8;return load(pluginName,internalName,plugins,configuration.core.plugin.configuration,currentPluginPath,configuration.core.encoding);case 8:plugins[pluginName]=_context9.v;case 9:_context9.n=6;break;case 10:_context9.n=12;break;case 11:_context9.p=11;_t21=_context9.v;_iterator1.e(_t21);case 12:_context9.p=12;_iterator1.f();return _context9.f(12);case 13:_i5++;_context9.n=3;break;case 14:temporaryPlugins={};for(_i6=0,_Object$values2=Object.values(plugins);_i6<_Object$values2.length;_i6++){plugin=_Object$values2[_i6];temporaryPlugins[plugin.internalName]=plugin.dependencies;if(Object.prototype.hasOwnProperty.call(configuration.core.interDependencies,plugin.internalName)){_iterator10=_createForOfIteratorHelper([].concat(configuration.core.interDependencies[plugin.internalName]));try{for(_iterator10.s();!(_step10=_iterator10.n()).done;){name=_step10.value;if(!temporaryPlugins[plugin.internalName].includes(name))temporaryPlugins[plugin.internalName].push(name)}}catch(err){_iterator10.e(err)}finally{_iterator10.f()}}}sortedPlugins=[];_iterator11=_createForOfIteratorHelper((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.sortTopological)(temporaryPlugins));_context9.p=15;_iterator11.s();case 16:if((_step11=_iterator11.n()).done){_context9.n=20;break}_pluginName=_step11.value;_i7=0,_Object$entries4=Object.entries(plugins);case 17:if(!(_i7<_Object$entries4.length)){_context9.n=19;break}_Object$entries4$_i=_slicedToArray(_Object$entries4[_i7],2),_name2=_Object$entries4$_i[0],_plugin=_Object$entries4$_i[1];if(![_plugin.internalName,_name2].includes(_pluginName)){_context9.n=18;break}sortedPlugins.push(_plugin);return _context9.a(3,19);case 18:_i7++;_context9.n=17;break;case 19:_context9.n=16;break;case 20:_context9.n=22;break;case 21:_context9.p=21;_t22=_context9.v;_iterator11.e(_t22);case 22:_context9.p=22;_iterator11.f();return _context9.f(22);case 23:_context9.n=24;return loadConfigurations(sortedPlugins,configuration);case 24:_t23=_context9.v;_t24=sortedPlugins;return _context9.a(2,{configuration:_t23,plugins:_t24})}},_callee9,null,[[15,21,22,23],[5,11,12,13]])}));function loadAll(_x25){return _loadAll.apply(this,arguments)}return loadAll}();/**
246
+ */if(!(configuration.name!=="web-node")){_context0.n=2;break}_context0.n=1;return load(configuration.name,determineInternalName(configuration.name,new RegExp(configuration.core.plugin.directories.external.nameRegularExpressionPattern)),plugins,configuration.core.plugin.configuration,configuration.core.context.path,configuration.core.encoding);case 1:plugins[configuration.name]=_context0.v;case 2:_i5=0,_Object$values=Object.values(configuration.core.plugin.directories);case 3:if(!(_i5<_Object$values.length)){_context0.n=15;break}directory=_Object$values[_i5];_context0.n=4;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isDirectory)(directory.path);case 4:if(!_context0.v){_context0.n=14;break}compiledRegularExpression=new RegExp(directory.nameRegularExpressionPattern);_t24=_createForOfIteratorHelper;_context0.n=5;return (0,fs_promises__WEBPACK_IMPORTED_MODULE_4__.readdir)(directory.path);case 5:_iterator1=_t24(_context0.v);_context0.p=6;_iterator1.s();case 7:if((_step1=_iterator1.n()).done){_context0.n=11;break}pluginName=_step1.value;if(compiledRegularExpression.test(pluginName)){_context0.n=8;break}return _context0.a(3,10);case 8:currentPluginPath=(0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(directory.path,pluginName);internalName=determineInternalName(pluginName,compiledRegularExpression);_context0.n=9;return load(pluginName,internalName,plugins,configuration.core.plugin.configuration,currentPluginPath,configuration.core.encoding);case 9:plugins[pluginName]=_context0.v;case 10:_context0.n=7;break;case 11:_context0.n=13;break;case 12:_context0.p=12;_t25=_context0.v;_iterator1.e(_t25);case 13:_context0.p=13;_iterator1.f();return _context0.f(13);case 14:_i5++;_context0.n=3;break;case 15:temporaryPlugins={};for(_i6=0,_Object$values2=Object.values(plugins);_i6<_Object$values2.length;_i6++){plugin=_Object$values2[_i6];temporaryPlugins[plugin.internalName]=plugin.dependencies;if(Object.prototype.hasOwnProperty.call(configuration.core.interDependencies,plugin.internalName)){_iterator10=_createForOfIteratorHelper([].concat(configuration.core.interDependencies[plugin.internalName]));try{for(_iterator10.s();!(_step10=_iterator10.n()).done;){name=_step10.value;if(!temporaryPlugins[plugin.internalName].includes(name))temporaryPlugins[plugin.internalName].push(name)}}catch(err){_iterator10.e(err)}finally{_iterator10.f()}}}sortedPlugins=[];_iterator11=_createForOfIteratorHelper((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.sortTopological)(temporaryPlugins));_context0.p=16;_iterator11.s();case 17:if((_step11=_iterator11.n()).done){_context0.n=21;break}_pluginName=_step11.value;_i7=0,_Object$entries4=Object.entries(plugins);case 18:if(!(_i7<_Object$entries4.length)){_context0.n=20;break}_Object$entries4$_i=_slicedToArray(_Object$entries4[_i7],2),_name2=_Object$entries4$_i[0],_plugin=_Object$entries4$_i[1];if(![_plugin.internalName,_name2].includes(_pluginName)){_context0.n=19;break}sortedPlugins.push(_plugin);return _context0.a(3,20);case 19:_i7++;_context0.n=18;break;case 20:_context0.n=17;break;case 21:_context0.n=23;break;case 22:_context0.p=22;_t26=_context0.v;_iterator11.e(_t26);case 23:_context0.p=23;_iterator11.f();return _context0.f(23);case 24:_context0.n=25;return loadConfigurations(sortedPlugins,configuration);case 25:_t27=_context0.v;_t28=sortedPlugins;return _context0.a(2,{configuration:_t27,plugins:_t28})}},_callee0,null,[[16,22,23,24],[6,12,13,14]])}));function loadAll(_x26){return _loadAll.apply(this,arguments)}return loadAll}();/**
245
247
  * Transform a list of absolute paths respecting the application context.
246
248
  * @param configuration - Configuration object.
247
249
  * @param configuration.core - Sub configuration web-node.
@@ -249,7 +251,7 @@ api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=argume
249
251
  * @param configuration.core.context.path - Current web-nodes path.
250
252
  * @param locations - Locations to process.
251
253
  * @returns Given and processed locations.
252
- */var determineLocations=function determineLocations(_ref4,locations){var contextPath=_ref4.core.context.path;if(locations===void 0){locations=[]}locations=[].concat(locations);return locations.length?locations.map(function(location){return (0,path__WEBPACK_IMPORTED_MODULE_4__.resolve)(contextPath,location)}):[contextPath]};/**
254
+ */var determineLocations=function determineLocations(_ref5,locations){var contextPath=_ref5.core.context.path;if(locations===void 0){locations=[]}locations=[].concat(locations);return locations.length?locations.map(function(location){return (0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(contextPath,location)}):[contextPath]};/**
253
255
  * Checks whether given file path is in provided locations.
254
256
  * @param configuration - Configuration object.
255
257
  * @param plugins - List of active plugins.
@@ -257,7 +259,7 @@ api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=argume
257
259
  * @param locations - Locations to search in.
258
260
  * @returns A boolean indicating whether given file path is in provided
259
261
  * locations.
260
- */var isInLocations=function isInLocations(configuration,plugins,filePath,locations){var pluginPaths=plugins.map(function(plugin){return plugin.path});var _iterator12=_createForOfIteratorHelper([].concat(locations)),_step12;try{for(_iterator12.s();!(_step12=_iterator12.n()).done;){var location=_step12.value;if(location.startsWith("/")){if(filePath.startsWith((0,path__WEBPACK_IMPORTED_MODULE_4__.join)(configuration.core.context.path,location)))return true}else{var _iterator13=_createForOfIteratorHelper(pluginPaths),_step13;try{for(_iterator13.s();!(_step13=_iterator13.n()).done;){var pluginPath=_step13.value;if(filePath.startsWith((0,path__WEBPACK_IMPORTED_MODULE_4__.resolve)(pluginPath,location)))return true}}catch(err){_iterator13.e(err)}finally{_iterator13.f()}}}}catch(err){_iterator12.e(err)}finally{_iterator12.f()}return false};var pluginAPI={callStack:_callStack,callStackSynchronous:callStackSynchronous,determineInternalName:determineInternalName,determineLocations:determineLocations,evaluateConfiguration:evaluateConfiguration,hotReloadAPIFile:hotReloadAPIFile,hotReloadConfigurationFile:hotReloadConfigurationFile,hotReloadFiles:hotReloadFiles,isInLocations:isInLocations,load:load,loadAll:loadAll,loadAPI:loadAPI,loadConfiguration:loadConfiguration,loadConfigurations:loadConfigurations,loadFile:loadFile};/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (pluginAPI);
262
+ */var isInLocations=function isInLocations(configuration,plugins,filePath,locations){var pluginPaths=plugins.map(function(plugin){return plugin.path});var _iterator12=_createForOfIteratorHelper([].concat(locations)),_step12;try{for(_iterator12.s();!(_step12=_iterator12.n()).done;){var location=_step12.value;if(location.startsWith("/")){if(filePath.startsWith((0,path__WEBPACK_IMPORTED_MODULE_5__.join)(configuration.core.context.path,location)))return true}else{var _iterator13=_createForOfIteratorHelper(pluginPaths),_step13;try{for(_iterator13.s();!(_step13=_iterator13.n()).done;){var pluginPath=_step13.value;if(filePath.startsWith((0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(pluginPath,location)))return true}}catch(err){_iterator13.e(err)}finally{_iterator13.f()}}}}catch(err){_iterator12.e(err)}finally{_iterator12.f()}return false};var pluginAPI={callStack:_callStack,callStackSynchronous:callStackSynchronous,determineInternalName:determineInternalName,determineLocations:determineLocations,evaluateConfiguration:evaluateConfiguration,hotReloadAPIFile:hotReloadAPIFile,hotReloadConfigurationFile:hotReloadConfigurationFile,hotReloadFiles:hotReloadFiles,isInLocations:isInLocations,load:load,loadAll:loadAll,loadAPI:loadAPI,loadConfiguration:loadConfiguration,loadConfigurations:loadConfigurations,loadFile:loadFile};/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (pluginAPI);
261
263
  __webpack_async_result__();
262
264
  } catch(e) { __webpack_async_result__(e); } }, 1);
263
265
 
@@ -282,12 +284,13 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
282
284
  /* harmony export */ });
283
285
  /* harmony import */ var clientnode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
284
286
  /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
285
- /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
286
- /* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
287
- /* harmony import */ var _pluginAPI_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0);
288
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_pluginAPI_js__WEBPACK_IMPORTED_MODULE_4__]);
287
+ /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
288
+ /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
289
+ /* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
290
+ /* harmony import */ var _pluginAPI_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(0);
291
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_pluginAPI_js__WEBPACK_IMPORTED_MODULE_5__]);
289
292
  var __webpack_async_dependencies_result__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
290
- _pluginAPI_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_async_dependencies_result__[0];
293
+ _pluginAPI_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_async_dependencies_result__[0];
291
294
  // #!/usr/bin/env node
292
295
  // -*- coding: utf-8 -*-
293
296
  /* !
@@ -308,19 +311,19 @@ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof
308
311
  "node_modules" parent folder is usually resilient again dealing with
309
312
  projects where current working directory isn't the projects directory and
310
313
  this library is located as a nested dependency.
311
- */_package_json__WEBPACK_IMPORTED_MODULE_3__.webNode.core.context={path:__webpack_dirname__,type:"relative"};for(var iteration=0;iteration<clientnode__WEBPACK_IMPORTED_MODULE_0__.MAXIMAL_NUMBER_OF_ITERATIONS.value;iteration++){_package_json__WEBPACK_IMPORTED_MODULE_3__.webNode.core.context.path=(0,path__WEBPACK_IMPORTED_MODULE_2__.resolve)(_package_json__WEBPACK_IMPORTED_MODULE_3__.webNode.core.context.path,"../../");if((0,path__WEBPACK_IMPORTED_MODULE_2__.basename)((0,path__WEBPACK_IMPORTED_MODULE_2__.dirname)(_package_json__WEBPACK_IMPORTED_MODULE_3__.webNode.core.context.path))!=="node_modules")break}if(_package_json__WEBPACK_IMPORTED_MODULE_3__.webNode.core.context.path==="/"||(0,path__WEBPACK_IMPORTED_MODULE_2__.basename)((0,path__WEBPACK_IMPORTED_MODULE_2__.dirname)(process.cwd()))==="node_modules"||(0,path__WEBPACK_IMPORTED_MODULE_2__.basename)((0,path__WEBPACK_IMPORTED_MODULE_2__.dirname)(process.cwd()))===".staging"&&(0,path__WEBPACK_IMPORTED_MODULE_2__.basename)((0,path__WEBPACK_IMPORTED_MODULE_2__.dirname)((0,path__WEBPACK_IMPORTED_MODULE_2__.dirname)(process.cwd())))==="node_modules")/*
314
+ */_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.context={path:__webpack_dirname__,type:"relative"};for(var iteration=0;iteration<clientnode__WEBPACK_IMPORTED_MODULE_0__.MAXIMAL_NUMBER_OF_ITERATIONS.value;iteration++){_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.context.path=(0,path__WEBPACK_IMPORTED_MODULE_3__.resolve)(_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.context.path,"../../");if((0,path__WEBPACK_IMPORTED_MODULE_3__.basename)((0,path__WEBPACK_IMPORTED_MODULE_3__.dirname)(_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.context.path))!=="node_modules")break}if(_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.context.path==="/"||(0,path__WEBPACK_IMPORTED_MODULE_3__.basename)((0,path__WEBPACK_IMPORTED_MODULE_3__.dirname)(process.cwd()))==="node_modules"||(0,path__WEBPACK_IMPORTED_MODULE_3__.basename)((0,path__WEBPACK_IMPORTED_MODULE_3__.dirname)(process.cwd()))===".staging"&&(0,path__WEBPACK_IMPORTED_MODULE_3__.basename)((0,path__WEBPACK_IMPORTED_MODULE_3__.dirname)((0,path__WEBPACK_IMPORTED_MODULE_3__.dirname)(process.cwd())))==="node_modules")/*
312
315
  NOTE: If we are dealing was a dependent project use current directory
313
316
  as context.
314
- */_package_json__WEBPACK_IMPORTED_MODULE_3__.webNode.core.context.path=process.cwd();else/*
317
+ */_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.context.path=process.cwd();else/*
315
318
  NOTE: If the current working directory references this file via a
316
319
  linked "node_modules" folder using current working directory as context
317
320
  is a better assumption than two folders up the hierarchy.
318
- */try{if((0,fs__WEBPACK_IMPORTED_MODULE_1__.lstatSync)((0,path__WEBPACK_IMPORTED_MODULE_2__.join)(process.cwd(),"node_modules")).isSymbolicLink())_package_json__WEBPACK_IMPORTED_MODULE_3__.webNode.core.context.path=process.cwd()}catch(_unused){// Ignore error.
319
- }var mainPackageConfiguration={name:"main"};try{mainPackageConfiguration=(await import(/* webpackIgnore: true */(0,path__WEBPACK_IMPORTED_MODULE_2__.join)(_package_json__WEBPACK_IMPORTED_MODULE_3__.webNode.core.context.path,"package"),{with:{type:"json"}})).default}catch(_unused2){_package_json__WEBPACK_IMPORTED_MODULE_3__.webNode.core.context.path=process.cwd()}var name=((_mainPackageConfigura=mainPackageConfiguration.webDocumentation)===null||_mainPackageConfigura===void 0?void 0:_mainPackageConfigura.name)||mainPackageConfiguration.name||"main";var applicationConfiguration=mainPackageConfiguration.webNode||_defineProperty({},name,{name:name,package:mainPackageConfiguration});// endregion
320
- _package_json__WEBPACK_IMPORTED_MODULE_3__.webNode.core.name=_package_json__WEBPACK_IMPORTED_MODULE_3__.webDocumentation.name||_package_json__WEBPACK_IMPORTED_MODULE_3__.name;var now=new Date;var scope=_objectSpread(_objectSpread({},clientnode__WEBPACK_IMPORTED_MODULE_0__.UTILITY_SCOPE),{},{currentPath:process.cwd(),fs:fs__WEBPACK_IMPORTED_MODULE_1__["default"],path:path__WEBPACK_IMPORTED_MODULE_2__["default"],pluginAPI:_pluginAPI_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Ay,webNodePath:__webpack_dirname__,now:now,nowUTCTimestamp:(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.getUTCTimestamp)(now)});var configuration=(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.evaluateDynamicData)(_package_json__WEBPACK_IMPORTED_MODULE_3__.webNode,{scope:scope});delete _package_json__WEBPACK_IMPORTED_MODULE_3__.webNode;(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.extend)(true,(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.modifyObject)(configuration,applicationConfiguration),applicationConfiguration);var result={};var _iterator=_createForOfIteratorHelper(process.argv.slice(1)),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var argument=_step.value;var subResult=(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.parseEncodedObject)(argument,configuration,"configuration");if((0,clientnode__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(subResult))(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.extend)(true,result,subResult)}}catch(err){_iterator.e(err)}finally{_iterator.f()}if(Object.keys(result).length>0){(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.extend)(true,/*
321
+ */try{if((await (0,fs_promises__WEBPACK_IMPORTED_MODULE_2__.lstat)((0,path__WEBPACK_IMPORTED_MODULE_3__.join)(process.cwd(),"node_modules"))).isSymbolicLink())_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.context.path=process.cwd()}catch(_unused){// Ignore error.
322
+ }var mainPackageConfiguration={name:"main"};try{mainPackageConfiguration=(await import(/* webpackIgnore: true */(0,path__WEBPACK_IMPORTED_MODULE_3__.join)(_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.context.path,"package"),{with:{type:"json"}})).default}catch(_unused2){_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.context.path=process.cwd()}var name=((_mainPackageConfigura=mainPackageConfiguration.webDocumentation)===null||_mainPackageConfigura===void 0?void 0:_mainPackageConfigura.name)||mainPackageConfiguration.name||"main";var applicationConfiguration=mainPackageConfiguration.webNode||_defineProperty({},name,{name:name,package:mainPackageConfiguration});// endregion
323
+ _package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.name=_package_json__WEBPACK_IMPORTED_MODULE_4__.webDocumentation.name||_package_json__WEBPACK_IMPORTED_MODULE_4__.name;var now=new Date;var scope=_objectSpread(_objectSpread({},clientnode__WEBPACK_IMPORTED_MODULE_0__.UTILITY_SCOPE),{},{currentPath:process.cwd(),fs:fs_promises__WEBPACK_IMPORTED_MODULE_2__["default"],path:path__WEBPACK_IMPORTED_MODULE_3__["default"],pluginAPI:_pluginAPI_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Ay,webNodePath:__webpack_dirname__,now:now,nowUTCTimestamp:(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.getUTCTimestamp)(now)});var configuration=await (0,clientnode__WEBPACK_IMPORTED_MODULE_0__.evaluateAsyncDynamicData)((0,clientnode__WEBPACK_IMPORTED_MODULE_0__.evaluateDynamicData)(_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode,{scope:_objectSpread(_objectSpread({},scope),{},{fs:fs__WEBPACK_IMPORTED_MODULE_1__["default"]})}),{scope:scope});delete _package_json__WEBPACK_IMPORTED_MODULE_4__.webNode;(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.extend)(true,(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.modifyObject)(configuration,applicationConfiguration),applicationConfiguration);var result={};var _iterator=_createForOfIteratorHelper(process.argv.slice(1)),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var argument=_step.value;var subResult=(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.parseEncodedObject)(argument,configuration,"configuration");if((0,clientnode__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(subResult))(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.extend)(true,result,subResult)}}catch(err){_iterator.e(err)}finally{_iterator.f()}if(Object.keys(result).length>0){(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.extend)(true,/*
321
324
  NOTE: "object.modifyObject" removes modifications in "result"
322
325
  in-place before it is used as extending source.
323
- */(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.modifyObject)(configuration,result),result);configuration.core.runtimeConfiguration=result}configuration=(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.evaluateDynamicData)((0,clientnode__WEBPACK_IMPORTED_MODULE_0__.removeKeysInEvaluation)(configuration),{scope:scope});configuration.name=name;configuration.core.package=_package_json__WEBPACK_IMPORTED_MODULE_3__;/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (configuration);
326
+ */(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.modifyObject)(configuration,result),result);configuration.core.runtimeConfiguration=result}configuration=await (0,clientnode__WEBPACK_IMPORTED_MODULE_0__.evaluateAsyncDynamicData)((0,clientnode__WEBPACK_IMPORTED_MODULE_0__.evaluateDynamicData)((0,clientnode__WEBPACK_IMPORTED_MODULE_0__.removeKeysInEvaluation)(configuration),{scope:_objectSpread(_objectSpread({},scope),{},{fs:fs__WEBPACK_IMPORTED_MODULE_1__["default"]})}),{scope:scope});configuration.name=name;configuration.core.package=_package_json__WEBPACK_IMPORTED_MODULE_4__;/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (configuration);
324
327
  __webpack_async_result__();
325
328
  } catch(e) { __webpack_async_result__(e); } }, 1);
326
329
 
@@ -332,7 +335,7 @@ const x = (y) => {
332
335
  const x = {}; __webpack_require__.d(x, y); return x
333
336
  }
334
337
  const y = (x) => (() => (x))
335
- module.exports = x({ ["default"]: () => (__WEBPACK_EXTERNAL_MODULE_fs__["default"]), ["lstatSync"]: () => (__WEBPACK_EXTERNAL_MODULE_fs__.lstatSync), ["readdirSync"]: () => (__WEBPACK_EXTERNAL_MODULE_fs__.readdirSync), ["statSync"]: () => (__WEBPACK_EXTERNAL_MODULE_fs__.statSync) });
338
+ module.exports = x({ ["default"]: () => (__WEBPACK_EXTERNAL_MODULE_fs__["default"]) });
336
339
 
337
340
  /***/ }),
338
341
  /* 4 */
@@ -342,10 +345,20 @@ const x = (y) => {
342
345
  const x = {}; __webpack_require__.d(x, y); return x
343
346
  }
344
347
  const y = (x) => (() => (x))
345
- module.exports = x({ ["basename"]: () => (__WEBPACK_EXTERNAL_MODULE_path__.basename), ["default"]: () => (__WEBPACK_EXTERNAL_MODULE_path__["default"]), ["dirname"]: () => (__WEBPACK_EXTERNAL_MODULE_path__.dirname), ["extname"]: () => (__WEBPACK_EXTERNAL_MODULE_path__.extname), ["join"]: () => (__WEBPACK_EXTERNAL_MODULE_path__.join), ["resolve"]: () => (__WEBPACK_EXTERNAL_MODULE_path__.resolve) });
348
+ module.exports = x({ ["default"]: () => (__WEBPACK_EXTERNAL_MODULE_fs_promises_cc1b69f3__["default"]), ["lstat"]: () => (__WEBPACK_EXTERNAL_MODULE_fs_promises_cc1b69f3__.lstat), ["readdir"]: () => (__WEBPACK_EXTERNAL_MODULE_fs_promises_cc1b69f3__.readdir), ["stat"]: () => (__WEBPACK_EXTERNAL_MODULE_fs_promises_cc1b69f3__.stat) });
346
349
 
347
350
  /***/ }),
348
351
  /* 5 */
352
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
353
+
354
+ const x = (y) => {
355
+ const x = {}; __webpack_require__.d(x, y); return x
356
+ }
357
+ const y = (x) => (() => (x))
358
+ module.exports = x({ ["basename"]: () => (__WEBPACK_EXTERNAL_MODULE_path__.basename), ["default"]: () => (__WEBPACK_EXTERNAL_MODULE_path__["default"]), ["dirname"]: () => (__WEBPACK_EXTERNAL_MODULE_path__.dirname), ["extname"]: () => (__WEBPACK_EXTERNAL_MODULE_path__.extname), ["join"]: () => (__WEBPACK_EXTERNAL_MODULE_path__.join), ["resolve"]: () => (__WEBPACK_EXTERNAL_MODULE_path__.resolve) });
359
+
360
+ /***/ }),
361
+ /* 6 */
349
362
  /***/ ((module, __webpack_exports__, __webpack_require__) => {
350
363
 
351
364
  __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
@@ -373,7 +386,7 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
373
386
  /* harmony import */ var _configurator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
374
387
  /* harmony import */ var _pluginAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
375
388
  /* harmony import */ var clientnode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
376
- /* harmony import */ var node_url__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9);
389
+ /* harmony import */ var node_url__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10);
377
390
  var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_configurator_js__WEBPACK_IMPORTED_MODULE_0__, _pluginAPI_js__WEBPACK_IMPORTED_MODULE_1__]);
378
391
  ([_configurator_js__WEBPACK_IMPORTED_MODULE_0__, _pluginAPI_js__WEBPACK_IMPORTED_MODULE_1__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
379
392
  // #!/usr/bin/env babel-node
@@ -416,13 +429,13 @@ __webpack_async_result__();
416
429
  } catch(e) { __webpack_async_result__(e); } });
417
430
 
418
431
  /***/ }),
419
- /* 6 */
432
+ /* 7 */
420
433
  /***/ ((module) => {
421
434
 
422
- module.exports = /*#__PURE__*/JSON.parse('{"name":"web-node","version":"1.0.589","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":{"email":"info@torben.website","name":"Torben Sickert","url":"https://torben.website"},"repository":{"type":"git","url":"https://github.com/thaibault/web-node.git"},"type":"module","bin":"index.js","files":["configurator.d.ts","index.d.ts","index.js","pluginAPI.d.ts","type.d.ts","unixCrypt.d.ts","unixCrypt.js"],"sideEffects":true,"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","prepare:test":"yarn clear && cd dummyPlugin && shx touch yarn.lock && yarn build && cd ..","serve":"yarn build:plain && yarn start","start":"./index.js \'{plugin: {hotReloading: true}}\'","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.3.0","@types/webpack-env":"^1.18.8","@typescript-eslint/eslint-plugin":"^8.68.0","@typescript-eslint/parser":"^8.68.0","clientnode":"^4.0.1500","eslint":"^10.9.1","eslint-config-google":"^0.14.0","eslint-plugin-jsdoc":"^64.2.1","jest":"^30.4.2","jsdoc":"^4.0.5","shx":"^0.4.0","typescript-eslint":"^8.68.0","web-documentation":"^1.0.51","weboptimizer":"^4.0.65"},"peerDependencies":{"clientnode":"*"},"resolutions":{"colors":"1.4.0","globals@npm:^11.1.0":"patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch","globals@npm:^14.0.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"},"engines":{"node":">=26","npm":">=12","yarn":">=4"},"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"}');
435
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"web-node","version":"1.0.591","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":{"email":"info@torben.website","name":"Torben Sickert","url":"https://torben.website"},"repository":{"type":"git","url":"https://github.com/thaibault/web-node.git"},"type":"module","bin":"index.js","files":["configurator.d.ts","index.d.ts","index.js","pluginAPI.d.ts","type.d.ts","unixCrypt.d.ts","unixCrypt.js"],"sideEffects":true,"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","prepare:test":"yarn clear && cd dummyPlugin && shx touch yarn.lock && yarn build && cd ..","serve":"yarn build:plain && yarn start","start":"./index.js \'{plugin: {hotReloading: true}}\'","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.4.1","@types/webpack-env":"^1.18.8","@typescript-eslint/eslint-plugin":"^8.69.0","@typescript-eslint/parser":"^8.69.0","clientnode":"^4.0.1502","eslint":"^10.9.1","eslint-config-google":"^0.14.0","eslint-plugin-jsdoc":"^64.3.4","jest":"^30.5.1","jsdoc":"^4.0.5","shx":"^0.4.0","typescript-eslint":"^8.69.0","web-documentation":"^1.0.52","weboptimizer":"^4.0.72"},"peerDependencies":{"clientnode":"*"},"resolutions":{"colors":"1.4.0","globals@npm:^11.1.0":"patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch","globals@npm:^14.0.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"},"engines":{"node":">=26","npm":">=12","yarn":">=4"},"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 -*-\\n${self.generic.assetPattern?.javaScript?.pattern ?? \'\'}\\n{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.18.0"}');
423
436
 
424
437
  /***/ }),
425
- /* 7 */
438
+ /* 8 */
426
439
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
427
440
 
428
441
  const x = (y) => {
@@ -432,7 +445,7 @@ const y = (x) => (() => (x))
432
445
  module.exports = x({ });
433
446
 
434
447
  /***/ }),
435
- /* 8 */
448
+ /* 9 */
436
449
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
437
450
 
438
451
  const x = (y) => {
@@ -442,7 +455,7 @@ const y = (x) => (() => (x))
442
455
  module.exports = x({ ["spawnSync"]: () => (__WEBPACK_EXTERNAL_MODULE_child_process__.spawnSync) });
443
456
 
444
457
  /***/ }),
445
- /* 9 */
458
+ /* 10 */
446
459
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
447
460
 
448
461
  const x = (y) => {
@@ -559,58 +572,47 @@ module.exports = x({ ["pathToFileURL"]: () => (__WEBPACK_EXTERNAL_MODULE_node_ur
559
572
  /******/ })();
560
573
  /******/
561
574
  /******/ /* webpack/runtime/define property getters */
562
- /******/ (() => {
563
- /******/ // define getter/value functions for harmony exports
564
- /******/ __webpack_require__.d = (exports, definition) => {
565
- /******/ if(Array.isArray(definition)) {
566
- /******/ var i = 0;
567
- /******/ while(i < definition.length) {
568
- /******/ var key = definition[i++];
569
- /******/ var binding = definition[i++];
570
- /******/ if(!__webpack_require__.o(exports, key)) {
571
- /******/ if(binding === 0) {
572
- /******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
573
- /******/ } else {
574
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
575
- /******/ }
576
- /******/ } else if(binding === 0) { i++; }
577
- /******/ }
578
- /******/ } else {
579
- /******/ for(var key in definition) {
580
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
581
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
582
- /******/ }
575
+ /******/ // define getter/value functions for harmony exports
576
+ /******/ __webpack_require__.d = (exports, definition) => {
577
+ /******/ if(Array.isArray(definition)) {
578
+ /******/ var i = 0;
579
+ /******/ while(i < definition.length) {
580
+ /******/ var key = definition[i++];
581
+ /******/ var binding = definition[i++];
582
+ /******/ var descriptor = binding === 0 ? { enumerable: true, value: definition[i++] } : { enumerable: true, get: binding };
583
+ /******/ if(!__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, descriptor);
584
+ /******/ }
585
+ /******/ } else {
586
+ /******/ for(var key in definition) {
587
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
588
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
583
589
  /******/ }
584
590
  /******/ }
585
- /******/ };
586
- /******/ })();
591
+ /******/ }
592
+ /******/ };
587
593
  /******/
588
594
  /******/ /* webpack/runtime/harmony module decorator */
589
- /******/ (() => {
590
- /******/ __webpack_require__.hmd = (module) => {
591
- /******/ module = Object.create(module);
592
- /******/ if (!module.children) module.children = [];
593
- /******/ Object.defineProperty(module, 'exports', {
594
- /******/ enumerable: true,
595
- /******/ set() {
596
- /******/ throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);
597
- /******/ }
598
- /******/ });
599
- /******/ return module;
600
- /******/ };
601
- /******/ })();
595
+ /******/ __webpack_require__.hmd = (module) => {
596
+ /******/ module = Object.create(module);
597
+ /******/ if (!module.children) module.children = [];
598
+ /******/ Object.defineProperty(module, 'exports', {
599
+ /******/ enumerable: true,
600
+ /******/ set() {
601
+ /******/ throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);
602
+ /******/ }
603
+ /******/ });
604
+ /******/ return module;
605
+ /******/ };
602
606
  /******/
603
607
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
604
- /******/ (() => {
605
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
606
- /******/ })();
608
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));
607
609
  /******/
608
610
  /************************************************************************/
609
611
  /******/
610
612
  /******/ // startup
611
613
  /******/ // Load entry module and return exports
612
614
  /******/ // This entry module used 'module' so it can't be inlined
613
- /******/ let __webpack_exports__ = __webpack_require__(5);
615
+ /******/ let __webpack_exports__ = __webpack_require__(6);
614
616
  /******/ __webpack_exports__ = await __webpack_exports__;
615
617
  /******/ const __webpack_exports__callStack = __webpack_exports__.lT;
616
618
  /******/ 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.589",
3
+ "version": "1.0.591",
4
4
  "description": "High level javaScript backend plugin system and configuration merger.",
5
5
  "keywords": [
6
6
  "api",
@@ -60,20 +60,20 @@
60
60
  "@babel/eslint-parser": "^8.0.1",
61
61
  "@eslint/js": "^10.0.1",
62
62
  "@stylistic/eslint-plugin": "^5.10.0",
63
- "@types/node": "^26.3.0",
63
+ "@types/node": "^26.4.1",
64
64
  "@types/webpack-env": "^1.18.8",
65
- "@typescript-eslint/eslint-plugin": "^8.68.0",
66
- "@typescript-eslint/parser": "^8.68.0",
67
- "clientnode": "^4.0.1500",
65
+ "@typescript-eslint/eslint-plugin": "^8.69.0",
66
+ "@typescript-eslint/parser": "^8.69.0",
67
+ "clientnode": "^4.0.1502",
68
68
  "eslint": "^10.9.1",
69
69
  "eslint-config-google": "^0.14.0",
70
- "eslint-plugin-jsdoc": "^64.2.1",
71
- "jest": "^30.4.2",
70
+ "eslint-plugin-jsdoc": "^64.3.4",
71
+ "jest": "^30.5.1",
72
72
  "jsdoc": "^4.0.5",
73
73
  "shx": "^0.4.0",
74
- "typescript-eslint": "^8.68.0",
75
- "web-documentation": "^1.0.51",
76
- "weboptimizer": "^4.0.65"
74
+ "typescript-eslint": "^8.69.0",
75
+ "web-documentation": "^1.0.52",
76
+ "weboptimizer": "^4.0.72"
77
77
  },
78
78
  "peerDependencies": {
79
79
  "clientnode": "*"
@@ -138,7 +138,7 @@
138
138
  "includeFilePathRegularExpression": "^(.+/)?index\\.js$",
139
139
  "pattern": {
140
140
  "#": "This is how we can make our main exported artefact executable.",
141
- "__evaluate__": "`#!/usr/bin/env node\n// -*- coding: utf-8 -*-\nif(import.meta.main)module.paths.unshift('/application/node_modules');{1}`"
141
+ "__evaluate__": "`#!/usr/bin/env node\n// -*- coding: utf-8 -*-\n${self.generic.assetPattern?.javaScript?.pattern ?? ''}\n{1}`"
142
142
  }
143
143
  }
144
144
  },
@@ -169,5 +169,5 @@
169
169
  "payload": "node"
170
170
  }
171
171
  },
172
- "packageManager": "yarn@4.14.1+sha512.64df448055b2d37ba269d7db535a469b8da93f8ef1140c25fd7a83c00a8fbaacb214ca0e02553b92a2c54cef78bb67d0b4817fab02001df0e24fac0faccc3b42"
172
+ "packageManager": "yarn@4.18.0"
173
173
  }
package/pluginAPI.d.ts CHANGED
@@ -10,14 +10,14 @@ export declare const log: Logger;
10
10
  * @returns A promise which resolves when all callbacks have resolved their
11
11
  * promise holding given potentially modified data.
12
12
  */
13
- export declare const callStack: <State extends BaseState<unknown> = ServicePromisesState, Output = undefined>(givenState: Omit<State, "pluginAPI">, ...parameters: Array<unknown>) => HookPromiseResult<Output>;
13
+ export declare const callStack: <State extends BaseState<unknown> = ServicePromisesState, Output = undefined>(givenState: Omit<State, 'pluginAPI'>, ...parameters: Array<unknown>) => HookPromiseResult<Output>;
14
14
  /**
15
15
  * Calls all plugin methods for given trigger description synchronous.
16
16
  * @param givenState - Contains runtime information about current hook.
17
17
  * @param parameters - Additional parameters to forward into plugin api.
18
18
  * @returns Given potentially modified data.
19
19
  */
20
- export declare const callStackSynchronous: <State extends BaseState<unknown> = ServicePromisesState, Output = void>(givenState: Omit<State, "pluginAPI">, ...parameters: Array<unknown>) => Output;
20
+ export declare const callStackSynchronous: <State extends BaseState<unknown> = ServicePromisesState, Output = void>(givenState: Omit<State, 'pluginAPI'>, ...parameters: Array<unknown>) => Output;
21
21
  /**
22
22
  * Converts given plugin name into the corresponding internal representation.
23
23
  * @param name - Name to convert.
@@ -58,7 +58,7 @@ export declare const hotReloadConfigurationFile: (plugins: Array<Plugin>, config
58
58
  * @param plugins - List of plugins to search for updates in.
59
59
  * @returns A list with plugin changes.
60
60
  */
61
- export declare const hotReloadFiles: (type: "api" | "configuration", target: "packageConfiguration" | "scope", plugins: Array<Plugin>) => Promise<Array<PluginChange>>;
61
+ export declare const hotReloadFiles: (type: 'api' | 'configuration', target: 'packageConfiguration' | 'scope', plugins: Array<Plugin>) => Promise<Array<PluginChange>>;
62
62
  /**
63
63
  * Extends given configuration object with given plugin specific ones and
64
64
  * returns a plugin specific meta information object.
@@ -146,23 +146,20 @@ export declare const determineLocations: ({ core: { context: { path: contextPath
146
146
  */
147
147
  export declare const isInLocations: (configuration: Configuration, plugins: Array<Plugin>, filePath: string, locations: Array<string> | string) => boolean;
148
148
  export declare const pluginAPI: {
149
- readonly callStack: <State extends BaseState<unknown> = ServicePromisesState<undefined, Configuration<Mapping<unknown>>, Mapping<unknown>, import("./type").ServicePromises<Mapping<unknown>>>, Output = undefined>(givenState: Omit<State, "pluginAPI">, ...parameters: Array<unknown>) => HookPromiseResult<Output>;
150
- readonly callStackSynchronous: <State extends BaseState<unknown> = ServicePromisesState<undefined, Configuration<Mapping<unknown>>, Mapping<unknown>, import("./type").ServicePromises<Mapping<unknown>>>, Output = void>(givenState: Omit<State, "pluginAPI">, ...parameters: Array<unknown>) => Output;
151
- readonly determineInternalName: (name: string, regularExpression: RegExp) => string;
152
- readonly determineLocations: ({ core: { context: { path: contextPath } } }: Configuration, locations?: Array<string> | string) => Array<string>;
153
- readonly evaluateConfiguration: <Type extends Mapping<unknown> = Configuration>(configuration: RecursiveEvaluateable<Type> | Type) => Promise<Type>;
154
- readonly hotReloadAPIFile: (plugins: Array<Plugin>) => Promise<Array<Plugin>>;
155
- readonly hotReloadConfigurationFile: (plugins: Array<Plugin>, configurationPropertyNames: Array<string>) => Promise<Array<Plugin>>;
156
- readonly hotReloadFiles: (type: "api" | "configuration", target: "packageConfiguration" | "scope", plugins: Array<Plugin>) => Promise<Array<PluginChange>>;
157
- readonly isInLocations: (configuration: Configuration, plugins: Array<Plugin>, filePath: string, locations: Array<string> | string) => boolean;
158
- readonly load: (name: string, internalName: string, plugins: Mapping<Plugin>, metaConfiguration: MetaPluginConfiguration, pluginPath: string, encoding?: Encoding) => Promise<Plugin>;
159
- readonly loadAll: (configuration: Configuration) => Promise<{
160
- configuration: Configuration;
161
- plugins: Array<Plugin>;
162
- }>;
163
- readonly loadAPI: (relativeFilePaths: Array<string>, pluginPath: string, name: string, internalName: string, plugins: Mapping<Plugin>, encoding?: Encoding, configuration?: EvaluateablePartialConfiguration | null, configurationFilePaths?: Array<string>) => Promise<Plugin>;
164
- readonly loadConfiguration: (name: string, packageConfiguration: PackageConfiguration, configurationPropertyNames: Array<string>) => EvaluateablePartialConfiguration;
165
- readonly loadConfigurations: (plugins: Array<Plugin>, configuration: Configuration) => Promise<Configuration>;
166
- readonly loadFile: (filePath: string, name: string, fallbackScope?: null | object, doLogging?: boolean) => Promise<object>;
149
+ readonly callStack: typeof callStack;
150
+ readonly callStackSynchronous: typeof callStackSynchronous;
151
+ readonly determineInternalName: typeof determineInternalName;
152
+ readonly determineLocations: typeof determineLocations;
153
+ readonly evaluateConfiguration: typeof evaluateConfiguration;
154
+ readonly hotReloadAPIFile: typeof hotReloadAPIFile;
155
+ readonly hotReloadConfigurationFile: typeof hotReloadConfigurationFile;
156
+ readonly hotReloadFiles: typeof hotReloadFiles;
157
+ readonly isInLocations: typeof isInLocations;
158
+ readonly load: typeof load;
159
+ readonly loadAll: typeof loadAll;
160
+ readonly loadAPI: typeof loadAPI;
161
+ readonly loadConfiguration: typeof loadConfiguration;
162
+ readonly loadConfigurations: typeof loadConfigurations;
163
+ readonly loadFile: typeof loadFile;
167
164
  };
168
165
  export default pluginAPI;
package/type.d.ts CHANGED
@@ -3,7 +3,7 @@ import type { WebDocumentationConfiguration } from 'web-documentation/build/depl
3
3
  import type { callStack, callStackSynchronous, default as pluginAPI, determineInternalName, determineLocations, evaluateConfiguration, hotReloadAPIFile, hotReloadConfigurationFile, hotReloadFiles, isInLocations, load, loadAll, loadAPI, loadConfiguration, loadConfigurations, loadFile } from './pluginAPI';
4
4
  export type EvaluateConfigurationScope = typeof UTILITY_SCOPE & {
5
5
  currentPath: string;
6
- fs: typeof import('fs');
6
+ fs: typeof import('fs/promises');
7
7
  path: typeof import('path');
8
8
  pluginAPI: typeof pluginAPI;
9
9
  webNodePath: string;
package/unixCrypt.js CHANGED
@@ -3,36 +3,27 @@
3
3
  /******/
4
4
  /************************************************************************/
5
5
  /******/ /* webpack/runtime/define property getters */
6
- /******/ (() => {
7
- /******/ // define getter/value functions for harmony exports
8
- /******/ __webpack_require__.d = (exports, definition) => {
9
- /******/ if(Array.isArray(definition)) {
10
- /******/ var i = 0;
11
- /******/ while(i < definition.length) {
12
- /******/ var key = definition[i++];
13
- /******/ var binding = definition[i++];
14
- /******/ if(!__webpack_require__.o(exports, key)) {
15
- /******/ if(binding === 0) {
16
- /******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
17
- /******/ } else {
18
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
19
- /******/ }
20
- /******/ } else if(binding === 0) { i++; }
21
- /******/ }
22
- /******/ } else {
23
- /******/ for(var key in definition) {
24
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
25
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
26
- /******/ }
6
+ /******/ // define getter/value functions for harmony exports
7
+ /******/ __webpack_require__.d = (exports, definition) => {
8
+ /******/ if(Array.isArray(definition)) {
9
+ /******/ var i = 0;
10
+ /******/ while(i < definition.length) {
11
+ /******/ var key = definition[i++];
12
+ /******/ var binding = definition[i++];
13
+ /******/ var descriptor = binding === 0 ? { enumerable: true, value: definition[i++] } : { enumerable: true, get: binding };
14
+ /******/ if(!__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, descriptor);
15
+ /******/ }
16
+ /******/ } else {
17
+ /******/ for(var key in definition) {
18
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
19
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
27
20
  /******/ }
28
21
  /******/ }
29
- /******/ };
30
- /******/ })();
22
+ /******/ }
23
+ /******/ };
31
24
  /******/
32
25
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
33
- /******/ (() => {
34
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
35
- /******/ })();
26
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));
36
27
  /******/
37
28
  /************************************************************************/
38
29
  let __webpack_exports__ = {};