@dcloudio/uni-cli-shared 3.0.0-alpha-3040520220413001 → 3.0.0-alpha-3040520220413002
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/dist/hbx/log.d.ts +1 -1
- package/dist/hbx/log.js +21 -0
- package/lib/.DS_Store +0 -0
- package/lib/vue-i18n/.DS_Store +0 -0
- package/package.json +11 -11
package/dist/hbx/log.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LogErrorOptions } from 'vite';
|
|
1
|
+
import type { LogErrorOptions } from 'vite';
|
|
2
2
|
import { Formatter } from '../logs/format';
|
|
3
3
|
export declare function formatAtFilename(filename: string, line?: number, column?: number): string;
|
|
4
4
|
export declare const h5ServeFormatter: Formatter;
|
package/dist/hbx/log.js
CHANGED
|
@@ -4,9 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.errorFormatter = exports.removeWarnFormatter = exports.removeInfoFormatter = exports.h5ServeFormatter = exports.formatAtFilename = void 0;
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
7
8
|
const path_1 = __importDefault(require("path"));
|
|
8
9
|
const picocolors_1 = __importDefault(require("picocolors"));
|
|
9
10
|
const utils_1 = require("../utils");
|
|
11
|
+
const constants_1 = require("../constants");
|
|
12
|
+
const ast_1 = require("../vite/utils/ast");
|
|
13
|
+
const utils_2 = require("../vite/plugins/vitejs/utils");
|
|
10
14
|
const SIGNAL_H5_LOCAL = ' > Local:';
|
|
11
15
|
const SIGNAL_H5_NETWORK = ' > Network:';
|
|
12
16
|
const networkLogs = [];
|
|
@@ -75,6 +79,23 @@ function buildErrorMessage(err, args = [], includeStack = true) {
|
|
|
75
79
|
var _a, _b;
|
|
76
80
|
if (err.plugin) {
|
|
77
81
|
args.push(`${picocolors_1.default.magenta('[plugin:' + err.plugin + ']')} ${picocolors_1.default.red(err.message)}`);
|
|
82
|
+
if (err.loc &&
|
|
83
|
+
err.hook === 'transform' &&
|
|
84
|
+
err.plugin === 'rollup-plugin-dynamic-import-variables' &&
|
|
85
|
+
err.id &&
|
|
86
|
+
constants_1.EXTNAME_VUE_RE.test(err.id)) {
|
|
87
|
+
try {
|
|
88
|
+
const ast = (0, ast_1.parseVue)(fs_1.default.readFileSync(err.id, 'utf8'), []);
|
|
89
|
+
const scriptNode = ast.children.find((node) => node.type === 1 /* ELEMENT */ && node.tag === 'script');
|
|
90
|
+
if (scriptNode) {
|
|
91
|
+
const scriptLoc = scriptNode.loc;
|
|
92
|
+
args.push(picocolors_1.default.yellow(pad((0, utils_2.generateCodeFrame)(scriptLoc.source, err.loc))));
|
|
93
|
+
// correct error location
|
|
94
|
+
err.loc.line = scriptLoc.start.line + err.loc.line - 1;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
catch (e) { }
|
|
98
|
+
}
|
|
78
99
|
}
|
|
79
100
|
else {
|
|
80
101
|
args.push(picocolors_1.default.red(err.message));
|
package/lib/.DS_Store
ADDED
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcloudio/uni-cli-shared",
|
|
3
|
-
"version": "3.0.0-alpha-
|
|
3
|
+
"version": "3.0.0-alpha-3040520220413002",
|
|
4
4
|
"description": "@dcloudio/uni-cli-shared",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,20 +18,20 @@
|
|
|
18
18
|
"url": "https://github.com/dcloudio/uni-app/issues"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@babel/core": "^7.17.
|
|
22
|
-
"@babel/parser": "^7.
|
|
23
|
-
"@babel/types": "^7.
|
|
24
|
-
"@dcloudio/uni-i18n": "3.0.0-alpha-
|
|
25
|
-
"@dcloudio/uni-shared": "3.0.0-alpha-
|
|
21
|
+
"@babel/core": "^7.17.9",
|
|
22
|
+
"@babel/parser": "^7.17.9",
|
|
23
|
+
"@babel/types": "^7.17.0",
|
|
24
|
+
"@dcloudio/uni-i18n": "3.0.0-alpha-3040520220413002",
|
|
25
|
+
"@dcloudio/uni-shared": "3.0.0-alpha-3040520220413002",
|
|
26
26
|
"@intlify/core-base": "9.1.9",
|
|
27
27
|
"@intlify/shared": "9.1.9",
|
|
28
28
|
"@intlify/vue-devtools": "9.1.9",
|
|
29
29
|
"@rollup/pluginutils": "^4.2.0",
|
|
30
|
-
"@vue/compiler-core": "3.2.
|
|
31
|
-
"@vue/compiler-dom": "3.2.
|
|
32
|
-
"@vue/compiler-sfc": "3.2.
|
|
33
|
-
"@vue/server-renderer": "3.2.
|
|
34
|
-
"@vue/shared": "3.2.
|
|
30
|
+
"@vue/compiler-core": "3.2.32",
|
|
31
|
+
"@vue/compiler-dom": "3.2.32",
|
|
32
|
+
"@vue/compiler-sfc": "3.2.32",
|
|
33
|
+
"@vue/server-renderer": "3.2.32",
|
|
34
|
+
"@vue/shared": "3.2.32",
|
|
35
35
|
"autoprefixer": "^10.4.4",
|
|
36
36
|
"base64url": "^3.0.1",
|
|
37
37
|
"chokidar": "^3.5.3",
|