testeranto 0.79.36 → 0.79.37
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/dist/common/Project.js +2 -2
- package/dist/common/Puppeteer.js +12 -14
- package/dist/common/TaskManBackEnd.js +8 -7
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/Project.js +2 -2
- package/dist/module/Puppeteer.js +12 -14
- package/dist/module/TaskManBackEnd.js +8 -7
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/TaskManBackEnd.mjs +7 -13
- package/dist/types/Project.d.ts +1 -1
- package/dist/types/Puppeteer.d.ts +1 -1
- package/dist/types/TaskManBackEnd.d.ts +1 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/Project.ts +5 -2
- package/src/Puppeteer.ts +18 -16
- package/src/TaskManBackEnd.ts +12 -14
package/dist/module/Project.js
CHANGED
|
@@ -51,9 +51,9 @@ const onDone = () => {
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
export class ITProject {
|
|
54
|
-
constructor(
|
|
54
|
+
constructor(configs) {
|
|
55
55
|
this.mode = `up`;
|
|
56
|
-
|
|
56
|
+
const config = Object.assign(Object.assign({}, configs), { buildDir: process.cwd() + "/" + configs.outdir });
|
|
57
57
|
fs.writeFileSync(`${config.outdir}/testeranto.json`, JSON.stringify(Object.assign(Object.assign({}, config), { buildDir: process.cwd() + "/" + config.outdir }), null, 2));
|
|
58
58
|
Promise.resolve(Promise.all([...this.getSecondaryEndpointsPoints("web")].map(async (sourceFilePath) => {
|
|
59
59
|
const sourceFileSplit = sourceFilePath.split("/");
|
package/dist/module/Puppeteer.js
CHANGED
|
@@ -15,12 +15,10 @@ process.stdin.on("keypress", (str, key) => {
|
|
|
15
15
|
process.exit();
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
export default async (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
// ) as IBuiltConfig;
|
|
23
|
-
const pm = new PM_Main(configs);
|
|
18
|
+
export default async (partialConfig) => {
|
|
19
|
+
const config = Object.assign(Object.assign({}, partialConfig), { buildDir: process.cwd() + "/" + partialConfig.outdir });
|
|
20
|
+
fs.writeFileSync(`${config.outdir}/testeranto.json`, JSON.stringify(Object.assign(Object.assign({}, config), { buildDir: process.cwd() + "/" + config.outdir }), null, 2));
|
|
21
|
+
const pm = new PM_Main(config);
|
|
24
22
|
await pm.startPuppeteer({
|
|
25
23
|
waitForInitialPage: false,
|
|
26
24
|
executablePath: "/opt/homebrew/bin/chromium",
|
|
@@ -57,23 +55,23 @@ export default async (configs) => {
|
|
|
57
55
|
// "--start-maximized",
|
|
58
56
|
],
|
|
59
57
|
}, ".");
|
|
60
|
-
|
|
58
|
+
config.tests.forEach(([test, runtime, tr, sidecars]) => {
|
|
61
59
|
if (runtime === "node") {
|
|
62
|
-
pm.launchNode(test, destinationOfRuntime(test, "node",
|
|
60
|
+
pm.launchNode(test, destinationOfRuntime(test, "node", config));
|
|
63
61
|
}
|
|
64
62
|
else if (runtime === "web") {
|
|
65
|
-
pm.launchWeb(test, destinationOfRuntime(test, "web",
|
|
63
|
+
pm.launchWeb(test, destinationOfRuntime(test, "web", config), sidecars);
|
|
66
64
|
}
|
|
67
65
|
else {
|
|
68
66
|
console.error("runtime makes no sense", runtime);
|
|
69
67
|
}
|
|
70
68
|
});
|
|
71
|
-
console.log("ready and watching for changes...",
|
|
72
|
-
fs.watch(
|
|
69
|
+
console.log("ready and watching for changes...", config.buildDir);
|
|
70
|
+
fs.watch(config.buildDir, {
|
|
73
71
|
recursive: true,
|
|
74
72
|
}, (eventType, changedFile) => {
|
|
75
73
|
if (changedFile) {
|
|
76
|
-
|
|
74
|
+
config.tests.forEach(([test, runtime, tr, sidecars]) => {
|
|
77
75
|
if (eventType === "change" || eventType === "rename") {
|
|
78
76
|
if (changedFile ===
|
|
79
77
|
test
|
|
@@ -82,7 +80,7 @@ export default async (configs) => {
|
|
|
82
80
|
.slice(0, -1)
|
|
83
81
|
.concat("mjs")
|
|
84
82
|
.join(".")) {
|
|
85
|
-
pm.launchNode(test, destinationOfRuntime(test, "node",
|
|
83
|
+
pm.launchNode(test, destinationOfRuntime(test, "node", config));
|
|
86
84
|
}
|
|
87
85
|
if (changedFile ===
|
|
88
86
|
test
|
|
@@ -91,7 +89,7 @@ export default async (configs) => {
|
|
|
91
89
|
.slice(0, -1)
|
|
92
90
|
.concat("mjs")
|
|
93
91
|
.join(".")) {
|
|
94
|
-
pm.launchWeb(test, destinationOfRuntime(test, "web",
|
|
92
|
+
pm.launchWeb(test, destinationOfRuntime(test, "web", config), sidecars);
|
|
95
93
|
}
|
|
96
94
|
}
|
|
97
95
|
});
|
|
@@ -54,8 +54,9 @@ function listToTree(fileList) {
|
|
|
54
54
|
}
|
|
55
55
|
return root.children;
|
|
56
56
|
}
|
|
57
|
-
export default (
|
|
58
|
-
|
|
57
|
+
export default (partialConfig) => {
|
|
58
|
+
const config = Object.assign(Object.assign({}, partialConfig), { buildDir: process.cwd() + "/" + partialConfig.outdir });
|
|
59
|
+
fs.writeFileSync(`${config.outdir}/testeranto.json`, JSON.stringify(config, null, 2));
|
|
59
60
|
const app = express();
|
|
60
61
|
new MongoClient(`mongodb://${process.env.MONGO_HOST || "127.0.0.1"}:27017`)
|
|
61
62
|
.connect()
|
|
@@ -92,10 +93,10 @@ export default (config) => {
|
|
|
92
93
|
// `${process.cwd()}/node_modules/testeranto/dist/prebuild/TaskManFrontEnd.css`
|
|
93
94
|
// );
|
|
94
95
|
// });
|
|
95
|
-
app.get("/testeranto.json", (req, res) => {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
});
|
|
96
|
+
// app.get("/testeranto.json", (req, res) => {
|
|
97
|
+
// // res.sendFile(`${process.cwd()}/docs/testeranto.json`);
|
|
98
|
+
// res.json(config);
|
|
99
|
+
// });
|
|
99
100
|
app.get("/", (req, res) => {
|
|
100
101
|
res.send(`<!DOCTYPE html>
|
|
101
102
|
<html lang="en">
|
|
@@ -150,7 +151,7 @@ export default (config) => {
|
|
|
150
151
|
.toArray());
|
|
151
152
|
});
|
|
152
153
|
});
|
|
153
|
-
app.use("/
|
|
154
|
+
app.use("/", express.static(path.join(process.cwd())));
|
|
154
155
|
app.get("/docGal/fs.json", (req, res) => {
|
|
155
156
|
const directoryPath = "./"; // Replace with the desired directory path
|
|
156
157
|
// const textFiles = findTextFiles(directoryPath);
|