@adhd/apigen-plugin-logger 0.1.0
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/index.d.ts +3 -0
- package/index.js +2 -0
- package/index.mjs +566 -0
- package/lib/plugin.d.ts +70 -0
- package/package.json +14 -0
package/index.d.ts
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function G(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}};function K(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}var Y=J;function J(e,t,r){var s=r&&r.stringify||K,i=1;if(typeof e=="object"&&e!==null){var l=t.length+i;if(l===1)return e;var f=new Array(l);f[0]=s(e);for(var c=1;c<l;c++)f[c]=s(t[c]);return f.join(" ")}if(typeof e!="string")return e;var d=t.length;if(d===0)return e;for(var n="",a=1-i,o=-1,b=e&&e.length||0,u=0;u<b;){if(e.charCodeAt(u)===37&&u+1<b){switch(o=o>-1?o:0,e.charCodeAt(u+1)){case 100:case 102:if(a>=d||t[a]==null)break;o<u&&(n+=e.slice(o,u)),n+=Number(t[a]),o=u+2,u++;break;case 105:if(a>=d||t[a]==null)break;o<u&&(n+=e.slice(o,u)),n+=Math.floor(Number(t[a])),o=u+2,u++;break;case 79:case 111:case 106:if(a>=d||t[a]===void 0)break;o<u&&(n+=e.slice(o,u));var j=typeof t[a];if(j==="string"){n+="'"+t[a]+"'",o=u+2,u++;break}if(j==="function"){n+=t[a].name||"<anonymous>",o=u+2,u++;break}n+=s(t[a]),o=u+2,u++;break;case 115:if(a>=d)break;o<u&&(n+=e.slice(o,u)),n+=String(t[a]),o=u+2,u++;break;case 37:o<u&&(n+=e.slice(o,u)),n+="%",o=u+2,u++,a--;break}++a}++u}return o===-1?e:(o<b&&(n+=e.slice(o)),n)}const B=Y;C.exports=g;const L=ue().console||{},U={mapHttpRequest:S,mapHttpResponse:S,wrapRequestSerializer:F,wrapResponseSerializer:F,wrapErrorSerializer:F,req:S,res:S,err:R,errWithCause:R};function v(e,t){return e==="silent"?1/0:t.levels.values[e]}const A=Symbol("pino.logFuncs"),P=Symbol("pino.hierarchy"),Q={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function I(e,t){const r={logger:t,parent:e[P]};t[P]=r}function X(e,t,r){const s={};t.forEach(i=>{s[i]=r[i]?r[i]:L[i]||L[Q[i]||"log"]||w}),e[A]=s}function Z(e,t){return Array.isArray(e)?e.filter(function(s){return s!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function g(e){e=e||{},e.browser=e.browser||{};const t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");const r=e.browser.write||L;e.browser.write&&(e.browser.asObject=!0);const s=e.serializers||{},i=Z(e.browser.serialize,s);let l=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(l=!1);const f=Object.keys(e.customLevels||{}),c=["error","fatal","warn","info","debug","trace"].concat(f);typeof r=="function"&&c.forEach(function(h){r[h]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");const d=e.level||"info",n=Object.create(r);n.log||(n.log=w),X(n,c,r),I({},n),Object.defineProperty(n,"levelVal",{get:o}),Object.defineProperty(n,"level",{get:b,set:u});const a={transmit:t,serialize:i,asObject:e.browser.asObject,asObjectBindingsOnly:e.browser.asObjectBindingsOnly,formatters:e.browser.formatters,reportCaller:e.browser.reportCaller,levels:c,timestamp:ae(e),messageKey:e.messageKey||"msg",onChild:e.onChild||w};n.levels=ee(e),n.level=d,n.isLevelEnabled=function(h){return this.levels.values[h]?this.levels.values[h]>=this.levels.values[this.level]:!1},n.setMaxListeners=n.getMaxListeners=n.emit=n.addListener=n.on=n.prependListener=n.once=n.prependOnceListener=n.removeListener=n.removeAllListeners=n.listeners=n.listenerCount=n.eventNames=n.write=n.flush=w,n.serializers=s,n._serialize=i,n._stdErrSerialize=l,n.child=function(...h){return j.call(this,a,...h)},t&&(n._logEvent=x());function o(){return v(this.level,this)}function b(){return this._level}function u(h){if(h!=="silent"&&!this.levels.values[h])throw Error("unknown level "+h);this._level=h,y(this,a,n,"error"),y(this,a,n,"fatal"),y(this,a,n,"warn"),y(this,a,n,"info"),y(this,a,n,"debug"),y(this,a,n,"trace"),f.forEach(m=>{y(this,a,n,m)})}function j(h,m,_){if(!m)throw new Error("missing bindings for child Pino");_=_||{},i&&m.serializers&&(_.serializers=m.serializers);const V=_.serializers;if(i&&V){var z=Object.assign({},s,V),M=e.browser.serialize===!0?Object.keys(z):i;delete m.serializers,D([m],M,z,this._stdErrSerialize)}function $(E){this._childLevel=(E._childLevel|0)+1,this.bindings=m,z&&(this.serializers=z,this._serialize=M),t&&(this._logEvent=x([].concat(E._logEvent.bindings,m)))}$.prototype=this;const k=new $(this);return I(this,k),k.child=function(...E){return j.call(this,h,...E)},k.level=_.level||this.level,h.onChild(k),k}return n}function ee(e){const t=e.customLevels||{},r=Object.assign({},g.levels.values,t),s=Object.assign({},g.levels.labels,te(t));return{values:r,labels:s}}function te(e){const t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}g.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};g.stdSerializers=U;g.stdTimeFunctions=Object.assign({},{nullTime:q,epochTime:H,unixTime:le,isoTime:ce});function ne(e){const t=[];e.bindings&&t.push(e.bindings);let r=e[P];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function y(e,t,r,s){if(Object.defineProperty(e,s,{value:v(e.level,r)>v(s,r)?w:r[A][s],writable:!0,enumerable:!0,configurable:!0}),e[s]===w){if(!t.transmit)return;const l=t.transmit.level||e.level,f=v(l,r);if(v(s,r)<f)return}e[s]=ie(e,t,r,s);const i=ne(e);i.length!==0&&(e[s]=re(i,e[s]))}function re(e,t){return function(){return t.apply(this,[...e,...arguments])}}function ie(e,t,r,s){return function(i){return function(){const f=t.timestamp(),c=new Array(arguments.length),d=Object.getPrototypeOf&&Object.getPrototypeOf(this)===L?L:this;for(var n=0;n<c.length;n++)c[n]=arguments[n];var a=!1;if(t.serialize&&(D(c,this._serialize,this.serializers,this._stdErrSerialize),a=!0),t.asObject||t.formatters){const o=se(this,s,c,f,t);if(t.reportCaller&&o&&o.length>0&&o[0]&&typeof o[0]=="object")try{const b=N();b&&(o[0].caller=b)}catch{}i.call(d,...o)}else{if(t.reportCaller)try{const o=N();o&&c.push(o)}catch{}i.apply(d,c)}if(t.transmit){const o=t.transmit.level||e._level,b=v(o,r),u=v(s,r);if(u<b)return;oe(this,{ts:f,methodLevel:s,methodValue:u,transmitLevel:o,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:v(e._level,r)},c,a)}}}(e[A][s])}function se(e,t,r,s,i){const{level:l,log:f=o=>o}=i.formatters||{},c=r.slice();let d=c[0];const n={};let a=(e._childLevel|0)+1;if(a<1&&(a=1),s&&(n.time=s),l){const o=l(t,e.levels.values[t]);Object.assign(n,o)}else n.level=e.levels.values[t];if(i.asObjectBindingsOnly){if(d!==null&&typeof d=="object")for(;a--&&typeof c[0]=="object";)Object.assign(n,c.shift());return[f(n),...c]}else{if(d!==null&&typeof d=="object"){for(;a--&&typeof c[0]=="object";)Object.assign(n,c.shift());d=c.length?B(c.shift(),c):void 0}else typeof d=="string"&&(d=B(c.shift(),c));return d!==void 0&&(n[i.messageKey]=d),[f(n)]}}function D(e,t,r,s){for(const i in e)if(s&&e[i]instanceof Error)e[i]=g.stdSerializers.err(e[i]);else if(typeof e[i]=="object"&&!Array.isArray(e[i])&&t)for(const l in e[i])t.indexOf(l)>-1&&l in r&&(e[i][l]=r[l](e[i][l]))}function oe(e,t,r,s=!1){const i=t.send,l=t.ts,f=t.methodLevel,c=t.methodValue,d=t.val,n=e._logEvent.bindings;s||D(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=l,e._logEvent.messages=r.filter(function(a){return n.indexOf(a)===-1}),e._logEvent.level.label=f,e._logEvent.level.value=c,i(f,e._logEvent,d),e._logEvent=x(n)}function x(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function R(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)t[r]===void 0&&(t[r]=e[r]);return t}function ae(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?q:H}function S(){return{}}function F(e){return e}function w(){}function q(){return!1}function H(){return Date.now()}function le(){return Math.round(Date.now()/1e3)}function ce(){return new Date(Date.now()).toISOString()}function ue(){function e(t){return typeof t<"u"&&t}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}C.exports.default=g;C.exports.pino=g;function N(){const e=new Error().stack;if(!e)return null;const t=e.split(`
|
|
2
|
+
`);for(let r=1;r<t.length;r++){const s=t[r].trim();if(/(^at\s+)?(createWrap|LOG|set\s*\(|asObject|Object\.apply|Function\.apply)/.test(s)||s.indexOf("browser.js")!==-1||s.indexOf("node:internal")!==-1||s.indexOf("node_modules")!==-1)continue;let i=s.match(/\((.*?):(\d+):(\d+)\)/);if(i||(i=s.match(/at\s+(.*?):(\d+):(\d+)/)),i){const l=i[1],f=i[2],c=i[3];return l+":"+f+":"+c}}return null}var fe=C.exports;const p=G(fe);class O{constructor(t){this._inner=t}info(t,r){this._inner.info(t,r)}error(t,r){this._inner.error(t,r)}debug(t,r){this._inner.debug(t,r)}warn(t,r){this._inner.warn(t,r)}get pino(){return this._inner}}function de(e,t){const r=e.ctx.get(O);if(r!==void 0)return r;const s=new O(t.pino.child({op:e.operation.id}));return e.ctx.set(O,s),s}function he(e){const t=e.level??"info",r=typeof e.destination=="string"&&e.destination.length>0,s=!r&&!!process.stderr.isTTY,i=e.format??(s?"pretty":"json");let l;if(i==="pretty")l=p({level:t,transport:{target:"pino-pretty",options:{colorize:!r,translateTime:"SYS:HH:MM:ss.l",ignore:"pid,hostname",...r?{destination:e.destination,mkdir:!0}:{destination:2}}}});else{const f=r?p.destination({dest:e.destination,mkdir:!0,sync:!0}):p.destination(2);l=p({level:t},f)}return new O(l)}const be=new O(p({level:"info"},p.destination(2)));function W(e){return function(r,s){const i=de(r,e),l=r.operation.id,f=Date.now();i.info({op:l},`→ ${l}`);const c=s();function d(n){return n!==null&&typeof n=="object"&&Symbol.asyncIterator in n}return d(c)?async function*(){let a=0;try{for await(const o of c)a++,i.debug({op:l,chunk:a},`chunk ${a}`),yield o;i.info({op:l,ms:Date.now()-f,chunks:a},`← ${l} ok`)}catch(o){throw i.error({op:l,ms:Date.now()-f,err:o},`✗ ${l} stream error`),o}}():c.then(n=>(i.info({op:l,ms:Date.now()-f},`← ${l} ok`),n),n=>{throw i.error({op:l,ms:Date.now()-f,err:n},`✗ ${l} error`),n})}}const T={id:"logger",description:"Layer plugin: wraps every operation with entry/exit/error logging (SPEC §7.2a / §8.1). Seeds Logger into call.ctx for downstream consumers.",optionsSchema:{type:"object",properties:{level:{type:"string",description:"pino log level (trace|debug|info|warn|error|fatal). Default: info.",default:"info"},format:{type:"string",enum:["json","pretty"],description:"Log output format. Default: pretty on a TTY stderr, json otherwise."},destination:{type:"string",description:"File path to write logs to. Default: stderr (fd 2). Never stdout."}}},capabilities:{target:{name:"logger",generate(e,t){return[]}},layer:{layer:W(be)}}};function me(e={}){const t=he(e);return{...T,capabilities:{...T.capabilities,layer:{layer:W(t)}}}}exports.Logger=O;exports.default=T;exports.loggerPlugin=T;exports.makeLoggerPlugin=me;
|
package/index.mjs
ADDED
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
function G(e) {
|
|
2
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
3
|
+
}
|
|
4
|
+
var T = { exports: {} };
|
|
5
|
+
function K(e) {
|
|
6
|
+
try {
|
|
7
|
+
return JSON.stringify(e);
|
|
8
|
+
} catch {
|
|
9
|
+
return '"[Circular]"';
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
var Y = J;
|
|
13
|
+
function J(e, t, r) {
|
|
14
|
+
var s = r && r.stringify || K, i = 1;
|
|
15
|
+
if (typeof e == "object" && e !== null) {
|
|
16
|
+
var l = t.length + i;
|
|
17
|
+
if (l === 1)
|
|
18
|
+
return e;
|
|
19
|
+
var f = new Array(l);
|
|
20
|
+
f[0] = s(e);
|
|
21
|
+
for (var c = 1; c < l; c++)
|
|
22
|
+
f[c] = s(t[c]);
|
|
23
|
+
return f.join(" ");
|
|
24
|
+
}
|
|
25
|
+
if (typeof e != "string")
|
|
26
|
+
return e;
|
|
27
|
+
var d = t.length;
|
|
28
|
+
if (d === 0)
|
|
29
|
+
return e;
|
|
30
|
+
for (var n = "", a = 1 - i, o = -1, b = e && e.length || 0, u = 0; u < b; ) {
|
|
31
|
+
if (e.charCodeAt(u) === 37 && u + 1 < b) {
|
|
32
|
+
switch (o = o > -1 ? o : 0, e.charCodeAt(u + 1)) {
|
|
33
|
+
case 100:
|
|
34
|
+
case 102:
|
|
35
|
+
if (a >= d || t[a] == null)
|
|
36
|
+
break;
|
|
37
|
+
o < u && (n += e.slice(o, u)), n += Number(t[a]), o = u + 2, u++;
|
|
38
|
+
break;
|
|
39
|
+
case 105:
|
|
40
|
+
if (a >= d || t[a] == null)
|
|
41
|
+
break;
|
|
42
|
+
o < u && (n += e.slice(o, u)), n += Math.floor(Number(t[a])), o = u + 2, u++;
|
|
43
|
+
break;
|
|
44
|
+
case 79:
|
|
45
|
+
case 111:
|
|
46
|
+
case 106:
|
|
47
|
+
if (a >= d || t[a] === void 0)
|
|
48
|
+
break;
|
|
49
|
+
o < u && (n += e.slice(o, u));
|
|
50
|
+
var O = typeof t[a];
|
|
51
|
+
if (O === "string") {
|
|
52
|
+
n += "'" + t[a] + "'", o = u + 2, u++;
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
if (O === "function") {
|
|
56
|
+
n += t[a].name || "<anonymous>", o = u + 2, u++;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
n += s(t[a]), o = u + 2, u++;
|
|
60
|
+
break;
|
|
61
|
+
case 115:
|
|
62
|
+
if (a >= d)
|
|
63
|
+
break;
|
|
64
|
+
o < u && (n += e.slice(o, u)), n += String(t[a]), o = u + 2, u++;
|
|
65
|
+
break;
|
|
66
|
+
case 37:
|
|
67
|
+
o < u && (n += e.slice(o, u)), n += "%", o = u + 2, u++, a--;
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
++a;
|
|
71
|
+
}
|
|
72
|
+
++u;
|
|
73
|
+
}
|
|
74
|
+
return o === -1 ? e : (o < b && (n += e.slice(o)), n);
|
|
75
|
+
}
|
|
76
|
+
const $ = Y;
|
|
77
|
+
T.exports = v;
|
|
78
|
+
const L = ue().console || {}, U = {
|
|
79
|
+
mapHttpRequest: S,
|
|
80
|
+
mapHttpResponse: S,
|
|
81
|
+
wrapRequestSerializer: C,
|
|
82
|
+
wrapResponseSerializer: C,
|
|
83
|
+
wrapErrorSerializer: C,
|
|
84
|
+
req: S,
|
|
85
|
+
res: S,
|
|
86
|
+
err: I,
|
|
87
|
+
errWithCause: I
|
|
88
|
+
};
|
|
89
|
+
function g(e, t) {
|
|
90
|
+
return e === "silent" ? 1 / 0 : t.levels.values[e];
|
|
91
|
+
}
|
|
92
|
+
const A = Symbol("pino.logFuncs"), F = Symbol("pino.hierarchy"), Q = {
|
|
93
|
+
error: "log",
|
|
94
|
+
fatal: "error",
|
|
95
|
+
warn: "error",
|
|
96
|
+
info: "log",
|
|
97
|
+
debug: "log",
|
|
98
|
+
trace: "log"
|
|
99
|
+
};
|
|
100
|
+
function B(e, t) {
|
|
101
|
+
const r = {
|
|
102
|
+
logger: t,
|
|
103
|
+
parent: e[F]
|
|
104
|
+
};
|
|
105
|
+
t[F] = r;
|
|
106
|
+
}
|
|
107
|
+
function X(e, t, r) {
|
|
108
|
+
const s = {};
|
|
109
|
+
t.forEach((i) => {
|
|
110
|
+
s[i] = r[i] ? r[i] : L[i] || L[Q[i] || "log"] || w;
|
|
111
|
+
}), e[A] = s;
|
|
112
|
+
}
|
|
113
|
+
function Z(e, t) {
|
|
114
|
+
return Array.isArray(e) ? e.filter(function(s) {
|
|
115
|
+
return s !== "!stdSerializers.err";
|
|
116
|
+
}) : e === !0 ? Object.keys(t) : !1;
|
|
117
|
+
}
|
|
118
|
+
function v(e) {
|
|
119
|
+
e = e || {}, e.browser = e.browser || {};
|
|
120
|
+
const t = e.browser.transmit;
|
|
121
|
+
if (t && typeof t.send != "function")
|
|
122
|
+
throw Error("pino: transmit option must have a send function");
|
|
123
|
+
const r = e.browser.write || L;
|
|
124
|
+
e.browser.write && (e.browser.asObject = !0);
|
|
125
|
+
const s = e.serializers || {}, i = Z(e.browser.serialize, s);
|
|
126
|
+
let l = e.browser.serialize;
|
|
127
|
+
Array.isArray(e.browser.serialize) && e.browser.serialize.indexOf("!stdSerializers.err") > -1 && (l = !1);
|
|
128
|
+
const f = Object.keys(e.customLevels || {}), c = ["error", "fatal", "warn", "info", "debug", "trace"].concat(f);
|
|
129
|
+
typeof r == "function" && c.forEach(function(h) {
|
|
130
|
+
r[h] = r;
|
|
131
|
+
}), (e.enabled === !1 || e.browser.disabled) && (e.level = "silent");
|
|
132
|
+
const d = e.level || "info", n = Object.create(r);
|
|
133
|
+
n.log || (n.log = w), X(n, c, r), B({}, n), Object.defineProperty(n, "levelVal", {
|
|
134
|
+
get: o
|
|
135
|
+
}), Object.defineProperty(n, "level", {
|
|
136
|
+
get: b,
|
|
137
|
+
set: u
|
|
138
|
+
});
|
|
139
|
+
const a = {
|
|
140
|
+
transmit: t,
|
|
141
|
+
serialize: i,
|
|
142
|
+
asObject: e.browser.asObject,
|
|
143
|
+
asObjectBindingsOnly: e.browser.asObjectBindingsOnly,
|
|
144
|
+
formatters: e.browser.formatters,
|
|
145
|
+
reportCaller: e.browser.reportCaller,
|
|
146
|
+
levels: c,
|
|
147
|
+
timestamp: ae(e),
|
|
148
|
+
messageKey: e.messageKey || "msg",
|
|
149
|
+
onChild: e.onChild || w
|
|
150
|
+
};
|
|
151
|
+
n.levels = ee(e), n.level = d, n.isLevelEnabled = function(h) {
|
|
152
|
+
return this.levels.values[h] ? this.levels.values[h] >= this.levels.values[this.level] : !1;
|
|
153
|
+
}, n.setMaxListeners = n.getMaxListeners = n.emit = n.addListener = n.on = n.prependListener = n.once = n.prependOnceListener = n.removeListener = n.removeAllListeners = n.listeners = n.listenerCount = n.eventNames = n.write = n.flush = w, n.serializers = s, n._serialize = i, n._stdErrSerialize = l, n.child = function(...h) {
|
|
154
|
+
return O.call(this, a, ...h);
|
|
155
|
+
}, t && (n._logEvent = x());
|
|
156
|
+
function o() {
|
|
157
|
+
return g(this.level, this);
|
|
158
|
+
}
|
|
159
|
+
function b() {
|
|
160
|
+
return this._level;
|
|
161
|
+
}
|
|
162
|
+
function u(h) {
|
|
163
|
+
if (h !== "silent" && !this.levels.values[h])
|
|
164
|
+
throw Error("unknown level " + h);
|
|
165
|
+
this._level = h, y(this, a, n, "error"), y(this, a, n, "fatal"), y(this, a, n, "warn"), y(this, a, n, "info"), y(this, a, n, "debug"), y(this, a, n, "trace"), f.forEach((m) => {
|
|
166
|
+
y(this, a, n, m);
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
function O(h, m, j) {
|
|
170
|
+
if (!m)
|
|
171
|
+
throw new Error("missing bindings for child Pino");
|
|
172
|
+
j = j || {}, i && m.serializers && (j.serializers = m.serializers);
|
|
173
|
+
const P = j.serializers;
|
|
174
|
+
if (i && P) {
|
|
175
|
+
var z = Object.assign({}, s, P), V = e.browser.serialize === !0 ? Object.keys(z) : i;
|
|
176
|
+
delete m.serializers, D([m], V, z, this._stdErrSerialize);
|
|
177
|
+
}
|
|
178
|
+
function M(E) {
|
|
179
|
+
this._childLevel = (E._childLevel | 0) + 1, this.bindings = m, z && (this.serializers = z, this._serialize = V), t && (this._logEvent = x(
|
|
180
|
+
[].concat(E._logEvent.bindings, m)
|
|
181
|
+
));
|
|
182
|
+
}
|
|
183
|
+
M.prototype = this;
|
|
184
|
+
const _ = new M(this);
|
|
185
|
+
return B(this, _), _.child = function(...E) {
|
|
186
|
+
return O.call(this, h, ...E);
|
|
187
|
+
}, _.level = j.level || this.level, h.onChild(_), _;
|
|
188
|
+
}
|
|
189
|
+
return n;
|
|
190
|
+
}
|
|
191
|
+
function ee(e) {
|
|
192
|
+
const t = e.customLevels || {}, r = Object.assign({}, v.levels.values, t), s = Object.assign({}, v.levels.labels, te(t));
|
|
193
|
+
return {
|
|
194
|
+
values: r,
|
|
195
|
+
labels: s
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
function te(e) {
|
|
199
|
+
const t = {};
|
|
200
|
+
return Object.keys(e).forEach(function(r) {
|
|
201
|
+
t[e[r]] = r;
|
|
202
|
+
}), t;
|
|
203
|
+
}
|
|
204
|
+
v.levels = {
|
|
205
|
+
values: {
|
|
206
|
+
fatal: 60,
|
|
207
|
+
error: 50,
|
|
208
|
+
warn: 40,
|
|
209
|
+
info: 30,
|
|
210
|
+
debug: 20,
|
|
211
|
+
trace: 10
|
|
212
|
+
},
|
|
213
|
+
labels: {
|
|
214
|
+
10: "trace",
|
|
215
|
+
20: "debug",
|
|
216
|
+
30: "info",
|
|
217
|
+
40: "warn",
|
|
218
|
+
50: "error",
|
|
219
|
+
60: "fatal"
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
v.stdSerializers = U;
|
|
223
|
+
v.stdTimeFunctions = Object.assign({}, { nullTime: q, epochTime: H, unixTime: le, isoTime: ce });
|
|
224
|
+
function ne(e) {
|
|
225
|
+
const t = [];
|
|
226
|
+
e.bindings && t.push(e.bindings);
|
|
227
|
+
let r = e[F];
|
|
228
|
+
for (; r.parent; )
|
|
229
|
+
r = r.parent, r.logger.bindings && t.push(r.logger.bindings);
|
|
230
|
+
return t.reverse();
|
|
231
|
+
}
|
|
232
|
+
function y(e, t, r, s) {
|
|
233
|
+
if (Object.defineProperty(e, s, {
|
|
234
|
+
value: g(e.level, r) > g(s, r) ? w : r[A][s],
|
|
235
|
+
writable: !0,
|
|
236
|
+
enumerable: !0,
|
|
237
|
+
configurable: !0
|
|
238
|
+
}), e[s] === w) {
|
|
239
|
+
if (!t.transmit)
|
|
240
|
+
return;
|
|
241
|
+
const l = t.transmit.level || e.level, f = g(l, r);
|
|
242
|
+
if (g(s, r) < f)
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
e[s] = ie(e, t, r, s);
|
|
246
|
+
const i = ne(e);
|
|
247
|
+
i.length !== 0 && (e[s] = re(i, e[s]));
|
|
248
|
+
}
|
|
249
|
+
function re(e, t) {
|
|
250
|
+
return function() {
|
|
251
|
+
return t.apply(this, [...e, ...arguments]);
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
function ie(e, t, r, s) {
|
|
255
|
+
return /* @__PURE__ */ function(i) {
|
|
256
|
+
return function() {
|
|
257
|
+
const f = t.timestamp(), c = new Array(arguments.length), d = Object.getPrototypeOf && Object.getPrototypeOf(this) === L ? L : this;
|
|
258
|
+
for (var n = 0; n < c.length; n++)
|
|
259
|
+
c[n] = arguments[n];
|
|
260
|
+
var a = !1;
|
|
261
|
+
if (t.serialize && (D(c, this._serialize, this.serializers, this._stdErrSerialize), a = !0), t.asObject || t.formatters) {
|
|
262
|
+
const o = se(this, s, c, f, t);
|
|
263
|
+
if (t.reportCaller && o && o.length > 0 && o[0] && typeof o[0] == "object")
|
|
264
|
+
try {
|
|
265
|
+
const b = R();
|
|
266
|
+
b && (o[0].caller = b);
|
|
267
|
+
} catch {
|
|
268
|
+
}
|
|
269
|
+
i.call(d, ...o);
|
|
270
|
+
} else {
|
|
271
|
+
if (t.reportCaller)
|
|
272
|
+
try {
|
|
273
|
+
const o = R();
|
|
274
|
+
o && c.push(o);
|
|
275
|
+
} catch {
|
|
276
|
+
}
|
|
277
|
+
i.apply(d, c);
|
|
278
|
+
}
|
|
279
|
+
if (t.transmit) {
|
|
280
|
+
const o = t.transmit.level || e._level, b = g(o, r), u = g(s, r);
|
|
281
|
+
if (u < b)
|
|
282
|
+
return;
|
|
283
|
+
oe(this, {
|
|
284
|
+
ts: f,
|
|
285
|
+
methodLevel: s,
|
|
286
|
+
methodValue: u,
|
|
287
|
+
transmitLevel: o,
|
|
288
|
+
transmitValue: r.levels.values[t.transmit.level || e._level],
|
|
289
|
+
send: t.transmit.send,
|
|
290
|
+
val: g(e._level, r)
|
|
291
|
+
}, c, a);
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
}(e[A][s]);
|
|
295
|
+
}
|
|
296
|
+
function se(e, t, r, s, i) {
|
|
297
|
+
const {
|
|
298
|
+
level: l,
|
|
299
|
+
log: f = (o) => o
|
|
300
|
+
} = i.formatters || {}, c = r.slice();
|
|
301
|
+
let d = c[0];
|
|
302
|
+
const n = {};
|
|
303
|
+
let a = (e._childLevel | 0) + 1;
|
|
304
|
+
if (a < 1 && (a = 1), s && (n.time = s), l) {
|
|
305
|
+
const o = l(t, e.levels.values[t]);
|
|
306
|
+
Object.assign(n, o);
|
|
307
|
+
} else
|
|
308
|
+
n.level = e.levels.values[t];
|
|
309
|
+
if (i.asObjectBindingsOnly) {
|
|
310
|
+
if (d !== null && typeof d == "object")
|
|
311
|
+
for (; a-- && typeof c[0] == "object"; )
|
|
312
|
+
Object.assign(n, c.shift());
|
|
313
|
+
return [f(n), ...c];
|
|
314
|
+
} else {
|
|
315
|
+
if (d !== null && typeof d == "object") {
|
|
316
|
+
for (; a-- && typeof c[0] == "object"; )
|
|
317
|
+
Object.assign(n, c.shift());
|
|
318
|
+
d = c.length ? $(c.shift(), c) : void 0;
|
|
319
|
+
} else
|
|
320
|
+
typeof d == "string" && (d = $(c.shift(), c));
|
|
321
|
+
return d !== void 0 && (n[i.messageKey] = d), [f(n)];
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
function D(e, t, r, s) {
|
|
325
|
+
for (const i in e)
|
|
326
|
+
if (s && e[i] instanceof Error)
|
|
327
|
+
e[i] = v.stdSerializers.err(e[i]);
|
|
328
|
+
else if (typeof e[i] == "object" && !Array.isArray(e[i]) && t)
|
|
329
|
+
for (const l in e[i])
|
|
330
|
+
t.indexOf(l) > -1 && l in r && (e[i][l] = r[l](e[i][l]));
|
|
331
|
+
}
|
|
332
|
+
function oe(e, t, r, s = !1) {
|
|
333
|
+
const i = t.send, l = t.ts, f = t.methodLevel, c = t.methodValue, d = t.val, n = e._logEvent.bindings;
|
|
334
|
+
s || D(
|
|
335
|
+
r,
|
|
336
|
+
e._serialize || Object.keys(e.serializers),
|
|
337
|
+
e.serializers,
|
|
338
|
+
e._stdErrSerialize === void 0 ? !0 : e._stdErrSerialize
|
|
339
|
+
), e._logEvent.ts = l, e._logEvent.messages = r.filter(function(a) {
|
|
340
|
+
return n.indexOf(a) === -1;
|
|
341
|
+
}), e._logEvent.level.label = f, e._logEvent.level.value = c, i(f, e._logEvent, d), e._logEvent = x(n);
|
|
342
|
+
}
|
|
343
|
+
function x(e) {
|
|
344
|
+
return {
|
|
345
|
+
ts: 0,
|
|
346
|
+
messages: [],
|
|
347
|
+
bindings: e || [],
|
|
348
|
+
level: { label: "", value: 0 }
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
function I(e) {
|
|
352
|
+
const t = {
|
|
353
|
+
type: e.constructor.name,
|
|
354
|
+
msg: e.message,
|
|
355
|
+
stack: e.stack
|
|
356
|
+
};
|
|
357
|
+
for (const r in e)
|
|
358
|
+
t[r] === void 0 && (t[r] = e[r]);
|
|
359
|
+
return t;
|
|
360
|
+
}
|
|
361
|
+
function ae(e) {
|
|
362
|
+
return typeof e.timestamp == "function" ? e.timestamp : e.timestamp === !1 ? q : H;
|
|
363
|
+
}
|
|
364
|
+
function S() {
|
|
365
|
+
return {};
|
|
366
|
+
}
|
|
367
|
+
function C(e) {
|
|
368
|
+
return e;
|
|
369
|
+
}
|
|
370
|
+
function w() {
|
|
371
|
+
}
|
|
372
|
+
function q() {
|
|
373
|
+
return !1;
|
|
374
|
+
}
|
|
375
|
+
function H() {
|
|
376
|
+
return Date.now();
|
|
377
|
+
}
|
|
378
|
+
function le() {
|
|
379
|
+
return Math.round(Date.now() / 1e3);
|
|
380
|
+
}
|
|
381
|
+
function ce() {
|
|
382
|
+
return new Date(Date.now()).toISOString();
|
|
383
|
+
}
|
|
384
|
+
function ue() {
|
|
385
|
+
function e(t) {
|
|
386
|
+
return typeof t < "u" && t;
|
|
387
|
+
}
|
|
388
|
+
try {
|
|
389
|
+
return typeof globalThis < "u" || Object.defineProperty(Object.prototype, "globalThis", {
|
|
390
|
+
get: function() {
|
|
391
|
+
return delete Object.prototype.globalThis, this.globalThis = this;
|
|
392
|
+
},
|
|
393
|
+
configurable: !0
|
|
394
|
+
}), globalThis;
|
|
395
|
+
} catch {
|
|
396
|
+
return e(self) || e(window) || e(this) || {};
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
T.exports.default = v;
|
|
400
|
+
T.exports.pino = v;
|
|
401
|
+
function R() {
|
|
402
|
+
const e = new Error().stack;
|
|
403
|
+
if (!e)
|
|
404
|
+
return null;
|
|
405
|
+
const t = e.split(`
|
|
406
|
+
`);
|
|
407
|
+
for (let r = 1; r < t.length; r++) {
|
|
408
|
+
const s = t[r].trim();
|
|
409
|
+
if (/(^at\s+)?(createWrap|LOG|set\s*\(|asObject|Object\.apply|Function\.apply)/.test(s) || s.indexOf("browser.js") !== -1 || s.indexOf("node:internal") !== -1 || s.indexOf("node_modules") !== -1)
|
|
410
|
+
continue;
|
|
411
|
+
let i = s.match(/\((.*?):(\d+):(\d+)\)/);
|
|
412
|
+
if (i || (i = s.match(/at\s+(.*?):(\d+):(\d+)/)), i) {
|
|
413
|
+
const l = i[1], f = i[2], c = i[3];
|
|
414
|
+
return l + ":" + f + ":" + c;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
return null;
|
|
418
|
+
}
|
|
419
|
+
var fe = T.exports;
|
|
420
|
+
const p = /* @__PURE__ */ G(fe);
|
|
421
|
+
class k {
|
|
422
|
+
constructor(t) {
|
|
423
|
+
this._inner = t;
|
|
424
|
+
}
|
|
425
|
+
info(t, r) {
|
|
426
|
+
this._inner.info(t, r);
|
|
427
|
+
}
|
|
428
|
+
error(t, r) {
|
|
429
|
+
this._inner.error(t, r);
|
|
430
|
+
}
|
|
431
|
+
debug(t, r) {
|
|
432
|
+
this._inner.debug(t, r);
|
|
433
|
+
}
|
|
434
|
+
warn(t, r) {
|
|
435
|
+
this._inner.warn(t, r);
|
|
436
|
+
}
|
|
437
|
+
/** Access the underlying pino logger for advanced usage. */
|
|
438
|
+
get pino() {
|
|
439
|
+
return this._inner;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
function de(e, t) {
|
|
443
|
+
const r = e.ctx.get(k);
|
|
444
|
+
if (r !== void 0)
|
|
445
|
+
return r;
|
|
446
|
+
const s = new k(t.pino.child({ op: e.operation.id }));
|
|
447
|
+
return e.ctx.set(k, s), s;
|
|
448
|
+
}
|
|
449
|
+
function he(e) {
|
|
450
|
+
const t = e.level ?? "info", r = typeof e.destination == "string" && e.destination.length > 0, s = !r && !!process.stderr.isTTY, i = e.format ?? (s ? "pretty" : "json");
|
|
451
|
+
let l;
|
|
452
|
+
if (i === "pretty")
|
|
453
|
+
l = p({
|
|
454
|
+
level: t,
|
|
455
|
+
transport: {
|
|
456
|
+
target: "pino-pretty",
|
|
457
|
+
options: {
|
|
458
|
+
colorize: !r,
|
|
459
|
+
translateTime: "SYS:HH:MM:ss.l",
|
|
460
|
+
ignore: "pid,hostname",
|
|
461
|
+
...r ? { destination: e.destination, mkdir: !0 } : { destination: 2 }
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
});
|
|
465
|
+
else {
|
|
466
|
+
const f = r ? p.destination({
|
|
467
|
+
dest: e.destination,
|
|
468
|
+
mkdir: !0,
|
|
469
|
+
sync: !0
|
|
470
|
+
}) : p.destination(2);
|
|
471
|
+
l = p({ level: t }, f);
|
|
472
|
+
}
|
|
473
|
+
return new k(l);
|
|
474
|
+
}
|
|
475
|
+
const be = new k(p({ level: "info" }, p.destination(2)));
|
|
476
|
+
function W(e) {
|
|
477
|
+
return function(r, s) {
|
|
478
|
+
const i = de(r, e), l = r.operation.id, f = Date.now();
|
|
479
|
+
i.info({ op: l }, `→ ${l}`);
|
|
480
|
+
const c = s();
|
|
481
|
+
function d(n) {
|
|
482
|
+
return n !== null && typeof n == "object" && Symbol.asyncIterator in n;
|
|
483
|
+
}
|
|
484
|
+
return d(c) ? async function* () {
|
|
485
|
+
let a = 0;
|
|
486
|
+
try {
|
|
487
|
+
for await (const o of c)
|
|
488
|
+
a++, i.debug({ op: l, chunk: a }, `chunk ${a}`), yield o;
|
|
489
|
+
i.info({ op: l, ms: Date.now() - f, chunks: a }, `← ${l} ok`);
|
|
490
|
+
} catch (o) {
|
|
491
|
+
throw i.error({ op: l, ms: Date.now() - f, err: o }, `✗ ${l} stream error`), o;
|
|
492
|
+
}
|
|
493
|
+
}() : c.then(
|
|
494
|
+
(n) => (i.info({ op: l, ms: Date.now() - f }, `← ${l} ok`), n),
|
|
495
|
+
(n) => {
|
|
496
|
+
throw i.error({ op: l, ms: Date.now() - f, err: n }, `✗ ${l} error`), n;
|
|
497
|
+
}
|
|
498
|
+
);
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
const N = {
|
|
502
|
+
id: "logger",
|
|
503
|
+
description: "Layer plugin: wraps every operation with entry/exit/error logging (SPEC §7.2a / §8.1). Seeds Logger into call.ctx for downstream consumers.",
|
|
504
|
+
optionsSchema: {
|
|
505
|
+
type: "object",
|
|
506
|
+
properties: {
|
|
507
|
+
level: {
|
|
508
|
+
type: "string",
|
|
509
|
+
description: "pino log level (trace|debug|info|warn|error|fatal). Default: info.",
|
|
510
|
+
default: "info"
|
|
511
|
+
},
|
|
512
|
+
format: {
|
|
513
|
+
type: "string",
|
|
514
|
+
enum: ["json", "pretty"],
|
|
515
|
+
description: "Log output format. Default: pretty on a TTY stderr, json otherwise."
|
|
516
|
+
},
|
|
517
|
+
destination: {
|
|
518
|
+
type: "string",
|
|
519
|
+
description: "File path to write logs to. Default: stderr (fd 2). Never stdout."
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
capabilities: {
|
|
524
|
+
// ------------------------------------------------------------------
|
|
525
|
+
// target — retained as a no-op scaffold (generate-only, no serve).
|
|
526
|
+
// The logger plugin does not project descriptor operations to
|
|
527
|
+
// files; this block ensures `--type logger` does not throw.
|
|
528
|
+
// ------------------------------------------------------------------
|
|
529
|
+
target: {
|
|
530
|
+
name: "logger",
|
|
531
|
+
generate(e, t) {
|
|
532
|
+
return [];
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
// ------------------------------------------------------------------
|
|
536
|
+
// layer — the operative capability (SPEC §7.1 / §8 / §8.1 / §11).
|
|
537
|
+
//
|
|
538
|
+
// The layer function is built lazily on first call so opts (log level,
|
|
539
|
+
// format, destination) resolved at compose time are baked into the
|
|
540
|
+
// root logger instance. For simplicity the default export uses the
|
|
541
|
+
// module-level `_defaultRoot` logger. Consumers that need per-request
|
|
542
|
+
// option control should construct a plugin instance via `makeLoggerPlugin`.
|
|
543
|
+
// ------------------------------------------------------------------
|
|
544
|
+
layer: {
|
|
545
|
+
layer: W(be)
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
function me(e = {}) {
|
|
550
|
+
const t = he(e);
|
|
551
|
+
return {
|
|
552
|
+
...N,
|
|
553
|
+
capabilities: {
|
|
554
|
+
...N.capabilities,
|
|
555
|
+
layer: {
|
|
556
|
+
layer: W(t)
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
export {
|
|
562
|
+
k as Logger,
|
|
563
|
+
N as default,
|
|
564
|
+
N as loggerPlugin,
|
|
565
|
+
me as makeLoggerPlugin
|
|
566
|
+
};
|
package/lib/plugin.d.ts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Plugin } from '@adhd/apigen-core';
|
|
2
|
+
import { Logger as PinoLogger } from 'pino';
|
|
3
|
+
|
|
4
|
+
export interface LoggerOptions {
|
|
5
|
+
/** pino log level. Default: `info`. */
|
|
6
|
+
level?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Output format. `pretty` is colorized human-readable; `json` is raw jsonl.
|
|
9
|
+
* Default: `pretty` when stderr is a TTY, else `json`.
|
|
10
|
+
*/
|
|
11
|
+
format?: 'json' | 'pretty';
|
|
12
|
+
/**
|
|
13
|
+
* Where logs are written. Default: stderr (fd 2) — NEVER stdout, which is the
|
|
14
|
+
* MCP stdio JSON-RPC channel.
|
|
15
|
+
*/
|
|
16
|
+
destination?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Typed ctx extension key for the per-request pino Logger (SPEC §8.1 rule 3).
|
|
20
|
+
*
|
|
21
|
+
* Layers insert a Logger bound to this key; downstream layers and domain
|
|
22
|
+
* functions retrieve it via `call.ctx.get(Logger)`.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* // In the logger layer (already done by loggerPlugin):
|
|
27
|
+
* call.ctx.set(Logger, pinoInstance.child({ op: call.operation.id }))
|
|
28
|
+
* // In a downstream layer or domain function:
|
|
29
|
+
* const log = call.ctx.get(Logger)
|
|
30
|
+
* log?.info('hello from domain fn')
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare class Logger {
|
|
34
|
+
private readonly _inner;
|
|
35
|
+
constructor(_inner: PinoLogger);
|
|
36
|
+
info(obj: Record<string, unknown>, msg: string): void;
|
|
37
|
+
error(obj: Record<string, unknown>, msg: string): void;
|
|
38
|
+
debug(obj: Record<string, unknown>, msg: string): void;
|
|
39
|
+
warn(obj: Record<string, unknown>, msg: string): void;
|
|
40
|
+
/** Access the underlying pino logger for advanced usage. */
|
|
41
|
+
get pino(): PinoLogger;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* v2 logger plugin (SPEC §7.2a / SPEC §8.1).
|
|
45
|
+
*
|
|
46
|
+
* Implements the `layer` capability only — it wraps every operation, logs
|
|
47
|
+
* entry/exit/error, and is stream-lifecycle aware (SPEC §11).
|
|
48
|
+
*
|
|
49
|
+
* Also seeds the per-request {@link Logger} into `call.ctx` so downstream
|
|
50
|
+
* layers and domain functions can read it via `call.ctx.get(Logger)`.
|
|
51
|
+
*
|
|
52
|
+
* The `target` capability is retained as a pass-through scaffold so the plugin
|
|
53
|
+
* can still be selected via `--type logger` without errors; it emits no files.
|
|
54
|
+
*/
|
|
55
|
+
export declare const loggerPlugin: Plugin<LoggerOptions>;
|
|
56
|
+
/**
|
|
57
|
+
* Factory that returns a fully-configured logger plugin instance.
|
|
58
|
+
*
|
|
59
|
+
* Use this when you need per-deployment log level, format, or destination
|
|
60
|
+
* control at compose time rather than relying on the default export's
|
|
61
|
+
* built-in json/stderr defaults.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* import { makeLoggerPlugin } from '@adhd/apigen-plugin-logger'
|
|
66
|
+
* const invoke = createInvoker([makeLoggerPlugin({ level: 'debug', format: 'pretty' })])
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
export declare function makeLoggerPlugin(opts?: LoggerOptions): Plugin<LoggerOptions>;
|
|
70
|
+
export default loggerPlugin;
|
package/package.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@adhd/apigen-plugin-logger",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"main": "./index.js",
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"@adhd/apigen-core": "^0.1.0",
|
|
7
|
+
"pino": "10.3.1"
|
|
8
|
+
},
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"module": "./index.mjs",
|
|
13
|
+
"types": "./index.d.ts"
|
|
14
|
+
}
|