greybel-mock-environment 1.8.1 → 1.8.3
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.
package/dist/environment.js
CHANGED
|
@@ -115,7 +115,8 @@ var MockEnvironment = /** @class */ (function () {
|
|
|
115
115
|
owner: 'root',
|
|
116
116
|
isProtected: true,
|
|
117
117
|
type: types_1.FileType.Binary,
|
|
118
|
-
content: myProgramContent
|
|
118
|
+
content: myProgramContent,
|
|
119
|
+
isExternalProgram: true
|
|
119
120
|
});
|
|
120
121
|
currentPath.putEntity(programPath);
|
|
121
122
|
me.localSession = new types_1.Session({
|
|
@@ -59,12 +59,14 @@ export interface FileOptions extends Omit<EntityOptions, 'isFolder'> {
|
|
|
59
59
|
type: FileType;
|
|
60
60
|
allowImport?: boolean;
|
|
61
61
|
version?: string;
|
|
62
|
+
isExternalProgram?: boolean;
|
|
62
63
|
}
|
|
63
64
|
export declare class File extends Entity {
|
|
64
65
|
content: string;
|
|
65
66
|
type: FileType;
|
|
66
67
|
allowImport: boolean;
|
|
67
68
|
version: Version;
|
|
69
|
+
isExternalProgram: boolean;
|
|
68
70
|
constructor(options: FileOptions, parent?: Entity);
|
|
69
71
|
getSize(): number;
|
|
70
72
|
copy(): File;
|
|
@@ -161,11 +161,14 @@ exports.Entity = Entity;
|
|
|
161
161
|
var File = /** @class */ (function (_super) {
|
|
162
162
|
__extends(File, _super);
|
|
163
163
|
function File(options, parent) {
|
|
164
|
-
var _this =
|
|
165
|
-
|
|
164
|
+
var _this = this;
|
|
165
|
+
var _a, _b;
|
|
166
|
+
_this = _super.call(this, __assign(__assign({}, options), { isFolder: false }), parent) || this;
|
|
167
|
+
_this.content = (_a = options.content) !== null && _a !== void 0 ? _a : '';
|
|
166
168
|
_this.type = options.type;
|
|
167
169
|
_this.allowImport = options.allowImport;
|
|
168
170
|
_this.version = new version_1.Version({ version: options.version });
|
|
171
|
+
_this.isExternalProgram = (_b = options.isExternalProgram) !== null && _b !== void 0 ? _b : false;
|
|
169
172
|
return _this;
|
|
170
173
|
}
|
|
171
174
|
File.prototype.getSize = function () {
|
|
@@ -179,7 +182,8 @@ var File = /** @class */ (function (_super) {
|
|
|
179
182
|
content: this.content,
|
|
180
183
|
type: this.type,
|
|
181
184
|
allowImport: this.allowImport,
|
|
182
|
-
version: this.version.toString()
|
|
185
|
+
version: this.version.toString(),
|
|
186
|
+
isExternalProgram: this.isExternalProgram
|
|
183
187
|
});
|
|
184
188
|
return newEntity;
|
|
185
189
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "greybel-mock-environment",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.3",
|
|
4
4
|
"description": "Mock environment",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"typings": "dist/index",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@types/random-seed": "^0.3.3",
|
|
50
50
|
"blueimp-md5": "^2.19.0",
|
|
51
|
-
"greyscript-core": "^0.9.
|
|
51
|
+
"greyscript-core": "^0.9.17",
|
|
52
52
|
"random-seed": "^0.3.0",
|
|
53
53
|
"random-username-generator": "^1.0.4"
|
|
54
54
|
}
|