mirror of
https://github.com/lingble/twenty.git
synced 2025-11-01 13:17:57 +00:00
chore: add nx/project.json to twenty-chrome-extension (#5217)
Fix for `build` CI on `twenty-chrome-extension` --------- Co-authored-by: Thaïs Guigon <guigon.thais@gmail.com>
This commit is contained in:
2
.github/workflows/ci-chrome-extension.yaml
vendored
2
.github/workflows/ci-chrome-extension.yaml
vendored
@@ -24,7 +24,7 @@ jobs:
|
|||||||
- name: Cancel Previous Runs
|
- name: Cancel Previous Runs
|
||||||
uses: styfle/cancel-workflow-action@0.11.0
|
uses: styfle/cancel-workflow-action@0.11.0
|
||||||
with:
|
with:
|
||||||
access_token: ${{ github.token }}
|
access_token: ${{ github.token }}
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
uses: ./.github/workflows/actions/yarn-install
|
uses: ./.github/workflows/actions/yarn-install
|
||||||
|
|||||||
13
.github/workflows/ci-front.yaml
vendored
13
.github/workflows/ci-front.yaml
vendored
@@ -94,25 +94,28 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
task: [lint, typecheck, test]
|
task: [lint, typecheck, test]
|
||||||
env:
|
|
||||||
REACT_APP_SERVER_BASE_URL: http://localhost:3000
|
|
||||||
steps:
|
steps:
|
||||||
- name: Cancel Previous Runs
|
- name: Cancel Previous Runs
|
||||||
uses: styfle/cancel-workflow-action@0.11.0
|
uses: styfle/cancel-workflow-action@0.11.0
|
||||||
with:
|
with:
|
||||||
access_token: ${{ github.token }}
|
access_token: ${{ github.token }}
|
||||||
- name: Fetch local actions and base branch history
|
- name: Fetch custom Github Actions and base branch history
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
uses: ./.github/workflows/actions/yarn-install
|
uses: ./.github/workflows/actions/yarn-install
|
||||||
- name: Front / Restore Task Cache
|
- name: Front / Restore ${{ matrix.task }} task cache
|
||||||
uses: ./.github/workflows/actions/task-cache
|
uses: ./.github/workflows/actions/task-cache
|
||||||
with:
|
with:
|
||||||
tag: scope:frontend
|
tag: scope:frontend
|
||||||
tasks: ${{ matrix.task }}
|
tasks: ${{ matrix.task }}
|
||||||
- name: Front / Run task
|
- name: Reset .env
|
||||||
|
uses: ./.github/workflows/actions/nx-affected
|
||||||
|
with:
|
||||||
|
tag: scope:frontend
|
||||||
|
tasks: reset:env
|
||||||
|
- name: Run ${{ matrix.task }} task
|
||||||
uses: ./.github/workflows/actions/nx-affected
|
uses: ./.github/workflows/actions/nx-affected
|
||||||
with:
|
with:
|
||||||
tag: scope:frontend
|
tag: scope:frontend
|
||||||
|
|||||||
2
.github/workflows/ci-server.yaml
vendored
2
.github/workflows/ci-server.yaml
vendored
@@ -28,7 +28,7 @@ jobs:
|
|||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
steps:
|
steps:
|
||||||
- name: Fetch local actions and base branch history
|
- name: Fetch custom Github Actions and base branch history
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|||||||
@@ -190,6 +190,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.14.5",
|
"@babel/core": "^7.14.5",
|
||||||
"@babel/preset-react": "^7.14.5",
|
"@babel/preset-react": "^7.14.5",
|
||||||
|
"@crxjs/vite-plugin": "^1.0.14",
|
||||||
"@docusaurus/module-type-aliases": "^3.1.0",
|
"@docusaurus/module-type-aliases": "^3.1.0",
|
||||||
"@docusaurus/tsconfig": "3.1.0",
|
"@docusaurus/tsconfig": "3.1.0",
|
||||||
"@graphql-codegen/cli": "^3.3.1",
|
"@graphql-codegen/cli": "^3.3.1",
|
||||||
@@ -235,6 +236,7 @@
|
|||||||
"@types/bcrypt": "^5.0.0",
|
"@types/bcrypt": "^5.0.0",
|
||||||
"@types/better-sqlite3": "^7.6.8",
|
"@types/better-sqlite3": "^7.6.8",
|
||||||
"@types/bytes": "^3.1.1",
|
"@types/bytes": "^3.1.1",
|
||||||
|
"@types/chrome": "^0.0.267",
|
||||||
"@types/crypto-js": "^4.2.2",
|
"@types/crypto-js": "^4.2.2",
|
||||||
"@types/deep-equal": "^1.0.1",
|
"@types/deep-equal": "^1.0.1",
|
||||||
"@types/express": "^4.17.13",
|
"@types/express": "^4.17.13",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
extends: ['../../.eslintrc.cjs', '../../.eslintrc.react.cjs'],
|
extends: ['../../.eslintrc.cjs', '../../.eslintrc.react.cjs'],
|
||||||
ignorePatterns: ['!**/*', 'node_modules', 'dist', 'src/generated/*.tsx'],
|
ignorePatterns: ['!**/*', 'node_modules', 'dist', '**/generated/*'],
|
||||||
overrides: [
|
overrides: [
|
||||||
{
|
{
|
||||||
files: ['*.ts', '*.tsx'],
|
files: ['*.ts', '*.tsx'],
|
||||||
|
|||||||
1
packages/twenty-chrome-extension/.prettierignore
Normal file
1
packages/twenty-chrome-extension/.prettierignore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
src/generated
|
||||||
@@ -5,19 +5,6 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"nx": "NX_DEFAULT_PROJECT=twenty-chrome-extension node ../../node_modules/nx/bin/nx.js",
|
"build": "npx vite build"
|
||||||
"clean": "npx rimraf ./dist",
|
|
||||||
"start": "yarn clean && VITE_MODE=development vite",
|
|
||||||
"build": "yarn clean && npx tsc && npx vite build",
|
|
||||||
"lint": "eslint . --report-unused-disable-directives --max-warnings 0 --config .eslintrc.cjs",
|
|
||||||
"graphql:generate": "graphql-codegen",
|
|
||||||
"fmt": "prettier --check \"src/**/*.ts\" \"src/**/*.tsx\"",
|
|
||||||
"fmt:fix": "prettier --cache --write \"src/**/*.ts\" \"src/**/*.tsx\""
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@types/chrome": "^0.0.256"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@crxjs/vite-plugin": "^1.0.14"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
69
packages/twenty-chrome-extension/project.json
Normal file
69
packages/twenty-chrome-extension/project.json
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
"name": "twenty-chrome-extension",
|
||||||
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||||
|
"projectType": "application",
|
||||||
|
"tags": ["scope:frontend"],
|
||||||
|
"targets": {
|
||||||
|
"build": {
|
||||||
|
"outputs": ["{options.outputPath}"],
|
||||||
|
"options": {
|
||||||
|
"outputPath": "{projectRoot}/dist"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"start": {
|
||||||
|
"executor": "@nx/vite:dev-server",
|
||||||
|
"options": {
|
||||||
|
"buildTarget": "twenty-chrome-extension:build",
|
||||||
|
"hmr": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"preview": {
|
||||||
|
"executor": "@nx/vite:preview-server",
|
||||||
|
"options": {
|
||||||
|
"buildTarget": "twenty-chrome-extension:build",
|
||||||
|
"port": 3002,
|
||||||
|
"open": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"reset:env": {
|
||||||
|
"executor": "nx:run-commands",
|
||||||
|
"inputs": ["{projectRoot}/.env.example"],
|
||||||
|
"outputs": ["{projectRoot}/.env"],
|
||||||
|
"cache": true,
|
||||||
|
"options": {
|
||||||
|
"cwd": "{projectRoot}",
|
||||||
|
"command": "cp .env.example .env"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"typecheck": {},
|
||||||
|
"lint": {
|
||||||
|
"options": {
|
||||||
|
"lintFilePatterns": [
|
||||||
|
"{projectRoot}/src/**/*.{ts,tsx,json}",
|
||||||
|
"{projectRoot}/package.json"
|
||||||
|
],
|
||||||
|
"maxWarnings": 0,
|
||||||
|
"reportUnusedDisableDirectives": "error"
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"ci": { "eslintConfig": "{projectRoot}/.eslintrc-ci.cjs" },
|
||||||
|
"fix": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fmt": {
|
||||||
|
"options": {
|
||||||
|
"files": "src"
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"fix": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"graphql:generate": {
|
||||||
|
"executor": "nx:run-commands",
|
||||||
|
"options": {
|
||||||
|
"cwd": "{projectRoot}",
|
||||||
|
"command": "graphql-codegen"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "./tsconfig.json",
|
"extends": "./tsconfig.json",
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "../../.cache/tsc"
|
|
||||||
},
|
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.test.ts",
|
"**/*.test.ts",
|
||||||
@@ -10,5 +7,5 @@
|
|||||||
"**/*.test.tsx",
|
"**/*.test.tsx",
|
||||||
"jest.config.ts"
|
"jest.config.ts"
|
||||||
],
|
],
|
||||||
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]
|
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
{
|
{
|
||||||
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"outDir": "../../.cache/tsc",
|
||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"baseUrl": ".",
|
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["src/options/modules/*"],
|
"@/*": ["packages/twenty-chrome-extension/src/options/modules/*"],
|
||||||
"~/*": ["src/*"]
|
"~/*": ["packages/twenty-chrome-extension/src/*"]
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Bundler mode */
|
/* Bundler mode */
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"extends": "./tsconfig.json",
|
"extends": "./tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "../../.cache/tsc",
|
|
||||||
"types": ["jest", "node"]
|
"types": ["jest", "node"]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
|
"codegen.ts",
|
||||||
"vite.config.ts",
|
"vite.config.ts",
|
||||||
"jest.config.ts",
|
"jest.config.ts",
|
||||||
"**/*.test.ts",
|
"**/*.test.ts",
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ const viteManifestHack: Plugin & {
|
|||||||
|
|
||||||
export default defineConfig(() => {
|
export default defineConfig(() => {
|
||||||
return {
|
return {
|
||||||
|
root: __dirname,
|
||||||
|
cacheDir: '../../node_modules/.vite/packages/twenty-chrome-extension',
|
||||||
|
|
||||||
build: {
|
build: {
|
||||||
emptyOutDir: true,
|
emptyOutDir: true,
|
||||||
outDir: 'dist',
|
outDir: 'dist',
|
||||||
|
|||||||
13
yarn.lock
13
yarn.lock
@@ -15896,13 +15896,13 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@types/chrome@npm:^0.0.256":
|
"@types/chrome@npm:^0.0.267":
|
||||||
version: 0.0.256
|
version: 0.0.267
|
||||||
resolution: "@types/chrome@npm:0.0.256"
|
resolution: "@types/chrome@npm:0.0.267"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/filesystem": "npm:*"
|
"@types/filesystem": "npm:*"
|
||||||
"@types/har-format": "npm:*"
|
"@types/har-format": "npm:*"
|
||||||
checksum: 35b3d2c92a3888cc14e5961421233003407a95078bf9b2f30c52a90470dae02588560bff1733ed3e7a8e9f12a1d0c5a6bae0ca30b6acdb3d723e1c2f29c8e861
|
checksum: baa2e526c86e0c092668eff8fdca35c3eea09f0cded9bab86d692ae3834955bfa49d3c064c51b003406099cce73060872c8c824ceef526c72a446c863a2b520c
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -46290,9 +46290,6 @@ __metadata:
|
|||||||
"twenty-chrome-extension@workspace:packages/twenty-chrome-extension":
|
"twenty-chrome-extension@workspace:packages/twenty-chrome-extension":
|
||||||
version: 0.0.0-use.local
|
version: 0.0.0-use.local
|
||||||
resolution: "twenty-chrome-extension@workspace:packages/twenty-chrome-extension"
|
resolution: "twenty-chrome-extension@workspace:packages/twenty-chrome-extension"
|
||||||
dependencies:
|
|
||||||
"@crxjs/vite-plugin": "npm:^1.0.14"
|
|
||||||
"@types/chrome": "npm:^0.0.256"
|
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
@@ -46401,6 +46398,7 @@ __metadata:
|
|||||||
"@chakra-ui/accordion": "npm:^2.3.0"
|
"@chakra-ui/accordion": "npm:^2.3.0"
|
||||||
"@chakra-ui/system": "npm:^2.6.0"
|
"@chakra-ui/system": "npm:^2.6.0"
|
||||||
"@codesandbox/sandpack-react": "npm:^2.13.5"
|
"@codesandbox/sandpack-react": "npm:^2.13.5"
|
||||||
|
"@crxjs/vite-plugin": "npm:^1.0.14"
|
||||||
"@docusaurus/core": "npm:^3.1.0"
|
"@docusaurus/core": "npm:^3.1.0"
|
||||||
"@docusaurus/module-type-aliases": "npm:^3.1.0"
|
"@docusaurus/module-type-aliases": "npm:^3.1.0"
|
||||||
"@docusaurus/preset-classic": "npm:^3.1.0"
|
"@docusaurus/preset-classic": "npm:^3.1.0"
|
||||||
@@ -46487,6 +46485,7 @@ __metadata:
|
|||||||
"@types/bcrypt": "npm:^5.0.0"
|
"@types/bcrypt": "npm:^5.0.0"
|
||||||
"@types/better-sqlite3": "npm:^7.6.8"
|
"@types/better-sqlite3": "npm:^7.6.8"
|
||||||
"@types/bytes": "npm:^3.1.1"
|
"@types/bytes": "npm:^3.1.1"
|
||||||
|
"@types/chrome": "npm:^0.0.267"
|
||||||
"@types/crypto-js": "npm:^4.2.2"
|
"@types/crypto-js": "npm:^4.2.2"
|
||||||
"@types/deep-equal": "npm:^1.0.1"
|
"@types/deep-equal": "npm:^1.0.1"
|
||||||
"@types/dompurify": "npm:^3.0.5"
|
"@types/dompurify": "npm:^3.0.5"
|
||||||
|
|||||||
Reference in New Issue
Block a user