@looopy-ai/aws 2.0.0 → 2.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.
@@ -4,7 +4,7 @@ import type pino from 'pino';
4
4
  export type ServeConfig = {
5
5
  agent: (contextId: string) => Promise<Agent>;
6
6
  decodeAuthorization?: (authorization: string) => Promise<AuthContext | null>;
7
- logger: pino.Logger;
7
+ logger?: pino.Logger;
8
8
  port?: number;
9
9
  };
10
10
  export type HonoVariables = {
@@ -10,11 +10,12 @@ export const hono = (config) => {
10
10
  app.use(requestId());
11
11
  app.use('*', async (c, next) => {
12
12
  const requestId = c.var.requestId;
13
- const child = (config.logger.child ?? getLogger)({
13
+ const requestContext = {
14
14
  requestId,
15
15
  method: c.req.method,
16
16
  path: c.req.path,
17
- });
17
+ };
18
+ const child = config.logger?.child(requestContext) ?? getLogger(requestContext);
18
19
  const start = performance.now();
19
20
  c.set('logger', child);
20
21
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@looopy-ai/aws",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "AWS storage and providers for Looopy AI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",