@hackfed/toolbox 0.0.1 → 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/README.md CHANGED
@@ -1,15 +1,11 @@
1
- # toolbox
1
+ # Toolbox • Hackfed
2
2
 
3
- To install dependencies:
3
+ Tools for Hackfed Registry.
4
4
 
5
- ```bash
6
- bun install
7
- ```
5
+ Requires Bun to run.
8
6
 
9
- To run:
7
+ ## Example
10
8
 
11
9
  ```bash
12
- bun run index.ts
10
+ bunx @hackfed/toolbox
13
11
  ```
14
-
15
- This project was created using `bun init` in bun v1.3.6. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
package/package.json CHANGED
@@ -1,12 +1,22 @@
1
1
  {
2
2
  "name": "@hackfed/toolbox",
3
3
  "description": "Tools for Hackfed Registry",
4
- "version": "0.0.1",
5
- "module": "src/index.ts",
6
- "type": "module",
4
+ "version": "0.1.5",
7
5
  "bin": {
8
6
  "hackfed-toolbox": "src/index.ts"
9
7
  },
8
+ "dependencies": {
9
+ "@hackfed/schemas": "^0.7.0",
10
+ "commander": "^14.0.2",
11
+ "ipaddr.js": "^2.3.0",
12
+ "tslog": "^4.10.2",
13
+ "zod": "^4.3.5"
14
+ },
15
+ "devDependencies": {
16
+ "@bksp/style-guide": "^1.2.6",
17
+ "@types/bun": "1.3.6",
18
+ "eslint": "^9.39.2"
19
+ },
10
20
  "engines": {
11
21
  "bun": ">=1.3.6"
12
22
  },
@@ -15,21 +25,16 @@
15
25
  "LICENSE",
16
26
  "README.md"
17
27
  ],
18
- "devDependencies": {
19
- "@bksp/style-guide": "^1.2.6",
20
- "@types/bun": "1.3.6",
21
- "eslint": "^9.39.2"
22
- },
28
+ "license": "MPL-2.0",
29
+ "module": "src/index.ts",
23
30
  "peerDependencies": {
24
31
  "typescript": "^5.9.3"
25
32
  },
26
- "dependencies": {
27
- "@hackfed/schemas": "^0.7.0",
28
- "commander": "^14.0.2",
29
- "ipaddr.js": "^2.3.0",
30
- "tslog": "^4.10.2",
31
- "zod": "^4.3.5"
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/hackfed/toolbox.git"
32
36
  },
37
+ "type": "module",
33
38
  "scripts": {
34
39
  "lint": "tsc --noEmit && eslint ."
35
40
  }
@@ -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))