@bagelink/sdk 0.0.625 → 0.0.629

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.
Files changed (2) hide show
  1. package/bin/index.ts +4 -2
  2. package/package.json +1 -1
package/bin/index.ts CHANGED
@@ -6,6 +6,8 @@ import { join } from 'node:path'
6
6
  import { loadEnv } from 'vite'
7
7
  import { openAPI } from '@bagelink/sdk'
8
8
 
9
+ import * as prettier from 'prettier'
10
+
9
11
  const _require = createRequire(import.meta.url)
10
12
  const proc = _require('process')
11
13
  const cwd = proc.cwd()
@@ -39,10 +41,10 @@ export async function loadTypes() {
39
41
  if (!fs.existsSync(bagelinkDir)) fs.mkdirSync(bagelinkDir)
40
42
 
41
43
  const typesPath = join(bagelinkDir, 'types.d.ts')
42
- fs.writeFileSync(typesPath, types)
44
+ fs.writeFileSync(typesPath, await prettier.format(types, { parser: 'typescript' }))
43
45
 
44
46
  const apiPath = join(bagelinkDir, 'api.ts')
45
- fs.writeFileSync(apiPath, code)
47
+ fs.writeFileSync(apiPath, await prettier.format(code, { parser: 'typescript' }))
46
48
 
47
49
  if (withAuth) {
48
50
  const authCode = fs.readFileSync(join(cwd, 'auth.txt'), 'utf-8')
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/sdk",
3
3
  "type": "module",
4
- "version": "0.0.625",
4
+ "version": "0.0.629",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",