@cyberskill/shared 1.47.0 → 1.48.0

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 (133) hide show
  1. package/dist/_tsup-dts-rollup.d.cts +410 -30
  2. package/dist/_tsup-dts-rollup.d.ts +410 -30
  3. package/dist/cli.cjs +2136 -1
  4. package/dist/cli.d.cts +2 -1
  5. package/dist/cli.d.ts +2 -1
  6. package/dist/cli.js +2056 -1
  7. package/dist/configs/commitlint/base.cjs +64 -1
  8. package/dist/configs/commitlint/base.js +7 -1
  9. package/dist/configs/eslint/base.cjs +121 -1
  10. package/dist/configs/eslint/base.js +52 -1
  11. package/dist/configs/eslint/nestjs.cjs +155 -1
  12. package/dist/configs/eslint/nestjs.js +85 -1
  13. package/dist/configs/eslint/nextjs.cjs +155 -1
  14. package/dist/configs/eslint/nextjs.js +85 -1
  15. package/dist/configs/eslint/nodejs.cjs +156 -1
  16. package/dist/configs/eslint/nodejs.js +86 -1
  17. package/dist/configs/eslint/vite-react.cjs +159 -1
  18. package/dist/configs/eslint/vite-react.js +89 -1
  19. package/dist/configs/graphql/graphql-codegen.cjs +125 -1
  20. package/dist/configs/graphql/graphql-codegen.js +64 -1
  21. package/dist/configs/graphql/index.cjs +126 -1
  22. package/dist/configs/graphql/index.js +64 -1
  23. package/dist/configs/i18n/react/i18next.cjs +80 -1
  24. package/dist/configs/i18n/react/i18next.js +7 -1
  25. package/dist/configs/i18n/react/index.cjs +81 -1
  26. package/dist/configs/i18n/react/index.js +7 -1
  27. package/dist/configs/index.cjs +232 -1
  28. package/dist/configs/index.js +166 -1
  29. package/dist/configs/lint-staged/base.cjs +64 -1
  30. package/dist/configs/lint-staged/base.js +7 -1
  31. package/dist/configs/vitest/react/e2e.cjs +128 -1
  32. package/dist/configs/vitest/react/e2e.js +59 -1
  33. package/dist/configs/vitest/react/unit.cjs +305 -1
  34. package/dist/configs/vitest/react/unit.js +228 -1
  35. package/dist/configs/vitest/react/unit.setup.cjs +60 -1
  36. package/dist/configs/vitest/react/unit.setup.js +8 -1
  37. package/dist/constants/index.cjs +678 -1
  38. package/dist/constants/index.d.cts +31 -1
  39. package/dist/constants/index.d.ts +31 -1
  40. package/dist/constants/index.js +469 -1
  41. package/dist/constants/path.cjs +423 -1
  42. package/dist/constants/path.d.cts +31 -1
  43. package/dist/constants/path.d.ts +31 -1
  44. package/dist/constants/path.js +218 -1
  45. package/dist/constants/response-status.cjs +313 -1
  46. package/dist/constants/response-status.js +252 -1
  47. package/dist/index.cjs +4546 -1
  48. package/dist/index.d.cts +51 -7
  49. package/dist/index.d.ts +51 -7
  50. package/dist/index.js +4133 -1
  51. package/dist/nodejs/index.cjs +2138 -1
  52. package/dist/nodejs/index.js +2054 -1
  53. package/dist/nodejs/mongo.cjs +2137 -1
  54. package/dist/nodejs/mongo.js +2054 -1
  55. package/dist/react/apollo-client.cjs +177 -1
  56. package/dist/react/apollo-client.js +116 -1
  57. package/dist/react/index.cjs +990 -1
  58. package/dist/react/index.js +876 -1
  59. package/dist/react/loading.cjs +301 -1
  60. package/dist/react/loading.js +216 -1
  61. package/dist/react/next-intl.cjs +744 -1
  62. package/dist/react/next-intl.js +655 -1
  63. package/dist/react/storage.cjs +631 -1
  64. package/dist/react/storage.js +558 -1
  65. package/dist/typescript/api-response.cjs +48 -1
  66. package/dist/typescript/apollo.cjs +48 -1
  67. package/dist/typescript/command.cjs +68 -1
  68. package/dist/typescript/command.d.cts +4 -0
  69. package/dist/typescript/command.d.ts +4 -0
  70. package/dist/typescript/command.js +7 -1
  71. package/dist/typescript/config.cjs +48 -1
  72. package/dist/typescript/fs.cjs +48 -0
  73. package/dist/typescript/fs.d.cts +1 -0
  74. package/dist/typescript/fs.d.ts +1 -0
  75. package/dist/typescript/fs.js +0 -0
  76. package/dist/typescript/graphql-codegen.cjs +48 -1
  77. package/dist/typescript/index.cjs +175 -1
  78. package/dist/typescript/index.d.cts +5 -0
  79. package/dist/typescript/index.d.ts +5 -0
  80. package/dist/typescript/index.js +151 -1
  81. package/dist/typescript/loading.cjs +48 -1
  82. package/dist/typescript/log.cjs +48 -1
  83. package/dist/typescript/mongo.cjs +164 -1
  84. package/dist/typescript/mongo.js +145 -1
  85. package/dist/typescript/next-intl.cjs +48 -1
  86. package/dist/typescript/react.cjs +48 -1
  87. package/dist/typescript/serializer.cjs +48 -1
  88. package/dist/typescript/string.cjs +48 -1
  89. package/dist/utils/command.cjs +1387 -1
  90. package/dist/utils/command.d.cts +2 -0
  91. package/dist/utils/command.d.ts +2 -0
  92. package/dist/utils/command.js +1287 -1
  93. package/dist/utils/common.cjs +300 -1
  94. package/dist/utils/common.js +219 -1
  95. package/dist/utils/config.cjs +146 -1
  96. package/dist/utils/config.js +89 -1
  97. package/dist/utils/fs.cjs +118 -1
  98. package/dist/utils/fs.d.cts +4 -1
  99. package/dist/utils/fs.d.ts +4 -1
  100. package/dist/utils/fs.js +37 -1
  101. package/dist/utils/index-nodejs.cjs +1738 -1
  102. package/dist/utils/index-nodejs.d.cts +15 -6
  103. package/dist/utils/index-nodejs.d.ts +15 -6
  104. package/dist/utils/index-nodejs.js +1571 -1
  105. package/dist/utils/index.cjs +727 -1
  106. package/dist/utils/index.js +625 -1
  107. package/dist/utils/log.cjs +330 -1
  108. package/dist/utils/log.js +269 -1
  109. package/dist/utils/package.cjs +941 -0
  110. package/dist/utils/package.d.cts +3 -0
  111. package/dist/utils/package.d.ts +3 -0
  112. package/dist/utils/package.js +857 -0
  113. package/dist/utils/path.cjs +291 -0
  114. package/dist/utils/path.d.cts +6 -0
  115. package/dist/utils/path.d.ts +6 -0
  116. package/dist/utils/path.js +191 -0
  117. package/dist/utils/serializer.cjs +91 -1
  118. package/dist/utils/serializer.js +30 -1
  119. package/dist/utils/storage-client.cjs +349 -1
  120. package/dist/utils/storage-client.js +276 -1
  121. package/dist/utils/storage-server.cjs +636 -1
  122. package/dist/utils/storage-server.d.cts +1 -1
  123. package/dist/utils/storage-server.d.ts +1 -1
  124. package/dist/utils/storage-server.js +550 -1
  125. package/dist/utils/string.cjs +152 -1
  126. package/dist/utils/string.js +75 -1
  127. package/dist/utils/validate.cjs +90 -1
  128. package/dist/utils/validate.js +33 -1
  129. package/package.json +11 -11
  130. package/dist/utils/npm-package.cjs +0 -1
  131. package/dist/utils/npm-package.d.cts +0 -5
  132. package/dist/utils/npm-package.d.ts +0 -5
  133. package/dist/utils/npm-package.js +0 -1
@@ -1 +1,68 @@
1
- "use strict";function r(r){"@swc/helpers - typeof";return r&&typeof Symbol!=="undefined"&&r.constructor===Symbol?"symbol":typeof r}var e=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var u=function(r,t){for(var n in t)e(r,n,{get:t[n],enumerable:!0})},a=function(u,a,f,i){var c=true,l=false,y=undefined;if(a&&(typeof a==="undefined"?"undefined":r(a))=="object"||typeof a=="function")try{var p=function(){var r=d.value;!o.call(u,r)&&r!==f&&e(u,r,{get:function(){return a[r]},enumerable:!(i=t(a,r))||i.enumerable})};for(var v=n(a)[Symbol.iterator](),d;!(c=(d=v.next()).done);c=true)p()}catch(r){l=true;y=r}finally{try{if(!c&&v.return!=null){v.return()}}finally{if(l){throw y}}}return u};var f=function(r){return a(e({},"__esModule",{value:!0}),r)};var i={};u(i,{E_ErrorType:function(){return c}});module.exports=f(i);var c=function(r){return r.Error="error",r.Warning="warning",r}(c||{});0&&(module.exports={E_ErrorType:E_ErrorType});
1
+ "use strict";
2
+ function _type_of(obj) {
3
+ "@swc/helpers - typeof";
4
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
5
+ }
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __getOwnPropNames = Object.getOwnPropertyNames;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __export = function(target, all) {
11
+ for(var name in all)__defProp(target, name, {
12
+ get: all[name],
13
+ enumerable: true
14
+ });
15
+ };
16
+ var __copyProps = function(to, from, except, desc) {
17
+ if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
18
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
19
+ try {
20
+ var _loop = function() {
21
+ var key = _step.value;
22
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
23
+ get: function() {
24
+ return from[key];
25
+ },
26
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
27
+ });
28
+ };
29
+ for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
30
+ } catch (err) {
31
+ _didIteratorError = true;
32
+ _iteratorError = err;
33
+ } finally{
34
+ try {
35
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
36
+ _iterator.return();
37
+ }
38
+ } finally{
39
+ if (_didIteratorError) {
40
+ throw _iteratorError;
41
+ }
42
+ }
43
+ }
44
+ }
45
+ return to;
46
+ };
47
+ var __toCommonJS = function(mod) {
48
+ return __copyProps(__defProp({}, "__esModule", {
49
+ value: true
50
+ }), mod);
51
+ };
52
+ // src/typescript/command.ts
53
+ var command_exports = {};
54
+ __export(command_exports, {
55
+ E_ErrorType: function() {
56
+ return E_ErrorType;
57
+ }
58
+ });
59
+ module.exports = __toCommonJS(command_exports);
60
+ var E_ErrorType = /* @__PURE__ */ function(E_ErrorType2) {
61
+ E_ErrorType2["Error"] = "error";
62
+ E_ErrorType2["Warning"] = "warning";
63
+ return E_ErrorType2;
64
+ }(E_ErrorType || {});
65
+ // Annotate the CommonJS export names for ESM import in node:
66
+ 0 && (module.exports = {
67
+ E_ErrorType: E_ErrorType
68
+ });
@@ -2,3 +2,7 @@ export { E_ErrorType_alias_1 as E_ErrorType } from '../_tsup-dts-rollup.cjs';
2
2
  export { I_ErrorEntry_alias_1 as I_ErrorEntry } from '../_tsup-dts-rollup.cjs';
3
3
  export { I_EslintError_alias_1 as I_EslintError } from '../_tsup-dts-rollup.cjs';
4
4
  export { I_BoxedLogOptions_alias_1 as I_BoxedLogOptions } from '../_tsup-dts-rollup.cjs';
5
+ export { I_CommandContext_alias_1 as I_CommandContext } from '../_tsup-dts-rollup.cjs';
6
+ export { T_Command_alias_1 as T_Command } from '../_tsup-dts-rollup.cjs';
7
+ export { T_CommandMap_alias_1 as T_CommandMap } from '../_tsup-dts-rollup.cjs';
8
+ export { T_CommandMapInput_alias_1 as T_CommandMapInput } from '../_tsup-dts-rollup.cjs';
@@ -2,3 +2,7 @@ export { E_ErrorType_alias_1 as E_ErrorType } from '../_tsup-dts-rollup.js';
2
2
  export { I_ErrorEntry_alias_1 as I_ErrorEntry } from '../_tsup-dts-rollup.js';
3
3
  export { I_EslintError_alias_1 as I_EslintError } from '../_tsup-dts-rollup.js';
4
4
  export { I_BoxedLogOptions_alias_1 as I_BoxedLogOptions } from '../_tsup-dts-rollup.js';
5
+ export { I_CommandContext_alias_1 as I_CommandContext } from '../_tsup-dts-rollup.js';
6
+ export { T_Command_alias_1 as T_Command } from '../_tsup-dts-rollup.js';
7
+ export { T_CommandMap_alias_1 as T_CommandMap } from '../_tsup-dts-rollup.js';
8
+ export { T_CommandMapInput_alias_1 as T_CommandMapInput } from '../_tsup-dts-rollup.js';
@@ -1 +1,7 @@
1
- var r=function(r){return r.Error="error",r.Warning="warning",r}(r||{});export{r as E_ErrorType};
1
+ // src/typescript/command.ts
2
+ var E_ErrorType = /* @__PURE__ */ function(E_ErrorType2) {
3
+ E_ErrorType2["Error"] = "error";
4
+ E_ErrorType2["Warning"] = "warning";
5
+ return E_ErrorType2;
6
+ }(E_ErrorType || {});
7
+ export { E_ErrorType };
@@ -1 +1,48 @@
1
- "use strict";function e(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}var r=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var u=function(u,a,f,l){var c=true,i=false,y=undefined;if(a&&(typeof a==="undefined"?"undefined":e(a))=="object"||typeof a=="function")try{var p=function(){var e=d.value;!o.call(u,e)&&e!==f&&r(u,e,{get:function(){return a[e]},enumerable:!(l=t(a,e))||l.enumerable})};for(var v=n(a)[Symbol.iterator](),d;!(c=(d=v.next()).done);c=true)p()}catch(e){i=true;y=e}finally{try{if(!c&&v.return!=null){v.return()}}finally{if(i){throw y}}}return u};var a=function(e){return u(r({},"__esModule",{value:!0}),e)};var f={};module.exports=a(f);
1
+ "use strict";
2
+ function _type_of(obj) {
3
+ "@swc/helpers - typeof";
4
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
5
+ }
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __getOwnPropNames = Object.getOwnPropertyNames;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __copyProps = function(to, from, except, desc) {
11
+ if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
12
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
13
+ try {
14
+ var _loop = function() {
15
+ var key = _step.value;
16
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: function() {
18
+ return from[key];
19
+ },
20
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
21
+ });
22
+ };
23
+ for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
24
+ } catch (err) {
25
+ _didIteratorError = true;
26
+ _iteratorError = err;
27
+ } finally{
28
+ try {
29
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
30
+ _iterator.return();
31
+ }
32
+ } finally{
33
+ if (_didIteratorError) {
34
+ throw _iteratorError;
35
+ }
36
+ }
37
+ }
38
+ }
39
+ return to;
40
+ };
41
+ var __toCommonJS = function(mod) {
42
+ return __copyProps(__defProp({}, "__esModule", {
43
+ value: true
44
+ }), mod);
45
+ };
46
+ // src/typescript/config.ts
47
+ var config_exports = {};
48
+ module.exports = __toCommonJS(config_exports);
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ function _type_of(obj) {
3
+ "@swc/helpers - typeof";
4
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
5
+ }
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __getOwnPropNames = Object.getOwnPropertyNames;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __copyProps = function(to, from, except, desc) {
11
+ if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
12
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
13
+ try {
14
+ var _loop = function() {
15
+ var key = _step.value;
16
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: function() {
18
+ return from[key];
19
+ },
20
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
21
+ });
22
+ };
23
+ for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
24
+ } catch (err) {
25
+ _didIteratorError = true;
26
+ _iteratorError = err;
27
+ } finally{
28
+ try {
29
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
30
+ _iterator.return();
31
+ }
32
+ } finally{
33
+ if (_didIteratorError) {
34
+ throw _iteratorError;
35
+ }
36
+ }
37
+ }
38
+ }
39
+ return to;
40
+ };
41
+ var __toCommonJS = function(mod) {
42
+ return __copyProps(__defProp({}, "__esModule", {
43
+ value: true
44
+ }), mod);
45
+ };
46
+ // src/typescript/fs.ts
47
+ var fs_exports = {};
48
+ module.exports = __toCommonJS(fs_exports);
@@ -0,0 +1 @@
1
+ export { I_JSON_alias_1 as I_JSON } from '../_tsup-dts-rollup.cjs';
@@ -0,0 +1 @@
1
+ export { I_JSON_alias_1 as I_JSON } from '../_tsup-dts-rollup.js';
File without changes
@@ -1 +1,48 @@
1
- "use strict";function e(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}var r=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var u=function(u,a,f,l){var c=true,i=false,y=undefined;if(a&&(typeof a==="undefined"?"undefined":e(a))=="object"||typeof a=="function")try{var p=function(){var e=d.value;!o.call(u,e)&&e!==f&&r(u,e,{get:function(){return a[e]},enumerable:!(l=t(a,e))||l.enumerable})};for(var v=n(a)[Symbol.iterator](),d;!(c=(d=v.next()).done);c=true)p()}catch(e){i=true;y=e}finally{try{if(!c&&v.return!=null){v.return()}}finally{if(i){throw y}}}return u};var a=function(e){return u(r({},"__esModule",{value:!0}),e)};var f={};module.exports=a(f);
1
+ "use strict";
2
+ function _type_of(obj) {
3
+ "@swc/helpers - typeof";
4
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
5
+ }
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __getOwnPropNames = Object.getOwnPropertyNames;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __copyProps = function(to, from, except, desc) {
11
+ if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
12
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
13
+ try {
14
+ var _loop = function() {
15
+ var key = _step.value;
16
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: function() {
18
+ return from[key];
19
+ },
20
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
21
+ });
22
+ };
23
+ for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
24
+ } catch (err) {
25
+ _didIteratorError = true;
26
+ _iteratorError = err;
27
+ } finally{
28
+ try {
29
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
30
+ _iterator.return();
31
+ }
32
+ } finally{
33
+ if (_didIteratorError) {
34
+ throw _iteratorError;
35
+ }
36
+ }
37
+ }
38
+ }
39
+ return to;
40
+ };
41
+ var __toCommonJS = function(mod) {
42
+ return __copyProps(__defProp({}, "__esModule", {
43
+ value: true
44
+ }), mod);
45
+ };
46
+ // src/typescript/graphql-codegen.ts
47
+ var graphql_codegen_exports = {};
48
+ module.exports = __toCommonJS(graphql_codegen_exports);
@@ -1 +1,175 @@
1
- "use strict";function t(t){if(t===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function e(t,e,r){e=n(e);return u(t,f()?Reflect.construct(e,r||[],n(t).constructor):e.apply(t,r))}function r(t,e){if(!(t instanceof e)){throw new TypeError("Cannot call a class as a function")}}function n(t){n=Object.setPrototypeOf?Object.getPrototypeOf:function t(t){return t.__proto__||Object.getPrototypeOf(t)};return n(t)}function o(t,e){if(typeof e!=="function"&&e!==null){throw new TypeError("Super expression must either be null or a function")}t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:true,configurable:true}});if(e)c(t,e)}function u(e,r){if(r&&(i(r)==="object"||typeof r==="function")){return r}return t(e)}function c(t,e){c=Object.setPrototypeOf||function t(t,e){t.__proto__=e;return t};return c(t,e)}function i(t){"@swc/helpers - typeof";return t&&typeof Symbol!=="undefined"&&t.constructor===Symbol?"symbol":typeof t}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}var l=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var p=function(t,e){for(var r in e)l(t,r,{get:e[r],enumerable:!0})},y=function(t,e,r,n){var o=true,u=false,c=undefined;if(e&&(typeof e==="undefined"?"undefined":i(e))=="object"||typeof e=="function")try{var f=function(){var o=y.value;!s.call(t,o)&&o!==r&&l(t,o,{get:function(){return e[o]},enumerable:!(n=a(e,o))||n.enumerable})};for(var p=_(e)[Symbol.iterator](),y;!(o=(y=p.next()).done);o=true)f()}catch(t){u=true;c=t}finally{try{if(!o&&p.return!=null){p.return()}}finally{if(u){throw c}}}return t};var b=function(t){return y(l({},"__esModule",{value:!0}),t)};var d={};p(d,{C_Collection:function(){return w},C_Db:function(){return C},C_Document:function(){return O},C_Model:function(){return E},E_ErrorType:function(){return h}});module.exports=b(d);var h=function(t){return t.Error="error",t.Warning="warning",t}(h||{});var v=require("mongodb"),m=require("mongoose"),C=/*#__PURE__*/function(t){o(n,t);function n(){r(this,n);return e(this,n,arguments)}return n}(v.Db),O=/*#__PURE__*/function(t){o(n,t);function n(){r(this,n);return e(this,n,arguments)}return n}(m.Document),E=/*#__PURE__*/function(t){o(n,t);function n(){r(this,n);return e(this,n,arguments)}return n}(m.Model),w=/*#__PURE__*/function(t){o(n,t);function n(){r(this,n);return e(this,n,arguments)}return n}(v.Collection);0&&(module.exports={C_Collection:C_Collection,C_Db:C_Db,C_Document:C_Document,C_Model:C_Model,E_ErrorType:E_ErrorType});
1
+ "use strict";
2
+ function _assert_this_initialized(self) {
3
+ if (self === void 0) {
4
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
5
+ }
6
+ return self;
7
+ }
8
+ function _call_super(_this, derived, args) {
9
+ derived = _get_prototype_of(derived);
10
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
11
+ }
12
+ function _class_call_check(instance, Constructor) {
13
+ if (!(instance instanceof Constructor)) {
14
+ throw new TypeError("Cannot call a class as a function");
15
+ }
16
+ }
17
+ function _get_prototype_of(o) {
18
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
19
+ return o.__proto__ || Object.getPrototypeOf(o);
20
+ };
21
+ return _get_prototype_of(o);
22
+ }
23
+ function _inherits(subClass, superClass) {
24
+ if (typeof superClass !== "function" && superClass !== null) {
25
+ throw new TypeError("Super expression must either be null or a function");
26
+ }
27
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
28
+ constructor: {
29
+ value: subClass,
30
+ writable: true,
31
+ configurable: true
32
+ }
33
+ });
34
+ if (superClass) _set_prototype_of(subClass, superClass);
35
+ }
36
+ function _possible_constructor_return(self, call) {
37
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
38
+ return call;
39
+ }
40
+ return _assert_this_initialized(self);
41
+ }
42
+ function _set_prototype_of(o, p) {
43
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
44
+ o.__proto__ = p;
45
+ return o;
46
+ };
47
+ return _set_prototype_of(o, p);
48
+ }
49
+ function _type_of(obj) {
50
+ "@swc/helpers - typeof";
51
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
52
+ }
53
+ function _is_native_reflect_construct() {
54
+ try {
55
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
56
+ } catch (_) {}
57
+ return (_is_native_reflect_construct = function() {
58
+ return !!result;
59
+ })();
60
+ }
61
+ var __defProp = Object.defineProperty;
62
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
63
+ var __getOwnPropNames = Object.getOwnPropertyNames;
64
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
65
+ var __export = function(target, all) {
66
+ for(var name in all)__defProp(target, name, {
67
+ get: all[name],
68
+ enumerable: true
69
+ });
70
+ };
71
+ var __copyProps = function(to, from, except, desc) {
72
+ if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
73
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
74
+ try {
75
+ var _loop = function() {
76
+ var key = _step.value;
77
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
78
+ get: function() {
79
+ return from[key];
80
+ },
81
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
82
+ });
83
+ };
84
+ for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
85
+ } catch (err) {
86
+ _didIteratorError = true;
87
+ _iteratorError = err;
88
+ } finally{
89
+ try {
90
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
91
+ _iterator.return();
92
+ }
93
+ } finally{
94
+ if (_didIteratorError) {
95
+ throw _iteratorError;
96
+ }
97
+ }
98
+ }
99
+ }
100
+ return to;
101
+ };
102
+ var __toCommonJS = function(mod) {
103
+ return __copyProps(__defProp({}, "__esModule", {
104
+ value: true
105
+ }), mod);
106
+ };
107
+ // src/typescript/index.ts
108
+ var typescript_exports = {};
109
+ __export(typescript_exports, {
110
+ C_Collection: function() {
111
+ return C_Collection;
112
+ },
113
+ C_Db: function() {
114
+ return C_Db;
115
+ },
116
+ C_Document: function() {
117
+ return C_Document;
118
+ },
119
+ C_Model: function() {
120
+ return C_Model;
121
+ },
122
+ E_ErrorType: function() {
123
+ return E_ErrorType;
124
+ }
125
+ });
126
+ module.exports = __toCommonJS(typescript_exports);
127
+ // src/typescript/command.ts
128
+ var E_ErrorType = /* @__PURE__ */ function(E_ErrorType2) {
129
+ E_ErrorType2["Error"] = "error";
130
+ E_ErrorType2["Warning"] = "warning";
131
+ return E_ErrorType2;
132
+ }(E_ErrorType || {});
133
+ // src/typescript/mongo.ts
134
+ var import_mongodb = require("mongodb");
135
+ var import_mongoose = require("mongoose");
136
+ var C_Db = /*#__PURE__*/ function(_import_mongodb_Db) {
137
+ _inherits(C_Db, _import_mongodb_Db);
138
+ function C_Db() {
139
+ _class_call_check(this, C_Db);
140
+ return _call_super(this, C_Db, arguments);
141
+ }
142
+ return C_Db;
143
+ }(import_mongodb.Db);
144
+ var C_Document = /*#__PURE__*/ function(_import_mongoose_Document) {
145
+ _inherits(C_Document, _import_mongoose_Document);
146
+ function C_Document() {
147
+ _class_call_check(this, C_Document);
148
+ return _call_super(this, C_Document, arguments);
149
+ }
150
+ return C_Document;
151
+ }(import_mongoose.Document);
152
+ var C_Model = /*#__PURE__*/ function(_import_mongoose_Model) {
153
+ _inherits(C_Model, _import_mongoose_Model);
154
+ function C_Model() {
155
+ _class_call_check(this, C_Model);
156
+ return _call_super(this, C_Model, arguments);
157
+ }
158
+ return C_Model;
159
+ }(import_mongoose.Model);
160
+ var C_Collection = /*#__PURE__*/ function(_import_mongodb_Collection) {
161
+ _inherits(C_Collection, _import_mongodb_Collection);
162
+ function C_Collection() {
163
+ _class_call_check(this, C_Collection);
164
+ return _call_super(this, C_Collection, arguments);
165
+ }
166
+ return C_Collection;
167
+ }(import_mongodb.Collection);
168
+ // Annotate the CommonJS export names for ESM import in node:
169
+ 0 && (module.exports = {
170
+ C_Collection: C_Collection,
171
+ C_Db: C_Db,
172
+ C_Document: C_Document,
173
+ C_Model: C_Model,
174
+ E_ErrorType: E_ErrorType
175
+ });
@@ -10,7 +10,12 @@ export { E_ErrorType_alias_2 as E_ErrorType } from '../_tsup-dts-rollup.cjs';
10
10
  export { I_ErrorEntry_alias_2 as I_ErrorEntry } from '../_tsup-dts-rollup.cjs';
11
11
  export { I_EslintError_alias_2 as I_EslintError } from '../_tsup-dts-rollup.cjs';
12
12
  export { I_BoxedLogOptions_alias_2 as I_BoxedLogOptions } from '../_tsup-dts-rollup.cjs';
13
+ export { I_CommandContext_alias_2 as I_CommandContext } from '../_tsup-dts-rollup.cjs';
14
+ export { T_Command_alias_2 as T_Command } from '../_tsup-dts-rollup.cjs';
15
+ export { T_CommandMap_alias_2 as T_CommandMap } from '../_tsup-dts-rollup.cjs';
16
+ export { T_CommandMapInput_alias_2 as T_CommandMapInput } from '../_tsup-dts-rollup.cjs';
13
17
  export { I_Config_alias_2 as I_Config } from '../_tsup-dts-rollup.cjs';
18
+ export { I_JSON_alias_2 as I_JSON } from '../_tsup-dts-rollup.cjs';
14
19
  export { I_GraphqlCodegenConfig_alias_2 as I_GraphqlCodegenConfig } from '../_tsup-dts-rollup.cjs';
15
20
  export { I_LoadingProps_alias_1 as I_LoadingProps } from '../_tsup-dts-rollup.cjs';
16
21
  export { T_ThrowResponseArgs_alias_1 as T_ThrowResponseArgs } from '../_tsup-dts-rollup.cjs';
@@ -10,7 +10,12 @@ export { E_ErrorType_alias_2 as E_ErrorType } from '../_tsup-dts-rollup.js';
10
10
  export { I_ErrorEntry_alias_2 as I_ErrorEntry } from '../_tsup-dts-rollup.js';
11
11
  export { I_EslintError_alias_2 as I_EslintError } from '../_tsup-dts-rollup.js';
12
12
  export { I_BoxedLogOptions_alias_2 as I_BoxedLogOptions } from '../_tsup-dts-rollup.js';
13
+ export { I_CommandContext_alias_2 as I_CommandContext } from '../_tsup-dts-rollup.js';
14
+ export { T_Command_alias_2 as T_Command } from '../_tsup-dts-rollup.js';
15
+ export { T_CommandMap_alias_2 as T_CommandMap } from '../_tsup-dts-rollup.js';
16
+ export { T_CommandMapInput_alias_2 as T_CommandMapInput } from '../_tsup-dts-rollup.js';
13
17
  export { I_Config_alias_2 as I_Config } from '../_tsup-dts-rollup.js';
18
+ export { I_JSON_alias_2 as I_JSON } from '../_tsup-dts-rollup.js';
14
19
  export { I_GraphqlCodegenConfig_alias_2 as I_GraphqlCodegenConfig } from '../_tsup-dts-rollup.js';
15
20
  export { I_LoadingProps_alias_1 as I_LoadingProps } from '../_tsup-dts-rollup.js';
16
21
  export { T_ThrowResponseArgs_alias_1 as T_ThrowResponseArgs } from '../_tsup-dts-rollup.js';
@@ -1 +1,151 @@
1
- function t(t){if(t===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function n(t,n,r){n=o(n);return u(t,f()?Reflect.construct(n,r||[],o(t).constructor):n.apply(t,r))}function r(t,n){if(!(t instanceof n)){throw new TypeError("Cannot call a class as a function")}}function o(t){o=Object.setPrototypeOf?Object.getPrototypeOf:function t(t){return t.__proto__||Object.getPrototypeOf(t)};return o(t)}function e(t,n){if(typeof n!=="function"&&n!==null){throw new TypeError("Super expression must either be null or a function")}t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:true,configurable:true}});if(n)c(t,n)}function u(n,r){if(r&&(i(r)==="object"||typeof r==="function")){return r}return t(n)}function c(t,n){c=Object.setPrototypeOf||function t(t,n){t.__proto__=n;return t};return c(t,n)}function i(t){"@swc/helpers - typeof";return t&&typeof Symbol!=="undefined"&&t.constructor===Symbol?"symbol":typeof t}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}var s=function(t){return t.Error="error",t.Warning="warning",t}(s||{});import{Collection as a,Db as l}from"mongodb";import{Document as p,Model as _}from"mongoose";var y=/*#__PURE__*/function(t){"use strict";e(o,t);function o(){r(this,o);return n(this,o,arguments)}return o}(l),b=/*#__PURE__*/function(t){"use strict";e(o,t);function o(){r(this,o);return n(this,o,arguments)}return o}(p),h=/*#__PURE__*/function(t){"use strict";e(o,t);function o(){r(this,o);return n(this,o,arguments)}return o}(_),m=/*#__PURE__*/function(t){"use strict";e(o,t);function o(){r(this,o);return n(this,o,arguments)}return o}(a);export{m as C_Collection,y as C_Db,b as C_Document,h as C_Model,s as E_ErrorType};
1
+ // src/typescript/command.ts
2
+ function _assert_this_initialized(self) {
3
+ if (self === void 0) {
4
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
5
+ }
6
+ return self;
7
+ }
8
+ function _call_super(_this, derived, args) {
9
+ derived = _get_prototype_of(derived);
10
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
11
+ }
12
+ function _class_call_check(instance, Constructor) {
13
+ if (!(instance instanceof Constructor)) {
14
+ throw new TypeError("Cannot call a class as a function");
15
+ }
16
+ }
17
+ function _construct(Parent, args, Class) {
18
+ if (_is_native_reflect_construct()) {
19
+ _construct = Reflect.construct;
20
+ } else {
21
+ _construct = function construct(Parent, args, Class) {
22
+ var a = [
23
+ null
24
+ ];
25
+ a.push.apply(a, args);
26
+ var Constructor = Function.bind.apply(Parent, a);
27
+ var instance = new Constructor();
28
+ if (Class) _set_prototype_of(instance, Class.prototype);
29
+ return instance;
30
+ };
31
+ }
32
+ return _construct.apply(null, arguments);
33
+ }
34
+ function _get_prototype_of(o) {
35
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
36
+ return o.__proto__ || Object.getPrototypeOf(o);
37
+ };
38
+ return _get_prototype_of(o);
39
+ }
40
+ function _inherits(subClass, superClass) {
41
+ if (typeof superClass !== "function" && superClass !== null) {
42
+ throw new TypeError("Super expression must either be null or a function");
43
+ }
44
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
45
+ constructor: {
46
+ value: subClass,
47
+ writable: true,
48
+ configurable: true
49
+ }
50
+ });
51
+ if (superClass) _set_prototype_of(subClass, superClass);
52
+ }
53
+ function _is_native_function(fn) {
54
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
55
+ }
56
+ function _possible_constructor_return(self, call) {
57
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
58
+ return call;
59
+ }
60
+ return _assert_this_initialized(self);
61
+ }
62
+ function _set_prototype_of(o, p) {
63
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
64
+ o.__proto__ = p;
65
+ return o;
66
+ };
67
+ return _set_prototype_of(o, p);
68
+ }
69
+ function _type_of(obj) {
70
+ "@swc/helpers - typeof";
71
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
72
+ }
73
+ function _wrap_native_super(Class) {
74
+ var _cache = typeof Map === "function" ? new Map() : undefined;
75
+ _wrap_native_super = function wrapNativeSuper(Class) {
76
+ if (Class === null || !_is_native_function(Class)) return Class;
77
+ if (typeof Class !== "function") {
78
+ throw new TypeError("Super expression must either be null or a function");
79
+ }
80
+ if (typeof _cache !== "undefined") {
81
+ if (_cache.has(Class)) return _cache.get(Class);
82
+ _cache.set(Class, Wrapper);
83
+ }
84
+ function Wrapper() {
85
+ return _construct(Class, arguments, _get_prototype_of(this).constructor);
86
+ }
87
+ Wrapper.prototype = Object.create(Class.prototype, {
88
+ constructor: {
89
+ value: Wrapper,
90
+ enumerable: false,
91
+ writable: true,
92
+ configurable: true
93
+ }
94
+ });
95
+ return _set_prototype_of(Wrapper, Class);
96
+ };
97
+ return _wrap_native_super(Class);
98
+ }
99
+ function _is_native_reflect_construct() {
100
+ try {
101
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
102
+ } catch (_) {}
103
+ return (_is_native_reflect_construct = function() {
104
+ return !!result;
105
+ })();
106
+ }
107
+ var E_ErrorType = /* @__PURE__ */ function(E_ErrorType2) {
108
+ E_ErrorType2["Error"] = "error";
109
+ E_ErrorType2["Warning"] = "warning";
110
+ return E_ErrorType2;
111
+ }(E_ErrorType || {});
112
+ // src/typescript/mongo.ts
113
+ import { Collection, Db } from "mongodb";
114
+ import { Document, Model } from "mongoose";
115
+ var C_Db = /*#__PURE__*/ function(Db) {
116
+ "use strict";
117
+ _inherits(C_Db, Db);
118
+ function C_Db() {
119
+ _class_call_check(this, C_Db);
120
+ return _call_super(this, C_Db, arguments);
121
+ }
122
+ return C_Db;
123
+ }(Db);
124
+ var C_Document = /*#__PURE__*/ function(Document) {
125
+ "use strict";
126
+ _inherits(C_Document, Document);
127
+ function C_Document() {
128
+ _class_call_check(this, C_Document);
129
+ return _call_super(this, C_Document, arguments);
130
+ }
131
+ return C_Document;
132
+ }(_wrap_native_super(Document));
133
+ var C_Model = /*#__PURE__*/ function(Model) {
134
+ "use strict";
135
+ _inherits(C_Model, Model);
136
+ function C_Model() {
137
+ _class_call_check(this, C_Model);
138
+ return _call_super(this, C_Model, arguments);
139
+ }
140
+ return C_Model;
141
+ }(Model);
142
+ var C_Collection = /*#__PURE__*/ function(Collection) {
143
+ "use strict";
144
+ _inherits(C_Collection, Collection);
145
+ function C_Collection() {
146
+ _class_call_check(this, C_Collection);
147
+ return _call_super(this, C_Collection, arguments);
148
+ }
149
+ return C_Collection;
150
+ }(Collection);
151
+ export { C_Collection, C_Db, C_Document, C_Model, E_ErrorType };