fix: plugin add is ok now

Reviewed-on: daoyoucloud/tachycode#751
This commit is contained in:
sealday 2024-04-17 17:01:42 +08:00
parent 4935dff231
commit 2dd8e25616
4 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,9 @@
"description": "",
"license": "Apache-2.0",
"type": "module",
"exports": {
".": "./dist/index"
},
"bin": {
"tachybase": "./bin/cli.js"
},

View File

@ -12,6 +12,7 @@ const pkg = require('./package.json');
const entries = {
cli: 'src/cli.ts',
index: 'src/index.ts',
};
const external = [

View File

@ -0,0 +1 @@
export * from './plugin-generator';

View File

@ -1,5 +1,6 @@
import { CleanOptions, Collection, SyncOptions } from '@nocobase/database';
import { importModule, isURL } from '@nocobase/utils';
import { PluginGenerator } from '@tachybase/cli';
import { fsExists } from '@nocobase/utils/plugin-symlink';
import execa from 'execa';
import fg from 'fast-glob';
@ -239,7 +240,6 @@ export class PluginManager {
if (options?.forceRecreate) {
await fs.promises.rm(pluginDir, { recursive: true, force: true });
}
const { PluginGenerator } = require('@nocobase/cli/src/plugin-generator');
const generator = new PluginGenerator({
cwd: process.cwd(),
args: {},