@cooperco/nuxt-layer-base 1.2.2 → 1.3.1
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/README.md +7 -0
- package/nuxt.config.ts +2 -2
- package/package.json +2 -1
- package/server/api/log.post.ts +10 -1
package/README.md
CHANGED
|
@@ -20,6 +20,7 @@ Learn more in the official Nuxt Layers documentation: https://nuxt.com/docs/guid
|
|
|
20
20
|
- ESLint via `@nuxt/eslint` with stylistic Vue template rules
|
|
21
21
|
- Internationalization (i18n) via `@nuxtjs/i18n`
|
|
22
22
|
- Hints and best practices via `@nuxt/hints`
|
|
23
|
+
- Accessibility checks via `@nuxt/a11y`
|
|
23
24
|
- Nuxt DevTools enabled in development
|
|
24
25
|
- Optional error and event logging to Loggly (client and server), disabled by default
|
|
25
26
|
|
|
@@ -116,6 +117,12 @@ yarn add -D @nuxt/hints
|
|
|
116
117
|
|
|
117
118
|
*Note: If you are using a monorepo with workspaces (e.g., pnpm workspaces) where dependencies are hoisted to the root, this manual installation may not be necessary.*
|
|
118
119
|
|
|
120
|
+
### Accessibility (@nuxt/a11y)
|
|
121
|
+
|
|
122
|
+
This layer includes `@nuxt/a11y`, which integrates accessibility checks and hints directly into your development workflow. It helps you identify and fix accessibility issues as you build your application.
|
|
123
|
+
|
|
124
|
+
No additional configuration is required to use the basic features of `@nuxt/a11y` once the layer is extended.
|
|
125
|
+
|
|
119
126
|
### Logging (optional, Loggly‑backed)
|
|
120
127
|
|
|
121
128
|
When enabled via environment variables, the base layer will:
|
package/nuxt.config.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable nuxt/nuxt-config-keys-order */
|
|
2
2
|
export default defineNuxtConfig({
|
|
3
|
-
modules: ['@nuxt/eslint', '@nuxtjs/i18n', '@nuxt/hints'],
|
|
3
|
+
modules: ['@nuxt/eslint', '@nuxtjs/i18n', '@nuxt/hints', '@nuxt/a11y'],
|
|
4
4
|
devtools: { enabled: true },
|
|
5
5
|
compatibilityDate: '2025-07-15',
|
|
6
6
|
|
|
@@ -36,4 +36,4 @@ export default defineNuxtConfig({
|
|
|
36
36
|
defaultLocale: 'en'
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
})
|
|
39
|
+
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cooperco/nuxt-layer-base",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./nuxt.config.ts",
|
|
6
6
|
"author": "cooperco",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"directory": "layers/base"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
+
"@nuxt/a11y": "^1.0.0-alpha.1",
|
|
25
26
|
"@nuxt/hints": "^1.0.0-alpha.5",
|
|
26
27
|
"@nuxtjs/i18n": "^10.2.1",
|
|
27
28
|
"nuxt": "^4.2.2"
|
package/server/api/log.post.ts
CHANGED
|
@@ -10,7 +10,16 @@ type LogglyBody = {
|
|
|
10
10
|
|
|
11
11
|
const sanitizeMeta = (input: unknown) => {
|
|
12
12
|
if (!input || typeof input !== 'object') return undefined
|
|
13
|
-
const blocked = [
|
|
13
|
+
const blocked = [
|
|
14
|
+
'password',
|
|
15
|
+
'token',
|
|
16
|
+
'authorization',
|
|
17
|
+
'auth',
|
|
18
|
+
'ssn',
|
|
19
|
+
'creditcard',
|
|
20
|
+
'credit_card',
|
|
21
|
+
'cardNumber'
|
|
22
|
+
]
|
|
14
23
|
const out: Record<string, unknown> = {}
|
|
15
24
|
for (const [k, v] of Object.entries(input as Record<string, unknown>)) {
|
|
16
25
|
out[k] = blocked.includes(k.toLowerCase()) ? '[REDACTED]' : v
|