testeranto 0.79.69 → 0.81.0
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/.aider.chat.history.md +980 -0
- package/.aider.input.history +87 -0
- package/.aider.tags.cache.v3/1c/30/af1de2ad7a137afeddb1b01e0c27.val +0 -0
- package/.aider.tags.cache.v3/1d/63/88318b65ce58b6bb0487e8ce2656.val +0 -0
- package/.aider.tags.cache.v3/2e/67/16ae65530b40038e48e00d666c63.val +0 -0
- package/.aider.tags.cache.v3/6f/94/80488a232866fcce7ee657da488b.val +0 -0
- package/.aider.tags.cache.v3/cache.db +0 -0
- package/.eslintrc.js +5 -2
- package/README.md +10 -107
- package/build-tests.ts +16 -0
- package/dist/common/build-tests.js +38 -0
- package/dist/common/init-docs.js +8 -0
- package/dist/common/run-tests.js +34 -0
- package/dist/common/src/Aider.js +143 -0
- package/dist/common/src/Init.js +10 -0
- package/dist/common/{PM → src/PM}/main.js +58 -49
- package/dist/common/{PM → src/PM}/node.js +1 -1
- package/dist/common/{Project.js → src/Project.js} +46 -38
- package/dist/common/{Puppeteer.js → src/Puppeteer.js} +51 -40
- package/dist/common/{SubPackages → src/SubPackages}/react-dom/jsx/web.js +37 -38
- package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.js +17 -2
- package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +79 -0
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/node.js +5 -3
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/web.js +4 -4
- package/dist/common/{lib → src/lib}/abstractBase.js +80 -24
- package/dist/common/{lib → src/lib}/basebuilder.js +14 -3
- package/dist/common/{lib → src/lib}/core.js +47 -3
- package/dist/common/testeranto.js +15 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/build-tests.js +10 -0
- package/dist/module/init-docs.js +3 -0
- package/dist/module/run-tests.js +6 -0
- package/dist/module/src/Aider.js +136 -0
- package/dist/module/src/Init.js +5 -0
- package/dist/module/{PM → src/PM}/main.js +58 -49
- package/dist/module/{PM → src/PM}/node.js +1 -1
- package/dist/module/{Project.js → src/Project.js} +46 -38
- package/dist/module/{Puppeteer.js → src/Puppeteer.js} +51 -40
- package/dist/module/{SubPackages → src/SubPackages}/react-dom/jsx/web.js +37 -38
- package/dist/module/src/SubPackages/react-test-renderer/jsx/index.js +34 -0
- package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +74 -0
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/node.js +4 -2
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/web.js +4 -4
- package/dist/module/{lib → src/lib}/abstractBase.js +80 -24
- package/dist/module/{lib → src/lib}/basebuilder.js +14 -3
- package/dist/module/{lib → src/lib}/core.js +47 -3
- package/dist/module/testeranto.js +13 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/build-tests.d.ts +3 -0
- package/dist/types/init-docs.d.ts +2 -0
- package/dist/types/run-tests.d.ts +2 -0
- package/dist/types/src/Aider.d.ts +1 -0
- package/dist/types/{PM → src/PM}/index.d.ts +1 -1
- package/dist/types/{PM → src/PM}/main.d.ts +7 -1
- package/dist/types/{Project.d.ts → src/Project.d.ts} +6 -1
- package/dist/types/{Types.d.ts → src/Types.d.ts} +3 -2
- package/dist/types/{lib → src/lib}/abstractBase.d.ts +1 -0
- package/dist/types/testeranto.d.ts +16 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/init-docs.ts +5 -0
- package/package.json +54 -29
- package/run-tests.ts +9 -0
- package/secret +1 -0
- package/secret.env +2 -0
- package/src/Aider.ts +168 -0
- package/src/Init.ts +0 -31
- package/src/PM/index.ts +1 -1
- package/src/PM/main.ts +71 -61
- package/src/PM/node.ts +1 -1
- package/src/Project.ts +55 -48
- package/src/Puppeteer.ts +66 -52
- package/src/SubPackages/react-dom/jsx/web.ts +46 -49
- package/src/SubPackages/react-test-renderer/jsx/index.ts +25 -2
- package/src/Types.ts +3 -1
- package/src/esbuildConfigs/inputFilesPlugin.ts +78 -31
- package/src/esbuildConfigs/node.ts +2 -2
- package/src/esbuildConfigs/web.ts +4 -4
- package/src/lib/abstractBase.ts +88 -30
- package/src/lib/basebuilder.ts +17 -3
- package/src/lib/core.ts +55 -13
- package/testeranto.ts +13 -0
- package/tsconfig.common.json +12 -4
- package/tsconfig.json +9 -2
- package/tsconfig.module.json +2 -2
- package/tsconfig.types.json +1 -1
- package/Report.Dockerfile +0 -44
- package/dist/common/Features.js +0 -51
- package/dist/common/Init.js +0 -30
- package/dist/common/Reporter.js +0 -112
- package/dist/common/Scheduler.js +0 -1
- package/dist/common/TaskManBackEnd.js +0 -167
- package/dist/common/esbuildConfigs/inputFilesPlugin.js +0 -49
- package/dist/common/mongooseSchemas.js +0 -56
- package/dist/common/preload.js +0 -15
- package/dist/common/report.html.js +0 -31
- package/dist/module/ExampleTab.js +0 -112
- package/dist/module/Features.js +0 -41
- package/dist/module/Init.js +0 -25
- package/dist/module/Reporter.js +0 -107
- package/dist/module/Scheduler.js +0 -1
- package/dist/module/SubPackages/react-test-renderer/jsx/index.js +0 -19
- package/dist/module/TaskManBackEnd.js +0 -162
- package/dist/module/TaskManFrontEnd.js +0 -605
- package/dist/module/esbuildConfigs/inputFilesPlugin.js +0 -44
- package/dist/module/mongooseSchemas.js +0 -50
- package/dist/module/preload.js +0 -15
- package/dist/module/report.html.js +0 -29
- package/dist/prebuild/TaskManBackEnd.mjs +0 -170
- package/dist/prebuild/TaskManFrontEnd.css +0 -12301
- package/dist/prebuild/TaskManFrontEnd.js +0 -81262
- package/dist/types/Features.d.ts +0 -35
- package/dist/types/Reporter.d.ts +0 -1
- package/dist/types/Scheduler.d.ts +0 -0
- package/dist/types/TaskManBackEnd.d.ts +0 -3
- package/dist/types/mongooseSchemas.d.ts +0 -124
- package/dist/types/preload.d.ts +0 -0
- package/dist/types/report.html.d.ts +0 -2
- package/src/ExampleTab.tsx +0 -219
- package/src/Features.ts +0 -64
- package/src/Reporter.ts +0 -126
- package/src/Scheduler.ts +0 -0
- package/src/TaskManBackEnd.ts +0 -226
- package/src/TaskManFrontEnd.tsx +0 -1254
- package/src/mongooseSchemas.ts +0 -105
- package/src/preload.ts +0 -17
- package/src/report.html.ts +0 -29
- package/tests/Rectangle.test.ts +0 -189
- package/trash/TaskMan.Dockerfile +0 -23
- package/trash/TaskMan1.Dockerfile +0 -43
- package/trash/devBot.dockerfile +0 -12
- package/trash/docker-compose-dev.yml +0 -9
- package/trash/docker-compose-prod.yml +0 -18
- package/trash/electronBuild.ts +0 -32
- /package/dist/common/{Node.js → src/Node.js} +0 -0
- /package/dist/common/{PM → src/PM}/index.js +0 -0
- /package/dist/common/{PM → src/PM}/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/puppeteer.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/component/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/component/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/component/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/component/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/interface.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/common/{Types.js → src/Types.js} +0 -0
- /package/dist/common/{Web.js → src/Web.js} +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/features.js +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/index.js +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/report.js +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/tests.js +0 -0
- /package/dist/common/{lib → src/lib}/classBuilder.js +0 -0
- /package/dist/common/{lib → src/lib}/index.js +0 -0
- /package/dist/common/{lib → src/lib}/types.js +0 -0
- /package/dist/common/{puppeteerConfiger.js → src/puppeteerConfiger.js} +0 -0
- /package/dist/common/{utils.js → src/utils.js} +0 -0
- /package/dist/common/{web.html.js → src/web.html.js} +0 -0
- /package/dist/module/{Node.js → src/Node.js} +0 -0
- /package/dist/module/{PM → src/PM}/index.js +0 -0
- /package/dist/module/{PM → src/PM}/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/puppeteer.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/component/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/component/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/jsx/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/jsx/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/jsx/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/component/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/component/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/jsx/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/interface.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/module/{Types.js → src/Types.js} +0 -0
- /package/dist/module/{Web.js → src/Web.js} +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/features.js +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/index.js +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/report.js +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/tests.js +0 -0
- /package/dist/module/{lib → src/lib}/classBuilder.js +0 -0
- /package/dist/module/{lib → src/lib}/index.js +0 -0
- /package/dist/module/{lib → src/lib}/types.js +0 -0
- /package/dist/module/{puppeteerConfiger.js → src/puppeteerConfiger.js} +0 -0
- /package/dist/module/{utils.js → src/utils.js} +0 -0
- /package/dist/module/{web.html.js → src/web.html.js} +0 -0
- /package/dist/types/{Init.d.ts → src/Init.d.ts} +0 -0
- /package/dist/types/{Node.d.ts → src/Node.d.ts} +0 -0
- /package/dist/types/{PM → src/PM}/node.d.ts +0 -0
- /package/dist/types/{PM → src/PM}/web.d.ts +0 -0
- /package/dist/types/{Puppeteer.d.ts → src/Puppeteer.d.ts} +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/puppeteer.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react/component/node.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react/component/web.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react/jsx/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react/jsx/node.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react/jsx/web.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-dom/component/node.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-dom/component/web.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-dom/jsx/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-dom/jsx/node.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-dom/jsx/web.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/component/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/component/interface.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/component/node.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/component/web.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.d.ts +0 -0
- /package/dist/types/{Web.d.ts → src/Web.d.ts} +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/features.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/index.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/node.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/report.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/tests.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/web.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/basebuilder.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/classBuilder.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/core.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/index.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/types.d.ts +0 -0
- /package/dist/types/{puppeteerConfiger.d.ts → src/puppeteerConfiger.d.ts} +0 -0
- /package/dist/types/{utils.d.ts → src/utils.d.ts} +0 -0
- /package/dist/types/{web.html.d.ts → src/web.html.d.ts} +0 -0
package/src/lib/core.ts
CHANGED
|
@@ -142,12 +142,30 @@ export default abstract class Testeranto<
|
|
|
142
142
|
|
|
143
143
|
class When extends BaseWhen<ITestShape> {
|
|
144
144
|
async andWhen(store, whenCB, testResource, pm) {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
145
|
+
try {
|
|
146
|
+
return await fullTestInterface.andWhen(
|
|
147
|
+
store,
|
|
148
|
+
whenCB,
|
|
149
|
+
testResource,
|
|
150
|
+
pm
|
|
151
|
+
);
|
|
152
|
+
} catch (e) {
|
|
153
|
+
throw e;
|
|
154
|
+
}
|
|
155
|
+
// return fullTestInterface
|
|
156
|
+
// .andWhen(store, whenCB, testResource, pm)
|
|
157
|
+
// .catch((e) => {
|
|
158
|
+
// throw e;
|
|
159
|
+
// });
|
|
160
|
+
// return new Promise((res, rej) => {
|
|
161
|
+
// fullTestInterface.andWhen(store, whenCB, testResource, pm);
|
|
162
|
+
// });
|
|
163
|
+
// return await fullTestInterface.andWhen(
|
|
164
|
+
// store,
|
|
165
|
+
// whenCB,
|
|
166
|
+
// testResource,
|
|
167
|
+
// pm
|
|
168
|
+
// );
|
|
151
169
|
}
|
|
152
170
|
} as any,
|
|
153
171
|
|
|
@@ -155,15 +173,39 @@ export default abstract class Testeranto<
|
|
|
155
173
|
async butThen(
|
|
156
174
|
store: any,
|
|
157
175
|
thenCB,
|
|
158
|
-
|
|
176
|
+
testResource: any,
|
|
159
177
|
pm: PM
|
|
160
178
|
): Promise<ITestShape["iselection"]> {
|
|
161
|
-
return
|
|
162
|
-
store,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
179
|
+
return fullTestInterface
|
|
180
|
+
.butThen(store, thenCB, testResource, pm)
|
|
181
|
+
.then(
|
|
182
|
+
(v) => {
|
|
183
|
+
return v;
|
|
184
|
+
},
|
|
185
|
+
(e) => {
|
|
186
|
+
console.log(" ERROR ", e);
|
|
187
|
+
throw e;
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
// try {
|
|
191
|
+
// console.log("mark 4");
|
|
192
|
+
// return await fullTestInterface.butThen(
|
|
193
|
+
// store,
|
|
194
|
+
// thenCB,
|
|
195
|
+
// testResource,
|
|
196
|
+
// pm
|
|
197
|
+
// );
|
|
198
|
+
// } catch (e) {
|
|
199
|
+
// console.log("mar123");
|
|
200
|
+
// throw e;
|
|
201
|
+
// }
|
|
202
|
+
|
|
203
|
+
// return await fullTestInterface.butThen(
|
|
204
|
+
// store,
|
|
205
|
+
// thenCB,
|
|
206
|
+
// testResourceConfiguration,
|
|
207
|
+
// pm
|
|
208
|
+
// );
|
|
167
209
|
}
|
|
168
210
|
} as any,
|
|
169
211
|
|
package/testeranto.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
botEmail: "adamwong246@gmail.com",
|
|
3
|
+
taskman: "adamwong246/kokomobay-taskman",
|
|
4
|
+
outdir: "docs",
|
|
5
|
+
tests: [["./src/LoginButton.test.tsx", "web", { ports: 0 }, []]],
|
|
6
|
+
debugger: true,
|
|
7
|
+
clearScreen: false,
|
|
8
|
+
devMode: true,
|
|
9
|
+
minify: false,
|
|
10
|
+
outbase: ".",
|
|
11
|
+
ports: [],
|
|
12
|
+
externals: [],
|
|
13
|
+
};
|
package/tsconfig.common.json
CHANGED
|
@@ -18,7 +18,10 @@
|
|
|
18
18
|
"jsx": "react",
|
|
19
19
|
"resolveJsonModule": true,
|
|
20
20
|
"strictNullChecks": true,
|
|
21
|
-
"lib": [
|
|
21
|
+
"lib": [
|
|
22
|
+
"dom",
|
|
23
|
+
"dom.iterable"
|
|
24
|
+
],
|
|
22
25
|
"skipLibCheck": true,
|
|
23
26
|
"strict": false,
|
|
24
27
|
"forceConsistentCasingInFileNames": true,
|
|
@@ -30,6 +33,11 @@
|
|
|
30
33
|
"outDir": "dist/common/",
|
|
31
34
|
"alwaysStrict": true
|
|
32
35
|
},
|
|
33
|
-
"include": [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
"include": [
|
|
37
|
+
"./**/*.*ts",
|
|
38
|
+
"index.d.ts"
|
|
39
|
+
],
|
|
40
|
+
"exclude": [
|
|
41
|
+
"node_modules"
|
|
42
|
+
]
|
|
43
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"module": "esnext",
|
|
5
5
|
"allowSyntheticDefaultImports": true,
|
|
6
|
+
"moduleResolution": "node",
|
|
7
|
+
"target": "es2020",
|
|
8
|
+
"esModuleInterop": true,
|
|
6
9
|
}
|
|
7
10
|
},
|
|
8
11
|
"declaration": true,
|
|
@@ -36,9 +39,13 @@
|
|
|
36
39
|
"alwaysStrict": true
|
|
37
40
|
},
|
|
38
41
|
"include": [
|
|
39
|
-
"src/**/*.*ts",
|
|
40
|
-
"
|
|
42
|
+
"./node_modules/testeranto/src/**/*.*ts",
|
|
43
|
+
"./**/*.*ts",
|
|
44
|
+
"./**/*.*tsx",
|
|
41
45
|
"index.d.ts",
|
|
46
|
+
"build-tests.ts",
|
|
47
|
+
"run-tests.ts",
|
|
48
|
+
"testeranto.ts",
|
|
42
49
|
],
|
|
43
50
|
"exclude": [
|
|
44
51
|
"node_modules",
|
package/tsconfig.module.json
CHANGED
package/tsconfig.types.json
CHANGED
package/Report.Dockerfile
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
FROM node:18.18.0
|
|
2
|
-
ENV HOST 0.0.0.0
|
|
3
|
-
RUN apt-get update && \
|
|
4
|
-
apt-get install -y --no-install-recommends \
|
|
5
|
-
python3 \
|
|
6
|
-
make \
|
|
7
|
-
g++ && \
|
|
8
|
-
rm -rf /var/lib/apt/lists/*
|
|
9
|
-
|
|
10
|
-
RUN yarn global add node-gyp
|
|
11
|
-
|
|
12
|
-
RUN mkdir -p /usr/src/app
|
|
13
|
-
RUN mkdir -p /usr/src/app/docs
|
|
14
|
-
WORKDIR /usr/src/app
|
|
15
|
-
COPY package.json /usr/src/app
|
|
16
|
-
RUN yarn install
|
|
17
|
-
COPY ./src/ /usr/src/app/src
|
|
18
|
-
COPY ./subPackages/ /usr/src/app/subPackages
|
|
19
|
-
COPY ./testeranto.mts /usr/src/app/testeranto.mts
|
|
20
|
-
COPY ./tsconfig.json /usr/src/app/tsconfig.json
|
|
21
|
-
COPY ./init.mts /usr/src/app/init.mts
|
|
22
|
-
COPY ./report.mts /usr/src/app/report.mts
|
|
23
|
-
RUN yarn run init
|
|
24
|
-
# RUN yarn report
|
|
25
|
-
# COPY ./docs/ /usr/src/app/docs
|
|
26
|
-
# # COPY ./testeranto.json /usr/src/app/testeranto.json
|
|
27
|
-
# # COPY prebuild.sh /usr/src/app
|
|
28
|
-
# # COPY postBuild.sh /usr/src/app
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
# # RUN yarn build
|
|
32
|
-
|
|
33
|
-
# RUN cp ./node_modules/testeranto/dist/prebuild/TaskManBackEnd.mjs /usr/src/app/TaskManBackEnd.mjs
|
|
34
|
-
# RUN cp ./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.js /usr/src/app/TaskManFrontEnd.js
|
|
35
|
-
# RUN cp ./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.css /usr/src/app/TaskManFrontEnd.css
|
|
36
|
-
|
|
37
|
-
# # RUN ts-node-esm ./node_modules/testeranto/dist/prebuild/TaskManBackEnd.mjs
|
|
38
|
-
|
|
39
|
-
EXPOSE 8080
|
|
40
|
-
EXPOSE 27017
|
|
41
|
-
# ENV MONGO_CONNECTION=mongodb+srv://testerantokokomobay:<db_password>@report.7rred.mongodb.net/?retryWrites=true&w=majority&appName=report
|
|
42
|
-
# ENV PORT=8080
|
|
43
|
-
# # CMD ['yarn', 'testeranto-testrun', '&', 'yarn', 'testeranto-taskman']
|
|
44
|
-
CMD ["yarn", "report"]
|
package/dist/common/Features.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.DirectedGraph = exports.TesterantoGraphDirectedAcyclic = exports.TesterantoGraphDirected = exports.TesterantoGraphUndirected = exports.BaseFeature = void 0;
|
|
7
|
-
const graphology_umd_js_1 = __importDefault(require("graphology/dist/graphology.umd.js"));
|
|
8
|
-
const { DirectedGraph, UndirectedGraph } = graphology_umd_js_1.default;
|
|
9
|
-
exports.DirectedGraph = DirectedGraph;
|
|
10
|
-
class TesterantoGraph {
|
|
11
|
-
constructor(name) {
|
|
12
|
-
this.name = name;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
class BaseFeature {
|
|
16
|
-
constructor(name) {
|
|
17
|
-
this.name = name;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.BaseFeature = BaseFeature;
|
|
21
|
-
class TesterantoGraphUndirected {
|
|
22
|
-
constructor(name) {
|
|
23
|
-
this.name = name;
|
|
24
|
-
this.graph = new UndirectedGraph();
|
|
25
|
-
}
|
|
26
|
-
connect(a, b, relation) {
|
|
27
|
-
this.graph.mergeEdge(a, b, { type: relation });
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.TesterantoGraphUndirected = TesterantoGraphUndirected;
|
|
31
|
-
class TesterantoGraphDirected {
|
|
32
|
-
constructor(name) {
|
|
33
|
-
this.name = name;
|
|
34
|
-
this.graph = new DirectedGraph();
|
|
35
|
-
}
|
|
36
|
-
connect(to, from, relation) {
|
|
37
|
-
this.graph.mergeEdge(to, from, { type: relation });
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.TesterantoGraphDirected = TesterantoGraphDirected;
|
|
41
|
-
class TesterantoGraphDirectedAcyclic {
|
|
42
|
-
constructor(name) {
|
|
43
|
-
this.name = name;
|
|
44
|
-
this.graph = new DirectedGraph();
|
|
45
|
-
}
|
|
46
|
-
connect(to, from, relation) {
|
|
47
|
-
this.graph.mergeEdge(to, from, { type: relation });
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
exports.TesterantoGraphDirectedAcyclic = TesterantoGraphDirectedAcyclic;
|
|
51
|
-
exports.default = {};
|
package/dist/common/Init.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const fs_1 = __importDefault(require("fs"));
|
|
7
|
-
exports.default = async (partialConfig) => {
|
|
8
|
-
const config = Object.assign(Object.assign({}, partialConfig), { buildDir: process.cwd() + "/" + partialConfig.outdir });
|
|
9
|
-
fs_1.default.writeFileSync(`${config.outdir}/testeranto.json`, JSON.stringify(Object.assign(Object.assign({}, config), { buildDir: process.cwd() + "/" + config.outdir }), null, 2));
|
|
10
|
-
fs_1.default.copyFileSync("./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.js", "./docs/TaskManFrontEnd.js");
|
|
11
|
-
fs_1.default.copyFileSync("./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.css", "./docs/TaskManFrontEnd.css");
|
|
12
|
-
fs_1.default.writeFileSync(`${config.outdir}/index.html`, `<!DOCTYPE html>
|
|
13
|
-
<html lang="en">
|
|
14
|
-
|
|
15
|
-
<head>
|
|
16
|
-
<meta name="description" content="Webpage description goes here" />
|
|
17
|
-
<meta charset="utf-8" />
|
|
18
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
19
|
-
<meta name="author" content="" />
|
|
20
|
-
|
|
21
|
-
<title>TaskMan</title>
|
|
22
|
-
|
|
23
|
-
<link rel="stylesheet" href="/docs/TaskManFrontEnd.css" />
|
|
24
|
-
<script type="module" src="/docs/TaskManFrontEnd.js"></script>
|
|
25
|
-
</head>
|
|
26
|
-
|
|
27
|
-
<body><div id="root">react is loading</div></body>
|
|
28
|
-
|
|
29
|
-
</html>`);
|
|
30
|
-
};
|
package/dist/common/Reporter.js
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const readline_1 = __importDefault(require("readline"));
|
|
7
|
-
const fs_1 = __importDefault(require("fs"));
|
|
8
|
-
const jsonc_1 = require("jsonc");
|
|
9
|
-
const puppeteer_core_1 = __importDefault(require("puppeteer-core"));
|
|
10
|
-
// import { PM_Main } from "./PM/main.js";
|
|
11
|
-
// var mode: "DEV" | "PROD" = process.argv[2] === "-dev" ? "DEV" : "PROD";
|
|
12
|
-
// const node2web: Record<string, string[]> = {};
|
|
13
|
-
// const web2node: Record<string, string[]> = {};
|
|
14
|
-
// const childProcesses: Record<string, "loaded" | "running" | "done"> = {};
|
|
15
|
-
readline_1.default.emitKeypressEvents(process.stdin);
|
|
16
|
-
if (process.stdin.isTTY)
|
|
17
|
-
process.stdin.setRawMode(true);
|
|
18
|
-
console.log("\n Puppeteer is running. Press 'q' to quit\n");
|
|
19
|
-
process.stdin.on("keypress", (str, key) => {
|
|
20
|
-
if (key.name === "q") {
|
|
21
|
-
process.exit();
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
const main = async () => {
|
|
25
|
-
const configs = jsonc_1.jsonc.parse((await fs_1.default.readFileSync("./docs/testeranto.json")).toString());
|
|
26
|
-
// const pm = new PM_Main(configs);
|
|
27
|
-
// await puppeteer.launch(options);
|
|
28
|
-
const browser = await puppeteer_core_1.default.launch({
|
|
29
|
-
waitForInitialPage: false,
|
|
30
|
-
executablePath: "/opt/homebrew/bin/chromium",
|
|
31
|
-
headless: false,
|
|
32
|
-
args: [
|
|
33
|
-
"--allow-file-access-from-files",
|
|
34
|
-
"--allow-running-insecure-content",
|
|
35
|
-
// "--auto-open-devtools-for-tabs",
|
|
36
|
-
"--disable-dev-shm-usage",
|
|
37
|
-
"--disable-extensions",
|
|
38
|
-
"--disable-gpu",
|
|
39
|
-
"--disable-setuid-sandbox",
|
|
40
|
-
"--disable-site-isolation-trials",
|
|
41
|
-
"--disable-web-security",
|
|
42
|
-
"--disable-web-security",
|
|
43
|
-
"--no-first-run",
|
|
44
|
-
"--no-sandbox",
|
|
45
|
-
"--no-startup-window",
|
|
46
|
-
"--no-zygote",
|
|
47
|
-
"--reduce-security-for-testing",
|
|
48
|
-
"--remote-allow-origins=*",
|
|
49
|
-
// "--remote-allow-origins=ws://localhost:3234",
|
|
50
|
-
"--unsafely-treat-insecure-origin-as-secure=*",
|
|
51
|
-
// "--disable-features=IsolateOrigins",
|
|
52
|
-
// "--single-process",
|
|
53
|
-
// "--unsafely-treat-insecure-origin-as-secure",
|
|
54
|
-
// "--unsafely-treat-insecure-origin-as-secure=ws://192.168.0.101:3234",
|
|
55
|
-
// `--remote-debugging-port=3234`,
|
|
56
|
-
],
|
|
57
|
-
}
|
|
58
|
-
// "."
|
|
59
|
-
);
|
|
60
|
-
console.log("Creating new page...");
|
|
61
|
-
const page = await browser.newPage();
|
|
62
|
-
await page.setViewport({ width: 0, height: 0 });
|
|
63
|
-
console.log("Requesting url...");
|
|
64
|
-
await page.goto(`file://${process.cwd()}/docs/report.html?local=true`);
|
|
65
|
-
// configs.tests.forEach(([test, runtime, secondaryArtifacts]) => {
|
|
66
|
-
// if (runtime === "node") {
|
|
67
|
-
// pm.launchNode(test, destinationOfRuntime(test, "node"));
|
|
68
|
-
// } else if (runtime === "web") {
|
|
69
|
-
// pm.launchWeb(test, destinationOfRuntime(test, "web"));
|
|
70
|
-
// } else {
|
|
71
|
-
// console.error("runtime makes no sense", runtime);
|
|
72
|
-
// }
|
|
73
|
-
// });
|
|
74
|
-
// console.log("ready and watching for changes...", configs.buildDir);
|
|
75
|
-
// fs.watch(
|
|
76
|
-
// configs.buildDir,
|
|
77
|
-
// {
|
|
78
|
-
// recursive: true,
|
|
79
|
-
// },
|
|
80
|
-
// (eventType, changedFile) => {
|
|
81
|
-
// if (changedFile) {
|
|
82
|
-
// configs.tests.forEach(([test, runtime, secondaryArtifacts]) => {
|
|
83
|
-
// if (eventType === "change" || eventType === "rename") {
|
|
84
|
-
// if (
|
|
85
|
-
// changedFile ===
|
|
86
|
-
// test
|
|
87
|
-
// .replace("./", "node/")
|
|
88
|
-
// .split(".")
|
|
89
|
-
// .slice(0, -1)
|
|
90
|
-
// .concat("mjs")
|
|
91
|
-
// .join(".")
|
|
92
|
-
// ) {
|
|
93
|
-
// pm.launchNode(test, destinationOfRuntime(test, "node"));
|
|
94
|
-
// }
|
|
95
|
-
// if (
|
|
96
|
-
// changedFile ===
|
|
97
|
-
// test
|
|
98
|
-
// .replace("./", "web/")
|
|
99
|
-
// .split(".")
|
|
100
|
-
// .slice(0, -1)
|
|
101
|
-
// .concat("mjs")
|
|
102
|
-
// .join(".")
|
|
103
|
-
// ) {
|
|
104
|
-
// pm.launchWeb(test, destinationOfRuntime(test, "web"));
|
|
105
|
-
// }
|
|
106
|
-
// }
|
|
107
|
-
// });
|
|
108
|
-
// }
|
|
109
|
-
// }
|
|
110
|
-
// );
|
|
111
|
-
};
|
|
112
|
-
main();
|
package/dist/common/Scheduler.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const express_1 = __importDefault(require("express"));
|
|
7
|
-
const mongodb_1 = require("mongodb");
|
|
8
|
-
const mongoose_1 = __importDefault(require("mongoose"));
|
|
9
|
-
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const fs_1 = __importDefault(require("fs"));
|
|
11
|
-
const mongooseSchemas_1 = require("./mongooseSchemas");
|
|
12
|
-
console.log("hello TaskMan Backend", process.env);
|
|
13
|
-
const port = process.env.PORT || "8080";
|
|
14
|
-
const mongoConnect = process.env.MONGO_CONNECTION || "mongodb://127.0.0.1:27017";
|
|
15
|
-
function findTextFiles(dir, fileList = []) {
|
|
16
|
-
const files = fs_1.default.readdirSync(dir);
|
|
17
|
-
for (const file of files) {
|
|
18
|
-
const filePath = path_1.default.join(dir, file);
|
|
19
|
-
const fileStat = fs_1.default.statSync(filePath);
|
|
20
|
-
if (fileStat.isDirectory() && file !== "node_modules") {
|
|
21
|
-
findTextFiles(filePath, fileList); // Recursive call for subdirectories
|
|
22
|
-
}
|
|
23
|
-
else if (path_1.default.extname(file) === ".txt") {
|
|
24
|
-
fileList.push(filePath);
|
|
25
|
-
}
|
|
26
|
-
else if (path_1.default.extname(file) === ".md") {
|
|
27
|
-
fileList.push(filePath);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return fileList;
|
|
31
|
-
}
|
|
32
|
-
function listToTree(fileList) {
|
|
33
|
-
const root = {
|
|
34
|
-
name: "root",
|
|
35
|
-
children: [],
|
|
36
|
-
};
|
|
37
|
-
for (const path of fileList) {
|
|
38
|
-
const parts = path.split("/");
|
|
39
|
-
let current = root;
|
|
40
|
-
for (let i = 0; i < parts.length; i++) {
|
|
41
|
-
const part = parts[i];
|
|
42
|
-
if (!part)
|
|
43
|
-
continue; // Skip empty parts (e.g., from leading '/')
|
|
44
|
-
let child = current.children.find((c) => c.name === part);
|
|
45
|
-
if (!child) {
|
|
46
|
-
child = { name: part, children: [] };
|
|
47
|
-
current.children.push(child);
|
|
48
|
-
}
|
|
49
|
-
current = child;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return root.children;
|
|
53
|
-
}
|
|
54
|
-
exports.default = (partialConfig) => {
|
|
55
|
-
const config = Object.assign(Object.assign({}, partialConfig), { buildDir: process.cwd() + "/" + partialConfig.outdir });
|
|
56
|
-
fs_1.default.writeFileSync(`${config.outdir}/testeranto.json`, JSON.stringify(config, null, 2));
|
|
57
|
-
const app = (0, express_1.default)();
|
|
58
|
-
new mongodb_1.MongoClient(mongoConnect).connect().then(async (conn) => {
|
|
59
|
-
const db = conn.db("taskman");
|
|
60
|
-
await mongoose_1.default.connect(`${mongoConnect}/taskman`);
|
|
61
|
-
// await mongoose.connect(
|
|
62
|
-
// `mongodb://${process.env.MONGO_HOST || "127.0.0.1"}:27017/taskman`
|
|
63
|
-
// );
|
|
64
|
-
const usersModel = mongoose_1.default.model("User", mongooseSchemas_1.userSchema);
|
|
65
|
-
const kanbanModel = mongoose_1.default.model("Kanban", mongooseSchemas_1.kanbanSchema);
|
|
66
|
-
const ganttModel = mongoose_1.default.model("Gantt", mongooseSchemas_1.ganttSchema);
|
|
67
|
-
const featuresModel = mongoose_1.default.model("Features", mongooseSchemas_1.featuresSchema);
|
|
68
|
-
// const roomsModel = mongoose.model<any>("Rooms", RoomSchema);
|
|
69
|
-
// const huddleModdle = mongoose.model<any>("Huddles", HuddleSchema);
|
|
70
|
-
const MessagesModel = mongoose_1.default.model("Messages", mongooseSchemas_1.chatCatMessageSchema);
|
|
71
|
-
const ChatChannel = mongoose_1.default.model("ChatChannel", mongooseSchemas_1.channelsFeature);
|
|
72
|
-
const huddleModdle = ChatChannel.discriminator("Huddle", mongooseSchemas_1.HuddleSchema);
|
|
73
|
-
const roomsModel = ChatChannel.discriminator("Room", mongooseSchemas_1.RoomSchema);
|
|
74
|
-
app.get("/TaskManFrontend.js", (req, res) => {
|
|
75
|
-
res.sendFile(`${process.cwd()}/docs/TaskManFrontEnd.js`);
|
|
76
|
-
});
|
|
77
|
-
app.get("/TaskManFrontEnd.css", (req, res) => {
|
|
78
|
-
res.sendFile(`${process.cwd()}/docs/TaskManFrontEnd.css`);
|
|
79
|
-
});
|
|
80
|
-
// app.get(`/preMergeCheck`, async (req, res) => {
|
|
81
|
-
// const commit = req.params["commit"];
|
|
82
|
-
// // res.json(await keyedModels[key].find({}));
|
|
83
|
-
// });
|
|
84
|
-
// app.get("/TaskManFrontend.js", (req, res) => {
|
|
85
|
-
// res.sendFile(
|
|
86
|
-
// `${process.cwd()}/node_modules/testeranto/dist/prebuild/TaskManFrontEnd.js`
|
|
87
|
-
// );
|
|
88
|
-
// });
|
|
89
|
-
// app.get("/TaskManFrontEnd.css", (req, res) => {
|
|
90
|
-
// res.sendFile(
|
|
91
|
-
// `${process.cwd()}/node_modules/testeranto/dist/prebuild/TaskManFrontEnd.css`
|
|
92
|
-
// );
|
|
93
|
-
// });
|
|
94
|
-
// app.get("/testeranto.json", (req, res) => {
|
|
95
|
-
// // res.sendFile(`${process.cwd()}/docs/testeranto.json`);
|
|
96
|
-
// res.json(config);
|
|
97
|
-
// });
|
|
98
|
-
// app.get("/", (req, res) => {
|
|
99
|
-
// res.send(`<!DOCTYPE html>
|
|
100
|
-
// <html lang="en">
|
|
101
|
-
// <head>
|
|
102
|
-
// <meta name="description" content="Webpage description goes here" />
|
|
103
|
-
// <meta charset="utf-8" />
|
|
104
|
-
// <meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
105
|
-
// <meta name="author" content="" />
|
|
106
|
-
// <title>TaskMan</title>
|
|
107
|
-
// <link rel="stylesheet" href="/TaskManFrontEnd.css" />
|
|
108
|
-
// <script type="module" src="/TaskManFrontEnd.js"></script>
|
|
109
|
-
// </head>
|
|
110
|
-
// <body><div id="root">react is loading</div></body>
|
|
111
|
-
// </html>`);
|
|
112
|
-
// });
|
|
113
|
-
app.listen(port, () => {
|
|
114
|
-
console.log(`Example app listening on port ${port}`);
|
|
115
|
-
});
|
|
116
|
-
///////////////////////////////////////////////
|
|
117
|
-
const keyedModels = {
|
|
118
|
-
users: usersModel,
|
|
119
|
-
kanbans: kanbanModel,
|
|
120
|
-
features: featuresModel,
|
|
121
|
-
gantts: ganttModel,
|
|
122
|
-
rooms: roomsModel,
|
|
123
|
-
huddles: huddleModdle,
|
|
124
|
-
messages: MessagesModel,
|
|
125
|
-
};
|
|
126
|
-
Object.keys(keyedModels).forEach((key) => {
|
|
127
|
-
app.get(`/${key}.json`, async (req, res) => {
|
|
128
|
-
console.log("GET", key, keyedModels[key]);
|
|
129
|
-
res.json(await keyedModels[key].find({}));
|
|
130
|
-
});
|
|
131
|
-
app.get(`/${key}/:id.json`, async (req, res) => {
|
|
132
|
-
res.json(await keyedModels[key]
|
|
133
|
-
.find({ id: { $eq: req.params["id"] } })
|
|
134
|
-
.toArray());
|
|
135
|
-
});
|
|
136
|
-
app.post(`/${key}/:id.json`, async (req, res) => {
|
|
137
|
-
res.json(await keyedModels[key]
|
|
138
|
-
.find({ id: { $eq: req.params["id"] } })
|
|
139
|
-
.toArray());
|
|
140
|
-
});
|
|
141
|
-
app.post(`/${key}.json`, async (req, res) => {
|
|
142
|
-
res.json(await keyedModels[key]
|
|
143
|
-
.find({ id: { $eq: req.params["id"] } })
|
|
144
|
-
.toArray());
|
|
145
|
-
});
|
|
146
|
-
});
|
|
147
|
-
app.use("/", express_1.default.static(path_1.default.join(process.cwd())));
|
|
148
|
-
app.get("/docGal/fs.json", (req, res) => {
|
|
149
|
-
const directoryPath = "./"; // Replace with the desired directory path
|
|
150
|
-
// const textFiles = findTextFiles(directoryPath);
|
|
151
|
-
res.json(listToTree(findTextFiles(directoryPath)));
|
|
152
|
-
// res.send(`<!DOCTYPE html>
|
|
153
|
-
// <html lang="en">
|
|
154
|
-
// <head>
|
|
155
|
-
// <meta name="description" content="Webpage description goes here" />
|
|
156
|
-
// <meta charset="utf-8" />
|
|
157
|
-
// <meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
158
|
-
// <meta name="author" content="" />
|
|
159
|
-
// <title>TaskMan</title>
|
|
160
|
-
// <link rel="stylesheet" href="/TaskManFrontEnd.css" />
|
|
161
|
-
// <script type="module" src="/TaskManFrontEnd.js"></script>
|
|
162
|
-
// </head>
|
|
163
|
-
// <body><div id="root">react is loading</div></body>
|
|
164
|
-
// </html>`);
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const fs_1 = __importDefault(require("fs"));
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
|
-
exports.default = (platform, entryPoints) => {
|
|
9
|
-
return {
|
|
10
|
-
name: "metafileWriter",
|
|
11
|
-
setup(build) {
|
|
12
|
-
build.onEnd((result) => {
|
|
13
|
-
if (result.errors.length === 0) {
|
|
14
|
-
entryPoints.forEach((entryPoint) => {
|
|
15
|
-
const filePath = path_1.default.join("./docs/", platform, entryPoint.split(".").slice(0, -1).join("."), `inputFiles.json`);
|
|
16
|
-
const dirName = path_1.default.dirname(filePath);
|
|
17
|
-
if (!fs_1.default.existsSync(dirName)) {
|
|
18
|
-
fs_1.default.mkdirSync(dirName, { recursive: true });
|
|
19
|
-
}
|
|
20
|
-
fs_1.default.writeFileSync(filePath, JSON.stringify(Object.keys(Object.keys(result.metafile.outputs)
|
|
21
|
-
.filter((s) => {
|
|
22
|
-
if (!result.metafile.outputs[s].entryPoint) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
return (path_1.default.resolve(result.metafile.outputs[s].entryPoint) ===
|
|
26
|
-
path_1.default.resolve(entryPoint));
|
|
27
|
-
})
|
|
28
|
-
.reduce((mm, el) => {
|
|
29
|
-
mm.push(result.metafile.outputs[el].inputs);
|
|
30
|
-
return mm;
|
|
31
|
-
}, [])[0])
|
|
32
|
-
.filter((f) => {
|
|
33
|
-
const regex = /^src\/.*/g;
|
|
34
|
-
const matches = f.match(regex);
|
|
35
|
-
const passes = (matches === null || matches === void 0 ? void 0 : matches.length) === 1;
|
|
36
|
-
return passes;
|
|
37
|
-
})
|
|
38
|
-
.filter((f) => {
|
|
39
|
-
const regex = /.*\.test\..*/g;
|
|
40
|
-
const matches = f.match(regex);
|
|
41
|
-
const passes = (matches === null || matches === void 0 ? void 0 : matches.length) === 1;
|
|
42
|
-
return !passes;
|
|
43
|
-
})));
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
};
|