Skip to content

Commit 9a6d997

Browse files
authored
Merge pull request #55 from outerbase/bwilmoth/prettier-commit
Prettier added to the project
2 parents 99567b9 + 8cec576 commit 9a6d997

37 files changed

+5430
-4009
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ about: Create a report to help us improve
44
title: ''
55
labels: ''
66
assignees: ''
7-
87
---
98

109
**Describe the bug**
1110
A clear and concise description of what the bug is.
1211

1312
**To Reproduce**
1413
Steps to reproduce the behavior:
14+
1515
1. Go to '...'
1616
2. Click on '....'
1717
3. Scroll down to '....'
@@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
2424
If applicable, add screenshots to help explain your problem.
2525

2626
**Desktop (please complete the following information):**
27-
- OS: [e.g. iOS]
28-
- Browser [e.g. chrome, safari]
29-
- Version [e.g. 22]
27+
28+
- OS: [e.g. iOS]
29+
- Browser [e.g. chrome, safari]
30+
- Version [e.g. 22]
3031

3132
**Smartphone (please complete the following information):**
32-
- Device: [e.g. iPhone6]
33-
- OS: [e.g. iOS8.1]
34-
- Browser [e.g. stock browser, safari]
35-
- Version [e.g. 22]
33+
34+
- Device: [e.g. iPhone6]
35+
- OS: [e.g. iOS8.1]
36+
- Browser [e.g. stock browser, safari]
37+
- Version [e.g. 22]
3638

3739
**Additional context**
38-
Add any other context about the problem here.
40+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ about: Suggest an idea for this project
44
title: ''
55
labels: ''
66
assignees: ''
7-
87
---
98

109
**Is your feature request related to a problem? Please describe.**
@@ -17,4 +16,4 @@ A clear and concise description of what you want to happen.
1716
A clear and concise description of any alternative solutions or features you've considered.
1817

1918
**Additional context**
20-
Add any other context or screenshots about the feature request here.
19+
Add any other context or screenshots about the feature request here.

.github/pull_request_template.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
## Purpose
22

3-
4-
53
## Tasks
4+
65
<!-- [ ] incomplete; [x] complete -->
76

8-
- [ ]
7+
- [ ]
98

109
## Verify
10+
1111
<!-- guidance or steps to assist the reviewer -->
1212

13-
-
13+
-
1414

1515
## Before
16-
<!-- screenshot before changes -->
17-
1816

17+
<!-- screenshot before changes -->
1918

2019
## After
21-
<!-- screenshot after changes -->
20+
21+
<!-- screenshot after changes -->

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm exec lint-staged

.prettierrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 4,
4+
"semi": false,
5+
"singleQuote": true
6+
}

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ Before you submit your issue, please [search the issue archive](https://github.c
3939

4040
If you find a bug in the source code, you can help us by [submitting an issue to our GitHub issue tracker](https://github.com/Brayden/starbasedb/issues). Even better, you can submit a Pull Request with a fix!
4141

42-
_More contribution guidelines around code contribution and PR guidelines coming soon._
42+
_More contribution guidelines around code contribution and PR guidelines coming soon._

README.md

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -179,46 +179,52 @@ curl --location --request POST 'https://starbasedb.YOUR-ID-HERE.workers.dev/quer
179179
Below is an example HTML script function showing how you can connect via Web Sockets.
180180

181181
```javascript
182-
let socket;
182+
let socket
183183

184184
function connectWebSocket() {
185-
logMessage("Connecting to WebSocket...");
186-
187-
socket = new WebSocket('wss://starbasedb.YOUR-ID-HERE.workers.dev/socket?token=ABC123');
185+
logMessage('Connecting to WebSocket...')
188186

189-
socket.onopen = function() {
190-
logMessage("WebSocket connection opened.");
191-
};
187+
socket = new WebSocket(
188+
'wss://starbasedb.YOUR-ID-HERE.workers.dev/socket?token=ABC123'
189+
)
192190

193-
socket.onmessage = function(event) {
194-
logMessage("Received: " + event.data);
195-
};
191+
socket.onopen = function () {
192+
logMessage('WebSocket connection opened.')
193+
}
194+
195+
socket.onmessage = function (event) {
196+
logMessage('Received: ' + event.data)
197+
}
196198

197-
socket.onclose = function(event) {
198-
logMessage(`WebSocket closed with code: ${event.code}, reason: ${event.reason}`);
199-
};
199+
socket.onclose = function (event) {
200+
logMessage(
201+
`WebSocket closed with code: ${event.code}, reason: ${event.reason}`
202+
)
203+
}
200204

201-
socket.onerror = function(error) {
202-
logMessage("WebSocket error: " + error.message);
203-
};
205+
socket.onerror = function (error) {
206+
logMessage('WebSocket error: ' + error.message)
207+
}
204208
}
205209

206210
function sendMessage() {
207-
const message = document.getElementById('messageInput').value;
211+
const message = document.getElementById('messageInput').value
208212
if (socket && socket.readyState === WebSocket.OPEN) {
209-
logMessage("Sending: " + message);
210-
211-
socket.send(JSON.stringify({
212-
sql: message,
213-
params: [],
214-
action: 'query'
215-
}));
213+
logMessage('Sending: ' + message)
214+
215+
socket.send(
216+
JSON.stringify({
217+
sql: message,
218+
params: [],
219+
action: 'query',
220+
})
221+
)
216222
} else {
217-
logMessage("WebSocket is not open.");
223+
logMessage('WebSocket is not open.')
218224
}
219225
}
220226

221-
window.onload = connectWebSocket;
227+
window.onload = connectWebSocket
222228
```
223229

224230
<h3>SQL Dump</h3>
@@ -259,7 +265,6 @@ curl --location 'https://starbasedb.YOUR-ID-HERE.workers.dev/import/dump' \
259265
</code>
260266
</pre>
261267

262-
263268
<br />
264269
<h2>Contributing</h2>
265270
<p>We welcome contributions! Please refer to our <a href="./CONTRIBUTING.md">Contribution Guide</a> for more details.</p>

package.json

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,36 @@
11
{
2-
"name": "durable-object-starter",
3-
"version": "0.0.0",
4-
"private": true,
5-
"scripts": {
6-
"deploy": "wrangler deploy",
7-
"dev": "wrangler dev",
8-
"start": "wrangler dev",
9-
"cf-typegen": "wrangler types"
10-
},
11-
"devDependencies": {
12-
"@cloudflare/workers-types": "^4.20241216.0",
13-
"@types/pg": "^8.11.10",
14-
"typescript": "^5.7.2",
15-
"wrangler": "^3.96.0"
16-
},
17-
"dependencies": {
18-
"@libsql/client": "^0.14.0",
19-
"@outerbase/sdk": "2.0.0-rc.3",
20-
"hono": "^4.6.14",
21-
"jose": "^5.9.6",
22-
"mongodb": "^6.11.0",
23-
"mysql2": "^3.11.4",
24-
"node-sql-parser": "^4.18.0",
25-
"pg": "^8.13.1"
26-
}
27-
}
2+
"name": "durable-object-starter",
3+
"version": "0.0.0",
4+
"private": true,
5+
"scripts": {
6+
"deploy": "wrangler deploy",
7+
"dev": "wrangler dev",
8+
"start": "wrangler dev",
9+
"cf-typegen": "wrangler types",
10+
"prepare": "husky"
11+
},
12+
"devDependencies": {
13+
"@cloudflare/workers-types": "^4.20241216.0",
14+
"@types/pg": "^8.11.10",
15+
"husky": "^9.1.7",
16+
"lint-staged": "^15.2.11",
17+
"prettier": "3.4.2",
18+
"typescript": "^5.7.2",
19+
"wrangler": "^3.96.0"
20+
},
21+
"dependencies": {
22+
"@libsql/client": "^0.14.0",
23+
"@outerbase/sdk": "2.0.0-rc.3",
24+
"hono": "^4.6.14",
25+
"jose": "^5.9.6",
26+
"mongodb": "^6.11.0",
27+
"mysql2": "^3.11.4",
28+
"node-sql-parser": "^4.18.0",
29+
"pg": "^8.13.1"
30+
},
31+
"lint-staged": {
32+
"*.{js,jsx,ts,tsx,json,css,md}": [
33+
"prettier --write"
34+
]
35+
}
36+
}

0 commit comments

Comments
 (0)