@hackfed/toolbox 0.1.4 → 0.1.5

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hackfed/toolbox",
3
3
  "description": "Tools for Hackfed Registry",
4
- "version": "0.1.4",
4
+ "version": "0.1.5",
5
5
  "bin": {
6
6
  "hackfed-toolbox": "src/index.ts"
7
7
  },
@@ -1,6 +1,12 @@
1
1
  import type { Command } from 'commander'
2
2
 
3
- import { OrganizationSchema, type TelephonyDirectory, type TelephonyDirectoryExchange, type TelephonyDirectoryOrg } from '@hackfed/schemas/v1'
3
+ import {
4
+ OrganizationSchema,
5
+ type TelephonyDirectory,
6
+ type TelephonyDirectoryExchange,
7
+ type TelephonyDirectoryOrg,
8
+ TelephonyDirectorySchema,
9
+ } from '@hackfed/schemas/v1'
4
10
  import { Glob, YAML } from 'bun'
5
11
  import path from 'node:path'
6
12
  import { type Logger } from 'tslog'
@@ -74,9 +80,9 @@ async function generateTelephonyDirectory (
74
80
  logger.debug('Added organization: %s (%s)', org.spec.name, org.spec.id)
75
81
  }
76
82
 
77
- const directory: TelephonyDirectory = {
83
+ const directory = TelephonyDirectorySchema.parse({
78
84
  orgs,
79
- }
85
+ } satisfies TelephonyDirectory)
80
86
 
81
87
  const file = Bun.file(path.resolve(options.output))
82
88
  await Bun.write(file, JSON.stringify(directory))