@cyberskill/shared 1.195.0 → 1.198.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.
Files changed (47) hide show
  1. package/README.md +323 -61
  2. package/dist/_tsup-dts-rollup.d.cts +31 -7
  3. package/dist/_tsup-dts-rollup.d.ts +31 -7
  4. package/dist/node/cli/cli.util.cjs +1 -1
  5. package/dist/node/cli/cli.util.js +1 -1
  6. package/dist/node/cli/index.cjs +1 -1
  7. package/dist/node/cli/index.js +1 -1
  8. package/dist/node/express/express.util.cjs +1 -1
  9. package/dist/node/express/express.util.js +1 -1
  10. package/dist/node/express/index.cjs +1 -1
  11. package/dist/node/express/index.js +1 -1
  12. package/dist/node/index.cjs +1 -1
  13. package/dist/node/index.js +1 -1
  14. package/dist/react/apollo-client/apollo-client.component.cjs +1 -1
  15. package/dist/react/apollo-client/apollo-client.component.js +1 -1
  16. package/dist/react/apollo-client/apollo-client.util.cjs +1 -1
  17. package/dist/react/apollo-client/apollo-client.util.d.cts +2 -0
  18. package/dist/react/apollo-client/apollo-client.util.d.ts +2 -0
  19. package/dist/react/apollo-client/apollo-client.util.js +1 -1
  20. package/dist/react/apollo-client/index.cjs +1 -1
  21. package/dist/react/apollo-client/index.d.cts +2 -0
  22. package/dist/react/apollo-client/index.d.ts +2 -0
  23. package/dist/react/apollo-client/index.js +1 -1
  24. package/dist/react/apollo-client-nextjs/apollo-client.component.cjs +1 -0
  25. package/dist/react/apollo-client-nextjs/apollo-client.component.css +1 -0
  26. package/dist/react/apollo-client-nextjs/apollo-client.component.d.cts +1 -0
  27. package/dist/react/apollo-client-nextjs/apollo-client.component.d.ts +1 -0
  28. package/dist/react/apollo-client-nextjs/apollo-client.component.js +1 -0
  29. package/dist/react/apollo-client-nextjs/apollo-client.util.cjs +1 -0
  30. package/dist/react/apollo-client-nextjs/apollo-client.util.css +1 -0
  31. package/dist/react/apollo-client-nextjs/apollo-client.util.d.cts +1 -0
  32. package/dist/react/apollo-client-nextjs/apollo-client.util.d.ts +1 -0
  33. package/dist/react/apollo-client-nextjs/apollo-client.util.js +1 -0
  34. package/dist/react/apollo-client-nextjs/index.cjs +1 -0
  35. package/dist/react/apollo-client-nextjs/index.css +1 -0
  36. package/dist/react/apollo-client-nextjs/index.d.cts +2 -0
  37. package/dist/react/apollo-client-nextjs/index.d.ts +2 -0
  38. package/dist/react/apollo-client-nextjs/index.js +1 -0
  39. package/dist/react/index.cjs +1 -1
  40. package/dist/react/index.d.cts +2 -0
  41. package/dist/react/index.d.ts +2 -0
  42. package/dist/react/index.js +1 -1
  43. package/dist/react/userback/index.cjs +1 -1
  44. package/dist/react/userback/index.js +1 -1
  45. package/dist/react/userback/userback.component.cjs +1 -1
  46. package/dist/react/userback/userback.component.js +1 -1
  47. package/package.json +6 -1
package/README.md CHANGED
@@ -1,98 +1,360 @@
1
- <p align="center">
1
+ <div align="center">
2
2
  <img src="https://res.cloudinary.com/cyberskill/image/upload/v1742786793/cyberskill/favicon/favicon-96x96.png" width="96" height="96" alt="CyberSkill Logo">
3
- </p>
4
3
 
5
- <h1 align="center">CyberSkill Shared</h1>
4
+ # CyberSkill Shared
6
5
 
7
- <p align="center">
8
- <b>A shared utility library for consistent development across CyberSkill projects.</b>
9
- </p>
6
+ **A comprehensive utility library for consistent development across CyberSkill projects**
7
+
8
+ [![npm version](https://img.shields.io/npm/v/@cyberskill/shared)](https://npmjs.com/package/@cyberskill/shared)
9
+ [![npm downloads](https://img.shields.io/npm/dm/@cyberskill/shared)](https://npmjs.com/package/@cyberskill/shared)
10
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
11
+ [![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
12
+ [![Node.js](https://img.shields.io/badge/Node.js-43853D?logo=node.js&logoColor=white)](https://nodejs.org/)
13
+
14
+ </div>
15
+
16
+ ---
17
+
18
+ ## 📋 Table of Contents
19
+
20
+ - [Overview](#overview)
21
+ - [Features](#features)
22
+ - [Installation](#installation)
23
+ - [Quick Start](#quick-start)
24
+ - [Documentation](#documentation)
25
+ - [API Reference](#api-reference)
26
+ - [Development](#development)
27
+ - [Contributing](#contributing)
28
+ - [License](#license)
10
29
 
11
30
  ---
12
31
 
13
- <p align="center">
14
- <a href="https://npmjs.com/package/@cyberskill/shared">
15
- <img src="https://img.shields.io/npm/v/@cyberskill/shared" 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" 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" 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" alt="License">
25
- </a>
26
- </p>
32
+ ## 📖 Overview
33
+
34
+ CyberSkill Shared is a modular, TypeScript-first utility library designed to standardize development practices across CyberSkill projects. Built with enterprise-grade architecture, it provides a comprehensive suite of utilities, configurations, and components that ensure consistency, maintainability, and developer productivity.
35
+
36
+ ### 🎯 Key Benefits
37
+
38
+ - **🔄 Consistency**: Standardized patterns and utilities across all projects
39
+ - **⚡ Productivity**: Pre-built solutions for common development tasks
40
+ - **🛡️ Reliability**: Type-safe implementations with comprehensive testing
41
+ - **📈 Scalability**: Modular architecture that grows with your needs
42
+ - **🔧 Maintainability**: Well-documented, clean, and extensible codebase
27
43
 
28
44
  ---
29
45
 
30
- ## 🎯 **About**
46
+ ## Features
47
+
48
+ ### 🛠️ Core Utilities
31
49
 
32
- CyberSkill Shared is a modular utility library implemented by CyberSkill JSC to:
50
+ - **Type-safe utilities** for common operations
51
+ - **Object manipulation** and validation helpers
52
+ - **String processing** and formatting functions
53
+ - **Serialization** and data transformation tools
33
54
 
34
- - 📦 **Provide reusable utility functions** across multiple projects.
35
- - ⚙️ **Ensure consistent coding standards**.
36
- - 🚀 **Boost developer productivity** by reducing repetitive code.
55
+ ### ⚙️ Configuration Management
56
+
57
+ - **Environment configuration** with type safety
58
+ - **ESLint configurations** for consistent code quality
59
+ - **Testing setups** for unit and integration tests
60
+ - **Build tool configurations** optimized for performance
61
+
62
+ ### 🌐 Node.js Modules
63
+
64
+ - **Express.js utilities** for API development
65
+ - **MongoDB integration** helpers
66
+ - **WebSocket management** tools
67
+ - **File system operations** with enhanced error handling
68
+ - **CLI development** utilities
69
+
70
+ ### ⚛️ React Components
71
+
72
+ - **Apollo Client** integration and error handling
73
+ - **Internationalization** (i18n) support
74
+ - **Loading states** and user feedback components
75
+ - **Storage management** hooks and utilities
76
+ - **Toast notifications** system
77
+
78
+ ### 📝 TypeScript Support
79
+
80
+ - **Comprehensive type definitions**
81
+ - **React component types**
82
+ - **Utility type helpers**
83
+ - **Style declaration files**
37
84
 
38
85
  ---
39
86
 
40
- ## 🚀 **Installation**
87
+ ## 🚀 Installation
88
+
89
+ ### Prerequisites
41
90
 
42
- Install via **pnpm**:
91
+ - Node.js 18+
92
+ - pnpm 8+
93
+
94
+ ### Install Package
43
95
 
44
96
  ```bash
45
- pnpm install @cyberskill/shared
97
+ # Using pnpm (recommended)
98
+ pnpm add @cyberskill/shared
99
+
100
+ # Using npm
101
+ npm install @cyberskill/shared
102
+
103
+ # Using yarn
104
+ yarn add @cyberskill/shared
105
+ ```
106
+
107
+ ---
108
+
109
+ ## 🏃 Quick Start
110
+
111
+ ### Basic Usage
112
+
113
+ ```typescript
114
+ import { formatCurrency, validateEmail } from '@cyberskill/shared';
115
+
116
+ // Validate email
117
+ const isValid = validateEmail('user@example.com');
118
+
119
+ // Format currency
120
+ const formatted = formatCurrency(1234.56, 'USD');
46
121
  ```
47
122
 
123
+ ### React Components
124
+
125
+ ```tsx
126
+ import { LoadingProvider, useLoading } from '@cyberskill/shared';
127
+
128
+ function App() {
129
+ return (
130
+ <LoadingProvider>
131
+ <MyComponent />
132
+ </LoadingProvider>
133
+ );
134
+ }
135
+
136
+ function MyComponent() {
137
+ const { showLoading, hideLoading } = useLoading();
138
+
139
+ // Use loading states
140
+ return <div>Your component</div>;
141
+ }
142
+ ```
143
+
144
+ ---
145
+
146
+ ## 📚 Documentation
147
+
148
+ For detailed documentation, visit our [documentation site](https://docs.cyberskill.com/shared) or check the [JSDocs reference](https://www.jsdocs.io/package/@cyberskill/shared).
149
+
150
+ ### Key Documentation Sections
151
+
152
+ - [Getting Started Guide](https://docs.cyberskill.com/shared/getting-started)
153
+ - [API Reference](https://docs.cyberskill.com/shared/api)
154
+ - [Migration Guide](https://docs.cyberskill.com/shared/migration)
155
+ - [Best Practices](https://docs.cyberskill.com/shared/best-practices)
156
+
48
157
  ---
49
158
 
50
- ## 🛠️ **Scripts**
51
-
52
- | Command | Description |
53
- | ----------------------- | ----------------------------------- |
54
- | `pnpm run dev` | 🚧 Start development mode |
55
- | `pnpm run build` | 🚀 Build for production |
56
- | `pnpm run lint` | Check for linting issues |
57
- | `pnpm run lint:fix` | 🔧 Fix linting issues |
58
- | `pnpm run lint:inspect` | 🧐 Inspect linting config |
59
- | `pnpm run reset` | ♻️ Reset the project |
60
- | `pnpm run ready` | 🏗️ Project ready |
61
- | `pnpm run inspect` | 🔍 Inspect the project dependencies |
62
- | `pnpm run test:unit` | 🔬 Run unit tests |
63
- | `pnpm run test:e2e` | 🧪 Run end-to-end tests |
64
- | `pnpm run commitlint` | 📝 Check commit message format |
159
+ ## 🔧 API Reference
160
+
161
+ ### Core Modules
162
+
163
+ | Module | Description | Import Path |
164
+ | ------------- | --------------------------- | ------------------------------- |
165
+ | **Utils** | Common utility functions | `@cyberskill/shared/util` |
166
+ | **Constants** | Shared constants and enums | `@cyberskill/shared/constant` |
167
+ | **Types** | TypeScript type definitions | `@cyberskill/shared/typescript` |
168
+ | **Config** | Configuration utilities | `@cyberskill/shared/config` |
169
+
170
+ ### Node.js Modules
171
+
172
+ | Module | Description | Import Path |
173
+ | ----------------- | ------------------------------ | --------------------------------------- |
174
+ | **apollo-server** | Apollo Server utilities | `@cyberskill/shared/node/apollo-server` |
175
+ | **cli** | Command-line interface helpers | `@cyberskill/shared/node/cli` |
176
+ | **command** | Command execution utilities | `@cyberskill/shared/node/command` |
177
+ | **express** | Express.js utilities | `@cyberskill/shared/node/express` |
178
+ | **fs** | File system helpers | `@cyberskill/shared/node/fs` |
179
+ | **log** | Logging utilities | `@cyberskill/shared/node/log` |
180
+ | **mongo** | MongoDB helpers | `@cyberskill/shared/node/mongo` |
181
+ | **package** | Package management utilities | `@cyberskill/shared/node/package` |
182
+ | **path** | Path utilities | `@cyberskill/shared/node/path` |
183
+ | **storage** | Storage helpers | `@cyberskill/shared/node/storage` |
184
+ | **upload** | File upload utilities | `@cyberskill/shared/node/upload` |
185
+ | **ws** | WebSocket utilities | `@cyberskill/shared/node/ws` |
186
+
187
+ ### React Modules
188
+
189
+ | Module | Description | Import Path |
190
+ | ----------------- | ---------------------------- | ---------------------------------------- |
191
+ | **apollo-client** | Apollo Client integration | `@cyberskill/shared/react/apollo-client` |
192
+ | **apollo-error** | Apollo error handling | `@cyberskill/shared/react/apollo-error` |
193
+ | **i18next** | Internationalization (i18n) | `@cyberskill/shared/react/i18next` |
194
+ | **loading** | Loading state management | `@cyberskill/shared/react/loading` |
195
+ | **log** | Logging utilities | `@cyberskill/shared/react/log` |
196
+ | **next-intl** | Next.js internationalization | `@cyberskill/shared/react/next-intl` |
197
+ | **storage** | Client-side storage | `@cyberskill/shared/react/storage` |
198
+ | **toast** | Toast notification system | `@cyberskill/shared/react/toast` |
199
+ | **userback** | User feedback integration | `@cyberskill/shared/react/userback` |
200
+
201
+ ### Util Modules
202
+
203
+ | Module | Description | Import Path |
204
+ | -------------- | -------------------------------- | ------------------------------------ |
205
+ | **common** | Common utility types and helpers | `@cyberskill/shared/util/common` |
206
+ | **object** | Object manipulation utilities | `@cyberskill/shared/util/object` |
207
+ | **serializer** | Serialization and transformation | `@cyberskill/shared/util/serializer` |
208
+ | **string** | String processing utilities | `@cyberskill/shared/util/string` |
209
+ | **validate** | Validation helpers | `@cyberskill/shared/util/validate` |
65
210
 
66
211
  ---
67
212
 
68
- ## 📂 **Project Structure**
213
+ ## 🛠️ Development
214
+
215
+ ### Prerequisites
216
+
217
+ - Node.js 22+
218
+ - pnpm 10+
219
+ - Git
220
+
221
+ ### Setup
222
+
223
+ ```bash
224
+ # Clone the repository
225
+ git clone https://github.com/cyberskill-world/shared.git
226
+ cd shared
227
+
228
+ # Install dependencies
229
+ pnpm install
230
+
231
+ # Build the project
232
+ pnpm run build
233
+ ```
234
+
235
+ ### Available Scripts
236
+
237
+ | Command | Description |
238
+ | -------------------- | -------------------------------------- |
239
+ | `pnpm run dev` | Start development mode with hot reload |
240
+ | `pnpm run build` | Build for production |
241
+ | `pnpm run lint` | Check for linting issues |
242
+ | `pnpm run lint:fix` | Fix linting issues automatically |
243
+ | `pnpm run test:unit` | Run unit tests |
244
+ | `pnpm run test:e2e` | Run end-to-end tests |
245
+ | `pnpm run inspect` | Inspect project dependencies |
246
+ | `pnpm run reset` | Reset project state |
247
+ | `pnpm run ready` | Prepare project for development |
248
+
249
+ ### Project Structure
69
250
 
70
251
  ```text
71
- ├── public/ → Static assets (images, fonts, etc.)
72
- ├──src/
73
- ├── config/ → App configuration files
74
- ├── constant/ Static values used across the app
75
- ├── node/ NodeJS modules
76
- ├── react/ ReactJS modules
77
- ├── style/ Global and component-specific style
78
- ├── typescript/ TypeScript types and interfaces
79
- ├── util/ Utility functions and helpers
252
+ shared/
253
+ ├── public/ # Static assets (favicons, manifest, etc.)
254
+ ├── src/
255
+ ├── config/ # App configuration (commitlint, eslint, env, graphql-codegen, lint-staged, vitest)
256
+ ├── constant/ # Static values and constants
257
+ ├── node/ # Node.js utilities and modules
258
+ │ │ ├── apollo-server/ # Apollo Server helpers
259
+ │ │ ├── cli/ # CLI utilities
260
+ │ │ ├── command/ # Command execution helpers
261
+ │ │ ├── express/ # Express.js utilities
262
+ │ │ ├── fs/ # File system helpers
263
+ │ │ ├── log/ # Logging utilities
264
+ │ │ ├── mongo/ # MongoDB helpers
265
+ │ │ ├── package/ # Package management
266
+ │ │ ├── path/ # Path utilities
267
+ │ │ ├── storage/ # Storage helpers
268
+ │ │ ├── upload/ # File upload utilities
269
+ │ │ └── ws/ # WebSocket utilities
270
+ │ ├── react/ # React utilities and modules
271
+ │ │ ├── apollo-client/ # Apollo Client integration
272
+ │ │ ├── apollo-error/ # Apollo error handling
273
+ │ │ ├── i18next/ # Internationalization (i18n)
274
+ │ │ ├── loading/ # Loading state management
275
+ │ │ ├── log/ # Logging utilities
276
+ │ │ ├── next-intl/ # Next.js internationalization
277
+ │ │ ├── storage/ # Client-side storage
278
+ │ │ ├── toast/ # Toast notifications
279
+ │ │ └── userback/ # User feedback integration
280
+ │ ├── typescript/ # TypeScript types and interfaces
281
+ │ └── util/ # Utility functions and helpers
282
+ │ ├── common/ # Common utilities
283
+ │ ├── object/ # Object manipulation
284
+ │ ├── serializer/ # Serialization helpers
285
+ │ ├── string/ # String utilities
286
+ │ └── validate/ # Validation helpers
287
+ ├── package.json # Project manifest
288
+ ├── tsconfig.json # TypeScript configuration
289
+ └── ... # Other configuration and metadata files
290
+ ```
291
+
292
+ ### Testing
293
+
294
+ ```bash
295
+ # Run all tests
296
+ pnpm run test
297
+
298
+ # Run unit tests only
299
+ pnpm run test:unit
300
+
301
+ # Run e2e tests only
302
+ pnpm run test:e2e
303
+
304
+ # Run tests with coverage
305
+ pnpm run test:coverage
80
306
  ```
81
307
 
82
308
  ---
83
309
 
84
- ## 🎯 **Goals**
310
+ ## 🤝 Contributing
311
+
312
+ We welcome contributions from the community! Please read our [Contributing Guide](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.
313
+
314
+ ### Development Workflow
85
315
 
86
- - Consistent TypeScript support.
87
- - Minimize code duplication.
88
- - Easy to extend and maintain.
316
+ 1. Fork the repository
317
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
318
+ 3. Make your changes
319
+ 4. Add tests for new functionality
320
+ 5. Ensure all tests pass (`pnpm run test`)
321
+ 6. Commit your changes (`git commit -m 'Add amazing feature'`)
322
+ 7. Push to the branch (`git push origin feature/amazing-feature`)
323
+ 8. Open a Pull Request
324
+
325
+ ### Code Standards
326
+
327
+ - Follow TypeScript best practices
328
+ - Write comprehensive tests
329
+ - Update documentation for new features
330
+ - Follow our ESLint configuration
331
+ - Use conventional commit messages
89
332
 
90
333
  ---
91
334
 
92
- 📄 **[MIT](./LICENSE)** License © [CyberSkill JSC](https://github.com/cyberskill-world)
335
+ ## 📄 License
336
+
337
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
93
338
 
94
339
  ---
95
340
 
96
- <p align="center">
97
- Made with ❤️ by <a href="https://github.com/cyberskill-world">@cyberskill-world</a>
98
- </p>
341
+ ## 🏢 About CyberSkill
342
+
343
+ CyberSkill JSC is a technology company focused on building innovative solutions for the cybersecurity industry. Our shared libraries and tools help developers create secure, scalable, and maintainable applications.
344
+
345
+ - **Website**: [https://cyberskill.com](https://cyberskill.com)
346
+ - **GitHub**: [https://github.com/cyberskill-world](https://github.com/cyberskill-world)
347
+ - **Documentation**: [https://docs.cyberskill.com](https://docs.cyberskill.com)
348
+
349
+ ---
350
+
351
+ <div align="center">
352
+ <p>Made with ❤️ by the <a href="https://github.com/cyberskill-world">CyberSkill Team</a></p>
353
+
354
+ <p>
355
+ <a href="https://cyberskill.com">Website</a> •
356
+ <a href="https://docs.cyberskill.com">Documentation</a> •
357
+ <a href="https://github.com/cyberskill-world/shared/issues">Issues</a> •
358
+ <a href="https://github.com/cyberskill-world/shared/discussions">Discussions</a>
359
+ </p>
360
+ </div>
@@ -5,9 +5,11 @@ import type { AggregatePaginateResult } from 'mongoose';
5
5
  import { ApolloCache } from '@apollo/client';
6
6
  import { ApolloClient } from '@apollo/client';
7
7
  import { ApolloClient as ApolloClient_2 } from '@apollo/client/core/core.cjs';
8
+ import { ApolloClient as ApolloClient_3 } from '@apollo/client-integration-nextjs';
8
9
  import { ApolloClientOptions } from '@apollo/client';
9
10
  import { ApolloError } from '@apollo/client';
10
11
  import type { ApolloLink } from '@apollo/client';
12
+ import { ApolloLink as ApolloLink_2 } from '@apollo/client/link/core/core.cjs';
11
13
  import { ApolloServer } from '@apollo/server';
12
14
  import type { Application } from 'express';
13
15
  import bodyParser from 'body-parser';
@@ -32,6 +34,7 @@ import type { ErrorHandlingMiddlewareWithOption } from 'mongoose';
32
34
  import type { ExceptionFilter } from '@nestjs/common';
33
35
  import express from 'express';
34
36
  import { expressMiddleware } from '@apollo/server/express4';
37
+ import type { FetchResult } from '@apollo/client';
35
38
  import type { Filter } from 'mongodb';
36
39
  import type { FilterQuery } from 'mongoose';
37
40
  import fsExtra from 'fs-extra';
@@ -54,6 +57,8 @@ import mongoosePaginate from 'mongoose-paginate-v2';
54
57
  import type mongooseRaw from 'mongoose';
55
58
  import { NextFunction } from 'express';
56
59
  import { NormalizedCacheObject } from '@apollo/client';
60
+ import type { Observable } from '@apollo/client/utilities';
61
+ import type { Operation } from '@apollo/client';
57
62
  import type { OptionalUnlessRequiredId } from 'mongodb';
58
63
  import type { PaginateModel } from 'mongoose';
59
64
  import type { PaginateOptions } from 'mongoose';
@@ -158,11 +163,15 @@ export { ApolloErrorProvider }
158
163
  export { ApolloErrorProvider as ApolloErrorProvider_alias_1 }
159
164
  export { ApolloErrorProvider as ApolloErrorProvider_alias_2 }
160
165
 
161
- declare function ApolloProvider({ isNextJS, options, children, }: I_ApolloProviderProps): React_2.JSX.Element;
166
+ declare function ApolloProvider({ options, children, }: I_ApolloProviderProps): React_2.JSX.Element;
162
167
  export { ApolloProvider }
163
168
  export { ApolloProvider as ApolloProvider_alias_1 }
164
169
  export { ApolloProvider as ApolloProvider_alias_2 }
165
170
 
171
+ declare function ApolloProviderNextJS({ options, children, }: I_ApolloProviderProps): React_2.JSX.Element;
172
+ export { ApolloProviderNextJS }
173
+ export { ApolloProviderNextJS as ApolloProviderNextJS_alias_1 }
174
+
166
175
  declare function appendFileSync(path: fsExtra.PathOrFileDescriptor, data: string | Uint8Array, options?: fsExtra.WriteFileOptions): void;
167
176
  export { appendFileSync }
168
177
  export { appendFileSync as appendFileSync_alias_1 }
@@ -270,6 +279,11 @@ export { copySync }
270
279
  export { copySync as copySync_alias_1 }
271
280
  export { copySync as copySync_alias_2 }
272
281
 
282
+ declare function createApolloLinks(options: I_ApolloOptions): ApolloLink_2[];
283
+ export { createApolloLinks }
284
+ export { createApolloLinks as createApolloLinks_alias_1 }
285
+ export { createApolloLinks as createApolloLinks_alias_2 }
286
+
273
287
  declare function createApolloServer(options: I_ApolloServerOptions): ApolloServer;
274
288
  export { createApolloServer }
275
289
  export { createApolloServer as createApolloServer_alias_1 }
@@ -1576,6 +1590,14 @@ declare const _default_3: {
1576
1590
  export { _default_3 as default_alias_2 }
1577
1591
  export { _default_3 as lintStagedConfig }
1578
1592
 
1593
+ declare class DevLoggerLink extends ApolloLink_2 {
1594
+ private count;
1595
+ request(operation: Operation, forward: (op: Operation) => Observable<FetchResult>): Observable<FetchResult>;
1596
+ }
1597
+ export { DevLoggerLink }
1598
+ export { DevLoggerLink as DevLoggerLink_alias_1 }
1599
+ export { DevLoggerLink as DevLoggerLink_alias_2 }
1600
+
1579
1601
  declare const dirname: (path: string) => string;
1580
1602
  export { dirname }
1581
1603
  export { dirname as dirname_alias_1 }
@@ -1710,11 +1732,15 @@ export { generateSlug }
1710
1732
  export { generateSlug as generateSlug_alias_1 }
1711
1733
  export { generateSlug as generateSlug_alias_2 }
1712
1734
 
1713
- declare function getClient(options?: I_ApolloOptions, isNextJS?: boolean): ApolloClient_2<NormalizedCacheObject>;
1735
+ declare function getClient(options?: I_ApolloOptions): ApolloClient_2<NormalizedCacheObject>;
1714
1736
  export { getClient }
1715
1737
  export { getClient as getClient_alias_1 }
1716
1738
  export { getClient as getClient_alias_2 }
1717
1739
 
1740
+ declare function getClientNextJS(options?: I_ApolloOptions): ApolloClient_3<unknown>;
1741
+ export { getClientNextJS }
1742
+ export { getClientNextJS as getClientNextJS_alias_1 }
1743
+
1718
1744
  declare function getEnv(): I_Environment;
1719
1745
  export { getEnv }
1720
1746
  export { getEnv as getEnv_alias_1 }
@@ -1794,9 +1820,7 @@ export { I_ApolloErrorContext as I_ApolloErrorContext_alias_2 }
1794
1820
  declare interface I_ApolloOptions extends Omit<ApolloClientOptions<NormalizedCacheObject>, 'cache'> {
1795
1821
  uri?: string | UriFunction;
1796
1822
  wsUrl?: string;
1797
- cache?: ApolloCache<NormalizedCacheObject>;
1798
1823
  customLinks?: ApolloLink[];
1799
- ssrMode?: boolean;
1800
1824
  }
1801
1825
  export { I_ApolloOptions }
1802
1826
  export { I_ApolloOptions as I_ApolloOptions_alias_1 }
@@ -1940,7 +1964,7 @@ export { I_EslintError as I_EslintError_alias_1 }
1940
1964
  export { I_EslintError as I_EslintError_alias_2 }
1941
1965
 
1942
1966
  declare interface I_ExpressOptions {
1943
- staticFolder?: string;
1967
+ static?: string | string[];
1944
1968
  }
1945
1969
  export { I_ExpressOptions }
1946
1970
  export { I_ExpressOptions as I_ExpressOptions_alias_1 }
@@ -2189,7 +2213,7 @@ declare interface I_MongooseOptions<T> {
2189
2213
 
2190
2214
  declare interface I_NestOptions {
2191
2215
  module: Type<object>;
2192
- staticFolder?: string;
2216
+ static?: string | string[];
2193
2217
  filters?: ExceptionFilter[];
2194
2218
  pipes?: ValidationPipe[];
2195
2219
  }
@@ -2396,7 +2420,7 @@ export { I_UserBackOptions as I_UserBackOptions_alias_1 }
2396
2420
 
2397
2421
  declare interface I_UserBackProps {
2398
2422
  token?: string;
2399
- options: I_UserBackOptions;
2423
+ options?: I_UserBackOptions;
2400
2424
  }
2401
2425
  export { I_UserBackProps }
2402
2426
  export { I_UserBackProps as I_UserBackProps_alias_1 }
@@ -5,9 +5,11 @@ import type { AggregatePaginateResult } from 'mongoose';
5
5
  import { ApolloCache } from '@apollo/client';
6
6
  import { ApolloClient } from '@apollo/client';
7
7
  import { ApolloClient as ApolloClient_2 } from '@apollo/client/core/core.cjs';
8
+ import { ApolloClient as ApolloClient_3 } from '@apollo/client-integration-nextjs';
8
9
  import { ApolloClientOptions } from '@apollo/client';
9
10
  import { ApolloError } from '@apollo/client';
10
11
  import type { ApolloLink } from '@apollo/client';
12
+ import { ApolloLink as ApolloLink_2 } from '@apollo/client/link/core/core.cjs';
11
13
  import { ApolloServer } from '@apollo/server';
12
14
  import type { Application } from 'express';
13
15
  import bodyParser from 'body-parser';
@@ -32,6 +34,7 @@ import type { ErrorHandlingMiddlewareWithOption } from 'mongoose';
32
34
  import type { ExceptionFilter } from '@nestjs/common';
33
35
  import express from 'express';
34
36
  import { expressMiddleware } from '@apollo/server/express4';
37
+ import type { FetchResult } from '@apollo/client';
35
38
  import type { Filter } from 'mongodb';
36
39
  import type { FilterQuery } from 'mongoose';
37
40
  import fsExtra from 'fs-extra';
@@ -54,6 +57,8 @@ import mongoosePaginate from 'mongoose-paginate-v2';
54
57
  import type mongooseRaw from 'mongoose';
55
58
  import { NextFunction } from 'express';
56
59
  import { NormalizedCacheObject } from '@apollo/client';
60
+ import type { Observable } from '@apollo/client/utilities';
61
+ import type { Operation } from '@apollo/client';
57
62
  import type { OptionalUnlessRequiredId } from 'mongodb';
58
63
  import type { PaginateModel } from 'mongoose';
59
64
  import type { PaginateOptions } from 'mongoose';
@@ -158,11 +163,15 @@ export { ApolloErrorProvider }
158
163
  export { ApolloErrorProvider as ApolloErrorProvider_alias_1 }
159
164
  export { ApolloErrorProvider as ApolloErrorProvider_alias_2 }
160
165
 
161
- declare function ApolloProvider({ isNextJS, options, children, }: I_ApolloProviderProps): React_2.JSX.Element;
166
+ declare function ApolloProvider({ options, children, }: I_ApolloProviderProps): React_2.JSX.Element;
162
167
  export { ApolloProvider }
163
168
  export { ApolloProvider as ApolloProvider_alias_1 }
164
169
  export { ApolloProvider as ApolloProvider_alias_2 }
165
170
 
171
+ declare function ApolloProviderNextJS({ options, children, }: I_ApolloProviderProps): React_2.JSX.Element;
172
+ export { ApolloProviderNextJS }
173
+ export { ApolloProviderNextJS as ApolloProviderNextJS_alias_1 }
174
+
166
175
  declare function appendFileSync(path: fsExtra.PathOrFileDescriptor, data: string | Uint8Array, options?: fsExtra.WriteFileOptions): void;
167
176
  export { appendFileSync }
168
177
  export { appendFileSync as appendFileSync_alias_1 }
@@ -270,6 +279,11 @@ export { copySync }
270
279
  export { copySync as copySync_alias_1 }
271
280
  export { copySync as copySync_alias_2 }
272
281
 
282
+ declare function createApolloLinks(options: I_ApolloOptions): ApolloLink_2[];
283
+ export { createApolloLinks }
284
+ export { createApolloLinks as createApolloLinks_alias_1 }
285
+ export { createApolloLinks as createApolloLinks_alias_2 }
286
+
273
287
  declare function createApolloServer(options: I_ApolloServerOptions): ApolloServer;
274
288
  export { createApolloServer }
275
289
  export { createApolloServer as createApolloServer_alias_1 }
@@ -1576,6 +1590,14 @@ declare const _default_3: {
1576
1590
  export { _default_3 as default_alias_2 }
1577
1591
  export { _default_3 as lintStagedConfig }
1578
1592
 
1593
+ declare class DevLoggerLink extends ApolloLink_2 {
1594
+ private count;
1595
+ request(operation: Operation, forward: (op: Operation) => Observable<FetchResult>): Observable<FetchResult>;
1596
+ }
1597
+ export { DevLoggerLink }
1598
+ export { DevLoggerLink as DevLoggerLink_alias_1 }
1599
+ export { DevLoggerLink as DevLoggerLink_alias_2 }
1600
+
1579
1601
  declare const dirname: (path: string) => string;
1580
1602
  export { dirname }
1581
1603
  export { dirname as dirname_alias_1 }
@@ -1710,11 +1732,15 @@ export { generateSlug }
1710
1732
  export { generateSlug as generateSlug_alias_1 }
1711
1733
  export { generateSlug as generateSlug_alias_2 }
1712
1734
 
1713
- declare function getClient(options?: I_ApolloOptions, isNextJS?: boolean): ApolloClient_2<NormalizedCacheObject>;
1735
+ declare function getClient(options?: I_ApolloOptions): ApolloClient_2<NormalizedCacheObject>;
1714
1736
  export { getClient }
1715
1737
  export { getClient as getClient_alias_1 }
1716
1738
  export { getClient as getClient_alias_2 }
1717
1739
 
1740
+ declare function getClientNextJS(options?: I_ApolloOptions): ApolloClient_3<unknown>;
1741
+ export { getClientNextJS }
1742
+ export { getClientNextJS as getClientNextJS_alias_1 }
1743
+
1718
1744
  declare function getEnv(): I_Environment;
1719
1745
  export { getEnv }
1720
1746
  export { getEnv as getEnv_alias_1 }
@@ -1794,9 +1820,7 @@ export { I_ApolloErrorContext as I_ApolloErrorContext_alias_2 }
1794
1820
  declare interface I_ApolloOptions extends Omit<ApolloClientOptions<NormalizedCacheObject>, 'cache'> {
1795
1821
  uri?: string | UriFunction;
1796
1822
  wsUrl?: string;
1797
- cache?: ApolloCache<NormalizedCacheObject>;
1798
1823
  customLinks?: ApolloLink[];
1799
- ssrMode?: boolean;
1800
1824
  }
1801
1825
  export { I_ApolloOptions }
1802
1826
  export { I_ApolloOptions as I_ApolloOptions_alias_1 }
@@ -1940,7 +1964,7 @@ export { I_EslintError as I_EslintError_alias_1 }
1940
1964
  export { I_EslintError as I_EslintError_alias_2 }
1941
1965
 
1942
1966
  declare interface I_ExpressOptions {
1943
- staticFolder?: string;
1967
+ static?: string | string[];
1944
1968
  }
1945
1969
  export { I_ExpressOptions }
1946
1970
  export { I_ExpressOptions as I_ExpressOptions_alias_1 }
@@ -2189,7 +2213,7 @@ declare interface I_MongooseOptions<T> {
2189
2213
 
2190
2214
  declare interface I_NestOptions {
2191
2215
  module: Type<object>;
2192
- staticFolder?: string;
2216
+ static?: string | string[];
2193
2217
  filters?: ExceptionFilter[];
2194
2218
  pipes?: ValidationPipe[];
2195
2219
  }
@@ -2396,7 +2420,7 @@ export { I_UserBackOptions as I_UserBackOptions_alias_1 }
2396
2420
 
2397
2421
  declare interface I_UserBackProps {
2398
2422
  token?: string;
2399
- options: I_UserBackOptions;
2423
+ options?: I_UserBackOptions;
2400
2424
  }
2401
2425
  export { I_UserBackProps }
2402
2426
  export { I_UserBackProps as I_UserBackProps_alias_1 }