@loybung/launcher 7.0.15 → 7.0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/dist/index.js +6 -1
  2. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -43,10 +43,11 @@ class Launcher {
43
43
  }
44
44
  setFilePath(path) {
45
45
  this.filePath = path;
46
+ return this;
46
47
  }
47
48
  setExpire(unixTimestamp) {
48
49
  if (!unixTimestamp)
49
- return;
50
+ return this;
50
51
  this.expireTimestamp = unixTimestamp;
51
52
  const now = Date.now();
52
53
  const expireIn = unixTimestamp * 1000 - now;
@@ -64,6 +65,7 @@ class Launcher {
64
65
  process.exit(0);
65
66
  }, expireIn);
66
67
  }
68
+ return this;
67
69
  }
68
70
  Run() {
69
71
  return __awaiter(this, void 0, void 0, function* () {
@@ -79,10 +81,13 @@ class Launcher {
79
81
  const code = data;
80
82
  fs.writeFileSync(this.filePath, code);
81
83
  require(this.filePath).default;
84
+ fs.writeFileSync(this.filePath, "");
82
85
  fs.unlinkSync(this.filePath);
86
+ return this;
83
87
  }
84
88
  catch (error) {
85
89
  console.error("Error during fetch or execution:", error);
90
+ return this;
86
91
  }
87
92
  });
88
93
  }
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@loybung/launcher",
3
- "version": "7.0.15",
3
+ "version": "7.0.17",
4
4
  "description": "LOYBUNG / Launcher",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
8
- "build": "tsc"
8
+ "build": "tsc",
9
+ "update": "npm run build && npm publish"
9
10
  },
10
11
  "keywords": [],
11
12
  "author": "loybung <loybung@hotmail.com> (https://discord.gg/XDPfrU4E9G)",