@ibiz-template/full-code-template 0.7.41-rc.1 → 0.7.41-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@ibiz-template/full-code-template",
3
- "version": "0.7.41-rc.1",
3
+ "version": "0.7.41-rc.3",
4
4
  "description": "vue3全代码模版包,根据包内容生成项目代码。",
5
- "publicPath": "https://gitee.com/api/v5/repos/iBizModeling/ibiz-fullcode-resources/raw/0.7.41-rc.1.zip?ref=main",
5
+ "publicPath": "https://gitee.com/api/v5/repos/iBizModeling/ibiz-fullcode-resources/raw/0.7.41-rc.3.zip?ref=main",
6
6
  "bin": {
7
7
  "code-generator": "src/index.js"
8
8
  },
package/src/index.js CHANGED
@@ -67,21 +67,24 @@ async function main() {
67
67
  const targetPublicPath = path.resolve(path.join(__dirname, '../static/public'));
68
68
  const templatePath = path.resolve(path.join(__dirname, '../template'));
69
69
 
70
- // 从项目的 package.json 中获取 publicPath 字段,下载并解压至 static/public 目录
71
- let sourcePublicPath;
72
- try {
73
- const data = fs.readFileSync(path.join(__dirname, '../package.json'), 'utf8');
74
- const projectPackageJson = JSON.parse(data);
75
- sourcePublicPath = projectPackageJson.publicPath;
76
- } catch (error) {
77
- console.error('获取项目package.json出错:', error);
78
- exit(1);
79
- }
80
- if (!sourcePublicPath) {
81
- console.error('package.json文件无publicPath属性定义');
82
- exit(1);
70
+ // 不存在才去下载public目录资源
71
+ if (!fs.existsSync(targetPublicPath)) {
72
+ // 从项目的 package.json 中获取 publicPath 字段,下载并解压至 static/public 目录
73
+ let sourcePublicPath;
74
+ try {
75
+ const data = fs.readFileSync(path.join(__dirname, '../package.json'), 'utf8');
76
+ const projectPackageJson = JSON.parse(data);
77
+ sourcePublicPath = projectPackageJson.publicPath;
78
+ } catch (error) {
79
+ console.error('获取项目package.json出错:', error);
80
+ exit(1);
81
+ }
82
+ if (!sourcePublicPath) {
83
+ console.error('package.json文件无publicPath属性定义');
84
+ exit(1);
85
+ }
86
+ await downloadAndExtractZip(`${sourcePublicPath}&access_token=${readonlyToken}`, targetPublicPath);
83
87
  }
84
- await downloadAndExtractZip(`${sourcePublicPath}&access_token=${readonlyToken}`, targetPublicPath);
85
88
 
86
89
  program
87
90
  .option('-m, --model <model-path>', '模型目录')
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ibiz-template/full-code-template",
3
3
  "private": true,
4
- "version": "0.7.41-rc.1",
4
+ "version": "0.7.41-rc.3",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -10,7 +10,7 @@
10
10
  "lint": "eslint 'src/**/*.tsx' 'src/**/*.ts' 'src/**/*.vue'",
11
11
  "lint:style": "stylelint 'src/**/*.scss'",
12
12
  "pub:temp": "publish -p .",
13
- "pub:code": "generate -m /home/zpc/workspace/project/quickstart/model -o ./ --app web -tv 0.7.41-rc.1 --local-mode",
13
+ "pub:code": "generate -m /home/zpc/workspace/project/quickstart/model -o ./ --app web -tv 0.7.41-rc.3 --local-mode",
14
14
  "compute:pkg": "ibiz-temp compute-pkg -m /home/zpc/workspace/project/quickstart/model --app web",
15
15
  "download:pkg": "ibiz-temp download-pkg",
16
16
  "prettier": "prettier --ignore-path '' 'src/publish/**/*.(ts|vue|tsx)' -w",
@@ -59,7 +59,7 @@
59
59
  "@commitlint/cli": "^17.8.0",
60
60
  "@commitlint/config-conventional": "^17.8.0",
61
61
  "@ibiz-template/cli": "^0.3.30",
62
- "@ibiz-template/full-code-generator": "^0.0.8",
62
+ "@ibiz-template/full-code-generator": "^0.0.10",
63
63
  "@ibizlab/cli": "^0.2.30",
64
64
  "@types/lodash-es": "^4.17.10",
65
65
  "@types/node": "^20.8.7",
@@ -128,8 +128,8 @@ devDependencies:
128
128
  specifier: ^0.3.30
129
129
  version: 0.3.30(@types/node@20.8.7)(postcss@8.4.31)(vue@3.3.8)
130
130
  '@ibiz-template/full-code-generator':
131
- specifier: ^0.0.8
132
- version: 0.0.8(@ibizlab/model@0.2.15)
131
+ specifier: ^0.0.10
132
+ version: 0.0.10(@ibizlab/model@0.2.15)
133
133
  '@ibizlab/cli':
134
134
  specifier: ^0.2.30
135
135
  version: 0.2.30(@ibizlab/model@0.2.15)
@@ -4075,8 +4075,8 @@ packages:
4075
4075
  vuedraggable: 4.1.0(vue@3.3.8)
4076
4076
  dev: false
4077
4077
 
4078
- /@ibiz-template/full-code-generator@0.0.8(@ibizlab/model@0.2.15):
4079
- resolution: {integrity: sha512-Z9GQc+695jxQldjyioP06QHns5aixp4Y0OhD93D1Ljuvn5cy0QzenueSGvQBOzKOuxpLNy8hhuEwCC6Im6zb5Q==}
4078
+ /@ibiz-template/full-code-generator@0.0.10(@ibizlab/model@0.2.15):
4079
+ resolution: {integrity: sha512-ei+V3TAG0EAzE7OjXreECA/OhhUEXpWXMvDtYWRnxzZG97Z7jugub/1wtTUX9O35fV5xM7sWhEKl7ufzFAR4ZA==}
4080
4080
  hasBin: true
4081
4081
  dependencies:
4082
4082
  '@ibizlab/cli': 0.2.30(@ibizlab/model@0.2.15)