-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
DominicGBauer
committed
Feb 8, 2024
1 parent
0f1d246
commit 2be8e6c
Showing
116 changed files
with
10,636 additions
and
784 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# example-vite | ||
|
||
## 0.0.4 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [d20386c] | ||
- @journeyapps/powersync-sdk-web@0.2.0 | ||
|
||
## 0.0.3 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [412937f] | ||
- @journeyapps/powersync-sdk-web@0.1.3 | ||
|
||
## 0.0.2 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [7fb9df2] | ||
- Updated dependencies [7fb9df2] | ||
- @journeyapps/powersync-sdk-web@0.1.2 | ||
|
||
## 0.0.1 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [0e17713] | ||
- @journeyapps/powersync-sdk-web@0.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# PowerSync Vite bundling test | ||
|
||
To see it in action: | ||
|
||
1. Make sure to run `pnpm build:packages` in the root directory of this Git repo. | ||
2. `pnpm start` | ||
3. Open the localhost URL in the browser displayed in the terminal output. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "example-vite", | ||
"private": true, | ||
"version": "0.0.4", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build", | ||
"preview": "vite preview", | ||
"start": "pnpm build && pnpm preview" | ||
}, | ||
"dependencies": { | ||
"@journeyapps/powersync-sdk-web": "workspace:*" | ||
}, | ||
"devDependencies": { | ||
"vite": "^5.0.12" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script type="module" src="./index.js"></script> | ||
</head> | ||
<body>Vite bundling test: Check the console to see it in action!</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { | ||
Column, | ||
ColumnType, | ||
WASQLitePowerSyncDatabaseOpenFactory, | ||
Schema, | ||
Table | ||
} from '@journeyapps/powersync-sdk-web'; | ||
|
||
export const AppSchema = new Schema([ | ||
new Table({ name: 'customers', columns: [new Column({ name: 'name', type: ColumnType.TEXT })] }) | ||
]); | ||
|
||
let PowerSync; | ||
|
||
const openDatabase = async () => { | ||
PowerSync = new WASQLitePowerSyncDatabaseOpenFactory({ | ||
schema: AppSchema, | ||
dbFilename: 'test.sqlite', | ||
flags: { | ||
// This is disabled once CSR+SSR functionality is verified to be working correctly | ||
disableSSRWarning: true | ||
} | ||
}).getInstance(); | ||
|
||
await PowerSync.init(); | ||
|
||
// Run local statements. | ||
await PowerSync.execute('INSERT INTO customers(id, name) VALUES(uuid(), ?)', ['Fred']); | ||
|
||
const result = await PowerSync.getAll('SELECT * FROM customers'); | ||
console.log('contents of customers: ', result); | ||
}; | ||
|
||
document.addEventListener('DOMContentLoaded', (event) => { | ||
console.log('hello'); | ||
openDatabase(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { defineConfig } from 'vite'; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
root: 'src', | ||
build: { | ||
outDir: '../dist', | ||
rollupOptions: { | ||
input: 'src/index.html' | ||
} | ||
}, | ||
worker: { | ||
format: 'es' | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# example-webpack | ||
|
||
## null | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [d20386c] | ||
- @journeyapps/powersync-sdk-web@0.2.0 | ||
|
||
## null | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [412937f] | ||
- @journeyapps/powersync-sdk-web@0.1.3 | ||
|
||
## null | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [7fb9df2] | ||
- Updated dependencies [7fb9df2] | ||
- @journeyapps/powersync-sdk-web@0.1.2 | ||
|
||
## null | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [0e17713] | ||
- @journeyapps/powersync-sdk-web@0.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# PowerSync Webpack bundling test | ||
|
||
To see it in action: | ||
|
||
1. Make sure to run `pnpm build:packages` in the root directory of this Git repo. | ||
2. `pnpm start` | ||
3. Open the localhost URL in the browser displayed in the terminal output. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<html> | ||
|
||
<body>Webpack bundling test: Check the console to see it in action!</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "example-webpack", | ||
"private": true, | ||
"version": null, | ||
"scripts": { | ||
"build": "webpack", | ||
"serve": "serve ./dist", | ||
"start": "pnpm build && pnpm serve" | ||
}, | ||
"dependencies": { | ||
"@journeyapps/powersync-sdk-web": "workspace:*" | ||
}, | ||
"devDependencies": { | ||
"webpack-cli": "^5.1.4", | ||
"webpack": "^5.90.1", | ||
"@types/webpack": "^5.28.5", | ||
"serve": "^14.2.1", | ||
"html-webpack-plugin": "^5.6.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { | ||
Column, | ||
ColumnType, | ||
WASQLitePowerSyncDatabaseOpenFactory, | ||
Schema, | ||
Table | ||
} from '@journeyapps/powersync-sdk-web'; | ||
|
||
export const AppSchema = new Schema([ | ||
new Table({ name: 'customers', columns: [new Column({ name: 'name', type: ColumnType.TEXT })] }) | ||
]); | ||
|
||
let PowerSync; | ||
|
||
const openDatabase = async () => { | ||
PowerSync = new WASQLitePowerSyncDatabaseOpenFactory({ | ||
schema: AppSchema, | ||
dbFilename: 'test.sqlite', | ||
flags: { | ||
// This is disabled once CSR+SSR functionality is verified to be working correctly | ||
disableSSRWarning: true | ||
} | ||
}).getInstance(); | ||
|
||
await PowerSync.init(); | ||
|
||
// Run local statements. | ||
await PowerSync.execute('INSERT INTO customers(id, name) VALUES(uuid(), ?)', ['Fred']); | ||
|
||
const result = await PowerSync.getAll('SELECT * FROM customers'); | ||
console.log('contents of customers: ', result); | ||
}; | ||
|
||
document.addEventListener('DOMContentLoaded', (event) => { | ||
openDatabase(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const path = require('path'); | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
|
||
module.exports = { | ||
entry: path.join(__dirname, 'src/index.js'), | ||
output: { | ||
filename: 'index.js', | ||
path: path.join(__dirname, 'dist') | ||
}, | ||
devtool: 'source-map', | ||
mode: 'development', | ||
resolve: { | ||
extensions: ['.js'] | ||
}, | ||
plugins: [ | ||
new HtmlWebpackPlugin({ | ||
template: path.join(__dirname, './index.html'), | ||
inject: true, | ||
title: 'Test', | ||
filename: 'index.html' | ||
}) | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SUPABASE_URL= | ||
SUPABASE_ANON_KEY= | ||
POWERSYNC_URL= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
.yarn/install-state.gz | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
# ide | ||
.idea | ||
.fleet | ||
.vscode | ||
|
||
# PWA | ||
**/public/workbox-*.js | ||
**/public/sw.js | ||
**/public/swe-worker-* | ||
**/public/worker-*.js | ||
**/public/fallback-*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# @journeyapps/powersync-nextjs-demo | ||
|
||
## 0.1.8 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [d20386c] | ||
- @journeyapps/powersync-sdk-web@0.2.0 | ||
|
||
## 0.1.7 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [412937f] | ||
- @journeyapps/powersync-sdk-web@0.1.3 | ||
|
||
## 0.1.6 | ||
|
||
### Patch Changes | ||
|
||
- 7fb9df2: Autofocus inputs in creation dialogs for a better UX. | ||
- Updated dependencies [7fb9df2] | ||
- Updated dependencies [7fb9df2] | ||
- @journeyapps/powersync-sdk-web@0.1.2 | ||
|
||
## 0.1.5 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [0e17713] | ||
- @journeyapps/powersync-sdk-web@0.1.1 | ||
|
||
## 0.1.4 | ||
|
||
### Patch Changes | ||
|
||
- 1fa25e6: Added uploading and downloading status indicator. | ||
- Updated dependencies [1fa25e6] | ||
- @journeyapps/powersync-sdk-web@0.1.0 | ||
|
||
## 0.1.3 | ||
|
||
### Patch Changes | ||
|
||
- 0bc3758: Added PWA support. Better initialization of client side PowerSync instance. | ||
- Updated dependencies [0bc3758] | ||
- @journeyapps/powersync-sdk-web@0.0.3 | ||
|
||
## 0.1.2 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [5d9cbb9] | ||
- @journeyapps/powersync-sdk-web@0.0.2 | ||
|
||
## 0.1.1 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [af78f76] | ||
- @journeyapps/powersync-sdk-web@0.0.1 |
Oops, something went wrong.