@cyberskill/shared 1.30.0 → 1.32.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/README.md +93 -32
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +11 -15
- package/dist/index.d.ts +11 -15
- package/dist/index.js +1 -1
- package/dist/nodejs/index.cjs +1 -0
- package/dist/{controllers → nodejs}/index.d.cts +1 -1
- package/dist/{controllers → nodejs}/index.d.ts +1 -1
- package/dist/{controllers → nodejs}/index.js +1 -1
- package/dist/nodejs/mongo.cjs +1 -0
- package/dist/{controllers/mongo-migration.d.cts → nodejs/mongo.d.cts} +2 -2
- package/dist/{controllers/mongo-migration.d.ts → nodejs/mongo.d.ts} +2 -2
- package/dist/{controllers/mongo-migration.js → nodejs/mongo.js} +1 -1
- package/dist/{providers/react → react}/apollo-client.d.cts +2 -2
- package/dist/{providers/react → react}/apollo-client.d.ts +2 -2
- package/dist/react/index.cjs +1 -0
- package/dist/react/index.d.cts +15 -0
- package/dist/react/index.d.ts +15 -0
- package/dist/react/index.js +1 -0
- package/dist/react/loading.cjs +1 -0
- package/dist/react/loading.d.cts +13 -0
- package/dist/react/loading.d.ts +13 -0
- package/dist/react/loading.js +1 -0
- package/dist/react/next-intl.cjs +1 -0
- package/dist/react/next-intl.d.cts +28 -0
- package/dist/react/next-intl.d.ts +28 -0
- package/dist/react/next-intl.js +1 -0
- package/dist/{hooks/react/use-storage.d.ts → react/storage.d.cts} +1 -1
- package/dist/{hooks/react/use-storage.d.cts → react/storage.d.ts} +1 -1
- package/dist/typescript/index.cjs +1 -1
- package/dist/typescript/index.d.cts +1 -0
- package/dist/typescript/index.d.ts +1 -0
- package/dist/typescript/index.js +1 -1
- package/dist/typescript/loading.cjs +1 -0
- package/dist/typescript/loading.d.cts +8 -0
- package/dist/typescript/loading.d.ts +8 -0
- package/dist/typescript/loading.js +0 -0
- package/dist/typescript/mongoose.d.cts +2 -2
- package/dist/typescript/mongoose.d.ts +2 -2
- package/dist/utils/index-nodejs.cjs +1 -0
- package/dist/utils/index-nodejs.d.cts +11 -0
- package/dist/utils/index-nodejs.d.ts +11 -0
- package/dist/utils/index-nodejs.js +1 -0
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.cts +0 -11
- package/dist/utils/index.d.ts +0 -11
- package/dist/utils/index.js +1 -1
- package/package.json +39 -34
- package/dist/components/react/index.cjs +0 -1
- package/dist/components/react/index.d.cts +0 -2
- package/dist/components/react/index.d.ts +0 -2
- package/dist/components/react/index.js +0 -1
- package/dist/components/react/loading/index.cjs +0 -1
- package/dist/components/react/loading/index.d.cts +0 -11
- package/dist/components/react/loading/index.d.ts +0 -11
- package/dist/components/react/loading/index.js +0 -1
- package/dist/contexts/react/index.cjs +0 -1
- package/dist/contexts/react/index.d.cts +0 -3
- package/dist/contexts/react/index.d.ts +0 -3
- package/dist/contexts/react/index.js +0 -1
- package/dist/contexts/react/loading.cjs +0 -1
- package/dist/contexts/react/loading.d.cts +0 -6
- package/dist/contexts/react/loading.d.ts +0 -6
- package/dist/contexts/react/loading.js +0 -1
- package/dist/contexts/react/next-intl.cjs +0 -1
- package/dist/contexts/react/next-intl.d.cts +0 -8
- package/dist/contexts/react/next-intl.d.ts +0 -8
- package/dist/contexts/react/next-intl.js +0 -1
- package/dist/controllers/index.cjs +0 -1
- package/dist/controllers/mongo-migration.cjs +0 -1
- package/dist/hocs/react/index.cjs +0 -1
- package/dist/hocs/react/index.d.cts +0 -7
- package/dist/hocs/react/index.d.ts +0 -7
- package/dist/hocs/react/index.js +0 -1
- package/dist/hocs/react/next-intl.cjs +0 -1
- package/dist/hocs/react/next-intl.d.cts +0 -18
- package/dist/hocs/react/next-intl.d.ts +0 -18
- package/dist/hocs/react/next-intl.js +0 -1
- package/dist/hooks/react/index.cjs +0 -1
- package/dist/hooks/react/index.d.cts +0 -10
- package/dist/hooks/react/index.d.ts +0 -10
- package/dist/hooks/react/index.js +0 -1
- package/dist/hooks/react/use-loading.cjs +0 -1
- package/dist/hooks/react/use-loading.d.cts +0 -6
- package/dist/hooks/react/use-loading.d.ts +0 -6
- package/dist/hooks/react/use-loading.js +0 -1
- package/dist/hooks/react/use-next-intl.cjs +0 -1
- package/dist/hooks/react/use-next-intl.d.cts +0 -9
- package/dist/hooks/react/use-next-intl.d.ts +0 -9
- package/dist/hooks/react/use-next-intl.js +0 -1
- package/dist/providers/react/index.cjs +0 -1
- package/dist/providers/react/index.d.cts +0 -11
- package/dist/providers/react/index.d.ts +0 -11
- package/dist/providers/react/index.js +0 -1
- package/dist/providers/react/loading.cjs +0 -1
- package/dist/providers/react/loading.d.cts +0 -9
- package/dist/providers/react/loading.d.ts +0 -9
- package/dist/providers/react/loading.js +0 -1
- package/dist/providers/react/next-intl.cjs +0 -1
- package/dist/providers/react/next-intl.d.cts +0 -14
- package/dist/providers/react/next-intl.d.ts +0 -14
- package/dist/providers/react/next-intl.js +0 -1
- /package/dist/{controllers → nodejs}/mongoose.cjs +0 -0
- /package/dist/{controllers → nodejs}/mongoose.d.cts +0 -0
- /package/dist/{controllers → nodejs}/mongoose.d.ts +0 -0
- /package/dist/{controllers → nodejs}/mongoose.js +0 -0
- /package/dist/{providers/react → react}/apollo-client.cjs +0 -0
- /package/dist/{providers/react → react}/apollo-client.js +0 -0
- /package/dist/{components/react/loading → react}/loading.module.d.cts +0 -0
- /package/dist/{components/react/loading → react}/loading.module.d.ts +0 -0
- /package/dist/{components/react/loading → react}/loading.module.scss +0 -0
- /package/dist/{hooks/react/use-storage.cjs → react/storage.cjs} +0 -0
- /package/dist/{hooks/react/use-storage.js → react/storage.js} +0 -0
package/README.md
CHANGED
|
@@ -1,48 +1,109 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="./src/public/favicon/favicon-96x96.png" width="96" height="96" alt="CyberSkill Logo">
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<h1 align="center">🚀 CyberSkill Shared</h1>
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
[![License][license-src]][license-href]
|
|
7
|
+
<p align="center">
|
|
8
|
+
<b>A shared utility library for consistent development across CyberSkill projects.</b>
|
|
9
|
+
</p>
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
---
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="https://npmjs.com/package/@cyberskill/shared">
|
|
15
|
+
<img src="https://img.shields.io/npm/v/@cyberskill/shared?style=for-the-badge&color=blue" alt="npm version">
|
|
16
|
+
</a>
|
|
17
|
+
<a href="https://npmjs.com/package/@cyberskill/shared">
|
|
18
|
+
<img src="https://img.shields.io/npm/dm/@cyberskill/shared?style=for-the-badge&color=brightgreen" alt="npm downloads">
|
|
19
|
+
</a>
|
|
20
|
+
<a href="https://www.jsdocs.io/package/@cyberskill/shared">
|
|
21
|
+
<img src="https://img.shields.io/badge/jsDocs.io-reference-blue?style=for-the-badge" alt="JSDocs">
|
|
22
|
+
</a>
|
|
23
|
+
<a href="https://github.com/cyberskill-world/shared/blob/main/LICENSE">
|
|
24
|
+
<img src="https://img.shields.io/badge/license-MIT-blue?style=for-the-badge" alt="License">
|
|
25
|
+
</a>
|
|
26
|
+
</p>
|
|
13
27
|
|
|
14
|
-
|
|
28
|
+
---
|
|
15
29
|
|
|
16
|
-
|
|
17
|
-
[npm-version-href]: https://npmjs.com/package/@cyberskill/shared
|
|
18
|
-
[npm-downloads-src]: https://img.shields.io/npm/dm/@cyberskill/shared?style=flat&colorA=080f12&colorB=1fa669
|
|
19
|
-
[npm-downloads-href]: https://npmjs.com/package/@cyberskill/shared
|
|
20
|
-
[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=1fa669
|
|
21
|
-
[jsdocs-href]: https://www.jsdocs.io/package/@cyberskill/shared
|
|
22
|
-
[license-src]: https://img.shields.io/github/license/cyberskill-world/shared.svg?style=flat&colorA=080f12&colorB=1fa669
|
|
23
|
-
[license-href]: https://github.com/cyberskill-world/shared/blob/main/LICENSE
|
|
30
|
+
## 🎯 **About**
|
|
24
31
|
|
|
25
|
-
|
|
32
|
+
CyberSkill Shared is a modular utility library designed to:
|
|
33
|
+
|
|
34
|
+
- 📦 **Provide reusable utility functions** across multiple projects.
|
|
35
|
+
- ⚙️ **Ensure consistent coding standards**.
|
|
36
|
+
- 🚀 **Boost developer productivity** by reducing repetitive code.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 🚀 **Installation**
|
|
41
|
+
|
|
42
|
+
Install via **npm**:
|
|
26
43
|
|
|
27
44
|
```bash
|
|
28
|
-
|
|
29
|
-
|
|
45
|
+
npm install @cyberskill/shared
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Install via **yarn**:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
yarn add @cyberskill/shared
|
|
52
|
+
```
|
|
30
53
|
|
|
31
|
-
|
|
32
|
-
npm run build
|
|
54
|
+
---
|
|
33
55
|
|
|
34
|
-
|
|
35
|
-
npm run lint
|
|
56
|
+
## 🛠️ **Scripts**
|
|
36
57
|
|
|
37
|
-
|
|
38
|
-
|
|
58
|
+
| Command | Description |
|
|
59
|
+
| ---------------------- | ----------------------------------- |
|
|
60
|
+
| `npm run dev` | Start development mode 🚧 |
|
|
61
|
+
| `npm run build` | Build for production 🚀 |
|
|
62
|
+
| `npm run lint` | Check for linting issues ✅ |
|
|
63
|
+
| `npm run lint:fix` | Fix linting issues 🔧 |
|
|
64
|
+
| `npm run lint:inspect` | Inspect linting config 🧐 |
|
|
65
|
+
| `npm run setup` | Project setup 🏗️ |
|
|
66
|
+
| `npm run reset` | Reset the project ♻️ |
|
|
67
|
+
| `npm run inspect` | Inspect the project dependencies 🔍 |
|
|
39
68
|
|
|
40
|
-
|
|
41
|
-
npm run lint:inspect
|
|
69
|
+
---
|
|
42
70
|
|
|
43
|
-
|
|
44
|
-
npm run setup
|
|
71
|
+
## 📂 **Project Structure**
|
|
45
72
|
|
|
46
|
-
|
|
47
|
-
|
|
73
|
+
```plaintext
|
|
74
|
+
src/
|
|
75
|
+
├── components/ → Reusable UI components (buttons, modals, etc.)
|
|
76
|
+
├── configs/ → App configuration files
|
|
77
|
+
├── constants/ → Static values used across the app
|
|
78
|
+
├── contexts/ → React context providers
|
|
79
|
+
├── controllers/ → Business logic controllers
|
|
80
|
+
├── hocs/ → Higher Order Components (HOCs)
|
|
81
|
+
├── hooks/ → Custom hooks
|
|
82
|
+
├── providers/ → State management and third-party providers
|
|
83
|
+
├── public/ → Static assets (images, fonts, etc.)
|
|
84
|
+
├── styles/ → Global and component-specific styles
|
|
85
|
+
├── typescript/ → TypeScript types and interfaces
|
|
86
|
+
├── utils/ → Utility functions and helpers
|
|
87
|
+
├── commands.ts → CLI commands and setup logic
|
|
88
|
+
└── index.ts → Entry point for the app
|
|
48
89
|
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## 🎯 **Goals**
|
|
94
|
+
|
|
95
|
+
- ✅ Consistent TypeScript support.
|
|
96
|
+
- ✅ Minimize code duplication.
|
|
97
|
+
- ✅ Easy to extend and maintain.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## 📄 **License**
|
|
102
|
+
|
|
103
|
+
**[MIT](./LICENSE)** License © [Stephen Cheng](https://github.com/zintaen)
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
<p align="center">
|
|
108
|
+
Made with ❤️ by <a href="https://github.com/zintaen">@zintaen</a>
|
|
109
|
+
</p>
|