Skip to content

Commit 8980fc8

Browse files
committed
Merge branch 'main' into twentyhqGH-4797/ws-gql-subscription
2 parents 23a7ff2 + 8842292 commit 8980fc8

File tree

379 files changed

+19735
-16402
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

379 files changed

+19735
-16402
lines changed

Diff for: .eslintrc.cjs

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ module.exports = {
1313
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
1414
'no-console': ['warn', { allow: ['group', 'groupCollapsed', 'groupEnd'] }],
1515
'no-control-regex': 0,
16+
'no-debugger': 'error',
1617
'no-duplicate-imports': 'error',
1718
'no-undef': 'off',
1819
'no-unused-vars': 'off',

Diff for: .github/workflows/ci-chrome-extension.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Cancel Previous Runs
2525
uses: styfle/[email protected]
2626
with:
27-
access_token: ${{ github.token }}
27+
access_token: ${{ github.token }}
2828
- uses: actions/checkout@v4
2929
- name: Install dependencies
3030
uses: ./.github/workflows/actions/yarn-install

Diff for: .github/workflows/ci-front.yaml

+11-9
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ concurrency:
1818

1919
jobs:
2020
front-sb-build:
21-
runs-on: ubuntu-latest
21+
runs-on: ci-8-cores
2222
env:
2323
REACT_APP_SERVER_BASE_URL: http://localhost:3000
2424
steps:
@@ -38,7 +38,7 @@ jobs:
3838
- name: Front / Write .env
3939
run: npx nx reset:env twenty-front
4040
- name: Front / Build storybook
41-
run: NODE_OPTIONS=--max-old-space-size=5000 npx nx storybook:build twenty-front
41+
run: npx nx storybook:build twenty-front
4242
front-sb-test:
4343
runs-on: ci-8-cores
4444
needs: front-sb-build
@@ -87,32 +87,34 @@ jobs:
8787
touch .env
8888
echo "REACT_APP_SERVER_BASE_URL: $REACT_APP_SERVER_BASE_URL" >> .env
8989
- name: Publish to Chromatic
90-
run: |
91-
npx nx run twenty-front:chromatic:ci
90+
run: npx nx run twenty-front:chromatic:ci
9291
front-task:
9392
runs-on: ubuntu-latest
9493
strategy:
9594
matrix:
9695
task: [lint, typecheck, test]
97-
env:
98-
REACT_APP_SERVER_BASE_URL: http://localhost:3000
9996
steps:
10097
- name: Cancel Previous Runs
10198
uses: styfle/[email protected]
10299
with:
103100
access_token: ${{ github.token }}
104-
- name: Fetch local actions and base branch history
101+
- name: Fetch custom Github Actions and base branch history
105102
uses: actions/checkout@v4
106103
with:
107104
fetch-depth: 0
108105
- name: Install dependencies
109106
uses: ./.github/workflows/actions/yarn-install
110-
- name: Front / Restore Task Cache
107+
- name: Front / Restore ${{ matrix.task }} task cache
111108
uses: ./.github/workflows/actions/task-cache
112109
with:
113110
tag: scope:frontend
114111
tasks: ${{ matrix.task }}
115-
- name: Front / Run task
112+
- name: Reset .env
113+
uses: ./.github/workflows/actions/nx-affected
114+
with:
115+
tag: scope:frontend
116+
tasks: reset:env
117+
- name: Run ${{ matrix.task }} task
116118
uses: ./.github/workflows/actions/nx-affected
117119
with:
118120
tag: scope:frontend

Diff for: .github/workflows/ci-server.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
ports:
2929
- 5432:5432
3030
steps:
31-
- name: Fetch local actions and base branch history
31+
- name: Fetch custom Github Actions and base branch history
3232
uses: actions/checkout@v4
3333
with:
3434
fetch-depth: 0

Diff for: README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
We’ve spent thousands of hours grappling with traditional CRMs like Pipedrive and Salesforce to align them with our business needs, only to end up frustrated — customizations are complex and the closed ecosystems of these platforms can feel restrictive.
2828

29-
We felt the need for a CRM platform that empowers rather than constrains. We believe the next great CRM will come from the open source community. And we’ve packed Twenty with powerful features to give you full control and help you run your business efficiently.
29+
We felt the need for a CRM platform that empowers rather than constrains. We believe the next great CRM will come from the open-source community. We’ve packed Twenty with powerful features to give you full control and help you run your business efficiently.
3030

3131
<br>
3232

@@ -61,13 +61,13 @@ Please feel free to flag any specific need you have need by creating an issue.
6161

6262
Below are some features we have implemented to date:
6363

64-
+ [Add, filter, sort, edit and track customers](#add-filter-sort-edit-and-track-customers)
64+
+ [Add, filter, sort, edit, and track customers](#add-filter-sort-edit-and-track-customers)
6565
+ [Create one or several opportunities for each company](#create-one-or-several-opportunities-for-each-company)
6666
+ [See rich notes tasks displayed in a timeline](#see-rich-notes-tasks-displayed-in-a-timeline)
6767
+ [Create tasks on records](#create-tasks-on-records)
6868
+ [Navigate quickly through the app using keyboard shortcuts and search](#navigate-quickly-through-the-app-using-keyboard-shortcuts-and-search)
6969

70-
## Add, filter, sort, edit and track customers:
70+
## Add, filter, sort, edit, and track customers:
7171

7272
<p align="center">
7373
<picture>

Diff for: nx.json

+24-12
Original file line numberDiff line numberDiff line change
@@ -106,30 +106,38 @@
106106
"dependsOn": ["^build"]
107107
},
108108
"storybook:build": {
109-
"executor": "@nx/storybook:build",
109+
"executor": "nx:run-commands",
110110
"cache": true,
111111
"dependsOn": ["^build"],
112112
"inputs": ["^default", "excludeTests"],
113-
"outputs": ["{options.outputDir}"],
113+
"outputs": ["{projectRoot}/{options.output-dir}"],
114114
"options": {
115-
"outputDir": "{projectRoot}/storybook-static",
116-
"configDir": "{projectRoot}/.storybook"
115+
"cwd": "{projectRoot}",
116+
"command": "storybook build",
117+
"output-dir": "storybook-static",
118+
"config-dir": ".storybook"
117119
}
118120
},
119121
"storybook:dev": {
120-
"executor": "@nx/storybook:storybook",
122+
"executor": "nx:run-commands",
121123
"cache": true,
122124
"dependsOn": ["^build"],
123125
"options": {
124-
"configDir": "{projectRoot}/.storybook"
126+
"cwd": "{projectRoot}",
127+
"command": "storybook dev",
128+
"config-dir": ".storybook"
125129
}
126130
},
127131
"storybook:static": {
128-
"executor": "@nx/web:file-server",
132+
"executor": "nx:run-commands",
133+
"dependsOn": ["storybook:build"],
129134
"options": {
130-
"staticFilePath": "{projectRoot}/storybook-static",
131-
"parallel": false,
132-
"watch": false
135+
"cwd": "{projectRoot}",
136+
"command": "npx http-server {args.staticDir} -a={args.host} --port={args.port} --silent={args.silent}",
137+
"staticDir": "storybook-static",
138+
"host": "localhost",
139+
"port": 6006,
140+
"silent": true
133141
}
134142
},
135143
"storybook:coverage": {
@@ -148,6 +156,9 @@
148156
"command": "npx nyc report --reporter={args.reporter} --reporter=text-summary -t {args.coverageDir} --report-dir {args.coverageDir} --check-coverage --cwd={projectRoot}",
149157
"coverageDir": "coverage/storybook",
150158
"reporter": "lcov"
159+
},
160+
"configurations": {
161+
"text": { "reporter": "text" }
151162
}
152163
},
153164
"storybook:test": {
@@ -179,8 +190,9 @@
179190
"executor": "nx:run-commands",
180191
"options": {
181192
"cwd": "{projectRoot}",
182-
"command": "cross-var chromatic --project-token=$CHROMATIC_PROJECT_TOKEN --build-script-name=build-storybook --exit-zero-on-changes={args.ci}",
183-
"ci": false
193+
"command": "cross-var chromatic --project-token=$CHROMATIC_PROJECT_TOKEN --build-script-name={args.targetPackageJsonScript} --exit-zero-on-changes {args.ci}",
194+
"ci": false,
195+
"targetPackageJsonScript": "storybook:build:chromatic"
184196
},
185197
"configurations": {
186198
"ci": {

Diff for: package.json

+2
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@
190190
"devDependencies": {
191191
"@babel/core": "^7.14.5",
192192
"@babel/preset-react": "^7.14.5",
193+
"@crxjs/vite-plugin": "^1.0.14",
193194
"@docusaurus/module-type-aliases": "^3.1.0",
194195
"@docusaurus/tsconfig": "3.1.0",
195196
"@graphql-codegen/cli": "^3.3.1",
@@ -235,6 +236,7 @@
235236
"@types/bcrypt": "^5.0.0",
236237
"@types/better-sqlite3": "^7.6.8",
237238
"@types/bytes": "^3.1.1",
239+
"@types/chrome": "^0.0.267",
238240
"@types/crypto-js": "^4.2.2",
239241
"@types/deep-equal": "^1.0.1",
240242
"@types/express": "^4.17.13",

Diff for: packages/twenty-chrome-extension/.eslintrc.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
extends: ['../../.eslintrc.cjs', '../../.eslintrc.react.cjs'],
3-
ignorePatterns: ['!**/*', 'node_modules', 'dist', 'src/generated/*.tsx'],
3+
ignorePatterns: ['!**/*', 'node_modules', 'dist', '**/generated/*'],
44
overrides: [
55
{
66
files: ['*.ts', '*.tsx'],

Diff for: packages/twenty-chrome-extension/.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/generated

Diff for: packages/twenty-chrome-extension/package.json

+1-14
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,6 @@
55
"version": "0.0.1",
66
"type": "module",
77
"scripts": {
8-
"nx": "NX_DEFAULT_PROJECT=twenty-chrome-extension node ../../node_modules/nx/bin/nx.js",
9-
"clean": "npx rimraf ./dist",
10-
"start": "yarn clean && VITE_MODE=development vite",
11-
"build": "yarn clean && npx tsc && npx vite build",
12-
"lint": "eslint . --report-unused-disable-directives --max-warnings 0 --config .eslintrc.cjs",
13-
"graphql:generate": "graphql-codegen",
14-
"fmt": "prettier --check \"src/**/*.ts\" \"src/**/*.tsx\"",
15-
"fmt:fix": "prettier --cache --write \"src/**/*.ts\" \"src/**/*.tsx\""
16-
},
17-
"dependencies": {
18-
"@types/chrome": "^0.0.256"
19-
},
20-
"devDependencies": {
21-
"@crxjs/vite-plugin": "^1.0.14"
8+
"build": "npx vite build"
229
}
2310
}

Diff for: packages/twenty-chrome-extension/project.json

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"name": "twenty-chrome-extension",
3+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
4+
"projectType": "application",
5+
"tags": ["scope:frontend"],
6+
"targets": {
7+
"build": {
8+
"outputs": ["{options.outputPath}"],
9+
"options": {
10+
"outputPath": "{projectRoot}/dist"
11+
}
12+
},
13+
"start": {
14+
"executor": "@nx/vite:dev-server",
15+
"options": {
16+
"buildTarget": "twenty-chrome-extension:build",
17+
"hmr": true
18+
}
19+
},
20+
"preview": {
21+
"executor": "@nx/vite:preview-server",
22+
"options": {
23+
"buildTarget": "twenty-chrome-extension:build",
24+
"port": 3002,
25+
"open": true
26+
}
27+
},
28+
"reset:env": {
29+
"executor": "nx:run-commands",
30+
"inputs": ["{projectRoot}/.env.example"],
31+
"outputs": ["{projectRoot}/.env"],
32+
"cache": true,
33+
"options": {
34+
"cwd": "{projectRoot}",
35+
"command": "cp .env.example .env"
36+
}
37+
},
38+
"typecheck": {},
39+
"lint": {
40+
"options": {
41+
"lintFilePatterns": [
42+
"{projectRoot}/src/**/*.{ts,tsx,json}",
43+
"{projectRoot}/package.json"
44+
],
45+
"maxWarnings": 0,
46+
"reportUnusedDisableDirectives": "error"
47+
},
48+
"configurations": {
49+
"ci": { "eslintConfig": "{projectRoot}/.eslintrc-ci.cjs" },
50+
"fix": {}
51+
}
52+
},
53+
"fmt": {
54+
"options": {
55+
"files": "src"
56+
},
57+
"configurations": {
58+
"fix": {}
59+
}
60+
},
61+
"graphql:generate": {
62+
"executor": "nx:run-commands",
63+
"options": {
64+
"cwd": "{projectRoot}",
65+
"command": "graphql-codegen"
66+
}
67+
}
68+
}
69+
}

Diff for: packages/twenty-chrome-extension/tsconfig.app.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
{
22
"extends": "./tsconfig.json",
3-
"compilerOptions": {
4-
"outDir": "../../.cache/tsc"
5-
},
63
"exclude": [
74
"**/*.spec.ts",
85
"**/*.test.ts",
96
"**/*.spec.tsx",
107
"**/*.test.tsx",
118
"jest.config.ts"
129
],
13-
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]
10+
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
1411
}

Diff for: packages/twenty-chrome-extension/tsconfig.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
{
2+
"extends": "../../tsconfig.base.json",
23
"compilerOptions": {
4+
"outDir": "../../.cache/tsc",
35
"target": "ES2022",
46
"useDefineForClassFields": true,
57
"lib": ["ES2022", "DOM", "DOM.Iterable"],
68
"module": "ESNext",
79
"skipLibCheck": true,
810
"esModuleInterop": true,
9-
"baseUrl": ".",
1011
"paths": {
11-
"@/*": ["src/options/modules/*"],
12-
"~/*": ["src/*"]
12+
"@/*": ["packages/twenty-chrome-extension/src/options/modules/*"],
13+
"~/*": ["packages/twenty-chrome-extension/src/*"]
1314
},
1415

1516
/* Bundler mode */

Diff for: packages/twenty-chrome-extension/tsconfig.spec.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
4-
"outDir": "../../.cache/tsc",
54
"types": ["jest", "node"]
65
},
76
"include": [
7+
"codegen.ts",
88
"vite.config.ts",
99
"jest.config.ts",
1010
"**/*.test.ts",

Diff for: packages/twenty-chrome-extension/vite.config.ts

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ const viteManifestHack: Plugin & {
1919

2020
export default defineConfig(() => {
2121
return {
22+
root: __dirname,
23+
cacheDir: '../../node_modules/.vite/packages/twenty-chrome-extension',
24+
2225
build: {
2326
emptyOutDir: true,
2427
outDir: 'dist',

Diff for: packages/twenty-docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "twenty-docs",
3-
"version": "0.11.1",
3+
"version": "0.11.2",
44
"private": true,
55
"scripts": {
66
"nx": "NX_DEFAULT_PROJECT=twenty-docs node ../../node_modules/nx/bin/nx.js",

Diff for: packages/twenty-emails/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "twenty-emails",
3-
"version": "0.11.1",
3+
"version": "0.11.2",
44
"description": "",
55
"author": "",
66
"private": true,

Diff for: packages/twenty-front/nyc.config.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const modulesCoverage = {
1616
};
1717

1818
const pagesCoverage = {
19-
branches: 45,
19+
branches: 40,
2020
statements: 60,
2121
lines: 60,
2222
functions: 45,

Diff for: packages/twenty-front/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "twenty-front",
3-
"version": "0.11.1",
3+
"version": "0.11.2",
44
"private": true,
55
"type": "module",
66
"scripts": {
77
"build": "npx vite build && sh ./scripts/inject-runtime-env.sh",
88
"build:sourcemaps": "VITE_BUILD_SOURCEMAP=true NODE_OPTIONS=--max-old-space-size=4096 npx nx build",
9-
"build-storybook": "cd ../.. && npx nx storybook:build twenty-front",
9+
"storybook:build:chromatic": "nx storybook:build",
1010
"start:prod": "NODE_ENV=production npx vite --host",
1111
"tsup": "npx tsup"
1212
},

0 commit comments

Comments
 (0)