@tomei/rental 0.17.9-staging.2 → 0.17.9-test.2
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/.commitlintrc.json +23 -23
- package/.gitlab-ci.yml +234 -16
- package/.husky/commit-msg +4 -10
- package/.husky/pre-commit +12 -7
- package/.prettierrc +4 -4
- package/CHANGELOG.md +8 -8
- package/Jenkinsfile +51 -51
- package/README.md +8 -8
- package/dist/src/components/agreement/agreement.d.ts +1 -0
- package/dist/src/components/agreement/agreement.js +13 -9
- package/dist/src/components/agreement/agreement.js.map +1 -1
- package/dist/src/components/agreement/agreement.spec.d.ts +1 -0
- package/dist/src/components/agreement/agreement.spec.js +177 -0
- package/dist/src/components/agreement/agreement.spec.js.map +1 -0
- package/dist/src/components/booking/booking.spec.d.ts +1 -0
- package/dist/src/components/booking/booking.spec.js +261 -0
- package/dist/src/components/booking/booking.spec.js.map +1 -0
- package/dist/src/components/joint-hirer/joint-hirer.spec.d.ts +1 -0
- package/dist/src/components/joint-hirer/joint-hirer.spec.js +206 -0
- package/dist/src/components/joint-hirer/joint-hirer.spec.js.map +1 -0
- package/dist/src/components/rental/rental.d.ts +1 -0
- package/dist/src/components/rental/rental.js +29 -15
- package/dist/src/components/rental/rental.js.map +1 -1
- package/dist/src/components/rental/rental.spec.d.ts +1 -0
- package/dist/src/components/rental/rental.spec.js +625 -0
- package/dist/src/components/rental/rental.spec.js.map +1 -0
- package/dist/src/components/rental-hirer-change-request/rental-hirer-change-request.spec.d.ts +1 -0
- package/dist/src/components/rental-hirer-change-request/rental-hirer-change-request.spec.js +500 -0
- package/dist/src/components/rental-hirer-change-request/rental-hirer-change-request.spec.js.map +1 -0
- package/dist/src/components/rental-price/rental-price.spec.d.ts +1 -0
- package/dist/src/components/rental-price/rental-price.spec.js +108 -0
- package/dist/src/components/rental-price/rental-price.spec.js.map +1 -0
- package/dist/src/enum/aggrement-status.enum.d.ts +2 -1
- package/dist/src/enum/aggrement-status.enum.js +1 -0
- package/dist/src/enum/aggrement-status.enum.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/eslint.config.mjs +58 -58
- package/jest.config.js +15 -10
- package/migrations/20250529092130-add-status-to-joint-hirer.js +19 -19
- package/migrations/agreement-signature-table-migration.js +76 -76
- package/migrations/booking-table-migration.js +79 -79
- package/migrations/hirer-change-request-new-hirer-migration.js +72 -72
- package/migrations/hirer-change-request-remove-hirer-migration.js +39 -39
- package/migrations/hirer-change-request-signature-migration.js +65 -65
- package/migrations/joint-hirer-table-migration.js +52 -52
- package/migrations/rental-aggreement-history-migration.js +41 -41
- package/migrations/rental-aggrement-table-migration.js +30 -30
- package/migrations/rental-hirer-change-request-migrations.js +64 -64
- package/migrations/rental-price-table-migration.js +32 -32
- package/migrations/rental-table-migrations.js +96 -96
- package/package.json +80 -80
- package/sonar-project.properties +12 -12
- package/src/ClassMappings/ItemClassMap.ts +7 -7
- package/src/ClassMappings/index.ts +3 -3
- package/src/components/agreement/agreement.repository.ts +54 -54
- package/src/components/agreement/agreement.spec.ts +229 -0
- package/src/components/agreement/agreement.ts +191 -187
- package/src/components/agreement-history/agreement-history.repository.ts +54 -54
- package/src/components/agreement-history/agreement-history.ts +57 -57
- package/src/components/agreement-signature/agreement-signature.repository.ts +55 -55
- package/src/components/agreement-signature/agreement-signature.ts +155 -155
- package/src/components/booking/booking.repository.ts +51 -51
- package/src/components/booking/booking.spec.ts +360 -0
- package/src/components/booking/booking.ts +492 -492
- package/src/components/hirer-change-request-new-hirer/hirer-change-request-new-hirer.repository.ts +64 -64
- package/src/components/hirer-change-request-new-hirer/hirer-change-request-new-hirer.ts +153 -153
- package/src/components/hirer-change-request-remove-hirer/hirer-change-request-remove-hirer.repository.ts +65 -65
- package/src/components/hirer-change-request-remove-hirer/hirer-change-request-remove-hirer.ts +134 -134
- package/src/components/hirer-change-request-signature/hirer-change-request-signature.repository.ts +65 -65
- package/src/components/hirer-change-request-signature/hirer-change-request-signature.ts +272 -272
- package/src/components/joint-hirer/joint-hirer.repository.ts +54 -54
- package/src/components/joint-hirer/joint-hirer.spec.ts +240 -0
- package/src/components/joint-hirer/joint-hirer.ts +252 -252
- package/src/components/rental/rental.repository.ts +51 -51
- package/src/components/rental/rental.spec.ts +899 -0
- package/src/components/rental/rental.ts +1498 -1467
- package/src/components/rental-hirer-change-request/rental-hirer-change-request.repository.ts +64 -64
- package/src/components/rental-hirer-change-request/rental-hirer-change-request.spec.ts +666 -0
- package/src/components/rental-hirer-change-request/rental-hirer-change-request.ts +907 -907
- package/src/components/rental-price/rental-price.repository.ts +54 -54
- package/src/components/rental-price/rental-price.spec.ts +121 -0
- package/src/components/rental-price/rental-price.ts +100 -100
- package/src/database.ts +39 -39
- package/src/enum/account-type.enum.ts +4 -4
- package/src/enum/aggrement-status.enum.ts +1 -0
- package/src/enum/agreement-signature-status.enum.ts +4 -4
- package/src/enum/agreement-signature-verification-method.enum.ts +4 -4
- package/src/enum/booking.enum.ts +5 -5
- package/src/enum/hirer-type.enum.ts +4 -4
- package/src/enum/index.ts +23 -23
- package/src/enum/rental-hirer-change-request-hirer-role.ts +4 -4
- package/src/enum/rental-hirer-change-request-status.ts +7 -7
- package/src/enum/rental-hirer-change-request-type.ts +4 -4
- package/src/enum/rental-status.enum.ts +39 -39
- package/src/index.ts +54 -54
- package/src/interfaces/agreemeent-signature-attr.interface.ts +19 -19
- package/src/interfaces/agreement-attr.interface.ts +7 -7
- package/src/interfaces/agreement-history-attr.interface.ts +7 -7
- package/src/interfaces/booking-attr.interface.ts +19 -19
- package/src/interfaces/booking-find-all-search-attr.interface.ts +12 -12
- package/src/interfaces/hirer-change-request-new-hirer-attr.interface.ts +15 -15
- package/src/interfaces/hirer-change-request-remove-hirer-attr.interface.ts +5 -5
- package/src/interfaces/hirer-change-request-signature-attr.interface.ts +15 -15
- package/src/interfaces/index.ts +29 -29
- package/src/interfaces/joint-hirer-attr.interface.ts +11 -11
- package/src/interfaces/rental-attr.interface.ts +25 -25
- package/src/interfaces/rental-find-all-search-attr.interface.ts +11 -11
- package/src/interfaces/rental-hirer-change-request.attr.interface.ts +17 -17
- package/src/interfaces/rental-hirer-change-request.update.interface.ts +4 -4
- package/src/interfaces/rental-price-attr.interface.ts +7 -7
- package/src/interfaces/response-hirer-signature-attr.interface.ts +15 -15
- package/src/models/agreement-history.entity.ts +51 -51
- package/src/models/agreement-signature.entity.ts +105 -105
- package/src/models/agreement.entity.ts +47 -47
- package/src/models/booking.entity.ts +105 -105
- package/src/models/hirer-change-request-new-hirer.entity.ts +102 -102
- package/src/models/hirer-change-request-remove-hirer.entity.ts +47 -47
- package/src/models/hirer-change-request-signature.entity.ts +86 -86
- package/src/models/index.ts +25 -25
- package/src/models/joint-hirer.entity.ts +70 -70
- package/src/models/rental-price.entity.ts +38 -38
- package/src/models/rental.entity.ts +133 -133
- package/tsconfig.build.json +5 -5
- package/tsconfig.json +24 -24
package/.commitlintrc.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": [
|
|
3
|
-
"@commitlint/config-conventional"
|
|
4
|
-
],
|
|
5
|
-
"rules": {
|
|
6
|
-
"header-max-length": [ 2, "always", 120 ],
|
|
7
|
-
"type-enum": [
|
|
8
|
-
2,
|
|
9
|
-
"always",
|
|
10
|
-
[
|
|
11
|
-
"breaking",
|
|
12
|
-
"feat",
|
|
13
|
-
"fix",
|
|
14
|
-
"refactor",
|
|
15
|
-
"config",
|
|
16
|
-
"test",
|
|
17
|
-
"docs",
|
|
18
|
-
"chore",
|
|
19
|
-
"release"
|
|
20
|
-
]
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": [
|
|
3
|
+
"@commitlint/config-conventional"
|
|
4
|
+
],
|
|
5
|
+
"rules": {
|
|
6
|
+
"header-max-length": [ 2, "always", 120 ],
|
|
7
|
+
"type-enum": [
|
|
8
|
+
2,
|
|
9
|
+
"always",
|
|
10
|
+
[
|
|
11
|
+
"breaking",
|
|
12
|
+
"feat",
|
|
13
|
+
"fix",
|
|
14
|
+
"refactor",
|
|
15
|
+
"config",
|
|
16
|
+
"test",
|
|
17
|
+
"docs",
|
|
18
|
+
"chore",
|
|
19
|
+
"release"
|
|
20
|
+
]
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
}
|
package/.gitlab-ci.yml
CHANGED
|
@@ -1,16 +1,234 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
# ============================================================
|
|
2
|
+
# .gitlab-ci.yml — npm package with trusted publishing (OIDC)
|
|
3
|
+
#
|
|
4
|
+
# Project path: all-tomei-projects/tomei-package/General/<package-name>
|
|
5
|
+
#
|
|
6
|
+
# Tag patterns:
|
|
7
|
+
# test-vX.Y.Z-rc.N → npm publish --tag test (RC for test env)
|
|
8
|
+
# staging-vX.Y.Z-rc.N → npm publish --tag staging (RC for staging env)
|
|
9
|
+
# prod-vX.Y.Z → npm publish --tag latest (production, manual gate)
|
|
10
|
+
# prod-vX.Y.Z-hotfix.N → npm publish --tag latest (hotfix, manual gate)
|
|
11
|
+
#
|
|
12
|
+
# No NPM_TOKEN secret needed — OIDC trusted publishing only.
|
|
13
|
+
#
|
|
14
|
+
# Required CI/CD variables (Settings → CI/CD → Variables):
|
|
15
|
+
# DISCORD_WEBHOOK — Discord incoming webhook URL (masked)
|
|
16
|
+
#
|
|
17
|
+
# npm side setup required (npmjs.com):
|
|
18
|
+
# 1. package.json → publishConfig.provenance: true
|
|
19
|
+
# 2. npmjs.com → package Settings → Publishing Access
|
|
20
|
+
# → Enable OIDC publishing for GitLab project:
|
|
21
|
+
# all-tomei-projects/tomei-package/General/<package-name>
|
|
22
|
+
# ============================================================
|
|
23
|
+
default:
|
|
24
|
+
image: node:20-alpine
|
|
25
|
+
|
|
26
|
+
stages:
|
|
27
|
+
- validate
|
|
28
|
+
- build
|
|
29
|
+
- publish
|
|
30
|
+
- notify
|
|
31
|
+
|
|
32
|
+
# ────────────────────────────────────────────────────────────
|
|
33
|
+
# STAGE: validate
|
|
34
|
+
# Runs lint and unit tests before publish
|
|
35
|
+
# Skipped on prod tags — code already validated on test + staging
|
|
36
|
+
# ────────────────────────────────────────────────────────────
|
|
37
|
+
lint:
|
|
38
|
+
stage: validate
|
|
39
|
+
cache:
|
|
40
|
+
key: node-$CI_COMMIT_REF_SLUG
|
|
41
|
+
paths: [node_modules/]
|
|
42
|
+
script:
|
|
43
|
+
- npm ci
|
|
44
|
+
- npm run lint
|
|
45
|
+
rules:
|
|
46
|
+
- if: '$CI_COMMIT_TAG =~ /^test-v/'
|
|
47
|
+
- if: '$CI_COMMIT_TAG =~ /^staging-v/'
|
|
48
|
+
|
|
49
|
+
unit-test:
|
|
50
|
+
stage: validate
|
|
51
|
+
cache:
|
|
52
|
+
key: node-$CI_COMMIT_REF_SLUG
|
|
53
|
+
paths: [node_modules/]
|
|
54
|
+
script:
|
|
55
|
+
- npm ci
|
|
56
|
+
- npm test
|
|
57
|
+
coverage: '/Lines\s*:\s*(\d+\.?\d*)%/'
|
|
58
|
+
artifacts:
|
|
59
|
+
reports:
|
|
60
|
+
coverage_report:
|
|
61
|
+
coverage_format: cobertura
|
|
62
|
+
path: coverage/cobertura-coverage.xml
|
|
63
|
+
expire_in: 7 days
|
|
64
|
+
rules:
|
|
65
|
+
- if: '$CI_COMMIT_TAG =~ /^test-v/'
|
|
66
|
+
- if: '$CI_COMMIT_TAG =~ /^staging-v/'
|
|
67
|
+
|
|
68
|
+
# ────────────────────────────────────────────────────────────
|
|
69
|
+
# STAGE: build
|
|
70
|
+
# Compiles the package (tsc / rollup / whatever your build uses)
|
|
71
|
+
# Artifacts passed to publish jobs
|
|
72
|
+
# Runs on all tag patterns
|
|
73
|
+
# ────────────────────────────────────────────────────────────
|
|
74
|
+
build:
|
|
75
|
+
stage: build
|
|
76
|
+
cache:
|
|
77
|
+
key: node-$CI_COMMIT_REF_SLUG
|
|
78
|
+
paths: [node_modules/]
|
|
79
|
+
script:
|
|
80
|
+
- npm ci
|
|
81
|
+
- npm run build
|
|
82
|
+
artifacts:
|
|
83
|
+
paths:
|
|
84
|
+
- dist/
|
|
85
|
+
expire_in: 1 hour
|
|
86
|
+
rules:
|
|
87
|
+
- if: '$CI_COMMIT_TAG =~ /^test-v/'
|
|
88
|
+
- if: '$CI_COMMIT_TAG =~ /^staging-v/'
|
|
89
|
+
- if: '$CI_COMMIT_TAG =~ /^prod-v/'
|
|
90
|
+
|
|
91
|
+
# ────────────────────────────────────────────────────────────
|
|
92
|
+
# STAGE: publish — test RC
|
|
93
|
+
# Triggered by: test-vX.Y.Z-rc.N tag
|
|
94
|
+
# Publishes with dist-tag "test"
|
|
95
|
+
# Consumers must opt in: npm install @tomei/pkg@test
|
|
96
|
+
# Version stamped: test-v1.24.0-rc.1 → 1.24.0-rc.1
|
|
97
|
+
# ────────────────────────────────────────────────────────────
|
|
98
|
+
publish-test:
|
|
99
|
+
stage: publish
|
|
100
|
+
needs: [build]
|
|
101
|
+
rules:
|
|
102
|
+
- if: '$CI_COMMIT_TAG =~ /^test-v/'
|
|
103
|
+
script:
|
|
104
|
+
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
|
105
|
+
- |
|
|
106
|
+
RC_VERSION=$(echo "$CI_COMMIT_TAG" | sed 's/^test-v\([0-9.]*\)-rc\.\([0-9]*\)$/\1-test.\2/')
|
|
107
|
+
echo "Publishing version $RC_VERSION with dist-tag: test"
|
|
108
|
+
npm version "$RC_VERSION" --no-git-tag-version --ignore-scripts --force
|
|
109
|
+
npm publish --tag test --access public
|
|
110
|
+
echo "Published: @$(node -p "require('./package.json').name")@$RC_VERSION [test]"
|
|
111
|
+
|
|
112
|
+
# ────────────────────────────────────────────────────────────
|
|
113
|
+
# STAGE: publish — staging RC
|
|
114
|
+
# Triggered by: staging-vX.Y.Z-rc.N tag
|
|
115
|
+
# Publishes with dist-tag "staging"
|
|
116
|
+
# Consumers must opt in: npm install @tomei/pkg@staging
|
|
117
|
+
# Version stamped: staging-v1.24.0-rc.1 → 1.24.0-rc.1
|
|
118
|
+
# ────────────────────────────────────────────────────────────
|
|
119
|
+
publish-staging:
|
|
120
|
+
stage: publish
|
|
121
|
+
needs: [build]
|
|
122
|
+
rules:
|
|
123
|
+
- if: '$CI_COMMIT_TAG =~ /^staging-v/'
|
|
124
|
+
script:
|
|
125
|
+
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
|
126
|
+
- |
|
|
127
|
+
RC_VERSION=$(echo "$CI_COMMIT_TAG" | sed 's/^staging-v\([0-9.]*\)-rc\.\([0-9]*\)$/\1-staging.\2/')
|
|
128
|
+
echo "Publishing version $RC_VERSION with dist-tag: staging"
|
|
129
|
+
npm version "$RC_VERSION" --no-git-tag-version --ignore-scripts --force
|
|
130
|
+
npm publish --tag staging --access public
|
|
131
|
+
echo "Published: @$(node -p "require('./package.json').name")@$RC_VERSION [staging]"
|
|
132
|
+
|
|
133
|
+
# ────────────────────────────────────────────────────────────
|
|
134
|
+
# STAGE: publish — production
|
|
135
|
+
# Triggered by: prod-vX.Y.Z or prod-vX.Y.Z-hotfix.N tag (from main only)
|
|
136
|
+
# Publishes with dist-tag "latest" — becomes the default install version
|
|
137
|
+
# Manual gate — human must click Play in GitLab pipeline UI
|
|
138
|
+
# Version stamped: prod-v2.2.0 → 2.2.0 | prod-v2.2.0-hotfix.1 → 2.2.0-hotfix.1
|
|
139
|
+
# ────────────────────────────────────────────────────────────
|
|
140
|
+
publish-prod:
|
|
141
|
+
stage: publish
|
|
142
|
+
needs: [build]
|
|
143
|
+
rules:
|
|
144
|
+
- if: '$CI_COMMIT_TAG =~ /^prod-v/'
|
|
145
|
+
when: manual
|
|
146
|
+
allow_failure: false
|
|
147
|
+
script:
|
|
148
|
+
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
|
149
|
+
- |
|
|
150
|
+
PROD_VERSION=$(echo "$CI_COMMIT_TAG" | sed 's/^prod-v//')
|
|
151
|
+
echo "Publishing version $PROD_VERSION with dist-tag: latest"
|
|
152
|
+
npm version "$PROD_VERSION" --no-git-tag-version --ignore-scripts --force
|
|
153
|
+
npm publish --tag latest --access public
|
|
154
|
+
echo "Published: @$(node -p "require('./package.json').name")@$PROD_VERSION [latest]"
|
|
155
|
+
echo "Pipeline: $CI_PIPELINE_URL"
|
|
156
|
+
|
|
157
|
+
# ────────────────────────────────────────────────────────────
|
|
158
|
+
# STAGE: notify — success
|
|
159
|
+
# ────────────────────────────────────────────────────────────
|
|
160
|
+
notify-success:
|
|
161
|
+
stage: notify
|
|
162
|
+
image: curlimages/curl:latest
|
|
163
|
+
needs:
|
|
164
|
+
- job: publish-test
|
|
165
|
+
optional: true
|
|
166
|
+
- job: publish-staging
|
|
167
|
+
optional: true
|
|
168
|
+
- job: publish-prod
|
|
169
|
+
optional: true
|
|
170
|
+
rules:
|
|
171
|
+
- if: '$CI_COMMIT_TAG =~ /^test-v/'
|
|
172
|
+
when: on_success
|
|
173
|
+
- if: '$CI_COMMIT_TAG =~ /^staging-v/'
|
|
174
|
+
when: on_success
|
|
175
|
+
- if: '$CI_COMMIT_TAG =~ /^prod-v/'
|
|
176
|
+
when: on_success
|
|
177
|
+
script:
|
|
178
|
+
- |
|
|
179
|
+
if echo "$CI_COMMIT_TAG" | grep -q "^test-v"; then
|
|
180
|
+
DIST_TAG="test"
|
|
181
|
+
COLOR=3066993
|
|
182
|
+
elif echo "$CI_COMMIT_TAG" | grep -q "^staging-v"; then
|
|
183
|
+
DIST_TAG="staging"
|
|
184
|
+
COLOR=16776960
|
|
185
|
+
elif echo "$CI_COMMIT_TAG" | grep -q "^prod-v"; then
|
|
186
|
+
DIST_TAG="latest"
|
|
187
|
+
COLOR=3066993
|
|
188
|
+
fi
|
|
189
|
+
|
|
190
|
+
curl -s -X POST "$DISCORD_WEBHOOK" \
|
|
191
|
+
-H "Content-Type: application/json" \
|
|
192
|
+
-d '{
|
|
193
|
+
"embeds": [{
|
|
194
|
+
"title": "Package published successfully",
|
|
195
|
+
"color": '"$COLOR"',
|
|
196
|
+
"fields": [
|
|
197
|
+
{"name": "Package", "value": "'"$CI_PROJECT_NAME"'", "inline": true},
|
|
198
|
+
{"name": "Tag", "value": "'"$CI_COMMIT_TAG"'", "inline": true},
|
|
199
|
+
{"name": "Dist-tag", "value": "'"$DIST_TAG"'", "inline": true},
|
|
200
|
+
{"name": "Published by", "value": "'"$GITLAB_USER_NAME"'", "inline": true},
|
|
201
|
+
{"name": "Pipeline", "value": "'"$CI_PIPELINE_URL"'", "inline": false}
|
|
202
|
+
]
|
|
203
|
+
}]
|
|
204
|
+
}'
|
|
205
|
+
|
|
206
|
+
# ────────────────────────────────────────────────────────────
|
|
207
|
+
# STAGE: notify — failure
|
|
208
|
+
# ────────────────────────────────────────────────────────────
|
|
209
|
+
notify-failure:
|
|
210
|
+
stage: notify
|
|
211
|
+
image: curlimages/curl:latest
|
|
212
|
+
rules:
|
|
213
|
+
- if: '$CI_COMMIT_TAG =~ /^test-v/'
|
|
214
|
+
when: on_failure
|
|
215
|
+
- if: '$CI_COMMIT_TAG =~ /^staging-v/'
|
|
216
|
+
when: on_failure
|
|
217
|
+
- if: '$CI_COMMIT_TAG =~ /^prod-v/'
|
|
218
|
+
when: on_failure
|
|
219
|
+
script:
|
|
220
|
+
- |
|
|
221
|
+
curl -s -X POST "$DISCORD_WEBHOOK" \
|
|
222
|
+
-H "Content-Type: application/json" \
|
|
223
|
+
-d '{
|
|
224
|
+
"embeds": [{
|
|
225
|
+
"title": "Package publish FAILED",
|
|
226
|
+
"color": 15158332,
|
|
227
|
+
"fields": [
|
|
228
|
+
{"name": "Package", "value": "'"$CI_PROJECT_NAME"'", "inline": true},
|
|
229
|
+
{"name": "Tag", "value": "'"$CI_COMMIT_TAG"'", "inline": true},
|
|
230
|
+
{"name": "Failed by", "value": "'"$GITLAB_USER_NAME"'", "inline": true},
|
|
231
|
+
{"name": "Pipeline", "value": "'"$CI_PIPELINE_URL"'", "inline": false}
|
|
232
|
+
]
|
|
233
|
+
}]
|
|
234
|
+
}'
|
package/.husky/commit-msg
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env sh
|
|
2
|
-
. "$(dirname -- "$0")/_/husky.sh"
|
|
3
|
-
|
|
4
|
-
npx commitlint --edit $1
|
|
5
|
-
message="$(cat $1)"
|
|
6
|
-
echo "$message"
|
|
7
|
-
a=($(echo "$message" | tr ':' '\n'))
|
|
8
|
-
echo "${a[0]}"
|
|
9
|
-
git add .
|
|
10
|
-
git commit -m "$message" --no-verify
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
. "$(dirname -- "$0")/_/husky.sh"
|
|
3
|
+
|
|
4
|
+
npx commitlint --edit $1
|
package/.husky/pre-commit
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
#!/usr/bin/env sh
|
|
2
|
-
. "$(dirname -- "$0")/_/husky.sh"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
npm run
|
|
7
|
-
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
. "$(dirname -- "$0")/_/husky.sh"
|
|
3
|
+
|
|
4
|
+
STAGED=$(git diff --cached --name-only --diff-filter=ACMR)
|
|
5
|
+
|
|
6
|
+
npm run lint
|
|
7
|
+
npm run format
|
|
8
|
+
npm run build
|
|
9
|
+
|
|
10
|
+
if [ -n "$STAGED" ]; then
|
|
11
|
+
echo "$STAGED" | xargs git add
|
|
12
|
+
fi
|
package/.prettierrc
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
{
|
|
2
|
-
"singleQuote": true,
|
|
3
|
-
"trailingComma": "all",
|
|
4
|
-
"endOfLine": "auto"
|
|
1
|
+
{
|
|
2
|
+
"singleQuote": true,
|
|
3
|
+
"trailingComma": "all",
|
|
4
|
+
"endOfLine": "auto"
|
|
5
5
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# :package: Release Notes – `v0.17.8`
|
|
2
|
-
**Release Date:** 02nd March 2026
|
|
3
|
-
**Version:** `v0.17.8`
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## :bug: Bug Fixes
|
|
8
|
-
- **Rental Cancellation – Active and Suspended Status Removed**
|
|
1
|
+
# :package: Release Notes – `v0.17.8`
|
|
2
|
+
**Release Date:** 02nd March 2026
|
|
3
|
+
**Version:** `v0.17.8`
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## :bug: Bug Fixes
|
|
8
|
+
- **Rental Cancellation – Active and Suspended Status Removed**
|
|
9
9
|
Removed rental status validation during the rental cancellation process, allowing rentals with Active and Suspended status to be cancelled without restriction.
|
package/Jenkinsfile
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
pipeline {
|
|
2
|
-
agent {
|
|
3
|
-
kubernetes {
|
|
4
|
-
label 'jenkins-agent'
|
|
5
|
-
namespace 'devops-tools'
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
tools {nodejs "node18"}
|
|
9
|
-
stages {
|
|
10
|
-
stage('Install') {
|
|
11
|
-
steps {
|
|
12
|
-
echo 'Install Dependencies..'
|
|
13
|
-
sh 'npm install'
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
stage('Test') {
|
|
17
|
-
steps {
|
|
18
|
-
echo 'Testing..'
|
|
19
|
-
// sh 'npm run test'
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
stage('Build') {
|
|
23
|
-
steps {
|
|
24
|
-
echo 'Building..'
|
|
25
|
-
sh 'npm run build'
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
stage('Publish') {
|
|
29
|
-
steps {
|
|
30
|
-
sh "npm publish"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
post {
|
|
36
|
-
success {
|
|
37
|
-
script {
|
|
38
|
-
def gitAuthor = sh(returnStdout: true, script: 'git log -1 --pretty=format:%an').trim()
|
|
39
|
-
discordSend description: "Git Commit: ${env.GIT_COMMIT}\nGit Branch: ${env.GIT_BRANCH}\nGit URL: ${env.GIT_URL}\nGit Author: ${gitAuthor}", footer: '', image: '', link: env.BUILD_URL, result: 'SUCCESS', scmWebUrl: '', thumbnail: '', title: "${env.JOB_NAME} Build #${env.BUILD_NUMBER} Success", webhookURL: 'https://discord.com/api/webhooks/1166358157166125076/AquDPsQ6L5piq_TfiSfLGOujmVqgHhxfK8yVEfJZrWfhgT6g-j5gJ3xhuXGFZUjRhhlo'
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
failure {
|
|
44
|
-
script {
|
|
45
|
-
def gitAuthor = sh(returnStdout: true, script: 'git log -1 --pretty=format:%an').trim()
|
|
46
|
-
discordSend description: "Git Commit: ${env.GIT_COMMIT}\nGit Branch: ${env.GIT_BRANCH}\nGit URL: ${env.GIT_URL}\nGit Author: ${gitAuthor}", footer: '', image: '', link: env.BUILD_URL, result: 'FAILURE', scmWebUrl: '', thumbnail: '', title: "${env.JOB_NAME} Build #${env.BUILD_NUMBER} Failed", webhookURL: 'https://discord.com/api/webhooks/1166358157166125076/AquDPsQ6L5piq_TfiSfLGOujmVqgHhxfK8yVEfJZrWfhgT6g-j5gJ3xhuXGFZUjRhhlo'
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
}
|
|
1
|
+
pipeline {
|
|
2
|
+
agent {
|
|
3
|
+
kubernetes {
|
|
4
|
+
label 'jenkins-agent'
|
|
5
|
+
namespace 'devops-tools'
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
tools {nodejs "node18"}
|
|
9
|
+
stages {
|
|
10
|
+
stage('Install') {
|
|
11
|
+
steps {
|
|
12
|
+
echo 'Install Dependencies..'
|
|
13
|
+
sh 'npm install'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
stage('Test') {
|
|
17
|
+
steps {
|
|
18
|
+
echo 'Testing..'
|
|
19
|
+
// sh 'npm run test'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
stage('Build') {
|
|
23
|
+
steps {
|
|
24
|
+
echo 'Building..'
|
|
25
|
+
sh 'npm run build'
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
stage('Publish') {
|
|
29
|
+
steps {
|
|
30
|
+
sh "npm publish"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
post {
|
|
36
|
+
success {
|
|
37
|
+
script {
|
|
38
|
+
def gitAuthor = sh(returnStdout: true, script: 'git log -1 --pretty=format:%an').trim()
|
|
39
|
+
discordSend description: "Git Commit: ${env.GIT_COMMIT}\nGit Branch: ${env.GIT_BRANCH}\nGit URL: ${env.GIT_URL}\nGit Author: ${gitAuthor}", footer: '', image: '', link: env.BUILD_URL, result: 'SUCCESS', scmWebUrl: '', thumbnail: '', title: "${env.JOB_NAME} Build #${env.BUILD_NUMBER} Success", webhookURL: 'https://discord.com/api/webhooks/1166358157166125076/AquDPsQ6L5piq_TfiSfLGOujmVqgHhxfK8yVEfJZrWfhgT6g-j5gJ3xhuXGFZUjRhhlo'
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
failure {
|
|
44
|
+
script {
|
|
45
|
+
def gitAuthor = sh(returnStdout: true, script: 'git log -1 --pretty=format:%an').trim()
|
|
46
|
+
discordSend description: "Git Commit: ${env.GIT_COMMIT}\nGit Branch: ${env.GIT_BRANCH}\nGit URL: ${env.GIT_URL}\nGit Author: ${gitAuthor}", footer: '', image: '', link: env.BUILD_URL, result: 'FAILURE', scmWebUrl: '', thumbnail: '', title: "${env.JOB_NAME} Build #${env.BUILD_NUMBER} Failed", webhookURL: 'https://discord.com/api/webhooks/1166358157166125076/AquDPsQ6L5piq_TfiSfLGOujmVqgHhxfK8yVEfJZrWfhgT6g-j5gJ3xhuXGFZUjRhhlo'
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
}
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
## Package Template
|
|
2
|
-
|
|
3
|
-
### How to use
|
|
4
|
-
- run `npm i`
|
|
5
|
-
- create a `components` folder in the root of your project
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
## Package Template
|
|
2
|
+
|
|
3
|
+
### How to use
|
|
4
|
+
- run `npm i`
|
|
5
|
+
- create a `components` folder in the root of your project
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
@@ -23,5 +23,6 @@ export declare class Agreement extends ObjectBase {
|
|
|
23
23
|
static init(agreementNo?: string, dbTransaction?: any): Promise<Agreement>;
|
|
24
24
|
static getSignatureList(loginUser: LoginUser, agreementNo: string, dbTransaction: any): Promise<IResponseAgreementSignature[]>;
|
|
25
25
|
getAllActivities(loginUser: LoginUser, dbTransaction?: any): Promise<IAgreementHistoryAttr[]>;
|
|
26
|
+
expire(): void;
|
|
26
27
|
createActivity(activityCompleted: string, MediaId: string, dbTransaction: any, loginUser: LoginUser): Promise<IAgreementHistoryAttr>;
|
|
27
28
|
}
|
|
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Agreement = void 0;
|
|
13
13
|
const general_1 = require("@tomei/general");
|
|
14
|
+
const aggrement_status_enum_1 = require("../../enum/aggrement-status.enum");
|
|
14
15
|
const agreement_repository_1 = require("./agreement.repository");
|
|
15
16
|
const config_1 = require("@tomei/config");
|
|
16
17
|
const agreement_signature_repository_1 = require("../agreement-signature/agreement-signature.repository");
|
|
@@ -61,15 +62,15 @@ class Agreement extends general_1.ObjectBase {
|
|
|
61
62
|
if (!agreementNo) {
|
|
62
63
|
throw new general_1.ClassError('AgreementNo', 'AgreementNoErrMsg01', 'AgreementNo is missing');
|
|
63
64
|
}
|
|
64
|
-
const query = `
|
|
65
|
-
SELECT
|
|
66
|
-
hs.*
|
|
67
|
-
FROM
|
|
68
|
-
rental_AgreementSignature hs
|
|
69
|
-
WHERE
|
|
70
|
-
hs.AgreementNo = '${agreementNo}'
|
|
71
|
-
ORDER BY
|
|
72
|
-
hs.CreatedAt ASC
|
|
65
|
+
const query = `
|
|
66
|
+
SELECT
|
|
67
|
+
hs.*
|
|
68
|
+
FROM
|
|
69
|
+
rental_AgreementSignature hs
|
|
70
|
+
WHERE
|
|
71
|
+
hs.AgreementNo = '${agreementNo}'
|
|
72
|
+
ORDER BY
|
|
73
|
+
hs.CreatedAt ASC
|
|
73
74
|
`;
|
|
74
75
|
const db = rentalDb.getConnection();
|
|
75
76
|
const signatures = yield db.query(query, {
|
|
@@ -103,6 +104,9 @@ class Agreement extends general_1.ObjectBase {
|
|
|
103
104
|
}
|
|
104
105
|
});
|
|
105
106
|
}
|
|
107
|
+
expire() {
|
|
108
|
+
this.Status = aggrement_status_enum_1.AggrementStatusEnum.EXPIRED;
|
|
109
|
+
}
|
|
106
110
|
createActivity(activityCompleted, MediaId, dbTransaction, loginUser) {
|
|
107
111
|
return __awaiter(this, void 0, void 0, function* () {
|
|
108
112
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agreement.js","sourceRoot":"","sources":["../../../../src/components/agreement/agreement.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAwD;
|
|
1
|
+
{"version":3,"file":"agreement.js","sourceRoot":"","sources":["../../../../src/components/agreement/agreement.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAwD;AACx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