Skip to content

Commit

Permalink
feat(repository): use monorepo setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanshatford committed Apr 2, 2024
1 parent 3f195af commit b86a3ff
Show file tree
Hide file tree
Showing 387 changed files with 700 additions and 1,006 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ jobs:
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage
directory: ./packages/openapi-ts/coverage
flags: unittests
fail_ci_if_error: true
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ yarn-error.log*
dist
coverage
.env

# test files
test/generated
test/e2e/generated
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ or
yarn add @hey-api/openapi-ts -D
```

or

```sh
pnpm add @hey-api/openapi-ts -D
```

If you want to use `openapi-ts` with CLI, add a script to your `package.json` file

```json
Expand Down
1,448 changes: 542 additions & 906 deletions package-lock.json

Large diffs are not rendered by default.

115 changes: 20 additions & 95 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"name": "@hey-api/openapi-ts",
"version": "0.33.2",
"name": "openapi-ts-monorepo",
"version": "0.1.0",
"description": "Monorepo for openapi-ts",
"private": true,
"type": "module",
"description": "Turn your OpenAPI specification into a beautiful TypeScript client",
"license": "MIT",
"homepage": "https://github.com/hey-api/openapi-ts/",
"repository": {
"type": "git",
Expand All @@ -11,104 +13,27 @@
"bugs": {
"url": "https://github.com/hey-api/openapi-ts/issues"
},
"license": "MIT",
"keywords": [
"openapi",
"swagger",
"generator",
"typescript",
"javascript",
"codegen",
"yaml",
"json",
"fetch",
"xhr",
"axios",
"angular",
"node"
],
"main": "./dist/node/index.js",
"types": "./dist/node/index.d.ts",
"bin": {
"openapi-ts": "bin/index.js"
},
"files": [
"bin",
"dist"
],
"scripts": {
"build-bundle": "rollup --config rollup.config.ts --configPlugin typescript",
"build-types-check": "tsc --project tsconfig.check.json",
"build-types-roll": "rollup --config rollup.dts.config.ts --configPlugin typescript && rimraf temp",
"build-types-temp": "tsc --emitDeclarationOnly --outDir temp -p src/node",
"build-types": "run-s build-types-temp build-types-roll build-types-check",
"build": "run-s clean build-bundle build-types",
"clean": "rimraf dist test/generated test/e2e/generated coverage node_modules/.cache",
"dev": "rimraf dist && npm run build-bundle -- --watch",
"lint:fix": "eslint . --fix",
"lint": "eslint .",
"prepublishOnly": "npm run build",
"test:coverage": "vitest run --config vitest.config.unit.ts --coverage",
"test:e2e": "vitest run --config vitest.config.e2e.ts",
"test:sample": "node test/sample.cjs",
"test:update": "vitest watch --config vitest.config.unit.ts --update",
"test:watch": "vitest watch --config vitest.config.unit.ts",
"test": "vitest run --config vitest.config.unit.ts",
"typecheck": "tsc --noEmit",
"build": "npm run build --workspaces --if-present",
"lint:fix": "npm run lint:fix --workspaces --if-present",
"lint": "npm run lint --workspaces --if-present",
"test:coverage": "npm run test:coverage --workspaces --if-present",
"test:e2e": "npm run test:e2e --workspaces --if-present",
"test:update": "npm run test:update --workspaces --if-present",
"test": "npm run test --workspaces --if-present",
"typecheck": "npm run typecheck --workspaces --if-present",
"openapi-ts": "npm run --workspace packages/openapi-ts --",
"changeset": "changeset"
},
"engines": {
"node": "^18.0.0 || >=20.0.0"
},
"dependencies": {
"@apidevtools/json-schema-ref-parser": "11.5.4",
"camelcase": "8.0.0",
"commander": "12.0.0",
"handlebars": "4.7.8"
},
"devDependencies": {
"@angular-devkit/build-angular": "17.3.2",
"@angular/animations": "17.3.2",
"@angular/cli": "17.3.2",
"@angular/common": "17.3.2",
"@angular/compiler": "17.3.2",
"@angular/compiler-cli": "17.3.2",
"@angular/core": "17.3.2",
"@angular/forms": "17.3.2",
"@angular/platform-browser": "17.3.2",
"@angular/platform-browser-dynamic": "17.3.2",
"@angular/router": "17.3.2",
"@changesets/cli": "2.27.1",
"@rollup/plugin-commonjs": "25.0.7",
"@rollup/plugin-json": "6.1.0",
"@rollup/plugin-node-resolve": "15.2.3",
"@rollup/plugin-terser": "0.4.4",
"@rollup/plugin-typescript": "11.1.6",
"@svitejs/changesets-changelog-github-compact": "1.1.0",
"@types/cross-spawn": "6.0.6",
"@types/express": "4.17.21",
"@types/node": "20.12.2",
"@typescript-eslint/eslint-plugin": "7.5.0",
"@typescript-eslint/parser": "7.5.0",
"@vitest/coverage-v8": "1.4.0",
"axios": "1.6.8",
"cross-spawn": "7.0.3",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-simple-import-sort": "12.0.0",
"express": "4.19.2",
"node-fetch": "3.3.2",
"npm-run-all2": "6.1.2",
"prettier": "3.2.5",
"puppeteer": "22.6.1",
"rimraf": "5.0.5",
"rollup": "4.13.2",
"rollup-plugin-dts": "6.1.0",
"rxjs": "7.8.1",
"ts-node": "10.9.2",
"tslib": "2.6.2",
"typescript": "5.4.3",
"vitest": "1.4.0"
}
"@svitejs/changesets-changelog-github-compact": "1.1.0"
},
"workspaces": [
"packages/openapi-ts"
],
"packageManager": "[email protected]+sha256.17ca6e08e7633b624e8f870db81a78f46afe119de62bcaf0a7407574139198fc"
}
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions packages/openapi-ts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.DS_Store
.idea
.tmp
junit.xml
node_modules
npm-debug.log*
temp
yarn-debug.log*
yarn-error.log*

*.iml
dist
coverage
.env

# test files
test/generated
test/e2e/generated
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
112 changes: 112 additions & 0 deletions packages/openapi-ts/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
"name": "@hey-api/openapi-ts",
"version": "0.33.2",
"type": "module",
"description": "Turn your OpenAPI specification into a beautiful TypeScript client",
"homepage": "https://github.com/hey-api/openapi-ts/",
"repository": {
"type": "git",
"url": "git+https://github.com/hey-api/openapi-ts.git"
},
"bugs": {
"url": "https://github.com/hey-api/openapi-ts/issues"
},
"license": "MIT",
"keywords": [
"openapi",
"swagger",
"generator",
"typescript",
"javascript",
"codegen",
"yaml",
"json",
"fetch",
"xhr",
"axios",
"angular",
"node"
],
"main": "./dist/node/index.js",
"types": "./dist/node/index.d.ts",
"bin": {
"openapi-ts": "bin/index.js"
},
"files": [
"bin",
"dist"
],
"scripts": {
"build-bundle": "rollup --config rollup.config.ts --configPlugin typescript",
"build-types-check": "tsc --project tsconfig.check.json",
"build-types-roll": "rollup --config rollup.dts.config.ts --configPlugin typescript && rimraf temp",
"build-types-temp": "tsc --emitDeclarationOnly --outDir temp -p src/node",
"build-types": "npm run build-types-temp && npm run build-types-roll && npm run build-types-check",
"build": "npm run clean && npm run build-bundle && npm run build-types",
"clean": "rimraf dist test/generated test/e2e/generated coverage node_modules/.cache",
"dev": "rimraf dist && npm run build-bundle -- --watch",
"lint:fix": "eslint . --fix",
"lint": "eslint .",
"prepublishOnly": "npm run build",
"test:coverage": "vitest run --config vitest.config.unit.ts --coverage",
"test:e2e": "vitest run --config vitest.config.e2e.ts",
"test:sample": "node test/sample.cjs",
"test:update": "vitest watch --config vitest.config.unit.ts --update",
"test:watch": "vitest watch --config vitest.config.unit.ts",
"test": "vitest run --config vitest.config.unit.ts",
"typecheck": "tsc --noEmit",
"changeset": "changeset"
},
"engines": {
"node": "^18.0.0 || >=20.0.0"
},
"dependencies": {
"@apidevtools/json-schema-ref-parser": "11.5.4",
"camelcase": "8.0.0",
"commander": "12.0.0",
"handlebars": "4.7.8"
},
"devDependencies": {
"@angular-devkit/build-angular": "17.3.2",
"@angular/animations": "17.3.2",
"@angular/cli": "17.3.2",
"@angular/common": "17.3.2",
"@angular/compiler": "17.3.2",
"@angular/compiler-cli": "17.3.2",
"@angular/core": "17.3.2",
"@angular/forms": "17.3.2",
"@angular/platform-browser": "17.3.2",
"@angular/platform-browser-dynamic": "17.3.2",
"@angular/router": "17.3.2",
"@rollup/plugin-commonjs": "25.0.7",
"@rollup/plugin-json": "6.1.0",
"@rollup/plugin-node-resolve": "15.2.3",
"@rollup/plugin-terser": "0.4.4",
"@rollup/plugin-typescript": "11.1.6",
"@types/cross-spawn": "6.0.6",
"@types/express": "4.17.21",
"@types/node": "20.12.2",
"@typescript-eslint/eslint-plugin": "7.5.0",
"@typescript-eslint/parser": "7.5.0",
"@vitest/coverage-v8": "1.4.0",
"axios": "1.6.8",
"cross-spawn": "7.0.3",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-simple-import-sort": "12.0.0",
"express": "4.19.2",
"glob": "10.3.12",
"node-fetch": "3.3.2",
"prettier": "3.2.5",
"puppeteer": "22.6.1",
"rimraf": "5.0.5",
"rollup": "4.13.2",
"rollup-plugin-dts": "6.1.0",
"rxjs": "7.8.1",
"ts-node": "10.9.2",
"tslib": "2.6.2",
"typescript": "5.4.3",
"vitest": "1.4.0"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit b86a3ff

Please sign in to comment.