open-index/open-npm huggingface dataset:
npm package: @powersync-community/sync-config-rewriter
Description: Tools to rewrite Sync Configurations for PowerSync
Author: JOURNEYAPPS
Latest version: 0.1.4

This exposes the [Sync Config rewriter](github.com/powersync-community/bucket-definitions-to-sync-streams)
as a package usable from JavaScript.

## Instantiation

This package requires you to load a compiled WebAssembly file, which depends on your target platform.

On Node.JS, resolve and load the WASM file:

```TypeScript
import { readFileSync } from "node:fs";
import { fileURLToPath } from "node:url";

import { instantiate } from "@powersync-community/sync-config-rewriter";

const wasmBuffer = readFileSync(
  fileURLToPath(
    import.meta
      .resolve("@powersync-community/sync-config-rewriter/compiled.wasm"),
  ),
);

const module = await instantiate(wasmBuffer);
```

For web apps bundled with vite, use [explicit URL imports](https://vite.dev/guide/assets#explicit-url-imports):

```TypeScript
import { instantiate } from "@powersync-community/sync-config-rewriter";
import wasmUrl from "@powersync-community/sync-config-rewriter/compiled.wasm?url";

const module = await instantiate(fetch(wasmUrl));
```

## Development

To release a version of this package, update the `version` entry in
`package.json`, merge to `main` and manually trigger the `publish_npm`
workflow.
npm package: @powersync/attachments-storage-react-native
Description: React Native file system storage adapters for PowerSync attachments
Author: POWERSYNC
Latest version: 0.0.2

# @powersync/attachments-storage-react-native

> [!NOTE]
> Attachment helpers are currently in an **alpha** state, intended strictly for testing. Expect breaking changes and instability as development continues.
>
> Do not rely on this package for production use.

React Native file system storage adapters for [PowerSync](https://powersync.com) attachments.

This package provides `LocalStorageAdapter` implementations for React Native environments, allowing you to store and retrieve attachment files on device.

## Installation

```bash
npm install @powersync/attachments-storage-react-native
# or
pnpm add @powersync/attachments-storage-react-native
# or
yarn add @powersync/attachments-storage-react-native
```

You'll also need to install one of the supported file system libraries:

### For Expo projects

> [!IMPORTANT]
> Requires Expo 54+

```bash
npx expo install expo-file-system
```

### For bare React Native projects

```bash
npm install @dr.pogodin/react-native-fs
```

## Usage

### With Expo File System

```typescript
import { ExpoFileSystemStorageAdapter } from '@powersync/attachments-storage-react-native';
import { AttachmentQueue } from '@powersync/react-native';

const storageAdapter = new ExpoFileSystemStorageAdapter();

const attachmentQueue = new AttachmentQueue({
  powersync: db,
  storage: cloudStorage,
  storageAdapter
});
```

### With React Native FS

```typescript
import { ReactNativeFileSystemStorageAdapter } from '@powersync/attachments-storage-react-native';
import { AttachmentQueue } from '@powersync/react-native';

const storageAdapter = new ReactNativeFileSystemStorageAdapter();

const attachmentQueue = new AttachmentQueue({
  powersync: db,
  storage: cloudStorage,
  storageAdapter
});
```

### Custom Storage Directory

Both adapters accept an optional `storageDirectory` parameter:

```typescript
const storageAdapter = new ExpoFileSystemStorageAdapter('/custom/path/to/attachments/');
```

## API

Both adapters implement the `LocalStorageAdapter` interface from `@powersync/common`:

- `initialize()` - Create the storage directory if it doesn't exist
- `clear()` - Remove all files from the storage directory
- `getLocalUri(filename)` - Get the full path for a filename
- `saveFile(filePath, data, options?)` - Save data to a file
- `readFile(filePath, options?)` - Read a file as ArrayBuffer
- `deleteFile(filePath)` - Delete a file
- `fileExists(filePath)` - Check if a file exists
- `makeDir(path)` - Create a directory
- `rmDir(path)` - Remove a directory

## Supported Versions

| Adapter                               | Library                       | Supported Versions |
| ------------------------------------- | ----------------------------- | ------------------ |
| `ExpoFileSystemStorageAdapter`        | `expo-file-system`            | >=19.0.0 (Expo 54+)|
| `ReactNativeFileSystemStorageAdapter` | `@dr.pogodin/react-native-fs` | ^2.25.0            |

## License

Apache-2.0
npm package: @powersync/common
Description: API definitions for JourneyApps PowerSync
Author: JOURNEYAPPS
Latest version: 1.51.0

# PowerSync SDK common JS

This package contains a TypeScript implementation of a PowerSync database connector, streaming sync bucket implementation and attachment utilities used in PowerSync's JavaScript-based SDKs.

## Attachments

See the attachments [Attachments README](src/attachments/README.md) for more information.