clientnode 4.0.1430 → 4.0.1432

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.d.ts +39 -0
  2. package/dist/Lock.js +94 -83
  3. package/dist/Logger.d.ts +102 -0
  4. package/dist/Logger.js +700 -163
  5. package/dist/Semaphore.d.ts +29 -0
  6. package/dist/Semaphore.js +81 -46
  7. package/dist/array.d.ts +150 -0
  8. package/dist/array.js +554 -337
  9. package/dist/bundle/Lock.js +111 -0
  10. package/dist/bundle/Logger.js +690 -0
  11. package/dist/bundle/Semaphore.js +100 -0
  12. package/dist/bundle/array.js +634 -0
  13. package/dist/bundle/cli.js +85 -0
  14. package/dist/bundle/constants.js +225 -0
  15. package/dist/bundle/context.js +242 -0
  16. package/dist/bundle/cookie.js +261 -0
  17. package/dist/bundle/data-transfer.js +726 -0
  18. package/dist/bundle/datetime.js +1036 -0
  19. package/dist/bundle/domNode.js +470 -0
  20. package/dist/bundle/expression/evaluators.js +1087 -0
  21. package/dist/bundle/expression/helper.js +106 -0
  22. package/dist/bundle/expression/index.js +1195 -0
  23. package/dist/bundle/expression/indicator-functions.js +235 -0
  24. package/dist/bundle/expression/type.js +50 -0
  25. package/dist/bundle/filesystem.js +373 -0
  26. package/dist/bundle/function.js +105 -0
  27. package/dist/bundle/index.js +2654 -0
  28. package/dist/bundle/indicators.js +445 -0
  29. package/dist/bundle/number.js +411 -0
  30. package/dist/bundle/object.js +975 -0
  31. package/dist/bundle/process.js +274 -0
  32. package/dist/bundle/property-types.js +167 -0
  33. package/dist/bundle/require.js +179 -0
  34. package/dist/bundle/scope.js +1778 -0
  35. package/dist/bundle/string.js +1066 -0
  36. package/dist/bundle/test-helper.js +676 -0
  37. package/dist/bundle/type.js +50 -0
  38. package/dist/bundle/utility.js +361 -0
  39. package/dist/cli.d.ts +31 -0
  40. package/dist/cli.js +71 -37
  41. package/dist/compatible/Lock.js +111 -0
  42. package/dist/compatible/Logger.js +690 -0
  43. package/dist/compatible/Semaphore.js +100 -0
  44. package/dist/compatible/array.js +634 -0
  45. package/dist/compatible/cli.js +85 -0
  46. package/dist/compatible/constants.js +225 -0
  47. package/dist/compatible/context.js +242 -0
  48. package/dist/compatible/cookie.js +261 -0
  49. package/dist/compatible/data-transfer.js +726 -0
  50. package/dist/compatible/datetime.js +1036 -0
  51. package/dist/compatible/domNode.js +470 -0
  52. package/dist/compatible/expression/evaluators.js +1087 -0
  53. package/dist/compatible/expression/helper.js +106 -0
  54. package/dist/compatible/expression/index.js +1195 -0
  55. package/dist/compatible/expression/indicator-functions.js +235 -0
  56. package/dist/compatible/expression/type.js +50 -0
  57. package/dist/compatible/filesystem.js +373 -0
  58. package/dist/compatible/function.js +105 -0
  59. package/dist/compatible/index.js +2654 -0
  60. package/dist/compatible/indicators.js +445 -0
  61. package/dist/compatible/number.js +411 -0
  62. package/dist/compatible/object.js +975 -0
  63. package/dist/compatible/process.js +274 -0
  64. package/dist/compatible/property-types.js +167 -0
  65. package/dist/compatible/require.js +179 -0
  66. package/dist/compatible/scope.js +1778 -0
  67. package/dist/compatible/string.js +1066 -0
  68. package/dist/compatible/test-helper.js +676 -0
  69. package/dist/compatible/type.js +50 -0
  70. package/dist/compatible/utility.js +361 -0
  71. package/dist/constants.d.ts +99 -0
  72. package/dist/constants.js +209 -110
  73. package/dist/context.d.ts +8 -0
  74. package/dist/context.js +228 -25
  75. package/dist/cookie.d.ts +31 -0
  76. package/dist/cookie.js +225 -48
  77. package/dist/data-transfer.d.ts +45 -0
  78. package/dist/data-transfer.js +710 -166
  79. package/dist/datetime.d.ts +37 -0
  80. package/dist/datetime.js +1031 -241
  81. package/dist/domNode.d.ts +82 -0
  82. package/dist/domNode.js +440 -277
  83. package/dist/expression/evaluators.d.ts +55 -0
  84. package/dist/expression/evaluators.js +1084 -234
  85. package/dist/expression/helper.d.ts +4 -0
  86. package/dist/expression/helper.js +135 -82
  87. package/dist/expression/index.d.ts +7 -0
  88. package/dist/expression/index.js +1217 -10
  89. package/dist/expression/indicator-functions.d.ts +14 -0
  90. package/dist/expression/indicator-functions.js +239 -21
  91. package/dist/expression/type.d.ts +70 -0
  92. package/dist/expression/type.js +34 -4
  93. package/dist/filesystem.d.ts +143 -0
  94. package/dist/filesystem.js +308 -323
  95. package/dist/function.d.ts +20 -0
  96. package/dist/function.js +125 -51
  97. package/dist/index.d.ts +23 -0
  98. package/dist/index.js +2677 -26
  99. package/dist/indicators.d.ts +68 -0
  100. package/dist/indicators.js +426 -68
  101. package/dist/number.d.ts +35 -0
  102. package/dist/number.js +409 -25
  103. package/dist/object.d.ts +215 -0
  104. package/dist/object.js +836 -759
  105. package/dist/process.d.ts +22 -0
  106. package/dist/process.js +245 -40
  107. package/dist/property-types.d.ts +460 -0
  108. package/dist/property-types.js +157 -96
  109. package/dist/require.d.ts +8 -0
  110. package/dist/require.js +163 -66
  111. package/dist/scope.d.ts +44 -0
  112. package/dist/scope.js +1795 -56
  113. package/dist/string.d.ts +299 -0
  114. package/dist/string.js +891 -595
  115. package/dist/test/Lock.d.ts +1 -0
  116. package/dist/test/Logger.d.ts +1 -0
  117. package/dist/test/Semaphore.d.ts +1 -0
  118. package/dist/test/array.d.ts +1 -0
  119. package/dist/test/cookie.d.ts +1 -0
  120. package/dist/test/data-transfer.d.ts +1 -0
  121. package/dist/test/datetime.d.ts +1 -0
  122. package/dist/test/domNode.d.ts +1 -0
  123. package/dist/test/expression/evaluators.d.ts +1 -0
  124. package/dist/test/expression/helper.d.ts +1 -0
  125. package/dist/test/expression/indicator-functions.d.ts +1 -0
  126. package/dist/test/filesystem.d.ts +1 -0
  127. package/dist/test/function.d.ts +1 -0
  128. package/dist/test/indicators.d.ts +1 -0
  129. package/dist/test/number.d.ts +1 -0
  130. package/dist/test/object.d.ts +1 -0
  131. package/dist/test/process.d.ts +1 -0
  132. package/dist/test/property-types.d.ts +1 -0
  133. package/dist/test/scope.d.ts +1 -0
  134. package/dist/test/string.d.ts +1 -0
  135. package/dist/test/utility.d.ts +1 -0
  136. package/dist/test-helper.d.ts +143 -0
  137. package/dist/test-helper.js +527 -172
  138. package/dist/type.d.ts +217 -0
  139. package/dist/type.js +37 -8
  140. package/dist/utility.d.ts +44 -0
  141. package/dist/utility.js +335 -91
  142. package/package.json +3 -3
@@ -0,0 +1,111 @@
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([], factory);
6
+ else {
7
+ var a = factory();
8
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
+ }
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 */ Lock: function() { return /* binding */ Lock; }
65
+ /* harmony export */ });
66
+ // #!/usr/bin/env babel-node
67
+ // -*- coding: utf-8 -*-
68
+ /** @module Lock *//* !
69
+ region header
70
+ [Project page](https://torben.website/clientnode)
71
+
72
+ Copyright Torben Sickert (info["~at~"]torben.website) 16.12.2012
73
+
74
+ License
75
+ -------
76
+
77
+ This library written by Torben Sickert stands under a creative commons
78
+ naming 3.0 unported license.
79
+ See https://creativecommons.org/licenses/by/3.0/deed.de
80
+ endregion
81
+ */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 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 _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),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)}/**
82
+ * Represents the lock state.
83
+ * @property locks - Mapping of lock descriptions to their corresponding
84
+ * callbacks.
85
+ */var Lock=/*#__PURE__*/function(){/**
86
+ * Initializes locks.
87
+ * @param locks - Mapping of a lock description to callbacks for calling
88
+ * when given lock should be released.
89
+ */function Lock(locks){if(locks===void 0){locks={}}_classCallCheck(this,Lock);_defineProperty(this,"lock",void 0);_defineProperty(this,"locks",void 0);this.locks=locks}/**
90
+ * Calling this method introduces a starting point for a critical area with
91
+ * potential race conditions. The area will be bind to given description
92
+ * string. So don't use same names for different areas.
93
+ * @param description - A short string describing the critical areas
94
+ * properties.
95
+ * @param callback - A procedure which should only be executed if the
96
+ * interpreter isn't in the given critical area. The lock description
97
+ * string will be given to the callback function.
98
+ * @param autoRelease - Release the lock after execution of given callback.
99
+ * @returns Returns a promise which will be resolved after releasing lock.
100
+ */return _createClass(Lock,[{key:"acquire",value:function acquire(description,callback,autoRelease){var _this=this;if(autoRelease===void 0){autoRelease=false}return new Promise(function(resolve){var wrappedCallback=function wrappedCallback(description){var _result;var result;if(callback)result=callback(description);var finish=function finish(value){if(autoRelease)void _this.release(description);resolve(value);return value};if((_result=result)!==null&&_result!==void 0&&_result.then)return result.then(finish);finish(result);return result};if(description){if(Object.prototype.hasOwnProperty.call(_this.locks,description))_this.locks[description].push(wrappedCallback);else{_this.locks[description]=[];void wrappedCallback(description)}return}if(_this.lock)_this.lock.push(wrappedCallback);else{_this.lock=[];void wrappedCallback(description)}})}/**
101
+ * Calling this method causes the given critical area to be finished and
102
+ * all functions given to "acquire()" will be executed in right order.
103
+ * @param description - A short string describing the critical areas
104
+ * properties.
105
+ * @returns Returns the return (maybe promise resolved) value of the
106
+ * callback given to the "acquire" method.
107
+ */},{key:"release",value:(function(){var _release=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(description){var _this$lock;var _callback,callback;return _regenerator().w(function(_context){while(1)switch(_context.n){case 0:if(!description){_context.n=4;break}if(!Object.prototype.hasOwnProperty.call(this.locks,description)){_context.n=3;break}_callback=this.locks[description].shift();if(!(_callback===undefined)){_context.n=1;break}delete this.locks[description];_context.n=3;break;case 1:_context.n=2;return _callback(description);case 2:return _context.a(2,_context.v);case 3:return _context.a(2);case 4:callback=(_this$lock=this.lock)===null||_this$lock===void 0?void 0:_this$lock.shift();if(!(callback===undefined)){_context.n=5;break}this.lock=undefined;_context.n=7;break;case 5:_context.n=6;return callback();case 6:return _context.a(2,_context.v);case 7:return _context.a(2)}},_callee,this)}));function release(_x){return _release.apply(this,arguments)}return release}())}])}();/* harmony default export */ __webpack_exports__["default"] = (Lock);
108
+ /******/ return __webpack_exports__;
109
+ /******/ })()
110
+ ;
111
+ });