zova-cli-set-front 1.1.179 → 1.1.181

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.
@@ -7,6 +7,7 @@ module.exports = {
7
7
  ast = ast
8
8
  .replace('<script setup lang="ts">', '<script setup lang="ts" generic="T">')
9
9
  .replace('defineProps<Props>', 'defineProps<Props<T>>')
10
+ .replace('PartialSome<Props', 'PartialSome<Props<T>')
10
11
  .replace('defineEmits<Emits>', 'defineEmits<Emits<T>>');
11
12
  // ok
12
13
  return ast;
@@ -10,13 +10,17 @@ module.exports = {
10
10
  const matchController = ast.match(/import \{ (Controller[^, ]*)/);
11
11
  const className = matchController[1];
12
12
  ast = ast
13
+ .replace(', useController', ', PartialSome, useController')
14
+ .replace('{ useController', '{ PartialSome, useController')
13
15
  .replace(', PropsBase', '')
14
16
  .replace(/import \{ ([^\}]*) \} from '.\/controller.js';/, (_, $1) => {
15
17
  return `import { ${$1}, Props } from './controller.js';`;
16
18
  })
17
19
  .replace(
18
20
  /const props = [^;]*;/,
19
- `const props = withDefaults(defineProps<Props${genericT}>(), ${className}.$propsDefault);`,
21
+ `const props = withDefaults(
22
+ defineProps<PartialSome<Props${genericT}, keyof typeof ${className}.$propsDefault>>(),
23
+ ${className}.$propsDefault);`,
20
24
  );
21
25
  // ok
22
26
  return ast;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-cli-set-front",
3
- "version": "1.1.179",
3
+ "version": "1.1.181",
4
4
  "description": "zova cli-set-front",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -48,5 +48,5 @@
48
48
  "zova-shared": "^1.0.4",
49
49
  "zova-vite": "^1.0.176"
50
50
  },
51
- "gitHead": "6c290bcdc8483d922d46677644b4cf3b105aac2e"
51
+ "gitHead": "217980580472e623b09c2a69059a1827c17d09ab"
52
52
  }