testeranto 0.85.0 → 0.94.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/README.md +1 -3
- package/bin/init-docs.js +24 -0
- package/bundle.js +53 -0
- package/dist/common/dist/module/src/Init.js +40 -0
- package/dist/common/src/Init.js +30 -0
- package/dist/common/src/Node.js +5 -3
- package/dist/common/src/PM/main.js +136 -90
- package/dist/common/src/Project.js +82 -0
- package/dist/common/src/Puppeteer.js +0 -2
- package/dist/common/src/SubPackages/puppeteer.js +1 -1
- package/dist/common/src/SubPackages/react/jsx/index.js +14 -6
- package/dist/common/src/SubPackages/react/jsx/node.js +7 -2
- package/dist/common/src/SubPackages/react-dom/component/web.js +13 -39
- package/dist/common/src/SubPackages/react-test-renderer/component/interface.js +2 -10
- package/dist/common/src/Web.js +25 -21
- package/dist/common/{run-tests.js → src/build-tests.js} +10 -5
- package/dist/common/src/defaultConfig.js +19 -0
- package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +26 -16
- package/dist/common/src/init-docs.js +43 -0
- package/dist/common/src/lib/abstractBase.js +29 -248
- package/dist/common/src/lib/basebuilder.js +1 -11
- package/dist/common/src/lib/classBuilder.js +1 -1
- package/dist/common/src/lib/core.js +8 -26
- package/dist/common/{build-tests.js → src/run-tests.js} +10 -9
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/src/Init.js +30 -0
- package/dist/module/src/Node.js +5 -3
- package/dist/module/src/PM/main.js +136 -90
- package/dist/module/src/Project.js +82 -0
- package/dist/module/src/Puppeteer.js +0 -2
- package/dist/module/src/SubPackages/puppeteer.js +1 -1
- package/dist/module/src/SubPackages/react/jsx/index.js +14 -6
- package/dist/module/src/SubPackages/react/jsx/node.js +7 -2
- package/dist/module/src/SubPackages/react-dom/component/web.js +13 -39
- package/dist/module/src/SubPackages/react-test-renderer/component/interface.js +2 -10
- package/dist/module/src/Web.js +25 -21
- package/dist/module/src/build-tests.js +11 -0
- package/dist/module/src/defaultConfig.js +17 -0
- package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +26 -16
- package/dist/module/src/init-docs.js +15 -0
- package/dist/module/src/lib/abstractBase.js +29 -248
- package/dist/module/src/lib/basebuilder.js +1 -11
- package/dist/module/src/lib/classBuilder.js +1 -1
- package/dist/module/src/lib/core.js +8 -26
- package/dist/module/src/run-tests.js +11 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/build-tests.mjs +553 -0
- package/dist/prebuild/init-docs.mjs +48 -0
- package/dist/prebuild/run-tests.mjs +871 -0
- package/dist/types/dist/module/src/Init.d.ts +2 -0
- package/dist/types/src/Node.d.ts +4 -1
- package/dist/types/src/PM/main.d.ts +2 -1
- package/dist/types/src/SubPackages/react/jsx/node.d.ts +1 -1
- package/dist/types/src/SubPackages/react-test-renderer/component/interface.d.ts +1 -1
- package/dist/types/src/Web.d.ts +2 -2
- package/dist/types/src/build-tests.d.ts +1 -0
- package/dist/types/src/defaultConfig.d.ts +3 -0
- package/dist/types/src/init-docs.d.ts +1 -0
- package/dist/types/src/lib/abstractBase.d.ts +6 -2
- package/dist/types/src/lib/core.d.ts +3 -3
- package/dist/types/src/lib/types.d.ts +5 -1
- package/dist/types/src/run-tests.d.ts +1 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +21 -24
- package/src/Init.ts +28 -0
- package/src/Node.ts +6 -3
- package/src/PM/main.ts +168 -110
- package/src/Project.ts +103 -0
- package/src/Puppeteer.ts +0 -2
- package/src/SubPackages/puppeteer.ts +1 -1
- package/src/SubPackages/react/jsx/index.ts +15 -7
- package/src/SubPackages/react/jsx/node.ts +6 -5
- package/src/SubPackages/react-dom/component/web.ts +28 -51
- package/src/SubPackages/react-test-renderer/component/interface.ts +4 -11
- package/src/Web.ts +45 -23
- package/src/build-tests.ts +12 -0
- package/src/defaultConfig.ts +20 -0
- package/src/esbuildConfigs/inputFilesPlugin.ts +46 -17
- package/src/init-docs.ts +19 -0
- package/src/lib/abstractBase.ts +38 -255
- package/src/lib/basebuilder.ts +1 -12
- package/src/lib/classBuilder.ts +2 -1
- package/src/lib/core.ts +17 -29
- package/src/lib/types.ts +3 -1
- package/src/run-tests.ts +12 -0
- package/tsconfig.json +1 -1
- package/build-tests.ts +0 -16
- package/dist/common/init-docs.js +0 -8
- package/dist/module/build-tests.js +0 -10
- package/dist/module/init-docs.js +0 -3
- package/dist/module/run-tests.js +0 -6
- package/dist/prebuild/Puppeteer.mjs +0 -82033
- package/dist/types/build-tests.d.ts +0 -3
- package/dist/types/init-docs.d.ts +0 -2
- package/dist/types/run-tests.d.ts +0 -2
- package/init-docs.ts +0 -5
- package/pupBuild.js +0 -18
- package/run-tests.ts +0 -9
|
@@ -12,14 +12,22 @@ exports.testInterface = {
|
|
|
12
12
|
// // resolve(x());
|
|
13
13
|
// // });
|
|
14
14
|
// },
|
|
15
|
-
beforeEach: async (subject, initializer, artificer) => {
|
|
15
|
+
// beforeEach: async (subject, initializer, artificer): Promise<IStore> => {
|
|
16
|
+
// return new Promise((resolve, rej) => {
|
|
17
|
+
// resolve(React.createElement(subject));
|
|
18
|
+
// });
|
|
19
|
+
// },
|
|
20
|
+
andWhen: async (s, whenCB) => {
|
|
21
|
+
await whenCB(s());
|
|
16
22
|
return new Promise((resolve, rej) => {
|
|
17
|
-
|
|
18
|
-
console.log("react-element", x);
|
|
19
|
-
resolve(x);
|
|
23
|
+
resolve(react_1.default.createElement(s));
|
|
20
24
|
});
|
|
25
|
+
// return whenCB(s);
|
|
21
26
|
},
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
butThen: async (subject, thenCB) => {
|
|
28
|
+
await thenCB(subject());
|
|
29
|
+
return new Promise((resolve, rej) => {
|
|
30
|
+
resolve(react_1.default.createElement(subject));
|
|
31
|
+
});
|
|
24
32
|
},
|
|
25
33
|
};
|
|
@@ -5,6 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const Node_js_1 = __importDefault(require("../../../Node.js"));
|
|
7
7
|
const index_js_1 = require("./index.js");
|
|
8
|
-
exports.default = (testImplementations, testSpecifications, testInput, testInterface) => {
|
|
9
|
-
return (0, Node_js_1.default)(testInput, testSpecifications, testImplementations,
|
|
8
|
+
exports.default = (testImplementations, testSpecifications, testInput, testInterface = index_js_1.testInterface) => {
|
|
9
|
+
return (0, Node_js_1.default)(testInput, testSpecifications, testImplementations, testInterface
|
|
10
|
+
// {
|
|
11
|
+
// ...baseInterface,
|
|
12
|
+
// ...testInterface,
|
|
13
|
+
// }
|
|
14
|
+
);
|
|
10
15
|
};
|
|
@@ -18,52 +18,26 @@ exports.default = (testInput, testSpecifications, testImplementations, testInter
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
const t = (0, Web_js_1.default)(testInput, testSpecifications, testImplementations, {
|
|
21
|
-
beforeAll: async (
|
|
21
|
+
beforeAll: async (subject, artificer) => {
|
|
22
22
|
return await new Promise((resolve, rej) => {
|
|
23
23
|
const htmlElement = document.getElementById("root");
|
|
24
24
|
if (htmlElement) {
|
|
25
25
|
const domRoot = client_1.default.createRoot(htmlElement);
|
|
26
|
-
|
|
27
|
-
domRoot.render((0, react_1.createElement)(TesterantoComponent, Object.assign(Object.assign({}, initialProps), { done: (reactElement) => {
|
|
28
|
-
resolve({
|
|
29
|
-
htmlElement,
|
|
30
|
-
reactElement,
|
|
31
|
-
domRoot,
|
|
32
|
-
});
|
|
33
|
-
} }), []));
|
|
34
|
-
// resolve({ htmlElement });
|
|
26
|
+
resolve({ domRoot, htmlElement });
|
|
35
27
|
}
|
|
36
28
|
});
|
|
37
29
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
// // domRoot.render(
|
|
50
|
-
// // createElement(
|
|
51
|
-
// // TesterantoComponent,
|
|
52
|
-
// // {
|
|
53
|
-
// // ...initializer,
|
|
54
|
-
// // done: (reactElement) => {
|
|
55
|
-
// // resolve({
|
|
56
|
-
// // htmlElement,
|
|
57
|
-
// // reactElement,
|
|
58
|
-
// // domRoot,
|
|
59
|
-
// // });
|
|
60
|
-
// // },
|
|
61
|
-
// // },
|
|
62
|
-
// // []
|
|
63
|
-
// // )
|
|
64
|
-
// // );
|
|
65
|
-
// });
|
|
66
|
-
// },
|
|
30
|
+
beforeEach: async ({ domRoot, htmlElement }, initialValues, testResource, artificer) => {
|
|
31
|
+
return new Promise(async (resolve, rej) => {
|
|
32
|
+
domRoot.render((0, react_1.createElement)(TesterantoComponent, Object.assign(Object.assign({}, initialValues), { done: (reactElement) => {
|
|
33
|
+
resolve({
|
|
34
|
+
htmlElement,
|
|
35
|
+
reactElement,
|
|
36
|
+
domRoot,
|
|
37
|
+
});
|
|
38
|
+
} }), []));
|
|
39
|
+
});
|
|
40
|
+
},
|
|
67
41
|
andWhen: function (s, whenCB) {
|
|
68
42
|
return whenCB(s);
|
|
69
43
|
},
|
|
@@ -31,22 +31,17 @@ const react_1 = __importDefault(require("react"));
|
|
|
31
31
|
const react_test_renderer_1 = __importStar(require("react-test-renderer"));
|
|
32
32
|
exports.testInterface = {
|
|
33
33
|
beforeEach: function (CComponent, propsAndChildren) {
|
|
34
|
-
function Link(
|
|
35
|
-
|
|
36
|
-
const c = props.children;
|
|
37
|
-
return react_1.default.createElement(CComponent, p, c);
|
|
34
|
+
function Link(proper) {
|
|
35
|
+
return react_1.default.createElement(CComponent, proper(), []);
|
|
38
36
|
}
|
|
39
37
|
return new Promise((res, rej) => {
|
|
40
38
|
(0, react_test_renderer_1.act)(async () => {
|
|
41
|
-
const p = propsAndChildren;
|
|
42
|
-
const y = new CComponent(p.props);
|
|
43
39
|
const testRenderer = await react_test_renderer_1.default.create(Link(propsAndChildren));
|
|
44
40
|
res(testRenderer);
|
|
45
41
|
});
|
|
46
42
|
});
|
|
47
43
|
},
|
|
48
44
|
andWhen: async function (renderer, whenCB) {
|
|
49
|
-
// console.log("andWhen", whenCB)
|
|
50
45
|
await (0, react_test_renderer_1.act)(() => whenCB(renderer));
|
|
51
46
|
return renderer;
|
|
52
47
|
},
|
|
@@ -54,15 +49,12 @@ exports.testInterface = {
|
|
|
54
49
|
// return whenCB()(s);
|
|
55
50
|
// },
|
|
56
51
|
butThen: async function (s, thenCB, tr) {
|
|
57
|
-
console.log("butThen", thenCB.toString());
|
|
58
52
|
return thenCB(s);
|
|
59
53
|
},
|
|
60
54
|
afterEach: async function (store, ndx, artificer) {
|
|
61
|
-
// console.log("afterEach", store);
|
|
62
55
|
return {};
|
|
63
56
|
},
|
|
64
57
|
afterAll: (store, artificer) => {
|
|
65
|
-
// console.log("afterAll", store);
|
|
66
58
|
return;
|
|
67
59
|
},
|
|
68
60
|
};
|
package/dist/common/src/Web.js
CHANGED
|
@@ -7,36 +7,40 @@ exports.WebTesteranto = void 0;
|
|
|
7
7
|
const web_1 = require("./PM/web");
|
|
8
8
|
const core_js_1 = __importDefault(require("./lib/core.js"));
|
|
9
9
|
const index_js_1 = require("./lib/index.js");
|
|
10
|
+
let errorCallback = (e) => { };
|
|
11
|
+
let unhandledrejectionCallback = (event) => {
|
|
12
|
+
console.log("window.addEventListener unhandledrejection", event);
|
|
13
|
+
// cb({ error: event.reason.message });
|
|
14
|
+
// throw event;
|
|
15
|
+
};
|
|
10
16
|
class WebTesteranto extends core_js_1.default {
|
|
11
17
|
constructor(input, testSpecification, testImplementation, testResourceRequirement, testInterface) {
|
|
12
|
-
super(input, testSpecification, testImplementation, testResourceRequirement, testInterface)
|
|
18
|
+
super(input, testSpecification, testImplementation, testResourceRequirement, testInterface, (cb) => {
|
|
19
|
+
window.removeEventListener("error", errorCallback);
|
|
20
|
+
errorCallback = (e) => {
|
|
21
|
+
console.log("window.addEventListener error", e);
|
|
22
|
+
cb(e);
|
|
23
|
+
// throw e;
|
|
24
|
+
};
|
|
25
|
+
window.addEventListener("error", errorCallback);
|
|
26
|
+
window.removeEventListener("unhandledrejection", unhandledrejectionCallback);
|
|
27
|
+
/////////////////////
|
|
28
|
+
window.removeEventListener("unhandledrejection", unhandledrejectionCallback);
|
|
29
|
+
unhandledrejectionCallback = (event) => {
|
|
30
|
+
console.log("window.addEventListener unhandledrejection", event);
|
|
31
|
+
cb({ error: event.reason.message });
|
|
32
|
+
// throw event;
|
|
33
|
+
};
|
|
34
|
+
window.addEventListener("unhandledrejection", unhandledrejectionCallback);
|
|
35
|
+
});
|
|
13
36
|
}
|
|
14
37
|
async receiveTestResourceConfig(partialTestResource) {
|
|
15
38
|
const t = partialTestResource; //JSON.parse(partialTestResource);
|
|
16
39
|
const pm = new web_1.PM_Web(t);
|
|
17
40
|
const { failed, artifacts, logPromise, features } = await this.testJobs[0].receiveTestResourceConfig(pm);
|
|
18
|
-
pm.customclose();
|
|
19
41
|
return new Promise((res, rej) => {
|
|
20
|
-
res(features);
|
|
42
|
+
res({ features, failed });
|
|
21
43
|
});
|
|
22
|
-
// return features;
|
|
23
|
-
// Promise.all([...artifacts, logPromise]).then(async () => {
|
|
24
|
-
// console.log("hello world");
|
|
25
|
-
// pm.customclose();
|
|
26
|
-
// // we can't close the window becuase we might be taking a screenshot
|
|
27
|
-
// // window.close();
|
|
28
|
-
// // console.log(
|
|
29
|
-
// // "(window as any).browser",
|
|
30
|
-
// // JSON.stringify(await (window as any).browser)
|
|
31
|
-
// // );
|
|
32
|
-
// // var currentWindow = (await (window as any).browser).getCurrentWindow();
|
|
33
|
-
// // window.close();
|
|
34
|
-
// // var customWindow = window.open("", "_blank", "");
|
|
35
|
-
// // customWindow.close();
|
|
36
|
-
// // this.puppetMaster.browser.page
|
|
37
|
-
// // window["customclose"]();
|
|
38
|
-
// // console.log("goodbye", window["customclose"]());
|
|
39
|
-
// });
|
|
40
44
|
}
|
|
41
45
|
}
|
|
42
46
|
exports.WebTesteranto = WebTesteranto;
|
|
@@ -27,8 +27,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const process_1 = __importDefault(require("process"));
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
console.log(
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
const Project_1 = require("./Project");
|
|
31
|
+
if (!process_1.default.argv[2]) {
|
|
32
|
+
console.log("You didn't pass a config file");
|
|
33
|
+
process_1.default.exit(-1);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
Promise.resolve().then(() => __importStar(require(process_1.default.cwd() + "/" + process_1.default.argv[2]))).then((module) => {
|
|
37
|
+
new Project_1.ITProject(module.default);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const config = {
|
|
4
|
+
outdir: "docs",
|
|
5
|
+
tests: [],
|
|
6
|
+
debugger: true,
|
|
7
|
+
clearScreen: false,
|
|
8
|
+
devMode: true,
|
|
9
|
+
minify: false,
|
|
10
|
+
outbase: ".",
|
|
11
|
+
ports: ["3001"],
|
|
12
|
+
externals: [],
|
|
13
|
+
nodePlugins: [],
|
|
14
|
+
webPlugins: [],
|
|
15
|
+
featureIngestor: function (s) {
|
|
16
|
+
throw new Error("Function not implemented.");
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
exports.default = config;
|
|
@@ -7,20 +7,20 @@ const fs_1 = __importDefault(require("fs"));
|
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
8
|
const otherInputs = {};
|
|
9
9
|
const register = (entrypoint, sources) => {
|
|
10
|
-
console.log("register", entrypoint, sources);
|
|
11
10
|
if (!otherInputs[entrypoint]) {
|
|
12
11
|
otherInputs[entrypoint] = new Set();
|
|
13
12
|
}
|
|
14
13
|
sources.forEach((s) => otherInputs[entrypoint].add(s));
|
|
15
14
|
};
|
|
16
15
|
function tree(meta, key) {
|
|
17
|
-
|
|
18
|
-
key
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
const outputKey = Object.keys(meta.outputs).find((k) => {
|
|
17
|
+
return meta.outputs[k].entryPoint === key;
|
|
18
|
+
});
|
|
19
|
+
if (!outputKey) {
|
|
20
|
+
console.error("No outputkey found");
|
|
21
|
+
process.exit(-1);
|
|
22
|
+
}
|
|
23
|
+
return Object.keys(meta.outputs[outputKey].inputs).filter((k) => k.startsWith("src"));
|
|
24
24
|
}
|
|
25
25
|
exports.default = (platform, entryPoints) => {
|
|
26
26
|
return {
|
|
@@ -39,7 +39,9 @@ exports.default = (platform, entryPoints) => {
|
|
|
39
39
|
}
|
|
40
40
|
const promptPath = path_1.default.join("./docs/", platform, entryPoint.split(".").slice(0, -1).join("."), `prompt.txt`);
|
|
41
41
|
const testPaths = path_1.default.join("./docs/", platform, entryPoint.split(".").slice(0, -1).join("."), `tests.json`);
|
|
42
|
-
const featuresPath = path_1.default.join("./docs/", platform, entryPoint.split(".").slice(0, -1).join("."), `featurePrompt.txt`);
|
|
42
|
+
const featuresPath = path_1.default.join("./docs/", platform, entryPoint.split(".").slice(0, -1).join("."), `featurePrompt.txt`);
|
|
43
|
+
const stderrPath = path_1.default.join("./docs/", platform, entryPoint.split(".").slice(0, -1).join("."), `stderr.log`);
|
|
44
|
+
const stdoutPath = path_1.default.join("./docs/", platform, entryPoint.split(".").slice(0, -1).join("."), `stdout.log`);
|
|
43
45
|
if (result.metafile) {
|
|
44
46
|
const addableFiles = tree(result.metafile, entryPoint.split("/").slice(1).join("/"))
|
|
45
47
|
.map((y) => {
|
|
@@ -49,23 +51,31 @@ exports.default = (platform, entryPoints) => {
|
|
|
49
51
|
return y;
|
|
50
52
|
})
|
|
51
53
|
.flat();
|
|
54
|
+
const typeErrorFiles = addableFiles.map((t) => `docs/types/${t}.type_errors.txt`);
|
|
52
55
|
fs_1.default.writeFileSync(promptPath, `
|
|
53
|
-
${
|
|
56
|
+
${addableFiles
|
|
54
57
|
.map((x) => {
|
|
55
58
|
return `/add ${x}`;
|
|
56
59
|
})
|
|
57
60
|
.join("\n")}
|
|
58
|
-
|
|
61
|
+
|
|
62
|
+
${typeErrorFiles
|
|
59
63
|
.map((x) => {
|
|
60
|
-
const f = `docs/
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
+
// const f = `docs/types/${x}.type_errors.txt`;
|
|
65
|
+
return `/read ${x}`;
|
|
66
|
+
// if (fs.existsSync(f)) {
|
|
67
|
+
// return `/read ${f}`;
|
|
68
|
+
// }
|
|
64
69
|
})
|
|
65
70
|
.join("\n")}
|
|
71
|
+
|
|
66
72
|
/read ${testPaths}
|
|
73
|
+
/read ${stdoutPath}
|
|
74
|
+
/read ${stderrPath}
|
|
75
|
+
|
|
67
76
|
/load ${featuresPath}
|
|
68
|
-
|
|
77
|
+
|
|
78
|
+
/code Fix the failing tests described in ${testPaths}. Correct any type signature errors described in the files [${typeErrorFiles.join(", ")}]. Implement any method which throws "Function not implemented."
|
|
69
79
|
`);
|
|
70
80
|
}
|
|
71
81
|
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const fs_1 = __importDefault(require("fs"));
|
|
30
|
+
const Init_1 = __importDefault(require("../dist/module/src/Init"));
|
|
31
|
+
console.log("Initializing a testeranto project");
|
|
32
|
+
if (!process.argv[2]) {
|
|
33
|
+
console.log("You didn't pass a config file, so I will create one for you.");
|
|
34
|
+
fs_1.default.writeFileSync("testeranto.mts", fs_1.default.readFileSync("node_modules/testeranto/src/defaultConfig.ts"));
|
|
35
|
+
Promise.resolve().then(() => __importStar(require(process.cwd() + "/" + "testeranto.mts"))).then((module) => {
|
|
36
|
+
(0, Init_1.default)(module.default);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
Promise.resolve().then(() => __importStar(require(process.cwd() + "/" + process.argv[2]))).then((module) => {
|
|
41
|
+
(0, Init_1.default)(module.default);
|
|
42
|
+
});
|
|
43
|
+
}
|