sandly 0.5.2 → 0.5.3
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/dist/index.d.ts +9 -2
- package/package.json +74 -75
package/dist/index.d.ts
CHANGED
|
@@ -1654,6 +1654,13 @@ declare class ScopedContainer<TReg extends AnyTag> extends Container<TReg> {
|
|
|
1654
1654
|
* @internal
|
|
1655
1655
|
*/
|
|
1656
1656
|
type ConstructorParams<T extends ServiceTag<TagId, unknown>> = T extends (new (...args: infer A) => unknown) ? A : never;
|
|
1657
|
+
/**
|
|
1658
|
+
* Helper to normalize a tag type.
|
|
1659
|
+
* For ServiceTags, this strips away extra static properties of the class constructor,
|
|
1660
|
+
* reducing it to the canonical ServiceTag<Id, Instance> form.
|
|
1661
|
+
* @internal
|
|
1662
|
+
*/
|
|
1663
|
+
type CanonicalTag<T extends AnyTag> = T extends ServiceTag<infer Id, infer Instance> ? ServiceTag<Id, Instance> : T;
|
|
1657
1664
|
/**
|
|
1658
1665
|
* Extracts only dependency tags from a constructor parameter list.
|
|
1659
1666
|
* Filters out non‑DI parameters.
|
|
@@ -1728,7 +1735,7 @@ type ServiceDepsTuple<T extends ServiceTag<TagId, unknown>> = InferConstructorDe
|
|
|
1728
1735
|
* );
|
|
1729
1736
|
* ```
|
|
1730
1737
|
*/
|
|
1731
|
-
declare function service<T extends ServiceTag<TagId, unknown>>(tag: T, spec: DependencySpec<T, ServiceDependencies<T>>): Layer<ServiceDependencies<T>, T
|
|
1738
|
+
declare function service<T extends ServiceTag<TagId, unknown>>(tag: T, spec: DependencySpec<T, ServiceDependencies<T>>): Layer<ServiceDependencies<T>, CanonicalTag<T>>;
|
|
1732
1739
|
/**
|
|
1733
1740
|
* Specification for autoService.
|
|
1734
1741
|
* Can be either a tuple of constructor parameters or an object with dependencies and finalizer.
|
|
@@ -1835,7 +1842,7 @@ type AutoServiceSpec<T extends ServiceTag<TagId, unknown>> = ServiceDepsTuple<T>
|
|
|
1835
1842
|
* );
|
|
1836
1843
|
* ```
|
|
1837
1844
|
*/
|
|
1838
|
-
declare function autoService<T extends ServiceTag<TagId, unknown>>(tag: T, spec: AutoServiceSpec<T>): Layer<ServiceDependencies<T>, T
|
|
1845
|
+
declare function autoService<T extends ServiceTag<TagId, unknown>>(tag: T, spec: AutoServiceSpec<T>): Layer<ServiceDependencies<T>, CanonicalTag<T>>;
|
|
1839
1846
|
//#endregion
|
|
1840
1847
|
//#region src/value.d.ts
|
|
1841
1848
|
/**
|
package/package.json
CHANGED
|
@@ -1,76 +1,75 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
2
|
+
"name": "sandly",
|
|
3
|
+
"version": "0.5.3",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"typescript",
|
|
6
|
+
"sandly",
|
|
7
|
+
"dependency-injection",
|
|
8
|
+
"dependency-inversion",
|
|
9
|
+
"injection",
|
|
10
|
+
"di",
|
|
11
|
+
"inversion-of-control",
|
|
12
|
+
"ioc",
|
|
13
|
+
"container",
|
|
14
|
+
"layer",
|
|
15
|
+
"service",
|
|
16
|
+
"aws",
|
|
17
|
+
"lambda",
|
|
18
|
+
"aws-lambda"
|
|
19
|
+
],
|
|
20
|
+
"homepage": "https://github.com/borisrakovan/sandly",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/borisrakovan/sandly/issues"
|
|
23
|
+
},
|
|
24
|
+
"author": "Boris Rakovan <b.rakovan@gmail.com> (https://github.com/borisrakovan)",
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git+https://github.com/borisrakovan/sandly.git"
|
|
28
|
+
},
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"files": [
|
|
31
|
+
"dist"
|
|
32
|
+
],
|
|
33
|
+
"type": "module",
|
|
34
|
+
"main": "dist/index.js",
|
|
35
|
+
"types": "dist/index.d.ts",
|
|
36
|
+
"exports": {
|
|
37
|
+
".": {
|
|
38
|
+
"types": "./dist/index.d.ts",
|
|
39
|
+
"import": "./dist/index.js"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@changesets/cli": "^2.29.5",
|
|
44
|
+
"@eslint/js": "^9.26.0",
|
|
45
|
+
"@types/aws-lambda": "^8.10.149",
|
|
46
|
+
"@types/node": "^22.15.3",
|
|
47
|
+
"@types/node-fetch": "^2.6.12",
|
|
48
|
+
"dotenv": "^16.5.0",
|
|
49
|
+
"esbuild": "^0.25.3",
|
|
50
|
+
"eslint": "^9.26.0",
|
|
51
|
+
"node-fetch": "^3.3.2",
|
|
52
|
+
"prettier": "^3.5.3",
|
|
53
|
+
"prettier-plugin-organize-imports": "^4.1.0",
|
|
54
|
+
"ts-node": "^10.9.2",
|
|
55
|
+
"tsdown": "^0.14.1",
|
|
56
|
+
"tsx": "^4.19.4",
|
|
57
|
+
"typescript": "^5.8.3",
|
|
58
|
+
"typescript-eslint": "^8.38.0",
|
|
59
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
60
|
+
"vitest": "^3.1.3",
|
|
61
|
+
"zod": "^4.0.15"
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "tsdown",
|
|
65
|
+
"clean": "rm -rf dist",
|
|
66
|
+
"watch": "tsc --watch",
|
|
67
|
+
"format": "prettier --write \"{src,test}/**/*.ts\"",
|
|
68
|
+
"format:check": "prettier --check \"{src,test}/**/*.ts\"",
|
|
69
|
+
"lint": "eslint . --fix",
|
|
70
|
+
"lint:check": "eslint . --max-warnings=0",
|
|
71
|
+
"type:check": "tsc --noEmit",
|
|
72
|
+
"test": "vitest run",
|
|
73
|
+
"release": "changeset version && changeset publish"
|
|
74
|
+
}
|
|
75
|
+
}
|