@schorts/shared-kernel 1.0.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/.idx/airules.md +186 -0
- package/.idx/dev.nix +54 -0
- package/.vscode/settings.json +7 -0
- package/CHANGELOG +0 -0
- package/README.md +98 -0
- package/__tests__/auth/auth-provider.test.ts +45 -0
- package/__tests__/auth/require-auth.decorator.test.ts +88 -0
- package/__tests__/criteria/criteria.test.ts +159 -0
- package/__tests__/criteria/direction.test.ts +11 -0
- package/__tests__/criteria/filter-criterion.test.ts +15 -0
- package/__tests__/criteria/operator.test.ts +22 -0
- package/__tests__/criteria/order.test.ts +14 -0
- package/__tests__/domain-events/domain-event-primitives.test.ts +34 -0
- package/__tests__/domain-events/domain-event.test.ts +50 -0
- package/__tests__/entities/entity.test.ts +114 -0
- package/__tests__/formatters/pascal-camel-to-snake.test.ts +19 -0
- package/__tests__/http/fetch-http-provider.test.ts +155 -0
- package/__tests__/http/http-provider.test.ts +55 -0
- package/__tests__/json-api/json-api-connector.test.ts +78 -0
- package/__tests__/json-api/json-api-list.test.ts +24 -0
- package/__tests__/json-api/json-api-single.test.ts +24 -0
- package/__tests__/json-api/url-criteria-builder.test.ts +74 -0
- package/__tests__/messages/message.test.ts +16 -0
- package/__tests__/models/base-model.test.ts +10 -0
- package/__tests__/state-manager/state-manager.test.ts +101 -0
- package/__tests__/utils/url/url-with-params-builder.test.ts +39 -0
- package/__tests__/value-objects/coordinates-value.test.ts +68 -0
- package/__tests__/value-objects/email-value.test.ts +43 -0
- package/__tests__/value-objects/enum-value.test.ts +51 -0
- package/__tests__/value-objects/integer-value.test.ts +115 -0
- package/__tests__/value-objects/phone-value.test.ts +82 -0
- package/__tests__/value-objects/slug-value.test.ts +43 -0
- package/__tests__/value-objects/string-value.test.ts +121 -0
- package/__tests__/value-objects/uuid-value.test.ts +67 -0
- package/__tests__/value-objects/value-object.test.ts +25 -0
- package/jest.config.js +25 -0
- package/package.json +289 -0
- package/src/auth/auth-provider.ts +10 -0
- package/src/auth/exceptions/index.ts +1 -0
- package/src/auth/exceptions/not-authenticated.ts +1 -0
- package/src/auth/index.ts +3 -0
- package/src/auth/require-auth.decorator.ts +41 -0
- package/src/criteria/criteria.ts +51 -0
- package/src/criteria/direction.ts +1 -0
- package/src/criteria/exceptions/index.ts +2 -0
- package/src/criteria/exceptions/limit-not-valid.ts +1 -0
- package/src/criteria/exceptions/offset-not-valid.ts +1 -0
- package/src/criteria/filter-criterion.ts +6 -0
- package/src/criteria/index.ts +7 -0
- package/src/criteria/operator.ts +12 -0
- package/src/criteria/order.ts +4 -0
- package/src/domain-events/domain-event-primitives.ts +7 -0
- package/src/domain-events/domain-event.ts +15 -0
- package/src/domain-events/index.ts +2 -0
- package/src/entities/entity.ts +22 -0
- package/src/entities/index.ts +1 -0
- package/src/formatters/index.ts +1 -0
- package/src/formatters/pascal-camel-to-snake.ts +8 -0
- package/src/http/exceptions/http-exception.ts +8 -0
- package/src/http/exceptions/index.ts +1 -0
- package/src/http/fetch-http-provider.ts +120 -0
- package/src/http/http-provider.ts +7 -0
- package/src/http/index.ts +4 -0
- package/src/json-api/index.ts +4 -0
- package/src/json-api/json-api-connector.ts +56 -0
- package/src/json-api/json-api-list.ts +13 -0
- package/src/json-api/json-api-single.ts +13 -0
- package/src/json-api/url-criteria-builder.ts +49 -0
- package/src/messages/index.ts +1 -0
- package/src/messages/message.ts +3 -0
- package/src/models/base-model.ts +3 -0
- package/src/models/index.ts +1 -0
- package/src/state-manager/index.ts +1 -0
- package/src/state-manager/state-manager.ts +28 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/url/index.ts +1 -0
- package/src/utils/url/url-with-params-builder.ts +19 -0
- package/src/value-objects/coordinates-value.ts +50 -0
- package/src/value-objects/email-value.ts +25 -0
- package/src/value-objects/enum-value.ts +25 -0
- package/src/value-objects/index.ts +10 -0
- package/src/value-objects/integer-value.ts +29 -0
- package/src/value-objects/phone-value.ts +53 -0
- package/src/value-objects/slug-value.ts +25 -0
- package/src/value-objects/string-value.ts +27 -0
- package/src/value-objects/uuid-value.ts +34 -0
- package/src/value-objects/value-object.ts +7 -0
- package/tsconfig.json +46 -0
package/tsconfig.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Visit https://aka.ms/tsconfig to read more about this file
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
// File Layout
|
|
5
|
+
"rootDir": "./src",
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
|
|
8
|
+
// Environment Settings
|
|
9
|
+
// See also https://aka.ms/tsconfig/module
|
|
10
|
+
"module": "nodenext",
|
|
11
|
+
"target": "esnext",
|
|
12
|
+
"types": [],
|
|
13
|
+
// For nodejs:
|
|
14
|
+
// "lib": ["esnext"],
|
|
15
|
+
// "types": ["node"],
|
|
16
|
+
// and npm install -D @types/node
|
|
17
|
+
|
|
18
|
+
// Other Outputs
|
|
19
|
+
"sourceMap": true,
|
|
20
|
+
"declaration": true,
|
|
21
|
+
"declarationMap": true,
|
|
22
|
+
|
|
23
|
+
// Stricter Typechecking Options
|
|
24
|
+
"noUncheckedIndexedAccess": true,
|
|
25
|
+
"exactOptionalPropertyTypes": true,
|
|
26
|
+
|
|
27
|
+
// Style Options
|
|
28
|
+
// "noImplicitReturns": true,
|
|
29
|
+
// "noImplicitOverride": true,
|
|
30
|
+
// "noUnusedLocals": true,
|
|
31
|
+
// "noUnusedParameters": true,
|
|
32
|
+
// "noFallthroughCasesInSwitch": true,
|
|
33
|
+
// "noPropertyAccessFromIndexSignature": true,
|
|
34
|
+
|
|
35
|
+
// Recommended Options
|
|
36
|
+
"strict": true,
|
|
37
|
+
"jsx": "react-jsx",
|
|
38
|
+
// "verbatimModuleSyntax": true,
|
|
39
|
+
"isolatedModules": true,
|
|
40
|
+
"noUncheckedSideEffectImports": true,
|
|
41
|
+
"moduleDetection": "force",
|
|
42
|
+
"skipLibCheck": true,
|
|
43
|
+
},
|
|
44
|
+
"include": ["src/**/*"],
|
|
45
|
+
"exclude": ["node_modules", "dist"]
|
|
46
|
+
}
|