@picked/typegen 0.0.101-next.2 → 0.0.101-next.3
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/README.md +18 -9
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
# @picked/typegen
|
|
2
2
|
|
|
3
|
-
Generates TypeScript
|
|
3
|
+
Generates TypeScript declarations for your workspace's fields, features and steps.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Install
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Most projects use it through `npx picked generate types` or `@picked/vite-plugin-picked`,
|
|
8
|
+
which both come with it. To call it yourself:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @picked/typegen @picked/config
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
8
15
|
|
|
9
16
|
```typescript
|
|
10
|
-
import { generate } from '@picked/typegen'
|
|
11
17
|
import { loadResolvedPickedConfig } from '@picked/config'
|
|
18
|
+
import { generate } from '@picked/typegen'
|
|
12
19
|
|
|
13
20
|
const config = await loadResolvedPickedConfig()
|
|
14
21
|
if (config) {
|
|
@@ -17,10 +24,12 @@ if (config) {
|
|
|
17
24
|
}
|
|
18
25
|
```
|
|
19
26
|
|
|
20
|
-
|
|
27
|
+
`generate({ config, check: true })` writes nothing and reports in `changed` whether the
|
|
28
|
+
committed types are out of date.
|
|
21
29
|
|
|
22
|
-
|
|
30
|
+
## Docs
|
|
23
31
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
32
|
+
- **Web:** [Type Generation](https://docs.picked.app/reference/sdk/type-generation)
|
|
33
|
+
- **Local:** `node_modules/picked/docs/reference/sdk/type-generation.md`. The `picked` package carries every page under `node_modules/picked/docs/`.
|
|
34
|
+
- **CLI:** `npx picked docs read /reference/sdk/type-generation`. `npx picked docs list [words]` lists the pages.
|
|
35
|
+
- **MCP:** call `read_picked_doc` with `{ "path": "/reference/sdk/type-generation" }`; `list_picked_docs` lists the pages. Add the server with `claude mcp add --transport http picked https://api.picked.app/mcp`, or see [How to connect the MCP server](https://docs.picked.app/how-to/connect-the-mcp-server) for other tools.
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@picked/typegen",
|
|
3
3
|
"description": "Generates TypeScript types from a Picked workspace schema document",
|
|
4
|
-
"version": "0.0.101-next.
|
|
4
|
+
"version": "0.0.101-next.3",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@picked/config": "0.0.101-next.
|
|
7
|
-
"@picked/delivery-api-client": "0.0.101-next.
|
|
6
|
+
"@picked/config": "0.0.101-next.3",
|
|
7
|
+
"@picked/delivery-api-client": "0.0.101-next.3",
|
|
8
8
|
"json-schema-to-typescript": "^15.0.4"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|