@bagelink/sdk 0.0.493 → 0.0.499
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/bin/index.ts +4 -2
- package/package.json +1 -1
package/bin/index.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
1
3
|
import fs from 'node:fs'
|
|
2
4
|
import { createRequire } from 'node:module'
|
|
3
5
|
import { loadEnv } from 'vite'
|
|
@@ -11,8 +13,8 @@ const baseURL = `${env.VITE_BAGEL_BASE_URL}/openapi.json`
|
|
|
11
13
|
|
|
12
14
|
export async function loadTypes() {
|
|
13
15
|
const { types, code } = await openAPI(baseURL || '', 'import.meta.env.VITE_BAGEL_BASE_URL')
|
|
14
|
-
fs.writeFileSync('
|
|
15
|
-
fs.writeFileSync('
|
|
16
|
+
fs.writeFileSync('./.bagelink/types.d.ts', types)
|
|
17
|
+
fs.writeFileSync('./.bagelink/api.ts', code)
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
loadTypes().catch(console.error)
|