POC: generate twenty-server package.json with Nx (#3654)

* POC: generate twenty-server package.json with Nx

* Re-add passport

* Fix instal

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Thaïs 2024-02-13 18:16:21 -03:00 committed by GitHub
parent 0d41023edd
commit e011ecbd6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 430 additions and 692 deletions

View File

@ -53,7 +53,7 @@
} }
}, },
"installation": { "installation": {
"version": "17.2.7" "version": "17.2.8"
}, },
"affected": { "affected": {
"defaultBase": "main" "defaultBase": "main"

View File

@ -14,6 +14,7 @@
"@docusaurus/preset-classic": "^3.1.0", "@docusaurus/preset-classic": "^3.1.0",
"@emotion/react": "^11.11.1", "@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0", "@emotion/styled": "^11.11.0",
"@envelop/on-resolve": "^4.1.0",
"@floating-ui/react": "^0.24.3", "@floating-ui/react": "^0.24.3",
"@google-cloud/local-auth": "2.1.0", "@google-cloud/local-auth": "2.1.0",
"@graphiql/plugin-explorer": "^1.0.2", "@graphiql/plugin-explorer": "^1.0.2",
@ -24,9 +25,11 @@
"@mdx-js/react": "^3.0.0", "@mdx-js/react": "^3.0.0",
"@nestjs/apollo": "^11.0.5", "@nestjs/apollo": "^11.0.5",
"@nestjs/axios": "^3.0.1", "@nestjs/axios": "^3.0.1",
"@nestjs/cli": "^9.0.0",
"@nestjs/common": "^9.0.0", "@nestjs/common": "^9.0.0",
"@nestjs/config": "^2.3.2", "@nestjs/config": "^2.3.2",
"@nestjs/core": "^9.0.0", "@nestjs/core": "^9.0.0",
"@nestjs/event-emitter": "^2.0.3",
"@nestjs/jwt": "^10.0.3", "@nestjs/jwt": "^10.0.3",
"@nestjs/passport": "^9.0.3", "@nestjs/passport": "^9.0.3",
"@nestjs/platform-express": "^9.0.0", "@nestjs/platform-express": "^9.0.0",
@ -41,10 +44,10 @@
"@ptc-org/nestjs-query-typeorm": "4.2.1-alpha.2", "@ptc-org/nestjs-query-typeorm": "4.2.1-alpha.2",
"@react-email/components": "0.0.12", "@react-email/components": "0.0.12",
"@react-email/render": "0.0.10", "@react-email/render": "0.0.10",
"@sentry/node": "^7.66.0", "@sentry/node": "^7.99.0",
"@sentry/profiling-node": "^1.3.4", "@sentry/profiling-node": "^1.3.4",
"@sentry/react": "^7.88.0", "@sentry/react": "^7.88.0",
"@sentry/tracing": "^7.66.0", "@sentry/tracing": "^7.99.0",
"@sniptt/guards": "^0.2.0", "@sniptt/guards": "^0.2.0",
"@stoplight/elements": "^7.16.2", "@stoplight/elements": "^7.16.2",
"@swc/jest": "^0.2.29", "@swc/jest": "^0.2.29",
@ -78,8 +81,10 @@
"framer-motion": "^10.12.17", "framer-motion": "^10.12.17",
"googleapis": "105", "googleapis": "105",
"graphiql": "^3.0.10", "graphiql": "^3.0.10",
"graphql": "^16.8.1", "graphql": "16.8.0",
"graphql-fields": "^2.0.3", "graphql-fields": "^2.0.3",
"graphql-middleware": "^6.1.35",
"graphql-rate-limit": "^3.3.0",
"graphql-subscriptions": "2.0.0", "graphql-subscriptions": "2.0.0",
"graphql-tag": "^2.12.6", "graphql-tag": "^2.12.6",
"graphql-type-json": "^0.3.2", "graphql-type-json": "^0.3.2",
@ -100,6 +105,7 @@
"lodash.isobject": "^3.0.2", "lodash.isobject": "^3.0.2",
"lodash.kebabcase": "^4.1.1", "lodash.kebabcase": "^4.1.1",
"lodash.merge": "^4.6.2", "lodash.merge": "^4.6.2",
"lodash.omit": "^4.5.0",
"lodash.snakecase": "^4.1.1", "lodash.snakecase": "^4.1.1",
"lodash.upperfirst": "^4.3.1", "lodash.upperfirst": "^4.3.1",
"luxon": "^3.3.0", "luxon": "^3.3.0",
@ -110,13 +116,14 @@
"next-mdx-remote": "^4.4.1", "next-mdx-remote": "^4.4.1",
"nodemailer": "^6.9.8", "nodemailer": "^6.9.8",
"openapi-types": "^12.1.3", "openapi-types": "^12.1.3",
"passport": "^0.6.0", "passport": "^0.7.0",
"passport-google-oauth20": "^2.0.0", "passport-google-oauth20": "^2.0.0",
"passport-jwt": "^4.0.1", "passport-jwt": "^4.0.1",
"passport-local": "^1.0.0", "passport-local": "^1.0.0",
"patch-package": "^8.0.0", "patch-package": "^8.0.0",
"pg": "^8.11.3", "pg": "^8.11.3",
"pg-boss": "^9.0.3", "pg-boss": "^9.0.3",
"planer": "^1.2.0",
"prettier": "^3.0.3", "prettier": "^3.0.3",
"prism-react-renderer": "^2.1.0", "prism-react-renderer": "^2.1.0",
"qs": "^6.11.2", "qs": "^6.11.2",
@ -149,7 +156,7 @@
"ts-key-enum": "^2.0.12", "ts-key-enum": "^2.0.12",
"tslib": "^2.3.0", "tslib": "^2.3.0",
"tsup": "^8.0.1", "tsup": "^8.0.1",
"type-fest": "^4.1.0", "type-fest": "4.10.1",
"typeorm": "^0.3.17", "typeorm": "^0.3.17",
"use-debounce": "^10.0.0", "use-debounce": "^10.0.0",
"uuid": "^9.0.0", "uuid": "^9.0.0",
@ -170,11 +177,11 @@
"@nestjs/cli": "^9.0.0", "@nestjs/cli": "^9.0.0",
"@nestjs/schematics": "^9.0.0", "@nestjs/schematics": "^9.0.0",
"@nestjs/testing": "^9.0.0", "@nestjs/testing": "^9.0.0",
"@nx/eslint": "17.2.7", "@nx/eslint": "17.2.8",
"@nx/eslint-plugin": "17.2.7", "@nx/eslint-plugin": "17.2.8",
"@nx/jest": "17.2.7", "@nx/jest": "17.2.8",
"@nx/js": "17.2.8", "@nx/js": "17.2.8",
"@nx/react": "^17.2.8", "@nx/react": "17.2.8",
"@nx/vite": "17.2.8", "@nx/vite": "17.2.8",
"@storybook/addon-actions": "^7.6.3", "@storybook/addon-actions": "^7.6.3",
"@storybook/addon-coverage": "^1.0.0", "@storybook/addon-coverage": "^1.0.0",
@ -251,7 +258,7 @@
"jsdom": "~22.1.0", "jsdom": "~22.1.0",
"msw": "^2.0.11", "msw": "^2.0.11",
"msw-storybook-addon": "2.0.0--canary.122.b3ed3b1.0", "msw-storybook-addon": "2.0.0--canary.122.b3ed3b1.0",
"nx": "^17.2.8", "nx": "17.2.8",
"playwright": "^1.40.1", "playwright": "^1.40.1",
"prettier": "^3.1.1", "prettier": "^3.1.1",
"raw-loader": "^4.0.2", "raw-loader": "^4.0.2",
@ -279,7 +286,8 @@
"name": "twenty", "name": "twenty",
"packageManager": "yarn@4.0.2", "packageManager": "yarn@4.0.2",
"resolutions": { "resolutions": {
"graphql": "16.8.0" "graphql": "16.8.0",
"type-fest": "4.10.1"
}, },
"version": "0.2.1", "version": "0.2.1",
"scripts": { "scripts": {

View File

@ -11,6 +11,10 @@ COPY ./.yarn/releases /app/.yarn/releases
COPY ./packages/twenty-emails /app/packages/twenty-emails COPY ./packages/twenty-emails /app/packages/twenty-emails
COPY ./packages/twenty-server /app/packages/twenty-server COPY ./packages/twenty-server /app/packages/twenty-server
RUN yarn workspaces focus twenty-emails twenty-server RUN yarn workspaces focus twenty-emails twenty-server
RUN npx nx reset
RUN npx nx run twenty-server:build:packageJson
RUN mv /app/packages/twenty-server/dist/package.json /app/packages/twenty-server/package.json
RUN yarn workspaces focus twenty-emails twenty-server
RUN npx nx run twenty-server:build RUN npx nx run twenty-server:build
WORKDIR /app/packages/twenty-server WORKDIR /app/packages/twenty-server

View File

@ -24,10 +24,6 @@
"vite-plugin-dts": "~2.3.0", "vite-plugin-dts": "~2.3.0",
"vite-tsconfig-paths": "^4.2.1" "vite-tsconfig-paths": "^4.2.1"
}, },
"dependencies": {
"@react-email/components": "0.0.12",
"date-fns": "^2.30.0"
},
"engines": { "engines": {
"node": "^18.17.1", "node": "^18.17.1",
"npm": "please-use-yarn", "npm": "please-use-yarn",

View File

@ -34,99 +34,27 @@
"queue:work": "node dist/src/queue-worker" "queue:work": "node dist/src/queue-worker"
}, },
"dependencies": { "dependencies": {
"@aws-sdk/client-s3": "^3.363.0",
"@aws-sdk/credential-providers": "^3.363.0",
"@envelop/on-resolve": "^4.1.0",
"@graphql-yoga/nestjs": "patch:@graphql-yoga/nestjs@2.1.0#./patches/@graphql-yoga+nestjs+2.1.0.patch", "@graphql-yoga/nestjs": "patch:@graphql-yoga/nestjs@2.1.0#./patches/@graphql-yoga+nestjs+2.1.0.patch",
"@nestjs/apollo": "^11.0.5",
"@nestjs/axios": "^3.0.1",
"@nestjs/cli": "^9.0.0",
"@nestjs/common": "^9.0.0",
"@nestjs/config": "^2.3.2",
"@nestjs/core": "^9.0.0",
"@nestjs/event-emitter": "^2.0.3",
"@nestjs/graphql": "patch:@nestjs/graphql@12.0.8#./patches/@nestjs+graphql+12.0.8.patch", "@nestjs/graphql": "patch:@nestjs/graphql@12.0.8#./patches/@nestjs+graphql+12.0.8.patch",
"@nestjs/jwt": "^10.0.3",
"@nestjs/passport": "^9.0.3",
"@nestjs/platform-express": "^9.0.0",
"@nestjs/schematics": "^9.0.0",
"@nestjs/serve-static": "^3.0.0",
"@nestjs/terminus": "^9.2.2",
"@nestjs/testing": "^9.0.0",
"@nestjs/typeorm": "^10.0.0",
"@ptc-org/nestjs-query-core": "^4.2.0",
"@ptc-org/nestjs-query-graphql": "patch:@ptc-org/nestjs-query-graphql@4.2.0#./patches/@ptc-org+nestjs-query-graphql+4.2.0.patch", "@ptc-org/nestjs-query-graphql": "patch:@ptc-org/nestjs-query-graphql@4.2.0#./patches/@ptc-org+nestjs-query-graphql+4.2.0.patch",
"@ptc-org/nestjs-query-typeorm": "4.2.1-alpha.2", "class-validator": "patch:class-validator@0.14.0#./patches/class-validator+0.14.0.patch",
"@react-email/components": "0.0.12",
"@react-email/render": "0.0.10",
"@sentry/node": "^7.98.0",
"@sentry/profiling-node": "^1.3.4",
"@sentry/tracing": "^7.98.0",
"axios": "^1.6.2",
"bcrypt": "^5.1.1",
"bullmq": "^4.14.0",
"class-transformer": "^0.5.1",
"class-validator": "patch:class-validator@^0.14.0#./patches/class-validator+0.14.0.patch",
"date-fns": "^2.30.0",
"deep-equal": "^2.2.2",
"file-type": "16.5.4",
"googleapis": "105",
"graphql": "^16.8.1",
"graphql-fields": "^2.0.3",
"graphql-middleware": "^6.1.35", "graphql-middleware": "^6.1.35",
"graphql-rate-limit": "^3.3.0", "passport": "^0.7.0"
"graphql-subscriptions": "2.0.0",
"graphql-tag": "^2.12.6",
"graphql-type-json": "^0.3.2",
"graphql-upload": "^13.0.0",
"graphql-yoga": "^4.0.4",
"lodash.camelcase": "^4.3.0",
"lodash.groupby": "^4.6.0",
"lodash.isempty": "^4.4.0",
"lodash.isobject": "^3.0.2",
"lodash.kebabcase": "^4.1.1",
"lodash.omit": "^4.5.0",
"lodash.snakecase": "^4.1.1",
"lodash.upperfirst": "^4.3.1",
"mailparser": "^3.6.5",
"microdiff": "^1.3.2",
"nest-commander": "^3.12.0",
"nodemailer": "^6.9.8",
"openapi-types": "^12.1.3",
"passport": "^0.6.0",
"passport-google-oauth20": "^2.0.0",
"passport-jwt": "^4.0.1",
"passport-local": "^1.0.0",
"pg": "^8.11.3",
"pg-boss": "^9.0.3",
"planer": "^1.2.0",
"react": "^18.2.0",
"rimraf": "^3.0.2",
"sharp": "^0.32.1",
"type-fest": "^4.1.0",
"typeorm": "^0.3.17"
}, },
"devDependencies": { "devDependencies": {
"@nestjs/cli": "10.3.0",
"@nx/js": "17.2.8",
"@types/lodash.isempty": "^4.4.7", "@types/lodash.isempty": "^4.4.7",
"@types/lodash.isobject": "^3.0.7", "@types/lodash.isobject": "^3.0.7",
"@types/lodash.omit": "^4.5.9", "@types/lodash.omit": "^4.5.9",
"@types/lodash.snakecase": "^4.1.7", "@types/lodash.snakecase": "^4.1.7",
"@types/lodash.upperfirst": "^4.3.7", "@types/lodash.upperfirst": "^4.3.7",
"@types/react": "^18.2.39", "@types/react": "^18.2.39",
"jest": "29.7.0" "typescript": "^5.3.3"
}, },
"engines": { "engines": {
"node": "^18.17.1", "node": "^18.17.1",
"npm": "please-use-yarn", "npm": "please-use-yarn",
"yarn": "^4.0.2" "yarn": "^4.0.2"
},
"nx": {
"targets": {
"test:debug": {
"dependsOn": [
"^build"
]
}
}
} }
} }

View File

@ -0,0 +1,22 @@
{
"projectType": "application",
"targets": {
"build:packageJson": {
"executor": "@nx/js:tsc",
"dependsOn": [
"prebuild"
],
"options": {
"main": "packages/twenty-server/dist/src/main.js",
"tsConfig": "packages/twenty-server/tsconfig.json",
"outputPath": "packages/twenty-server/dist",
"updateBuildableProjectDepsInPackageJson": true
}
},
"test:debug": {
"dependsOn": [
"^build"
]
}
}
}

978
yarn.lock

File diff suppressed because it is too large Load Diff