@cyberskill/shared 1.208.0 → 1.209.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 (202) hide show
  1. package/dist/config-CwzVfkkX.js +6 -0
  2. package/dist/index-BG1UznTl.js +628 -0
  3. package/dist/{magic-string.es-C6Zk6wMx.js → magic-string.es-BQ9KnLz-.js} +105 -117
  4. package/dist/src/config/config.type.d.ts +1 -1
  5. package/dist/src/config/config.util.d.ts +1 -1
  6. package/dist/src/config/config.util.js +48 -7
  7. package/dist/src/config/env/env.util.js +10 -10
  8. package/dist/src/config/eslint/index.js +4 -15
  9. package/dist/src/config/graphql-codegen/graphql-codegen.util.js +30 -39
  10. package/dist/src/config/index.js +1 -1
  11. package/dist/src/config/vitest/vitest.e2e.js +9 -19
  12. package/dist/src/config/vitest/vitest.unit.js +11 -22
  13. package/dist/src/config/vitest/vitest.unit.setup.js +9339 -9868
  14. package/dist/src/constant/common.js +1 -1
  15. package/dist/src/node/apollo-server/apollo-server.util.js +23 -54
  16. package/dist/src/node/cli/index.d.ts +2 -1
  17. package/dist/src/node/cli/index.js +108 -1
  18. package/dist/src/node/command/command.util.js +9 -10
  19. package/dist/src/node/command/index.js +1 -1
  20. package/dist/src/node/express/express.util.js +39 -77
  21. package/dist/src/node/express/index.js +9 -9
  22. package/dist/src/node/fs/fs.util.js +40 -59
  23. package/dist/src/node/log/index.js +6 -6
  24. package/dist/src/node/log/log.util.js +32 -33
  25. package/dist/src/node/mongo/mongo.util.js +381 -457
  26. package/dist/src/node/package/index.js +3 -3
  27. package/dist/src/node/package/package.util.js +2 -2
  28. package/dist/src/node/path/index.js +30 -30
  29. package/dist/src/node/path/path.constant.js +30 -30
  30. package/dist/src/node/storage/storage.util.js +40 -70
  31. package/dist/src/node/upload/index.js +1 -1
  32. package/dist/src/node/upload/upload.util.js +125 -6
  33. package/dist/src/react/apollo-client/apollo-client.component.js +15 -13
  34. package/dist/src/react/apollo-client/apollo-client.type.d.ts +1 -1
  35. package/dist/src/react/apollo-client/apollo-client.util.js +66 -81
  36. package/dist/src/react/apollo-client/index.js +25 -26
  37. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.component.js +7 -8
  38. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.util.js +11 -21
  39. package/dist/src/react/apollo-error/apollo-error.component.js +7 -7
  40. package/dist/src/react/apollo-error/apollo-error.util.js +7 -7
  41. package/dist/src/react/loading/loading.component.js +24 -45
  42. package/dist/src/react/loading/loading.provider.d.ts +1 -1
  43. package/dist/src/react/log/log.util.js +9 -9
  44. package/dist/src/react/next-intl/next-intl.hoc.d.ts +1 -1
  45. package/dist/src/react/next-intl/next-intl.hoc.js +17 -29
  46. package/dist/src/react/next-intl/next-intl.provider.js +18 -19
  47. package/dist/src/react/next-intl/next-intl.type.d.ts +1 -1
  48. package/dist/src/react/storage/storage.hook.js +37 -53
  49. package/dist/src/react/storage/storage.util.js +25 -50
  50. package/dist/src/react/userback/userback.component.js +16 -43
  51. package/dist/src/typescript/index.d.ts +2 -2
  52. package/dist/src/typescript/index.js +2 -2
  53. package/dist/src/typescript/style.d.js +1 -1
  54. package/dist/src/util/common/common.util.js +14 -25
  55. package/dist/src/util/object/object.util.d.ts +1 -1
  56. package/dist/src/util/object/object.util.js +39 -49
  57. package/dist/src/util/string/string.util.js +40 -53
  58. package/dist/style.css +1 -1
  59. package/package.json +43 -76
  60. package/dist/config-B7WSlzSh.js +0 -8
  61. package/dist/config-DDQ9k8fw.cjs +0 -1
  62. package/dist/config.util-Ci2CZDut.cjs +0 -1
  63. package/dist/config.util-DKBwEBKR.js +0 -61
  64. package/dist/favicon/android-icon-144x144.png +0 -0
  65. package/dist/favicon/android-icon-192x192.png +0 -0
  66. package/dist/favicon/android-icon-36x36.png +0 -0
  67. package/dist/favicon/android-icon-48x48.png +0 -0
  68. package/dist/favicon/android-icon-72x72.png +0 -0
  69. package/dist/favicon/android-icon-96x96.png +0 -0
  70. package/dist/favicon/apple-icon-114x114.png +0 -0
  71. package/dist/favicon/apple-icon-120x120.png +0 -0
  72. package/dist/favicon/apple-icon-144x144.png +0 -0
  73. package/dist/favicon/apple-icon-152x152.png +0 -0
  74. package/dist/favicon/apple-icon-180x180.png +0 -0
  75. package/dist/favicon/apple-icon-57x57.png +0 -0
  76. package/dist/favicon/apple-icon-60x60.png +0 -0
  77. package/dist/favicon/apple-icon-72x72.png +0 -0
  78. package/dist/favicon/apple-icon-76x76.png +0 -0
  79. package/dist/favicon/apple-icon-precomposed.png +0 -0
  80. package/dist/favicon/apple-icon.png +0 -0
  81. package/dist/favicon/browserconfig.xml +0 -2
  82. package/dist/favicon/favicon-16x16.png +0 -0
  83. package/dist/favicon/favicon-32x32.png +0 -0
  84. package/dist/favicon/favicon-96x96.png +0 -0
  85. package/dist/favicon/favicon.ico +0 -0
  86. package/dist/favicon/manifest.json +0 -41
  87. package/dist/favicon/ms-icon-144x144.png +0 -0
  88. package/dist/favicon/ms-icon-150x150.png +0 -0
  89. package/dist/favicon/ms-icon-310x310.png +0 -0
  90. package/dist/favicon/ms-icon-70x70.png +0 -0
  91. package/dist/log.type-CMvG6Box.cjs +0 -1
  92. package/dist/log.type-DTOvZHyz.js +0 -4
  93. package/dist/magic-string.es-CjWtD8Pa.cjs +0 -10
  94. package/dist/path.constant-CWtb99gS.cjs +0 -2
  95. package/dist/path.constant-CvSr0Rrx.js +0 -682
  96. package/dist/src/config/commitlint/index.cjs +0 -1
  97. package/dist/src/config/config.util.cjs +0 -1
  98. package/dist/src/config/env/env.constant.cjs +0 -1
  99. package/dist/src/config/env/env.d.cjs +0 -1
  100. package/dist/src/config/env/env.d.js +0 -1
  101. package/dist/src/config/env/env.util.cjs +0 -1
  102. package/dist/src/config/env/index.cjs +0 -1
  103. package/dist/src/config/eslint/index.cjs +0 -1
  104. package/dist/src/config/graphql-codegen/graphql-codegen.util.cjs +0 -1
  105. package/dist/src/config/graphql-codegen/index.cjs +0 -1
  106. package/dist/src/config/index.cjs +0 -1
  107. package/dist/src/config/lint-staged/index.cjs +0 -1
  108. package/dist/src/config/vitest/index.cjs +0 -1
  109. package/dist/src/config/vitest/vitest.e2e.cjs +0 -1
  110. package/dist/src/config/vitest/vitest.unit.cjs +0 -1
  111. package/dist/src/config/vitest/vitest.unit.setup.cjs +0 -508
  112. package/dist/src/constant/common.cjs +0 -1
  113. package/dist/src/constant/index.cjs +0 -1
  114. package/dist/src/constant/response-status.cjs +0 -1
  115. package/dist/src/node/apollo-server/apollo-server.util.cjs +0 -1
  116. package/dist/src/node/apollo-server/index.cjs +0 -1
  117. package/dist/src/node/cli/cli.util.cjs +0 -6
  118. package/dist/src/node/cli/cli.util.d.ts +0 -2
  119. package/dist/src/node/cli/cli.util.js +0 -171
  120. package/dist/src/node/cli/index.cjs +0 -1
  121. package/dist/src/node/command/command.util.cjs +0 -1
  122. package/dist/src/node/command/index.cjs +0 -1
  123. package/dist/src/node/express/express.util.cjs +0 -1
  124. package/dist/src/node/express/index.cjs +0 -1
  125. package/dist/src/node/fs/fs.util.cjs +0 -1
  126. package/dist/src/node/fs/index.cjs +0 -1
  127. package/dist/src/node/log/index.cjs +0 -1
  128. package/dist/src/node/log/log.util.cjs +0 -1
  129. package/dist/src/node/mongo/index.cjs +0 -1
  130. package/dist/src/node/mongo/mongo.constant.cjs +0 -1
  131. package/dist/src/node/mongo/mongo.util.cjs +0 -5
  132. package/dist/src/node/package/index.cjs +0 -1
  133. package/dist/src/node/package/package.util.cjs +0 -1
  134. package/dist/src/node/path/index.cjs +0 -1
  135. package/dist/src/node/path/path.constant.cjs +0 -1
  136. package/dist/src/node/path/path.util.cjs +0 -1
  137. package/dist/src/node/storage/index.cjs +0 -1
  138. package/dist/src/node/storage/storage.util.cjs +0 -1
  139. package/dist/src/node/upload/index.cjs +0 -1
  140. package/dist/src/node/upload/upload.util.cjs +0 -1
  141. package/dist/src/node/ws/index.cjs +0 -1
  142. package/dist/src/node/ws/ts.util.cjs +0 -1
  143. package/dist/src/react/apollo-client/apollo-client.component.cjs +0 -1
  144. package/dist/src/react/apollo-client/apollo-client.constant.cjs +0 -1
  145. package/dist/src/react/apollo-client/apollo-client.context.cjs +0 -1
  146. package/dist/src/react/apollo-client/apollo-client.hook.cjs +0 -1
  147. package/dist/src/react/apollo-client/apollo-client.util.cjs +0 -1
  148. package/dist/src/react/apollo-client/index.cjs +0 -1
  149. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.component.cjs +0 -1
  150. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs +0 -1
  151. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.util.cjs +0 -1
  152. package/dist/src/react/apollo-client-nextjs/index.cjs +0 -1
  153. package/dist/src/react/apollo-error/apollo-error.component.cjs +0 -1
  154. package/dist/src/react/apollo-error/apollo-error.context.cjs +0 -1
  155. package/dist/src/react/apollo-error/apollo-error.hook.cjs +0 -1
  156. package/dist/src/react/apollo-error/apollo-error.provider.cjs +0 -1
  157. package/dist/src/react/apollo-error/apollo-error.util.cjs +0 -1
  158. package/dist/src/react/apollo-error/index.cjs +0 -1
  159. package/dist/src/react/i18next/i18next.hook.cjs +0 -1
  160. package/dist/src/react/i18next/i18next.util.cjs +0 -1
  161. package/dist/src/react/i18next/index.cjs +0 -1
  162. package/dist/src/react/loading/index.cjs +0 -1
  163. package/dist/src/react/loading/loading.component.cjs +0 -6
  164. package/dist/src/react/loading/loading.context.cjs +0 -1
  165. package/dist/src/react/loading/loading.hook.cjs +0 -1
  166. package/dist/src/react/loading/loading.provider.cjs +0 -1
  167. package/dist/src/react/log/index.cjs +0 -1
  168. package/dist/src/react/log/log.util.cjs +0 -1
  169. package/dist/src/react/next-intl/index.cjs +0 -1
  170. package/dist/src/react/next-intl/next-intl.constant.cjs +0 -1
  171. package/dist/src/react/next-intl/next-intl.context.cjs +0 -1
  172. package/dist/src/react/next-intl/next-intl.hoc.cjs +0 -1
  173. package/dist/src/react/next-intl/next-intl.hook.cjs +0 -1
  174. package/dist/src/react/next-intl/next-intl.provider.cjs +0 -1
  175. package/dist/src/react/storage/index.cjs +0 -1
  176. package/dist/src/react/storage/storage.hook.cjs +0 -1
  177. package/dist/src/react/storage/storage.util.cjs +0 -1
  178. package/dist/src/react/toast/index.cjs +0 -1
  179. package/dist/src/react/userback/index.cjs +0 -1
  180. package/dist/src/react/userback/userback.component.cjs +0 -1
  181. package/dist/src/typescript/common.cjs +0 -1
  182. package/dist/src/typescript/common.js +0 -4
  183. package/dist/src/typescript/index.cjs +0 -1
  184. package/dist/src/typescript/react.cjs +0 -1
  185. package/dist/src/typescript/react.js +0 -1
  186. package/dist/src/typescript/style.d.cjs +0 -1
  187. package/dist/src/util/common/common.util.cjs +0 -1
  188. package/dist/src/util/common/index.cjs +0 -1
  189. package/dist/src/util/index.cjs +0 -1
  190. package/dist/src/util/object/index.cjs +0 -1
  191. package/dist/src/util/object/object.util.cjs +0 -1
  192. package/dist/src/util/serializer/index.cjs +0 -1
  193. package/dist/src/util/serializer/serializer.util.cjs +0 -1
  194. package/dist/src/util/string/index.cjs +0 -1
  195. package/dist/src/util/string/string.util.cjs +0 -1
  196. package/dist/src/util/validate/index.cjs +0 -1
  197. package/dist/src/util/validate/validate.util.cjs +0 -1
  198. package/dist/tsconfig.base.json +0 -37
  199. package/dist/upload.util-CE3MjBdh.cjs +0 -1
  200. package/dist/upload.util-D4aUdmPo.js +0 -160
  201. /package/dist/src/typescript/{common.d.ts → common.type.d.ts} +0 -0
  202. /package/dist/src/typescript/{react.d.ts → react.type.d.ts} +0 -0
@@ -1,63 +1,51 @@
1
- var R = Object.defineProperty, _ = Object.defineProperties;
2
- var O = Object.getOwnPropertyDescriptors;
3
- var m = Object.getOwnPropertySymbols;
4
- var N = Object.prototype.hasOwnProperty, I = Object.prototype.propertyIsEnumerable;
5
- var b = (h, t, e) => t in h ? R(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e, C = (h, t) => {
6
- for (var e in t || (t = {}))
7
- N.call(t, e) && b(h, e, t[e]);
8
- if (m)
9
- for (var e of m(t))
10
- I.call(t, e) && b(h, e, t[e]);
11
- return h;
12
- }, y = (h, t) => _(h, O(t));
13
- var A = 44, T = 59, S = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", k = new Uint8Array(64), j = new Uint8Array(128);
14
- for (let h = 0; h < S.length; h++) {
15
- const t = S.charCodeAt(h);
16
- k[h] = t, j[t] = h;
1
+ var x = 44, E = 59, m = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", S = new Uint8Array(64), k = new Uint8Array(128);
2
+ for (let u = 0; u < m.length; u++) {
3
+ const t = m.charCodeAt(u);
4
+ S[u] = t, k[t] = u;
17
5
  }
18
- function c(h, t, e) {
6
+ function c(u, t, e) {
19
7
  let i = t - e;
20
8
  i = i < 0 ? -i << 1 | 1 : i << 1;
21
9
  do {
22
10
  let n = i & 31;
23
- i >>>= 5, i > 0 && (n |= 32), h.write(k[n]);
11
+ i >>>= 5, i > 0 && (n |= 32), u.write(S[n]);
24
12
  } while (i > 0);
25
13
  return t;
26
14
  }
27
- var v = 1024 * 16, x = typeof TextDecoder != "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer != "undefined" ? {
28
- decode(h) {
29
- return Buffer.from(h.buffer, h.byteOffset, h.byteLength).toString();
15
+ var b = 1024 * 16, C = typeof TextDecoder < "u" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer < "u" ? {
16
+ decode(u) {
17
+ return Buffer.from(u.buffer, u.byteOffset, u.byteLength).toString();
30
18
  }
31
19
  } : {
32
- decode(h) {
20
+ decode(u) {
33
21
  let t = "";
34
- for (let e = 0; e < h.length; e++)
35
- t += String.fromCharCode(h[e]);
22
+ for (let e = 0; e < u.length; e++)
23
+ t += String.fromCharCode(u[e]);
36
24
  return t;
37
25
  }
38
- }, $ = class {
26
+ }, L = class {
39
27
  constructor() {
40
- this.pos = 0, this.out = "", this.buffer = new Uint8Array(v);
28
+ this.pos = 0, this.out = "", this.buffer = new Uint8Array(b);
41
29
  }
42
- write(h) {
30
+ write(u) {
43
31
  const { buffer: t } = this;
44
- t[this.pos++] = h, this.pos === v && (this.out += x.decode(t), this.pos = 0);
32
+ t[this.pos++] = u, this.pos === b && (this.out += C.decode(t), this.pos = 0);
45
33
  }
46
34
  flush() {
47
- const { buffer: h, out: t, pos: e } = this;
48
- return e > 0 ? t + x.decode(h.subarray(0, e)) : t;
35
+ const { buffer: u, out: t, pos: e } = this;
36
+ return e > 0 ? t + C.decode(u.subarray(0, e)) : t;
49
37
  }
50
38
  };
51
- function U(h) {
52
- const t = new $();
39
+ function R(u) {
40
+ const t = new L();
53
41
  let e = 0, i = 0, n = 0, r = 0;
54
- for (let s = 0; s < h.length; s++) {
55
- const l = h[s];
56
- if (s > 0 && t.write(T), l.length === 0) continue;
42
+ for (let s = 0; s < u.length; s++) {
43
+ const h = u[s];
44
+ if (s > 0 && t.write(E), h.length === 0) continue;
57
45
  let o = 0;
58
- for (let u = 0; u < l.length; u++) {
59
- const a = l[u];
60
- u > 0 && t.write(A), o = c(t, a[0], o), a.length !== 1 && (e = c(t, a[1], e), i = c(t, a[2], i), n = c(t, a[3], n), a.length !== 4 && (r = c(t, a[4], r)));
46
+ for (let l = 0; l < h.length; l++) {
47
+ const a = h[l];
48
+ l > 0 && t.write(x), o = c(t, a[0], o), a.length !== 1 && (e = c(t, a[1], e), i = c(t, a[2], i), n = c(t, a[3], n), a.length !== 4 && (r = c(t, a[4], r)));
61
49
  }
62
50
  }
63
51
  return t.flush();
@@ -140,38 +128,38 @@ class g {
140
128
  } else if (this.edit("", void 0, !0), this.outro = this.outro.replace(t, ""), this.outro.length) return !0;
141
129
  }
142
130
  }
143
- function B() {
144
- return typeof globalThis != "undefined" && typeof globalThis.btoa == "function" ? (h) => globalThis.btoa(unescape(encodeURIComponent(h))) : typeof Buffer == "function" ? (h) => Buffer.from(h, "utf-8").toString("base64") : () => {
131
+ function _() {
132
+ return typeof globalThis < "u" && typeof globalThis.btoa == "function" ? (u) => globalThis.btoa(unescape(encodeURIComponent(u))) : typeof Buffer == "function" ? (u) => Buffer.from(u, "utf-8").toString("base64") : () => {
145
133
  throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.");
146
134
  };
147
135
  }
148
- const M = /* @__PURE__ */ B();
149
- class P {
136
+ const O = /* @__PURE__ */ _();
137
+ class N {
150
138
  constructor(t) {
151
- this.version = 3, this.file = t.file, this.sources = t.sources, this.sourcesContent = t.sourcesContent, this.names = t.names, this.mappings = U(t.mappings), typeof t.x_google_ignoreList != "undefined" && (this.x_google_ignoreList = t.x_google_ignoreList), typeof t.debugId != "undefined" && (this.debugId = t.debugId);
139
+ this.version = 3, this.file = t.file, this.sources = t.sources, this.sourcesContent = t.sourcesContent, this.names = t.names, this.mappings = R(t.mappings), typeof t.x_google_ignoreList < "u" && (this.x_google_ignoreList = t.x_google_ignoreList), typeof t.debugId < "u" && (this.debugId = t.debugId);
152
140
  }
153
141
  toString() {
154
142
  return JSON.stringify(this);
155
143
  }
156
144
  toUrl() {
157
- return "data:application/json;charset=utf-8;base64," + M(this.toString());
145
+ return "data:application/json;charset=utf-8;base64," + O(this.toString());
158
146
  }
159
147
  }
160
- function D(h) {
161
- const t = h.split(`
148
+ function I(u) {
149
+ const t = u.split(`
162
150
  `), e = t.filter((r) => /^\t+/.test(r)), i = t.filter((r) => /^ {2,}/.test(r));
163
151
  if (e.length === 0 && i.length === 0)
164
152
  return null;
165
153
  if (e.length >= i.length)
166
154
  return " ";
167
155
  const n = i.reduce((r, s) => {
168
- const l = /^ +/.exec(s)[0].length;
169
- return Math.min(l, r);
156
+ const h = /^ +/.exec(s)[0].length;
157
+ return Math.min(h, r);
170
158
  }, 1 / 0);
171
159
  return new Array(n + 1).join(" ");
172
160
  }
173
- function z(h, t) {
174
- const e = h.split(/[/\\]/), i = t.split(/[/\\]/);
161
+ function A(u, t) {
162
+ const e = u.split(/[/\\]/), i = t.split(/[/\\]/);
175
163
  for (e.pop(); e[0] === i[0]; )
176
164
  e.shift(), i.shift();
177
165
  if (e.length) {
@@ -180,27 +168,27 @@ function z(h, t) {
180
168
  }
181
169
  return e.concat(i).join("/");
182
170
  }
183
- const F = Object.prototype.toString;
184
- function H(h) {
185
- return F.call(h) === "[object Object]";
171
+ const T = Object.prototype.toString;
172
+ function j(u) {
173
+ return T.call(u) === "[object Object]";
186
174
  }
187
- function E(h) {
188
- const t = h.split(`
175
+ function y(u) {
176
+ const t = u.split(`
189
177
  `), e = [];
190
178
  for (let i = 0, n = 0; i < t.length; i++)
191
179
  e.push(n), n += t[i].length + 1;
192
180
  return function(n) {
193
181
  let r = 0, s = e.length;
194
182
  for (; r < s; ) {
195
- const u = r + s >> 1;
196
- n < e[u] ? s = u : r = u + 1;
183
+ const l = r + s >> 1;
184
+ n < e[l] ? s = l : r = l + 1;
197
185
  }
198
- const l = r - 1, o = n - e[l];
199
- return { line: l, column: o };
186
+ const h = r - 1, o = n - e[h];
187
+ return { line: h, column: o };
200
188
  };
201
189
  }
202
- const J = /\w/;
203
- class W {
190
+ const $ = /\w/;
191
+ class U {
204
192
  constructor(t) {
205
193
  this.hires = t, this.generatedCodeLine = 0, this.generatedCodeColumn = 0, this.raw = [], this.rawSegments = this.raw[this.generatedCodeLine] = [], this.pending = null;
206
194
  }
@@ -208,29 +196,29 @@ class W {
208
196
  if (e.length) {
209
197
  const r = e.length - 1;
210
198
  let s = e.indexOf(`
211
- `, 0), l = -1;
199
+ `, 0), h = -1;
212
200
  for (; s >= 0 && r > s; ) {
213
- const u = [this.generatedCodeColumn, t, i.line, i.column];
214
- n >= 0 && u.push(n), this.rawSegments.push(u), this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, l = s, s = e.indexOf(`
201
+ const l = [this.generatedCodeColumn, t, i.line, i.column];
202
+ n >= 0 && l.push(n), this.rawSegments.push(l), this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, h = s, s = e.indexOf(`
215
203
  `, s + 1);
216
204
  }
217
205
  const o = [this.generatedCodeColumn, t, i.line, i.column];
218
- n >= 0 && o.push(n), this.rawSegments.push(o), this.advance(e.slice(l + 1));
206
+ n >= 0 && o.push(n), this.rawSegments.push(o), this.advance(e.slice(h + 1));
219
207
  } else this.pending && (this.rawSegments.push(this.pending), this.advance(e));
220
208
  this.pending = null;
221
209
  }
222
210
  addUneditedChunk(t, e, i, n, r) {
223
- let s = e.start, l = !0, o = !1;
211
+ let s = e.start, h = !0, o = !1;
224
212
  for (; s < e.end; ) {
225
213
  if (i[s] === `
226
214
  `)
227
- n.line += 1, n.column = 0, this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, l = !0, o = !1;
215
+ n.line += 1, n.column = 0, this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, h = !0, o = !1;
228
216
  else {
229
- if (this.hires || l || r.has(s)) {
230
- const u = [this.generatedCodeColumn, t, n.line, n.column];
231
- this.hires === "boundary" ? J.test(i[s]) ? o || (this.rawSegments.push(u), o = !0) : (this.rawSegments.push(u), o = !1) : this.rawSegments.push(u);
217
+ if (this.hires || h || r.has(s)) {
218
+ const l = [this.generatedCodeColumn, t, n.line, n.column];
219
+ this.hires === "boundary" ? $.test(i[s]) ? o || (this.rawSegments.push(l), o = !0) : (this.rawSegments.push(l), o = !1) : this.rawSegments.push(l);
232
220
  }
233
- n.column += 1, this.generatedCodeColumn += 1, l = !1;
221
+ n.column += 1, this.generatedCodeColumn += 1, h = !1;
234
222
  }
235
223
  s += 1;
236
224
  }
@@ -254,7 +242,7 @@ const d = `
254
242
  insertRight: !1,
255
243
  storeName: !1
256
244
  };
257
- class L {
245
+ class v {
258
246
  constructor(t, e = {}) {
259
247
  const i = new g(0, t.length, t);
260
248
  Object.defineProperties(this, {
@@ -295,7 +283,7 @@ class L {
295
283
  return i ? i.appendRight(e) : this.outro += e, this;
296
284
  }
297
285
  clone() {
298
- const t = new L(this.original, { filename: this.filename, offset: this.offset });
286
+ const t = new v(this.original, { filename: this.filename, offset: this.offset });
299
287
  let e = this.firstChunk, i = t.firstChunk = t.lastSearchedChunk = e.clone();
300
288
  for (; e; ) {
301
289
  t.byStart[i.start] = i, t.byEnd[i.end] = i;
@@ -306,19 +294,19 @@ class L {
306
294
  }
307
295
  generateDecodedMap(t) {
308
296
  t = t || {};
309
- const e = 0, i = Object.keys(this.storedNames), n = new W(t.hires), r = E(this.original);
297
+ const e = 0, i = Object.keys(this.storedNames), n = new U(t.hires), r = y(this.original);
310
298
  return this.intro && n.advance(this.intro), this.firstChunk.eachNext((s) => {
311
- const l = r(s.start);
299
+ const h = r(s.start);
312
300
  s.intro.length && n.advance(s.intro), s.edited ? n.addEdit(
313
301
  e,
314
302
  s.content,
315
- l,
303
+ h,
316
304
  s.storeName ? i.indexOf(s.original) : -1
317
- ) : n.addUneditedChunk(e, s, this.original, l, this.sourcemapLocations), s.outro.length && n.advance(s.outro);
305
+ ) : n.addUneditedChunk(e, s, this.original, h, this.sourcemapLocations), s.outro.length && n.advance(s.outro);
318
306
  }), {
319
307
  file: t.file ? t.file.split(/[/\\]/).pop() : void 0,
320
308
  sources: [
321
- t.source ? z(t.file || "", t.source) : t.file || ""
309
+ t.source ? A(t.file || "", t.source) : t.file || ""
322
310
  ],
323
311
  sourcesContent: t.includeContent ? [this.original] : void 0,
324
312
  names: i,
@@ -327,10 +315,10 @@ class L {
327
315
  };
328
316
  }
329
317
  generateMap(t) {
330
- return new P(this.generateDecodedMap(t));
318
+ return new N(this.generateDecodedMap(t));
331
319
  }
332
320
  _ensureindentStr() {
333
- this.indentStr === void 0 && (this.indentStr = D(this.original));
321
+ this.indentStr === void 0 && (this.indentStr = I(this.original));
334
322
  }
335
323
  _getRawIndentString() {
336
324
  return this._ensureindentStr(), this.indentStr;
@@ -340,7 +328,7 @@ class L {
340
328
  }
341
329
  indent(t, e) {
342
330
  const i = /^[^\r\n]/gm;
343
- if (H(t) && (e = t, t = void 0), t === void 0 && (this._ensureindentStr(), t = this.indentStr || " "), t === "") return this;
331
+ if (j(t) && (e = t, t = void 0), t === void 0 && (this._ensureindentStr(), t = this.indentStr || " "), t === "") return this;
344
332
  e = e || {};
345
333
  const n = {};
346
334
  e.exclude && (typeof e.exclude[0] == "number" ? [e.exclude] : e.exclude).forEach((a) => {
@@ -348,24 +336,24 @@ class L {
348
336
  n[w] = !0;
349
337
  });
350
338
  let r = e.indentStart !== !1;
351
- const s = (u) => r ? `${t}${u}` : (r = !0, u);
339
+ const s = (l) => r ? `${t}${l}` : (r = !0, l);
352
340
  this.intro = this.intro.replace(i, s);
353
- let l = 0, o = this.firstChunk;
341
+ let h = 0, o = this.firstChunk;
354
342
  for (; o; ) {
355
- const u = o.end;
343
+ const l = o.end;
356
344
  if (o.edited)
357
- n[l] || (o.content = o.content.replace(i, s), o.content.length && (r = o.content[o.content.length - 1] === `
345
+ n[h] || (o.content = o.content.replace(i, s), o.content.length && (r = o.content[o.content.length - 1] === `
358
346
  `));
359
347
  else
360
- for (l = o.start; l < u; ) {
361
- if (!n[l]) {
362
- const a = this.original[l];
348
+ for (h = o.start; h < l; ) {
349
+ if (!n[h]) {
350
+ const a = this.original[h];
363
351
  a === `
364
- ` ? r = !0 : a !== "\r" && r && (r = !1, l === o.start || (this._splitChunk(o, l), o = o.next), o.prependRight(t));
352
+ ` ? r = !0 : a !== "\r" && r && (r = !1, h === o.start || (this._splitChunk(o, h), o = o.next), o.prependRight(t));
365
353
  }
366
- l += 1;
354
+ h += 1;
367
355
  }
368
- l = o.end, o = o.next;
356
+ h = o.end, o = o.next;
369
357
  }
370
358
  return this.outro = this.outro.replace(i, s), this;
371
359
  }
@@ -387,13 +375,13 @@ class L {
387
375
  move(t, e, i) {
388
376
  if (t = t + this.offset, e = e + this.offset, i = i + this.offset, i >= t && i <= e) throw new Error("Cannot move a selection inside itself");
389
377
  this._split(t), this._split(e), this._split(i);
390
- const n = this.byStart[t], r = this.byEnd[e], s = n.previous, l = r.next, o = this.byStart[i];
378
+ const n = this.byStart[t], r = this.byEnd[e], s = n.previous, h = r.next, o = this.byStart[i];
391
379
  if (!o && r === this.lastChunk) return this;
392
- const u = o ? o.previous : this.lastChunk;
393
- return s && (s.next = l), l && (l.previous = s), u && (u.next = n), o && (o.previous = r), n.previous || (this.firstChunk = r.next), r.next || (this.lastChunk = n.previous, this.lastChunk.next = null), n.previous = u, r.next = o || null, u || (this.firstChunk = n), o || (this.lastChunk = r), this;
380
+ const l = o ? o.previous : this.lastChunk;
381
+ return s && (s.next = h), h && (h.previous = s), l && (l.next = n), o && (o.previous = r), n.previous || (this.firstChunk = r.next), r.next || (this.lastChunk = n.previous, this.lastChunk.next = null), n.previous = l, r.next = o || null, l || (this.firstChunk = n), o || (this.lastChunk = r), this;
394
382
  }
395
383
  overwrite(t, e, i, n) {
396
- return n = n || {}, this.update(t, e, i, y(C({}, n), { overwrite: !n.contentOnly }));
384
+ return n = n || {}, this.update(t, e, i, { ...n, overwrite: !n.contentOnly });
397
385
  }
398
386
  update(t, e, i, n) {
399
387
  if (t = t + this.offset, e = e + this.offset, typeof i != "string") throw new TypeError("replacement content must be a string");
@@ -411,25 +399,25 @@ class L {
411
399
  ), f.storeName = !0), n = { storeName: !0 });
412
400
  const r = n !== void 0 ? n.storeName : !1, s = n !== void 0 ? n.overwrite : !1;
413
401
  if (r) {
414
- const u = this.original.slice(t, e);
415
- Object.defineProperty(this.storedNames, u, {
402
+ const l = this.original.slice(t, e);
403
+ Object.defineProperty(this.storedNames, l, {
416
404
  writable: !0,
417
405
  value: !0,
418
406
  enumerable: !0
419
407
  });
420
408
  }
421
- const l = this.byStart[t], o = this.byEnd[e];
422
- if (l) {
423
- let u = l;
424
- for (; u !== o; ) {
425
- if (u.next !== this.byStart[u.end])
409
+ const h = this.byStart[t], o = this.byEnd[e];
410
+ if (h) {
411
+ let l = h;
412
+ for (; l !== o; ) {
413
+ if (l.next !== this.byStart[l.end])
426
414
  throw new Error("Cannot overwrite across a split point");
427
- u = u.next, u.edit("", !1);
415
+ l = l.next, l.edit("", !1);
428
416
  }
429
- l.edit(i, r, !s);
417
+ h.edit(i, r, !s);
430
418
  } else {
431
- const u = new g(t, e, "").edit(i, r);
432
- o.next = u, u.previous = o;
419
+ const l = new g(t, e, "").edit(i, r);
420
+ o.next = l, l.previous = o;
433
421
  }
434
422
  return this;
435
423
  }
@@ -526,8 +514,8 @@ class L {
526
514
  const s = n.start < e && n.end >= e;
527
515
  if (s && n.edited && n.end !== e)
528
516
  throw new Error(`Cannot use replaced character ${e} as slice end anchor.`);
529
- const l = r === n ? t - n.start : 0, o = s ? n.content.length + e - n.end : n.content.length;
530
- if (i += n.content.slice(l, o), n.outro && (!s || n.end === e) && (i += n.outro), s)
517
+ const h = r === n ? t - n.start : 0, o = s ? n.content.length + e - n.end : n.content.length;
518
+ if (i += n.content.slice(h, o), n.outro && (!s || n.end === e) && (i += n.outro), s)
531
519
  break;
532
520
  n = n.next;
533
521
  }
@@ -549,7 +537,7 @@ class L {
549
537
  }
550
538
  _splitChunk(t, e) {
551
539
  if (t.edited && t.content.length) {
552
- const n = E(this.original)(e);
540
+ const n = y(this.original)(e);
553
541
  throw new Error(
554
542
  `Cannot split a chunk that has already been edited (${n.line}:${n.column} – "${t.original}")`
555
543
  );
@@ -617,20 +605,20 @@ class L {
617
605
  }
618
606
  _replaceRegexp(t, e) {
619
607
  function i(r, s) {
620
- return typeof e == "string" ? e.replace(/\$(\$|&|\d+)/g, (l, o) => o === "$" ? "$" : o === "&" ? r[0] : +o < r.length ? r[+o] : `$${o}`) : e(...r, r.index, s, r.groups);
608
+ return typeof e == "string" ? e.replace(/\$(\$|&|\d+)/g, (h, o) => o === "$" ? "$" : o === "&" ? r[0] : +o < r.length ? r[+o] : `$${o}`) : e(...r, r.index, s, r.groups);
621
609
  }
622
610
  function n(r, s) {
623
- let l;
611
+ let h;
624
612
  const o = [];
625
- for (; l = r.exec(s); )
626
- o.push(l);
613
+ for (; h = r.exec(s); )
614
+ o.push(h);
627
615
  return o;
628
616
  }
629
617
  if (t.global)
630
618
  n(t, this.original).forEach((s) => {
631
619
  if (s.index != null) {
632
- const l = i(s, this.original);
633
- l !== s[0] && this.overwrite(s.index, s.index + s[0].length, l);
620
+ const h = i(s, this.original);
621
+ h !== s[0] && this.overwrite(s.index, s.index + s[0].length, h);
634
622
  }
635
623
  });
636
624
  else {
@@ -666,6 +654,6 @@ class L {
666
654
  }
667
655
  }
668
656
  export {
669
- P as SourceMap,
670
- L as default
657
+ N as SourceMap,
658
+ v as default
671
659
  };
@@ -1,4 +1,4 @@
1
- import { T_Object } from '../typescript/common.js';
1
+ import { T_Object } from '../typescript/index.js';
2
2
  export declare enum E_ConfigType {
3
3
  ESLINT = "eslint",
4
4
  COMMITLINT = "commitlint",
@@ -1,3 +1,3 @@
1
- import { T_Object } from '../typescript/common.js';
1
+ import { T_Object } from '../typescript/index.js';
2
2
  import { T_ConfigType } from './config.type.js';
3
3
  export declare function mergeConfigs(type: T_ConfigType, ...config: T_Object[]): T_Object;
@@ -1,9 +1,50 @@
1
- import "@antfu/eslint-config";
2
- import "./vitest/vitest.e2e.js";
3
- import "./vitest/vitest.unit.js";
4
- import "../util/object/object.util.js";
5
- import { m as f } from "../../config.util-DKBwEBKR.js";
6
- import "./eslint/index.js";
1
+ import T from "@antfu/eslint-config";
2
+ import E from "./eslint/index.js";
3
+ import { vitestE2E as c } from "./vitest/vitest.e2e.js";
4
+ import { vitestUnit as I } from "./vitest/vitest.unit.js";
5
+ import { deepMerge as i } from "../util/object/object.util.js";
6
+ var e = /* @__PURE__ */ ((t) => (t.ESLINT = "eslint", t.COMMITLINT = "commitlint", t.LINT_STAGED = "lint-staged", t.VITEST_REACT_E2E = "vitest-react-e2e", t.VITEST_REACT_UNIT = "vitest-react-unit", t))(e || {});
7
+ const l = (...t) => {
8
+ const n = i(
9
+ E,
10
+ ...t.map((s) => s)
11
+ ), { ignores: r, ...m } = n, o = Array.isArray(r) && r.every((s) => typeof s == "string") ? { ignores: r } : void 0, a = [
12
+ m,
13
+ ...o ? [o] : []
14
+ ];
15
+ return T(
16
+ {
17
+ stylistic: {
18
+ semi: !0,
19
+ indent: 4,
20
+ quotes: "single"
21
+ },
22
+ formatters: {
23
+ css: !0,
24
+ html: !0,
25
+ markdown: "prettier"
26
+ },
27
+ yaml: !1,
28
+ react: !0
29
+ },
30
+ ...a
31
+ );
32
+ }, f = {
33
+ [e.ESLINT]: (t) => l(t),
34
+ [e.COMMITLINT]: (t) => i(t),
35
+ [e.LINT_STAGED]: (t) => i(t),
36
+ [e.VITEST_REACT_UNIT]: (t) => I(t),
37
+ [e.VITEST_REACT_E2E]: (t) => c(t)
38
+ };
39
+ function N(t, ...n) {
40
+ const r = f[t];
41
+ if (!n || n.length === 0)
42
+ return r({});
43
+ if (!r)
44
+ throw new Error(`Unknown config type: ${t}`);
45
+ return r(...n);
46
+ }
7
47
  export {
8
- f as mergeConfigs
48
+ e as E,
49
+ N as mergeConfigs
9
50
  };
@@ -1,21 +1,21 @@
1
- import n from "@dotenvx/dotenvx";
2
- import { makeValidator as E, cleanEnv as f, str as r } from "envalid";
3
- import i from "node:os";
4
- import a from "node:path";
1
+ import { CYBERSKILL_STORAGE_DIRECTORY as n } from "./env.constant.js";
2
+ import E from "@dotenvx/dotenvx";
3
+ import { makeValidator as f, cleanEnv as i, str as r } from "envalid";
4
+ import a from "node:os";
5
+ import m from "node:path";
5
6
  import o from "node:process";
6
- import { E_Environment as m } from "../../typescript/common.js";
7
- import { CYBERSKILL_STORAGE_DIRECTORY as R } from "./env.constant.js";
7
+ import { E_Environment as R } from "../../typescript/index.js";
8
8
  let t = !1;
9
- const l = E((e) => typeof e == "boolean" ? e : typeof e == "string");
9
+ const l = f((e) => typeof e == "boolean" ? e : typeof e == "string");
10
10
  function d() {
11
- o.env.NODE_ENV !== m.PRODUCTION && !t && (n.config(), t = !0);
11
+ o.env.NODE_ENV !== R.PRODUCTION && !t && (E.config(), t = !0);
12
12
  }
13
13
  function p() {
14
14
  d();
15
- const e = f(o.env, {
15
+ const e = i(o.env, {
16
16
  CWD: r({ default: o.cwd() }),
17
17
  DEBUG: l({ default: !1 }),
18
- CYBERSKILL_STORAGE_DIRECTORY: r({ default: a.join(i.homedir(), R) })
18
+ CYBERSKILL_STORAGE_DIRECTORY: r({ default: m.join(a.homedir(), n) })
19
19
  });
20
20
  return {
21
21
  CWD: e.CWD,
@@ -1,19 +1,8 @@
1
- var a = Object.defineProperty;
2
- var e = Object.getOwnPropertySymbols;
3
- var l = Object.prototype.hasOwnProperty, f = Object.prototype.propertyIsEnumerable;
4
- var n = (r, o, t) => o in r ? a(r, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[o] = t, s = (r, o) => {
5
- for (var t in o || (o = {}))
6
- l.call(o, t) && n(r, t, o[t]);
7
- if (e)
8
- for (var t of e(o))
9
- f.call(o, t) && n(r, t, o[t]);
10
- return r;
11
- };
12
- import * as i from "globals";
13
- const d = [
1
+ import * as o from "globals";
2
+ const t = [
14
3
  {
15
4
  languageOptions: {
16
- globals: s(s({}, i.node), i.browser)
5
+ globals: { ...o.node, ...o.browser }
17
6
  },
18
7
  rules: {
19
8
  "perfectionist/sort-imports": ["error", {
@@ -25,5 +14,5 @@ const d = [
25
14
  }
26
15
  ];
27
16
  export {
28
- d as default
17
+ t as default
29
18
  };
@@ -1,46 +1,37 @@
1
- var u = Object.defineProperty, p = Object.defineProperties;
2
- var g = Object.getOwnPropertyDescriptors;
3
- var s = Object.getOwnPropertySymbols;
4
- var l = Object.prototype.hasOwnProperty, a = Object.prototype.propertyIsEnumerable;
5
- var c = (n, e, r) => e in n ? u(n, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[e] = r, t = (n, e) => {
6
- for (var r in e || (e = {}))
7
- l.call(e, r) && c(n, r, e[r]);
8
- if (s)
9
- for (var r of s(e))
10
- a.call(e, r) && c(n, r, e[r]);
11
- return n;
12
- }, f = (n, e) => p(n, g(e));
13
- import { defineConfig as d } from "@eddeee888/gcg-typescript-resolver-files";
14
- import { loadEnvFile as C } from "../env/env.util.js";
15
- C();
16
- function k({
17
- uri: n,
18
- from: e,
19
- to: r,
20
- target: o = "client"
1
+ import { defineConfig as s } from "@eddeee888/gcg-typescript-resolver-files";
2
+ import { loadEnvFile as c } from "../env/env.util.js";
3
+ c();
4
+ function u({
5
+ uri: t,
6
+ from: o,
7
+ to: e,
8
+ target: r = "client"
21
9
  }) {
22
- const i = o === "client", m = o === "server";
23
- return f(t({
24
- schema: n,
10
+ const n = r === "client", i = r === "server";
11
+ return {
12
+ schema: t,
25
13
  ignoreNoDocuments: !0,
26
- overwrite: !0
27
- }, i && { documents: [e] }), {
28
- generates: t(t({}, i && {
29
- [r]: {
30
- preset: "client",
31
- presetConfig: {
32
- fragmentMasking: !1,
33
- persistedDocuments: !0
34
- },
35
- config: {
36
- useTypeImports: !0
14
+ overwrite: !0,
15
+ ...n && { documents: [o] },
16
+ generates: {
17
+ ...n && {
18
+ [e]: {
19
+ preset: "client",
20
+ presetConfig: {
21
+ fragmentMasking: !1,
22
+ persistedDocuments: !0
23
+ },
24
+ config: {
25
+ useTypeImports: !0
26
+ }
37
27
  }
28
+ },
29
+ ...i && {
30
+ [e]: s()
38
31
  }
39
- }), m && {
40
- [r]: d()
41
- })
42
- });
32
+ }
33
+ };
43
34
  }
44
35
  export {
45
- k as createGraphqlCodegenConfig
36
+ u as createGraphqlCodegenConfig
46
37
  };
@@ -1,4 +1,4 @@
1
- import { E as f, m as g } from "../../config.util-DKBwEBKR.js";
1
+ import { E as f, mergeConfigs as g } from "./config.util.js";
2
2
  export {
3
3
  f as E_ConfigType,
4
4
  g as mergeConfigs