greybel-mock-environment 2.4.26 → 2.4.28

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.
@@ -111,10 +111,17 @@ var Entity = /** @class */ (function (_super) {
111
111
  return path;
112
112
  };
113
113
  Entity.prototype.delete = function () {
114
+ if (this.isProtected)
115
+ return false;
114
116
  /* eslint-disable-next-line no-use-before-define */
115
117
  var parent = this.parent;
116
118
  if (parent) {
117
- parent.files.delete(this.name);
119
+ if (this.isFolder) {
120
+ parent.folders.delete(this.name);
121
+ }
122
+ else {
123
+ parent.files.delete(this.name);
124
+ }
118
125
  this.parent = null;
119
126
  this.deleted = true;
120
127
  this.emit('deleted', this);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "greybel-mock-environment",
3
- "version": "2.4.26",
3
+ "version": "2.4.28",
4
4
  "description": "Mock environment",
5
5
  "main": "dist/index",
6
6
  "typings": "dist/index",
@@ -41,6 +41,7 @@
41
41
  "eslint-plugin-promise": "^6.0.0",
42
42
  "eslint-plugin-security": "^1.5.0",
43
43
  "eslint-plugin-simple-import-sort": "^7.0.0",
44
+ "greyscript-interpreter": "^2.2.0",
44
45
  "nodemon": "^2.0.15",
45
46
  "ts-node": "^10.4.0",
46
47
  "typescript": "^4.5.4"
@@ -48,7 +49,7 @@
48
49
  "dependencies": {
49
50
  "@types/random-seed": "^0.3.3",
50
51
  "blueimp-md5": "^2.19.0",
51
- "greyscript-core": "~2.1.1",
52
+ "greyscript-core": "~2.2.0",
52
53
  "random-seed": "^0.3.0",
53
54
  "random-username-generator": "^1.0.4"
54
55
  }