@final-hill/decorator-contracts 1.0.0 → 3.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/LICENSE +660 -660
- package/README.md +1716 -400
- package/dist/AssertionError.d.mts +77 -1
- package/dist/Contracted.d.mts +85 -11
- package/dist/admissibility.d.mts +430 -0
- package/dist/assert.d.mts +90 -0
- package/dist/decorator.d.mts +67 -0
- package/dist/demands.d.mts +129 -3
- package/dist/ensures.d.mts +132 -3
- package/dist/feature-kind.d.mts +25 -0
- package/dist/iff.d.mts +11 -1
- package/dist/implies.d.mts +11 -1
- package/dist/index.d.mts +11 -3
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/inspect.d.mts +38 -0
- package/dist/invariant.d.mts +43 -3
- package/dist/metadata.d.mts +98 -0
- package/dist/name.d.mts +71 -0
- package/dist/read-only.d.mts +45 -0
- package/dist/rescue.d.mts +140 -3
- package/dist/serialization.d.mts +63 -0
- package/dist/standard-schema.d.mts +46 -0
- package/dist/types.d.mts +22 -1
- package/package.json +82 -70
package/package.json
CHANGED
|
@@ -1,70 +1,82 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@final-hill/decorator-contracts",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Code Contracts for TypeScript and ECMAScript classes",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"exports": {
|
|
7
|
-
".": {
|
|
8
|
-
"types": "./dist/index.d.
|
|
9
|
-
"import": "./dist/index.mjs"
|
|
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
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@final-hill/decorator-contracts",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "Code Contracts for TypeScript and ECMAScript classes",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.mts",
|
|
9
|
+
"import": "./dist/index.mjs"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"types": "./dist/index.d.mts",
|
|
13
|
+
"main": "./dist/index.mjs",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"prebuild": "npm run lint",
|
|
16
|
+
"build": "webpack",
|
|
17
|
+
"lint": "eslint src '**/*.md' eslint.config.js webpack.config.mjs --ignore-pattern node_modules --ignore-pattern dist --max-warnings 0",
|
|
18
|
+
"lint:fix": "eslint src '**/*.md' eslint.config.js webpack.config.mjs --ignore-pattern node_modules --ignore-pattern dist --fix",
|
|
19
|
+
"pretest": "npm run build && npm run typecheck",
|
|
20
|
+
"test": "globstar -- node --import tsx --test ./src/tests/*.test.mts",
|
|
21
|
+
"pretest:coverage": "npm run build && node -e \"require('node:fs').mkdirSync('coverage',{recursive:true})\"",
|
|
22
|
+
"test:coverage": "globstar -- node --import tsx --test --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=coverage/lcov.info ./src/tests/*.test.mts",
|
|
23
|
+
"typecheck": "tsc --noEmit -p tsconfig.json && tsc -p tsconfig.test.json"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/final-hill/decorator-contracts#readme",
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/final-hill/decorator-contracts.git"
|
|
29
|
+
},
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/final-hill/decorator-contracts/issues"
|
|
32
|
+
},
|
|
33
|
+
"keywords": [
|
|
34
|
+
"assertion",
|
|
35
|
+
"biconditional",
|
|
36
|
+
"behavioral-subtyping",
|
|
37
|
+
"code-contracts",
|
|
38
|
+
"decorators",
|
|
39
|
+
"demands",
|
|
40
|
+
"design-by-contract",
|
|
41
|
+
"encapsulation",
|
|
42
|
+
"exception-handling",
|
|
43
|
+
"if-and-only-if",
|
|
44
|
+
"invariant",
|
|
45
|
+
"liskov-substitution-principle",
|
|
46
|
+
"LSP",
|
|
47
|
+
"material-implication",
|
|
48
|
+
"organized-panic",
|
|
49
|
+
"precondition",
|
|
50
|
+
"postcondition",
|
|
51
|
+
"rescue",
|
|
52
|
+
"requires",
|
|
53
|
+
"SOLID"
|
|
54
|
+
],
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=26"
|
|
57
|
+
},
|
|
58
|
+
"author": "Michael L Haufe <michael.haufe@final-hill.com> (https://final-hill.com)",
|
|
59
|
+
"license": "AGPL-3.0-only",
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@eslint/js": "^10.0.1",
|
|
62
|
+
"@eslint/json": "^2.1.1",
|
|
63
|
+
"@eslint/markdown": "^9.0.0",
|
|
64
|
+
"@types/node": "^26.6.6",
|
|
65
|
+
"eslint": "^10.15.0",
|
|
66
|
+
"eslint-webpack-plugin": "^6.0.0",
|
|
67
|
+
"globals": "^17.14.0",
|
|
68
|
+
"globstar": "^1.0.0",
|
|
69
|
+
"ts-loader": "^9.6.2",
|
|
70
|
+
"tsx": "^4.23.15",
|
|
71
|
+
"typescript": "^6.0.3",
|
|
72
|
+
"typescript-eslint": "^8.73.0",
|
|
73
|
+
"webpack": "^5.113.0",
|
|
74
|
+
"webpack-cli": "^7.3.1"
|
|
75
|
+
},
|
|
76
|
+
"files": [
|
|
77
|
+
"dist"
|
|
78
|
+
],
|
|
79
|
+
"overrides": {
|
|
80
|
+
"katex": "^0.19.1"
|
|
81
|
+
}
|
|
82
|
+
}
|