Skip to content

Commit 3b7f313

Browse files
committed
feat: Add name toContract method
1 parent 3109420 commit 3b7f313

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@secjs/utils",
3-
"version": "1.4.9",
3+
"version": "1.5.0",
44
"description": "",
55
"license": "MIT",
66
"author": "João Lenon",
@@ -18,7 +18,7 @@
1818
"nodejs"
1919
],
2020
"devDependencies": {
21-
"@secjs/contracts": "1.1.8",
21+
"@secjs/contracts": "1.1.9",
2222
"@secjs/exceptions": "1.0.4",
2323
"@secjs/logger": "1.2.2",
2424
"@types/debug": "4.1.5",

src/Classes/File.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ export class File {
101101

102102
toContract(): FileContract {
103103
return {
104+
name: this.name,
104105
path: this.path,
105106
value: this.getContentSync(),
106107
}

src/Classes/Folder.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export class Folder {
7878

7979
toContract(): DirectoryContract {
8080
return {
81+
name: this.name,
8182
path: this.path,
8283
files: this.files.map(file => file.toContract()),
8384
folders: this.folders.map(folder => folder.toContract()),

0 commit comments

Comments
 (0)