@cyberskill/shared 1.195.0 → 1.197.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 +323 -61
- package/dist/_tsup-dts-rollup.d.cts +2 -4
- package/dist/_tsup-dts-rollup.d.ts +2 -4
- package/dist/node/express/express.util.cjs +1 -1
- package/dist/node/express/express.util.js +1 -1
- package/dist/node/express/index.cjs +1 -1
- package/dist/node/express/index.js +1 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.js +1 -1
- package/dist/react/apollo-client/apollo-client.component.cjs +1 -1
- package/dist/react/apollo-client/apollo-client.component.js +1 -1
- package/dist/react/apollo-client/apollo-client.util.cjs +1 -1
- package/dist/react/apollo-client/apollo-client.util.js +1 -1
- package/dist/react/apollo-client/index.cjs +1 -1
- package/dist/react/apollo-client/index.js +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,98 +1,360 @@
|
|
|
1
|
-
<
|
|
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
|
-
|
|
4
|
+
# CyberSkill Shared
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
**A comprehensive utility library for consistent development across CyberSkill projects**
|
|
7
|
+
|
|
8
|
+
[](https://npmjs.com/package/@cyberskill/shared)
|
|
9
|
+
[](https://npmjs.com/package/@cyberskill/shared)
|
|
10
|
+
[](https://opensource.org/licenses/MIT)
|
|
11
|
+
[](https://www.typescriptlang.org/)
|
|
12
|
+
[](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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
##
|
|
46
|
+
## ✨ Features
|
|
47
|
+
|
|
48
|
+
### 🛠️ Core Utilities
|
|
31
49
|
|
|
32
|
-
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
-
|
|
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
|
-
## 🚀
|
|
87
|
+
## 🚀 Installation
|
|
88
|
+
|
|
89
|
+
### Prerequisites
|
|
41
90
|
|
|
42
|
-
|
|
91
|
+
- Node.js 18+
|
|
92
|
+
- pnpm 8+
|
|
93
|
+
|
|
94
|
+
### Install Package
|
|
43
95
|
|
|
44
96
|
```bash
|
|
45
|
-
pnpm
|
|
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
|
-
##
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
|
64
|
-
|
|
|
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
|
-
##
|
|
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
|
-
|
|
72
|
-
├──
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
-
📄
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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>
|
|
@@ -1794,9 +1794,7 @@ export { I_ApolloErrorContext as I_ApolloErrorContext_alias_2 }
|
|
|
1794
1794
|
declare interface I_ApolloOptions extends Omit<ApolloClientOptions<NormalizedCacheObject>, 'cache'> {
|
|
1795
1795
|
uri?: string | UriFunction;
|
|
1796
1796
|
wsUrl?: string;
|
|
1797
|
-
cache?: ApolloCache<NormalizedCacheObject>;
|
|
1798
1797
|
customLinks?: ApolloLink[];
|
|
1799
|
-
ssrMode?: boolean;
|
|
1800
1798
|
}
|
|
1801
1799
|
export { I_ApolloOptions }
|
|
1802
1800
|
export { I_ApolloOptions as I_ApolloOptions_alias_1 }
|
|
@@ -1940,7 +1938,7 @@ export { I_EslintError as I_EslintError_alias_1 }
|
|
|
1940
1938
|
export { I_EslintError as I_EslintError_alias_2 }
|
|
1941
1939
|
|
|
1942
1940
|
declare interface I_ExpressOptions {
|
|
1943
|
-
|
|
1941
|
+
static?: string | string[];
|
|
1944
1942
|
}
|
|
1945
1943
|
export { I_ExpressOptions }
|
|
1946
1944
|
export { I_ExpressOptions as I_ExpressOptions_alias_1 }
|
|
@@ -2189,7 +2187,7 @@ declare interface I_MongooseOptions<T> {
|
|
|
2189
2187
|
|
|
2190
2188
|
declare interface I_NestOptions {
|
|
2191
2189
|
module: Type<object>;
|
|
2192
|
-
|
|
2190
|
+
static?: string | string[];
|
|
2193
2191
|
filters?: ExceptionFilter[];
|
|
2194
2192
|
pipes?: ValidationPipe[];
|
|
2195
2193
|
}
|
|
@@ -1794,9 +1794,7 @@ export { I_ApolloErrorContext as I_ApolloErrorContext_alias_2 }
|
|
|
1794
1794
|
declare interface I_ApolloOptions extends Omit<ApolloClientOptions<NormalizedCacheObject>, 'cache'> {
|
|
1795
1795
|
uri?: string | UriFunction;
|
|
1796
1796
|
wsUrl?: string;
|
|
1797
|
-
cache?: ApolloCache<NormalizedCacheObject>;
|
|
1798
1797
|
customLinks?: ApolloLink[];
|
|
1799
|
-
ssrMode?: boolean;
|
|
1800
1798
|
}
|
|
1801
1799
|
export { I_ApolloOptions }
|
|
1802
1800
|
export { I_ApolloOptions as I_ApolloOptions_alias_1 }
|
|
@@ -1940,7 +1938,7 @@ export { I_EslintError as I_EslintError_alias_1 }
|
|
|
1940
1938
|
export { I_EslintError as I_EslintError_alias_2 }
|
|
1941
1939
|
|
|
1942
1940
|
declare interface I_ExpressOptions {
|
|
1943
|
-
|
|
1941
|
+
static?: string | string[];
|
|
1944
1942
|
}
|
|
1945
1943
|
export { I_ExpressOptions }
|
|
1946
1944
|
export { I_ExpressOptions as I_ExpressOptions_alias_1 }
|
|
@@ -2189,7 +2187,7 @@ declare interface I_MongooseOptions<T> {
|
|
|
2189
2187
|
|
|
2190
2188
|
declare interface I_NestOptions {
|
|
2191
2189
|
module: Type<object>;
|
|
2192
|
-
|
|
2190
|
+
static?: string | string[];
|
|
2193
2191
|
filters?: ExceptionFilter[];
|
|
2194
2192
|
pipes?: ValidationPipe[];
|
|
2195
2193
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,r){if(r==null||r>e.length)r=e.length;for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function r(r){if(Array.isArray(r))return e(r)}function t(e,r,t,n,o,u,
|
|
1
|
+
"use strict";function e(e,r){if(r==null||r>e.length)r=e.length;for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function r(r){if(Array.isArray(r))return e(r)}function t(e,r,t,n,o,u,i){try{var a=e[u](i);var c=a.value}catch(e){t(e);return}if(a.done){r(c)}else{Promise.resolve(c).then(n,o)}}function n(e){return function(){var r=this,n=arguments;return new Promise(function(o,u){var i=e.apply(r,n);function a(e){t(i,o,u,a,c,"next",e)}function c(e){t(i,o,u,a,c,"throw",e)}a(undefined)})}}function o(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}function u(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};var n=Object.keys(t);if(typeof Object.getOwnPropertySymbols==="function"){n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))}n.forEach(function(r){o(e,r,t[r])})}return e}function c(e,r){if(e==null)return{};var t=s(e,r);var n,o;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(o=0;o<u.length;o++){n=u[o];if(r.indexOf(n)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,n))continue;t[n]=e[n]}}return t}function s(e,r){if(e==null)return{};var t={};var n=Object.keys(e);var o,u;for(u=0;u<n.length;u++){o=n[u];if(r.indexOf(o)>=0)continue;t[o]=e[o]}return t}function l(e){return r(e)||u(e)||p(e)||i()}function f(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function p(r,t){if(!r)return;if(typeof r==="string")return e(r,t);var n=Object.prototype.toString.call(r).slice(8,-1);if(n==="Object"&&r.constructor)n=r.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(r,t)}function y(e,r){var t,n,o,u={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=a(0),i["throw"]=a(1),i["return"]=a(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(e){return function(r){return c([e,r])}}function c(a){if(t)throw new TypeError("Generator is already executing.");while(i&&(i=0,a[0]&&(u=0)),u)try{if(t=1,n&&(o=a[0]&2?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;if(n=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:u.label++;return{value:a[1],done:false};case 5:u.label++;n=a[1];a=[0];continue;case 7:a=u.ops.pop();u.trys.pop();continue;default:if(!(o=u.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){u=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(a[0]===6&&u.label<o[1]){u.label=o[1];o=a;break}if(o&&u.label<o[2]){u.label=o[2];u.ops.push(a);break}if(o[2])u.ops.pop();u.trys.pop();continue}a=r.call(e,u)}catch(e){a=[6,e];n=0}finally{t=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}}var b=Object.create;var d=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var g=function(e,r){return d(e,"name",{value:r,configurable:!0})};var w=function(e,r){for(var t in r)d(e,t,{get:r[t],enumerable:!0})},j=function(e,r,t,n){var o=true,u=false,i=undefined;if(r&&(typeof r==="undefined"?"undefined":f(r))=="object"||typeof r=="function")try{var a=function(){var o=s.value;!h.call(e,o)&&o!==t&&d(e,o,{get:function(){return r[o]},enumerable:!(n=v(r,o))||n.enumerable})};for(var c=m(r)[Symbol.iterator](),s;!(o=(s=c.next()).done);o=true)a()}catch(e){u=true;i=e}finally{try{if(!o&&c.return!=null){c.return()}}finally{if(u){throw i}}}return e};var x=function(e,r,t){return t=e!=null?b(O(e)):{},j(r||!e||!e.__esModule?d(t,"default",{value:e,enumerable:!0}):t,e)},S=function(e){return j(d({},"__esModule",{value:!0}),e)};var P={};w(P,{bodyParser:function(){return C.default},createCors:function(){return _},createCorsOptions:function(){return M},createExpress:function(){return L},createNest:function(){return T},createSession:function(){return F},express:function(){return k.default}});module.exports=S(P);var A=require("@nestjs/core"),C=x(require("body-parser"),1),E=x(require("compression"),1),q=x(require("cookie-parser"),1),I=x(require("cors"),1),k=x(require("express"),1),N=x(require("express-session"),1),D=x(require("express-useragent"),1);function M(e){var r=e.isDev,t=e.whiteList,n=c(e,["isDev","whiteList"]);return a({origin:g(function(e,n){r||!e||(t===null||t===void 0?void 0:t.includes(e!==null&&e!==void 0?e:""))?n(null,!0):n(new Error("Not allowed by CORS"),!1)},"origin"),credentials:!0},n)}g(M,"createCorsOptions");function _(e){return(0,I.default)(M(e))}g(_,"createCors");function F(e){return(0,N.default)(e)}g(F,"createSession");function G(e){e.set("trust proxy",1),e.use((0,q.default)()),e.use(k.default.urlencoded({extended:!0})),e.use((0,E.default)()),e.use(D.default.express())}g(G,"setupMiddleware");function H(e,r){r&&(Array.isArray(r)?r:[r]).forEach(function(r){e.use(k.default.static(r))})}g(H,"setupStaticFolders");function L(e){var r=(0,k.default)();return G(r),H(r,e===null||e===void 0?void 0:e.static),r}g(L,"createExpress");function T(e){return n(function(){var r,t,n;return y(this,function(o){switch(o.label){case 0:return[4,A.NestFactory.create(e.module)];case 1:n=o.sent();return[2,(G(n.getHttpAdapter().getInstance()),H(n.getHttpAdapter().getInstance(),e.static),e.filters&&(r=n).useGlobalFilters.apply(r,l(e.filters)),e.pipes&&(t=n).useGlobalPipes.apply(t,l(e.pipes)),n)]}})})()}g(T,"createNest");0&&(module.exports={bodyParser:bodyParser,createCors:createCors,createCorsOptions:createCorsOptions,createExpress:createExpress,createNest:createNest,createSession:createSession,express:express});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,r){if(r==null||r>e.length)r=e.length;for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function r(r){if(Array.isArray(r))return e(r)}function t(e,r,t,n,o,i,a){try{var
|
|
1
|
+
function e(e,r){if(r==null||r>e.length)r=e.length;for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function r(r){if(Array.isArray(r))return e(r)}function t(e,r,t,n,o,i,a){try{var u=e[i](a);var s=u.value}catch(e){t(e);return}if(u.done){r(s)}else{Promise.resolve(s).then(n,o)}}function n(e){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=e.apply(r,n);function u(e){t(a,o,i,u,s,"next",e)}function s(e){t(a,o,i,u,s,"throw",e)}u(undefined)})}}function o(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}function i(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function a(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};var n=Object.keys(t);if(typeof Object.getOwnPropertySymbols==="function"){n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))}n.forEach(function(r){o(e,r,t[r])})}return e}function s(e,r){if(e==null)return{};var t=c(e,r);var n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++){n=i[o];if(r.indexOf(n)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,n))continue;t[n]=e[n]}}return t}function c(e,r){if(e==null)return{};var t={};var n=Object.keys(e);var o,i;for(i=0;i<n.length;i++){o=n[i];if(r.indexOf(o)>=0)continue;t[o]=e[o]}return t}function l(e){return r(e)||i(e)||f(e)||a()}function f(r,t){if(!r)return;if(typeof r==="string")return e(r,t);var n=Object.prototype.toString.call(r).slice(8,-1);if(n==="Object"&&r.constructor)n=r.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(r,t)}function p(e,r){var t,n,o,i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=u(0),a["throw"]=u(1),a["return"]=u(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(e){return function(r){return s([e,r])}}function s(u){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(i=0)),i)try{if(t=1,n&&(o=u[0]&2?n["return"]:u[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;if(n=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:i.label++;return{value:u[1],done:false};case 5:i.label++;n=u[1];u=[0];continue;case 7:u=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){i=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(u[0]===6&&i.label<o[1]){i.label=o[1];o=u;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(u);break}if(o[2])i.ops.pop();i.trys.pop();continue}u=r.call(e,i)}catch(e){u=[6,e];n=0}finally{t=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}}var y=Object.defineProperty;var b=function(e,r){return y(e,"name",{value:r,configurable:!0})};import{NestFactory as m}from"@nestjs/core";import d from"body-parser";import v from"compression";import h from"cookie-parser";import g from"cors";import w from"express";import O from"express-session";import j from"express-useragent";function x(e){var r=e.isDev,t=e.whiteList,n=s(e,["isDev","whiteList"]);return u({origin:b(function(e,n){r||!e||(t===null||t===void 0?void 0:t.includes(e!==null&&e!==void 0?e:""))?n(null,!0):n(new Error("Not allowed by CORS"),!1)},"origin"),credentials:!0},n)}b(x,"createCorsOptions");function S(e){return g(x(e))}b(S,"createCors");function A(e){return O(e)}b(A,"createSession");function P(e){e.set("trust proxy",1),e.use(h()),e.use(w.urlencoded({extended:!0})),e.use(v()),e.use(j.express())}b(P,"setupMiddleware");function E(e,r){r&&(Array.isArray(r)?r:[r]).forEach(function(r){e.use(w.static(r))})}b(E,"setupStaticFolders");function I(e){var r=w();return P(r),E(r,e===null||e===void 0?void 0:e.static),r}b(I,"createExpress");function k(e){return n(function(){var r,t,n;return p(this,function(o){switch(o.label){case 0:return[4,m.create(e.module)];case 1:n=o.sent();return[2,(P(n.getHttpAdapter().getInstance()),E(n.getHttpAdapter().getInstance(),e.static),e.filters&&(r=n).useGlobalFilters.apply(r,l(e.filters)),e.pipes&&(t=n).useGlobalPipes.apply(t,l(e.pipes)),n)]}})})()}b(k,"createNest");export{d as bodyParser,S as createCors,x as createCorsOptions,I as createExpress,k as createNest,A as createSession,w as express};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,r){if(r==null||r>e.length)r=e.length;for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function r(r){if(Array.isArray(r))return e(r)}function t(e,r,t,n,o,u,i){try{var a=e[u](i);var
|
|
1
|
+
"use strict";function e(e,r){if(r==null||r>e.length)r=e.length;for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function r(r){if(Array.isArray(r))return e(r)}function t(e,r,t,n,o,u,i){try{var a=e[u](i);var c=a.value}catch(e){t(e);return}if(a.done){r(c)}else{Promise.resolve(c).then(n,o)}}function n(e){return function(){var r=this,n=arguments;return new Promise(function(o,u){var i=e.apply(r,n);function a(e){t(i,o,u,a,c,"next",e)}function c(e){t(i,o,u,a,c,"throw",e)}a(undefined)})}}function o(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}function u(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};var n=Object.keys(t);if(typeof Object.getOwnPropertySymbols==="function"){n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))}n.forEach(function(r){o(e,r,t[r])})}return e}function c(e,r){if(e==null)return{};var t=s(e,r);var n,o;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(o=0;o<u.length;o++){n=u[o];if(r.indexOf(n)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,n))continue;t[n]=e[n]}}return t}function s(e,r){if(e==null)return{};var t={};var n=Object.keys(e);var o,u;for(u=0;u<n.length;u++){o=n[u];if(r.indexOf(o)>=0)continue;t[o]=e[o]}return t}function l(e){return r(e)||u(e)||p(e)||i()}function f(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function p(r,t){if(!r)return;if(typeof r==="string")return e(r,t);var n=Object.prototype.toString.call(r).slice(8,-1);if(n==="Object"&&r.constructor)n=r.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(r,t)}function y(e,r){var t,n,o,u={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=a(0),i["throw"]=a(1),i["return"]=a(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(e){return function(r){return c([e,r])}}function c(a){if(t)throw new TypeError("Generator is already executing.");while(i&&(i=0,a[0]&&(u=0)),u)try{if(t=1,n&&(o=a[0]&2?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;if(n=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:u.label++;return{value:a[1],done:false};case 5:u.label++;n=a[1];a=[0];continue;case 7:a=u.ops.pop();u.trys.pop();continue;default:if(!(o=u.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){u=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(a[0]===6&&u.label<o[1]){u.label=o[1];o=a;break}if(o&&u.label<o[2]){u.label=o[2];u.ops.push(a);break}if(o[2])u.ops.pop();u.trys.pop();continue}a=r.call(e,u)}catch(e){a=[6,e];n=0}finally{t=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}}var b=Object.create;var d=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var g=function(e,r){return d(e,"name",{value:r,configurable:!0})};var w=function(e,r){for(var t in r)d(e,t,{get:r[t],enumerable:!0})},x=function(e,r,t,n){var o=true,u=false,i=undefined;if(r&&(typeof r==="undefined"?"undefined":f(r))=="object"||typeof r=="function")try{var a=function(){var o=s.value;!h.call(e,o)&&o!==t&&d(e,o,{get:function(){return r[o]},enumerable:!(n=v(r,o))||n.enumerable})};for(var c=m(r)[Symbol.iterator](),s;!(o=(s=c.next()).done);o=true)a()}catch(e){u=true;i=e}finally{try{if(!o&&c.return!=null){c.return()}}finally{if(u){throw i}}}return e};var j=function(e,r,t){return t=e!=null?b(O(e)):{},x(r||!e||!e.__esModule?d(t,"default",{value:e,enumerable:!0}):t,e)},S=function(e){return x(d({},"__esModule",{value:!0}),e)};var P={};w(P,{Router:function(){return A.Router},bodyParser:function(){return E.default},createCors:function(){return _},createCorsOptions:function(){return M},createExpress:function(){return L},createNest:function(){return T},createSession:function(){return F},express:function(){return N.default}});module.exports=S(P);var A=require("express");var C=require("@nestjs/core"),E=j(require("body-parser"),1),q=j(require("compression"),1),I=j(require("cookie-parser"),1),k=j(require("cors"),1),N=j(require("express"),1),R=j(require("express-session"),1),D=j(require("express-useragent"),1);function M(e){var r=e.isDev,t=e.whiteList,n=c(e,["isDev","whiteList"]);return a({origin:g(function(e,n){r||!e||(t===null||t===void 0?void 0:t.includes(e!==null&&e!==void 0?e:""))?n(null,!0):n(new Error("Not allowed by CORS"),!1)},"origin"),credentials:!0},n)}g(M,"createCorsOptions");function _(e){return(0,k.default)(M(e))}g(_,"createCors");function F(e){return(0,R.default)(e)}g(F,"createSession");function G(e){e.set("trust proxy",1),e.use((0,I.default)()),e.use(N.default.urlencoded({extended:!0})),e.use((0,q.default)()),e.use(D.default.express())}g(G,"setupMiddleware");function H(e,r){r&&(Array.isArray(r)?r:[r]).forEach(function(r){e.use(N.default.static(r))})}g(H,"setupStaticFolders");function L(e){var r=(0,N.default)();return G(r),H(r,e===null||e===void 0?void 0:e.static),r}g(L,"createExpress");function T(e){return n(function(){var r,t,n;return y(this,function(o){switch(o.label){case 0:return[4,C.NestFactory.create(e.module)];case 1:n=o.sent();return[2,(G(n.getHttpAdapter().getInstance()),H(n.getHttpAdapter().getInstance(),e.static),e.filters&&(r=n).useGlobalFilters.apply(r,l(e.filters)),e.pipes&&(t=n).useGlobalPipes.apply(t,l(e.pipes)),n)]}})})()}g(T,"createNest");0&&(module.exports={Router:Router,bodyParser:bodyParser,createCors:createCors,createCorsOptions:createCorsOptions,createExpress:createExpress,createNest:createNest,createSession:createSession,express:express});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,r){if(r==null||r>e.length)r=e.length;for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function r(r){if(Array.isArray(r))return e(r)}function t(e,r,t,n,o,i,
|
|
1
|
+
function e(e,r){if(r==null||r>e.length)r=e.length;for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function r(r){if(Array.isArray(r))return e(r)}function t(e,r,t,n,o,i,a){try{var u=e[i](a);var s=u.value}catch(e){t(e);return}if(u.done){r(s)}else{Promise.resolve(s).then(n,o)}}function n(e){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=e.apply(r,n);function u(e){t(a,o,i,u,s,"next",e)}function s(e){t(a,o,i,u,s,"throw",e)}u(undefined)})}}function o(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}function i(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function a(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};var n=Object.keys(t);if(typeof Object.getOwnPropertySymbols==="function"){n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))}n.forEach(function(r){o(e,r,t[r])})}return e}function s(e,r){if(e==null)return{};var t=c(e,r);var n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++){n=i[o];if(r.indexOf(n)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,n))continue;t[n]=e[n]}}return t}function c(e,r){if(e==null)return{};var t={};var n=Object.keys(e);var o,i;for(i=0;i<n.length;i++){o=n[i];if(r.indexOf(o)>=0)continue;t[o]=e[o]}return t}function l(e){return r(e)||i(e)||f(e)||a()}function f(r,t){if(!r)return;if(typeof r==="string")return e(r,t);var n=Object.prototype.toString.call(r).slice(8,-1);if(n==="Object"&&r.constructor)n=r.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(r,t)}function p(e,r){var t,n,o,i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=u(0),a["throw"]=u(1),a["return"]=u(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(e){return function(r){return s([e,r])}}function s(u){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(i=0)),i)try{if(t=1,n&&(o=u[0]&2?n["return"]:u[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;if(n=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:i.label++;return{value:u[1],done:false};case 5:i.label++;n=u[1];u=[0];continue;case 7:u=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){i=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(u[0]===6&&i.label<o[1]){i.label=o[1];o=u;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(u);break}if(o[2])i.ops.pop();i.trys.pop();continue}u=r.call(e,i)}catch(e){u=[6,e];n=0}finally{t=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}}var y=Object.defineProperty;var b=function(e,r){return y(e,"name",{value:r,configurable:!0})};import{Router as m}from"express";import{NestFactory as d}from"@nestjs/core";import v from"body-parser";import h from"compression";import w from"cookie-parser";import g from"cors";import O from"express";import j from"express-session";import x from"express-useragent";function S(e){var r=e.isDev,t=e.whiteList,n=s(e,["isDev","whiteList"]);return u({origin:b(function(e,n){r||!e||(t===null||t===void 0?void 0:t.includes(e!==null&&e!==void 0?e:""))?n(null,!0):n(new Error("Not allowed by CORS"),!1)},"origin"),credentials:!0},n)}b(S,"createCorsOptions");function A(e){return g(S(e))}b(A,"createCors");function P(e){return j(e)}b(P,"createSession");function k(e){e.set("trust proxy",1),e.use(w()),e.use(O.urlencoded({extended:!0})),e.use(h()),e.use(x.express())}b(k,"setupMiddleware");function E(e,r){r&&(Array.isArray(r)?r:[r]).forEach(function(r){e.use(O.static(r))})}b(E,"setupStaticFolders");function I(e){var r=O();return k(r),E(r,e===null||e===void 0?void 0:e.static),r}b(I,"createExpress");function C(e){return n(function(){var r,t,n;return p(this,function(o){switch(o.label){case 0:return[4,d.create(e.module)];case 1:n=o.sent();return[2,(k(n.getHttpAdapter().getInstance()),E(n.getHttpAdapter().getInstance(),e.static),e.filters&&(r=n).useGlobalFilters.apply(r,l(e.filters)),e.pipes&&(t=n).useGlobalPipes.apply(t,l(e.pipes)),n)]}})})()}b(C,"createNest");export{m as Router,v as bodyParser,A as createCors,S as createCorsOptions,I as createExpress,C as createNest,P as createSession,O as express};
|