@@ -94,7 +94,7 @@ interface CatalogYamlMap {
9494 * line-shaped (key: value) and we only need the @socketsecurity/* entries the
9595 * proxy actually references.
9696 */
97- function readNeededCatalogEntries ( ) : CatalogYamlMap {
97+ export function readNeededCatalogEntries ( ) : CatalogYamlMap {
9898 const yamlPath = path . join ( WHEELHOUSE_ROOT , 'pnpm-workspace.yaml' )
9999 const text = readFileSync ( yamlPath , 'utf8' )
100100 const lines = text . split ( '\n' )
@@ -140,7 +140,7 @@ function readNeededCatalogEntries(): CatalogYamlMap {
140140 * catalog aliases the package source declares. Keeps imports of
141141 * `@socketsecurity/lib-stable/...` resolvable from inside the install.
142142 */
143- function writeInstallWorkspaceYaml ( catalog : CatalogYamlMap ) : void {
143+ export function writeInstallWorkspaceYaml ( catalog : CatalogYamlMap ) : void {
144144 const lines = [ 'catalog:' ]
145145 for ( const [ k , v ] of Object . entries ( catalog ) ) {
146146 // Quote values that aren't bare versions (e.g. `npm:foo@1.0.0`).
@@ -161,7 +161,7 @@ function writeInstallWorkspaceYaml(catalog: CatalogYamlMap): void {
161161 * Stripping `bin`/`exports` keeps pnpm from trying to wire global binaries at
162162 * install time — we drop our own shim explicitly.
163163 */
164- function writeInstallPackageJson ( sourceVersion : string ) : void {
164+ export function writeInstallPackageJson ( sourceVersion : string ) : void {
165165 const sourcePkg = JSON . parse (
166166 readFileSync ( path . join ( PKG_SOURCE_DIR , 'package.json' ) , 'utf8' ) ,
167167 )
@@ -190,7 +190,7 @@ function writeInstallPackageJson(sourceVersion: string): void {
190190 * `fs.cp` with recursive + force is the cross-platform equivalent of `cp -r`.
191191 * Force overwrites stale files on reinstall.
192192 */
193- function copySource ( ) : void {
193+ export function copySource ( ) : void {
194194 // Use sync fs API for consistency with the rest of the script — this
195195 // is a one-shot install, not a hot path. `cpSync` exists since
196196 // Node 20; the recursive option is required for directories.
@@ -207,14 +207,14 @@ function copySource(): void {
207207 * when the recorded x-source-version in the dest's package.json differs from
208208 * the source.
209209 */
210- function readSourceVersion ( ) : string {
210+ export function readSourceVersion ( ) : string {
211211 const pkg = JSON . parse (
212212 readFileSync ( path . join ( PKG_SOURCE_DIR , 'package.json' ) , 'utf8' ) ,
213213 )
214214 return pkg . version ?? '0.0.0'
215215}
216216
217- function readInstalledVersion ( ) : string | undefined {
217+ export function readInstalledVersion ( ) : string | undefined {
218218 const installedPkgPath = path . join ( INSTALL_DIR , 'package.json' )
219219 if ( ! existsSync ( installedPkgPath ) ) {
220220 return undefined
@@ -227,7 +227,7 @@ function readInstalledVersion(): string | undefined {
227227 }
228228}
229229
230- function pnpmInstallAtDest ( quiet : boolean ) : void {
230+ export function pnpmInstallAtDest ( quiet : boolean ) : void {
231231 const result = spawnSync (
232232 'pnpm' ,
233233 [
@@ -248,7 +248,7 @@ function pnpmInstallAtDest(quiet: boolean): void {
248248 }
249249}
250250
251- function writeBinShim ( ) : void {
251+ export function writeBinShim ( ) : void {
252252 // Shim execs the proxy's top-level bin/ entry. Source lives at
253253 // INSTALL_DIR/bin/, NOT under node_modules/ — so Node 22+ can strip
254254 // types from the .mts file at runtime. `node` is on PATH on every
0 commit comments