@naman_deep_singh/http-response 3.3.0 → 3.3.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @naman_deep_singh/http-response
2
2
 
3
- **Version:** 3.3.0
3
+ **Version:** 3.3.2
4
4
 
5
5
  A flexible, framework-agnostic **TypeScript response utility library** for building consistent, typed, and configurable API responses.
6
6
 
@@ -1,3 +1,3 @@
1
1
  import { ExpressResponder } from '../adapters/express/ExpressResponder.js';
2
- import { type ResponderConfig } from './config.js';
2
+ import type { ResponderConfig } from './config.js';
3
3
  export declare const createResponderFactory: (cfg?: Partial<ResponderConfig>) => <P = unknown, _M = Record<string, unknown>>(res: import("express").Response) => ExpressResponder<P>;
@@ -1,3 +1,3 @@
1
- import { type RequestHandler } from 'express';
2
- import { type ResponderConfig } from '../../core/config.js';
1
+ import type { RequestHandler } from 'express';
2
+ import type { ResponderConfig } from '../../core/config.js';
3
3
  export declare const responderMiddleware: (cfg?: Partial<ResponderConfig>) => RequestHandler;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naman_deep_singh/http-response",
3
- "version": "3.3.0",
3
+ "version": "3.3.2",
4
4
  "description": "TypeScript utilities for standardized API responses",
5
5
  "author": "Naman Deep Singh",
6
6
  "license": "MIT",
@@ -49,6 +49,7 @@
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/express": "^5.0.5",
52
+ "@types/node": "^25.0.1",
52
53
  "express": "^5.1.0",
53
54
  "typescript": "^5.9.3",
54
55
  "rimraf": "^5.0.5"
@@ -1,5 +1,5 @@
1
1
  import { ExpressResponder } from '../adapters/express/ExpressResponder.js'
2
- import { type ResponderConfig } from './config.js'
2
+ import type { ResponderConfig } from './config.js'
3
3
 
4
4
  export const createResponderFactory = (cfg?: Partial<ResponderConfig>) => {
5
5
  return <P = unknown, _M = Record<string, unknown>>(
package/src/core/index.ts CHANGED
@@ -10,10 +10,10 @@ export { defaultConfig } from './config.js'
10
10
 
11
11
  // Core types (explicit)
12
12
  export type {
13
- ResponseEnvelope,
14
- ErrorShape,
15
- PaginationMeta,
16
- PlainObject,
17
- Sender,
18
- TransportResult,
13
+ ResponseEnvelope,
14
+ ErrorShape,
15
+ PaginationMeta,
16
+ PlainObject,
17
+ Sender,
18
+ TransportResult,
19
19
  } from './types.js'
@@ -1,5 +1,5 @@
1
- import { type RequestHandler } from 'express'
2
- import { type ResponderConfig } from '../../core/config.js'
1
+ import type { RequestHandler } from 'express'
2
+ import type { ResponderConfig } from '../../core/config.js'
3
3
  import { createResponderFactory } from '../../core/factory.js'
4
4
 
5
5
  export const responderMiddleware = (
@@ -8,7 +8,7 @@ export const responderMiddleware = (
8
8
  const factory = createResponderFactory(cfg)
9
9
 
10
10
  return (_req, res, next) => {
11
- ; (res as any).responder = <P = unknown>() => factory<P>(res)
11
+ ;(res as any).responder = <P = unknown>() => factory<P>(res)
12
12
  next()
13
13
  }
14
14
  }
@@ -1 +1 @@
1
- export { responderMiddleware } from './expressMiddleware.js'
1
+ export { responderMiddleware } from './expressMiddleware.js'
@@ -1 +1 @@
1
- export { responderMiddleware } from './express/index.js'
1
+ export { responderMiddleware } from './express/index.js'