@orion-js/services 4.3.1 → 4.4.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,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Orionjs Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/di.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ type Token<T> = {
2
+ new (...args: any[]): T;
3
+ };
4
+ export declare function addPendingFieldValidator(validator: () => void): void;
5
+ export declare function Service(): (target: Function, _context: ClassDecoratorContext) => void;
6
+ export declare function Inject<T>(getDependency: () => Token<T>): (_: undefined, context: ClassFieldDecoratorContext) => void;
7
+ export declare function setInstance<T extends object>(token: Token<T>, instance: T): void;
8
+ export declare function registerFieldFactories(target: Function, factories: Record<string, () => any>): void;
9
+ export declare function getInstance<T extends object>(token: Token<T>): T;
10
+ export {};
package/dist/index.d.ts CHANGED
@@ -1,11 +1 @@
1
- type Token<T> = {
2
- new (...args: any[]): T;
3
- };
4
- declare function addPendingFieldValidator(validator: () => void): void;
5
- declare function Service(): (target: Function, _context: ClassDecoratorContext) => void;
6
- declare function Inject<T>(getDependency: () => Token<T>): (_: undefined, context: ClassFieldDecoratorContext) => void;
7
- declare function setInstance<T extends object>(token: Token<T>, instance: T): void;
8
- declare function registerFieldFactories(target: Function, factories: Record<string, () => any>): void;
9
- declare function getInstance<T extends object>(token: Token<T>): T;
10
-
11
- export { Inject, Service, addPendingFieldValidator, getInstance, registerFieldFactories, setInstance };
1
+ export * from './di';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orion-js/services",
3
- "version": "4.3.1",
3
+ "version": "4.4.0",
4
4
  "main": "./dist/index.cjs",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -8,22 +8,15 @@
8
8
  ],
9
9
  "author": "nicolaslopezj",
10
10
  "license": "MIT",
11
- "scripts": {
12
- "test": "bun test",
13
- "prepare": "bun run build",
14
- "clean": "rm -rf ./dist",
15
- "build": "tsup",
16
- "dev": "tsup --watch"
17
- },
18
11
  "dependencies": {
19
- "@orion-js/helpers": "4.3.1",
12
+ "@orion-js/helpers": "4.4.0",
20
13
  "typedi": "^0.10.0"
21
14
  },
22
15
  "peerDependencies": {
23
- "@orion-js/logger": "4.3.1"
16
+ "@orion-js/logger": "4.4.0"
24
17
  },
25
18
  "devDependencies": {
26
- "typescript": "^5.4.5",
19
+ "typescript": "^7.0.2",
27
20
  "@types/node": "^18.0.0",
28
21
  "tsup": "^8.0.1"
29
22
  },
@@ -37,5 +30,11 @@
37
30
  "types": "./dist/index.d.ts",
38
31
  "import": "./dist/index.js",
39
32
  "require": "./dist/index.cjs"
33
+ },
34
+ "scripts": {
35
+ "test": "bun test",
36
+ "clean": "rm -rf ./dist",
37
+ "build": "tsup && bun run ../../scripts/emit-declarations.ts",
38
+ "dev": "tsup --watch"
40
39
  }
41
- }
40
+ }
package/dist/index.d.cts DELETED
@@ -1,11 +0,0 @@
1
- type Token<T> = {
2
- new (...args: any[]): T;
3
- };
4
- declare function addPendingFieldValidator(validator: () => void): void;
5
- declare function Service(): (target: Function, _context: ClassDecoratorContext) => void;
6
- declare function Inject<T>(getDependency: () => Token<T>): (_: undefined, context: ClassFieldDecoratorContext) => void;
7
- declare function setInstance<T extends object>(token: Token<T>, instance: T): void;
8
- declare function registerFieldFactories(target: Function, factories: Record<string, () => any>): void;
9
- declare function getInstance<T extends object>(token: Token<T>): T;
10
-
11
- export { Inject, Service, addPendingFieldValidator, getInstance, registerFieldFactories, setInstance };