web-node 1.0.508 → 1.0.510

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.
@@ -0,0 +1,37 @@
1
+ import { Configuration, PluginHandler, PluginPromises, ServicePromisesState, Services } from '../type';
2
+ /**
3
+ * Dummy plugin implementing a test hook.
4
+ */
5
+ export default class Dummy implements PluginHandler {
6
+ /**
7
+ * Loads dummy service.
8
+ * @param state - Application state.
9
+ * @param state.services - Plugin services.
10
+ * @returns A mapping to promises which correspond to the plugin specific
11
+ * continues services.
12
+ */
13
+ static loadService(this: void, { services }: ServicePromisesState): Promise<PluginPromises>;
14
+ /**
15
+ * Asynchronous mock test method.
16
+ * @param state - Application state.
17
+ * @param state.services - Plugin services.
18
+ * @param state.services.dummy - Plugin service.
19
+ * @returns A promise resolving to nothing.
20
+ */
21
+ static test(this: void, { services: { dummy } }: ServicePromisesState<undefined, Configuration, Services<{
22
+ dummy: {
23
+ hookCalled: boolean;
24
+ };
25
+ }>>): Promise<void>;
26
+ /**
27
+ * Synchronous mock test method.
28
+ * @param state - Application state.
29
+ * @param state.services - Plugin services.
30
+ * @param state.services.dummy - Plugin service.
31
+ */
32
+ static testSynchronous(this: void, { services: { dummy } }: ServicePromisesState<undefined, Configuration, Services<{
33
+ dummy: {
34
+ synchronousHookCalled: boolean;
35
+ };
36
+ }>>): void;
37
+ }
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}module===eval("require.main")&&module.paths.unshift("/application/node_modules"),(()=>{var __webpack_modules__=[(e,_,r)=>{r.d(_,{H:()=>O,A:()=>v});var t=r(6),n=r.n(t),a=r(7),o=r.n(a),i=r(8),l=r.n(i),u=r(1);const c=JSON.parse('{"name":"web-node","version":"1.0.508","description":"High level javaScript backend plugin system and configuration merger.","keywords":["web","backend","api","plugin","management"],"homepage":"https://torben.website/web-node","bugs":{"email":"info@torben.website","url":"https://github.com/thaibault/web-node/issues"},"license":"CC-BY-3.0","author":{"name":"Torben Sickert","email":"info@torben.website","url":"https://torben.website"},"files":["configurator.d.ts","index.d.ts","index.js","pluginAPI.d.ts","type.d.ts","unixCrypt.d.ts","unixCrypt.js"],"bin":{"web-node":"index.js"},"repository":{"type":"git","url":"https://github.com/thaibault/web-node.git"},"scripts":{"build":"yarn build:types; yarn build:plain","build:plain":"weboptimizer build","build:types":"weboptimizer build:types","check":"yarn check:types; yarn lint","check:types":"weboptimizer check:types","clear":"weboptimizer clear","document":"weboptimizer document","lint":"weboptimizer lint","postversion":"yarn publish --non-interactive; git push --tags && git push","prepare":"yarn build","serve":"yarn build:plain && yarn start","start":"./index.js \'{plugin: {hotReloading: true}}\'","prepare:test":"yarn clear && cd dummyPlugin && yarn build && cd ..","test":"yarn prepare:test && weboptimizer test","test:coverage":"yarn prepare:test && weboptimizer test:coverage","test:coverage:report":"yarn prepare:test && weboptimizer test:coverage:report","update":"yarn version --patch","update:documentation":"documentation-website","watch":"weboptimizer build --watch"},"runkitExample":"require(\'@babel/runtime/package.json\')\\nrequire(\'clientnode/package.json\')\\n\\nconst {PluginAPI} = require(\'web-node\')\\n\\nPluginAPI.loadFile(\'./unixCrypt.js\', \'crypt\')(\'test\')","devDependencies":{"@babel/cli":"*","@babel/eslint-parser":"*","@types/node":"*","@typescript-eslint/eslint-plugin":"*","@typescript-eslint/parser":"*","clientnode":"*","documentation-website":"*","eslint":"*","eslint-config-google":"*","eslint-plugin-jsdoc":"*","jest":"*","jsdoc":"*","weboptimizer":"*"},"peerDependencies":{"@babel/runtime":"*","clientnode":"*"},"peerDependenciesMeta":{"@babel/runtime":{"optional":true}},"engines":{"node":">=18","npm":">=9"},"resolutions":{"colors":"1.4.0"},"sideEffects":true,"documentationWebsite":{"name":"web-node","trackingCode":"UA-40192634-9"},"webNode":{"core":{"context":{"path":"./","type":"relative"},"debug":false,"encoding":"utf8","interDependencies":{},"name":"web-node","plugin":{"configuration":{"fileNames":["package.json","private-package.json"],"propertyNames":["webNode","webnode","web-node"]},"directories":{"external":{"nameRegularExpressionPattern":"^([a-zA-Z0-9-]+?)-?[wW]eb-?[nN]ode-?[pP]lugin$","path":{"__evaluate__":"`${currentPath}/node_modules/`"}},"internal":{"nameRegularExpressionPattern":"^([a-zA-Z0-9-_].*)$","path":{"__evaluate__":"`${currentPath}/plugins/`"}}},"hotReloading":false}}},"webOptimizer":{"assetPattern":{"javaScript":{"includeFilePathRegularExpression":"^(.+/)?index\\\\.js$","pattern":{"#":"This is how we can make our main exported artefact executable.","__evaluate__":"`#!/usr/bin/env node\\n// -*- coding: utf-8 -*-\\n${self.generic.assetPattern.javaScript.pattern}if(module===eval(\'require.main\'))module.paths.unshift(\'/application/node_modules\');{1}`"}}},"exportFormat":{"external":"commonjs2","self":"commonjs2"},"injection":{"entry":{"__evaluate__":"2 < self.givenCommandLineArguments.length && self.givenCommandLineArguments[2].startsWith(\'test\') ? {testBundle: \'test\'} : {index: \'./index.ts\', unixCrypt: \'./unixCrypt.ts\'}"}},"module":{"optimizer":{"babelMinify":{"#":"To provide a logging output we need to exclude this feature.","__evaluate__":"self.debug ? {bundle: null, module: null} : {bundle: {transform: {removeConsole: false}}, module: {removeConsole: false}}"}}},"targetTechnology":{"boilerplate":"node","payload":"node"}}}');var s,p;function d(e,_){(null==_||_>e.length)&&(_=e.length);for(var r=0,t=Array(_);r<_;r++)t[r]=e[r];return t}for(c.webNode.core.context={path:"/",type:"relative"};c.webNode.core.context.path=(0,i.resolve)(c.webNode.core.context.path,"../../"),"node_modules"===(0,i.basename)((0,i.dirname)(c.webNode.core.context.path)););if("/"===c.webNode.core.context.path||"node_modules"===(0,i.basename)((0,i.dirname)(process.cwd()))||".staging"===(0,i.basename)((0,i.dirname)(process.cwd()))&&"node_modules"===(0,i.basename)((0,i.dirname)((0,i.dirname)(process.cwd()))))c.webNode.core.context.path=process.cwd();else try{(0,a.lstatSync)((0,i.join)(process.cwd(),"node_modules")).isSymbolicLink()&&(c.webNode.core.context.path=process.cwd())}catch(e){}var E={name:"main"};try{E=(0,t.currentRequire)((0,i.join)(c.webNode.core.context.path,"package"))}catch(e){c.webNode.core.context.path=process.cwd()}var f=(null==(s=E.documentationWebsite)?void 0:s.name)||E.name||"main",b=E.webNode||((p={})[f]={name:f,package:E},p);c.webNode.core.name=c.documentationWebsite.name;var m=new Date,P={currentPath:process.cwd(),fileSystem:o(),path:l(),PluginAPI:u.Ay,require:t.currentRequire,Tools:n(),webNodePath:"/",now:m,nowUTCTimestamp:n().numberGetUTCTimestamp(m)},O=n().evaluateDynamicData(c.webNode,P);delete c.webNode,n().extend(!0,n().modifyObject(O,b),b);for(var g,D={},h=function(e,_){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,_){if(e){if("string"==typeof e)return d(e,_);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,_):void 0}}(e))||_&&e&&"number"==typeof e.length){r&&(e=r);var t=0;return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(process.argv.slice(1));!(g=h()).done;){var M=g.value,A=n().stringParseEncodedObject(M,O,"configuration");n().isPlainObject(A)&&n().extend(!0,D,A)}0<Object.keys(D).length&&(n().extend(!0,n().modifyObject(O,D),D),O.core.runtimeConfiguration=D),(O=n().evaluateDynamicData(n().removeKeysInEvaluation(O),P)).name=f,O.core.package=c;const v=O},(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{var __dirname="/";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,Qq:()=>PluginAPI,lE:()=>currentRequire});var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3),_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__),_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__),_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(5),_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__),child_process__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(9),child_process__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(child_process__WEBPACK_IMPORTED_MODULE_3__),clientnode__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(6),clientnode__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(clientnode__WEBPACK_IMPORTED_MODULE_4__),fs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(7),fs__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_5__),module__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(10),module__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(module__WEBPACK_IMPORTED_MODULE_6__),path__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(8),path__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_7__),_configurator__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(0);function _createForOfIteratorHelperLoose(e,_){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||_&&e&&"number"==typeof e.length){r&&(e=r);var t=0;return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,_){if(e){if("string"==typeof e)return _arrayLikeToArray(e,_);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,_):void 0}}function _arrayLikeToArray(e,_){(null==_||_>e.length)&&(_=e.length);for(var r=0,t=Array(_);r<_;r++)t[r]=e[r];return t}var currentRequire=eval("require"),oldResolveFilename=module__WEBPACK_IMPORTED_MODULE_6__.Module._resolveFilename;module__WEBPACK_IMPORTED_MODULE_6__.Module._resolveFilename=function(e,_,r){return oldResolveFilename("web-node"===e?currentRequire.main.id:e,_,r)};var PluginAPI=function(){function e(){}return e.callStack=function(){var _=_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().mark((function _(r){var t,n,a,o,i,l,u,c,s,p,d,E,f,b,m,P,O,g=arguments;return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().wrap((function(_){for(;;)switch(_.prev=_.next){case 0:if(t=_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({},r,{pluginAPI:e}),n=t.configuration,a=t.hook,o=t.plugins,i=a.endsWith("ConfigurationLoaded")||a.endsWith("ConfigurationHotLoaded"),!n.core.plugin.hotReloading){_.next=20;break}if(i){_.next=14;break}if(!(l=e.hotReloadConfigurationFile(o,n.core.plugin.configuration.propertyNames)).length){_.next=14;break}return n.core.debug&&console.info('Configuration for "'+l.map((function(e){return e.name})).join('", "')+'" has been changed: reloading initialized.'),u=_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({},t,{triggerHook:t.hook,pluginsWithChangedConfiguration:l}),_.next=11,e.callStack(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({},u,{hook:"preConfigurationHotLoaded"}));case 11:return e.loadConfigurations(o,n),_.next=14,e.callStack(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({},u,{hook:"postConfigurationHotLoaded"}));case 14:if("apiFileReloaded"===a){_.next=20;break}if(!(c=e.hotReloadAPIFile(o)).length){_.next=20;break}return n.core.debug&&console.info('API-file for "'+c.map((function(e){return e.name})).join('", "')+'" has been changed: reloading initialized.'),_.next=20,e.callStack(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({},t,{hook:"apiFileReloaded",pluginsWithChangedAPIFiles:c,triggerHook:t.hook}));case 20:for(s=r.data,p=g.length,d=Array(1<p?p-1:0),E=1;E<p;E++)d[E-1]=g[E];f=_createForOfIteratorHelperLoose(o);case 23:if((b=f()).done){_.next=42;break}if(!(m=b.value).api){_.next=40;break}return P=void 0,_.prev=27,_.next=30,m.api.apply(m,[t].concat(d));case 30:P=_.sent,_.next=38;break;case 33:if(_.prev=33,_.t0=_.catch(27),null==(O=_.t0.message)||!O.startsWith("NotImplemented:")){_.next=37;break}return _.abrupt("continue",40);case 37:throw new Error('Plugin "'+m.internalName+'" '+(m.internalName===m.name?"":"("+m.name+") ")+"throws: "+clientnode__WEBPACK_IMPORTED_MODULE_4___default().represent(_.t0)+' during asynchronous hook "'+a+'".');case 38:s=P,n.core.debug&&console.info('Ran asynchronous hook "'+a+'" for plugin "'+m.name+'".');case 40:_.next=23;break;case 42:return _.abrupt("return",s);case 43:case"end":return _.stop()}}),_,null,[[27,33]])})));return function(){return _.apply(this,arguments)}}(),e.callStackSynchronous=function(_){for(var r=_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({},_,{pluginAPI:e}),t=r.configuration,n=r.hook,a=r.plugins,o=_.data,i=arguments.length,l=Array(1<i?i-1:0),u=1;u<i;u++)l[u-1]=arguments[u];for(var c,s,p=_createForOfIteratorHelperLoose(a);!(c=p()).done;)if((s=c.value).api){var d=void 0;try{d=s.api.apply(s,[r].concat(l))}catch(e){var E;if(null!=(E=e.message)&&E.startsWith("NotImplemented:"))continue;throw new Error('Plugin "'+s.internalName+'" '+(s.internalName===s.name?"":"("+s.name+") ")+"throws: "+clientnode__WEBPACK_IMPORTED_MODULE_4___default().represent(e)+' during synchronous hook "'+n+'".')}o=d,t.core.debug&&console.info('Ran synchronous hook "'+n+'" for plugin "'+s.name+'".')}return o},e.determineInternalName=function(e,_){return clientnode__WEBPACK_IMPORTED_MODULE_4___default().stringDelimitedToCamelCase(e.replace(_,(function(e,_){return"string"==typeof _?_:e})))},e.evaluateConfiguration=function(_){for(var r={},t=0,n=Object.entries(_);t<n.length;t++){var a=n[t],o=a[0],i=a[1];i.package&&(r[o]=i.package,delete i.package)}var l=new Date;_=clientnode__WEBPACK_IMPORTED_MODULE_4___default().evaluateDynamicData(clientnode__WEBPACK_IMPORTED_MODULE_4___default().removeKeysInEvaluation(_),{currentPath:process.cwd(),fileSystem:fs__WEBPACK_IMPORTED_MODULE_5___default(),path:path__WEBPACK_IMPORTED_MODULE_7___default(),PluginAPI:e,require:currentRequire,Tools:clientnode__WEBPACK_IMPORTED_MODULE_4___default(),webNodePath:__dirname,now:l,nowUTCTimestamp:clientnode__WEBPACK_IMPORTED_MODULE_4___default().numberGetUTCTimestamp(l)});for(var u=0,c=Object.entries(r);u<c.length;u++){var s=c[u],p=s[0],d=s[1];_[p].package=d}return _},e.hotReloadAPIFile=function(_){for(var r,t,n=[],a=_createForOfIteratorHelperLoose(e.hotReloadFiles("api","scope",_));!(r=a()).done;)if((t=r.value).oldScope){for(var o=0,i=Object.entries(t.oldScope);o<i.length;o++){var l=i[o],u=l[0],c=l[1];Object.prototype.hasOwnProperty.call(t.newScope,u)&&!clientnode__WEBPACK_IMPORTED_MODULE_4___default().isFunction(t.newScope[u])&&(t.newScope[u]=c)}n.push(t.plugin)}return n},e.hotReloadConfigurationFile=function(_,r){for(var t,n,a=[],o=_createForOfIteratorHelperLoose(e.hotReloadFiles("configuration","packageConfiguration",_));!(t=o()).done;)(n=t.value).plugin.configuration=e.loadConfiguration(n.plugin.internalName,n.plugin.packageConfiguration,r),a.push(n.plugin);return a},e.hotReloadFiles=function(_,r,t){for(var n,a,o=[],i=_createForOfIteratorHelperLoose(t);!(n=i()).done;)if((a=n.value)[r])for(var l,u=0,c=_createForOfIteratorHelperLoose(a[_+"FilePaths"]);!(l=c()).done;){var s=l.value,p=(0,fs__WEBPACK_IMPORTED_MODULE_5__.statSync)(s).mtime.getTime();if(a[_+"FileLoadTimestamps"][u]<p){delete currentRequire.cache[currentRequire.resolve(s)];var d=a[r];a[r]=e.loadFile(s,a.name,a[r]),o.push({newScope:a[r],oldScope:d,plugin:a,target:r})}a[_+"FileLoadTimestamps"][u]=p,u+=1}return o},e.load=function(){var _=_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().mark((function _(r,t,n,a,o,i){var l,u,c,s,p,d,E,f;return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().wrap((function(_){for(;;)switch(_.prev=_.next){case 0:void 0===i&&(i="utf8"),l=[],u={},c=_createForOfIteratorHelperLoose(a.fileNames);case 4:if((s=c()).done){_.next=14;break}return p=s.value,d=(0,path__WEBPACK_IMPORTED_MODULE_7__.resolve)(o,p),_.next=9,clientnode__WEBPACK_IMPORTED_MODULE_4___default().isFile(d);case 9:if(!_.sent){_.next=12;break}clientnode__WEBPACK_IMPORTED_MODULE_4___default().extend(!0,u,e.loadFile(d,r)),l.push(d);case 12:_.next=4;break;case 14:if(E=["index.js"],!Object.keys(u).length){_.next=22;break}return t=u.webNodeInternalName||t,(f=e.loadConfiguration(t,u,a.propertyNames))[t].package.main&&(E[0]=f[t].package.main),_.next=21,e.loadAPI(E,o,r,t,n,i,f,l);case 21:return _.abrupt("return",_.sent);case 22:return _.next=24,e.loadAPI(E,o,r,t,n,i);case 24:return _.abrupt("return",_.sent);case 25:case"end":return _.stop()}}),_)})));return function(){return _.apply(this,arguments)}}(),e.loadAPI=function(){var _=_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().mark((function _(r,t,n,a,o,i,l,u){var c,s,p,d,E,f,b,m,P,O,g;return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().wrap((function(_){for(;;)switch(_.prev=_.next){case 0:return void 0===i&&(i="utf8"),void 0===l&&(l=null),void 0===u&&(u=[]),E=(0,path__WEBPACK_IMPORTED_MODULE_7__.resolve)(t,r[0]),_.next=6,clientnode__WEBPACK_IMPORTED_MODULE_4___default().isFile(E);case 6:if(_.sent){_.next=21;break}f=_createForOfIteratorHelperLoose((0,fs__WEBPACK_IMPORTED_MODULE_5__.readdirSync)(t));case 8:if((b=f()).done){_.next=21;break}if(m=b.value,_.t0=!u.map((function(e){return(0,path__WEBPACK_IMPORTED_MODULE_7__.basename)(e)})).includes(m),!_.t0){_.next=15;break}return _.next=14,clientnode__WEBPACK_IMPORTED_MODULE_4___default().isFile((0,path__WEBPACK_IMPORTED_MODULE_7__.resolve)(t,m));case 14:_.t0=_.sent;case 15:if(!_.t0){_.next=19;break}if(E=(0,path__WEBPACK_IMPORTED_MODULE_7__.resolve)(t,E),!["index","main"].includes((0,path__WEBPACK_IMPORTED_MODULE_7__.basename)(E,(0,path__WEBPACK_IMPORTED_MODULE_7__.extname)(m)))){_.next=19;break}return _.abrupt("break",21);case 19:_.next=8;break;case 21:if(P=null,O=!1,_.t1=l&&(1<Object.keys(l).length||l[a]&&1<Object.keys(l[a]).length),!_.t1){_.next=28;break}return _.next=27,clientnode__WEBPACK_IMPORTED_MODULE_4___default().isFile(E);case 27:_.t1=_.sent;case 28:if(!_.t1){_.next=30;break}E.endsWith(".js")?(O=!0,P=function(_){for(var r,t=arguments.length,a=Array(1<t?t-1:0),i=1;i<t;i++)a[i-1]=arguments[i];if(_.hook in o[n].scope)return(r=o[n].scope)[_.hook].apply(r,[_].concat(a,[e]));throw new Error('NotImplemented: API method "'+_.hook+'" is not implemented in plugin "'+n+'".')}):P=function(e){for(var _=e.hook,r=e.data,t=arguments.length,n=Array(1<t?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];var o=(0,child_process__WEBPACK_IMPORTED_MODULE_3__.spawnSync)(E,[_].concat(n.map((function(e){return JSON.stringify(e)}))),{cwd:process.cwd(),encoding:i,env:process.env,input:JSON.stringify(r),shell:!0,stdio:"inherit"});return 404===o.status?r:o.stdout.startsWith("##!JSON!##")?JSON.parse(o.stdout.substring(10)):r};case 30:return g=null!==(c=l)&&void 0!==c?c:((s={})[a]={package:{}},s),_.abrupt("return",{api:P,apiFileLoadTimestamps:P?[(0,fs__WEBPACK_IMPORTED_MODULE_5__.statSync)(E).mtime.getTime()]:[],apiFilePaths:P?[E]:[],configuration:g,configurationFilePaths:u,configurationFileLoadTimestamps:u.map((function(e){return(0,fs__WEBPACK_IMPORTED_MODULE_5__.statSync)(e).mtime.getTime()})),dependencies:(null==(p=g[a])?void 0:p.dependencies)||[],internalName:a,name:n,packageConfiguration:null==(d=g[a])?void 0:d.package,path:t,scope:O?e.loadFile(E,n):null});case 32:case"end":return _.stop()}}),_)})));return function(){return _.apply(this,arguments)}}(),e.loadConfiguration=function(e,_,r){for(var t,n,a,o=clientnode__WEBPACK_IMPORTED_MODULE_4___default().removeKeyPrefixes(clientnode__WEBPACK_IMPORTED_MODULE_4___default().copy(_)),i=((t={})[e]={package:o},t),l=_createForOfIteratorHelperLoose(r);!(n=l()).done;)if(_[a=n.value]){clientnode__WEBPACK_IMPORTED_MODULE_4___default().extend(!0,i,_[a]),delete i[e].package[a];break}return i},e.loadConfigurations=function(_,r){for(var t=0,n=Object.keys(r);t<n.length;t++)delete r[n[t]];clientnode__WEBPACK_IMPORTED_MODULE_4___default().extend(r,clientnode__WEBPACK_IMPORTED_MODULE_4___default().copy(_configurator__WEBPACK_IMPORTED_MODULE_8__.A));for(var a,o,i=_createForOfIteratorHelperLoose(_);!(a=i()).done;)if((o=a.value).configuration){var l=clientnode__WEBPACK_IMPORTED_MODULE_4___default().copy(o.configuration);clientnode__WEBPACK_IMPORTED_MODULE_4___default().extend(!0,clientnode__WEBPACK_IMPORTED_MODULE_4___default().modifyObject(r,l),l),r.core.runtimeConfiguration&&clientnode__WEBPACK_IMPORTED_MODULE_4___default().extend(!0,r,r.core.runtimeConfiguration)}return e.evaluateConfiguration(r)},e.loadFile=function(e,_,r,t){var n,a;void 0===r&&(r=null),void 0===t&&(t=!0);try{n=currentRequire.resolve(e)}catch(e){}n&&n in currentRequire.cache&&delete currentRequire.cache[n];try{a=currentRequire(e)}catch(n){if(!r)throw new Error("Couln't load plugin file \""+e+'" for plugin "'+_+'": '+clientnode__WEBPACK_IMPORTED_MODULE_4___default().represent(n));a=r,t&&console.warn("Couln't load new api plugin file \""+e+'" for plugin "'+_+'": '+clientnode__WEBPACK_IMPORTED_MODULE_4___default().represent(n)+". Using fallback one.")}return Object.prototype.hasOwnProperty.call(a,"default")?a.default:a},e.loadAll=function(){var _=_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().mark((function _(r){var t,n,a,o,i,l,u,c,s,p,d,E,f,b,m,P,O,g,D,h,M,A,v,I,k,y;return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().wrap((function(_){for(;;)switch(_.prev=_.next){case 0:if(t={},"web-node"===r.name){_.next=5;break}return _.next=4,e.load(r.name,e.determineInternalName(r.name,new RegExp(r.core.plugin.directories.external.nameRegularExpressionPattern)),t,r.core.plugin.configuration,r.core.context.path,r.core.encoding);case 4:t[r.name]=_.sent;case 5:n=0,a=Object.values(r.core.plugin.directories);case 6:if(!(n<a.length)){_.next=27;break}return o=a[n],_.next=10,clientnode__WEBPACK_IMPORTED_MODULE_4___default().isDirectory(o.path);case 10:if(!_.sent){_.next=24;break}i=new RegExp(o.nameRegularExpressionPattern),l=_createForOfIteratorHelperLoose((0,fs__WEBPACK_IMPORTED_MODULE_5__.readdirSync)(o.path));case 13:if((u=l()).done){_.next=24;break}if(c=u.value,i.test(c)){_.next=17;break}return _.abrupt("continue",22);case 17:return s=(0,path__WEBPACK_IMPORTED_MODULE_7__.resolve)(o.path,c),p=e.determineInternalName(c,i),_.next=21,e.load(c,p,t,r.core.plugin.configuration,s,r.core.encoding);case 21:t[c]=_.sent;case 22:_.next=13;break;case 24:n++,_.next=6;break;case 27:for(d={},E=0,f=Object.values(t);E<f.length;E++)if(b=f[E],d[b.internalName]=b.dependencies,Object.prototype.hasOwnProperty.call(r.core.interDependencies,b.internalName))for(m=_createForOfIteratorHelperLoose([].concat(r.core.interDependencies[b.internalName]));!(P=m()).done;)O=P.value,d[b.internalName].includes(O)||d[b.internalName].push(O);g=[],D=_createForOfIteratorHelperLoose(clientnode__WEBPACK_IMPORTED_MODULE_4___default().arraySortTopological(d));case 31:if((h=D()).done){_.next=44;break}M=h.value,A=0,v=Object.entries(t);case 34:if(!(A<v.length)){_.next=42;break}if(I=v[A],k=I[0],![(y=I[1]).internalName,k].includes(M)){_.next=39;break}return g.push(y),_.abrupt("break",42);case 39:A++,_.next=34;break;case 42:_.next=31;break;case 44:return _.abrupt("return",{configuration:e.loadConfigurations(g,r),plugins:g});case 45:case"end":return _.stop()}}),_)})));return function(){return _.apply(this,arguments)}}(),e.determineLocations=function(e,_){var r=e.core.context.path;return void 0===_&&(_=[]),(_=[].concat(_)).length?_.map((function(e){return(0,path__WEBPACK_IMPORTED_MODULE_7__.resolve)(r,e)})):[r]},e.isInLocations=function(e,_,r,t){for(var n,a,o=_.map((function(e){return e.path})),i=_createForOfIteratorHelperLoose([].concat(t));!(n=i()).done;)if((a=n.value).startsWith("/")){if(r.startsWith((0,path__WEBPACK_IMPORTED_MODULE_7__.join)(e.core.context.path,a)))return!0}else for(var l,u,c=_createForOfIteratorHelperLoose(o);!(l=c()).done;)if(u=l.value,r.startsWith((0,path__WEBPACK_IMPORTED_MODULE_7__.resolve)(u,a)))return!0;return!1},e}();const __WEBPACK_DEFAULT_EXPORT__=PluginAPI},(module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{PluginAPI:()=>_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Qq,configuration:()=>_configurator__WEBPACK_IMPORTED_MODULE_3__.H,currentRequire:()=>_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.lE,default:()=>__WEBPACK_DEFAULT_EXPORT__,main:()=>main});var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3),_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__),_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__),_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(5),_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__),_configurator__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(0),_pluginAPI__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(1),clientnode__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(6),clientnode__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(clientnode__WEBPACK_IMPORTED_MODULE_5__);function _createForOfIteratorHelperLoose(e,_){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||_&&e&&"number"==typeof e.length){r&&(e=r);var t=0;return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,_){if(e){if("string"==typeof e)return _arrayLikeToArray(e,_);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,_):void 0}}function _arrayLikeToArray(e,_){(null==_||_>e.length)&&(_=e.length);for(var r=0,t=Array(_);r<_;r++)t[r]=e[r];return t}module=__webpack_require__.hmd(module);var handleError=function(){var e=_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().mark((function e(_){return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStack(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({},_,{hook:"error"}));case 3:e.next=12;break;case 5:if(e.prev=5,e.t0=e.catch(0),!_.configuration.core.debug){e.next=11;break}throw e.t0;case 11:console.error(e.t0);case 12:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return e.apply(this,arguments)}}(),main=function(){var e=_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().mark((function e(){var _,r,t,n,a,o,i,l,u,c,s,p,d,E,f,b,m,P,O,g,D,h,M,A,v,I,k,y,T;return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.loadAll(clientnode__WEBPACK_IMPORTED_MODULE_5___default().copy(_configurator__WEBPACK_IMPORTED_MODULE_3__.A));case 2:return _=e.sent,r=_.configuration,t=_.plugins,e.next=7,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStack({configuration:r,hook:"initialize",plugins:t});case 7:t.length&&console.info('Loaded plugins: "'+t.map((function(e){return e.internalName})).join('", "')+'".'),n=t.filter((function(e){return!!e.configurationFilePaths.length})),a=_createForOfIteratorHelperLoose(["pre","post"]);case 10:if((o=a()).done){e.next=16;break}return i=o.value,e.next=14,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStack({configuration:r,hook:i+"ConfigurationLoaded",plugins:t,pluginsWithChangedConfiguration:n});case 14:e.next=10;break;case 16:return l={},u={},c=!1,e.prev=19,e.next=22,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStack({configuration:r,hook:"preLoadService",plugins:t,services:l});case 22:for(s=0,p=Object.keys(l);s<p.length;s++)d=p[s],console.info('Service "'+d+'" initialized.');E=_createForOfIteratorHelperLoose(t);case 24:if((f=E()).done){e.next=45;break}if(!(b=f.value).api){e.next=43;break}return e.next=29,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStack({configuration:r,hook:"preLoad"+clientnode__WEBPACK_IMPORTED_MODULE_5___default().stringCapitalize(b.internalName)+"Service",plugins:t,services:l});case 29:return m=null,e.prev=30,e.next=33,b.api({configuration:r,hook:"loadService",pluginAPI:_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay,plugins:t,servicePromises:u,services:l});case 33:m=e.sent,e.next=40;break;case 36:if(e.prev=36,e.t0=e.catch(30),null!=e.t0&&null!=(P=e.t0.message)&&P.startsWith("NotImplemented:")){e.next=40;break}throw new Error('Plugin "'+b.internalName+'" '+(b.internalName===b.name?"":"("+b.name+") ")+"throws: "+clientnode__WEBPACK_IMPORTED_MODULE_5___default().represent(e.t0)+' during asynchrone hook "loadService".');case 40:if(m)for(O=0,g=Object.entries(m);O<g.length;O++)D=g[O],h=D[0],null!==(M=D[1])&&"object"==typeof M&&"then"in M?(console.info('Service "'+h+'" started.'),u[h]=M):console.info('Service "'+h+'" loaded.');return e.next=43,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStack({configuration:r,hook:"postLoad"+clientnode__WEBPACK_IMPORTED_MODULE_5___default().stringCapitalize(b.internalName)+"Service",plugins:t,services:l,servicePromises:u});case 43:e.next=24;break;case 45:return e.next=47,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStack({configuration:r,hook:"postLoadService",plugins:t,servicePromises:u,services:l});case 47:for(A=!1,v=function(){A||_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStackSynchronous({configuration:r,hook:"exit",plugins:t.slice().reverse(),servicePromises:u,services:l}),A=!0},I=_createForOfIteratorHelperLoose(clientnode__WEBPACK_IMPORTED_MODULE_5__.CloseEventNames);!(k=I()).done;)y=k.value,process.on(y,v);return T=!1,clientnode__WEBPACK_IMPORTED_MODULE_5___default().isFunction(process.stdin.setRawMode)&&process.stdin.setRawMode(!0),process.stdin.resume(),process.stdin.setEncoding(r.core.encoding),process.stdin.on("data",(function(e){_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().mark((function _(){return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().wrap((function(_){for(;;)switch(_.prev=_.next){case 0:if(""!==e){_.next=10;break}if(!T){_.next=5;break}console.warn("Stopping ungracefully."),_.next=9;break;case 5:return T=!0,console.info("You have requested to shut down all services. A second request will force to stop ungracefully."),_.next=9,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStack({configuration:r,hook:"shouldExit",plugins:t,servicePromises:u,services:l});case 9:process.exit();case 10:process.stdout.write(e);case 11:case"end":return _.stop()}}),_)})))()})),e.prev=55,e.next=58,Promise.all(Object.keys(u).map((function(e){return u[e]})));case 58:e.next=62;break;case 60:e.prev=60,e.t1=e.catch(55);case 62:return c=!0,e.next=65,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStack({configuration:r,hook:"shouldExit",plugins:t,servicePromises:u,services:l});case 65:process.exit(),e.next=88;break;case 68:return e.prev=68,e.t2=e.catch(19),e.next=72,handleError({configuration:r,data:e.t2,plugins:t,servicePromises:u,services:l});case 72:if(c){e.next=82;break}return e.prev=73,e.next=76,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStack({configuration:r,hook:"shouldExit",plugins:t,servicePromises:u,services:l});case 76:e.next=82;break;case 78:return e.prev=78,e.t3=e.catch(73),e.next=82,handleError({configuration:r,data:e.t3,plugins:t,servicePromises:u,services:l});case 82:if(!r.core.debug){e.next=86;break}throw e.t2;case 86:console.error(e.t2);case 87:process.exit(1);case 88:case"end":return e.stop()}}),e,null,[[19,68],[30,36],[55,60],[73,78]])})));return function(){return e.apply(this,arguments)}}();(__webpack_require__.c[__webpack_require__.s]===module||eval("require.main")!==__webpack_require__.c[__webpack_require__.s]&&void 0!==ORIGINAL_MAIN_MODULE&&ORIGINAL_MAIN_MODULE===eval("require.main"))&&main();const __WEBPACK_DEFAULT_EXPORT__=main},e=>{e.exports=require("@babel/runtime/helpers/extends")},e=>{e.exports=require("@babel/runtime/helpers/asyncToGenerator")},e=>{e.exports=require("@babel/runtime/regenerator")},e=>{e.exports=require("clientnode")},e=>{e.exports=require("fs")},e=>{e.exports=require("path")},e=>{e.exports=require("child_process")},e=>{e.exports=require("module")}],__webpack_module_cache__={};function __webpack_require__(e){var _=__webpack_module_cache__[e];if(void 0!==_)return _.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.c=__webpack_module_cache__,__webpack_require__.n=e=>{var _=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(_,{a:_}),_},__webpack_require__.d=(e,_)=>{for(var r in _)__webpack_require__.o(_,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:_[r]})},__webpack_require__.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),__webpack_require__.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__(__webpack_require__.s=2);module.exports=__webpack_exports__})();
2
+ "use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}module===eval("require.main")&&module.paths.unshift("/application/node_modules"),(()=>{var __webpack_modules__=[(e,_,r)=>{r.d(_,{H:()=>g,A:()=>I});var n=r(3),t=r.n(n),a=r(6),o=r(7),i=r.n(o),l=r(8),c=r.n(l),u=r(1);const s=JSON.parse('{"name":"web-node","version":"1.0.509","description":"High level javaScript backend plugin system and configuration merger.","keywords":["api","backend","management","plugin","web"],"homepage":"https://torben.website/web-node","bugs":{"email":"info@torben.website","url":"https://github.com/thaibault/web-node/issues"},"license":"CC-BY-3.0","author":{"name":"Torben Sickert","email":"info@torben.website","url":"https://torben.website"},"files":["configurator.d.ts","index.d.ts","index.js","pluginAPI.d.ts","type.d.ts","unixCrypt.d.ts","unixCrypt.js"],"bin":"index.js","repository":{"type":"git","url":"https://github.com/thaibault/web-node.git"},"scripts":{"build":"yarn build:types; yarn build:plain","build:plain":"weboptimizer build","build:types":"weboptimizer build:types","check":"yarn check:types; yarn lint","check:types":"weboptimizer check:types","clear":"weboptimizer clear","document":"weboptimizer document","lint":"weboptimizer lint","prepare":"yarn build","serve":"yarn build:plain && yarn start","start":"./index.js \'{plugin: {hotReloading: true}}\'","prepare:test":"yarn clear && cd dummyPlugin && shx touch yarn.lock && yarn build && cd ..","test":"yarn prepare:test && weboptimizer test","test:coverage":"yarn prepare:test && weboptimizer test:coverage","test:coverage:report":"yarn prepare:test && weboptimizer test:coverage:report","update":"yarn version patch && yarn npm publish","update:documentation":"documentation-website","watch":"weboptimizer build --watch"},"runkitExample":"require(\'@babel/runtime/package.json\')\\nrequire(\'clientnode/package.json\')\\n\\nconst {PluginAPI} = require(\'web-node\')\\n\\nPluginAPI.loadFile(\'./unixCrypt.js\', \'crypt\')(\'test\')","devDependencies":{"@babel/cli":"^7.24.7","@babel/eslint-parser":"^7.24.7","@babel/runtime":"^7.24.7","@types/node":"^20.14.8","@typescript-eslint/eslint-plugin":"^7.13.1","@typescript-eslint/parser":"^7.13.1","clientnode":"^3.0.1154","documentation-website":"^1.0.326","eslint":"^9.5.0","eslint-config-google":"^0.14.0","eslint-plugin-jsdoc":"^48.4.0","jest":"^29.7.0","jsdoc":"^4.0.3","shx":"^0.3.4","typescript-eslint":"^7.13.1","weboptimizer":"^2.0.1481"},"peerDependencies":{"@babel/runtime":"*","clientnode":"*"},"peerDependenciesMeta":{"@babel/runtime":{"optional":true}},"engines":{"node":">=20","npm":">=10","yarn":">=4"},"resolutions":{"colors":"1.4.0","globals@npm:^14.0.0":"patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch","globals@npm:^11.1.0":"patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch","globals@npm:^9.18.0":"patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch"},"sideEffects":true,"documentationWebsite":{"name":"web-node","trackingCode":"UA-40192634-9"},"webNode":{"core":{"context":{"path":"./","type":"relative"},"debug":false,"encoding":"utf8","interDependencies":{},"name":"web-node","plugin":{"configuration":{"fileNames":["package.json","private-package.json"],"propertyNames":["webNode","webnode","web-node"]},"directories":{"external":{"nameRegularExpressionPattern":"^([a-zA-Z0-9-]+?)-?[wW]eb-?[nN]ode-?[pP]lugin$","path":{"__evaluate__":"`${currentPath}/node_modules/`"}},"internal":{"nameRegularExpressionPattern":"^([a-zA-Z0-9-_].*)$","path":{"__evaluate__":"`${currentPath}/plugins/`"}}},"hotReloading":false}}},"webOptimizer":{"assetPattern":{"javaScript":{"includeFilePathRegularExpression":"^(.+/)?index\\\\.js$","pattern":{"#":"This is how we can make our main exported artefact executable.","__evaluate__":"`#!/usr/bin/env node\\n// -*- coding: utf-8 -*-\\n${self.generic.assetPattern.javaScript.pattern}if(module===eval(\'require.main\'))module.paths.unshift(\'/application/node_modules\');{1}`"}}},"exportFormat":{"external":"commonjs2","self":"commonjs2"},"injection":{"entry":{"__evaluate__":"2 < self.givenCommandLineArguments.length && self.givenCommandLineArguments[2].startsWith(\'test\') ? {testBundle: \'test\'} : {index: \'./index.ts\', unixCrypt: \'./unixCrypt.ts\'}"}},"module":{"optimizer":{"babelMinify":{"#":"To provide a logging output we need to exclude this feature.","__evaluate__":"self.debug ? {bundle: null, module: null} : {bundle: {transform: {removeConsole: false}}, module: {removeConsole: false}}"}}},"targetTechnology":{"boilerplate":"node","payload":"node"}},"packageManager":"yarn@4.1.0+sha256.81a00df816059803e6b5148acf03ce313cad36b7f6e5af6efa040a15981a6ffb"}');var p,d;function E(e,_){(null==_||_>e.length)&&(_=e.length);for(var r=0,n=Array(_);r<_;r++)n[r]=e[r];return n}for(s.webNode.core.context={path:"/",type:"relative"};s.webNode.core.context.path=(0,l.resolve)(s.webNode.core.context.path,"../../"),"node_modules"===(0,l.basename)((0,l.dirname)(s.webNode.core.context.path)););if("/"===s.webNode.core.context.path||"node_modules"===(0,l.basename)((0,l.dirname)(process.cwd()))||".staging"===(0,l.basename)((0,l.dirname)(process.cwd()))&&"node_modules"===(0,l.basename)((0,l.dirname)((0,l.dirname)(process.cwd()))))s.webNode.core.context.path=process.cwd();else try{(0,o.lstatSync)((0,l.join)(process.cwd(),"node_modules")).isSymbolicLink()&&(s.webNode.core.context.path=process.cwd())}catch(e){}var b={name:"main"};try{b=(0,a.currentRequire)((0,l.join)(s.webNode.core.context.path,"package"))}catch(e){s.webNode.core.context.path=process.cwd()}var f=(null==(p=b.documentationWebsite)?void 0:p.name)||b.name||"main",m=b.webNode||((d={})[f]={name:f,package:b},d);s.webNode.core.name=s.documentationWebsite.name;var P=new Date,O=t()({},a.UTILITY_SCOPE,{currentPath:process.cwd(),fs:i(),path:c(),PluginAPI:u.Ay,webNodePath:"/",now:P,nowUTCTimestamp:(0,a.getUTCTimestamp)(P)}),g=(0,a.evaluateDynamicData)(s.webNode,O);delete s.webNode,(0,a.extend)(!0,(0,a.modifyObject)(g,m),m);for(var h,D={},M=function(e,_){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,_){if(e){if("string"==typeof e)return E(e,_);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(e,_):void 0}}(e))||_&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(process.argv.slice(1));!(h=M()).done;){var A=h.value,v=(0,a.parseEncodedObject)(A,g,"configuration");(0,a.isPlainObject)(v)&&(0,a.extend)(!0,D,v)}0<Object.keys(D).length&&((0,a.extend)(!0,(0,a.modifyObject)(g,D),D),g.core.runtimeConfiguration=D),(g=(0,a.evaluateDynamicData)((0,a.removeKeysInEvaluation)(g),O)).name=f,g.core.package=s;const I=g},(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{var __dirname="/";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,Qq:()=>PluginAPI,lE:()=>currentRequire});var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3),_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__),_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__),_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(5),_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__),child_process__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(9),child_process__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(child_process__WEBPACK_IMPORTED_MODULE_3__),clientnode__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(6),clientnode__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(clientnode__WEBPACK_IMPORTED_MODULE_4__),fs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(7),fs__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_5__),module__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(10),module__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(module__WEBPACK_IMPORTED_MODULE_6__),path__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(8),path__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_7__),_configurator__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(0);function _createForOfIteratorHelperLoose(e,_){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||_&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,_){if(e){if("string"==typeof e)return _arrayLikeToArray(e,_);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,_):void 0}}function _arrayLikeToArray(e,_){(null==_||_>e.length)&&(_=e.length);for(var r=0,n=Array(_);r<_;r++)n[r]=e[r];return n}var currentRequire=eval("require"),oldResolveFilename=module__WEBPACK_IMPORTED_MODULE_6__.Module._resolveFilename;module__WEBPACK_IMPORTED_MODULE_6__.Module._resolveFilename=function(e,_,r){return oldResolveFilename("web-node"===e?currentRequire.main.id:e,_,r)};var PluginAPI=function(){function e(){}return e.callStack=function(){var _=_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().mark((function _(r){var n,t,a,o,i,l,c,u,s,p,d,E,b,f,m,P,O,g=arguments;return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().wrap((function(_){for(;;)switch(_.prev=_.next){case 0:if(n=_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({},r,{pluginAPI:e}),t=n.configuration,a=n.hook,o=n.plugins,i=a.endsWith("ConfigurationLoaded")||a.endsWith("ConfigurationHotLoaded"),!t.core.plugin.hotReloading){_.next=20;break}if(i){_.next=14;break}if(!(l=e.hotReloadConfigurationFile(o,t.core.plugin.configuration.propertyNames)).length){_.next=14;break}return t.core.debug&&console.info('Configuration for "'+l.map((function(e){return e.name})).join('", "')+'" has been changed: reloading initialized.'),c=_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({},n,{triggerHook:n.hook,pluginsWithChangedConfiguration:l}),_.next=11,e.callStack(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({},c,{hook:"preConfigurationHotLoaded"}));case 11:return e.loadConfigurations(o,t),_.next=14,e.callStack(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({},c,{hook:"postConfigurationHotLoaded"}));case 14:if("apiFileReloaded"===a){_.next=20;break}if(!(u=e.hotReloadAPIFile(o)).length){_.next=20;break}return t.core.debug&&console.info('API-file for "'+u.map((function(e){return e.name})).join('", "')+'" has been changed: reloading initialized.'),_.next=20,e.callStack(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({},n,{hook:"apiFileReloaded",pluginsWithChangedAPIFiles:u,triggerHook:n.hook}));case 20:for(s=r.data,p=g.length,d=Array(1<p?p-1:0),E=1;E<p;E++)d[E-1]=g[E];b=_createForOfIteratorHelperLoose(o);case 23:if((f=b()).done){_.next=42;break}if(!(m=f.value).api){_.next=40;break}return P=void 0,_.prev=27,_.next=30,m.api.apply(m,[n].concat(d));case 30:P=_.sent,_.next=38;break;case 33:if(_.prev=33,_.t0=_.catch(27),null==(O=_.t0.message)||!O.startsWith("NotImplemented:")){_.next=37;break}return _.abrupt("continue",40);case 37:throw new Error('Plugin "'+m.internalName+'" '+(m.internalName===m.name?"":"("+m.name+") ")+"throws: "+(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.represent)(_.t0)+' during asynchronous hook "'+a+'".');case 38:s=P,t.core.debug&&console.info('Ran asynchronous hook "'+a+'" for plugin "'+m.name+'".');case 40:_.next=23;break;case 42:return _.abrupt("return",s);case 43:case"end":return _.stop()}}),_,null,[[27,33]])})));return function(){return _.apply(this,arguments)}}(),e.callStackSynchronous=function(_){for(var r=_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({},_,{pluginAPI:e}),n=r.configuration,t=r.hook,a=r.plugins,o=_.data,i=arguments.length,l=Array(1<i?i-1:0),c=1;c<i;c++)l[c-1]=arguments[c];for(var u,s,p=_createForOfIteratorHelperLoose(a);!(u=p()).done;)if((s=u.value).api){var d=void 0;try{d=s.api.apply(s,[r].concat(l))}catch(e){var E;if(null!=(E=e.message)&&E.startsWith("NotImplemented:"))continue;throw new Error('Plugin "'+s.internalName+'" '+(s.internalName===s.name?"":"("+s.name+") ")+"throws: "+(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.represent)(e)+' during synchronous hook"'+t+'".')}o=d,n.core.debug&&console.info('Ran synchronous hook "'+t+'" for plugin "'+s.name+'".')}return o},e.determineInternalName=function(e,_){return(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.delimitedToCamelCase)(e.replace(_,(function(e,_){return"string"==typeof _?_:e})))},e.evaluateConfiguration=function(_){for(var r={},n=0,t=Object.entries(_);n<t.length;n++){var a=t[n],o=a[0],i=a[1];i.package&&(r[o]=i.package,delete i.package)}var l=new Date;_=(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.evaluateDynamicData)((0,clientnode__WEBPACK_IMPORTED_MODULE_4__.removeKeysInEvaluation)(_),_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({},clientnode__WEBPACK_IMPORTED_MODULE_4__.UTILITY_SCOPE,{currentPath:process.cwd(),fs:fs__WEBPACK_IMPORTED_MODULE_5___default(),path:path__WEBPACK_IMPORTED_MODULE_7___default(),PluginAPI:e,webNodePath:__dirname,now:l,nowUTCTimestamp:(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.getUTCTimestamp)(l)}));for(var c=0,u=Object.entries(r);c<u.length;c++){var s=u[c],p=s[0],d=s[1];_[p].package=d}return _},e.hotReloadAPIFile=function(_){for(var r,n,t=[],a=_createForOfIteratorHelperLoose(e.hotReloadFiles("api","scope",_));!(r=a()).done;)if((n=r.value).oldScope){for(var o=0,i=Object.entries(n.oldScope);o<i.length;o++){var l=i[o],c=l[0],u=l[1];Object.prototype.hasOwnProperty.call(n.newScope,c)&&!(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.isFunction)(n.newScope[c])&&(n.newScope[c]=u)}t.push(n.plugin)}return t},e.hotReloadConfigurationFile=function(_,r){for(var n,t,a=[],o=_createForOfIteratorHelperLoose(e.hotReloadFiles("configuration","packageConfiguration",_));!(n=o()).done;)(t=n.value).plugin.configuration=e.loadConfiguration(t.plugin.internalName,t.plugin.packageConfiguration,r),a.push(t.plugin);return a},e.hotReloadFiles=function(_,r,n){for(var t,a,o=[],i=_createForOfIteratorHelperLoose(n);!(t=i()).done;)if((a=t.value)[r])for(var l,c=0,u=_createForOfIteratorHelperLoose(a[_+"FilePaths"]);!(l=u()).done;){var s=l.value,p=(0,fs__WEBPACK_IMPORTED_MODULE_5__.statSync)(s).mtime.getTime();if(a[_+"FileLoadTimestamps"][c]<p){delete currentRequire.cache[currentRequire.resolve(s)];var d=a[r];a[r]=e.loadFile(s,a.name,a[r]),o.push({newScope:a[r],oldScope:d,plugin:a,target:r})}a[_+"FileLoadTimestamps"][c]=p,c+=1}return o},e.load=function(){var _=_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().mark((function _(r,n,t,a,o,i){var l,c,u,s,p,d,E,b;return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().wrap((function(_){for(;;)switch(_.prev=_.next){case 0:void 0===i&&(i="utf8"),l=[],c={},u=_createForOfIteratorHelperLoose(a.fileNames);case 4:if((s=u()).done){_.next=14;break}return p=s.value,d=(0,path__WEBPACK_IMPORTED_MODULE_7__.resolve)(o,p),_.next=9,(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.isFile)(d);case 9:if(!_.sent){_.next=12;break}(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.extend)(!0,c,e.loadFile(d,r)),l.push(d);case 12:_.next=4;break;case 14:if(E=["index.js"],!Object.keys(c).length){_.next=22;break}return n=c.webNodeInternalName||n,(b=e.loadConfiguration(n,c,a.propertyNames))[n].package.main&&(E[0]=b[n].package.main),_.next=21,e.loadAPI(E,o,r,n,t,i,b,l);case 21:return _.abrupt("return",_.sent);case 22:return _.next=24,e.loadAPI(E,o,r,n,t,i);case 24:return _.abrupt("return",_.sent);case 25:case"end":return _.stop()}}),_)})));return function(){return _.apply(this,arguments)}}(),e.loadAPI=function(){var _=_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().mark((function _(r,n,t,a,o,i,l,c){var u,s,p,d,E,b,f,m,P,O,g;return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().wrap((function(_){for(;;)switch(_.prev=_.next){case 0:return void 0===i&&(i="utf8"),void 0===l&&(l=null),void 0===c&&(c=[]),E=(0,path__WEBPACK_IMPORTED_MODULE_7__.resolve)(n,r[0]),_.next=6,(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.isFile)(E);case 6:if(_.sent){_.next=21;break}b=_createForOfIteratorHelperLoose((0,fs__WEBPACK_IMPORTED_MODULE_5__.readdirSync)(n));case 8:if((f=b()).done){_.next=21;break}if(m=f.value,_.t0=!c.map((function(e){return(0,path__WEBPACK_IMPORTED_MODULE_7__.basename)(e)})).includes(m),!_.t0){_.next=15;break}return _.next=14,(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.isFile)((0,path__WEBPACK_IMPORTED_MODULE_7__.resolve)(n,m));case 14:_.t0=_.sent;case 15:if(!_.t0){_.next=19;break}if(E=(0,path__WEBPACK_IMPORTED_MODULE_7__.resolve)(n,E),!["index","main"].includes((0,path__WEBPACK_IMPORTED_MODULE_7__.basename)(E,(0,path__WEBPACK_IMPORTED_MODULE_7__.extname)(m)))){_.next=19;break}return _.abrupt("break",21);case 19:_.next=8;break;case 21:if(P=null,O=!1,_.t1=l&&(1<Object.keys(l).length||l[a]&&1<Object.keys(l[a]).length),!_.t1){_.next=28;break}return _.next=27,(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.isFile)(E);case 27:_.t1=_.sent;case 28:if(!_.t1){_.next=30;break}E.endsWith(".js")?(O=!0,P=function(_){for(var r,n=arguments.length,a=Array(1<n?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];if(_.hook in o[t].scope)return(r=o[t].scope)[_.hook].apply(r,[_].concat(a,[e]));throw new Error('NotImplemented: API method "'+_.hook+'" is not implemented in plugin "'+t+'".')}):P=function(e){for(var _=e.hook,r=e.data,n=arguments.length,t=Array(1<n?n-1:0),a=1;a<n;a++)t[a-1]=arguments[a];var o=(0,child_process__WEBPACK_IMPORTED_MODULE_3__.spawnSync)(E,[_].concat(t.map((function(e){return JSON.stringify(e)}))),{cwd:process.cwd(),encoding:i,env:process.env,input:JSON.stringify(r),shell:!0,stdio:"inherit"});return 404===o.status?r:o.stdout.startsWith("##!JSON!##")?JSON.parse(o.stdout.substring(10)):r};case 30:return g=null!==(u=l)&&void 0!==u?u:((s={})[a]={package:{}},s),_.abrupt("return",{api:P,apiFileLoadTimestamps:P?[(0,fs__WEBPACK_IMPORTED_MODULE_5__.statSync)(E).mtime.getTime()]:[],apiFilePaths:P?[E]:[],configuration:g,configurationFilePaths:c,configurationFileLoadTimestamps:c.map((function(e){return(0,fs__WEBPACK_IMPORTED_MODULE_5__.statSync)(e).mtime.getTime()})),dependencies:(null==(p=g[a])?void 0:p.dependencies)||[],internalName:a,name:t,packageConfiguration:null==(d=g[a])?void 0:d.package,path:n,scope:O?e.loadFile(E,t):null});case 32:case"end":return _.stop()}}),_)})));return function(){return _.apply(this,arguments)}}(),e.loadConfiguration=function(e,_,r){for(var n,t,a,o=(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.removeKeyPrefixes)((0,clientnode__WEBPACK_IMPORTED_MODULE_4__.copy)(_)),i=((n={})[e]={package:o},n),l=_createForOfIteratorHelperLoose(r);!(t=l()).done;)if(_[a=t.value]){(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.extend)(!0,i,_[a]),delete i[e].package[a];break}return i},e.loadConfigurations=function(_,r){for(var n=0,t=Object.keys(r);n<t.length;n++)delete r[t[n]];(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.extend)(r,(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.copy)(_configurator__WEBPACK_IMPORTED_MODULE_8__.A));for(var a,o,i=_createForOfIteratorHelperLoose(_);!(a=i()).done;)if((o=a.value).configuration){var l=(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.copy)(o.configuration);(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.extend)(!0,(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.modifyObject)(r,l),l),r.core.runtimeConfiguration&&(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.extend)(!0,r,r.core.runtimeConfiguration)}return e.evaluateConfiguration(r)},e.loadFile=function(e,_,r,n){var t,a;void 0===r&&(r=null),void 0===n&&(n=!0);try{t=currentRequire.resolve(e)}catch(e){}t&&t in currentRequire.cache&&delete currentRequire.cache[t];try{a=currentRequire(e)}catch(t){if(!r)throw new Error("Couldn't load plugin file \""+e+'" for plugin "'+_+'": '+(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.represent)(t));a=r,n&&console.warn("Couln't load new api plugin file \""+e+'" for plugin "'+_+'": '+(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.represent)(t)+". Using fallback one.")}return Object.prototype.hasOwnProperty.call(a,"default")?a.default:a},e.loadAll=function(){var _=_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().mark((function _(r){var n,t,a,o,i,l,c,u,s,p,d,E,b,f,m,P,O,g,h,D,M,A,v,I,k,y;return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().wrap((function(_){for(;;)switch(_.prev=_.next){case 0:if(n={},"web-node"===r.name){_.next=5;break}return _.next=4,e.load(r.name,e.determineInternalName(r.name,new RegExp(r.core.plugin.directories.external.nameRegularExpressionPattern)),n,r.core.plugin.configuration,r.core.context.path,r.core.encoding);case 4:n[r.name]=_.sent;case 5:t=0,a=Object.values(r.core.plugin.directories);case 6:if(!(t<a.length)){_.next=27;break}return o=a[t],_.next=10,(0,clientnode__WEBPACK_IMPORTED_MODULE_4__.isDirectory)(o.path);case 10:if(!_.sent){_.next=24;break}i=new RegExp(o.nameRegularExpressionPattern),l=_createForOfIteratorHelperLoose((0,fs__WEBPACK_IMPORTED_MODULE_5__.readdirSync)(o.path));case 13:if((c=l()).done){_.next=24;break}if(u=c.value,i.test(u)){_.next=17;break}return _.abrupt("continue",22);case 17:return s=(0,path__WEBPACK_IMPORTED_MODULE_7__.resolve)(o.path,u),p=e.determineInternalName(u,i),_.next=21,e.load(u,p,n,r.core.plugin.configuration,s,r.core.encoding);case 21:n[u]=_.sent;case 22:_.next=13;break;case 24:t++,_.next=6;break;case 27:for(d={},E=0,b=Object.values(n);E<b.length;E++)if(f=b[E],d[f.internalName]=f.dependencies,Object.prototype.hasOwnProperty.call(r.core.interDependencies,f.internalName))for(m=_createForOfIteratorHelperLoose([].concat(r.core.interDependencies[f.internalName]));!(P=m()).done;)O=P.value,d[f.internalName].includes(O)||d[f.internalName].push(O);g=[],h=_createForOfIteratorHelperLoose((0,clientnode__WEBPACK_IMPORTED_MODULE_4__.sortTopological)(d));case 31:if((D=h()).done){_.next=44;break}M=D.value,A=0,v=Object.entries(n);case 34:if(!(A<v.length)){_.next=42;break}if(I=v[A],k=I[0],![(y=I[1]).internalName,k].includes(M)){_.next=39;break}return g.push(y),_.abrupt("break",42);case 39:A++,_.next=34;break;case 42:_.next=31;break;case 44:return _.abrupt("return",{configuration:e.loadConfigurations(g,r),plugins:g});case 45:case"end":return _.stop()}}),_)})));return function(){return _.apply(this,arguments)}}(),e.determineLocations=function(e,_){var r=e.core.context.path;return void 0===_&&(_=[]),(_=[].concat(_)).length?_.map((function(e){return(0,path__WEBPACK_IMPORTED_MODULE_7__.resolve)(r,e)})):[r]},e.isInLocations=function(e,_,r,n){for(var t,a,o=_.map((function(e){return e.path})),i=_createForOfIteratorHelperLoose([].concat(n));!(t=i()).done;)if((a=t.value).startsWith("/")){if(r.startsWith((0,path__WEBPACK_IMPORTED_MODULE_7__.join)(e.core.context.path,a)))return!0}else for(var l,c,u=_createForOfIteratorHelperLoose(o);!(l=u()).done;)if(c=l.value,r.startsWith((0,path__WEBPACK_IMPORTED_MODULE_7__.resolve)(c,a)))return!0;return!1},e}();const __WEBPACK_DEFAULT_EXPORT__=PluginAPI},(module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{PluginAPI:()=>_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Qq,configuration:()=>_configurator__WEBPACK_IMPORTED_MODULE_3__.H,currentRequire:()=>_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.lE,default:()=>__WEBPACK_DEFAULT_EXPORT__,main:()=>main});var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3),_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__),_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__),_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(5),_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__),_configurator__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(0),_pluginAPI__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(1),clientnode__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(6),clientnode__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(clientnode__WEBPACK_IMPORTED_MODULE_5__);function _createForOfIteratorHelperLoose(e,_){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||_&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,_){if(e){if("string"==typeof e)return _arrayLikeToArray(e,_);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,_):void 0}}function _arrayLikeToArray(e,_){(null==_||_>e.length)&&(_=e.length);for(var r=0,n=Array(_);r<_;r++)n[r]=e[r];return n}module=__webpack_require__.hmd(module);var handleError=function(){var e=_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().mark((function e(_){return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStack(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({},_,{hook:"error"}));case 3:e.next=12;break;case 5:if(e.prev=5,e.t0=e.catch(0),!_.configuration.core.debug){e.next=11;break}throw e.t0;case 11:console.error(e.t0);case 12:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return e.apply(this,arguments)}}(),main=function(){var e=_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().mark((function e(){var _,r,n,t,a,o,i,l,c,u,s,p,d,E,b,f,m,P,O,g,h,D,M,A,v,I,k,y,T;return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.loadAll((0,clientnode__WEBPACK_IMPORTED_MODULE_5__.copy)(_configurator__WEBPACK_IMPORTED_MODULE_3__.A));case 2:return _=e.sent,r=_.configuration,n=_.plugins,e.next=7,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStack({configuration:r,hook:"initialize",plugins:n});case 7:n.length&&console.info('Loaded plugins: "'+n.map((function(e){return e.internalName})).join('", "')+'".'),t=n.filter((function(e){return!!e.configurationFilePaths.length})),a=_createForOfIteratorHelperLoose(["pre","post"]);case 10:if((o=a()).done){e.next=16;break}return i=o.value,e.next=14,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStack({configuration:r,hook:i+"ConfigurationLoaded",plugins:n,pluginsWithChangedConfiguration:t});case 14:e.next=10;break;case 16:return l={},c={},u=!1,e.prev=19,e.next=22,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStack({configuration:r,hook:"preLoadService",plugins:n,services:l});case 22:for(s=0,p=Object.keys(l);s<p.length;s++)d=p[s],console.info('Service "'+d+'" initialized.');E=_createForOfIteratorHelperLoose(n);case 24:if((b=E()).done){e.next=45;break}if(!(f=b.value).api){e.next=43;break}return e.next=29,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStack({configuration:r,hook:"preLoad"+(0,clientnode__WEBPACK_IMPORTED_MODULE_5__.capitalize)(f.internalName)+"Service",plugins:n,services:l});case 29:return m=null,e.prev=30,e.next=33,f.api({configuration:r,hook:"loadService",pluginAPI:_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay,plugins:n,servicePromises:c,services:l});case 33:m=e.sent,e.next=40;break;case 36:if(e.prev=36,e.t0=e.catch(30),null!=e.t0&&null!=(P=e.t0.message)&&P.startsWith("NotImplemented:")){e.next=40;break}throw new Error('Plugin "'+f.internalName+'" '+(f.internalName===f.name?"":"("+f.name+") ")+"throws: "+(0,clientnode__WEBPACK_IMPORTED_MODULE_5__.represent)(e.t0)+' \'during asynchrone hook "loadService".');case 40:if(m)for(O=0,g=Object.entries(m);O<g.length;O++)h=g[O],D=h[0],null!==(M=h[1])&&"object"==typeof M&&"then"in M?(console.info('Service "'+D+'" started.'),c[D]=M):console.info('Service "'+D+'" loaded.');return e.next=43,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStack({configuration:r,hook:"postLoad"+(0,clientnode__WEBPACK_IMPORTED_MODULE_5__.capitalize)(f.internalName)+"Service",plugins:n,services:l,servicePromises:c});case 43:e.next=24;break;case 45:return e.next=47,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStack({configuration:r,hook:"postLoadService",plugins:n,servicePromises:c,services:l});case 47:for(A=!1,v=function(){A||_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStackSynchronous({configuration:r,hook:"exit",plugins:n.slice().reverse(),servicePromises:c,services:l}),A=!0},I=_createForOfIteratorHelperLoose(clientnode__WEBPACK_IMPORTED_MODULE_5__.CLOSE_EVENT_NAMES);!(k=I()).done;)y=k.value,process.on(y,v);return T=!1,(0,clientnode__WEBPACK_IMPORTED_MODULE_5__.isFunction)(process.stdin.setRawMode)&&process.stdin.setRawMode(!0),process.stdin.resume(),process.stdin.setEncoding(r.core.encoding),process.stdin.on("data",(function(e){_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().mark((function _(){return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().wrap((function(_){for(;;)switch(_.prev=_.next){case 0:if(""!==e){_.next=10;break}if(!T){_.next=5;break}console.warn("Stopping ungracefully."),_.next=9;break;case 5:return T=!0,console.info("You have requested to shut down all services. A second request will force to stop ungracefully."),_.next=9,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStack({configuration:r,hook:"shouldExit",plugins:n,servicePromises:c,services:l});case 9:process.exit();case 10:process.stdout.write(e);case 11:case"end":return _.stop()}}),_)})))()})),e.prev=55,e.next=58,Promise.all(Object.keys(c).map((function(e){return c[e]})));case 58:e.next=62;break;case 60:e.prev=60,e.t1=e.catch(55);case 62:return u=!0,e.next=65,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStack({configuration:r,hook:"shouldExit",plugins:n,servicePromises:c,services:l});case 65:process.exit(),e.next=88;break;case 68:return e.prev=68,e.t2=e.catch(19),e.next=72,handleError({configuration:r,data:e.t2,plugins:n,servicePromises:c,services:l});case 72:if(u){e.next=82;break}return e.prev=73,e.next=76,_pluginAPI__WEBPACK_IMPORTED_MODULE_4__.Ay.callStack({configuration:r,hook:"shouldExit",plugins:n,servicePromises:c,services:l});case 76:e.next=82;break;case 78:return e.prev=78,e.t3=e.catch(73),e.next=82,handleError({configuration:r,data:e.t3,plugins:n,servicePromises:c,services:l});case 82:if(!r.core.debug){e.next=86;break}throw e.t2;case 86:console.error(e.t2);case 87:process.exit(1);case 88:case"end":return e.stop()}}),e,null,[[19,68],[30,36],[55,60],[73,78]])})));return function(){return e.apply(this,arguments)}}();(__webpack_require__.c[__webpack_require__.s]===module||eval("require.main")!==__webpack_require__.c[__webpack_require__.s]&&void 0!==ORIGINAL_MAIN_MODULE&&ORIGINAL_MAIN_MODULE===eval("require.main"))&&main();const __WEBPACK_DEFAULT_EXPORT__=main},e=>{e.exports=require("@babel/runtime/helpers/extends")},e=>{e.exports=require("@babel/runtime/helpers/asyncToGenerator")},e=>{e.exports=require("@babel/runtime/regenerator")},e=>{e.exports=require("clientnode")},e=>{e.exports=require("fs")},e=>{e.exports=require("path")},e=>{e.exports=require("child_process")},e=>{e.exports=require("module")}],__webpack_module_cache__={};function __webpack_require__(e){var _=__webpack_module_cache__[e];if(void 0!==_)return _.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.c=__webpack_module_cache__,__webpack_require__.n=e=>{var _=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(_,{a:_}),_},__webpack_require__.d=(e,_)=>{for(var r in _)__webpack_require__.o(_,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:_[r]})},__webpack_require__.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),__webpack_require__.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__(__webpack_require__.s=2);module.exports=__webpack_exports__})();
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "web-node",
3
- "version": "1.0.508",
3
+ "version": "1.0.510",
4
4
  "description": "High level javaScript backend plugin system and configuration merger.",
5
5
  "keywords": [
6
- "web",
7
- "backend",
8
6
  "api",
7
+ "backend",
8
+ "management",
9
9
  "plugin",
10
- "management"
10
+ "web"
11
11
  ],
12
12
  "homepage": "https://torben.website/web-node",
13
13
  "bugs": {
@@ -29,9 +29,7 @@
29
29
  "unixCrypt.d.ts",
30
30
  "unixCrypt.js"
31
31
  ],
32
- "bin": {
33
- "web-node": "index.js"
34
- },
32
+ "bin": "index.js",
35
33
  "repository": {
36
34
  "type": "git",
37
35
  "url": "https://github.com/thaibault/web-node.git"
@@ -45,33 +43,35 @@
45
43
  "clear": "weboptimizer clear",
46
44
  "document": "weboptimizer document",
47
45
  "lint": "weboptimizer lint",
48
- "postversion": "yarn publish --non-interactive; git push --tags && git push",
49
46
  "prepare": "yarn build",
50
47
  "serve": "yarn build:plain && yarn start",
51
48
  "start": "./index.js '{plugin: {hotReloading: true}}'",
52
- "prepare:test": "yarn clear && cd dummyPlugin && yarn build && cd ..",
49
+ "prepare:test": "yarn clear && cd dummyPlugin && shx touch yarn.lock && yarn build && cd ..",
53
50
  "test": "yarn prepare:test && weboptimizer test",
54
51
  "test:coverage": "yarn prepare:test && weboptimizer test:coverage",
55
52
  "test:coverage:report": "yarn prepare:test && weboptimizer test:coverage:report",
56
- "update": "yarn version --patch",
53
+ "update": "yarn version patch && yarn npm publish",
57
54
  "update:documentation": "documentation-website",
58
55
  "watch": "weboptimizer build --watch"
59
56
  },
60
57
  "runkitExample": "require('@babel/runtime/package.json')\nrequire('clientnode/package.json')\n\nconst {PluginAPI} = require('web-node')\n\nPluginAPI.loadFile('./unixCrypt.js', 'crypt')('test')",
61
58
  "devDependencies": {
62
- "@babel/cli": "*",
63
- "@babel/eslint-parser": "*",
64
- "@types/node": "*",
65
- "@typescript-eslint/eslint-plugin": "*",
66
- "@typescript-eslint/parser": "*",
67
- "clientnode": "*",
68
- "documentation-website": "*",
69
- "eslint": "*",
70
- "eslint-config-google": "*",
71
- "eslint-plugin-jsdoc": "*",
72
- "jest": "*",
73
- "jsdoc": "*",
74
- "weboptimizer": "*"
59
+ "@babel/cli": "^7.24.7",
60
+ "@babel/eslint-parser": "^7.24.7",
61
+ "@babel/runtime": "^7.24.7",
62
+ "@types/node": "^20.14.8",
63
+ "@typescript-eslint/eslint-plugin": "^7.13.1",
64
+ "@typescript-eslint/parser": "^7.13.1",
65
+ "clientnode": "^3.0.1154",
66
+ "documentation-website": "^1.0.326",
67
+ "eslint": "^9.5.0",
68
+ "eslint-config-google": "^0.14.0",
69
+ "eslint-plugin-jsdoc": "^48.4.0",
70
+ "jest": "^29.7.0",
71
+ "jsdoc": "^4.0.3",
72
+ "shx": "^0.3.4",
73
+ "typescript-eslint": "^7.13.1",
74
+ "weboptimizer": "^2.0.1481"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "@babel/runtime": "*",
@@ -83,11 +83,15 @@
83
83
  }
84
84
  },
85
85
  "engines": {
86
- "node": ">=18",
87
- "npm": ">=9"
86
+ "node": ">=20",
87
+ "npm": ">=10",
88
+ "yarn": ">=4"
88
89
  },
89
90
  "resolutions": {
90
- "colors": "1.4.0"
91
+ "colors": "1.4.0",
92
+ "globals@npm:^14.0.0": "patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch",
93
+ "globals@npm:^11.1.0": "patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch",
94
+ "globals@npm:^9.18.0": "patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch"
91
95
  },
92
96
  "sideEffects": true,
93
97
  "documentationWebsite": {
@@ -165,5 +169,6 @@
165
169
  "boilerplate": "node",
166
170
  "payload": "node"
167
171
  }
168
- }
169
- }
172
+ },
173
+ "packageManager": "yarn@4.1.0+sha256.81a00df816059803e6b5148acf03ce313cad36b7f6e5af6efa040a15981a6ffb"
174
+ }
package/pluginAPI.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- /// <reference types="node" />
2
- import { Encoding, Mapping, RecursiveEvaluateable } from 'clientnode/type';
1
+ import { Encoding, Mapping, RecursiveEvaluateable } from 'clientnode';
3
2
  import { BaseState, Configuration, EvaluateablePartialConfiguration, MetaPluginConfiguration, PackageConfiguration, Plugin, PluginChange, ServicePromisesState } from './type';
4
- export declare const currentRequire: NodeRequire;
3
+ export declare const currentRequire: typeof require;
5
4
  /**
6
5
  * A dumm plugin interface with all available hooks.
7
6
  */
@@ -11,7 +10,6 @@ export declare class PluginAPI {
11
10
  * waits for their resolved promises.
12
11
  * @param givenState - Contains runtime information about current hook.
13
12
  * @param parameters - Additional parameters to forward into plugin api.
14
- *
15
13
  * @returns A promise which resolves when all callbacks have resolved their
16
14
  * promise holding given potentially modified data.
17
15
  */
@@ -20,7 +18,6 @@ export declare class PluginAPI {
20
18
  * Calls all plugin methods for given trigger description synchronous.
21
19
  * @param givenState - Contains runtime information about current hook.
22
20
  * @param parameters - Additional parameters to forward into plugin api.
23
- *
24
21
  * @returns Given potentially modified data.
25
22
  */
26
23
  static callStackSynchronous<State extends BaseState<unknown> = ServicePromisesState, Output = void>(this: void, givenState: Omit<State, 'pluginAPI'>, ...parameters: Array<unknown>): Output;
@@ -30,7 +27,6 @@ export declare class PluginAPI {
30
27
  * @param name - Name to convert.
31
28
  * @param regularExpression - Regular expression pattern which extracts
32
29
  * relevant name path as first match group.
33
- *
34
30
  * @returns Transformed name.
35
31
  */
36
32
  static determineInternalName(this: void, name: string, regularExpression: RegExp): string;
@@ -38,15 +34,13 @@ export declare class PluginAPI {
38
34
  * Evaluates given configuration object by letting plugins package sub
39
35
  * structure untouched.
40
36
  * @param configuration - Evaluateable configuration structure.
41
- *
42
37
  * @returns Resolved configuration.
43
38
  */
44
39
  static evaluateConfiguration<Type extends Mapping<unknown> = Configuration>(this: void, configuration: RecursiveEvaluateable<Type> | Type): Type;
45
40
  /**
46
- * Checks for changed plugin api file in given plugins and reloads them
47
- * if necessary (new timestamp).
41
+ * Checks for changed plugin api file in given plugins and reloads them if
42
+ * necessary (new timestamp).
48
43
  * @param plugins - List of plugins to search for updates in.
49
- *
50
44
  * @returns A list with plugins which have a changed api scope.
51
45
  */
52
46
  static hotReloadAPIFile(this: void, plugins: Array<Plugin>): Array<Plugin>;
@@ -56,7 +50,6 @@ export declare class PluginAPI {
56
50
  * @param plugins - List of plugins to search for updates in.
57
51
  * @param configurationPropertyNames - Property names to search for to use
58
52
  * as entry in plugin configuration file.
59
- *
60
53
  * @returns A list with plugins which have a changed configurations.
61
54
  */
62
55
  static hotReloadConfigurationFile(this: void, plugins: Array<Plugin>, configurationPropertyNames: Array<string>): Array<Plugin>;
@@ -67,7 +60,6 @@ export declare class PluginAPI {
67
60
  * @param target - Property name existing in plugin meta informations
68
61
  * objects which should be updated.
69
62
  * @param plugins - List of plugins to search for updates in.
70
- *
71
63
  * @returns A list with plugin changes.
72
64
  */
73
65
  static hotReloadFiles(this: void, type: 'api' | 'configuration', target: 'packageConfiguration' | 'scope', plugins: Array<Plugin>): Array<PluginChange>;
@@ -81,7 +73,6 @@ export declare class PluginAPI {
81
73
  * @param pluginPath - Path to given plugin.
82
74
  * @param encoding - Encoding to use to read and write from child
83
75
  * process's.
84
- *
85
76
  * @returns An object of plugin specific meta informations.
86
77
  */
87
78
  static load(this: void, name: string, internalName: string, plugins: Mapping<Plugin>, metaConfiguration: MetaPluginConfiguration, pluginPath: string, encoding?: Encoding): Promise<Plugin>;
@@ -100,7 +91,6 @@ export declare class PluginAPI {
100
91
  * @param configuration - Plugin specific configurations.
101
92
  * @param configurationFilePaths - Plugin specific configuration file
102
93
  * paths.
103
- *
104
94
  * @returns Plugin meta informations object.
105
95
  */
106
96
  static loadAPI(this: void, relativeFilePaths: Array<string>, pluginPath: string, name: string, internalName: string, plugins: Mapping<Plugin>, encoding?: Encoding, configuration?: null | EvaluateablePartialConfiguration, configurationFilePaths?: Array<string>): Promise<Plugin>;
@@ -112,7 +102,6 @@ export declare class PluginAPI {
112
102
  * object.
113
103
  * @param configurationPropertyNames - Property names to search for to use
114
104
  * as entry in plugin configuration file.
115
- *
116
105
  * @returns Determined configuration object.
117
106
  */
118
107
  static loadConfiguration(this: void, name: string, packageConfiguration: PackageConfiguration, configurationPropertyNames: Array<string>): EvaluateablePartialConfiguration;
@@ -121,7 +110,6 @@ export declare class PluginAPI {
121
110
  * @param plugins - Topological sorted list of plugins to check for
122
111
  * configurations.
123
112
  * @param configuration - Global configuration to extend with.
124
- *
125
113
  * @returns Updated given configuration object.
126
114
  */
127
115
  static loadConfigurations(this: void, plugins: Array<Plugin>, configuration: Configuration): Configuration;
@@ -132,16 +120,14 @@ export declare class PluginAPI {
132
120
  * @param fallbackScope - Scope to return if an error occurs during
133
121
  * loading. If a "null" is given an error will be thrown.
134
122
  * @param log - Enables logging.
135
- *
136
123
  * @returns Exported api file scope.
137
124
  */
138
125
  static loadFile(this: void, filePath: string, name: string, fallbackScope?: null | object, log?: boolean): object;
139
126
  /**
140
127
  * Extends given configuration object with all plugin specific ones and
141
128
  * returns a topological sorted list of plugins with plugins specific
142
- * meta informations stored.
129
+ * meta information stored.
143
130
  * @param configuration - Configuration object to extend and use.
144
- *
145
131
  * @returns A topological sorted list of plugins objects.
146
132
  */
147
133
  static loadAll(this: void, configuration: Configuration): Promise<{
@@ -155,7 +141,6 @@ export declare class PluginAPI {
155
141
  * @param configuration.core.context - Sub web-node context configurations.
156
142
  * @param configuration.core.context.path - Current web-nodes path.
157
143
  * @param locations - Locations to process.
158
- *
159
144
  * @returns Given and processed locations.
160
145
  */
161
146
  static determineLocations(this: void, { core: { context: { path: contextPath } } }: Configuration, locations?: Array<string> | string): Array<string>;
@@ -166,7 +151,6 @@ export declare class PluginAPI {
166
151
  * @param plugins - List of acctive plugins.
167
152
  * @param filePath - Path to search for.
168
153
  * @param locations - Locations to search in.
169
- *
170
154
  * @returns A boolean indicating whether given file path is in provided
171
155
  * locations.
172
156
  */
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/type.d.ts CHANGED
@@ -1,20 +1,14 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- /// <reference types="node" />
4
- import Tools from 'clientnode';
5
- import { Encoding, Mapping, RecursiveEvaluateable, RecursivePartial } from 'clientnode/type';
1
+ import { Encoding, Mapping, RecursiveEvaluateable, RecursivePartial, UTILITY_SCOPE } from 'clientnode';
6
2
  import { PluginAPI } from './pluginAPI';
7
- export interface EvaluateConfigurationScope {
3
+ export type EvaluateConfigurationScope = typeof UTILITY_SCOPE & {
8
4
  currentPath: string;
9
- fileSystem: typeof import('fs');
5
+ fs: typeof import('fs');
10
6
  path: typeof import('path');
11
7
  PluginAPI: PluginAPI;
12
- require: typeof require;
13
- Tools: typeof Tools;
14
8
  webNodePath: string;
15
9
  now: Date;
16
10
  nowUTCTimestamp: number;
17
- }
11
+ };
18
12
  export interface MetaPluginConfiguration {
19
13
  fileNames: Array<string>;
20
14
  propertyNames: Array<string>;
@@ -153,7 +147,6 @@ export interface PluginHandler {
153
147
  * typological order. Asynchronous tasks are allowed and a returning
154
148
  * promise will be respected.
155
149
  * @param state - Application state.
156
- *
157
150
  * @returns Promise resolving to nothing.
158
151
  */
159
152
  initialize?(state: BaseState): Promise<void>;
@@ -162,7 +155,6 @@ export interface PluginHandler {
162
155
  * configuration object has been initialized. Asynchronous tasks are
163
156
  * allowed and a returning promise will be respected.
164
157
  * @param state - Application state.
165
- *
166
158
  * @returns Promise resolving to nothing.
167
159
  */
168
160
  preConfigurationLoaded?(state: ChangedConfigurationState): Promise<void>;
@@ -171,7 +163,6 @@ export interface PluginHandler {
171
163
  * configuration object has been initialized. Asynchronous tasks are
172
164
  * allowed and a returning promise will be respected.
173
165
  * @param state - Application state.
174
- *
175
166
  * @returns Promise resolving to nothing.
176
167
  */
177
168
  postConfigurationLoaded?(state: ChangedConfigurationState): Promise<void>;
@@ -180,7 +171,6 @@ export interface PluginHandler {
180
171
  * continues running services (if they have one). Asynchronous tasks are
181
172
  * allowed and a returning promise will be respected.
182
173
  * @param state - Application state.
183
- *
184
174
  * @returns Promise resolving to given and maybe extended object of
185
175
  * services.
186
176
  */
@@ -190,7 +180,6 @@ export interface PluginHandler {
190
180
  * continues running services (if they have one). Asynchronous tasks are
191
181
  * allowed and a returning promise will be respected.
192
182
  * @param state - Application state.
193
- *
194
183
  * @returns Promise resolving to given and maybe extended object of
195
184
  * services.
196
185
  */
@@ -201,7 +190,6 @@ export interface PluginHandler {
201
190
  * respected NOTE: You have to wrap a promise in a promise if a continues
202
191
  * service should be registered.
203
192
  * @param state - Application state.
204
- *
205
193
  * @returns A mapping to promises which correspond to the plugin specific
206
194
  * continues services.
207
195
  */
@@ -210,7 +198,6 @@ export interface PluginHandler {
210
198
  * Plugins have launched their continues running services and returned a
211
199
  * corresponding promise which can be observed here.
212
200
  * @param state - Application state.
213
- *
214
201
  * @returns A promise which correspond to the plugin specific continues
215
202
  * service.
216
203
  */
@@ -218,7 +205,6 @@ export interface PluginHandler {
218
205
  * Plugins have launched their continues running services and returned a
219
206
  * corresponding promise which can be observed here.
220
207
  * @param state - Application state.
221
- *
222
208
  * @returns A promise which correspond to the plugin specific continues
223
209
  * service promises.
224
210
  */
@@ -228,7 +214,6 @@ export interface PluginHandler {
228
214
  * configuration object has been changed. Asynchronous tasks are allowed
229
215
  * and a returning promise will be respected.
230
216
  * @param state - Application state.
231
- *
232
217
  * @returns Promise resolving to nothing.
233
218
  */
234
219
  preConfigurationHotLoaded?(state: ChangedConfigurationState): Promise<void>;
@@ -237,7 +222,6 @@ export interface PluginHandler {
237
222
  * configuration object has been changed. Asynchronous tasks are allowed
238
223
  * and a returning promise will be respected.
239
224
  * @param state - Application state.
240
- *
241
225
  * @returns Promise resolving to nothing.
242
226
  */
243
227
  postConfigurationHotLoaded?(state: ChangedConfigurationState): Promise<void>;
@@ -246,7 +230,6 @@ export interface PluginHandler {
246
230
  * changed and is reloaded. Asynchronous tasks are allowed and a returning
247
231
  * promise will be respected.
248
232
  * @param state - Application state.
249
- *
250
233
  * @returns Promise resolving to nothing.
251
234
  */
252
235
  apiFileReloaded?(state: ChangedAPIFileState): Promise<void>;
@@ -254,7 +237,6 @@ export interface PluginHandler {
254
237
  * Application has thrown an error and will be closed soon. Asynchronous
255
238
  * tasks are allowed and a returning promise will be respected.
256
239
  * @param state - Application state.
257
- *
258
240
  * @returns Promise resolving to nothing.
259
241
  */
260
242
  error?(state: ServicesState): Promise<void>;
@@ -262,7 +244,6 @@ export interface PluginHandler {
262
244
  * Triggers if application will be closed soon. Asynchronous tasks are
263
245
  * allowed and a returning promise will be respected.
264
246
  * @param state - Application state.
265
- *
266
247
  * @returns Promise resolving to nothing.
267
248
  */
268
249
  shouldExit?(state: ServicePromisesState): Promise<void>;
@@ -270,7 +251,6 @@ export interface PluginHandler {
270
251
  * Triggers if application will be closed immediately no asynchronous tasks
271
252
  * allowed anymore.
272
253
  * @param state - Application state.
273
- *
274
254
  * @returns Nothing.
275
255
  */
276
256
  exit?(state: ServicePromisesState): void;
package/unixCrypt.d.ts CHANGED
@@ -5,7 +5,6 @@
5
5
  * [a-zA-Z0-9./]).
6
6
  * @param returnBytes - If "true", return an array of bytes or a string
7
7
  * otherwise.
8
- *
9
8
  * @returns Returns crypted or encrypted buffer or string.
10
9
  */
11
10
  export declare function unixCrypt(givenPassword: Array<number> | string, givenSalt?: Array<number> | string, returnBytes?: boolean): Array<number> | string;
package/unixCrypt.js CHANGED
File without changes