xdbc 1.0.217 → 1.0.218

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.
Files changed (89) hide show
  1. package/.gitattributes +8 -0
  2. package/.vscode/settings.json +3 -3
  3. package/.vscode/tasks.json +23 -23
  4. package/ASSESSMENT.md +249 -0
  5. package/README.md +131 -1
  6. package/__tests__/DBC/AE.test.ts +62 -62
  7. package/__tests__/DBC/ARRAY.test.ts +91 -91
  8. package/__tests__/DBC/DEFINED.test.ts +53 -53
  9. package/__tests__/DBC/DOM.test.ts +481 -0
  10. package/__tests__/DBC/Decorators.test.ts +367 -367
  11. package/__tests__/DBC/EQ.test.ts +13 -13
  12. package/__tests__/DBC/GREATER.test.ts +31 -31
  13. package/__tests__/DBC/HasAttribute.test.ts +60 -60
  14. package/__tests__/DBC/IF.test.ts +62 -62
  15. package/__tests__/DBC/INSTANCE.test.ts +13 -13
  16. package/__tests__/DBC/JSON.OP.test.ts +47 -47
  17. package/__tests__/DBC/JSON.Parse.test.ts +17 -17
  18. package/__tests__/DBC/OR.test.ts +14 -14
  19. package/__tests__/DBC/PLAIN_OBJECT.test.ts +109 -109
  20. package/__tests__/DBC/REGEX.test.ts +17 -17
  21. package/__tests__/DBC/TYPE.test.ts +13 -13
  22. package/__tests__/DBC/UNDEFINED.test.ts +45 -45
  23. package/__tests__/DBC/ZOD.test.ts +54 -54
  24. package/__tests__/DBC/onInfringement.test.ts +262 -0
  25. package/biome.json +40 -40
  26. package/dist/DBC/AE.js +172 -0
  27. package/dist/DBC/ARR/PLAIN_OBJECT.d.ts +0 -3
  28. package/dist/DBC/ARR/PLAIN_OBJECT.js +95 -0
  29. package/dist/DBC/ARRAY.d.ts +0 -3
  30. package/dist/DBC/ARRAY.js +90 -0
  31. package/dist/DBC/COMPARISON/GREATER.js +21 -0
  32. package/dist/DBC/COMPARISON/GREATER_OR_EQUAL.js +21 -0
  33. package/dist/DBC/COMPARISON/LESS.js +21 -0
  34. package/dist/DBC/COMPARISON/LESS_OR_EQUAL.js +21 -0
  35. package/dist/DBC/COMPARISON.js +98 -0
  36. package/dist/DBC/DEFINED.js +87 -0
  37. package/dist/DBC/DOM.d.ts +87 -0
  38. package/dist/DBC/DOM.js +223 -0
  39. package/dist/DBC/EQ/DIFFERENT.js +34 -0
  40. package/dist/DBC/EQ.js +101 -0
  41. package/dist/DBC/HasAttribute.js +101 -0
  42. package/dist/DBC/IF.js +96 -0
  43. package/dist/DBC/INSTANCE.js +122 -0
  44. package/dist/DBC/JSON.OP.js +120 -0
  45. package/dist/DBC/JSON.Parse.js +104 -0
  46. package/dist/DBC/OR.js +125 -0
  47. package/dist/DBC/REGEX.js +136 -0
  48. package/dist/DBC/TYPE.js +112 -0
  49. package/dist/DBC/UNDEFINED.js +87 -0
  50. package/dist/DBC/ZOD.js +99 -0
  51. package/dist/DBC.d.ts +18 -4
  52. package/dist/DBC.js +645 -0
  53. package/dist/Demo.d.ts +10 -0
  54. package/dist/Demo.js +713 -0
  55. package/dist/bundle.js +6140 -405
  56. package/dist/index.d.ts +22 -0
  57. package/dist/index.js +22 -0
  58. package/jest.config.js +32 -32
  59. package/package.json +71 -55
  60. package/src/DBC/AE.ts +269 -288
  61. package/src/DBC/ARR/PLAIN_OBJECT.ts +122 -133
  62. package/src/DBC/ARRAY.ts +117 -127
  63. package/src/DBC/COMPARISON/GREATER.ts +41 -46
  64. package/src/DBC/COMPARISON/GREATER_OR_EQUAL.ts +41 -45
  65. package/src/DBC/COMPARISON/LESS.ts +41 -45
  66. package/src/DBC/COMPARISON/LESS_OR_EQUAL.ts +41 -45
  67. package/src/DBC/COMPARISON.ts +149 -159
  68. package/src/DBC/DEFINED.ts +117 -122
  69. package/src/DBC/DOM.ts +291 -0
  70. package/src/DBC/EQ/DIFFERENT.ts +51 -57
  71. package/src/DBC/EQ.ts +154 -163
  72. package/src/DBC/HasAttribute.ts +149 -154
  73. package/src/DBC/IF.ts +173 -179
  74. package/src/DBC/INSTANCE.ts +168 -171
  75. package/src/DBC/JSON.OP.ts +178 -186
  76. package/src/DBC/JSON.Parse.ts +150 -157
  77. package/src/DBC/OR.ts +183 -187
  78. package/src/DBC/REGEX.ts +195 -196
  79. package/src/DBC/TYPE.ts +142 -149
  80. package/src/DBC/UNDEFINED.ts +115 -117
  81. package/src/DBC/ZOD.ts +130 -135
  82. package/src/DBC.ts +902 -904
  83. package/src/Demo.ts +537 -404
  84. package/src/index.ts +22 -0
  85. package/tsconfig.json +18 -18
  86. package/tsconfig.test.json +7 -7
  87. package/typedoc.json +16 -16
  88. package/webpack.config.js +27 -27
  89. package/Assessment.md +0 -507
@@ -0,0 +1,22 @@
1
+ export { DBC } from "./DBC";
2
+ export { AE } from "./DBC/AE";
3
+ export { PLAIN_OBJECT } from "./DBC/ARR/PLAIN_OBJECT";
4
+ export { ARRAY } from "./DBC/ARRAY";
5
+ export { COMPARISON } from "./DBC/COMPARISON";
6
+ export { GREATER } from "./DBC/COMPARISON/GREATER";
7
+ export { GREATER_OR_EQUAL } from "./DBC/COMPARISON/GREATER_OR_EQUAL";
8
+ export { LESS } from "./DBC/COMPARISON/LESS";
9
+ export { LESS_OR_EQUAL } from "./DBC/COMPARISON/LESS_OR_EQUAL";
10
+ export { DEFINED } from "./DBC/DEFINED";
11
+ export { EQ } from "./DBC/EQ";
12
+ export { DIFFERENT } from "./DBC/EQ/DIFFERENT";
13
+ export { HasAttribute } from "./DBC/HasAttribute";
14
+ export { IF } from "./DBC/IF";
15
+ export { INSTANCE } from "./DBC/INSTANCE";
16
+ export { JSON_OP } from "./DBC/JSON.OP";
17
+ export { JSON_Parse } from "./DBC/JSON.Parse";
18
+ export { OR } from "./DBC/OR";
19
+ export { REGEX } from "./DBC/REGEX";
20
+ export { TYPE } from "./DBC/TYPE";
21
+ export { UNDEFINED } from "./DBC/UNDEFINED";
22
+ export { ZOD } from "./DBC/ZOD";
package/dist/index.js ADDED
@@ -0,0 +1,22 @@
1
+ export { DBC } from "./DBC";
2
+ export { AE } from "./DBC/AE";
3
+ export { PLAIN_OBJECT } from "./DBC/ARR/PLAIN_OBJECT";
4
+ export { ARRAY } from "./DBC/ARRAY";
5
+ export { COMPARISON } from "./DBC/COMPARISON";
6
+ export { GREATER } from "./DBC/COMPARISON/GREATER";
7
+ export { GREATER_OR_EQUAL } from "./DBC/COMPARISON/GREATER_OR_EQUAL";
8
+ export { LESS } from "./DBC/COMPARISON/LESS";
9
+ export { LESS_OR_EQUAL } from "./DBC/COMPARISON/LESS_OR_EQUAL";
10
+ export { DEFINED } from "./DBC/DEFINED";
11
+ export { EQ } from "./DBC/EQ";
12
+ export { DIFFERENT } from "./DBC/EQ/DIFFERENT";
13
+ export { HasAttribute } from "./DBC/HasAttribute";
14
+ export { IF } from "./DBC/IF";
15
+ export { INSTANCE } from "./DBC/INSTANCE";
16
+ export { JSON_OP } from "./DBC/JSON.OP";
17
+ export { JSON_Parse } from "./DBC/JSON.Parse";
18
+ export { OR } from "./DBC/OR";
19
+ export { REGEX } from "./DBC/REGEX";
20
+ export { TYPE } from "./DBC/TYPE";
21
+ export { UNDEFINED } from "./DBC/UNDEFINED";
22
+ export { ZOD } from "./DBC/ZOD";
package/jest.config.js CHANGED
@@ -1,32 +1,32 @@
1
- /** @type {import('ts-jest').JestConfigWithTsJest} */
2
- module.exports = {
3
- silent: true,
4
- testPathIgnorePatterns: ["<rootDir>/dist/"],
5
- testMatch: ["**/__tests__/**/*.[jt]s?(x)", "**/?(*.)+(spec|test).[tj]s?(x)"],
6
- collectCoverageFrom: ["src/**/*.ts", "!src/Demo.ts"],
7
- coverageDirectory: "coverage",
8
- coverageReporters: ["text", "lcov"],
9
- coverageThreshold: {
10
- global: {
11
- statements: 60,
12
- branches: 38,
13
- functions: 55,
14
- lines: 60,
15
- },
16
- },
17
- preset: "ts-jest",
18
- testEnvironment: "jsdom",
19
- extensionsToTreatAsEsm: [".ts", ".tsx", ".jsx"],
20
- moduleNameMapper: {
21
- "^(\\.{1,2}/.*)\\.ts$": "$1",
22
- },
23
- transform: {
24
- "^.+\\.(ts|tsx)?$": [
25
- "ts-jest",
26
- {
27
- allowImportingTsExtensions: true,
28
- tsconfig: "tsconfig.test.json",
29
- },
30
- ],
31
- },
32
- };
1
+ /** @type {import('ts-jest').JestConfigWithTsJest} */
2
+ module.exports = {
3
+ silent: true,
4
+ testPathIgnorePatterns: ["<rootDir>/dist/"],
5
+ testMatch: ["**/__tests__/**/*.[jt]s?(x)", "**/?(*.)+(spec|test).[tj]s?(x)"],
6
+ collectCoverageFrom: ["src/**/*.ts", "!src/Demo.ts"],
7
+ coverageDirectory: "coverage",
8
+ coverageReporters: ["text", "lcov"],
9
+ coverageThreshold: {
10
+ global: {
11
+ statements: 60,
12
+ branches: 38,
13
+ functions: 55,
14
+ lines: 60,
15
+ },
16
+ },
17
+ preset: "ts-jest",
18
+ testEnvironment: "jsdom",
19
+ extensionsToTreatAsEsm: [".ts", ".tsx", ".jsx"],
20
+ moduleNameMapper: {
21
+ "^(\\.{1,2}/.*)\\.ts$": "$1",
22
+ },
23
+ transform: {
24
+ "^.+\\.(ts|tsx)?$": [
25
+ "ts-jest",
26
+ {
27
+ allowImportingTsExtensions: true,
28
+ tsconfig: "tsconfig.test.json",
29
+ },
30
+ ],
31
+ },
32
+ };
package/package.json CHANGED
@@ -1,55 +1,71 @@
1
- {
2
- "version": "1.0.217",
3
- "name": "xdbc",
4
- "main": "dist/bundle.js",
5
- "types": "dist/DBC.d.ts",
6
- "scripts": {
7
- "docs": "typedoc",
8
- "format": "biome format ./src --write",
9
- "lint": "biome check ./",
10
- "ci": "biome ci ./",
11
- "test": "jest",
12
- "test:coverage": "jest --coverage",
13
- "build": "tsc --emitDeclarationOnly && webpack",
14
- "start": "webpack serve --open"
15
- },
16
- "devDependencies": {
17
- "@babel/core": "^7.27.1",
18
- "@babel/preset-env": "^7.27.2",
19
- "@biomejs/biome": "^1.9.4",
20
- "@types/jest": "^29.5.14",
21
- "@types/node": "^22.15.17",
22
- "babel-jest": "^29.7.0",
23
- "jest": "^29.7.0",
24
- "jest-environment-jsdom": "^30.3.0",
25
- "ts-jest": "^29.3.2",
26
- "ts-loader": "^9.5.2",
27
- "ts-node": "^10.9.2",
28
- "typescript": "^5.8.3",
29
- "undici-types": "^7.8.0",
30
- "webpack": "^5.99.8",
31
- "webpack-cli": "^6.0.1",
32
- "webpack-dev-server": "^5.2.1"
33
- },
34
- "dependencies": {
35
- "@types/reflect-metadata": "^0.1.0",
36
- "reflect-metadata": "^0.2.2",
37
- "zod": "^3.25.0"
38
- },
39
- "description": "A Typescript Design by Contract Framework",
40
- "repository": {
41
- "type": "git",
42
- "url": "git+https://github.com/CallariS/XDBC.git"
43
- },
44
- "keywords": [
45
- "DbC",
46
- "DesignByContract",
47
- "Typescript"
48
- ],
49
- "author": "Callari, Salvatore",
50
- "license": "MIT",
51
- "bugs": {
52
- "url": "https://github.com/CallariS/XDBC/issues"
53
- },
54
- "homepage": "https://github.com/CallariS/XDBC#readme"
55
- }
1
+ {
2
+ "version": "1.0.218",
3
+ "name": "xdbc",
4
+ "main": "dist/index.js",
5
+ "module": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "default": "./dist/index.js"
11
+ },
12
+ "./DBC/DOM": {
13
+ "types": "./dist/DBC/DOM.d.ts",
14
+ "default": "./dist/DBC/DOM.js"
15
+ }
16
+ },
17
+ "scripts": {
18
+ "docs": "typedoc",
19
+ "format": "biome format ./src --write",
20
+ "lint": "biome check ./",
21
+ "ci": "biome ci ./",
22
+ "test": "jest",
23
+ "test:coverage": "jest --coverage",
24
+ "build": "tsc && webpack",
25
+ "start": "webpack serve --open"
26
+ },
27
+ "devDependencies": {
28
+ "@babel/core": "^7.27.1",
29
+ "@babel/preset-env": "^7.27.2",
30
+ "@biomejs/biome": "^1.9.4",
31
+ "@types/jest": "^29.5.14",
32
+ "@types/node": "^22.15.17",
33
+ "babel-jest": "^29.7.0",
34
+ "jest": "^29.7.0",
35
+ "jest-environment-jsdom": "^30.3.0",
36
+ "ts-jest": "^29.3.2",
37
+ "ts-loader": "^9.5.2",
38
+ "ts-node": "^10.9.2",
39
+ "typescript": "^5.8.3",
40
+ "undici-types": "^7.8.0",
41
+ "webpack": "^5.99.8",
42
+ "webpack-cli": "^6.0.1",
43
+ "webpack-dev-server": "^5.2.1"
44
+ },
45
+ "dependencies": {
46
+ "@types/reflect-metadata": "^0.1.0",
47
+ "reflect-metadata": "^0.2.2",
48
+ "zod": "^3.25.0"
49
+ },
50
+ "description": "A Typescript Design by Contract Framework",
51
+ "repository": {
52
+ "type": "git",
53
+ "url": "git+https://github.com/CallariS/XDBC.git"
54
+ },
55
+ "keywords": [
56
+ "DbC",
57
+ "DesignByContract",
58
+ "Typescript"
59
+ ],
60
+ "author": "Callari, Salvatore",
61
+ "license": "MIT",
62
+ "bugs": {
63
+ "url": "https://github.com/CallariS/XDBC/issues"
64
+ },
65
+ "homepage": "https://github.com/CallariS/XDBC#readme",
66
+ "overrides": {
67
+ "uuid": "^14.0.0",
68
+ "@babel/plugin-transform-modules-systemjs": "^7.29.4",
69
+ "fast-uri": "^3.1.2"
70
+ }
71
+ }