@travetto/scaffold 6.0.0-rc.3 → 6.0.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/scaffold",
|
|
3
|
-
"version": "6.0.0
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "App Scaffold for the Travetto framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"generator",
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"trv-scaffold": "bin/trv-scaffold.js"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@travetto/cli": "^6.0.0
|
|
31
|
-
"@travetto/runtime": "^6.0.0
|
|
30
|
+
"@travetto/cli": "^6.0.0",
|
|
31
|
+
"@travetto/runtime": "^6.0.0",
|
|
32
32
|
"enquirer": "^2.4.1",
|
|
33
33
|
"mustache": "^4.2.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@travetto/model": "^6.0.0
|
|
36
|
+
"@travetto/model": "^6.0.0",
|
|
37
37
|
"@types/mustache": "^4.2.5"
|
|
38
38
|
},
|
|
39
39
|
"travetto": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Controller, Get, Post,
|
|
1
|
+
import { Controller, Get, Post, WebResponse, ContextParam } from '@travetto/web';
|
|
2
2
|
import { Login, Authenticated, Logout } from '@travetto/auth-web';
|
|
3
3
|
import { Principal } from '@travetto/auth';
|
|
4
4
|
|
|
@@ -15,8 +15,8 @@ export class ApiController {
|
|
|
15
15
|
|
|
16
16
|
@Post('/login')
|
|
17
17
|
@Login(BasicAuthSymbol)
|
|
18
|
-
async getAll(): Promise<
|
|
19
|
-
return
|
|
18
|
+
async getAll(): Promise<WebResponse> {
|
|
19
|
+
return WebResponse.redirect('/auth/self');
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
@Get('/self')
|
|
@@ -27,7 +27,7 @@ export class ApiController {
|
|
|
27
27
|
|
|
28
28
|
@Get('/logout')
|
|
29
29
|
@Logout()
|
|
30
|
-
async logout(): Promise<
|
|
31
|
-
return
|
|
30
|
+
async logout(): Promise<WebResponse> {
|
|
31
|
+
return WebResponse.redirect('/auth/self');
|
|
32
32
|
}
|
|
33
33
|
}
|
package/support/bin/features.ts
CHANGED
|
@@ -25,15 +25,12 @@ export const FEATURES: Feature[] = [
|
|
|
25
25
|
{
|
|
26
26
|
title: 'Web Framework',
|
|
27
27
|
package: '@travetto/web',
|
|
28
|
-
choices: [
|
|
29
|
-
{ title: 'Node', package: '@travetto/web-node' },
|
|
30
|
-
{ title: 'AWS Lambda', package: '@travetto/web-aws-lambda' },
|
|
31
|
-
],
|
|
32
28
|
addons: [
|
|
29
|
+
{ title: 'Web Node', package: '@travetto/web-node' },
|
|
30
|
+
{ title: 'Web Http Server', package: '@travetto/web-http-server' },
|
|
33
31
|
{ title: 'OpenAPI', package: '@travetto/openapi' },
|
|
34
32
|
{ title: 'Logging', package: '@travetto/log' }
|
|
35
|
-
]
|
|
36
|
-
default: 'Express.js'
|
|
33
|
+
]
|
|
37
34
|
},
|
|
38
35
|
{ title: 'Test Framework', package: '@travetto/test' },
|
|
39
36
|
{ title: 'ESLint Support', package: '@travetto/eslint' },
|