zova-cli-set-front 1.2.5 → 1.2.6

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/dist/index.js CHANGED
@@ -2771,11 +2771,20 @@ class CliToolsDeps extends BeanCliBase {
2771
2771
  await this._generate(projectPath);
2772
2772
  }
2773
2773
  async _generate(projectPath) {
2774
+ await this._generate_preparePackage(projectPath);
2774
2775
  // generate package.json
2775
2776
  await this.common._generatePackageJson(projectPath);
2776
2777
  // generate type modules file
2777
2778
  await this.common._generateTypeModulesFile(projectPath);
2778
2779
  }
2780
+ async _generate_preparePackage(projectPath) {
2781
+ // copy package.json
2782
+ const filePackage = path.join(projectPath, 'package.json');
2783
+ if (!fse.existsSync(filePackage)) {
2784
+ fse.copyFileSync(path.join(projectPath, 'package.original.json'), filePackage);
2785
+ await this.helper.pnpmInstall();
2786
+ }
2787
+ }
2779
2788
  }
2780
2789
 
2781
2790
  async function generateBeanGenerals(globFiles, sceneName, sceneMeta, moduleName, _modulePath) {
@@ -7,4 +7,5 @@ declare module '@cabloy/cli' {
7
7
  export declare class CliToolsDeps extends BeanCliBase {
8
8
  execute(): Promise<void>;
9
9
  _generate(projectPath: string): Promise<void>;
10
+ _generate_preparePackage(projectPath: string): Promise<void>;
10
11
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zova-cli-set-front",
3
- "version": "1.2.5",
4
- "gitHead": "2bc6f21fbc6b899a6794bff994bbca0e6878ea6e",
3
+ "version": "1.2.6",
4
+ "gitHead": "721589dd88856435a13f8b5cedd2af7fb1c5a8f9",
5
5
  "description": "zova cli-set-front",
6
6
  "keywords": [
7
7
  "framework",