testeranto 0.79.33 → 0.79.35

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "testeranto",
3
3
  "description": "teeny tiny tightly-typed typescript tests",
4
- "version": "0.79.33",
4
+ "version": "0.79.35",
5
5
  "engines": {
6
6
  "node": "18.18.0"
7
7
  },
@@ -245,4 +245,4 @@
245
245
  "uuid": "^10.0.0",
246
246
  "ws": "^8.16.0"
247
247
  }
248
- }
248
+ }
package/src/Project.ts CHANGED
@@ -74,6 +74,18 @@ export class ITProject {
74
74
  constructor(config: IBaseConfig) {
75
75
  this.config = config;
76
76
 
77
+ fs.writeFileSync(
78
+ `${config.outdir}/testeranto.json`,
79
+ JSON.stringify(
80
+ {
81
+ ...config,
82
+ buildDir: process.cwd() + "/" + config.outdir,
83
+ },
84
+ null,
85
+ 2
86
+ )
87
+ );
88
+
77
89
  Promise.resolve(
78
90
  Promise.all(
79
91
  [...this.getSecondaryEndpointsPoints("web")].map(
package/src/Puppeteer.ts CHANGED
@@ -25,10 +25,21 @@ process.stdin.on("keypress", (str, key) => {
25
25
  }
26
26
  });
27
27
 
28
- const main = async () => {
29
- const configs = jsonc.parse(
30
- (await fs.readFileSync("./docs/testeranto.json")).toString()
31
- ) as IBuiltConfig;
28
+ export default async (configs) => {
29
+ fs.writeFileSync(
30
+ `${configs.outdir}/testeranto.json`,
31
+ JSON.stringify(
32
+ {
33
+ ...configs,
34
+ buildDir: process.cwd() + "/" + configs.outdir,
35
+ },
36
+ null,
37
+ 2
38
+ )
39
+ );
40
+ // const configs = jsonc.parse(
41
+ // (await fs.readFileSync("./docs/testeranto.json")).toString()
42
+ // ) as IBuiltConfig;
32
43
 
33
44
  const pm = new PM_Main(configs);
34
45
 
@@ -126,5 +137,3 @@ const main = async () => {
126
137
  }
127
138
  );
128
139
  };
129
-
130
- main();
@@ -17,6 +17,8 @@ import {
17
17
  channelsFeature,
18
18
  chatCatMessageSchema,
19
19
  } from "./mongooseSchemas";
20
+ import { ITProject } from "./Project";
21
+ import { IBaseConfig } from "./lib/types";
20
22
 
21
23
  // export const chatChannel = new mongoose.Schema<IChatChannel>({
22
24
  // // name: { type: String, required: true },
@@ -29,7 +31,6 @@ import {
29
31
  // ],
30
32
  // });
31
33
 
32
- const app = express();
33
34
  const port = 3000;
34
35
 
35
36
  function findTextFiles(dir: string, fileList: string[] = []) {
@@ -72,7 +73,21 @@ function listToTree(fileList) {
72
73
  return root.children;
73
74
  }
74
75
 
75
- export default () => {
76
+ export default (config: IBaseConfig) => {
77
+ fs.writeFileSync(
78
+ `${config.outdir}/testeranto.json`,
79
+ JSON.stringify(
80
+ {
81
+ ...config,
82
+ buildDir: process.cwd() + "/" + config.outdir,
83
+ },
84
+ null,
85
+ 2
86
+ )
87
+ );
88
+
89
+ const app = express();
90
+
76
91
  new MongoClient(`mongodb://${process.env.MONGO_HOST || "127.0.0.1"}:27017`)
77
92
  .connect()
78
93
  .then(async (conn) => {
@@ -124,6 +139,7 @@ export default () => {
124
139
 
125
140
  app.get("/testeranto.json", (req, res) => {
126
141
  res.sendFile(`${process.cwd()}/docs/testeranto.json`);
142
+ // res.json(config);
127
143
  });
128
144
 
129
145
  app.get("/", (req, res) => {