fix: use pnpm as pm

This commit is contained in:
MARCROCK22 2024-04-13 22:20:41 -04:00
parent 9330e203c7
commit 0392de7964
3 changed files with 1433 additions and 4 deletions

1
.gitignore vendored
View File

@ -1,4 +1,3 @@
pnpm-lock.yaml
node_modules
lib/
dist/

1429
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -265,15 +265,16 @@ class BaseCommand {
async reload() {
delete require.cache[this.__filePath!];
const __tempCommand = await magicImport(this.__filePath!).then(x => x.default ?? x);
Object.setPrototypeOf(this, __tempCommand.prototype);
for (const i of this.options ?? []) {
if (i instanceof SubCommand && i.__filePath) {
await i.reload();
}
}
const __tempCommand = await magicImport(this.__filePath!).then(x => x.default ?? x);
Object.setPrototypeOf(this, __tempCommand.prototype);
}
run?(context: CommandContext<any>): any;