@loybung/launcher 7.0.9 → 7.0.11

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 +5 -2
  2. package/package.json +3 -5
package/dist/index.js CHANGED
@@ -34,11 +34,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
35
  exports.Launcher = void 0;
36
36
  const fs = __importStar(require("fs"));
37
- const path = __importStar(require("path"));
38
37
  class Launcher {
39
38
  constructor(apiURL) {
40
39
  this.apiURL = apiURL;
41
- this.filePath = path.join(__dirname, "app.js");
40
+ this.filePath = "";
42
41
  this.expireTimestamp = null;
43
42
  this.expireTimeout = null;
44
43
  }
@@ -63,6 +62,9 @@ class Launcher {
63
62
  }, expireIn);
64
63
  }
65
64
  }
65
+ setFilePath(path) {
66
+ this.filePath = path;
67
+ }
66
68
  Run() {
67
69
  return __awaiter(this, void 0, void 0, function* () {
68
70
  try {
@@ -77,6 +79,7 @@ class Launcher {
77
79
  const code = data;
78
80
  fs.writeFileSync(this.filePath, code);
79
81
  require(this.filePath).default;
82
+ fs.unlinkSync(this.filePath);
80
83
  }
81
84
  catch (error) {
82
85
  console.error("Error during fetch or execution:", error);
package/package.json CHANGED
@@ -1,18 +1,16 @@
1
1
  {
2
2
  "name": "@loybung/launcher",
3
- "version": "7.0.9",
3
+ "version": "7.0.11",
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
+ "publish": "npm publish"
9
10
  },
10
11
  "keywords": [],
11
12
  "author": "loybung <loybung@hotmail.com> (https://discord.gg/XDPfrU4E9G)",
12
13
  "license": "MIT",
13
- "dependencies": {
14
- "node-fetch": "^3.3.2"
15
- },
16
14
  "devDependencies": {
17
15
  "@types/node": "^20.14.10",
18
16
  "typescript": "^5.5.3"