typescript-virtual-container 1.3.3 → 1.3.4

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.
@@ -65,15 +65,12 @@ export class VirtualUserManager extends EventEmitter {
65
65
  // this.users.set(currentUser, this.createRecord(currentUser, userPassword));
66
66
  // this.sudoers.add(currentUser);
67
67
  // changed = true;
68
- // const homePath = `/home/${currentUser}`;
69
- // if (!this.vfs.exists(homePath)) {
70
- // this.vfs.mkdir(homePath, 0o755);
71
- // this.vfs.writeFile(
72
- // `${homePath}/README.txt`,
73
- // `Welcome to the virtual environment, ${currentUser}`,
74
- // );
75
- // }
76
68
  // }
69
+ const homePath = `/home/root`;
70
+ if (!this.vfs.exists(homePath)) {
71
+ this.vfs.mkdir(homePath, 0o755);
72
+ this.vfs.writeFile(`${homePath}/README.txt`, `Welcome to the virtual environment, root`);
73
+ }
77
74
  if (changed) {
78
75
  await this.persist();
79
76
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
7
- "version": "1.3.3",
7
+ "version": "1.3.4",
8
8
  "license": "MIT",
9
9
  "repository": {
10
10
  "type": "git",
@@ -99,16 +99,16 @@ export class VirtualUserManager extends EventEmitter {
99
99
  // this.users.set(currentUser, this.createRecord(currentUser, userPassword));
100
100
  // this.sudoers.add(currentUser);
101
101
  // changed = true;
102
-
103
- // const homePath = `/home/${currentUser}`;
104
- // if (!this.vfs.exists(homePath)) {
105
- // this.vfs.mkdir(homePath, 0o755);
106
- // this.vfs.writeFile(
107
- // `${homePath}/README.txt`,
108
- // `Welcome to the virtual environment, ${currentUser}`,
109
- // );
110
- // }
111
102
  // }
103
+
104
+ const homePath = `/home/root`;
105
+ if (!this.vfs.exists(homePath)) {
106
+ this.vfs.mkdir(homePath, 0o755);
107
+ this.vfs.writeFile(
108
+ `${homePath}/README.txt`,
109
+ `Welcome to the virtual environment, root`,
110
+ );
111
+ }
112
112
 
113
113
  if (changed) {
114
114
  await this.persist();