@schorts/shared-kernel 1.0.0 โ 1.0.2
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/README.md +8 -2
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -73,7 +73,12 @@ This kernel is built around:
|
|
|
73
73
|
## ๐ฆ Example Usage
|
|
74
74
|
|
|
75
75
|
```ts
|
|
76
|
-
import { Criteria
|
|
76
|
+
import { Criteria } from "@schorts/shared-kernel/criteria";
|
|
77
|
+
import { FetchHTTPProvider } from "@schorts/shared-kernel/http";
|
|
78
|
+
import { JSONAPIConnector } from "@schorts/shared-kernel/json-api";
|
|
79
|
+
|
|
80
|
+
// Didn't know what url use for the example hehe
|
|
81
|
+
const usersURL = new URL("https://github.com/schorts99");
|
|
77
82
|
|
|
78
83
|
const criteria = new Criteria()
|
|
79
84
|
.where("status", "EQUAL", "active")
|
|
@@ -82,7 +87,8 @@ const criteria = new Criteria()
|
|
|
82
87
|
|
|
83
88
|
const connector = new JSONAPIConnector(new FetchHTTPProvider());
|
|
84
89
|
|
|
85
|
-
|
|
90
|
+
// UserModel is your own Model
|
|
91
|
+
const users = await connector.findMany<UserModel>(usersURL, criteria);
|
|
86
92
|
```
|
|
87
93
|
|
|
88
94
|
## ๐งช Testing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schorts/shared-kernel",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "A modular, type-safe foundation for building expressive, maintainable applications. This package provides core abstractions for domain modeling, HTTP integration, authentication, state management, and more โ designed to be framework-agnostic and highly extensible.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"test:coverage": "jest --coverage",
|
|
62
62
|
"test:ci": "jest --ci --coverage --watchAll=false"
|
|
63
63
|
},
|
|
64
|
-
"author": "Jorge Castillo (https://github.com/
|
|
64
|
+
"author": "Jorge Castillo (https://github.com/schorts99)",
|
|
65
65
|
"license": "LGPL-3.0-or-later",
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@jest/globals": "^30.1.2",
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
},
|
|
274
274
|
"repository": {
|
|
275
275
|
"type": "git",
|
|
276
|
-
"url": "git+https://github.com/
|
|
276
|
+
"url": "git+https://github.com/schorts99/shared-kernel.git"
|
|
277
277
|
},
|
|
278
278
|
"keywords": [
|
|
279
279
|
"shared-kernel",
|
|
@@ -283,7 +283,7 @@
|
|
|
283
283
|
"value-objects"
|
|
284
284
|
],
|
|
285
285
|
"bugs": {
|
|
286
|
-
"url": "https://github.com/
|
|
286
|
+
"url": "https://github.com/schorts99/shared-kernel/issues"
|
|
287
287
|
},
|
|
288
|
-
"homepage": "https://github.com/
|
|
288
|
+
"homepage": "https://github.com/schorts99/shared-kernel#readme"
|
|
289
289
|
}
|