@toolforge-js/sdk 0.8.0 → 0.8.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 +3 -15
- package/dist/cli/index.js +538 -76
- package/dist/components/index.d.ts +194 -88
- package/dist/components/index.js +1 -1
- package/dist/config/index.d.ts +9 -2
- package/dist/config/index.js +5 -2
- package/dist/config-schema-V_1JIDL9.js +15 -0
- package/dist/{tool-UVAGtnlr.js → tool-DDDEH8M3.js} +98 -45
- package/package.json +9 -4
- package/dist/config-schema-CcWOtgOv.js +0 -12
package/README.md
CHANGED
|
@@ -38,25 +38,13 @@ After installing the tool-forge sdk, you have configure the SDK using `toolforge
|
|
|
38
38
|
|
|
39
39
|
```ts
|
|
40
40
|
// toolforge.config.ts
|
|
41
|
-
import { defineToolForgeConfig } from '@toolforge-js/sdk'
|
|
42
41
|
import 'dotenv/config'
|
|
42
|
+
import { defineToolForgeConfig } from '@toolforge-js/sdk'
|
|
43
43
|
import { defineConfig } from '@toolforge-js/sdk/config'
|
|
44
|
-
import * as z from 'zod'
|
|
45
|
-
|
|
46
|
-
// store the API key in environment variable TOOL_FORGE_API_KEY
|
|
47
|
-
|
|
48
|
-
const { TOOL_FORGE_API_KEY } = z
|
|
49
|
-
.object({
|
|
50
|
-
TOOL_FORGE_API_KEY: z
|
|
51
|
-
.string()
|
|
52
|
-
.refine((val) => val.startsWith('sk_live') || val.startsWith('pk_test'), {
|
|
53
|
-
message: 'API key must start with sk_live or pk_test',
|
|
54
|
-
}),
|
|
55
|
-
})
|
|
56
|
-
.parse(process.env)
|
|
57
44
|
|
|
58
45
|
export default defineConfig({
|
|
59
|
-
|
|
46
|
+
// store the API key in environment variable TOOL_FORGE_API_KEY
|
|
47
|
+
apiKey: process.env.TOOL_FORGE_API_KEY,
|
|
60
48
|
})
|
|
61
49
|
```
|
|
62
50
|
|