testeranto 0.79.38 → 0.79.40

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.38",
4
+ "version": "0.79.40",
5
5
  "engines": {
6
6
  "node": "18.18.0"
7
7
  },
@@ -141,6 +141,10 @@
141
141
  "import": "./dist/module/TaskManBackEnd.js",
142
142
  "require": "./dist/common/TaskManBackEnd.js"
143
143
  },
144
+ "./src/Init": {
145
+ "import": "./dist/module/Init.js",
146
+ "require": "./dist/common/Init.js"
147
+ },
144
148
  "./src/preload": {
145
149
  "import": "./dist/module/preload.js",
146
150
  "require": "./dist/common/preload.js"
@@ -249,4 +253,4 @@
249
253
  "uuid": "^10.0.0",
250
254
  "ws": "^8.16.0"
251
255
  }
252
- }
256
+ }
package/src/Init.ts ADDED
@@ -0,0 +1,51 @@
1
+ import fs from "fs";
2
+
3
+ export default async (partialConfig) => {
4
+ const config = {
5
+ ...partialConfig,
6
+ buildDir: process.cwd() + "/" + partialConfig.outdir,
7
+ };
8
+
9
+ fs.writeFileSync(
10
+ `${config.outdir}/testeranto.json`,
11
+ JSON.stringify(
12
+ {
13
+ ...config,
14
+ buildDir: process.cwd() + "/" + config.outdir,
15
+ },
16
+ null,
17
+ 2
18
+ )
19
+ );
20
+
21
+ fs.copyFileSync(
22
+ "./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.js",
23
+ "./docs/TaskManFrontEnd.js"
24
+ );
25
+ fs.copyFileSync(
26
+ "./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.css",
27
+ "./docs/TaskManFrontEnd.css"
28
+ );
29
+
30
+ fs.writeFileSync(
31
+ `${config.outdir}/index.html`,
32
+ `<!DOCTYPE html>
33
+ <html lang="en">
34
+
35
+ <head>
36
+ <meta name="description" content="Webpage description goes here" />
37
+ <meta charset="utf-8" />
38
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
39
+ <meta name="author" content="" />
40
+
41
+ <title>TaskMan</title>
42
+
43
+ <link rel="stylesheet" href="/docs/TaskManFrontEnd.css" />
44
+ <script type="module" src="/docs/TaskManFrontEnd.js"></script>
45
+ </head>
46
+
47
+ <body><div id="root">react is loading</div></body>
48
+
49
+ </html>`
50
+ );
51
+ };
package/src/Project.ts CHANGED
@@ -111,27 +111,6 @@ export class ITProject {
111
111
  `this.getSecondaryEndpointsPoints("web")`,
112
112
  this.getSecondaryEndpointsPoints("web")
113
113
  );
114
- // console.log("nodeEntryPoints", nodeEntryPoints);
115
- // console.log("webEntryPoints", webEntryPoints);
116
-
117
- // nodeEntryPoints.forEach((nep) => {
118
- // const f = `${process.cwd()}/${nep}`;
119
- // console.log("nep", f);
120
- // import(f).then((module) => {
121
- // return module.default.then((defaultModule) => {
122
- // console.log("defaultModule", defaultModule);
123
- // // defaultModule
124
- // // .receiveTestResourceConfig(argz)
125
- // // .then((x) => {
126
- // // console.log("then", x);
127
- // // return x;
128
- // // })
129
- // // .catch((e) => {
130
- // // console.log("catch", e);
131
- // // });
132
- // });
133
- // });
134
- // });
135
114
 
136
115
  glob(`./${this.config.outdir}/chunk-*.mjs`, {
137
116
  ignore: "node_modules/**",
@@ -111,11 +111,11 @@ export default (partialConfig: IBaseConfig) => {
111
111
  const roomsModel = ChatChannel.discriminator("Room", RoomSchema);
112
112
 
113
113
  app.get("/TaskManFrontend.js", (req, res) => {
114
- res.sendFile(`${process.cwd()}/TaskManFrontEnd.js`);
114
+ res.sendFile(`${process.cwd()}/docs/TaskManFrontEnd.js`);
115
115
  });
116
116
 
117
117
  app.get("/TaskManFrontEnd.css", (req, res) => {
118
- res.sendFile(`${process.cwd()}/TaskManFrontEnd.css`);
118
+ res.sendFile(`${process.cwd()}/docs/TaskManFrontEnd.css`);
119
119
  });
120
120
 
121
121
  // app.get(`/preMergeCheck`, async (req, res) => {
@@ -140,26 +140,26 @@ export default (partialConfig: IBaseConfig) => {
140
140
  // res.json(config);
141
141
  // });
142
142
 
143
- app.get("/", (req, res) => {
144
- res.send(`<!DOCTYPE html>
145
- <html lang="en">
143
+ // app.get("/", (req, res) => {
144
+ // res.send(`<!DOCTYPE html>
145
+ // <html lang="en">
146
146
 
147
- <head>
148
- <meta name="description" content="Webpage description goes here" />
149
- <meta charset="utf-8" />
150
- <meta name="viewport" content="width=device-width, initial-scale=1" />
151
- <meta name="author" content="" />
147
+ // <head>
148
+ // <meta name="description" content="Webpage description goes here" />
149
+ // <meta charset="utf-8" />
150
+ // <meta name="viewport" content="width=device-width, initial-scale=1" />
151
+ // <meta name="author" content="" />
152
152
 
153
- <title>TaskMan</title>
153
+ // <title>TaskMan</title>
154
154
 
155
- <link rel="stylesheet" href="/TaskManFrontEnd.css" />
156
- <script type="module" src="/TaskManFrontEnd.js"></script>
157
- </head>
155
+ // <link rel="stylesheet" href="/TaskManFrontEnd.css" />
156
+ // <script type="module" src="/TaskManFrontEnd.js"></script>
157
+ // </head>
158
158
 
159
- <body><div id="root">react is loading</div></body>
159
+ // <body><div id="root">react is loading</div></body>
160
160
 
161
- </html>`);
162
- });
161
+ // </html>`);
162
+ // });
163
163
 
164
164
  app.listen(port, () => {
165
165
  console.log(`Example app listening on port ${port}`);