inversify-typesafe-spring-like 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/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2025 Myeongjae Kim
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,23 @@
1
+ <h1 align="center">inversify-typesafe-spring-like</h1>
2
+
3
+ <p align="center">
4
+ Add-On Library for inversify-typesafe to make it more like <a href="https://spring.io/" target="_blank">Spring</a>.
5
+ </p>
6
+
7
+ <p align="center">
8
+ <a href="https://github.com/myeongjae-kim/inversify-typesafe-spring-like/actions?query=workflow%3ACI">
9
+ <img src="https://github.com/myeongjae-kim/inversify-typesafe-spring-like/workflows/CI/badge.svg" alt="CI" height="18">
10
+ </a>
11
+ <a href="https://codecov.io/gh/myeongjae-kim/inversify-typesafe-spring-like">
12
+ <img src="https://img.shields.io/codecov/c/github/myeongjae-kim/inversify-typesafe-spring-like.svg" alt="Test Coverage" height="18">
13
+ </a>
14
+ <a href="https://www.npmjs.com/package/inversify-typesafe-spring-like">
15
+ <img src="https://img.shields.io/npm/v/inversify-typesafe-spring-like.svg" alt="npm version" height="18">
16
+ </a>
17
+ <a href="https://bundlephobia.com/package/inversify-typesafe-spring-like">
18
+ <img src="https://img.shields.io/bundlephobia/minzip/inversify-typesafe-spring-like" alt="Bundle Size" height="18">
19
+ </a>
20
+ <a href="https://raw.githubusercontent.com/myeongjae-kim/inversify-typesafe-spring-like/main/LICENSE">
21
+ <img src="https://img.shields.io/npm/l/inversify-typesafe-spring-like.svg" alt="MIT license" height="18">
22
+ </a>
23
+ </p>
package/dist/index.cjs ADDED
@@ -0,0 +1,2 @@
1
+ var t=require("inversify-typesafe");function e(){return e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},e.apply(null,arguments)}function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}exports.ApplicationContext=/*#__PURE__*/function(t){function n(r,n){return t.call(this,r,e({defaultScope:"Singleton"},n))||this}var o,i;return i=t,(o=n).prototype=Object.create(i.prototype),o.prototype.constructor=o,r(o,i),n}(t.ContainerTypesafe),exports.returnAutowired=function(){return{Autowired:t.returnInjectTypesafe()}};
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["import { ContainerOptions } from \"inversify\";\nimport { ContainerTypesafe, returnInjectTypesafe, TypesafeServiceConfig } from \"inversify-typesafe\";\n\nexport const returnAutowired = <Name extends string>() => ({ Autowired: returnInjectTypesafe<Name>() });\n\nexport class ApplicationContext<S extends Record<string, unknown>> extends ContainerTypesafe<S> {\n constructor(serviceConfig: TypesafeServiceConfig<S>, options?: ContainerOptions) {\n super(serviceConfig, { defaultScope: \"Singleton\", ...options });\n }\n}"],"names":["_ContainerTypesafe","ApplicationContext","serviceConfig","options","call","_extends","defaultScope","this","ContainerTypesafe","Autowired","returnInjectTypesafe"],"mappings":"6ZAKmE,SAAAA,GACjE,SAAAC,EAAYC,EAAyCC,GAA0B,OAC7EH,EAAAI,KAAMF,KAAAA,EAAaG,GAAIC,aAAc,aAAgBH,KAAUI,IACjE,SAACN,SAAAD,KAAAC,yEAAAA,CAAA,CAHgE,CAAQO,EAAoBA,2CAFhE,WAA4B,MAAA,CAAEC,UAAWC,EAAoBA,uBAAU"}
@@ -0,0 +1,8 @@
1
+ import { ContainerOptions } from "inversify";
2
+ import { ContainerTypesafe, TypesafeServiceConfig } from "inversify-typesafe";
3
+ export declare const returnAutowired: <Name extends string>() => {
4
+ Autowired: (name: Name) => MethodDecorator & ParameterDecorator & PropertyDecorator;
5
+ };
6
+ export declare class ApplicationContext<S extends Record<string, unknown>> extends ContainerTypesafe<S> {
7
+ constructor(serviceConfig: TypesafeServiceConfig<S>, options?: ContainerOptions);
8
+ }
@@ -0,0 +1,8 @@
1
+ import { ContainerOptions } from "inversify";
2
+ import { ContainerTypesafe, TypesafeServiceConfig } from "inversify-typesafe";
3
+ export declare const returnAutowired: <Name extends string>() => {
4
+ Autowired: (name: Name) => MethodDecorator & ParameterDecorator & PropertyDecorator;
5
+ };
6
+ export declare class ApplicationContext<S extends Record<string, unknown>> extends ContainerTypesafe<S> {
7
+ constructor(serviceConfig: TypesafeServiceConfig<S>, options?: ContainerOptions);
8
+ }
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ import{returnInjectTypesafe as n,ContainerTypesafe as r}from"inversify-typesafe";function t(){return t=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var e in t)({}).hasOwnProperty.call(t,e)&&(n[e]=t[e])}return n},t.apply(null,arguments)}const e=()=>({Autowired:n()});class o extends r{constructor(n,r){super(n,t({defaultScope:"Singleton"},r))}}export{o as ApplicationContext,e as returnAutowired};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import { ContainerOptions } from \"inversify\";\nimport { ContainerTypesafe, returnInjectTypesafe, TypesafeServiceConfig } from \"inversify-typesafe\";\n\nexport const returnAutowired = <Name extends string>() => ({ Autowired: returnInjectTypesafe<Name>() });\n\nexport class ApplicationContext<S extends Record<string, unknown>> extends ContainerTypesafe<S> {\n constructor(serviceConfig: TypesafeServiceConfig<S>, options?: ContainerOptions) {\n super(serviceConfig, { defaultScope: \"Singleton\", ...options });\n }\n}"],"names":["returnAutowired","Autowired","returnInjectTypesafe","ApplicationContext","ContainerTypesafe","constructor","serviceConfig","options","super","_extends","defaultScope"],"mappings":"ySAGa,MAAAA,EAAkBA,KAAAA,CAA8BC,UAAWC,MAE3D,MAAAC,UAA8DC,EACzEC,WAAAA,CAAYC,EAAyCC,GACnDC,MAAMF,EAAaG,EAAA,CAAIC,aAAc,aAAgBH,GACvD"}
@@ -0,0 +1,2 @@
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("inversify-typesafe")):"function"==typeof define&&define.amd?define(["exports","inversify-typesafe"],t):t((e||self).inversifyTypesafeSpringLike={},e.inversifyTypesafe)}(this,function(e,t){function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(null,arguments)}function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}e.ApplicationContext=/*#__PURE__*/function(e){function t(t,r){return e.call(this,t,n({defaultScope:"Singleton"},r))||this}var o,i;return i=e,(o=t).prototype=Object.create(i.prototype),o.prototype.constructor=o,r(o,i),t}(t.ContainerTypesafe),e.returnAutowired=function(){return{Autowired:t.returnInjectTypesafe()}}});
2
+ //# sourceMappingURL=index.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.umd.js","sources":["../src/index.ts"],"sourcesContent":["import { ContainerOptions } from \"inversify\";\nimport { ContainerTypesafe, returnInjectTypesafe, TypesafeServiceConfig } from \"inversify-typesafe\";\n\nexport const returnAutowired = <Name extends string>() => ({ Autowired: returnInjectTypesafe<Name>() });\n\nexport class ApplicationContext<S extends Record<string, unknown>> extends ContainerTypesafe<S> {\n constructor(serviceConfig: TypesafeServiceConfig<S>, options?: ContainerOptions) {\n super(serviceConfig, { defaultScope: \"Singleton\", ...options });\n }\n}"],"names":["_ContainerTypesafe","ApplicationContext","serviceConfig","options","call","_extends","defaultScope","this","ContainerTypesafe","Autowired","returnInjectTypesafe"],"mappings":"irBAKmE,SAAAA,GACjE,SAAAC,EAAYC,EAAyCC,GAA0B,OAC7EH,EAAAI,KAAMF,KAAAA,EAAaG,GAAIC,aAAc,aAAgBH,KAAUI,IACjE,SAACN,SAAAD,KAAAC,yEAAAA,CAAA,CAHgE,CAAQO,EAAoBA,qCAFhE,WAA4B,MAAA,CAAEC,UAAWC,EAAoBA,uBAAU"}
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "inversify-typesafe-spring-like",
3
+ "type": "module",
4
+ "version": "0.1.0",
5
+ "description": "Add-On Library for inversify-typesafe to make it more like Spring.",
6
+ "source": "src/index.ts",
7
+ "exports": {
8
+ ".": {
9
+ "require": {
10
+ "types": "./dist/index.d.cts",
11
+ "default": "./dist/index.cjs"
12
+ },
13
+ "import": {
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./dist/index.js"
16
+ },
17
+ "types": "./dist/index.d.ts",
18
+ "default": "./dist/index.js"
19
+ },
20
+ "./package.json": "./package.json"
21
+ },
22
+ "types": "dist/index.d.ts",
23
+ "main": "dist/index.cjs",
24
+ "module": "dist/index.js",
25
+ "unpkg": "dist/index.umd.js",
26
+ "files": [
27
+ "dist/**/*",
28
+ "package.json"
29
+ ],
30
+ "scripts": {
31
+ "preinstall": "npx only-allow pnpm",
32
+ "setup": "husky install",
33
+ "clean": "rimraf dist",
34
+ "bundle": "microbundle --format modern,cjs,umd",
35
+ "typedoc": "typedoc src/index.ts --out docs/public/docs",
36
+ "build": "pnpm run clean && pnpm run bundle && sh ../../scripts/generate-cts.sh && rimraf dist/index.d.ts\\'\\'",
37
+ "dev": "microbundle watch",
38
+ "prepublishOnly": "pnpm run test && pnpm run build",
39
+ "watch": "pnpm run clean && tsc -w",
40
+ "test": "vitest run --dir tests",
41
+ "test:watch": "vitest --dir tests",
42
+ "coverage": "vitest run --coverage --dir tests",
43
+ "prettier": "prettier . --write",
44
+ "lint": "eslint src/**",
45
+ "lint-staged": "lint-staged",
46
+ "check": "tsc --strict --noEmit --extendedDiagnostics",
47
+ "set-version": "sh ./scripts/set-version.sh"
48
+ },
49
+ "repository": {
50
+ "type": "git",
51
+ "url": "https://github.com/myeongjae-kim/inversify-typesafe"
52
+ },
53
+ "homepage": "https://github.com/myeongjae-kim/inversify-typesafe",
54
+ "keywords": [
55
+ "inversify",
56
+ "spring",
57
+ "di",
58
+ "dependency injection",
59
+ "container"
60
+ ],
61
+ "author": "Myeongjae Kim",
62
+ "license": "MIT",
63
+ "dependencies": {
64
+ "inversify-typesafe": "^0.1.0"
65
+ }
66
+ }