web-node 1.0.621 → 1.0.622
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 +3 -3
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -217,7 +217,7 @@ api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=argume
|
|
|
217
217
|
Load main plugin configuration at first.
|
|
218
218
|
|
|
219
219
|
NOTE: If application's main is this itself avoid loading it twice.
|
|
220
|
-
*/if(!(configuration.name!=="web-node")){_context1.n=2;break}_configuration=configuration,_name2=_configuration.name;_internalName=determineInternalName(_name2,new RegExp((_configuration$core$p=configuration.core.plugin.directories.external.nameRegularExpressionPattern)!==null&&_configuration$core$p!==void 0?_configuration$core$p:configuration.core.plugin.nameRegularExpressionPattern));_context1.n=1;return load(configuration[_internalName].package.name||_name2,_internalName,plugins,configuration.core.plugin.configuration,configuration.core.context.path,configuration.core.encoding);case 1:plugins[_name2]=_context1.v;case 2:_i6=0,_Object$values=Object.values(configuration.core.plugin.directories);case 3:if(!(_i6<_Object$values.length)){_context1.n=17;break}directory=_Object$values[_i6];_context1.n=4;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isDirectory)(directory.path);case 4:if(!_context1.v){_context1.n=16;break}compiledRegularExpression=new RegExp((_directory$nameRegula=directory.nameRegularExpressionPattern)!==null&&_directory$nameRegula!==void 0?_directory$nameRegula:configuration.core.plugin.nameRegularExpressionPattern);_t27=_createForOfIteratorHelper;_context1.n=5;return (0,fs_promises__WEBPACK_IMPORTED_MODULE_4__.readdir)(directory.path);case 5:_iterator11=_t27(_context1.v);_context1.p=6;_iterator11.s();case 7:if((_step11=_iterator11.n()).done){_context1.n=13;break}pluginName=_step11.value;if(compiledRegularExpression.test(pluginName)){_context1.n=8;break}return _context1.a(3,12);case 8:currentPluginPath=(0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(directory.path,pluginName);if(!Object.prototype.hasOwnProperty.call(plugins,pluginName)){_context1.n=10;break}plugins[pluginName].path=currentPluginPath;_context1.n=9;return gatherConfigurationFilePaths(currentPluginPath,configuration.core.plugin.configuration.fileNames);case 9:plugins[pluginName].configurationFilePaths=_context1.v;return _context1.a(3,12);case 10:_internalName2=determineInternalName(pluginName,compiledRegularExpression);_context1.n=11;return load(pluginName,_internalName2,plugins,configuration.core.plugin.configuration,currentPluginPath,configuration.core.encoding);case 11:plugins[pluginName]=_context1.v;case 12:_context1.n=7;break;case 13:_context1.n=15;break;case 14:_context1.p=14;_t28=_context1.v;_iterator11.e(_t28);case 15:_context1.p=15;_iterator11.f();return _context1.f(15);case 16:_i6++;_context1.n=3;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)){_iterator12=_createForOfIteratorHelper([].concat(configuration.core.interDependencies[_plugin.internalName]));try{for(_iterator12.s();!(_step12=_iterator12.n()).done;){_name3=_step12.value;if(!temporaryPlugins[_plugin.internalName].includes(_name3))temporaryPlugins[_plugin.internalName].push(_name3)}}catch(err){_iterator12.e(err)}finally{_iterator12.f()}}}sortedPlugins=[];_iterator13=_createForOfIteratorHelper((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.sortTopological)(temporaryPlugins));_context1.p=18;_iterator13.s();case 19:if((_step13=_iterator13.n()).done){_context1.n=23;break}_pluginName=_step13.value;_i8=0,_Object$entries5=Object.entries(plugins);case 20:if(!(_i8<_Object$entries5.length)){_context1.n=22;break}_Object$entries5$_i=_slicedToArray(_Object$entries5[_i8],2),_name4=_Object$entries5$_i[0],_plugin2=_Object$entries5$_i[1];if(![_plugin2.internalName,_name4].includes(_pluginName)){_context1.n=21;break}sortedPlugins.push(_plugin2);return _context1.a(3,22);case 21:_i8++;_context1.n=20;break;case 22:_context1.n=19;break;case 23:_context1.n=25;break;case 24:_context1.p=24;_t29=_context1.v;_iterator13.e(_t29);case 25:_context1.p=25;_iterator13.f();return _context1.f(25);case 26:_context1.n=27;return loadConfigurations(sortedPlugins,configuration);case 27:configuration=_context1.v;
|
|
220
|
+
*/if(!(configuration.name!=="web-node")){_context1.n=2;break}_configuration=configuration,_name2=_configuration.name;_internalName=determineInternalName(_name2,new RegExp((_configuration$core$p=configuration.core.plugin.directories.external.nameRegularExpressionPattern)!==null&&_configuration$core$p!==void 0?_configuration$core$p:configuration.core.plugin.nameRegularExpressionPattern));_context1.n=1;return load(configuration[_internalName].package.name||_name2,_internalName,plugins,configuration.core.plugin.configuration,configuration.core.context.path,configuration.core.encoding);case 1:plugins[_name2]=_context1.v;case 2:_i6=0,_Object$values=Object.values(configuration.core.plugin.directories);case 3:if(!(_i6<_Object$values.length)){_context1.n=17;break}directory=_Object$values[_i6];_context1.n=4;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isDirectory)(directory.path);case 4:if(!_context1.v){_context1.n=16;break}compiledRegularExpression=new RegExp((_directory$nameRegula=directory.nameRegularExpressionPattern)!==null&&_directory$nameRegula!==void 0?_directory$nameRegula:configuration.core.plugin.nameRegularExpressionPattern);_t27=_createForOfIteratorHelper;_context1.n=5;return (0,fs_promises__WEBPACK_IMPORTED_MODULE_4__.readdir)(directory.path);case 5:_iterator11=_t27(_context1.v);_context1.p=6;_iterator11.s();case 7:if((_step11=_iterator11.n()).done){_context1.n=13;break}pluginName=_step11.value;if(compiledRegularExpression.test(pluginName)){_context1.n=8;break}return _context1.a(3,12);case 8:currentPluginPath=(0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(directory.path,pluginName);if(!Object.prototype.hasOwnProperty.call(plugins,pluginName)){_context1.n=10;break}plugins[pluginName].path=currentPluginPath;_context1.n=9;return gatherConfigurationFilePaths(currentPluginPath,configuration.core.plugin.configuration.fileNames);case 9:plugins[pluginName].configurationFilePaths=_context1.v;return _context1.a(3,12);case 10:_internalName2=determineInternalName(pluginName,compiledRegularExpression);_context1.n=11;return load(pluginName,_internalName2,plugins,configuration.core.plugin.configuration,currentPluginPath,configuration.core.encoding);case 11:plugins[pluginName]=_context1.v;case 12:_context1.n=7;break;case 13:_context1.n=15;break;case 14:_context1.p=14;_t28=_context1.v;_iterator11.e(_t28);case 15:_context1.p=15;_iterator11.f();return _context1.f(15);case 16:_i6++;_context1.n=3;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)){_iterator12=_createForOfIteratorHelper([].concat(configuration.core.interDependencies[_plugin.internalName]));try{for(_iterator12.s();!(_step12=_iterator12.n()).done;){_name3=_step12.value;if(!temporaryPlugins[_plugin.internalName].includes(_name3))temporaryPlugins[_plugin.internalName].push(_name3)}}catch(err){_iterator12.e(err)}finally{_iterator12.f()}}}sortedPlugins=[];_iterator13=_createForOfIteratorHelper((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.sortTopological)(temporaryPlugins));_context1.p=18;_iterator13.s();case 19:if((_step13=_iterator13.n()).done){_context1.n=23;break}_pluginName=_step13.value;_i8=0,_Object$entries5=Object.entries(plugins);case 20:if(!(_i8<_Object$entries5.length)){_context1.n=22;break}_Object$entries5$_i=_slicedToArray(_Object$entries5[_i8],2),_name4=_Object$entries5$_i[0],_plugin2=_Object$entries5$_i[1];if(![_plugin2.internalName,_name4].includes(_pluginName)){_context1.n=21;break}sortedPlugins.push(_plugin2);return _context1.a(3,22);case 21:_i8++;_context1.n=20;break;case 22:_context1.n=19;break;case 23:_context1.n=25;break;case 24:_context1.p=24;_t29=_context1.v;_iterator13.e(_t29);case 25:_context1.p=25;_iterator13.f();return _context1.f(25);case 26:_context1.n=27;return loadConfigurations(sortedPlugins,configuration);case 27:configuration=_context1.v;return _context1.a(2,{configuration:configuration,plugins:sortedPlugins})}},_callee1,null,[[18,24,25,26],[6,14,15,16]])}));function loadAll(_x28){return _loadAll.apply(this,arguments)}return loadAll}();/**
|
|
221
221
|
* Transform a list of absolute paths respecting the application context.
|
|
222
222
|
* @param configuration - Configuration object.
|
|
223
223
|
* @param configuration.core - Sub configuration web-node.
|
|
@@ -307,7 +307,7 @@ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof
|
|
|
307
307
|
_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,/*
|
|
308
308
|
NOTE: "object.modifyObject" removes modifications in "result"
|
|
309
309
|
in-place before it is used as extending source.
|
|
310
|
-
*/(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.modifyObject)(configuration,result),result);configuration.core.runtimeConfiguration=result}configuration=await (0,clientnode__WEBPACK_IMPORTED_MODULE_0__.evaluateAsyncDynamicData)((0,clientnode__WEBPACK_IMPORTED_MODULE_0__.evaluateDynamicData)((0,clientnode__WEBPACK_IMPORTED_MODULE_0__.removeKeysInEvaluation)(configuration),{scope:_objectSpread(_objectSpread({},scope),{},{fs:fs__WEBPACK_IMPORTED_MODULE_1__["default"]})}),{scope:scope});configuration.name=name;configuration.core.package=_package_json__WEBPACK_IMPORTED_MODULE_4__;configuration[name].package=mainPackageConfiguration;/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (configuration);
|
|
310
|
+
*/(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.modifyObject)(configuration,result),result);configuration.core.runtimeConfiguration=result}configuration=await (0,clientnode__WEBPACK_IMPORTED_MODULE_0__.evaluateAsyncDynamicData)((0,clientnode__WEBPACK_IMPORTED_MODULE_0__.evaluateDynamicData)((0,clientnode__WEBPACK_IMPORTED_MODULE_0__.removeKeysInEvaluation)(configuration),{scope:_objectSpread(_objectSpread({},scope),{},{fs:fs__WEBPACK_IMPORTED_MODULE_1__["default"]})}),{scope:scope});configuration.name=name;configuration.core.package=_package_json__WEBPACK_IMPORTED_MODULE_4__;if(Object.prototype.hasOwnProperty.call(configuration,name))configuration[name].package=mainPackageConfiguration;/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (configuration);
|
|
311
311
|
__webpack_async_result__();
|
|
312
312
|
} catch(e) { __webpack_async_result__(e); } }, 1);
|
|
313
313
|
|
|
@@ -428,7 +428,7 @@ __webpack_async_result__();
|
|
|
428
428
|
/* 8 */
|
|
429
429
|
/***/ ((module) => {
|
|
430
430
|
|
|
431
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"web-node","version":"1.0.
|
|
431
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"web-node","version":"1.0.622","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.5.1","@types/webpack-env":"^1.18.8","@typescript-eslint/eslint-plugin":"^8.70.0","@typescript-eslint/parser":"^8.70.0","clientnode":"^4.0.1514","eslint":"^10.10.0","eslint-config-google":"^0.14.0","eslint-plugin-jsdoc":"^64.3.9","jest":"^30.5.1","jsdoc":"^4.0.5","shx":"^0.4.0","typescript-eslint":"^8.70.0","web-documentation":"^1.0.52","weboptimizer":"^4.0.79"},"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"},"webpack":{"module":{"parser":{"javascript":{"importMeta":{"#":"NOTE: This allows as to access node\'s native \\"import.meta.url\\" runtime value for determining the main module.","url":false}}}}}},"packageManager":"yarn@4.18.0"}');
|
|
432
432
|
|
|
433
433
|
/***/ }),
|
|
434
434
|
/* 9 */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "web-node",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.622",
|
|
4
4
|
"description": "High level javaScript backend plugin system and configuration merger.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@babel/eslint-parser": "^8.0.1",
|
|
71
71
|
"@eslint/js": "^10.0.1",
|
|
72
72
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
73
|
-
"@types/node": "^
|
|
73
|
+
"@types/node": "^26.5.1",
|
|
74
74
|
"@types/webpack-env": "^1.18.8",
|
|
75
75
|
"@typescript-eslint/eslint-plugin": "^8.70.0",
|
|
76
76
|
"@typescript-eslint/parser": "^8.70.0",
|