+6
-1
@@ -11,2 +11,3 @@ 'use strict' | ||
| const plink = require('pear-link') | ||
| const isTextFile = require('is-text-filetype') | ||
| const { | ||
@@ -108,4 +109,8 @@ ERR_PERMISSION_REQUIRED, | ||
| const file = stamp.sync(key, fields) | ||
| const fileStream = isTextFile(file) ? stamp.stream(value, fields, shave) : Readable.from([value]) | ||
| const writeStream = dst.createWriteStream(file) | ||
| const promise = pipelinePromise(stamp.stream(value, fields, shave), writeStream) | ||
| const promise = pipelinePromise( | ||
| fileStream, | ||
| writeStream | ||
| ) | ||
| promise.catch((err) => { | ||
@@ -112,0 +117,0 @@ this.push({ tag: 'error', data: err }) |
+2
-1
| { | ||
| "name": "pear-init", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "main": "index.js", | ||
@@ -25,2 +25,3 @@ "type": "commonjs", | ||
| "bare-realm": "^1.0.8", | ||
| "is-text-filetype": "^1.0.0", | ||
| "localdrive": "^2.2.0", | ||
@@ -27,0 +28,0 @@ "pear-constants": "^1.1.3", |
17304
1.08%125
4.17%13
8.33%+ Added
+ Added
+ Added