vovk-cli 0.0.1-beta.45 → 0.0.1-beta.46
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/init/index.mjs
CHANGED
|
@@ -151,7 +151,7 @@ export class Init {
|
|
|
151
151
|
if (yes) {
|
|
152
152
|
return this.#init({ configPaths, pkgJson, cwd }, {
|
|
153
153
|
prefix: prefix ?? '.',
|
|
154
|
-
useNpm: useNpm ??
|
|
154
|
+
useNpm: useNpm ?? false,
|
|
155
155
|
useYarn: useYarn ?? false,
|
|
156
156
|
usePnpm: usePnpm ?? false,
|
|
157
157
|
useBun: useBun ?? false,
|
|
@@ -211,7 +211,7 @@ export class Init {
|
|
|
211
211
|
updateScripts ??= !pkgJson
|
|
212
212
|
? undefined
|
|
213
213
|
: await select({
|
|
214
|
-
message: 'Do you want to update "dev" and add "prebuild" NPM scripts at package.json?',
|
|
214
|
+
message: 'Do you want to update "dev" and add "prebuild" NPM scripts at package.json (recommended)?',
|
|
215
215
|
default: 'implicit',
|
|
216
216
|
choices: [
|
|
217
217
|
{
|
|
@@ -257,7 +257,7 @@ export class Init {
|
|
|
257
257
|
],
|
|
258
258
|
});
|
|
259
259
|
await this.#init({ configPaths, pkgJson, cwd }, {
|
|
260
|
-
useNpm: useNpm ??
|
|
260
|
+
useNpm: useNpm ?? false,
|
|
261
261
|
useYarn: useYarn ?? false,
|
|
262
262
|
usePnpm: usePnpm ?? false,
|
|
263
263
|
useBun: useBun ?? false,
|
package/dist/new/newSegment.mjs
CHANGED
|
@@ -38,5 +38,5 @@ ${segmentName ? ` segmentName: '${segmentName}',\n` : ''} emitSchema: true,
|
|
|
38
38
|
}
|
|
39
39
|
log.info(`${chalk.green('Created')} ${formatLoggedSegmentName(segmentName, { isStatic: isStaticSegment })} at ${absoluteSegmentRoutePath}.`);
|
|
40
40
|
const dir = chalk.cyanBright([segmentName, 'thing'].filter(Boolean).join('/'));
|
|
41
|
-
log.info(`Run ${chalkHighlightThing(`npx vovk new service controller ${dir}`)} to create a new controller with a service at ./${path.join(config.modulesDir, dir)}
|
|
41
|
+
log.info(`Run ${chalkHighlightThing(`npx vovk new service controller ${dir}`)} to create a new controller with a service at ./${path.join(config.modulesDir, dir)}/ directory for this segment`);
|
|
42
42
|
}
|
|
@@ -19,7 +19,7 @@ import <%= vars.ServiceName %> from './<%= vars.ServiceName %><%= t.nodeNextReso
|
|
|
19
19
|
@prefix('<%= t['the-things'] %>')
|
|
20
20
|
export default class <%= vars.ModuleName %> {
|
|
21
21
|
@operation({
|
|
22
|
-
summary: 'Get <%= t.
|
|
22
|
+
summary: 'Get <%= t.theThings %>',
|
|
23
23
|
})
|
|
24
24
|
@get()
|
|
25
25
|
static get<%= t.TheThings %> = withArk({
|
|
@@ -33,7 +33,7 @@ export default class <%= vars.ModuleName %> {
|
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
@operation({
|
|
36
|
-
summary: 'Get single <%= t.
|
|
36
|
+
summary: 'Get single <%= t.theThing %>',
|
|
37
37
|
})
|
|
38
38
|
@get('{id}')
|
|
39
39
|
static getSingle<%= t.TheThing %> = withArk({
|
|
@@ -48,7 +48,7 @@ export default class <%= vars.ModuleName %> {
|
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
@operation({
|
|
51
|
-
summary: 'Update <%= t.
|
|
51
|
+
summary: 'Update <%= t.theThing %>',
|
|
52
52
|
})
|
|
53
53
|
@put('{id}')
|
|
54
54
|
static update<%= t.TheThing %> = withArk({
|
|
@@ -64,6 +64,9 @@ export default class <%= vars.ModuleName %> {
|
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
|
|
67
|
+
@operation({
|
|
68
|
+
summary: 'Create <%= t.theThing %>',
|
|
69
|
+
})
|
|
67
70
|
@post()
|
|
68
71
|
static create<%= t.TheThing %> = withArk({
|
|
69
72
|
body: type({ todo: type('true') }),
|
|
@@ -77,6 +80,9 @@ export default class <%= vars.ModuleName %> {
|
|
|
77
80
|
}
|
|
78
81
|
});
|
|
79
82
|
|
|
83
|
+
@operation({
|
|
84
|
+
summary: 'Delete <%= t.theThing %>',
|
|
85
|
+
})
|
|
80
86
|
@del('{id}')
|
|
81
87
|
static delete<%= t.TheThing %> = withArk({
|
|
82
88
|
params: type({ id: type('string') }),
|
|
@@ -17,7 +17,7 @@ import <%= vars.ServiceName %> from './<%= vars.ServiceName %><%= t.nodeNextReso
|
|
|
17
17
|
@prefix('<%= t['the-things'] %>')
|
|
18
18
|
export default class <%= vars.ControllerName %> {
|
|
19
19
|
@operation({
|
|
20
|
-
summary: 'Get <%= t.
|
|
20
|
+
summary: 'Get <%= t.theThings %>',
|
|
21
21
|
})
|
|
22
22
|
@get()
|
|
23
23
|
static get<%= t.TheThings %> = () => {
|
|
@@ -29,7 +29,7 @@ export default class <%= vars.ControllerName %> {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
@operation({
|
|
32
|
-
summary: 'Get single <%= t.
|
|
32
|
+
summary: 'Get single <%= t.theThing %>',
|
|
33
33
|
})
|
|
34
34
|
@get('{id}')
|
|
35
35
|
static getSingle<%= t.TheThing %> = (_req: VovkRequest, { id }: { id: string }) => {
|
|
@@ -41,7 +41,7 @@ export default class <%= vars.ControllerName %> {
|
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
@operation({
|
|
44
|
-
summary: 'Update <%= t.
|
|
44
|
+
summary: 'Update <%= t.theThing %>',
|
|
45
45
|
})
|
|
46
46
|
@put('{id}')
|
|
47
47
|
static update<%= t.TheThing %> = async (req: VovkRequest<{ todo: true }>, params: { id: string }) => {
|
|
@@ -54,6 +54,9 @@ export default class <%= vars.ControllerName %> {
|
|
|
54
54
|
<% } %>
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
+
@operation({
|
|
58
|
+
summary: 'Create <%= t.theThing %>',
|
|
59
|
+
})
|
|
57
60
|
@post()
|
|
58
61
|
static create<%= t.TheThing %> = async (req: VovkRequest<{ todo: true }>) => {
|
|
59
62
|
const body = await req.json();
|
|
@@ -64,8 +67,11 @@ export default class <%= vars.ControllerName %> {
|
|
|
64
67
|
<% } %>
|
|
65
68
|
};
|
|
66
69
|
|
|
70
|
+
@operation({
|
|
71
|
+
summary: 'Delete <%= t.theThing %>',
|
|
72
|
+
})
|
|
67
73
|
@del('{id}')
|
|
68
|
-
static delete<%= t.TheThing %> = (_req: VovkRequest
|
|
74
|
+
static delete<%= t.TheThing %> = (_req: VovkRequest, params: { id: string }) => {
|
|
69
75
|
const { id } = params;
|
|
70
76
|
<% if(t.withService) { %>
|
|
71
77
|
return <%= vars.ServiceName %>.delete<%= t.TheThing %>(id);
|
|
@@ -19,7 +19,7 @@ import <%= vars.ServiceName %> from './<%= vars.ServiceName %><%= t.nodeNextReso
|
|
|
19
19
|
@prefix('<%= t['the-things'] %>')
|
|
20
20
|
export default class <%= vars.ModuleName %> {
|
|
21
21
|
@operation({
|
|
22
|
-
summary: 'Get <%= t.
|
|
22
|
+
summary: 'Get <%= t.theThings %>',
|
|
23
23
|
})
|
|
24
24
|
@get()
|
|
25
25
|
static get<%= t.TheThings %> = withValibot({
|
|
@@ -33,7 +33,7 @@ export default class <%= vars.ModuleName %> {
|
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
@operation({
|
|
36
|
-
summary: 'Get single <%= t.
|
|
36
|
+
summary: 'Get single <%= t.theThing %>',
|
|
37
37
|
})
|
|
38
38
|
@get('{id}')
|
|
39
39
|
static getSingle<%= t.TheThing %> = withValibot({
|
|
@@ -48,7 +48,7 @@ export default class <%= vars.ModuleName %> {
|
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
@operation({
|
|
51
|
-
summary: 'Update <%= t.
|
|
51
|
+
summary: 'Update <%= t.theThing %>',
|
|
52
52
|
})
|
|
53
53
|
@put('{id}')
|
|
54
54
|
static update<%= t.TheThing %> = withValibot({
|
|
@@ -64,6 +64,9 @@ export default class <%= vars.ModuleName %> {
|
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
|
|
67
|
+
@operation({
|
|
68
|
+
summary: 'Create <%= t.theThing %>',
|
|
69
|
+
})
|
|
67
70
|
@post()
|
|
68
71
|
static create<%= t.TheThing %> = withValibot({
|
|
69
72
|
body: v.object({ todo: v.literal(true) }),
|
|
@@ -77,6 +80,9 @@ export default class <%= vars.ModuleName %> {
|
|
|
77
80
|
}
|
|
78
81
|
});
|
|
79
82
|
|
|
83
|
+
@operation({
|
|
84
|
+
summary: 'Delete <%= t.theThing %>',
|
|
85
|
+
})
|
|
80
86
|
@del('{id}')
|
|
81
87
|
static delete<%= t.TheThing %> = withValibot({
|
|
82
88
|
params: v.object({ id: v.string() }),
|