vona-cli-set-api 1.0.225 → 1.0.228

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.
@@ -45,7 +45,7 @@
45
45
  }
46
46
  },
47
47
  "dependencies": {
48
- "vona": "^5.0.133"
48
+ "vona": "^5.0.135"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@cabloy/lint": "^5.0.16",
@@ -2,6 +2,7 @@ import fs from 'node:fs';
2
2
  import path from 'node:path';
3
3
  import { BeanCliBase } from '@cabloy/cli';
4
4
  import { getOnionMetasMeta, getOnionScenesMeta } from '@cabloy/module-info';
5
+ import { toUpperCaseFirstChar } from '@cabloy/word-utils';
5
6
  import { __ThisSetName__ } from "../this.js";
6
7
  export class CliCreateBean extends BeanCliBase {
7
8
  async execute() {
@@ -52,13 +53,14 @@ export class CliCreateBean extends BeanCliBase {
52
53
  // tools.metadata
53
54
  await this.helper.invokeCli([':tools:metadata', moduleName], { cwd: argv.projectPath });
54
55
  }
55
- _getBoilerplatesOrSnippets(type, customPath) {
56
+ _getBoilerplatesOrSnippets(type, custom) {
57
+ const type2 = custom ? `${type}${toUpperCaseFirstChar(custom)}` : type;
56
58
  const result = {};
57
59
  // scenes
58
60
  const onionScenesMeta = getOnionScenesMeta(this.modulesMeta.modules);
59
61
  for (const sceneName in onionScenesMeta) {
60
62
  const onionSceneMeta = onionScenesMeta[sceneName];
61
- const scenePath = customPath || onionSceneMeta[type];
63
+ const scenePath = onionSceneMeta[type2];
62
64
  if (scenePath) {
63
65
  result[sceneName] = path.join(onionSceneMeta.module.root, scenePath);
64
66
  }
@@ -67,7 +69,7 @@ export class CliCreateBean extends BeanCliBase {
67
69
  const onionMetasMeta = getOnionMetasMeta(this.modulesMeta.modules);
68
70
  for (const sceneName in onionMetasMeta) {
69
71
  const onionMetaMeta = onionMetasMeta[sceneName];
70
- const scenePath = customPath || onionMetaMeta[type];
72
+ const scenePath = onionMetaMeta[type2];
71
73
  if (scenePath) {
72
74
  result[`meta:${sceneName}`] = path.join(onionMetaMeta.module.root, scenePath);
73
75
  }
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.225",
4
+ "version": "1.0.228",
5
5
  "description": "vona cli-set-api",
6
6
  "publishConfig": {
7
7
  "access": "public"