web-node 1.0.613 → 1.0.615

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
@@ -26,6 +26,7 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
26
26
  /* harmony export */ ZN: () => (/* binding */ loadFile),
27
27
  /* harmony export */ c0: () => (/* binding */ combinePluginConfigurations),
28
28
  /* harmony export */ dw: () => (/* binding */ hotReloadAPIFile),
29
+ /* harmony export */ e7: () => (/* binding */ gatherConfigurationFilePaths),
29
30
  /* harmony export */ gh: () => (/* binding */ loadAll),
30
31
  /* harmony export */ gl: () => (/* binding */ callStackSynchronous),
31
32
  /* harmony export */ i9: () => (/* binding */ loadConfigurations),
@@ -62,44 +63,7 @@ _configurator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_async_dependencies_res
62
63
  endregion
63
64
  */// region imports
64
65
  function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r)};function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0))}if(o||r>1)return a;throw y=!0,n}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0)}else 1===c&&(t=i.return)&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break}catch(t){i=e,c=1,u=t}finally{f=1}}return{value:t,done:y}}}(r,o,i),!0),u}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]"}),(_regenerator=function _regenerator(){return{w:i,m:f}})()}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e)})}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2))},_regeneratorDefine2(e,r,n,t)}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]}},e:function e(r){throw r},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function s(){t=t.call(r)},n:function n(){var r=t.next();return a=r.done,r},e:function e(r){u=!0,o=r},f:function f(){try{a||null==t.return||t.return()}finally{if(u)throw o}}}}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){return void e(n)}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n)}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n)}_next(void 0)})}};// endregion
65
- var log=new clientnode__WEBPACK_IMPORTED_MODULE_2__.Logger({name:"web-node.plugin-api"});var PLUGIN_LOADER={};await (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.importFilesystemAPI)();// region allow plugins to import "web-node" as already loaded main module
66
- /*
67
- ES module specific logic to deduplicate the main module's scope for plugins
68
- to avoid loading it twice and therefore having two different scopes of the
69
- same module in memory:
70
-
71
- // main-module-hook.ts (must compile/run as a standalone module)
72
- import type {ResolveHook, InitializeHook} from 'node:module'
73
-
74
- let mainModuleURL: string | undefined
75
-
76
- export const initialize: InitializeHook = (
77
- data: {mainModuleURL?: string}
78
- ): void => {
79
- mainModuleURL = data.mainModuleURL
80
- }
81
-
82
- export const resolve: ResolveHook = (specifier, context, nextResolve) => {
83
- if (specifier === 'main-module' && mainModuleURL)
84
- // Redirect to the entry module's URL; the ESM cache is keyed by
85
- // resolved URL, so every importer shares that one instance.
86
- return nextResolve(mainModuleURL, context)
87
-
88
- return nextResolve(specifier, context)
89
- }
90
-
91
- Registering it
92
-
93
- // setup.ts (imported first, before anything does import 'main-module')
94
- import {register} from 'node:module'
95
- import {pathToFileURL} from 'node:url'
96
-
97
- register('./main-module-hook.js', {
98
- parentURL: import.meta.url,
99
- data: {mainModuleURL: pathToFileURL(process.argv[1]).href}
100
- })
101
- */// endregion
102
- /**
66
+ var log=new clientnode__WEBPACK_IMPORTED_MODULE_2__.Logger({name:"web-node.plugin-api"});var PLUGIN_LOADER={};await (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.importFilesystemAPI)();/**
103
67
  * Calls all plugin methods for given trigger description asynchronous and
104
68
  * waits for their resolved promises.
105
69
  * @param givenState - Contains runtime information about current hook.
@@ -171,7 +135,7 @@ for(_i3=0,_Object$entries3=Object.entries(pluginChange.oldScope);_i3<_Object$ent
171
135
  * @param pluginPath - Path to given plugin.
172
136
  * @param encoding - Encoding to use to read and write from child process's.
173
137
  * @returns An object of plugin specific meta information.
174
- */var load=/*#__PURE__*/function(){var _load=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(name,internalName,plugins,metaConfiguration,pluginPath,encoding){var configurationFilePaths,sourceConfigurations,_iterator8,_step8,fileName,filePath,_combinePluginConfigu,resolvedInternalName,configuration,apiFilePaths,_t5,_t6;return _regenerator().w(function(_context6){while(1)switch(_context6.p=_context6.n){case 0:if(encoding===void 0){encoding="utf8"}configurationFilePaths=[];sourceConfigurations=[];_iterator8=_createForOfIteratorHelper(metaConfiguration.fileNames);_context6.p=1;_iterator8.s();case 2:if((_step8=_iterator8.n()).done){_context6.n=6;break}fileName=_step8.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}_t5=sourceConfigurations;_context6.n=4;return loadFile(filePath,name);case 4:_t5.push.call(_t5,_context6.v);configurationFilePaths.push(filePath);case 5:_context6.n=2;break;case 6:_context6.n=8;break;case 7:_context6.p=7;_t6=_context6.v;_iterator8.e(_t6);case 8:_context6.p=8;_iterator8.f();return _context6.f(8);case 9:_combinePluginConfigu=combinePluginConfigurations(internalName,sourceConfigurations,metaConfiguration.propertyNames),resolvedInternalName=_combinePluginConfigu.name,configuration=_combinePluginConfigu.configuration;apiFilePaths=["index.js"];if(!Object.keys(configuration[resolvedInternalName].package).length){_context6.n=11;break}if(configuration[resolvedInternalName].package.main)apiFilePaths[0]=configuration[resolvedInternalName].package.main;_context6.n=10;return loadAPI(apiFilePaths,pluginPath,name,resolvedInternalName,plugins,encoding,configuration,configurationFilePaths);case 10:return _context6.a(2,_context6.v);case 11:_context6.n=12;return loadAPI(apiFilePaths,pluginPath,name,resolvedInternalName,plugins,encoding);case 12:return _context6.a(2,_context6.v)}},_callee6,null,[[1,7,8,9]])}));function load(_x9,_x0,_x1,_x10,_x11,_x12){return _load.apply(this,arguments)}return load}();/**
138
+ */var load=/*#__PURE__*/function(){var _load=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(name,internalName,plugins,metaConfiguration,pluginPath,encoding){var configurationFilePaths,sourceConfigurations,_iterator8,_step8,filePath,_combinePluginConfigu,resolvedInternalName,configuration,apiFilePaths,_t5,_t6;return _regenerator().w(function(_context6){while(1)switch(_context6.p=_context6.n){case 0:if(encoding===void 0){encoding="utf8"}_context6.n=1;return gatherConfigurationFilePaths(pluginPath,metaConfiguration.fileNames);case 1:configurationFilePaths=_context6.v;sourceConfigurations=[];_iterator8=_createForOfIteratorHelper(configurationFilePaths);_context6.p=2;_iterator8.s();case 3:if((_step8=_iterator8.n()).done){_context6.n=6;break}filePath=_step8.value;_t5=sourceConfigurations;_context6.n=4;return loadFile(filePath,name);case 4:_t5.push.call(_t5,_context6.v);case 5:_context6.n=3;break;case 6:_context6.n=8;break;case 7:_context6.p=7;_t6=_context6.v;_iterator8.e(_t6);case 8:_context6.p=8;_iterator8.f();return _context6.f(8);case 9:_combinePluginConfigu=combinePluginConfigurations(internalName,sourceConfigurations,metaConfiguration.propertyNames),resolvedInternalName=_combinePluginConfigu.name,configuration=_combinePluginConfigu.configuration;apiFilePaths=["index.js"];if(!Object.keys(configuration[resolvedInternalName].package).length){_context6.n=11;break}if(configuration[resolvedInternalName].package.main)apiFilePaths[0]=configuration[resolvedInternalName].package.main;_context6.n=10;return loadAPI(apiFilePaths,pluginPath,name,resolvedInternalName,plugins,encoding,configuration,configurationFilePaths);case 10:return _context6.a(2,_context6.v);case 11:_context6.n=12;return loadAPI(apiFilePaths,pluginPath,name,resolvedInternalName,plugins,encoding);case 12:return _context6.a(2,_context6.v)}},_callee6,null,[[2,7,8,9]])}));function load(_x9,_x0,_x1,_x10,_x11,_x12){return _load.apply(this,arguments)}return load}();/**
175
139
  * Creates a function callable by plugin api which calls the corresponding
176
140
  * plugin scope method.
177
141
  * @param plugins - To search for plugin scope in.
@@ -230,6 +194,12 @@ api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=argume
230
194
  the highest priority when resolving intermediate configuration
231
195
  states.
232
196
  */if(configuration.core.runtimeConfiguration)(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.extend)(true,configuration,configuration.core.runtimeConfiguration)}}}catch(err){_iterator1.e(err)}finally{_iterator1.f()}return evaluateConfiguration(configuration)};/**
197
+ * Gathers all existing configuration file paths for given plugin path and
198
+ * file names.
199
+ * @param pluginPath - Path to the plugin directory.
200
+ * @param fileNames - List of configuration file names to check.
201
+ * @returns A list of existing configuration file paths.
202
+ */var gatherConfigurationFilePaths=/*#__PURE__*/function(){var _gatherConfigurationFilePaths=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9(pluginPath,fileNames){var result,_iterator10,_step10,fileName,filePath,_t24;return _regenerator().w(function(_context9){while(1)switch(_context9.p=_context9.n){case 0:result=[];_iterator10=_createForOfIteratorHelper(fileNames);_context9.p=1;_iterator10.s();case 2:if((_step10=_iterator10.n()).done){_context9.n=5;break}fileName=_step10.value;filePath=(0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(pluginPath,fileName);_context9.n=3;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isFile)(filePath);case 3:if(!_context9.v){_context9.n=4;break}result.push(filePath);case 4:_context9.n=2;break;case 5:_context9.n=7;break;case 6:_context9.p=6;_t24=_context9.v;_iterator10.e(_t24);case 7:_context9.p=7;_iterator10.f();return _context9.f(7);case 8:return _context9.a(2,result)}},_callee9,null,[[1,6,7,8]])}));function gatherConfigurationFilePaths(_x22,_x23){return _gatherConfigurationFilePaths.apply(this,arguments)}return gatherConfigurationFilePaths}();/**
233
203
  * Load given api file path and returns exported scope.
234
204
  * @param filePath - Path to file to load.
235
205
  * @param name - Plugin name to use for proper error messages.
@@ -237,28 +207,17 @@ api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=argume
237
207
  * If a "null" is given an error will be thrown.
238
208
  * @param doLogging - Enables logging.
239
209
  * @returns Exported api file scope.
240
- */var loadFile=/*#__PURE__*/function(){var _loadFile=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9(filePath,name,fallbackScope,doLogging){var options,scope,_t24;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.
241
- /*
242
- let reference: string | undefined
243
- try {
244
- reference = import.meta.resolve(filePath)
245
- } catch {
246
- // Ignore error.
247
- }
248
-
249
- if (reference)
250
- // Clear the module cache.
251
- */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;_t24=_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)(_t24),". 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)(_t24)),{cause:_t24});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}();/**
210
+ */var loadFile=/*#__PURE__*/function(){var _loadFile=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0(filePath,name,fallbackScope,doLogging){var options,scope,_t25;return _regenerator().w(function(_context0){while(1)switch(_context0.p=_context0.n){case 0:if(fallbackScope===void 0){fallbackScope=null}if(doLogging===void 0){doLogging=true}options={};if((0,path__WEBPACK_IMPORTED_MODULE_5__.extname)(filePath)===".json")options.with={type:"json"};_context0.p=1;_context0.n=2;return import(/* webpackIgnore: true */"".concat(filePath,"?timestamp=").concat(String(Date.now())),options);case 2:scope=_context0.v;_context0.n=5;break;case 3:_context0.p=3;_t25=_context0.v;if(!fallbackScope){_context0.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)(_t25),". Using"),"fallback one.");_context0.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)(_t25)),{cause:_t25});case 5:if(!(Object.prototype.hasOwnProperty.call(scope,"default")&&scope.default)){_context0.n=6;break}return _context0.a(2,scope.default);case 6:return _context0.a(2,scope)}},_callee0,null,[[1,3]])}));function loadFile(_x24,_x25,_x26,_x27){return _loadFile.apply(this,arguments)}return loadFile}();/**
252
211
  * Extends given configuration object with all plugin specific ones and returns
253
212
  * a topological sorted list of plugins with plugins specific meta information
254
213
  * stored.
255
214
  * @param configuration - Configuration object to extend and use.
256
215
  * @returns A topological sorted list of plugins objects.
257
- */var loadAll=/*#__PURE__*/function(){var _loadAll=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0(configuration){var _configuration$core$p;var plugins,_i5,_Object$entries4,_Object$entries4$_i,name,plugin,_combinePluginConfigu2,internalName,pluginConfiguration,hasPluginConfiguration,_i6,_Object$values,directory,_directory$nameRegula,compiledRegularExpression,_iterator10,_step10,pluginName,currentPluginPath,_internalName,temporaryPlugins,_i7,_Object$values2,_plugin,_iterator11,_step11,_name2,sortedPlugins,_iterator12,_step12,_pluginName,_i8,_Object$entries5,_Object$entries5$_i,_name3,_plugin2,_t25,_t26,_t27,_t28,_t29;return _regenerator().w(function(_context0){while(1)switch(_context0.p=_context0.n){case 0:plugins={};for(_i5=0,_Object$entries4=Object.entries(PLUGIN_LOADER);_i5<_Object$entries4.length;_i5++){_Object$entries4$_i=_slicedToArray(_Object$entries4[_i5],2),name=_Object$entries4$_i[0],plugin=_Object$entries4$_i[1];_combinePluginConfigu2=combinePluginConfigurations(plugin.name||name,[].concat(plugin.configurations||[])),internalName=_combinePluginConfigu2.name,pluginConfiguration=_combinePluginConfigu2.configuration;hasPluginConfiguration=Object.prototype.hasOwnProperty.call(pluginConfiguration,internalName);plugins[name]={api:createNativeAPIFactory(plugins,name),apiFileLoadTimestamps:[],apiFilePaths:[],configuration:pluginConfiguration,configurationFilePaths:[],configurationFileLoadTimestamps:[],dependencies:hasPluginConfiguration&&pluginConfiguration[internalName].dependencies?pluginConfiguration[internalName].dependencies:[],internalName:internalName,name:name,packageConfiguration:hasPluginConfiguration?pluginConfiguration[internalName].package:{},path:"",scope:plugin.scope||{}}}/*
216
+ */var loadAll=/*#__PURE__*/function(){var _loadAll=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1(configuration){var _configuration$core$p;var plugins,_i5,_Object$entries4,_Object$entries4$_i,name,plugin,pluginConfigurations,_combinePluginConfigu2,internalName,pluginConfiguration,hasPluginConfiguration,_i6,_Object$values,directory,_directory$nameRegula,compiledRegularExpression,_iterator11,_step11,pluginName,currentPluginPath,_internalName,temporaryPlugins,_i7,_Object$values2,_plugin,_iterator12,_step12,_name2,sortedPlugins,_iterator13,_step13,_pluginName,_i8,_Object$entries5,_Object$entries5$_i,_name3,_plugin2,_t26,_t27,_t28,_t29,_t30;return _regenerator().w(function(_context1){while(1)switch(_context1.p=_context1.n){case 0:plugins={};for(_i5=0,_Object$entries4=Object.entries(PLUGIN_LOADER);_i5<_Object$entries4.length;_i5++){_Object$entries4$_i=_slicedToArray(_Object$entries4[_i5],2),name=_Object$entries4$_i[0],plugin=_Object$entries4$_i[1];pluginConfigurations=[].concat(plugin.configurations||[]);_combinePluginConfigu2=combinePluginConfigurations(plugin.name||name,pluginConfigurations),internalName=_combinePluginConfigu2.name,pluginConfiguration=_combinePluginConfigu2.configuration;hasPluginConfiguration=Object.prototype.hasOwnProperty.call(pluginConfiguration,internalName);plugins[name]={api:createNativeAPIFactory(plugins,name),apiFileLoadTimestamps:plugins[name].scope?[0]:[],apiFilePaths:plugins[name].scope?[""]:[],configuration:pluginConfiguration,configurationFilePaths:pluginConfigurations.map(function(){return""}),configurationFileLoadTimestamps:pluginConfigurations.map(function(){return 0}),dependencies:hasPluginConfiguration&&pluginConfiguration[internalName].dependencies?pluginConfiguration[internalName].dependencies:[],internalName:internalName,name:name,packageConfiguration:hasPluginConfiguration?pluginConfiguration[internalName].package:{},path:"",scope:plugin.scope||{}}}/*
258
217
  Load main plugin configuration at first.
259
218
 
260
219
  NOTE: If application's main is this itself avoid loading it twice.
261
- */if(!(configuration.name!=="web-node")){_context0.n=3;break}if(!Object.prototype.hasOwnProperty.call(plugins,configuration.name)){_context0.n=1;break}plugins[configuration.name].path=configuration.core.context.path;_context0.n=3;break;case 1:_context0.n=2;return load(configuration.name,determineInternalName(configuration.name,new RegExp((_configuration$core$p=configuration.core.plugin.directories.external.nameRegularExpressionPattern)!==null&&_configuration$core$p!==void 0?_configuration$core$p:configuration.core.plugin.nameRegularExpressionPattern)),plugins,configuration.core.plugin.configuration,configuration.core.context.path,configuration.core.encoding);case 2:plugins[configuration.name]=_context0.v;case 3:_i6=0,_Object$values=Object.values(configuration.core.plugin.directories);case 4:if(!(_i6<_Object$values.length)){_context0.n=17;break}directory=_Object$values[_i6];_context0.n=5;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isDirectory)(directory.path);case 5:if(!_context0.v){_context0.n=16;break}compiledRegularExpression=new RegExp((_directory$nameRegula=directory.nameRegularExpressionPattern)!==null&&_directory$nameRegula!==void 0?_directory$nameRegula:configuration.core.plugin.nameRegularExpressionPattern);_t25=_createForOfIteratorHelper;_context0.n=6;return (0,fs_promises__WEBPACK_IMPORTED_MODULE_4__.readdir)(directory.path);case 6:_iterator10=_t25(_context0.v);_context0.p=7;_iterator10.s();case 8:if((_step10=_iterator10.n()).done){_context0.n=13;break}pluginName=_step10.value;if(compiledRegularExpression.test(pluginName)){_context0.n=9;break}return _context0.a(3,12);case 9:currentPluginPath=(0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(directory.path,pluginName);if(!Object.prototype.hasOwnProperty.call(plugins,pluginName)){_context0.n=10;break}plugins[pluginName].path=currentPluginPath;return _context0.a(3,12);case 10:_internalName=determineInternalName(pluginName,compiledRegularExpression);_context0.n=11;return load(pluginName,_internalName,plugins,configuration.core.plugin.configuration,currentPluginPath,configuration.core.encoding);case 11:plugins[pluginName]=_context0.v;case 12:_context0.n=8;break;case 13:_context0.n=15;break;case 14:_context0.p=14;_t26=_context0.v;_iterator10.e(_t26);case 15:_context0.p=15;_iterator10.f();return _context0.f(15);case 16:_i6++;_context0.n=4;break;case 17:temporaryPlugins={};for(_i7=0,_Object$values2=Object.values(plugins);_i7<_Object$values2.length;_i7++){_plugin=_Object$values2[_i7];temporaryPlugins[_plugin.internalName]=_plugin.dependencies;if(Object.prototype.hasOwnProperty.call(configuration.core.interDependencies,_plugin.internalName)){_iterator11=_createForOfIteratorHelper([].concat(configuration.core.interDependencies[_plugin.internalName]));try{for(_iterator11.s();!(_step11=_iterator11.n()).done;){_name2=_step11.value;if(!temporaryPlugins[_plugin.internalName].includes(_name2))temporaryPlugins[_plugin.internalName].push(_name2)}}catch(err){_iterator11.e(err)}finally{_iterator11.f()}}}sortedPlugins=[];_iterator12=_createForOfIteratorHelper((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.sortTopological)(temporaryPlugins));_context0.p=18;_iterator12.s();case 19:if((_step12=_iterator12.n()).done){_context0.n=23;break}_pluginName=_step12.value;_i8=0,_Object$entries5=Object.entries(plugins);case 20:if(!(_i8<_Object$entries5.length)){_context0.n=22;break}_Object$entries5$_i=_slicedToArray(_Object$entries5[_i8],2),_name3=_Object$entries5$_i[0],_plugin2=_Object$entries5$_i[1];if(![_plugin2.internalName,_name3].includes(_pluginName)){_context0.n=21;break}sortedPlugins.push(_plugin2);return _context0.a(3,22);case 21:_i8++;_context0.n=20;break;case 22:_context0.n=19;break;case 23:_context0.n=25;break;case 24:_context0.p=24;_t27=_context0.v;_iterator12.e(_t27);case 25:_context0.p=25;_iterator12.f();return _context0.f(25);case 26:_context0.n=27;return loadConfigurations(sortedPlugins,configuration);case 27:_t28=_context0.v;_t29=sortedPlugins;return _context0.a(2,{configuration:_t28,plugins:_t29})}},_callee0,null,[[18,24,25,26],[7,14,15,16]])}));function loadAll(_x26){return _loadAll.apply(this,arguments)}return loadAll}();/**
220
+ */if(!(configuration.name!=="web-node")){_context1.n=4;break}if(!Object.prototype.hasOwnProperty.call(plugins,configuration.name)){_context1.n=2;break}plugins[configuration.name].path=configuration.core.context.path;_context1.n=1;return gatherConfigurationFilePaths(configuration.core.context.path,configuration.core.plugin.configuration.fileNames);case 1:plugins[configuration.name].configurationFilePaths=_context1.v;_context1.n=4;break;case 2:_context1.n=3;return load(configuration.name,determineInternalName(configuration.name,new RegExp((_configuration$core$p=configuration.core.plugin.directories.external.nameRegularExpressionPattern)!==null&&_configuration$core$p!==void 0?_configuration$core$p:configuration.core.plugin.nameRegularExpressionPattern)),plugins,configuration.core.plugin.configuration,configuration.core.context.path,configuration.core.encoding);case 3:plugins[configuration.name]=_context1.v;case 4:_i6=0,_Object$values=Object.values(configuration.core.plugin.directories);case 5:if(!(_i6<_Object$values.length)){_context1.n=19;break}directory=_Object$values[_i6];_context1.n=6;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isDirectory)(directory.path);case 6:if(!_context1.v){_context1.n=18;break}compiledRegularExpression=new RegExp((_directory$nameRegula=directory.nameRegularExpressionPattern)!==null&&_directory$nameRegula!==void 0?_directory$nameRegula:configuration.core.plugin.nameRegularExpressionPattern);_t26=_createForOfIteratorHelper;_context1.n=7;return (0,fs_promises__WEBPACK_IMPORTED_MODULE_4__.readdir)(directory.path);case 7:_iterator11=_t26(_context1.v);_context1.p=8;_iterator11.s();case 9:if((_step11=_iterator11.n()).done){_context1.n=15;break}pluginName=_step11.value;if(compiledRegularExpression.test(pluginName)){_context1.n=10;break}return _context1.a(3,14);case 10:currentPluginPath=(0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(directory.path,pluginName);if(!Object.prototype.hasOwnProperty.call(plugins,pluginName)){_context1.n=12;break}plugins[pluginName].path=currentPluginPath;_context1.n=11;return gatherConfigurationFilePaths(currentPluginPath,configuration.core.plugin.configuration.fileNames);case 11:plugins[pluginName].configurationFilePaths=_context1.v;return _context1.a(3,14);case 12:_internalName=determineInternalName(pluginName,compiledRegularExpression);_context1.n=13;return load(pluginName,_internalName,plugins,configuration.core.plugin.configuration,currentPluginPath,configuration.core.encoding);case 13:plugins[pluginName]=_context1.v;case 14:_context1.n=9;break;case 15:_context1.n=17;break;case 16:_context1.p=16;_t27=_context1.v;_iterator11.e(_t27);case 17:_context1.p=17;_iterator11.f();return _context1.f(17);case 18:_i6++;_context1.n=5;break;case 19:temporaryPlugins={};for(_i7=0,_Object$values2=Object.values(plugins);_i7<_Object$values2.length;_i7++){_plugin=_Object$values2[_i7];temporaryPlugins[_plugin.internalName]=_plugin.dependencies;if(Object.prototype.hasOwnProperty.call(configuration.core.interDependencies,_plugin.internalName)){_iterator12=_createForOfIteratorHelper([].concat(configuration.core.interDependencies[_plugin.internalName]));try{for(_iterator12.s();!(_step12=_iterator12.n()).done;){_name2=_step12.value;if(!temporaryPlugins[_plugin.internalName].includes(_name2))temporaryPlugins[_plugin.internalName].push(_name2)}}catch(err){_iterator12.e(err)}finally{_iterator12.f()}}}sortedPlugins=[];_iterator13=_createForOfIteratorHelper((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.sortTopological)(temporaryPlugins));_context1.p=20;_iterator13.s();case 21:if((_step13=_iterator13.n()).done){_context1.n=25;break}_pluginName=_step13.value;_i8=0,_Object$entries5=Object.entries(plugins);case 22:if(!(_i8<_Object$entries5.length)){_context1.n=24;break}_Object$entries5$_i=_slicedToArray(_Object$entries5[_i8],2),_name3=_Object$entries5$_i[0],_plugin2=_Object$entries5$_i[1];if(![_plugin2.internalName,_name3].includes(_pluginName)){_context1.n=23;break}sortedPlugins.push(_plugin2);return _context1.a(3,24);case 23:_i8++;_context1.n=22;break;case 24:_context1.n=21;break;case 25:_context1.n=27;break;case 26:_context1.p=26;_t28=_context1.v;_iterator13.e(_t28);case 27:_context1.p=27;_iterator13.f();return _context1.f(27);case 28:_context1.n=29;return loadConfigurations(sortedPlugins,configuration);case 29:_t29=_context1.v;_t30=sortedPlugins;return _context1.a(2,{configuration:_t29,plugins:_t30})}},_callee1,null,[[20,26,27,28],[8,16,17,18]])}));function loadAll(_x28){return _loadAll.apply(this,arguments)}return loadAll}();/**
262
221
  * Transform a list of absolute paths respecting the application context.
263
222
  * @param configuration - Configuration object.
264
223
  * @param configuration.core - Sub configuration web-node.
@@ -274,7 +233,7 @@ api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=argume
274
233
  * @param locations - Locations to search in.
275
234
  * @returns A boolean indicating whether given file path is in provided
276
235
  * locations.
277
- */var isInLocations=function isInLocations(configuration,plugins,filePath,locations){var pluginPaths=plugins.map(function(plugin){return plugin.path});var _iterator13=_createForOfIteratorHelper([].concat(locations)),_step13;try{for(_iterator13.s();!(_step13=_iterator13.n()).done;){var location=_step13.value;if(location.startsWith("/")){if(filePath.startsWith((0,path__WEBPACK_IMPORTED_MODULE_5__.join)(configuration.core.context.path,location)))return true}else{var _iterator14=_createForOfIteratorHelper(pluginPaths),_step14;try{for(_iterator14.s();!(_step14=_iterator14.n()).done;){var pluginPath=_step14.value;if(filePath.startsWith((0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(pluginPath,location)))return true}}catch(err){_iterator14.e(err)}finally{_iterator14.f()}}}}catch(err){_iterator13.e(err)}finally{_iterator13.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);
236
+ */var isInLocations=function isInLocations(configuration,plugins,filePath,locations){var pluginPaths=plugins.map(function(plugin){return plugin.path});var _iterator14=_createForOfIteratorHelper([].concat(locations)),_step14;try{for(_iterator14.s();!(_step14=_iterator14.n()).done;){var location=_step14.value;if(location.startsWith("/")){if(filePath.startsWith((0,path__WEBPACK_IMPORTED_MODULE_5__.join)(configuration.core.context.path,location)))return true}else{var _iterator15=_createForOfIteratorHelper(pluginPaths),_step15;try{for(_iterator15.s();!(_step15=_iterator15.n()).done;){var pluginPath=_step15.value;if(filePath.startsWith((0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(pluginPath,location)))return true}}catch(err){_iterator15.e(err)}finally{_iterator15.f()}}}}catch(err){_iterator14.e(err)}finally{_iterator14.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);
278
237
  __webpack_async_result__();
279
238
  } catch(e) { __webpack_async_result__(e); } }, 1);
280
239
 
@@ -320,7 +279,7 @@ _pluginAPI_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_async_dependencies_result
320
279
  See https://creativecommons.org/licenses/by/3.0/deed.de
321
280
  endregion
322
281
  */// region imports
323
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _mainPackageConfigura;function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]}},e:function e(r){throw r},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function s(){t=t.call(r)},n:function n(){var r=t.next();return a=r.done,r},e:function e(r){u=!0,o=r},f:function f(){try{a||null==t.return||t.return()}finally{if(u)throw o}}}}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)};// endregion
282
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _mainPackageConfigura,_mainPackageConfigura2;function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]}},e:function e(r){throw r},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function s(){t=t.call(r)},n:function n(){var r=t.next();return a=r.done,r},e:function e(r){u=!0,o=r},f:function f(){try{a||null==t.return||t.return()}finally{if(u)throw o}}}}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)};// endregion
324
283
  /*
325
284
  To assume to go two folder up from this file until there is no
326
285
  "node_modules" parent folder is usually resilient again dealing with
@@ -334,7 +293,7 @@ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof
334
293
  linked "node_modules" folder using current working directory as context
335
294
  is a better assumption than two folders up the hierarchy.
336
295
  */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.
337
- }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
296
+ }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.json"),{with:{type:"json"}})).default}catch(_unused2){_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.context.path=process.cwd()}var configName=mainPackageConfiguration.webNodeInternalName;var name=configName&&((_mainPackageConfigura=mainPackageConfiguration.webNode)===null||_mainPackageConfigura===void 0||(_mainPackageConfigura=_mainPackageConfigura[configName])===null||_mainPackageConfigura===void 0?void 0:_mainPackageConfigura.name)||configName||((_mainPackageConfigura2=mainPackageConfiguration.webDocumentation)===null||_mainPackageConfigura2===void 0?void 0:_mainPackageConfigura2.name)||mainPackageConfiguration.name||"main";var applicationConfiguration=mainPackageConfiguration.webNode||_defineProperty({},name,{name:name,package:mainPackageConfiguration});// endregion
338
297
  _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,/*
339
298
  NOTE: "object.modifyObject" removes modifications in "result"
340
299
  in-place before it is used as extending source.
@@ -391,6 +350,7 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
391
350
  /* harmony export */ ZN: () => (/* reexport safe */ _pluginAPI_js__WEBPACK_IMPORTED_MODULE_1__.ZN),
392
351
  /* harmony export */ c0: () => (/* reexport safe */ _pluginAPI_js__WEBPACK_IMPORTED_MODULE_1__.c0),
393
352
  /* harmony export */ dw: () => (/* reexport safe */ _pluginAPI_js__WEBPACK_IMPORTED_MODULE_1__.dw),
353
+ /* harmony export */ e7: () => (/* reexport safe */ _pluginAPI_js__WEBPACK_IMPORTED_MODULE_1__.e7),
394
354
  /* harmony export */ eQ: () => (/* binding */ isMainModule),
395
355
  /* harmony export */ gh: () => (/* reexport safe */ _pluginAPI_js__WEBPACK_IMPORTED_MODULE_1__.gh),
396
356
  /* harmony export */ gl: () => (/* reexport safe */ _pluginAPI_js__WEBPACK_IMPORTED_MODULE_1__.gl),
@@ -458,7 +418,7 @@ __webpack_async_result__();
458
418
  /* 7 */
459
419
  /***/ ((module) => {
460
420
 
461
- module.exports = /*#__PURE__*/JSON.parse('{"name":"web-node","version":"1.0.613","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":"main.js","exports":{".":"./index.js","./main":"./main.js","./main.js":"./main.js","./package.json":"./package.json","./unixCrypt":"./unixCrypt.js","./unixCrypt.js":"./unixCrypt.js","./type":"./type.d.ts"},"files":["configurator.d.ts","index.d.ts","index.js","main.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":"./main.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.1512","eslint":"^10.10.0","eslint-config-google":"^0.14.0","eslint-plugin-jsdoc":"^64.3.6","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.78"},"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"]},"nameRegularExpressionPattern":"^([a-zA-Z0-9-]+?)-?[wW]eb-?[nN]ode-?[pP]lugin$","directories":{"external":{"path":{"__evaluate__":"`${currentPath}/node_modules/`"}},"internal":{"nameRegularExpressionPattern":"^([a-zA-Z0-9-_].*)$","path":{"__evaluate__":"`${currentPath}/plugins/`"}}},"hotReloading":false}}},"webOptimizer":{"assetPattern":{"javaScript":{"includeFilePathRegularExpression":"^(.+/)?main\\\\.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\', main: \'./main.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"}');
421
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"web-node","version":"1.0.615","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":"main.js","exports":{".":"./index.js","./main":"./main.js","./main.js":"./main.js","./package.json":"./package.json","./unixCrypt":"./unixCrypt.js","./unixCrypt.js":"./unixCrypt.js","./type":"./type.d.ts"},"files":["configurator.d.ts","index.d.ts","index.js","main.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":"./main.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.1512","eslint":"^10.10.0","eslint-config-google":"^0.14.0","eslint-plugin-jsdoc":"^64.3.6","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.78"},"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"]},"nameRegularExpressionPattern":"^([a-zA-Z0-9-]+?)-?[wW]eb-?[nN]ode-?[pP]lugin$","directories":{"external":{"path":{"__evaluate__":"`${currentPath}/node_modules/`"}},"internal":{"nameRegularExpressionPattern":"^([a-zA-Z0-9-_].*)$","path":{"__evaluate__":"`${currentPath}/plugins/`"}}},"hotReloading":false}}},"webOptimizer":{"assetPattern":{"javaScript":{"includeFilePathRegularExpression":"^(.+/)?main\\\\.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\', main: \'./main.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"}');
462
422
 
463
423
  /***/ }),
464
424
  /* 8 */
@@ -660,6 +620,7 @@ module.exports = x({ ["fileURLToPath"]: () => (__WEBPACK_EXTERNAL_MODULE_node_ur
660
620
  /******/ const __webpack_exports__determineInternalName = __webpack_exports__.Gy;
661
621
  /******/ const __webpack_exports__determineLocations = __webpack_exports__.m7;
662
622
  /******/ const __webpack_exports__evaluateConfiguration = __webpack_exports__.u2;
623
+ /******/ const __webpack_exports__gatherConfigurationFilePaths = __webpack_exports__.e7;
663
624
  /******/ const __webpack_exports__hotReloadAPIFile = __webpack_exports__.dw;
664
625
  /******/ const __webpack_exports__hotReloadConfigurationFile = __webpack_exports__.Vx;
665
626
  /******/ const __webpack_exports__hotReloadFiles = __webpack_exports__.Ad;
@@ -675,5 +636,5 @@ module.exports = x({ ["fileURLToPath"]: () => (__WEBPACK_EXTERNAL_MODULE_node_ur
675
636
  /******/ const __webpack_exports__log = __webpack_exports__.Rm;
676
637
  /******/ const __webpack_exports__main = __webpack_exports__.iW;
677
638
  /******/ const __webpack_exports__pluginAPI = __webpack_exports__.MM;
678
- /******/ export { __webpack_exports__PLUGIN_LOADER as PLUGIN_LOADER, __webpack_exports__callStack as callStack, __webpack_exports__callStackSynchronous as callStackSynchronous, __webpack_exports__combinePluginConfigurations as combinePluginConfigurations, __webpack_exports__configuration as configuration, __webpack_exports__createNativeAPIFactory as createNativeAPIFactory, __webpack_exports__default as default, __webpack_exports__determineInternalName as determineInternalName, __webpack_exports__determineLocations as determineLocations, __webpack_exports__evaluateConfiguration as evaluateConfiguration, __webpack_exports__hotReloadAPIFile as hotReloadAPIFile, __webpack_exports__hotReloadConfigurationFile as hotReloadConfigurationFile, __webpack_exports__hotReloadFiles as hotReloadFiles, __webpack_exports__isInLocations as isInLocations, __webpack_exports__isMainModule as isMainModule, __webpack_exports__isMainModulePositiveCalls as isMainModulePositiveCalls, __webpack_exports__load as load, __webpack_exports__loadAPI as loadAPI, __webpack_exports__loadAll as loadAll, __webpack_exports__loadConfiguration as loadConfiguration, __webpack_exports__loadConfigurations as loadConfigurations, __webpack_exports__loadFile as loadFile, __webpack_exports__log as log, __webpack_exports__main as main, __webpack_exports__pluginAPI as pluginAPI };
639
+ /******/ export { __webpack_exports__PLUGIN_LOADER as PLUGIN_LOADER, __webpack_exports__callStack as callStack, __webpack_exports__callStackSynchronous as callStackSynchronous, __webpack_exports__combinePluginConfigurations as combinePluginConfigurations, __webpack_exports__configuration as configuration, __webpack_exports__createNativeAPIFactory as createNativeAPIFactory, __webpack_exports__default as default, __webpack_exports__determineInternalName as determineInternalName, __webpack_exports__determineLocations as determineLocations, __webpack_exports__evaluateConfiguration as evaluateConfiguration, __webpack_exports__gatherConfigurationFilePaths as gatherConfigurationFilePaths, __webpack_exports__hotReloadAPIFile as hotReloadAPIFile, __webpack_exports__hotReloadConfigurationFile as hotReloadConfigurationFile, __webpack_exports__hotReloadFiles as hotReloadFiles, __webpack_exports__isInLocations as isInLocations, __webpack_exports__isMainModule as isMainModule, __webpack_exports__isMainModulePositiveCalls as isMainModulePositiveCalls, __webpack_exports__load as load, __webpack_exports__loadAPI as loadAPI, __webpack_exports__loadAll as loadAll, __webpack_exports__loadConfiguration as loadConfiguration, __webpack_exports__loadConfigurations as loadConfigurations, __webpack_exports__loadFile as loadFile, __webpack_exports__log as log, __webpack_exports__main as main, __webpack_exports__pluginAPI as pluginAPI };
679
640
  /******/
package/main.js CHANGED
@@ -23,7 +23,7 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
23
23
  /* harmony export */ gl: () => (/* binding */ callStackSynchronous),
24
24
  /* harmony export */ lT: () => (/* binding */ _callStack)
25
25
  /* harmony export */ });
26
- /* unused harmony exports log, determineInternalName, evaluateConfiguration, hotReloadAPIFile, hotReloadConfigurationFile, hotReloadFiles, combinePluginConfigurations, load, createNativeAPIFactory, loadAPI, loadConfiguration, loadConfigurations, loadFile, determineLocations, isInLocations, pluginAPI */
26
+ /* unused harmony exports log, determineInternalName, evaluateConfiguration, hotReloadAPIFile, hotReloadConfigurationFile, hotReloadFiles, combinePluginConfigurations, load, createNativeAPIFactory, loadAPI, loadConfiguration, loadConfigurations, gatherConfigurationFilePaths, loadFile, determineLocations, isInLocations, pluginAPI */
27
27
  /* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
28
28
  /* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
29
29
  /* harmony import */ var clientnode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
@@ -50,44 +50,7 @@ _configurator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_async_dependencies_res
50
50
  endregion
51
51
  */// region imports
52
52
  function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r)};function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0))}if(o||r>1)return a;throw y=!0,n}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0)}else 1===c&&(t=i.return)&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break}catch(t){i=e,c=1,u=t}finally{f=1}}return{value:t,done:y}}}(r,o,i),!0),u}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]"}),(_regenerator=function _regenerator(){return{w:i,m:f}})()}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e)})}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2))},_regeneratorDefine2(e,r,n,t)}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]}},e:function e(r){throw r},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function s(){t=t.call(r)},n:function n(){var r=t.next();return a=r.done,r},e:function e(r){u=!0,o=r},f:function f(){try{a||null==t.return||t.return()}finally{if(u)throw o}}}}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){return void e(n)}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n)}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n)}_next(void 0)})}};// endregion
53
- var log=new clientnode__WEBPACK_IMPORTED_MODULE_2__.Logger({name:"web-node.plugin-api"});var PLUGIN_LOADER={};await (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.importFilesystemAPI)();// region allow plugins to import "web-node" as already loaded main module
54
- /*
55
- ES module specific logic to deduplicate the main module's scope for plugins
56
- to avoid loading it twice and therefore having two different scopes of the
57
- same module in memory:
58
-
59
- // main-module-hook.ts (must compile/run as a standalone module)
60
- import type {ResolveHook, InitializeHook} from 'node:module'
61
-
62
- let mainModuleURL: string | undefined
63
-
64
- export const initialize: InitializeHook = (
65
- data: {mainModuleURL?: string}
66
- ): void => {
67
- mainModuleURL = data.mainModuleURL
68
- }
69
-
70
- export const resolve: ResolveHook = (specifier, context, nextResolve) => {
71
- if (specifier === 'main-module' && mainModuleURL)
72
- // Redirect to the entry module's URL; the ESM cache is keyed by
73
- // resolved URL, so every importer shares that one instance.
74
- return nextResolve(mainModuleURL, context)
75
-
76
- return nextResolve(specifier, context)
77
- }
78
-
79
- Registering it
80
-
81
- // setup.ts (imported first, before anything does import 'main-module')
82
- import {register} from 'node:module'
83
- import {pathToFileURL} from 'node:url'
84
-
85
- register('./main-module-hook.js', {
86
- parentURL: import.meta.url,
87
- data: {mainModuleURL: pathToFileURL(process.argv[1]).href}
88
- })
89
- */// endregion
90
- /**
53
+ var log=new clientnode__WEBPACK_IMPORTED_MODULE_2__.Logger({name:"web-node.plugin-api"});var PLUGIN_LOADER={};await (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.importFilesystemAPI)();/**
91
54
  * Calls all plugin methods for given trigger description asynchronous and
92
55
  * waits for their resolved promises.
93
56
  * @param givenState - Contains runtime information about current hook.
@@ -159,7 +122,7 @@ for(_i3=0,_Object$entries3=Object.entries(pluginChange.oldScope);_i3<_Object$ent
159
122
  * @param pluginPath - Path to given plugin.
160
123
  * @param encoding - Encoding to use to read and write from child process's.
161
124
  * @returns An object of plugin specific meta information.
162
- */var load=/*#__PURE__*/function(){var _load=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(name,internalName,plugins,metaConfiguration,pluginPath,encoding){var configurationFilePaths,sourceConfigurations,_iterator8,_step8,fileName,filePath,_combinePluginConfigu,resolvedInternalName,configuration,apiFilePaths,_t5,_t6;return _regenerator().w(function(_context6){while(1)switch(_context6.p=_context6.n){case 0:if(encoding===void 0){encoding="utf8"}configurationFilePaths=[];sourceConfigurations=[];_iterator8=_createForOfIteratorHelper(metaConfiguration.fileNames);_context6.p=1;_iterator8.s();case 2:if((_step8=_iterator8.n()).done){_context6.n=6;break}fileName=_step8.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}_t5=sourceConfigurations;_context6.n=4;return loadFile(filePath,name);case 4:_t5.push.call(_t5,_context6.v);configurationFilePaths.push(filePath);case 5:_context6.n=2;break;case 6:_context6.n=8;break;case 7:_context6.p=7;_t6=_context6.v;_iterator8.e(_t6);case 8:_context6.p=8;_iterator8.f();return _context6.f(8);case 9:_combinePluginConfigu=combinePluginConfigurations(internalName,sourceConfigurations,metaConfiguration.propertyNames),resolvedInternalName=_combinePluginConfigu.name,configuration=_combinePluginConfigu.configuration;apiFilePaths=["index.js"];if(!Object.keys(configuration[resolvedInternalName].package).length){_context6.n=11;break}if(configuration[resolvedInternalName].package.main)apiFilePaths[0]=configuration[resolvedInternalName].package.main;_context6.n=10;return loadAPI(apiFilePaths,pluginPath,name,resolvedInternalName,plugins,encoding,configuration,configurationFilePaths);case 10:return _context6.a(2,_context6.v);case 11:_context6.n=12;return loadAPI(apiFilePaths,pluginPath,name,resolvedInternalName,plugins,encoding);case 12:return _context6.a(2,_context6.v)}},_callee6,null,[[1,7,8,9]])}));function load(_x9,_x0,_x1,_x10,_x11,_x12){return _load.apply(this,arguments)}return load}();/**
125
+ */var load=/*#__PURE__*/function(){var _load=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(name,internalName,plugins,metaConfiguration,pluginPath,encoding){var configurationFilePaths,sourceConfigurations,_iterator8,_step8,filePath,_combinePluginConfigu,resolvedInternalName,configuration,apiFilePaths,_t5,_t6;return _regenerator().w(function(_context6){while(1)switch(_context6.p=_context6.n){case 0:if(encoding===void 0){encoding="utf8"}_context6.n=1;return gatherConfigurationFilePaths(pluginPath,metaConfiguration.fileNames);case 1:configurationFilePaths=_context6.v;sourceConfigurations=[];_iterator8=_createForOfIteratorHelper(configurationFilePaths);_context6.p=2;_iterator8.s();case 3:if((_step8=_iterator8.n()).done){_context6.n=6;break}filePath=_step8.value;_t5=sourceConfigurations;_context6.n=4;return loadFile(filePath,name);case 4:_t5.push.call(_t5,_context6.v);case 5:_context6.n=3;break;case 6:_context6.n=8;break;case 7:_context6.p=7;_t6=_context6.v;_iterator8.e(_t6);case 8:_context6.p=8;_iterator8.f();return _context6.f(8);case 9:_combinePluginConfigu=combinePluginConfigurations(internalName,sourceConfigurations,metaConfiguration.propertyNames),resolvedInternalName=_combinePluginConfigu.name,configuration=_combinePluginConfigu.configuration;apiFilePaths=["index.js"];if(!Object.keys(configuration[resolvedInternalName].package).length){_context6.n=11;break}if(configuration[resolvedInternalName].package.main)apiFilePaths[0]=configuration[resolvedInternalName].package.main;_context6.n=10;return loadAPI(apiFilePaths,pluginPath,name,resolvedInternalName,plugins,encoding,configuration,configurationFilePaths);case 10:return _context6.a(2,_context6.v);case 11:_context6.n=12;return loadAPI(apiFilePaths,pluginPath,name,resolvedInternalName,plugins,encoding);case 12:return _context6.a(2,_context6.v)}},_callee6,null,[[2,7,8,9]])}));function load(_x9,_x0,_x1,_x10,_x11,_x12){return _load.apply(this,arguments)}return load}();/**
163
126
  * Creates a function callable by plugin api which calls the corresponding
164
127
  * plugin scope method.
165
128
  * @param plugins - To search for plugin scope in.
@@ -218,6 +181,12 @@ api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=argume
218
181
  the highest priority when resolving intermediate configuration
219
182
  states.
220
183
  */if(configuration.core.runtimeConfiguration)(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.extend)(true,configuration,configuration.core.runtimeConfiguration)}}}catch(err){_iterator1.e(err)}finally{_iterator1.f()}return evaluateConfiguration(configuration)};/**
184
+ * Gathers all existing configuration file paths for given plugin path and
185
+ * file names.
186
+ * @param pluginPath - Path to the plugin directory.
187
+ * @param fileNames - List of configuration file names to check.
188
+ * @returns A list of existing configuration file paths.
189
+ */var gatherConfigurationFilePaths=/*#__PURE__*/function(){var _gatherConfigurationFilePaths=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9(pluginPath,fileNames){var result,_iterator10,_step10,fileName,filePath,_t24;return _regenerator().w(function(_context9){while(1)switch(_context9.p=_context9.n){case 0:result=[];_iterator10=_createForOfIteratorHelper(fileNames);_context9.p=1;_iterator10.s();case 2:if((_step10=_iterator10.n()).done){_context9.n=5;break}fileName=_step10.value;filePath=(0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(pluginPath,fileName);_context9.n=3;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isFile)(filePath);case 3:if(!_context9.v){_context9.n=4;break}result.push(filePath);case 4:_context9.n=2;break;case 5:_context9.n=7;break;case 6:_context9.p=6;_t24=_context9.v;_iterator10.e(_t24);case 7:_context9.p=7;_iterator10.f();return _context9.f(7);case 8:return _context9.a(2,result)}},_callee9,null,[[1,6,7,8]])}));function gatherConfigurationFilePaths(_x22,_x23){return _gatherConfigurationFilePaths.apply(this,arguments)}return gatherConfigurationFilePaths}();/**
221
190
  * Load given api file path and returns exported scope.
222
191
  * @param filePath - Path to file to load.
223
192
  * @param name - Plugin name to use for proper error messages.
@@ -225,28 +194,17 @@ api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=argume
225
194
  * If a "null" is given an error will be thrown.
226
195
  * @param doLogging - Enables logging.
227
196
  * @returns Exported api file scope.
228
- */var loadFile=/*#__PURE__*/function(){var _loadFile=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9(filePath,name,fallbackScope,doLogging){var options,scope,_t24;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.
229
- /*
230
- let reference: string | undefined
231
- try {
232
- reference = import.meta.resolve(filePath)
233
- } catch {
234
- // Ignore error.
235
- }
236
-
237
- if (reference)
238
- // Clear the module cache.
239
- */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;_t24=_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)(_t24),". 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)(_t24)),{cause:_t24});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}();/**
197
+ */var loadFile=/*#__PURE__*/function(){var _loadFile=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0(filePath,name,fallbackScope,doLogging){var options,scope,_t25;return _regenerator().w(function(_context0){while(1)switch(_context0.p=_context0.n){case 0:if(fallbackScope===void 0){fallbackScope=null}if(doLogging===void 0){doLogging=true}options={};if((0,path__WEBPACK_IMPORTED_MODULE_5__.extname)(filePath)===".json")options.with={type:"json"};_context0.p=1;_context0.n=2;return import(/* webpackIgnore: true */"".concat(filePath,"?timestamp=").concat(String(Date.now())),options);case 2:scope=_context0.v;_context0.n=5;break;case 3:_context0.p=3;_t25=_context0.v;if(!fallbackScope){_context0.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)(_t25),". Using"),"fallback one.");_context0.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)(_t25)),{cause:_t25});case 5:if(!(Object.prototype.hasOwnProperty.call(scope,"default")&&scope.default)){_context0.n=6;break}return _context0.a(2,scope.default);case 6:return _context0.a(2,scope)}},_callee0,null,[[1,3]])}));function loadFile(_x24,_x25,_x26,_x27){return _loadFile.apply(this,arguments)}return loadFile}();/**
240
198
  * Extends given configuration object with all plugin specific ones and returns
241
199
  * a topological sorted list of plugins with plugins specific meta information
242
200
  * stored.
243
201
  * @param configuration - Configuration object to extend and use.
244
202
  * @returns A topological sorted list of plugins objects.
245
- */var loadAll=/*#__PURE__*/function(){var _loadAll=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0(configuration){var _configuration$core$p;var plugins,_i5,_Object$entries4,_Object$entries4$_i,name,plugin,_combinePluginConfigu2,internalName,pluginConfiguration,hasPluginConfiguration,_i6,_Object$values,directory,_directory$nameRegula,compiledRegularExpression,_iterator10,_step10,pluginName,currentPluginPath,_internalName,temporaryPlugins,_i7,_Object$values2,_plugin,_iterator11,_step11,_name2,sortedPlugins,_iterator12,_step12,_pluginName,_i8,_Object$entries5,_Object$entries5$_i,_name3,_plugin2,_t25,_t26,_t27,_t28,_t29;return _regenerator().w(function(_context0){while(1)switch(_context0.p=_context0.n){case 0:plugins={};for(_i5=0,_Object$entries4=Object.entries(PLUGIN_LOADER);_i5<_Object$entries4.length;_i5++){_Object$entries4$_i=_slicedToArray(_Object$entries4[_i5],2),name=_Object$entries4$_i[0],plugin=_Object$entries4$_i[1];_combinePluginConfigu2=combinePluginConfigurations(plugin.name||name,[].concat(plugin.configurations||[])),internalName=_combinePluginConfigu2.name,pluginConfiguration=_combinePluginConfigu2.configuration;hasPluginConfiguration=Object.prototype.hasOwnProperty.call(pluginConfiguration,internalName);plugins[name]={api:createNativeAPIFactory(plugins,name),apiFileLoadTimestamps:[],apiFilePaths:[],configuration:pluginConfiguration,configurationFilePaths:[],configurationFileLoadTimestamps:[],dependencies:hasPluginConfiguration&&pluginConfiguration[internalName].dependencies?pluginConfiguration[internalName].dependencies:[],internalName:internalName,name:name,packageConfiguration:hasPluginConfiguration?pluginConfiguration[internalName].package:{},path:"",scope:plugin.scope||{}}}/*
203
+ */var loadAll=/*#__PURE__*/function(){var _loadAll=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1(configuration){var _configuration$core$p;var plugins,_i5,_Object$entries4,_Object$entries4$_i,name,plugin,pluginConfigurations,_combinePluginConfigu2,internalName,pluginConfiguration,hasPluginConfiguration,_i6,_Object$values,directory,_directory$nameRegula,compiledRegularExpression,_iterator11,_step11,pluginName,currentPluginPath,_internalName,temporaryPlugins,_i7,_Object$values2,_plugin,_iterator12,_step12,_name2,sortedPlugins,_iterator13,_step13,_pluginName,_i8,_Object$entries5,_Object$entries5$_i,_name3,_plugin2,_t26,_t27,_t28,_t29,_t30;return _regenerator().w(function(_context1){while(1)switch(_context1.p=_context1.n){case 0:plugins={};for(_i5=0,_Object$entries4=Object.entries(PLUGIN_LOADER);_i5<_Object$entries4.length;_i5++){_Object$entries4$_i=_slicedToArray(_Object$entries4[_i5],2),name=_Object$entries4$_i[0],plugin=_Object$entries4$_i[1];pluginConfigurations=[].concat(plugin.configurations||[]);_combinePluginConfigu2=combinePluginConfigurations(plugin.name||name,pluginConfigurations),internalName=_combinePluginConfigu2.name,pluginConfiguration=_combinePluginConfigu2.configuration;hasPluginConfiguration=Object.prototype.hasOwnProperty.call(pluginConfiguration,internalName);plugins[name]={api:createNativeAPIFactory(plugins,name),apiFileLoadTimestamps:plugins[name].scope?[0]:[],apiFilePaths:plugins[name].scope?[""]:[],configuration:pluginConfiguration,configurationFilePaths:pluginConfigurations.map(function(){return""}),configurationFileLoadTimestamps:pluginConfigurations.map(function(){return 0}),dependencies:hasPluginConfiguration&&pluginConfiguration[internalName].dependencies?pluginConfiguration[internalName].dependencies:[],internalName:internalName,name:name,packageConfiguration:hasPluginConfiguration?pluginConfiguration[internalName].package:{},path:"",scope:plugin.scope||{}}}/*
246
204
  Load main plugin configuration at first.
247
205
 
248
206
  NOTE: If application's main is this itself avoid loading it twice.
249
- */if(!(configuration.name!=="web-node")){_context0.n=3;break}if(!Object.prototype.hasOwnProperty.call(plugins,configuration.name)){_context0.n=1;break}plugins[configuration.name].path=configuration.core.context.path;_context0.n=3;break;case 1:_context0.n=2;return load(configuration.name,determineInternalName(configuration.name,new RegExp((_configuration$core$p=configuration.core.plugin.directories.external.nameRegularExpressionPattern)!==null&&_configuration$core$p!==void 0?_configuration$core$p:configuration.core.plugin.nameRegularExpressionPattern)),plugins,configuration.core.plugin.configuration,configuration.core.context.path,configuration.core.encoding);case 2:plugins[configuration.name]=_context0.v;case 3:_i6=0,_Object$values=Object.values(configuration.core.plugin.directories);case 4:if(!(_i6<_Object$values.length)){_context0.n=17;break}directory=_Object$values[_i6];_context0.n=5;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isDirectory)(directory.path);case 5:if(!_context0.v){_context0.n=16;break}compiledRegularExpression=new RegExp((_directory$nameRegula=directory.nameRegularExpressionPattern)!==null&&_directory$nameRegula!==void 0?_directory$nameRegula:configuration.core.plugin.nameRegularExpressionPattern);_t25=_createForOfIteratorHelper;_context0.n=6;return (0,fs_promises__WEBPACK_IMPORTED_MODULE_4__.readdir)(directory.path);case 6:_iterator10=_t25(_context0.v);_context0.p=7;_iterator10.s();case 8:if((_step10=_iterator10.n()).done){_context0.n=13;break}pluginName=_step10.value;if(compiledRegularExpression.test(pluginName)){_context0.n=9;break}return _context0.a(3,12);case 9:currentPluginPath=(0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(directory.path,pluginName);if(!Object.prototype.hasOwnProperty.call(plugins,pluginName)){_context0.n=10;break}plugins[pluginName].path=currentPluginPath;return _context0.a(3,12);case 10:_internalName=determineInternalName(pluginName,compiledRegularExpression);_context0.n=11;return load(pluginName,_internalName,plugins,configuration.core.plugin.configuration,currentPluginPath,configuration.core.encoding);case 11:plugins[pluginName]=_context0.v;case 12:_context0.n=8;break;case 13:_context0.n=15;break;case 14:_context0.p=14;_t26=_context0.v;_iterator10.e(_t26);case 15:_context0.p=15;_iterator10.f();return _context0.f(15);case 16:_i6++;_context0.n=4;break;case 17:temporaryPlugins={};for(_i7=0,_Object$values2=Object.values(plugins);_i7<_Object$values2.length;_i7++){_plugin=_Object$values2[_i7];temporaryPlugins[_plugin.internalName]=_plugin.dependencies;if(Object.prototype.hasOwnProperty.call(configuration.core.interDependencies,_plugin.internalName)){_iterator11=_createForOfIteratorHelper([].concat(configuration.core.interDependencies[_plugin.internalName]));try{for(_iterator11.s();!(_step11=_iterator11.n()).done;){_name2=_step11.value;if(!temporaryPlugins[_plugin.internalName].includes(_name2))temporaryPlugins[_plugin.internalName].push(_name2)}}catch(err){_iterator11.e(err)}finally{_iterator11.f()}}}sortedPlugins=[];_iterator12=_createForOfIteratorHelper((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.sortTopological)(temporaryPlugins));_context0.p=18;_iterator12.s();case 19:if((_step12=_iterator12.n()).done){_context0.n=23;break}_pluginName=_step12.value;_i8=0,_Object$entries5=Object.entries(plugins);case 20:if(!(_i8<_Object$entries5.length)){_context0.n=22;break}_Object$entries5$_i=_slicedToArray(_Object$entries5[_i8],2),_name3=_Object$entries5$_i[0],_plugin2=_Object$entries5$_i[1];if(![_plugin2.internalName,_name3].includes(_pluginName)){_context0.n=21;break}sortedPlugins.push(_plugin2);return _context0.a(3,22);case 21:_i8++;_context0.n=20;break;case 22:_context0.n=19;break;case 23:_context0.n=25;break;case 24:_context0.p=24;_t27=_context0.v;_iterator12.e(_t27);case 25:_context0.p=25;_iterator12.f();return _context0.f(25);case 26:_context0.n=27;return loadConfigurations(sortedPlugins,configuration);case 27:_t28=_context0.v;_t29=sortedPlugins;return _context0.a(2,{configuration:_t28,plugins:_t29})}},_callee0,null,[[18,24,25,26],[7,14,15,16]])}));function loadAll(_x26){return _loadAll.apply(this,arguments)}return loadAll}();/**
207
+ */if(!(configuration.name!=="web-node")){_context1.n=4;break}if(!Object.prototype.hasOwnProperty.call(plugins,configuration.name)){_context1.n=2;break}plugins[configuration.name].path=configuration.core.context.path;_context1.n=1;return gatherConfigurationFilePaths(configuration.core.context.path,configuration.core.plugin.configuration.fileNames);case 1:plugins[configuration.name].configurationFilePaths=_context1.v;_context1.n=4;break;case 2:_context1.n=3;return load(configuration.name,determineInternalName(configuration.name,new RegExp((_configuration$core$p=configuration.core.plugin.directories.external.nameRegularExpressionPattern)!==null&&_configuration$core$p!==void 0?_configuration$core$p:configuration.core.plugin.nameRegularExpressionPattern)),plugins,configuration.core.plugin.configuration,configuration.core.context.path,configuration.core.encoding);case 3:plugins[configuration.name]=_context1.v;case 4:_i6=0,_Object$values=Object.values(configuration.core.plugin.directories);case 5:if(!(_i6<_Object$values.length)){_context1.n=19;break}directory=_Object$values[_i6];_context1.n=6;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isDirectory)(directory.path);case 6:if(!_context1.v){_context1.n=18;break}compiledRegularExpression=new RegExp((_directory$nameRegula=directory.nameRegularExpressionPattern)!==null&&_directory$nameRegula!==void 0?_directory$nameRegula:configuration.core.plugin.nameRegularExpressionPattern);_t26=_createForOfIteratorHelper;_context1.n=7;return (0,fs_promises__WEBPACK_IMPORTED_MODULE_4__.readdir)(directory.path);case 7:_iterator11=_t26(_context1.v);_context1.p=8;_iterator11.s();case 9:if((_step11=_iterator11.n()).done){_context1.n=15;break}pluginName=_step11.value;if(compiledRegularExpression.test(pluginName)){_context1.n=10;break}return _context1.a(3,14);case 10:currentPluginPath=(0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(directory.path,pluginName);if(!Object.prototype.hasOwnProperty.call(plugins,pluginName)){_context1.n=12;break}plugins[pluginName].path=currentPluginPath;_context1.n=11;return gatherConfigurationFilePaths(currentPluginPath,configuration.core.plugin.configuration.fileNames);case 11:plugins[pluginName].configurationFilePaths=_context1.v;return _context1.a(3,14);case 12:_internalName=determineInternalName(pluginName,compiledRegularExpression);_context1.n=13;return load(pluginName,_internalName,plugins,configuration.core.plugin.configuration,currentPluginPath,configuration.core.encoding);case 13:plugins[pluginName]=_context1.v;case 14:_context1.n=9;break;case 15:_context1.n=17;break;case 16:_context1.p=16;_t27=_context1.v;_iterator11.e(_t27);case 17:_context1.p=17;_iterator11.f();return _context1.f(17);case 18:_i6++;_context1.n=5;break;case 19:temporaryPlugins={};for(_i7=0,_Object$values2=Object.values(plugins);_i7<_Object$values2.length;_i7++){_plugin=_Object$values2[_i7];temporaryPlugins[_plugin.internalName]=_plugin.dependencies;if(Object.prototype.hasOwnProperty.call(configuration.core.interDependencies,_plugin.internalName)){_iterator12=_createForOfIteratorHelper([].concat(configuration.core.interDependencies[_plugin.internalName]));try{for(_iterator12.s();!(_step12=_iterator12.n()).done;){_name2=_step12.value;if(!temporaryPlugins[_plugin.internalName].includes(_name2))temporaryPlugins[_plugin.internalName].push(_name2)}}catch(err){_iterator12.e(err)}finally{_iterator12.f()}}}sortedPlugins=[];_iterator13=_createForOfIteratorHelper((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.sortTopological)(temporaryPlugins));_context1.p=20;_iterator13.s();case 21:if((_step13=_iterator13.n()).done){_context1.n=25;break}_pluginName=_step13.value;_i8=0,_Object$entries5=Object.entries(plugins);case 22:if(!(_i8<_Object$entries5.length)){_context1.n=24;break}_Object$entries5$_i=_slicedToArray(_Object$entries5[_i8],2),_name3=_Object$entries5$_i[0],_plugin2=_Object$entries5$_i[1];if(![_plugin2.internalName,_name3].includes(_pluginName)){_context1.n=23;break}sortedPlugins.push(_plugin2);return _context1.a(3,24);case 23:_i8++;_context1.n=22;break;case 24:_context1.n=21;break;case 25:_context1.n=27;break;case 26:_context1.p=26;_t28=_context1.v;_iterator13.e(_t28);case 27:_context1.p=27;_iterator13.f();return _context1.f(27);case 28:_context1.n=29;return loadConfigurations(sortedPlugins,configuration);case 29:_t29=_context1.v;_t30=sortedPlugins;return _context1.a(2,{configuration:_t29,plugins:_t30})}},_callee1,null,[[20,26,27,28],[8,16,17,18]])}));function loadAll(_x28){return _loadAll.apply(this,arguments)}return loadAll}();/**
250
208
  * Transform a list of absolute paths respecting the application context.
251
209
  * @param configuration - Configuration object.
252
210
  * @param configuration.core - Sub configuration web-node.
@@ -262,7 +220,7 @@ api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=argume
262
220
  * @param locations - Locations to search in.
263
221
  * @returns A boolean indicating whether given file path is in provided
264
222
  * locations.
265
- */var isInLocations=function isInLocations(configuration,plugins,filePath,locations){var pluginPaths=plugins.map(function(plugin){return plugin.path});var _iterator13=_createForOfIteratorHelper([].concat(locations)),_step13;try{for(_iterator13.s();!(_step13=_iterator13.n()).done;){var location=_step13.value;if(location.startsWith("/")){if(filePath.startsWith((0,path__WEBPACK_IMPORTED_MODULE_5__.join)(configuration.core.context.path,location)))return true}else{var _iterator14=_createForOfIteratorHelper(pluginPaths),_step14;try{for(_iterator14.s();!(_step14=_iterator14.n()).done;){var pluginPath=_step14.value;if(filePath.startsWith((0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(pluginPath,location)))return true}}catch(err){_iterator14.e(err)}finally{_iterator14.f()}}}}catch(err){_iterator13.e(err)}finally{_iterator13.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);
223
+ */var isInLocations=function isInLocations(configuration,plugins,filePath,locations){var pluginPaths=plugins.map(function(plugin){return plugin.path});var _iterator14=_createForOfIteratorHelper([].concat(locations)),_step14;try{for(_iterator14.s();!(_step14=_iterator14.n()).done;){var location=_step14.value;if(location.startsWith("/")){if(filePath.startsWith((0,path__WEBPACK_IMPORTED_MODULE_5__.join)(configuration.core.context.path,location)))return true}else{var _iterator15=_createForOfIteratorHelper(pluginPaths),_step15;try{for(_iterator15.s();!(_step15=_iterator15.n()).done;){var pluginPath=_step15.value;if(filePath.startsWith((0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(pluginPath,location)))return true}}catch(err){_iterator15.e(err)}finally{_iterator15.f()}}}}catch(err){_iterator14.e(err)}finally{_iterator14.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);
266
224
  __webpack_async_result__();
267
225
  } catch(e) { __webpack_async_result__(e); } }, 1);
268
226
 
@@ -308,7 +266,7 @@ _pluginAPI_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_async_dependencies_result
308
266
  See https://creativecommons.org/licenses/by/3.0/deed.de
309
267
  endregion
310
268
  */// region imports
311
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _mainPackageConfigura;function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]}},e:function e(r){throw r},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function s(){t=t.call(r)},n:function n(){var r=t.next();return a=r.done,r},e:function e(r){u=!0,o=r},f:function f(){try{a||null==t.return||t.return()}finally{if(u)throw o}}}}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)};// endregion
269
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _mainPackageConfigura,_mainPackageConfigura2;function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]}},e:function e(r){throw r},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function s(){t=t.call(r)},n:function n(){var r=t.next();return a=r.done,r},e:function e(r){u=!0,o=r},f:function f(){try{a||null==t.return||t.return()}finally{if(u)throw o}}}}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)};// endregion
312
270
  /*
313
271
  To assume to go two folder up from this file until there is no
314
272
  "node_modules" parent folder is usually resilient again dealing with
@@ -322,7 +280,7 @@ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof
322
280
  linked "node_modules" folder using current working directory as context
323
281
  is a better assumption than two folders up the hierarchy.
324
282
  */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.
325
- }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
283
+ }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.json"),{with:{type:"json"}})).default}catch(_unused2){_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.context.path=process.cwd()}var configName=mainPackageConfiguration.webNodeInternalName;var name=configName&&((_mainPackageConfigura=mainPackageConfiguration.webNode)===null||_mainPackageConfigura===void 0||(_mainPackageConfigura=_mainPackageConfigura[configName])===null||_mainPackageConfigura===void 0?void 0:_mainPackageConfigura.name)||configName||((_mainPackageConfigura2=mainPackageConfiguration.webDocumentation)===null||_mainPackageConfigura2===void 0?void 0:_mainPackageConfigura2.name)||mainPackageConfiguration.name||"main";var applicationConfiguration=mainPackageConfiguration.webNode||_defineProperty({},name,{name:name,package:mainPackageConfiguration});// endregion
326
284
  _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,/*
327
285
  NOTE: "object.modifyObject" removes modifications in "result"
328
286
  in-place before it is used as extending source.
@@ -424,7 +382,7 @@ __webpack_async_result__();
424
382
  /* 7 */
425
383
  /***/ ((module) => {
426
384
 
427
- module.exports = /*#__PURE__*/JSON.parse('{"name":"web-node","version":"1.0.613","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":"main.js","exports":{".":"./index.js","./main":"./main.js","./main.js":"./main.js","./package.json":"./package.json","./unixCrypt":"./unixCrypt.js","./unixCrypt.js":"./unixCrypt.js","./type":"./type.d.ts"},"files":["configurator.d.ts","index.d.ts","index.js","main.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":"./main.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.1512","eslint":"^10.10.0","eslint-config-google":"^0.14.0","eslint-plugin-jsdoc":"^64.3.6","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.78"},"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"]},"nameRegularExpressionPattern":"^([a-zA-Z0-9-]+?)-?[wW]eb-?[nN]ode-?[pP]lugin$","directories":{"external":{"path":{"__evaluate__":"`${currentPath}/node_modules/`"}},"internal":{"nameRegularExpressionPattern":"^([a-zA-Z0-9-_].*)$","path":{"__evaluate__":"`${currentPath}/plugins/`"}}},"hotReloading":false}}},"webOptimizer":{"assetPattern":{"javaScript":{"includeFilePathRegularExpression":"^(.+/)?main\\\\.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\', main: \'./main.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"}');
385
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"web-node","version":"1.0.615","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":"main.js","exports":{".":"./index.js","./main":"./main.js","./main.js":"./main.js","./package.json":"./package.json","./unixCrypt":"./unixCrypt.js","./unixCrypt.js":"./unixCrypt.js","./type":"./type.d.ts"},"files":["configurator.d.ts","index.d.ts","index.js","main.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":"./main.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.1512","eslint":"^10.10.0","eslint-config-google":"^0.14.0","eslint-plugin-jsdoc":"^64.3.6","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.78"},"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"]},"nameRegularExpressionPattern":"^([a-zA-Z0-9-]+?)-?[wW]eb-?[nN]ode-?[pP]lugin$","directories":{"external":{"path":{"__evaluate__":"`${currentPath}/node_modules/`"}},"internal":{"nameRegularExpressionPattern":"^([a-zA-Z0-9-_].*)$","path":{"__evaluate__":"`${currentPath}/plugins/`"}}},"hotReloading":false}}},"webOptimizer":{"assetPattern":{"javaScript":{"includeFilePathRegularExpression":"^(.+/)?main\\\\.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\', main: \'./main.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"}');
428
386
 
429
387
  /***/ }),
430
388
  /* 8 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-node",
3
- "version": "1.0.613",
3
+ "version": "1.0.615",
4
4
  "description": "High level javaScript backend plugin system and configuration merger.",
5
5
  "keywords": [
6
6
  "api",
package/pluginAPI.d.ts CHANGED
@@ -126,6 +126,14 @@ export declare const loadConfiguration: (name: string, packageConfiguration: Pac
126
126
  * @returns Updated given configuration object.
127
127
  */
128
128
  export declare const loadConfigurations: (plugins: Array<Plugin>, configuration: Configuration) => Promise<Configuration>;
129
+ /**
130
+ * Gathers all existing configuration file paths for given plugin path and
131
+ * file names.
132
+ * @param pluginPath - Path to the plugin directory.
133
+ * @param fileNames - List of configuration file names to check.
134
+ * @returns A list of existing configuration file paths.
135
+ */
136
+ export declare const gatherConfigurationFilePaths: (pluginPath: string, fileNames: Array<string>) => Promise<string[]>;
129
137
  /**
130
138
  * Load given api file path and returns exported scope.
131
139
  * @param filePath - Path to file to load.