hazo_logs 2.0.1 → 2.0.2
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/server.d.ts +10 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +10 -2
- package/dist/server.js.map +1 -1
- package/dist/ui/server.d.ts +10 -4
- package/dist/ui/server.d.ts.map +1 -1
- package/dist/ui/server.js +10 -4
- package/dist/ui/server.js.map +1 -1
- package/package.json +4 -4
package/dist/server.d.ts
CHANGED
|
@@ -2,7 +2,16 @@
|
|
|
2
2
|
* hazo_logs/server - Server-only logging module
|
|
3
3
|
*
|
|
4
4
|
* ⚠️ SERVER-ONLY: This module uses Node.js APIs (fs, async_hooks) and CANNOT be
|
|
5
|
-
* imported in
|
|
5
|
+
* imported in Client Components. Import will fail in browser bundles when
|
|
6
|
+
* fs/async_hooks resolve to empty/throwing shims.
|
|
7
|
+
*
|
|
8
|
+
* We intentionally do NOT `import 'server-only'` here because Next 15's
|
|
9
|
+
* "Collecting page data" build phase evaluates `route.ts` and middleware
|
|
10
|
+
* without setting the `react-server` resolution condition; the marker
|
|
11
|
+
* then throws and breaks the production build for every legitimate
|
|
12
|
+
* server-side consumer. The runtime failure mode for a real Client
|
|
13
|
+
* Component import is still loud enough — losing fail-fast at module
|
|
14
|
+
* load is the right tradeoff.
|
|
6
15
|
*
|
|
7
16
|
* Usage:
|
|
8
17
|
* import { createLogger, runWithLogContext } from 'hazo_logs/server';
|
|
@@ -13,7 +22,6 @@
|
|
|
13
22
|
* For client-side logging, use:
|
|
14
23
|
* import { createClientLogger } from 'hazo_logs/ui';
|
|
15
24
|
*/
|
|
16
|
-
import 'server-only';
|
|
17
25
|
export { HazoLogger } from './lib/hazo_logger.js';
|
|
18
26
|
export { PackageLogger, createLogger } from './lib/package_logger.js';
|
|
19
27
|
export { loadConfig } from './lib/config_loader.js';
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGpD,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACzG,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,YAAY,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAG3D,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EACb,WAAW,EACX,WAAW,GACZ,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EACL,QAAQ,EACR,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAG7B,YAAY,EACV,MAAM,EACN,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,SAAS,GACV,MAAM,gBAAgB,CAAC;AAExB,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE3E,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,YAAY,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAGzG,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/server.js
CHANGED
|
@@ -2,7 +2,16 @@
|
|
|
2
2
|
* hazo_logs/server - Server-only logging module
|
|
3
3
|
*
|
|
4
4
|
* ⚠️ SERVER-ONLY: This module uses Node.js APIs (fs, async_hooks) and CANNOT be
|
|
5
|
-
* imported in
|
|
5
|
+
* imported in Client Components. Import will fail in browser bundles when
|
|
6
|
+
* fs/async_hooks resolve to empty/throwing shims.
|
|
7
|
+
*
|
|
8
|
+
* We intentionally do NOT `import 'server-only'` here because Next 15's
|
|
9
|
+
* "Collecting page data" build phase evaluates `route.ts` and middleware
|
|
10
|
+
* without setting the `react-server` resolution condition; the marker
|
|
11
|
+
* then throws and breaks the production build for every legitimate
|
|
12
|
+
* server-side consumer. The runtime failure mode for a real Client
|
|
13
|
+
* Component import is still loud enough — losing fail-fast at module
|
|
14
|
+
* load is the right tradeoff.
|
|
6
15
|
*
|
|
7
16
|
* Usage:
|
|
8
17
|
* import { createLogger, runWithLogContext } from 'hazo_logs/server';
|
|
@@ -13,7 +22,6 @@
|
|
|
13
22
|
* For client-side logging, use:
|
|
14
23
|
* import { createClientLogger } from 'hazo_logs/ui';
|
|
15
24
|
*/
|
|
16
|
-
import 'server-only';
|
|
17
25
|
// Core logging
|
|
18
26
|
export { HazoLogger } from './lib/hazo_logger.js';
|
|
19
27
|
export { PackageLogger, createLogger } from './lib/package_logger.js';
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,eAAe;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,4CAA4C;AAC5C,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACzG,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGxD,uCAAuC;AACvC,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EACb,WAAW,EACX,WAAW,GACZ,MAAM,8BAA8B,CAAC;AAEtC,iCAAiC;AACjC,OAAO,EACL,QAAQ,EACR,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAgB7B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG7C,8BAA8B;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAE5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC"}
|
package/dist/ui/server.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Server-side UI exports for hazo_logs
|
|
3
3
|
*
|
|
4
|
-
* ⚠️ SERVER-ONLY: This module uses Node.js APIs and CANNOT be
|
|
5
|
-
* imported in
|
|
4
|
+
* ⚠️ SERVER-ONLY: This module uses Node.js APIs (fs, path, etc.) and CANNOT be
|
|
5
|
+
* imported in Client Components. Importing from a Client Component will
|
|
6
|
+
* fail at bundle/runtime when the handlers reach for `fs` or `path`.
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
+
* We intentionally do NOT `import 'server-only'` here because Next 15's
|
|
9
|
+
* "Collecting page data" build phase loads `route.ts` modules without
|
|
10
|
+
* setting the `react-server` resolution condition. With the marker in
|
|
11
|
+
* place, every consumer's `app/api/logs/route.ts` (which legitimately
|
|
12
|
+
* imports from this barrel) breaks the production build. The runtime
|
|
13
|
+
* failure mode for a real Client Component import is still loud enough
|
|
14
|
+
* — losing fail-fast at module load is the right tradeoff.
|
|
8
15
|
*/
|
|
9
|
-
import 'server-only';
|
|
10
16
|
export { createLogApiHandler } from './api/log-api-handler.js';
|
|
11
17
|
export { createClientLogHandler } from './api/client-log-handler.js';
|
|
12
18
|
export { createLogStreamApiHandler } from './api/log-stream-api-handler.js';
|
package/dist/ui/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/ui/server.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/ui/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAG3E,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAG5D,YAAY,EACV,YAAY,EACZ,aAAa,EACb,WAAW,GACZ,MAAM,YAAY,CAAC"}
|
package/dist/ui/server.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Server-side UI exports for hazo_logs
|
|
3
3
|
*
|
|
4
|
-
* ⚠️ SERVER-ONLY: This module uses Node.js APIs and CANNOT be
|
|
5
|
-
* imported in
|
|
4
|
+
* ⚠️ SERVER-ONLY: This module uses Node.js APIs (fs, path, etc.) and CANNOT be
|
|
5
|
+
* imported in Client Components. Importing from a Client Component will
|
|
6
|
+
* fail at bundle/runtime when the handlers reach for `fs` or `path`.
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
+
* We intentionally do NOT `import 'server-only'` here because Next 15's
|
|
9
|
+
* "Collecting page data" build phase loads `route.ts` modules without
|
|
10
|
+
* setting the `react-server` resolution condition. With the marker in
|
|
11
|
+
* place, every consumer's `app/api/logs/route.ts` (which legitimately
|
|
12
|
+
* imports from this barrel) breaks the production build. The runtime
|
|
13
|
+
* failure mode for a real Client Component import is still loud enough
|
|
14
|
+
* — losing fail-fast at module load is the right tradeoff.
|
|
8
15
|
*/
|
|
9
|
-
import 'server-only';
|
|
10
16
|
// API Handlers
|
|
11
17
|
export { createLogApiHandler } from './api/log-api-handler.js';
|
|
12
18
|
export { createClientLogHandler } from './api/client-log-handler.js';
|
package/dist/ui/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/ui/server.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/ui/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,eAAe;AACf,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAG5E,aAAa;AACb,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hazo_logs",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Logger for hazo packages - Winston wrapper with singleton pattern",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@types/ini": "^4.1.1",
|
|
83
83
|
"@types/node": "^22.10.2",
|
|
84
84
|
"@types/react": "^19.0.1",
|
|
85
|
-
"hazo_ui": "^3.1.
|
|
85
|
+
"hazo_ui": "^3.1.3",
|
|
86
86
|
"jsdom": "^29.1.1",
|
|
87
87
|
"next": "^16.0.10",
|
|
88
88
|
"react": "^19.0.0",
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
94
|
"hazo_core": "^1.0.0",
|
|
95
|
-
"hazo_debug": "^3.1.
|
|
96
|
-
"hazo_ui": "^3.1.
|
|
95
|
+
"hazo_debug": "^3.1.1",
|
|
96
|
+
"hazo_ui": "^3.1.3",
|
|
97
97
|
"next": "^14.0.0",
|
|
98
98
|
"react": "^18.0.0",
|
|
99
99
|
"react-dom": "^18.0.0"
|