create-velox-app 0.7.7 → 0.7.9
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# create-velox-app
|
|
2
2
|
|
|
3
|
+
## 0.7.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- feat(router): swagger auto-discovery of module collections
|
|
8
|
+
|
|
9
|
+
## 0.7.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- New feature: Domain Module. defineModule() implementation
|
|
14
|
+
|
|
3
15
|
## 0.7.7
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ import 'dotenv/config';
|
|
|
7
7
|
// Side-effect import for declaration merging (extends ctx.db, ctx.user types)
|
|
8
8
|
import './types.js';
|
|
9
9
|
|
|
10
|
-
import { authPlugin, databasePlugin, rest, veloxApp } from '@veloxts/velox';
|
|
10
|
+
import { authPlugin, databasePlugin, rest, swaggerPlugin, veloxApp } from '@veloxts/velox';
|
|
11
11
|
|
|
12
12
|
import { config } from './config/app.js';
|
|
13
13
|
import { authConfig } from './config/auth.js';
|
|
@@ -35,6 +35,12 @@ app.routes(
|
|
|
35
35
|
})
|
|
36
36
|
);
|
|
37
37
|
|
|
38
|
+
await app.register(swaggerPlugin, {
|
|
39
|
+
openapi: {
|
|
40
|
+
info: { title: '__PROJECT_NAME__', version: '0.0.1' },
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
|
|
38
44
|
await app.start();
|
|
39
45
|
|
|
40
46
|
// Send ready signal to CLI for accurate HMR timing
|
|
@@ -7,7 +7,7 @@ import 'dotenv/config';
|
|
|
7
7
|
// Side-effect import for declaration merging (extends ctx.db type)
|
|
8
8
|
import './types.js';
|
|
9
9
|
|
|
10
|
-
import { databasePlugin, rest, veloxApp } from '@veloxts/velox';
|
|
10
|
+
import { databasePlugin, rest, swaggerPlugin, veloxApp } from '@veloxts/velox';
|
|
11
11
|
|
|
12
12
|
import { config } from './config/app.js';
|
|
13
13
|
import { db } from './config/database.js';
|
|
@@ -33,6 +33,12 @@ app.routes(
|
|
|
33
33
|
})
|
|
34
34
|
);
|
|
35
35
|
|
|
36
|
+
await app.register(swaggerPlugin, {
|
|
37
|
+
openapi: {
|
|
38
|
+
info: { title: '__PROJECT_NAME__', version: '0.0.1' },
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
|
|
36
42
|
await app.start();
|
|
37
43
|
|
|
38
44
|
// Send ready signal to CLI for accurate HMR timing
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { veloxApp } from '@veloxts/core';
|
|
14
14
|
import { databasePlugin } from '@veloxts/orm';
|
|
15
|
-
import { rest } from '@veloxts/router';
|
|
15
|
+
import { rest, swaggerPlugin } from '@veloxts/router';
|
|
16
16
|
import { createH3ApiHandler } from '@veloxts/web/adapters';
|
|
17
17
|
|
|
18
18
|
import { db } from './database.js';
|
|
@@ -45,6 +45,12 @@ export default createH3ApiHandler({
|
|
|
45
45
|
})
|
|
46
46
|
);
|
|
47
47
|
|
|
48
|
+
await app.register(swaggerPlugin, {
|
|
49
|
+
openapi: {
|
|
50
|
+
info: { title: '__PROJECT_NAME__', version: '0.0.1' },
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
|
|
48
54
|
// Return the underlying Fastify instance for the h3 adapter
|
|
49
55
|
// The adapter will call ready() on it
|
|
50
56
|
return app.server;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { authPlugin } from '@veloxts/auth';
|
|
10
10
|
import { veloxApp } from '@veloxts/core';
|
|
11
11
|
import { databasePlugin } from '@veloxts/orm';
|
|
12
|
-
import { rest } from '@veloxts/router';
|
|
12
|
+
import { rest, swaggerPlugin } from '@veloxts/router';
|
|
13
13
|
import { createH3ApiHandler } from '@veloxts/web/adapters';
|
|
14
14
|
|
|
15
15
|
import { db } from './database.js';
|
|
@@ -85,6 +85,12 @@ export default createH3ApiHandler({
|
|
|
85
85
|
})
|
|
86
86
|
);
|
|
87
87
|
|
|
88
|
+
await app.register(swaggerPlugin, {
|
|
89
|
+
openapi: {
|
|
90
|
+
info: { title: '__PROJECT_NAME__', version: '0.0.1' },
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
|
|
88
94
|
return app.server;
|
|
89
95
|
},
|
|
90
96
|
basePath: '/api',
|