mirror of
https://github.com/arthur-pbty/portfolio2023.git
synced 2026-06-03 23:36:21 +02:00
27 lines
812 B
JavaScript
27 lines
812 B
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 path_1 = require("path");
|
|
const os_1 = require("os");
|
|
class ReplProvider {
|
|
constructor(app) {
|
|
this.app = app;
|
|
}
|
|
register() {
|
|
this.app.container.singleton('Adonis/Addons/Repl', () => {
|
|
const compiler = global[Symbol.for('REQUIRE_TS_COMPILER')];
|
|
const { Repl } = require('../src/Repl');
|
|
return new Repl(compiler, (0, path_1.join)((0, os_1.homedir)(), '.adonis_repl_history'));
|
|
});
|
|
}
|
|
}
|
|
exports.default = ReplProvider;
|
|
ReplProvider.needsApplication = true;
|