Skip to content

Commit 0a9d34f

Browse files
committed
Merge with latest
2 parents 42e07b1 + f1820e2 commit 0a9d34f

13 files changed

Lines changed: 2567 additions & 2409 deletions

File tree

.github/workflows/test.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Install pnpm
17+
uses: pnpm/action-setup@v4
18+
with:
19+
version: 10
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '20'
25+
cache: 'pnpm'
26+
27+
- name: Install dependencies
28+
run: pnpm install
29+
30+
- name: Run tests
31+
run: pnpm test

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ out
116116
# Nuxt.js build / generate output
117117

118118
.nuxt
119-
dist
120119

121120
# Gatsby files
122121

dist/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export { StarbaseDB, type StarbaseDBConfiguration } from '../src/handler'
2+
export { StarbaseDBDurableObject } from '../src/do'
3+
export type { DataSource } from '../src/types'

dist/plugins.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export { StudioPlugin } from '../plugins/studio'
2+
export { WebSocketPlugin } from '../plugins/websocket'
3+
export { SqlMacrosPlugin } from '../plugins/sql-macros'

package.json

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,32 @@
11
{
2-
"name": "durable-object-starter",
3-
"version": "0.0.0",
4-
"private": true,
2+
"name": "@outerbase/starbasedb",
3+
"version": "0.1.0",
4+
"files": [
5+
"src",
6+
"dist",
7+
"plugins"
8+
],
9+
"type": "module",
10+
"main": "dist/index.ts",
11+
"types": "dist/index.ts",
12+
"exports": {
13+
".": {
14+
"types": "./dist/index.ts",
15+
"import": "./dist/index.ts"
16+
},
17+
"./plugins": {
18+
"types": "./dist/plugins.ts",
19+
"import": "./dist/plugins.ts"
20+
}
21+
},
522
"scripts": {
623
"deploy": "wrangler deploy",
724
"dev": "wrangler dev",
825
"start": "wrangler dev",
926
"cf-typegen": "wrangler types",
1027
"delete": "wrangler delete",
11-
"prepare": "husky"
28+
"prepare": "husky",
29+
"test": "vitest"
1230
},
1331
"devDependencies": {
1432
"@cloudflare/workers-types": "^4.20241216.0",
@@ -17,6 +35,7 @@
1735
"lint-staged": "^15.2.11",
1836
"prettier": "3.4.2",
1937
"typescript": "^5.7.2",
38+
"vitest": "^2.1.8",
2039
"wrangler": "^3.96.0"
2140
},
2241
"dependencies": {

plugins/sql-macros/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { DataSource, QueryResult } from '../../src/types'
88

99
const parser = new (require('node-sql-parser').Parser)()
1010

11-
export class SqlMacros extends StarbasePlugin {
11+
export class SqlMacrosPlugin extends StarbasePlugin {
1212
config?: StarbaseDBConfiguration
1313

1414
// Prevents SQL statements with `SELECT *` from being executed

plugins/sql-macros/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"version": "1.0.0",
23
"resources": {
34
"tables": {},
45
"secrets": {},

0 commit comments

Comments
 (0)