schemantic 0.2.1 → 0.4.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.
Files changed (144) hide show
  1. package/CHANGELOG.md +196 -159
  2. package/LICENSE +21 -21
  3. package/README.md +88 -830
  4. package/dist/cli/index.d.ts +4 -1
  5. package/dist/cli/index.d.ts.map +1 -1
  6. package/dist/cli/index.js +186 -62
  7. package/dist/cli/index.js.map +1 -1
  8. package/dist/core/configuration.d.ts +6 -0
  9. package/dist/core/configuration.d.ts.map +1 -0
  10. package/dist/core/configuration.js +64 -0
  11. package/dist/core/configuration.js.map +1 -0
  12. package/dist/core/index.d.ts +1 -0
  13. package/dist/core/index.d.ts.map +1 -1
  14. package/dist/core/index.js +1 -0
  15. package/dist/core/index.js.map +1 -1
  16. package/dist/core/output-writer.d.ts +7 -0
  17. package/dist/core/output-writer.d.ts.map +1 -0
  18. package/dist/core/output-writer.js +255 -0
  19. package/dist/core/output-writer.js.map +1 -0
  20. package/dist/core/schemantic.d.ts +8 -6
  21. package/dist/core/schemantic.d.ts.map +1 -1
  22. package/dist/core/schemantic.js +194 -127
  23. package/dist/core/schemantic.js.map +1 -1
  24. package/dist/generators/api-client-generator.d.ts +9 -20
  25. package/dist/generators/api-client-generator.d.ts.map +1 -1
  26. package/dist/generators/api-client-generator.js +364 -424
  27. package/dist/generators/api-client-generator.js.map +1 -1
  28. package/dist/generators/base.d.ts.map +1 -1
  29. package/dist/generators/base.js +7 -25
  30. package/dist/generators/base.js.map +1 -1
  31. package/dist/generators/enum-generator.d.ts.map +1 -1
  32. package/dist/generators/enum-generator.js +30 -3
  33. package/dist/generators/enum-generator.js.map +1 -1
  34. package/dist/generators/hook-generator.d.ts +3 -17
  35. package/dist/generators/hook-generator.d.ts.map +1 -1
  36. package/dist/generators/hook-generator.js +51 -445
  37. package/dist/generators/hook-generator.js.map +1 -1
  38. package/dist/generators/naming.d.ts +10 -0
  39. package/dist/generators/naming.d.ts.map +1 -0
  40. package/dist/generators/naming.js +331 -0
  41. package/dist/generators/naming.js.map +1 -0
  42. package/dist/generators/object-generator.d.ts +0 -4
  43. package/dist/generators/object-generator.d.ts.map +1 -1
  44. package/dist/generators/object-generator.js +13 -101
  45. package/dist/generators/object-generator.js.map +1 -1
  46. package/dist/generators/primitive-generator.d.ts +1 -13
  47. package/dist/generators/primitive-generator.d.ts.map +1 -1
  48. package/dist/generators/primitive-generator.js +11 -76
  49. package/dist/generators/primitive-generator.js.map +1 -1
  50. package/dist/generators/projections.d.ts +10 -0
  51. package/dist/generators/projections.d.ts.map +1 -0
  52. package/dist/generators/projections.js +65 -0
  53. package/dist/generators/projections.js.map +1 -0
  54. package/dist/generators/schema-type.d.ts +23 -0
  55. package/dist/generators/schema-type.d.ts.map +1 -0
  56. package/dist/generators/schema-type.js +233 -0
  57. package/dist/generators/schema-type.js.map +1 -0
  58. package/dist/parsers/base.d.ts +2 -0
  59. package/dist/parsers/base.d.ts.map +1 -1
  60. package/dist/parsers/base.js +12 -2
  61. package/dist/parsers/base.js.map +1 -1
  62. package/dist/parsers/factory.d.ts.map +1 -1
  63. package/dist/parsers/factory.js +2 -1
  64. package/dist/parsers/factory.js.map +1 -1
  65. package/dist/parsers/openapi.d.ts +4 -0
  66. package/dist/parsers/openapi.d.ts.map +1 -1
  67. package/dist/parsers/openapi.js +107 -20
  68. package/dist/parsers/openapi.js.map +1 -1
  69. package/dist/plugins/branded-types.d.ts.map +1 -1
  70. package/dist/plugins/branded-types.js +231 -365
  71. package/dist/plugins/branded-types.js.map +1 -1
  72. package/dist/plugins/builtin.d.ts.map +1 -1
  73. package/dist/plugins/builtin.js +6 -141
  74. package/dist/plugins/builtin.js.map +1 -1
  75. package/dist/plugins/index.d.ts +4 -0
  76. package/dist/plugins/index.d.ts.map +1 -1
  77. package/dist/plugins/index.js +17 -0
  78. package/dist/plugins/index.js.map +1 -1
  79. package/dist/plugins/loader.d.ts +5 -1
  80. package/dist/plugins/loader.d.ts.map +1 -1
  81. package/dist/plugins/loader.js +42 -5
  82. package/dist/plugins/loader.js.map +1 -1
  83. package/dist/plugins/manager.d.ts.map +1 -1
  84. package/dist/plugins/manager.js +7 -7
  85. package/dist/plugins/manager.js.map +1 -1
  86. package/dist/plugins/performance-monitoring.d.ts +31 -1
  87. package/dist/plugins/performance-monitoring.d.ts.map +1 -1
  88. package/dist/plugins/performance-monitoring.js +146 -207
  89. package/dist/plugins/performance-monitoring.js.map +1 -1
  90. package/dist/plugins/request-deduplication.d.ts.map +1 -1
  91. package/dist/plugins/request-deduplication.js +151 -586
  92. package/dist/plugins/request-deduplication.js.map +1 -1
  93. package/dist/plugins/zod-validation.d.ts +23 -15
  94. package/dist/plugins/zod-validation.d.ts.map +1 -1
  95. package/dist/plugins/zod-validation.js +390 -268
  96. package/dist/plugins/zod-validation.js.map +1 -1
  97. package/dist/types/core.d.ts +20 -4
  98. package/dist/types/core.d.ts.map +1 -1
  99. package/dist/types/core.js +2 -1
  100. package/dist/types/core.js.map +1 -1
  101. package/dist/types/openapi.d.ts +14 -1
  102. package/dist/types/openapi.d.ts.map +1 -1
  103. package/docs/ADVANCED_PLUGINS_IMPLEMENTATION.md +24 -355
  104. package/docs/ADVANCED_PLUGIN_DEVELOPMENT.md +33 -309
  105. package/docs/API.md +80 -600
  106. package/docs/AUDIT.md +49 -0
  107. package/docs/CONFIGURATION.md +81 -722
  108. package/docs/FASTAPI_TUTORIAL.md +109 -1497
  109. package/docs/NAMING_MIGRATION.md +59 -0
  110. package/docs/PLUGINS.md +49 -687
  111. package/docs/PLUGIN_DEVELOPMENT.md +53 -720
  112. package/docs/REAUDIT.md +399 -0
  113. package/docs/RELEASING.md +88 -0
  114. package/docs/REMEDIATION.md +58 -0
  115. package/docs/superpowers/plans/2026-10-10-audit-remediation.md +113 -0
  116. package/package.json +114 -95
  117. package/dist/__tests__/setup.d.ts +0 -6
  118. package/dist/__tests__/setup.d.ts.map +0 -1
  119. package/dist/__tests__/setup.js +0 -30
  120. package/dist/__tests__/setup.js.map +0 -1
  121. package/dist/__tests__/test-config.d.ts +0 -36
  122. package/dist/__tests__/test-config.d.ts.map +0 -1
  123. package/dist/__tests__/test-config.js +0 -563
  124. package/dist/__tests__/test-config.js.map +0 -1
  125. package/dist/lib/api/api-client.d.ts +0 -71
  126. package/dist/lib/api/api-client.d.ts.map +0 -1
  127. package/dist/lib/api/api-client.js +0 -238
  128. package/dist/lib/api/api-client.js.map +0 -1
  129. package/dist/lib/api/barrel.d.ts +0 -4
  130. package/dist/lib/api/barrel.d.ts.map +0 -1
  131. package/dist/lib/api/barrel.js +0 -26
  132. package/dist/lib/api/barrel.js.map +0 -1
  133. package/dist/lib/api/hooks.d.ts +0 -36
  134. package/dist/lib/api/hooks.d.ts.map +0 -1
  135. package/dist/lib/api/hooks.js +0 -120
  136. package/dist/lib/api/hooks.js.map +0 -1
  137. package/dist/lib/api/index.d.ts +0 -4
  138. package/dist/lib/api/index.d.ts.map +0 -1
  139. package/dist/lib/api/index.js +0 -8
  140. package/dist/lib/api/index.js.map +0 -1
  141. package/dist/lib/api/types.d.ts +0 -366
  142. package/dist/lib/api/types.d.ts.map +0 -1
  143. package/dist/lib/api/types.js +0 -315
  144. package/dist/lib/api/types.js.map +0 -1
@@ -0,0 +1,113 @@
1
+ # Audit remediation implementation plan
2
+
3
+ > **For agentic workers:** Use the systematic-debugging, test-driven-development and verification-before-completion skills. Independent plugin, CLI and schema work runs in parallel with explicitly bounded file ownership; integrate and review the complete generated contracts before completion.
4
+
5
+ **Goal:** Correct all reproduced audit defects and remove or explicitly diagnose incomplete feature promises, then implement the agreed safe naming migration.
6
+
7
+ **Architecture:** Keep the existing generator API, but centralize validated configuration, generated module/file assembly and schema naming/projections. Emit complete output in memory before an owned-file transaction; use schema metadata consistently for static types and runtime boundaries. Optional helpers remain explicit integrations unless a tested adapter is added.
8
+
9
+ **Tech stack:** TypeScript, Node 20+, fetch, plain React hooks, optional Zod 4, Jest consumer/runtime tests.
10
+
11
+ **Spec:** docs/REAUDIT.md and docs/NAMING_MIGRATION.md.
12
+
13
+ ## Constraints and decisions
14
+
15
+ - Preserve previous authorized fixes and unrelated dirty workspace changes; do not reset, commit or publish.
16
+ - All generated relative imports use `.js` specifiers, compatible with TS module resolution for Node ESM and bundlers; distinguish type imports from runtime enums.
17
+ - Keep default output complete (types/client/index), React optional; public config allows omitted defaulted fields, internal config is validated/resolved.
18
+ - Unsupported features receive explicit diagnostics or are removed from documentation; prospective expansion recommendations are not a promise to build every adapter/OAuth/UI feature.
19
+ - CamelCase application properties must include schema-aware serialization/deserialization, with explicit preserve mode; never change static spelling alone.
20
+ - The user has authorized execution of the existing audit roadmap. Continue implementation without another plan approval gate.
21
+
22
+ ## Review focus
23
+
24
+ - Multiple tenants or colliding request URLs must not share cache results.
25
+ - Case aliases, path ancestors and failed generation must not overwrite or partially replace existing output.
26
+ - Media/status/schema selection must agree between generated return types and actual runtime values.
27
+ - Async mutation completion, reset and unmount must not resurrect invalidated state.
28
+ - Config/plugin combinations and naming collisions must fail clearly, never silently omit work.
29
+
30
+ ## Tasks
31
+
32
+ ### 1. Optional plugin contracts (parallel owner: fix_plugins)
33
+
34
+ Files: src/plugins/request-deduplication.ts, branded-types.ts, zod-validation.ts, performance-monitoring.ts, builtin.ts, index.ts; new plugin-reaudit.test.ts.
35
+
36
+ - [x] Reproduce R01/R06/R16/R17/R18 with assertions against freshly generated runtime/consumer modules.
37
+ - [x] Fix canonical request identities/header scope, stale/invalidation/statistics/key callbacks.
38
+ - [x] Emit branded shared declarations once and implement honest guards/feature switches.
39
+ - [x] Correct Zod composition/constraints/permissive response behavior and ineffective exposed options.
40
+ - [x] Synchronize monitoring exports/options; append requested reports as GeneratedFile records before commit; expose supported helper APIs.
41
+ - [x] Run targeted Jest tests; integrate with full suite and re-audit plugin probes.
42
+
43
+ ### 2. CLI, guides and release gates (parallel owner: fix_cli_docs)
44
+
45
+ Files: src/cli/index.ts, src/plugins/loader.ts, maintained guides, workflow YAML, publish scripts; new cli-reaudit.test.ts.
46
+
47
+ - [x] Assert protected init, interactive failure status/defaults, config/discovery/validate parity, plugin load/generate resolution.
48
+ - [x] Use shared resolveConfiguration(input): ResolvedSchemanticConfig; load plugins in the generation invocation.
49
+ - [x] Implement meaningful supported flags or reject/remove ineffective ones; correct all public examples.
50
+ - [x] Parse real npm pack sizes, add platform-sensitive CI and remove publishing scripts that mutate the working package name on failure.
51
+ - [x] Run source-level tests, then freshly built spawned CLI tests and compile guide examples during integration.
52
+
53
+ ### 3. Schema/parser fidelity (parallel owner: fix_schema)
54
+
55
+ Files: schema-type.ts/object-generator.ts/primitive-generator.ts, parser sources and schema types; new schema-reaudit.test.ts.
56
+
57
+ Interface: schemaType sixth optional SchemaTypeOptions {direction?: 'request'|'response'; binary?: boolean; propertyName?: (wire: string) => string}, retaining fifth seen argument.
58
+
59
+ - [x] Assert R13 dialect patches/boolean/components-only support and truthful YAML behavior.
60
+ - [x] Fix heterogeneous dictionary modeling, allOf required-only and 3.1 reference sibling constraints.
61
+ - [x] Add direction/binary/property-name options propagated through recursive schema generation.
62
+ - [x] Compile valid and invalid consumer assignments; root integrates directional aliases/media handling.
63
+
64
+ ### 4. Core configuration and safe output (root)
65
+
66
+ Files: src/core/configuration.ts, schemantic.ts, plugins/manager.ts, types/core.ts; new core-reaudit.test.ts.
67
+
68
+ - [x] Assert R02/R14/R15/R21: case/ancestor collisions, validation refs, plugin hook failures, stale owned outputs, custom imports and ergonomic config.
69
+ - [x] Separate optional input configuration from required resolved config; validate field types, supported flags and plugin entries.
70
+ - [x] Build GeneratedFile records in memory; run after-generation hooks before commit; validate destinations; stage/backup/rollback owned output and manifest.
71
+ - [x] Preserve arbitrary imports with type/value-aware module assembly; propagate plugin failures with names/hooks.
72
+ - [x] Verify failed generation leaves existing output unchanged and removes only stale manifest-owned files after success.
73
+
74
+ ### 5. Client media/serialization/module contracts (root)
75
+
76
+ Files: api-client-generator.ts, core assembly, generated endpoint types; new client-reaudit.test.ts.
77
+
78
+ - [x] Assert R03/R05/R07–R12: auth casing, directional types, binary bytes, Path Item refs, schema-less/default/multiple/XML responses, object queries and strict/ESM compilers.
79
+ - [x] Use case-insensitive header helpers, direction-aware request/response aliases, media-aware decoding/types and default response fallback.
80
+ - [x] Serialize object queries by documented style/explode and diagnose unsupported encodings.
81
+ - [x] Emit type-only/runtime imports correctly, qualify global binary helpers, emit only used helpers and `.js` specifiers.
82
+ - [x] Run consumer compile and real local HTTP tests for outgoing bytes and incoming values.
83
+
84
+ ### 6. Hook lifecycle (root)
85
+
86
+ Files: hook-generator.ts; new hook mutation tests alongside existing query tests.
87
+
88
+ - [x] Assert reversed results/errors, overlapping loading, pending reset and unmount suppression.
89
+ - [x] Implement latest-call state semantics and invalidation while retaining per-caller promise results.
90
+ - [x] Verify query stability remains intact; mount actual React tests if dependencies available, otherwise retain explicit boundary.
91
+
92
+ ### 7. Naming migration (root, after core correctness)
93
+
94
+ Files: naming/schema conversion modules, shared config, generators and plugin integration; new naming runtime/consumer tests.
95
+
96
+ - [x] Assert both property modes, nested arrays/refs/dictionaries, optional/null, unions, collisions and immutable round trips.
97
+ - [x] Emit application and wire mappings plus schema-aware converters; expose converters for types-only users.
98
+ - [x] Connect request serialization/response deserialization and ensure validation/hooks follow the same names; preserve binary and enum values.
99
+ - [x] Enable camelCase default only with verified wire round trips and document preserve-mode compatibility.
100
+
101
+ ### 8. Integration and completion
102
+
103
+ - [x] Run full Jest, build/lint, all fixture modes, consumer matrix, audit probes and package inspection.
104
+ - [x] Review the final changed contracts and audit-ID coverage with a fresh reviewer; correct material findings.
105
+ - [x] Record exact closed/remaining items in docs/REMEDIATION.md; never claim full closure based only on fixture compilation.
106
+
107
+ ## Execution ledger
108
+
109
+ - Started 2026-10-10. Previous baseline: 184 tests; defects recorded in the re-audit. Parallel owners instructed not to clean/rebuild shared dist. Root coordinates full builds and integration.
110
+
111
+ - Integrated 2026-10-12: schema/client/plugin/CLI/hook fixes, camelCase HTTP boundaries, preservation mode, mounted React, independent review corrections. Fresh lockfile and scoped coverage-parser override audited clean. Final full and packaged-consumer gates in progress.
112
+
113
+ - Completed 2026-10-12: full build/lint/coverage gate 316 tests in22 suites; 36 fixture combinations and five strict consumer configurations; zero npm audit advisories; archive inspection and isolated installed CommonJS/ESM/CLI/HTTP consumer passed. Windows sharing locks retry with path rechecks and bounded backoff. No commit or publication performed; deliberate support limits recorded in docs/REMEDIATION.md.
package/package.json CHANGED
@@ -1,95 +1,114 @@
1
- {
2
- "name": "schemantic",
3
- "version": "0.2.1",
4
- "description": "A fully typed, extensible TypeScript type generator for FastAPI OpenAPI schemas",
5
- "main": "dist/index.js",
6
- "module": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.js",
12
- "require": "./dist/index.js"
13
- },
14
- "./package.json": "./package.json"
15
- },
16
- "bin": {
17
- "schemantic": "dist/cli/index.js"
18
- },
19
- "scripts": {
20
- "build": "tsc",
21
- "dev": "tsc --watch",
22
- "test": "jest",
23
- "test:watch": "jest --watch",
24
- "test:coverage": "jest --coverage",
25
- "lint": "eslint -c eslint.config.mjs src/**/*.ts",
26
- "lint:fix": "eslint -c eslint.config.mjs src/**/*.ts --fix",
27
- "clean": "rm -rf dist",
28
- "prepublishOnly": "echo",
29
- "publish:npm": "npm publish --access public",
30
- "publish:gh": "npm pkg set name=@Cstannahill/schemantic && npm publish && npm pkg set name=schemantic",
31
- "publish:both": "npm run publish:npm && npm run publish:gh"
32
- },
33
- "keywords": [
34
- "typescript",
35
- "openapi",
36
- "fastapi",
37
- "api-client",
38
- "type-generation",
39
- "api",
40
- "codegen",
41
- "client-generator",
42
- "schema",
43
- "rest-api",
44
- "frontend",
45
- "backend",
46
- "full-stack",
47
- "react",
48
- "hooks",
49
- "json-schema",
50
- "developer-tools",
51
- "automation"
52
- ],
53
- "author": "Christian Tannahill <ctan.dev@gmail.com>",
54
- "license": "MIT",
55
- "repository": {
56
- "type": "git",
57
- "url": "git+https://github.com/Cstannahill/schemantic.git"
58
- },
59
- "publishConfig": {
60
- "access": "public"
61
- },
62
- "homepage": "https://github.com/Cstannahill/schemantic#readme",
63
- "bugs": {
64
- "url": "https://github.com/Cstannahill/schemantic/issues"
65
- },
66
- "devDependencies": {
67
- "@eslint/js": "^9.35.0",
68
- "@types/jest": "^30.0.0",
69
- "@types/node": "^24.3.3",
70
- "@typescript-eslint/eslint-plugin": "^8.43.0",
71
- "@typescript-eslint/parser": "^8.43.0",
72
- "eslint": "^9.35.0",
73
- "jest": "^30.1.3",
74
- "ts-jest": "^29.4.1",
75
- "typescript": "^5.9.2",
76
- "zod": "^4.1.12"
77
- },
78
- "engines": {
79
- "node": ">=16.0.0"
80
- },
81
- "files": [
82
- "dist/**/*",
83
- "README.md",
84
- "LICENSE",
85
- "CHANGELOG.md",
86
- "docs/**/*",
87
- "!dist/**/*.test.*",
88
- "!dist/**/*.spec.*"
89
- ],
90
- "dependencies": {
91
- "axios": "^1.12.1",
92
- "chokidar": "^4.0.1",
93
- "commander": "^14.0.1"
94
- }
95
- }
1
+ {
2
+ "name": "schemantic",
3
+ "version": "0.4.0",
4
+ "description": "A fully typed, extensible TypeScript type generator for FastAPI OpenAPI schemas",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/index.js"
13
+ },
14
+ "./package.json": "./package.json"
15
+ },
16
+ "bin": {
17
+ "schemantic": "dist/cli/index.js"
18
+ },
19
+ "scripts": {
20
+ "build": "npm run clean && tsc",
21
+ "dev": "tsc --watch",
22
+ "test": "jest",
23
+ "pretest": "npm run build",
24
+ "prepack": "npm run build",
25
+ "test:watch": "jest --watch",
26
+ "test:coverage": "jest --coverage",
27
+ "test:release": "node scripts/run-release-tests.cjs",
28
+ "verify:fixtures": "node scripts/ci/verify-fixtures.cjs",
29
+ "verify:live": "node scripts/ci/verify-live.cjs",
30
+ "package:verify": "node scripts/ci/verify-package.cjs",
31
+ "release:prepare": "node scripts/release.cjs prepare",
32
+ "release:check": "node scripts/release.cjs check",
33
+ "release:notes": "node scripts/release.cjs notes",
34
+ "lint": "eslint -c eslint.config.mjs src/**/*.ts",
35
+ "lint:fix": "eslint -c eslint.config.mjs src/**/*.ts --fix",
36
+ "clean": "node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"",
37
+ "prepublishOnly": "npm run release:check && npm run lint && npm run test:release && npm test -- --runInBand",
38
+ "publish:npm": "npm run release:check && npm publish --access public"
39
+ },
40
+ "keywords": [
41
+ "typescript",
42
+ "openapi",
43
+ "fastapi",
44
+ "api-client",
45
+ "type-generation",
46
+ "api",
47
+ "codegen",
48
+ "client-generator",
49
+ "schema",
50
+ "rest-api",
51
+ "frontend",
52
+ "backend",
53
+ "full-stack",
54
+ "react",
55
+ "hooks",
56
+ "json-schema",
57
+ "developer-tools",
58
+ "automation"
59
+ ],
60
+ "author": "Christian Tannahill <ctan.dev@gmail.com>",
61
+ "license": "MIT",
62
+ "repository": {
63
+ "type": "git",
64
+ "url": "git+https://github.com/Cstannahill/schemantic.git"
65
+ },
66
+ "publishConfig": {
67
+ "access": "public"
68
+ },
69
+ "homepage": "https://github.com/Cstannahill/schemantic#readme",
70
+ "bugs": {
71
+ "url": "https://github.com/Cstannahill/schemantic/issues"
72
+ },
73
+ "devDependencies": {
74
+ "@eslint/js": "^9.35.0",
75
+ "@types/jest": "^30.0.0",
76
+ "@types/node": "^24.3.3",
77
+ "@types/react": "^19.3.0",
78
+ "@types/react-test-renderer": "^19.3.0",
79
+ "@typescript-eslint/eslint-plugin": "^8.43.0",
80
+ "@typescript-eslint/parser": "^8.43.0",
81
+ "eslint": "^9.35.0",
82
+ "jest": "^30.1.3",
83
+ "js-yaml": "^4.3.2",
84
+ "react": "^19.3.0",
85
+ "react-test-renderer": "^19.3.0",
86
+ "semver": "^7.8.5",
87
+ "ts-jest": "^29.4.1",
88
+ "typescript": "^5.9.2",
89
+ "zod": "^4.1.12"
90
+ },
91
+ "overrides": {
92
+ "@istanbuljs/load-nyc-config": {
93
+ "js-yaml": "^4.3.2"
94
+ }
95
+ },
96
+ "engines": {
97
+ "node": ">=20.0.0"
98
+ },
99
+ "files": [
100
+ "dist/**/*",
101
+ "README.md",
102
+ "LICENSE",
103
+ "CHANGELOG.md",
104
+ "docs/**/*",
105
+ "!dist/**/*.test.*",
106
+ "!dist/**/*.spec.*",
107
+ "!dist/__tests__/**"
108
+ ],
109
+ "dependencies": {
110
+ "axios": "^1.20.0",
111
+ "chokidar": "^4.0.1",
112
+ "commander": "^14.0.1"
113
+ }
114
+ }
@@ -1,6 +0,0 @@
1
- /**
2
- * Jest setup file for global test configuration
3
- */
4
- declare const originalConsoleError: (message?: any, ...optionalParams: any[]) => void;
5
- declare const originalConsoleWarn: (message?: any, ...optionalParams: any[]) => void;
6
- //# sourceMappingURL=setup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/__tests__/setup.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,QAAA,MAAM,oBAAoB,mDAAgB,CAAC;AAC3C,QAAA,MAAM,mBAAmB,mDAAe,CAAC"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- /**
3
- * Jest setup file for global test configuration
4
- */
5
- // Increase test timeout for integration tests
6
- jest.setTimeout(30000);
7
- // Mock console methods to reduce noise during tests
8
- const originalConsoleError = console.error;
9
- const originalConsoleWarn = console.warn;
10
- beforeEach(() => {
11
- // Mock console.error and console.warn to suppress expected errors in tests
12
- console.error = jest.fn();
13
- console.warn = jest.fn();
14
- });
15
- afterEach(() => {
16
- // Restore original console methods
17
- console.error = originalConsoleError;
18
- console.warn = originalConsoleWarn;
19
- // Clear all mocks
20
- jest.clearAllMocks();
21
- });
22
- // Set up environment variables for testing
23
- process.env.NODE_ENV = "test";
24
- // Dummy test to satisfy Jest requirement
25
- describe("Setup", () => {
26
- it("should configure test environment", () => {
27
- expect(process.env.NODE_ENV).toBe("test");
28
- });
29
- });
30
- //# sourceMappingURL=setup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup.js","sourceRoot":"","sources":["../../src/__tests__/setup.ts"],"names":[],"mappings":";AAAA;;GAEG;AAEH,8CAA8C;AAC9C,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AAEvB,oDAAoD;AACpD,MAAM,oBAAoB,GAAG,OAAO,CAAC,KAAK,CAAC;AAC3C,MAAM,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;AAEzC,UAAU,CAAC,GAAG,EAAE;IACd,2EAA2E;IAC3E,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAC1B,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AAC3B,CAAC,CAAC,CAAC;AAEH,SAAS,CAAC,GAAG,EAAE;IACb,mCAAmC;IACnC,OAAO,CAAC,KAAK,GAAG,oBAAoB,CAAC;IACrC,OAAO,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAEnC,kBAAkB;IAClB,IAAI,CAAC,aAAa,EAAE,CAAC;AACvB,CAAC,CAAC,CAAC;AAEH,2CAA2C;AAC3C,OAAO,CAAC,GAAG,CAAC,QAAQ,GAAG,MAAM,CAAC;AAE9B,yCAAyC;AACzC,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;IACrB,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;QAC3C,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,36 +0,0 @@
1
- /**
2
- * Test configuration and utilities
3
- */
4
- import { SchemanticConfig } from "../types/core";
5
- import { OpenAPISchema } from "../types/openapi";
6
- /**
7
- * Create a test configuration
8
- */
9
- export declare function createTestConfig(overrides?: Partial<SchemanticConfig>): SchemanticConfig;
10
- /**
11
- * Create a minimal test schema
12
- */
13
- export declare function createTestSchema(): OpenAPISchema;
14
- /**
15
- * Create a complex test schema with various types
16
- */
17
- export declare function createComplexTestSchema(): OpenAPISchema;
18
- /**
19
- * Mock file system operations for tests
20
- */
21
- export declare const mockFs: {
22
- mkdir: jest.Mock<any, any, any>;
23
- writeFile: jest.Mock<any, any, any>;
24
- readFile: jest.Mock<any, any, any>;
25
- access: jest.Mock<any, any, any>;
26
- readdir: jest.Mock<any, any, any>;
27
- };
28
- /**
29
- * Setup mock file system
30
- */
31
- export declare function setupMockFs(): void;
32
- /**
33
- * Reset mock file system
34
- */
35
- export declare function resetMockFs(): void;
36
- //# sourceMappingURL=test-config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-config.d.ts","sourceRoot":"","sources":["../../src/__tests__/test-config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAkB,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,GAAE,OAAO,CAAC,gBAAgB,CAAM,GACxC,gBAAgB,CAiBlB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,CA0QhD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,aAAa,CAoNvD;AAED;;GAEG;AACH,eAAO,MAAM,MAAM;;;;;;CAMlB,CAAC;AAEF;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAQlC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAElC"}