Skip to content

Commit cb687f0

Browse files
authored
Merge pull request #126 from powersync-ja/update-attachments-desc
Update description
2 parents 3f6d577 + bc9eca5 commit cb687f0

File tree

7 files changed

+47
-19
lines changed

7 files changed

+47
-19
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ _Bad connectivity is everywhere, and we're tired of it. PowerSync is on a missio
2626

2727
- [packages/powersync-attachments](./packages/powersync-attachments/README.md)
2828

29-
- Attachments helper package for React Native.
29+
- Attachments helper package for React Native and JavaScript/TypeScript projects.
3030

3131
- [packages/kysely-driver](./packages/kysely-driver/README.md)
3232

33-
- Kysely integration (ORM) for React Native and JS Web.
33+
- Kysely integration (ORM) for React Native and JavaScript/TypeScript projects.
3434

3535
- [packages/powersync-sdk-common](./packages/powersync-sdk-common/README.md)
3636
- Shared package: TypeScript implementation of a PowerSync database connector and streaming sync bucket implementation.

demos/example-nextjs/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This example is built using [Next.js](https://nextjs.org/) and the [PowerSync JS
44

55
To see it in action:
66

7-
1. Make sure to run `pnpm build:packages` in the root directory of this Git repo.
7+
1. Make sure to run `pnpm install` and `pnpm build:packages` in the root directory of this repo.
88
2. Copy `.env.local.template` to `.env.local`, and complete the environment variables. You can generate a [temporary development token](https://docs.powersync.com/usage/installation/authentication-setup/development-tokens), or leave blank to test with local-only data.
9-
3. `pnpm start`
10-
4. Open the localhost URL in the browser displayed in the terminal output.
9+
3. cd into this directory and run `pnpm start`.
10+
4. Open the localhost URL displayed in the terminal output in your browser.

demos/example-vite/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# PowerSync Vite bundling test
22

3+
This is a minimal example demonstrating bundling with Vite. It attempts a connection to verify that web workers load correctly, but networks requests will fail since no credentials are configured. See [src/index.js](src/index.js) for details.
4+
35
To see it in action:
46

5-
1. Make sure to run `pnpm build:packages` in the root directory of this Git repo.
6-
2. `pnpm start`
7-
3. Open the localhost URL in the browser displayed in the terminal output.
7+
1. Make sure to run `pnpm install` and `pnpm build:packages` in the root directory of this repo.
8+
2. cd into this directory, and run `pnpm start`.
9+
3. Open the localhost URL displayed in the terminal output in your browser.

demos/example-vite/src/index.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ let PowerSync;
3131
const openDatabase = async () => {
3232
PowerSync = new WASQLitePowerSyncDatabaseOpenFactory({
3333
schema: AppSchema,
34-
dbFilename: 'test.sqlite',
35-
flags: {
36-
// This is disabled once CSR+SSR functionality is verified to be working correctly
37-
disableSSRWarning: true
38-
}
34+
dbFilename: 'test.sqlite'
3935
}).getInstance();
4036

4137
await PowerSync.init();
@@ -61,6 +57,5 @@ const openDatabase = async () => {
6157
};
6258

6359
document.addEventListener('DOMContentLoaded', (event) => {
64-
console.log('hello');
6560
openDatabase();
6661
});

demos/example-webpack/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# PowerSync Webpack bundling test
22

3+
This is a minimal example demonstrating bundling with Webpack. It attempts a connection to verify that web workers load correctly, but networks requests will fail since no credentials are configured. See [src/index.js](src/index.js) for details.
4+
35
To see it in action:
46

5-
1. Make sure to run `pnpm build:packages` in the root directory of this Git repo.
6-
2. `pnpm start`
7-
3. Open the localhost URL in the browser displayed in the terminal output.
7+
1. Make sure to run `pnpm install` and `pnpm build:packages` in the root directory of this repo.
8+
2. cd into this directory, and run `pnpm start`.
9+
3. Open the localhost URL displayed in the terminal output in your browser.

demos/example-webpack/src/index.js

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@ import {
66
Table
77
} from '@journeyapps/powersync-sdk-web';
88

9+
/**
10+
* A placeholder connector which doesn't do anything.
11+
* This is just used to verify that the sync workers can be loaded
12+
* when connecting.
13+
*/
14+
class DummyConnector {
15+
async fetchCredentials() {
16+
return {
17+
endpoint: '',
18+
token: ''
19+
};
20+
}
21+
22+
async uploadData(database) {}
23+
}
24+
925
export const AppSchema = new Schema([
1026
new Table({ name: 'customers', columns: [new Column({ name: 'name', type: ColumnType.TEXT })] })
1127
]);
@@ -25,8 +41,21 @@ const openDatabase = async () => {
2541

2642
const result = await PowerSync.getAll('SELECT * FROM customers');
2743
console.log('contents of customers: ', result);
44+
45+
console.log(
46+
`Attempting to connect in order to verify web workers are correctly loaded.
47+
This doesn't use any actual network credentials.
48+
Network errors will be shown: these can be ignored.`
49+
);
50+
51+
/**
52+
* Try and connect, this will setup shared sync workers
53+
* This will fail due to not having a valid endpoint,
54+
* but it will try - which is all that matters.
55+
*/
56+
await PowerSync.connect(new DummyConnector());
2857
};
2958

3059
document.addEventListener('DOMContentLoaded', (event) => {
3160
openDatabase();
32-
});
61+
});

packages/powersync-attachments/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @journeyapps/powersync-attachments
22

3-
A [PowerSync](https://powersync.co) library to manage attachments in TypeScript and React Native apps.
3+
A [PowerSync](https://powersync.com) library to manage attachments in React Native and JavaScript/TypeScript apps.
44

55
## Installation
66

0 commit comments

Comments
 (0)