@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.
- package/dist/config-CwzVfkkX.js +6 -0
- package/dist/index-BG1UznTl.js +628 -0
- package/dist/{magic-string.es-C6Zk6wMx.js → magic-string.es-BQ9KnLz-.js} +105 -117
- package/dist/src/config/config.type.d.ts +1 -1
- package/dist/src/config/config.util.d.ts +1 -1
- package/dist/src/config/config.util.js +48 -7
- package/dist/src/config/env/env.util.js +10 -10
- package/dist/src/config/eslint/index.js +4 -15
- package/dist/src/config/graphql-codegen/graphql-codegen.util.js +30 -39
- package/dist/src/config/index.js +1 -1
- package/dist/src/config/vitest/vitest.e2e.js +9 -19
- package/dist/src/config/vitest/vitest.unit.js +11 -22
- package/dist/src/config/vitest/vitest.unit.setup.js +9339 -9868
- package/dist/src/constant/common.js +1 -1
- package/dist/src/node/apollo-server/apollo-server.util.js +23 -54
- package/dist/src/node/cli/index.d.ts +2 -1
- package/dist/src/node/cli/index.js +108 -1
- package/dist/src/node/command/command.util.js +9 -10
- package/dist/src/node/command/index.js +1 -1
- package/dist/src/node/express/express.util.js +39 -77
- package/dist/src/node/express/index.js +9 -9
- package/dist/src/node/fs/fs.util.js +40 -59
- package/dist/src/node/log/index.js +6 -6
- package/dist/src/node/log/log.util.js +32 -33
- package/dist/src/node/mongo/mongo.util.js +381 -457
- package/dist/src/node/package/index.js +3 -3
- package/dist/src/node/package/package.util.js +2 -2
- package/dist/src/node/path/index.js +30 -30
- package/dist/src/node/path/path.constant.js +30 -30
- package/dist/src/node/storage/storage.util.js +40 -70
- package/dist/src/node/upload/index.js +1 -1
- package/dist/src/node/upload/upload.util.js +125 -6
- package/dist/src/react/apollo-client/apollo-client.component.js +15 -13
- package/dist/src/react/apollo-client/apollo-client.type.d.ts +1 -1
- package/dist/src/react/apollo-client/apollo-client.util.js +66 -81
- package/dist/src/react/apollo-client/index.js +25 -26
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.component.js +7 -8
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.util.js +11 -21
- package/dist/src/react/apollo-error/apollo-error.component.js +7 -7
- package/dist/src/react/apollo-error/apollo-error.util.js +7 -7
- package/dist/src/react/loading/loading.component.js +24 -45
- package/dist/src/react/loading/loading.provider.d.ts +1 -1
- package/dist/src/react/log/log.util.js +9 -9
- package/dist/src/react/next-intl/next-intl.hoc.d.ts +1 -1
- package/dist/src/react/next-intl/next-intl.hoc.js +17 -29
- package/dist/src/react/next-intl/next-intl.provider.js +18 -19
- package/dist/src/react/next-intl/next-intl.type.d.ts +1 -1
- package/dist/src/react/storage/storage.hook.js +37 -53
- package/dist/src/react/storage/storage.util.js +25 -50
- package/dist/src/react/userback/userback.component.js +16 -43
- package/dist/src/typescript/index.d.ts +2 -2
- package/dist/src/typescript/index.js +2 -2
- package/dist/src/typescript/style.d.js +1 -1
- package/dist/src/util/common/common.util.js +14 -25
- package/dist/src/util/object/object.util.d.ts +1 -1
- package/dist/src/util/object/object.util.js +39 -49
- package/dist/src/util/string/string.util.js +40 -53
- package/dist/style.css +1 -1
- package/package.json +43 -76
- package/dist/config-B7WSlzSh.js +0 -8
- package/dist/config-DDQ9k8fw.cjs +0 -1
- package/dist/config.util-Ci2CZDut.cjs +0 -1
- package/dist/config.util-DKBwEBKR.js +0 -61
- package/dist/favicon/android-icon-144x144.png +0 -0
- package/dist/favicon/android-icon-192x192.png +0 -0
- package/dist/favicon/android-icon-36x36.png +0 -0
- package/dist/favicon/android-icon-48x48.png +0 -0
- package/dist/favicon/android-icon-72x72.png +0 -0
- package/dist/favicon/android-icon-96x96.png +0 -0
- package/dist/favicon/apple-icon-114x114.png +0 -0
- package/dist/favicon/apple-icon-120x120.png +0 -0
- package/dist/favicon/apple-icon-144x144.png +0 -0
- package/dist/favicon/apple-icon-152x152.png +0 -0
- package/dist/favicon/apple-icon-180x180.png +0 -0
- package/dist/favicon/apple-icon-57x57.png +0 -0
- package/dist/favicon/apple-icon-60x60.png +0 -0
- package/dist/favicon/apple-icon-72x72.png +0 -0
- package/dist/favicon/apple-icon-76x76.png +0 -0
- package/dist/favicon/apple-icon-precomposed.png +0 -0
- package/dist/favicon/apple-icon.png +0 -0
- package/dist/favicon/browserconfig.xml +0 -2
- package/dist/favicon/favicon-16x16.png +0 -0
- package/dist/favicon/favicon-32x32.png +0 -0
- package/dist/favicon/favicon-96x96.png +0 -0
- package/dist/favicon/favicon.ico +0 -0
- package/dist/favicon/manifest.json +0 -41
- package/dist/favicon/ms-icon-144x144.png +0 -0
- package/dist/favicon/ms-icon-150x150.png +0 -0
- package/dist/favicon/ms-icon-310x310.png +0 -0
- package/dist/favicon/ms-icon-70x70.png +0 -0
- package/dist/log.type-CMvG6Box.cjs +0 -1
- package/dist/log.type-DTOvZHyz.js +0 -4
- package/dist/magic-string.es-CjWtD8Pa.cjs +0 -10
- package/dist/path.constant-CWtb99gS.cjs +0 -2
- package/dist/path.constant-CvSr0Rrx.js +0 -682
- package/dist/src/config/commitlint/index.cjs +0 -1
- package/dist/src/config/config.util.cjs +0 -1
- package/dist/src/config/env/env.constant.cjs +0 -1
- package/dist/src/config/env/env.d.cjs +0 -1
- package/dist/src/config/env/env.d.js +0 -1
- package/dist/src/config/env/env.util.cjs +0 -1
- package/dist/src/config/env/index.cjs +0 -1
- package/dist/src/config/eslint/index.cjs +0 -1
- package/dist/src/config/graphql-codegen/graphql-codegen.util.cjs +0 -1
- package/dist/src/config/graphql-codegen/index.cjs +0 -1
- package/dist/src/config/index.cjs +0 -1
- package/dist/src/config/lint-staged/index.cjs +0 -1
- package/dist/src/config/vitest/index.cjs +0 -1
- package/dist/src/config/vitest/vitest.e2e.cjs +0 -1
- package/dist/src/config/vitest/vitest.unit.cjs +0 -1
- package/dist/src/config/vitest/vitest.unit.setup.cjs +0 -508
- package/dist/src/constant/common.cjs +0 -1
- package/dist/src/constant/index.cjs +0 -1
- package/dist/src/constant/response-status.cjs +0 -1
- package/dist/src/node/apollo-server/apollo-server.util.cjs +0 -1
- package/dist/src/node/apollo-server/index.cjs +0 -1
- package/dist/src/node/cli/cli.util.cjs +0 -6
- package/dist/src/node/cli/cli.util.d.ts +0 -2
- package/dist/src/node/cli/cli.util.js +0 -171
- package/dist/src/node/cli/index.cjs +0 -1
- package/dist/src/node/command/command.util.cjs +0 -1
- package/dist/src/node/command/index.cjs +0 -1
- package/dist/src/node/express/express.util.cjs +0 -1
- package/dist/src/node/express/index.cjs +0 -1
- package/dist/src/node/fs/fs.util.cjs +0 -1
- package/dist/src/node/fs/index.cjs +0 -1
- package/dist/src/node/log/index.cjs +0 -1
- package/dist/src/node/log/log.util.cjs +0 -1
- package/dist/src/node/mongo/index.cjs +0 -1
- package/dist/src/node/mongo/mongo.constant.cjs +0 -1
- package/dist/src/node/mongo/mongo.util.cjs +0 -5
- package/dist/src/node/package/index.cjs +0 -1
- package/dist/src/node/package/package.util.cjs +0 -1
- package/dist/src/node/path/index.cjs +0 -1
- package/dist/src/node/path/path.constant.cjs +0 -1
- package/dist/src/node/path/path.util.cjs +0 -1
- package/dist/src/node/storage/index.cjs +0 -1
- package/dist/src/node/storage/storage.util.cjs +0 -1
- package/dist/src/node/upload/index.cjs +0 -1
- package/dist/src/node/upload/upload.util.cjs +0 -1
- package/dist/src/node/ws/index.cjs +0 -1
- package/dist/src/node/ws/ts.util.cjs +0 -1
- package/dist/src/react/apollo-client/apollo-client.component.cjs +0 -1
- package/dist/src/react/apollo-client/apollo-client.constant.cjs +0 -1
- package/dist/src/react/apollo-client/apollo-client.context.cjs +0 -1
- package/dist/src/react/apollo-client/apollo-client.hook.cjs +0 -1
- package/dist/src/react/apollo-client/apollo-client.util.cjs +0 -1
- package/dist/src/react/apollo-client/index.cjs +0 -1
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.component.cjs +0 -1
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs +0 -1
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.util.cjs +0 -1
- package/dist/src/react/apollo-client-nextjs/index.cjs +0 -1
- package/dist/src/react/apollo-error/apollo-error.component.cjs +0 -1
- package/dist/src/react/apollo-error/apollo-error.context.cjs +0 -1
- package/dist/src/react/apollo-error/apollo-error.hook.cjs +0 -1
- package/dist/src/react/apollo-error/apollo-error.provider.cjs +0 -1
- package/dist/src/react/apollo-error/apollo-error.util.cjs +0 -1
- package/dist/src/react/apollo-error/index.cjs +0 -1
- package/dist/src/react/i18next/i18next.hook.cjs +0 -1
- package/dist/src/react/i18next/i18next.util.cjs +0 -1
- package/dist/src/react/i18next/index.cjs +0 -1
- package/dist/src/react/loading/index.cjs +0 -1
- package/dist/src/react/loading/loading.component.cjs +0 -6
- package/dist/src/react/loading/loading.context.cjs +0 -1
- package/dist/src/react/loading/loading.hook.cjs +0 -1
- package/dist/src/react/loading/loading.provider.cjs +0 -1
- package/dist/src/react/log/index.cjs +0 -1
- package/dist/src/react/log/log.util.cjs +0 -1
- package/dist/src/react/next-intl/index.cjs +0 -1
- package/dist/src/react/next-intl/next-intl.constant.cjs +0 -1
- package/dist/src/react/next-intl/next-intl.context.cjs +0 -1
- package/dist/src/react/next-intl/next-intl.hoc.cjs +0 -1
- package/dist/src/react/next-intl/next-intl.hook.cjs +0 -1
- package/dist/src/react/next-intl/next-intl.provider.cjs +0 -1
- package/dist/src/react/storage/index.cjs +0 -1
- package/dist/src/react/storage/storage.hook.cjs +0 -1
- package/dist/src/react/storage/storage.util.cjs +0 -1
- package/dist/src/react/toast/index.cjs +0 -1
- package/dist/src/react/userback/index.cjs +0 -1
- package/dist/src/react/userback/userback.component.cjs +0 -1
- package/dist/src/typescript/common.cjs +0 -1
- package/dist/src/typescript/common.js +0 -4
- package/dist/src/typescript/index.cjs +0 -1
- package/dist/src/typescript/react.cjs +0 -1
- package/dist/src/typescript/react.js +0 -1
- package/dist/src/typescript/style.d.cjs +0 -1
- package/dist/src/util/common/common.util.cjs +0 -1
- package/dist/src/util/common/index.cjs +0 -1
- package/dist/src/util/index.cjs +0 -1
- package/dist/src/util/object/index.cjs +0 -1
- package/dist/src/util/object/object.util.cjs +0 -1
- package/dist/src/util/serializer/index.cjs +0 -1
- package/dist/src/util/serializer/serializer.util.cjs +0 -1
- package/dist/src/util/string/index.cjs +0 -1
- package/dist/src/util/string/string.util.cjs +0 -1
- package/dist/src/util/validate/index.cjs +0 -1
- package/dist/src/util/validate/validate.util.cjs +0 -1
- package/dist/tsconfig.base.json +0 -37
- package/dist/upload.util-CE3MjBdh.cjs +0 -1
- package/dist/upload.util-D4aUdmPo.js +0 -160
- /package/dist/src/typescript/{common.d.ts → common.type.d.ts} +0 -0
- /package/dist/src/typescript/{react.d.ts → react.type.d.ts} +0 -0
|
@@ -1,63 +1,51 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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(
|
|
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),
|
|
11
|
+
i >>>= 5, i > 0 && (n |= 32), u.write(S[n]);
|
|
24
12
|
} while (i > 0);
|
|
25
13
|
return t;
|
|
26
14
|
}
|
|
27
|
-
var
|
|
28
|
-
decode(
|
|
29
|
-
return Buffer.from(
|
|
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(
|
|
20
|
+
decode(u) {
|
|
33
21
|
let t = "";
|
|
34
|
-
for (let e = 0; e <
|
|
35
|
-
t += String.fromCharCode(
|
|
22
|
+
for (let e = 0; e < u.length; e++)
|
|
23
|
+
t += String.fromCharCode(u[e]);
|
|
36
24
|
return t;
|
|
37
25
|
}
|
|
38
|
-
},
|
|
26
|
+
}, L = class {
|
|
39
27
|
constructor() {
|
|
40
|
-
this.pos = 0, this.out = "", this.buffer = new Uint8Array(
|
|
28
|
+
this.pos = 0, this.out = "", this.buffer = new Uint8Array(b);
|
|
41
29
|
}
|
|
42
|
-
write(
|
|
30
|
+
write(u) {
|
|
43
31
|
const { buffer: t } = this;
|
|
44
|
-
t[this.pos++] =
|
|
32
|
+
t[this.pos++] = u, this.pos === b && (this.out += C.decode(t), this.pos = 0);
|
|
45
33
|
}
|
|
46
34
|
flush() {
|
|
47
|
-
const { buffer:
|
|
48
|
-
return e > 0 ? 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
|
|
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 <
|
|
55
|
-
const
|
|
56
|
-
if (s > 0 && t.write(
|
|
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
|
|
59
|
-
const a = l
|
|
60
|
-
|
|
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
|
|
144
|
-
return typeof globalThis
|
|
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
|
|
149
|
-
class
|
|
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 =
|
|
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," +
|
|
145
|
+
return "data:application/json;charset=utf-8;base64," + O(this.toString());
|
|
158
146
|
}
|
|
159
147
|
}
|
|
160
|
-
function
|
|
161
|
-
const t =
|
|
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
|
|
169
|
-
return Math.min(
|
|
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
|
|
174
|
-
const e =
|
|
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
|
|
184
|
-
function
|
|
185
|
-
return
|
|
171
|
+
const T = Object.prototype.toString;
|
|
172
|
+
function j(u) {
|
|
173
|
+
return T.call(u) === "[object Object]";
|
|
186
174
|
}
|
|
187
|
-
function
|
|
188
|
-
const t =
|
|
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
|
|
196
|
-
n < e[
|
|
183
|
+
const l = r + s >> 1;
|
|
184
|
+
n < e[l] ? s = l : r = l + 1;
|
|
197
185
|
}
|
|
198
|
-
const
|
|
199
|
-
return { line:
|
|
186
|
+
const h = r - 1, o = n - e[h];
|
|
187
|
+
return { line: h, column: o };
|
|
200
188
|
};
|
|
201
189
|
}
|
|
202
|
-
const
|
|
203
|
-
class
|
|
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),
|
|
199
|
+
`, 0), h = -1;
|
|
212
200
|
for (; s >= 0 && r > s; ) {
|
|
213
|
-
const
|
|
214
|
-
n >= 0 &&
|
|
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(
|
|
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,
|
|
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,
|
|
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 ||
|
|
230
|
-
const
|
|
231
|
-
this.hires === "boundary" ?
|
|
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,
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
303
|
+
h,
|
|
316
304
|
s.storeName ? i.indexOf(s.original) : -1
|
|
317
|
-
) : n.addUneditedChunk(e, s, this.original,
|
|
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 ?
|
|
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
|
|
318
|
+
return new N(this.generateDecodedMap(t));
|
|
331
319
|
}
|
|
332
320
|
_ensureindentStr() {
|
|
333
|
-
this.indentStr === void 0 && (this.indentStr =
|
|
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 (
|
|
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 = (
|
|
339
|
+
const s = (l) => r ? `${t}${l}` : (r = !0, l);
|
|
352
340
|
this.intro = this.intro.replace(i, s);
|
|
353
|
-
let
|
|
341
|
+
let h = 0, o = this.firstChunk;
|
|
354
342
|
for (; o; ) {
|
|
355
|
-
const
|
|
343
|
+
const l = o.end;
|
|
356
344
|
if (o.edited)
|
|
357
|
-
n[
|
|
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 (
|
|
361
|
-
if (!n[
|
|
362
|
-
const a = this.original[
|
|
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,
|
|
352
|
+
` ? r = !0 : a !== "\r" && r && (r = !1, h === o.start || (this._splitChunk(o, h), o = o.next), o.prependRight(t));
|
|
365
353
|
}
|
|
366
|
-
|
|
354
|
+
h += 1;
|
|
367
355
|
}
|
|
368
|
-
|
|
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,
|
|
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
|
|
393
|
-
return s && (s.next =
|
|
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,
|
|
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
|
|
415
|
-
Object.defineProperty(this.storedNames,
|
|
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
|
|
422
|
-
if (
|
|
423
|
-
let
|
|
424
|
-
for (;
|
|
425
|
-
if (
|
|
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
|
-
|
|
415
|
+
l = l.next, l.edit("", !1);
|
|
428
416
|
}
|
|
429
|
-
|
|
417
|
+
h.edit(i, r, !s);
|
|
430
418
|
} else {
|
|
431
|
-
const
|
|
432
|
-
o.next =
|
|
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
|
|
530
|
-
if (i += n.content.slice(
|
|
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 =
|
|
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, (
|
|
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
|
|
611
|
+
let h;
|
|
624
612
|
const o = [];
|
|
625
|
-
for (;
|
|
626
|
-
o.push(
|
|
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
|
|
633
|
-
|
|
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
|
-
|
|
670
|
-
|
|
657
|
+
N as SourceMap,
|
|
658
|
+
v as default
|
|
671
659
|
};
|
|
@@ -1,9 +1,50 @@
|
|
|
1
|
-
import "@antfu/eslint-config";
|
|
2
|
-
import "./
|
|
3
|
-
import "./vitest/vitest.
|
|
4
|
-
import "
|
|
5
|
-
import {
|
|
6
|
-
|
|
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
|
-
|
|
48
|
+
e as E,
|
|
49
|
+
N as mergeConfigs
|
|
9
50
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import n from "
|
|
2
|
-
import
|
|
3
|
-
import i from "
|
|
4
|
-
import a from "node:
|
|
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
|
|
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 =
|
|
9
|
+
const l = f((e) => typeof e == "boolean" ? e : typeof e == "string");
|
|
10
10
|
function d() {
|
|
11
|
-
o.env.NODE_ENV !==
|
|
11
|
+
o.env.NODE_ENV !== R.PRODUCTION && !t && (E.config(), t = !0);
|
|
12
12
|
}
|
|
13
13
|
function p() {
|
|
14
14
|
d();
|
|
15
|
-
const e =
|
|
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:
|
|
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
|
-
|
|
2
|
-
|
|
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:
|
|
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
|
-
|
|
17
|
+
t as default
|
|
29
18
|
};
|
|
@@ -1,46 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
23
|
-
return
|
|
24
|
-
schema:
|
|
10
|
+
const n = r === "client", i = r === "server";
|
|
11
|
+
return {
|
|
12
|
+
schema: t,
|
|
25
13
|
ignoreNoDocuments: !0,
|
|
26
|
-
overwrite: !0
|
|
27
|
-
|
|
28
|
-
generates:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
}
|
|
40
|
-
|
|
41
|
-
})
|
|
42
|
-
});
|
|
32
|
+
}
|
|
33
|
+
};
|
|
43
34
|
}
|
|
44
35
|
export {
|
|
45
|
-
|
|
36
|
+
u as createGraphqlCodegenConfig
|
|
46
37
|
};
|
package/dist/src/config/index.js
CHANGED