Skip to content

Commit

Permalink
fix: Further fixes to update project to new Adonis
Browse files Browse the repository at this point in the history
  • Loading branch information
KararTY committed Oct 29, 2020
1 parent 2354d76 commit 2fd81c8
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 261 deletions.
4 changes: 3 additions & 1 deletion .adonisrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,7 @@
"reloadServer": false
}
],
"aceProviders": ["@adonisjs/repl"]
"aceProviders": [
"@adonisjs/repl"
]
}
242 changes: 1 addition & 241 deletions ace-manifest.json
Original file line number Diff line number Diff line change
@@ -1,241 +1 @@
{
"dump:rcfile": {
"settings": {},
"commandPath": "@adonisjs/core/build/commands/DumpRc",
"commandName": "dump:rcfile",
"description": "Dump contents of .adonisrc.json file along with defaults",
"args": [],
"flags": []
},
"list:routes": {
"settings": {
"loadApp": true
},
"commandPath": "@adonisjs/core/build/commands/ListRoutes",
"commandName": "list:routes",
"description": "List application routes",
"args": [],
"flags": [
{
"name": "json",
"propertyName": "json",
"type": "boolean",
"description": "Output as JSON"
}
]
},
"generate:key": {
"settings": {},
"commandPath": "@adonisjs/core/build/commands/GenerateKey",
"commandName": "generate:key",
"description": "Generate a new APP_KEY secret",
"args": [],
"flags": []
},
"db:seed": {
"settings": {
"loadApp": true
},
"commandPath": "@adonisjs/lucid/build/commands/DbSeed",
"commandName": "db:seed",
"description": "Execute database seeder files",
"args": [],
"flags": [
{
"name": "connection",
"propertyName": "connection",
"type": "string",
"description": "Define a custom database connection for the seeders",
"alias": "c"
},
{
"name": "interactive",
"propertyName": "interactive",
"type": "boolean",
"description": "Run seeders in interactive mode",
"alias": "i"
},
{
"name": "files",
"propertyName": "files",
"type": "array",
"description": "Define a custom set of seeders files names to run",
"alias": "f"
}
]
},
"make:model": {
"settings": {},
"commandPath": "@adonisjs/lucid/build/commands/MakeModel",
"commandName": "make:model",
"description": "Make a new Lucid model",
"args": [
{
"type": "string",
"propertyName": "name",
"name": "name",
"required": true,
"description": "Name of the model class"
}
],
"flags": [
{
"name": "migration",
"propertyName": "migration",
"type": "boolean",
"alias": "m",
"description": "Generate the migration for the model"
},
{
"name": "controller",
"propertyName": "controller",
"type": "boolean",
"alias": "c",
"description": "Generate the controller for the model"
}
]
},
"make:migration": {
"settings": {
"loadApp": true
},
"commandPath": "@adonisjs/lucid/build/commands/MakeMigration",
"commandName": "make:migration",
"description": "Make a new migration file",
"args": [
{
"type": "string",
"propertyName": "name",
"name": "name",
"required": true,
"description": "Name of the migration file"
}
],
"flags": [
{
"name": "connection",
"propertyName": "connection",
"type": "string",
"description": "Define a custom database connection for the migration"
},
{
"name": "folder",
"propertyName": "folder",
"type": "string",
"description": "Pre-select a migration directory"
},
{
"name": "create",
"propertyName": "create",
"type": "string",
"description": "Define the table name for creating a new table"
},
{
"name": "table",
"propertyName": "table",
"type": "string",
"description": "Define the table name for altering an existing table"
}
]
},
"make:seeder": {
"settings": {},
"commandPath": "@adonisjs/lucid/build/commands/MakeSeeder",
"commandName": "make:seeder",
"description": "Make a new Seeder file",
"args": [
{
"type": "string",
"propertyName": "name",
"name": "name",
"required": true,
"description": "Name of the seeder class"
}
],
"flags": []
},
"migration:run": {
"settings": {
"loadApp": true
},
"commandPath": "@adonisjs/lucid/build/commands/Migration/Run",
"commandName": "migration:run",
"description": "Run pending migrations",
"args": [],
"flags": [
{
"name": "connection",
"propertyName": "connection",
"type": "string",
"description": "Define a custom database connection",
"alias": "c"
},
{
"name": "force",
"propertyName": "force",
"type": "boolean",
"description": "Explicitly force to run migrations in production"
},
{
"name": "dry-run",
"propertyName": "dryRun",
"type": "boolean",
"description": "Print SQL queries, instead of running the migrations"
}
]
},
"migration:rollback": {
"settings": {
"loadApp": true
},
"commandPath": "@adonisjs/lucid/build/commands/Migration/Rollback",
"commandName": "migration:rollback",
"description": "Rollback migrations to a given batch number",
"args": [],
"flags": [
{
"name": "connection",
"propertyName": "connection",
"type": "string",
"description": "Define a custom database connection",
"alias": "c"
},
{
"name": "force",
"propertyName": "force",
"type": "boolean",
"description": "Explictly force to run migrations in production"
},
{
"name": "dry-run",
"propertyName": "dryRun",
"type": "boolean",
"description": "Print SQL queries, instead of running the migrations"
},
{
"name": "batch",
"propertyName": "batch",
"type": "number",
"description": "Define custom batch number for rollback. Use 0 to rollback to initial state"
}
]
},
"migration:status": {
"settings": {
"loadApp": true
},
"commandPath": "@adonisjs/lucid/build/commands/Migration/Status",
"commandName": "migration:status",
"description": "Check migrations current status.",
"args": [],
"flags": [
{
"name": "connection",
"propertyName": "connection",
"type": "string",
"description": "Define a custom database connection",
"alias": "c"
}
]
}
}
{"dump:rcfile":{"settings":{},"commandPath":"@adonisjs/core/build/commands/DumpRc","commandName":"dump:rcfile","description":"Dump contents of .adonisrc.json file along with defaults","args":[],"flags":[]},"list:routes":{"settings":{"loadApp":true},"commandPath":"@adonisjs/core/build/commands/ListRoutes","commandName":"list:routes","description":"List application routes","args":[],"flags":[{"name":"json","propertyName":"json","type":"boolean","description":"Output as JSON"}]},"generate:key":{"settings":{},"commandPath":"@adonisjs/core/build/commands/GenerateKey","commandName":"generate:key","description":"Generate a new APP_KEY secret","args":[],"flags":[]},"db:seed":{"settings":{"loadApp":true},"commandPath":"@adonisjs/lucid/build/commands/DbSeed","commandName":"db:seed","description":"Execute database seeder files","args":[],"flags":[{"name":"connection","propertyName":"connection","type":"string","description":"Define a custom database connection for the seeders","alias":"c"},{"name":"interactive","propertyName":"interactive","type":"boolean","description":"Run seeders in interactive mode","alias":"i"},{"name":"files","propertyName":"files","type":"array","description":"Define a custom set of seeders files names to run","alias":"f"}]},"make:model":{"settings":{},"commandPath":"@adonisjs/lucid/build/commands/MakeModel","commandName":"make:model","description":"Make a new Lucid model","args":[{"type":"string","propertyName":"name","name":"name","required":true,"description":"Name of the model class"}],"flags":[{"name":"migration","propertyName":"migration","type":"boolean","alias":"m","description":"Generate the migration for the model"},{"name":"controller","propertyName":"controller","type":"boolean","alias":"c","description":"Generate the controller for the model"}]},"make:migration":{"settings":{"loadApp":true},"commandPath":"@adonisjs/lucid/build/commands/MakeMigration","commandName":"make:migration","description":"Make a new migration file","args":[{"type":"string","propertyName":"name","name":"name","required":true,"description":"Name of the migration file"}],"flags":[{"name":"connection","propertyName":"connection","type":"string","description":"Define a custom database connection for the migration"},{"name":"folder","propertyName":"folder","type":"string","description":"Pre-select a migration directory"},{"name":"create","propertyName":"create","type":"string","description":"Define the table name for creating a new table"},{"name":"table","propertyName":"table","type":"string","description":"Define the table name for altering an existing table"}]},"make:seeder":{"settings":{},"commandPath":"@adonisjs/lucid/build/commands/MakeSeeder","commandName":"make:seeder","description":"Make a new Seeder file","args":[{"type":"string","propertyName":"name","name":"name","required":true,"description":"Name of the seeder class"}],"flags":[]},"migration:run":{"settings":{"loadApp":true},"commandPath":"@adonisjs/lucid/build/commands/Migration/Run","commandName":"migration:run","description":"Run pending migrations","args":[],"flags":[{"name":"connection","propertyName":"connection","type":"string","description":"Define a custom database connection","alias":"c"},{"name":"force","propertyName":"force","type":"boolean","description":"Explicitly force to run migrations in production"},{"name":"dry-run","propertyName":"dryRun","type":"boolean","description":"Print SQL queries, instead of running the migrations"}]},"migration:rollback":{"settings":{"loadApp":true},"commandPath":"@adonisjs/lucid/build/commands/Migration/Rollback","commandName":"migration:rollback","description":"Rollback migrations to a given batch number","args":[],"flags":[{"name":"connection","propertyName":"connection","type":"string","description":"Define a custom database connection","alias":"c"},{"name":"force","propertyName":"force","type":"boolean","description":"Explictly force to run migrations in production"},{"name":"dry-run","propertyName":"dryRun","type":"boolean","description":"Print SQL queries, instead of running the migrations"},{"name":"batch","propertyName":"batch","type":"number","description":"Define custom batch number for rollback. Use 0 to rollback to initial state"}]},"migration:status":{"settings":{"loadApp":true},"commandPath":"@adonisjs/lucid/build/commands/Migration/Status","commandName":"migration:status","description":"Check migrations current status.","args":[],"flags":[{"name":"connection","propertyName":"connection","type":"string","description":"Define a custom database connection","alias":"c"}]},"repl":{"settings":{"loadApp":true,"environment":"repl","stayAlive":true},"commandPath":"@adonisjs/repl/build/commands/AdonisRepl","commandName":"repl","description":"Start a new REPL session","args":[],"flags":[]}}
6 changes: 4 additions & 2 deletions config/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,12 @@ const authConfig: AuthConfig = {
| Model
|--------------------------------------------------------------------------
|
| The model to use for fetching or finding users
| The model to use for fetching or finding users. The model is imported
| lazily since the config files are read way earlier in the lifecycle
| of booting the app and the models may not be in a usable state at
| that time.
|
*/
// eslint-disable-next-line @typescript-eslint/promise-function-async
model: () => import('App/Models/User'),
},
},
Expand Down
12 changes: 6 additions & 6 deletions contracts/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ declare module '@ioc:Adonis/Addons/Auth' {
|
*/
user: {
implementation: LucidProviderContract<typeof User>
config: LucidProviderConfig<typeof User>
}
implementation: LucidProviderContract<typeof User>,
config: LucidProviderConfig<typeof User>,
},
}

/*
Expand Down Expand Up @@ -66,8 +66,8 @@ declare module '@ioc:Adonis/Addons/Auth' {
|
*/
web: {
implementation: SessionGuardContract<'user', 'web'>
config: SessionGuardConfig<'user'>
}
implementation: SessionGuardContract<'user', 'web'>,
config: SessionGuardConfig<'user'>,
},
}
}
10 changes: 5 additions & 5 deletions env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ export default Env.rules({
DB_CONNECTION: Env.schema.enum(['sqlite', 'pg', 'mysql', 'mssql', 'oracle'] as const),
DB_HOST: Env.schema.string({ format: 'host' }),
DB_USER: Env.schema.string(),
DB_PASSWORD: Env.schema.string(),
DB_PASSWORD: Env.schema.string.optional(),
DB_NAME: Env.schema.string(),
DB_HEALTHCHECK: Env.schema.boolean(),
DB_HEALTHCHECK: Env.schema.boolean.optional(),
HASH_DRIVER: Env.schema.enum(['argon', 'bcrypt'] as const),

TWITCH_CLIENT_TOKEN: Env.schema.string.optional(),
TWITCH_CLIENT_SECRET: Env.schema.string.optional(),
TWITCH_CLIENT_TOKEN: Env.schema.string(),
TWITCH_CLIENT_SECRET: Env.schema.string(),
TWITCH_REDIRECT_URI: Env.schema.string(),
TWITCH_BOT_REDIRECT_URI: Env.schema.string(),
TWITCH_BOT_NAME: Env.schema.string(),
TWITCH_BOT_ID: Env.schema.number(),
TWITCH_BOT_ID: Env.schema.string(),

PERSPECTIVE_API_TOKEN: Env.schema.string.optional(),
PERSPECTIVE_API_THROTTLE: Env.schema.number(),
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,38 +23,39 @@
"@adonisjs/assembler": "^3.0.7",
"@typescript-eslint/eslint-plugin": "^4.6.0",
"adonis-preset-ts": "^1.0.4",
"eslint": "^7.12.0",
"eslint-config-prettier": "^6.14.0",
"eslint": "^7.12.1",
"eslint-config-prettier": "^6.15.0",
"eslint-config-standard-with-typescript": "^19.0.1",
"eslint-plugin-adonis": "^1.0.15",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.2",
"pino-pretty": "^4.3.0",
"sqlite3": "^5.0.0",
"standard-version": "^9.0.0",
"typescript": "^4.0.3",
"typescript": "^4.0.5",
"youch": "^2.1.1",
"youch-terminal": "^1.0.1"
},
"dependencies": {
"@adonisjs/auth": "^4.3.1",
"@adonisjs/auth": "^5.0.2",
"@adonisjs/core": "^5.0.4-preview-rc-2",
"@adonisjs/lucid": "^9.0.3",
"@adonisjs/repl": "^1.1.5",
"@adonisjs/session": "^4.0.5",
"@adonisjs/shield": "^4.0.2",
"@adonisjs/view": "^3.0.7",
"@hapi/bourne": "^2.0.0",
"@types/ws": "^7.2.7",
"@types/ws": "^7.2.9",
"befriendlier-shared": "github:kararty/befriendlier-shared#semver:v6.3.0",
"bulma": "^0.9.1",
"feather-icons": "^4.28.0",
"kontra": "^7.1.2",
"node-sass": "^4.14.1",
"p-queue": "^6.6.2",
"parcel": "^2.0.0-nightly.432",
"parcel": "^2.0.0-nightly.435",
"pg": "^8.4.1",
"phc-argon2": "^1.0.11",
"proxy-addr": "^2.0.6",
Expand Down

0 comments on commit 2fd81c8

Please sign in to comment.