Skip to content

Commit

Permalink
get rid of npm run gen-from, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
david-crespo committed Mar 28, 2024
1 parent 2d906ab commit f036844
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ generate several distinct pieces:

## Using the API client

We intend to publish the generated code on npm, but have not done so yet. In the
Oxide web console (the primary consumer of the TS client, not yet open source)
we use the library by generating it from a given spec version with `npm run gen-from` and versioning a full copy of the generated code in that repo.
We intend to publish the generated code on npm, but have not done so yet. In
the [Oxide web console](https://github.com/oxidecomputer/console) (the primary
consumer of the TS client) we use the client by generating it from a pinned
spec version with `tsx generator/index.ts` and versioning a full copy of the
generated code in that repo.

The generated client uses the Fetch API, so in order to be used in Node.js, it
requires either Node.js v18 or a polyfill.
The generated client uses the Fetch API, so in
order to be used in Node.js, it requires either Node.js v18 or a polyfill.

## Generating the client

Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@
},
"scripts": {
"gen": "./tools/gen.sh $(cat ./OMICRON_VERSION) ./client",
"gen-from": "./tools/gen.sh",
"lint": "eslint .",
"postgen": "prettier --parser typescript --write ./client",
"postgen-from": "npm run postgen",
"pretest": "npm run gen",
"test": "vitest",
"test:ui": "vitest --ui",
Expand Down

0 comments on commit f036844

Please sign in to comment.