@devline-smart-taxi/common 2.3.27 → 2.3.28
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 +59 -10
- package/dist/proto/car-class.proto +6 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,18 +1,67 @@
|
|
|
1
|
-
|
|
1
|
+
# @devline-smart-taxi/common
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
Bu `package` ga bir martadan ortiq service da qo\'llaniladigan class/interface/enum kabi code bloklari joylanadi.
|
|
3
|
+
## Ma'lumot
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
Bu `package` ga bir martadan ortiq service da qo'llaniladigan class/interface/enum kabi code bloklari joylanadi.
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
## O'rnatish
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
```bash
|
|
10
|
+
npm install @devline-smart-taxi/common
|
|
11
|
+
```
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
Hech qanday token yoki `.npmrc` konfiguratsiya talab qilinmaydi — package npm registryda **public** holatda mavjud.
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
## Publishing (CI/CD)
|
|
15
16
|
|
|
17
|
+
Package **npm** va **GitHub Packages** registrylariga GitHub Actions orqali avtomatik publish qilinadi.
|
|
16
18
|
|
|
17
|
-
###
|
|
18
|
-
|
|
19
|
+
### Avtomatik publishing
|
|
20
|
+
|
|
21
|
+
Publishing faqat **Pull Request `dev` branchga merge bo'lganda** ishga tushadi. Workflow quyidagilarni bajaradi:
|
|
22
|
+
|
|
23
|
+
1. Patch versionni avtomatik bump qiladi
|
|
24
|
+
2. npm registryga publish qiladi
|
|
25
|
+
3. GitHub Packages ga publish qiladi
|
|
26
|
+
|
|
27
|
+
> **Eslatma:** `dev` branchga to'g'ridan-to'g'ri push qilish publishing ni **ishga tushirmaydi**. Faqat PR merge va manual trigger ishlaydi.
|
|
28
|
+
|
|
29
|
+
### Manual publishing
|
|
30
|
+
|
|
31
|
+
Publishingni qo'lda ham ishga tushirish mumkin:
|
|
32
|
+
|
|
33
|
+
1. **Actions → Publish Package** ga o'ting
|
|
34
|
+
2. **"Run workflow"** tugmasini bosing
|
|
35
|
+
3. `dev` branchni tanlang
|
|
36
|
+
4. **"Run workflow"** ni bosing
|
|
37
|
+
|
|
38
|
+
### CI ni o'tkazib yuborish
|
|
39
|
+
|
|
40
|
+
Agar `dev` ga push qilayotganda publish workflow ishlamasligi kerak bo'lsa, commit message ga `[skip ci]` qo'shing:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
git commit -m "docs: readme yangilandi [skip ci]"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Development
|
|
47
|
+
|
|
48
|
+
### Build
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npm run build
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Versioning
|
|
55
|
+
|
|
56
|
+
Version bump CI/CD pipeline tomonidan avtomatik boshqariladi. Merge qilishdan oldin versiyani qo'lda o'zgartirish **shart emas**.
|
|
57
|
+
|
|
58
|
+
## Project Structure
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
src/
|
|
62
|
+
├── decorators/ # Custom decoratorlar (roles, current user)
|
|
63
|
+
├── dto/ # Umumiy DTOlar
|
|
64
|
+
├── enums/ # Umumiy enumlar (roles, trip status, payment, va h.k.)
|
|
65
|
+
├── prompt/ # Error prompt utilitylari
|
|
66
|
+
└── proto/ # Protobuf definitionlar va path helperlar
|
|
67
|
+
```
|
|
@@ -29,6 +29,7 @@ message CreateCarClassRequest {
|
|
|
29
29
|
string description = 2;
|
|
30
30
|
float basePrice = 3;
|
|
31
31
|
float pricePerKm = 4;
|
|
32
|
+
optional string image_url = 5;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
message UpdateCarClassRequest {
|
|
@@ -37,16 +38,19 @@ message UpdateCarClassRequest {
|
|
|
37
38
|
optional string description = 3;
|
|
38
39
|
optional float basePrice = 4;
|
|
39
40
|
optional float pricePerKm = 5;
|
|
41
|
+
optional string image_url = 6;
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
// ==========================================
|
|
43
45
|
// 3. RESPONSES
|
|
44
46
|
// ==========================================
|
|
45
47
|
|
|
46
|
-
// Public —
|
|
48
|
+
// Public — id, name va imageUrl
|
|
47
49
|
message CarClassPublicData {
|
|
48
50
|
string id = 1;
|
|
49
51
|
string name = 2;
|
|
52
|
+
optional string image_url = 3;
|
|
53
|
+
float basePrice = 4;
|
|
50
54
|
}
|
|
51
55
|
|
|
52
56
|
message CarClassPublicResponse {
|
|
@@ -70,6 +74,7 @@ message CarClassData {
|
|
|
70
74
|
float pricePerKm = 5;
|
|
71
75
|
bool isActive = 6;
|
|
72
76
|
string createdAt = 7;
|
|
77
|
+
optional string image_url = 8;
|
|
73
78
|
}
|
|
74
79
|
|
|
75
80
|
message CarClassResponse {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devline-smart-taxi/common",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.28",
|
|
4
4
|
"description": "Reusable NestJS common library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"typescript": "^5.9.3"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
|
-
"
|
|
27
|
+
"access": "public",
|
|
28
|
+
"registry": "https://registry.npmjs.org/"
|
|
28
29
|
},
|
|
29
30
|
"dependencies": {
|
|
30
31
|
"@nestjs/mapped-types": "^2.1.0",
|