@cyberskill/shared 2.28.0 → 3.0.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/config.util.cjs +1 -1
- package/dist/config/config.util.js +24 -33
- package/dist/config/eslint/index.cjs +1 -1
- package/dist/config/eslint/index.d.ts +4 -0
- package/dist/config/eslint/index.js +4 -12
- package/dist/config/graphql-codegen/graphql-codegen.util.cjs +1 -1
- package/dist/config/graphql-codegen/graphql-codegen.util.js +28 -33
- package/dist/config/storybook/storybook.preview.cjs +1 -1
- package/dist/config/storybook/storybook.preview.js +10 -13
- package/dist/config/vitest/vitest.e2e.cjs +1 -1
- package/dist/config/vitest/vitest.e2e.js +1 -1
- package/dist/config/vitest/vitest.unit.cjs +1 -1
- package/dist/config/vitest/vitest.unit.js +19 -8
- package/dist/constant/common.cjs +1 -1
- package/dist/constant/common.js +1 -1
- package/dist/node/apollo-server/apollo-server.util.cjs +1 -1
- package/dist/node/apollo-server/apollo-server.util.js +21 -48
- package/dist/node/cli/index.cjs +2 -2
- package/dist/node/cli/index.js +109 -165
- package/dist/node/command/command.util.cjs +2 -2
- package/dist/node/command/command.util.js +135 -170
- package/dist/node/express/express.util.cjs +1 -1
- package/dist/node/express/express.util.js +39 -72
- package/dist/node/fs/fs.util.cjs +3 -3
- package/dist/node/fs/fs.util.js +45 -60
- package/dist/node/log/log.util.cjs +1 -1
- package/dist/node/log/log.util.js +29 -30
- package/dist/node/mongo/mongo.controller.cjs +1 -1
- package/dist/node/mongo/mongo.controller.js +531 -629
- package/dist/node/mongo/mongo.util.cjs +2 -2
- package/dist/node/mongo/mongo.util.js +280 -321
- package/dist/node/package/package.util.cjs +1 -1
- package/dist/node/package/package.util.js +197 -226
- package/dist/node/path/index.cjs +1 -1
- package/dist/node/path/index.js +26 -25
- package/dist/node/path/path.constant.cjs +1 -1
- package/dist/node/path/path.constant.d.ts +2 -0
- package/dist/node/path/path.constant.js +130 -150
- package/dist/node/storage/storage.util.cjs +1 -1
- package/dist/node/storage/storage.util.js +110 -158
- package/dist/node/upload/upload.util.cjs +1 -1
- package/dist/node/upload/upload.util.js +119 -150
- package/dist/node/ws/ts.util.cjs +1 -1
- package/dist/node/ws/ts.util.js +31 -54
- package/dist/react/apollo-client/apollo-client.component.cjs +1 -1
- package/dist/react/apollo-client/apollo-client.component.js +4 -4
- package/dist/react/apollo-client/apollo-client.util.cjs +1 -1
- package/dist/react/apollo-client/apollo-client.util.js +51 -58
- package/dist/react/apollo-client/links/upload.cjs +1 -1
- package/dist/react/apollo-client/links/upload.js +71 -74
- package/dist/react/apollo-client-nextjs/apollo-client-nextjs.util.cjs +1 -1
- package/dist/react/apollo-client-nextjs/apollo-client-nextjs.util.js +11 -18
- package/dist/react/apollo-error/apollo-error.component.cjs +1 -1
- package/dist/react/apollo-error/apollo-error.component.js +61 -23
- package/dist/react/apollo-error/apollo-error.module.scss.cjs +1 -1
- package/dist/react/apollo-error/apollo-error.module.scss.js +6 -6
- package/dist/react/apollo-error/apollo-error.test.unit.d.ts +1 -0
- package/dist/react/apollo-error/apollo-error.util.cjs +1 -1
- package/dist/react/apollo-error/apollo-error.util.js +6 -6
- package/dist/react/loading/loading.component.cjs +2 -2
- package/dist/react/loading/loading.component.js +30 -46
- package/dist/react/log/log.util.cjs +1 -1
- package/dist/react/log/log.util.js +4 -4
- package/dist/react/next-intl/next-intl.hoc.cjs +1 -1
- package/dist/react/next-intl/next-intl.hoc.js +13 -22
- package/dist/react/next-intl/next-intl.provider.cjs +1 -1
- package/dist/react/next-intl/next-intl.provider.js +7 -7
- package/dist/react/storage/storage.hook.cjs +1 -1
- package/dist/react/storage/storage.hook.js +43 -59
- package/dist/react/storage/storage.util.cjs +1 -1
- package/dist/react/storage/storage.util.js +28 -53
- package/dist/react/userback/userback.component.cjs +1 -1
- package/dist/react/userback/userback.component.js +18 -42
- package/dist/style.css +1 -1
- package/dist/util/common/common.util.cjs +1 -1
- package/dist/util/common/common.util.d.ts +2 -0
- package/dist/util/common/common.util.js +29 -37
- package/dist/util/index.cjs +1 -1
- package/dist/util/index.js +10 -9
- package/dist/util/object/object.util.cjs +1 -1
- package/dist/util/object/object.util.js +72 -76
- package/dist/util/string/index.cjs +1 -1
- package/dist/util/string/index.js +4 -3
- package/dist/util/string/string.util.cjs +1 -1
- package/dist/util/string/string.util.d.ts +12 -0
- package/dist/util/string/string.util.js +63 -44
- package/package.json +25 -16
- package/public/tsconfig.base.json +7 -3
- package/README.md +0 -470
- /package/dist/node_modules/.pnpm/{vitest@4.0.18_@types_node@25.3.0_jiti@2.6.1_jsdom@28.1.0_@noble_hashes@1.8.0__sass@1.97.3_tsx@4.21.0_yaml@2.8.2 → vitest@4.0.18_@types_node@25.3.3_jiti@2.6.1_jsdom@28.1.0_@noble_hashes@1.8.0__sass@1.97.3_tsx@4.21.0_yaml@2.8.2}/node_modules/vitest/dist/config.cjs +0 -0
- /package/dist/node_modules/.pnpm/{vitest@4.0.18_@types_node@25.3.0_jiti@2.6.1_jsdom@28.1.0_@noble_hashes@1.8.0__sass@1.97.3_tsx@4.21.0_yaml@2.8.2 → vitest@4.0.18_@types_node@25.3.3_jiti@2.6.1_jsdom@28.1.0_@noble_hashes@1.8.0__sass@1.97.3_tsx@4.21.0_yaml@2.8.2}/node_modules/vitest/dist/config.js +0 -0
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { catchError as
|
|
3
|
-
|
|
4
|
-
var y = (t) => {
|
|
5
|
-
try {
|
|
6
|
-
c(n.next(t));
|
|
7
|
-
} catch (a) {
|
|
8
|
-
i(a);
|
|
9
|
-
}
|
|
10
|
-
}, h = (t) => {
|
|
11
|
-
try {
|
|
12
|
-
c(n.throw(t));
|
|
13
|
-
} catch (a) {
|
|
14
|
-
i(a);
|
|
15
|
-
}
|
|
16
|
-
}, c = (t) => t.done ? s(t.value) : Promise.resolve(t.value).then(y, h);
|
|
17
|
-
c((n = n.apply(r, e)).next());
|
|
18
|
-
});
|
|
19
|
-
const f = {
|
|
1
|
+
import e from "localforage";
|
|
2
|
+
import { catchError as a } from "../log/log.util.js";
|
|
3
|
+
const s = {
|
|
20
4
|
/**
|
|
21
5
|
* Retrieves a value from browser storage by key.
|
|
22
6
|
* This method fetches data that was previously stored using the set method.
|
|
@@ -25,14 +9,12 @@ const f = {
|
|
|
25
9
|
* @param key - The unique identifier for the stored value.
|
|
26
10
|
* @returns A promise that resolves to the stored value or null if not found.
|
|
27
11
|
*/
|
|
28
|
-
get(r) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
});
|
|
12
|
+
async get(r) {
|
|
13
|
+
try {
|
|
14
|
+
return await e.getItem(r);
|
|
15
|
+
} catch (t) {
|
|
16
|
+
return a(t, { returnValue: null });
|
|
17
|
+
}
|
|
36
18
|
},
|
|
37
19
|
/**
|
|
38
20
|
* Stores a value in browser storage with a unique key.
|
|
@@ -44,14 +26,12 @@ const f = {
|
|
|
44
26
|
* @param value - The data to store (will be automatically handled by localForage).
|
|
45
27
|
* @returns A promise that resolves when the storage operation is complete.
|
|
46
28
|
*/
|
|
47
|
-
set(r,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
});
|
|
29
|
+
async set(r, t) {
|
|
30
|
+
try {
|
|
31
|
+
await e.setItem(r, t);
|
|
32
|
+
} catch (c) {
|
|
33
|
+
a(c);
|
|
34
|
+
}
|
|
55
35
|
},
|
|
56
36
|
/**
|
|
57
37
|
* Removes a value from browser storage by key.
|
|
@@ -61,14 +41,12 @@ const f = {
|
|
|
61
41
|
* @param key - The unique identifier of the value to remove.
|
|
62
42
|
* @returns A promise that resolves when the removal operation is complete.
|
|
63
43
|
*/
|
|
64
|
-
remove(r) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
});
|
|
44
|
+
async remove(r) {
|
|
45
|
+
try {
|
|
46
|
+
await e.removeItem(r);
|
|
47
|
+
} catch (t) {
|
|
48
|
+
a(t);
|
|
49
|
+
}
|
|
72
50
|
},
|
|
73
51
|
/**
|
|
74
52
|
* Retrieves all storage keys.
|
|
@@ -77,17 +55,14 @@ const f = {
|
|
|
77
55
|
*
|
|
78
56
|
* @returns A promise that resolves to an array of storage keys.
|
|
79
57
|
*/
|
|
80
|
-
keys() {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
return u(r, { returnValue: [] });
|
|
87
|
-
}
|
|
88
|
-
});
|
|
58
|
+
async keys() {
|
|
59
|
+
try {
|
|
60
|
+
return await e.keys() ?? [];
|
|
61
|
+
} catch (r) {
|
|
62
|
+
return a(r, { returnValue: [] });
|
|
63
|
+
}
|
|
89
64
|
}
|
|
90
65
|
};
|
|
91
66
|
export {
|
|
92
|
-
|
|
67
|
+
s as storage
|
|
93
68
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@userback/widget"),s=require("react");function l({token:r,options:u}){return s.useEffect(()=>{if(!r)return;let t;return(async()=>{const{hide:e,...a}=u||{};await n(r,a),e&&e.length>0&&e.forEach(c=>{document.querySelectorAll(c).forEach(o=>o.remove())}),t=new MutationObserver(()=>{e&&e.length>0&&e.forEach(c=>{document.querySelectorAll(c).forEach(o=>o.remove())})}),t.observe(document.body,{childList:!0,subtree:!0})})(),()=>{t?.disconnect()}},[r,u]),null}exports.Userback=l;
|
|
@@ -1,51 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useEffect as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
d.call(e, t) && o.indexOf(t) < 0 && (r[t] = e[t]);
|
|
7
|
-
if (e != null && u)
|
|
8
|
-
for (var t of u(e))
|
|
9
|
-
o.indexOf(t) < 0 && b.call(e, t) && (r[t] = e[t]);
|
|
10
|
-
return r;
|
|
11
|
-
}, m = (e, o, r) => new Promise((t, c) => {
|
|
12
|
-
var n = (l) => {
|
|
13
|
-
try {
|
|
14
|
-
a(r.next(l));
|
|
15
|
-
} catch (f) {
|
|
16
|
-
c(f);
|
|
17
|
-
}
|
|
18
|
-
}, i = (l) => {
|
|
19
|
-
try {
|
|
20
|
-
a(r.throw(l));
|
|
21
|
-
} catch (f) {
|
|
22
|
-
c(f);
|
|
23
|
-
}
|
|
24
|
-
}, a = (l) => l.done ? t(l.value) : Promise.resolve(l.value).then(n, i);
|
|
25
|
-
a((r = r.apply(e, o)).next());
|
|
26
|
-
});
|
|
27
|
-
function _({ token: e, options: o }) {
|
|
28
|
-
return s(() => {
|
|
29
|
-
if (!e)
|
|
1
|
+
import a from "@userback/widget";
|
|
2
|
+
import { useEffect as l } from "react";
|
|
3
|
+
function d({ token: r, options: n }) {
|
|
4
|
+
return l(() => {
|
|
5
|
+
if (!r)
|
|
30
6
|
return;
|
|
31
|
-
let
|
|
32
|
-
return
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
document.querySelectorAll(
|
|
36
|
-
}),
|
|
37
|
-
|
|
38
|
-
document.querySelectorAll(
|
|
7
|
+
let t;
|
|
8
|
+
return (async () => {
|
|
9
|
+
const { hide: e, ...u } = n || {};
|
|
10
|
+
await a(r, u), e && e.length > 0 && e.forEach((o) => {
|
|
11
|
+
document.querySelectorAll(o).forEach((c) => c.remove());
|
|
12
|
+
}), t = new MutationObserver(() => {
|
|
13
|
+
e && e.length > 0 && e.forEach((o) => {
|
|
14
|
+
document.querySelectorAll(o).forEach((c) => c.remove());
|
|
39
15
|
});
|
|
40
|
-
}),
|
|
16
|
+
}), t.observe(document.body, {
|
|
41
17
|
childList: !0,
|
|
42
18
|
subtree: !0
|
|
43
19
|
});
|
|
44
|
-
}), () => {
|
|
45
|
-
|
|
20
|
+
})(), () => {
|
|
21
|
+
t?.disconnect();
|
|
46
22
|
};
|
|
47
|
-
}, [
|
|
23
|
+
}, [r, n]), null;
|
|
48
24
|
}
|
|
49
25
|
export {
|
|
50
|
-
|
|
26
|
+
d as Userback
|
|
51
27
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._overlay_b1d9o_1,._full_b1d9o_1,._block_b1d9o_2{z-index:999999;background:linear-gradient(135deg,#ffffff59,#ffffffb3);backdrop-filter:blur(20px) saturate(200%);display:flex;justify-content:center;align-items:center;width:100%;height:100%;animation:_overlay-fade-in_b1d9o_1 .5s ease-out;border:1.5px solid rgba(255,255,255,.35);box-shadow:0 4px 32px #1f26872e,inset 0 1.5px 8px #ffffff40}._full_b1d9o_1,._block_b1d9o_2{pointer-events:none}._full_b1d9o_1{position:fixed;inset:0}._block_b1d9o_2{position:absolute;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);background:#ffffff1a;backdrop-filter:blur(4px)}._container_b1d9o_40{display:flex;flex-direction:column;justify-content:center;align-items:center;position:relative;padding:1rem;gap:1.5rem;text-align:center}._container_b1d9o_40 ._ring_b1d9o_50{width:clamp(60px,10vw,150px);height:clamp(60px,10vw,150px);border:2px solid transparent;border-radius:50%;position:absolute;transition:transform .3s ease}._container_b1d9o_40 ._ring_b1d9o_50:nth-child(1){border-bottom:8px solid hsl(315,90%,60%);animation:_rotate1_b1d9o_1 1s linear infinite}._container_b1d9o_40 ._ring_b1d9o_50:nth-child(2){border-bottom:8px solid hsl(345,90%,50%);animation:_rotate2_b1d9o_1 1s linear infinite}._container_b1d9o_40 ._ring_b1d9o_50:nth-child(3){border-bottom:8px solid hsl(180,80%,40%);animation:_rotate3_b1d9o_1 1s linear infinite}._container_b1d9o_40 ._ring_b1d9o_50:nth-child(4){border-bottom:8px solid hsl(40,100%,45%);animation:_rotate4_b1d9o_1 1s linear infinite}._container_b1d9o_40 ._message_b1d9o_74{font-weight:700;color:#2f2f37;text-shadow:0 1px 2px rgba(255,255,255,.8);animation:_text-fade_b1d9o_1 2s ease-in-out infinite alternate;word-break:break-word;hyphens:auto}@keyframes _rotate1_b1d9o_1{0%{transform:rotateX(50deg) rotate(110deg)}to{transform:rotateX(50deg) rotate(470deg)}}@keyframes _rotate2_b1d9o_1{0%{transform:rotateX(20deg) rotateY(50deg) rotate(20deg)}to{transform:rotateX(20deg) rotateY(50deg) rotate(380deg)}}@keyframes _rotate3_b1d9o_1{0%{transform:rotateX(40deg) rotateY(130deg) rotate(450deg)}to{transform:rotateX(40deg) rotateY(130deg) rotate(90deg)}}@keyframes _rotate4_b1d9o_1{0%{transform:rotateX(70deg) rotate(270deg)}to{transform:rotateX(70deg) rotate(630deg)}}@keyframes _text-fade_b1d9o_1{0%{opacity:.6}to{opacity:1}}@keyframes _overlay-fade-in_b1d9o_1{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){._ring_b1d9o_50,._message_b1d9o_74,._overlay_b1d9o_1,._full_b1d9o_1,._block_b1d9o_2{animation:none!important}}._modal-
|
|
1
|
+
._overlay_b1d9o_1,._full_b1d9o_1,._block_b1d9o_2{z-index:999999;background:linear-gradient(135deg,#ffffff59,#ffffffb3);backdrop-filter:blur(20px) saturate(200%);display:flex;justify-content:center;align-items:center;width:100%;height:100%;animation:_overlay-fade-in_b1d9o_1 .5s ease-out;border:1.5px solid rgba(255,255,255,.35);box-shadow:0 4px 32px #1f26872e,inset 0 1.5px 8px #ffffff40}._full_b1d9o_1,._block_b1d9o_2{pointer-events:none}._full_b1d9o_1{position:fixed;inset:0}._block_b1d9o_2{position:absolute;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);background:#ffffff1a;backdrop-filter:blur(4px)}._container_b1d9o_40{display:flex;flex-direction:column;justify-content:center;align-items:center;position:relative;padding:1rem;gap:1.5rem;text-align:center}._container_b1d9o_40 ._ring_b1d9o_50{width:clamp(60px,10vw,150px);height:clamp(60px,10vw,150px);border:2px solid transparent;border-radius:50%;position:absolute;transition:transform .3s ease}._container_b1d9o_40 ._ring_b1d9o_50:nth-child(1){border-bottom:8px solid hsl(315,90%,60%);animation:_rotate1_b1d9o_1 1s linear infinite}._container_b1d9o_40 ._ring_b1d9o_50:nth-child(2){border-bottom:8px solid hsl(345,90%,50%);animation:_rotate2_b1d9o_1 1s linear infinite}._container_b1d9o_40 ._ring_b1d9o_50:nth-child(3){border-bottom:8px solid hsl(180,80%,40%);animation:_rotate3_b1d9o_1 1s linear infinite}._container_b1d9o_40 ._ring_b1d9o_50:nth-child(4){border-bottom:8px solid hsl(40,100%,45%);animation:_rotate4_b1d9o_1 1s linear infinite}._container_b1d9o_40 ._message_b1d9o_74{font-weight:700;color:#2f2f37;text-shadow:0 1px 2px rgba(255,255,255,.8);animation:_text-fade_b1d9o_1 2s ease-in-out infinite alternate;word-break:break-word;hyphens:auto}@keyframes _rotate1_b1d9o_1{0%{transform:rotateX(50deg) rotate(110deg)}to{transform:rotateX(50deg) rotate(470deg)}}@keyframes _rotate2_b1d9o_1{0%{transform:rotateX(20deg) rotateY(50deg) rotate(20deg)}to{transform:rotateX(20deg) rotateY(50deg) rotate(380deg)}}@keyframes _rotate3_b1d9o_1{0%{transform:rotateX(40deg) rotateY(130deg) rotate(450deg)}to{transform:rotateX(40deg) rotateY(130deg) rotate(90deg)}}@keyframes _rotate4_b1d9o_1{0%{transform:rotateX(70deg) rotate(270deg)}to{transform:rotateX(70deg) rotate(630deg)}}@keyframes _text-fade_b1d9o_1{0%{opacity:.6}to{opacity:1}}@keyframes _overlay-fade-in_b1d9o_1{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){._ring_b1d9o_50,._message_b1d9o_74,._overlay_b1d9o_1,._full_b1d9o_1,._block_b1d9o_2{animation:none!important}}._modal-backdrop_199u4_1{position:fixed;inset:0;z-index:9999999;background-color:#0009;display:flex;align-items:center;justify-content:center;padding:1rem}._modal-backdrop_199u4_1 ._modal-content_199u4_11{position:relative;background-color:#0f172a;color:#fff;max-width:80vw;width:100%;border-radius:.75rem;box-shadow:0 10px 20px #00000080;overflow:hidden;padding:2rem}._modal-backdrop_199u4_1 ._modal-content_199u4_11 ._btn-close_199u4_22{position:absolute;top:.75rem;right:1rem;font-size:1.25rem;color:#fff;background:none;border:none;cursor:pointer;transition:color .2s}._modal-backdrop_199u4_1 ._modal-content_199u4_11 ._btn-close_199u4_22:hover{color:#f87171}._modal-backdrop_199u4_1 ._modal-content_199u4_11 ._btn-close_199u4_22:focus-visible{outline:none;box-shadow:0 0 0 2px #f87171;border-radius:.125rem}._modal-backdrop_199u4_1 ._modal-content_199u4_11 ._error-title_199u4_41{font-weight:700;margin-bottom:1rem}._modal-backdrop_199u4_1 ._modal-content_199u4_11 ._error-title_199u4_41 ._btn-retry_199u4_45{background:linear-gradient(to right,#3b82f6,#06b6d4);color:#fff;font-weight:600;padding:.5rem 1.5rem;border-radius:.75rem;transition:background .3s ease;border:none;cursor:pointer}._modal-backdrop_199u4_1 ._modal-content_199u4_11 ._error-title_199u4_41 ._btn-retry_199u4_45:hover{background:linear-gradient(to right,#2563eb,#0891b2)}._modal-backdrop_199u4_1 ._modal-content_199u4_11 ._error-title_199u4_41 ._btn-retry_199u4_45:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}._modal-backdrop_199u4_1 ._modal-content_199u4_11 ._error-details_199u4_62{background-color:#1e293b;text-align:left;font-size:.875rem;border-radius:.5rem;padding:1rem;margin-bottom:1.5rem;max-height:50vh;overflow-y:auto;border:1px solid #334155;display:flex;flex-direction:column;gap:.5rem}._modal-backdrop_199u4_1 ._modal-content_199u4_11 ._error-details_199u4_62 pre{white-space:pre-wrap;word-break:break-word}._modal-backdrop_199u4_1 ._modal-content_199u4_11 ._error-details_199u4_62 pre._main_199u4_80{color:#fca5a5}._modal-backdrop_199u4_1 ._modal-content_199u4_11 ._error-details_199u4_62 pre._network_199u4_83{color:#fde68a}._modal-backdrop_199u4_1 ._modal-content_199u4_11 ._error-details_199u4_62 pre._extra_199u4_86{color:#67e8f9;overflow-x:auto;white-space:pre;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;background-color:#0f172a;padding:.5rem;border-radius:.375rem}._modal-backdrop_199u4_1 ._modal-content_199u4_11 ._error-details_199u4_62 ul{padding-left:1rem;color:#fda4af;list-style:disc}._error-container_oofeh_1{display:flex;align-items:center;justify-content:center;gap:.5rem}._error-details-button_oofeh_8{display:inline-flex;align-items:center;justify-content:center;padding:.5rem 1rem;background-color:#ef4444;color:#fff;border:2px solid #dc2626;border-radius:.5rem;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .2s ease-in-out}._error-details-button_oofeh_8:hover{background-color:#dc2626;border-color:#b91c1c;transform:translateY(-1px);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}._error-details-button_oofeh_8:active{transform:translateY(0);box-shadow:0 1px 3px #0000001a,0 1px 2px #0000000f}._error-details-button_oofeh_8:focus{outline:none;ring:2px;ring-color:#fca5a5;ring-offset:2px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../typescript/common.type.cjs")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../typescript/common.type.cjs"),i={a:["à","á","ạ","ả","ã","â","ầ","ấ","ậ","ẩ","ẫ","ă","ằ","ắ","ặ","ẳ","ẵ"],e:["è","é","ẹ","ẻ","ẽ","ê","ề","ế","ệ","ể","ễ"],i:["ì","í","ị","ỉ","ĩ"],o:["ò","ó","ọ","ỏ","õ","ô","ồ","ố","ộ","ổ","ỗ","ơ","ờ","ớ","ợ","ở","ỡ"],u:["ù","ú","ụ","ủ","ũ","ư","ừ","ứ","ự","ử","ữ"],y:["ỳ","ý","ỵ","ỷ","ỹ"],d:["đ"]},u=Object.entries(i).reduce((e,[n,r])=>(e[n.toUpperCase()]=r.map(o=>o.toUpperCase()),e),{}),m={...i,...u},a=new Map,p=new Set;Object.entries(m).forEach(([e,n])=>{const r=`(${[e,...n].join("|")})`;[e,...n].forEach(o=>{a.set(o,r),p.add(o)})});const O=Array.from(p).join(""),_=new RegExp(`[${O}]`,"g");function s(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function D(e){return e=s(e),e.replace(_,n=>a.get(n)||n)}function N(e){return e.normalize("NFD").replace(/\p{Diacritic}/gu,"")}function M(e,n){if(!n)return Array.from(new Set(e));const r=new Set,o=[];for(const E of e){const c=n(E);r.has(c)||(r.add(c),o.push(E))}return o}function f(e){const{NODE_ENV:n=t.E_Environment.DEVELOPMENT,NODE_ENV_MODE:r=t.E_Environment.DEVELOPMENT}=e,o=n===t.E_Environment.DEVELOPMENT&&r===t.E_Environment.DEVELOPMENT,E=n===t.E_Environment.PRODUCTION&&r===t.E_Environment.STAGING,c=n===t.E_Environment.PRODUCTION&&r===t.E_Environment.PRODUCTION;if(n===t.E_Environment.PRODUCTION&&r===t.E_Environment.DEVELOPMENT)throw new Error("NODE_ENV_MODE must be set to staging or production in production environment");return{IS_DEV:o,IS_STAG:E,IS_PROD:c}}exports.escapeRegExp=s;exports.mapEnvironment=f;exports.regexSearchMapper=D;exports.removeAccent=N;exports.uniqueArray=M;
|
|
@@ -15,6 +15,8 @@ export declare function escapeRegExp(str: string): string;
|
|
|
15
15
|
*
|
|
16
16
|
* Optimization: Uses pre-computed regex and map to perform replacement in a single pass (O(N)),
|
|
17
17
|
* instead of iterating through all character groups (O(K*N)).
|
|
18
|
+
* Removed unnecessary NFD normalization which improves performance and fixes
|
|
19
|
+
* matching against NFC target strings.
|
|
18
20
|
*
|
|
19
21
|
* @param str - The string to convert to a regex pattern.
|
|
20
22
|
* @returns The regex pattern as a string that matches the original string and its accented variations.
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import { E_Environment as
|
|
2
|
-
|
|
3
|
-
for (var n in r || (r = {}))
|
|
4
|
-
m.call(r, n) && i(e, n, r[n]);
|
|
5
|
-
if (p)
|
|
6
|
-
for (var n of p(r))
|
|
7
|
-
_.call(r, n) && i(e, n, r[n]);
|
|
8
|
-
return e;
|
|
9
|
-
};
|
|
10
|
-
const s = {
|
|
1
|
+
import { E_Environment as r } from "../../typescript/common.type.js";
|
|
2
|
+
const p = {
|
|
11
3
|
a: ["à", "á", "ạ", "ả", "ã", "â", "ầ", "ấ", "ậ", "ẩ", "ẫ", "ă", "ằ", "ắ", "ặ", "ẳ", "ẵ"],
|
|
12
4
|
e: ["è", "é", "ẹ", "ẻ", "ẽ", "ê", "ề", "ế", "ệ", "ể", "ễ"],
|
|
13
5
|
i: ["ì", "í", "ị", "ỉ", "ĩ"],
|
|
@@ -15,46 +7,46 @@ const s = {
|
|
|
15
7
|
u: ["ù", "ú", "ụ", "ủ", "ũ", "ư", "ừ", "ứ", "ự", "ử", "ữ"],
|
|
16
8
|
y: ["ỳ", "ý", "ỵ", "ỷ", "ỹ"],
|
|
17
9
|
d: ["đ"]
|
|
18
|
-
},
|
|
19
|
-
(e, [
|
|
10
|
+
}, s = Object.entries(p).reduce(
|
|
11
|
+
(e, [n, t]) => (e[n.toUpperCase()] = t.map((o) => o.toUpperCase()), e),
|
|
20
12
|
{}
|
|
21
|
-
),
|
|
22
|
-
Object.entries(
|
|
23
|
-
const
|
|
24
|
-
[e, ...
|
|
25
|
-
|
|
13
|
+
), u = { ...p, ...s }, a = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
|
|
14
|
+
Object.entries(u).forEach(([e, n]) => {
|
|
15
|
+
const t = `(${[e, ...n].join("|")})`;
|
|
16
|
+
[e, ...n].forEach((o) => {
|
|
17
|
+
a.set(o, t), i.add(o);
|
|
26
18
|
});
|
|
27
19
|
});
|
|
28
|
-
const
|
|
29
|
-
function
|
|
20
|
+
const O = Array.from(i).join(""), D = new RegExp(`[${O}]`, "g");
|
|
21
|
+
function N(e) {
|
|
30
22
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
31
23
|
}
|
|
32
|
-
function
|
|
33
|
-
return e =
|
|
24
|
+
function m(e) {
|
|
25
|
+
return e = N(e), e.replace(D, (n) => a.get(n) || n);
|
|
34
26
|
}
|
|
35
|
-
function
|
|
36
|
-
return e.normalize("NFD").replace(
|
|
27
|
+
function M(e) {
|
|
28
|
+
return e.normalize("NFD").replace(/\p{Diacritic}/gu, "");
|
|
37
29
|
}
|
|
38
|
-
function
|
|
39
|
-
if (!
|
|
30
|
+
function T(e, n) {
|
|
31
|
+
if (!n)
|
|
40
32
|
return Array.from(new Set(e));
|
|
41
|
-
const
|
|
33
|
+
const t = /* @__PURE__ */ new Set(), o = [];
|
|
42
34
|
for (const c of e) {
|
|
43
|
-
const
|
|
44
|
-
|
|
35
|
+
const E = n(c);
|
|
36
|
+
t.has(E) || (t.add(E), o.push(c));
|
|
45
37
|
}
|
|
46
38
|
return o;
|
|
47
39
|
}
|
|
48
|
-
function
|
|
49
|
-
const { NODE_ENV:
|
|
50
|
-
if (
|
|
40
|
+
function g(e) {
|
|
41
|
+
const { NODE_ENV: n = r.DEVELOPMENT, NODE_ENV_MODE: t = r.DEVELOPMENT } = e, o = n === r.DEVELOPMENT && t === r.DEVELOPMENT, c = n === r.PRODUCTION && t === r.STAGING, E = n === r.PRODUCTION && t === r.PRODUCTION;
|
|
42
|
+
if (n === r.PRODUCTION && t === r.DEVELOPMENT)
|
|
51
43
|
throw new Error("NODE_ENV_MODE must be set to staging or production in production environment");
|
|
52
|
-
return { IS_DEV: o, IS_STAG: c, IS_PROD:
|
|
44
|
+
return { IS_DEV: o, IS_STAG: c, IS_PROD: E };
|
|
53
45
|
}
|
|
54
46
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
47
|
+
N as escapeRegExp,
|
|
48
|
+
g as mapEnvironment,
|
|
49
|
+
m as regexSearchMapper,
|
|
50
|
+
M as removeAccent,
|
|
51
|
+
T as uniqueArray
|
|
60
52
|
};
|
package/dist/util/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./object/object.util.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./object/object.util.cjs"),t=require("./common/common.util.cjs"),r=require("./string/string.util.cjs"),a=require("./serializer/serializer.util.cjs"),i=require("./validate/validate.util.cjs");exports.deepClone=e.deepClone;exports.deepMerge=e.deepMerge;exports.getNestedValue=e.getNestedValue;exports.isJSON=e.isJSON;exports.normalizeMongoFilter=e.normalizeMongoFilter;exports.setNestedValue=e.setNestedValue;exports.escapeRegExp=t.escapeRegExp;exports.mapEnvironment=t.mapEnvironment;exports.regexSearchMapper=t.regexSearchMapper;exports.removeAccent=t.removeAccent;exports.uniqueArray=t.uniqueArray;exports.generateRandomPassword=r.generateRandomPassword;exports.generateRandomString=r.generateRandomString;exports.generateShortId=r.generateShortId;exports.generateSlug=r.generateSlug;exports.getFileName=r.getFileName;exports.substringBetween=r.substringBetween;exports.serializer=a.serializer;exports.validate=i.validate;
|
package/dist/util/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { deepClone as t, deepMerge as o, getNestedValue as a, isJSON as n, normalizeMongoFilter as
|
|
2
|
-
import { escapeRegExp as i, mapEnvironment as s, regexSearchMapper as
|
|
3
|
-
import { generateRandomPassword as f, generateShortId as c, generateSlug as N, getFileName as
|
|
1
|
+
import { deepClone as t, deepMerge as o, getNestedValue as a, isJSON as n, normalizeMongoFilter as g, setNestedValue as m } from "./object/object.util.js";
|
|
2
|
+
import { escapeRegExp as i, mapEnvironment as s, regexSearchMapper as d, removeAccent as l, uniqueArray as x } from "./common/common.util.js";
|
|
3
|
+
import { generateRandomPassword as f, generateRandomString as S, generateShortId as c, generateSlug as N, getFileName as v, substringBetween as M } from "./string/string.util.js";
|
|
4
4
|
import { serializer as h } from "./serializer/serializer.util.js";
|
|
5
5
|
import { validate as z } from "./validate/validate.util.js";
|
|
6
6
|
export {
|
|
@@ -8,18 +8,19 @@ export {
|
|
|
8
8
|
o as deepMerge,
|
|
9
9
|
i as escapeRegExp,
|
|
10
10
|
f as generateRandomPassword,
|
|
11
|
+
S as generateRandomString,
|
|
11
12
|
c as generateShortId,
|
|
12
13
|
N as generateSlug,
|
|
13
|
-
|
|
14
|
+
v as getFileName,
|
|
14
15
|
a as getNestedValue,
|
|
15
16
|
n as isJSON,
|
|
16
17
|
s as mapEnvironment,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
g as normalizeMongoFilter,
|
|
19
|
+
d as regexSearchMapper,
|
|
20
|
+
l as removeAccent,
|
|
20
21
|
h as serializer,
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
m as setNestedValue,
|
|
23
|
+
M as substringBetween,
|
|
23
24
|
x as uniqueArray,
|
|
24
25
|
z as validate
|
|
25
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function p(e){try{return JSON.parse(e),!0}catch{return!1}}function g(e,t){let n=e;const o=t.length;for(let r=0;r<o;r++){if(n==null||typeof n!="object")return;const s=t[r];if(s!==void 0&&s in n)n=n[s];else return}return n}function y(e,t,n,o){if(o>=t.length)return e;const r=t[o];if(o===t.length-1)return{...e,[r]:n};const s=e[r];return{...e,[r]:y(typeof s=="object"&&s!==null?s:{},t,n,o+1)}}function A(e,t,n){return t.length===0?e:y(e,t,n,0)}function u(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(o=>u(o));if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);const t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)return e;const n={};for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=u(e[o]));return n}function f(...e){if(e.length===0)return{};const t=e.filter(r=>r!=null);if(t.length===0)return{};if(t.length===1)return t[0];if(t.every(Array.isArray))return[].concat(...t);if(t.every(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))){const r={};for(const s of t){const i=s;for(const l in i)if(Object.prototype.hasOwnProperty.call(i,l)){const a=i[l];if(Object.prototype.hasOwnProperty.call(r,l)){const c=r[l];typeof a=="object"&&a!==null&&typeof c=="object"&&c!==null?Array.isArray(a)&&Array.isArray(c)?r[l]=c.concat(a):!Array.isArray(a)&&!Array.isArray(c)?r[l]=f(c,a):r[l]=a:r[l]=a}else r[l]=a}}return r}if(t.every(r=>typeof r!="object"||r===null))throw new Error("deepMerge: Cannot merge primitive values. All arguments must be objects or arrays.");const n=t.some(Array.isArray),o=t.some(r=>typeof r=="object"&&r!==null&&!Array.isArray(r));throw n&&o?new Error("deepMerge: Cannot mix arrays and objects. All arguments must be either arrays or objects."):new Error("deepMerge: Invalid arguments provided. All arguments must be objects or arrays of the same type.")}function d(e){if(!e||typeof e!="object")return e;const t={};function n(o,r){for(const s in o){if(!Object.prototype.hasOwnProperty.call(o,s))continue;const i=o[s],l=r?`${r}.${s}`:s;if(i&&typeof i=="object"&&!Array.isArray(i)){let a=!1;for(const c in i)if(Object.prototype.hasOwnProperty.call(i,c)&&c.startsWith("$")){a=!0;break}a?t[l]=i:n(i,l)}else t[l]=i}}return n(e,""),t}exports.deepClone=u;exports.deepMerge=f;exports.getNestedValue=g;exports.isJSON=p;exports.normalizeMongoFilter=d;exports.setNestedValue=A;
|
|
@@ -1,103 +1,99 @@
|
|
|
1
|
-
|
|
2
|
-
for (var n in r || (r = {}))
|
|
3
|
-
v.call(r, n) && u(e, n, r[n]);
|
|
4
|
-
if (f)
|
|
5
|
-
for (var n of f(r))
|
|
6
|
-
w.call(r, n) && u(e, n, r[n]);
|
|
7
|
-
return e;
|
|
8
|
-
}, p = (e, r) => m(e, d(r));
|
|
9
|
-
function P(e) {
|
|
1
|
+
function p(e) {
|
|
10
2
|
try {
|
|
11
3
|
return JSON.parse(e), !0;
|
|
12
|
-
} catch
|
|
4
|
+
} catch {
|
|
13
5
|
return !1;
|
|
14
6
|
}
|
|
15
7
|
}
|
|
16
|
-
function
|
|
8
|
+
function A(e, t) {
|
|
17
9
|
let n = e;
|
|
18
|
-
const o =
|
|
19
|
-
for (let
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
const o = t.length;
|
|
11
|
+
for (let r = 0; r < o; r++) {
|
|
12
|
+
if (n == null || typeof n != "object")
|
|
13
|
+
return;
|
|
14
|
+
const s = t[r];
|
|
15
|
+
if (s !== void 0 && s in n)
|
|
22
16
|
n = n[s];
|
|
23
17
|
else
|
|
24
18
|
return;
|
|
25
19
|
}
|
|
26
20
|
return n;
|
|
27
21
|
}
|
|
28
|
-
function
|
|
29
|
-
if (o >=
|
|
22
|
+
function f(e, t, n, o) {
|
|
23
|
+
if (o >= t.length)
|
|
30
24
|
return e;
|
|
31
|
-
const
|
|
32
|
-
if (o ===
|
|
33
|
-
return
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
25
|
+
const r = t[o];
|
|
26
|
+
if (o === t.length - 1)
|
|
27
|
+
return {
|
|
28
|
+
...e,
|
|
29
|
+
[r]: n
|
|
30
|
+
};
|
|
31
|
+
const s = e[r];
|
|
32
|
+
return {
|
|
33
|
+
...e,
|
|
34
|
+
[r]: f(
|
|
39
35
|
typeof s == "object" && s !== null ? s : {},
|
|
40
|
-
|
|
36
|
+
t,
|
|
41
37
|
n,
|
|
42
38
|
o + 1
|
|
43
39
|
)
|
|
44
|
-
}
|
|
40
|
+
};
|
|
45
41
|
}
|
|
46
|
-
function
|
|
47
|
-
return
|
|
42
|
+
function g(e, t, n) {
|
|
43
|
+
return t.length === 0 ? e : f(e, t, n, 0);
|
|
48
44
|
}
|
|
49
|
-
function
|
|
45
|
+
function u(e) {
|
|
50
46
|
if (e === null || typeof e != "object")
|
|
51
47
|
return e;
|
|
52
48
|
if (Array.isArray(e))
|
|
53
|
-
return e.map((o) =>
|
|
49
|
+
return e.map((o) => u(o));
|
|
54
50
|
if (e instanceof Date)
|
|
55
51
|
return new Date(e.getTime());
|
|
56
52
|
if (e instanceof RegExp)
|
|
57
53
|
return new RegExp(e.source, e.flags);
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
54
|
+
const t = Object.getPrototypeOf(e);
|
|
55
|
+
if (t !== Object.prototype && t !== null)
|
|
60
56
|
return e;
|
|
61
57
|
const n = {};
|
|
62
58
|
for (const o in e)
|
|
63
|
-
Object.prototype.hasOwnProperty.call(e, o) && (n[o] =
|
|
59
|
+
Object.prototype.hasOwnProperty.call(e, o) && (n[o] = u(e[o]));
|
|
64
60
|
return n;
|
|
65
61
|
}
|
|
66
|
-
function
|
|
62
|
+
function y(...e) {
|
|
67
63
|
if (e.length === 0)
|
|
68
64
|
return {};
|
|
69
|
-
const
|
|
70
|
-
if (
|
|
65
|
+
const t = e.filter((r) => r != null);
|
|
66
|
+
if (t.length === 0)
|
|
71
67
|
return {};
|
|
72
|
-
if (
|
|
73
|
-
return
|
|
74
|
-
if (
|
|
75
|
-
return [].concat(...
|
|
76
|
-
if (
|
|
77
|
-
const
|
|
78
|
-
for (const s of
|
|
79
|
-
const
|
|
80
|
-
for (const
|
|
81
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
82
|
-
const
|
|
83
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
84
|
-
const c =
|
|
85
|
-
typeof
|
|
68
|
+
if (t.length === 1)
|
|
69
|
+
return t[0];
|
|
70
|
+
if (t.every(Array.isArray))
|
|
71
|
+
return [].concat(...t);
|
|
72
|
+
if (t.every((r) => typeof r == "object" && r !== null && !Array.isArray(r))) {
|
|
73
|
+
const r = {};
|
|
74
|
+
for (const s of t) {
|
|
75
|
+
const i = s;
|
|
76
|
+
for (const l in i)
|
|
77
|
+
if (Object.prototype.hasOwnProperty.call(i, l)) {
|
|
78
|
+
const a = i[l];
|
|
79
|
+
if (Object.prototype.hasOwnProperty.call(r, l)) {
|
|
80
|
+
const c = r[l];
|
|
81
|
+
typeof a == "object" && a !== null && typeof c == "object" && c !== null ? Array.isArray(a) && Array.isArray(c) ? r[l] = c.concat(a) : !Array.isArray(a) && !Array.isArray(c) ? r[l] = y(
|
|
86
82
|
c,
|
|
87
|
-
|
|
88
|
-
) :
|
|
83
|
+
a
|
|
84
|
+
) : r[l] = a : r[l] = a;
|
|
89
85
|
} else
|
|
90
|
-
|
|
86
|
+
r[l] = a;
|
|
91
87
|
}
|
|
92
88
|
}
|
|
93
|
-
return
|
|
89
|
+
return r;
|
|
94
90
|
}
|
|
95
|
-
if (
|
|
91
|
+
if (t.every((r) => typeof r != "object" || r === null))
|
|
96
92
|
throw new Error(
|
|
97
93
|
"deepMerge: Cannot merge primitive values. All arguments must be objects or arrays."
|
|
98
94
|
);
|
|
99
|
-
const n =
|
|
100
|
-
(
|
|
95
|
+
const n = t.some(Array.isArray), o = t.some(
|
|
96
|
+
(r) => typeof r == "object" && r !== null && !Array.isArray(r)
|
|
101
97
|
);
|
|
102
98
|
throw n && o ? new Error(
|
|
103
99
|
"deepMerge: Cannot mix arrays and objects. All arguments must be either arrays or objects."
|
|
@@ -105,34 +101,34 @@ function h(...e) {
|
|
|
105
101
|
"deepMerge: Invalid arguments provided. All arguments must be objects or arrays of the same type."
|
|
106
102
|
);
|
|
107
103
|
}
|
|
108
|
-
function
|
|
104
|
+
function h(e) {
|
|
109
105
|
if (!e || typeof e != "object")
|
|
110
106
|
return e;
|
|
111
|
-
const
|
|
112
|
-
function n(o,
|
|
107
|
+
const t = {};
|
|
108
|
+
function n(o, r) {
|
|
113
109
|
for (const s in o) {
|
|
114
110
|
if (!Object.prototype.hasOwnProperty.call(o, s))
|
|
115
111
|
continue;
|
|
116
|
-
const
|
|
117
|
-
if (
|
|
118
|
-
let
|
|
119
|
-
for (const c in
|
|
120
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
121
|
-
|
|
112
|
+
const i = o[s], l = r ? `${r}.${s}` : s;
|
|
113
|
+
if (i && typeof i == "object" && !Array.isArray(i)) {
|
|
114
|
+
let a = !1;
|
|
115
|
+
for (const c in i)
|
|
116
|
+
if (Object.prototype.hasOwnProperty.call(i, c) && c.startsWith("$")) {
|
|
117
|
+
a = !0;
|
|
122
118
|
break;
|
|
123
119
|
}
|
|
124
|
-
|
|
120
|
+
a ? t[l] = i : n(i, l);
|
|
125
121
|
} else
|
|
126
|
-
|
|
122
|
+
t[l] = i;
|
|
127
123
|
}
|
|
128
124
|
}
|
|
129
|
-
return n(e, ""),
|
|
125
|
+
return n(e, ""), t;
|
|
130
126
|
}
|
|
131
127
|
export {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
128
|
+
u as deepClone,
|
|
129
|
+
y as deepMerge,
|
|
130
|
+
A as getNestedValue,
|
|
131
|
+
p as isJSON,
|
|
132
|
+
h as normalizeMongoFilter,
|
|
133
|
+
g as setNestedValue
|
|
138
134
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./string.util.cjs");exports.generateRandomPassword=e.generateRandomPassword;exports.generateShortId=e.generateShortId;exports.generateSlug=e.generateSlug;exports.getFileName=e.getFileName;exports.substringBetween=e.substringBetween;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./string.util.cjs");exports.generateRandomPassword=e.generateRandomPassword;exports.generateRandomString=e.generateRandomString;exports.generateShortId=e.generateShortId;exports.generateSlug=e.generateSlug;exports.getFileName=e.getFileName;exports.substringBetween=e.substringBetween;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { generateRandomPassword as t, generateShortId as a, generateSlug as g, getFileName as
|
|
1
|
+
import { generateRandomPassword as t, generateRandomString as n, generateShortId as a, generateSlug as g, getFileName as o, substringBetween as d } from "./string.util.js";
|
|
2
2
|
export {
|
|
3
3
|
t as generateRandomPassword,
|
|
4
|
+
n as generateRandomString,
|
|
4
5
|
a as generateShortId,
|
|
5
6
|
g as generateSlug,
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
o as getFileName,
|
|
8
|
+
d as substringBetween
|
|
8
9
|
};
|