zod-codegen 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/.github/ISSUE_TEMPLATE/bug_report.yml +93 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +70 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +87 -0
- package/.github/dependabot.yml +76 -0
- package/.github/workflows/ci.yml +143 -0
- package/.github/workflows/release.yml +65 -0
- package/.husky/commit-msg +2 -0
- package/.husky/pre-commit +5 -0
- package/.lintstagedrc.json +4 -0
- package/.nvmrc +1 -0
- package/.prettierrc.json +7 -0
- package/.releaserc.json +159 -0
- package/CHANGELOG.md +24 -0
- package/CONTRIBUTING.md +274 -0
- package/LICENCE +201 -0
- package/README.md +263 -0
- package/SECURITY.md +108 -0
- package/codecov.yml +29 -0
- package/commitlint.config.mjs +28 -0
- package/dist/scripts/update-manifest.js +31 -0
- package/dist/src/assets/manifest.json +5 -0
- package/dist/src/cli.js +60 -0
- package/dist/src/generator.js +55 -0
- package/dist/src/http/fetch-client.js +141 -0
- package/dist/src/interfaces/code-generator.js +1 -0
- package/dist/src/interfaces/file-reader.js +1 -0
- package/dist/src/polyfills/fetch.js +18 -0
- package/dist/src/services/code-generator.service.js +419 -0
- package/dist/src/services/file-reader.service.js +25 -0
- package/dist/src/services/file-writer.service.js +32 -0
- package/dist/src/services/import-builder.service.js +45 -0
- package/dist/src/services/type-builder.service.js +42 -0
- package/dist/src/types/http.js +10 -0
- package/dist/src/types/openapi.js +173 -0
- package/dist/src/utils/error-handler.js +11 -0
- package/dist/src/utils/execution-time.js +3 -0
- package/dist/src/utils/manifest.js +9 -0
- package/dist/src/utils/reporter.js +15 -0
- package/dist/src/utils/signal-handler.js +12 -0
- package/dist/src/utils/tty.js +3 -0
- package/dist/tests/integration/cli.test.js +25 -0
- package/dist/tests/unit/generator.test.js +29 -0
- package/dist/vitest.config.js +38 -0
- package/eslint.config.mjs +33 -0
- package/package.json +102 -0
- package/samples/openapi.json +1 -0
- package/samples/saris-openapi.json +7122 -0
- package/samples/swagger-petstore.yaml +802 -0
- package/samples/swagger-saris.yaml +3585 -0
- package/samples/test-logical.yaml +50 -0
- package/scripts/update-manifest.js +31 -0
- package/scripts/update-manifest.ts +47 -0
- package/src/assets/manifest.json +5 -0
- package/src/cli.ts +68 -0
- package/src/generator.ts +61 -0
- package/src/http/fetch-client.ts +181 -0
- package/src/interfaces/code-generator.ts +25 -0
- package/src/interfaces/file-reader.ts +15 -0
- package/src/polyfills/fetch.ts +26 -0
- package/src/services/code-generator.service.ts +775 -0
- package/src/services/file-reader.service.ts +29 -0
- package/src/services/file-writer.service.ts +36 -0
- package/src/services/import-builder.service.ts +64 -0
- package/src/services/type-builder.service.ts +77 -0
- package/src/types/http.ts +35 -0
- package/src/types/openapi.ts +202 -0
- package/src/utils/error-handler.ts +13 -0
- package/src/utils/execution-time.ts +3 -0
- package/src/utils/manifest.ts +17 -0
- package/src/utils/reporter.ts +16 -0
- package/src/utils/signal-handler.ts +14 -0
- package/src/utils/tty.ts +3 -0
- package/tests/integration/cli.test.ts +29 -0
- package/tests/unit/generator.test.ts +36 -0
- package/tsconfig.json +44 -0
- package/vitest.config.ts +39 -0
package/.releaserc.json
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
{
|
|
2
|
+
"branches": [
|
|
3
|
+
"main",
|
|
4
|
+
"main",
|
|
5
|
+
{
|
|
6
|
+
"name": "develop",
|
|
7
|
+
"prerelease": "beta"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"plugins": [
|
|
11
|
+
[
|
|
12
|
+
"@semantic-release/commit-analyzer",
|
|
13
|
+
{
|
|
14
|
+
"preset": "conventionalcommits",
|
|
15
|
+
"releaseRules": [
|
|
16
|
+
{
|
|
17
|
+
"type": "feat",
|
|
18
|
+
"release": "minor"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"type": "fix",
|
|
22
|
+
"release": "patch"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"type": "perf",
|
|
26
|
+
"release": "patch"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "docs",
|
|
30
|
+
"release": false
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "style",
|
|
34
|
+
"release": false
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "refactor",
|
|
38
|
+
"release": "patch"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "test",
|
|
42
|
+
"release": false
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "build",
|
|
46
|
+
"release": false
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"type": "ci",
|
|
50
|
+
"release": false
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "chore",
|
|
54
|
+
"release": false
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"type": "revert",
|
|
58
|
+
"release": "patch"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"breaking": true,
|
|
62
|
+
"release": "major"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
[
|
|
68
|
+
"@semantic-release/release-notes-generator",
|
|
69
|
+
{
|
|
70
|
+
"preset": "conventionalcommits",
|
|
71
|
+
"presetConfig": {
|
|
72
|
+
"types": [
|
|
73
|
+
{
|
|
74
|
+
"type": "feat",
|
|
75
|
+
"section": "🚀 Features"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"type": "fix",
|
|
79
|
+
"section": "🐛 Bug Fixes"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"type": "perf",
|
|
83
|
+
"section": "⚡ Performance Improvements"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"type": "revert",
|
|
87
|
+
"section": "⏪ Reverts"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"type": "docs",
|
|
91
|
+
"section": "📚 Documentation",
|
|
92
|
+
"hidden": false
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"type": "style",
|
|
96
|
+
"section": "💄 Styles",
|
|
97
|
+
"hidden": true
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"type": "chore",
|
|
101
|
+
"section": "🏗️ Chores",
|
|
102
|
+
"hidden": true
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"type": "refactor",
|
|
106
|
+
"section": "♻️ Code Refactoring"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"type": "test",
|
|
110
|
+
"section": "✅ Tests",
|
|
111
|
+
"hidden": true
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"type": "build",
|
|
115
|
+
"section": "👷 Build System",
|
|
116
|
+
"hidden": true
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "ci",
|
|
120
|
+
"section": "🔧 Continuous Integration",
|
|
121
|
+
"hidden": true
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
[
|
|
128
|
+
"@semantic-release/changelog",
|
|
129
|
+
{
|
|
130
|
+
"changelogFile": "CHANGELOG.md"
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
[
|
|
134
|
+
"@semantic-release/npm",
|
|
135
|
+
{
|
|
136
|
+
"npmPublish": true,
|
|
137
|
+
"tarballDir": "dist"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
[
|
|
141
|
+
"@semantic-release/github",
|
|
142
|
+
{
|
|
143
|
+
"assets": [
|
|
144
|
+
{
|
|
145
|
+
"path": "dist/**",
|
|
146
|
+
"label": "Distribution files"
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
[
|
|
152
|
+
"@semantic-release/git",
|
|
153
|
+
{
|
|
154
|
+
"assets": ["CHANGELOG.md", "package.json", "package-lock.json"],
|
|
155
|
+
"message": "chore(release): ${nextRelease.version} [skip ci]"
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
]
|
|
159
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
## 1.0.0 (2025-09-16)
|
|
2
|
+
|
|
3
|
+
- chore: fix husky deprecation warnings and improve ci/cd ([fe24d72](https://github.com/julienandreu/zod-codegen/commit/fe24d72))
|
|
4
|
+
- Merge pull request #1 from julienandreu/feat/clean-version ([bb2d67e](https://github.com/julienandreu/zod-codegen/commit/bb2d67e)), closes [#1](https://github.com/julienandreu/zod-codegen/issues/1)
|
|
5
|
+
- Merge pull request #2 from julienandreu/feat/allow-autopublish ([89a3e0a](https://github.com/julienandreu/zod-codegen/commit/89a3e0a)), closes [#2](https://github.com/julienandreu/zod-codegen/issues/2)
|
|
6
|
+
- feat: add array type support ([78bb87f](https://github.com/julienandreu/zod-codegen/commit/78bb87f))
|
|
7
|
+
- feat: add discriminator + smart sort ([34ca600](https://github.com/julienandreu/zod-codegen/commit/34ca600))
|
|
8
|
+
- feat: add encoding helpers for object, string, integer and boolean types ([436c688](https://github.com/julienandreu/zod-codegen/commit/436c688))
|
|
9
|
+
- feat: add helper client generation ([2761cb0](https://github.com/julienandreu/zod-codegen/commit/2761cb0))
|
|
10
|
+
- feat: add prettier configuration ([c1e2e01](https://github.com/julienandreu/zod-codegen/commit/c1e2e01))
|
|
11
|
+
- feat: add quick example ([3f3b8fa](https://github.com/julienandreu/zod-codegen/commit/3f3b8fa))
|
|
12
|
+
- feat: add zod openapi schema validation ([164b032](https://github.com/julienandreu/zod-codegen/commit/164b032))
|
|
13
|
+
- feat: clean version ([6033692](https://github.com/julienandreu/zod-codegen/commit/6033692))
|
|
14
|
+
- feat: complete requestBody processing ([5ca5e8f](https://github.com/julienandreu/zod-codegen/commit/5ca5e8f))
|
|
15
|
+
- feat: implement all parameters for paths ([e87875e](https://github.com/julienandreu/zod-codegen/commit/e87875e))
|
|
16
|
+
- feat: implement makeApiRequest private method ([7a4d52f](https://github.com/julienandreu/zod-codegen/commit/7a4d52f))
|
|
17
|
+
- feat: improve developer experience ([77776c1](https://github.com/julienandreu/zod-codegen/commit/77776c1))
|
|
18
|
+
- feat: improve developer experience ([1baacff](https://github.com/julienandreu/zod-codegen/commit/1baacff))
|
|
19
|
+
- feat: improve generator ([6beda59](https://github.com/julienandreu/zod-codegen/commit/6beda59))
|
|
20
|
+
- feat: improve schemas definition and sorting ([5367abd](https://github.com/julienandreu/zod-codegen/commit/5367abd))
|
|
21
|
+
- feat: initial commit ([b6e0c3a](https://github.com/julienandreu/zod-codegen/commit/b6e0c3a))
|
|
22
|
+
- feat: rebuild from scratch ([1192189](https://github.com/julienandreu/zod-codegen/commit/1192189))
|
|
23
|
+
- feat: start endpoint helpers implementation ([e7a16a1](https://github.com/julienandreu/zod-codegen/commit/e7a16a1))
|
|
24
|
+
- feat: use library to parse openapi specifications ([937f265](https://github.com/julienandreu/zod-codegen/commit/937f265))
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
# Contributing to zod-codegen
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to zod-codegen! 🎉
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Code of Conduct](#code-of-conduct)
|
|
8
|
+
- [Getting Started](#getting-started)
|
|
9
|
+
- [Development Setup](#development-setup)
|
|
10
|
+
- [Making Changes](#making-changes)
|
|
11
|
+
- [Pull Request Process](#pull-request-process)
|
|
12
|
+
- [Coding Standards](#coding-standards)
|
|
13
|
+
- [Testing](#testing)
|
|
14
|
+
- [Documentation](#documentation)
|
|
15
|
+
|
|
16
|
+
## Code of Conduct
|
|
17
|
+
|
|
18
|
+
This project adheres to a code of conduct. By participating, you are expected to uphold this code. Please be respectful and professional in all interactions.
|
|
19
|
+
|
|
20
|
+
## Getting Started
|
|
21
|
+
|
|
22
|
+
### Prerequisites
|
|
23
|
+
|
|
24
|
+
- Node.js >= 18.0.0
|
|
25
|
+
- npm or yarn
|
|
26
|
+
- Git
|
|
27
|
+
|
|
28
|
+
### Development Setup
|
|
29
|
+
|
|
30
|
+
1. **Fork and Clone**
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
git clone https://github.com/YOUR_USERNAME/zod-codegen.git
|
|
34
|
+
cd zod-codegen
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
2. **Install Dependencies**
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
3. **Build the Project**
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm run build
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
4. **Run Tests**
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npm test
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
5. **Run Development Mode**
|
|
56
|
+
```bash
|
|
57
|
+
npm run dev
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Making Changes
|
|
61
|
+
|
|
62
|
+
### Branch Naming
|
|
63
|
+
|
|
64
|
+
Use descriptive branch names:
|
|
65
|
+
|
|
66
|
+
- `feat/add-new-schema-type` - for new features
|
|
67
|
+
- `fix/handle-edge-case` - for bug fixes
|
|
68
|
+
- `docs/update-readme` - for documentation
|
|
69
|
+
- `refactor/optimize-parser` - for refactoring
|
|
70
|
+
|
|
71
|
+
### Commit Messages
|
|
72
|
+
|
|
73
|
+
We use [Conventional Commits](https://www.conventionalcommits.org/):
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
<type>[optional scope]: <description>
|
|
77
|
+
|
|
78
|
+
[optional body]
|
|
79
|
+
|
|
80
|
+
[optional footer(s)]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Types:**
|
|
84
|
+
|
|
85
|
+
- `feat`: A new feature
|
|
86
|
+
- `fix`: A bug fix
|
|
87
|
+
- `docs`: Documentation only changes
|
|
88
|
+
- `style`: Changes that do not affect code meaning (white-space, formatting, etc)
|
|
89
|
+
- `refactor`: A code change that neither fixes a bug nor adds a feature
|
|
90
|
+
- `perf`: A code change that improves performance
|
|
91
|
+
- `test`: Adding missing tests or correcting existing tests
|
|
92
|
+
- `build`: Changes that affect the build system or external dependencies
|
|
93
|
+
- `ci`: Changes to our CI configuration files and scripts
|
|
94
|
+
- `chore`: Other changes that don't modify src or test files
|
|
95
|
+
- `revert`: Reverts a previous commit
|
|
96
|
+
|
|
97
|
+
**Examples:**
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
feat: add support for OpenAPI 3.1 discriminator
|
|
101
|
+
fix: handle circular references in schemas
|
|
102
|
+
docs: add examples for complex types
|
|
103
|
+
test: add integration tests for CLI
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Pull Request Process
|
|
107
|
+
|
|
108
|
+
1. **Create Feature Branch**
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
git checkout -b feat/your-feature-name
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
2. **Make Changes**
|
|
115
|
+
- Write code following our [coding standards](#coding-standards)
|
|
116
|
+
- Add tests for new functionality
|
|
117
|
+
- Update documentation as needed
|
|
118
|
+
|
|
119
|
+
3. **Validate Your Changes**
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
npm run validate
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
This runs:
|
|
126
|
+
- Type checking
|
|
127
|
+
- Linting
|
|
128
|
+
- Formatting check
|
|
129
|
+
- All tests
|
|
130
|
+
|
|
131
|
+
4. **Commit Changes**
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
git add .
|
|
135
|
+
git commit -m "feat: add your feature description"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
5. **Push to Fork**
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
git push origin feat/your-feature-name
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
6. **Create Pull Request**
|
|
145
|
+
- Use our PR template
|
|
146
|
+
- Link to any related issues
|
|
147
|
+
- Provide clear description of changes
|
|
148
|
+
- Add screenshots if applicable
|
|
149
|
+
|
|
150
|
+
### PR Requirements
|
|
151
|
+
|
|
152
|
+
- [ ] All tests pass
|
|
153
|
+
- [ ] Code coverage maintained/improved
|
|
154
|
+
- [ ] Documentation updated
|
|
155
|
+
- [ ] Commit messages follow conventional format
|
|
156
|
+
- [ ] No breaking changes (unless justified)
|
|
157
|
+
- [ ] Self-review completed
|
|
158
|
+
|
|
159
|
+
## Coding Standards
|
|
160
|
+
|
|
161
|
+
### TypeScript
|
|
162
|
+
|
|
163
|
+
- Use strict TypeScript configuration
|
|
164
|
+
- Prefer explicit types over `any`
|
|
165
|
+
- Use meaningful variable and function names
|
|
166
|
+
- Add JSDoc comments for public APIs
|
|
167
|
+
|
|
168
|
+
### Code Style
|
|
169
|
+
|
|
170
|
+
We use ESLint and Prettier for consistent code style:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# Auto-fix linting issues
|
|
174
|
+
npm run lint
|
|
175
|
+
|
|
176
|
+
# Format code
|
|
177
|
+
npm run format
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### File Structure
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
src/
|
|
184
|
+
├── cli.ts # CLI entry point
|
|
185
|
+
├── generator.ts # Main generator class
|
|
186
|
+
├── services/ # Business logic
|
|
187
|
+
│ ├── *.service.ts
|
|
188
|
+
├── utils/ # Utilities
|
|
189
|
+
│ ├── *.ts
|
|
190
|
+
├── types/ # Type definitions
|
|
191
|
+
│ ├── *.ts
|
|
192
|
+
└── interfaces/ # Interfaces
|
|
193
|
+
├── *.ts
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Testing
|
|
197
|
+
|
|
198
|
+
### Test Structure
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
tests/
|
|
202
|
+
├── unit/ # Unit tests
|
|
203
|
+
│ ├── *.test.ts
|
|
204
|
+
├── integration/ # Integration tests
|
|
205
|
+
│ ├── *.test.ts
|
|
206
|
+
└── fixtures/ # Test data
|
|
207
|
+
├── *.json
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Writing Tests
|
|
211
|
+
|
|
212
|
+
- Use Vitest for testing
|
|
213
|
+
- Write descriptive test names
|
|
214
|
+
- Test edge cases and error conditions
|
|
215
|
+
- Maintain test coverage above 80%
|
|
216
|
+
|
|
217
|
+
### Running Tests
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# Run all tests
|
|
221
|
+
npm test
|
|
222
|
+
|
|
223
|
+
# Run tests in watch mode
|
|
224
|
+
npm run test:watch
|
|
225
|
+
|
|
226
|
+
# Run with coverage
|
|
227
|
+
npm run test:coverage
|
|
228
|
+
|
|
229
|
+
# Run specific test file
|
|
230
|
+
npx vitest run generator.test.ts
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## Documentation
|
|
234
|
+
|
|
235
|
+
### Code Documentation
|
|
236
|
+
|
|
237
|
+
- Add JSDoc comments to public APIs
|
|
238
|
+
- Include examples in documentation
|
|
239
|
+
- Document complex algorithms and business logic
|
|
240
|
+
|
|
241
|
+
### README Updates
|
|
242
|
+
|
|
243
|
+
If your changes affect usage, update the README:
|
|
244
|
+
|
|
245
|
+
- Add new examples
|
|
246
|
+
- Update installation instructions
|
|
247
|
+
- Document new CLI options
|
|
248
|
+
|
|
249
|
+
## Release Process
|
|
250
|
+
|
|
251
|
+
Releases are automated using semantic-release:
|
|
252
|
+
|
|
253
|
+
1. Merge to `main` branch
|
|
254
|
+
2. Semantic-release analyzes commits
|
|
255
|
+
3. Automatically creates version and release notes
|
|
256
|
+
4. Publishes to npm
|
|
257
|
+
5. Creates GitHub release
|
|
258
|
+
|
|
259
|
+
## Getting Help
|
|
260
|
+
|
|
261
|
+
- 📚 Check existing [documentation](README.md)
|
|
262
|
+
- 🐛 Search [existing issues](https://github.com/julienandreu/zod-codegen/issues)
|
|
263
|
+
- 💬 Start a [discussion](https://github.com/julienandreu/zod-codegen/discussions)
|
|
264
|
+
- 📧 Email: [julienandreu@me.com](mailto:julienandreu@me.com)
|
|
265
|
+
|
|
266
|
+
## Recognition
|
|
267
|
+
|
|
268
|
+
Contributors are recognized in our:
|
|
269
|
+
|
|
270
|
+
- Release notes
|
|
271
|
+
- Contributors section
|
|
272
|
+
- Acknowledgments
|
|
273
|
+
|
|
274
|
+
Thank you for contributing! 🙏
|
package/LICENCE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2023 Julien Andreu
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|