feat: добавить ручной runtime-клиент

- добавлен корневой runtime export HttpClient и createApiClient
- настроена сборка JS и d.ts для публичного API пакета
- добавлен тест ручной сборки operations через createApiClient
- добавлена документация по ручному клиенту без OpenAPI
- версия пакета поднята до 5.1.0
This commit is contained in:
2026-07-03 10:51:56 +03:00
parent b8bb267848
commit 75bd97e8f9
8 changed files with 698 additions and 4 deletions

View File

@@ -1,8 +1,17 @@
{
"name": "@gromlab/api-codegen",
"version": "5.0.1",
"description": "CLI tool to generate TypeScript API client from OpenAPI specification",
"version": "5.1.0",
"description": "CLI tool to generate TypeScript API client from OpenAPI specification and runtime HTTP client for manual APIs",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"./package.json": "./package.json"
},
"bin": {
"api-codegen": "dist/cli.js"
},
@@ -17,7 +26,7 @@
"node": ">=18"
},
"scripts": {
"build": "bun build src/cli.ts --target=node --outdir=dist --format=esm --external=@biomejs/* && cp -r src/templates dist/",
"build": "bun build src/cli.ts --target=node --outdir=dist --format=esm --external=@biomejs/* && bun build src/index.ts --target=node --outfile=dist/index.js --format=esm && tsc -p tsconfig.build.json && cp -r src/templates dist/",
"dev": "bun run src/cli.ts",
"test": "bun test",
"test:unit": "bun test tests/unit",
@@ -43,7 +52,8 @@
"@types/tmp": "^0.2.6",
"execa": "^8.0.0",
"msw": "^2.0.0",
"tmp": "^0.2.1"
"tmp": "^0.2.1",
"typescript": "^5"
},
"peerDependencies": {
"typescript": "^5"