Skip to content

Commit c61d073

Browse files
committed
Expand readme.
1 parent 6ada82a commit c61d073

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

test-client/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ node dist/bin.js fetch-operations --config path/to/powersync.yaml
2929
node dist/bin.js fetch-operations --config path/to/powersync.yaml --sub test-user
3030
```
3131

32-
The script will normalize the data in each bucket to a single CLEAR operation, followed by the latest PUT operation for each row.
32+
The `fetch-operations` command downloads data for a single checkpoint, and outputs a normalized form: one CLEAR operation, followed by the latest PUT operation for each row. This normalized form is still split per bucket. The output is not affected by compacting, but can be affected by replication order.
3333

34-
To get the raw operations instead, which may additionally include CLEAR, MOVE, REMOVE and duplicate PUT operations, use the `--raw` flag.
34+
To avoid normalizing the data, use the `--raw` option. This may include additional CLEAR, MOVE, REMOVE and duplicate PUT operations.
35+
36+
To generate a token without downloading data, use the `generate-token` command:
37+
38+
```sh
39+
node dist/bin.js generate-token --config path/to/powersync.yaml --sub test-user
40+
```

test-client/src/ndjson.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
// import { ReadableStream } from 'node:stream/web';
2-
31
export function ndjsonStream<T>(response: ReadableStream<Uint8Array>): ReadableStream<T> & AsyncIterable<T> {
4-
// For cancellation
52
var is_reader: any,
63
cancellationRequest = false;
74
return new ReadableStream<T>({

0 commit comments

Comments
 (0)