diff --git a/packages/chdman-darwin-arm64/index.ts b/packages/chdman-darwin-arm64/index.ts index 993336f..8cf1f42 100644 --- a/packages/chdman-darwin-arm64/index.ts +++ b/packages/chdman-darwin-arm64/index.ts @@ -1,25 +1,4 @@ -import fs from 'node:fs'; import path from 'node:path'; import url from 'node:url'; -/** - * Search for a {@link fileName} in {@link filePath} or any of its parent directories. - */ -function scanUpPathForFile(filePath: string, fileName: string): string | undefined { - const fullPath = path.join(filePath, fileName); - if (fs.existsSync(fullPath)) { - return fullPath; - } - - const parentPath = path.dirname(filePath); - if (parentPath !== filePath) { - return scanUpPathForFile(path.dirname(filePath), fileName); - } - - return undefined; -} - -export default scanUpPathForFile( - url.fileURLToPath(new URL('.', import.meta.url)), - 'chdman', -); +export default path.join(url.fileURLToPath(new URL('.', import.meta.url)), 'chdman'); diff --git a/packages/chdman-darwin-arm64/package.json b/packages/chdman-darwin-arm64/package.json index f2968f7..7417d72 100644 --- a/packages/chdman-darwin-arm64/package.json +++ b/packages/chdman-darwin-arm64/package.json @@ -10,8 +10,7 @@ "type": "module", "files": [ "dist", - "!**/*.tsbuildinfo", - "chdman" + "!**/*.tsbuildinfo" ], "main": "dist/index.js", "publishConfig": { @@ -19,7 +18,7 @@ "provenance": true }, "scripts": { - "build": "tsc --build --verbose", + "build": "tsc --build --verbose && cp chdman* dist/", "lint": "eslint .", "lint:fix": "eslint . --fix", "prepack": "npm run build && cp -f ../../LICENSE ../../README.md ./", diff --git a/packages/chdman-darwin-x64/index.ts b/packages/chdman-darwin-x64/index.ts index 993336f..8cf1f42 100644 --- a/packages/chdman-darwin-x64/index.ts +++ b/packages/chdman-darwin-x64/index.ts @@ -1,25 +1,4 @@ -import fs from 'node:fs'; import path from 'node:path'; import url from 'node:url'; -/** - * Search for a {@link fileName} in {@link filePath} or any of its parent directories. - */ -function scanUpPathForFile(filePath: string, fileName: string): string | undefined { - const fullPath = path.join(filePath, fileName); - if (fs.existsSync(fullPath)) { - return fullPath; - } - - const parentPath = path.dirname(filePath); - if (parentPath !== filePath) { - return scanUpPathForFile(path.dirname(filePath), fileName); - } - - return undefined; -} - -export default scanUpPathForFile( - url.fileURLToPath(new URL('.', import.meta.url)), - 'chdman', -); +export default path.join(url.fileURLToPath(new URL('.', import.meta.url)), 'chdman'); diff --git a/packages/chdman-darwin-x64/package.json b/packages/chdman-darwin-x64/package.json index ce077eb..bb2d9f4 100644 --- a/packages/chdman-darwin-x64/package.json +++ b/packages/chdman-darwin-x64/package.json @@ -10,8 +10,7 @@ "type": "module", "files": [ "dist", - "!**/*.tsbuildinfo", - "chdman" + "!**/*.tsbuildinfo" ], "main": "dist/index.js", "publishConfig": { @@ -19,7 +18,7 @@ "provenance": true }, "scripts": { - "build": "tsc --build --verbose", + "build": "tsc --build --verbose && cp chdman* dist/", "lint": "eslint .", "lint:fix": "eslint . --fix", "prepack": "npm run build && cp -f ../../LICENSE ../../README.md ./", diff --git a/packages/chdman-linux-arm/index.ts b/packages/chdman-linux-arm/index.ts index 993336f..8cf1f42 100644 --- a/packages/chdman-linux-arm/index.ts +++ b/packages/chdman-linux-arm/index.ts @@ -1,25 +1,4 @@ -import fs from 'node:fs'; import path from 'node:path'; import url from 'node:url'; -/** - * Search for a {@link fileName} in {@link filePath} or any of its parent directories. - */ -function scanUpPathForFile(filePath: string, fileName: string): string | undefined { - const fullPath = path.join(filePath, fileName); - if (fs.existsSync(fullPath)) { - return fullPath; - } - - const parentPath = path.dirname(filePath); - if (parentPath !== filePath) { - return scanUpPathForFile(path.dirname(filePath), fileName); - } - - return undefined; -} - -export default scanUpPathForFile( - url.fileURLToPath(new URL('.', import.meta.url)), - 'chdman', -); +export default path.join(url.fileURLToPath(new URL('.', import.meta.url)), 'chdman'); diff --git a/packages/chdman-linux-arm/package.json b/packages/chdman-linux-arm/package.json index f764edf..fda46de 100644 --- a/packages/chdman-linux-arm/package.json +++ b/packages/chdman-linux-arm/package.json @@ -10,8 +10,7 @@ "type": "module", "files": [ "dist", - "!**/*.tsbuildinfo", - "chdman" + "!**/*.tsbuildinfo" ], "main": "dist/index.js", "publishConfig": { @@ -19,7 +18,7 @@ "provenance": true }, "scripts": { - "build": "tsc --build --verbose", + "build": "tsc --build --verbose && cp chdman* dist/", "lint": "eslint .", "lint:fix": "eslint . --fix", "prepack": "npm run build && cp -f ../../LICENSE ../../README.md ./", diff --git a/packages/chdman-linux-arm64/index.ts b/packages/chdman-linux-arm64/index.ts index 993336f..8cf1f42 100644 --- a/packages/chdman-linux-arm64/index.ts +++ b/packages/chdman-linux-arm64/index.ts @@ -1,25 +1,4 @@ -import fs from 'node:fs'; import path from 'node:path'; import url from 'node:url'; -/** - * Search for a {@link fileName} in {@link filePath} or any of its parent directories. - */ -function scanUpPathForFile(filePath: string, fileName: string): string | undefined { - const fullPath = path.join(filePath, fileName); - if (fs.existsSync(fullPath)) { - return fullPath; - } - - const parentPath = path.dirname(filePath); - if (parentPath !== filePath) { - return scanUpPathForFile(path.dirname(filePath), fileName); - } - - return undefined; -} - -export default scanUpPathForFile( - url.fileURLToPath(new URL('.', import.meta.url)), - 'chdman', -); +export default path.join(url.fileURLToPath(new URL('.', import.meta.url)), 'chdman'); diff --git a/packages/chdman-linux-arm64/package.json b/packages/chdman-linux-arm64/package.json index 8d88fd3..0d933a3 100644 --- a/packages/chdman-linux-arm64/package.json +++ b/packages/chdman-linux-arm64/package.json @@ -10,8 +10,7 @@ "type": "module", "files": [ "dist", - "!**/*.tsbuildinfo", - "chdman" + "!**/*.tsbuildinfo" ], "main": "dist/index.js", "publishConfig": { @@ -19,7 +18,7 @@ "provenance": true }, "scripts": { - "build": "tsc --build --verbose", + "build": "tsc --build --verbose && cp chdman* dist/", "lint": "eslint .", "lint:fix": "eslint . --fix", "prepack": "npm run build && cp -f ../../LICENSE ../../README.md ./", diff --git a/packages/chdman-linux-ia32/index.ts b/packages/chdman-linux-ia32/index.ts index 993336f..8cf1f42 100644 --- a/packages/chdman-linux-ia32/index.ts +++ b/packages/chdman-linux-ia32/index.ts @@ -1,25 +1,4 @@ -import fs from 'node:fs'; import path from 'node:path'; import url from 'node:url'; -/** - * Search for a {@link fileName} in {@link filePath} or any of its parent directories. - */ -function scanUpPathForFile(filePath: string, fileName: string): string | undefined { - const fullPath = path.join(filePath, fileName); - if (fs.existsSync(fullPath)) { - return fullPath; - } - - const parentPath = path.dirname(filePath); - if (parentPath !== filePath) { - return scanUpPathForFile(path.dirname(filePath), fileName); - } - - return undefined; -} - -export default scanUpPathForFile( - url.fileURLToPath(new URL('.', import.meta.url)), - 'chdman', -); +export default path.join(url.fileURLToPath(new URL('.', import.meta.url)), 'chdman'); diff --git a/packages/chdman-linux-ia32/package.json b/packages/chdman-linux-ia32/package.json index 7198a9e..7e5196d 100644 --- a/packages/chdman-linux-ia32/package.json +++ b/packages/chdman-linux-ia32/package.json @@ -10,8 +10,7 @@ "type": "module", "files": [ "dist", - "!**/*.tsbuildinfo", - "chdman" + "!**/*.tsbuildinfo" ], "main": "dist/index.js", "publishConfig": { @@ -19,7 +18,7 @@ "provenance": true }, "scripts": { - "build": "tsc --build --verbose", + "build": "tsc --build --verbose && cp chdman* dist/", "lint": "eslint .", "lint:fix": "eslint . --fix", "prepack": "npm run build && cp -f ../../LICENSE ../../README.md ./", diff --git a/packages/chdman-linux-x64/index.ts b/packages/chdman-linux-x64/index.ts index 993336f..8cf1f42 100644 --- a/packages/chdman-linux-x64/index.ts +++ b/packages/chdman-linux-x64/index.ts @@ -1,25 +1,4 @@ -import fs from 'node:fs'; import path from 'node:path'; import url from 'node:url'; -/** - * Search for a {@link fileName} in {@link filePath} or any of its parent directories. - */ -function scanUpPathForFile(filePath: string, fileName: string): string | undefined { - const fullPath = path.join(filePath, fileName); - if (fs.existsSync(fullPath)) { - return fullPath; - } - - const parentPath = path.dirname(filePath); - if (parentPath !== filePath) { - return scanUpPathForFile(path.dirname(filePath), fileName); - } - - return undefined; -} - -export default scanUpPathForFile( - url.fileURLToPath(new URL('.', import.meta.url)), - 'chdman', -); +export default path.join(url.fileURLToPath(new URL('.', import.meta.url)), 'chdman'); diff --git a/packages/chdman-linux-x64/package.json b/packages/chdman-linux-x64/package.json index b215c49..3ed31b1 100644 --- a/packages/chdman-linux-x64/package.json +++ b/packages/chdman-linux-x64/package.json @@ -10,8 +10,7 @@ "type": "module", "files": [ "dist", - "!**/*.tsbuildinfo", - "chdman" + "!**/*.tsbuildinfo" ], "main": "dist/index.js", "publishConfig": { @@ -19,7 +18,7 @@ "provenance": true }, "scripts": { - "build": "tsc --build --verbose", + "build": "tsc --build --verbose && cp chdman* dist/", "lint": "eslint .", "lint:fix": "eslint . --fix", "prepack": "npm run build && cp -f ../../LICENSE ../../README.md ./", diff --git a/packages/chdman-win32-ia32/index.ts b/packages/chdman-win32-ia32/index.ts index f9b9623..d61c0ac 100644 --- a/packages/chdman-win32-ia32/index.ts +++ b/packages/chdman-win32-ia32/index.ts @@ -1,25 +1,4 @@ -import fs from 'node:fs'; import path from 'node:path'; import url from 'node:url'; -/** - * Search for a {@link fileName} in {@link filePath} or any of its parent directories. - */ -function scanUpPathForFile(filePath: string, fileName: string): string | undefined { - const fullPath = path.join(filePath, fileName); - if (fs.existsSync(fullPath)) { - return fullPath; - } - - const parentPath = path.dirname(filePath); - if (parentPath !== filePath) { - return scanUpPathForFile(path.dirname(filePath), fileName); - } - - return undefined; -} - -export default scanUpPathForFile( - url.fileURLToPath(new URL('.', import.meta.url)), - 'chdman.exe', -); +export default path.join(url.fileURLToPath(new URL('.', import.meta.url)), 'chdman.exe'); diff --git a/packages/chdman-win32-ia32/package.json b/packages/chdman-win32-ia32/package.json index 7b99a53..a892d46 100644 --- a/packages/chdman-win32-ia32/package.json +++ b/packages/chdman-win32-ia32/package.json @@ -10,8 +10,7 @@ "type": "module", "files": [ "dist", - "!**/*.tsbuildinfo", - "chdman.exe" + "!**/*.tsbuildinfo" ], "main": "dist/index.js", "publishConfig": { @@ -19,7 +18,7 @@ "provenance": true }, "scripts": { - "build": "tsc --build --verbose", + "build": "tsc --build --verbose && cp chdman* dist/", "lint": "eslint .", "lint:fix": "eslint . --fix", "prepack": "npm run build && cp -f ../../LICENSE ../../README.md ./", diff --git a/packages/chdman-win32-x64/index.ts b/packages/chdman-win32-x64/index.ts index f9b9623..d61c0ac 100644 --- a/packages/chdman-win32-x64/index.ts +++ b/packages/chdman-win32-x64/index.ts @@ -1,25 +1,4 @@ -import fs from 'node:fs'; import path from 'node:path'; import url from 'node:url'; -/** - * Search for a {@link fileName} in {@link filePath} or any of its parent directories. - */ -function scanUpPathForFile(filePath: string, fileName: string): string | undefined { - const fullPath = path.join(filePath, fileName); - if (fs.existsSync(fullPath)) { - return fullPath; - } - - const parentPath = path.dirname(filePath); - if (parentPath !== filePath) { - return scanUpPathForFile(path.dirname(filePath), fileName); - } - - return undefined; -} - -export default scanUpPathForFile( - url.fileURLToPath(new URL('.', import.meta.url)), - 'chdman.exe', -); +export default path.join(url.fileURLToPath(new URL('.', import.meta.url)), 'chdman.exe'); diff --git a/packages/chdman-win32-x64/package.json b/packages/chdman-win32-x64/package.json index d3abc20..364fc32 100644 --- a/packages/chdman-win32-x64/package.json +++ b/packages/chdman-win32-x64/package.json @@ -10,8 +10,7 @@ "type": "module", "files": [ "dist", - "!**/*.tsbuildinfo", - "chdman.exe" + "!**/*.tsbuildinfo" ], "main": "dist/index.js", "publishConfig": { @@ -19,7 +18,7 @@ "provenance": true }, "scripts": { - "build": "tsc --build --verbose", + "build": "tsc --build --verbose && cp chdman* dist/", "lint": "eslint .", "lint:fix": "eslint . --fix", "prepack": "npm run build && cp -f ../../LICENSE ../../README.md ./",