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