vovk-cli 0.0.1-draft.336 → 0.0.1-draft.337

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.
@@ -98,20 +98,14 @@ export async function generate({ isEnsuringClient = false, isBundle = false, pro
98
98
  Object.entries(config.generatorConfig.segments ?? {}).forEach(([segmentName, segmentConfig]) => {
99
99
  fullSchema.segments = {
100
100
  ...fullSchema.segments,
101
- [segmentName]: {
102
- ...fullSchema.segments[segmentName],
103
- ...openAPIToVovkSchema({ ...segmentConfig.openAPIMixin, segmentName }).segments[segmentName],
104
- },
101
+ [segmentName]: openAPIToVovkSchema({ ...segmentConfig.openAPIMixin, segmentName }).segments[segmentName],
105
102
  };
106
103
  });
107
104
  const cliMixins = cliOptionsToOpenAPIMixins(cliGenerateOptions ?? {});
108
105
  await Promise.all(Object.entries(cliMixins).map(async ([mixinName, mixinModule]) => {
109
106
  fullSchema.segments = {
110
107
  ...fullSchema.segments,
111
- [mixinName]: {
112
- ...fullSchema.segments[mixinName],
113
- ...openAPIToVovkSchema(await normalizeOpenAPIMixin({ mixinModule, log })).segments[mixinName],
114
- },
108
+ [mixinName]: openAPIToVovkSchema(await normalizeOpenAPIMixin({ mixinModule, log })).segments[mixinName],
115
109
  };
116
110
  }));
117
111
  const isNodeNextResolution = ['node16', 'nodenext'].includes((await getTsconfig(cwd)?.config?.compilerOptions?.moduleResolution?.toLowerCase()) ?? '');
@@ -9,7 +9,7 @@ sourceName: <%= vars.ModuleName %>
9
9
  compiledName: <%= t.TheThing + 'RPC' %>
10
10
  ---
11
11
 
12
- import { prefix, get, put, post, del, openapi } from 'vovk';
12
+ import { prefix, get, put, post, del, operation } from 'vovk';
13
13
  import { type } from 'arktype';
14
14
  import withArk from '@/lib/withArk<%= t.nodeNextResolutionExt.ts %>';
15
15
  <% if(t.withService) { %>
@@ -18,7 +18,7 @@ import <%= vars.ServiceName %> from './<%= vars.ServiceName %><%= t.nodeNextReso
18
18
 
19
19
  @prefix('<%= t['the-things'] %>')
20
20
  export default class <%= vars.ModuleName %> {
21
- @openapi({
21
+ @operation({
22
22
  summary: 'Get <%= t.TheThings %>',
23
23
  })
24
24
  @get()
@@ -34,7 +34,7 @@ export default class <%= vars.ModuleName %> {
34
34
  }
35
35
  });
36
36
 
37
- @openapi({
37
+ @operation({
38
38
  summary: 'Update <%= t.TheThing %>',
39
39
  })
40
40
  @put('{id}')
@@ -16,7 +16,7 @@ import <%= vars.ServiceName %> from './<%= vars.ServiceName %><%= t.nodeNextReso
16
16
 
17
17
  @prefix('<%= t['the-things'] %>')
18
18
  export default class <%= vars.rpcModuleName %> {
19
- @openapi({
19
+ @operation({
20
20
  summary: 'Get <%= t.TheThings %>',
21
21
  })
22
22
  @get()
@@ -29,7 +29,7 @@ export default class <%= vars.rpcModuleName %> {
29
29
  <% } %>
30
30
  }
31
31
 
32
- @openapi({
32
+ @operation({
33
33
  summary: 'Update <%= t.TheThing %>',
34
34
  })
35
35
  @put('{id}')
@@ -9,7 +9,7 @@ sourceName: <%= vars.ModuleName %>
9
9
  compiledName: <%= t.TheThing + 'RPC' %>
10
10
  ---
11
11
 
12
- import { prefix, get, put, post, del, openapi } from 'vovk';
12
+ import { prefix, get, put, post, del, operation } from 'vovk';
13
13
  import * as v from 'valibot';
14
14
  import withValibot from '@/lib/withValibot<%= t.nodeNextResolutionExt.ts %>';
15
15
  <% if(t.withService) { %>
@@ -18,7 +18,7 @@ import <%= vars.ServiceName %> from './<%= vars.ServiceName %><%= t.nodeNextReso
18
18
 
19
19
  @prefix('<%= t['the-things'] %>')
20
20
  export default class <%= vars.ModuleName %> {
21
- @openapi({
21
+ @operation({
22
22
  summary: 'Get <%= t.TheThings %>',
23
23
  })
24
24
  @get()
@@ -34,7 +34,7 @@ export default class <%= vars.ModuleName %> {
34
34
  }
35
35
  });
36
36
 
37
- @openapi({
37
+ @operation({
38
38
  summary: 'Update <%= t.TheThing %>',
39
39
  })
40
40
  @put('{id}')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk-cli",
3
- "version": "0.0.1-draft.336",
3
+ "version": "0.0.1-draft.337",
4
4
  "bin": {
5
5
  "vovk": "./dist/index.mjs"
6
6
  },
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "homepage": "https://vovk.dev",
37
37
  "peerDependencies": {
38
- "vovk": "^3.0.0-draft.398"
38
+ "vovk": "^3.0.0-draft.399"
39
39
  },
40
40
  "optionalDependencies": {
41
41
  "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.31"