@tomei/rental 0.12.2 → 0.12.3
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 +22 -22
- package/.eslintrc +16 -16
- package/.eslintrc.js +35 -35
- package/.gitlab-ci.yml +16 -16
- package/.husky/commit-msg +15 -15
- package/.husky/pre-commit +7 -7
- package/.prettierrc +4 -4
- package/Jenkinsfile +51 -51
- package/README.md +8 -8
- package/eslint.config.mjs +37 -37
- package/jest.config.js +10 -10
- package/migrations/booking-table-migration.js +79 -79
- package/migrations/joint-hirer-table-migration.js +52 -52
- package/migrations/rental-aggrement-table-migration.js +30 -30
- package/migrations/rental-price-table-migration.js +32 -32
- package/migrations/rental-table-migrations.js +96 -96
- package/package.json +78 -78
- package/sonar-project.properties +12 -12
- package/src/components/agreement/agreement.repository.ts +54 -54
- package/src/components/agreement/agreement.ts +49 -49
- package/src/components/booking/booking.repository.ts +51 -51
- package/src/components/booking/booking.ts +492 -492
- package/src/components/joint-hirer/joint-hirer.repository.ts +54 -54
- package/src/components/joint-hirer/joint-hirer.ts +137 -137
- package/src/components/rental/rental.repository.ts +51 -51
- package/src/components/rental/rental.ts +963 -963
- package/src/components/rental-price/rental-price.repository.ts +54 -54
- package/src/components/rental-price/rental-price.ts +100 -100
- package/src/database.ts +27 -27
- package/src/enum/account-type.enum.ts +4 -4
- package/src/enum/booking.enum.ts +5 -5
- package/src/enum/index.ts +11 -11
- package/src/enum/rental-status.enum.ts +39 -39
- package/src/index.ts +28 -28
- package/src/interfaces/agreement-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/index.ts +15 -15
- package/src/interfaces/joint-hirer-attr.interface.ts +10 -10
- 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-price-attr.interface.ts +7 -7
- package/src/models/agreement.entity.ts +39 -39
- package/src/models/booking.entity.ts +105 -105
- package/src/models/index.ts +13 -13
- package/src/models/joint-hirer.entity.ts +63 -63
- 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 +23 -23
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -18
- package/dist/index.js.map +0 -1
- package/dist/src/components/agreement/agreement.d.ts +0 -17
- package/dist/src/components/agreement/agreement.js +0 -50
- package/dist/src/components/agreement/agreement.js.map +0 -1
- package/dist/src/components/agreement/agreement.repository.d.ts +0 -8
- package/dist/src/components/agreement/agreement.repository.js +0 -67
- package/dist/src/components/agreement/agreement.repository.js.map +0 -1
- package/dist/src/components/booking/booking.d.ts +0 -46
- package/dist/src/components/booking/booking.js +0 -314
- package/dist/src/components/booking/booking.js.map +0 -1
- package/dist/src/components/booking/booking.repository.d.ts +0 -8
- package/dist/src/components/booking/booking.repository.js +0 -67
- package/dist/src/components/booking/booking.repository.js.map +0 -1
- package/dist/src/components/joint-hirer/joint-hirer.d.ts +0 -23
- package/dist/src/components/joint-hirer/joint-hirer.js +0 -106
- package/dist/src/components/joint-hirer/joint-hirer.js.map +0 -1
- package/dist/src/components/joint-hirer/joint-hirer.repository.d.ts +0 -8
- package/dist/src/components/joint-hirer/joint-hirer.repository.js +0 -67
- package/dist/src/components/joint-hirer/joint-hirer.repository.js.map +0 -1
- package/dist/src/components/rental/rental.d.ts +0 -59
- package/dist/src/components/rental/rental.js +0 -619
- package/dist/src/components/rental/rental.js.map +0 -1
- package/dist/src/components/rental/rental.repository.d.ts +0 -8
- package/dist/src/components/rental/rental.repository.js +0 -67
- package/dist/src/components/rental/rental.repository.js.map +0 -1
- package/dist/src/components/rental-price/rental-price.d.ts +0 -18
- package/dist/src/components/rental-price/rental-price.js +0 -79
- package/dist/src/components/rental-price/rental-price.js.map +0 -1
- package/dist/src/components/rental-price/rental-price.repository.d.ts +0 -8
- package/dist/src/components/rental-price/rental-price.repository.js +0 -67
- package/dist/src/components/rental-price/rental-price.repository.js.map +0 -1
- package/dist/src/database.d.ts +0 -4
- package/dist/src/database.js +0 -25
- package/dist/src/database.js.map +0 -1
- package/dist/src/enum/account-type.enum.d.ts +0 -4
- package/dist/src/enum/account-type.enum.js +0 -9
- package/dist/src/enum/account-type.enum.js.map +0 -1
- package/dist/src/enum/aggrement-status.enum.d.ts +0 -5
- package/dist/src/enum/aggrement-status.enum.js +0 -10
- package/dist/src/enum/aggrement-status.enum.js.map +0 -1
- package/dist/src/enum/booking.enum.d.ts +0 -5
- package/dist/src/enum/booking.enum.js +0 -10
- package/dist/src/enum/booking.enum.js.map +0 -1
- package/dist/src/enum/index.d.ts +0 -5
- package/dist/src/enum/index.js +0 -12
- package/dist/src/enum/index.js.map +0 -1
- package/dist/src/enum/rental-status.enum.d.ts +0 -9
- package/dist/src/enum/rental-status.enum.js +0 -14
- package/dist/src/enum/rental-status.enum.js.map +0 -1
- package/dist/src/index.d.ts +0 -15
- package/dist/src/index.js +0 -43
- package/dist/src/index.js.map +0 -1
- package/dist/src/interfaces/agreement-attr.interface.d.ts +0 -7
- package/dist/src/interfaces/agreement-attr.interface.js +0 -3
- package/dist/src/interfaces/agreement-attr.interface.js.map +0 -1
- package/dist/src/interfaces/booking-attr.interface.d.ts +0 -18
- package/dist/src/interfaces/booking-attr.interface.js +0 -3
- package/dist/src/interfaces/booking-attr.interface.js.map +0 -1
- package/dist/src/interfaces/booking-find-all-search-attr.interface.d.ts +0 -12
- package/dist/src/interfaces/booking-find-all-search-attr.interface.js +0 -3
- package/dist/src/interfaces/booking-find-all-search-attr.interface.js.map +0 -1
- package/dist/src/interfaces/index.d.ts +0 -7
- package/dist/src/interfaces/index.js +0 -3
- package/dist/src/interfaces/index.js.map +0 -1
- package/dist/src/interfaces/joint-hirer-attr.interface.d.ts +0 -10
- package/dist/src/interfaces/joint-hirer-attr.interface.js +0 -3
- package/dist/src/interfaces/joint-hirer-attr.interface.js.map +0 -1
- package/dist/src/interfaces/rental-attr.interface.d.ts +0 -24
- package/dist/src/interfaces/rental-attr.interface.js +0 -3
- package/dist/src/interfaces/rental-attr.interface.js.map +0 -1
- package/dist/src/interfaces/rental-find-all-search-attr.interface.d.ts +0 -10
- package/dist/src/interfaces/rental-find-all-search-attr.interface.js +0 -3
- package/dist/src/interfaces/rental-find-all-search-attr.interface.js.map +0 -1
- package/dist/src/interfaces/rental-price-attr.interface.d.ts +0 -7
- package/dist/src/interfaces/rental-price-attr.interface.js +0 -3
- package/dist/src/interfaces/rental-price-attr.interface.js.map +0 -1
- package/dist/src/models/agreement.entity.d.ts +0 -10
- package/dist/src/models/agreement.entity.js +0 -60
- package/dist/src/models/agreement.entity.js.map +0 -1
- package/dist/src/models/booking.entity.d.ts +0 -21
- package/dist/src/models/booking.entity.js +0 -128
- package/dist/src/models/booking.entity.js.map +0 -1
- package/dist/src/models/index.d.ts +0 -6
- package/dist/src/models/index.js +0 -14
- package/dist/src/models/index.js.map +0 -1
- package/dist/src/models/joint-hirer.entity.d.ts +0 -13
- package/dist/src/models/joint-hirer.entity.js +0 -79
- package/dist/src/models/joint-hirer.entity.js.map +0 -1
- package/dist/src/models/rental-price.entity.d.ts +0 -8
- package/dist/src/models/rental-price.entity.js +0 -59
- package/dist/src/models/rental-price.entity.js.map +0 -1
- package/dist/src/models/rental.entity.d.ts +0 -29
- package/dist/src/models/rental.entity.js +0 -160
- package/dist/src/models/rental.entity.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
package/.commitlintrc.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
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
|
-
]
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
}
|
|
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
|
+
]
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
}
|
package/.eslintrc
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
"parser": "@typescript-eslint/parser",
|
|
3
|
-
"parserOptions": {
|
|
4
|
-
"ecmaVersion": "latest",
|
|
5
|
-
"sourceType": "module" // Allows for the use of imports
|
|
6
|
-
},
|
|
7
|
-
"extends": ["plugin:@typescript-eslint/recommended"],
|
|
8
|
-
"env": {
|
|
9
|
-
"node": true // Enable Node.js global variables
|
|
10
|
-
},
|
|
11
|
-
"rules": {
|
|
12
|
-
"no-console": "off",
|
|
13
|
-
"import/prefer-default-export": "off",
|
|
14
|
-
"@typescript-eslint/no-unused-vars": "warn"
|
|
15
|
-
}
|
|
16
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"parser": "@typescript-eslint/parser",
|
|
3
|
+
"parserOptions": {
|
|
4
|
+
"ecmaVersion": "latest",
|
|
5
|
+
"sourceType": "module" // Allows for the use of imports
|
|
6
|
+
},
|
|
7
|
+
"extends": ["plugin:@typescript-eslint/recommended"],
|
|
8
|
+
"env": {
|
|
9
|
+
"node": true // Enable Node.js global variables
|
|
10
|
+
},
|
|
11
|
+
"rules": {
|
|
12
|
+
"no-console": "off",
|
|
13
|
+
"import/prefer-default-export": "off",
|
|
14
|
+
"@typescript-eslint/no-unused-vars": "warn"
|
|
15
|
+
}
|
|
16
|
+
}
|
package/.eslintrc.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
parser: "@typescript-eslint/parser",
|
|
3
|
-
plugins: ["@typescript-eslint"],
|
|
4
|
-
|
|
5
|
-
parserOptions: {
|
|
6
|
-
ecmaVersion: "latest", // Allows the use of modern ECMAScript features
|
|
7
|
-
sourceType: "module", // Allows for the use of imports
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
|
|
11
|
-
env: {
|
|
12
|
-
node: true, // Enable Node.js global variables
|
|
13
|
-
},
|
|
14
|
-
rules: {
|
|
15
|
-
"no-console": "off",
|
|
16
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
17
|
-
"@typescript-eslint/no-var-requires": "off",
|
|
18
|
-
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
19
|
-
"import/prefer-default-export": "off",
|
|
20
|
-
"@typescript-eslint/no-unused-vars": "warn",
|
|
21
|
-
"no-useless-catch": "off",
|
|
22
|
-
"@typescript-eslint/no-non-null-assertion": "off",
|
|
23
|
-
"@typescript-eslint/no-empty-function": "off",
|
|
24
|
-
"@typescript-eslint/no-empty-interface": "off",
|
|
25
|
-
"@typescript-eslint/no-inferrable-types": "off",
|
|
26
|
-
"@typescript-eslint/no-namespace": "off",
|
|
27
|
-
"@typescript-eslint/no-use-before-define": "off",
|
|
28
|
-
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
29
|
-
"@typescript-eslint/no-unsafe-call": "off",
|
|
30
|
-
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
31
|
-
"@typescript-eslint/no-unsafe-return": "off",
|
|
32
|
-
"@typescript-eslint/restrict-template-expressions": "off",
|
|
33
|
-
"no-useless-escape": "off",
|
|
34
|
-
},
|
|
35
|
-
};
|
|
1
|
+
module.exports = {
|
|
2
|
+
parser: "@typescript-eslint/parser",
|
|
3
|
+
plugins: ["@typescript-eslint"],
|
|
4
|
+
|
|
5
|
+
parserOptions: {
|
|
6
|
+
ecmaVersion: "latest", // Allows the use of modern ECMAScript features
|
|
7
|
+
sourceType: "module", // Allows for the use of imports
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
|
|
11
|
+
env: {
|
|
12
|
+
node: true, // Enable Node.js global variables
|
|
13
|
+
},
|
|
14
|
+
rules: {
|
|
15
|
+
"no-console": "off",
|
|
16
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
17
|
+
"@typescript-eslint/no-var-requires": "off",
|
|
18
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
19
|
+
"import/prefer-default-export": "off",
|
|
20
|
+
"@typescript-eslint/no-unused-vars": "warn",
|
|
21
|
+
"no-useless-catch": "off",
|
|
22
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
|
23
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
24
|
+
"@typescript-eslint/no-empty-interface": "off",
|
|
25
|
+
"@typescript-eslint/no-inferrable-types": "off",
|
|
26
|
+
"@typescript-eslint/no-namespace": "off",
|
|
27
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
28
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
29
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
|
30
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
31
|
+
"@typescript-eslint/no-unsafe-return": "off",
|
|
32
|
+
"@typescript-eslint/restrict-template-expressions": "off",
|
|
33
|
+
"no-useless-escape": "off",
|
|
34
|
+
},
|
|
35
|
+
};
|
package/.gitlab-ci.yml
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
variables:
|
|
2
|
-
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
|
|
3
|
-
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
|
|
4
|
-
sonarcloud-check:
|
|
5
|
-
image:
|
|
6
|
-
name: sonarsource/sonar-scanner-cli:latest
|
|
7
|
-
entrypoint: [""]
|
|
8
|
-
cache:
|
|
9
|
-
key: "${CI_JOB_NAME}"
|
|
10
|
-
paths:
|
|
11
|
-
- .sonar/cache
|
|
12
|
-
script:
|
|
13
|
-
- sonar-scanner
|
|
14
|
-
only:
|
|
15
|
-
- merge_requests
|
|
16
|
-
- main
|
|
1
|
+
variables:
|
|
2
|
+
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
|
|
3
|
+
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
|
|
4
|
+
sonarcloud-check:
|
|
5
|
+
image:
|
|
6
|
+
name: sonarsource/sonar-scanner-cli:latest
|
|
7
|
+
entrypoint: [""]
|
|
8
|
+
cache:
|
|
9
|
+
key: "${CI_JOB_NAME}"
|
|
10
|
+
paths:
|
|
11
|
+
- .sonar/cache
|
|
12
|
+
script:
|
|
13
|
+
- sonar-scanner
|
|
14
|
+
only:
|
|
15
|
+
- merge_requests
|
|
16
|
+
- main
|
package/.husky/commit-msg
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
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
|
-
if [ "${a[0]}" = "feat" ];
|
|
10
|
-
then
|
|
11
|
-
npm version --commit-hooks false --no-git-tag-version minor
|
|
12
|
-
else
|
|
13
|
-
npm version --commit-hooks false --no-git-tag-version patch
|
|
14
|
-
fi
|
|
15
|
-
git add .
|
|
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
|
+
if [ "${a[0]}" = "feat" ];
|
|
10
|
+
then
|
|
11
|
+
npm version --commit-hooks false --no-git-tag-version minor
|
|
12
|
+
else
|
|
13
|
+
npm version --commit-hooks false --no-git-tag-version patch
|
|
14
|
+
fi
|
|
15
|
+
git add .
|
|
16
16
|
git commit -m "$message" --no-verify
|
package/.husky/pre-commit
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
#!/usr/bin/env sh
|
|
2
|
-
. "$(dirname -- "$0")/_/husky.sh"
|
|
3
|
-
|
|
4
|
-
npm run lint
|
|
5
|
-
npm run format
|
|
6
|
-
npm run build
|
|
7
|
-
git add .
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
. "$(dirname -- "$0")/_/husky.sh"
|
|
3
|
+
|
|
4
|
+
npm run lint
|
|
5
|
+
npm run format
|
|
6
|
+
npm run build
|
|
7
|
+
git add .
|
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/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
|
+
|
package/eslint.config.mjs
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import eslintPlugin from "@typescript-eslint/eslint-plugin";
|
|
2
|
-
import parser from "@typescript-eslint/parser";
|
|
3
|
-
|
|
4
|
-
export default [
|
|
5
|
-
{
|
|
6
|
-
languageOptions: {
|
|
7
|
-
parser: parser,
|
|
8
|
-
ecmaVersion: "latest", // Allows modern ECMAScript features
|
|
9
|
-
sourceType: "module", // Allows for the use of imports
|
|
10
|
-
},
|
|
11
|
-
plugins: {
|
|
12
|
-
"@typescript-eslint": eslintPlugin,
|
|
13
|
-
},
|
|
14
|
-
rules: {
|
|
15
|
-
"no-console": "off",
|
|
16
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
17
|
-
"@typescript-eslint/no-var-requires": "off",
|
|
18
|
-
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
19
|
-
"import/prefer-default-export": "off",
|
|
20
|
-
"@typescript-eslint/no-unused-vars": "warn",
|
|
21
|
-
"no-useless-catch": "off",
|
|
22
|
-
"@typescript-eslint/no-non-null-assertion": "off",
|
|
23
|
-
"@typescript-eslint/no-empty-function": "off",
|
|
24
|
-
"@typescript-eslint/no-empty-interface": "off",
|
|
25
|
-
"@typescript-eslint/no-inferrable-types": "off",
|
|
26
|
-
"@typescript-eslint/no-namespace": "off",
|
|
27
|
-
"@typescript-eslint/no-use-before-define": "off",
|
|
28
|
-
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
29
|
-
"@typescript-eslint/no-unsafe-call": "off",
|
|
30
|
-
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
31
|
-
"@typescript-eslint/no-unsafe-return": "off",
|
|
32
|
-
"@typescript-eslint/restrict-template-expressions": "off",
|
|
33
|
-
"no-useless-escape": "off",
|
|
34
|
-
},
|
|
35
|
-
ignores: ["node_modules", "dist"],
|
|
36
|
-
},
|
|
37
|
-
];
|
|
1
|
+
import eslintPlugin from "@typescript-eslint/eslint-plugin";
|
|
2
|
+
import parser from "@typescript-eslint/parser";
|
|
3
|
+
|
|
4
|
+
export default [
|
|
5
|
+
{
|
|
6
|
+
languageOptions: {
|
|
7
|
+
parser: parser,
|
|
8
|
+
ecmaVersion: "latest", // Allows modern ECMAScript features
|
|
9
|
+
sourceType: "module", // Allows for the use of imports
|
|
10
|
+
},
|
|
11
|
+
plugins: {
|
|
12
|
+
"@typescript-eslint": eslintPlugin,
|
|
13
|
+
},
|
|
14
|
+
rules: {
|
|
15
|
+
"no-console": "off",
|
|
16
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
17
|
+
"@typescript-eslint/no-var-requires": "off",
|
|
18
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
19
|
+
"import/prefer-default-export": "off",
|
|
20
|
+
"@typescript-eslint/no-unused-vars": "warn",
|
|
21
|
+
"no-useless-catch": "off",
|
|
22
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
|
23
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
24
|
+
"@typescript-eslint/no-empty-interface": "off",
|
|
25
|
+
"@typescript-eslint/no-inferrable-types": "off",
|
|
26
|
+
"@typescript-eslint/no-namespace": "off",
|
|
27
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
28
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
29
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
|
30
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
31
|
+
"@typescript-eslint/no-unsafe-return": "off",
|
|
32
|
+
"@typescript-eslint/restrict-template-expressions": "off",
|
|
33
|
+
"no-useless-escape": "off",
|
|
34
|
+
},
|
|
35
|
+
ignores: ["node_modules", "dist"],
|
|
36
|
+
},
|
|
37
|
+
];
|
package/jest.config.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/** @type {import('ts-jest').JestConfigWithTsJest} */
|
|
2
|
-
module.exports = {
|
|
3
|
-
clearMocks: true,
|
|
4
|
-
preset: 'ts-jest',
|
|
5
|
-
testTimeout: 20000,
|
|
6
|
-
coverageDirectory: "coverage",
|
|
7
|
-
testEnvironment: 'node',
|
|
8
|
-
"modulePathIgnorePatterns": [
|
|
9
|
-
"<rootDir>/dist"
|
|
10
|
-
],
|
|
1
|
+
/** @type {import('ts-jest').JestConfigWithTsJest} */
|
|
2
|
+
module.exports = {
|
|
3
|
+
clearMocks: true,
|
|
4
|
+
preset: 'ts-jest',
|
|
5
|
+
testTimeout: 20000,
|
|
6
|
+
coverageDirectory: "coverage",
|
|
7
|
+
testEnvironment: 'node',
|
|
8
|
+
"modulePathIgnorePatterns": [
|
|
9
|
+
"<rootDir>/dist"
|
|
10
|
+
],
|
|
11
11
|
};
|
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/** @type {import('sequelize-cli').Migration} */
|
|
4
|
-
module.exports = {
|
|
5
|
-
async up(queryInterface, Sequelize) {
|
|
6
|
-
await queryInterface.createTable('booking_Booking', {
|
|
7
|
-
BookingNo: {
|
|
8
|
-
type: Sequelize.STRING(30),
|
|
9
|
-
allowNull: false,
|
|
10
|
-
primaryKey: true,
|
|
11
|
-
},
|
|
12
|
-
CustomerId: {
|
|
13
|
-
type: Sequelize.STRING(30),
|
|
14
|
-
allowNull: false,
|
|
15
|
-
},
|
|
16
|
-
CustomerType: {
|
|
17
|
-
type: Sequelize.STRING(30),
|
|
18
|
-
allowNull: false,
|
|
19
|
-
},
|
|
20
|
-
ItemId: {
|
|
21
|
-
type: Sequelize.STRING(30),
|
|
22
|
-
allowNull: false,
|
|
23
|
-
},
|
|
24
|
-
ItemType: {
|
|
25
|
-
type: Sequelize.STRING(30),
|
|
26
|
-
allowNull: false,
|
|
27
|
-
},
|
|
28
|
-
PriceId: {
|
|
29
|
-
type: Sequelize.STRING(30),
|
|
30
|
-
allowNull: false,
|
|
31
|
-
references: {
|
|
32
|
-
model: 'rental_Price',
|
|
33
|
-
key: 'PriceId',
|
|
34
|
-
},
|
|
35
|
-
onUpdate: 'CASCADE',
|
|
36
|
-
onDelete: 'CASCADE',
|
|
37
|
-
},
|
|
38
|
-
ScheduledStartDateTime: {
|
|
39
|
-
type: Sequelize.DATE,
|
|
40
|
-
allowNull: false,
|
|
41
|
-
},
|
|
42
|
-
ScheduledEndDateTime: {
|
|
43
|
-
type: Sequelize.DATE,
|
|
44
|
-
allowNull: false,
|
|
45
|
-
},
|
|
46
|
-
BookingFee: {
|
|
47
|
-
type: Sequelize.DECIMAL(10, 2),
|
|
48
|
-
allowNull: true,
|
|
49
|
-
},
|
|
50
|
-
Status: {
|
|
51
|
-
type: Sequelize.STRING(20),
|
|
52
|
-
allowNull: false,
|
|
53
|
-
},
|
|
54
|
-
CancelRemarks: {
|
|
55
|
-
type: Sequelize.STRING(3000),
|
|
56
|
-
},
|
|
57
|
-
CreatedById: {
|
|
58
|
-
type: Sequelize.STRING(30),
|
|
59
|
-
allowNull: false,
|
|
60
|
-
},
|
|
61
|
-
CreatedAt: {
|
|
62
|
-
type: Sequelize.DATE,
|
|
63
|
-
allowNull: false,
|
|
64
|
-
},
|
|
65
|
-
UpdatedById: {
|
|
66
|
-
type: Sequelize.STRING(30),
|
|
67
|
-
allowNull: false,
|
|
68
|
-
},
|
|
69
|
-
UpdatedAt: {
|
|
70
|
-
type: Sequelize.DATE,
|
|
71
|
-
allowNull: false,
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
async down(queryInterface, _Sequelize) {
|
|
77
|
-
await queryInterface.dropTable('booking_Booking');
|
|
78
|
-
},
|
|
79
|
-
};
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/** @type {import('sequelize-cli').Migration} */
|
|
4
|
+
module.exports = {
|
|
5
|
+
async up(queryInterface, Sequelize) {
|
|
6
|
+
await queryInterface.createTable('booking_Booking', {
|
|
7
|
+
BookingNo: {
|
|
8
|
+
type: Sequelize.STRING(30),
|
|
9
|
+
allowNull: false,
|
|
10
|
+
primaryKey: true,
|
|
11
|
+
},
|
|
12
|
+
CustomerId: {
|
|
13
|
+
type: Sequelize.STRING(30),
|
|
14
|
+
allowNull: false,
|
|
15
|
+
},
|
|
16
|
+
CustomerType: {
|
|
17
|
+
type: Sequelize.STRING(30),
|
|
18
|
+
allowNull: false,
|
|
19
|
+
},
|
|
20
|
+
ItemId: {
|
|
21
|
+
type: Sequelize.STRING(30),
|
|
22
|
+
allowNull: false,
|
|
23
|
+
},
|
|
24
|
+
ItemType: {
|
|
25
|
+
type: Sequelize.STRING(30),
|
|
26
|
+
allowNull: false,
|
|
27
|
+
},
|
|
28
|
+
PriceId: {
|
|
29
|
+
type: Sequelize.STRING(30),
|
|
30
|
+
allowNull: false,
|
|
31
|
+
references: {
|
|
32
|
+
model: 'rental_Price',
|
|
33
|
+
key: 'PriceId',
|
|
34
|
+
},
|
|
35
|
+
onUpdate: 'CASCADE',
|
|
36
|
+
onDelete: 'CASCADE',
|
|
37
|
+
},
|
|
38
|
+
ScheduledStartDateTime: {
|
|
39
|
+
type: Sequelize.DATE,
|
|
40
|
+
allowNull: false,
|
|
41
|
+
},
|
|
42
|
+
ScheduledEndDateTime: {
|
|
43
|
+
type: Sequelize.DATE,
|
|
44
|
+
allowNull: false,
|
|
45
|
+
},
|
|
46
|
+
BookingFee: {
|
|
47
|
+
type: Sequelize.DECIMAL(10, 2),
|
|
48
|
+
allowNull: true,
|
|
49
|
+
},
|
|
50
|
+
Status: {
|
|
51
|
+
type: Sequelize.STRING(20),
|
|
52
|
+
allowNull: false,
|
|
53
|
+
},
|
|
54
|
+
CancelRemarks: {
|
|
55
|
+
type: Sequelize.STRING(3000),
|
|
56
|
+
},
|
|
57
|
+
CreatedById: {
|
|
58
|
+
type: Sequelize.STRING(30),
|
|
59
|
+
allowNull: false,
|
|
60
|
+
},
|
|
61
|
+
CreatedAt: {
|
|
62
|
+
type: Sequelize.DATE,
|
|
63
|
+
allowNull: false,
|
|
64
|
+
},
|
|
65
|
+
UpdatedById: {
|
|
66
|
+
type: Sequelize.STRING(30),
|
|
67
|
+
allowNull: false,
|
|
68
|
+
},
|
|
69
|
+
UpdatedAt: {
|
|
70
|
+
type: Sequelize.DATE,
|
|
71
|
+
allowNull: false,
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
async down(queryInterface, _Sequelize) {
|
|
77
|
+
await queryInterface.dropTable('booking_Booking');
|
|
78
|
+
},
|
|
79
|
+
};
|