@rym-lib/inversify-bundler-express 1.4.6 → 1.5.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/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/index.mjs +1 -1
- package/build/index.mjs.map +1 -1
- package/package.json +3 -3
package/build/index.js
CHANGED
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/express.ts"],"sourcesContent":["export * from './express'\n","import { Request, RequestHandler, Response } from 'express'\n\nimport {\n Bundler,\n Container,\n ContainerInterface,\n ModuleInput,\n} from '@rym-lib/inversify-bundler'\n\ndeclare module 'express-serve-static-core' {\n interface Request {\n container: ContainerInterface\n }\n}\n\nexport const container = (\n ...modules: (ModuleInput | ((req: Request, res: Response) => Bundler))[]\n) => {\n const handler: RequestHandler = (req, res, next) => {\n const bundler = new Bundler(\n ...modules.map((module) =>\n typeof module === 'function' ? module(req, res) : module,\n ),\n )\n\n const container = new Container()\n container.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/express.ts"],"sourcesContent":["export * from './express'\n","import { Request, RequestHandler, Response } from 'express'\n\nimport {\n Bundler,\n Container,\n ContainerInterface,\n ModuleInput,\n} from '@rym-lib/inversify-bundler'\n\ndeclare module 'express-serve-static-core' {\n interface Request {\n container: ContainerInterface\n }\n}\n\nexport const container = (\n ...modules: (ModuleInput | ((req: Request, res: Response) => Bundler))[]\n) => {\n const handler: RequestHandler = (req, res, next) => {\n const bundler = new Bundler(\n ...modules.map((module) =>\n typeof module === 'function' ? module(req, res) : module,\n ),\n )\n\n const container = new Container()\n container.loadSync(...bundler.resolve())\n\n req.container = container\n\n next()\n }\n\n return handler\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,+BAKO;AAQA,IAAM,YAAY,IACpB,YACA;AACH,QAAM,UAA0B,CAAC,KAAK,KAAK,SAAS;AAClD,UAAM,UAAU,IAAI;AAAA,MAClB,GAAG,QAAQ;AAAA,QAAI,CAACA,YACd,OAAOA,YAAW,aAAaA,QAAO,KAAK,GAAG,IAAIA;AAAA,MACpD;AAAA,IACF;AAEA,UAAMC,aAAY,IAAI,mCAAU;AAChC,IAAAA,WAAU,SAAS,GAAG,QAAQ,QAAQ,CAAC;AAEvC,QAAI,YAAYA;AAEhB,SAAK;AAAA,EACP;AAEA,SAAO;AACT;","names":["module","container"]}
|
package/build/index.mjs
CHANGED
package/build/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/express.ts"],"sourcesContent":["import { Request, RequestHandler, Response } from 'express'\n\nimport {\n Bundler,\n Container,\n ContainerInterface,\n ModuleInput,\n} from '@rym-lib/inversify-bundler'\n\ndeclare module 'express-serve-static-core' {\n interface Request {\n container: ContainerInterface\n }\n}\n\nexport const container = (\n ...modules: (ModuleInput | ((req: Request, res: Response) => Bundler))[]\n) => {\n const handler: RequestHandler = (req, res, next) => {\n const bundler = new Bundler(\n ...modules.map((module) =>\n typeof module === 'function' ? module(req, res) : module,\n ),\n )\n\n const container = new Container()\n container.
|
|
1
|
+
{"version":3,"sources":["../src/express.ts"],"sourcesContent":["import { Request, RequestHandler, Response } from 'express'\n\nimport {\n Bundler,\n Container,\n ContainerInterface,\n ModuleInput,\n} from '@rym-lib/inversify-bundler'\n\ndeclare module 'express-serve-static-core' {\n interface Request {\n container: ContainerInterface\n }\n}\n\nexport const container = (\n ...modules: (ModuleInput | ((req: Request, res: Response) => Bundler))[]\n) => {\n const handler: RequestHandler = (req, res, next) => {\n const bundler = new Bundler(\n ...modules.map((module) =>\n typeof module === 'function' ? module(req, res) : module,\n ),\n )\n\n const container = new Container()\n container.loadSync(...bundler.resolve())\n\n req.container = container\n\n next()\n }\n\n return handler\n}\n"],"mappings":";AAEA;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AAQA,IAAM,YAAY,IACpB,YACA;AACH,QAAM,UAA0B,CAAC,KAAK,KAAK,SAAS;AAClD,UAAM,UAAU,IAAI;AAAA,MAClB,GAAG,QAAQ;AAAA,QAAI,CAAC,WACd,OAAO,WAAW,aAAa,OAAO,KAAK,GAAG,IAAI;AAAA,MACpD;AAAA,IACF;AAEA,UAAMA,aAAY,IAAI,UAAU;AAChC,IAAAA,WAAU,SAAS,GAAG,QAAQ,QAAQ,CAAC;AAEvC,QAAI,YAAYA;AAEhB,SAAK;AAAA,EACP;AAEA,SAAO;AACT;","names":["container"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rym-lib/inversify-bundler-express",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@rym-lib/dev-config": "*",
|
|
36
|
-
"@rym-lib/inversify-bundler": "1.
|
|
36
|
+
"@rym-lib/inversify-bundler": "1.5.0",
|
|
37
37
|
"@types/express": "^5.0.0",
|
|
38
38
|
"@types/node": "^22.9.0",
|
|
39
39
|
"express": "^4.21.1",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"vitest": "^2.1.5"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@rym-lib/inversify-bundler": ">=1.
|
|
45
|
+
"@rym-lib/inversify-bundler": ">=1.5.0",
|
|
46
46
|
"express": ">=4.0.0"
|
|
47
47
|
}
|
|
48
48
|
}
|