mirror of
https://github.com/arthur-pbty/portfolio2023.git
synced 2026-06-04 15:56:24 +02:00
34 lines
1.0 KiB
JavaScript
34 lines
1.0 KiB
JavaScript
"use strict";
|
|
/*
|
|
* @adonisjs/repl
|
|
*
|
|
* (c) Harminder Virk <virk@adonisjs.com>
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
const standalone_1 = require("@adonisjs/core/build/standalone");
|
|
class ReplCommand extends standalone_1.BaseCommand {
|
|
async run() {
|
|
this.application.container.withBindings(['Adonis/Core/Route'], (Route) => {
|
|
Route.commit();
|
|
});
|
|
this.application.container.use('Adonis/Addons/Repl').start();
|
|
/**
|
|
* Gracefully shutdown the application
|
|
*/
|
|
this.application.container.use('Adonis/Addons/Repl').server.on('exit', async () => {
|
|
await this.application.shutdown();
|
|
});
|
|
}
|
|
}
|
|
exports.default = ReplCommand;
|
|
ReplCommand.commandName = 'repl';
|
|
ReplCommand.description = 'Start a new REPL session';
|
|
ReplCommand.settings = {
|
|
loadApp: true,
|
|
environment: 'repl',
|
|
stayAlive: true,
|
|
};
|