@powersync/web 0.0.0-dev-20241118134941 → 0.0.0-dev-20241119081147

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # PowerSync SDK for Web
6
6
 
7
- *[PowerSync](https://www.powersync.com) is a sync engine for building local-first apps with instantly-responsive UI/UX and simplified state transfer. Syncs between SQLite on the client-side and Postgres, MongoDB or MySQL on the server-side.*
7
+ _[PowerSync](https://www.powersync.com) is a sync engine for building local-first apps with instantly-responsive UI/UX and simplified state transfer. Syncs between SQLite on the client-side and Postgres, MongoDB or MySQL on the server-side._
8
8
 
9
9
  This package (`packages/web`) is the PowerSync SDK for JavaScript Web clients. It is an extension of `packages/common`.
10
10
 
@@ -40,6 +40,15 @@ See the [example Vite config](https://github.com/powersync-ja/powersync-js/blob/
40
40
 
41
41
  Our [full SDK reference](https://docs.powersync.com/client-sdk-references/js-web) contains everything you need to know to get started implementing PowerSync in your project.
42
42
 
43
+ # Public Workers
44
+
45
+ For some frameworks, it may be required to configure the web workers ([see the docs](https://docs.powersync.com/client-sdk-references/react-native-and-expo/react-native-web-support)).
46
+ The `@powersync/web` package includes a CLI utility which can copy the required assets to the `public` directory (configurable with the `--output` option).
47
+
48
+ ```bash
49
+ pnpm powersync-web copy-assets
50
+ ```
51
+
43
52
  # Changelog
44
53
 
45
54
  A changelog for this SDK is available [here](https://releases.powersync.com/announcements/powersync-js-web-client-sdk).
package/bin/powersync.js CHANGED
@@ -4,11 +4,12 @@ const { Command } = require('commander');
4
4
  const program = new Command();
5
5
  const path = require('path');
6
6
  const fsPromise = require('fs/promises');
7
-
7
+ const { version } = require('../package.json');
8
+
8
9
  program
9
10
  .name('powersync-web')
10
11
  .description('CLI for PowerSync Web SDK utilities')
11
- .version('0.0.1');
12
+ .version(version);
12
13
 
13
14
  program
14
15
  .command('copy-assets')
@@ -36,6 +37,7 @@ async function copyDirectory(source, destination) {
36
37
  await fsPromise.cp(source, destination, { recursive: true });
37
38
  console.log(`Assets copied from ${source} to ${destination}`);
38
39
  } catch (err) {
39
- console.error(`Error copying directory: ${err.message}`);
40
+ console.error(`Error copying assets: ${err.message}`);
41
+ process.exit(1);
40
42
  }
41
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powersync/web",
3
- "version": "0.0.0-dev-20241118134941",
3
+ "version": "0.0.0-dev-20241119081147",
4
4
  "description": "A Web SDK for JourneyApps PowerSync",
5
5
  "main": "lib/src/index.js",
6
6
  "types": "lib/src/index.d.ts",