@scayle/storefront-nuxt 8.62.6 → 8.62.7
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/CHANGELOG.md +16 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/nitro/plugins/nitroLogger.js +11 -11
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @scayle/storefront-nuxt
|
|
2
2
|
|
|
3
|
+
## 8.62.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixed fatal errors reaching the log as one record per line when `storefront.log.json` is enabled.
|
|
8
|
+
|
|
9
|
+
Nitro reports fatal and unhandled errors with a plain `console.error`, which bypassed the Storefront logger and its JSON reporter. The stack trace, cause and data were printed across dozens of lines, and a log pipeline that treats every line as a record turned one error into about 25 unstructured records. With `storefront.log.json` enabled, the Nitro logger plugin now routes all `console` output through the JSON reporter. A fatal error is written as one JSON line with the severity `error`, and the stack trace and cause are part of its `message`. Plain console output, like `console.log('text')`, is also wrapped in JSON, with the severity matching the console method.
|
|
10
|
+
|
|
11
|
+
The `statusCode` and `data` properties of an error are no longer printed, since the JSON reporter formats only the message, the stack trace and the cause. Without `storefront.log.json`, the console output is unchanged.
|
|
12
|
+
|
|
13
|
+
**Dependencies**
|
|
14
|
+
|
|
15
|
+
**@scayle/storefront-core v8.62.7**
|
|
16
|
+
|
|
17
|
+
- No changes in this release.
|
|
18
|
+
|
|
3
19
|
## 8.62.6
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createConsola } from "consola";
|
|
1
|
+
import { createConsola, LogLevels } from "consola";
|
|
2
2
|
import { defineNitroPlugin } from "nitropack/runtime/plugin";
|
|
3
3
|
import { useRuntimeConfig } from "#imports";
|
|
4
4
|
import createLog from "../../createLog.js";
|
|
@@ -6,16 +6,16 @@ import { JSONReporter } from "../../JSONReporter.js";
|
|
|
6
6
|
export default defineNitroPlugin((nitroApp) => {
|
|
7
7
|
const config = useRuntimeConfig();
|
|
8
8
|
const logConfig = config.public.storefront.log;
|
|
9
|
-
const
|
|
10
|
-
(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
const createLogInstance = (opts) => createConsola({
|
|
10
|
+
...logConfig.json ? { reporters: [new JSONReporter()] } : void 0,
|
|
11
|
+
stderr: logConfig.output === "stdout" ? process.stdout : process.stderr,
|
|
12
|
+
stdout: logConfig.output === "stderr" ? process.stderr : process.stdout,
|
|
13
|
+
...opts
|
|
14
|
+
});
|
|
15
|
+
const log = createLog(createLogInstance, logConfig.name, logConfig.level);
|
|
16
|
+
if (logConfig.json) {
|
|
17
|
+
createLogInstance({ level: LogLevels.verbose }).wrapConsole();
|
|
18
|
+
}
|
|
19
19
|
log.info(`Logger instance created. Level: ${logConfig.level}`);
|
|
20
20
|
nitroApp.hooks.hook("request", (event) => {
|
|
21
21
|
event.context.$log = log;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "8.62.
|
|
4
|
+
"version": "8.62.7",
|
|
5
5
|
"description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
|
|
6
6
|
"author": "SCAYLE Commerce Engine",
|
|
7
7
|
"license": "MIT",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"dependencies": {
|
|
80
80
|
"@opentelemetry/api": "^1.9.1",
|
|
81
81
|
"@scayle/h3-session": "0.7.2",
|
|
82
|
-
"@scayle/storefront-core": "8.62.
|
|
83
|
-
"@scayle/unstorage-compression-driver": "1.
|
|
82
|
+
"@scayle/storefront-core": "8.62.7",
|
|
83
|
+
"@scayle/unstorage-compression-driver": "1.6.0",
|
|
84
84
|
"@vercel/nft": "1.11.0",
|
|
85
85
|
"@vueuse/core": "15.0.0",
|
|
86
86
|
"consola": "^3.4.2",
|
|
@@ -112,8 +112,8 @@
|
|
|
112
112
|
"@scayle/unstorage-scayle-kv-driver": "^3.0.0",
|
|
113
113
|
"@scayle/vitest-config-storefront": "1.0.0",
|
|
114
114
|
"@types/node": "^24",
|
|
115
|
-
"@vitest/coverage-v8": "5.0.
|
|
116
|
-
"eslint": "10.
|
|
115
|
+
"@vitest/coverage-v8": "5.0.3",
|
|
116
|
+
"eslint": "10.12.0",
|
|
117
117
|
"eslint-formatter-gitlab": "7.2.0",
|
|
118
118
|
"fishery": "2.4.0",
|
|
119
119
|
"h3": "1.15.11",
|
|
@@ -122,10 +122,10 @@
|
|
|
122
122
|
"nitropack": "2.13.4",
|
|
123
123
|
"node-mocks-http": "1.18.1",
|
|
124
124
|
"nuxt": "^3.21.10",
|
|
125
|
-
"publint": "0.3.
|
|
125
|
+
"publint": "0.3.25",
|
|
126
126
|
"typescript": "6.0.3",
|
|
127
127
|
"unbuild": "3.6.1",
|
|
128
|
-
"vitest": "5.0.
|
|
128
|
+
"vitest": "5.0.3",
|
|
129
129
|
"vue-tsc": "3.3.11"
|
|
130
130
|
},
|
|
131
131
|
"scripts": {
|