testeranto 0.110.0 → 0.111.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/package.json +1 -1
- package/src/PM/main.ts +418 -92
- package/src/ReportClient.tsx +38 -30
- package/src/run.ts +4 -371
- package/tsc.log +8 -6
- package/dist/common/Init.js +0 -68
- package/dist/common/Node.js +0 -27
- package/dist/common/PM/index.js +0 -7
- package/dist/common/PM/main.js +0 -984
- package/dist/common/PM/node.js +0 -128
- package/dist/common/PM/web.js +0 -121
- package/dist/common/ReportServer.js +0 -22
- package/dist/common/SubPackages/react/component/node.js +0 -19
- package/dist/common/SubPackages/react/component/web.js +0 -19
- package/dist/common/SubPackages/react/jsx/index.js +0 -21
- package/dist/common/SubPackages/react/jsx/node.js +0 -10
- package/dist/common/SubPackages/react/jsx/web.js +0 -10
- package/dist/common/SubPackages/react-dom/component/node.js +0 -88
- package/dist/common/SubPackages/react-dom/component/web.js +0 -67
- package/dist/common/SubPackages/react-dom/jsx/index.js +0 -2
- package/dist/common/SubPackages/react-dom/jsx/node.js +0 -39
- package/dist/common/SubPackages/react-dom/jsx/web.js +0 -128
- package/dist/common/SubPackages/react-test-renderer/MemoExoticComponent/node.js +0 -54
- package/dist/common/SubPackages/react-test-renderer/component/index.js +0 -2
- package/dist/common/SubPackages/react-test-renderer/component/interface.js +0 -70
- package/dist/common/SubPackages/react-test-renderer/component/node.js +0 -8
- package/dist/common/SubPackages/react-test-renderer/component/web.js +0 -8
- package/dist/common/SubPackages/react-test-renderer/fc/node.js +0 -60
- package/dist/common/SubPackages/react-test-renderer/fc/web.js +0 -60
- package/dist/common/SubPackages/react-test-renderer/jsx/index.js +0 -67
- package/dist/common/SubPackages/react-test-renderer/jsx/node.js +0 -10
- package/dist/common/SubPackages/react-test-renderer/jsx/web.js +0 -10
- package/dist/common/SubPackages/react-test-renderer/jsx-promised/index.js +0 -52
- package/dist/common/SubPackages/react-test-renderer/jsx-promised/node.js +0 -10
- package/dist/common/SubPackages/react-test-renderer/jsx-promised/web.js +0 -10
- package/dist/common/Types.js +0 -2
- package/dist/common/Web.js +0 -49
- package/dist/common/build.js +0 -222
- package/dist/common/defaultConfig.js +0 -20
- package/dist/common/esbuildConfigs/eslint-formatter-testeranto.js +0 -6
- package/dist/common/esbuildConfigs/featuresPlugin.js +0 -39
- package/dist/common/esbuildConfigs/index.js +0 -21
- package/dist/common/esbuildConfigs/inputFilesPlugin.js +0 -27
- package/dist/common/esbuildConfigs/node.js +0 -37
- package/dist/common/esbuildConfigs/web.js +0 -50
- package/dist/common/init-docs.js +0 -53
- package/dist/common/lib/abstractBase.js +0 -329
- package/dist/common/lib/basebuilder.js +0 -98
- package/dist/common/lib/classBuilder.js +0 -40
- package/dist/common/lib/core.js +0 -117
- package/dist/common/lib/index.js +0 -21
- package/dist/common/lib/types.js +0 -2
- package/dist/common/package.json +0 -3
- package/dist/common/puppeteerConfiger.js +0 -24
- package/dist/common/run.js +0 -297
- package/dist/common/tsconfig.common.tsbuildinfo +0 -1
- package/dist/common/utils.js +0 -43
- package/dist/common/web.html.js +0 -22
- package/dist/module/Footer.js +0 -4
- package/dist/module/Init.js +0 -63
- package/dist/module/Node.js +0 -20
- package/dist/module/PM/index.js +0 -3
- package/dist/module/PM/main.js +0 -944
- package/dist/module/PM/node.js +0 -121
- package/dist/module/PM/web.js +0 -117
- package/dist/module/ReportClient.js +0 -97
- package/dist/module/ReportServer.js +0 -17
- package/dist/module/SubPackages/react/component/node.js +0 -14
- package/dist/module/SubPackages/react/component/web.js +0 -14
- package/dist/module/SubPackages/react/jsx/index.js +0 -15
- package/dist/module/SubPackages/react/jsx/node.js +0 -5
- package/dist/module/SubPackages/react/jsx/web.js +0 -5
- package/dist/module/SubPackages/react-dom/component/node.js +0 -80
- package/dist/module/SubPackages/react-dom/component/web.js +0 -62
- package/dist/module/SubPackages/react-dom/jsx/index.js +0 -1
- package/dist/module/SubPackages/react-dom/jsx/node.js +0 -31
- package/dist/module/SubPackages/react-dom/jsx/web.js +0 -90
- package/dist/module/SubPackages/react-test-renderer/MemoExoticComponent/node.js +0 -16
- package/dist/module/SubPackages/react-test-renderer/component/index.js +0 -1
- package/dist/module/SubPackages/react-test-renderer/component/interface.js +0 -31
- package/dist/module/SubPackages/react-test-renderer/component/node.js +0 -3
- package/dist/module/SubPackages/react-test-renderer/component/web.js +0 -3
- package/dist/module/SubPackages/react-test-renderer/fc/node.js +0 -22
- package/dist/module/SubPackages/react-test-renderer/fc/web.js +0 -22
- package/dist/module/SubPackages/react-test-renderer/jsx/index.js +0 -28
- package/dist/module/SubPackages/react-test-renderer/jsx/node.js +0 -5
- package/dist/module/SubPackages/react-test-renderer/jsx/web.js +0 -5
- package/dist/module/SubPackages/react-test-renderer/jsx-promised/index.js +0 -16
- package/dist/module/SubPackages/react-test-renderer/jsx-promised/node.js +0 -5
- package/dist/module/SubPackages/react-test-renderer/jsx-promised/web.js +0 -5
- package/dist/module/TestReport.js +0 -91
- package/dist/module/Types.js +0 -1
- package/dist/module/Web.js +0 -42
- package/dist/module/build.js +0 -184
- package/dist/module/defaultConfig.js +0 -18
- package/dist/module/esbuildConfigs/eslint-formatter-testeranto.js +0 -3
- package/dist/module/esbuildConfigs/featuresPlugin.js +0 -34
- package/dist/module/esbuildConfigs/index.js +0 -19
- package/dist/module/esbuildConfigs/inputFilesPlugin.js +0 -22
- package/dist/module/esbuildConfigs/node.js +0 -32
- package/dist/module/esbuildConfigs/web.js +0 -45
- package/dist/module/init-docs.js +0 -15
- package/dist/module/lib/abstractBase.js +0 -321
- package/dist/module/lib/basebuilder.js +0 -94
- package/dist/module/lib/classBuilder.js +0 -36
- package/dist/module/lib/core.js +0 -114
- package/dist/module/lib/index.js +0 -17
- package/dist/module/lib/types.js +0 -1
- package/dist/module/package.json +0 -3
- package/dist/module/puppeteerConfiger.js +0 -19
- package/dist/module/run.js +0 -259
- package/dist/module/tsconfig.module.tsbuildinfo +0 -1
- package/dist/module/utils.js +0 -29
- package/dist/module/web.html.js +0 -20
- package/dist/prebuild/ReportClient.css +0 -11367
- package/dist/prebuild/ReportClient.js +0 -23641
- package/dist/prebuild/ReportServer.mjs +0 -16
- package/dist/prebuild/TestReport.css +0 -11367
- package/dist/prebuild/TestReport.js +0 -27484
- package/dist/prebuild/build.mjs +0 -376
- package/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs +0 -9
- package/dist/prebuild/init-docs.mjs +0 -104
- package/dist/prebuild/run.mjs +0 -1190
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types/Init.d.ts +0 -2
- package/dist/types/Node.d.ts +0 -12
- package/dist/types/PM/index.d.ts +0 -34
- package/dist/types/PM/main.d.ts +0 -59
- package/dist/types/PM/node.d.ts +0 -40
- package/dist/types/PM/web.d.ts +0 -38
- package/dist/types/ReportServer.d.ts +0 -1
- package/dist/types/SubPackages/react/component/node.d.ts +0 -7
- package/dist/types/SubPackages/react/component/web.d.ts +0 -7
- package/dist/types/SubPackages/react/jsx/index.d.ts +0 -12
- package/dist/types/SubPackages/react/jsx/node.d.ts +0 -4
- package/dist/types/SubPackages/react/jsx/web.d.ts +0 -4
- package/dist/types/SubPackages/react-dom/component/node.d.ts +0 -11
- package/dist/types/SubPackages/react-dom/component/web.d.ts +0 -20
- package/dist/types/SubPackages/react-dom/jsx/index.d.ts +0 -6
- package/dist/types/SubPackages/react-dom/jsx/node.d.ts +0 -7
- package/dist/types/SubPackages/react-dom/jsx/web.d.ts +0 -5
- package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +0 -6
- package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +0 -13
- package/dist/types/SubPackages/react-test-renderer/component/interface.d.ts +0 -9
- package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +0 -4
- package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +0 -4
- package/dist/types/SubPackages/react-test-renderer/fc/node.d.ts +0 -8
- package/dist/types/SubPackages/react-test-renderer/fc/web.d.ts +0 -9
- package/dist/types/SubPackages/react-test-renderer/jsx/index.d.ts +0 -16
- package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +0 -9
- package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +0 -9
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/index.d.ts +0 -15
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +0 -5
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +0 -5
- package/dist/types/Types.d.ts +0 -61
- package/dist/types/Web.d.ts +0 -9
- package/dist/types/build.d.ts +0 -1
- package/dist/types/defaultConfig.d.ts +0 -3
- package/dist/types/esbuildConfigs/eslint-formatter-testeranto.d.ts +0 -2
- package/dist/types/esbuildConfigs/featuresPlugin.d.ts +0 -5
- package/dist/types/esbuildConfigs/index.d.ts +0 -4
- package/dist/types/esbuildConfigs/inputFilesPlugin.d.ts +0 -6
- package/dist/types/esbuildConfigs/node.d.ts +0 -4
- package/dist/types/esbuildConfigs/web.d.ts +0 -4
- package/dist/types/init-docs.d.ts +0 -1
- package/dist/types/lib/abstractBase.d.ts +0 -110
- package/dist/types/lib/basebuilder.d.ts +0 -27
- package/dist/types/lib/classBuilder.d.ts +0 -7
- package/dist/types/lib/core.d.ts +0 -7
- package/dist/types/lib/index.d.ts +0 -83
- package/dist/types/lib/types.d.ts +0 -14
- package/dist/types/puppeteerConfiger.d.ts +0 -4
- package/dist/types/run.d.ts +0 -1
- package/dist/types/tsconfig.types.tsbuildinfo +0 -1
- package/dist/types/utils.d.ts +0 -9
- package/dist/types/web.html.d.ts +0 -2
package/dist/common/build.js
DELETED
|
@@ -1,222 +0,0 @@
|
|
|
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 () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
const fs_1 = __importDefault(require("fs"));
|
|
40
|
-
const path_1 = __importDefault(require("path"));
|
|
41
|
-
const readline_1 = __importDefault(require("readline"));
|
|
42
|
-
const glob_1 = require("glob");
|
|
43
|
-
const esbuild_1 = __importDefault(require("esbuild"));
|
|
44
|
-
const node_js_1 = __importDefault(require("./esbuildConfigs/node.js"));
|
|
45
|
-
const web_js_1 = __importDefault(require("./esbuildConfigs/web.js"));
|
|
46
|
-
const web_html_js_1 = __importDefault(require("./web.html.js"));
|
|
47
|
-
readline_1.default.emitKeypressEvents(process.stdin);
|
|
48
|
-
if (process.stdin.isTTY)
|
|
49
|
-
process.stdin.setRawMode(true);
|
|
50
|
-
const getRunnables = (tests, payload = {
|
|
51
|
-
nodeEntryPoints: {},
|
|
52
|
-
webEntryPoints: {},
|
|
53
|
-
}) => {
|
|
54
|
-
return tests.reduce((pt, cv, cndx, cry) => {
|
|
55
|
-
if (cv[1] === "node") {
|
|
56
|
-
pt.nodeEntryPoints[cv[0]] = path_1.default.resolve(`./docs/node/${cv[0].split(".").slice(0, -1).concat("mjs").join(".")}`);
|
|
57
|
-
}
|
|
58
|
-
else if (cv[1] === "web") {
|
|
59
|
-
pt.webEntryPoints[cv[0]] = path_1.default.resolve(`./docs/web/${cv[0].split(".").slice(0, -1).concat("mjs").join(".")}`);
|
|
60
|
-
}
|
|
61
|
-
if (cv[3].length) {
|
|
62
|
-
getRunnables(cv[3], payload);
|
|
63
|
-
}
|
|
64
|
-
return pt;
|
|
65
|
-
}, payload);
|
|
66
|
-
};
|
|
67
|
-
Promise.resolve(`${process.cwd() + "/" + process.argv[2]}`).then(s => __importStar(require(s))).then(async (module) => {
|
|
68
|
-
const rawConfig = module.default;
|
|
69
|
-
const getSecondaryEndpointsPoints = (runtime) => {
|
|
70
|
-
const meta = (ts, st) => {
|
|
71
|
-
ts.forEach((t) => {
|
|
72
|
-
if (t[1] === runtime) {
|
|
73
|
-
st.add(t[0]);
|
|
74
|
-
}
|
|
75
|
-
if (Array.isArray(t[3])) {
|
|
76
|
-
meta(t[3], st);
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
return st;
|
|
80
|
-
};
|
|
81
|
-
return Array.from(meta(config.tests, new Set()));
|
|
82
|
-
};
|
|
83
|
-
const config = Object.assign(Object.assign({}, rawConfig), { buildDir: process.cwd() + "/" + rawConfig.outdir });
|
|
84
|
-
let nodeDone = false;
|
|
85
|
-
let webDone = false;
|
|
86
|
-
let mode = config.devMode ? "DEV" : "PROD";
|
|
87
|
-
let status = "build";
|
|
88
|
-
// let pm: PM_Main | undefined = new PM_Main(config);
|
|
89
|
-
// const fileHashes = {};
|
|
90
|
-
const { nodeEntryPoints, webEntryPoints } = getRunnables(config.tests);
|
|
91
|
-
const onNodeDone = () => {
|
|
92
|
-
nodeDone = true;
|
|
93
|
-
onDone();
|
|
94
|
-
};
|
|
95
|
-
const onWebDone = () => {
|
|
96
|
-
webDone = true;
|
|
97
|
-
onDone();
|
|
98
|
-
};
|
|
99
|
-
const onDone = async () => {
|
|
100
|
-
if (nodeDone && webDone) {
|
|
101
|
-
status = "built";
|
|
102
|
-
}
|
|
103
|
-
if (nodeDone && webDone && status === "built") {
|
|
104
|
-
// Object.entries(nodeEntryPoints).forEach(([k, outputFile]) => {
|
|
105
|
-
// console.log("watching", outputFile);
|
|
106
|
-
// try {
|
|
107
|
-
// watch(outputFile, async (filename) => {
|
|
108
|
-
// const hash = await fileHash(outputFile);
|
|
109
|
-
// if (fileHashes[k] !== hash) {
|
|
110
|
-
// fileHashes[k] = hash;
|
|
111
|
-
// console.log(`< ${filename} `);
|
|
112
|
-
// pm.launchNode(k, outputFile);
|
|
113
|
-
// }
|
|
114
|
-
// });
|
|
115
|
-
// } catch (e) {
|
|
116
|
-
// console.error(e);
|
|
117
|
-
// }
|
|
118
|
-
// });
|
|
119
|
-
// Object.entries(webEntryPoints).forEach(([k, outputFile]) => {
|
|
120
|
-
// console.log("watching", outputFile);
|
|
121
|
-
// watch(outputFile, async (filename) => {
|
|
122
|
-
// const hash = await fileHash(outputFile);
|
|
123
|
-
// console.log(`< ${filename} ${hash}`);
|
|
124
|
-
// if (fileHashes[k] !== hash) {
|
|
125
|
-
// fileHashes[k] = hash;
|
|
126
|
-
// pm.launchWeb(k, outputFile);
|
|
127
|
-
// }
|
|
128
|
-
// });
|
|
129
|
-
// });
|
|
130
|
-
}
|
|
131
|
-
if (nodeDone && webDone && mode === "PROD") {
|
|
132
|
-
console.log("Testeranto-EsBuild is all done. Goodbye!");
|
|
133
|
-
process.exit();
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
if (mode === "PROD") {
|
|
137
|
-
console.log("waiting for tests to finish");
|
|
138
|
-
console.log(JSON.stringify({
|
|
139
|
-
nodeDone: nodeDone,
|
|
140
|
-
webDone: webDone,
|
|
141
|
-
mode: mode,
|
|
142
|
-
}, null, 2));
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
console.log("waiting for tests to change");
|
|
146
|
-
}
|
|
147
|
-
if (config.devMode) {
|
|
148
|
-
console.log("ready and watching for changes...");
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
// pm.shutDown();
|
|
152
|
-
}
|
|
153
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
console.log(`Press 'q' to shutdown gracefully. Press 'x' to shutdown forcefully.`);
|
|
157
|
-
process.stdin.on("keypress", (str, key) => {
|
|
158
|
-
if (key.name === "q") {
|
|
159
|
-
console.log("Testeranto-Build is shutting down...");
|
|
160
|
-
mode = "PROD";
|
|
161
|
-
onDone();
|
|
162
|
-
}
|
|
163
|
-
if (key.name === "x") {
|
|
164
|
-
console.log("Testeranto-Build is shutting down forcefully...");
|
|
165
|
-
process.exit(-1);
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
fs_1.default.writeFileSync(`${config.outdir}/testeranto.json`, JSON.stringify(config, null, 2));
|
|
169
|
-
Promise.resolve(Promise.all([...getSecondaryEndpointsPoints("web")].map(async (sourceFilePath) => {
|
|
170
|
-
const sourceFileSplit = sourceFilePath.split("/");
|
|
171
|
-
const sourceDir = sourceFileSplit.slice(0, -1);
|
|
172
|
-
const sourceFileName = sourceFileSplit[sourceFileSplit.length - 1];
|
|
173
|
-
const sourceFileNameMinusJs = sourceFileName
|
|
174
|
-
.split(".")
|
|
175
|
-
.slice(0, -1)
|
|
176
|
-
.join(".");
|
|
177
|
-
const htmlFilePath = path_1.default.normalize(`${process.cwd()}/${config.outdir}/web/${sourceDir.join("/")}/${sourceFileNameMinusJs}.html`);
|
|
178
|
-
const jsfilePath = `./${sourceFileNameMinusJs}.mjs`;
|
|
179
|
-
return fs_1.default.promises
|
|
180
|
-
.mkdir(path_1.default.dirname(htmlFilePath), { recursive: true })
|
|
181
|
-
.then((x) => fs_1.default.writeFileSync(htmlFilePath, (0, web_html_js_1.default)(jsfilePath, htmlFilePath)));
|
|
182
|
-
})));
|
|
183
|
-
(0, glob_1.glob)(`./${config.outdir}/chunk-*.mjs`, {
|
|
184
|
-
ignore: "node_modules/**",
|
|
185
|
-
}).then((chunks) => {
|
|
186
|
-
chunks.forEach((chunk) => {
|
|
187
|
-
fs_1.default.unlinkSync(chunk);
|
|
188
|
-
});
|
|
189
|
-
});
|
|
190
|
-
await Promise.all([
|
|
191
|
-
esbuild_1.default
|
|
192
|
-
.context((0, node_js_1.default)(config, Object.keys(nodeEntryPoints)))
|
|
193
|
-
.then(async (nodeContext) => {
|
|
194
|
-
if (config.devMode) {
|
|
195
|
-
await nodeContext.watch().then((v) => {
|
|
196
|
-
onNodeDone();
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
nodeContext.rebuild().then((v) => {
|
|
201
|
-
onNodeDone();
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
return nodeContext;
|
|
205
|
-
}),
|
|
206
|
-
esbuild_1.default
|
|
207
|
-
.context((0, web_js_1.default)(config, Object.keys(webEntryPoints)))
|
|
208
|
-
.then(async (webContext) => {
|
|
209
|
-
if (config.devMode) {
|
|
210
|
-
await webContext.watch().then((v) => {
|
|
211
|
-
onWebDone();
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
else {
|
|
215
|
-
webContext.rebuild().then((v) => {
|
|
216
|
-
onWebDone();
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
return webContext;
|
|
220
|
-
}),
|
|
221
|
-
]);
|
|
222
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const config = {
|
|
4
|
-
src: "src",
|
|
5
|
-
outdir: "docs",
|
|
6
|
-
tests: [],
|
|
7
|
-
debugger: true,
|
|
8
|
-
clearScreen: false,
|
|
9
|
-
devMode: true,
|
|
10
|
-
minify: false,
|
|
11
|
-
outbase: ".",
|
|
12
|
-
ports: ["3001"],
|
|
13
|
-
externals: [],
|
|
14
|
-
nodePlugins: [],
|
|
15
|
-
webPlugins: [],
|
|
16
|
-
featureIngestor: function (s) {
|
|
17
|
-
throw new Error("Function not implemented.");
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
exports.default = config;
|
|
@@ -1,39 +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 path_1 = __importDefault(require("path"));
|
|
7
|
-
exports.default = {
|
|
8
|
-
name: "feature-markdown",
|
|
9
|
-
setup(build) {
|
|
10
|
-
build.onResolve({ filter: /\.md$/ }, (args) => {
|
|
11
|
-
if (args.resolveDir === "")
|
|
12
|
-
return;
|
|
13
|
-
return {
|
|
14
|
-
path: path_1.default.isAbsolute(args.path)
|
|
15
|
-
? args.path
|
|
16
|
-
: path_1.default.join(args.resolveDir, args.path),
|
|
17
|
-
namespace: "feature-markdown",
|
|
18
|
-
};
|
|
19
|
-
});
|
|
20
|
-
build.onLoad({ filter: /.*/, namespace: "feature-markdown" }, async (args) => {
|
|
21
|
-
// const markdownContent = new TextDecoder().decode(
|
|
22
|
-
// await fs.readFileSync(args.path)
|
|
23
|
-
// );
|
|
24
|
-
// markdownHTML = marked(markdownContent, options?.markedOptions);
|
|
25
|
-
return {
|
|
26
|
-
contents: `file://${args.path}`,
|
|
27
|
-
loader: "text",
|
|
28
|
-
// contents: JSON.stringify({ path: args.path }),
|
|
29
|
-
// loader: "json",
|
|
30
|
-
// contents: JSON.stringify({
|
|
31
|
-
// // html: markdownHTML,
|
|
32
|
-
// raw: markdownContent,
|
|
33
|
-
// filename: args.path, //path.basename(args.path),
|
|
34
|
-
// }),
|
|
35
|
-
// loader: "json",
|
|
36
|
-
};
|
|
37
|
-
});
|
|
38
|
-
},
|
|
39
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = (config) => {
|
|
4
|
-
return {
|
|
5
|
-
// packages: "external",
|
|
6
|
-
target: "esnext",
|
|
7
|
-
format: "esm",
|
|
8
|
-
splitting: true,
|
|
9
|
-
outExtension: { ".js": ".mjs" },
|
|
10
|
-
outbase: config.outbase,
|
|
11
|
-
jsx: "transform",
|
|
12
|
-
bundle: true,
|
|
13
|
-
minify: config.minify === true,
|
|
14
|
-
write: true,
|
|
15
|
-
loader: {
|
|
16
|
-
".js": "jsx",
|
|
17
|
-
".png": "binary",
|
|
18
|
-
".jpg": "binary",
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
};
|
|
@@ -1,27 +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 otherInputs = {};
|
|
8
|
-
const register = (entrypoint, sources) => {
|
|
9
|
-
if (!otherInputs[entrypoint]) {
|
|
10
|
-
otherInputs[entrypoint] = new Set();
|
|
11
|
-
}
|
|
12
|
-
sources.forEach((s) => otherInputs[entrypoint].add(s));
|
|
13
|
-
};
|
|
14
|
-
exports.default = (platform, entryPoints) => {
|
|
15
|
-
return {
|
|
16
|
-
register,
|
|
17
|
-
inputFilesPluginFactory: {
|
|
18
|
-
name: "metafileWriter",
|
|
19
|
-
setup(build) {
|
|
20
|
-
build.onEnd((result) => {
|
|
21
|
-
// console.log("build.onEnd", entryPoints);
|
|
22
|
-
fs_1.default.writeFileSync(`docs/${platform}/metafile.json`, JSON.stringify(result, null, 2));
|
|
23
|
-
});
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
};
|
|
@@ -1,37 +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 index_js_1 = __importDefault(require("./index.js"));
|
|
7
|
-
const inputFilesPlugin_js_1 = __importDefault(require("./inputFilesPlugin.js"));
|
|
8
|
-
const featuresPlugin_1 = __importDefault(require("./featuresPlugin"));
|
|
9
|
-
exports.default = (config, entryPoints) => {
|
|
10
|
-
const { inputFilesPluginFactory, register } = (0, inputFilesPlugin_js_1.default)("node", entryPoints);
|
|
11
|
-
return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { splitting: true, outdir: config.outdir + "/node",
|
|
12
|
-
// inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
|
|
13
|
-
metafile: true, supported: {
|
|
14
|
-
"dynamic-import": true,
|
|
15
|
-
}, define: {
|
|
16
|
-
"process.env.FLUENTFFMPEG_COV": "0",
|
|
17
|
-
}, absWorkingDir: process.cwd(), banner: {
|
|
18
|
-
js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`,
|
|
19
|
-
}, platform: "node", external: ["react", ...config.externals], entryPoints: [...entryPoints], plugins: [
|
|
20
|
-
featuresPlugin_1.default,
|
|
21
|
-
inputFilesPluginFactory,
|
|
22
|
-
{
|
|
23
|
-
name: "rebuild-notify",
|
|
24
|
-
setup(build) {
|
|
25
|
-
build.onEnd((result) => {
|
|
26
|
-
console.log(`> node build ended with ${result.errors.length} errors`);
|
|
27
|
-
if (result.errors.length > 0) {
|
|
28
|
-
console.log(result);
|
|
29
|
-
}
|
|
30
|
-
// console.log(result);
|
|
31
|
-
// result.errors.length !== 0 && process.exit(-1);
|
|
32
|
-
});
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
...(config.nodePlugins.map((p) => p(register, entryPoints)) || []),
|
|
36
|
-
] });
|
|
37
|
-
};
|
|
@@ -1,50 +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 path_1 = __importDefault(require("path"));
|
|
7
|
-
const index_js_1 = __importDefault(require("./index.js"));
|
|
8
|
-
const inputFilesPlugin_js_1 = __importDefault(require("./inputFilesPlugin.js"));
|
|
9
|
-
const featuresPlugin_js_1 = __importDefault(require("./featuresPlugin.js"));
|
|
10
|
-
exports.default = (config, entryPoints) => {
|
|
11
|
-
const { inputFilesPluginFactory, register } = (0, inputFilesPlugin_js_1.default)("web", entryPoints);
|
|
12
|
-
return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { outdir: config.outdir + "/web", alias: {
|
|
13
|
-
react: path_1.default.resolve("./node_modules/react"),
|
|
14
|
-
}, metafile: true, external: [
|
|
15
|
-
"path",
|
|
16
|
-
"fs",
|
|
17
|
-
"stream",
|
|
18
|
-
"http",
|
|
19
|
-
"constants",
|
|
20
|
-
"net",
|
|
21
|
-
"assert",
|
|
22
|
-
"tls",
|
|
23
|
-
"os",
|
|
24
|
-
"child_process",
|
|
25
|
-
"readline",
|
|
26
|
-
"zlib",
|
|
27
|
-
"crypto",
|
|
28
|
-
"https",
|
|
29
|
-
"util",
|
|
30
|
-
"process",
|
|
31
|
-
"dns",
|
|
32
|
-
], platform: "browser", entryPoints: [...entryPoints], plugins: [
|
|
33
|
-
featuresPlugin_js_1.default,
|
|
34
|
-
inputFilesPluginFactory,
|
|
35
|
-
{
|
|
36
|
-
name: "rebuild-notify",
|
|
37
|
-
setup(build) {
|
|
38
|
-
build.onEnd((result) => {
|
|
39
|
-
console.log(`> web build ended with ${result.errors.length} errors`);
|
|
40
|
-
if (result.errors.length > 0) {
|
|
41
|
-
console.log(result);
|
|
42
|
-
}
|
|
43
|
-
// console.log(result);
|
|
44
|
-
// result.errors.length !== 0 && process.exit(-1);
|
|
45
|
-
});
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
...(config.nodePlugins.map((p) => p(register, entryPoints)) || []),
|
|
49
|
-
] });
|
|
50
|
-
};
|
package/dist/common/init-docs.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
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 () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
const fs_1 = __importDefault(require("fs"));
|
|
40
|
-
const Init_1 = __importDefault(require("./Init"));
|
|
41
|
-
console.log("Initializing a testeranto project");
|
|
42
|
-
if (!process.argv[2]) {
|
|
43
|
-
console.log("You didn't pass a config file, so I will create one for you.");
|
|
44
|
-
fs_1.default.writeFileSync("testeranto.mts", fs_1.default.readFileSync("node_modules/testeranto/src/defaultConfig.ts"));
|
|
45
|
-
Promise.resolve(`${process.cwd() + "/" + "testeranto.mts"}`).then(s => __importStar(require(s))).then((module) => {
|
|
46
|
-
(0, Init_1.default)(module.default);
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
Promise.resolve(`${process.cwd() + "/" + process.argv[2]}`).then(s => __importStar(require(s))).then((module) => {
|
|
51
|
-
(0, Init_1.default)(module.default);
|
|
52
|
-
});
|
|
53
|
-
}
|