@stackbit/dev 0.0.50 → 0.0.54
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.
|
@@ -14,15 +14,14 @@ async function logAnnotationErrors(errors, logger, baseDir, sourcemaps) {
|
|
|
14
14
|
}
|
|
15
15
|
logger.error(`Found ${errors.length} annotation error${errors.length !== 1 ? 's' : ''}`);
|
|
16
16
|
for (const error of errors) {
|
|
17
|
-
const elementXPath = error.elementXPath;
|
|
18
17
|
let message = error.message;
|
|
19
|
-
const sourcemap = sourcemaps === null || sourcemaps === void 0 ? void 0 : sourcemaps[elementXPath];
|
|
18
|
+
const sourcemap = sourcemaps === null || sourcemaps === void 0 ? void 0 : sourcemaps[error.elementXPath];
|
|
20
19
|
if (sourcemap) {
|
|
21
20
|
const relFileName = path_1.default.isAbsolute(sourcemap.file) ? path_1.default.relative(baseDir, sourcemap.file) : sourcemap.file;
|
|
22
21
|
message += ` (${chalk_1.default.yellow(`${relFileName}:${(_a = sourcemap.start) === null || _a === void 0 ? void 0 : _a.line}`)})`;
|
|
23
22
|
}
|
|
24
|
-
else if (elementXPath) {
|
|
25
|
-
message += ` (${elementXPath})`;
|
|
23
|
+
else if (error.elementXPath) {
|
|
24
|
+
message += ` (${error.elementXPath})`;
|
|
26
25
|
}
|
|
27
26
|
logger.error(message);
|
|
28
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotation-errors.js","sourceRoot":"","sources":["../../src/services/annotation-errors.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,oDAAuB;AACvB,gDAAwB;AAEjB,KAAK,UAAU,mBAAmB,CAAC,MAAa,EAAE,MAAW,EAAE,OAAe,EAAE,UAAiC;;IACpH,IAAI,gBAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACnB,OAAO;KACV;IACD,MAAM,CAAC,KAAK,CAAC,SAAS,MAAM,CAAC,MAAM,oBAAoB,MAAM,CAAC,M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,CAAC,OAAO,CAAC,CAAC;KACzB;AACL,CAAC;AAjBD,kDAiBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackbit/dev",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.54",
|
|
4
4
|
"description": "stackbit-dev",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"author": "Stackbit Inc.",
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@stackbit/cms-core": "^0.0.
|
|
26
|
-
"@stackbit/dev-common": "^0.0.
|
|
27
|
-
"@stackbit/sdk": "^0.2.
|
|
25
|
+
"@stackbit/cms-core": "^0.0.19",
|
|
26
|
+
"@stackbit/dev-common": "^0.0.50",
|
|
27
|
+
"@stackbit/sdk": "^0.2.37",
|
|
28
28
|
"axios": "^0.25.0",
|
|
29
29
|
"chalk": "^4.1.0",
|
|
30
30
|
"chokidar": "^3.5.3",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"ts-jest": "^27.1.5",
|
|
59
59
|
"typescript": "^4.5.4"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "2102ed599336f5b42c03e91636176d7e79b3fdde"
|
|
62
62
|
}
|
|
@@ -9,14 +9,13 @@ export async function logAnnotationErrors(errors: any[], logger: any, baseDir: s
|
|
|
9
9
|
logger.error(`Found ${errors.length} annotation error${errors.length !== 1 ? 's' : ''}`);
|
|
10
10
|
|
|
11
11
|
for (const error of errors) {
|
|
12
|
-
const elementXPath = error.elementXPath;
|
|
13
12
|
let message = error.message;
|
|
14
|
-
const sourcemap = sourcemaps?.[elementXPath];
|
|
13
|
+
const sourcemap = sourcemaps?.[error.elementXPath];
|
|
15
14
|
if (sourcemap) {
|
|
16
15
|
const relFileName = path.isAbsolute(sourcemap.file) ? path.relative(baseDir, sourcemap.file) : sourcemap.file;
|
|
17
16
|
message += ` (${chalk.yellow(`${relFileName}:${sourcemap.start?.line}`)})`;
|
|
18
|
-
} else if (elementXPath) {
|
|
19
|
-
message += ` (${elementXPath})`;
|
|
17
|
+
} else if (error.elementXPath) {
|
|
18
|
+
message += ` (${error.elementXPath})`;
|
|
20
19
|
}
|
|
21
20
|
logger.error(message);
|
|
22
21
|
}
|