@noy-db/as-csv 0.7.0-pre.10 → 0.7.0-pre.11
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 +4 -4
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -21,9 +21,9 @@ Every call checks `vault.assertCanExport('plaintext', 'csv')` **before decryptin
|
|
|
21
21
|
### `toString(vault, options)` — returns CSV string
|
|
22
22
|
|
|
23
23
|
```ts
|
|
24
|
-
import {
|
|
24
|
+
import { asCsv } from '@noy-db/as-csv'
|
|
25
25
|
|
|
26
|
-
const csv = await
|
|
26
|
+
const csv = await vault.export(asCsv(), { collections: ['invoices'] })
|
|
27
27
|
// id,client,amount,status\n
|
|
28
28
|
// inv-1,Globex,1500,paid\n
|
|
29
29
|
// inv-2,"Acme, Inc.",2400,draft\n
|
|
@@ -36,7 +36,7 @@ const csv = await toString(vault, { collection: 'invoices' })
|
|
|
36
36
|
import { download } from '@noy-db/as-csv'
|
|
37
37
|
|
|
38
38
|
await download(vault, {
|
|
39
|
-
|
|
39
|
+
collections: ['invoices'],
|
|
40
40
|
filename: 'invoices-2026-03.csv', // optional; defaults to '<collection>.csv'
|
|
41
41
|
})
|
|
42
42
|
```
|
|
@@ -49,7 +49,7 @@ Wraps the CSV in a `Blob`, creates an object URL, clicks a hidden anchor. Plaint
|
|
|
49
49
|
import { write } from '@noy-db/as-csv'
|
|
50
50
|
|
|
51
51
|
await write(vault, '/tmp/invoices.csv', {
|
|
52
|
-
|
|
52
|
+
collections: ['invoices'],
|
|
53
53
|
acknowledgeRisks: true, // required — see below
|
|
54
54
|
})
|
|
55
55
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noy-db/as-csv",
|
|
3
|
-
"version": "0.7.0-pre.
|
|
3
|
+
"version": "0.7.0-pre.11",
|
|
4
4
|
"description": "CSV plaintext export for noy-db — decrypts records and formats as comma-separated values. Gated by the RFC #249 `assertCanExport('plaintext', …)` gate; writes an audit-ledger entry on every call. Part of the @noy-db/as-* portable-artefact family (plaintext tier).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "vLannaAi <vicio@lanna.ai>",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"node": ">=22.0.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@noy-db/hub": "^0.7.0-pre.
|
|
35
|
+
"@noy-db/hub": "^0.7.0-pre.11"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^22.0.0",
|
|
39
|
-
"@noy-db/hub": "0.7.0-pre.
|
|
40
|
-
"@noy-db/test-format-conformance": "0.7.0-pre.
|
|
39
|
+
"@noy-db/hub": "0.7.0-pre.11",
|
|
40
|
+
"@noy-db/test-format-conformance": "0.7.0-pre.11"
|
|
41
41
|
},
|
|
42
42
|
"keywords": [
|
|
43
43
|
"noy-db",
|