[READ-ONLY] Mirror of https://github.com/bombshell-dev/tools. Internal CLI to standardize tooling across all Bombshell projects
0

Configure Feed

Select the types of activity you want to include in your feed.

scaffold cli commands

Nate Moore (Mar 29, 2025, 6:32 PM -0500) fb46ba29 23a4ec7a

+720 -28
+2
.gitignore
··· 65 65 66 66 # Stores VSCode versions used for testing VSCode extensions 67 67 .vscode-test 68 + 69 + dist
+3
.npmignore
··· 1 + src 2 + .github 3 + .gitignore
+1 -1
LICENSE
··· 1 - MIT License Copyright (c) 2024 [Bombshell contributors](https://bomb.sh/team) 1 + MIT License Copyright (c) 2025-Present [Bombshell contributors](https://bomb.sh/team) 2 2 3 3 Permission is hereby granted, free of 4 4 charge, to any person obtaining a copy of this software and associated
+8 -21
README.md
··· 1 - # `@bomb.sh/stub` 1 + # `@bomb.sh/nucleus` 2 2 3 - ## Install 4 - 5 - You can install `@bomb.sh/stub` manually by running this command: 6 - 7 - ```sh 8 - npm install @bomb.sh/stub 9 - ``` 10 - 11 - Looking for help? Start with our [Getting Started][docs] guide. 12 - 13 - ## Documentation 14 - 15 - Visit our [official documentation][docs]. 16 - 17 - ## Support 18 - 19 - Having trouble? Get help in the official [Bombshell Discord][discord]. 20 - 21 - [docs]: https://bomb.sh/docs 22 - [discord]: https://bomb.sh/chat 3 + This package is the internal CLI for our org. It provides: 4 + - standardized `dev` command (`node --strip-types`) 5 + - standardized `build` command with `esbuild` 6 + - standardized `test` command 7 + - standardized `lint` and `format` commands 8 + - standardized `tsconfig` settings 9 + - an opportunity to dogfood our packages
+42 -4
package.json
··· 1 1 { 2 - "name": "@bomb.sh/template", 2 + "name": "@bomb.sh/nucleus", 3 3 "private": true, 4 4 "version": "0.0.0", 5 5 "type": "module", 6 6 "license": "MIT", 7 + "bin": { 8 + "nucleus": "./index.ts" 9 + }, 10 + "description": "The internal dev, build, and lint CLI for Bombshell projects", 11 + "keywords": [ 12 + "cli", 13 + "bombshell", 14 + "nucleus" 15 + ], 16 + "homepage": "https://bomb.sh", 7 17 "author": { 8 18 "name": "Bombshell", 9 19 "email": "oss@bomb.sh", ··· 11 21 }, 12 22 "repository": { 13 23 "type": "git", 14 - "url": "git+https://github.com/bombshell-dev/template.git" 24 + "url": "git+https://github.com/bombshell-dev/nucleus.git" 25 + }, 26 + "exports": { 27 + ".": { 28 + "import": "./dist/index.js" 29 + }, 30 + "./package.json": "./package.json", 31 + "./tsconfig.json": "./tsconfig.json" 15 32 }, 16 33 "scripts": { 17 - "start": "tsx index.ts" 34 + "nucleus": "node --experimental-strip-types --no-warnings ./src/bin.ts", 35 + "dev": "pnpm run nucleus dev", 36 + "build": "pnpm run nucleus build", 37 + "format": "pnpm run nucleus format", 38 + "init": "pnpm run nucleus init", 39 + "lint": "pnpm run nucleus lint", 40 + "test": "pnpm run nucleus test" 18 41 }, 19 42 "devDependencies": { 20 - "tsx": "^4.19.2" 43 + "@types/node": "^22.13.14" 44 + }, 45 + "dependencies": { 46 + "@biomejs/biome": "^1.9.4", 47 + "@bomb.sh/args": "^0.3.1", 48 + "esbuild": "^0.25.1", 49 + "escalade": "^3.2.0", 50 + "tinyexec": "^1.0.1" 51 + }, 52 + "pnpm": { 53 + "onlyBuiltDependencies": [ 54 + "esbuild" 55 + ] 56 + }, 57 + "volta": { 58 + "node": "22.14.0" 21 59 } 22 60 }
+488
pnpm-lock.yaml
··· 1 + lockfileVersion: '9.0' 2 + 3 + settings: 4 + autoInstallPeers: true 5 + excludeLinksFromLockfile: false 6 + 7 + importers: 8 + 9 + .: 10 + dependencies: 11 + '@biomejs/biome': 12 + specifier: ^1.9.4 13 + version: 1.9.4 14 + '@bomb.sh/args': 15 + specifier: ^0.3.1 16 + version: 0.3.1 17 + esbuild: 18 + specifier: ^0.25.1 19 + version: 0.25.1 20 + escalade: 21 + specifier: ^3.2.0 22 + version: 3.2.0 23 + giget: 24 + specifier: ^2.0.0 25 + version: 2.0.0 26 + tinyexec: 27 + specifier: ^1.0.1 28 + version: 1.0.1 29 + devDependencies: 30 + '@types/node': 31 + specifier: ^22.13.14 32 + version: 22.13.14 33 + 34 + packages: 35 + 36 + '@biomejs/biome@1.9.4': 37 + resolution: {integrity: sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==} 38 + engines: {node: '>=14.21.3'} 39 + hasBin: true 40 + 41 + '@biomejs/cli-darwin-arm64@1.9.4': 42 + resolution: {integrity: sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw==} 43 + engines: {node: '>=14.21.3'} 44 + cpu: [arm64] 45 + os: [darwin] 46 + 47 + '@biomejs/cli-darwin-x64@1.9.4': 48 + resolution: {integrity: sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg==} 49 + engines: {node: '>=14.21.3'} 50 + cpu: [x64] 51 + os: [darwin] 52 + 53 + '@biomejs/cli-linux-arm64-musl@1.9.4': 54 + resolution: {integrity: sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA==} 55 + engines: {node: '>=14.21.3'} 56 + cpu: [arm64] 57 + os: [linux] 58 + 59 + '@biomejs/cli-linux-arm64@1.9.4': 60 + resolution: {integrity: sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==} 61 + engines: {node: '>=14.21.3'} 62 + cpu: [arm64] 63 + os: [linux] 64 + 65 + '@biomejs/cli-linux-x64-musl@1.9.4': 66 + resolution: {integrity: sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==} 67 + engines: {node: '>=14.21.3'} 68 + cpu: [x64] 69 + os: [linux] 70 + 71 + '@biomejs/cli-linux-x64@1.9.4': 72 + resolution: {integrity: sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==} 73 + engines: {node: '>=14.21.3'} 74 + cpu: [x64] 75 + os: [linux] 76 + 77 + '@biomejs/cli-win32-arm64@1.9.4': 78 + resolution: {integrity: sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==} 79 + engines: {node: '>=14.21.3'} 80 + cpu: [arm64] 81 + os: [win32] 82 + 83 + '@biomejs/cli-win32-x64@1.9.4': 84 + resolution: {integrity: sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA==} 85 + engines: {node: '>=14.21.3'} 86 + cpu: [x64] 87 + os: [win32] 88 + 89 + '@bomb.sh/args@0.3.1': 90 + resolution: {integrity: sha512-CwxKrfgcorUPP6KfYD59aRdBYWBTsfsxT+GmoLVnKo5Tmyoqbpo0UNcjngRMyU+6tiPbd18RuIYxhgAn44wU/Q==} 91 + 92 + '@esbuild/aix-ppc64@0.25.1': 93 + resolution: {integrity: sha512-kfYGy8IdzTGy+z0vFGvExZtxkFlA4zAxgKEahG9KE1ScBjpQnFsNOX8KTU5ojNru5ed5CVoJYXFtoxaq5nFbjQ==} 94 + engines: {node: '>=18'} 95 + cpu: [ppc64] 96 + os: [aix] 97 + 98 + '@esbuild/android-arm64@0.25.1': 99 + resolution: {integrity: sha512-50tM0zCJW5kGqgG7fQ7IHvQOcAn9TKiVRuQ/lN0xR+T2lzEFvAi1ZcS8DiksFcEpf1t/GYOeOfCAgDHFpkiSmA==} 100 + engines: {node: '>=18'} 101 + cpu: [arm64] 102 + os: [android] 103 + 104 + '@esbuild/android-arm@0.25.1': 105 + resolution: {integrity: sha512-dp+MshLYux6j/JjdqVLnMglQlFu+MuVeNrmT5nk6q07wNhCdSnB7QZj+7G8VMUGh1q+vj2Bq8kRsuyA00I/k+Q==} 106 + engines: {node: '>=18'} 107 + cpu: [arm] 108 + os: [android] 109 + 110 + '@esbuild/android-x64@0.25.1': 111 + resolution: {integrity: sha512-GCj6WfUtNldqUzYkN/ITtlhwQqGWu9S45vUXs7EIYf+7rCiiqH9bCloatO9VhxsL0Pji+PF4Lz2XXCES+Q8hDw==} 112 + engines: {node: '>=18'} 113 + cpu: [x64] 114 + os: [android] 115 + 116 + '@esbuild/darwin-arm64@0.25.1': 117 + resolution: {integrity: sha512-5hEZKPf+nQjYoSr/elb62U19/l1mZDdqidGfmFutVUjjUZrOazAtwK+Kr+3y0C/oeJfLlxo9fXb1w7L+P7E4FQ==} 118 + engines: {node: '>=18'} 119 + cpu: [arm64] 120 + os: [darwin] 121 + 122 + '@esbuild/darwin-x64@0.25.1': 123 + resolution: {integrity: sha512-hxVnwL2Dqs3fM1IWq8Iezh0cX7ZGdVhbTfnOy5uURtao5OIVCEyj9xIzemDi7sRvKsuSdtCAhMKarxqtlyVyfA==} 124 + engines: {node: '>=18'} 125 + cpu: [x64] 126 + os: [darwin] 127 + 128 + '@esbuild/freebsd-arm64@0.25.1': 129 + resolution: {integrity: sha512-1MrCZs0fZa2g8E+FUo2ipw6jw5qqQiH+tERoS5fAfKnRx6NXH31tXBKI3VpmLijLH6yriMZsxJtaXUyFt/8Y4A==} 130 + engines: {node: '>=18'} 131 + cpu: [arm64] 132 + os: [freebsd] 133 + 134 + '@esbuild/freebsd-x64@0.25.1': 135 + resolution: {integrity: sha512-0IZWLiTyz7nm0xuIs0q1Y3QWJC52R8aSXxe40VUxm6BB1RNmkODtW6LHvWRrGiICulcX7ZvyH6h5fqdLu4gkww==} 136 + engines: {node: '>=18'} 137 + cpu: [x64] 138 + os: [freebsd] 139 + 140 + '@esbuild/linux-arm64@0.25.1': 141 + resolution: {integrity: sha512-jaN3dHi0/DDPelk0nLcXRm1q7DNJpjXy7yWaWvbfkPvI+7XNSc/lDOnCLN7gzsyzgu6qSAmgSvP9oXAhP973uQ==} 142 + engines: {node: '>=18'} 143 + cpu: [arm64] 144 + os: [linux] 145 + 146 + '@esbuild/linux-arm@0.25.1': 147 + resolution: {integrity: sha512-NdKOhS4u7JhDKw9G3cY6sWqFcnLITn6SqivVArbzIaf3cemShqfLGHYMx8Xlm/lBit3/5d7kXvriTUGa5YViuQ==} 148 + engines: {node: '>=18'} 149 + cpu: [arm] 150 + os: [linux] 151 + 152 + '@esbuild/linux-ia32@0.25.1': 153 + resolution: {integrity: sha512-OJykPaF4v8JidKNGz8c/q1lBO44sQNUQtq1KktJXdBLn1hPod5rE/Hko5ugKKZd+D2+o1a9MFGUEIUwO2YfgkQ==} 154 + engines: {node: '>=18'} 155 + cpu: [ia32] 156 + os: [linux] 157 + 158 + '@esbuild/linux-loong64@0.25.1': 159 + resolution: {integrity: sha512-nGfornQj4dzcq5Vp835oM/o21UMlXzn79KobKlcs3Wz9smwiifknLy4xDCLUU0BWp7b/houtdrgUz7nOGnfIYg==} 160 + engines: {node: '>=18'} 161 + cpu: [loong64] 162 + os: [linux] 163 + 164 + '@esbuild/linux-mips64el@0.25.1': 165 + resolution: {integrity: sha512-1osBbPEFYwIE5IVB/0g2X6i1qInZa1aIoj1TdL4AaAb55xIIgbg8Doq6a5BzYWgr+tEcDzYH67XVnTmUzL+nXg==} 166 + engines: {node: '>=18'} 167 + cpu: [mips64el] 168 + os: [linux] 169 + 170 + '@esbuild/linux-ppc64@0.25.1': 171 + resolution: {integrity: sha512-/6VBJOwUf3TdTvJZ82qF3tbLuWsscd7/1w+D9LH0W/SqUgM5/JJD0lrJ1fVIfZsqB6RFmLCe0Xz3fmZc3WtyVg==} 172 + engines: {node: '>=18'} 173 + cpu: [ppc64] 174 + os: [linux] 175 + 176 + '@esbuild/linux-riscv64@0.25.1': 177 + resolution: {integrity: sha512-nSut/Mx5gnilhcq2yIMLMe3Wl4FK5wx/o0QuuCLMtmJn+WeWYoEGDN1ipcN72g1WHsnIbxGXd4i/MF0gTcuAjQ==} 178 + engines: {node: '>=18'} 179 + cpu: [riscv64] 180 + os: [linux] 181 + 182 + '@esbuild/linux-s390x@0.25.1': 183 + resolution: {integrity: sha512-cEECeLlJNfT8kZHqLarDBQso9a27o2Zd2AQ8USAEoGtejOrCYHNtKP8XQhMDJMtthdF4GBmjR2au3x1udADQQQ==} 184 + engines: {node: '>=18'} 185 + cpu: [s390x] 186 + os: [linux] 187 + 188 + '@esbuild/linux-x64@0.25.1': 189 + resolution: {integrity: sha512-xbfUhu/gnvSEg+EGovRc+kjBAkrvtk38RlerAzQxvMzlB4fXpCFCeUAYzJvrnhFtdeyVCDANSjJvOvGYoeKzFA==} 190 + engines: {node: '>=18'} 191 + cpu: [x64] 192 + os: [linux] 193 + 194 + '@esbuild/netbsd-arm64@0.25.1': 195 + resolution: {integrity: sha512-O96poM2XGhLtpTh+s4+nP7YCCAfb4tJNRVZHfIE7dgmax+yMP2WgMd2OecBuaATHKTHsLWHQeuaxMRnCsH8+5g==} 196 + engines: {node: '>=18'} 197 + cpu: [arm64] 198 + os: [netbsd] 199 + 200 + '@esbuild/netbsd-x64@0.25.1': 201 + resolution: {integrity: sha512-X53z6uXip6KFXBQ+Krbx25XHV/NCbzryM6ehOAeAil7X7oa4XIq+394PWGnwaSQ2WRA0KI6PUO6hTO5zeF5ijA==} 202 + engines: {node: '>=18'} 203 + cpu: [x64] 204 + os: [netbsd] 205 + 206 + '@esbuild/openbsd-arm64@0.25.1': 207 + resolution: {integrity: sha512-Na9T3szbXezdzM/Kfs3GcRQNjHzM6GzFBeU1/6IV/npKP5ORtp9zbQjvkDJ47s6BCgaAZnnnu/cY1x342+MvZg==} 208 + engines: {node: '>=18'} 209 + cpu: [arm64] 210 + os: [openbsd] 211 + 212 + '@esbuild/openbsd-x64@0.25.1': 213 + resolution: {integrity: sha512-T3H78X2h1tszfRSf+txbt5aOp/e7TAz3ptVKu9Oyir3IAOFPGV6O9c2naym5TOriy1l0nNf6a4X5UXRZSGX/dw==} 214 + engines: {node: '>=18'} 215 + cpu: [x64] 216 + os: [openbsd] 217 + 218 + '@esbuild/sunos-x64@0.25.1': 219 + resolution: {integrity: sha512-2H3RUvcmULO7dIE5EWJH8eubZAI4xw54H1ilJnRNZdeo8dTADEZ21w6J22XBkXqGJbe0+wnNJtw3UXRoLJnFEg==} 220 + engines: {node: '>=18'} 221 + cpu: [x64] 222 + os: [sunos] 223 + 224 + '@esbuild/win32-arm64@0.25.1': 225 + resolution: {integrity: sha512-GE7XvrdOzrb+yVKB9KsRMq+7a2U/K5Cf/8grVFRAGJmfADr/e/ODQ134RK2/eeHqYV5eQRFxb1hY7Nr15fv1NQ==} 226 + engines: {node: '>=18'} 227 + cpu: [arm64] 228 + os: [win32] 229 + 230 + '@esbuild/win32-ia32@0.25.1': 231 + resolution: {integrity: sha512-uOxSJCIcavSiT6UnBhBzE8wy3n0hOkJsBOzy7HDAuTDE++1DJMRRVCPGisULScHL+a/ZwdXPpXD3IyFKjA7K8A==} 232 + engines: {node: '>=18'} 233 + cpu: [ia32] 234 + os: [win32] 235 + 236 + '@esbuild/win32-x64@0.25.1': 237 + resolution: {integrity: sha512-Y1EQdcfwMSeQN/ujR5VayLOJ1BHaK+ssyk0AEzPjC+t1lITgsnccPqFjb6V+LsTp/9Iov4ysfjxLaGJ9RPtkVg==} 238 + engines: {node: '>=18'} 239 + cpu: [x64] 240 + os: [win32] 241 + 242 + '@types/node@22.13.14': 243 + resolution: {integrity: sha512-Zs/Ollc1SJ8nKUAgc7ivOEdIBM8JAKgrqqUYi2J997JuKO7/tpQC+WCetQ1sypiKCQWHdvdg9wBNpUPEWZae7w==} 244 + 245 + citty@0.1.6: 246 + resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==} 247 + 248 + confbox@0.2.1: 249 + resolution: {integrity: sha512-hkT3yDPFbs95mNCy1+7qNKC6Pro+/ibzYxtM2iqEigpf0sVw+bg4Zh9/snjsBcf990vfIsg5+1U7VyiyBb3etg==} 250 + 251 + consola@3.4.2: 252 + resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} 253 + engines: {node: ^14.18.0 || >=16.10.0} 254 + 255 + defu@6.1.4: 256 + resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} 257 + 258 + esbuild@0.25.1: 259 + resolution: {integrity: sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==} 260 + engines: {node: '>=18'} 261 + hasBin: true 262 + 263 + escalade@3.2.0: 264 + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} 265 + engines: {node: '>=6'} 266 + 267 + exsolve@1.0.4: 268 + resolution: {integrity: sha512-xsZH6PXaER4XoV+NiT7JHp1bJodJVT+cxeSH1G0f0tlT0lJqYuHUP3bUx2HtfTDvOagMINYp8rsqusxud3RXhw==} 269 + 270 + giget@2.0.0: 271 + resolution: {integrity: sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA==} 272 + hasBin: true 273 + 274 + node-fetch-native@1.6.6: 275 + resolution: {integrity: sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==} 276 + 277 + nypm@0.6.0: 278 + resolution: {integrity: sha512-mn8wBFV9G9+UFHIrq+pZ2r2zL4aPau/by3kJb3cM7+5tQHMt6HGQB8FDIeKFYp8o0D2pnH6nVsO88N4AmUxIWg==} 279 + engines: {node: ^14.16.0 || >=16.10.0} 280 + hasBin: true 281 + 282 + pathe@2.0.3: 283 + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} 284 + 285 + pkg-types@2.1.0: 286 + resolution: {integrity: sha512-wmJwA+8ihJixSoHKxZJRBQG1oY8Yr9pGLzRmSsNms0iNWyHHAlZCa7mmKiFR10YPZuz/2k169JiS/inOjBCZ2A==} 287 + 288 + tinyexec@0.3.2: 289 + resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} 290 + 291 + tinyexec@1.0.1: 292 + resolution: {integrity: sha512-5uC6DDlmeqiOwCPmK9jMSdOuZTh8bU39Ys6yidB+UTt5hfZUPGAypSgFRiEp+jbi9qH40BLDvy85jIU88wKSqw==} 293 + 294 + undici-types@6.20.0: 295 + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} 296 + 297 + snapshots: 298 + 299 + '@biomejs/biome@1.9.4': 300 + optionalDependencies: 301 + '@biomejs/cli-darwin-arm64': 1.9.4 302 + '@biomejs/cli-darwin-x64': 1.9.4 303 + '@biomejs/cli-linux-arm64': 1.9.4 304 + '@biomejs/cli-linux-arm64-musl': 1.9.4 305 + '@biomejs/cli-linux-x64': 1.9.4 306 + '@biomejs/cli-linux-x64-musl': 1.9.4 307 + '@biomejs/cli-win32-arm64': 1.9.4 308 + '@biomejs/cli-win32-x64': 1.9.4 309 + 310 + '@biomejs/cli-darwin-arm64@1.9.4': 311 + optional: true 312 + 313 + '@biomejs/cli-darwin-x64@1.9.4': 314 + optional: true 315 + 316 + '@biomejs/cli-linux-arm64-musl@1.9.4': 317 + optional: true 318 + 319 + '@biomejs/cli-linux-arm64@1.9.4': 320 + optional: true 321 + 322 + '@biomejs/cli-linux-x64-musl@1.9.4': 323 + optional: true 324 + 325 + '@biomejs/cli-linux-x64@1.9.4': 326 + optional: true 327 + 328 + '@biomejs/cli-win32-arm64@1.9.4': 329 + optional: true 330 + 331 + '@biomejs/cli-win32-x64@1.9.4': 332 + optional: true 333 + 334 + '@bomb.sh/args@0.3.1': {} 335 + 336 + '@esbuild/aix-ppc64@0.25.1': 337 + optional: true 338 + 339 + '@esbuild/android-arm64@0.25.1': 340 + optional: true 341 + 342 + '@esbuild/android-arm@0.25.1': 343 + optional: true 344 + 345 + '@esbuild/android-x64@0.25.1': 346 + optional: true 347 + 348 + '@esbuild/darwin-arm64@0.25.1': 349 + optional: true 350 + 351 + '@esbuild/darwin-x64@0.25.1': 352 + optional: true 353 + 354 + '@esbuild/freebsd-arm64@0.25.1': 355 + optional: true 356 + 357 + '@esbuild/freebsd-x64@0.25.1': 358 + optional: true 359 + 360 + '@esbuild/linux-arm64@0.25.1': 361 + optional: true 362 + 363 + '@esbuild/linux-arm@0.25.1': 364 + optional: true 365 + 366 + '@esbuild/linux-ia32@0.25.1': 367 + optional: true 368 + 369 + '@esbuild/linux-loong64@0.25.1': 370 + optional: true 371 + 372 + '@esbuild/linux-mips64el@0.25.1': 373 + optional: true 374 + 375 + '@esbuild/linux-ppc64@0.25.1': 376 + optional: true 377 + 378 + '@esbuild/linux-riscv64@0.25.1': 379 + optional: true 380 + 381 + '@esbuild/linux-s390x@0.25.1': 382 + optional: true 383 + 384 + '@esbuild/linux-x64@0.25.1': 385 + optional: true 386 + 387 + '@esbuild/netbsd-arm64@0.25.1': 388 + optional: true 389 + 390 + '@esbuild/netbsd-x64@0.25.1': 391 + optional: true 392 + 393 + '@esbuild/openbsd-arm64@0.25.1': 394 + optional: true 395 + 396 + '@esbuild/openbsd-x64@0.25.1': 397 + optional: true 398 + 399 + '@esbuild/sunos-x64@0.25.1': 400 + optional: true 401 + 402 + '@esbuild/win32-arm64@0.25.1': 403 + optional: true 404 + 405 + '@esbuild/win32-ia32@0.25.1': 406 + optional: true 407 + 408 + '@esbuild/win32-x64@0.25.1': 409 + optional: true 410 + 411 + '@types/node@22.13.14': 412 + dependencies: 413 + undici-types: 6.20.0 414 + 415 + citty@0.1.6: 416 + dependencies: 417 + consola: 3.4.2 418 + 419 + confbox@0.2.1: {} 420 + 421 + consola@3.4.2: {} 422 + 423 + defu@6.1.4: {} 424 + 425 + esbuild@0.25.1: 426 + optionalDependencies: 427 + '@esbuild/aix-ppc64': 0.25.1 428 + '@esbuild/android-arm': 0.25.1 429 + '@esbuild/android-arm64': 0.25.1 430 + '@esbuild/android-x64': 0.25.1 431 + '@esbuild/darwin-arm64': 0.25.1 432 + '@esbuild/darwin-x64': 0.25.1 433 + '@esbuild/freebsd-arm64': 0.25.1 434 + '@esbuild/freebsd-x64': 0.25.1 435 + '@esbuild/linux-arm': 0.25.1 436 + '@esbuild/linux-arm64': 0.25.1 437 + '@esbuild/linux-ia32': 0.25.1 438 + '@esbuild/linux-loong64': 0.25.1 439 + '@esbuild/linux-mips64el': 0.25.1 440 + '@esbuild/linux-ppc64': 0.25.1 441 + '@esbuild/linux-riscv64': 0.25.1 442 + '@esbuild/linux-s390x': 0.25.1 443 + '@esbuild/linux-x64': 0.25.1 444 + '@esbuild/netbsd-arm64': 0.25.1 445 + '@esbuild/netbsd-x64': 0.25.1 446 + '@esbuild/openbsd-arm64': 0.25.1 447 + '@esbuild/openbsd-x64': 0.25.1 448 + '@esbuild/sunos-x64': 0.25.1 449 + '@esbuild/win32-arm64': 0.25.1 450 + '@esbuild/win32-ia32': 0.25.1 451 + '@esbuild/win32-x64': 0.25.1 452 + 453 + escalade@3.2.0: {} 454 + 455 + exsolve@1.0.4: {} 456 + 457 + giget@2.0.0: 458 + dependencies: 459 + citty: 0.1.6 460 + consola: 3.4.2 461 + defu: 6.1.4 462 + node-fetch-native: 1.6.6 463 + nypm: 0.6.0 464 + pathe: 2.0.3 465 + 466 + node-fetch-native@1.6.6: {} 467 + 468 + nypm@0.6.0: 469 + dependencies: 470 + citty: 0.1.6 471 + consola: 3.4.2 472 + pathe: 2.0.3 473 + pkg-types: 2.1.0 474 + tinyexec: 0.3.2 475 + 476 + pathe@2.0.3: {} 477 + 478 + pkg-types@2.1.0: 479 + dependencies: 480 + confbox: 0.2.1 481 + exsolve: 1.0.4 482 + pathe: 2.0.3 483 + 484 + tinyexec@0.3.2: {} 485 + 486 + tinyexec@1.0.1: {} 487 + 488 + undici-types@6.20.0: {}
+32
src/bin.ts
··· 1 + import { argv } from "node:process"; 2 + import { build } from "./commands/build.ts"; 3 + import { dev } from "./commands/dev.ts"; 4 + import { format } from "./commands/format.ts"; 5 + import { init } from "./commands/init.ts"; 6 + import { lint } from "./commands/lint.ts"; 7 + import { test } from "./commands/test.ts"; 8 + 9 + const commands = { build, dev, format, init, lint, test }; 10 + 11 + async function main() { 12 + const [command, ...args] = argv.slice(2); 13 + 14 + if (!command) { 15 + console.log( 16 + `No command provided. Available commands: ${Object.keys(commands).join(", ")}\n`, 17 + ); 18 + return; 19 + } 20 + 21 + const run = commands[command as keyof typeof commands]; 22 + if (!run) { 23 + console.log( 24 + `Unknown command: ${command}. Available commands: ${Object.keys(commands).join(", ")}`, 25 + ); 26 + return; 27 + } 28 + 29 + await run({ args }); 30 + } 31 + 32 + main();
+23
src/commands/build.ts
··· 1 + import { rm } from "node:fs/promises"; 2 + import { build as esbuild } from "esbuild"; 3 + import type { CommandContext } from "../context.ts"; 4 + import { getPackageJSON } from "../utils.ts"; 5 + 6 + export async function build(ctx: CommandContext) { 7 + const { dependencies } = await getPackageJSON(); 8 + await rm("dist", { recursive: true, force: true }); 9 + await esbuild({ 10 + entryPoints: ["src/*", "src/**/*"], 11 + outdir: "dist", 12 + platform: "node", 13 + format: "esm", 14 + sourcemap: true, 15 + treeShaking: true, 16 + target: "node20", 17 + minify: true, 18 + bundle: true, 19 + external: ["node:*", ...Object.keys(dependencies)], 20 + }).catch(() => { 21 + process.exit(1); 22 + }); 23 + }
+35
src/commands/dev.ts
··· 1 + // standardized `dev` command, shells out to `node --strip-types` 2 + import { argv } from "node:process"; 3 + 4 + import { x } from "tinyexec"; 5 + import type { CommandContext } from "../context.ts"; 6 + 7 + export async function dev(ctx: CommandContext) { 8 + const { args } = ctx; 9 + const [file = "./src/index.ts", ...rest] = args; 10 + // console.clear(); 11 + console.log( 12 + `node --experimental-strip-types --no-warnings ${args.join(" ")}`, 13 + ); 14 + const stdio = x("node", [ 15 + "--experimental-strip-types", 16 + "--no-warnings", 17 + "--watch-path=./src/", 18 + file, 19 + ...rest, 20 + ]); 21 + console.log("Starting dev server..."); 22 + console.log("Press Ctrl+C to stop the server."); 23 + 24 + for await (const line of stdio) { 25 + if (line.startsWith("Restarting")) { 26 + console.log(line); 27 + continue; 28 + } 29 + if (line.startsWith("Completed")) { 30 + console.log(); 31 + continue; 32 + } 33 + console.log(line); 34 + } 35 + }
+13
src/commands/format.ts
··· 1 + import { x } from "tinyexec"; 2 + import type { CommandContext } from "../context.ts"; 3 + 4 + // standardized `format` command, runs `@biomejs/biome` and fixes formatting 5 + export async function format(ctx: CommandContext) { 6 + console.clear(); 7 + console.log("Running format command..."); 8 + const stdio = x("biome", ["check", "--write", "./src"]); 9 + 10 + for await (const line of stdio) { 11 + console.log(line); 12 + } 13 + }
+41
src/commands/init.ts
··· 1 + import { readFile, writeFile } from "node:fs/promises"; 2 + import { dirname, sep } from "node:path"; 3 + import { cwd } from "node:process"; 4 + import { pathToFileURL } from "node:url"; 5 + import { parse } from "@bomb.sh/args"; 6 + import { x } from "tinyexec"; 7 + import type { CommandContext } from "../context.ts"; 8 + 9 + export async function init(ctx: CommandContext) { 10 + const [_name = '.', ...args] = ctx.args; 11 + const name = _name === '.' ? dirname(cwd()) : _name; 12 + const dest = new URL("./.temp/", pathToFileURL([cwd(), sep].join(""))); 13 + for await (const line of x("pnpx", ["giget@latest", "gh:bombshell-dev/template", name])) { 14 + console.log(line); 15 + } 16 + const { 17 + default: { version }, 18 + } = await import("@bomb.sh/nucleus/package.json", { with: { type: "json" } }); 19 + 20 + const promises: Promise<void>[] = []; 21 + for (const file of ["package.json", "README.md"]) { 22 + promises.push(postprocess(new URL(file, dest), (contents) => { 23 + return contents 24 + .replaceAll("$name", name) 25 + .replaceAll("$nucleus_version", version); 26 + })); 27 + } 28 + await Promise.all(promises); 29 + } 30 + 31 + async function postprocess( 32 + file: URL, 33 + transform: ( 34 + contents: string, 35 + ) => string | undefined | Promise<string | undefined>, 36 + ) { 37 + const contents = await readFile(file, { encoding: "utf8" }); 38 + const result = await transform(contents); 39 + if (!result) return; 40 + await writeFile(file, result, { encoding: "utf8" }); 41 + }
+4
src/commands/lint.ts
··· 1 + import type { CommandContext } from "../context.ts"; 2 + 3 + // standardized `lint` command, runs `@biomejs/biome` and generates a lint report 4 + export async function lint(ctx: CommandContext) {}
+4
src/commands/test.ts
··· 1 + import type { CommandContext } from "../context.ts"; 2 + 3 + // standardized `test` command, shells out to `node test --strip-types` 4 + export async function test(ctx: CommandContext) {}
+3
src/context.ts
··· 1 + export interface CommandContext { 2 + args: string[]; 3 + }
+1 -1
src/index.ts
··· 1 - // Hello world! 1 + console.log("Nucleus CLI - A simple CLI for Bombshell!");
+16
src/utils.ts
··· 1 + import { fileURLToPath, pathToFileURL } from "node:url"; 2 + import escalade from "escalade"; 3 + 4 + export async function getPackageJSON() { 5 + const pkg = await escalade(fileURLToPath(import.meta.url), (dir, files) => { 6 + return files.find((file) => file === "package.json"); 7 + }); 8 + if (!pkg) { 9 + throw new Error("No package.json found"); 10 + } 11 + const pkgPath = pathToFileURL(pkg); 12 + const { default: json } = await import(pkgPath.toString(), { 13 + with: { type: "json" }, 14 + }); 15 + return json; 16 + }
+4 -1
tsconfig.json
··· 15 15 "strict": true, 16 16 "noUncheckedIndexedAccess": true, 17 17 "noImplicitOverride": true, 18 + "erasableSyntaxOnly": true, 19 + "rewriteRelativeImportExtensions": true, 18 20 19 21 /* Library mode */ 20 - "module": "preserve", 22 + "module": "NodeNext", 23 + "moduleResolution": "nodenext", 21 24 "noEmit": true, 22 25 "declaration": true, 23 26 "lib": ["es2022"],