Skip to content

Commit 5b00661

Browse files
chore: format all files in monorepo (makeplane#3054)
* chore: format all files in the project * fix: removing @types/react from dependencies * fix: adding prettier and eslint config * chore: format files * fix: upgrading turbo version * chore: ignoring warnings and adding todos * fix: updated the type of bubble menu item in the document editor * chore: format files --------- Co-authored-by: Aaryan Khandelwal <[email protected]>
1 parent e5ae139 commit 5b00661

File tree

721 files changed

+3750
-4671
lines changed

Some content is hidden

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

721 files changed

+3750
-4671
lines changed

deploy/coolify/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
## Coolify Setup
1+
## Coolify Setup
22

33
Access the `coolify-docker-compose` file [here](https://raw.githubusercontent.com/makeplane/plane/master/deploy/coolify/coolify-docker-compose.yml) or download using using below command
44

55
```
66
curl -fsSL https://raw.githubusercontent.com/makeplane/plane/master/deploy/coolify/coolify-docker-compose.yml
77
8-
```
8+
```

deploy/kubernetes/README.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
21
# Helm Chart
32

4-
Click on the below link to access the helm chart instructions.
3+
Click on the below link to access the helm chart instructions.
54

65
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/makeplane)](https://artifacthub.io/packages/search?repo=makeplane)
7-
8-

deploy/selfhost/README.md

+43-39
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,55 @@
1-
# Self Hosting
1+
# Self Hosting
22

3-
In this guide, we will walk you through the process of setting up a self-hosted environment. Self-hosting allows you to have full control over your applications and data. It's a great way to ensure privacy, control, and customization.
3+
In this guide, we will walk you through the process of setting up a self-hosted environment. Self-hosting allows you to have full control over your applications and data. It's a great way to ensure privacy, control, and customization.
44

5-
We will cover two main options for setting up your self-hosted environment: using a cloud server or using your desktop. For the cloud server, we will use an AWS EC2 instance. For the desktop, we will use Docker to create a local environment.
5+
We will cover two main options for setting up your self-hosted environment: using a cloud server or using your desktop. For the cloud server, we will use an AWS EC2 instance. For the desktop, we will use Docker to create a local environment.
66

77
Let's get started!
88

9-
## Setting up Docker Environment
9+
## Setting up Docker Environment
10+
1011
<details>
1112
<summary>Option 1 - Using Cloud Server</summary>
1213
<p>Best way to start is to create EC2 maching on AWS. It must of minimum t3.medium/t3a/medium</p>
1314
<p>Run the below command to install docker engine.</p>
1415

15-
```curl -fsSL https://get.docker.com -o install-docker.sh```
16+
`curl -fsSL https://get.docker.com -o install-docker.sh`
17+
1618
</details>
1719

1820
---
1921

2022
<details>
2123
<summary>Option 2 - Using Desktop</summary>
2224

23-
#### For Mac
25+
#### For Mac
26+
2427
<ol>
2528
<li> Download Docker Desktop for Mac from the <a href="https://hub.docker.com/editions/community/docker-ce-desktop-mac/" target="_blank">Docker Hub</a>. </li>
2629
<li> Double-click the downloaded `.dmg` file and drag the Docker app icon to the Applications folder. </li>
2730
<li>Open Docker Desktop from the Applications folder. You might be asked to provide your system password to install additional software.</li>
2831
</ol>
2932

30-
#### For Windows:
33+
#### For Windows:
34+
3135
<ol>
3236
<li>Download Docker Desktop for Windows from the <a href="https://hub.docker.com/editions/community/docker-ce-desktop-windows/" target="_blank">Docker Hub</a>.</li>
3337
<li>Run the installer and follow the instructions. You might be asked to enable Hyper-V and "Containers" Windows features.</li>
3438
<li>Open Docker Desktop. You might be asked to log out and log back in, or restart your machine, for changes to take effect.</li>
3539
</ol>
3640

37-
After installation, you can verify the installation by opening a terminal (Command Prompt on Windows, Terminal app on Mac) and running the command `docker --version`. This should display the installed version of Docker.
41+
After installation, you can verify the installation by opening a terminal (Command Prompt on Windows, Terminal app on Mac) and running the command `docker --version`. This should display the installed version of Docker.
42+
3843
</details>
3944

4045
---
4146

4247
## Installing Plane
4348

44-
Installing plane is a very easy and minimal step process.
49+
Installing plane is a very easy and minimal step process.
50+
51+
### Prerequisite
4552

46-
### Prerequisite
4753
- Docker installed and running
4854
- OS with bash scripting enabled (Ubuntu, Linux AMI, macos). Windows systems need to have [gitbash](https://git-scm.com/download/win)
4955
- User context used must have access to docker services. In most cases, use sudo su to switch as root user
@@ -82,11 +88,11 @@ chmod +x setup.sh
8288

8389
### Proceed with setup
8490

85-
Above steps will set you ready to install and start plane services.
91+
Above steps will set you ready to install and start plane services.
8692

87-
Lets get started by running the `./setup.sh` command.
93+
Lets get started by running the `./setup.sh` command.
8894

89-
This will prompt you with the below options.
95+
This will prompt you with the below options.
9096

9197
```
9298
Select a Action you want to perform:
@@ -100,26 +106,27 @@ Select a Action you want to perform:
100106
Action [2]: 1
101107
```
102108

103-
For the 1st time setup, type "1" as action input.
109+
For the 1st time setup, type "1" as action input.
104110

105111
This will create a create a folder `plane-app` or `plane-app-preview` (in case of preview deployment) and will download 2 files inside that
112+
106113
- `docker-compose.yaml`
107114
- `.env`
108115

109-
Again the `options [1-6]` will be popped up and this time hit `6` to exit.
116+
Again the `options [1-6]` will be popped up and this time hit `6` to exit.
110117

111118
---
112119

113120
### Continue with setup - Environment Settings
114121

115-
Before proceeding, we suggest used to review `.env` file and set the values.
116-
Below are the most import keys you must refer to. *<span style="color: #fcba03">You can use any text editor to edit this file</span>*.
122+
Before proceeding, we suggest used to review `.env` file and set the values.
123+
Below are the most import keys you must refer to. _<span style="color: #fcba03">You can use any text editor to edit this file</span>_.
117124

118125
> `NGINX_PORT` - This is default set to `80`. Make sure the port you choose to use is not preoccupied. (e.g `NGINX_PORT=8080`)
119126
120-
> `WEB_URL` - This is default set to `http://localhost`. Change this to the FQDN you plan to use along with NGINX_PORT (eg. `https://plane.example.com:8080` or `http://[IP-ADDRESS]:8080`)
127+
> `WEB_URL` - This is default set to `http://localhost`. Change this to the FQDN you plan to use along with NGINX_PORT (eg. `https://plane.example.com:8080` or `http://[IP-ADDRESS]:8080`)
121128
122-
> `CORS_ALLOWED_ORIGINS` - This is default set to `http://localhost`. Change this to the FQDN you plan to use along with NGINX_PORT (eg. `https://plane.example.com:8080` or `http://[IP-ADDRESS]:8080`)
129+
> `CORS_ALLOWED_ORIGINS` - This is default set to `http://localhost`. Change this to the FQDN you plan to use along with NGINX_PORT (eg. `https://plane.example.com:8080` or `http://[IP-ADDRESS]:8080`)
123130
124131
There are many other settings you can play with, but we suggest you configure `EMAIL SETTINGS` as it will enable you to invite your teammates onto the platform.
125132

@@ -148,15 +155,15 @@ Be patient as it might take sometime based on download speed and system configur
148155

149156
![Downloading completed](images/started.png)
150157

151-
This is the confirmation that all images were downloaded and the services are up & running.
158+
This is the confirmation that all images were downloaded and the services are up & running.
152159

153-
You have successfully self hosted `Plane` instance. Access the application by going to IP or domain you have configured it (e.g `https://plane.example.com:8080` or `http://[IP-ADDRESS]:8080`)
160+
You have successfully self hosted `Plane` instance. Access the application by going to IP or domain you have configured it (e.g `https://plane.example.com:8080` or `http://[IP-ADDRESS]:8080`)
154161

155162
---
156163

157164
### Stopping the Server
158165

159-
In case you want to make changes to `.env` variables, we suggest you to stop the services before doing that.
166+
In case you want to make changes to `.env` variables, we suggest you to stop the services before doing that.
160167

161168
Lets again run the `./setup.sh` command. You will again be prompted with the below options. This time select `3` to stop the sevices
162169

@@ -180,7 +187,7 @@ If all goes well, you must see something like this
180187

181188
### Restarting the Server
182189

183-
In case you want to make changes to `.env` variables, without stopping the server or you noticed some abnormalies in services, you can restart the services with RESTART option.
190+
In case you want to make changes to `.env` variables, without stopping the server or you noticed some abnormalies in services, you can restart the services with RESTART option.
184191

185192
Lets again run the `./setup.sh` command. You will again be prompted with the below options. This time select `4` to restart the sevices
186193

@@ -206,7 +213,7 @@ If all goes well, you must see something like this
206213

207214
It is always advised to keep Plane up to date with the latest release.
208215

209-
Lets again run the `./setup.sh` command. You will again be prompted with the below options. This time select `5` to upgrade the release.
216+
Lets again run the `./setup.sh` command. You will again be prompted with the below options. This time select `5` to upgrade the release.
210217

211218
```
212219
Select a Action you want to perform:
@@ -220,26 +227,25 @@ Select a Action you want to perform:
220227
Action [2]: 5
221228
```
222229

223-
By choosing this, it will stop the services and then will download the latest `docker-compose.yaml` and `variables-upgrade.env`. Here system will not replace `.env` with the new one.
230+
By choosing this, it will stop the services and then will download the latest `docker-compose.yaml` and `variables-upgrade.env`. Here system will not replace `.env` with the new one.
224231

225232
You must expect the below message
226233

227234
![Alt text](images/upgrade.png)
228235

229236
Once done, choose `6` to exit from prompt.
230237

231-
> It is very important for you to compare the 2 files `variables-upgrade.env` and `.env`. Copy the newly added variable from downloaded file to `.env` and set the expected values.
238+
> It is very important for you to compare the 2 files `variables-upgrade.env` and `.env`. Copy the newly added variable from downloaded file to `.env` and set the expected values.
232239
233240
Once done with making changes in `.env` file, jump on to `Start Server`
234241

235-
236242
## Upgrading from v0.13.2 to v0.14.x
237243

238244
This is one time activity for users who are upgrading from v0.13.2 to v0.14.0
239245

240246
As there has been significant changes to Self Hosting process, this step mainly covers the data migration from current (v0.13.2) docker volumes from newly created volumes
241247

242-
> Before we begin with migration, make sure your v0.14.0 was started and then stopped. This is required to know the newly created docker volume names.
248+
> Before we begin with migration, make sure your v0.14.0 was started and then stopped. This is required to know the newly created docker volume names.
243249
244250
Begin with downloading the migration script using below command
245251

@@ -256,15 +262,15 @@ Now run the `./migrate.sh` command and expect the instructions as below
256262
```
257263
******************************************************************
258264
259-
This script is solely for the migration purpose only.
265+
This script is solely for the migration purpose only.
260266
This is a 1 time migration of volume data from v0.13.2 => v0.14.x
261267
262-
Assumption:
268+
Assumption:
263269
1. Postgres data volume name ends with _pgdata
264270
2. Minio data volume name ends with _uploads
265271
3. Redis data volume name ends with _redisdata
266272
267-
Any changes to this script can break the migration.
273+
Any changes to this script can break the migration.
268274
269275
Before you proceed, make sure you run the below command
270276
to know the docker volumes
@@ -275,12 +281,12 @@ docker volume ls -q | grep -i "_redisdata"
275281
276282
*******************************************************
277283
278-
Given below list of REDIS volumes, identify the prefix of source and destination volumes leaving "_redisdata"
284+
Given below list of REDIS volumes, identify the prefix of source and destination volumes leaving "_redisdata"
279285
---------------------
280286
plane-app_redisdata
281287
v0132_redisdata
282288
283-
Provide the Source Volume Prefix :
289+
Provide the Source Volume Prefix :
284290
```
285291

286292
**Open another terminal window**, and run the mentioned 3 command. This may be different for users who have changed the volume names in their previous setup (v0.13.2)
@@ -289,9 +295,9 @@ For every command you must see 2 records something like shown in above example o
289295

290296
To move forward, you would need PREFIX of old setup and new setup. As per above example, `v0132` is the prefix of v0.13.2 and `plane-app` is the prefix of v0.14.0 setup
291297

292-
**Back to original terminal window**, *Provide the Source Volume Prefix* and hit ENTER.
298+
**Back to original terminal window**, _Provide the Source Volume Prefix_ and hit ENTER.
293299

294-
Now you will be prompted to *Provide Destination Volume Prefix*. Provide the value and hit ENTER
300+
Now you will be prompted to _Provide Destination Volume Prefix_. Provide the value and hit ENTER
295301

296302
```
297303
Provide the Source Volume Prefix : v0132
@@ -302,8 +308,6 @@ In case the suffixes are wrong or the mentioned volumes are not found, you will
302308

303309
![Migrate Error](images/migrate-error.png)
304310

305-
In case of successful migration, it will be a silent exit without error.
306-
307-
Now its time to restart v0.14.0 setup.
308-
311+
In case of successful migration, it will be a silent exit without error.
309312

313+
Now its time to restart v0.14.0 setup.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"prettier": "latest",
2828
"prettier-plugin-tailwindcss": "^0.5.4",
2929
"tailwindcss": "^3.3.3",
30-
"turbo": "^1.10.16"
30+
"turbo": "^1.11.1"
3131
},
3232
"resolutions": {
3333
"@types/react": "18.2.42"

packages/editor/core/.eslintrc.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: ["custom"],
4+
};

packages/editor/core/.prettierignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.next
2+
.vercel
3+
.tubro
4+
out/
5+
dis/
6+
build/

packages/editor/core/.prettierrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"printWidth": 120,
3+
"tabWidth": 2,
4+
"trailingComma": "es5"
5+
}

packages/editor/core/src/lib/editor-commands.ts

+10-55
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,17 @@ import { startImageUpload } from "../ui/plugins/upload-image";
44
import { findTableAncestor } from "./utils";
55

66
export const toggleHeadingOne = (editor: Editor, range?: Range) => {
7-
if (range)
8-
editor
9-
.chain()
10-
.focus()
11-
.deleteRange(range)
12-
.setNode("heading", { level: 1 })
13-
.run();
7+
if (range) editor.chain().focus().deleteRange(range).setNode("heading", { level: 1 }).run();
148
else editor.chain().focus().toggleHeading({ level: 1 }).run();
159
};
1610

1711
export const toggleHeadingTwo = (editor: Editor, range?: Range) => {
18-
if (range)
19-
editor
20-
.chain()
21-
.focus()
22-
.deleteRange(range)
23-
.setNode("heading", { level: 2 })
24-
.run();
12+
if (range) editor.chain().focus().deleteRange(range).setNode("heading", { level: 2 }).run();
2513
else editor.chain().focus().toggleHeading({ level: 2 }).run();
2614
};
2715

2816
export const toggleHeadingThree = (editor: Editor, range?: Range) => {
29-
if (range)
30-
editor
31-
.chain()
32-
.focus()
33-
.deleteRange(range)
34-
.setNode("heading", { level: 3 })
35-
.run();
17+
if (range) editor.chain().focus().deleteRange(range).setNode("heading", { level: 3 }).run();
3618
else editor.chain().focus().toggleHeading({ level: 3 }).run();
3719
};
3820

@@ -57,8 +39,7 @@ export const toggleCodeBlock = (editor: Editor, range?: Range) => {
5739
};
5840

5941
export const toggleOrderedList = (editor: Editor, range?: Range) => {
60-
if (range)
61-
editor.chain().focus().deleteRange(range).toggleOrderedList().run();
42+
if (range) editor.chain().focus().deleteRange(range).toggleOrderedList().run();
6243
else editor.chain().focus().toggleOrderedList().run();
6344
};
6445

@@ -78,21 +59,8 @@ export const toggleStrike = (editor: Editor, range?: Range) => {
7859
};
7960

8061
export const toggleBlockquote = (editor: Editor, range?: Range) => {
81-
if (range)
82-
editor
83-
.chain()
84-
.focus()
85-
.deleteRange(range)
86-
.toggleNode("paragraph", "paragraph")
87-
.toggleBlockquote()
88-
.run();
89-
else
90-
editor
91-
.chain()
92-
.focus()
93-
.toggleNode("paragraph", "paragraph")
94-
.toggleBlockquote()
95-
.run();
62+
if (range) editor.chain().focus().deleteRange(range).toggleNode("paragraph", "paragraph").toggleBlockquote().run();
63+
else editor.chain().focus().toggleNode("paragraph", "paragraph").toggleBlockquote().run();
9664
};
9765

9866
export const insertTableCommand = (editor: Editor, range?: Range) => {
@@ -105,19 +73,8 @@ export const insertTableCommand = (editor: Editor, range?: Range) => {
10573
}
10674
}
10775
}
108-
if (range)
109-
editor
110-
.chain()
111-
.focus()
112-
.deleteRange(range)
113-
.insertTable({ rows: 3, cols: 3, withHeaderRow: true })
114-
.run();
115-
else
116-
editor
117-
.chain()
118-
.focus()
119-
.insertTable({ rows: 3, cols: 3, withHeaderRow: true })
120-
.run();
76+
if (range) editor.chain().focus().deleteRange(range).insertTable({ rows: 3, cols: 3, withHeaderRow: true }).run();
77+
else editor.chain().focus().insertTable({ rows: 3, cols: 3, withHeaderRow: true }).run();
12178
};
12279

12380
export const unsetLinkEditor = (editor: Editor) => {
@@ -131,10 +88,8 @@ export const setLinkEditor = (editor: Editor, url: string) => {
13188
export const insertImageCommand = (
13289
editor: Editor,
13390
uploadFile: UploadImage,
134-
setIsSubmitting?: (
135-
isSubmitting: "submitting" | "submitted" | "saved",
136-
) => void,
137-
range?: Range,
91+
setIsSubmitting?: (isSubmitting: "submitting" | "submitted" | "saved") => void,
92+
range?: Range
13893
) => {
13994
if (range) editor.chain().focus().deleteRange(range).run();
14095
const input = document.createElement("input");

0 commit comments

Comments
 (0)