From 903e1c194856f3d5716d78dfaa5109d5e3d2508c Mon Sep 17 00:00:00 2001 From: Ajax Davis Date: Sat, 6 Dec 2025 01:48:42 +1000 Subject: [PATCH] Revert "fix(create-basic-tools): correct template path resolution for npx execution" This reverts commit 96c53ed49a793e413b71ea3a22a136fb1d599918. --- packages/tools/create-basic-tools/CHANGELOG.md | 8 -------- packages/tools/create-basic-tools/package.json | 2 +- .../tools/create-basic-tools/src/utils/file-writer.ts | 4 +--- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/packages/tools/create-basic-tools/CHANGELOG.md b/packages/tools/create-basic-tools/CHANGELOG.md index b45f099..e1b8d61 100644 --- a/packages/tools/create-basic-tools/CHANGELOG.md +++ b/packages/tools/create-basic-tools/CHANGELOG.md @@ -1,13 +1,5 @@ # @tpmjs/create-basic-tools -## 1.0.6 - -### Patch Changes - -- fix: correct template path resolution for npx execution - - Fixed template path resolution from `../../templates` to `../templates` to work correctly when the package is run via npx. After tsup compilation, the bundle is in `dist/` and only needs to go up one level to reach the package root where templates are located. - ## 1.0.0 ### Major Changes diff --git a/packages/tools/create-basic-tools/package.json b/packages/tools/create-basic-tools/package.json index 579c4e4..57e2f91 100644 --- a/packages/tools/create-basic-tools/package.json +++ b/packages/tools/create-basic-tools/package.json @@ -1,6 +1,6 @@ { "name": "@tpmjs/create-basic-tools", - "version": "1.0.6", + "version": "1.0.5", "description": "CLI generator for scaffolding production-ready TPMJS tool packages", "type": "module", "bin": { diff --git a/packages/tools/create-basic-tools/src/utils/file-writer.ts b/packages/tools/create-basic-tools/src/utils/file-writer.ts index 57aec05..f85a8da 100644 --- a/packages/tools/create-basic-tools/src/utils/file-writer.ts +++ b/packages/tools/create-basic-tools/src/utils/file-writer.ts @@ -27,9 +27,7 @@ export async function copyTemplate( destPath: string, replacements?: Record ): Promise { - // After tsup compilation, __dirname points to dist/ - // Templates are at package root, so we only need to go up one level - const templatePath = path.join(__dirname, '../templates', templateName); + const templatePath = path.join(__dirname, '../../templates', templateName); let content = await fs.readFile(templatePath, 'utf-8'); // Apply replacements if provided