diff --git a/.changeset/swift-chicken-smile.md b/.changeset/swift-chicken-smile.md new file mode 100644 index 0000000..0fa0c1d --- /dev/null +++ b/.changeset/swift-chicken-smile.md @@ -0,0 +1,5 @@ +--- +'@journeyapps/powersync-sdk-web': patch +--- + +Update package readme diff --git a/README.md b/README.md index 6ddd24f..9daf627 100644 --- a/README.md +++ b/README.md @@ -29,4 +29,4 @@ pnpm install pnpm build:packages ``` -To run a demo app see [README](./demos/powersync-nextjs-demo/README.md) \ No newline at end of file +To run a demo app follow the [getting started](./demos/powersync-nextjs-demo/README.md#getting-started) instructions. \ No newline at end of file diff --git a/packages/powersync-sdk-web/README.md b/packages/powersync-sdk-web/README.md index f24b78d..4d99949 100644 --- a/packages/powersync-sdk-web/README.md +++ b/packages/powersync-sdk-web/README.md @@ -1,9 +1,9 @@ # PowerSync SDK for Web -[PowerSync](https://powersync.co) is a service and set of SDKs that keeps Postgres databases in sync with on-device SQLite databases. See a summary of features [here](https://docs.powersync.co/client-sdk-references/react-native-and-expo). +[PowerSync](https://powersync.co) is a service and set of SDKs that keeps Postgres databases in sync with on-device SQLite databases. ## Alpha Release -This React Native SDK package is currently in an alpha release. +This SDK package is currently in an alpha release. # Installation @@ -28,7 +28,7 @@ This package uses [js-logger](https://www.npmjs.com/package/js-logger) for loggi Enable JS Logger with your logging interface of choice or use the default `console` ```JavaScript -import { Logger } from 'js-logger'; +import Logger from 'js-logger'; // Log messages will be written to the window's console. Logger.useDefaults(); @@ -51,7 +51,7 @@ See our [Docs](https://docs.powersync.co/usage/installation/client-side-setup) f import { Column, ColumnType, - RNQSPowerSyncDatabaseOpenFactory, + WASQLitePowerSyncDatabaseOpenFactory, Schema, Table } from '@journeyapps/powersync-sdk-web'; @@ -63,7 +63,7 @@ export const AppSchema = new Schema([ let PowerSync; export const openDatabase = async () => { - const PowerSync = new WASQLitePowerSyncDatabaseOpenFactory({ + PowerSync = new WASQLitePowerSyncDatabaseOpenFactory({ schema: AppSchema, dbFilename: 'test.sqlite' }).getInstance(); @@ -81,7 +81,6 @@ class Connector { endpoint: '[The PowerSync instance URL]', token: 'An authentication token', expiresAt: 'When the token expires', - userID: 'User ID to associate the session with' }; } @@ -99,4 +98,10 @@ export const connectPowerSync = async () => { React hooks are available in the [@journeyapps/powersync-react](https://www.npmjs.com/package/@journeyapps/powersync-react) package -Refer to our [full documentation](https://docs.powersync.co/client-sdk-references/react-native-and-expo) to learn more. \ No newline at end of file + +## Demo Apps + +See our [NextJS Demo App](https://github.com/powersync-ja/powersync-web-sdk/tree/main/demos/powersync-nextjs-demo) for how to use this SDK with NextJS and Supabase. + +# Known Issues +This initial SDK version uses a `SharedWorker` for DB operations which is not supported on Chrome for Android. Future SDK versions will feature selectable DB Adapters which will increase compatibility. \ No newline at end of file