kubb 1.2.1

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Stijn Van Hulle
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,90 @@
1
+ <div align="center">
2
+
3
+ <img src="https://raw.githubusercontent.com/kubb-project/kubb/main/assets/banner.png" alt="logo" height="auto" />
4
+
5
+ <!-- Badges -->
6
+ <p>
7
+ <a href="https://www.npmjs.com/package/@kubb/core" target="_blank">
8
+ <img alt="npm version" src="https://img.shields.io/npm/v/@kubb/core?style=for-the-badge"/>
9
+ </a>
10
+
11
+ <a href="https://www.npmjs.com/package/@kubb/core" target="_blank">
12
+ <img alt="npm downloads" src="https://img.shields.io/npm/dm/@kubb/core?style=for-the-badge"/>
13
+ </a>
14
+ </p>
15
+
16
+ <p>
17
+ <a href="https://www.npmjs.com/package/@kubb/core" target="_blank">
18
+ <img alt="Minified size" src="https://img.shields.io/bundlephobia/min/@kubb/core?style=for-the-badge"/>
19
+ </a>
20
+
21
+ <a href="https://www.npmjs.com/package/@kubb/core" target="_blank">
22
+ <img alt="Coverage" src="https://img.shields.io/codecov/c/github/kubb-project/kubb?style=for-the-badge"/>
23
+ </a>
24
+
25
+ <a href="https://www.npmjs.com/package/@kubb/core" target="_blank">
26
+ <img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/kubb-project/kubb/ci.yaml?style=for-the-badge"/>
27
+ </a>
28
+
29
+
30
+ <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
31
+ <!-- ALL-CONTRIBUTORS-BADGE:END -->
32
+ </p>
33
+
34
+ <h4>
35
+ <a href="https://codesandbox.io/s/github/kubb-project/kubb/tree/main/examples/simple" target="_blank">View Demo</a>
36
+ <span> · </span>
37
+ <a href="https://kubb.dev/" target="_blank">Documentation</a>
38
+ <span> · </span>
39
+ <a href="https://github.com/kubb-project/kubb/issues/" target="_blank">Report Bug</a>
40
+ <span> · </span>
41
+ <a href="https://github.com/kubb-project/kubb/issues/" target="_blank">Request Feature</a>
42
+ </h4>
43
+ </div>
44
+
45
+ <br />
46
+
47
+ ## Features
48
+
49
+ <img src="assets/kubb-generate.gif" alt="generate gif" height="auto" />
50
+
51
+ * Generates Axios calls for every endpoint, with typed payload.
52
+ * Generates strong TypeScript types for every operation and property based on a specific OpenAPI specification.
53
+ * Generates Zod schemas for every operation and property based on a specific OpenAPI specification.
54
+ * Generates React-Query hooks for every endpoint, with a typed payload based on the generated TypesScript types.
55
+ * Plugin system to create your own implementation of an existing package or create a new integration(Angular Clients, Solid-Query, ...).
56
+
57
+ <!-- About the Project
58
+ ## :star2: About the Project
59
+
60
+ <div align="center">
61
+ <img src="assets/screenshot.jpg" alt="screenshot" />
62
+ </div>
63
+ -->
64
+
65
+ ## Contributors
66
+
67
+ <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
68
+ <!-- prettier-ignore-start -->
69
+ <!-- markdownlint-disable -->
70
+ <table>
71
+ <tbody>
72
+ <tr>
73
+ <td align="center" valign="top" width="14.28%"><a href="http://www.stijnvanhulle.be"><img src="https://avatars.githubusercontent.com/u/5904681?v=4?s=100" width="100px;" alt="Stijn Van Hulle"/><br /><sub><b>Stijn Van Hulle</b></sub></a><br /><a href="https://github.com/kubb-project/kubb/commits?author=stijnvanhulle" title="Code">💻</a></td>
74
+ <td align="center" valign="top" width="14.28%"><a href="https://fosstodon.org/@xphentom"><img src="https://avatars.githubusercontent.com/u/5096867?v=4?s=100" width="100px;" alt="Wouter Roozeleer"/><br /><sub><b>Wouter Roozeleer</b></sub></a><br /><a href="https://github.com/kubb-project/kubb/commits?author=xPhentom" title="Code">💻</a></td>
75
+ </tr>
76
+ </tbody>
77
+ </table>
78
+
79
+ <!-- markdownlint-restore -->
80
+ <!-- prettier-ignore-end -->
81
+
82
+ <!-- ALL-CONTRIBUTORS-LIST:END -->
83
+ <!-- prettier-ignore-start -->
84
+ <!-- markdownlint-disable -->
85
+
86
+ <!-- markdownlint-restore -->
87
+ <!-- prettier-ignore-end -->
88
+
89
+ <!-- ALL-CONTRIBUTORS-LIST:END -->
90
+
package/bin/kubb.js ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import('@kubb/cli').then(({ default: runCLI }) => {
3
+ runCLI(process.argv)
4
+ })
package/dist/index.cjs ADDED
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var kubb = require('@kubb/core');
6
+
7
+ // src/index.ts
8
+ var src_default = kubb__namespace.default;
9
+
10
+ exports.default = src_default;
11
+ Object.keys(kubb).forEach(function (k) {
12
+ if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
13
+ enumerable: true,
14
+ get: function () { return kubb[k]; }
15
+ });
16
+ });
17
+ //# sourceMappingURL=out.js.map
18
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";AAAA,SAAS,WAAW,YAAY;AAEhC,cAAc;AAEd,IAAO,cAAQ","sourcesContent":["import { default as kubb } from '@kubb/core'\n\nexport * from '@kubb/core'\n\nexport default kubb\n"]}
@@ -0,0 +1,3 @@
1
+ import kubb__default from '@kubb/core';
2
+ export * from '@kubb/core';
3
+ export { default } from '@kubb/core';
package/dist/index.js ADDED
@@ -0,0 +1,10 @@
1
+ import { createRequire } from 'module';
2
+ import kubb__default from '@kubb/core';
3
+ export * from '@kubb/core';
4
+
5
+ createRequire(import.meta.url);
6
+ var src_default = kubb__default;
7
+
8
+ export { src_default as default };
9
+ //# sourceMappingURL=out.js.map
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,SAAS,WAAW,YAAY;AAEhC,cAAc;AAEd,IAAO,cAAQ","sourcesContent":["import { default as kubb } from '@kubb/core'\n\nexport * from '@kubb/core'\n\nexport default kubb\n"]}
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "kubb",
3
+ "version": "1.2.1",
4
+ "description": "OpenAPI to TypeScript, React-Query, Zod, Zodios, Faker.js and Axios.",
5
+ "keywords": [
6
+ "typescript",
7
+ "plugins",
8
+ "kubb",
9
+ "codegen",
10
+ "cli"
11
+ ],
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git://github.com/kubb-project/kubb.git",
15
+ "directory": "packages/kubb"
16
+ },
17
+ "license": "MIT",
18
+ "author": "Stijn Van Hulle <stijn@stijnvanhulle.be",
19
+ "sideEffects": false,
20
+ "type": "module",
21
+ "main": "dist/index.js",
22
+ "module": "dist/index.js",
23
+ "types": "./dist/index.d.ts",
24
+ "bin": {
25
+ "kubb": "bin/kubb.js"
26
+ },
27
+ "files": [
28
+ "dist",
29
+ "bin",
30
+ "!/**/**.test.**",
31
+ "!/**/__tests__/**"
32
+ ],
33
+ "dependencies": {
34
+ "@kubb/core": "1.2.1",
35
+ "@kubb/cli": "1.2.1"
36
+ },
37
+ "devDependencies": {
38
+ "@types/node": "^20.3.1",
39
+ "tsup": "^6.7.0",
40
+ "typescript": "^5.1.3",
41
+ "@kubb/ts-config": "0.1.0",
42
+ "@kubb/tsup-config": "1.1.8"
43
+ },
44
+ "packageManager": "pnpm@8.3.0",
45
+ "engines": {
46
+ "node": ">=18",
47
+ "pnpm": ">=8.3.0"
48
+ },
49
+ "preferGlobal": true,
50
+ "publishConfig": {
51
+ "access": "public",
52
+ "registry": "https://registry.npmjs.org/"
53
+ },
54
+ "scripts": {
55
+ "build": "tsup",
56
+ "clean": "rimraf ./dist",
57
+ "lint": "ESLINT_USE_FLAT_CONFIG=true eslint --format pretty .",
58
+ "lint-fix": "bun run lint --quiet --fix",
59
+ "release": "pnpm publish --no-git-check",
60
+ "start": "tsup --watch",
61
+ "test": "vitest --passWithNoTests",
62
+ "typecheck": "tsc -p ./tsconfig.json --noEmit --emitDeclarationOnly false"
63
+ }
64
+ }