Skip to content

Commit

Permalink
chore: Remove generated client types folder (medusajs#7633)
Browse files Browse the repository at this point in the history
* chore: Remove generated client types folder

* chore: Remove typescript-codegen package and client commands for oas
  • Loading branch information
sradevski authored Jun 6, 2024
1 parent 0507dbe commit 7876857
Show file tree
Hide file tree
Showing 249 changed files with 90 additions and 9,128 deletions.
1 change: 0 additions & 1 deletion .changeset/little-books-reply.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"medusa-dev-cli": patch
"@medusajs/medusa-oas-cli": patch
"@medusajs/oas-github-ci": patch
"@medusajs/openapi-typescript-codegen": patch
"@medusajs/core-flows": patch
"medusa-test-utils": patch
"@medusajs/modules-sdk": patch
Expand Down
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ module.exports = {
"./packages/cli/medusa-cli/tsconfig.spec/json",
"./packages/cli/medusa-dev-cli/tsconfig.spec.json",
"./packages/cli/oas/medusa-oas-cli/tsconfig.spec.json",
"./packages/cli/oas/openapi-typescript-codegen/tsconfig.spec.json",

"./packages/core/orchestration/tsconfig.json",
"./packages/core/workflows-sdk/tsconfig.spec.json",
Expand Down
66 changes: 1 addition & 65 deletions packages/cli/oas/medusa-oas-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,70 +85,6 @@ yarn medusa-oas oas --force

---

### Command - `client`

Will generate API client files from a given OAS file.

#### `--src-file <path>`

Specify the path to the OAS JSON file.

```bash
yarn medusa-oas client --src-file ./store.oas.json`
```

#### `--name <name>`

Namespace for the generated client. Usually `admin` or `store`.

```bash
yarn medusa-oas client --name admin`
```

#### `--out-dir <path>`

Specify in which directory should the files be outputted. Accepts relative and absolute path.
If the directory doesn't exist, it will be created. Defaults to `./`.

```bash
yarn medusa-oas client --out-dir ./client`
```

#### `--type <type>`

Client component types to generate. Accepts `all`, `types`, `client`, `hooks`.
Defaults to `all`.

```bash
yarn medusa-oas client --type types`
```

#### `--types-packages <name>`

Replace relative import statements by types package name. Mandatory when using `--type client` or `--type hooks`.

```bash
yarn medusa-oas client --types-packages @medusajs/client-types`
```

#### `--client-packages <name>`

Replace relative import statements by client package name. Mandatory when using `--type hooks`.

```bash
yarn medusa-oas client --client-packages @medusajs/medusa-js`
```

#### `--clean`

Delete destination directory content before generating client.

```bash
yarn medusa-oas client --clean
```

---

### Command - `docs`

Will sanitize OAS for use with Redocly's API documentation viewer.
Expand Down Expand Up @@ -188,7 +124,7 @@ yarn medusa-oas docs --src-file ./store.oas.json --dry-run

#### `--clean`

Delete destination directory content before generating client.
Delete destination directory content before generating the docs.

```bash
yarn medusa-oas docs --src-file ./store.oas.json --clean
Expand Down
1 change: 0 additions & 1 deletion packages/cli/oas/medusa-oas-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
},
"dependencies": {
"@medusajs/medusa": "^1.20.4",
"@medusajs/openapi-typescript-codegen": "^0.2.1",
"@medusajs/utils": "^1.11.8",
"@readme/json-schema-ref-parser": "^1.2.0",
"@readme/openapi-parser": "^2.4.0",
Expand Down
176 changes: 0 additions & 176 deletions packages/cli/oas/medusa-oas-cli/src/command-client.ts

This file was deleted.

6 changes: 0 additions & 6 deletions packages/cli/oas/medusa-oas-cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import { Command } from "commander"
import { getCommand as oasGetCommand } from "./command-oas"
import { getCommand as clientGetCommand } from "./command-client"
import { getCommand as docsGetCommand } from "./command-docs"

const run = async () => {
Expand All @@ -13,11 +12,6 @@ const run = async () => {
*/
program.addCommand(oasGetCommand())

/**
* Alias to command-client.ts
*/
program.addCommand(clientGetCommand())

/**
* Alias to command-docs.ts
*/
Expand Down
7 changes: 0 additions & 7 deletions packages/cli/oas/openapi-typescript-codegen/.gitignore

This file was deleted.

This file was deleted.

33 changes: 0 additions & 33 deletions packages/cli/oas/openapi-typescript-codegen/CHANGELOG.md

This file was deleted.

39 changes: 0 additions & 39 deletions packages/cli/oas/openapi-typescript-codegen/README.md

This file was deleted.

Loading

0 comments on commit 7876857

Please sign in to comment.