web-node 1.0.587 → 1.0.590
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 +52 -40
- package/package.json +10 -10
- package/type.d.ts +1 -1
package/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import * as __WEBPACK_EXTERNAL_MODULE_child_process__ from "child_process";
|
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE_clientnode__ from "clientnode";
|
|
7
7
|
import * as __WEBPACK_EXTERNAL_MODULE_core_js_modules_es_array_includes_js_66c3fd7d__ from "core-js/modules/es.array.includes.js";
|
|
8
8
|
import * as __WEBPACK_EXTERNAL_MODULE_fs__ from "fs";
|
|
9
|
+
import * as __WEBPACK_EXTERNAL_MODULE_fs_promises_cc1b69f3__ from "fs/promises";
|
|
9
10
|
import * as __WEBPACK_EXTERNAL_MODULE_node_url_50af3bb5__ from "node:url";
|
|
10
11
|
import * as __WEBPACK_EXTERNAL_MODULE_path__ from "path";
|
|
11
12
|
/******/ var __webpack_modules__ = ([
|
|
@@ -33,16 +34,17 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
|
|
|
33
34
|
/* harmony export */ vF: () => (/* binding */ loadConfiguration)
|
|
34
35
|
/* harmony export */ });
|
|
35
36
|
/* unused harmony export log */
|
|
36
|
-
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
37
|
-
/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
37
|
+
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
|
|
38
|
+
/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
|
|
38
39
|
/* harmony import */ var clientnode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
|
|
39
40
|
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
|
|
40
|
-
/* harmony import */ var
|
|
41
|
-
/* harmony import */ var
|
|
41
|
+
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4);
|
|
42
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5);
|
|
43
|
+
/* harmony import */ var _configurator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2);
|
|
42
44
|
/* module decorator */ module = __webpack_require__.hmd(module);
|
|
43
|
-
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([
|
|
45
|
+
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_configurator_js__WEBPACK_IMPORTED_MODULE_6__]);
|
|
44
46
|
var __webpack_async_dependencies_result__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
|
|
45
|
-
|
|
47
|
+
_configurator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_async_dependencies_result__[0];
|
|
46
48
|
// #!/usr/bin/env babel-node
|
|
47
49
|
// -*- coding: utf-8 -*-
|
|
48
50
|
/** @module pluginAPI *//* !
|
|
@@ -122,7 +124,7 @@ register('./main-module-hook.js', {
|
|
|
122
124
|
NOTE: We have to back up, remove and restore all plugin specific
|
|
123
125
|
package configuration to avoid evaluation non web node#
|
|
124
126
|
configuration structures.
|
|
125
|
-
*/pluginPackageConfigurationBackup={};for(_i=0,_Object$entries=Object.entries(configuration);_i<_Object$entries.length;_i++){_Object$entries$_i=_slicedToArray(_Object$entries[_i],2),name=_Object$entries$_i[0],subConfiguration=_Object$entries$_i[1];if(subConfiguration.package){pluginPackageConfigurationBackup[name]=subConfiguration.package;delete subConfiguration.package}}now=new Date;evaluationOptions={scope:_objectSpread(_objectSpread({},clientnode__WEBPACK_IMPORTED_MODULE_2__.UTILITY_SCOPE),{},{currentPath:process.cwd(),fs:
|
|
127
|
+
*/pluginPackageConfigurationBackup={};for(_i=0,_Object$entries=Object.entries(configuration);_i<_Object$entries.length;_i++){_Object$entries$_i=_slicedToArray(_Object$entries[_i],2),name=_Object$entries$_i[0],subConfiguration=_Object$entries$_i[1];if(subConfiguration.package){pluginPackageConfigurationBackup[name]=subConfiguration.package;delete subConfiguration.package}}now=new Date;evaluationOptions={scope:_objectSpread(_objectSpread({},clientnode__WEBPACK_IMPORTED_MODULE_2__.UTILITY_SCOPE),{},{currentPath:process.cwd(),fs:fs_promises__WEBPACK_IMPORTED_MODULE_4__["default"],path:path__WEBPACK_IMPORTED_MODULE_5__["default"],module:module,webNodePath:__webpack_dirname__,now:now,nowUTCTimestamp:(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.getUTCTimestamp)(now)})};_context2.n=1;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.evaluateAsyncDynamicData)((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.evaluateDynamicData)((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.removeKeysInEvaluation)(configuration),_objectSpread(_objectSpread({},evaluationOptions),{},{scope:_objectSpread(_objectSpread({},evaluationOptions.scope),{},{fs:fs__WEBPACK_IMPORTED_MODULE_3__["default"]})})),evaluationOptions);case 1:configuration=_context2.v;for(_i2=0,_Object$entries2=Object.entries(pluginPackageConfigurationBackup);_i2<_Object$entries2.length;_i2++){_Object$entries2$_i=_slicedToArray(_Object$entries2[_i2],2),_name=_Object$entries2$_i[0],pluginPackageConfiguration=_Object$entries2$_i[1];configuration[_name].package=pluginPackageConfiguration}return _context2.a(2,configuration)}},_callee2)}));function evaluateConfiguration(_x2){return _evaluateConfiguration.apply(this,arguments)}return evaluateConfiguration}();/**
|
|
126
128
|
* Checks for changed plugin api file in given plugins and reloads them if
|
|
127
129
|
* necessary (new timestamp).
|
|
128
130
|
* @param plugins - List of plugins to search for updates in.
|
|
@@ -143,7 +145,7 @@ for(_i3=0,_Object$entries3=Object.entries(pluginChange.oldScope);_i3<_Object$ent
|
|
|
143
145
|
* which should be updated.
|
|
144
146
|
* @param plugins - List of plugins to search for updates in.
|
|
145
147
|
* @returns A list with plugin changes.
|
|
146
|
-
*/var hotReloadFiles=/*#__PURE__*/function(){var _hotReloadFiles=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(type,target,plugins){var pluginChanges,_iterator5,_step5,plugin,index,_iterator6,_step6,filePath,timestamp,oldScope,_t3,_t4;return _regenerator().w(function(_context5){while(1)switch(_context5.p=_context5.n){case 0:pluginChanges=[];_iterator5=_createForOfIteratorHelper(plugins);_context5.p=1;_iterator5.s();case 2:if((_step5=_iterator5.n()).done){_context5.n=
|
|
148
|
+
*/var hotReloadFiles=/*#__PURE__*/function(){var _hotReloadFiles=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(type,target,plugins){var pluginChanges,_iterator5,_step5,plugin,index,_iterator6,_step6,filePath,timestamp,oldScope,_t3,_t4;return _regenerator().w(function(_context5){while(1)switch(_context5.p=_context5.n){case 0:pluginChanges=[];_iterator5=_createForOfIteratorHelper(plugins);_context5.p=1;_iterator5.s();case 2:if((_step5=_iterator5.n()).done){_context5.n=13;break}plugin=_step5.value;if(!plugin[target]){_context5.n=12;break}index=0;_iterator6=_createForOfIteratorHelper(plugin["".concat(type,"FilePaths")]);_context5.p=3;_iterator6.s();case 4:if((_step6=_iterator6.n()).done){_context5.n=9;break}filePath=_step6.value;_context5.n=5;return (0,fs_promises__WEBPACK_IMPORTED_MODULE_4__.stat)(filePath);case 5:timestamp=_context5.v.mtime.getTime();if(!(plugin["".concat(type,"FileLoadTimestamps")][index]<timestamp)){_context5.n=7;break}log.info("Determined updated file \"".concat(filePath,"\"."),"Doing a reload.");oldScope=plugin[target];_context5.n=6;return loadFile(filePath,plugin.name,plugin[target]);case 6:plugin[target]=_context5.v;log.info("File \"".concat(filePath,"\" reloaded."));pluginChanges.push({newScope:plugin[target],oldScope:oldScope,plugin:plugin,target:target});case 7:plugin["".concat(type,"FileLoadTimestamps")][index]=timestamp;index+=1;case 8:_context5.n=4;break;case 9:_context5.n=11;break;case 10:_context5.p=10;_t3=_context5.v;_iterator6.e(_t3);case 11:_context5.p=11;_iterator6.f();return _context5.f(11);case 12:_context5.n=2;break;case 13:_context5.n=15;break;case 14:_context5.p=14;_t4=_context5.v;_iterator5.e(_t4);case 15:_context5.p=15;_iterator5.f();return _context5.f(15);case 16:return _context5.a(2,pluginChanges)}},_callee5,null,[[3,10,11,12],[1,14,15,16]])}));function hotReloadFiles(_x6,_x7,_x8){return _hotReloadFiles.apply(this,arguments)}return hotReloadFiles}();/**
|
|
147
149
|
* Extends given configuration object with given plugin specific ones and
|
|
148
150
|
* returns a plugin specific meta information object.
|
|
149
151
|
* @param name - Name of plugin to extend.
|
|
@@ -153,7 +155,7 @@ for(_i3=0,_Object$entries3=Object.entries(pluginChange.oldScope);_i3<_Object$ent
|
|
|
153
155
|
* @param pluginPath - Path to given plugin.
|
|
154
156
|
* @param encoding - Encoding to use to read and write from child process's.
|
|
155
157
|
* @returns An object of plugin specific meta information.
|
|
156
|
-
*/var load=/*#__PURE__*/function(){var _load=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(name,internalName,plugins,metaConfiguration,pluginPath,encoding){var configurationFilePaths,packageConfiguration,_iterator7,_step7,fileName,filePath,sourceConfiguration,apiFilePaths,configuration,_t5;return _regenerator().w(function(_context6){while(1)switch(_context6.p=_context6.n){case 0:if(encoding===void 0){encoding="utf8"}configurationFilePaths=[];packageConfiguration={};_iterator7=_createForOfIteratorHelper(metaConfiguration.fileNames);_context6.p=1;_iterator7.s();case 2:if((_step7=_iterator7.n()).done){_context6.n=6;break}fileName=_step7.value;filePath=(0,
|
|
158
|
+
*/var load=/*#__PURE__*/function(){var _load=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(name,internalName,plugins,metaConfiguration,pluginPath,encoding){var configurationFilePaths,packageConfiguration,_iterator7,_step7,fileName,filePath,sourceConfiguration,apiFilePaths,configuration,_t5;return _regenerator().w(function(_context6){while(1)switch(_context6.p=_context6.n){case 0:if(encoding===void 0){encoding="utf8"}configurationFilePaths=[];packageConfiguration={};_iterator7=_createForOfIteratorHelper(metaConfiguration.fileNames);_context6.p=1;_iterator7.s();case 2:if((_step7=_iterator7.n()).done){_context6.n=6;break}fileName=_step7.value;filePath=(0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(pluginPath,fileName);_context6.n=3;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isFile)(filePath);case 3:if(!_context6.v){_context6.n=5;break}_context6.n=4;return loadFile(filePath,name);case 4:sourceConfiguration=_context6.v;(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.extend)(true,/*
|
|
157
159
|
NOTE: Source and target configuration got modified.
|
|
158
160
|
While the target configuration receives the modifications
|
|
159
161
|
the source configuration will lose their modification
|
|
@@ -172,15 +174,14 @@ for(_i3=0,_Object$entries3=Object.entries(pluginChange.oldScope);_i3<_Object$ent
|
|
|
172
174
|
* @param configuration - Plugin specific configurations.
|
|
173
175
|
* @param configurationFilePaths - Plugin specific configuration file paths.
|
|
174
176
|
* @returns Plugin meta information object.
|
|
175
|
-
*/var loadAPI=/*#__PURE__*/function(){var _loadAPI=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
176
|
-
_iterator8=_createForOfIteratorHelper((0,fs__WEBPACK_IMPORTED_MODULE_3__.readdirSync)(pluginPath));_context7.p=2;_iterator8.s();case 3:if((_step8=_iterator8.n()).done){_context7.n=7;break}fileName=_step8.value;_t6=!configurationFilePaths.map(function(filePath){return (0,path__WEBPACK_IMPORTED_MODULE_4__.basename)(filePath)}).includes(fileName);if(!_t6){_context7.n=5;break}_context7.n=4;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isFile)((0,path__WEBPACK_IMPORTED_MODULE_4__.resolve)(pluginPath,fileName));case 4:_t6=_context7.v;case 5:if(!_t6){_context7.n=6;break}filePath=(0,path__WEBPACK_IMPORTED_MODULE_4__.resolve)(pluginPath,filePath);if(!["index","main"].includes((0,path__WEBPACK_IMPORTED_MODULE_4__.basename)(filePath,(0,path__WEBPACK_IMPORTED_MODULE_4__.extname)(fileName)))){_context7.n=6;break}return _context7.a(3,7);case 6:_context7.n=3;break;case 7:_context7.n=9;break;case 8:_context7.p=8;_t7=_context7.v;_iterator8.e(_t7);case 9:_context7.p=9;_iterator8.f();return _context7.f(9);case 10:api=null;nativeAPI=false;_t8=configuration&&(/*
|
|
177
|
+
*/var loadAPI=/*#__PURE__*/function(){var _loadAPI=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8(relativeFilePaths,pluginPath,name,internalName,plugins,encoding,configuration,configurationFilePaths){var filePath,_iterator8,_step8,fileName,api,nativeAPI,pluginConfiguration,_t6,_t7,_t8,_t9,_t0,_t1,_t10,_t11,_t12,_t13,_t14,_t15,_t16,_t17,_t18,_t19,_t20,_t21,_t22;return _regenerator().w(function(_context8){while(1)switch(_context8.p=_context8.n){case 0:if(encoding===void 0){encoding="utf8"}if(configuration===void 0){configuration=null}if(configurationFilePaths===void 0){configurationFilePaths=[]}filePath=(0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(pluginPath,relativeFilePaths[0]);_context8.n=1;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isFile)(filePath);case 1:if(_context8.v){_context8.n=11;break}_t6=_createForOfIteratorHelper;_context8.n=2;return (0,fs_promises__WEBPACK_IMPORTED_MODULE_4__.readdir)(pluginPath);case 2:_iterator8=_t6(_context8.v);_context8.p=3;_iterator8.s();case 4:if((_step8=_iterator8.n()).done){_context8.n=8;break}fileName=_step8.value;_t7=!configurationFilePaths.map(function(filePath){return (0,path__WEBPACK_IMPORTED_MODULE_5__.basename)(filePath)}).includes(fileName);if(!_t7){_context8.n=6;break}_context8.n=5;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isFile)((0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(pluginPath,fileName));case 5:_t7=_context8.v;case 6:if(!_t7){_context8.n=7;break}filePath=(0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(pluginPath,filePath);if(!["index","main"].includes((0,path__WEBPACK_IMPORTED_MODULE_5__.basename)(filePath,(0,path__WEBPACK_IMPORTED_MODULE_5__.extname)(fileName)))){_context8.n=7;break}return _context8.a(3,8);case 7:_context8.n=4;break;case 8:_context8.n=10;break;case 9:_context8.p=9;_t8=_context8.v;_iterator8.e(_t8);case 10:_context8.p=10;_iterator8.f();return _context8.f(10);case 11:api=null;nativeAPI=false;_t9=configuration&&(/*
|
|
177
178
|
NOTE: Check if a webNode plugin configuration is available
|
|
178
179
|
indicating a backend responsibility for api file.
|
|
179
180
|
|
|
180
181
|
NOTE: One key is always there representing the whole package
|
|
181
182
|
configuration.
|
|
182
|
-
*/Object.keys(configuration).length>1||Object.prototype.hasOwnProperty.call(configuration,internalName)&&Object.keys(configuration[internalName]).length>1);if(!
|
|
183
|
-
api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=arguments.length,parameters=new Array(_len4>1?_len4-1:0),_key4=1;_key4<_len4;_key4++){parameters[_key4-1]=arguments[_key4]}var childProcessResult=(0,child_process__WEBPACK_IMPORTED_MODULE_1__.spawnSync)(filePath,[hook].concat(_toConsumableArray(parameters.map(function(item){return JSON.stringify(item)}))),{cwd:process.cwd(),encoding:encoding,env:process.env,input:JSON.stringify(data),shell:true,stdio:"inherit"});if(childProcessResult.status===404)return data;var jsonIndicatorPrefix="##!JSON!##";if(childProcessResult.stdout.startsWith(jsonIndicatorPrefix))return JSON.parse(childProcessResult.stdout.substring(jsonIndicatorPrefix.length));return data};case
|
|
183
|
+
*/Object.keys(configuration).length>1||Object.prototype.hasOwnProperty.call(configuration,internalName)&&Object.keys(configuration[internalName]).length>1);if(!_t9){_context8.n=13;break}_context8.n=12;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isFile)(filePath);case 12:_t9=_context8.v;case 13:if(!_t9){_context8.n=14;break}if(filePath.endsWith(".js")){nativeAPI=true;api=function api(state){var _ref;for(var _len3=arguments.length,parameters=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++){parameters[_key3-1]=arguments[_key3]}if(plugins[name].scope&&state.hook in plugins[name].scope)return(_ref=plugins[name].scope)[state.hook].apply(_ref,[state].concat(parameters,[module]));throw new Error("NotImplemented: API method \"".concat(state.hook,"\" is not ")+"implemented in plugin \"".concat(name,"\"."))}}else// NOTE: Any executable file can represent an api.
|
|
184
|
+
api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=arguments.length,parameters=new Array(_len4>1?_len4-1:0),_key4=1;_key4<_len4;_key4++){parameters[_key4-1]=arguments[_key4]}var childProcessResult=(0,child_process__WEBPACK_IMPORTED_MODULE_1__.spawnSync)(filePath,[hook].concat(_toConsumableArray(parameters.map(function(item){return JSON.stringify(item)}))),{cwd:process.cwd(),encoding:encoding,env:process.env,input:JSON.stringify(data),shell:true,stdio:"inherit"});if(childProcessResult.status===404)return data;var jsonIndicatorPrefix="##!JSON!##";if(childProcessResult.stdout.startsWith(jsonIndicatorPrefix))return JSON.parse(childProcessResult.stdout.substring(jsonIndicatorPrefix.length));return data};case 14:pluginConfiguration=configuration!==null&&configuration!==void 0?configuration:_defineProperty({},internalName,{package:{}});_t0=api;if(!api){_context8.n=16;break}_context8.n=15;return (0,fs_promises__WEBPACK_IMPORTED_MODULE_4__.stat)(filePath);case 15:_t10=_context8.v.mtime.getTime();_t1=[_t10];_context8.n=17;break;case 16:_t1=[];case 17:_t11=_t1;_t12=api?[filePath]:[];_t13=pluginConfiguration;_t14=configurationFilePaths;_context8.n=18;return Promise.all(configurationFilePaths.map(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(filePath){return _regenerator().w(function(_context7){while(1)switch(_context7.n){case 0:_context7.n=1;return (0,fs_promises__WEBPACK_IMPORTED_MODULE_4__.stat)(filePath);case 1:return _context7.a(2,_context7.v.mtime.getTime())}},_callee7)}))));case 18:_t15=_context8.v;_t16=Object.prototype.hasOwnProperty.call(pluginConfiguration,internalName)&&pluginConfiguration[internalName].dependencies?pluginConfiguration[internalName].dependencies:[];_t17=internalName;_t18=name;_t19=pluginConfiguration[internalName].package;_t20=pluginPath;if(!nativeAPI){_context8.n=20;break}_context8.n=19;return loadFile(filePath,name);case 19:_t21=_context8.v;_context8.n=21;break;case 20:_t21=null;case 21:_t22=_t21;return _context8.a(2,{api:_t0,apiFileLoadTimestamps:_t11,apiFilePaths:_t12,configuration:_t13,configurationFilePaths:_t14,configurationFileLoadTimestamps:_t15,dependencies:_t16,internalName:_t17,name:_t18,packageConfiguration:_t19,path:_t20,scope:_t22})}},_callee8,null,[[3,9,10,11]])}));function loadAPI(_x13,_x14,_x15,_x16,_x17,_x18,_x19,_x20){return _loadAPI.apply(this,arguments)}return loadAPI}();/**
|
|
184
185
|
* Loads plugin specific configuration object.
|
|
185
186
|
* @param name - Property name where to inject resolved configuration into
|
|
186
187
|
* global one.
|
|
@@ -204,7 +205,7 @@ api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=argume
|
|
|
204
205
|
*/var loadConfigurations=function loadConfigurations(plugins,configuration){/*
|
|
205
206
|
First clear current configuration content key by key to let old top
|
|
206
207
|
level configuration object instance untouched.
|
|
207
|
-
*/for(var _i4=0,_Object$keys=Object.keys(configuration);_i4<_Object$keys.length;_i4++){var key=_Object$keys[_i4];delete configuration[key]};(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.extend)(configuration,(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.copy)(
|
|
208
|
+
*/for(var _i4=0,_Object$keys=Object.keys(configuration);_i4<_Object$keys.length;_i4++){var key=_Object$keys[_i4];delete configuration[key]};(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.extend)(configuration,(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.copy)(_configurator_js__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A));var _iterator0=_createForOfIteratorHelper(plugins),_step0;try{for(_iterator0.s();!(_step0=_iterator0.n()).done;){var plugin=_step0.value;if(Object.prototype.hasOwnProperty.call(plugin,"configuration")){var pluginConfiguration=(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.copy)(plugin.configuration);(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.extend)(true,(0,clientnode__WEBPACK_IMPORTED_MODULE_2__.modifyObject)(configuration,pluginConfiguration),/*
|
|
208
209
|
NOTE: Should be resolved via preceding
|
|
209
210
|
"object.modifyObject" call.
|
|
210
211
|
*/pluginConfiguration);/*
|
|
@@ -220,7 +221,7 @@ api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=argume
|
|
|
220
221
|
* If a "null" is given an error will be thrown.
|
|
221
222
|
* @param doLogging - Enables logging.
|
|
222
223
|
* @returns Exported api file scope.
|
|
223
|
-
*/var loadFile=/*#__PURE__*/function(){var _loadFile=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
224
|
+
*/var loadFile=/*#__PURE__*/function(){var _loadFile=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9(filePath,name,fallbackScope,doLogging){var options,scope,_t23;return _regenerator().w(function(_context9){while(1)switch(_context9.p=_context9.n){case 0:if(fallbackScope===void 0){fallbackScope=null}if(doLogging===void 0){doLogging=true}// Clear module cache if possible in the future.
|
|
224
225
|
/*
|
|
225
226
|
let reference: string | undefined
|
|
226
227
|
try {
|
|
@@ -231,17 +232,17 @@ api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=argume
|
|
|
231
232
|
|
|
232
233
|
if (reference)
|
|
233
234
|
// Clear the module cache.
|
|
234
|
-
*/options={};if((0,
|
|
235
|
+
*/options={};if((0,path__WEBPACK_IMPORTED_MODULE_5__.extname)(filePath)===".json")options.with={type:"json"};_context9.p=1;_context9.n=2;return import(/* webpackIgnore: true */"".concat(filePath,"?timestamp=").concat(String(Date.now())),options);case 2:scope=_context9.v;_context9.n=5;break;case 3:_context9.p=3;_t23=_context9.v;if(!fallbackScope){_context9.n=4;break}scope=fallbackScope;if(doLogging)log.warn("Couldn't load new api plugin file \"".concat(filePath,"\" for"),"plugin \"".concat(name,"\": ").concat((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.represent)(_t23),". Using"),"fallback one.");_context9.n=5;break;case 4:throw new Error("Couldn't load plugin file \"".concat(filePath,"\" for plugin ")+"\"".concat(name,"\": ").concat((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.represent)(_t23)),{cause:_t23});case 5:if(!(Object.prototype.hasOwnProperty.call(scope,"default")&&scope.default)){_context9.n=6;break}return _context9.a(2,scope.default);case 6:return _context9.a(2,scope)}},_callee9,null,[[1,3]])}));function loadFile(_x22,_x23,_x24,_x25){return _loadFile.apply(this,arguments)}return loadFile}();/**
|
|
235
236
|
* Extends given configuration object with all plugin specific ones and returns
|
|
236
237
|
* a topological sorted list of plugins with plugins specific meta information
|
|
237
238
|
* stored.
|
|
238
239
|
* @param configuration - Configuration object to extend and use.
|
|
239
240
|
* @returns A topological sorted list of plugins objects.
|
|
240
|
-
*/var loadAll=/*#__PURE__*/function(){var _loadAll=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
241
|
+
*/var loadAll=/*#__PURE__*/function(){var _loadAll=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0(configuration){var plugins,_i5,_Object$values,directory,compiledRegularExpression,_iterator1,_step1,pluginName,currentPluginPath,internalName,temporaryPlugins,_i6,_Object$values2,plugin,_iterator10,_step10,name,sortedPlugins,_iterator11,_step11,_pluginName,_i7,_Object$entries4,_Object$entries4$_i,_name2,_plugin,_t24,_t25,_t26,_t27,_t28;return _regenerator().w(function(_context0){while(1)switch(_context0.p=_context0.n){case 0:plugins={};/*
|
|
241
242
|
Load main plugin configuration at first.
|
|
242
243
|
|
|
243
244
|
NOTE: If application's main is this itself avoid loading it twice.
|
|
244
|
-
*/if(!(configuration.name!=="web-node")){
|
|
245
|
+
*/if(!(configuration.name!=="web-node")){_context0.n=2;break}_context0.n=1;return load(configuration.name,determineInternalName(configuration.name,new RegExp(configuration.core.plugin.directories.external.nameRegularExpressionPattern)),plugins,configuration.core.plugin.configuration,configuration.core.context.path,configuration.core.encoding);case 1:plugins[configuration.name]=_context0.v;case 2:_i5=0,_Object$values=Object.values(configuration.core.plugin.directories);case 3:if(!(_i5<_Object$values.length)){_context0.n=15;break}directory=_Object$values[_i5];_context0.n=4;return (0,clientnode__WEBPACK_IMPORTED_MODULE_2__.isDirectory)(directory.path);case 4:if(!_context0.v){_context0.n=14;break}compiledRegularExpression=new RegExp(directory.nameRegularExpressionPattern);_t24=_createForOfIteratorHelper;_context0.n=5;return (0,fs_promises__WEBPACK_IMPORTED_MODULE_4__.readdir)(directory.path);case 5:_iterator1=_t24(_context0.v);_context0.p=6;_iterator1.s();case 7:if((_step1=_iterator1.n()).done){_context0.n=11;break}pluginName=_step1.value;if(compiledRegularExpression.test(pluginName)){_context0.n=8;break}return _context0.a(3,10);case 8:currentPluginPath=(0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(directory.path,pluginName);internalName=determineInternalName(pluginName,compiledRegularExpression);_context0.n=9;return load(pluginName,internalName,plugins,configuration.core.plugin.configuration,currentPluginPath,configuration.core.encoding);case 9:plugins[pluginName]=_context0.v;case 10:_context0.n=7;break;case 11:_context0.n=13;break;case 12:_context0.p=12;_t25=_context0.v;_iterator1.e(_t25);case 13:_context0.p=13;_iterator1.f();return _context0.f(13);case 14:_i5++;_context0.n=3;break;case 15:temporaryPlugins={};for(_i6=0,_Object$values2=Object.values(plugins);_i6<_Object$values2.length;_i6++){plugin=_Object$values2[_i6];temporaryPlugins[plugin.internalName]=plugin.dependencies;if(Object.prototype.hasOwnProperty.call(configuration.core.interDependencies,plugin.internalName)){_iterator10=_createForOfIteratorHelper([].concat(configuration.core.interDependencies[plugin.internalName]));try{for(_iterator10.s();!(_step10=_iterator10.n()).done;){name=_step10.value;if(!temporaryPlugins[plugin.internalName].includes(name))temporaryPlugins[plugin.internalName].push(name)}}catch(err){_iterator10.e(err)}finally{_iterator10.f()}}}sortedPlugins=[];_iterator11=_createForOfIteratorHelper((0,clientnode__WEBPACK_IMPORTED_MODULE_2__.sortTopological)(temporaryPlugins));_context0.p=16;_iterator11.s();case 17:if((_step11=_iterator11.n()).done){_context0.n=21;break}_pluginName=_step11.value;_i7=0,_Object$entries4=Object.entries(plugins);case 18:if(!(_i7<_Object$entries4.length)){_context0.n=20;break}_Object$entries4$_i=_slicedToArray(_Object$entries4[_i7],2),_name2=_Object$entries4$_i[0],_plugin=_Object$entries4$_i[1];if(![_plugin.internalName,_name2].includes(_pluginName)){_context0.n=19;break}sortedPlugins.push(_plugin);return _context0.a(3,20);case 19:_i7++;_context0.n=18;break;case 20:_context0.n=17;break;case 21:_context0.n=23;break;case 22:_context0.p=22;_t26=_context0.v;_iterator11.e(_t26);case 23:_context0.p=23;_iterator11.f();return _context0.f(23);case 24:_context0.n=25;return loadConfigurations(sortedPlugins,configuration);case 25:_t27=_context0.v;_t28=sortedPlugins;return _context0.a(2,{configuration:_t27,plugins:_t28})}},_callee0,null,[[16,22,23,24],[6,12,13,14]])}));function loadAll(_x26){return _loadAll.apply(this,arguments)}return loadAll}();/**
|
|
245
246
|
* Transform a list of absolute paths respecting the application context.
|
|
246
247
|
* @param configuration - Configuration object.
|
|
247
248
|
* @param configuration.core - Sub configuration web-node.
|
|
@@ -249,7 +250,7 @@ api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=argume
|
|
|
249
250
|
* @param configuration.core.context.path - Current web-nodes path.
|
|
250
251
|
* @param locations - Locations to process.
|
|
251
252
|
* @returns Given and processed locations.
|
|
252
|
-
*/var determineLocations=function determineLocations(
|
|
253
|
+
*/var determineLocations=function determineLocations(_ref5,locations){var contextPath=_ref5.core.context.path;if(locations===void 0){locations=[]}locations=[].concat(locations);return locations.length?locations.map(function(location){return (0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(contextPath,location)}):[contextPath]};/**
|
|
253
254
|
* Checks whether given file path is in provided locations.
|
|
254
255
|
* @param configuration - Configuration object.
|
|
255
256
|
* @param plugins - List of active plugins.
|
|
@@ -257,7 +258,7 @@ api=function api(_ref2){var hook=_ref2.hook,data=_ref2.data;for(var _len4=argume
|
|
|
257
258
|
* @param locations - Locations to search in.
|
|
258
259
|
* @returns A boolean indicating whether given file path is in provided
|
|
259
260
|
* locations.
|
|
260
|
-
*/var isInLocations=function isInLocations(configuration,plugins,filePath,locations){var pluginPaths=plugins.map(function(plugin){return plugin.path});var _iterator12=_createForOfIteratorHelper([].concat(locations)),_step12;try{for(_iterator12.s();!(_step12=_iterator12.n()).done;){var location=_step12.value;if(location.startsWith("/")){if(filePath.startsWith((0,
|
|
261
|
+
*/var isInLocations=function isInLocations(configuration,plugins,filePath,locations){var pluginPaths=plugins.map(function(plugin){return plugin.path});var _iterator12=_createForOfIteratorHelper([].concat(locations)),_step12;try{for(_iterator12.s();!(_step12=_iterator12.n()).done;){var location=_step12.value;if(location.startsWith("/")){if(filePath.startsWith((0,path__WEBPACK_IMPORTED_MODULE_5__.join)(configuration.core.context.path,location)))return true}else{var _iterator13=_createForOfIteratorHelper(pluginPaths),_step13;try{for(_iterator13.s();!(_step13=_iterator13.n()).done;){var pluginPath=_step13.value;if(filePath.startsWith((0,path__WEBPACK_IMPORTED_MODULE_5__.resolve)(pluginPath,location)))return true}}catch(err){_iterator13.e(err)}finally{_iterator13.f()}}}}catch(err){_iterator12.e(err)}finally{_iterator12.f()}return false};var pluginAPI={callStack:_callStack,callStackSynchronous:callStackSynchronous,determineInternalName:determineInternalName,determineLocations:determineLocations,evaluateConfiguration:evaluateConfiguration,hotReloadAPIFile:hotReloadAPIFile,hotReloadConfigurationFile:hotReloadConfigurationFile,hotReloadFiles:hotReloadFiles,isInLocations:isInLocations,load:load,loadAll:loadAll,loadAPI:loadAPI,loadConfiguration:loadConfiguration,loadConfigurations:loadConfigurations,loadFile:loadFile};/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (pluginAPI);
|
|
261
262
|
__webpack_async_result__();
|
|
262
263
|
} catch(e) { __webpack_async_result__(e); } }, 1);
|
|
263
264
|
|
|
@@ -282,12 +283,13 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
|
|
|
282
283
|
/* harmony export */ });
|
|
283
284
|
/* harmony import */ var clientnode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
|
|
284
285
|
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
|
|
285
|
-
/* harmony import */ var
|
|
286
|
-
/* harmony import */ var
|
|
287
|
-
/* harmony import */ var
|
|
288
|
-
var
|
|
286
|
+
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
|
|
287
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
|
|
288
|
+
/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
|
|
289
|
+
/* harmony import */ var _pluginAPI_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(0);
|
|
290
|
+
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_pluginAPI_js__WEBPACK_IMPORTED_MODULE_5__]);
|
|
289
291
|
var __webpack_async_dependencies_result__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
|
|
290
|
-
|
|
292
|
+
_pluginAPI_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_async_dependencies_result__[0];
|
|
291
293
|
// #!/usr/bin/env node
|
|
292
294
|
// -*- coding: utf-8 -*-
|
|
293
295
|
/* !
|
|
@@ -308,19 +310,19 @@ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof
|
|
|
308
310
|
"node_modules" parent folder is usually resilient again dealing with
|
|
309
311
|
projects where current working directory isn't the projects directory and
|
|
310
312
|
this library is located as a nested dependency.
|
|
311
|
-
*/
|
|
313
|
+
*/_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.context={path:__webpack_dirname__,type:"relative"};for(var iteration=0;iteration<clientnode__WEBPACK_IMPORTED_MODULE_0__.MAXIMAL_NUMBER_OF_ITERATIONS.value;iteration++){_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.context.path=(0,path__WEBPACK_IMPORTED_MODULE_3__.resolve)(_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.context.path,"../../");if((0,path__WEBPACK_IMPORTED_MODULE_3__.basename)((0,path__WEBPACK_IMPORTED_MODULE_3__.dirname)(_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.context.path))!=="node_modules")break}if(_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.context.path==="/"||(0,path__WEBPACK_IMPORTED_MODULE_3__.basename)((0,path__WEBPACK_IMPORTED_MODULE_3__.dirname)(process.cwd()))==="node_modules"||(0,path__WEBPACK_IMPORTED_MODULE_3__.basename)((0,path__WEBPACK_IMPORTED_MODULE_3__.dirname)(process.cwd()))===".staging"&&(0,path__WEBPACK_IMPORTED_MODULE_3__.basename)((0,path__WEBPACK_IMPORTED_MODULE_3__.dirname)((0,path__WEBPACK_IMPORTED_MODULE_3__.dirname)(process.cwd())))==="node_modules")/*
|
|
312
314
|
NOTE: If we are dealing was a dependent project use current directory
|
|
313
315
|
as context.
|
|
314
|
-
*/
|
|
316
|
+
*/_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.context.path=process.cwd();else/*
|
|
315
317
|
NOTE: If the current working directory references this file via a
|
|
316
318
|
linked "node_modules" folder using current working directory as context
|
|
317
319
|
is a better assumption than two folders up the hierarchy.
|
|
318
|
-
*/try{if((0,
|
|
319
|
-
}var mainPackageConfiguration={name:"main"};try{mainPackageConfiguration=(await import(/* webpackIgnore: true */(0,
|
|
320
|
-
|
|
320
|
+
*/try{if((await (0,fs_promises__WEBPACK_IMPORTED_MODULE_2__.lstat)((0,path__WEBPACK_IMPORTED_MODULE_3__.join)(process.cwd(),"node_modules"))).isSymbolicLink())_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.context.path=process.cwd()}catch(_unused){// Ignore error.
|
|
321
|
+
}var mainPackageConfiguration={name:"main"};try{mainPackageConfiguration=(await import(/* webpackIgnore: true */(0,path__WEBPACK_IMPORTED_MODULE_3__.join)(_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.context.path,"package"),{with:{type:"json"}})).default}catch(_unused2){_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.context.path=process.cwd()}var name=((_mainPackageConfigura=mainPackageConfiguration.webDocumentation)===null||_mainPackageConfigura===void 0?void 0:_mainPackageConfigura.name)||mainPackageConfiguration.name||"main";var applicationConfiguration=mainPackageConfiguration.webNode||_defineProperty({},name,{name:name,package:mainPackageConfiguration});// endregion
|
|
322
|
+
_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode.core.name=_package_json__WEBPACK_IMPORTED_MODULE_4__.webDocumentation.name||_package_json__WEBPACK_IMPORTED_MODULE_4__.name;var now=new Date;var scope=_objectSpread(_objectSpread({},clientnode__WEBPACK_IMPORTED_MODULE_0__.UTILITY_SCOPE),{},{currentPath:process.cwd(),fs:fs_promises__WEBPACK_IMPORTED_MODULE_2__["default"],path:path__WEBPACK_IMPORTED_MODULE_3__["default"],pluginAPI:_pluginAPI_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Ay,webNodePath:__webpack_dirname__,now:now,nowUTCTimestamp:(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.getUTCTimestamp)(now)});var configuration=await (0,clientnode__WEBPACK_IMPORTED_MODULE_0__.evaluateAsyncDynamicData)((0,clientnode__WEBPACK_IMPORTED_MODULE_0__.evaluateDynamicData)(_package_json__WEBPACK_IMPORTED_MODULE_4__.webNode,{scope:_objectSpread(_objectSpread({},scope),{},{fs:fs__WEBPACK_IMPORTED_MODULE_1__["default"]})}),{scope:scope});delete _package_json__WEBPACK_IMPORTED_MODULE_4__.webNode;(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.extend)(true,(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.modifyObject)(configuration,applicationConfiguration),applicationConfiguration);var result={};var _iterator=_createForOfIteratorHelper(process.argv.slice(1)),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var argument=_step.value;var subResult=(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.parseEncodedObject)(argument,configuration,"configuration");if((0,clientnode__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(subResult))(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.extend)(true,result,subResult)}}catch(err){_iterator.e(err)}finally{_iterator.f()}if(Object.keys(result).length>0){(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.extend)(true,/*
|
|
321
323
|
NOTE: "object.modifyObject" removes modifications in "result"
|
|
322
324
|
in-place before it is used as extending source.
|
|
323
|
-
*/(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.modifyObject)(configuration,result),result);configuration.core.runtimeConfiguration=result}configuration=(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.evaluateDynamicData)((0,clientnode__WEBPACK_IMPORTED_MODULE_0__.removeKeysInEvaluation)(configuration),{scope:scope});configuration.name=name;configuration.core.package=
|
|
325
|
+
*/(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.modifyObject)(configuration,result),result);configuration.core.runtimeConfiguration=result}configuration=await (0,clientnode__WEBPACK_IMPORTED_MODULE_0__.evaluateAsyncDynamicData)((0,clientnode__WEBPACK_IMPORTED_MODULE_0__.evaluateDynamicData)((0,clientnode__WEBPACK_IMPORTED_MODULE_0__.removeKeysInEvaluation)(configuration),{scope:_objectSpread(_objectSpread({},scope),{},{fs:fs__WEBPACK_IMPORTED_MODULE_1__["default"]})}),{scope:scope});configuration.name=name;configuration.core.package=_package_json__WEBPACK_IMPORTED_MODULE_4__;/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (configuration);
|
|
324
326
|
__webpack_async_result__();
|
|
325
327
|
} catch(e) { __webpack_async_result__(e); } }, 1);
|
|
326
328
|
|
|
@@ -332,7 +334,7 @@ const x = (y) => {
|
|
|
332
334
|
const x = {}; __webpack_require__.d(x, y); return x
|
|
333
335
|
}
|
|
334
336
|
const y = (x) => (() => (x))
|
|
335
|
-
module.exports = x({ ["default"]: () => (__WEBPACK_EXTERNAL_MODULE_fs__["default"])
|
|
337
|
+
module.exports = x({ ["default"]: () => (__WEBPACK_EXTERNAL_MODULE_fs__["default"]) });
|
|
336
338
|
|
|
337
339
|
/***/ }),
|
|
338
340
|
/* 4 */
|
|
@@ -342,10 +344,20 @@ const x = (y) => {
|
|
|
342
344
|
const x = {}; __webpack_require__.d(x, y); return x
|
|
343
345
|
}
|
|
344
346
|
const y = (x) => (() => (x))
|
|
345
|
-
module.exports = x({ ["
|
|
347
|
+
module.exports = x({ ["default"]: () => (__WEBPACK_EXTERNAL_MODULE_fs_promises_cc1b69f3__["default"]), ["lstat"]: () => (__WEBPACK_EXTERNAL_MODULE_fs_promises_cc1b69f3__.lstat), ["readdir"]: () => (__WEBPACK_EXTERNAL_MODULE_fs_promises_cc1b69f3__.readdir), ["stat"]: () => (__WEBPACK_EXTERNAL_MODULE_fs_promises_cc1b69f3__.stat) });
|
|
346
348
|
|
|
347
349
|
/***/ }),
|
|
348
350
|
/* 5 */
|
|
351
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
352
|
+
|
|
353
|
+
const x = (y) => {
|
|
354
|
+
const x = {}; __webpack_require__.d(x, y); return x
|
|
355
|
+
}
|
|
356
|
+
const y = (x) => (() => (x))
|
|
357
|
+
module.exports = x({ ["basename"]: () => (__WEBPACK_EXTERNAL_MODULE_path__.basename), ["default"]: () => (__WEBPACK_EXTERNAL_MODULE_path__["default"]), ["dirname"]: () => (__WEBPACK_EXTERNAL_MODULE_path__.dirname), ["extname"]: () => (__WEBPACK_EXTERNAL_MODULE_path__.extname), ["join"]: () => (__WEBPACK_EXTERNAL_MODULE_path__.join), ["resolve"]: () => (__WEBPACK_EXTERNAL_MODULE_path__.resolve) });
|
|
358
|
+
|
|
359
|
+
/***/ }),
|
|
360
|
+
/* 6 */
|
|
349
361
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
350
362
|
|
|
351
363
|
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
@@ -373,7 +385,7 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
|
|
|
373
385
|
/* harmony import */ var _configurator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
374
386
|
/* harmony import */ var _pluginAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
|
|
375
387
|
/* harmony import */ var clientnode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
|
|
376
|
-
/* harmony import */ var node_url__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
388
|
+
/* harmony import */ var node_url__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10);
|
|
377
389
|
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_configurator_js__WEBPACK_IMPORTED_MODULE_0__, _pluginAPI_js__WEBPACK_IMPORTED_MODULE_1__]);
|
|
378
390
|
([_configurator_js__WEBPACK_IMPORTED_MODULE_0__, _pluginAPI_js__WEBPACK_IMPORTED_MODULE_1__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
|
|
379
391
|
// #!/usr/bin/env babel-node
|
|
@@ -416,13 +428,13 @@ __webpack_async_result__();
|
|
|
416
428
|
} catch(e) { __webpack_async_result__(e); } });
|
|
417
429
|
|
|
418
430
|
/***/ }),
|
|
419
|
-
/*
|
|
431
|
+
/* 7 */
|
|
420
432
|
/***/ ((module) => {
|
|
421
433
|
|
|
422
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"web-node","version":"1.0.
|
|
434
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"web-node","version":"1.0.590","description":"High level javaScript backend plugin system and configuration merger.","keywords":["api","backend","management","plugin","web"],"homepage":"https://torben.website/web-node","bugs":{"email":"info@torben.website","url":"https://github.com/thaibault/web-node/issues"},"license":"CC-BY-3.0","author":{"email":"info@torben.website","name":"Torben Sickert","url":"https://torben.website"},"repository":{"type":"git","url":"https://github.com/thaibault/web-node.git"},"type":"module","bin":"index.js","files":["configurator.d.ts","index.d.ts","index.js","pluginAPI.d.ts","type.d.ts","unixCrypt.d.ts","unixCrypt.js"],"sideEffects":true,"scripts":{"build":"yarn build:types; yarn build:plain","build:plain":"weboptimizer build","build:types":"weboptimizer build:types","check":"yarn check:types; yarn lint","check:types":"weboptimizer check:types","clear":"weboptimizer clear","document":"weboptimizer document","lint":"weboptimizer lint","prepare":"yarn build","prepare:test":"yarn clear && cd dummyPlugin && shx touch yarn.lock && yarn build && cd ..","serve":"yarn build:plain && yarn start","start":"./index.js \'{plugin: {hotReloading: true}}\'","test":"yarn prepare:test && weboptimizer test","test:coverage":"yarn prepare:test && weboptimizer test:coverage","test:coverage:report":"yarn prepare:test && weboptimizer test:coverage:report","update:documentation":"web-documentation","watch":"weboptimizer build --watch"},"devDependencies":{"@babel/cli":"^8.0.4","@babel/eslint-parser":"^8.0.1","@eslint/js":"^10.0.1","@stylistic/eslint-plugin":"^5.10.0","@types/node":"^26.3.0","@types/webpack-env":"^1.18.8","@typescript-eslint/eslint-plugin":"^8.68.0","@typescript-eslint/parser":"^8.68.0","clientnode":"^4.0.1500","eslint":"^10.9.1","eslint-config-google":"^0.14.0","eslint-plugin-jsdoc":"^64.2.1","jest":"^30.4.2","jsdoc":"^4.0.5","shx":"^0.4.0","typescript-eslint":"^8.68.0","web-documentation":"^1.0.51","weboptimizer":"^4.0.65"},"peerDependencies":{"clientnode":"*"},"resolutions":{"colors":"1.4.0","globals@npm:^11.1.0":"patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch","globals@npm:^14.0.0":"patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch","globals@npm:^9.18.0":"patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch"},"engines":{"node":">=26","npm":">=12","yarn":">=4"},"webDocumentation":{"trackingCode":"UA-40192634-9"},"webNode":{"core":{"context":{"path":"./","type":"relative"},"debug":false,"encoding":"utf8","interDependencies":{},"name":"web-node","plugin":{"configuration":{"fileNames":["package.json","private-package.json"],"propertyNames":["webNode","webnode","web-node"]},"directories":{"external":{"nameRegularExpressionPattern":"^([a-zA-Z0-9-]+?)-?[wW]eb-?[nN]ode-?[pP]lugin$","path":{"__evaluate__":"`${currentPath}/node_modules/`"}},"internal":{"nameRegularExpressionPattern":"^([a-zA-Z0-9-_].*)$","path":{"__evaluate__":"`${currentPath}/plugins/`"}}},"hotReloading":false}}},"webOptimizer":{"assetPattern":{"javaScript":{"includeFilePathRegularExpression":"^(.+/)?index\\\\.js$","pattern":{"#":"This is how we can make our main exported artefact executable.","__evaluate__":"`#!/usr/bin/env node\\n// -*- coding: utf-8 -*-\\nif(import.meta.main)module.paths.unshift(\'/application/node_modules\');{1}`"}}},"injection":{"entry":{"__evaluate__":"2 < self.givenCommandLineArguments.length && self.givenCommandLineArguments[2].startsWith(\'test\') ? {testBundle: \'test\'} : {index: \'./index.ts\', unixCrypt: \'./unixCrypt.ts\'}"}},"module":{"optimizer":{"terser":{"terserOptions":{"compress":{"#":"To provide a logging output we need to exclude this feature.","drop_console":{"__evaluate__":"false"},"drop_debugger":{"__evaluate__":"false"}}}}}},"targetTechnology":{"boilerplate":"node","payload":"node"}},"packageManager":"yarn@4.18.0"}');
|
|
423
435
|
|
|
424
436
|
/***/ }),
|
|
425
|
-
/*
|
|
437
|
+
/* 8 */
|
|
426
438
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
427
439
|
|
|
428
440
|
const x = (y) => {
|
|
@@ -432,7 +444,7 @@ const y = (x) => (() => (x))
|
|
|
432
444
|
module.exports = x({ });
|
|
433
445
|
|
|
434
446
|
/***/ }),
|
|
435
|
-
/*
|
|
447
|
+
/* 9 */
|
|
436
448
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
437
449
|
|
|
438
450
|
const x = (y) => {
|
|
@@ -442,7 +454,7 @@ const y = (x) => (() => (x))
|
|
|
442
454
|
module.exports = x({ ["spawnSync"]: () => (__WEBPACK_EXTERNAL_MODULE_child_process__.spawnSync) });
|
|
443
455
|
|
|
444
456
|
/***/ }),
|
|
445
|
-
/*
|
|
457
|
+
/* 10 */
|
|
446
458
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
447
459
|
|
|
448
460
|
const x = (y) => {
|
|
@@ -610,7 +622,7 @@ module.exports = x({ ["pathToFileURL"]: () => (__WEBPACK_EXTERNAL_MODULE_node_ur
|
|
|
610
622
|
/******/ // startup
|
|
611
623
|
/******/ // Load entry module and return exports
|
|
612
624
|
/******/ // This entry module used 'module' so it can't be inlined
|
|
613
|
-
/******/ let __webpack_exports__ = __webpack_require__(
|
|
625
|
+
/******/ let __webpack_exports__ = __webpack_require__(6);
|
|
614
626
|
/******/ __webpack_exports__ = await __webpack_exports__;
|
|
615
627
|
/******/ const __webpack_exports__callStack = __webpack_exports__.lT;
|
|
616
628
|
/******/ const __webpack_exports__callStackSynchronous = __webpack_exports__.gl;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "web-node",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.590",
|
|
4
4
|
"description": "High level javaScript backend plugin system and configuration merger.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api",
|
|
@@ -60,20 +60,20 @@
|
|
|
60
60
|
"@babel/eslint-parser": "^8.0.1",
|
|
61
61
|
"@eslint/js": "^10.0.1",
|
|
62
62
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
63
|
-
"@types/node": "^26.
|
|
63
|
+
"@types/node": "^26.3.0",
|
|
64
64
|
"@types/webpack-env": "^1.18.8",
|
|
65
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
66
|
-
"@typescript-eslint/parser": "^8.
|
|
67
|
-
"clientnode": "^4.0.
|
|
68
|
-
"eslint": "^10.9.
|
|
65
|
+
"@typescript-eslint/eslint-plugin": "^8.68.0",
|
|
66
|
+
"@typescript-eslint/parser": "^8.68.0",
|
|
67
|
+
"clientnode": "^4.0.1500",
|
|
68
|
+
"eslint": "^10.9.1",
|
|
69
69
|
"eslint-config-google": "^0.14.0",
|
|
70
70
|
"eslint-plugin-jsdoc": "^64.2.1",
|
|
71
71
|
"jest": "^30.4.2",
|
|
72
72
|
"jsdoc": "^4.0.5",
|
|
73
73
|
"shx": "^0.4.0",
|
|
74
|
-
"typescript-eslint": "^8.
|
|
75
|
-
"web-documentation": "^1.0.
|
|
76
|
-
"weboptimizer": "^4.0.
|
|
74
|
+
"typescript-eslint": "^8.68.0",
|
|
75
|
+
"web-documentation": "^1.0.51",
|
|
76
|
+
"weboptimizer": "^4.0.65"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"clientnode": "*"
|
|
@@ -169,5 +169,5 @@
|
|
|
169
169
|
"payload": "node"
|
|
170
170
|
}
|
|
171
171
|
},
|
|
172
|
-
"packageManager": "yarn@4.
|
|
172
|
+
"packageManager": "yarn@4.18.0"
|
|
173
173
|
}
|
package/type.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { WebDocumentationConfiguration } from 'web-documentation/build/depl
|
|
|
3
3
|
import type { callStack, callStackSynchronous, default as pluginAPI, determineInternalName, determineLocations, evaluateConfiguration, hotReloadAPIFile, hotReloadConfigurationFile, hotReloadFiles, isInLocations, load, loadAll, loadAPI, loadConfiguration, loadConfigurations, loadFile } from './pluginAPI';
|
|
4
4
|
export type EvaluateConfigurationScope = typeof UTILITY_SCOPE & {
|
|
5
5
|
currentPath: string;
|
|
6
|
-
fs: typeof import('fs');
|
|
6
|
+
fs: typeof import('fs/promises');
|
|
7
7
|
path: typeof import('path');
|
|
8
8
|
pluginAPI: typeof pluginAPI;
|
|
9
9
|
webNodePath: string;
|