fix(core): update

This commit is contained in:
Philipp Kunz 2022-07-24 23:04:51 +02:00
parent 4a11f50efe
commit 982387aaa3
4 changed files with 4062 additions and 247 deletions

4288
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -28,8 +28,8 @@
"@pushrocks/lik": "^6.0.0",
"@pushrocks/smartdelay": "^2.0.13",
"@pushrocks/smartfile-interfaces": "^1.0.7",
"@pushrocks/smarthash": "^2.1.10",
"@pushrocks/smartjson": "^4.0.6",
"@pushrocks/smarthash": "^3.0.1",
"@pushrocks/smartjson": "^5.0.1",
"@pushrocks/smartmime": "^1.0.5",
"@pushrocks/smartpath": "^5.0.5",
"@pushrocks/smartpromise": "^3.1.6",
@ -45,10 +45,10 @@
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.63",
"@gitzone/tsrun": "^1.2.35",
"@gitzone/tstest": "^1.0.71",
"@pushrocks/tapbundle": "^5.0.3",
"@types/node": "^17.0.41",
"@gitzone/tsrun": "^1.2.37",
"@gitzone/tstest": "^1.0.72",
"@pushrocks/tapbundle": "^5.0.4",
"@types/node": "^18.6.0",
"gulp-function": "^2.2.14"
},
"files": [

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@pushrocks/smartfile',
version: '10.0.2',
version: '10.0.3',
description: 'offers smart ways to work with files in nodejs'
}

View File

@ -242,4 +242,9 @@ export class Smartfile extends plugins.smartjson.Smartjson {
const oldFileName = this.parsedPath.base;
this.path = this.path.replace(new RegExp(oldFileName + '$'), fileNameArg);
}
public async editContentAsString(editFuncArg: (fileStringArg: string) => Promise<string>) {
const newFileString = await editFuncArg(this.contentBuffer.toString());
this.contentBuffer = Buffer.from(newFileString);
}
}