Skip to content

Commit 71971dd

Browse files
committed
refactor: update stub templates
1 parent 11affee commit 71971dd

File tree

6 files changed

+6
-20
lines changed

6 files changed

+6
-20
lines changed

commands/Make/Controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default class MakeController extends BaseGenerator {
2626
/**
2727
* Do not pluralize following controller names
2828
*/
29-
protected formIgnoreList = ['Home', 'Auth', 'Login', 'Authentication']
29+
protected formIgnoreList = ['Home', 'Auth', 'Login', 'Authentication', 'Adonis']
3030

3131
/**
3232
* Command meta data

npm-audit.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ <h5 class="card-title">
5555
<div class="card">
5656
<div class="card-body">
5757
<h5 class="card-title">
58-
October 14th 2020, 7:25:34 am
58+
October 14th 2020, 7:29:46 am
5959
</h5>
6060
<p class="card-text">Last updated</p>
6161
</div>

templates/command.txt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,6 @@ export default class {{ filename }} extends BaseCommand {
1212
*/
1313
public static description = ''
1414

15-
public static settings = {
16-
/**
17-
* If your command relies on the application code, then you must set the following
18-
* property true.
19-
*/
20-
loadApp: false,
21-
22-
/**
23-
* AdonisJS forcefully kills the process after running the ace command. However, if you
24-
* set the following property to true if your command needs a long running process.
25-
*/
26-
stayAlive: false,
27-
}
28-
2915
public async run () {
3016
this.logger.info('Hello world!')
3117
}

templates/middleware.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
22

33
export default class {{ filename }} {
4-
public async handle (ctx: HttpContextContract, next: () => Promise<void>) {
4+
public async handle ({}: HttpContextContract, next: () => Promise<void>) {
55
// code for middleware goes here. ABOVE THE NEXT CALL
66
await next()
77
}

templates/provider.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IocContract } from '@adonisjs/fold'
1+
import { ApplicationContract } from '@ioc:Adonis/Core/Application'
22

33
/*
44
|--------------------------------------------------------------------------
@@ -20,7 +20,7 @@ import { IocContract } from '@adonisjs/fold'
2020
|
2121
*/
2222
export default class {{ filename }} {
23-
constructor (protected container: IocContract) {
23+
constructor (protected application: ApplicationContract) {
2424
}
2525

2626
public register () {

templates/validator.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { schema } from '@ioc:Adonis/Core/Validator'
22
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
33

44
export default class {{ filename }} {
5-
constructor (private ctx: HttpContextContract) {
5+
constructor (protected ctx: HttpContextContract) {
66
}
77

88
/*

0 commit comments

Comments
 (0)