Skip to content

Commit 75d8dc1

Browse files
committed
chore: remove lowcode-design and next-sdk
1 parent 062fa4d commit 75d8dc1

34 files changed

Lines changed: 5125 additions & 36341 deletions

package.json

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,6 @@
3131
],
3232
"repository": "https://github.com/opentiny/tiny-pro",
3333
"homepage": "https://opentiny.design/pro/",
34-
"pnpm": {
35-
"overrides": {
36-
"@modelcontextprotocol/sdk": "1.16.0",
37-
"@opentiny/tiny-engine-common>@opentiny/vue-renderless": "~3.20.0",
38-
"@opentiny/tiny-engine-plugin-datasource>@opentiny/vue-renderless": "~3.20.0",
39-
"@opentiny/tiny-engine-plugin-block>@opentiny/vue-renderless": "~3.20.0",
40-
"@opentiny/tiny-engine-plugin-canvas>@opentiny/vue-renderless": "~3.20.0",
41-
"@opentiny/tiny-engine-plugin-tree>@opentiny/vue-renderless": "~3.20.0",
42-
"@opentiny/tiny-engine-setting-styles>@opentiny/vue-renderless": "~3.20.0",
43-
"@opentiny/tiny-engine-plugin-materials>@opentiny/vue-renderless": "~3.20.0",
44-
"@opentiny/tiny-engine-plugin-page>@opentiny/vue-renderless": "~3.20.0"
45-
}
46-
},
4734
"scripts": {
4835
"dev": "pnpm -F tiny-pro-vue start",
4936
"dev:backend": "pnpm -F tinyui-nestjs-server start",

pnpm-lock.yaml

Lines changed: 5121 additions & 8938 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/init.ts

Lines changed: 2 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
BuildTool,
1414
devCommand,
1515
devDependencies,
16-
LowcodeEngine,
1716
ProjectInfo,
1817
removedCommand,
1918
removeDependencies,
@@ -70,18 +69,6 @@ const getProjectInfo = (): Promise<ProjectInfo> => {
7069
prefix: '*',
7170
when: (answers) => answers.framework === VUE_TEMPLATE_PATH,
7271
},
73-
{
74-
type: 'list',
75-
name: 'lowcodeEngine',
76-
message: '是否集成低代码设计器:',
77-
choices: [
78-
{ name: '是,集成低代码设计器', value: LowcodeEngine.Include },
79-
{ name: '否,暂不集成', value: LowcodeEngine.Skip },
80-
],
81-
default: LowcodeEngine.Skip,
82-
prefix: '*',
83-
when: (answers) => answers.framework === VUE_TEMPLATE_PATH,
84-
},
8572
{
8673
type: 'list',
8774
name: 'buildTool',
@@ -180,24 +167,6 @@ const getProjectInfo = (): Promise<ProjectInfo> => {
180167
return inquirer.prompt(question);
181168
};
182169

183-
/**
184-
* 同步创建低代码设计器项目文件目录、文件
185-
* @answers 询问客户端问题的选择值
186-
*/
187-
const createLowcodeDesignerSync = (answers: ProjectInfo) => {
188-
const { name, lowcodeEngine } = answers;
189-
if (lowcodeEngine !== LowcodeEngine.Include) {
190-
return;
191-
}
192-
193-
// 复制低代码设计器相关目录
194-
const lowcodeFrom = utils.getTemplatePath(lowcodeEngine);
195-
const lowcodeTo = utils.getDistPath(`${name}/${lowcodeEngine}`);
196-
197-
copySync(lowcodeFrom, lowcodeTo);
198-
log.success('低代码设计器模板复制成功');
199-
};
200-
201170
/**
202171
* 同步创建服务端项目文件目录、文件
203172
* @answers 询问客户端问题的选择值
@@ -439,7 +408,7 @@ const packageJsonProcess = (
439408
* @dbAnswers 询问服务端配置的选择值
440409
*/
441410
const createProjectSync = (answers: ProjectInfo) => {
442-
const { description, name, serverConfirm, buildTool, serverFramework, lowcodeEngine } = answers;
411+
const { description, name, serverConfirm, buildTool, serverFramework } = answers;
443412
const templatePath = VueVersion.Vue3;
444413
// 模板来源目录
445414
const from = utils.getTemplatePath(templatePath);
@@ -480,15 +449,7 @@ const createProjectSync = (answers: ProjectInfo) => {
480449
.join('\n');
481450
}
482451

483-
// 根据用户选择设置低代码设计器环境变量
484-
const lowcodeEnabled = lowcodeEngine === LowcodeEngine.Include;
485-
updatedEnvContent = updatedEnvContent.replace(
486-
/VITE_LOWCODE_DESIGNER_ENABLED=false/,
487-
`VITE_LOWCODE_DESIGNER_ENABLED=${lowcodeEnabled}`
488-
);
489-
490452
fs.writeFileSync(envPath, updatedEnvContent);
491-
log.success(`低代码设计器环境变量已设置为: ${lowcodeEnabled}`);
492453
} catch (e) {
493454
log.error(e);
494455
log.error('配置环境变量失败');
@@ -499,15 +460,12 @@ const createProjectSync = (answers: ProjectInfo) => {
499460
// 如果对接服务端,执行文件复制及相关配置( WIP: 后台接口暂未全量完成,部分接口还是使用mock )
500461
createServerSync(answers);
501462
}
502-
503-
// 如果选择了低代码设计器,复制低代码设计器模板
504-
createLowcodeDesignerSync(answers);
505463
};
506464

507465
// 安装依赖
508466
export const installDependencies = (answers: ProjectInfo) => {
509467
const prefix = cliConfig.getBinName();
510-
const { name, serverFramework, serverConfirm, lowcodeEngine } = answers;
468+
const { name, serverFramework, serverConfirm } = answers;
511469
// egg服务端 安装依赖并启动
512470
if (serverConfirm && serverFramework === ServerFrameworks.EggJs) {
513471
log.info('正在安装服务端 npm 依赖,安装过程需要几十秒,请耐心等待...');
@@ -533,22 +491,6 @@ export const installDependencies = (answers: ProjectInfo) => {
533491
throw new Error(installClientResult.error);
534492
}
535493

536-
// 低代码设计器依赖安装
537-
if (lowcodeEngine && lowcodeEngine === LowcodeEngine.Include) {
538-
log.info(
539-
'正在安装低代码设计器 npm 依赖,安装过程需要几十秒,请耐心等待...'
540-
);
541-
const installLowcodeResult = spawn.sync('npm', ['install'], {
542-
cwd: `${name}/${lowcodeEngine}/`,
543-
stdio: 'inherit',
544-
});
545-
if (installLowcodeResult.status === 0) {
546-
log.success('低代码设计器 npm 依赖安装成功');
547-
} else {
548-
throw new Error(installLowcodeResult.error);
549-
}
550-
}
551-
552494
/* prettier-ignore-start */
553495
console.log(
554496
chalk.yellow(
@@ -583,17 +525,6 @@ export const installDependencies = (answers: ProjectInfo) => {
583525
);
584526
}
585527

586-
// 低代码设计器启动提示
587-
if (lowcodeEngine && lowcodeEngine === LowcodeEngine.Include) {
588-
console.log(
589-
chalk.green(
590-
`${chalk.yellow(
591-
`$ cd ${name}/${lowcodeEngine} && npm run dev`
592-
)} # 开启低代码设计器开发环境`
593-
)
594-
);
595-
}
596-
597528
console.log(
598529
chalk.green(
599530
`${chalk.yellow(`$ ${prefix} help`)} # 可查看当前套件的详细帮助`

src/lib/interfaces.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@ export enum ServerFrameworks {
2121
SpringBoot = 'springboot'
2222
}
2323

24-
/**
25-
* 低代码引擎选项
26-
*/
27-
export enum LowcodeEngine {
28-
Include = 'lowcode-designer',
29-
Skip = '',
30-
}
31-
3224
export enum BuildTool {
3325
Vite = 'vite',
3426
Webpack = 'webpack',
-8 KB
Binary file not shown.

template/lowcode-designer/engine.config.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

template/lowcode-designer/env/.env.alpha

Lines changed: 0 additions & 12 deletions
This file was deleted.

template/lowcode-designer/env/.env.development

Lines changed: 0 additions & 8 deletions
This file was deleted.

template/lowcode-designer/env/.env.localCDN.example

Lines changed: 0 additions & 10 deletions
This file was deleted.

template/lowcode-designer/env/.env.production

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)