@rym-lib/inversify-bundler-express 1.4.7 → 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 CHANGED
@@ -34,7 +34,7 @@ var container = (...modules) => {
34
34
  )
35
35
  );
36
36
  const container2 = new import_inversify_bundler.Container();
37
- container2.load(...bundler.resolve());
37
+ container2.loadSync(...bundler.resolve());
38
38
  req.container = container2;
39
39
  next();
40
40
  };
@@ -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.load(...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,KAAK,GAAG,QAAQ,QAAQ,CAAC;AAEnC,QAAI,YAAYA;AAEhB,SAAK;AAAA,EACP;AAEA,SAAO;AACT;","names":["module","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
@@ -11,7 +11,7 @@ var container = (...modules) => {
11
11
  )
12
12
  );
13
13
  const container2 = new Container();
14
- container2.load(...bundler.resolve());
14
+ container2.loadSync(...bundler.resolve());
15
15
  req.container = container2;
16
16
  next();
17
17
  };
@@ -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.load(...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,KAAK,GAAG,QAAQ,QAAQ,CAAC;AAEnC,QAAI,YAAYA;AAEhB,SAAK;AAAA,EACP;AAEA,SAAO;AACT;","names":["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.4.7",
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.4.7",
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.4.7",
45
+ "@rym-lib/inversify-bundler": ">=1.5.0",
46
46
  "express": ">=4.0.0"
47
47
  }
48
48
  }