clientnode 4.0.1436 → 4.0.1438

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.
Files changed (142) hide show
  1. package/dist/Lock.js +83 -94
  2. package/dist/Logger.js +163 -715
  3. package/dist/Semaphore.js +46 -81
  4. package/dist/array.js +337 -568
  5. package/dist/cli.js +37 -71
  6. package/dist/constants.js +110 -209
  7. package/dist/context.js +25 -229
  8. package/dist/cookie.js +48 -226
  9. package/dist/data-transfer.js +166 -725
  10. package/dist/datetime.js +241 -1059
  11. package/dist/domNode.js +277 -441
  12. package/dist/expression/evaluators.js +234 -1112
  13. package/dist/expression/helper.js +82 -135
  14. package/dist/expression/index.js +10 -1245
  15. package/dist/expression/indicator-functions.js +21 -239
  16. package/dist/expression/type.js +4 -34
  17. package/dist/filesystem.js +323 -309
  18. package/dist/function.js +51 -125
  19. package/dist/index.js +26 -2709
  20. package/dist/indicators.js +68 -440
  21. package/dist/module.js +98 -163
  22. package/dist/number.js +25 -423
  23. package/dist/object.js +774 -852
  24. package/dist/process.js +38 -245
  25. package/dist/property-types.js +96 -157
  26. package/dist/scope.js +56 -1825
  27. package/dist/string.js +603 -909
  28. package/dist/test-helper.js +171 -541
  29. package/dist/type.js +8 -37
  30. package/dist/utility.js +91 -336
  31. package/package.json +9 -10
  32. package/dist/Lock.d.ts +0 -39
  33. package/dist/Logger.d.ts +0 -102
  34. package/dist/Semaphore.d.ts +0 -29
  35. package/dist/array.d.ts +0 -150
  36. package/dist/bundle/Lock.js +0 -111
  37. package/dist/bundle/Logger.js +0 -705
  38. package/dist/bundle/Semaphore.js +0 -100
  39. package/dist/bundle/array.js +0 -648
  40. package/dist/bundle/cli.js +0 -85
  41. package/dist/bundle/constants.js +0 -225
  42. package/dist/bundle/context.js +0 -243
  43. package/dist/bundle/cookie.js +0 -262
  44. package/dist/bundle/data-transfer.js +0 -741
  45. package/dist/bundle/datetime.js +0 -1064
  46. package/dist/bundle/domNode.js +0 -471
  47. package/dist/bundle/expression/evaluators.js +0 -1115
  48. package/dist/bundle/expression/helper.js +0 -106
  49. package/dist/bundle/expression/index.js +0 -1223
  50. package/dist/bundle/expression/indicator-functions.js +0 -235
  51. package/dist/bundle/expression/type.js +0 -50
  52. package/dist/bundle/filesystem.js +0 -374
  53. package/dist/bundle/function.js +0 -105
  54. package/dist/bundle/index.js +0 -2686
  55. package/dist/bundle/indicators.js +0 -459
  56. package/dist/bundle/module.js +0 -180
  57. package/dist/bundle/number.js +0 -425
  58. package/dist/bundle/object.js +0 -1004
  59. package/dist/bundle/process.js +0 -275
  60. package/dist/bundle/property-types.js +0 -167
  61. package/dist/bundle/scope.js +0 -1808
  62. package/dist/bundle/string.js +0 -1095
  63. package/dist/bundle/test-helper.js +0 -690
  64. package/dist/bundle/type.js +0 -50
  65. package/dist/bundle/utility.js +0 -362
  66. package/dist/cli.d.ts +0 -31
  67. package/dist/compatible/Lock.js +0 -111
  68. package/dist/compatible/Logger.js +0 -705
  69. package/dist/compatible/Semaphore.js +0 -100
  70. package/dist/compatible/array.js +0 -648
  71. package/dist/compatible/cli.js +0 -85
  72. package/dist/compatible/constants.js +0 -225
  73. package/dist/compatible/context.js +0 -243
  74. package/dist/compatible/cookie.js +0 -262
  75. package/dist/compatible/data-transfer.js +0 -741
  76. package/dist/compatible/datetime.js +0 -1064
  77. package/dist/compatible/domNode.js +0 -471
  78. package/dist/compatible/expression/evaluators.js +0 -1115
  79. package/dist/compatible/expression/helper.js +0 -106
  80. package/dist/compatible/expression/index.js +0 -1223
  81. package/dist/compatible/expression/indicator-functions.js +0 -235
  82. package/dist/compatible/expression/type.js +0 -50
  83. package/dist/compatible/filesystem.js +0 -374
  84. package/dist/compatible/function.js +0 -105
  85. package/dist/compatible/index.js +0 -2686
  86. package/dist/compatible/indicators.js +0 -459
  87. package/dist/compatible/module.js +0 -180
  88. package/dist/compatible/number.js +0 -425
  89. package/dist/compatible/object.js +0 -1004
  90. package/dist/compatible/process.js +0 -275
  91. package/dist/compatible/property-types.js +0 -167
  92. package/dist/compatible/scope.js +0 -1808
  93. package/dist/compatible/string.js +0 -1095
  94. package/dist/compatible/test-helper.js +0 -690
  95. package/dist/compatible/type.js +0 -50
  96. package/dist/compatible/utility.js +0 -362
  97. package/dist/constants.d.ts +0 -99
  98. package/dist/context.d.ts +0 -8
  99. package/dist/cookie.d.ts +0 -31
  100. package/dist/data-transfer.d.ts +0 -45
  101. package/dist/datetime.d.ts +0 -37
  102. package/dist/domNode.d.ts +0 -82
  103. package/dist/expression/evaluators.d.ts +0 -55
  104. package/dist/expression/helper.d.ts +0 -4
  105. package/dist/expression/index.d.ts +0 -7
  106. package/dist/expression/indicator-functions.d.ts +0 -14
  107. package/dist/expression/type.d.ts +0 -70
  108. package/dist/filesystem.d.ts +0 -143
  109. package/dist/function.d.ts +0 -20
  110. package/dist/index.d.ts +0 -23
  111. package/dist/indicators.d.ts +0 -68
  112. package/dist/module.d.ts +0 -8
  113. package/dist/number.d.ts +0 -35
  114. package/dist/object.d.ts +0 -231
  115. package/dist/process.d.ts +0 -22
  116. package/dist/property-types.d.ts +0 -460
  117. package/dist/scope.d.ts +0 -44
  118. package/dist/string.d.ts +0 -312
  119. package/dist/test/Lock.d.ts +0 -1
  120. package/dist/test/Logger.d.ts +0 -1
  121. package/dist/test/Semaphore.d.ts +0 -1
  122. package/dist/test/array.d.ts +0 -1
  123. package/dist/test/cookie.d.ts +0 -1
  124. package/dist/test/data-transfer.d.ts +0 -1
  125. package/dist/test/datetime.d.ts +0 -1
  126. package/dist/test/domNode.d.ts +0 -1
  127. package/dist/test/expression/evaluators.d.ts +0 -1
  128. package/dist/test/expression/helper.d.ts +0 -1
  129. package/dist/test/expression/indicator-functions.d.ts +0 -1
  130. package/dist/test/filesystem.d.ts +0 -1
  131. package/dist/test/function.d.ts +0 -1
  132. package/dist/test/indicators.d.ts +0 -1
  133. package/dist/test/number.d.ts +0 -1
  134. package/dist/test/object.d.ts +0 -1
  135. package/dist/test/process.d.ts +0 -1
  136. package/dist/test/property-types.d.ts +0 -1
  137. package/dist/test/scope.d.ts +0 -1
  138. package/dist/test/string.d.ts +0 -1
  139. package/dist/test/utility.d.ts +0 -1
  140. package/dist/test-helper.d.ts +0 -143
  141. package/dist/type.d.ts +0 -230
  142. package/dist/utility.d.ts +0 -44
@@ -1,374 +0,0 @@
1
- 'use strict';if(typeof module!=='undefined'&&module!==null&&eval('typeof require')!=='undefined'&&eval('require')!==null&&'main'in eval('require')&&eval('typeof require.main')!=='undefined'&&eval('require.main')!==null){var ORIGINAL_MAIN_MODULE=module;if(module!==eval('require.main')&&'paths'in module&&'paths'in eval('require.main')&&typeof __dirname!=='undefined'&&__dirname!==null)module.paths=eval('require.main.paths').concat(module.paths.filter(function(path){return eval('require.main.paths').includes(path)}))};if(typeof window==='undefined'||window===null)var window=(typeof global==='undefined'||global===null)?{}:global;(function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory();
4
- else if(typeof define === 'function' && define.amd)
5
- define("clientnode", [], factory);
6
- else if(typeof exports === 'object')
7
- exports["clientnode"] = factory();
8
- else
9
- root["clientnode"] = factory();
10
- })(this, function() {
11
- return /******/ (function() { // webpackBootstrap
12
- /******/ var __webpack_modules__ = ([
13
- /* 0 */
14
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
15
-
16
- "use strict";
17
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18
- /* harmony export */ DEFAULT_ENCODING: function() { return /* binding */ DEFAULT_ENCODING; }
19
- /* harmony export */ });
20
- /* unused harmony exports CLOSE_EVENT_NAMES, CONSOLE_METHODS, VALUE_COPY_SYMBOL, IGNORE_NULL_AND_UNDEFINED_SYMBOL, ABBREVIATIONS, ANIMATION_END_EVENT_NAMES, CLASS_TO_TYPE_MAPPING, KEY_CODES, KEYBOARD_CODES, LOCALES, PLAIN_OBJECT_PROTOTYPES, SPECIAL_REGEX_SEQUENCES, TRANSITION_END_EVENT_NAMES */
21
- // #!/usr/bin/env babel-node
22
- // -*- coding: utf-8 -*-
23
- /** @module constants *//* !
24
- region header
25
- [Project page](https://torben.website/clientnode)
26
-
27
- Copyright Torben Sickert (info["~at~"]torben.website) 16.12.2012
28
-
29
- License
30
- -------
31
-
32
- This library written by Torben Sickert stands under a creative commons
33
- naming 3.0 unported license.
34
- See https://creativecommons.org/licenses/by/3.0/deed.de
35
- endregion
36
- */var DEFAULT_ENCODING="utf8";var CLOSE_EVENT_NAMES=(/* unused pure expression or super */ null && (["close","exit","SIGINT","SIGTERM","SIGQUIT","uncaughtException"]));var CONSOLE_METHODS=(/* unused pure expression or super */ null && (["debug","error","info","log","warn"]));var VALUE_COPY_SYMBOL=Symbol.for("clientnodeValue");var IGNORE_NULL_AND_UNDEFINED_SYMBOL=Symbol.for("clientnodeIgnoreNullAndUndefined");// Lists all known abbreviation for proper camel case to delimited and back
37
- // conversion.
38
- var ABBREVIATIONS=(/* unused pure expression or super */ null && (["html","id","url","us","de","api","href"]));// Saves a string with all css3 browser specific animation end event names.
39
- var ANIMATION_END_EVENT_NAMES="animationend webkitAnimationEnd oAnimationEnd MSAnimationEnd";// String representation to object type name mapping.
40
- var CLASS_TO_TYPE_MAPPING=(/* unused pure expression or super */ null && ({"[object Array]":"array","[object Boolean]":"boolean","[object Date]":"date","[object Error]":"error","[object Function]":"function","[object Map]":"map","[object Number]":"number","[object Object]":"object","[object RegExp]":"regexp","[object Set]":"set","[object String]":"string"}));// Saves a mapping from key codes to their corresponding name.
41
- var KEY_CODES=(/* unused pure expression or super */ null && ({BACKSPACE:8,SPACE:32,TAB:9,DELETE:46,ENTER:13,COMMA:188,PERIOD:190,END:35,ESCAPE:27,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,HOME:36,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,PAGE_UP:33,PAGE_DOWN:34,UP:38,DOWN:40,LEFT:37,RIGHT:39}));var KEYBOARD_CODES=(/* unused pure expression or super */ null && ({BACKSPACE:"Backspace",SPACE:"Space",TAB:"Tab",DELETE:"Delete",ENTER:"Enter",COMMA:"Comma",PERIOD:"Period",END:"End",ESCAPE:"Escape",F1:"F1",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",F10:"F10",F11:"F111",F12:"F12",HOME:"Home",NUMPAD_ADD:"NumpadAdd",NUMPAD_SUBTRACT:"NumpadSubtract",NUMPAD_DECIMAL:"NumpadDecimal",NUMPAD_DIVIDE:"NumpadDivide",NUMPAD_ENTER:"NumpadEnter",NUMPAD_MULTIPLY:"NumpadMultiply",PAGE_UP:"PageUp",PAGE_DOWN:"PageUp",UP:"ArrowUp",DOWN:"ArrowDown",LEFT:"ArrowLeft",RIGHT:"ArrowUp"}));var LOCALES=(/* unused pure expression or super */ null && ([]));var PLAIN_OBJECT_PROTOTYPES=[Object.prototype];// A list of special regular expression symbols.
42
- var SPECIAL_REGEX_SEQUENCES=(/* unused pure expression or super */ null && (["-","[","]","(",")","^","$","*","+",".","{","}"]));// Saves a string with all css3 browser specific transition end event names.
43
- var TRANSITION_END_EVENT_NAMES="transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd";
44
-
45
- /***/ }),
46
- /* 1 */
47
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
48
-
49
- "use strict";
50
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
51
- /* harmony export */ determineGlobalContext: function() { return /* binding */ determineGlobalContext; },
52
- /* harmony export */ optionalImport: function() { return /* binding */ optionalImport; },
53
- /* harmony export */ optionalRequire: function() { return /* binding */ optionalRequire; }
54
- /* harmony export */ });
55
- /* unused harmony exports currentRequire, clearRequireCache, isolatedRequire, isImportSyntaxSupported */
56
- /* module decorator */ module = __webpack_require__.hmd(module);
57
- // #!/usr/bin/env babel-node
58
- // -*- coding: utf-8 -*-
59
- /** @module module *//* !
60
- region header
61
- [Project page](https://torben.website/clientnode)
62
-
63
- Copyright Torben Sickert (info["~at~"]torben.website) 16.12.2012
64
-
65
- License
66
- -------
67
-
68
- This library written by Torben Sickert stands under a creative commons
69
- naming 3.0 unported license.
70
- See https://creativecommons.org/licenses/by/3.0/deed.de
71
- endregion
72
- */function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0))}if(o||r>1)return a;throw y=!0,n}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0)}else 1===c&&(t=i.return)&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break}catch(t){i=e,c=1,u=t}finally{f=1}}return{value:t,done:y}}}(r,o,i),!0),u}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]"}),(_regenerator=function _regenerator(){return{w:i,m:f}})()}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e)})}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2))},_regeneratorDefine2(e,r,n,t)}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){return void e(n)}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n)}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n)}_next(void 0)})}}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}var determineGlobalContext=function determineGlobalContext(){if(typeof globalThis==="undefined"){if(typeof window==="undefined"){if(typeof __webpack_require__.g==="undefined")return false?0:module;if(Object.prototype.hasOwnProperty.call(__webpack_require__.g,"window"))return __webpack_require__.g.window;return __webpack_require__.g}return window}return globalThis};var globalContext=determineGlobalContext();// Make preprocessed require function available at runtime.
73
- var currentRequire=typeof globalContext.require==="undefined"?null:globalContext.require;var optionalRequire=function optionalRequire(id){try{return currentRequire?currentRequire(id):null}catch(_unused){return null}};var clearRequireCache=function clearRequireCache(cache){if(cache===void 0){cache=(currentRequire===null||currentRequire===void 0?void 0:currentRequire.cache)||__webpack_require__.c}var backup={};for(var _i=0,_Object$entries=Object.entries(cache);_i<_Object$entries.length;_i++){var _Object$entries$_i=_slicedToArray(_Object$entries[_i],2),key=_Object$entries$_i[0],_module=_Object$entries$_i[1];backup[key]=_module;delete cache[key]}return backup};var restoreRequireCache=function restoreRequireCache(cache,backup){if(cache===void 0){cache=(currentRequire===null||currentRequire===void 0?void 0:currentRequire.cache)||__webpack_require__.c}clearRequireCache();for(var _i2=0,_Object$entries2=Object.entries(backup);_i2<_Object$entries2.length;_i2++){var _Object$entries2$_i=_slicedToArray(_Object$entries2[_i2],2),key=_Object$entries2$_i[0],_module2=_Object$entries2$_i[1];cache[key]=_module2}};var isolatedRequire=function isolatedRequire(path,requireFunction){if(requireFunction===void 0){requireFunction=currentRequire||__webpack_require__(5)}var backup=clearRequireCache(requireFunction.cache);try{return requireFunction(path);// eslint-disable-next-line no-useless-catch
74
- }catch(error){throw error}finally{restoreRequireCache(requireFunction.cache,backup)}};// Make preprocessed import function available at runtime.
75
- var isImportSyntaxSupported=function isImportSyntaxSupported(){try{// eslint-disable-next-line @typescript-eslint/no-implied-eval
76
- new Function("import(\"data:text/javascript,\")");return true}catch(_unused2){return false}};var optionalImport=/*#__PURE__*/function(){var _optionalImport=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(id,options){var _t,_t2;return _regenerator().w(function(_context){while(1)switch(_context.p=_context.n){case 0:if(options===void 0){options={}}_context.p=1;if(!isImportSyntaxSupported()){_context.n=3;break}_context.n=2;return new Function("options","return import('".concat(id,"', options)"))(options);case 2:_t=_context.v;_context.n=5;break;case 3:_context.n=4;return Promise.resolve(null);case 4:_t=_context.v;case 5:return _context.a(2,_t);case 6:_context.p=6;_t2=_context.v;_context.n=7;return Promise.resolve(null);case 7:return _context.a(2,_context.v)}},_callee,null,[[1,6]])}));function optionalImport(_x,_x2){return _optionalImport.apply(this,arguments)}return optionalImport}();
77
-
78
- /***/ }),
79
- /* 2 */,
80
- /* 3 */,
81
- /* 4 */
82
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
83
-
84
- "use strict";
85
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
86
- /* harmony export */ NOOP: function() { return /* binding */ NOOP; }
87
- /* harmony export */ });
88
- /* unused harmony exports globalContext, setGlobalContext, MAXIMAL_NUMBER_OF_ITERATIONS, mockConsole */
89
- /* unused harmony import specifier */ var CONSOLE_METHODS;
90
- /* harmony import */ var _module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
91
- // #!/usr/bin/env babel-node
92
- // -*- coding: utf-8 -*-
93
- /** @module context *//* !
94
- region header
95
- [Project page](https://torben.website/clientnode)
96
-
97
- Copyright Torben Sickert (info["~at~"]torben.website) 16.12.2012
98
-
99
- License
100
- -------
101
-
102
- This library written by Torben Sickert stands under a creative commons
103
- naming 3.0 unported license.
104
- See https://creativecommons.org/licenses/by/3.0/deed.de
105
- endregion
106
- */var _optionalRequire$defa,_optionalRequire;function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]}},e:function e(r){throw r},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function s(){t=t.call(r)},n:function n(){var r=t.next();return a=r.done,r},e:function e(r){u=!0,o=r},f:function f(){try{a||null==t.return||t.return()}finally{if(u)throw o}}}}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}var globalContext=(0,_module__WEBPACK_IMPORTED_MODULE_0__.determineGlobalContext)();var setGlobalContext=function setGlobalContext(context){globalContext=context};globalContext.fetch=globalContext.fetch?globalContext.fetch.bind(globalContext):(_optionalRequire$defa=(_optionalRequire=(0,_module__WEBPACK_IMPORTED_MODULE_0__.optionalRequire)("node-fetch"))===null||_optionalRequire===void 0?void 0:_optionalRequire.default)!==null&&_optionalRequire$defa!==void 0?_optionalRequire$defa:function(){for(var _len=arguments.length,parameters=new Array(_len),_key=0;_key<_len;_key++){parameters[_key]=arguments[_key]}return (0,_module__WEBPACK_IMPORTED_MODULE_0__.optionalImport)(/* webpackIgnore: true */"node-fetch").then(function(module){var _ref;return(_ref=module).default.apply(_ref,parameters)})};var MAXIMAL_NUMBER_OF_ITERATIONS=(/* unused pure expression or super */ null && ({value:100}));// A no-op dummy function.
107
- var NOOP=function NOOP(){// Do nothing.
108
- };var mockConsole=function mockConsole(){// Avoid errors in browsers that lack a console.
109
- if(!Object.prototype.hasOwnProperty.call(globalContext,"console"))globalContext.console={};if(!globalContext.console)globalContext.console={};var _iterator=_createForOfIteratorHelper(CONSOLE_METHODS),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var methodName=_step.value;if(!(methodName in globalContext.console))globalContext.console[methodName]=NOOP}}catch(err){_iterator.e(err)}finally{_iterator.f()}};
110
-
111
- /***/ }),
112
- /* 5 */
113
- /***/ (function(module) {
114
-
115
- function webpackEmptyContext(req) {
116
- var e = new Error("Cannot find module '" + req + "'");
117
- e.code = 'MODULE_NOT_FOUND';
118
- throw e;
119
- }
120
- webpackEmptyContext.keys = function() { return []; };
121
- webpackEmptyContext.resolve = webpackEmptyContext;
122
- webpackEmptyContext.id = 5;
123
- module.exports = webpackEmptyContext;
124
-
125
- /***/ }),
126
- /* 6 */,
127
- /* 7 */,
128
- /* 8 */,
129
- /* 9 */,
130
- /* 10 */
131
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
132
-
133
- "use strict";
134
- __webpack_require__.r(__webpack_exports__);
135
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
136
- /* harmony export */ copyDirectoryRecursive: function() { return /* binding */ copyDirectoryRecursive; },
137
- /* harmony export */ copyDirectoryRecursiveSync: function() { return /* binding */ copyDirectoryRecursiveSync; },
138
- /* harmony export */ copyFile: function() { return /* binding */ copyFile; },
139
- /* harmony export */ copyFileSync: function() { return /* binding */ copyFileSync; },
140
- /* harmony export */ imports: function() { return /* binding */ imports; },
141
- /* harmony export */ importsPromise: function() { return /* binding */ importsPromise; },
142
- /* harmony export */ isDirectory: function() { return /* binding */ isDirectory; },
143
- /* harmony export */ isDirectorySync: function() { return /* binding */ isDirectorySync; },
144
- /* harmony export */ isFile: function() { return /* binding */ isFile; },
145
- /* harmony export */ isFileSync: function() { return /* binding */ isFileSync; },
146
- /* harmony export */ walkDirectoryRecursively: function() { return /* binding */ _walkDirectoryRecursively; },
147
- /* harmony export */ walkDirectoryRecursivelySync: function() { return /* binding */ _walkDirectoryRecursivelySync; }
148
- /* harmony export */ });
149
- /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
150
- /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
151
- /* harmony import */ var _module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
152
- // #!/usr/bin/env babel-node
153
- // -*- coding: utf-8 -*-
154
- /** @module filesystem *//* !
155
- region header
156
- [Project page](https://torben.website/clientnode)
157
-
158
- Copyright Torben Sickert (info["~at~"]torben.website) 16.12.2012
159
-
160
- License
161
- -------
162
-
163
- This library written by Torben Sickert stands under a creative commons
164
- naming 3.0 unported license.
165
- See https://creativecommons.org/licenses/by/3.0/deed.de
166
- endregion
167
- */function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0))}if(o||r>1)return a;throw y=!0,n}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0)}else 1===c&&(t=i.return)&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break}catch(t){i=e,c=1,u=t}finally{f=1}}return{value:t,done:y}}}(r,o,i),!0),u}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]"}),(_regenerator=function _regenerator(){return{w:i,m:f}})()}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e)})}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2))},_regeneratorDefine2(e,r,n,t)}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]}},e:function e(r){throw r},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function s(){t=t.call(r)},n:function n(){var r=t.next();return a=r.done,r},e:function e(r){u=!0,o=r},f:function f(){try{a||null==t.return||t.return()}finally{if(u)throw o}}}}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){return void e(n)}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n)}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n)}_next(void 0)})}}var imports={fs:null,fsPromises:null,path:null};var mkdirSync;var readdirSync;var readFileSync;var statSync;var writeFileSync;var fsImportPromise=(0,_module__WEBPACK_IMPORTED_MODULE_2__.optionalImport)("fs");void fsImportPromise.then(function(module){imports.fs=module;if(module){mkdirSync=module.mkdirSync;readdirSync=module.readdirSync;readFileSync=module.readFileSync;statSync=module.statSync;writeFileSync=module.writeFileSync}else{mkdirSync=null;readdirSync=null;readFileSync=null;statSync=null;writeFileSync=null}});var mkdir;var readdir;var readFile;var stat;var writeFile;var fsPromisesImportPromise=(0,_module__WEBPACK_IMPORTED_MODULE_2__.optionalImport)("fs/promises");void fsPromisesImportPromise.then(function(module){imports.fsPromises=module;if(module){mkdir=module.mkdir;readdir=module.readdir;readFile=module.readFile;stat=module.stat;writeFile=module.writeFile}else{mkdir=null;readdir=null;readFile=null;stat=null;writeFile=null}});var basename;var join;var resolve;var pathImportPromise=(0,_module__WEBPACK_IMPORTED_MODULE_2__.optionalImport)("path");void pathImportPromise.then(function(module){imports.path=module;if(module){basename=module.basename;join=module.join;resolve=module.resolve}else{basename=null;join=null;resolve=null}});var importsPromise=Promise.all([fsImportPromise,fsPromisesImportPromise,pathImportPromise]);/**
168
- * Copies given source directory via path to given target directory location
169
- * with same target name as source file has or copy to given complete target
170
- * directory path.
171
- * @param sourcePath - Path to directory to copy.
172
- * @param targetPath - Target directory or complete directory location to copy
173
- * in.
174
- * @param contents - Indicates whether we only want to copy content of source
175
- * path without recreating the sourcefile itself on target location.
176
- * @param callback - Function to invoke for each traversed file.
177
- * @param readOptions - Options to use for reading source file.
178
- * @param writeOptions - Options to use for writing to target file.
179
- * @returns Promise holding the determined target directory path.
180
- */var copyDirectoryRecursive=/*#__PURE__*/function(){var _copyDirectoryRecursive=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(sourcePath,targetPath,contents,callback,readOptions,writeOptions){var _iterator,_step,_currentSourceFile$st,currentSourceFile,currentTargetPath,_t,_t2,_t3,_t4,_t5;return _regenerator().w(function(_context){while(1)switch(_context.p=_context.n){case 0:if(contents===void 0){contents=false}if(callback===void 0){callback=_context__WEBPACK_IMPORTED_MODULE_1__.NOOP}if(readOptions===void 0){readOptions={encoding:null,flag:"r"}}if(writeOptions===void 0){writeOptions={encoding:_constants__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_ENCODING,flag:"w",mode:438}}if(basename&&join&&mkdir&&resolve){_context.n=1;break}throw new Error("Could not load filesystem functions.");case 1:sourcePath=resolve(sourcePath);_t=!contents;if(!_t){_context.n=3;break}_context.n=2;return isDirectory(targetPath);case 2:_t=_context.v;case 3:if(!_t){_context.n=4;break}targetPath=resolve(targetPath,basename(sourcePath));case 4:_context.p=4;_context.n=5;return mkdir(targetPath);case 5:_context.n=7;break;case 6:_context.p=6;_t2=_context.v;if(!(_t2.code!=="EEXIST")){_context.n=7;break}throw _t2;case 7:_t3=_createForOfIteratorHelper;_context.n=8;return _walkDirectoryRecursively(sourcePath,callback);case 8:_iterator=_t3(_context.v);_context.p=9;_iterator.s();case 10:if((_step=_iterator.n()).done){_context.n=17;break}currentSourceFile=_step.value;currentTargetPath=join(targetPath,currentSourceFile.path.substring(sourcePath.length));if(!((_currentSourceFile$st=currentSourceFile.stats)!==null&&_currentSourceFile$st!==void 0&&_currentSourceFile$st.isDirectory())){_context.n=15;break}_context.p=11;_context.n=12;return mkdir(currentTargetPath);case 12:_context.n=14;break;case 13:_context.p=13;_t4=_context.v;if(!(_t4.code!=="EEXIST")){_context.n=14;break}throw _t4;case 14:_context.n=16;break;case 15:_context.n=16;return copyFile(currentSourceFile.path,currentTargetPath,readOptions,writeOptions);case 16:_context.n=10;break;case 17:_context.n=19;break;case 18:_context.p=18;_t5=_context.v;_iterator.e(_t5);case 19:_context.p=19;_iterator.f();return _context.f(19);case 20:return _context.a(2,targetPath)}},_callee,null,[[11,13],[9,18,19,20],[4,6]])}));function copyDirectoryRecursive(_x,_x2,_x3,_x4,_x5,_x6){return _copyDirectoryRecursive.apply(this,arguments)}return copyDirectoryRecursive}();/**
181
- * Copies given source directory via path to given target directory location
182
- * with same target name as source file has or copy to given complete target
183
- * directory path.
184
- * @param sourcePath - Path to directory to copy.
185
- * @param targetPath - Target directory or complete directory location to copy
186
- * in.
187
- * @param contents - Indicates whether we only want to copy content of source
188
- * path without recreating the sourcefile itself on target location.
189
- * @param callback - Function to invoke for each traversed file.
190
- * @param readOptions - Options to use for reading source file.
191
- * @param writeOptions - Options to use for writing to target file.
192
- * @returns Determined target directory path.
193
- */var copyDirectoryRecursiveSync=function copyDirectoryRecursiveSync(sourcePath,targetPath,contents,callback,readOptions,writeOptions){if(contents===void 0){contents=false}if(callback===void 0){callback=_context__WEBPACK_IMPORTED_MODULE_1__.NOOP}if(readOptions===void 0){readOptions={encoding:null,flag:"r"}}if(writeOptions===void 0){writeOptions={encoding:_constants__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_ENCODING,flag:"w",mode:438}}if(!(basename&&join&&mkdirSync&&resolve))throw new Error("Could not load filesystem functions.");sourcePath=resolve(sourcePath);if(!contents&&isDirectorySync(targetPath))targetPath=resolve(targetPath,basename(sourcePath));// NOTE: Try/Check if target folder needs to be created.
194
- try{mkdirSync(targetPath)}catch(error){if(error.code!=="EEXIST")throw error}for(var _i=0,_walkDirectoryRecursi=_walkDirectoryRecursivelySync(sourcePath,callback);_i<_walkDirectoryRecursi.length;_i++){var _currentSourceFile$st2;var currentSourceFile=_walkDirectoryRecursi[_i];var currentTargetPath=join(targetPath,currentSourceFile.path.substring(sourcePath.length));if((_currentSourceFile$st2=currentSourceFile.stats)!==null&&_currentSourceFile$st2!==void 0&&_currentSourceFile$st2.isDirectory())try{mkdirSync(currentTargetPath)}catch(error){if(error.code!=="EEXIST")throw error}else copyFileSync(currentSourceFile.path,currentTargetPath,readOptions,writeOptions)}return targetPath};/**
195
- * Copies given source file via path to given target directory location with
196
- * same target name as source file has or copy to given complete target file
197
- * path.
198
- * @param sourcePath - Path to file to copy.
199
- * @param targetPath - Target directory or complete file location to copy to.
200
- * @param readOptions - Options to use for reading source file.
201
- * @param writeOptions - Options to use for writing to target file.
202
- * @returns Determined target file path.
203
- */var copyFile=/*#__PURE__*/function(){var _copyFile=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(sourcePath,targetPath,readOptions,writeOptions){var _t6,_t7;return _regenerator().w(function(_context2){while(1)switch(_context2.n){case 0:if(readOptions===void 0){readOptions={encoding:null,flag:"r"}}if(writeOptions===void 0){writeOptions={encoding:_constants__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_ENCODING,flag:"w",mode:438}}if(basename&&readFile&&resolve&&writeFile){_context2.n=1;break}throw new Error("Could not load filesystem functions.");case 1:_context2.n=2;return isDirectory(targetPath);case 2:if(!_context2.v){_context2.n=3;break}targetPath=resolve(targetPath,basename(sourcePath));case 3:_t6=writeFile;_t7=targetPath;_context2.n=4;return readFile(sourcePath,readOptions);case 4:_context2.n=5;return _t6(_t7,_context2.v,writeOptions);case 5:return _context2.a(2,targetPath)}},_callee2)}));function copyFile(_x7,_x8,_x9,_x0){return _copyFile.apply(this,arguments)}return copyFile}();/**
204
- * Copies given source file via path to given target directory location with
205
- * same target name as source file has or copy to given complete target file
206
- * path.
207
- * @param sourcePath - Path to file to copy.
208
- * @param targetPath - Target directory or complete file location to copy to.
209
- * @param readOptions - Options to use for reading source file.
210
- * @param writeOptions - Options to use for writing to target file.
211
- * @returns Determined target file path.
212
- */var copyFileSync=function copyFileSync(sourcePath,targetPath,readOptions,writeOptions){if(readOptions===void 0){readOptions={encoding:null,flag:"r"}}if(writeOptions===void 0){writeOptions={encoding:_constants__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_ENCODING,flag:"w",mode:438}}if(!(basename&&readFileSync&&resolve&&writeFileSync))throw new Error("Could not load filesystem functions.");/*
213
- NOTE: If target path references a directory a new file with the same
214
- name will be created.
215
- */if(isDirectorySync(targetPath))targetPath=resolve(targetPath,basename(sourcePath));writeFileSync(targetPath,readFileSync(sourcePath,readOptions),writeOptions);return targetPath};/**
216
- * Checks if given path points to a valid directory.
217
- * @param filePath - Path to directory.
218
- * @returns A promise holding a boolean which indicates directory existence.
219
- */var isDirectory=/*#__PURE__*/function(){var _isDirectory=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(filePath){var _t8;return _regenerator().w(function(_context3){while(1)switch(_context3.p=_context3.n){case 0:if(stat){_context3.n=1;break}throw new Error("Could not load filesystem functions.");case 1:_context3.p=1;_context3.n=2;return stat(filePath);case 2:return _context3.a(2,_context3.v.isDirectory());case 3:_context3.p=3;_t8=_context3.v;if(!(Object.prototype.hasOwnProperty.call(_t8,"code")&&["ENOENT","ENOTDIR"].includes(_t8.code))){_context3.n=4;break}return _context3.a(2,false);case 4:throw _t8;case 5:return _context3.a(2)}},_callee3,null,[[1,3]])}));function isDirectory(_x1){return _isDirectory.apply(this,arguments)}return isDirectory}();/**
220
- * Checks if given path points to a valid directory.
221
- * @param filePath - Path to directory.
222
- * @returns A boolean which indicates directory existence.
223
- */var isDirectorySync=function isDirectorySync(filePath){if(!statSync)throw new Error("Could not load filesystem functions.");try{return statSync(filePath).isDirectory()}catch(error){if(Object.prototype.hasOwnProperty.call(error,"code")&&["ENOENT","ENOTDIR"].includes(error.code))return false;throw error}};/**
224
- * Checks if given path points to a valid file.
225
- * @param filePath - Path to directory.
226
- * @returns A promise holding a boolean which indicates directory existence.
227
- */var isFile=/*#__PURE__*/function(){var _isFile=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(filePath){var _t9;return _regenerator().w(function(_context4){while(1)switch(_context4.p=_context4.n){case 0:if(stat){_context4.n=1;break}throw new Error("Could not load filesystem functions.");case 1:_context4.p=1;_context4.n=2;return stat(filePath);case 2:return _context4.a(2,_context4.v.isFile());case 3:_context4.p=3;_t9=_context4.v;if(!(Object.prototype.hasOwnProperty.call(_t9,"code")&&["ENOENT","ENOTDIR"].includes(_t9.code))){_context4.n=4;break}return _context4.a(2,false);case 4:throw _t9;case 5:return _context4.a(2)}},_callee4,null,[[1,3]])}));function isFile(_x10){return _isFile.apply(this,arguments)}return isFile}();/**
228
- * Checks if given path points to a valid file.
229
- * @param filePath - Path to file.
230
- * @returns A boolean which indicates file existence.
231
- */var isFileSync=function isFileSync(filePath){if(!statSync)throw new Error("Could not load filesystem functions.");try{return statSync(filePath).isFile()}catch(error){if(Object.prototype.hasOwnProperty.call(error,"code")&&["ENOENT","ENOTDIR"].includes(error.code))return false;throw error}};/**
232
- * Iterates through given directory structure recursively and calls given
233
- * callback for each found file. Callback gets file path and corresponding stat
234
- * object as argument.
235
- * @param directoryPath - Path to directory structure to traverse.
236
- * @param callback - Function to invoke for each traversed file and potentially
237
- * manipulate further traversing in alphabetical sorted order.
238
- * If it returns "null" or a promise resolving to "null", no further files
239
- * will be traversed afterward.
240
- * If it handles a directory and returns "false" or a promise resolving to
241
- * "false" no traversing into that directory will occur.
242
- * @param options - Options to use for nested "readdir" calls.
243
- * @returns A promise holding the determined files.
244
- */var _walkDirectoryRecursively=/*#__PURE__*/function(){var _walkDirectoryRecursively2=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(directoryPath,callback,options){var files,_iterator2,_step2,directoryEntry,filePath,_file,finalFiles,_i2,_files,_file$stats,file,result,_t0,_t1,_t10,_t11;return _regenerator().w(function(_context5){while(1)switch(_context5.p=_context5.n){case 0:if(callback===void 0){callback=null}if(options===void 0){options=_constants__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_ENCODING}if(readdir&&resolve&&stat){_context5.n=1;break}throw new Error("Could not load filesystem functions.");case 1:files=[];_t0=_createForOfIteratorHelper;_context5.n=2;return readdir(directoryPath,typeof options==="string"?{encoding:options,withFileTypes:true}:_objectSpread(_objectSpread({},options),{},{withFileTypes:true}));case 2:_iterator2=_t0(_context5.v);_context5.p=3;_iterator2.s();case 4:if((_step2=_iterator2.n()).done){_context5.n=10;break}directoryEntry=_step2.value;filePath=resolve(directoryPath,directoryEntry.name);_file={directoryPath:directoryPath,directoryEntry:directoryEntry,error:null,name:directoryEntry.name,path:filePath,stats:null};_context5.p=5;_context5.n=6;return stat(filePath);case 6:_file.stats=_context5.v;_context5.n=8;break;case 7:_context5.p=7;_t1=_context5.v;_file.error=_t1;case 8:files.push(_file);case 9:_context5.n=4;break;case 10:_context5.n=12;break;case 11:_context5.p=11;_t10=_context5.v;_iterator2.e(_t10);case 12:_context5.p=12;_iterator2.f();return _context5.f(12);case 13:if(callback)/*
245
- NOTE: Directories and have to be iterated first to be able to
246
- avoid deeper unwanted traversing.
247
- */files.sort(function(firstFile,secondFile){var _firstFile$stats,_secondFile$stats2;if((_firstFile$stats=firstFile.stats)!==null&&_firstFile$stats!==void 0&&_firstFile$stats.isDirectory()){var _secondFile$stats;if((_secondFile$stats=secondFile.stats)!==null&&_secondFile$stats!==void 0&&_secondFile$stats.isDirectory())return 0;return-1}if((_secondFile$stats2=secondFile.stats)!==null&&_secondFile$stats2!==void 0&&_secondFile$stats2.isDirectory())return 1;return 0});finalFiles=[];_i2=0,_files=files;case 14:if(!(_i2<_files.length)){_context5.n=21;break}file=_files[_i2];finalFiles.push(file);result=callback?callback(file):undefined;if(!(result===null)){_context5.n=15;break}return _context5.a(3,21);case 15:if(!(_typeof(result)==="object"&&"then"in result)){_context5.n=17;break}_context5.n=16;return result;case 16:result=_context5.v;case 17:if(!(result===null)){_context5.n=18;break}return _context5.a(3,21);case 18:if(!(result!==false&&(_file$stats=file.stats)!==null&&_file$stats!==void 0&&_file$stats.isDirectory())){_context5.n=20;break}_t11=finalFiles;_context5.n=19;return _walkDirectoryRecursively(file.path,callback,options);case 19:finalFiles=_t11.concat.call(_t11,_context5.v);case 20:_i2++;_context5.n=14;break;case 21:return _context5.a(2,finalFiles)}},_callee5,null,[[5,7],[3,11,12,13]])}));function walkDirectoryRecursively(_x11,_x12,_x13){return _walkDirectoryRecursively2.apply(this,arguments)}return walkDirectoryRecursively}();/**
248
- * Iterates through given directory structure recursively and calls given
249
- * callback for each found file. Callback gets file path and corresponding
250
- * stats object as argument.
251
- * @param directoryPath - Path to directory structure to traverse.
252
- * @param callback - Function to invoke for each traversed file.
253
- * @param options - Options to use for nested "readdir" calls.
254
- * @returns Determined list if all files.
255
- */var _walkDirectoryRecursivelySync=function walkDirectoryRecursivelySync(directoryPath,callback,options){if(callback===void 0){callback=_context__WEBPACK_IMPORTED_MODULE_1__.NOOP}if(options===void 0){options=_constants__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_ENCODING}if(!(readdirSync&&resolve&&statSync))throw new Error("Could not load filesystem functions.");var files=[];var _iterator3=_createForOfIteratorHelper(readdirSync(directoryPath,typeof options==="string"?{encoding:options,withFileTypes:true}:_objectSpread(_objectSpread({},options),{},{withFileTypes:true}))),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var directoryEntry=_step3.value;var filePath=resolve(directoryPath,directoryEntry.name);var _file2={directoryPath:directoryPath,directoryEntry:directoryEntry,error:null,name:directoryEntry.name,path:filePath,stats:null};try{_file2.stats=statSync(filePath)}catch(error){_file2.error=error}files.push(_file2)}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}var finalFiles=[];if(callback){/*
256
- NOTE: Directories have to be iterated first to potentially
257
- avoid deeper iterations.
258
- */files.sort(function(firstFile,secondFile){var _firstFile$stats2,_secondFile$stats4;if((_firstFile$stats2=firstFile.stats)!==null&&_firstFile$stats2!==void 0&&_firstFile$stats2.isDirectory()){var _secondFile$stats3;if((_secondFile$stats3=secondFile.stats)!==null&&_secondFile$stats3!==void 0&&_secondFile$stats3.isDirectory())return 0;return-1}if((_secondFile$stats4=secondFile.stats)!==null&&_secondFile$stats4!==void 0&&_secondFile$stats4.isDirectory())return 1;return 0});var _iterator4=_createForOfIteratorHelper(files),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var _file$stats2;var file=_step4.value;finalFiles.push(file);var result=callback(file);if(result===null)break;if(result!==false&&(_file$stats2=file.stats)!==null&&_file$stats2!==void 0&&_file$stats2.isDirectory())finalFiles=finalFiles.concat(_walkDirectoryRecursivelySync(file.path,callback,options))}}catch(err){_iterator4.e(err)}finally{_iterator4.f()}}return finalFiles};
259
-
260
- /***/ })
261
- /******/ ]);
262
- /************************************************************************/
263
- /******/ // The module cache
264
- /******/ var __webpack_module_cache__ = {};
265
- /******/
266
- /******/ // The require function
267
- /******/ function __webpack_require__(moduleId) {
268
- /******/ // Check if module is in cache
269
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
270
- /******/ if (cachedModule !== undefined) {
271
- /******/ return cachedModule.exports;
272
- /******/ }
273
- /******/ // Create a new module (and put it into the cache)
274
- /******/ var module = __webpack_module_cache__[moduleId] = {
275
- /******/ id: moduleId,
276
- /******/ loaded: false,
277
- /******/ exports: {}
278
- /******/ };
279
- /******/
280
- /******/ // Execute the module function
281
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
282
- /******/
283
- /******/ // Flag the module as loaded
284
- /******/ module.loaded = true;
285
- /******/
286
- /******/ // Return the exports of the module
287
- /******/ return module.exports;
288
- /******/ }
289
- /******/
290
- /******/ // expose the module cache
291
- /******/ __webpack_require__.c = __webpack_module_cache__;
292
- /******/
293
- /************************************************************************/
294
- /******/ /* webpack/runtime/define property getters */
295
- /******/ !function() {
296
- /******/ // define getter/value functions for harmony exports
297
- /******/ __webpack_require__.d = function(exports, definition) {
298
- /******/ if(Array.isArray(definition)) {
299
- /******/ var i = 0;
300
- /******/ while(i < definition.length) {
301
- /******/ var key = definition[i++];
302
- /******/ var binding = definition[i++];
303
- /******/ if(!__webpack_require__.o(exports, key)) {
304
- /******/ if(binding === 0) {
305
- /******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
306
- /******/ } else {
307
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
308
- /******/ }
309
- /******/ } else if(binding === 0) { i++; }
310
- /******/ }
311
- /******/ } else {
312
- /******/ for(var key in definition) {
313
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
314
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
315
- /******/ }
316
- /******/ }
317
- /******/ }
318
- /******/ };
319
- /******/ }();
320
- /******/
321
- /******/ /* webpack/runtime/global */
322
- /******/ !function() {
323
- /******/ __webpack_require__.g = (function() {
324
- /******/ if (typeof globalThis === 'object') return globalThis;
325
- /******/ try {
326
- /******/ return this || new Function('return this')();
327
- /******/ } catch (e) {
328
- /******/ if (typeof window === 'object') return window;
329
- /******/ }
330
- /******/ })();
331
- /******/ }();
332
- /******/
333
- /******/ /* webpack/runtime/harmony module decorator */
334
- /******/ !function() {
335
- /******/ __webpack_require__.hmd = function(module) {
336
- /******/ module = Object.create(module);
337
- /******/ if (!module.children) module.children = [];
338
- /******/ Object.defineProperty(module, 'exports', {
339
- /******/ enumerable: true,
340
- /******/ set: function() {
341
- /******/ throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);
342
- /******/ }
343
- /******/ });
344
- /******/ return module;
345
- /******/ };
346
- /******/ }();
347
- /******/
348
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
349
- /******/ !function() {
350
- /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
351
- /******/ }();
352
- /******/
353
- /******/ /* webpack/runtime/make namespace object */
354
- /******/ !function() {
355
- /******/ // define __esModule on exports
356
- /******/ __webpack_require__.r = function(exports) {
357
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
358
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
359
- /******/ }
360
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
361
- /******/ };
362
- /******/ }();
363
- /******/
364
- /************************************************************************/
365
- /******/
366
- /******/ // module cache are used so entry inlining is disabled
367
- /******/ // startup
368
- /******/ // Load entry module and return exports
369
- /******/ var __webpack_exports__ = __webpack_require__(10);
370
- /******/
371
- /******/ return __webpack_exports__;
372
- /******/ })()
373
- ;
374
- });
@@ -1,105 +0,0 @@
1
- 'use strict';if(typeof module!=='undefined'&&module!==null&&eval('typeof require')!=='undefined'&&eval('require')!==null&&'main'in eval('require')&&eval('typeof require.main')!=='undefined'&&eval('require.main')!==null){var ORIGINAL_MAIN_MODULE=module;if(module!==eval('require.main')&&'paths'in module&&'paths'in eval('require.main')&&typeof __dirname!=='undefined'&&__dirname!==null)module.paths=eval('require.main.paths').concat(module.paths.filter(function(path){return eval('require.main.paths').includes(path)}))};if(typeof window==='undefined'||window===null)var window=(typeof global==='undefined'||global===null)?{}:global;(function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory();
4
- else if(typeof define === 'function' && define.amd)
5
- define("clientnode", [], factory);
6
- else if(typeof exports === 'object')
7
- exports["clientnode"] = factory();
8
- else
9
- root["clientnode"] = factory();
10
- })(this, function() {
11
- return /******/ (function() { // webpackBootstrap
12
- /******/ "use strict";
13
- /******/ // The require scope
14
- /******/ var __webpack_require__ = {};
15
- /******/
16
- /************************************************************************/
17
- /******/ /* webpack/runtime/define property getters */
18
- /******/ !function() {
19
- /******/ // define getter/value functions for harmony exports
20
- /******/ __webpack_require__.d = function(exports, definition) {
21
- /******/ if(Array.isArray(definition)) {
22
- /******/ var i = 0;
23
- /******/ while(i < definition.length) {
24
- /******/ var key = definition[i++];
25
- /******/ var binding = definition[i++];
26
- /******/ if(!__webpack_require__.o(exports, key)) {
27
- /******/ if(binding === 0) {
28
- /******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
29
- /******/ } else {
30
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
31
- /******/ }
32
- /******/ } else if(binding === 0) { i++; }
33
- /******/ }
34
- /******/ } else {
35
- /******/ for(var key in definition) {
36
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
37
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
38
- /******/ }
39
- /******/ }
40
- /******/ }
41
- /******/ };
42
- /******/ }();
43
- /******/
44
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
45
- /******/ !function() {
46
- /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
47
- /******/ }();
48
- /******/
49
- /******/ /* webpack/runtime/make namespace object */
50
- /******/ !function() {
51
- /******/ // define __esModule on exports
52
- /******/ __webpack_require__.r = function(exports) {
53
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
54
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
55
- /******/ }
56
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
57
- /******/ };
58
- /******/ }();
59
- /******/
60
- /************************************************************************/
61
- var __webpack_exports__ = {};
62
- __webpack_require__.r(__webpack_exports__);
63
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
64
- /* harmony export */ getParameterNames: function() { return /* binding */ _getParameterNames; },
65
- /* harmony export */ identity: function() { return /* binding */ identity; },
66
- /* harmony export */ invertArrayFilter: function() { return /* binding */ invertArrayFilter; }
67
- /* harmony export */ });
68
- // #!/usr/bin/env babel-node
69
- // -*- coding: utf-8 -*-
70
- /** @module function *//* !
71
- region header
72
- [Project page](https://torben.website/clientnode)
73
-
74
- Copyright Torben Sickert (info["~at~"]torben.website) 16.12.2012
75
-
76
- License
77
- -------
78
-
79
- This library written by Torben Sickert stands under a creative commons
80
- naming 3.0 unported license.
81
- See https://creativecommons.org/licenses/by/3.0/deed.de
82
- endregion
83
- */function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]}},e:function e(r){throw r},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function s(){t=t.call(r)},n:function n(){var r=t.next();return a=r.done,r},e:function e(r){u=!0,o=r},f:function f(){try{a||null==t.return||t.return()}finally{if(u)throw o}}}}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}/**
84
- * Determines all parameter names from given callable (function or class,
85
- * ...).
86
- * @param callable - Function or function code to inspect.
87
- * @returns List of parameter names.
88
- */var _getParameterNames=function getParameterNames(callable){var functionCode=(typeof callable==="string"?callable:// Strip comments.
89
- callable.toString()).replace(/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,"");if(functionCode.startsWith("class"))return _getParameterNames("function "+functionCode.replace(/.*(constructor\([^)]+\))/m,"$1"));// Try classic function declaration.
90
- var parameter=/^function\s*[^(]*\(\s*([^)]*)\)/m.exec(functionCode);if(parameter===null)// Try arrow function declaration.
91
- parameter=/^[^(]*\(\s*([^)]*)\) *=>.*/m.exec(functionCode);if(parameter===null)// Try one argument and without brackets arrow function declaration.
92
- parameter=/([^= ]+) *=>.*/m.exec(functionCode);var names=[];if(parameter&&parameter.length>1&&parameter[1].trim().length){var _iterator=_createForOfIteratorHelper(parameter[1].split(",")),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;)// Remove default parameter values.
93
- {var name=_step.value;names.push(name.replace(/=.+$/g,"").trim())}}catch(err){_iterator.e(err)}finally{_iterator.f()}return names}return names};/**
94
- * Implements the identity function.
95
- * @param value - A value to return.
96
- * @returns Returns the given value.
97
- */var identity=function identity(value){return value};/**
98
- * Inverted filter helper to inverse each given filter.
99
- * @param filter - A function that filters an array.
100
- * @returns The inverted filter.
101
- */var invertArrayFilter=function invertArrayFilter(filter){return function(data){if(Array.isArray(data)){for(var _len=arguments.length,additionalParameter=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){additionalParameter[_key-1]=arguments[_key]}var filteredData=filter.apply(void 0,[data].concat(additionalParameter));var result=[];if(filteredData.length){var _iterator2=_createForOfIteratorHelper(data),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var date=_step2.value;if(!filteredData.includes(date))result.push(date)}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}}else result=data;return result}return data}};
102
- /******/ return __webpack_exports__;
103
- /******/ })()
104
- ;
105
- });