vona-cli-set-api 1.0.421 → 1.0.424

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.
@@ -46,7 +46,7 @@
46
46
  }
47
47
  },
48
48
  "dependencies": {
49
- "vona": "^5.0.238"
49
+ "vona": "^5.0.239"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@cabloy/lint": "^5.0.16",
package/dist/index.js CHANGED
@@ -1068,13 +1068,12 @@ class CliCreateBean extends BeanCliBase {
1068
1068
  const boilerplates = this._getBoilerplatesOrSnippets('boilerplate', argv.boilerplate);
1069
1069
  const snippetsName = snippets[`${sceneName}:${argv.beanName}`] || snippets[sceneName];
1070
1070
  const boilerplateName = boilerplates[`${sceneName}:${argv.beanName}`] || boilerplates[sceneName];
1071
- const boilerplatePath = `cli/${boilerplateName}`;
1072
1071
  // render
1073
1072
  await this.template.renderBoilerplateAndSnippets({
1074
1073
  targetDir: beanDir,
1075
1074
  setName: __ThisSetName__,
1076
1075
  snippetsPath: snippetsName,
1077
- boilerplatePath
1076
+ boilerplatePath: boilerplateName
1078
1077
  });
1079
1078
  // tools.metadata
1080
1079
  if (!argv.nometadata) {
@@ -1092,7 +1091,7 @@ class CliCreateBean extends BeanCliBase {
1092
1091
  const onionSceneMeta = onionScenesMeta[sceneName];
1093
1092
  const scenePath = onionSceneMeta[type2];
1094
1093
  if (scenePath) {
1095
- result[sceneName] = path.join(onionSceneMeta.module.root, scenePath);
1094
+ result[sceneName] = this._combineBoilerplatesOrSnippetsPath(type, onionSceneMeta.module.root, scenePath);
1096
1095
  }
1097
1096
  }
1098
1097
  // metas
@@ -1101,11 +1100,21 @@ class CliCreateBean extends BeanCliBase {
1101
1100
  const onionMetaMeta = onionMetasMeta[sceneName];
1102
1101
  const scenePath = onionMetaMeta[type2];
1103
1102
  if (scenePath) {
1104
- result[`meta:${sceneName}`] = path.join(onionMetaMeta.module.root, scenePath);
1103
+ result[`meta:${sceneName}`] = this._combineBoilerplatesOrSnippetsPath(type, onionMetaMeta.module.root, scenePath);
1105
1104
  }
1106
1105
  }
1107
1106
  return result;
1108
1107
  }
1108
+ _combineBoilerplatesOrSnippetsPath(type, moduleRoot, scenePath) {
1109
+ if (type === 'boilerplate') {
1110
+ return path.join(moduleRoot, 'cli', scenePath);
1111
+ }
1112
+ let snippetsPath = path.join(moduleRoot, 'dist-cli', scenePath);
1113
+ if (!fse.existsSync(snippetsPath)) {
1114
+ snippetsPath = path.join(moduleRoot, 'cli', scenePath);
1115
+ }
1116
+ return snippetsPath;
1117
+ }
1109
1118
  }
1110
1119
 
1111
1120
  class CliCreateModule extends BeanCliBase {
@@ -15,4 +15,5 @@ declare module '@cabloy/cli' {
15
15
  export declare class CliCreateBean extends BeanCliBase {
16
16
  execute(): Promise<void>;
17
17
  private _getBoilerplatesOrSnippets;
18
+ private _combineBoilerplatesOrSnippetsPath;
18
19
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vona-cli-set-api",
3
3
  "type": "module",
4
- "version": "1.0.421",
4
+ "version": "1.0.424",
5
5
  "description": "vona cli-set-api",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -33,7 +33,7 @@
33
33
  "@babel/plugin-proposal-decorators": "^7.25.9",
34
34
  "@babel/plugin-transform-class-properties": "^7.25.9",
35
35
  "@babel/plugin-transform-typescript": "^7.26.8",
36
- "@cabloy/cli": "^3.0.73",
36
+ "@cabloy/cli": "^3.0.74",
37
37
  "@cabloy/dotenv": "^1.1.12",
38
38
  "@cabloy/extend": "^3.1.11",
39
39
  "@cabloy/module-glob": "^5.2.35",
@@ -64,7 +64,7 @@
64
64
  "ts-node-maintained": "^10.9.6",
65
65
  "urllib": "^4.6.11",
66
66
  "uuid": "^11.1.0",
67
- "vona-core": "^5.0.105",
67
+ "vona-core": "^5.0.106",
68
68
  "why-is-node-running": "^3.2.2",
69
69
  "yargs-parser": "^22.0.0"
70
70
  },