fix(publishmodule): Fix incorrect CLI script path during publish module creation

This commit is contained in:
2025-01-02 04:06:51 +01:00
parent 66145c904e
commit eb21dcc4a4
3 changed files with 10 additions and 2 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@git.zone/tspublish',
version: '1.9.0',
version: '1.9.1',
description: 'A tool to publish multiple, concise, and small packages from monorepos, specifically for TypeScript projects within a git environment.'
}

View File

@ -223,7 +223,9 @@ export class PublishModule {
'cli',
'assets/templates/cli/cli.js'
);
await plugins.smartfile.memory.toFs(atob(files[0].base64Content), plugins.path.join(this.options.publishModDirFullPath, 'cli.js'));
const indexPath = `./dist_${this.options.packageSubFolder}/index.js`;
const fileContent = atob(files[0].base64Content).replace('./dist_ts/index.js', indexPath);
await plugins.smartfile.memory.toFs(fileContent, plugins.path.join(this.options.publishModDirFullPath, 'cli.js'));
}
public async publish() {