Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrizagidulin committed Jun 11, 2024
1 parent 1e253c3 commit d529b6b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ export() // no wallet passed in, generates an empty Universal Wallet Backup TAR
```
$ tar -vtf wallet-export-2024-01-01.tar
drwxrwxr-x 0 0 4.0K Jun 11 15:38 app/
drwxrwxr-x 0 0 4.0K Jun 11 15:38 keys/
-rw-rw-r-- 0 0 1K Jun 11 15:38 manifest.yaml
drwxr-xr-x 0/0 0 2024-06-11 15:58 app
drwxr-xr-x 0/0 0 2024-06-11 15:58 keys
-rw-r--r-- 0/0 21 2024-06-11 15:58 manifest.yaml
$ cat manifest.yaml
---
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
},
"./package.json": "./package.json"
},
"dependencies": {},
"dependencies": {
"tar-stream": "^3.1.7"
},
"devDependencies": {
"@types/chai": "^4.3.10",
"@types/mocha": "^10.0.4",
Expand Down
9 changes: 9 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const tar = require('tar-stream')
const pack = tar.pack() // pack is a stream

pack.entry({ name: 'app', type: 'directory' })
pack.entry({ name: 'keys', type: 'directory' })
pack.entry({ name: 'manifest.yaml' }, '---\nubc-version: 0.1\n')

// pipe the pack stream somewhere
pack.pipe(process.stdout)

0 comments on commit d529b6b

Please sign in to comment.