-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: update monorepo integration library (#537)
- Loading branch information
1 parent
fc69763
commit e9b2034
Showing
34 changed files
with
4,772 additions
and
4,458 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit ${1} | ||
pnpm dlx commitlint --edit $1 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
enable-pre-post-scripts=true | ||
# enable-pre-post-scripts: disabled by default(pnpm 8). | ||
enable-pre-post-scripts=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
**/dist/ | ||
**/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
module.exports = { | ||
const config = { | ||
printWidth: 120, | ||
tabWidth: 2, | ||
singleQuote: true, | ||
trailingComma: 'none', | ||
arrowParens: 'avoid', | ||
htmlWhitespaceSensitivity: 'strict', | ||
vueIndentScriptAndStyle: true, | ||
endOfLine: 'auto' | ||
}; | ||
|
||
export default config; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,20 @@ | ||
# initialize: | ||
# sudo docker compose exec cluster-1_master-1 redis-cli --cluster create 127.0.0.1:16380 127.0.0.1:16381 127.0.0.1:16382 --cluster-yes | ||
# sudo docker compose exec cluster-2_master-1 redis-cli --cluster create 127.0.0.1:16480 127.0.0.1:16481 127.0.0.1:16482 --cluster-yes | ||
# sudo docker compose exec cluster-m1 redis-cli -a mycluster --cluster create 127.0.0.1:7380 127.0.0.1:7381 127.0.0.1:7382 --cluster-yes | ||
|
||
services: | ||
cluster-1_master-1: | ||
image: bitnami/redis-cluster:latest | ||
environment: | ||
- REDIS_PORT_NUMBER=16380 | ||
- REDIS_PASSWORD=cluster1 | ||
- REDIS_NODES=cluster-1_master-1 cluster-1_master-2 cluster-1_master-3 | ||
- REDIS_CLUSTER_DYNAMIC_IPS=no | ||
- REDIS_CLUSTER_ANNOUNCE_IP=0.0.0.0 | ||
- REDISCLI_AUTH=cluster1 | ||
network_mode: host | ||
cluster-1_master-2: | ||
image: bitnami/redis-cluster:latest | ||
environment: | ||
- REDIS_PORT_NUMBER=16381 | ||
- REDIS_PASSWORD=cluster1 | ||
- REDIS_NODES=cluster-1_master-1 cluster-1_master-2 cluster-1_master-3 | ||
- REDIS_CLUSTER_DYNAMIC_IPS=no | ||
- REDIS_CLUSTER_ANNOUNCE_IP=0.0.0.0 | ||
redis: | ||
image: redis/redis-stack-server:latest | ||
network_mode: host | ||
cluster-1_master-3: | ||
image: bitnami/redis-cluster:latest | ||
environment: | ||
- REDIS_PORT_NUMBER=16382 | ||
- REDIS_PASSWORD=cluster1 | ||
- REDIS_NODES=cluster-1_master-1 cluster-1_master-2 cluster-1_master-3 | ||
- REDIS_CLUSTER_DYNAMIC_IPS=no | ||
- REDIS_CLUSTER_ANNOUNCE_IP=0.0.0.0 | ||
network_mode: host | ||
|
||
cluster-2_master-1: | ||
image: bitnami/redis-cluster:latest | ||
environment: | ||
- REDIS_PORT_NUMBER=16480 | ||
- REDIS_PASSWORD=cluster2 | ||
- REDIS_NODES=cluster-2_master-1 cluster-2_master-2 cluster-2_master-3 | ||
- REDIS_CLUSTER_DYNAMIC_IPS=no | ||
- REDIS_CLUSTER_ANNOUNCE_IP=0.0.0.0 | ||
- REDISCLI_AUTH=cluster2 | ||
- 'REDIS_ARGS=--port 6380 --requirepass myredis --appendonly yes' | ||
cluster-m1: | ||
image: redis:latest | ||
network_mode: host | ||
cluster-2_master-2: | ||
image: bitnami/redis-cluster:latest | ||
environment: | ||
- REDIS_PORT_NUMBER=16481 | ||
- REDIS_PASSWORD=cluster2 | ||
- REDIS_NODES=cluster-2_master-1 cluster-2_master-2 cluster-2_master-3 | ||
- REDIS_CLUSTER_DYNAMIC_IPS=no | ||
- REDIS_CLUSTER_ANNOUNCE_IP=0.0.0.0 | ||
command: 'redis-server --port 7380 --requirepass mycluster --cluster-enabled yes --cluster-config-file nodes.conf --appendonly yes' | ||
cluster-m2: | ||
image: redis:latest | ||
network_mode: host | ||
cluster-2_master-3: | ||
image: bitnami/redis-cluster:latest | ||
environment: | ||
- REDIS_PORT_NUMBER=16482 | ||
- REDIS_PASSWORD=cluster2 | ||
- REDIS_NODES=cluster-2_master-1 cluster-2_master-2 cluster-2_master-3 | ||
- REDIS_CLUSTER_DYNAMIC_IPS=no | ||
- REDIS_CLUSTER_ANNOUNCE_IP=0.0.0.0 | ||
command: 'redis-server --port 7381 --requirepass mycluster --cluster-enabled yes --cluster-config-file nodes.conf --appendonly yes' | ||
cluster-m3: | ||
image: redis:latest | ||
network_mode: host | ||
|
||
redis-1: | ||
image: bitnami/redis:latest | ||
environment: | ||
- REDIS_PORT_NUMBER=6380 | ||
- ALLOW_EMPTY_PASSWORD=yes | ||
networks: | ||
- dev | ||
ports: | ||
- '6380:6380' | ||
command: /opt/bitnami/scripts/redis/run.sh --maxmemory 16mb | ||
redis-2: | ||
image: bitnami/redis:latest | ||
environment: | ||
- REDIS_PORT_NUMBER=6381 | ||
- ALLOW_EMPTY_PASSWORD=yes | ||
networks: | ||
- dev | ||
ports: | ||
- '6381:6381' | ||
command: /opt/bitnami/scripts/redis/run.sh --maxmemory 16mb | ||
|
||
networks: | ||
dev: | ||
command: 'redis-server --port 7382 --requirepass mycluster --cluster-enabled yes --cluster-config-file nodes.conf --appendonly yes' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import eslint from '@eslint/js'; | ||
import tseslint from 'typescript-eslint'; | ||
import globals from 'globals'; | ||
import jest from 'eslint-plugin-jest'; | ||
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; | ||
|
||
export default tseslint.config({ | ||
extends: [ | ||
eslint.configs.recommended, | ||
...tseslint.configs.recommendedTypeChecked, | ||
{ | ||
...jest.configs['flat/recommended'] | ||
}, | ||
{ | ||
...jest.configs['flat/style'] | ||
}, | ||
eslintPluginPrettierRecommended | ||
], | ||
languageOptions: { | ||
parserOptions: { | ||
project: ['./packages/*/tsconfig.json'], | ||
tsconfigRootDir: import.meta.dirname | ||
}, | ||
ecmaVersion: 2023, | ||
sourceType: 'commonjs', | ||
globals: { | ||
...globals.node, | ||
...globals.jest | ||
} | ||
}, | ||
ignores: ['.prettierrc.js', 'eslint.config.js', '**/dist/**/*'] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,51 @@ | ||
{ | ||
"name": "@liaoliaots/root", | ||
"version": "9", | ||
"description": "Redis(ioredis) module for Nest framework (node.js).", | ||
"name": "@liaoliaots/nestjs-monorepo", | ||
"version": "10", | ||
"description": "Redis module for Nest framework (node.js).", | ||
"author": "LiaoLiao <[email protected]>", | ||
"private": true, | ||
"license": "MIT", | ||
"keywords": [ | ||
"redis", | ||
"ioredis", | ||
"sentinel", | ||
"cluster", | ||
"nestjs", | ||
"nest", | ||
"nodejs", | ||
"node", | ||
"typescript", | ||
"javascript", | ||
"health", | ||
"healthcheck", | ||
"healthchecks", | ||
"diagnostics" | ||
], | ||
"type": "module", | ||
"scripts": { | ||
"prepare": "husky install" | ||
"prepare": "husky" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "17.3.0", | ||
"@commitlint/config-conventional": "17.3.0", | ||
"@nestjs/common": "9.2.1", | ||
"@nestjs/core": "9.2.1", | ||
"@nestjs/platform-fastify": "9.2.1", | ||
"@nestjs/terminus": "9.1.4", | ||
"@nestjs/testing": "9.2.1", | ||
"@types/jest": "29.2.5", | ||
"@types/node": "16.18.11", | ||
"@typescript-eslint/eslint-plugin": "5.47.1", | ||
"@typescript-eslint/parser": "5.47.1", | ||
"concurrently": "7.6.0", | ||
"eslint": "8.31.0", | ||
"eslint-config-prettier": "8.5.0", | ||
"eslint-plugin-jest": "27.2.0", | ||
"eslint-plugin-prettier": "4.2.1", | ||
"eslint-plugin-tsdoc": "0.2.17", | ||
"fastify": "4.10.2", | ||
"husky": "8.0.2", | ||
"ioredis": "5.2.4", | ||
"istanbul-badges-readme": "1.8.4", | ||
"jest": "29.3.1", | ||
"jest-extended": "3.2.0", | ||
"lint-staged": "13.1.0", | ||
"prettier": "2.8.1", | ||
"reflect-metadata": "0.1.13", | ||
"rimraf": "3.0.2", | ||
"rxjs": "7.8.0", | ||
"ts-jest": "29.0.3", | ||
"tsc-alias": "1.8.2", | ||
"typescript": "4.9.4" | ||
"@commitlint/cli": "19.5.0", | ||
"@commitlint/config-conventional": "19.5.0", | ||
"@eslint/js": "9.10.0", | ||
"@nestjs/common": "10.4.1", | ||
"@nestjs/core": "10.4.1", | ||
"@nestjs/platform-fastify": "10.4.1", | ||
"@nestjs/terminus": "10.2.3", | ||
"@nestjs/testing": "10.4.1", | ||
"@tsconfig/node20": "20.1.4", | ||
"@types/eslint__js": "8.42.3", | ||
"@types/jest": "29.5.13", | ||
"@types/node": "20.16.5", | ||
"concurrently": "9.0.1", | ||
"eslint": "9.10.0", | ||
"eslint-config-prettier": "9.1.0", | ||
"eslint-plugin-jest": "28.8.3", | ||
"eslint-plugin-prettier": "5.2.1", | ||
"fastify": "4.28.1", | ||
"globals": "15.9.0", | ||
"husky": "9.1.6", | ||
"istanbul-badges-readme": "1.9.0", | ||
"jest": "29.7.0", | ||
"jest-extended": "4.0.2", | ||
"lint-staged": "15.2.10", | ||
"prettier": "3.3.3", | ||
"reflect-metadata": "0.2.2", | ||
"rimraf": "6.0.1", | ||
"rxjs": "7.8.1", | ||
"ts-jest": "29.2.5", | ||
"tsc-alias": "1.8.10", | ||
"typescript": "5.6.2", | ||
"typescript-eslint": "8.5.0" | ||
}, | ||
"engines": { | ||
"node": ">=14", | ||
"pnpm": ">=7" | ||
"node": ">=20", | ||
"pnpm": ">=8" | ||
}, | ||
"commitlint": { | ||
"extends": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
'{lib,test}/**/*.ts': ['prettier --write', 'eslint', () => 'tsc -p tsconfig.build.json --noEmit'] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 LiaoLiao | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.