testeranto 0.79.34 → 0.79.36

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.
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const readline_1 = __importDefault(require("readline"));
7
7
  const fs_1 = __importDefault(require("fs"));
8
- const jsonc_1 = require("jsonc");
9
8
  const main_js_1 = require("./PM/main.js");
10
9
  const utils_js_1 = require("./utils.js");
11
10
  var mode = process.argv[2] === "-dev" ? "DEV" : "PROD";
@@ -21,8 +20,11 @@ process.stdin.on("keypress", (str, key) => {
21
20
  process.exit();
22
21
  }
23
22
  });
24
- const main = async () => {
25
- const configs = jsonc_1.jsonc.parse((await fs_1.default.readFileSync("./docs/testeranto.json")).toString());
23
+ exports.default = async (configs) => {
24
+ fs_1.default.writeFileSync(`${configs.outdir}/testeranto.json`, JSON.stringify(Object.assign(Object.assign({}, configs), { buildDir: process.cwd() + "/" + configs.outdir }), null, 2));
25
+ // const configs = jsonc.parse(
26
+ // (await fs.readFileSync("./docs/testeranto.json")).toString()
27
+ // ) as IBuiltConfig;
26
28
  const pm = new main_js_1.PM_Main(configs);
27
29
  await pm.startPuppeteer({
28
30
  waitForInitialPage: false,
@@ -101,4 +103,3 @@ const main = async () => {
101
103
  }
102
104
  });
103
105
  };
104
- main();