@ya-accelerators/nextjs-framework 0.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/@types/general.d.ts +1 -0
- package/@types/image.d.ts +8 -0
- package/@types/next-auth.d.ts +18 -0
- package/dist/env.client.d.ts +3 -0
- package/dist/env.client.js +9 -0
- package/dist/env.client.js.map +1 -0
- package/dist/env.d.ts +6 -0
- package/dist/env.js +18 -0
- package/dist/env.js.map +1 -0
- package/dist/hooks/date/index.d.ts +11 -0
- package/dist/hooks/date/index.js +14 -0
- package/dist/hooks/date/index.js.map +1 -0
- package/dist/hooks/dispatch/index.d.ts +9 -0
- package/dist/hooks/dispatch/index.jsx +25 -0
- package/dist/hooks/dispatch/index.jsx.map +1 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.js +7 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/loading/index.d.ts +10 -0
- package/dist/hooks/loading/index.jsx +22 -0
- package/dist/hooks/loading/index.jsx.map +1 -0
- package/dist/hooks/localStorage/index.d.ts +1 -0
- package/dist/hooks/localStorage/index.js +53 -0
- package/dist/hooks/localStorage/index.js.map +1 -0
- package/dist/hooks/modal/index.d.ts +26 -0
- package/dist/hooks/modal/index.jsx +63 -0
- package/dist/hooks/modal/index.jsx.map +1 -0
- package/dist/hooks/toast/index.d.ts +15 -0
- package/dist/hooks/toast/index.jsx +39 -0
- package/dist/hooks/toast/index.jsx.map +1 -0
- package/dist/i18n/index.d.ts +3 -0
- package/dist/i18n/index.js +40 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/strings/en-US.json +18 -0
- package/dist/i18n/strings/ja-JP.json +37 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/cookie/index.d.ts +9 -0
- package/dist/lib/cookie/index.js +66 -0
- package/dist/lib/cookie/index.js.map +1 -0
- package/dist/lib/index.d.ts +10 -0
- package/dist/lib/index.js +11 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/next-auth/index.d.ts +2 -0
- package/dist/lib/next-auth/index.js +62 -0
- package/dist/lib/next-auth/index.js.map +1 -0
- package/dist/lib/s3/index.d.ts +2 -0
- package/dist/lib/s3/index.js +17 -0
- package/dist/lib/s3/index.js.map +1 -0
- package/dist/lib/trpc/index.d.ts +8 -0
- package/dist/lib/trpc/index.js +32 -0
- package/dist/lib/trpc/index.js.map +1 -0
- package/dist/styles/globals.css +26 -0
- package/dist/styles/tailwind.config.d.ts +577 -0
- package/dist/styles/tailwind.config.js +671 -0
- package/dist/styles/tailwind.config.js.map +1 -0
- package/dist/styles/tailwind.config.ts +672 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/ui/component/button/base.d.ts +27 -0
- package/dist/ui/component/button/base.jsx +54 -0
- package/dist/ui/component/button/base.jsx.map +1 -0
- package/dist/ui/component/button/colored/index.d.ts +11 -0
- package/dist/ui/component/button/colored/index.jsx +7 -0
- package/dist/ui/component/button/colored/index.jsx.map +1 -0
- package/dist/ui/component/button/image/index.d.ts +4 -0
- package/dist/ui/component/button/image/index.jsx +5 -0
- package/dist/ui/component/button/image/index.jsx.map +1 -0
- package/dist/ui/component/button/index.d.ts +18 -0
- package/dist/ui/component/button/index.jsx +25 -0
- package/dist/ui/component/button/index.jsx.map +1 -0
- package/dist/ui/component/button/text/index.d.ts +11 -0
- package/dist/ui/component/button/text/index.jsx +8 -0
- package/dist/ui/component/button/text/index.jsx.map +1 -0
- package/dist/ui/component/card/index.d.ts +12 -0
- package/dist/ui/component/card/index.jsx +20 -0
- package/dist/ui/component/card/index.jsx.map +1 -0
- package/dist/ui/component/icon/index.d.ts +7 -0
- package/dist/ui/component/icon/index.jsx +3 -0
- package/dist/ui/component/icon/index.jsx.map +1 -0
- package/dist/ui/component/index.d.ts +95 -0
- package/dist/ui/component/index.js +15 -0
- package/dist/ui/component/index.js.map +1 -0
- package/dist/ui/component/loading/index.d.ts +5 -0
- package/dist/ui/component/loading/index.jsx +27 -0
- package/dist/ui/component/loading/index.jsx.map +1 -0
- package/dist/ui/component/ssr/index.d.ts +5 -0
- package/dist/ui/component/ssr/index.jsx +11 -0
- package/dist/ui/component/ssr/index.jsx.map +1 -0
- package/dist/ui/component/typography/H1/index.d.ts +7 -0
- package/dist/ui/component/typography/H1/index.jsx +13 -0
- package/dist/ui/component/typography/H1/index.jsx.map +1 -0
- package/dist/ui/component/typography/H2/index.d.ts +7 -0
- package/dist/ui/component/typography/H2/index.jsx +13 -0
- package/dist/ui/component/typography/H2/index.jsx.map +1 -0
- package/dist/ui/component/typography/H3/index.d.ts +7 -0
- package/dist/ui/component/typography/H3/index.jsx +13 -0
- package/dist/ui/component/typography/H3/index.jsx.map +1 -0
- package/dist/ui/component/typography/H4/index.d.ts +7 -0
- package/dist/ui/component/typography/H4/index.jsx +13 -0
- package/dist/ui/component/typography/H4/index.jsx.map +1 -0
- package/dist/ui/component/typography/H5/index.d.ts +7 -0
- package/dist/ui/component/typography/H5/index.jsx +13 -0
- package/dist/ui/component/typography/H5/index.jsx.map +1 -0
- package/dist/ui/component/typography/H6/index.d.ts +7 -0
- package/dist/ui/component/typography/H6/index.jsx +13 -0
- package/dist/ui/component/typography/H6/index.jsx.map +1 -0
- package/dist/ui/component/typography/Label/index.d.ts +7 -0
- package/dist/ui/component/typography/Label/index.jsx +13 -0
- package/dist/ui/component/typography/Label/index.jsx.map +1 -0
- package/dist/ui/component/typography/LinkText/index.d.ts +8 -0
- package/dist/ui/component/typography/LinkText/index.jsx +14 -0
- package/dist/ui/component/typography/LinkText/index.jsx.map +1 -0
- package/dist/ui/component/typography/P/index.d.ts +7 -0
- package/dist/ui/component/typography/P/index.jsx +13 -0
- package/dist/ui/component/typography/P/index.jsx.map +1 -0
- package/dist/ui/component/typography/Pre/index.d.ts +7 -0
- package/dist/ui/component/typography/Pre/index.jsx +13 -0
- package/dist/ui/component/typography/Pre/index.jsx.map +1 -0
- package/dist/ui/component/typography/index.d.ts +54 -0
- package/dist/ui/component/typography/index.jsx +23 -0
- package/dist/ui/component/typography/index.jsx.map +1 -0
- package/dist/ui/composite/button/index.d.ts +8 -0
- package/dist/ui/composite/button/index.jsx +45 -0
- package/dist/ui/composite/button/index.jsx.map +1 -0
- package/dist/ui/composite/dropdown/index.d.ts +12 -0
- package/dist/ui/composite/dropdown/index.jsx +102 -0
- package/dist/ui/composite/dropdown/index.jsx.map +1 -0
- package/dist/ui/composite/index.d.ts +342 -0
- package/dist/ui/composite/index.js +13 -0
- package/dist/ui/composite/index.js.map +1 -0
- package/dist/ui/composite/input/address/index.d.ts +33 -0
- package/dist/ui/composite/input/address/index.jsx +132 -0
- package/dist/ui/composite/input/address/index.jsx.map +1 -0
- package/dist/ui/composite/input/address/map.d.ts +64 -0
- package/dist/ui/composite/input/address/map.jsx +111 -0
- package/dist/ui/composite/input/address/map.jsx.map +1 -0
- package/dist/ui/composite/input/address/utils.d.ts +23 -0
- package/dist/ui/composite/input/address/utils.js +63 -0
- package/dist/ui/composite/input/address/utils.js.map +1 -0
- package/dist/ui/composite/input/checkbox/index.d.ts +22 -0
- package/dist/ui/composite/input/checkbox/index.jsx +38 -0
- package/dist/ui/composite/input/checkbox/index.jsx.map +1 -0
- package/dist/ui/composite/input/datePicker/index.d.ts +19 -0
- package/dist/ui/composite/input/datePicker/index.jsx +100 -0
- package/dist/ui/composite/input/datePicker/index.jsx.map +1 -0
- package/dist/ui/composite/input/dateRange/index.d.ts +14 -0
- package/dist/ui/composite/input/dateRange/index.jsx +46 -0
- package/dist/ui/composite/input/dateRange/index.jsx.map +1 -0
- package/dist/ui/composite/input/dateTimePicker/index.d.ts +15 -0
- package/dist/ui/composite/input/dateTimePicker/index.jsx +74 -0
- package/dist/ui/composite/input/dateTimePicker/index.jsx.map +1 -0
- package/dist/ui/composite/input/dateTimeRange/index.d.ts +14 -0
- package/dist/ui/composite/input/dateTimeRange/index.jsx +88 -0
- package/dist/ui/composite/input/dateTimeRange/index.jsx.map +1 -0
- package/dist/ui/composite/input/index.d.ts +216 -0
- package/dist/ui/composite/input/index.js +35 -0
- package/dist/ui/composite/input/index.js.map +1 -0
- package/dist/ui/composite/input/list/index.d.ts +20 -0
- package/dist/ui/composite/input/list/index.jsx +30 -0
- package/dist/ui/composite/input/list/index.jsx.map +1 -0
- package/dist/ui/composite/input/radio/index.d.ts +14 -0
- package/dist/ui/composite/input/radio/index.jsx +34 -0
- package/dist/ui/composite/input/radio/index.jsx.map +1 -0
- package/dist/ui/composite/input/search/index.d.ts +5 -0
- package/dist/ui/composite/input/search/index.jsx +38 -0
- package/dist/ui/composite/input/search/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/ClearIndicator/index.d.ts +4 -0
- package/dist/ui/composite/input/select/ClearIndicator/index.jsx +8 -0
- package/dist/ui/composite/input/select/ClearIndicator/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/Control/index.d.ts +4 -0
- package/dist/ui/composite/input/select/Control/index.jsx +23 -0
- package/dist/ui/composite/input/select/Control/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/DropdownIndicator/index.d.ts +4 -0
- package/dist/ui/composite/input/select/DropdownIndicator/index.jsx +8 -0
- package/dist/ui/composite/input/select/DropdownIndicator/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/GroupHeading/index.d.ts +4 -0
- package/dist/ui/composite/input/select/GroupHeading/index.jsx +9 -0
- package/dist/ui/composite/input/select/GroupHeading/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/Input/index.d.ts +4 -0
- package/dist/ui/composite/input/select/Input/index.jsx +7 -0
- package/dist/ui/composite/input/select/Input/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/Menu/index.d.ts +4 -0
- package/dist/ui/composite/input/select/Menu/index.jsx +19 -0
- package/dist/ui/composite/input/select/Menu/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/MultiValue/index.d.ts +4 -0
- package/dist/ui/composite/input/select/MultiValue/index.jsx +15 -0
- package/dist/ui/composite/input/select/MultiValue/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/Option/index.d.ts +4 -0
- package/dist/ui/composite/input/select/Option/index.jsx +79 -0
- package/dist/ui/composite/input/select/Option/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/Placeholder/index.d.ts +4 -0
- package/dist/ui/composite/input/select/Placeholder/index.jsx +7 -0
- package/dist/ui/composite/input/select/Placeholder/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/SelectContainer/index.d.ts +4 -0
- package/dist/ui/composite/input/select/SelectContainer/index.jsx +40 -0
- package/dist/ui/composite/input/select/SelectContainer/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/SingleValue/index.d.ts +4 -0
- package/dist/ui/composite/input/select/SingleValue/index.jsx +17 -0
- package/dist/ui/composite/input/select/SingleValue/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/index.d.ts +37 -0
- package/dist/ui/composite/input/select/index.jsx +242 -0
- package/dist/ui/composite/input/select/index.jsx.map +1 -0
- package/dist/ui/composite/input/select/types.d.ts +16 -0
- package/dist/ui/composite/input/select/types.js +6 -0
- package/dist/ui/composite/input/select/types.js.map +1 -0
- package/dist/ui/composite/input/text/index.d.ts +15 -0
- package/dist/ui/composite/input/text/index.jsx +40 -0
- package/dist/ui/composite/input/text/index.jsx.map +1 -0
- package/dist/ui/composite/input/textarea/index.d.ts +11 -0
- package/dist/ui/composite/input/textarea/index.jsx +62 -0
- package/dist/ui/composite/input/textarea/index.jsx.map +1 -0
- package/dist/ui/composite/input/timePicker/index.d.ts +13 -0
- package/dist/ui/composite/input/timePicker/index.jsx +36 -0
- package/dist/ui/composite/input/timePicker/index.jsx.map +1 -0
- package/dist/ui/composite/input/timeRange/index.d.ts +16 -0
- package/dist/ui/composite/input/timeRange/index.jsx +54 -0
- package/dist/ui/composite/input/timeRange/index.jsx.map +1 -0
- package/dist/ui/composite/input/weekDaysSelector/index.d.ts +11 -0
- package/dist/ui/composite/input/weekDaysSelector/index.jsx +39 -0
- package/dist/ui/composite/input/weekDaysSelector/index.jsx.map +1 -0
- package/dist/ui/composite/input/weekdayPicker/index.d.ts +13 -0
- package/dist/ui/composite/input/weekdayPicker/index.jsx +49 -0
- package/dist/ui/composite/input/weekdayPicker/index.jsx.map +1 -0
- package/dist/ui/composite/label/index.d.ts +11 -0
- package/dist/ui/composite/label/index.jsx +18 -0
- package/dist/ui/composite/label/index.jsx.map +1 -0
- package/dist/ui/composite/pageTitle/index.d.ts +18 -0
- package/dist/ui/composite/pageTitle/index.jsx +62 -0
- package/dist/ui/composite/pageTitle/index.jsx.map +1 -0
- package/dist/ui/functional/index.d.ts +10 -0
- package/dist/ui/functional/index.js +9 -0
- package/dist/ui/functional/index.js.map +1 -0
- package/dist/ui/functional/notFound/index.d.ts +1 -0
- package/dist/ui/functional/notFound/index.jsx +13 -0
- package/dist/ui/functional/notFound/index.jsx.map +1 -0
- package/dist/ui/functional/signInForm/index.d.ts +4 -0
- package/dist/ui/functional/signInForm/index.jsx +45 -0
- package/dist/ui/functional/signInForm/index.jsx.map +1 -0
- package/dist/ui/functional/signOutForm/index.d.ts +3 -0
- package/dist/ui/functional/signOutForm/index.jsx +29 -0
- package/dist/ui/functional/signOutForm/index.jsx.map +1 -0
- package/dist/ui/index.d.ts +6 -0
- package/dist/ui/index.js +7 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/layout/app/component.d.ts +59 -0
- package/dist/ui/layout/app/component.jsx +224 -0
- package/dist/ui/layout/app/component.jsx.map +1 -0
- package/dist/ui/layout/app/content/index.d.ts +9 -0
- package/dist/ui/layout/app/content/index.jsx +18 -0
- package/dist/ui/layout/app/content/index.jsx.map +1 -0
- package/dist/ui/layout/app/index.d.ts +18 -0
- package/dist/ui/layout/app/index.jsx +40 -0
- package/dist/ui/layout/app/index.jsx.map +1 -0
- package/dist/ui/layout/form/index.d.ts +68 -0
- package/dist/ui/layout/form/index.jsx +558 -0
- package/dist/ui/layout/form/index.jsx.map +1 -0
- package/dist/ui/layout/index.d.ts +356 -0
- package/dist/ui/layout/index.js +19 -0
- package/dist/ui/layout/index.js.map +1 -0
- package/dist/ui/layout/modal/index.d.ts +7 -0
- package/dist/ui/layout/modal/index.jsx +11 -0
- package/dist/ui/layout/modal/index.jsx.map +1 -0
- package/dist/ui/layout/object/index.d.ts +30 -0
- package/dist/ui/layout/object/index.jsx +145 -0
- package/dist/ui/layout/object/index.jsx.map +1 -0
- package/dist/ui/layout/root/index.d.ts +10 -0
- package/dist/ui/layout/root/index.jsx +31 -0
- package/dist/ui/layout/root/index.jsx.map +1 -0
- package/dist/ui/layout/root/provider/index.d.ts +7 -0
- package/dist/ui/layout/root/provider/index.jsx +26 -0
- package/dist/ui/layout/root/provider/index.jsx.map +1 -0
- package/dist/ui/layout/tab/component.d.ts +4 -0
- package/dist/ui/layout/tab/component.jsx +16 -0
- package/dist/ui/layout/tab/component.jsx.map +1 -0
- package/dist/ui/layout/tab/content/index.d.ts +8 -0
- package/dist/ui/layout/tab/content/index.jsx +8 -0
- package/dist/ui/layout/tab/content/index.jsx.map +1 -0
- package/dist/ui/layout/tab/index.d.ts +11 -0
- package/dist/ui/layout/tab/index.jsx +25 -0
- package/dist/ui/layout/tab/index.jsx.map +1 -0
- package/dist/ui/layout/table/index.d.ts +33 -0
- package/dist/ui/layout/table/index.jsx +283 -0
- package/dist/ui/layout/table/index.jsx.map +1 -0
- package/dist/ui/layout/toast/index.d.ts +7 -0
- package/dist/ui/layout/toast/index.jsx +18 -0
- package/dist/ui/layout/toast/index.jsx.map +1 -0
- package/dist/ui/theme/border/index.d.ts +28 -0
- package/dist/ui/theme/border/index.js +67 -0
- package/dist/ui/theme/border/index.js.map +1 -0
- package/dist/ui/theme/color/index.d.ts +32 -0
- package/dist/ui/theme/color/index.js +106 -0
- package/dist/ui/theme/color/index.js.map +1 -0
- package/dist/ui/theme/index.d.ts +4 -0
- package/dist/ui/theme/index.js +5 -0
- package/dist/ui/theme/index.js.map +1 -0
- package/dist/ui/theme/rounded/index.d.ts +9 -0
- package/dist/ui/theme/rounded/index.js +14 -0
- package/dist/ui/theme/rounded/index.js.map +1 -0
- package/dist/ui/theme/size/index.d.ts +15 -0
- package/dist/ui/theme/size/index.js +55 -0
- package/dist/ui/theme/size/index.js.map +1 -0
- package/dist/ui/types/index.d.ts +113 -0
- package/dist/ui/types/index.js +33 -0
- package/dist/ui/types/index.js.map +1 -0
- package/dist/util/client.d.ts +2 -0
- package/dist/util/client.js +4 -0
- package/dist/util/client.js.map +1 -0
- package/dist/util/date/impl.d.ts +7 -0
- package/dist/util/date/impl.js +22 -0
- package/dist/util/date/impl.js.map +1 -0
- package/dist/util/date/index.d.ts +17 -0
- package/dist/util/date/index.js +16 -0
- package/dist/util/date/index.js.map +1 -0
- package/dist/util/index.d.ts +17 -0
- package/dist/util/index.js +143 -0
- package/dist/util/index.js.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import * as client from './client';
|
|
2
|
+
export * from './date';
|
|
3
|
+
export const Util = {
|
|
4
|
+
isArray: (maybeArray) => Array.isArray(maybeArray),
|
|
5
|
+
isObject: (arg) => typeof arg === typeof Object,
|
|
6
|
+
isString: (arg) => typeof arg === 'string',
|
|
7
|
+
normalize: (value) => value.trim().toLowerCase(),
|
|
8
|
+
sanitize: (input, options) => {
|
|
9
|
+
const DEFAULT_SANITIZE_KEYWORDS = [
|
|
10
|
+
'authorization',
|
|
11
|
+
'proxy-authorization',
|
|
12
|
+
'cookie',
|
|
13
|
+
'set-cookie',
|
|
14
|
+
'x-api-key',
|
|
15
|
+
'apikey',
|
|
16
|
+
'api_key',
|
|
17
|
+
'token',
|
|
18
|
+
'secret',
|
|
19
|
+
'password',
|
|
20
|
+
'passwd',
|
|
21
|
+
'signature',
|
|
22
|
+
'private',
|
|
23
|
+
'session',
|
|
24
|
+
'jwt',
|
|
25
|
+
'bearer',
|
|
26
|
+
];
|
|
27
|
+
const normalizeKey = (k) => k.trim().toLowerCase();
|
|
28
|
+
const shouldRedactKey = (key, keywords) => keywords.some((kw) => normalizeKey(key) === kw || normalizeKey(key).includes(kw));
|
|
29
|
+
const maybeTruncate = (s, max) => !max || max <= 0 ? s : s.length <= max ? s : `${s.slice(0, max)}...<truncated>`;
|
|
30
|
+
const toJsonLike = (v) => {
|
|
31
|
+
if (v === null)
|
|
32
|
+
return null;
|
|
33
|
+
if (v === undefined)
|
|
34
|
+
return undefined;
|
|
35
|
+
if (v instanceof Date)
|
|
36
|
+
return v.toISOString();
|
|
37
|
+
if (typeof v === 'bigint')
|
|
38
|
+
return v.toString();
|
|
39
|
+
if (v instanceof Uint8Array)
|
|
40
|
+
return `Uint8Array(${v.byteLength})`;
|
|
41
|
+
if (typeof v === 'string')
|
|
42
|
+
return v;
|
|
43
|
+
if (typeof v === 'number')
|
|
44
|
+
return Number.isFinite(v) ? v : String(v);
|
|
45
|
+
if (typeof v === 'boolean')
|
|
46
|
+
return v;
|
|
47
|
+
if (Array.isArray(v))
|
|
48
|
+
return v.map((x) => toJsonLike(x));
|
|
49
|
+
if (typeof v === 'object') {
|
|
50
|
+
const out = {};
|
|
51
|
+
for (const [k, vv] of Object.entries(v)) {
|
|
52
|
+
out[k] = toJsonLike(vv);
|
|
53
|
+
}
|
|
54
|
+
return out;
|
|
55
|
+
}
|
|
56
|
+
return String(v);
|
|
57
|
+
};
|
|
58
|
+
const maskInText = (text) => text
|
|
59
|
+
// password: "xxx"
|
|
60
|
+
.replace(/(\bpassword\b\s*:\s*)"(?:[^"\\]|\\.)*"/gi, '$1"***"')
|
|
61
|
+
.replace(/(\bpasswd\b\s*:\s*)"(?:[^"\\]|\\.)*"/gi, '$1"***"')
|
|
62
|
+
// authorization: "Bearer xxx"
|
|
63
|
+
.replace(/(\bauthorization\b\s*:\s*)"(?:[^"\\]|\\.)*"/gi, '$1"***"')
|
|
64
|
+
.replace(/(\bproxy-authorization\b\s*:\s*)"(?:[^"\\]|\\.)*"/gi, '$1"***"')
|
|
65
|
+
// cookie / set-cookie
|
|
66
|
+
.replace(/(\bcookie\b\s*:\s*)"(?:[^"\\]|\\.)*"/gi, '$1"***"')
|
|
67
|
+
.replace(/(\bset-cookie\b\s*:\s*)"(?:[^"\\]|\\.)*"/gi, '$1"***"')
|
|
68
|
+
// token / secret
|
|
69
|
+
.replace(/(\btoken\b\s*:\s*)"(?:[^"\\]|\\.)*"/gi, '$1"***"')
|
|
70
|
+
.replace(/(\bsecret\b\s*:\s*)"(?:[^"\\]|\\.)*"/gi, '$1"***"');
|
|
71
|
+
const keywords = options?.keywords ?? DEFAULT_SANITIZE_KEYWORDS;
|
|
72
|
+
const maxStringLength = options?.maxStringLength;
|
|
73
|
+
const seen = new WeakSet();
|
|
74
|
+
const walk = (value, keyHint) => {
|
|
75
|
+
if (value === null)
|
|
76
|
+
return null;
|
|
77
|
+
if (value === undefined)
|
|
78
|
+
return undefined;
|
|
79
|
+
if (typeof value === 'object') {
|
|
80
|
+
if (seen.has(value)) {
|
|
81
|
+
return '[Circular]';
|
|
82
|
+
}
|
|
83
|
+
seen.add(value);
|
|
84
|
+
}
|
|
85
|
+
if (typeof value === 'string') {
|
|
86
|
+
const maskedText = maskInText(value);
|
|
87
|
+
if (keyHint && shouldRedactKey(keyHint, keywords)) {
|
|
88
|
+
return '***';
|
|
89
|
+
}
|
|
90
|
+
return maybeTruncate(maskedText, maxStringLength);
|
|
91
|
+
}
|
|
92
|
+
if (typeof value === 'number')
|
|
93
|
+
return Number.isFinite(value) ? value : String(value);
|
|
94
|
+
if (typeof value === 'boolean')
|
|
95
|
+
return value;
|
|
96
|
+
if (Array.isArray(value)) {
|
|
97
|
+
return value.map((v) => walk(v));
|
|
98
|
+
}
|
|
99
|
+
if (typeof value === 'object') {
|
|
100
|
+
const out = {};
|
|
101
|
+
for (const [k, v] of Object.entries(value)) {
|
|
102
|
+
const nk = normalizeKey(k);
|
|
103
|
+
if (shouldRedactKey(k, keywords)) {
|
|
104
|
+
out[nk] = '***';
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
out[nk] = walk(v, k);
|
|
108
|
+
}
|
|
109
|
+
return out;
|
|
110
|
+
}
|
|
111
|
+
return String(value);
|
|
112
|
+
};
|
|
113
|
+
return walk(toJsonLike(input));
|
|
114
|
+
},
|
|
115
|
+
createEnvProxy: ((isServer, schema, parseEnv, _omitKeys, extend) => {
|
|
116
|
+
let cachedEnv = null;
|
|
117
|
+
let cachedExtend = null;
|
|
118
|
+
return new Proxy({}, {
|
|
119
|
+
get: (_target, prop) => {
|
|
120
|
+
if (isServer) {
|
|
121
|
+
if (typeof window !== 'undefined') {
|
|
122
|
+
throw new Error('serverEnv is only available on the server');
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
if (typeof window === 'undefined') {
|
|
127
|
+
throw new Error('clientEnv is only available on the client');
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
const env = (cachedEnv ??= schema.parse(parseEnv()));
|
|
131
|
+
if (extend) {
|
|
132
|
+
cachedExtend ??= extend(env);
|
|
133
|
+
const extended = cachedExtend;
|
|
134
|
+
if (prop in extended)
|
|
135
|
+
return extended[prop];
|
|
136
|
+
}
|
|
137
|
+
return env[prop];
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
}),
|
|
141
|
+
...client,
|
|
142
|
+
};
|
|
143
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/util/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAA;AAElC,cAAc,QAAQ,CAAA;AAEtB,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,CAAI,UAA4B,EAAqB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC;IAC1F,QAAQ,EAAE,CAAC,GAAY,EAAE,EAAE,CAAC,OAAO,GAAG,KAAK,OAAO,MAAM;IACxD,QAAQ,EAAE,CA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AW,EAAE,CAAC;wBAClC,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAA;oBAC9D,CAAC;gBACH,CAAC;qBAAM,CAAC;oBACN,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;wBAClC,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAA;oBAC9D,CAAC;gBACH,CAAC;gBACD,MAAM,GAAG,GAAG,CAAC,SAAS,KAAK,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAqB,CAAC,CAAA;gBACxE,IAAI,MAAM,EAAE,CAAC;oBACX,YAAY,KAAK,MAAM,CAAC,GAAG,CAAwB,CAAA;oBACnD,MAAM,QAAQ,GAAG,YAAgD,CAAA;oBACjE,IAAI,IAAI,IAAI,QAAQ;wBAAE,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAA;gBAC7C,CAAC;gBACD,OAAO,GAAG,CAAC,IAA8B,CAAC,CAAA;YAC5C,CAAC;SACF,CACF,CAAA;IACH,CAAC,CAkBA;IACD,GAAG,MAAM;CACV,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ya-accelerators/nextjs-framework",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "",
|
|
6
|
+
"author": "YA Holdings OÜ",
|
|
7
|
+
"license": "Apache-2.0",
|
|
8
|
+
"keywords": [],
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"module": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/ya-holdings/web-development-base.git",
|
|
15
|
+
"directory": "frontend/packages/nextjs-framework"
|
|
16
|
+
},
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public",
|
|
19
|
+
"registry": "https://registry.npmjs.org"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"@types",
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"setup": "pnpm run build",
|
|
27
|
+
"build": "tsc --declaration && pnpm run move-dist && pnpm run copy-files",
|
|
28
|
+
"move-dist": "cp -r dist/src/* dist/ 2>/dev/null || true && rm -rf dist/src 2>/dev/null || true",
|
|
29
|
+
"copy-files": "copyfiles -u 1 styles/**/* dist/styles && copyfiles -u 3 src/i18n/strings/**/* dist/i18n/strings",
|
|
30
|
+
"dev": "nodemon",
|
|
31
|
+
"lint": "run-p -l -c lint:*",
|
|
32
|
+
"lint:tsc": "tsc --pretty --noEmit --incremental false",
|
|
33
|
+
"lint:eslint": "eslint .",
|
|
34
|
+
"lint:prettier": "prettier --check --config ../../.prettierrc.mjs --ignore-path ../../../.gitignore .",
|
|
35
|
+
"fix": "run-p -l -c fix:*",
|
|
36
|
+
"fix:eslint": "eslint . --fix",
|
|
37
|
+
"fix:prettier": "prettier --write --config ../../.prettierrc.mjs --ignore-path ../../../.gitignore .",
|
|
38
|
+
"test": "jest"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@aws-sdk/client-s3": "^3.1028.0",
|
|
42
|
+
"@dnd-kit/core": "^6.3.1",
|
|
43
|
+
"@dnd-kit/modifiers": "^9.0.0",
|
|
44
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
45
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
46
|
+
"@emotion/react": "^11.14.0",
|
|
47
|
+
"@emotion/styled": "^11.14.1",
|
|
48
|
+
"@svgr/webpack": "^8.1.0",
|
|
49
|
+
"@tanstack/react-table": "^8.21.3",
|
|
50
|
+
"date-fns": "^4.1.0",
|
|
51
|
+
"framer-motion": "^12.38.0",
|
|
52
|
+
"next-client-cookies": "^2.1.1",
|
|
53
|
+
"nextjs-toploader": "^3.9.17",
|
|
54
|
+
"parse-nested-form-data": "^1.0.0",
|
|
55
|
+
"react-datepicker": "^9.1.0",
|
|
56
|
+
"react-select": "^5.10.2"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"copyfiles": "^2.4.1",
|
|
60
|
+
"nodemon": "^3.1.14"
|
|
61
|
+
}
|
|
62
|
+
}
|