Skip to content

Commit

Permalink
Merge pull request #55 from outerbase/bwilmoth/prettier-commit
Browse files Browse the repository at this point in the history
Prettier added to the project
  • Loading branch information
Brayden authored Dec 21, 2024
2 parents 99567b9 + 8cec576 commit 9a6d997
Show file tree
Hide file tree
Showing 37 changed files with 5,430 additions and 4,009 deletions.
20 changes: 11 additions & 9 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

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

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
Add any other context about the problem here.
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

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

**Additional context**
Add any other context or screenshots about the feature request here.
Add any other context or screenshots about the feature request here.
14 changes: 7 additions & 7 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
## Purpose



## Tasks

<!-- [ ] incomplete; [x] complete -->

- [ ]
- [ ]

## Verify

<!-- guidance or steps to assist the reviewer -->

-
-

## Before
<!-- screenshot before changes -->


<!-- screenshot before changes -->

## After
<!-- screenshot after changes -->

<!-- screenshot after changes -->
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm exec lint-staged
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 4,
"semi": false,
"singleQuote": true
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ Before you submit your issue, please [search the issue archive](https://github.c

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!

_More contribution guidelines around code contribution and PR guidelines coming soon._
_More contribution guidelines around code contribution and PR guidelines coming soon._
59 changes: 32 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,46 +179,52 @@ curl --location --request POST 'https://starbasedb.YOUR-ID-HERE.workers.dev/quer
Below is an example HTML script function showing how you can connect via Web Sockets.

```javascript
let socket;
let socket

function connectWebSocket() {
logMessage("Connecting to WebSocket...");

socket = new WebSocket('wss://starbasedb.YOUR-ID-HERE.workers.dev/socket?token=ABC123');
logMessage('Connecting to WebSocket...')

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

socket.onmessage = function(event) {
logMessage("Received: " + event.data);
};
socket.onopen = function () {
logMessage('WebSocket connection opened.')
}

socket.onmessage = function (event) {
logMessage('Received: ' + event.data)
}

socket.onclose = function(event) {
logMessage(`WebSocket closed with code: ${event.code}, reason: ${event.reason}`);
};
socket.onclose = function (event) {
logMessage(
`WebSocket closed with code: ${event.code}, reason: ${event.reason}`
)
}

socket.onerror = function(error) {
logMessage("WebSocket error: " + error.message);
};
socket.onerror = function (error) {
logMessage('WebSocket error: ' + error.message)
}
}

function sendMessage() {
const message = document.getElementById('messageInput').value;
const message = document.getElementById('messageInput').value
if (socket && socket.readyState === WebSocket.OPEN) {
logMessage("Sending: " + message);

socket.send(JSON.stringify({
sql: message,
params: [],
action: 'query'
}));
logMessage('Sending: ' + message)

socket.send(
JSON.stringify({
sql: message,
params: [],
action: 'query',
})
)
} else {
logMessage("WebSocket is not open.");
logMessage('WebSocket is not open.')
}
}

window.onload = connectWebSocket;
window.onload = connectWebSocket
```

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


<br />
<h2>Contributing</h2>
<p>We welcome contributions! Please refer to our <a href="./CONTRIBUTING.md">Contribution Guide</a> for more details.</p>
Expand Down
61 changes: 35 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
{
"name": "durable-object-starter",
"version": "0.0.0",
"private": true,
"scripts": {
"deploy": "wrangler deploy",
"dev": "wrangler dev",
"start": "wrangler dev",
"cf-typegen": "wrangler types"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20241216.0",
"@types/pg": "^8.11.10",
"typescript": "^5.7.2",
"wrangler": "^3.96.0"
},
"dependencies": {
"@libsql/client": "^0.14.0",
"@outerbase/sdk": "2.0.0-rc.3",
"hono": "^4.6.14",
"jose": "^5.9.6",
"mongodb": "^6.11.0",
"mysql2": "^3.11.4",
"node-sql-parser": "^4.18.0",
"pg": "^8.13.1"
}
}
"name": "durable-object-starter",
"version": "0.0.0",
"private": true,
"scripts": {
"deploy": "wrangler deploy",
"dev": "wrangler dev",
"start": "wrangler dev",
"cf-typegen": "wrangler types",
"prepare": "husky"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20241216.0",
"@types/pg": "^8.11.10",
"husky": "^9.1.7",
"lint-staged": "^15.2.11",
"prettier": "3.4.2",
"typescript": "^5.7.2",
"wrangler": "^3.96.0"
},
"dependencies": {
"@libsql/client": "^0.14.0",
"@outerbase/sdk": "2.0.0-rc.3",
"hono": "^4.6.14",
"jose": "^5.9.6",
"mongodb": "^6.11.0",
"mysql2": "^3.11.4",
"node-sql-parser": "^4.18.0",
"pg": "^8.13.1"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,json,css,md}": [
"prettier --write"
]
}
}
Loading

0 comments on commit 9a6d997

Please sign in to comment.