monocart-reporter 2.0.1 → 2.0.3
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.
|
@@ -100,11 +100,11 @@ const saveNetworkHtmlReport = async (reportData, _options) => {
|
|
|
100
100
|
|
|
101
101
|
// deps
|
|
102
102
|
const jsFiles = ['monocart-code-viewer', 'monocart-formatter', 'turbogrid'].map((it) => {
|
|
103
|
-
return
|
|
103
|
+
return Util.resolveNodeModule(`${it}/dist/${it}.js`);
|
|
104
104
|
});
|
|
105
105
|
|
|
106
|
-
jsFiles.push(
|
|
107
|
-
jsFiles.push(
|
|
106
|
+
jsFiles.push(Util.resolvePackage('monocart-common.js'));
|
|
107
|
+
jsFiles.push(Util.resolvePackage('monocart-network.js'));
|
|
108
108
|
|
|
109
109
|
const options = {
|
|
110
110
|
inline,
|
package/lib/utils/util.js
CHANGED
|
@@ -151,6 +151,35 @@ const Util = {
|
|
|
151
151
|
Util.initDir(assetsDir);
|
|
152
152
|
},
|
|
153
153
|
|
|
154
|
+
resolveNodeModule: (p) => {
|
|
155
|
+
|
|
156
|
+
// root
|
|
157
|
+
const cwd = path.resolve('node_modules', p);
|
|
158
|
+
if (fs.existsSync(cwd)) {
|
|
159
|
+
return cwd;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// sub node modules
|
|
163
|
+
const sub = path.resolve(__dirname, '../../node_modules', p);
|
|
164
|
+
if (fs.existsSync(sub)) {
|
|
165
|
+
return sub;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// same level dep
|
|
169
|
+
const dep = path.resolve(__dirname, '../../../', p);
|
|
170
|
+
if (fs.existsSync(dep)) {
|
|
171
|
+
return dep;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
Util.logError(`Not found module: ${p}`);
|
|
175
|
+
|
|
176
|
+
return cwd;
|
|
177
|
+
},
|
|
178
|
+
|
|
179
|
+
resolvePackage: (p) => {
|
|
180
|
+
return path.resolve(__dirname, '../packages', p);
|
|
181
|
+
},
|
|
182
|
+
|
|
154
183
|
saveHtmlReport: async (options) => {
|
|
155
184
|
|
|
156
185
|
const {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monocart-reporter",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "A playwright test reporter. Shows suites/cases/steps with tree style, markdown annotations, custom columns/formatters/data collection visitors, console logs, style tags, send email.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -42,16 +42,16 @@
|
|
|
42
42
|
"url": "git+https://github.com/cenfun/monocart-reporter.git"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"console-grid": "
|
|
46
|
-
"eight-colors": "
|
|
47
|
-
"istanbul-reports": "
|
|
48
|
-
"koa": "
|
|
49
|
-
"koa-static-resolver": "
|
|
50
|
-
"lz-utils": "
|
|
51
|
-
"monocart-coverage-reports": "
|
|
52
|
-
"nodemailer": "
|
|
53
|
-
"open": "
|
|
54
|
-
"turbogrid": "
|
|
45
|
+
"console-grid": "~2.0.1",
|
|
46
|
+
"eight-colors": "~1.0.3",
|
|
47
|
+
"istanbul-reports": "~3.1.6",
|
|
48
|
+
"koa": "~2.14.2",
|
|
49
|
+
"koa-static-resolver": "~1.0.4",
|
|
50
|
+
"lz-utils": "~2.0.1",
|
|
51
|
+
"monocart-coverage-reports": "~1.1.0",
|
|
52
|
+
"nodemailer": "~6.9.7",
|
|
53
|
+
"open": "~9.1.0",
|
|
54
|
+
"turbogrid": "~3.0.10"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@playwright/test": "^1.40.1",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"eslint-config-plus": "^1.0.6",
|
|
62
62
|
"eslint-plugin-html": "^7.1.0",
|
|
63
63
|
"eslint-plugin-vue": "^9.19.2",
|
|
64
|
-
"stylelint": "^
|
|
64
|
+
"stylelint": "^16.0.2",
|
|
65
65
|
"stylelint-config-plus": "^1.0.4",
|
|
66
66
|
"vine-ui": "^3.1.12"
|
|
67
67
|
}
|