testeranto 0.79.61 → 0.79.62
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.
|
|
4
|
+
"version": "0.79.62",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": "18.18.0"
|
|
7
7
|
},
|
|
@@ -248,6 +248,7 @@
|
|
|
248
248
|
"react-router-dom": "6.29.0",
|
|
249
249
|
"react-sigma": "^1.2.35",
|
|
250
250
|
"react-test-renderer": "18.2.0",
|
|
251
|
+
"recursive-watch": "^1.1.4",
|
|
251
252
|
"selenium-webdriver": "4.27.0",
|
|
252
253
|
"url": "^0.11.4",
|
|
253
254
|
"uuid": "^10.0.0",
|
package/src/Puppeteer.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import readline from "readline";
|
|
2
2
|
import fs from "fs";
|
|
3
|
-
import
|
|
4
|
-
import { jsonc } from "jsonc";
|
|
5
|
-
import { v4 as uuidv4 } from "uuid";
|
|
6
|
-
|
|
7
|
-
import { IBuiltConfig, IRunTime } from "./lib/types";
|
|
3
|
+
import watch from "recursive-watch";
|
|
8
4
|
|
|
9
5
|
import { PM_Main } from "./PM/main.js";
|
|
10
6
|
import { destinationOfRuntime } from "./utils.js";
|
|
@@ -99,45 +95,83 @@ export default async (partialConfig) => {
|
|
|
99
95
|
});
|
|
100
96
|
|
|
101
97
|
console.log("ready and watching for changes...", config.buildDir);
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
{
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
test,
|
|
134
|
-
destinationOfRuntime(test, "web", config),
|
|
135
|
-
sidecars
|
|
136
|
-
);
|
|
137
|
-
}
|
|
98
|
+
|
|
99
|
+
watch(config.buildDir, (eventType, changedFile) => {
|
|
100
|
+
if (changedFile) {
|
|
101
|
+
config.tests.forEach(([test, runtime, tr, sidecars]) => {
|
|
102
|
+
if (eventType === "change" || eventType === "rename") {
|
|
103
|
+
if (
|
|
104
|
+
changedFile ===
|
|
105
|
+
test
|
|
106
|
+
.replace("./", "node/")
|
|
107
|
+
.split(".")
|
|
108
|
+
.slice(0, -1)
|
|
109
|
+
.concat("mjs")
|
|
110
|
+
.join(".")
|
|
111
|
+
) {
|
|
112
|
+
pm.launchNode(test, destinationOfRuntime(test, "node", config));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (
|
|
116
|
+
changedFile ===
|
|
117
|
+
test
|
|
118
|
+
.replace("./", "web/")
|
|
119
|
+
.split(".")
|
|
120
|
+
.slice(0, -1)
|
|
121
|
+
.concat("mjs")
|
|
122
|
+
.join(".")
|
|
123
|
+
) {
|
|
124
|
+
pm.launchWeb(
|
|
125
|
+
test,
|
|
126
|
+
destinationOfRuntime(test, "web", config),
|
|
127
|
+
sidecars
|
|
128
|
+
);
|
|
138
129
|
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
130
|
+
}
|
|
131
|
+
});
|
|
141
132
|
}
|
|
142
|
-
);
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
// does not work on linux
|
|
136
|
+
// fs.watch(
|
|
137
|
+
// config.buildDir,
|
|
138
|
+
// {
|
|
139
|
+
// recursive: true,
|
|
140
|
+
// },
|
|
141
|
+
// (eventType, changedFile) => {
|
|
142
|
+
// if (changedFile) {
|
|
143
|
+
// config.tests.forEach(([test, runtime, tr, sidecars]) => {
|
|
144
|
+
// if (eventType === "change" || eventType === "rename") {
|
|
145
|
+
// if (
|
|
146
|
+
// changedFile ===
|
|
147
|
+
// test
|
|
148
|
+
// .replace("./", "node/")
|
|
149
|
+
// .split(".")
|
|
150
|
+
// .slice(0, -1)
|
|
151
|
+
// .concat("mjs")
|
|
152
|
+
// .join(".")
|
|
153
|
+
// ) {
|
|
154
|
+
// pm.launchNode(test, destinationOfRuntime(test, "node", config));
|
|
155
|
+
// }
|
|
156
|
+
|
|
157
|
+
// if (
|
|
158
|
+
// changedFile ===
|
|
159
|
+
// test
|
|
160
|
+
// .replace("./", "web/")
|
|
161
|
+
// .split(".")
|
|
162
|
+
// .slice(0, -1)
|
|
163
|
+
// .concat("mjs")
|
|
164
|
+
// .join(".")
|
|
165
|
+
// ) {
|
|
166
|
+
// pm.launchWeb(
|
|
167
|
+
// test,
|
|
168
|
+
// destinationOfRuntime(test, "web", config),
|
|
169
|
+
// sidecars
|
|
170
|
+
// );
|
|
171
|
+
// }
|
|
172
|
+
// }
|
|
173
|
+
// });
|
|
174
|
+
// }
|
|
175
|
+
// }
|
|
176
|
+
// );
|
|
143
177
|
};
|