@cooperco/nuxt-layer-base 1.0.0 → 1.0.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/.env +10 -0
- package/.nuxt/app.config.mjs +21 -0
- package/.nuxt/components.d.ts +126 -0
- package/.nuxt/dev/index.mjs +3013 -0
- package/.nuxt/dev/index.mjs.map +1 -0
- package/.nuxt/dist/server/client.manifest.mjs +1 -0
- package/.nuxt/dist/server/server.mjs +1 -0
- package/.nuxt/eslint-typegen.d.ts +9474 -0
- package/.nuxt/eslint.config.d.mts +9 -0
- package/.nuxt/eslint.config.mjs +53 -0
- package/.nuxt/i18n-route-resources.mjs +3 -0
- package/.nuxt/imports.d.ts +34 -0
- package/.nuxt/manifest/latest.json +1 -0
- package/.nuxt/manifest/meta/11e69554-8b10-4927-b475-a1b7f6b2bbac.json +1 -0
- package/.nuxt/manifest/meta/dev.json +1 -0
- package/.nuxt/nitro.json +17 -0
- package/.nuxt/nuxt.d.ts +20 -0
- package/.nuxt/nuxt.json +9 -0
- package/.nuxt/nuxt.node.d.ts +13 -0
- package/.nuxt/nuxt.shared.d.ts +5 -0
- package/.nuxt/schema/nuxt.schema.d.ts +17 -0
- package/.nuxt/schema/nuxt.schema.json +3 -0
- package/.nuxt/tsconfig.app.json +226 -0
- package/.nuxt/tsconfig.app.tsbuildinfo +1 -0
- package/.nuxt/tsconfig.json +228 -0
- package/.nuxt/tsconfig.node.json +131 -0
- package/.nuxt/tsconfig.node.tsbuildinfo +1 -0
- package/.nuxt/tsconfig.server.json +162 -0
- package/.nuxt/tsconfig.server.tsbuildinfo +1 -0
- package/.nuxt/tsconfig.shared.json +182 -0
- package/.nuxt/tsconfig.shared.tsbuildinfo +1 -0
- package/.nuxt/types/app.config.d.ts +35 -0
- package/.nuxt/types/build.d.ts +25 -0
- package/.nuxt/types/builder-env.d.ts +1 -0
- package/.nuxt/types/i18n-plugin.d.ts +123 -0
- package/.nuxt/types/imports.d.ts +387 -0
- package/.nuxt/types/middleware.d.ts +11 -0
- package/.nuxt/types/modules.d.ts +87 -0
- package/.nuxt/types/nitro-config.d.ts +14 -0
- package/.nuxt/types/nitro-imports.d.ts +162 -0
- package/.nuxt/types/nitro-nuxt.d.ts +59 -0
- package/.nuxt/types/nitro-routes.d.ts +20 -0
- package/.nuxt/types/nitro.d.ts +3 -0
- package/.nuxt/types/plugins.d.ts +41 -0
- package/.nuxt/types/runtime-config.d.ts +102 -0
- package/.nuxt/types/vue-shim.d.ts +0 -0
- package/README.md +217 -0
- package/Users//devin//AppData//Local//JetBrains//WebStorm2025.2//terminal//history//nuxt-layers-history +736 -0
- package/Users//devin//AppData//Local//JetBrains//WebStorm2025.2//terminal//history//nuxt-layers-history1 +0 -0
- package/app/composables/useLoggly.ts +28 -0
- package/app/plugins/loggly.client.ts +70 -0
- package/nuxt.config.ts +24 -2
- package/package.json +7 -4
- package/server/api/loggly.post.ts +58 -0
- package/server/plugins/loggly.ts +46 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
const __buildAssetsURL: typeof import('../../node_modules/nuxt/dist/core/runtime/nitro/utils/paths')['buildAssetsURL']
|
|
3
|
+
const __publicAssetsURL: typeof import('../../node_modules/nuxt/dist/core/runtime/nitro/utils/paths')['publicAssetsURL']
|
|
4
|
+
const appendCorsHeaders: typeof import('../../node_modules/h3')['appendCorsHeaders']
|
|
5
|
+
const appendCorsPreflightHeaders: typeof import('../../node_modules/h3')['appendCorsPreflightHeaders']
|
|
6
|
+
const appendHeader: typeof import('../../node_modules/h3')['appendHeader']
|
|
7
|
+
const appendHeaders: typeof import('../../node_modules/h3')['appendHeaders']
|
|
8
|
+
const appendResponseHeader: typeof import('../../node_modules/h3')['appendResponseHeader']
|
|
9
|
+
const appendResponseHeaders: typeof import('../../node_modules/h3')['appendResponseHeaders']
|
|
10
|
+
const assertMethod: typeof import('../../node_modules/h3')['assertMethod']
|
|
11
|
+
const cachedEventHandler: typeof import('../../node_modules/nitropack/dist/runtime/internal/cache')['cachedEventHandler']
|
|
12
|
+
const cachedFunction: typeof import('../../node_modules/nitropack/dist/runtime/internal/cache')['cachedFunction']
|
|
13
|
+
const callNodeListener: typeof import('../../node_modules/h3')['callNodeListener']
|
|
14
|
+
const clearResponseHeaders: typeof import('../../node_modules/h3')['clearResponseHeaders']
|
|
15
|
+
const clearSession: typeof import('../../node_modules/h3')['clearSession']
|
|
16
|
+
const createApp: typeof import('../../node_modules/h3')['createApp']
|
|
17
|
+
const createAppEventHandler: typeof import('../../node_modules/h3')['createAppEventHandler']
|
|
18
|
+
const createError: typeof import('../../node_modules/h3')['createError']
|
|
19
|
+
const createEvent: typeof import('../../node_modules/h3')['createEvent']
|
|
20
|
+
const createEventStream: typeof import('../../node_modules/h3')['createEventStream']
|
|
21
|
+
const createRouter: typeof import('../../node_modules/h3')['createRouter']
|
|
22
|
+
const defaultContentType: typeof import('../../node_modules/h3')['defaultContentType']
|
|
23
|
+
const defineAppConfig: typeof import('../../node_modules/nuxt/dist/core/runtime/nitro/utils/config')['defineAppConfig']
|
|
24
|
+
const defineCachedEventHandler: typeof import('../../node_modules/nitropack/dist/runtime/internal/cache')['defineCachedEventHandler']
|
|
25
|
+
const defineCachedFunction: typeof import('../../node_modules/nitropack/dist/runtime/internal/cache')['defineCachedFunction']
|
|
26
|
+
const defineEventHandler: typeof import('../../node_modules/h3')['defineEventHandler']
|
|
27
|
+
const defineI18nConfig: typeof import('../../node_modules/@nuxtjs/i18n/dist/runtime/composables/shared')['defineI18nConfig']
|
|
28
|
+
const defineI18nLocale: typeof import('../../node_modules/@nuxtjs/i18n/dist/runtime/composables/shared')['defineI18nLocale']
|
|
29
|
+
const defineI18nLocaleDetector: typeof import('../../node_modules/@nuxtjs/i18n/dist/runtime/composables/server')['defineI18nLocaleDetector']
|
|
30
|
+
const defineLazyEventHandler: typeof import('../../node_modules/h3')['defineLazyEventHandler']
|
|
31
|
+
const defineNitroErrorHandler: typeof import('../../node_modules/nitropack/dist/runtime/internal/error/utils')['defineNitroErrorHandler']
|
|
32
|
+
const defineNitroPlugin: typeof import('../../node_modules/nitropack/dist/runtime/internal/plugin')['defineNitroPlugin']
|
|
33
|
+
const defineNodeListener: typeof import('../../node_modules/h3')['defineNodeListener']
|
|
34
|
+
const defineNodeMiddleware: typeof import('../../node_modules/h3')['defineNodeMiddleware']
|
|
35
|
+
const defineRenderHandler: typeof import('../../node_modules/nitropack/dist/runtime/internal/renderer')['defineRenderHandler']
|
|
36
|
+
const defineRequestMiddleware: typeof import('../../node_modules/h3')['defineRequestMiddleware']
|
|
37
|
+
const defineResponseMiddleware: typeof import('../../node_modules/h3')['defineResponseMiddleware']
|
|
38
|
+
const defineRouteMeta: typeof import('../../node_modules/nitropack/dist/runtime/internal/meta')['defineRouteMeta']
|
|
39
|
+
const defineTask: typeof import('../../node_modules/nitropack/dist/runtime/internal/task')['defineTask']
|
|
40
|
+
const defineWebSocket: typeof import('../../node_modules/h3')['defineWebSocket']
|
|
41
|
+
const defineWebSocketHandler: typeof import('../../node_modules/h3')['defineWebSocketHandler']
|
|
42
|
+
const deleteCookie: typeof import('../../node_modules/h3')['deleteCookie']
|
|
43
|
+
const dynamicEventHandler: typeof import('../../node_modules/h3')['dynamicEventHandler']
|
|
44
|
+
const eventHandler: typeof import('../../node_modules/h3')['eventHandler']
|
|
45
|
+
const fetchWithEvent: typeof import('../../node_modules/h3')['fetchWithEvent']
|
|
46
|
+
const fromNodeMiddleware: typeof import('../../node_modules/h3')['fromNodeMiddleware']
|
|
47
|
+
const fromPlainHandler: typeof import('../../node_modules/h3')['fromPlainHandler']
|
|
48
|
+
const fromWebHandler: typeof import('../../node_modules/h3')['fromWebHandler']
|
|
49
|
+
const getCookie: typeof import('../../node_modules/h3')['getCookie']
|
|
50
|
+
const getCookieLocale: typeof import('../../node_modules/@intlify/utils/dist/h3')['getCookieLocale']
|
|
51
|
+
const getHeader: typeof import('../../node_modules/h3')['getHeader']
|
|
52
|
+
const getHeaderLanguage: typeof import('../../node_modules/@intlify/utils/dist/h3')['getHeaderLanguage']
|
|
53
|
+
const getHeaderLanguages: typeof import('../../node_modules/@intlify/utils/dist/h3')['getHeaderLanguages']
|
|
54
|
+
const getHeaderLocale: typeof import('../../node_modules/@intlify/utils/dist/h3')['getHeaderLocale']
|
|
55
|
+
const getHeaderLocales: typeof import('../../node_modules/@intlify/utils/dist/h3')['getHeaderLocales']
|
|
56
|
+
const getHeaders: typeof import('../../node_modules/h3')['getHeaders']
|
|
57
|
+
const getMethod: typeof import('../../node_modules/h3')['getMethod']
|
|
58
|
+
const getPathLocale: typeof import('../../node_modules/@intlify/utils/dist/h3')['getPathLocale']
|
|
59
|
+
const getProxyRequestHeaders: typeof import('../../node_modules/h3')['getProxyRequestHeaders']
|
|
60
|
+
const getQuery: typeof import('../../node_modules/h3')['getQuery']
|
|
61
|
+
const getQueryLocale: typeof import('../../node_modules/@intlify/utils/dist/h3')['getQueryLocale']
|
|
62
|
+
const getRequestFingerprint: typeof import('../../node_modules/h3')['getRequestFingerprint']
|
|
63
|
+
const getRequestHeader: typeof import('../../node_modules/h3')['getRequestHeader']
|
|
64
|
+
const getRequestHeaders: typeof import('../../node_modules/h3')['getRequestHeaders']
|
|
65
|
+
const getRequestHost: typeof import('../../node_modules/h3')['getRequestHost']
|
|
66
|
+
const getRequestIP: typeof import('../../node_modules/h3')['getRequestIP']
|
|
67
|
+
const getRequestPath: typeof import('../../node_modules/h3')['getRequestPath']
|
|
68
|
+
const getRequestProtocol: typeof import('../../node_modules/h3')['getRequestProtocol']
|
|
69
|
+
const getRequestURL: typeof import('../../node_modules/h3')['getRequestURL']
|
|
70
|
+
const getRequestWebStream: typeof import('../../node_modules/h3')['getRequestWebStream']
|
|
71
|
+
const getResponseHeader: typeof import('../../node_modules/h3')['getResponseHeader']
|
|
72
|
+
const getResponseHeaders: typeof import('../../node_modules/h3')['getResponseHeaders']
|
|
73
|
+
const getResponseStatus: typeof import('../../node_modules/h3')['getResponseStatus']
|
|
74
|
+
const getResponseStatusText: typeof import('../../node_modules/h3')['getResponseStatusText']
|
|
75
|
+
const getRouteRules: typeof import('../../node_modules/nitropack/dist/runtime/internal/route-rules')['getRouteRules']
|
|
76
|
+
const getRouterParam: typeof import('../../node_modules/h3')['getRouterParam']
|
|
77
|
+
const getRouterParams: typeof import('../../node_modules/h3')['getRouterParams']
|
|
78
|
+
const getSession: typeof import('../../node_modules/h3')['getSession']
|
|
79
|
+
const getValidatedQuery: typeof import('../../node_modules/h3')['getValidatedQuery']
|
|
80
|
+
const getValidatedRouterParams: typeof import('../../node_modules/h3')['getValidatedRouterParams']
|
|
81
|
+
const handleCacheHeaders: typeof import('../../node_modules/h3')['handleCacheHeaders']
|
|
82
|
+
const handleCors: typeof import('../../node_modules/h3')['handleCors']
|
|
83
|
+
const isCorsOriginAllowed: typeof import('../../node_modules/h3')['isCorsOriginAllowed']
|
|
84
|
+
const isError: typeof import('../../node_modules/h3')['isError']
|
|
85
|
+
const isEvent: typeof import('../../node_modules/h3')['isEvent']
|
|
86
|
+
const isEventHandler: typeof import('../../node_modules/h3')['isEventHandler']
|
|
87
|
+
const isMethod: typeof import('../../node_modules/h3')['isMethod']
|
|
88
|
+
const isPreflightRequest: typeof import('../../node_modules/h3')['isPreflightRequest']
|
|
89
|
+
const isStream: typeof import('../../node_modules/h3')['isStream']
|
|
90
|
+
const isWebResponse: typeof import('../../node_modules/h3')['isWebResponse']
|
|
91
|
+
const lazyEventHandler: typeof import('../../node_modules/h3')['lazyEventHandler']
|
|
92
|
+
const nitroPlugin: typeof import('../../node_modules/nitropack/dist/runtime/internal/plugin')['nitroPlugin']
|
|
93
|
+
const parseCookies: typeof import('../../node_modules/h3')['parseCookies']
|
|
94
|
+
const promisifyNodeListener: typeof import('../../node_modules/h3')['promisifyNodeListener']
|
|
95
|
+
const proxyRequest: typeof import('../../node_modules/h3')['proxyRequest']
|
|
96
|
+
const readBody: typeof import('../../node_modules/h3')['readBody']
|
|
97
|
+
const readFormData: typeof import('../../node_modules/h3')['readFormData']
|
|
98
|
+
const readMultipartFormData: typeof import('../../node_modules/h3')['readMultipartFormData']
|
|
99
|
+
const readRawBody: typeof import('../../node_modules/h3')['readRawBody']
|
|
100
|
+
const readValidatedBody: typeof import('../../node_modules/h3')['readValidatedBody']
|
|
101
|
+
const removeResponseHeader: typeof import('../../node_modules/h3')['removeResponseHeader']
|
|
102
|
+
const runTask: typeof import('../../node_modules/nitropack/dist/runtime/internal/task')['runTask']
|
|
103
|
+
const sanitizeStatusCode: typeof import('../../node_modules/h3')['sanitizeStatusCode']
|
|
104
|
+
const sanitizeStatusMessage: typeof import('../../node_modules/h3')['sanitizeStatusMessage']
|
|
105
|
+
const sealSession: typeof import('../../node_modules/h3')['sealSession']
|
|
106
|
+
const send: typeof import('../../node_modules/h3')['send']
|
|
107
|
+
const sendError: typeof import('../../node_modules/h3')['sendError']
|
|
108
|
+
const sendIterable: typeof import('../../node_modules/h3')['sendIterable']
|
|
109
|
+
const sendNoContent: typeof import('../../node_modules/h3')['sendNoContent']
|
|
110
|
+
const sendProxy: typeof import('../../node_modules/h3')['sendProxy']
|
|
111
|
+
const sendRedirect: typeof import('../../node_modules/h3')['sendRedirect']
|
|
112
|
+
const sendStream: typeof import('../../node_modules/h3')['sendStream']
|
|
113
|
+
const sendWebResponse: typeof import('../../node_modules/h3')['sendWebResponse']
|
|
114
|
+
const serveStatic: typeof import('../../node_modules/h3')['serveStatic']
|
|
115
|
+
const setCookie: typeof import('../../node_modules/h3')['setCookie']
|
|
116
|
+
const setCookieLocale: typeof import('../../node_modules/@intlify/utils/dist/h3')['setCookieLocale']
|
|
117
|
+
const setHeader: typeof import('../../node_modules/h3')['setHeader']
|
|
118
|
+
const setHeaders: typeof import('../../node_modules/h3')['setHeaders']
|
|
119
|
+
const setResponseHeader: typeof import('../../node_modules/h3')['setResponseHeader']
|
|
120
|
+
const setResponseHeaders: typeof import('../../node_modules/h3')['setResponseHeaders']
|
|
121
|
+
const setResponseStatus: typeof import('../../node_modules/h3')['setResponseStatus']
|
|
122
|
+
const splitCookiesString: typeof import('../../node_modules/h3')['splitCookiesString']
|
|
123
|
+
const toEventHandler: typeof import('../../node_modules/h3')['toEventHandler']
|
|
124
|
+
const toNodeListener: typeof import('../../node_modules/h3')['toNodeListener']
|
|
125
|
+
const toPlainHandler: typeof import('../../node_modules/h3')['toPlainHandler']
|
|
126
|
+
const toWebHandler: typeof import('../../node_modules/h3')['toWebHandler']
|
|
127
|
+
const toWebRequest: typeof import('../../node_modules/h3')['toWebRequest']
|
|
128
|
+
const tryCookieLocale: typeof import('../../node_modules/@intlify/utils/dist/h3')['tryCookieLocale']
|
|
129
|
+
const tryHeaderLocale: typeof import('../../node_modules/@intlify/utils/dist/h3')['tryHeaderLocale']
|
|
130
|
+
const tryHeaderLocales: typeof import('../../node_modules/@intlify/utils/dist/h3')['tryHeaderLocales']
|
|
131
|
+
const tryPathLocale: typeof import('../../node_modules/@intlify/utils/dist/h3')['tryPathLocale']
|
|
132
|
+
const tryQueryLocale: typeof import('../../node_modules/@intlify/utils/dist/h3')['tryQueryLocale']
|
|
133
|
+
const unsealSession: typeof import('../../node_modules/h3')['unsealSession']
|
|
134
|
+
const updateSession: typeof import('../../node_modules/h3')['updateSession']
|
|
135
|
+
const useAppConfig: typeof import('../../node_modules/nitropack/dist/runtime/internal/config')['useAppConfig']
|
|
136
|
+
const useBase: typeof import('../../node_modules/h3')['useBase']
|
|
137
|
+
const useEvent: typeof import('../../node_modules/nitropack/dist/runtime/internal/context')['useEvent']
|
|
138
|
+
const useNitroApp: typeof import('../../node_modules/nitropack/dist/runtime/internal/app')['useNitroApp']
|
|
139
|
+
const useRuntimeConfig: typeof import('../../node_modules/nitropack/dist/runtime/internal/config')['useRuntimeConfig']
|
|
140
|
+
const useSession: typeof import('../../node_modules/h3')['useSession']
|
|
141
|
+
const useStorage: typeof import('../../node_modules/nitropack/dist/runtime/internal/storage')['useStorage']
|
|
142
|
+
const useTranslation: typeof import('../../node_modules/@intlify/h3')['useTranslation']
|
|
143
|
+
const writeEarlyHints: typeof import('../../node_modules/h3')['writeEarlyHints']
|
|
144
|
+
}
|
|
145
|
+
export { useTranslation } from '@intlify/h3';
|
|
146
|
+
export { useNitroApp } from 'nitropack/runtime/internal/app';
|
|
147
|
+
export { useRuntimeConfig, useAppConfig } from 'nitropack/runtime/internal/config';
|
|
148
|
+
export { defineNitroPlugin, nitroPlugin } from 'nitropack/runtime/internal/plugin';
|
|
149
|
+
export { defineCachedFunction, defineCachedEventHandler, cachedFunction, cachedEventHandler } from 'nitropack/runtime/internal/cache';
|
|
150
|
+
export { useStorage } from 'nitropack/runtime/internal/storage';
|
|
151
|
+
export { defineRenderHandler } from 'nitropack/runtime/internal/renderer';
|
|
152
|
+
export { defineRouteMeta } from 'nitropack/runtime/internal/meta';
|
|
153
|
+
export { getRouteRules } from 'nitropack/runtime/internal/route-rules';
|
|
154
|
+
export { useEvent } from 'nitropack/runtime/internal/context';
|
|
155
|
+
export { defineTask, runTask } from 'nitropack/runtime/internal/task';
|
|
156
|
+
export { defineNitroErrorHandler } from 'nitropack/runtime/internal/error/utils';
|
|
157
|
+
export { appendCorsHeaders, appendCorsPreflightHeaders, appendHeader, appendHeaders, appendResponseHeader, appendResponseHeaders, assertMethod, callNodeListener, clearResponseHeaders, clearSession, createApp, createAppEventHandler, createError, createEvent, createEventStream, createRouter, defaultContentType, defineEventHandler, defineLazyEventHandler, defineNodeListener, defineNodeMiddleware, defineRequestMiddleware, defineResponseMiddleware, defineWebSocket, defineWebSocketHandler, deleteCookie, dynamicEventHandler, eventHandler, fetchWithEvent, fromNodeMiddleware, fromPlainHandler, fromWebHandler, getCookie, getHeader, getHeaders, getMethod, getProxyRequestHeaders, getQuery, getRequestFingerprint, getRequestHeader, getRequestHeaders, getRequestHost, getRequestIP, getRequestPath, getRequestProtocol, getRequestURL, getRequestWebStream, getResponseHeader, getResponseHeaders, getResponseStatus, getResponseStatusText, getRouterParam, getRouterParams, getSession, getValidatedQuery, getValidatedRouterParams, handleCacheHeaders, handleCors, isCorsOriginAllowed, isError, isEvent, isEventHandler, isMethod, isPreflightRequest, isStream, isWebResponse, lazyEventHandler, parseCookies, promisifyNodeListener, proxyRequest, readBody, readFormData, readMultipartFormData, readRawBody, readValidatedBody, removeResponseHeader, sanitizeStatusCode, sanitizeStatusMessage, sealSession, send, sendError, sendIterable, sendNoContent, sendProxy, sendRedirect, sendStream, sendWebResponse, serveStatic, setCookie, setHeader, setHeaders, setResponseHeader, setResponseHeaders, setResponseStatus, splitCookiesString, toEventHandler, toNodeListener, toPlainHandler, toWebHandler, toWebRequest, unsealSession, updateSession, useBase, useSession, writeEarlyHints } from 'h3';
|
|
158
|
+
export { buildAssetsURL as __buildAssetsURL, publicAssetsURL as __publicAssetsURL } from '/home/devin/projects/Cryobank/nuxt-layers/layers/base/node_modules/nuxt/dist/core/runtime/nitro/utils/paths';
|
|
159
|
+
export { defineAppConfig } from '/home/devin/projects/Cryobank/nuxt-layers/layers/base/node_modules/nuxt/dist/core/runtime/nitro/utils/config';
|
|
160
|
+
export { defineI18nLocale, defineI18nConfig } from '/home/devin/projects/Cryobank/nuxt-layers/layers/base/node_modules/@nuxtjs/i18n/dist/runtime/composables/shared';
|
|
161
|
+
export { defineI18nLocaleDetector } from '/home/devin/projects/Cryobank/nuxt-layers/layers/base/node_modules/@nuxtjs/i18n/dist/runtime/composables/server';
|
|
162
|
+
export { getCookieLocale, getHeaderLanguage, getHeaderLanguages, getHeaderLocale, getHeaderLocales, getPathLocale, getQueryLocale, setCookieLocale, tryCookieLocale, tryHeaderLocale, tryHeaderLocales, tryPathLocale, tryQueryLocale } from '/home/devin/projects/Cryobank/nuxt-layers/layers/base/node_modules/@intlify/utils/dist/h3';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
|
|
2
|
+
/// <reference path="middleware.d.ts" />
|
|
3
|
+
/// <reference path="./runtime-config.d.ts" />
|
|
4
|
+
|
|
5
|
+
import type { RuntimeConfig } from 'nuxt/schema'
|
|
6
|
+
import type { H3Event } from 'h3'
|
|
7
|
+
import type { LogObject } from 'consola'
|
|
8
|
+
import type { NuxtIslandContext, NuxtIslandResponse, NuxtRenderHTMLContext } from 'nuxt/app'
|
|
9
|
+
|
|
10
|
+
declare module 'nitropack' {
|
|
11
|
+
interface NitroRuntimeConfigApp {
|
|
12
|
+
buildAssetsDir: string
|
|
13
|
+
cdnURL: string
|
|
14
|
+
}
|
|
15
|
+
interface NitroRuntimeConfig extends RuntimeConfig {}
|
|
16
|
+
interface NitroRouteConfig {
|
|
17
|
+
ssr?: boolean
|
|
18
|
+
noScripts?: boolean
|
|
19
|
+
/** @deprecated Use `noScripts` instead */
|
|
20
|
+
experimentalNoScripts?: boolean
|
|
21
|
+
}
|
|
22
|
+
interface NitroRouteRules {
|
|
23
|
+
ssr?: boolean
|
|
24
|
+
noScripts?: boolean
|
|
25
|
+
/** @deprecated Use `noScripts` instead */
|
|
26
|
+
experimentalNoScripts?: boolean
|
|
27
|
+
appMiddleware?: Record<string, boolean>
|
|
28
|
+
}
|
|
29
|
+
interface NitroRuntimeHooks {
|
|
30
|
+
'dev:ssr-logs': (ctx: { logs: LogObject[], path: string }) => void | Promise<void>
|
|
31
|
+
'render:html': (htmlContext: NuxtRenderHTMLContext, context: { event: H3Event }) => void | Promise<void>
|
|
32
|
+
'render:island': (islandResponse: NuxtIslandResponse, context: { event: H3Event, islandContext: NuxtIslandContext }) => void | Promise<void>
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
declare module 'nitropack/types' {
|
|
36
|
+
interface NitroRuntimeConfigApp {
|
|
37
|
+
buildAssetsDir: string
|
|
38
|
+
cdnURL: string
|
|
39
|
+
}
|
|
40
|
+
interface NitroRuntimeConfig extends RuntimeConfig {}
|
|
41
|
+
interface NitroRouteConfig {
|
|
42
|
+
ssr?: boolean
|
|
43
|
+
noScripts?: boolean
|
|
44
|
+
/** @deprecated Use `noScripts` instead */
|
|
45
|
+
experimentalNoScripts?: boolean
|
|
46
|
+
}
|
|
47
|
+
interface NitroRouteRules {
|
|
48
|
+
ssr?: boolean
|
|
49
|
+
noScripts?: boolean
|
|
50
|
+
/** @deprecated Use `noScripts` instead */
|
|
51
|
+
experimentalNoScripts?: boolean
|
|
52
|
+
appMiddleware?: Record<string, boolean>
|
|
53
|
+
}
|
|
54
|
+
interface NitroRuntimeHooks {
|
|
55
|
+
'dev:ssr-logs': (ctx: { logs: LogObject[], path: string }) => void | Promise<void>
|
|
56
|
+
'render:html': (htmlContext: NuxtRenderHTMLContext, context: { event: H3Event }) => void | Promise<void>
|
|
57
|
+
'render:island': (islandResponse: NuxtIslandResponse, context: { event: H3Event, islandContext: NuxtIslandContext }) => void | Promise<void>
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Generated by nitro
|
|
2
|
+
import type { Serialize, Simplify } from "nitropack/types";
|
|
3
|
+
declare module "nitropack/types" {
|
|
4
|
+
type Awaited<T> = T extends PromiseLike<infer U> ? Awaited<U> : T
|
|
5
|
+
interface InternalApi {
|
|
6
|
+
'/api/loggly': {
|
|
7
|
+
'post': Simplify<Serialize<Awaited<ReturnType<typeof import('../../server/api/loggly.post').default>>>>
|
|
8
|
+
}
|
|
9
|
+
'/__nuxt_error': {
|
|
10
|
+
'default': Simplify<Serialize<Awaited<ReturnType<typeof import('../../node_modules/nuxt/dist/core/runtime/nitro/handlers/renderer').default>>>>
|
|
11
|
+
}
|
|
12
|
+
'/_i18n/:locale/messages.json': {
|
|
13
|
+
'default': Simplify<Serialize<Awaited<ReturnType<typeof import('../../node_modules/@nuxtjs/i18n/dist/runtime/server/routes/messages').default>>>>
|
|
14
|
+
}
|
|
15
|
+
'/__nuxt_island/**': {
|
|
16
|
+
'default': Simplify<Serialize<Awaited<ReturnType<typeof import('../../server/#internal/nuxt/island-renderer').default>>>>
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export {}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Generated by Nuxt'
|
|
2
|
+
import type { Plugin } from '#app'
|
|
3
|
+
|
|
4
|
+
type Decorate<T extends Record<string, any>> = { [K in keyof T as K extends string ? `$${K}` : never]: T[K] }
|
|
5
|
+
|
|
6
|
+
type InjectionType<A extends Plugin> = A extends {default: Plugin<infer T>} ? Decorate<T> : unknown
|
|
7
|
+
|
|
8
|
+
type NuxtAppInjections =
|
|
9
|
+
InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/revive-payload.client.js")> &
|
|
10
|
+
InjectionType<typeof import("../../node_modules/nuxt/dist/head/runtime/plugins/unhead.js")> &
|
|
11
|
+
InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/router.js")> &
|
|
12
|
+
InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/browser-devtools-timing.client.js")> &
|
|
13
|
+
InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/navigation-repaint.client.js")> &
|
|
14
|
+
InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/check-outdated-build.client.js")> &
|
|
15
|
+
InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/revive-payload.server.js")> &
|
|
16
|
+
InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/chunk-reload.client.js")> &
|
|
17
|
+
InjectionType<typeof import("../../node_modules/@nuxt/devtools/dist/runtime/plugins/devtools.server.js")> &
|
|
18
|
+
InjectionType<typeof import("../../node_modules/@nuxt/devtools/dist/runtime/plugins/devtools.client.js")> &
|
|
19
|
+
InjectionType<typeof import("../../node_modules/@nuxtjs/i18n/dist/runtime/plugins/switch-locale-path-ssr.js")> &
|
|
20
|
+
InjectionType<typeof import("../../node_modules/@nuxtjs/i18n/dist/runtime/plugins/route-locale-detect.js")> &
|
|
21
|
+
InjectionType<typeof import("../../node_modules/@nuxtjs/i18n/dist/runtime/plugins/preload.js")> &
|
|
22
|
+
InjectionType<typeof import("../../node_modules/@nuxtjs/i18n/dist/runtime/plugins/dev.js")> &
|
|
23
|
+
InjectionType<typeof import("../../node_modules/@nuxtjs/i18n/dist/runtime/plugins/i18n.js")> &
|
|
24
|
+
InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/dev-server-logs.js")> &
|
|
25
|
+
InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/check-if-layout-used.js")> &
|
|
26
|
+
InjectionType<typeof import("../../app/plugins/loggly.client")> &
|
|
27
|
+
InjectionType<typeof import("../../node_modules/@nuxtjs/i18n/dist/runtime/plugins/ssg-detect.js")>
|
|
28
|
+
|
|
29
|
+
declare module '#app' {
|
|
30
|
+
interface NuxtApp extends NuxtAppInjections { }
|
|
31
|
+
|
|
32
|
+
interface NuxtAppLiterals {
|
|
33
|
+
pluginName: 'vue-devtools-client' | 'nuxt:revive-payload:client' | 'nuxt:head' | 'nuxt:router' | 'nuxt:browser-devtools-timing' | 'nuxt:revive-payload:server' | 'nuxt:chunk-reload' | 'nuxt:global-components' | 'i18n:plugin:switch-locale-path-ssr' | 'i18n:plugin:route-locale-detect' | 'i18n:plugin:preload' | 'i18n:dev' | 'i18n:plugin' | 'nuxt:checkIfLayoutUsed' | 'i18n:plugin:ssg-detect'
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare module 'vue' {
|
|
38
|
+
interface ComponentCustomProperties extends NuxtAppInjections { }
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { }
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { RuntimeConfig as UserRuntimeConfig, PublicRuntimeConfig as UserPublicRuntimeConfig } from 'nuxt/schema'
|
|
2
|
+
interface SharedRuntimeConfig {
|
|
3
|
+
app: {
|
|
4
|
+
buildId: string,
|
|
5
|
+
|
|
6
|
+
baseURL: string,
|
|
7
|
+
|
|
8
|
+
buildAssetsDir: string,
|
|
9
|
+
|
|
10
|
+
cdnURL: string,
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
logglyToken: string,
|
|
14
|
+
|
|
15
|
+
logglyEndpoint: string,
|
|
16
|
+
|
|
17
|
+
nitro: {
|
|
18
|
+
envPrefix: string,
|
|
19
|
+
},
|
|
20
|
+
}
|
|
21
|
+
interface SharedPublicRuntimeConfig {
|
|
22
|
+
logglyEnabled: boolean,
|
|
23
|
+
|
|
24
|
+
logglyTags: Array<string>,
|
|
25
|
+
|
|
26
|
+
logLevel: string,
|
|
27
|
+
|
|
28
|
+
i18n: {
|
|
29
|
+
baseUrl: string,
|
|
30
|
+
|
|
31
|
+
defaultLocale: string,
|
|
32
|
+
|
|
33
|
+
rootRedirect: any,
|
|
34
|
+
|
|
35
|
+
redirectStatusCode: number,
|
|
36
|
+
|
|
37
|
+
skipSettingLocaleOnNavigate: boolean,
|
|
38
|
+
|
|
39
|
+
locales: Array<{
|
|
40
|
+
|
|
41
|
+
}>,
|
|
42
|
+
|
|
43
|
+
detectBrowserLanguage: {
|
|
44
|
+
alwaysRedirect: boolean,
|
|
45
|
+
|
|
46
|
+
cookieCrossOrigin: boolean,
|
|
47
|
+
|
|
48
|
+
cookieDomain: any,
|
|
49
|
+
|
|
50
|
+
cookieKey: string,
|
|
51
|
+
|
|
52
|
+
cookieSecure: boolean,
|
|
53
|
+
|
|
54
|
+
fallbackLocale: string,
|
|
55
|
+
|
|
56
|
+
redirectOn: string,
|
|
57
|
+
|
|
58
|
+
useCookie: boolean,
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
experimental: {
|
|
62
|
+
localeDetector: string,
|
|
63
|
+
|
|
64
|
+
typedPages: boolean,
|
|
65
|
+
|
|
66
|
+
typedOptionsAndMessages: boolean,
|
|
67
|
+
|
|
68
|
+
alternateLinkCanonicalQueries: boolean,
|
|
69
|
+
|
|
70
|
+
devCache: boolean,
|
|
71
|
+
|
|
72
|
+
cacheLifetime: any,
|
|
73
|
+
|
|
74
|
+
stripMessagesPayload: boolean,
|
|
75
|
+
|
|
76
|
+
preload: boolean,
|
|
77
|
+
|
|
78
|
+
strictSeo: boolean,
|
|
79
|
+
|
|
80
|
+
nitroContextDetection: boolean,
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
domainLocales: {
|
|
84
|
+
enUS: {
|
|
85
|
+
domain: string,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
}
|
|
90
|
+
declare module '@nuxt/schema' {
|
|
91
|
+
interface RuntimeConfig extends UserRuntimeConfig {}
|
|
92
|
+
interface PublicRuntimeConfig extends UserPublicRuntimeConfig {}
|
|
93
|
+
}
|
|
94
|
+
declare module 'nuxt/schema' {
|
|
95
|
+
interface RuntimeConfig extends SharedRuntimeConfig {}
|
|
96
|
+
interface PublicRuntimeConfig extends SharedPublicRuntimeConfig {}
|
|
97
|
+
}
|
|
98
|
+
declare module 'vue' {
|
|
99
|
+
interface ComponentCustomProperties {
|
|
100
|
+
$config: UserRuntimeConfig
|
|
101
|
+
}
|
|
102
|
+
}
|
|
File without changes
|
package/README.md
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# Base Layer
|
|
2
|
+
|
|
3
|
+
A foundational layer that provides essential configuration and tooling for Nuxt 4 projects.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- TypeScript integration with strict mode enabled
|
|
8
|
+
- ESLint configuration with stylistic rules for Vue templates
|
|
9
|
+
- Test utilities integration
|
|
10
|
+
- Internationalization (i18n) via `@nuxtjs/i18n`
|
|
11
|
+
- Nuxt DevTools enabled
|
|
12
|
+
- CI/CD workflows for code quality checks
|
|
13
|
+
|
|
14
|
+
## Development
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Install dependencies
|
|
18
|
+
npm install
|
|
19
|
+
|
|
20
|
+
# Start development server
|
|
21
|
+
npm run dev
|
|
22
|
+
|
|
23
|
+
# Run ESLint
|
|
24
|
+
npm run lint
|
|
25
|
+
|
|
26
|
+
# Fix linting issues automatically
|
|
27
|
+
npm run lint:fix
|
|
28
|
+
|
|
29
|
+
# Run TypeScript type checking
|
|
30
|
+
npm run typecheck
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Configuration Details
|
|
34
|
+
|
|
35
|
+
### Key Features
|
|
36
|
+
|
|
37
|
+
- **Compatibility Date:** 2025-07-15
|
|
38
|
+
- **Strict TypeScript:** Enforces type safety throughout your projects
|
|
39
|
+
- **ESLint Integration:** Pre-configured with stylistic rules for Vue templates
|
|
40
|
+
- Custom ESLint rules for code style consistency
|
|
41
|
+
- Vue template formatting rules
|
|
42
|
+
- **Testing Utilities:** Built-in test utils for comprehensive testing
|
|
43
|
+
|
|
44
|
+
### Configuration Details
|
|
45
|
+
|
|
46
|
+
The base layer includes:
|
|
47
|
+
|
|
48
|
+
- Nuxt ESLint module (`@nuxt/eslint`)
|
|
49
|
+
- Nuxt Test Utils module (`@nuxt/test-utils`)
|
|
50
|
+
- Nuxt i18n module (`@nuxtjs/i18n`)
|
|
51
|
+
- Nuxt DevTools enabled
|
|
52
|
+
- TypeScript configuration with strict mode
|
|
53
|
+
- Custom ESLint configuration with rules for:
|
|
54
|
+
- JavaScript stylistic preferences
|
|
55
|
+
- TypeScript unused variables handling
|
|
56
|
+
- Vue template formatting
|
|
57
|
+
|
|
58
|
+
## Internationalization (i18n)
|
|
59
|
+
|
|
60
|
+
This layer integrates the Nuxt i18n module (`@nuxtjs/i18n`). You can override or extend its configuration in your application.
|
|
61
|
+
|
|
62
|
+
- Docs: https://i18n.nuxtjs.org
|
|
63
|
+
|
|
64
|
+
Override example in a consuming app:
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
// nuxt.config.ts (in your app)
|
|
68
|
+
export default defineNuxtConfig({
|
|
69
|
+
extends: ['@cooperco/nuxt-layer-base'],
|
|
70
|
+
i18n: {
|
|
71
|
+
locales: [
|
|
72
|
+
{ code: 'en', language: 'en-US', name: 'English' },
|
|
73
|
+
{ code: 'fr', language: 'fr-FR', name: 'Français' }
|
|
74
|
+
],
|
|
75
|
+
defaultLocale: 'en'
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Basic usage in a component:
|
|
81
|
+
|
|
82
|
+
```vue
|
|
83
|
+
<script setup lang="ts">
|
|
84
|
+
const { t, locale } = useI18n()
|
|
85
|
+
</script>
|
|
86
|
+
|
|
87
|
+
<template>
|
|
88
|
+
<p>{{ t('hello') }}</p>
|
|
89
|
+
</template>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Note: Provide your own translation files (for example, `locales/en.json`) in your application.
|
|
93
|
+
|
|
94
|
+
## Usage
|
|
95
|
+
|
|
96
|
+
To use this layer in your Nuxt project:
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
// nuxt.config.ts
|
|
100
|
+
export default defineNuxtConfig({
|
|
101
|
+
extends: [
|
|
102
|
+
'@cooperco/nuxt-layer-base'
|
|
103
|
+
]
|
|
104
|
+
})
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Nuxt 4 directory structure
|
|
108
|
+
This layer follows Nuxt 4's app directory structure:
|
|
109
|
+
- app/plugins/... for plugins (e.g., app/plugins/loggly.client.ts)
|
|
110
|
+
- app/composables/... for composables (e.g., app/composables/useLoggly.ts)
|
|
111
|
+
|
|
112
|
+
If you previously looked under plugins/ or composables/ at the layer root, note they have been relocated under app/ for Nuxt 4.
|
|
113
|
+
|
|
114
|
+
## Error logging (Loggly)
|
|
115
|
+
|
|
116
|
+
This base layer includes optional, secure error logging via Loggly using a server proxy. It is off by default and can be enabled per consuming app using environment variables.
|
|
117
|
+
|
|
118
|
+
What you get when enabled:
|
|
119
|
+
- Automatic server-side error capture (Nitro request errors)
|
|
120
|
+
- Automatic client-side error capture (Nuxt/Vue/global browser errors)
|
|
121
|
+
- Composable for custom logs from your features (useLoggly)
|
|
122
|
+
- Centralized PII scrubbing on the server proxy before forwarding to Loggly
|
|
123
|
+
|
|
124
|
+
### 1) Enable in your app (env vars)
|
|
125
|
+
Set the following environment variables in your consuming app (do not expose the token on the client):
|
|
126
|
+
|
|
127
|
+
- LOGGLY_ENABLED=true
|
|
128
|
+
- LOGGLY_TOKEN=your-loggly-customer-token
|
|
129
|
+
- LOGGLY_TAGS=nuxt,base,app-name,env (comma-separated; optional)
|
|
130
|
+
- LOG_LEVEL=error (optional; error|warn|info|debug)
|
|
131
|
+
- LOGGLY_ENDPOINT=https://logs-01.loggly.com/inputs (optional override)
|
|
132
|
+
|
|
133
|
+
Notes
|
|
134
|
+
- LOGGLY_TOKEN is server-only and never shipped to the client. The client sends logs to the server proxy at /api/loggly.
|
|
135
|
+
- If LOGGLY_ENABLED is not true or the token is missing, logging is skipped.
|
|
136
|
+
|
|
137
|
+
### 2) Using the composable in your app
|
|
138
|
+
The base layer exposes a composable you can call anywhere in your app.
|
|
139
|
+
|
|
140
|
+
Example:
|
|
141
|
+
```ts
|
|
142
|
+
// inside a component or any composable
|
|
143
|
+
const log = useLoggly()
|
|
144
|
+
await log.error('Checkout failed', { orderId, step: 'place-order' }, ['checkout'])
|
|
145
|
+
await log.info('User clicked CTA', { campaign: 'summer' }, ['marketing'])
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
API:
|
|
149
|
+
- error(message, meta?, tags?)
|
|
150
|
+
- warn(message, meta?, tags?)
|
|
151
|
+
- info(message, meta?, tags?)
|
|
152
|
+
- debug(message, meta?, tags?)
|
|
153
|
+
|
|
154
|
+
Tags are merged with your global LOGGLY_TAGS (duplicates removed, limited to 10).
|
|
155
|
+
|
|
156
|
+
### 3) Auto-captured errors
|
|
157
|
+
When enabled, the base layer automatically forwards:
|
|
158
|
+
- Server: request-time exceptions via a Nitro plugin
|
|
159
|
+
- Client: Nuxt app errors, Vue component errors, window error events, and unhandled promise rejections
|
|
160
|
+
|
|
161
|
+
These are forwarded to /api/loggly, which safely shapes the payload before sending to Loggly.
|
|
162
|
+
|
|
163
|
+
### 4) Security and privacy
|
|
164
|
+
- The server proxy masks common sensitive keys (password, token, authorization, etc.) in meta payloads.
|
|
165
|
+
- Prefer adding any app-specific sensitive keys to your meta scrubbing in the proxy if needed.
|
|
166
|
+
- Logging is fire-and-forget; failures to log do not block requests or UI.
|
|
167
|
+
|
|
168
|
+
### 5) Verifying locally
|
|
169
|
+
1) In your consuming app, set env vars (e.g. in .env.local):
|
|
170
|
+
```
|
|
171
|
+
LOGGLY_ENABLED=true
|
|
172
|
+
LOGGLY_TOKEN=...your token...
|
|
173
|
+
LOGGLY_TAGS=nuxt,base,local,app-name
|
|
174
|
+
LOG_LEVEL=error
|
|
175
|
+
```
|
|
176
|
+
2) Start your app and induce an error (e.g., throw new Error('Test') in onMounted of a test component).
|
|
177
|
+
3) Watch your network tab for POST /api/loggly (200 OK). Then check Loggly for the entry with your tags.
|
|
178
|
+
|
|
179
|
+
### 6) Troubleshooting
|
|
180
|
+
- No logs? Ensure LOGGLY_ENABLED=true and LOGGLY_TOKEN is set in the server environment.
|
|
181
|
+
- CORS or network errors from the browser? The client never talks to Loggly directly; it only posts to /api/loggly.
|
|
182
|
+
- Too much volume? Consider adding sampling or batching later; the proxy makes this easy to change centrally.
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
## Playground: Test Loggly in the base layer
|
|
186
|
+
|
|
187
|
+
A tiny playground app is included so you can run the base layer by itself and verify Loggly end‑to‑end before integrating into another app.
|
|
188
|
+
|
|
189
|
+
Location: playground
|
|
190
|
+
|
|
191
|
+
How it works:
|
|
192
|
+
- The playground extends the base layer (extends: ['../layers/base']).
|
|
193
|
+
- It includes a simple page to send logs via useLoggly and buttons to trigger client/server errors.
|
|
194
|
+
- The server exposes GET /api/boom to intentionally throw and test server‑side logging.
|
|
195
|
+
|
|
196
|
+
Run it:
|
|
197
|
+
1) From the repo root:
|
|
198
|
+
- cd playground && npm run dev
|
|
199
|
+
|
|
200
|
+
2) Provide environment variables for Loggly in the playground (optional but required to actually send to Loggly):
|
|
201
|
+
Copy playground/.env.example to playground/.env and fill in your values.
|
|
202
|
+
|
|
203
|
+
LOGGLY_ENABLED=true
|
|
204
|
+
LOGGLY_TOKEN=your-loggly-customer-token
|
|
205
|
+
LOGGLY_TAGS=nuxt,base,playground,local
|
|
206
|
+
LOG_LEVEL=debug
|
|
207
|
+
# Optional override
|
|
208
|
+
# LOGGLY_ENDPOINT=https://logs-01.loggly.com/inputs
|
|
209
|
+
|
|
210
|
+
3) Open http://localhost:3000
|
|
211
|
+
- Click the Send error/warn/info/debug buttons to send custom logs.
|
|
212
|
+
- Click Throw client error to exercise the client plugin.
|
|
213
|
+
- Click Call /api/boom to exercise the server plugin.
|
|
214
|
+
|
|
215
|
+
Notes:
|
|
216
|
+
- If LOGGLY_ENABLED is not true or LOGGLY_TOKEN is missing, the server proxy will skip sending and respond with { ok: false, skipped: true }.
|
|
217
|
+
- The token is server‑only; it is never exposed to the client. The browser only talks to /api/loggly on your dev server.
|