-
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: monorepo structure (#1082)
- Loading branch information
Showing
376 changed files
with
848 additions
and
381 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
|
@@ -35,11 +35,17 @@ jobs: | |
- uses: pnpm/[email protected] | ||
with: | ||
version: 8.x | ||
run_install: true | ||
- name: Run Test | ||
run_install: false | ||
- name: Install Dependencies | ||
run: | | ||
yarn lint | ||
yarn test | ||
pnpm i | ||
- name: Run Lint | ||
run: | | ||
npm run lint | ||
- name: Run Tests | ||
run: | | ||
npm run test | ||
env: | ||
CI: 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 |
---|---|---|
|
@@ -46,11 +46,3 @@ assets | |
|
||
scripts/workflow/docker-compose.yml | ||
scripts/workflow/data | ||
|
||
schema.gql | ||
|
||
app.config.js | ||
|
||
webpack-dist | ||
|
||
admin/ |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
schema.gql | ||
|
||
app.config.js | ||
|
||
webpack-dist | ||
|
||
./admin | ||
dist | ||
|
||
tmp |
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
File renamed without changes.
File renamed without changes.
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,24 @@ | ||
// why this, because we dont need pino logger, and this logger can not bundle whole package into only one file with ncc. | ||
// only work with fastify v4+ with pino v8+ | ||
|
||
module.exports = { | ||
symbols: { | ||
// https://github.com/pinojs/pino/blob/master/lib/symbols.js | ||
serializersSym: Symbol.for('pino.serializers'), | ||
}, | ||
stdSerializers: { | ||
error: function asErrValue(err) { | ||
const obj = { | ||
type: err.constructor.name, | ||
msg: err.message, | ||
stack: err.stack, | ||
} | ||
for (const key in err) { | ||
if (obj[key] === undefined) { | ||
obj[key] = err[key] | ||
} | ||
} | ||
return obj | ||
}, | ||
}, | ||
} |
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,4 @@ | ||
{ | ||
"name": "pino", | ||
"main": "./index.js" | ||
} |
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 @@ | ||
This is folder used to override dependencies. |
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 @@ | ||
// why do this. | ||
// we dont need request, because we get image color only by buffer, and we dont need send request. | ||
module.exports = {} |
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,4 @@ | ||
{ | ||
"name": "request", | ||
"main": "index.js" | ||
} |
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
File renamed without changes.
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,163 @@ | ||
{ | ||
"name": "@mx-space/core", | ||
"version": "4.0.2", | ||
"author": "Innei <https://innei.ren>", | ||
"private": true, | ||
"license": "AGPLv3", | ||
"dashboard": { | ||
"repo": "mx-space/mx-admin", | ||
"version": "3.30.3" | ||
}, | ||
"repository": { | ||
"directory": "mx-space/core", | ||
"url": "https://github.com/mx-space/core" | ||
}, | ||
"homepage": "https://github.com/mx-space/core#readme", | ||
"issues": "https://github.com/mx-space/core/issues", | ||
"scripts": { | ||
"prebuild": "rimraf dist", | ||
"build": "nest build", | ||
"build:webpack": "nest build --webpack --webpackPath ./configs/webpack.config.js -c ./configs/nest-cli.webpack.json", | ||
"dev": "npm run start", | ||
"repl": "npm run start -- --entryFile repl", | ||
"bundle": "rimraf out && npm run build && cd dist/src && npx ncc build main.js -o ../../out -m -t && cd ../.. && chmod +x out/index.js", | ||
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\" \"packages/**/*.ts\"", | ||
"start": "cross-env NODE_ENV=development nest start -w --path tsconfig.json -- ", | ||
"start:debug": "cross-env NODE_ENV=development nest start --debug --watch", | ||
"start:cluster": "cross-env NODE_ENV=development nest start --watch -- --cluster --workers 2", | ||
"start:prod": "cross-env NODE_ENV=production node dist/src/main", | ||
"lint": "eslint \"{src,apps,libs,test,packages}/**/*.ts\" --fix", | ||
"prod": "cross-env NODE_ENV=production pm2-runtime start ecosystem.config.js", | ||
"prod:pm2": "cross-env NODE_ENV=production pm2 restart ecosystem.config.js", | ||
"prod:stop": "pm2 stop ecosystem.config.js", | ||
"prod:debug": "cross-env NODE_ENV=production nest start --debug --watch", | ||
"test": "NODE_ENV=development vitest", | ||
"test:watch": "NODE_ENV=development vitest -w", | ||
"docs": "npx @compodoc/compodoc -p tsconfig.json -s -d docs" | ||
}, | ||
"bump": { | ||
"before": [ | ||
"git pull --rebase", | ||
"pnpm i", | ||
"node scripts/get-latest-admin-version.js" | ||
], | ||
"after": [ | ||
"sh ./scripts/assets-push.sh" | ||
], | ||
"changelog": true | ||
}, | ||
"dependencies": { | ||
"@algolia/client-search": "^4.17.1", | ||
"@babel/core": "7.22.1", | ||
"@babel/plugin-transform-modules-commonjs": "7.21.5", | ||
"@babel/plugin-transform-typescript": "7.22.3", | ||
"@babel/types": "^7.22.4", | ||
"@fastify/cookie": "8.3.0", | ||
"@fastify/multipart": "7.6.0", | ||
"@fastify/static": "6.10.2", | ||
"@innei/next-async": "0.3.0", | ||
"@nestjs/cache-manager": "1.0.0", | ||
"@nestjs/common": "9.4.2", | ||
"@nestjs/core": "9.4.2", | ||
"@nestjs/event-emitter": "1.4.1", | ||
"@nestjs/mapped-types": "^1.2.2", | ||
"@nestjs/platform-fastify": "9.4.2", | ||
"@nestjs/platform-socket.io": "9.4.2", | ||
"@nestjs/schedule": "2.2.2", | ||
"@nestjs/throttler": "4.0.0", | ||
"@nestjs/websockets": "9.4.2", | ||
"@socket.io/redis-adapter": "7.2.0", | ||
"@socket.io/redis-emitter": "4.1.1", | ||
"@typegoose/auto-increment": "3.2.0", | ||
"@typegoose/typegoose": "11.2.0", | ||
"@types/jsonwebtoken": "9.0.2", | ||
"algoliasearch": "4.17.1", | ||
"axios": "^1.4.0", | ||
"axios-retry": "3.5.0", | ||
"bcrypt": "5.1.0", | ||
"cache-manager": "4.1.0", | ||
"cache-manager-ioredis": "2.1.0", | ||
"class-transformer": "0.5.1", | ||
"class-validator": "0.13.2", | ||
"class-validator-jsonschema": "npm:@innei/[email protected]", | ||
"commander": "10.0.1", | ||
"consola": "*", | ||
"dayjs": "1.11.8", | ||
"ejs": "3.1.9", | ||
"form-data": "4.0.0", | ||
"get-image-colors": "4.0.1", | ||
"image-size": "1.0.2", | ||
"inquirer": "*", | ||
"isbot": "3.6.10", | ||
"js-yaml": "*", | ||
"json5": "2.2.3", | ||
"jsonwebtoken": "9.0.0", | ||
"jszip": "3.10.1", | ||
"linkedom": "0.14.26", | ||
"lodash": "*", | ||
"lru-cache": "9.1.1", | ||
"marked": "5.0.4", | ||
"mime-types": "*", | ||
"mkdirp": "*", | ||
"mongoose": "7.2.2", | ||
"mongoose-aggregate-paginate-v2": "1.0.6", | ||
"mongoose-autopopulate": "1.0.1", | ||
"mongoose-lean-getters": "1.1.0", | ||
"mongoose-lean-id": "0.5.0", | ||
"mongoose-lean-virtuals": "0.9.1", | ||
"mongoose-paginate-v2": "1.7.1", | ||
"nanoid": "3.3.4", | ||
"node-machine-id": "1.1.12", | ||
"node-pty": "0.10.1", | ||
"nodemailer": "6.9.3", | ||
"pluralize": "*", | ||
"qs": "6.11.2", | ||
"reflect-metadata": "0.1.13", | ||
"rxjs": "7.8.1", | ||
"semver": "7.5.1", | ||
"slugify": "1.6.6", | ||
"snakecase-keys": "5.4.5", | ||
"ua-parser-js": "1.0.35", | ||
"vm2": "3.9.19", | ||
"wildcard-match": "5.1.2", | ||
"xss": "1.0.14", | ||
"zx-cjs": "7.0.7-0" | ||
}, | ||
"devDependencies": { | ||
"@nestjs/cli": "9.5.0", | ||
"@nestjs/schematics": "9.2.0", | ||
"@nestjs/testing": "9.4.2", | ||
"@swc/core": "1.3.4", | ||
"@types/babel__core": "7.20.1", | ||
"@types/bcrypt": "5.0.0", | ||
"@types/cache-manager": "4.0.2", | ||
"@types/cron": "2.0.1", | ||
"@types/ejs": "3.1.2", | ||
"@types/get-image-colors": "4.0.2", | ||
"@types/js-yaml": "4.0.5", | ||
"@types/lodash": "4.14.195", | ||
"@types/marked": "4.3.1", | ||
"@types/mime-types": "2.1.1", | ||
"@types/mongoose-aggregate-paginate-v2": "1.0.9", | ||
"@types/node": "18.16.16", | ||
"@types/nodemailer": "6.4.8", | ||
"@types/qs": "6.9.7", | ||
"@types/semver": "7.5.0", | ||
"@types/ua-parser-js": "0.7.36", | ||
"@types/validator": "13.7.17", | ||
"@vercel/ncc": "0.36.1", | ||
"cron": "*", | ||
"husky": "8.0.3", | ||
"ioredis": "5.3.2", | ||
"rollup-plugin-swc": "0.2.1", | ||
"socket.io": "4.6.2", | ||
"vite": "3.2.5", | ||
"vite-tsconfig-paths": "4.2.0", | ||
"vitest": "0.25.3", | ||
"zx": "7.2.2" | ||
}, | ||
"optionalDependencies": { | ||
"mongodb-memory-server": "*", | ||
"redis-memory-server": "*" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion
3
...modules/aggregate/aggregate.controller.ts → ...modules/aggregate/aggregate.controller.ts
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion
3
src/modules/feed/feed.controller.ts → .../core/src/modules/feed/feed.controller.ts
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion
3
src/modules/sitemap/sitemap.controller.ts → ...src/modules/sitemap/sitemap.controller.ts
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.