@picked/config 0.0.1-dev.1789541668638 → 0.0.1-dev.1793756239746
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/LICENSE +1 -0
- package/README.md +28 -15
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/index.js +3 -3
- package/dist/esm/index.js +197 -73
- package/dist/types/config.d.ts +13 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/load-config.d.ts +6 -3
- package/dist/types/load-config.d.ts.map +1 -1
- package/dist/types/snapshot.d.ts +110 -0
- package/dist/types/snapshot.d.ts.map +1 -0
- package/package.json +11 -4
package/LICENSE
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Copyright (c) Picked. All rights reserved. Contact Picked for a usage licence.
|
package/README.md
CHANGED
|
@@ -1,26 +1,39 @@
|
|
|
1
1
|
# @picked/config
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`defineConfig` and the loaders for `picked.config.ts`, the file the CLI, the type generator
|
|
4
|
+
and the Vite plugin read your project from.
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npm install picked
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
`picked/config` re-exports this package.
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
6
15
|
|
|
7
16
|
```typescript
|
|
8
|
-
|
|
17
|
+
// picked.config.ts
|
|
18
|
+
import { defineConfig } from 'picked/config'
|
|
9
19
|
|
|
10
20
|
export default defineConfig({
|
|
11
21
|
projectId: 'your-project-id',
|
|
12
|
-
apiUrl: 'https://api.picked.app',
|
|
13
|
-
typesOutput: './src/picked-env.d.ts',
|
|
14
|
-
source: 'published',
|
|
15
22
|
})
|
|
16
23
|
```
|
|
17
24
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
| Option | Default | Description |
|
|
26
|
+
| -------------- | -------------------------- | --------------------------------------------------------------------------------------------------- |
|
|
27
|
+
| `projectId` | required | The Picked project. |
|
|
28
|
+
| `apiUrl` | `'https://api.picked.app'` | The Picked API origin. |
|
|
29
|
+
| `typesOutput` | `'./src/picked-env.d.ts'` | Where generated types are written. |
|
|
30
|
+
| `source` | `'published'` | Generate types from the published schema, or `'preview'` for a workspace draft. |
|
|
31
|
+
| `previewToken` | none | The workspace preview token; required when `source` is `'preview'`. Keep it out of version control. |
|
|
32
|
+
| `telemetry` | `false` | Send anonymous usage telemetry from the CLI and the Vite plugin. |
|
|
33
|
+
|
|
34
|
+
## Docs
|
|
35
|
+
|
|
36
|
+
- **Web:** [Type Generation](https://docs.picked.app/reference/sdk/type-generation)
|
|
37
|
+
- **Local:** `node_modules/picked/docs/reference/sdk/type-generation.md`. The `picked` package carries every page under `node_modules/picked/docs/`.
|
|
38
|
+
- **CLI:** `npx picked docs read /reference/sdk/type-generation`. `npx picked docs list [words]` lists the pages.
|
|
39
|
+
- **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.
|