@cyberskill/shared 1.28.0 → 1.30.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/LICENSE +22 -0
- package/README.md +22 -0
- package/dist/commands.cjs +1 -1
- package/dist/commands.js +1 -1
- package/dist/configs/graphql/graphql-codegen.d.cts +1 -3
- package/dist/configs/graphql/graphql-codegen.d.ts +1 -3
- package/dist/configs/graphql/index.d.cts +1 -3
- package/dist/configs/graphql/index.d.ts +1 -3
- package/dist/configs/index.cjs +1 -1
- package/dist/configs/index.js +1 -1
- package/dist/configs/vitest/react/e2e.cjs +1 -1
- package/dist/configs/vitest/react/e2e.d.cts +2 -3
- package/dist/configs/vitest/react/e2e.d.ts +2 -3
- package/dist/configs/vitest/react/e2e.js +1 -1
- package/dist/configs/vitest/react/unit.cjs +1 -1
- package/dist/configs/vitest/react/unit.d.cts +2 -3
- package/dist/configs/vitest/react/unit.d.ts +2 -3
- package/dist/configs/vitest/react/unit.js +1 -1
- package/dist/contexts/react/index.d.cts +0 -1
- package/dist/contexts/react/index.d.ts +0 -1
- package/dist/contexts/react/loading.d.cts +0 -1
- package/dist/contexts/react/loading.d.ts +0 -1
- package/dist/controllers/index.cjs +1 -1
- package/dist/controllers/index.js +1 -1
- package/dist/controllers/mongo-migration.cjs +1 -1
- package/dist/controllers/mongo-migration.js +1 -1
- package/dist/controllers/mongoose.cjs +1 -1
- package/dist/controllers/mongoose.js +1 -1
- package/dist/hocs/react/index.cjs +1 -1
- package/dist/hocs/react/index.d.cts +0 -1
- package/dist/hocs/react/index.d.ts +0 -1
- package/dist/hocs/react/index.js +1 -1
- package/dist/hocs/react/next-intl.cjs +1 -1
- package/dist/hocs/react/next-intl.d.cts +0 -1
- package/dist/hocs/react/next-intl.d.ts +0 -1
- package/dist/hocs/react/next-intl.js +1 -1
- package/dist/hooks/react/index.cjs +1 -1
- package/dist/hooks/react/index.d.cts +3 -3
- package/dist/hooks/react/index.d.ts +3 -3
- package/dist/hooks/react/index.js +1 -1
- package/dist/hooks/react/use-loading.d.cts +0 -1
- package/dist/hooks/react/use-loading.d.ts +0 -1
- package/dist/hooks/react/use-next-intl.cjs +1 -1
- package/dist/hooks/react/use-next-intl.d.cts +4 -2
- package/dist/hooks/react/use-next-intl.d.ts +4 -2
- package/dist/hooks/react/use-next-intl.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +17 -13
- package/dist/index.d.ts +17 -13
- package/dist/index.js +1 -1
- package/dist/providers/react/apollo-client.cjs +1 -1
- package/dist/providers/react/apollo-client.d.cts +3 -5
- package/dist/providers/react/apollo-client.d.ts +3 -5
- package/dist/providers/react/apollo-client.js +1 -1
- package/dist/providers/react/index.cjs +1 -1
- package/dist/providers/react/index.d.cts +2 -1
- package/dist/providers/react/index.d.ts +2 -1
- package/dist/providers/react/index.js +1 -1
- package/dist/providers/react/loading.d.cts +0 -1
- package/dist/providers/react/loading.d.ts +0 -1
- package/dist/providers/react/next-intl.cjs +1 -1
- package/dist/providers/react/next-intl.d.cts +0 -1
- package/dist/providers/react/next-intl.d.ts +0 -1
- package/dist/providers/react/next-intl.js +1 -1
- package/dist/styles/reset.css +63 -0
- package/dist/styles/reset.d.cts +2 -0
- package/dist/styles/reset.d.ts +2 -0
- package/dist/typescript/apollo.cjs +1 -0
- package/dist/typescript/apollo.d.cts +21 -0
- package/dist/typescript/apollo.d.ts +21 -0
- package/dist/typescript/apollo.js +0 -0
- package/dist/typescript/graphql-codegen.cjs +1 -0
- package/dist/typescript/graphql-codegen.d.cts +12 -0
- package/dist/typescript/graphql-codegen.d.ts +12 -0
- package/dist/typescript/graphql-codegen.js +0 -0
- package/dist/typescript/index.cjs +1 -1
- package/dist/typescript/index.d.cts +5 -3
- package/dist/typescript/index.d.ts +5 -3
- package/dist/typescript/index.js +1 -1
- package/dist/typescript/react.d.cts +1 -16
- package/dist/typescript/react.d.ts +1 -16
- package/dist/utils/common.cjs +1 -0
- package/dist/utils/common.d.cts +5 -0
- package/dist/utils/common.d.ts +5 -0
- package/dist/utils/common.js +1 -0
- package/dist/utils/config.cjs +1 -1
- package/dist/utils/config.js +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.cts +1 -6
- package/dist/utils/index.d.ts +1 -6
- package/dist/utils/index.js +1 -1
- package/dist/utils/mongoose.d.cts +0 -21
- package/dist/utils/mongoose.d.ts +0 -21
- package/dist/utils/npm-package.d.cts +0 -12
- package/dist/utils/npm-package.d.ts +0 -12
- package/dist/utils/serializer.d.cts +1 -1
- package/dist/utils/serializer.d.ts +1 -1
- package/dist/utils/validate.d.cts +0 -19
- package/dist/utils/validate.d.ts +0 -19
- package/package.json +16 -8
- package/src/public/favicon/android-icon-144x144.png +0 -0
- package/src/public/favicon/android-icon-192x192.png +0 -0
- package/src/public/favicon/android-icon-36x36.png +0 -0
- package/src/public/favicon/android-icon-48x48.png +0 -0
- package/src/public/favicon/android-icon-72x72.png +0 -0
- package/src/public/favicon/android-icon-96x96.png +0 -0
- package/src/public/favicon/apple-icon-114x114.png +0 -0
- package/src/public/favicon/apple-icon-120x120.png +0 -0
- package/src/public/favicon/apple-icon-144x144.png +0 -0
- package/src/public/favicon/apple-icon-152x152.png +0 -0
- package/src/public/favicon/apple-icon-180x180.png +0 -0
- package/src/public/favicon/apple-icon-57x57.png +0 -0
- package/src/public/favicon/apple-icon-60x60.png +0 -0
- package/src/public/favicon/apple-icon-72x72.png +0 -0
- package/src/public/favicon/apple-icon-76x76.png +0 -0
- package/src/public/favicon/apple-icon-precomposed.png +0 -0
- package/src/public/favicon/apple-icon.png +0 -0
- package/src/public/favicon/browserconfig.xml +2 -0
- package/src/public/favicon/favicon-16x16.png +0 -0
- package/src/public/favicon/favicon-32x32.png +0 -0
- package/src/public/favicon/favicon-96x96.png +0 -0
- package/src/public/favicon/favicon.ico +0 -0
- package/src/public/favicon/manifest.json +41 -0
- package/src/public/favicon/ms-icon-144x144.png +0 -0
- package/src/public/favicon/ms-icon-150x150.png +0 -0
- package/src/public/favicon/ms-icon-310x310.png +0 -0
- package/src/public/favicon/ms-icon-70x70.png +0 -0
|
@@ -1,31 +1,12 @@
|
|
|
1
1
|
declare const validate: {
|
|
2
2
|
common: {
|
|
3
|
-
/**
|
|
4
|
-
* Check if a value is empty (null, undefined, empty string, empty array, or empty object).
|
|
5
|
-
* @param {unknown} value - The value to check.
|
|
6
|
-
* @returns {boolean} - True if the value is empty; otherwise, false.
|
|
7
|
-
*/
|
|
8
3
|
isEmpty(value: unknown): boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Validator to check if a value is not empty.
|
|
11
|
-
* @returns {(value: unknown) => Promise<boolean>} - The validation function.
|
|
12
|
-
*/
|
|
13
4
|
isEmptyValidator<T>(): (this: T, value: unknown) => Promise<boolean>;
|
|
14
|
-
/**
|
|
15
|
-
* Validator to check if a value is unique in specified fields.
|
|
16
|
-
* @param {string[]} fields - Fields to check for uniqueness.
|
|
17
|
-
* @returns {(value: unknown) => Promise<boolean>} - The validation function.
|
|
18
|
-
*/
|
|
19
5
|
isUniqueValidator<T extends {
|
|
20
6
|
constructor: {
|
|
21
7
|
findOne: (query: Record<string, unknown>) => Promise<unknown>;
|
|
22
8
|
};
|
|
23
9
|
}>(fields: string[]): (this: T, value: unknown) => Promise<boolean>;
|
|
24
|
-
/**
|
|
25
|
-
* Validator to check if a value matches all regex patterns in an array.
|
|
26
|
-
* @param {RegExp[]} regexArray - Array of regex patterns.
|
|
27
|
-
* @returns {(value: string) => Promise<boolean>} - The validation function.
|
|
28
|
-
*/
|
|
29
10
|
matchesRegexValidator(regexArray: RegExp[]): (value: string) => Promise<boolean>;
|
|
30
11
|
};
|
|
31
12
|
};
|
package/dist/utils/validate.d.ts
CHANGED
|
@@ -1,31 +1,12 @@
|
|
|
1
1
|
declare const validate: {
|
|
2
2
|
common: {
|
|
3
|
-
/**
|
|
4
|
-
* Check if a value is empty (null, undefined, empty string, empty array, or empty object).
|
|
5
|
-
* @param {unknown} value - The value to check.
|
|
6
|
-
* @returns {boolean} - True if the value is empty; otherwise, false.
|
|
7
|
-
*/
|
|
8
3
|
isEmpty(value: unknown): boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Validator to check if a value is not empty.
|
|
11
|
-
* @returns {(value: unknown) => Promise<boolean>} - The validation function.
|
|
12
|
-
*/
|
|
13
4
|
isEmptyValidator<T>(): (this: T, value: unknown) => Promise<boolean>;
|
|
14
|
-
/**
|
|
15
|
-
* Validator to check if a value is unique in specified fields.
|
|
16
|
-
* @param {string[]} fields - Fields to check for uniqueness.
|
|
17
|
-
* @returns {(value: unknown) => Promise<boolean>} - The validation function.
|
|
18
|
-
*/
|
|
19
5
|
isUniqueValidator<T extends {
|
|
20
6
|
constructor: {
|
|
21
7
|
findOne: (query: Record<string, unknown>) => Promise<unknown>;
|
|
22
8
|
};
|
|
23
9
|
}>(fields: string[]): (this: T, value: unknown) => Promise<boolean>;
|
|
24
|
-
/**
|
|
25
|
-
* Validator to check if a value matches all regex patterns in an array.
|
|
26
|
-
* @param {RegExp[]} regexArray - Array of regex patterns.
|
|
27
|
-
* @returns {(value: string) => Promise<boolean>} - The validation function.
|
|
28
|
-
*/
|
|
29
10
|
matchesRegexValidator(regexArray: RegExp[]): (value: string) => Promise<boolean>;
|
|
30
11
|
};
|
|
31
12
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyberskill/shared",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.30.0",
|
|
5
5
|
"description": "CyberSkill Shared",
|
|
6
6
|
"author": "Stephen Cheng",
|
|
7
7
|
"license": "MIT",
|
|
@@ -114,6 +114,10 @@
|
|
|
114
114
|
"import": "./dist/providers/react/index.js",
|
|
115
115
|
"require": "./dist/providers/react/index.cjs"
|
|
116
116
|
},
|
|
117
|
+
"./styles/reset.css": {
|
|
118
|
+
"import": "./dist/styles/reset.css",
|
|
119
|
+
"require": "./dist/styles/reset.css"
|
|
120
|
+
},
|
|
117
121
|
"./typescript": {
|
|
118
122
|
"types": "./dist/typescript/index.d.ts",
|
|
119
123
|
"import": "./dist/typescript/index.js",
|
|
@@ -142,11 +146,13 @@
|
|
|
142
146
|
"cyberskill": "./dist/commands.js"
|
|
143
147
|
},
|
|
144
148
|
"files": [
|
|
145
|
-
"dist"
|
|
149
|
+
"dist",
|
|
150
|
+
"src/public"
|
|
146
151
|
],
|
|
147
152
|
"scripts": {
|
|
148
153
|
"build": "tsup",
|
|
149
154
|
"dev": "tsup --watch",
|
|
155
|
+
"inspect": "npx tsx src/commands.ts inspect",
|
|
150
156
|
"lint": "npx tsx src/commands.ts lint",
|
|
151
157
|
"lint:fix": "npx tsx src/commands.ts lint:fix",
|
|
152
158
|
"lint:inspect": "npx @eslint/config-inspector",
|
|
@@ -154,27 +160,28 @@
|
|
|
154
160
|
"setup": "npx tsx src/commands.ts setup"
|
|
155
161
|
},
|
|
156
162
|
"dependencies": {
|
|
157
|
-
"@antfu/eslint-config": "4.10.
|
|
158
|
-
"@apollo/client": "3.13.
|
|
163
|
+
"@antfu/eslint-config": "4.10.2",
|
|
164
|
+
"@apollo/client": "3.13.5",
|
|
159
165
|
"@commitlint/cli": "19.8.0",
|
|
160
166
|
"@commitlint/config-conventional": "19.8.0",
|
|
161
|
-
"@eslint-react/eslint-plugin": "1.
|
|
167
|
+
"@eslint-react/eslint-plugin": "1.37.0",
|
|
162
168
|
"@eslint/config-inspector": "1.0.2",
|
|
163
169
|
"@graphql-codegen/cli": "5.0.5",
|
|
164
170
|
"@graphql-codegen/client-preset": "4.7.0",
|
|
165
171
|
"@graphql-codegen/typescript-react-apollo": "4.3.2",
|
|
172
|
+
"@next/eslint-plugin-next": "15.2.3",
|
|
166
173
|
"@swc/core": "1.11.11",
|
|
167
174
|
"@testing-library/jest-dom": "6.6.3",
|
|
168
175
|
"@testing-library/react": "16.2.0",
|
|
169
176
|
"@types/crypto-js": "4.2.2",
|
|
170
177
|
"@types/mongoose-aggregate-paginate-v2": "1.0.12",
|
|
171
178
|
"@types/node-persist": "3.1.8",
|
|
172
|
-
"@types/react": "19.0.
|
|
179
|
+
"@types/react": "19.0.12",
|
|
173
180
|
"@types/react-dom": "19.0.4",
|
|
174
181
|
"@types/unorm": "1.3.31",
|
|
175
182
|
"@types/uuid": "10.0.0",
|
|
176
183
|
"@types/yargs": "17.0.33",
|
|
177
|
-
"@vitejs/plugin-react-swc": "3.8.
|
|
184
|
+
"@vitejs/plugin-react-swc": "3.8.1",
|
|
178
185
|
"@vitest/browser": "3.0.9",
|
|
179
186
|
"boxen": "8.0.1",
|
|
180
187
|
"chalk": "5.4.1",
|
|
@@ -197,6 +204,7 @@
|
|
|
197
204
|
"mongoose-paginate-v2": "1.9.0",
|
|
198
205
|
"next-intl": "4.0.2",
|
|
199
206
|
"node-fetch": "3.3.2",
|
|
207
|
+
"node-modules-inspector": "0.5.7",
|
|
200
208
|
"node-persist": "4.0.4",
|
|
201
209
|
"ora": "8.2.0",
|
|
202
210
|
"playwright": "1.51.1",
|
|
@@ -206,7 +214,7 @@
|
|
|
206
214
|
"react-i18next": "15.4.1",
|
|
207
215
|
"rimraf": "6.0.1",
|
|
208
216
|
"sass": "1.86.0",
|
|
209
|
-
"simple-git-hooks": "2.
|
|
217
|
+
"simple-git-hooks": "2.12.1",
|
|
210
218
|
"slugify": "1.6.6",
|
|
211
219
|
"tsup": "8.4.0",
|
|
212
220
|
"tsx": "4.19.3",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<browserconfig><msapplication><tile><square70x70logo src="/ms-icon-70x70.png"/><square150x150logo src="/ms-icon-150x150.png"/><square310x310logo src="/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "App",
|
|
3
|
+
"icons": [
|
|
4
|
+
{
|
|
5
|
+
"src": "\/android-icon-36x36.png",
|
|
6
|
+
"sizes": "36x36",
|
|
7
|
+
"type": "image\/png",
|
|
8
|
+
"density": "0.75"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"src": "\/android-icon-48x48.png",
|
|
12
|
+
"sizes": "48x48",
|
|
13
|
+
"type": "image\/png",
|
|
14
|
+
"density": "1.0"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"src": "\/android-icon-72x72.png",
|
|
18
|
+
"sizes": "72x72",
|
|
19
|
+
"type": "image\/png",
|
|
20
|
+
"density": "1.5"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"src": "\/android-icon-96x96.png",
|
|
24
|
+
"sizes": "96x96",
|
|
25
|
+
"type": "image\/png",
|
|
26
|
+
"density": "2.0"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"src": "\/android-icon-144x144.png",
|
|
30
|
+
"sizes": "144x144",
|
|
31
|
+
"type": "image\/png",
|
|
32
|
+
"density": "3.0"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"src": "\/android-icon-192x192.png",
|
|
36
|
+
"sizes": "192x192",
|
|
37
|
+
"type": "image\/png",
|
|
38
|
+
"density": "4.0"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|