modified
@@ -1,5 +1,4 @@
|
||||
node_modules
|
||||
build
|
||||
coverage
|
||||
.vscode
|
||||
.DS_STORE
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"typescript": false,
|
||||
"commands": [
|
||||
"./commands",
|
||||
"@adonisjs/core/build/commands/index.js",
|
||||
"@adonisjs/repl/build/commands",
|
||||
"@adonisjs/lucid/build/commands"
|
||||
],
|
||||
"exceptionHandlerNamespace": "App/Exceptions/Handler",
|
||||
"aliases": {
|
||||
"App": "app",
|
||||
"Config": "config",
|
||||
"Database": "database",
|
||||
"Contracts": "contracts"
|
||||
},
|
||||
"preloads": [
|
||||
"./start/routes",
|
||||
"./start/kernel"
|
||||
],
|
||||
"providers": [
|
||||
"./providers/AppProvider",
|
||||
"@adonisjs/core",
|
||||
"@adonisjs/session",
|
||||
"@adonisjs/view",
|
||||
"@adonisjs/shield",
|
||||
"@adonisjs/lucid",
|
||||
"@adonisjs/auth"
|
||||
],
|
||||
"metaFiles": [
|
||||
{
|
||||
"pattern": "public/**",
|
||||
"reloadServer": false
|
||||
},
|
||||
{
|
||||
"pattern": "resources/views/**/*.edge",
|
||||
"reloadServer": false
|
||||
}
|
||||
],
|
||||
"aceProviders": [
|
||||
"@adonisjs/repl"
|
||||
],
|
||||
"tests": {
|
||||
"suites": [
|
||||
{
|
||||
"name": "functional",
|
||||
"files": [
|
||||
"tests/functional/**/*.spec(.ts|.js)"
|
||||
],
|
||||
"timeout": 60000
|
||||
}
|
||||
]
|
||||
},
|
||||
"testProviders": [
|
||||
"@japa/preset-adonis/TestsProvider"
|
||||
],
|
||||
"lastCompiledAt": "2023-11-02T17:01:05.675Z"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
SESSION_DRIVER=cookie
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Ace Commands
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is the entry point for running ace commands.
|
||||
|
|
||||
*/
|
||||
|
||||
require('reflect-metadata')
|
||||
require('source-map-support').install({ handleUncaughtExceptions: false })
|
||||
|
||||
const { Ignitor } = require('@adonisjs/core/build/standalone')
|
||||
new Ignitor(__dirname)
|
||||
.ace()
|
||||
.handle(process.argv.slice(2))
|
||||
@@ -0,0 +1,575 @@
|
||||
{
|
||||
"commands": {
|
||||
"dump:rcfile": {
|
||||
"settings": {},
|
||||
"commandPath": "@adonisjs/core/build/commands/DumpRc",
|
||||
"commandName": "dump:rcfile",
|
||||
"description": "Dump contents of .adonisrc.json file along with defaults",
|
||||
"args": [],
|
||||
"aliases": [],
|
||||
"flags": []
|
||||
},
|
||||
"list:routes": {
|
||||
"settings": {
|
||||
"loadApp": true,
|
||||
"stayAlive": true
|
||||
},
|
||||
"commandPath": "@adonisjs/core/build/commands/ListRoutes/index",
|
||||
"commandName": "list:routes",
|
||||
"description": "List application routes",
|
||||
"args": [],
|
||||
"aliases": [],
|
||||
"flags": [
|
||||
{
|
||||
"name": "verbose",
|
||||
"propertyName": "verbose",
|
||||
"type": "boolean",
|
||||
"description": "Display more information"
|
||||
},
|
||||
{
|
||||
"name": "reverse",
|
||||
"propertyName": "reverse",
|
||||
"type": "boolean",
|
||||
"alias": "r",
|
||||
"description": "Reverse routes display"
|
||||
},
|
||||
{
|
||||
"name": "methods",
|
||||
"propertyName": "methodsFilter",
|
||||
"type": "array",
|
||||
"alias": "m",
|
||||
"description": "Filter routes by method"
|
||||
},
|
||||
{
|
||||
"name": "patterns",
|
||||
"propertyName": "patternsFilter",
|
||||
"type": "array",
|
||||
"alias": "p",
|
||||
"description": "Filter routes by the route pattern"
|
||||
},
|
||||
{
|
||||
"name": "names",
|
||||
"propertyName": "namesFilter",
|
||||
"type": "array",
|
||||
"alias": "n",
|
||||
"description": "Filter routes by route name"
|
||||
},
|
||||
{
|
||||
"name": "json",
|
||||
"propertyName": "json",
|
||||
"type": "boolean",
|
||||
"description": "Output as JSON"
|
||||
},
|
||||
{
|
||||
"name": "table",
|
||||
"propertyName": "table",
|
||||
"type": "boolean",
|
||||
"description": "Output as Table"
|
||||
},
|
||||
{
|
||||
"name": "max-width",
|
||||
"propertyName": "maxWidth",
|
||||
"type": "number",
|
||||
"description": "Specify maximum rendering width. Ignored for JSON Output"
|
||||
}
|
||||
]
|
||||
},
|
||||
"generate:key": {
|
||||
"settings": {},
|
||||
"commandPath": "@adonisjs/core/build/commands/GenerateKey",
|
||||
"commandName": "generate:key",
|
||||
"description": "Generate a new APP_KEY secret",
|
||||
"args": [],
|
||||
"aliases": [],
|
||||
"flags": []
|
||||
},
|
||||
"repl": {
|
||||
"settings": {
|
||||
"loadApp": true,
|
||||
"environment": "repl",
|
||||
"stayAlive": true
|
||||
},
|
||||
"commandPath": "@adonisjs/repl/build/commands/AdonisRepl",
|
||||
"commandName": "repl",
|
||||
"description": "Start a new REPL session",
|
||||
"args": [],
|
||||
"aliases": [],
|
||||
"flags": []
|
||||
},
|
||||
"db:seed": {
|
||||
"settings": {
|
||||
"loadApp": true
|
||||
},
|
||||
"commandPath": "@adonisjs/lucid/build/commands/DbSeed",
|
||||
"commandName": "db:seed",
|
||||
"description": "Execute database seeders",
|
||||
"args": [],
|
||||
"aliases": [],
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"name": "compact-output",
|
||||
"propertyName": "compactOutput",
|
||||
"type": "boolean",
|
||||
"description": "A compact single-line output"
|
||||
}
|
||||
]
|
||||
},
|
||||
"db:wipe": {
|
||||
"settings": {
|
||||
"loadApp": true
|
||||
},
|
||||
"commandPath": "@adonisjs/lucid/build/commands/DbWipe",
|
||||
"commandName": "db:wipe",
|
||||
"description": "Drop all tables, views and types in database",
|
||||
"args": [],
|
||||
"aliases": [],
|
||||
"flags": [
|
||||
{
|
||||
"name": "connection",
|
||||
"propertyName": "connection",
|
||||
"type": "string",
|
||||
"description": "Define a custom database connection",
|
||||
"alias": "c"
|
||||
},
|
||||
{
|
||||
"name": "drop-views",
|
||||
"propertyName": "dropViews",
|
||||
"type": "boolean",
|
||||
"description": "Drop all views"
|
||||
},
|
||||
{
|
||||
"name": "drop-types",
|
||||
"propertyName": "dropTypes",
|
||||
"type": "boolean",
|
||||
"description": "Drop all custom types (Postgres only)"
|
||||
},
|
||||
{
|
||||
"name": "force",
|
||||
"propertyName": "force",
|
||||
"type": "boolean",
|
||||
"description": "Explicitly force command to run in production"
|
||||
}
|
||||
]
|
||||
},
|
||||
"db:truncate": {
|
||||
"settings": {
|
||||
"loadApp": true
|
||||
},
|
||||
"commandPath": "@adonisjs/lucid/build/commands/DbTruncate",
|
||||
"commandName": "db:truncate",
|
||||
"description": "Truncate all tables in database",
|
||||
"args": [],
|
||||
"aliases": [],
|
||||
"flags": [
|
||||
{
|
||||
"name": "connection",
|
||||
"propertyName": "connection",
|
||||
"type": "string",
|
||||
"description": "Define a custom database connection",
|
||||
"alias": "c"
|
||||
},
|
||||
{
|
||||
"name": "force",
|
||||
"propertyName": "force",
|
||||
"type": "boolean",
|
||||
"description": "Explicitly force command to run in production"
|
||||
}
|
||||
]
|
||||
},
|
||||
"make:model": {
|
||||
"settings": {
|
||||
"loadApp": true
|
||||
},
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"name": "factory",
|
||||
"propertyName": "factory",
|
||||
"type": "boolean",
|
||||
"alias": "f",
|
||||
"description": "Generate a factory 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"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"flags": [
|
||||
{
|
||||
"name": "connection",
|
||||
"propertyName": "connection",
|
||||
"type": "string",
|
||||
"description": "The connection flag is used to lookup the directory for the migration file"
|
||||
},
|
||||
{
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"flags": []
|
||||
},
|
||||
"make:factory": {
|
||||
"settings": {},
|
||||
"commandPath": "@adonisjs/lucid/build/commands/MakeFactory",
|
||||
"commandName": "make:factory",
|
||||
"description": "Make a new factory",
|
||||
"args": [
|
||||
{
|
||||
"type": "string",
|
||||
"propertyName": "model",
|
||||
"name": "model",
|
||||
"required": true,
|
||||
"description": "The name of the model"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"flags": [
|
||||
{
|
||||
"name": "model-path",
|
||||
"propertyName": "modelPath",
|
||||
"type": "string",
|
||||
"description": "The path to the model"
|
||||
},
|
||||
{
|
||||
"name": "exact",
|
||||
"propertyName": "exact",
|
||||
"type": "boolean",
|
||||
"description": "Create the factory with the exact name as provided",
|
||||
"alias": "e"
|
||||
}
|
||||
]
|
||||
},
|
||||
"migration:run": {
|
||||
"settings": {
|
||||
"loadApp": true
|
||||
},
|
||||
"commandPath": "@adonisjs/lucid/build/commands/Migration/Run",
|
||||
"commandName": "migration:run",
|
||||
"description": "Migrate database by running pending migrations",
|
||||
"args": [],
|
||||
"aliases": [],
|
||||
"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": "Do not run actual queries. Instead view the SQL output"
|
||||
},
|
||||
{
|
||||
"name": "compact-output",
|
||||
"propertyName": "compactOutput",
|
||||
"type": "boolean",
|
||||
"description": "A compact single-line output"
|
||||
},
|
||||
{
|
||||
"name": "disable-locks",
|
||||
"propertyName": "disableLocks",
|
||||
"type": "boolean",
|
||||
"description": "Disable locks acquired to run migrations safely"
|
||||
}
|
||||
]
|
||||
},
|
||||
"migration:rollback": {
|
||||
"settings": {
|
||||
"loadApp": true
|
||||
},
|
||||
"commandPath": "@adonisjs/lucid/build/commands/Migration/Rollback",
|
||||
"commandName": "migration:rollback",
|
||||
"description": "Rollback migrations to a specific batch number",
|
||||
"args": [],
|
||||
"aliases": [],
|
||||
"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": "Do not run actual queries. Instead view the SQL output"
|
||||
},
|
||||
{
|
||||
"name": "batch",
|
||||
"propertyName": "batch",
|
||||
"type": "number",
|
||||
"description": "Define custom batch number for rollback. Use 0 to rollback to initial state"
|
||||
},
|
||||
{
|
||||
"name": "compact-output",
|
||||
"propertyName": "compactOutput",
|
||||
"type": "boolean",
|
||||
"description": "A compact single-line output"
|
||||
},
|
||||
{
|
||||
"name": "disable-locks",
|
||||
"propertyName": "disableLocks",
|
||||
"type": "boolean",
|
||||
"description": "Disable locks acquired to run migrations safely"
|
||||
}
|
||||
]
|
||||
},
|
||||
"migration:status": {
|
||||
"settings": {
|
||||
"loadApp": true
|
||||
},
|
||||
"commandPath": "@adonisjs/lucid/build/commands/Migration/Status",
|
||||
"commandName": "migration:status",
|
||||
"description": "View migrations status",
|
||||
"args": [],
|
||||
"aliases": [],
|
||||
"flags": [
|
||||
{
|
||||
"name": "connection",
|
||||
"propertyName": "connection",
|
||||
"type": "string",
|
||||
"description": "Define a custom database connection",
|
||||
"alias": "c"
|
||||
}
|
||||
]
|
||||
},
|
||||
"migration:reset": {
|
||||
"settings": {
|
||||
"loadApp": true
|
||||
},
|
||||
"commandPath": "@adonisjs/lucid/build/commands/Migration/Reset",
|
||||
"commandName": "migration:reset",
|
||||
"description": "Rollback all migrations",
|
||||
"args": [],
|
||||
"aliases": [],
|
||||
"flags": [
|
||||
{
|
||||
"name": "connection",
|
||||
"propertyName": "connection",
|
||||
"type": "string",
|
||||
"description": "Define a custom database connection",
|
||||
"alias": "c"
|
||||
},
|
||||
{
|
||||
"name": "force",
|
||||
"propertyName": "force",
|
||||
"type": "boolean",
|
||||
"description": "Explicitly force command to run in production"
|
||||
},
|
||||
{
|
||||
"name": "dry-run",
|
||||
"propertyName": "dryRun",
|
||||
"type": "boolean",
|
||||
"description": "Do not run actual queries. Instead view the SQL output"
|
||||
},
|
||||
{
|
||||
"name": "disable-locks",
|
||||
"propertyName": "disableLocks",
|
||||
"type": "boolean",
|
||||
"description": "Disable locks acquired to run migrations safely"
|
||||
}
|
||||
]
|
||||
},
|
||||
"migration:refresh": {
|
||||
"settings": {
|
||||
"loadApp": true
|
||||
},
|
||||
"commandPath": "@adonisjs/lucid/build/commands/Migration/Refresh",
|
||||
"commandName": "migration:refresh",
|
||||
"description": "Rollback and migrate database",
|
||||
"args": [],
|
||||
"aliases": [],
|
||||
"flags": [
|
||||
{
|
||||
"name": "connection",
|
||||
"propertyName": "connection",
|
||||
"type": "string",
|
||||
"description": "Define a custom database connection",
|
||||
"alias": "c"
|
||||
},
|
||||
{
|
||||
"name": "force",
|
||||
"propertyName": "force",
|
||||
"type": "boolean",
|
||||
"description": "Explicitly force command to run in production"
|
||||
},
|
||||
{
|
||||
"name": "dry-run",
|
||||
"propertyName": "dryRun",
|
||||
"type": "boolean",
|
||||
"description": "Do not run actual queries. Instead view the SQL output"
|
||||
},
|
||||
{
|
||||
"name": "seed",
|
||||
"propertyName": "seed",
|
||||
"type": "boolean",
|
||||
"description": "Run seeders"
|
||||
},
|
||||
{
|
||||
"name": "disable-locks",
|
||||
"propertyName": "disableLocks",
|
||||
"type": "boolean",
|
||||
"description": "Disable locks acquired to run migrations safely"
|
||||
}
|
||||
]
|
||||
},
|
||||
"migration:fresh": {
|
||||
"settings": {
|
||||
"loadApp": true
|
||||
},
|
||||
"commandPath": "@adonisjs/lucid/build/commands/Migration/Fresh",
|
||||
"commandName": "migration:fresh",
|
||||
"description": "Drop all tables and re-migrate the database",
|
||||
"args": [],
|
||||
"aliases": [],
|
||||
"flags": [
|
||||
{
|
||||
"name": "connection",
|
||||
"propertyName": "connection",
|
||||
"type": "string",
|
||||
"description": "Define a custom database connection",
|
||||
"alias": "c"
|
||||
},
|
||||
{
|
||||
"name": "force",
|
||||
"propertyName": "force",
|
||||
"type": "boolean",
|
||||
"description": "Explicitly force command to run in production"
|
||||
},
|
||||
{
|
||||
"name": "seed",
|
||||
"propertyName": "seed",
|
||||
"type": "boolean",
|
||||
"description": "Run seeders"
|
||||
},
|
||||
{
|
||||
"name": "drop-views",
|
||||
"propertyName": "dropViews",
|
||||
"type": "boolean",
|
||||
"description": "Drop all views"
|
||||
},
|
||||
{
|
||||
"name": "drop-types",
|
||||
"propertyName": "dropTypes",
|
||||
"type": "boolean",
|
||||
"description": "Drop all custom types (Postgres only)"
|
||||
},
|
||||
{
|
||||
"name": "disable-locks",
|
||||
"propertyName": "disableLocks",
|
||||
"type": "boolean",
|
||||
"description": "Disable locks acquired to run migrations safely"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"aliases": {}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const User_1 = __importDefault(global[Symbol.for('ioc.use')]("App/Models/User"));
|
||||
const CreateUserValidator_1 = __importDefault(global[Symbol.for('ioc.use')]("App/Validators/CreateUserValidator"));
|
||||
class AuthController {
|
||||
async index({ view }) {
|
||||
return view.render('auth');
|
||||
}
|
||||
async login({ request, auth, response, session }) {
|
||||
const email = request.input('loginemail');
|
||||
const password = request.input('loginpassword');
|
||||
try {
|
||||
await auth.use('web').attempt(email, password);
|
||||
response.redirect().toRoute('home');
|
||||
}
|
||||
catch {
|
||||
session.flash({ error: "Identifiant ou mot de passe incorrect" });
|
||||
response.redirect().back();
|
||||
}
|
||||
}
|
||||
async signup({ request, response }) {
|
||||
const playload = await request.validate(CreateUserValidator_1.default);
|
||||
await User_1.default.create(playload);
|
||||
return response.redirect().toRoute('home');
|
||||
}
|
||||
async logout({ auth, response }) {
|
||||
await auth.logout();
|
||||
return response.redirect().back();
|
||||
}
|
||||
}
|
||||
exports.default = AuthController;
|
||||
//# sourceMappingURL=AuthController.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"AuthController.js","sourceRoot":"","sources":["../../../../app/Controllers/Http/AuthController.ts"],"names":[],"mappings":";;;;;AACA,iFAAkC;AAClC,mHAAoE;AAEpE,MAAqB,cAAc;IAEhC,KAAK,CAAC,KAAK,CAAE,EAAE,IAAI,EAAuB;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAC7B,CAAC;IAED,KAAK,CAAC,KAAK,CAAE,EAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAsB;QACjE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;QACzC,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,CAAA;QAE/C,IAAI;YACD,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;YAC9C,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;SACrC;QAAC,MAAM;YACL,OAAO,CAAC,KAAK,CAAC,EAAC,KAAK,EAAE,uCAAuC,EAAC,CAAC,CAAA;YAC/D,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAA;SAC5B;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAuB;QACpD,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,6BAAmB,CAAC,CAAA;QAC5D,MAAM,cAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;QAC3B,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;IAC7C,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAsB;QAChD,MAAM,IAAI,CAAC,MAAM,EAAE,CAAA;QACnB,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAA;IACpC,CAAC;CACH;AA7BD,iCA6BC"}
|
||||
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
class HomeController {
|
||||
async index({ view }) {
|
||||
return view.render('index');
|
||||
}
|
||||
}
|
||||
exports.default = HomeController;
|
||||
//# sourceMappingURL=HomeController.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"HomeController.js","sourceRoot":"","sources":["../../../../app/Controllers/Http/HomeController.ts"],"names":[],"mappings":";;AAEA,MAAqB,cAAc;IAEhC,KAAK,CAAC,KAAK,CAAE,EAAE,IAAI,EAAuB;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IAC9B,CAAC;CACH;AALD,iCAKC"}
|
||||
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const Logger_1 = __importDefault(global[Symbol.for('ioc.use')]("Adonis/Core/Logger"));
|
||||
const HttpExceptionHandler_1 = __importDefault(global[Symbol.for('ioc.use')]("Adonis/Core/HttpExceptionHandler"));
|
||||
class ExceptionHandler extends HttpExceptionHandler_1.default {
|
||||
constructor() {
|
||||
super(Logger_1.default);
|
||||
this.statusPages = {
|
||||
'403': 'errors/unauthorized',
|
||||
'404': 'errors/not-found',
|
||||
'500..599': 'errors/server-error',
|
||||
};
|
||||
}
|
||||
}
|
||||
exports.default = ExceptionHandler;
|
||||
//# sourceMappingURL=Handler.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Handler.js","sourceRoot":"","sources":["../../../app/Exceptions/Handler.ts"],"names":[],"mappings":";;;;;AAeA,sFAA4C;AAC5C,kHAAwE;AAExE,MAAqB,gBAAiB,SAAQ,8BAAoB;IAOhE;QACE,KAAK,CAAC,gBAAM,CAAC,CAAA;QAPL,gBAAW,GAAG;YACtB,KAAK,EAAE,qBAAqB;YAC5B,KAAK,EAAE,kBAAkB;YACzB,UAAU,EAAE,qBAAqB;SAClC,CAAA;IAID,CAAC;CACF;AAVD,mCAUC"}
|
||||
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const standalone_1 = require("@adonisjs/auth/build/standalone");
|
||||
class AuthMiddleware {
|
||||
constructor() {
|
||||
this.redirectTo = '/login';
|
||||
}
|
||||
async authenticate(auth, guards) {
|
||||
let guardLastAttempted;
|
||||
for (let guard of guards) {
|
||||
guardLastAttempted = guard;
|
||||
if (await auth.use(guard).check()) {
|
||||
auth.defaultGuard = guard;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
throw new standalone_1.AuthenticationException('Unauthorized access', 'E_UNAUTHORIZED_ACCESS', guardLastAttempted, this.redirectTo);
|
||||
}
|
||||
async handle({ auth }, next, customGuards) {
|
||||
const guards = customGuards.length ? customGuards : [auth.name];
|
||||
await this.authenticate(auth, guards);
|
||||
await next();
|
||||
}
|
||||
}
|
||||
exports.default = AuthMiddleware;
|
||||
//# sourceMappingURL=Auth.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Auth.js","sourceRoot":"","sources":["../../../app/Middleware/Auth.ts"],"names":[],"mappings":";;AAAA,gEAAyE;AAWzE,MAAqB,cAAc;IAAnC;QAIY,eAAU,GAAG,QAAQ,CAAA;IA4DjC,CAAC;IAlDW,KAAK,CAAC,YAAY,CAAC,IAAiC,EAAE,MAA4B;QAO1F,IAAI,kBAAsC,CAAA;QAE1C,KAAK,IAAI,KAAK,IAAI,MAAM,EAAE;YACxB,kBAAkB,GAAG,KAAK,CAAA;YAE1B,IAAI,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;gBAMjC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAA;gBACzB,OAAO,IAAI,CAAA;aACZ;SACF;QAKD,MAAM,IAAI,oCAAuB,CAC/B,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,IAAI,CAAC,UAAU,CAChB,CAAA;IACH,CAAC;IAKM,KAAK,CAAC,MAAM,CACjB,EAAE,IAAI,EAAuB,EAC7B,IAAyB,EACzB,YAAkC;QAMlC,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC/D,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;QACrC,MAAM,IAAI,EAAE,CAAA;IACd,CAAC;CACF;AAhED,iCAgEC"}
|
||||
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
class SilentAuthMiddleware {
|
||||
async handle({ auth }, next) {
|
||||
await auth.check();
|
||||
await next();
|
||||
}
|
||||
}
|
||||
exports.default = SilentAuthMiddleware;
|
||||
//# sourceMappingURL=SilentAuth.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"SilentAuth.js","sourceRoot":"","sources":["../../../app/Middleware/SilentAuth.ts"],"names":[],"mappings":";;AAQA,MAAqB,oBAAoB;IAIhC,KAAK,CAAC,MAAM,CAAC,EAAE,IAAI,EAAuB,EAAE,IAAyB;QAK1E,MAAM,IAAI,CAAC,KAAK,EAAE,CAAA;QAClB,MAAM,IAAI,EAAE,CAAA;IACd,CAAC;CACF;AAZD,uCAYC"}
|
||||
@@ -0,0 +1,60 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const luxon_1 = require("luxon");
|
||||
const Hash_1 = __importDefault(global[Symbol.for('ioc.use')]("Adonis/Core/Hash"));
|
||||
const Orm_1 = global[Symbol.for('ioc.use')]("Adonis/Lucid/Orm");
|
||||
class User extends Orm_1.BaseModel {
|
||||
static async hashPassword(user) {
|
||||
if (user.$dirty.password) {
|
||||
user.password = await Hash_1.default.make(user.password);
|
||||
}
|
||||
}
|
||||
}
|
||||
__decorate([
|
||||
(0, Orm_1.column)({ isPrimary: true }),
|
||||
__metadata("design:type", Number)
|
||||
], User.prototype, "id", void 0);
|
||||
__decorate([
|
||||
(0, Orm_1.column)(),
|
||||
__metadata("design:type", String)
|
||||
], User.prototype, "pseudo", void 0);
|
||||
__decorate([
|
||||
(0, Orm_1.column)(),
|
||||
__metadata("design:type", String)
|
||||
], User.prototype, "email", void 0);
|
||||
__decorate([
|
||||
(0, Orm_1.column)({ serializeAs: null }),
|
||||
__metadata("design:type", String)
|
||||
], User.prototype, "password", void 0);
|
||||
__decorate([
|
||||
(0, Orm_1.column)(),
|
||||
__metadata("design:type", Object)
|
||||
], User.prototype, "rememberMeToken", void 0);
|
||||
__decorate([
|
||||
Orm_1.column.dateTime({ autoCreate: true }),
|
||||
__metadata("design:type", luxon_1.DateTime)
|
||||
], User.prototype, "createdAt", void 0);
|
||||
__decorate([
|
||||
Orm_1.column.dateTime({ autoCreate: true, autoUpdate: true }),
|
||||
__metadata("design:type", luxon_1.DateTime)
|
||||
], User.prototype, "updatedAt", void 0);
|
||||
__decorate([
|
||||
(0, Orm_1.beforeSave)(),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [User]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], User, "hashPassword", null);
|
||||
exports.default = User;
|
||||
//# sourceMappingURL=User.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../app/Models/User.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,iCAAgC;AAChC,kFAAwC;AACxC,gEAAqE;AAErE,MAAqB,IAAK,SAAQ,eAAS;IAuBlC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAE,IAAU;QAC1C,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;YACxB,IAAI,CAAC,QAAQ,GAAG,MAAM,cAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;SAC/C;IACH,CAAC;CACF;AA1BC;IADC,IAAA,YAAM,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;gCACX;AAGjB;IADC,IAAA,YAAM,GAAE;;oCACY;AAGrB;IADC,IAAA,YAAM,GAAE;;mCACW;AAGpB;IADC,IAAA,YAAM,EAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;;sCACP;AAGvB;IADC,IAAA,YAAM,GAAE;;6CAC4B;AAGrC;IADC,YAAM,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;8BACpB,gBAAQ;uCAAA;AAG1B;IADC,YAAM,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;8BACtC,gBAAQ;uCAAA;AAG1B;IADC,IAAA,gBAAU,GAAE;;qCAC2B,IAAI;;8BAI3C;AA3BH,uBA4BC"}
|
||||
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const Validator_1 = global[Symbol.for('ioc.use')]("Adonis/Core/Validator");
|
||||
class CreateUserValidator {
|
||||
constructor(ctx) {
|
||||
this.ctx = ctx;
|
||||
this.schema = Validator_1.schema.create({
|
||||
pseudo: Validator_1.schema.string(),
|
||||
email: Validator_1.schema.string({}, [Validator_1.rules.email(), Validator_1.rules.unique({ table: 'users', column: 'email' })]),
|
||||
password: Validator_1.schema.string({}, [Validator_1.rules.minLength(4), Validator_1.rules.confirmed()])
|
||||
});
|
||||
this.messages = {
|
||||
required: 'The {{ field }} is required to create a new account',
|
||||
'email.email': 'Vous devez saisir un email dans le champ email',
|
||||
'email.unique': 'Email is already in use',
|
||||
'password.minLength': 'The password must be at least 4 characters long'
|
||||
};
|
||||
}
|
||||
}
|
||||
exports.default = CreateUserValidator;
|
||||
//# sourceMappingURL=CreateUserValidator.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"CreateUserValidator.js","sourceRoot":"","sources":["../../../app/Validators/CreateUserValidator.ts"],"names":[],"mappings":";;AAAA,2EAA0E;AAG1E,MAAqB,mBAAmB;IACtC,YAAsB,GAAwB;QAAxB,QAAG,GAAH,GAAG,CAAqB;QAqBvC,WAAM,GAAG,kBAAM,CAAC,MAAM,CAAC;YAC5B,MAAM,EAAE,kBAAM,CAAC,MAAM,EAAE;YACvB,KAAK,EAAE,kBAAM,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,iBAAK,CAAC,KAAK,EAAE,EAAE,iBAAK,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAE,CAAC;YAC7F,QAAQ,EAAE,kBAAM,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,iBAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,iBAAK,CAAC,SAAS,EAAE,CAAE,CAAC;SACtE,CAAC,CAAA;QAaK,aAAQ,GAAmB;YAChC,QAAQ,EAAE,qDAAqD;YAC/D,aAAa,EAAE,gDAAgD;YAC/D,cAAc,EAAE,yBAAyB;YACzC,oBAAoB,EAAE,iDAAiD;SACxE,CAAA;IA3CgD,CAAC;CA4CnD;AA7CD,sCA6CC"}
|
||||
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const standalone_1 = require("@adonisjs/core/build/standalone");
|
||||
const Application_1 = __importDefault(global[Symbol.for('ioc.use')]("Adonis/Core/Application"));
|
||||
exports.default = (0, standalone_1.listDirectoryFiles)(__dirname, Application_1.default.appRoot, ['./commands/index']);
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../commands/index.ts"],"names":[],"mappings":";;;;;AAAA,gEAAoE;AACpE,gGAAsD;AAiBtD,kBAAe,IAAA,+BAAkB,EAAC,SAAS,EAAE,qBAAW,CAAC,OAAO,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAA"}
|
||||
@@ -0,0 +1,51 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.assets = exports.validator = exports.profiler = exports.logger = exports.http = exports.appKey = void 0;
|
||||
const proxy_addr_1 = __importDefault(require("proxy-addr"));
|
||||
const Env_1 = __importDefault(global[Symbol.for('ioc.use')]("Adonis/Core/Env"));
|
||||
const Application_1 = __importDefault(global[Symbol.for('ioc.use')]("Adonis/Core/Application"));
|
||||
exports.appKey = Env_1.default.get('APP_KEY');
|
||||
exports.http = {
|
||||
allowMethodSpoofing: false,
|
||||
subdomainOffset: 2,
|
||||
generateRequestId: false,
|
||||
trustProxy: proxy_addr_1.default.compile('loopback'),
|
||||
etag: false,
|
||||
jsonpCallbackName: 'callback',
|
||||
cookie: {
|
||||
domain: '',
|
||||
path: '/',
|
||||
maxAge: '2h',
|
||||
httpOnly: true,
|
||||
secure: false,
|
||||
sameSite: false,
|
||||
},
|
||||
};
|
||||
exports.logger = {
|
||||
name: Env_1.default.get('APP_NAME'),
|
||||
enabled: true,
|
||||
level: Env_1.default.get('LOG_LEVEL', 'info'),
|
||||
prettyPrint: Env_1.default.get('NODE_ENV') === 'development',
|
||||
};
|
||||
exports.profiler = {
|
||||
enabled: true,
|
||||
blacklist: [],
|
||||
whitelist: [],
|
||||
};
|
||||
exports.validator = {};
|
||||
exports.assets = {
|
||||
driver: Env_1.default.get('ASSETS_DRIVER'),
|
||||
publicPath: Application_1.default.publicPath('assets'),
|
||||
script: {
|
||||
attributes: {
|
||||
defer: true,
|
||||
},
|
||||
},
|
||||
style: {
|
||||
attributes: {},
|
||||
},
|
||||
};
|
||||
//# sourceMappingURL=app.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../config/app.ts"],"names":[],"mappings":";;;;;;AAOA,4DAAkC;AAClC,gFAAsC;AACtC,gGAAsD;AAoBzC,QAAA,MAAM,GAAW,aAAG,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;AAWnC,QAAA,IAAI,GAAiB;IAYhC,mBAAmB,EAAE,KAAK;IAO1B,eAAe,EAAE,CAAC;IAWlB,iBAAiB,EAAE,KAAK;IAWxB,UAAU,EAAE,oBAAS,CAAC,OAAO,CAAC,UAAU,CAAC;IAUzC,IAAI,EAAE,KAAK;IAOX,iBAAiB,EAAE,UAAU;IAO7B,MAAM,EAAE;QACN,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,GAAG;QACT,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,KAAK;KAChB;CACF,CAAA;AAOY,QAAA,MAAM,GAAiB;IAalC,IAAI,EAAE,aAAG,CAAC,GAAG,CAAC,UAAU,CAAC;IAUzB,OAAO,EAAE,IAAI;IAYb,KAAK,EAAE,aAAG,CAAC,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC;IAWnC,WAAW,EAAE,aAAG,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,aAAa;CACnD,CAAA;AAOY,QAAA,QAAQ,GAAmB;IAStC,OAAO,EAAE,IAAI;IAWb,SAAS,EAAE,EAAE;IAWb,SAAS,EAAE,EAAE;CACd,CAAA;AAWY,QAAA,SAAS,GAAoB,EAAE,CAAA;AAU/B,QAAA,MAAM,GAAwB;IAUzC,MAAM,EAAE,aAAG,CAAC,GAAG,CAAC,eAAe,CAAC;IAWhC,UAAU,EAAE,qBAAW,CAAC,UAAU,CAAC,QAAQ,CAAC;IAU5C,MAAM,EAAE;QACN,UAAU,EAAE;YACV,KAAK,EAAE,IAAI;SACZ;KACF;IAUD,KAAK,EAAE;QACL,UAAU,EAAE,EAAE;KACf;CACF,CAAA"}
|
||||
@@ -0,0 +1,41 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const authConfig = {
|
||||
guard: 'web',
|
||||
guards: {
|
||||
web: {
|
||||
driver: 'session',
|
||||
provider: {
|
||||
driver: 'lucid',
|
||||
identifierKey: 'id',
|
||||
uids: ['email'],
|
||||
model: () => Promise.resolve().then(() => __importStar(global[Symbol.for('ioc.use')]('App/Models/User'))),
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
exports.default = authConfig;
|
||||
//# sourceMappingURL=auth.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../config/auth.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,MAAM,UAAU,GAAe;IAC7B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QAWN,GAAG,EAAE;YACH,MAAM,EAAE,SAAS;YAEjB,QAAQ,EAAE;gBASR,MAAM,EAAE,OAAO;gBAWf,aAAa,EAAE,IAAI;gBAYnB,IAAI,EAAE,CAAC,OAAO,CAAC;gBAaf,KAAK,EAAE,GAAG,EAAE,yEAAQ,iBAAiB,GAAC;aACvC;SACF;KACF;CACF,CAAA;AAED,kBAAe,UAAU,CAAA"}
|
||||
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const bodyParserConfig = {
|
||||
whitelistedMethods: ['POST', 'PUT', 'PATCH', 'DELETE'],
|
||||
json: {
|
||||
encoding: 'utf-8',
|
||||
limit: '1mb',
|
||||
strict: true,
|
||||
types: [
|
||||
'application/json',
|
||||
'application/json-patch+json',
|
||||
'application/vnd.api+json',
|
||||
'application/csp-report',
|
||||
],
|
||||
},
|
||||
form: {
|
||||
encoding: 'utf-8',
|
||||
limit: '1mb',
|
||||
queryString: {},
|
||||
convertEmptyStringsToNull: true,
|
||||
types: ['application/x-www-form-urlencoded'],
|
||||
},
|
||||
raw: {
|
||||
encoding: 'utf-8',
|
||||
limit: '1mb',
|
||||
queryString: {},
|
||||
types: ['text/*'],
|
||||
},
|
||||
multipart: {
|
||||
autoProcess: true,
|
||||
processManually: [],
|
||||
encoding: 'utf-8',
|
||||
convertEmptyStringsToNull: true,
|
||||
maxFields: 1000,
|
||||
limit: '20mb',
|
||||
types: ['multipart/form-data'],
|
||||
},
|
||||
};
|
||||
exports.default = bodyParserConfig;
|
||||
//# sourceMappingURL=bodyparser.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"bodyparser.js","sourceRoot":"","sources":["../../config/bodyparser.ts"],"names":[],"mappings":";;AASA,MAAM,gBAAgB,GAAqB;IAUzC,kBAAkB,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC;IAWtD,IAAI,EAAE;QACJ,QAAQ,EAAE,OAAO;QACjB,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE;YACL,kBAAkB;YAClB,6BAA6B;YAC7B,0BAA0B;YAC1B,wBAAwB;SACzB;KACF;IAWD,IAAI,EAAE;QACJ,QAAQ,EAAE,OAAO;QACjB,KAAK,EAAE,KAAK;QACZ,WAAW,EAAE,EAAE;QAYf,yBAAyB,EAAE,IAAI;QAE/B,KAAK,EAAE,CAAC,mCAAmC,CAAC;KAC7C;IAYD,GAAG,EAAE;QACH,QAAQ,EAAE,OAAO;QACjB,KAAK,EAAE,KAAK;QACZ,WAAW,EAAE,EAAE;QACf,KAAK,EAAE,CAAC,QAAQ,CAAC;KAClB;IAWD,SAAS,EAAE;QAcT,WAAW,EAAE,IAAI;QAsBjB,eAAe,EAAE,EAAE;QAuBnB,QAAQ,EAAE,OAAO;QAYjB,yBAAyB,EAAE,IAAI;QAW/B,SAAS,EAAE,IAAI;QAWf,KAAK,EAAE,MAAM;QAUb,KAAK,EAAE,CAAC,qBAAqB,CAAC;KAC/B;CACF,CAAA;AAED,kBAAe,gBAAgB,CAAA"}
|
||||
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const corsConfig = {
|
||||
enabled: false,
|
||||
origin: true,
|
||||
methods: ['GET', 'HEAD', 'POST', 'PUT', 'DELETE'],
|
||||
headers: true,
|
||||
exposeHeaders: [
|
||||
'cache-control',
|
||||
'content-language',
|
||||
'content-type',
|
||||
'expires',
|
||||
'last-modified',
|
||||
'pragma',
|
||||
],
|
||||
credentials: true,
|
||||
maxAge: 90,
|
||||
};
|
||||
exports.default = corsConfig;
|
||||
//# sourceMappingURL=cors.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"cors.js","sourceRoot":"","sources":["../../config/cors.ts"],"names":[],"mappings":";;AASA,MAAM,UAAU,GAAe;IAa7B,OAAO,EAAE,KAAK;IAwBd,MAAM,EAAE,IAAI;IAYZ,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC;IAmBjD,OAAO,EAAE,IAAI;IAsBb,aAAa,EAAE;QACb,eAAe;QACf,kBAAkB;QAClB,cAAc;QACd,SAAS;QACT,eAAe;QACf,QAAQ;KACT;IAaD,WAAW,EAAE,IAAI;IAWjB,MAAM,EAAE,EAAE;CACX,CAAA;AAED,kBAAe,UAAU,CAAA"}
|
||||
@@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const Env_1 = __importDefault(global[Symbol.for('ioc.use')]("Adonis/Core/Env"));
|
||||
const Application_1 = __importDefault(global[Symbol.for('ioc.use')]("Adonis/Core/Application"));
|
||||
const databaseConfig = {
|
||||
connection: Env_1.default.get('DB_CONNECTION'),
|
||||
connections: {
|
||||
sqlite: {
|
||||
client: 'sqlite',
|
||||
connection: {
|
||||
filename: Application_1.default.tmpPath('db.sqlite3'),
|
||||
},
|
||||
pool: {
|
||||
afterCreate: (conn, cb) => {
|
||||
conn.run('PRAGMA foreign_keys=true', cb);
|
||||
}
|
||||
},
|
||||
migrations: {
|
||||
naturalSort: true,
|
||||
},
|
||||
useNullAsDefault: true,
|
||||
healthCheck: false,
|
||||
debug: false,
|
||||
},
|
||||
}
|
||||
};
|
||||
exports.default = databaseConfig;
|
||||
//# sourceMappingURL=database.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"database.js","sourceRoot":"","sources":["../../config/database.ts"],"names":[],"mappings":";;;;;AAOA,gFAAsC;AACtC,gGAAsD;AAGtD,MAAM,cAAc,GAAmB;IAWrC,UAAU,EAAE,aAAG,CAAC,GAAG,CAAC,eAAe,CAAC;IAEpC,WAAW,EAAE;QAYX,MAAM,EAAE;YACN,MAAM,EAAE,QAAQ;YAChB,UAAU,EAAE;gBACV,QAAQ,EAAE,qBAAW,CAAC,OAAO,CAAC,YAAY,CAAC;aAC5C;YACD,IAAI,EAAE;gBACJ,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE;oBACxB,IAAI,CAAC,GAAG,CAAC,0BAA0B,EAAE,EAAE,CAAC,CAAA;gBAC1C,CAAC;aACF;YACD,UAAU,EAAE;gBACV,WAAW,EAAE,IAAI;aAClB;YACD,gBAAgB,EAAE,IAAI;YACtB,WAAW,EAAE,KAAK;YAClB,KAAK,EAAE,KAAK;SACb;KAEF;CACF,CAAA;AAED,kBAAe,cAAc,CAAA"}
|
||||
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const Env_1 = __importDefault(global[Symbol.for('ioc.use')]("Adonis/Core/Env"));
|
||||
const config_1 = require("@adonisjs/core/build/config");
|
||||
const Application_1 = __importDefault(global[Symbol.for('ioc.use')]("Adonis/Core/Application"));
|
||||
exports.default = (0, config_1.driveConfig)({
|
||||
disk: Env_1.default.get('DRIVE_DISK'),
|
||||
disks: {
|
||||
local: {
|
||||
driver: 'local',
|
||||
visibility: 'public',
|
||||
root: Application_1.default.tmpPath('uploads'),
|
||||
serveFiles: true,
|
||||
basePath: '/uploads',
|
||||
},
|
||||
},
|
||||
});
|
||||
//# sourceMappingURL=drive.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"drive.js","sourceRoot":"","sources":["../../config/drive.ts"],"names":[],"mappings":";;;;;AAOA,gFAAsC;AACtC,wDAAyD;AACzD,gGAAsD;AAWtD,kBAAe,IAAA,oBAAW,EAAC;IAUzB,IAAI,EAAE,aAAG,CAAC,GAAG,CAAC,YAAY,CAAC;IAE3B,KAAK,EAAE;QAUL,KAAK,EAAE;YACL,MAAM,EAAE,OAAO;YACf,UAAU,EAAE,QAAQ;YAWpB,IAAI,EAAE,qBAAW,CAAC,OAAO,CAAC,SAAS,CAAC;YAYpC,UAAU,EAAE,IAAI;YAYhB,QAAQ,EAAE,UAAU;SACrB;KAmEF;CACF,CAAC,CAAA"}
|
||||
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const Env_1 = __importDefault(global[Symbol.for('ioc.use')]("Adonis/Core/Env"));
|
||||
const config_1 = require("@adonisjs/core/build/config");
|
||||
exports.default = (0, config_1.hashConfig)({
|
||||
default: Env_1.default.get('HASH_DRIVER', 'scrypt'),
|
||||
list: {
|
||||
scrypt: {
|
||||
driver: 'scrypt',
|
||||
cost: 16384,
|
||||
blockSize: 8,
|
||||
parallelization: 1,
|
||||
saltSize: 16,
|
||||
keyLength: 64,
|
||||
maxMemory: 32 * 1024 * 1024,
|
||||
},
|
||||
argon: {
|
||||
driver: 'argon2',
|
||||
variant: 'id',
|
||||
iterations: 3,
|
||||
memory: 4096,
|
||||
parallelism: 1,
|
||||
saltSize: 16,
|
||||
},
|
||||
bcrypt: {
|
||||
driver: 'bcrypt',
|
||||
rounds: 10,
|
||||
},
|
||||
},
|
||||
});
|
||||
//# sourceMappingURL=hash.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"hash.js","sourceRoot":"","sources":["../../config/hash.ts"],"names":[],"mappings":";;;;;AAOA,gFAAsC;AACtC,wDAAwD;AAWxD,kBAAe,IAAA,mBAAU,EAAC;IAUxB,OAAO,EAAE,aAAG,CAAC,GAAG,CAAC,aAAa,EAAE,QAAQ,CAAC;IAEzC,IAAI,EAAE;QAcJ,MAAM,EAAE;YACN,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,KAAK;YACX,SAAS,EAAE,CAAC;YACZ,eAAe,EAAE,CAAC;YAClB,QAAQ,EAAE,EAAE;YACZ,SAAS,EAAE,EAAE;YACb,SAAS,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;SAC5B;QAeD,KAAK,EAAE;YACL,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE,IAAI;YACb,UAAU,EAAE,CAAC;YACb,MAAM,EAAE,IAAI;YACZ,WAAW,EAAE,CAAC;YACd,QAAQ,EAAE,EAAE;SACb;QAeD,MAAM,EAAE;YACN,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE,EAAE;SACX;KACF;CACF,CAAC,CAAA"}
|
||||
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const Env_1 = __importDefault(global[Symbol.for('ioc.use')]("Adonis/Core/Env"));
|
||||
const Application_1 = __importDefault(global[Symbol.for('ioc.use')]("Adonis/Core/Application"));
|
||||
const config_1 = require("@adonisjs/session/build/config");
|
||||
exports.default = (0, config_1.sessionConfig)({
|
||||
enabled: true,
|
||||
driver: Env_1.default.get('SESSION_DRIVER'),
|
||||
cookieName: 'adonis-session',
|
||||
clearWithBrowser: false,
|
||||
age: '2h',
|
||||
cookie: {
|
||||
path: '/',
|
||||
httpOnly: true,
|
||||
sameSite: false,
|
||||
},
|
||||
file: {
|
||||
location: Application_1.default.tmpPath('sessions'),
|
||||
},
|
||||
redisConnection: 'local',
|
||||
});
|
||||
//# sourceMappingURL=session.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../config/session.ts"],"names":[],"mappings":";;;;;AAOA,gFAAsC;AACtC,gGAAsD;AACtD,2DAA8D;AAE9D,kBAAe,IAAA,sBAAa,EAAC;IAU3B,OAAO,EAAE,IAAI;IAiBb,MAAM,EAAE,aAAG,CAAC,GAAG,CAAC,gBAAgB,CAAC;IAUjC,UAAU,EAAE,gBAAgB;IAW5B,gBAAgB,EAAE,KAAK;IAgBvB,GAAG,EAAE,IAAI;IAWT,MAAM,EAAE;QACN,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,KAAK;KAChB;IAWD,IAAI,EAAE;QACJ,QAAQ,EAAE,qBAAW,CAAC,OAAO,CAAC,UAAU,CAAC;KAC1C;IAWD,eAAe,EAAE,OAAO;CACzB,CAAC,CAAA"}
|
||||
@@ -0,0 +1,116 @@
|
||||
/**
|
||||
* Config source: https://git.io/JeYHp
|
||||
*
|
||||
* Feel free to let us know via PR, if you find something broken in this config
|
||||
* file.
|
||||
*/
|
||||
|
||||
import Env from '@ioc:Adonis/Core/Env'
|
||||
import Application from '@ioc:Adonis/Core/Application'
|
||||
import { sessionConfig } from '@adonisjs/session/build/config'
|
||||
|
||||
export default sessionConfig({
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Enable/Disable sessions
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Setting the following property to "false" will disable the session for the
|
||||
| entire application
|
||||
|
|
||||
*/
|
||||
enabled: true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The session driver to use. You can choose between one of the following
|
||||
| drivers.
|
||||
|
|
||||
| - cookie (Uses signed cookies to store session values)
|
||||
| - file (Uses filesystem to store session values)
|
||||
| - redis (Uses redis. Make sure to install "@adonisjs/redis" as well)
|
||||
|
|
||||
| Note: Switching drivers will make existing sessions invalid.
|
||||
|
|
||||
*/
|
||||
driver: Env.get('SESSION_DRIVER'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cookie name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The name of the cookie that will hold the session id.
|
||||
|
|
||||
*/
|
||||
cookieName: 'adonis-session',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Clear session when browser closes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Whether or not you want to destroy the session when browser closes. Setting
|
||||
| this value to `true` will ignore the `age`.
|
||||
|
|
||||
*/
|
||||
clearWithBrowser: false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session age
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The duration for which session stays active after no activity. A new HTTP
|
||||
| request to the server is considered as activity.
|
||||
|
|
||||
| The value can be a number in milliseconds or a string that must be valid
|
||||
| as per https://npmjs.org/package/ms package.
|
||||
|
|
||||
| Example: `2 days`, `2.5 hrs`, `1y`, `5s` and so on.
|
||||
|
|
||||
*/
|
||||
age: '2h',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cookie values
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The cookie settings are used to setup the session id cookie and also the
|
||||
| driver will use the same values.
|
||||
|
|
||||
*/
|
||||
cookie: {
|
||||
path: '/',
|
||||
httpOnly: true,
|
||||
sameSite: false,
|
||||
},
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Configuration for the file driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The file driver needs absolute path to the directory in which sessions
|
||||
| must be stored.
|
||||
|
|
||||
*/
|
||||
file: {
|
||||
location: Application.tmpPath('sessions'),
|
||||
},
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Redis driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The redis connection you want session driver to use. The same connection
|
||||
| must be defined inside `config/redis.ts` file as well.
|
||||
|
|
||||
*/
|
||||
redisConnection: 'local',
|
||||
})
|
||||
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.contentTypeSniffing = exports.hsts = exports.xFrame = exports.dnsPrefetch = exports.csrf = exports.csp = void 0;
|
||||
exports.csp = {
|
||||
enabled: false,
|
||||
directives: {},
|
||||
reportOnly: false,
|
||||
};
|
||||
exports.csrf = {
|
||||
enabled: true,
|
||||
exceptRoutes: [],
|
||||
enableXsrfCookie: true,
|
||||
methods: ['POST', 'PUT', 'PATCH', 'DELETE'],
|
||||
};
|
||||
exports.dnsPrefetch = {
|
||||
enabled: true,
|
||||
allow: true,
|
||||
};
|
||||
exports.xFrame = {
|
||||
enabled: true,
|
||||
action: 'DENY',
|
||||
};
|
||||
exports.hsts = {
|
||||
enabled: true,
|
||||
maxAge: '180 days',
|
||||
includeSubDomains: true,
|
||||
preload: false,
|
||||
};
|
||||
exports.contentTypeSniffing = {
|
||||
enabled: true,
|
||||
};
|
||||
//# sourceMappingURL=shield.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"shield.js","sourceRoot":"","sources":["../../config/shield.ts"],"names":[],"mappings":";;;AAkBa,QAAA,GAAG,GAAwB;IAStC,OAAO,EAAE,KAAK;IAkBd,UAAU,EAAE,EAAE;IAWd,UAAU,EAAE,KAAK;CAClB,CAAA;AAWY,QAAA,IAAI,GAAyB;IAMxC,OAAO,EAAE,IAAI;IAmBb,YAAY,EAAE,EAAE;IAgBhB,gBAAgB,EAAE,IAAI;IAUtB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC;CAC5C,CAAA;AAaY,QAAA,WAAW,GAAgC;IAMtD,OAAO,EAAE,IAAI;IAcb,KAAK,EAAE,IAAI;CACZ,CAAA;AAgBY,QAAA,MAAM,GAA2B;IAC5C,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,MAAM;CACf,CAAA;AAaY,QAAA,IAAI,GAAyB;IACxC,OAAO,EAAE,IAAI;IAUb,MAAM,EAAE,UAAU;IAUlB,iBAAiB,EAAE,IAAI;IAWvB,OAAO,EAAE,KAAK;CACf,CAAA;AAcY,QAAA,mBAAmB,GAAwC;IACtE,OAAO,EAAE,IAAI;CACd,CAAA"}
|
||||
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const staticConfig = {
|
||||
enabled: true,
|
||||
dotFiles: 'ignore',
|
||||
etag: true,
|
||||
lastModified: true,
|
||||
maxAge: 0,
|
||||
immutable: false,
|
||||
};
|
||||
exports.default = staticConfig;
|
||||
//# sourceMappingURL=static.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"static.js","sourceRoot":"","sources":["../../config/static.ts"],"names":[],"mappings":";;AASA,MAAM,YAAY,GAAiB;IAajC,OAAO,EAAE,IAAI;IAgBb,QAAQ,EAAE,QAAQ;IAWlB,IAAI,EAAE,IAAI;IAWV,YAAY,EAAE,IAAI;IAalB,MAAM,EAAE,CAAC;IAYT,SAAS,EAAE,KAAK;CACjB,CAAA;AAED,kBAAe,YAAY,CAAA"}
|
||||
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=auth.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../contracts/auth.ts"],"names":[],"mappings":""}
|
||||
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=drive.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"drive.js","sourceRoot":"","sources":["../../contracts/drive.ts"],"names":[],"mappings":""}
|
||||
@@ -0,0 +1 @@
|
||||
//# sourceMappingURL=env.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../contracts/env.ts"],"names":[],"mappings":""}
|
||||
@@ -0,0 +1 @@
|
||||
//# sourceMappingURL=events.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../contracts/events.ts"],"names":[],"mappings":""}
|
||||
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=hash.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"hash.js","sourceRoot":"","sources":["../../contracts/hash.ts"],"names":[],"mappings":""}
|
||||
@@ -0,0 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
require("@japa/runner");
|
||||
//# sourceMappingURL=tests.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"tests.js","sourceRoot":"","sources":["../../contracts/tests.ts"],"names":[],"mappings":";;AAOA,wBAAqB"}
|
||||
@@ -0,0 +1 @@
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../database/factories/index.ts"],"names":[],"mappings":""}
|
||||
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const Schema_1 = __importDefault(global[Symbol.for('ioc.use')]("Adonis/Lucid/Schema"));
|
||||
class default_1 extends Schema_1.default {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.tableName = 'users';
|
||||
}
|
||||
async up() {
|
||||
this.schema.createTable(this.tableName, (table) => {
|
||||
table.increments('id').primary();
|
||||
table.string('pseudo', 50).notNullable;
|
||||
table.string('email', 255).notNullable().unique();
|
||||
table.string('password', 180).notNullable();
|
||||
table.string('remember_me_token').nullable();
|
||||
table.timestamp('created_at', { useTz: true }).notNullable();
|
||||
table.timestamp('updated_at', { useTz: true }).notNullable();
|
||||
});
|
||||
}
|
||||
async down() {
|
||||
this.schema.dropTable(this.tableName);
|
||||
}
|
||||
}
|
||||
exports.default = default_1;
|
||||
//# sourceMappingURL=1698786769334_users.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"1698786769334_users.js","sourceRoot":"","sources":["../../../database/migrations/1698786769334_users.ts"],"names":[],"mappings":";;;;;AAAA,uFAAiD;AAEjD,eAAqB,SAAQ,gBAAU;IAAvC;;QACY,cAAS,GAAG,OAAO,CAAA;IAiB/B,CAAC;IAfQ,KAAK,CAAC,EAAE;QACb,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE;YAChD,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAA;YAChC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,WAAW,CAAA;YACtC,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,CAAA;YACjD,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,CAAA;YAC3C,KAAK,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,QAAQ,EAAE,CAAA;YAC5C,KAAK,CAAC,SAAS,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAA;YAC5D,KAAK,CAAC,SAAS,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAA;QAC9D,CAAC,CAAC,CAAA;IACJ,CAAC;IAEM,KAAK,CAAC,IAAI;QACf,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACvC,CAAC;CACF;AAlBD,4BAkBC"}
|
||||
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const Env_1 = __importDefault(global[Symbol.for('ioc.use')]("Adonis/Core/Env"));
|
||||
exports.default = Env_1.default.rules({
|
||||
HOST: Env_1.default.schema.string({ format: 'host' }),
|
||||
PORT: Env_1.default.schema.number(),
|
||||
APP_KEY: Env_1.default.schema.string(),
|
||||
APP_NAME: Env_1.default.schema.string(),
|
||||
CACHE_VIEWS: Env_1.default.schema.boolean(),
|
||||
SESSION_DRIVER: Env_1.default.schema.string(),
|
||||
DRIVE_DISK: Env_1.default.schema.enum(['local']),
|
||||
NODE_ENV: Env_1.default.schema.enum(['development', 'production', 'test']),
|
||||
});
|
||||
//# sourceMappingURL=env.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"env.js","sourceRoot":"","sources":["../env.ts"],"names":[],"mappings":";;;;;AAcA,gFAAsC;AAEtC,kBAAe,aAAG,CAAC,KAAK,CAAC;IACvB,IAAI,EAAE,aAAG,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAC3C,IAAI,EAAE,aAAG,CAAC,MAAM,CAAC,MAAM,EAAE;IACzB,OAAO,EAAE,aAAG,CAAC,MAAM,CAAC,MAAM,EAAE;IAC5B,QAAQ,EAAE,aAAG,CAAC,MAAM,CAAC,MAAM,EAAE;IAC7B,WAAW,EAAE,aAAG,CAAC,MAAM,CAAC,OAAO,EAAE;IACjC,cAAc,EAAE,aAAG,CAAC,MAAM,CAAC,MAAM,EAAE;IACnC,UAAU,EAAE,aAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAU,CAAC;IAC/C,QAAQ,EAAE,aAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,YAAY,EAAE,MAAM,CAAU,CAAC;CAC1E,CAAC,CAAA"}
|
||||
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"name": "nups-web",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "node ace serve --watch",
|
||||
"build": "node ace build --production",
|
||||
"start": "node server.js",
|
||||
"test": "node ace test",
|
||||
"lint": "eslint . --ext=.ts",
|
||||
"format": "prettier --write ."
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"plugin:adonis/typescriptApp",
|
||||
"prettier"
|
||||
],
|
||||
"plugins": [
|
||||
"prettier"
|
||||
],
|
||||
"rules": {
|
||||
"prettier/prettier": [
|
||||
"error"
|
||||
]
|
||||
}
|
||||
},
|
||||
"eslintIgnore": [
|
||||
"build"
|
||||
],
|
||||
"prettier": {
|
||||
"trailingComma": "es5",
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"useTabs": false,
|
||||
"quoteProps": "consistent",
|
||||
"bracketSpacing": true,
|
||||
"arrowParens": "always",
|
||||
"printWidth": 100
|
||||
},
|
||||
"devDependencies": {
|
||||
"@adonisjs/assembler": "^5.9.6",
|
||||
"@babel/core": "^7.23.2",
|
||||
"@babel/preset-env": "^7.23.2",
|
||||
"@japa/preset-adonis": "^1.2.0",
|
||||
"@japa/runner": "^2.5.1",
|
||||
"@symfony/webpack-encore": "^4.1.1",
|
||||
"@types/proxy-addr": "^2.0.2",
|
||||
"@types/source-map-support": "^0.5.9",
|
||||
"adonis-preset-ts": "^2.1.0",
|
||||
"eslint": "^8.52.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-plugin-adonis": "^2.1.1",
|
||||
"eslint-plugin-prettier": "^5.0.1",
|
||||
"pino-pretty": "^10.2.3",
|
||||
"prettier": "^3.0.3",
|
||||
"typescript": "~4.6",
|
||||
"webpack": "^5.89.0",
|
||||
"webpack-cli": "^4.10.0",
|
||||
"youch": "^3.3.2",
|
||||
"youch-terminal": "^2.2.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@adonisjs/auth": "^8.2.3",
|
||||
"@adonisjs/core": "^5.9.0",
|
||||
"@adonisjs/lucid": "^18.4.2",
|
||||
"@adonisjs/repl": "^3.1.11",
|
||||
"@adonisjs/session": "^6.4.0",
|
||||
"@adonisjs/shield": "^7.1.1",
|
||||
"@adonisjs/view": "^6.2.0",
|
||||
"bootstrap": "^5.3.2",
|
||||
"luxon": "^3.4.3",
|
||||
"phc-argon2": "^1.1.4",
|
||||
"proxy-addr": "^2.0.7",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"source-map-support": "^0.5.21",
|
||||
"sqlite3": "^5.1.6"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
class AppProvider {
|
||||
constructor(app) {
|
||||
this.app = app;
|
||||
}
|
||||
register() {
|
||||
}
|
||||
async boot() {
|
||||
}
|
||||
async ready() {
|
||||
}
|
||||
async shutdown() {
|
||||
}
|
||||
}
|
||||
exports.default = AppProvider;
|
||||
//# sourceMappingURL=AppProvider.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"AppProvider.js","sourceRoot":"","sources":["../../providers/AppProvider.ts"],"names":[],"mappings":";;AAEA,MAAqB,WAAW;IAC9B,YAAsB,GAAwB;QAAxB,QAAG,GAAH,GAAG,CAAqB;IAAG,CAAC;IAE3C,QAAQ;IAEf,CAAC;IAEM,KAAK,CAAC,IAAI;IAEjB,CAAC;IAEM,KAAK,CAAC,KAAK;IAElB,CAAC;IAEM,KAAK,CAAC,QAAQ;IAErB,CAAC;CACF;AAlBD,8BAkBC"}
|
||||
|
After Width: | Height: | Size: 44 KiB |
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"entrypoints": {
|
||||
"index": {
|
||||
"css": [
|
||||
"/assets/index.7668700c.css"
|
||||
],
|
||||
"js": [
|
||||
"/assets/index.31d6cfe0.js"
|
||||
]
|
||||
},
|
||||
"form": {
|
||||
"css": [
|
||||
"/assets/form.d255c0c6.css"
|
||||
],
|
||||
"js": [
|
||||
"/assets/form.31d6cfe0.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
@import url(https://fonts.googleapis.com/css?family=Poppins:400,500,600,700,800,900);body{background-color:#1f2029;color:#c4c3ca;font-family:Poppins,sans-serif;font-size:15px;font-weight:300;line-height:1.7;overflow-x:hidden}a{cursor:pointer;transition:all .2s linear}a:hover{text-decoration:none}.link{color:#c4c3ca}.link:hover{color:#ffeba7}p{font-size:14px;font-weight:500;line-height:1.7}h4{font-weight:600}h6 span{font-weight:700;padding:0 20px;text-transform:uppercase}.section{display:block;position:relative;width:100%}.full-height{min-height:100vh}[type=checkbox]:checked,[type=checkbox]:not(:checked){left:-9999px;position:absolute}.checkbox:checked+label,.checkbox:not(:checked)+label{background-color:#ffeba7;border-radius:8px;cursor:pointer;display:block;height:16px;margin:10px auto;padding:0;position:relative;text-align:center;width:60px}.checkbox:checked+label:before,.checkbox:not(:checked)+label:before{background-color:#102770;border-radius:50%;color:#ffeba7;content:"\eb4f";display:block;font-family:unicons;font-size:24px;height:36px;left:-10px;line-height:36px;position:absolute;text-align:center;top:-10px;transition:all .5s ease;width:36px;z-index:20}.checkbox:checked+label:before{transform:translateX(44px) rotate(-270deg)}.card-3d-wrap{height:400px;margin-top:60px;max-width:100%;perspective:800px;position:relative;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;width:440px}.card-3d-wrapper{transition:all .6s ease-out}.card-3d-wrapper,.card-back,.card-front{height:100%;left:0;position:absolute;top:0;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;width:100%}.card-back,.card-front{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden;background-color:#2a2b38;background-image:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/1462889/pat.svg);background-position:bottom;background-repeat:no-repeat;background-size:300%;border-radius:6px}.card-back,.checkbox:checked~.card-3d-wrap .card-3d-wrapper{transform:rotateY(180deg)}.center-wrap{display:block;left:0;padding:0 35px;position:absolute;top:50%;transform:translate3d(0,-50%,35px) perspective(100px);width:100%;z-index:20}.form-group{display:block;margin:0;padding:0;position:relative}.form-style{background-color:#1f2029;border-radius:4px;color:#c4c3ca;font-size:14px;font-weight:500;height:48px;letter-spacing:.5px;line-height:22px;padding:13px 20px 13px 55px;-webkit-transition:all .2s linear;transition:all .2s linear;width:100%}.form-style,.form-style:active,.form-style:focus{border:none;box-shadow:0 4px 8px 0 hsla(0,0%,8%,.2);outline:none}.input-icon{color:#ffeba7;font-size:24px;height:48px;left:18px;line-height:48px;position:absolute;text-align:left;top:0;-webkit-transition:all .2s linear;transition:all .2s linear}.form-group input:-ms-input-placeholder{color:#c4c3ca;opacity:.7;-webkit-transition:all .2s linear;transition:all .2s linear}.form-group input:-moz-placeholder,.form-group input::-moz-placeholder{color:#c4c3ca;opacity:.7;-webkit-transition:all .2s linear;transition:all .2s linear}.form-group input::-webkit-input-placeholder{color:#c4c3ca;opacity:.7;-webkit-transition:all .2s linear;transition:all .2s linear}.form-group input:focus:-ms-input-placeholder{opacity:0;-webkit-transition:all .2s linear;transition:all .2s linear}.form-group input:focus:-moz-placeholder,.form-group input:focus::-moz-placeholder{opacity:0;-webkit-transition:all .2s linear;transition:all .2s linear}.form-group input:focus::-webkit-input-placeholder{opacity:0;-webkit-transition:all .2s linear;transition:all .2s linear}.btn{-ms-flex-pack:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;align-items:center;background-color:#ffeba7;border:none;border-radius:4px;box-shadow:0 8px 24px 0 rgba(255,235,167,.2);color:#102770;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;font-size:13px;font-weight:600;height:44px;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;justify-content:center;letter-spacing:1px;padding:0 30px;text-align:center;text-transform:uppercase;-webkit-transition:all .2s linear;transition:all .2s linear}.btn:active,.btn:focus,.btn:hover{background-color:#102770;box-shadow:0 8px 24px 0 rgba(16,39,112,.2);color:#ffeba7}.logo{display:block;position:absolute;right:30px;top:30px;transition:all .25s linear;z-index:100}.logo img{display:block;height:26px;width:auto}
|
||||
@@ -0,0 +1 @@
|
||||
@import url(https://fonts.googleapis.com/css?family=Roboto:400,900);*{font-family:Roboto,sans-serif;margin:0;padding:0}body{font-family:Arial,sans-serif}nav{align-items:center;background-color:#333;color:#fff;display:flex;justify-content:space-between}nav li{margin:0;padding:0}nav a{color:#fff;padding:5px 15px;transition:.4s}nav a:hover{background-color:#555}body{justify-content:space-around;margin:auto;max-width:2500px}main,section{margin:100px}h1{font-size:40px;margin-bottom:30px}h1,h2{font-weight:700}h2{font-size:28px;margin-bottom:10px}.barre-verticale{border-left:5px solid #5e5e5e;margin-bottom:10px;padding-left:15px}.citation{color:#3d3d3d;font-style:italic}.citation-auth{color:#3d3d3d;margin-bottom:40px}main{display:flex}.main-left{margin-right:40px}.main-right{margin-left:40px;min-width:40%}nav ul{align-items:center;display:flex;height:50px;justify-content:space-around;margin:0 50px;padding:0}nav li,nav ul{list-style:none}nav li{margin:0 5px}nav a{border:2px solid #535353;border-radius:5px;color:#535353;cursor:pointer;font-weight:700;padding:5px 10px;text-decoration:none}nav a:hover{border-color:gray;color:gray}.div-lien div{align-items:center;background-color:#d8d8d8;border-radius:5px;color:#555;cursor:pointer;display:flex;flex-direction:row;font-weight:700;margin:5px 0;padding:20px 40px;text-align:left;text-decoration:none}.div-lien div:hover{background-color:#b1b1b1}.div-lien a{text-decoration:none}.div-lien img{padding-right:15px;width:50px}@media (max-width:800px){.main-right{display:none}main,section{margin:20px}nav ul{margin:0}}.pp{border-radius:50%;margin:auto;max-width:500px;width:100%}form{background-color:#fff;border:1px solid #ddd;border-radius:5px;margin:0 auto;padding:20px;width:60%}label{display:block;margin-top:10px}input[type=email],input[type=text],textarea{border:1px solid #ddd;border-radius:5px;margin-top:5px;padding:10px;width:100%}input[type=submit]{background-color:#333;border:none;border-radius:5px;color:#fff;cursor:pointer;margin-top:10px;padding:10px 20px}input[type=submit]:hover{background-color:#555}.all_projects{display:flex;flex-wrap:wrap;justify-content:center}.all_projects div{background-color:aqua;height:300px;margin:10px;width:300px}.compte{align-items:center;display:flex;flex-direction:row;margin:0 50px}.compte *{margin:0 5px}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"assets/index.css": "/assets/index.7668700c.css",
|
||||
"assets/index.js": "/assets/index.31d6cfe0.js",
|
||||
"assets/form.css": "/assets/form.d255c0c6.css",
|
||||
"assets/form.js": "/assets/form.31d6cfe0.js"
|
||||
}
|
||||
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 185 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 310 KiB |
@@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Login</title>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="https://unicons.iconscout.com/release/v2.1.9/css/unicons.css">
|
||||
@entryPointStyles('form')
|
||||
@entryPointScripts('form')
|
||||
</head>
|
||||
<body>
|
||||
<a href="{{ route('home') }}" class="logo">
|
||||
<img src="/logo.png" alt="">
|
||||
</a>
|
||||
|
||||
<div class="section">
|
||||
<div class="container">
|
||||
<div class="row full-height justify-content-center">
|
||||
<div class="col-12 text-center align-self-center py-5">
|
||||
<div class="section pb-5 pt-5 pt-sm-2 text-center">
|
||||
<h6 class="mb-0 pb-3"><span>Log In </span><span>Sign Up</span></h6>
|
||||
<input class="checkbox" type="checkbox" id="reg-log" name="reg-log"/>
|
||||
<label for="reg-log"></label>
|
||||
@!component('components/flash')
|
||||
<div class="card-3d-wrap mx-auto">
|
||||
<div class="card-3d-wrapper">
|
||||
<div class="card-front">
|
||||
<div class="center-wrap">
|
||||
<div class="section text-center">
|
||||
<h4 class="mb-4 pb-3">Log In</h4>
|
||||
<form action="{{ route('login') }}" method="post">
|
||||
<div class="form-group">
|
||||
<input type="email" name="loginemail" class="form-style" placeholder="Your Email" id="logemail" autocomplete="off">
|
||||
<i class="input-icon uil uil-at"></i>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<input type="password" name="loginpassword" class="form-style" placeholder="Your Password" id="logpass" autocomplete="off">
|
||||
<i class="input-icon uil uil-lock-alt"></i>
|
||||
</div>
|
||||
<button class="btn mt-4">submit</button>
|
||||
</form>
|
||||
<p class="mb-0 mt-4 text-center"><a href="#0" class="link">Forgot your password?</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-back">
|
||||
<div class="center-wrap">
|
||||
<div class="section text-center">
|
||||
<h4 class="mb-4 pb-3">Sign Up</h4>
|
||||
<form action="{{ route('signup') }}" method="post">
|
||||
<div class="form-group">
|
||||
<input type="text" name="pseudo" class="form-style" placeholder="Your Full Name" id="logname" autocomplete="off">
|
||||
<i class="input-icon uil uil-user"></i>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<input type="email" name="email" class="form-style" placeholder="Your Email" id="logemail" autocomplete="off">
|
||||
<i class="input-icon uil uil-at"></i>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<input type="password" name="password" class="form-style" placeholder="Your Password" id="logpass" autocomplete="off">
|
||||
<i class="input-icon uil uil-lock-alt"></i>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<input type="password" name="password_confirmation" class="form-style" placeholder="Confirm Your Password" id="logpass" autocomplete="off">
|
||||
<i class="input-icon uil uil-lock-alt"></i>
|
||||
</div>
|
||||
<button class="btn mt-4">submit</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,31 @@
|
||||
@if(flashMessages.has('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ flashMessages.get('success') }}
|
||||
</div>
|
||||
@end
|
||||
|
||||
@if(flashMessages.has('error'))
|
||||
<div class="alert alert-danger">
|
||||
{{ flashMessages.get('error') }}
|
||||
</div>
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@if(flashMessages.has('errors.pseudo'))
|
||||
<div class="alert alert-danger">
|
||||
{{ flashMessages.get('errors.pseudo') }}
|
||||
</div>
|
||||
@end
|
||||
|
||||
@if(flashMessages.has('errors.email'))
|
||||
<div class="alert alert-danger">
|
||||
{{ flashMessages.get('errors.email') }}
|
||||
</div>
|
||||
@end
|
||||
|
||||
@if(flashMessages.has('errors.password'))
|
||||
<div class="alert alert-danger">
|
||||
{{ flashMessages.get('errors.password') }}
|
||||
</div>
|
||||
@end
|
||||
@@ -0,0 +1 @@
|
||||
<p> It's a 404 </p>
|
||||
@@ -0,0 +1 @@
|
||||
<p> It's a 500 </p>
|
||||
@@ -0,0 +1 @@
|
||||
<p> It's a 403 </p>
|
||||
@@ -0,0 +1,108 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<title>Arthur</title>
|
||||
@entryPointStyles('index')
|
||||
@entryPointScripts('index')
|
||||
</head>
|
||||
<body>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="#">Home</a></li>
|
||||
<li><a href="#about">About</a></li>
|
||||
<li><a href="#projects">Projects</a></li>
|
||||
<li><a href="#contact">Contact</a></li>
|
||||
</ul>
|
||||
<div class="compte">
|
||||
@if(auth.user)
|
||||
<p>Welcome {{ auth.user.pseudo }}</p>
|
||||
<a href="{{ route('logout') }}">Logout</a>
|
||||
@else
|
||||
<a href="{{ route('auth') }}">Login</a>
|
||||
<a href="{{ route('auth') }}">Signup</a>
|
||||
@end
|
||||
</div>
|
||||
</nav>
|
||||
<main>
|
||||
<div class="main-left">
|
||||
<h1>Hi! 👋🏻<br>I'm Arthur.</h1>
|
||||
<h2>Founder</h2>
|
||||
|
||||
<div class="barre-verticale">
|
||||
<p>I am a young Frenchman with a passion for development, I am a self-taught learner and my creativity knows no limits. Every pixel I edit tells a story. Passionate about transforming ideas into visually captivating experiences, I create projects that push the boundaries of design innovation.</p>
|
||||
</div>
|
||||
|
||||
<p class="citation">"In the middle of every difficulty lies opportunity."</p>
|
||||
<p class="citation-auth">Albert Einstein</p>
|
||||
|
||||
<ul class="div-lien">
|
||||
<a href="https://www.instagram.com/arthur.pbty/" target="_blank"><div><img src="/logo insta.png" alt="Logo">Instagram</div></a>
|
||||
<a href="https://github.com/Tutur33" target="_blank"><div><img src="/logo github.png" alt="Logo">Github</div></a>
|
||||
<a href="https://discord.gg/HxgaA44CPh" target="_blank"><div><img src="/Logo Discord.png" alt="Logo">Discord</div></a>
|
||||
<a href="http://tuturp33.000webhostapp.com" target="_blank"><div><img src="/other.png" alt="Logo">Other...</div></a>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="main-right">
|
||||
<img src="/pp.jpg" alt="Profile picture" class="pp">
|
||||
</div>
|
||||
</main>
|
||||
<section id="about">
|
||||
<h2>About</h2>
|
||||
<p>Good morning ! I'm Arthur, a passionate developer based in France. My journey in the world of development is an inspiring adventure. Every line of code I write is a step toward creating unique and engaging experiences. I am driven by the desire to bring ideas to life and shape them into innovative designs.</p>
|
||||
|
||||
<h3>My background</h3>
|
||||
<p>I gained experience in web development working on various projects, ranging from front-end to back-end. I have a deep command of languages like HTML, CSS, JavaScript, and have worked with modern frameworks like React and Node.js.</p>
|
||||
|
||||
<h3>My philosophy</h3>
|
||||
<p>I firmly believe that every difficulty is an opportunity to create something new and exciting. My approach is to combine functionality and aesthetics to deliver exceptional user experiences.</p>
|
||||
|
||||
<h3>My skills</h3>
|
||||
<p>Web development, web design, application development, project management.</p>
|
||||
|
||||
<h3>My interests</h3>
|
||||
<p>Outside of development, I love exploring new places, photography, and reading books about technology and creativity. And go sailing!</p>
|
||||
|
||||
<h3>My vision</h3>
|
||||
<p>My visionMy goal is to continue to learn, innovate and inspire through my projects. I want to help create a better, more engaging web for everyone.</p>
|
||||
|
||||
<br>
|
||||
<p>Please feel free to contact me if you have any questions or would like to collaborate on an exciting project. You can reach me via [your email address] or follow me on social media using the links below.</p>
|
||||
</section>
|
||||
<section id="projects">
|
||||
<h2>Projects</h2>
|
||||
|
||||
<div class="all_projects">
|
||||
<div>1</div>
|
||||
<div>2</div>
|
||||
<div>3</div>
|
||||
<div>4</div>
|
||||
<div>5</div>
|
||||
<div>6</div>
|
||||
<div>7</div>
|
||||
<div>8</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="contact">
|
||||
<h2>Contact</h2>
|
||||
|
||||
<form action="envoyer.php" method="post">
|
||||
<label for="nom">Nom :</label>
|
||||
<input type="text" id="nom" name="nom" required>
|
||||
<br>
|
||||
|
||||
<label for="email">E-mail :</label>
|
||||
<input type="email" id="email" name="email" required>
|
||||
<br>
|
||||
|
||||
<label for="message">Message :</label>
|
||||
<textarea id="message" name="message" rows="4" required></textarea>
|
||||
<br>
|
||||
|
||||
<input type="submit" value="Envoyer">
|
||||
</form>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
require("reflect-metadata");
|
||||
const source_map_support_1 = __importDefault(require("source-map-support"));
|
||||
const standalone_1 = require("@adonisjs/core/build/standalone");
|
||||
source_map_support_1.default.install({ handleUncaughtExceptions: false });
|
||||
new standalone_1.Ignitor(__dirname).httpServer().start();
|
||||
//# sourceMappingURL=server.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"server.js","sourceRoot":"","sources":["../server.ts"],"names":[],"mappings":";;;;;AAYA,4BAAyB;AACzB,4EAAiD;AACjD,gEAAyD;AAEzD,4BAAgB,CAAC,OAAO,CAAC,EAAE,wBAAwB,EAAE,KAAK,EAAE,CAAC,CAAA;AAE7D,IAAI,oBAAO,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,CAAA"}
|
||||
@@ -0,0 +1,37 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const Server_1 = __importDefault(global[Symbol.for('ioc.use')]("Adonis/Core/Server"));
|
||||
Server_1.default.middleware.register([
|
||||
() => Promise.resolve().then(() => __importStar(global[Symbol.for('ioc.use')]("Adonis/Core/BodyParser"))),
|
||||
() => Promise.resolve().then(() => __importStar(global[Symbol.for('ioc.use')]('App/Middleware/SilentAuth')))
|
||||
]);
|
||||
Server_1.default.middleware.registerNamed({
|
||||
auth: () => Promise.resolve().then(() => __importStar(global[Symbol.for('ioc.use')]('App/Middleware/Auth')))
|
||||
});
|
||||
//# sourceMappingURL=kernel.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"kernel.js","sourceRoot":"","sources":["../../start/kernel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,sFAA4C;AAW5C,gBAAM,CAAC,UAAU,CAAC,QAAQ,CAAC;IACxB,GAAG,EAAE,oGAAsC;IAC3C,GAAG,EAAE,yEAAQ,2BAA2B,GAAC;CAC3C,CAAC,CAAA;AAkBF,gBAAM,CAAC,UAAU,CAAC,aAAa,CAAC;IAC7B,IAAI,EAAE,GAAG,EAAE,yEAAQ,qBAAqB,GAAC;CAC3C,CAAC,CAAA"}
|
||||
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const Route_1 = __importDefault(global[Symbol.for('ioc.use')]("Adonis/Core/Route"));
|
||||
Route_1.default.get('/', 'HomeController.index').as('home');
|
||||
Route_1.default.get('/auth', 'AuthController.index').as('auth');
|
||||
Route_1.default.post('/login', 'AuthController.login').as('login');
|
||||
Route_1.default.post('/signup', 'AuthController.signup').as('signup');
|
||||
Route_1.default.get('/logout', 'AuthController.logout').as('logout');
|
||||
//# sourceMappingURL=routes.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../start/routes.ts"],"names":[],"mappings":";;;;;AAoBA,oFAA0C;AAE1C,eAAK,CAAC,GAAG,CAAC,GAAG,EAAE,sBAAsB,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAA;AAEjD,eAAK,CAAC,GAAG,CAAC,OAAO,EAAE,sBAAsB,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAA;AACrD,eAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,sBAAsB,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAA;AACxD,eAAK,CAAC,IAAI,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAA;AAC3D,eAAK,CAAC,GAAG,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAA"}
|
||||
@@ -0,0 +1,54 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
process.env.NODE_ENV = 'test';
|
||||
require("reflect-metadata");
|
||||
const source_map_support_1 = __importDefault(require("source-map-support"));
|
||||
const standalone_1 = require("@adonisjs/core/build/standalone");
|
||||
const runner_1 = require("@japa/runner");
|
||||
source_map_support_1.default.install({ handleUncaughtExceptions: false });
|
||||
const kernel = new standalone_1.Ignitor(__dirname).kernel('test');
|
||||
kernel
|
||||
.boot()
|
||||
.then(() => Promise.resolve().then(() => __importStar(require('./tests/bootstrap'))))
|
||||
.then(({ runnerHooks, ...config }) => {
|
||||
const app = [() => kernel.start()];
|
||||
(0, runner_1.configure)({
|
||||
...kernel.application.rcFile.tests,
|
||||
...(0, runner_1.processCliArgs)(process.argv.slice(2)),
|
||||
...config,
|
||||
...{
|
||||
importer: (filePath) => Promise.resolve().then(() => __importStar(require(filePath))),
|
||||
setup: app.concat(runnerHooks.setup),
|
||||
teardown: runnerHooks.teardown,
|
||||
},
|
||||
cwd: kernel.application.appRoot,
|
||||
});
|
||||
(0, runner_1.run)();
|
||||
});
|
||||
//# sourceMappingURL=test.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,OAAO,CAAC,GAAG,CAAC,QAAQ,GAAG,MAAM,CAAA;AAE7B,4BAAyB;AACzB,4EAAiD;AACjD,gEAAyD;AACzD,yCAAiF;AAEjF,4BAAgB,CAAC,OAAO,CAAC,EAAE,wBAAwB,EAAE,KAAK,EAAE,CAAC,CAAA;AAE7D,MAAM,MAAM,GAAG,IAAI,oBAAO,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;AAEpD,MAAM;KACH,IAAI,EAAE;KACN,IAAI,CAAC,GAAG,EAAE,mDAAQ,mBAAmB,GAAC,CAAC;KACvC,IAAI,CAAC,CAAC,EAAE,WAAW,EAAE,GAAG,MAAM,EAAE,EAAE,EAAE;IACnC,MAAM,GAAG,GAAyB,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAA;IAExD,IAAA,kBAAS,EAAC;QACR,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK;QAClC,GAAG,IAAA,uBAAc,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACxC,GAAG,MAAM;QACT,GAAG;YACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,mDAAQ,QAAQ,GAAC;YACxC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC;YACpC,QAAQ,EAAE,WAAW,CAAC,QAAQ;SAC/B;QACD,GAAG,EAAE,MAAM,CAAC,WAAW,CAAC,OAAO;KAChC,CAAC,CAAA;IAEF,IAAA,YAAG,GAAE,CAAA;AACP,CAAC,CAAC,CAAA"}
|
||||
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.configureSuite = exports.runnerHooks = exports.reporters = exports.plugins = void 0;
|
||||
const TestUtils_1 = __importDefault(global[Symbol.for('ioc.use')]("Adonis/Core/TestUtils"));
|
||||
const preset_adonis_1 = require("@japa/preset-adonis");
|
||||
exports.plugins = [(0, preset_adonis_1.assert)(), (0, preset_adonis_1.runFailedTests)(), (0, preset_adonis_1.apiClient)()];
|
||||
exports.reporters = [(0, preset_adonis_1.specReporter)()];
|
||||
exports.runnerHooks = {
|
||||
setup: [() => TestUtils_1.default.ace().loadCommands()],
|
||||
teardown: [],
|
||||
};
|
||||
const configureSuite = (suite) => {
|
||||
if (suite.name === 'functional') {
|
||||
suite.setup(() => TestUtils_1.default.httpServer().start());
|
||||
}
|
||||
};
|
||||
exports.configureSuite = configureSuite;
|
||||
//# sourceMappingURL=bootstrap.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../tests/bootstrap.ts"],"names":[],"mappings":";;;;;;AAQA,4FAAkD;AAClD,uDAAqF;AAaxE,QAAA,OAAO,GAAgC,CAAC,IAAA,sBAAM,GAAE,EAAE,IAAA,8BAAc,GAAE,EAAE,IAAA,yBAAS,GAAE,CAAC,CAAA;AAYhF,QAAA,SAAS,GAAkC,CAAC,IAAA,4BAAY,GAAE,CAAC,CAAA;AAc3D,QAAA,WAAW,GAAiD;IACvE,KAAK,EAAE,CAAC,GAAG,EAAE,CAAC,mBAAS,CAAC,GAAG,EAAE,CAAC,YAAY,EAAE,CAAC;IAC7C,QAAQ,EAAE,EAAE;CACb,CAAA;AAaM,MAAM,cAAc,GAAuC,CAAC,KAAK,EAAE,EAAE;IAC1E,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,EAAE;QAC/B,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,mBAAS,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC,CAAA;KAClD;AACH,CAAC,CAAA;AAJY,QAAA,cAAc,kBAI1B"}
|
||||
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const runner_1 = require("@japa/runner");
|
||||
(0, runner_1.test)('display welcome page', async ({ client }) => {
|
||||
const response = await client.get('/');
|
||||
response.assertStatus(200);
|
||||
response.assertTextIncludes('<h1 class="title"> It Works! </h1>');
|
||||
});
|
||||
//# sourceMappingURL=hello_world.spec.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"hello_world.spec.js","sourceRoot":"","sources":["../../../tests/functional/hello_world.spec.ts"],"names":[],"mappings":";;AAAA,yCAAmC;AAEnC,IAAA,aAAI,EAAC,sBAAsB,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;IAChD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IAEtC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;IAC1B,QAAQ,CAAC,kBAAkB,CAAC,oCAAoC,CAAC,CAAA;AACnE,CAAC,CAAC,CAAA"}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"types": [
|
||||
"@adonisjs/session"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":"4.6.4"}
|
||||
@@ -80,7 +80,7 @@
|
||||
</main>
|
||||
<section id="about">
|
||||
<h2>About</h2>
|
||||
<p>Good morning ! I'm Arthur, a passionate developer based in France. My journey in the world of development is an inspiring adventure. Every line of code I write is a step toward creating unique and engaging experiences. I am driven by the desire to bring ideas to life and shape them into innovative designs.</p>
|
||||
<p>Hi ! I'm Arthur, a passionate developer based in France. My journey in the world of development is an inspiring adventure. Every line of code I write is a step toward creating unique and engaging experiences. I am driven by the desire to bring ideas to life and shape them into innovative designs.</p>
|
||||
|
||||
<h3>My background</h3>
|
||||
<p>I gained experience in web development working on various projects, ranging from front-end to back-end. I have a deep command of languages like HTML, CSS, JavaScript, and have worked with modern frameworks like Adonis with Node.js.</p>
|
||||
|
||||