@uecsio/users-api 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +172 -0
- package/dist/controllers/users.controller.d.ts +8 -0
- package/dist/controllers/users.controller.d.ts.map +1 -0
- package/dist/controllers/users.controller.js +48 -0
- package/dist/controllers/users.controller.js.map +1 -0
- package/dist/dto/create-user.dto.d.ts +13 -0
- package/dist/dto/create-user.dto.d.ts.map +1 -0
- package/dist/dto/create-user.dto.js +115 -0
- package/dist/dto/create-user.dto.js.map +1 -0
- package/dist/dto/update-user.dto.d.ts +7 -0
- package/dist/dto/update-user.dto.d.ts.map +1 -0
- package/dist/dto/update-user.dto.js +30 -0
- package/dist/dto/update-user.dto.js.map +1 -0
- package/dist/entities/user.entity.d.ts +15 -0
- package/dist/entities/user.entity.d.ts.map +1 -0
- package/dist/entities/user.entity.js +68 -0
- package/dist/entities/user.entity.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/migrations/1704067200000-CreateUsersTable.d.ts +6 -0
- package/dist/migrations/1704067200000-CreateUsersTable.d.ts.map +1 -0
- package/dist/migrations/1704067200000-CreateUsersTable.js +98 -0
- package/dist/migrations/1704067200000-CreateUsersTable.js.map +1 -0
- package/dist/migrations/migration.config.d.ts +10 -0
- package/dist/migrations/migration.config.d.ts.map +1 -0
- package/dist/migrations/migration.config.js +13 -0
- package/dist/migrations/migration.config.js.map +1 -0
- package/dist/services/users.service.d.ts +7 -0
- package/dist/services/users.service.d.ts.map +1 -0
- package/dist/services/users.service.js +32 -0
- package/dist/services/users.service.js.map +1 -0
- package/dist/users.module.d.ts +3 -0
- package/dist/users.module.d.ts.map +1 -0
- package/dist/users.module.js +26 -0
- package/dist/users.module.js.map +1 -0
- package/package.json +81 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Dmytro Morozov
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# @uecsio/users-api
|
|
2
|
+
|
|
3
|
+
A reusable NestJS API Users module for user management, built with TypeORM and following NestJS best practices.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Complete CRUD Operations**: Full Create, Read, Update, Delete functionality for users
|
|
8
|
+
- **TypeORM Integration**: Built-in database entity and migration support
|
|
9
|
+
- **Validation**: Input validation using class-validator
|
|
10
|
+
- **Swagger Documentation**: Auto-generated API documentation
|
|
11
|
+
- **Modular Design**: Easy to integrate into existing NestJS applications
|
|
12
|
+
- **Migration Support**: Database schema management with TypeORM migrations
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @uecsio/users-api
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
### 1. Import the Module
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import { Module } from '@nestjs/common';
|
|
26
|
+
import { UsersModule } from '@uecsio/users-api';
|
|
27
|
+
|
|
28
|
+
@Module({
|
|
29
|
+
imports: [UsersModule],
|
|
30
|
+
})
|
|
31
|
+
export class AppModule {}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### 2. Configure TypeORM
|
|
35
|
+
|
|
36
|
+
The package automatically provides the User entity and migrations. Make sure your TypeORM configuration includes:
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
import { UsersMigrationConfig } from '@uecsio/users-api';
|
|
40
|
+
|
|
41
|
+
// In your TypeORM config
|
|
42
|
+
{
|
|
43
|
+
entities: [...UsersMigrationConfig.entities],
|
|
44
|
+
migrations: [...UsersMigrationConfig.migrations],
|
|
45
|
+
migrationsTableName: UsersMigrationConfig.migrationsTableName,
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 3. Use the Service
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
import { UsersService } from '@uecsio/users-api';
|
|
53
|
+
|
|
54
|
+
@Injectable()
|
|
55
|
+
export class MyService {
|
|
56
|
+
constructor(private readonly usersService: UsersService) {}
|
|
57
|
+
|
|
58
|
+
async createUser(userData: CreateUserDto) {
|
|
59
|
+
return this.usersService.create(userData);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## API Endpoints
|
|
65
|
+
|
|
66
|
+
The package automatically provides the following REST endpoints:
|
|
67
|
+
|
|
68
|
+
- `POST /users` - Create a new user
|
|
69
|
+
- `GET /users` - Get all users (with pagination)
|
|
70
|
+
- `GET /users/:id` - Get a specific user
|
|
71
|
+
- `PUT /users/:id` - Update a user
|
|
72
|
+
- `DELETE /users/:id` - Delete a user
|
|
73
|
+
|
|
74
|
+
## DTOs
|
|
75
|
+
|
|
76
|
+
### CreateUserDto
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
{
|
|
80
|
+
username: string; // Required, unique, max 128 chars
|
|
81
|
+
password: string; // Required, max 128 chars
|
|
82
|
+
role: string; // Required
|
|
83
|
+
status: number; // Required (0: inactive, 1: active)
|
|
84
|
+
name?: string; // Optional, max 255 chars
|
|
85
|
+
town: string; // Required, max 255 chars
|
|
86
|
+
address: string; // Required
|
|
87
|
+
email?: string; // Optional, max 128 chars, email format
|
|
88
|
+
phone: string; // Required, max 50 chars
|
|
89
|
+
profile?: string; // Optional
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### UpdateUserDto
|
|
94
|
+
|
|
95
|
+
Extends `CreateUserDto` with partial support, allowing you to update only specific fields.
|
|
96
|
+
|
|
97
|
+
## Entity
|
|
98
|
+
|
|
99
|
+
The User entity includes:
|
|
100
|
+
|
|
101
|
+
- `id`: Auto-generated primary key
|
|
102
|
+
- `username`: Unique username (128 chars max)
|
|
103
|
+
- `password`: User password (128 chars max)
|
|
104
|
+
- `role`: User role
|
|
105
|
+
- `status`: User status (0: inactive, 1: active)
|
|
106
|
+
- `name`: Full name (optional, 255 chars max)
|
|
107
|
+
- `town`: Town/city (255 chars max)
|
|
108
|
+
- `address`: Full address
|
|
109
|
+
- `email`: Email address (optional, 128 chars max)
|
|
110
|
+
- `phone`: Phone number (50 chars max)
|
|
111
|
+
- `profile`: Additional profile info (optional)
|
|
112
|
+
- `createdAt`: Timestamp of creation
|
|
113
|
+
|
|
114
|
+
## Database Indexes
|
|
115
|
+
|
|
116
|
+
The package automatically creates the following database indexes for optimal performance:
|
|
117
|
+
|
|
118
|
+
- `IDX_USERS_USERNAME`: Unique index on username
|
|
119
|
+
- `IDX_USERS_STATUS`: Index on status for filtering
|
|
120
|
+
- `IDX_USERS_ROLE`: Index on role for filtering
|
|
121
|
+
- `IDX_USERS_EMAIL`: Index on email for lookups
|
|
122
|
+
|
|
123
|
+
## Development
|
|
124
|
+
|
|
125
|
+
### Building
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
npm run build
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Testing
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
npm test
|
|
135
|
+
npm run test:watch
|
|
136
|
+
npm run test:cov
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Linting
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
npm run lint
|
|
143
|
+
npm run lint:fix
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Dependencies
|
|
147
|
+
|
|
148
|
+
### Peer Dependencies
|
|
149
|
+
|
|
150
|
+
- `@nestjs/common`: ^11.0.0
|
|
151
|
+
- `@nestjs/core`: ^11.0.0
|
|
152
|
+
- `@nestjs/typeorm`: ^11.0.0
|
|
153
|
+
- `typeorm`: ^0.3.0
|
|
154
|
+
- `class-validator`: ^0.14.0
|
|
155
|
+
- `class-transformer`: ^0.5.1
|
|
156
|
+
- `@nestjs-library/crud`: ^0.13.1
|
|
157
|
+
|
|
158
|
+
## License
|
|
159
|
+
|
|
160
|
+
MIT
|
|
161
|
+
|
|
162
|
+
## Contributing
|
|
163
|
+
|
|
164
|
+
1. Fork the repository
|
|
165
|
+
2. Create a feature branch
|
|
166
|
+
3. Make your changes
|
|
167
|
+
4. Add tests
|
|
168
|
+
5. Submit a pull request
|
|
169
|
+
|
|
170
|
+
## Support
|
|
171
|
+
|
|
172
|
+
For issues and questions, please use the GitHub issue tracker.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CrudController } from '@nestjs-library/crud';
|
|
2
|
+
import { User } from '../entities/user.entity';
|
|
3
|
+
import { UsersService } from '../services/users.service';
|
|
4
|
+
export declare class UsersController implements CrudController<User> {
|
|
5
|
+
readonly crudService: UsersService;
|
|
6
|
+
constructor(crudService: UsersService);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=users.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/users.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAIzD,qBAmBa,eAAgB,YAAW,cAAc,CAAC,IAAI,CAAC;aAC9B,WAAW,EAAE,YAAY;gBAAzB,WAAW,EAAE,YAAY;CACtD"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UsersController = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const crud_1 = require("@nestjs-library/crud");
|
|
15
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
16
|
+
const user_entity_1 = require("../entities/user.entity");
|
|
17
|
+
const users_service_1 = require("../services/users.service");
|
|
18
|
+
const create_user_dto_1 = require("../dto/create-user.dto");
|
|
19
|
+
const update_user_dto_1 = require("../dto/update-user.dto");
|
|
20
|
+
let UsersController = class UsersController {
|
|
21
|
+
constructor(crudService) {
|
|
22
|
+
this.crudService = crudService;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.UsersController = UsersController;
|
|
26
|
+
exports.UsersController = UsersController = __decorate([
|
|
27
|
+
(0, swagger_1.ApiTags)('users'),
|
|
28
|
+
(0, crud_1.Crud)({
|
|
29
|
+
entity: user_entity_1.User,
|
|
30
|
+
routes: {
|
|
31
|
+
create: {
|
|
32
|
+
swagger: {
|
|
33
|
+
body: create_user_dto_1.CreateUserDto,
|
|
34
|
+
response: user_entity_1.User,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
update: {
|
|
38
|
+
swagger: {
|
|
39
|
+
body: update_user_dto_1.UpdateUserDto,
|
|
40
|
+
response: user_entity_1.User,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
}),
|
|
45
|
+
(0, common_1.Controller)('users'),
|
|
46
|
+
__metadata("design:paramtypes", [users_service_1.UsersService])
|
|
47
|
+
], UsersController);
|
|
48
|
+
//# sourceMappingURL=users.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.controller.js","sourceRoot":"","sources":["../../src/controllers/users.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+CAA4D;AAC5D,6CAA0C;AAC1C,yDAA+C;AAC/C,6DAAyD;AACzD,4DAAuD;AACvD,4DAAuD;AAqBhD,IAAM,eAAe,GAArB,MAAM,eAAe;IAC1B,YAA4B,WAAyB;QAAzB,gBAAW,GAAX,WAAW,CAAc;IAAG,CAAC;CAC1D,CAAA;AAFY,0CAAe;0BAAf,eAAe;IAnB3B,IAAA,iBAAO,EAAC,OAAO,CAAC;IAChB,IAAA,WAAI,EAAC;QACJ,MAAM,EAAE,kBAAI;QACZ,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,OAAO,EAAE;oBACP,IAAI,EAAE,+BAAa;oBACnB,QAAQ,EAAE,kBAAI;iBACf;aACF;YACD,MAAM,EAAE;gBACN,OAAO,EAAE;oBACP,IAAI,EAAE,+BAAa;oBACnB,QAAQ,EAAE,kBAAI;iBACf;aACF;SACF;KACF,CAAC;IACD,IAAA,mBAAU,EAAC,OAAO,CAAC;qCAEuB,4BAAY;GAD1C,eAAe,CAE3B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare class CreateUserDto {
|
|
2
|
+
username: string;
|
|
3
|
+
password: string;
|
|
4
|
+
role: string;
|
|
5
|
+
status: number;
|
|
6
|
+
name?: string;
|
|
7
|
+
town: string;
|
|
8
|
+
address: string;
|
|
9
|
+
email?: string;
|
|
10
|
+
phone: string;
|
|
11
|
+
profile?: string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=create-user.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-user.dto.d.ts","sourceRoot":"","sources":["../../src/dto/create-user.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,aAAa;IAQxB,QAAQ,EAAE,MAAM,CAAC;IASjB,QAAQ,EAAE,MAAM,CAAC;IAQjB,IAAI,EAAE,MAAM,CAAC;IASb,MAAM,EAAE,MAAM,CAAC;IASf,IAAI,CAAC,EAAE,MAAM,CAAC;IASd,IAAI,EAAE,MAAM,CAAC;IAQb,OAAO,EAAE,MAAM,CAAC;IAShB,KAAK,CAAC,EAAE,MAAM,CAAC;IASf,KAAK,EAAE,MAAM,CAAC;IAQd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CreateUserDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
class CreateUserDto {
|
|
16
|
+
}
|
|
17
|
+
exports.CreateUserDto = CreateUserDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({
|
|
20
|
+
description: 'The username of the user',
|
|
21
|
+
example: 'john_doe',
|
|
22
|
+
maxLength: 128,
|
|
23
|
+
}),
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], CreateUserDto.prototype, "username", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, swagger_1.ApiProperty)({
|
|
30
|
+
description: 'The password of the user',
|
|
31
|
+
example: 'securePassword123',
|
|
32
|
+
maxLength: 128,
|
|
33
|
+
}),
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], CreateUserDto.prototype, "password", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, swagger_1.ApiProperty)({
|
|
40
|
+
description: 'The role of the user',
|
|
41
|
+
example: 'admin',
|
|
42
|
+
}),
|
|
43
|
+
(0, class_validator_1.IsString)(),
|
|
44
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], CreateUserDto.prototype, "role", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, swagger_1.ApiProperty)({
|
|
49
|
+
description: 'The status of the user (1: active, 0: inactive)',
|
|
50
|
+
example: 1,
|
|
51
|
+
minimum: 0,
|
|
52
|
+
maximum: 1,
|
|
53
|
+
}),
|
|
54
|
+
(0, class_validator_1.IsNumber)(),
|
|
55
|
+
__metadata("design:type", Number)
|
|
56
|
+
], CreateUserDto.prototype, "status", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
59
|
+
description: 'The full name of the user',
|
|
60
|
+
example: 'John Doe',
|
|
61
|
+
maxLength: 255,
|
|
62
|
+
}),
|
|
63
|
+
(0, class_validator_1.IsOptional)(),
|
|
64
|
+
(0, class_validator_1.IsString)(),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], CreateUserDto.prototype, "name", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, swagger_1.ApiProperty)({
|
|
69
|
+
description: 'The town/city of the user',
|
|
70
|
+
example: 'New York',
|
|
71
|
+
maxLength: 255,
|
|
72
|
+
}),
|
|
73
|
+
(0, class_validator_1.IsString)(),
|
|
74
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], CreateUserDto.prototype, "town", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, swagger_1.ApiProperty)({
|
|
79
|
+
description: 'The address of the user',
|
|
80
|
+
example: '123 Main Street, Apt 4B',
|
|
81
|
+
}),
|
|
82
|
+
(0, class_validator_1.IsString)(),
|
|
83
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], CreateUserDto.prototype, "address", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
88
|
+
description: 'The email address of the user',
|
|
89
|
+
example: 'john.doe@example.com',
|
|
90
|
+
maxLength: 128,
|
|
91
|
+
}),
|
|
92
|
+
(0, class_validator_1.IsOptional)(),
|
|
93
|
+
(0, class_validator_1.IsEmail)(),
|
|
94
|
+
__metadata("design:type", String)
|
|
95
|
+
], CreateUserDto.prototype, "email", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, swagger_1.ApiProperty)({
|
|
98
|
+
description: 'The phone number of the user',
|
|
99
|
+
example: '+1234567890',
|
|
100
|
+
maxLength: 50,
|
|
101
|
+
}),
|
|
102
|
+
(0, class_validator_1.IsString)(),
|
|
103
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
104
|
+
__metadata("design:type", String)
|
|
105
|
+
], CreateUserDto.prototype, "phone", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
108
|
+
description: 'Additional profile information',
|
|
109
|
+
example: 'Software developer with 5 years experience',
|
|
110
|
+
}),
|
|
111
|
+
(0, class_validator_1.IsOptional)(),
|
|
112
|
+
(0, class_validator_1.IsString)(),
|
|
113
|
+
__metadata("design:type", String)
|
|
114
|
+
], CreateUserDto.prototype, "profile", void 0);
|
|
115
|
+
//# sourceMappingURL=create-user.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-user.dto.js","sourceRoot":"","sources":["../../src/dto/create-user.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAsF;AACtF,6CAAmE;AAEnE,MAAa,aAAa;CAuFzB;AAvFD,sCAuFC;AA/EC;IAPC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,0BAA0B;QACvC,OAAO,EAAE,UAAU;QACnB,SAAS,EAAE,GAAG;KACf,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACI;AASjB;IAPC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,0BAA0B;QACvC,OAAO,EAAE,mBAAmB;QAC5B,SAAS,EAAE,GAAG;KACf,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACI;AAQjB;IANC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,sBAAsB;QACnC,OAAO,EAAE,OAAO;KACjB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2CACA;AASb;IAPC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,iDAAiD;QAC9D,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,CAAC;KACX,CAAC;IACD,IAAA,0BAAQ,GAAE;;6CACI;AASf;IAPC,IAAA,6BAAmB,EAAC;QACnB,WAAW,EAAE,2BAA2B;QACxC,OAAO,EAAE,UAAU;QACnB,SAAS,EAAE,GAAG;KACf,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;2CACG;AASd;IAPC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,2BAA2B;QACxC,OAAO,EAAE,UAAU;QACnB,SAAS,EAAE,GAAG;KACf,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2CACA;AAQb;IANC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,yBAAyB;QACtC,OAAO,EAAE,yBAAyB;KACnC,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;8CACG;AAShB;IAPC,IAAA,6BAAmB,EAAC;QACnB,WAAW,EAAE,+BAA+B;QAC5C,OAAO,EAAE,sBAAsB;QAC/B,SAAS,EAAE,GAAG;KACf,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;;4CACK;AASf;IAPC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,8BAA8B;QAC3C,OAAO,EAAE,aAAa;QACtB,SAAS,EAAE,EAAE;KACd,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4CACC;AAQd;IANC,IAAA,6BAAmB,EAAC;QACnB,WAAW,EAAE,gCAAgC;QAC7C,OAAO,EAAE,4CAA4C;KACtD,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;8CACM"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CreateUserDto } from './create-user.dto';
|
|
2
|
+
declare const UpdateUserDto_base: import("@nestjs/mapped-types").MappedType<Partial<CreateUserDto>>;
|
|
3
|
+
export declare class UpdateUserDto extends UpdateUserDto_base {
|
|
4
|
+
id?: number;
|
|
5
|
+
}
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=update-user.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-user.dto.d.ts","sourceRoot":"","sources":["../../src/dto/update-user.dto.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;;AAElD,qBAAa,aAAc,SAAQ,kBAA0B;IAQ3D,EAAE,CAAC,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UpdateUserDto = void 0;
|
|
13
|
+
const mapped_types_1 = require("@nestjs/mapped-types");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
16
|
+
const create_user_dto_1 = require("./create-user.dto");
|
|
17
|
+
class UpdateUserDto extends (0, mapped_types_1.PartialType)(create_user_dto_1.CreateUserDto) {
|
|
18
|
+
}
|
|
19
|
+
exports.UpdateUserDto = UpdateUserDto;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
22
|
+
description: 'The unique identifier of the user',
|
|
23
|
+
example: 1,
|
|
24
|
+
readOnly: true,
|
|
25
|
+
}),
|
|
26
|
+
(0, class_validator_1.IsOptional)(),
|
|
27
|
+
(0, class_validator_1.IsNumber)(),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], UpdateUserDto.prototype, "id", void 0);
|
|
30
|
+
//# sourceMappingURL=update-user.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-user.dto.js","sourceRoot":"","sources":["../../src/dto/update-user.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAmD;AACnD,qDAAuD;AACvD,6CAAsD;AACtD,uDAAkD;AAElD,MAAa,aAAc,SAAQ,IAAA,0BAAW,EAAC,+BAAa,CAAC;CAS5D;AATD,sCASC;AADC;IAPC,IAAA,6BAAmB,EAAC;QACnB,WAAW,EAAE,mCAAmC;QAChD,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yCACC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class User {
|
|
2
|
+
id: number;
|
|
3
|
+
username: string;
|
|
4
|
+
password: string;
|
|
5
|
+
role: string;
|
|
6
|
+
status: number;
|
|
7
|
+
name: string;
|
|
8
|
+
town: string;
|
|
9
|
+
address: string;
|
|
10
|
+
email: string;
|
|
11
|
+
phone: string;
|
|
12
|
+
profile: string;
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=user.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.entity.d.ts","sourceRoot":"","sources":["../../src/entities/user.entity.ts"],"names":[],"mappings":"AAOA,qBACa,IAAI;IAEf,EAAE,EAAE,MAAM,CAAC;IAGX,QAAQ,EAAE,MAAM,CAAC;IAGjB,QAAQ,EAAE,MAAM,CAAC;IAGjB,IAAI,EAAE,MAAM,CAAC;IAGb,MAAM,EAAE,MAAM,CAAC;IAGf,IAAI,EAAE,MAAM,CAAC;IAGb,IAAI,EAAE,MAAM,CAAC;IAGb,OAAO,EAAE,MAAM,CAAC;IAGhB,KAAK,EAAE,MAAM,CAAC;IAGd,KAAK,EAAE,MAAM,CAAC;IAGd,OAAO,EAAE,MAAM,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;CACjB"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.User = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
let User = class User {
|
|
15
|
+
};
|
|
16
|
+
exports.User = User;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
19
|
+
__metadata("design:type", Number)
|
|
20
|
+
], User.prototype, "id", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.Column)({ unique: true, length: 128 }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], User.prototype, "username", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ length: 128 }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], User.prototype, "password", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], User.prototype, "role", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)(),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], User.prototype, "status", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ length: 255, nullable: true }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], User.prototype, "name", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ length: 255 }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], User.prototype, "town", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], User.prototype, "address", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ nullable: true, length: 128 }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], User.prototype, "email", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ length: 50 }),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], User.prototype, "phone", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], User.prototype, "profile", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
63
|
+
__metadata("design:type", Date)
|
|
64
|
+
], User.prototype, "createdAt", void 0);
|
|
65
|
+
exports.User = User = __decorate([
|
|
66
|
+
(0, typeorm_1.Entity)()
|
|
67
|
+
], User);
|
|
68
|
+
//# sourceMappingURL=user.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.entity.js","sourceRoot":"","sources":["../../src/entities/user.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAKiB;AAGV,IAAM,IAAI,GAAV,MAAM,IAAI;CAoChB,CAAA;AApCY,oBAAI;AAEf;IADC,IAAA,gCAAsB,GAAE;;gCACd;AAGX;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;sCACrB;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;sCACP;AAGjB;IADC,IAAA,gBAAM,GAAE;;kCACI;AAGb;IADC,IAAA,gBAAM,GAAE;;oCACM;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kCAC3B;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;kCACX;AAGb;IADC,IAAA,gBAAM,GAAE;;qCACO;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;mCAC1B;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;mCACT;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qCACX;AAGhB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB,EAAE,CAAC;8BACjE,IAAI;uCAAC;eAnCL,IAAI;IADhB,IAAA,gBAAM,GAAE;GACI,IAAI,CAoChB"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './users.module';
|
|
2
|
+
export * from './services/users.service';
|
|
3
|
+
export * from './controllers/users.controller';
|
|
4
|
+
export * from './dto/create-user.dto';
|
|
5
|
+
export * from './dto/update-user.dto';
|
|
6
|
+
export * from './entities/user.entity';
|
|
7
|
+
export * from './migrations/migration.config';
|
|
8
|
+
export { User } from './entities/user.entity';
|
|
9
|
+
export { CreateUserDto } from './dto/create-user.dto';
|
|
10
|
+
export { UpdateUserDto } from './dto/update-user.dto';
|
|
11
|
+
export { UsersService } from './services/users.service';
|
|
12
|
+
export { UsersController } from './controllers/users.controller';
|
|
13
|
+
export { UsersModule } from './users.module';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AAGvC,cAAc,+BAA+B,CAAC;AAG9C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.UsersModule = exports.UsersController = exports.UsersService = exports.UpdateUserDto = exports.CreateUserDto = exports.User = void 0;
|
|
18
|
+
__exportStar(require("./users.module"), exports);
|
|
19
|
+
__exportStar(require("./services/users.service"), exports);
|
|
20
|
+
__exportStar(require("./controllers/users.controller"), exports);
|
|
21
|
+
__exportStar(require("./dto/create-user.dto"), exports);
|
|
22
|
+
__exportStar(require("./dto/update-user.dto"), exports);
|
|
23
|
+
__exportStar(require("./entities/user.entity"), exports);
|
|
24
|
+
__exportStar(require("./migrations/migration.config"), exports);
|
|
25
|
+
var user_entity_1 = require("./entities/user.entity");
|
|
26
|
+
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return user_entity_1.User; } });
|
|
27
|
+
var create_user_dto_1 = require("./dto/create-user.dto");
|
|
28
|
+
Object.defineProperty(exports, "CreateUserDto", { enumerable: true, get: function () { return create_user_dto_1.CreateUserDto; } });
|
|
29
|
+
var update_user_dto_1 = require("./dto/update-user.dto");
|
|
30
|
+
Object.defineProperty(exports, "UpdateUserDto", { enumerable: true, get: function () { return update_user_dto_1.UpdateUserDto; } });
|
|
31
|
+
var users_service_1 = require("./services/users.service");
|
|
32
|
+
Object.defineProperty(exports, "UsersService", { enumerable: true, get: function () { return users_service_1.UsersService; } });
|
|
33
|
+
var users_controller_1 = require("./controllers/users.controller");
|
|
34
|
+
Object.defineProperty(exports, "UsersController", { enumerable: true, get: function () { return users_controller_1.UsersController; } });
|
|
35
|
+
var users_module_1 = require("./users.module");
|
|
36
|
+
Object.defineProperty(exports, "UsersModule", { enumerable: true, get: function () { return users_module_1.UsersModule; } });
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,iDAA+B;AAC/B,2DAAyC;AACzC,iEAA+C;AAC/C,wDAAsC;AACtC,wDAAsC;AACtC,yDAAuC;AAGvC,gEAA8C;AAG9C,sDAA8C;AAArC,mGAAA,IAAI,OAAA;AACb,yDAAsD;AAA7C,gHAAA,aAAa,OAAA;AACtB,yDAAsD;AAA7C,gHAAA,aAAa,OAAA;AACtB,0DAAwD;AAA/C,6GAAA,YAAY,OAAA;AACrB,mEAAiE;AAAxD,mHAAA,eAAe,OAAA;AACxB,+CAA6C;AAApC,2GAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
export declare class CreateUsersTable1704067200000 implements MigrationInterface {
|
|
3
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
4
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=1704067200000-CreateUsersTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1704067200000-CreateUsersTable.d.ts","sourceRoot":"","sources":["../../src/migrations/1704067200000-CreateUsersTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAqB,MAAM,SAAS,CAAC;AAE7E,qBAAa,6BAA8B,YAAW,kBAAkB;IACzD,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAmG3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAG3D"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateUsersTable1704067200000 = void 0;
|
|
4
|
+
const typeorm_1 = require("typeorm");
|
|
5
|
+
class CreateUsersTable1704067200000 {
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.createTable(new typeorm_1.Table({
|
|
8
|
+
name: 'users',
|
|
9
|
+
columns: [
|
|
10
|
+
{
|
|
11
|
+
name: 'id',
|
|
12
|
+
type: 'int',
|
|
13
|
+
isPrimary: true,
|
|
14
|
+
isGenerated: true,
|
|
15
|
+
generationStrategy: 'increment',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'username',
|
|
19
|
+
type: 'varchar',
|
|
20
|
+
length: '128',
|
|
21
|
+
isNullable: false,
|
|
22
|
+
isUnique: true,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'password',
|
|
26
|
+
type: 'varchar',
|
|
27
|
+
length: '128',
|
|
28
|
+
isNullable: false,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'role',
|
|
32
|
+
type: 'varchar',
|
|
33
|
+
length: '255',
|
|
34
|
+
isNullable: false,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'status',
|
|
38
|
+
type: 'int',
|
|
39
|
+
isNullable: false,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'name',
|
|
43
|
+
type: 'varchar',
|
|
44
|
+
length: '255',
|
|
45
|
+
isNullable: true,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'town',
|
|
49
|
+
type: 'varchar',
|
|
50
|
+
length: '255',
|
|
51
|
+
isNullable: false,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'address',
|
|
55
|
+
type: 'text',
|
|
56
|
+
isNullable: false,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'email',
|
|
60
|
+
type: 'varchar',
|
|
61
|
+
length: '128',
|
|
62
|
+
isNullable: true,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'phone',
|
|
66
|
+
type: 'varchar',
|
|
67
|
+
length: '50',
|
|
68
|
+
isNullable: false,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'profile',
|
|
72
|
+
type: 'text',
|
|
73
|
+
isNullable: true,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: 'created_at',
|
|
77
|
+
type: 'timestamp',
|
|
78
|
+
default: 'CURRENT_TIMESTAMP',
|
|
79
|
+
isNullable: false,
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
}), true);
|
|
83
|
+
await queryRunner.createIndex('users', new typeorm_1.TableIndex({
|
|
84
|
+
name: 'IDX_USERS_USERNAME',
|
|
85
|
+
columnNames: ['username'],
|
|
86
|
+
isUnique: true,
|
|
87
|
+
}));
|
|
88
|
+
await queryRunner.createIndex('users', new typeorm_1.TableIndex({
|
|
89
|
+
name: 'IDX_USERS_EMAIL',
|
|
90
|
+
columnNames: ['email'],
|
|
91
|
+
}));
|
|
92
|
+
}
|
|
93
|
+
async down(queryRunner) {
|
|
94
|
+
await queryRunner.dropTable('users');
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
exports.CreateUsersTable1704067200000 = CreateUsersTable1704067200000;
|
|
98
|
+
//# sourceMappingURL=1704067200000-CreateUsersTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1704067200000-CreateUsersTable.js","sourceRoot":"","sources":["../../src/migrations/1704067200000-CreateUsersTable.ts"],"names":[],"mappings":";;;AAAA,qCAA6E;AAE7E,MAAa,6BAA6B;IACjC,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,WAAW,CAC3B,IAAI,eAAK,CAAC;YACR,IAAI,EAAE,OAAO;YACb,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,IAAI;oBACV,IAAI,EAAE,KAAK;oBACX,SAAS,EAAE,IAAI;oBACf,WAAW,EAAE,IAAI;oBACjB,kBAAkB,EAAE,WAAW;iBAChC;gBACD;oBACE,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,MAAM,EAAE,KAAK;oBACb,UAAU,EAAE,KAAK;oBACjB,QAAQ,EAAE,IAAI;iBACf;gBACD;oBACE,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,MAAM,EAAE,KAAK;oBACb,UAAU,EAAE,KAAK;iBAClB;gBACD;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS;oBACf,MAAM,EAAE,KAAK;oBACb,UAAU,EAAE,KAAK;iBAClB;gBACD;oBACE,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,KAAK;oBACX,UAAU,EAAE,KAAK;iBAClB;gBACD;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS;oBACf,MAAM,EAAE,KAAK;oBACb,UAAU,EAAE,IAAI;iBACjB;gBACD;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS;oBACf,MAAM,EAAE,KAAK;oBACb,UAAU,EAAE,KAAK;iBAClB;gBACD;oBACE,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,MAAM;oBACZ,UAAU,EAAE,KAAK;iBAClB;gBACD;oBACE,IAAI,EAAE,OAAO;oBACb,IAAI,EAAE,SAAS;oBACf,MAAM,EAAE,KAAK;oBACb,UAAU,EAAE,IAAI;iBACjB;gBACD;oBACE,IAAI,EAAE,OAAO;oBACb,IAAI,EAAE,SAAS;oBACf,MAAM,EAAE,IAAI;oBACZ,UAAU,EAAE,KAAK;iBAClB;gBACD;oBACE,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,MAAM;oBACZ,UAAU,EAAE,IAAI;iBACjB;gBACD;oBACE,IAAI,EAAE,YAAY;oBAClB,IAAI,EAAE,WAAW;oBACjB,OAAO,EAAE,mBAAmB;oBAC5B,UAAU,EAAE,KAAK;iBAClB;aACF;SACF,CAAC,EACF,IAAI,CACL,CAAC;QAEF,MAAM,WAAW,CAAC,WAAW,CAC3B,OAAO,EACP,IAAI,oBAAU,CAAC;YACb,IAAI,EAAE,oBAAoB;YAC1B,WAAW,EAAE,CAAC,UAAU,CAAC;YACzB,QAAQ,EAAE,IAAI;SACf,CAAC,CACH,CAAC;QAEF,MAAM,WAAW,CAAC,WAAW,CAC3B,OAAO,EACP,IAAI,oBAAU,CAAC;YACb,IAAI,EAAE,iBAAiB;YACvB,WAAW,EAAE,CAAC,OAAO,CAAC;SACvB,CAAC,CACH,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACxC,MAAM,WAAW,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;CACF;AAvGD,sEAuGC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { User } from '../entities/user.entity';
|
|
2
|
+
import { CreateUsersTable1704067200000 } from './1704067200000-CreateUsersTable';
|
|
3
|
+
export declare const UsersMigrationConfig: {
|
|
4
|
+
entities: (typeof User)[];
|
|
5
|
+
migrations: (typeof CreateUsersTable1704067200000)[];
|
|
6
|
+
migrationsTableName: string;
|
|
7
|
+
};
|
|
8
|
+
export { CreateUsersTable1704067200000 };
|
|
9
|
+
export { User };
|
|
10
|
+
//# sourceMappingURL=migration.config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration.config.d.ts","sourceRoot":"","sources":["../../src/migrations/migration.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AAMjF,eAAO,MAAM,oBAAoB;;;;CAIhC,CAAC;AAKF,OAAO,EAAE,6BAA6B,EAAE,CAAC;AAKzC,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.User = exports.CreateUsersTable1704067200000 = exports.UsersMigrationConfig = void 0;
|
|
4
|
+
const user_entity_1 = require("../entities/user.entity");
|
|
5
|
+
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return user_entity_1.User; } });
|
|
6
|
+
const _1704067200000_CreateUsersTable_1 = require("./1704067200000-CreateUsersTable");
|
|
7
|
+
Object.defineProperty(exports, "CreateUsersTable1704067200000", { enumerable: true, get: function () { return _1704067200000_CreateUsersTable_1.CreateUsersTable1704067200000; } });
|
|
8
|
+
exports.UsersMigrationConfig = {
|
|
9
|
+
entities: [user_entity_1.User],
|
|
10
|
+
migrations: [_1704067200000_CreateUsersTable_1.CreateUsersTable1704067200000],
|
|
11
|
+
migrationsTableName: 'migrations',
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=migration.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration.config.js","sourceRoot":"","sources":["../../src/migrations/migration.config.ts"],"names":[],"mappings":";;;AAAA,yDAA+C;AAqBtC,qFArBA,kBAAI,OAqBA;AApBb,sFAAiF;AAexE,8GAfA,+DAA6B,OAeA;AATzB,QAAA,oBAAoB,GAAG;IAClC,QAAQ,EAAE,CAAC,kBAAI,CAAC;IAChB,UAAU,EAAE,CAAC,+DAA6B,CAAC;IAC3C,mBAAmB,EAAE,YAAY;CAClC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CrudService } from '@nestjs-library/crud';
|
|
2
|
+
import { Repository } from 'typeorm';
|
|
3
|
+
import { User } from '../entities/user.entity';
|
|
4
|
+
export declare class UsersService extends CrudService<User> {
|
|
5
|
+
constructor(repository: Repository<User>);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=users.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.service.d.ts","sourceRoot":"","sources":["../../src/services/users.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE/C,qBACa,YAAa,SAAQ,WAAW,CAAC,IAAI,CAAC;gBACb,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC;CAGjE"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.UsersService = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const crud_1 = require("@nestjs-library/crud");
|
|
19
|
+
const typeorm_2 = require("typeorm");
|
|
20
|
+
const user_entity_1 = require("../entities/user.entity");
|
|
21
|
+
let UsersService = class UsersService extends crud_1.CrudService {
|
|
22
|
+
constructor(repository) {
|
|
23
|
+
super(repository);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
exports.UsersService = UsersService;
|
|
27
|
+
exports.UsersService = UsersService = __decorate([
|
|
28
|
+
(0, common_1.Injectable)(),
|
|
29
|
+
__param(0, (0, typeorm_1.InjectRepository)(user_entity_1.User)),
|
|
30
|
+
__metadata("design:paramtypes", [typeorm_2.Repository])
|
|
31
|
+
], UsersService);
|
|
32
|
+
//# sourceMappingURL=users.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.service.js","sourceRoot":"","sources":["../../src/services/users.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,+CAAmD;AACnD,qCAAqC;AACrC,yDAA+C;AAGxC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,kBAAiB;IACjD,YAAoC,UAA4B;QAC9D,KAAK,CAAC,UAAU,CAAC,CAAC;IACpB,CAAC;CACF,CAAA;AAJY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;IAEE,WAAA,IAAA,0BAAgB,EAAC,kBAAI,CAAC,CAAA;qCAAa,oBAAU;GAD/C,YAAY,CAIxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.module.d.ts","sourceRoot":"","sources":["../src/users.module.ts"],"names":[],"mappings":"AAMA,qBAMa,WAAW;CAAG"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.UsersModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
|
+
const user_entity_1 = require("./entities/user.entity");
|
|
13
|
+
const users_controller_1 = require("./controllers/users.controller");
|
|
14
|
+
const users_service_1 = require("./services/users.service");
|
|
15
|
+
let UsersModule = class UsersModule {
|
|
16
|
+
};
|
|
17
|
+
exports.UsersModule = UsersModule;
|
|
18
|
+
exports.UsersModule = UsersModule = __decorate([
|
|
19
|
+
(0, common_1.Module)({
|
|
20
|
+
imports: [typeorm_1.TypeOrmModule.forFeature([user_entity_1.User])],
|
|
21
|
+
controllers: [users_controller_1.UsersController],
|
|
22
|
+
providers: [users_service_1.UsersService],
|
|
23
|
+
exports: [users_service_1.UsersService],
|
|
24
|
+
})
|
|
25
|
+
], UsersModule);
|
|
26
|
+
//# sourceMappingURL=users.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.module.js","sourceRoot":"","sources":["../src/users.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,wDAA8C;AAC9C,qEAAiE;AACjE,4DAAwD;AAQjD,IAAM,WAAW,GAAjB,MAAM,WAAW;CAAG,CAAA;AAAd,kCAAW;sBAAX,WAAW;IANvB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,CAAC,kBAAI,CAAC,CAAC,CAAC;QAC3C,WAAW,EAAE,CAAC,kCAAe,CAAC;QAC9B,SAAS,EAAE,CAAC,4BAAY,CAAC;QACzB,OAAO,EAAE,CAAC,4BAAY,CAAC;KACxB,CAAC;GACW,WAAW,CAAG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@uecsio/users-api",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A reusable NestJS API Users module for user management",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"nestjs",
|
|
7
|
+
"users",
|
|
8
|
+
"user-management",
|
|
9
|
+
"authentication",
|
|
10
|
+
"typeorm",
|
|
11
|
+
"crud"
|
|
12
|
+
],
|
|
13
|
+
"author": "Dmytro Morozov <morosovdmitry@gmail.com>",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"main": "dist/index.js",
|
|
16
|
+
"types": "dist/index.d.ts",
|
|
17
|
+
"files": [
|
|
18
|
+
"dist/**/*"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsc",
|
|
22
|
+
"build:watch": "tsc --watch",
|
|
23
|
+
"test": "jest",
|
|
24
|
+
"test:watch": "jest --watch",
|
|
25
|
+
"test:cov": "jest --coverage",
|
|
26
|
+
"lint": "eslint src/**/*.ts",
|
|
27
|
+
"lint:fix": "eslint src/**/*.ts --fix",
|
|
28
|
+
"prepublishOnly": "npm run build",
|
|
29
|
+
"clean": "rimraf dist"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"@nestjs/common": "^11.0.0",
|
|
33
|
+
"@nestjs/core": "^11.0.0",
|
|
34
|
+
"@nestjs/typeorm": "^11.0.0",
|
|
35
|
+
"typeorm": "^0.3.0",
|
|
36
|
+
"class-validator": "^0.14.0",
|
|
37
|
+
"class-transformer": "^0.5.1",
|
|
38
|
+
"@nestjs-library/crud": "^0.13.1"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@nestjs/common": "^11.0.0",
|
|
42
|
+
"@nestjs/core": "^11.0.0",
|
|
43
|
+
"@nestjs/testing": "^11.0.0",
|
|
44
|
+
"@nestjs/typeorm": "^11.0.0",
|
|
45
|
+
"@types/jest": "^30.0.0",
|
|
46
|
+
"@types/node": "^22.0.0",
|
|
47
|
+
"jest": "^30.0.0",
|
|
48
|
+
"ts-jest": "^29.2.5",
|
|
49
|
+
"typescript": "^5.7.3",
|
|
50
|
+
"typeorm": "^0.3.26",
|
|
51
|
+
"class-validator": "^0.14.2",
|
|
52
|
+
"class-transformer": "^0.5.1",
|
|
53
|
+
"@nestjs-library/crud": "^0.13.1",
|
|
54
|
+
"rimraf": "^5.0.0"
|
|
55
|
+
},
|
|
56
|
+
"jest": {
|
|
57
|
+
"moduleFileExtensions": [
|
|
58
|
+
"js",
|
|
59
|
+
"json",
|
|
60
|
+
"ts"
|
|
61
|
+
],
|
|
62
|
+
"rootDir": "src",
|
|
63
|
+
"testRegex": ".*\\.spec\\.ts$",
|
|
64
|
+
"transform": {
|
|
65
|
+
"^.+\\.(t|j)s$": "ts-jest"
|
|
66
|
+
},
|
|
67
|
+
"collectCoverageFrom": [
|
|
68
|
+
"**/*.(t|j)s"
|
|
69
|
+
],
|
|
70
|
+
"coverageDirectory": "../coverage",
|
|
71
|
+
"testEnvironment": "node"
|
|
72
|
+
},
|
|
73
|
+
"repository": {
|
|
74
|
+
"type": "git",
|
|
75
|
+
"url": "https://github.com/uecsio/users-api.git"
|
|
76
|
+
},
|
|
77
|
+
"bugs": {
|
|
78
|
+
"url": "https://github.com/uecsio/users-api/issues"
|
|
79
|
+
},
|
|
80
|
+
"homepage": "https://github.com/uecsio/users-api#readme"
|
|
81
|
+
}
|