refactor: latus structure and fixes

This commit is contained in:
cha0s 2020-12-03 23:36:20 -06:00
parent 0de7d83d38
commit 3c8cf9b4f0
30 changed files with 104 additions and 73 deletions

View File

@ -15,7 +15,9 @@
"index.js", "index.js",
"index.js.map" "index.js.map"
], ],
"dependencies": {}, "dependencies": {
"debug": "4.3.1"
},
"devDependencies": { "devDependencies": {
"@neutrinojs/airbnb-base": "^9.4.0", "@neutrinojs/airbnb-base": "^9.4.0",
"@neutrinojs/copy": "9.4.0", "@neutrinojs/copy": "9.4.0",

View File

@ -20,6 +20,7 @@
"start.js.map" "start.js.map"
], ],
"dependencies": { "dependencies": {
"debug": "4.3.1",
"js-yaml": "3.14.0", "js-yaml": "3.14.0",
"webpack-virtual-modules": "0.3.2" "webpack-virtual-modules": "0.3.2"
}, },

View File

@ -0,0 +1 @@
export default {};

View File

@ -14,7 +14,7 @@ export {default as WebpackPlugin} from './webpack-plugin';
export const Class = class {}; export const Class = class {};
export const $$latus = { export default {
hooks: { hooks: {
'@latus/core/config': () => ({ '@latus/core/config': () => ({
id: 'latus', id: 'latus',

View File

@ -1,16 +1,23 @@
import D from 'debug';
import Middleware from './middleware'; import Middleware from './middleware';
const debug = D('@latus/core/latus');
export default class Plugins { export default class Plugins {
constructor({config, modules}) { constructor({config, modules}) {
this.config = config; this.config = config;
const paths = Object.keys(config); const paths = Object.keys(config);
debug('latus paths: %O', paths);
this.hooks = {}; this.hooks = {};
this.modules = modules; this.modules = modules;
for (let i = 0; i < modules.length; i++) { for (let i = 0; i < modules.length; i++) {
if (modules[i].$$latus) { if (modules[i].default) {
const {$$latus: {hooks}} = modules[i]; const {default: {hooks}} = modules[i];
if (hooks) {
const keys = Object.keys(hooks); const keys = Object.keys(hooks);
debug("hooks for '%s': %O", paths[i], keys);
for (let j = 0; j < keys.length; j++) { for (let j = 0; j < keys.length; j++) {
const key = keys[j]; const key = keys[j];
if (!this.hooks[key]) { if (!this.hooks[key]) {
@ -23,6 +30,12 @@ export default class Plugins {
} }
} }
} }
else {
throw new Error(
`'${paths[i]}' specified as a latus path, but there was no default export`,
);
}
}
const defaultConfig = this.invoke('@latus/core/config'); const defaultConfig = this.invoke('@latus/core/config');
const plugins = Object.keys(defaultConfig); const plugins = Object.keys(defaultConfig);
for (let i = 0; i < plugins.length; i++) { for (let i = 0; i < plugins.length; i++) {
@ -33,6 +46,7 @@ export default class Plugins {
}; };
} }
this.invokeFlat('@latus/core/config/alter', this.config); this.invokeFlat('@latus/core/config/alter', this.config);
debug('latus config: %O', this.config);
} }
invoke(hook, ...args) { invoke(hook, ...args) {

View File

@ -17,6 +17,7 @@
], ],
"dependencies": { "dependencies": {
"@latus/core": "^1.0.0", "@latus/core": "^1.0.0",
"debug": "4.3.1",
"mkdirp": "^1.0.4", "mkdirp": "^1.0.4",
"mysql2": "^2.2.5", "mysql2": "^2.2.5",
"sequelize": "^6.3.5" "sequelize": "^6.3.5"

View File

@ -54,7 +54,7 @@ export async function createDatabaseConnection(latus) {
} }
catch (error) { catch (error) {
// eslint-disable-next-line no-await-in-loop // eslint-disable-next-line no-await-in-loop
await new Promise((resolve) => setTimeout(resolve, 50)); await new Promise((resolve) => setTimeout(resolve, 250));
} }
} }
await sequelize.sync(); await sequelize.sync();

View File

@ -10,7 +10,7 @@ const {
NODE_ENV, NODE_ENV,
} = process.env; } = process.env;
export const $$latus = { export default {
hooks: { hooks: {
'@latus/core/config': () => ({ '@latus/core/config': () => ({
database: 'db', database: 'db',

View File

@ -19,6 +19,7 @@
"dependencies": { "dependencies": {
"@latus/core": "1.0.0", "@latus/core": "1.0.0",
"@neutrinojs/web": "^9.1.0", "@neutrinojs/web": "^9.1.0",
"debug": "4.3.1",
"express": "^4.17.1", "express": "^4.17.1",
"memfs": "3.2.0", "memfs": "3.2.0",
"neutrino": "9.4.0", "neutrino": "9.4.0",

View File

@ -1,7 +1,7 @@
import {createHttpServer} from './server'; import {createHttpServer} from './server';
// eslint-disable-next-line import/prefer-default-export // eslint-disable-next-line import/prefer-default-export
export const $$latus = { export default {
hooks: { hooks: {
'@latus/core/config': () => ({ '@latus/core/config': () => ({
middleware: [], middleware: [],

View File

@ -19,6 +19,7 @@
], ],
"dependencies": { "dependencies": {
"@neutrinojs/react": "^9.4.0", "@neutrinojs/react": "^9.4.0",
"debug": "4.3.1",
"react": "^17.0.1", "react": "^17.0.1",
"react-dom": "^17.0.1", "react-dom": "^17.0.1",
"react-hot-loader": "^4.13.0" "react-hot-loader": "^4.13.0"

View File

@ -1,8 +1,7 @@
import React from 'react'; import React from 'react';
import {render} from 'react-dom'; import {render} from 'react-dom';
// eslint-disable-next-line import/prefer-default-export export default {
export const $$latus = {
hooks: { hooks: {
'@latus/http/client/up': (latus) => { '@latus/http/client/up': (latus) => {
const Components = latus.invoke('@latus/react/components'); const Components = latus.invoke('@latus/react/components');

View File

@ -15,8 +15,7 @@ const middleware = (neutrino) => {
}); });
}; };
// eslint-disable-next-line import/prefer-default-export export default {
export const $$latus = {
hooks: { hooks: {
'@latus/core/config': () => ({ '@latus/core/config': () => ({
entry: './src/react', entry: './src/react',

View File

@ -19,6 +19,7 @@
], ],
"dependencies": { "dependencies": {
"connect-redis": "^5.0.0", "connect-redis": "^5.0.0",
"debug": "4.3.1",
"express-session": "^1.17.1", "express-session": "^1.17.1",
"mkdirp": "^1.0.4", "mkdirp": "^1.0.4",
"redis": "^3.0.2", "redis": "^3.0.2",

View File

@ -9,5 +9,14 @@ export default ({config: {'@latus/redis': {host, port}}}) => (
redis.createClient( redis.createClient(
REDIS_PORT || port, REDIS_PORT || port,
REDIS_HOST || host, REDIS_HOST || host,
{
retry_strategy: (options) => {
if (options.total_retry_time > 1000 * 60 * 5) {
return new Error('redis connection failed');
}
// reconnect after
return Math.min(options.attempt * 100, 3000);
},
},
) )
); );

View File

@ -1,9 +1,13 @@
import D from 'debug';
import {spawn} from 'child_process'; import {spawn} from 'child_process';
import mkdirp from 'mkdirp'; import mkdirp from 'mkdirp';
import createClient from './create-client'; import createClient from './create-client';
const debug = D('@latus/redis/docker');
export default async function createDockerContainer(latus) { export default async function createDockerContainer(latus) {
const {config: {'@latus/redis': {docker, port}}} = latus; const {config: {'@latus/redis': {docker, port}}} = latus;
const args = [ const args = [
@ -25,15 +29,14 @@ export default async function createDockerContainer(latus) {
const {pid} = spawn('docker', args, {stdio: 'inherit'}); const {pid} = spawn('docker', args, {stdio: 'inherit'});
process.on('exit', () => process.kill(pid)); process.on('exit', () => process.kill(pid));
process.on('SIGINT', () => process.exit()); process.on('SIGINT', () => process.exit());
// eslint-disable-next-line no-constant-condition let isConnected = false;
while (true) { const client = createClient(latus);
try { client.on('connect', () => {
createClient(); isConnected = true;
break; });
} while (!isConnected) {
catch (error) {
// eslint-disable-next-line no-await-in-loop // eslint-disable-next-line no-await-in-loop
await new Promise((resolve) => setTimeout(resolve, 50)); await new Promise((resolve) => setTimeout(resolve, 250));
}
} }
debug('connected to redis');
} }

View File

@ -1,6 +1,7 @@
import createClient from './create-client';
import createDockerContainer from './docker'; import createDockerContainer from './docker';
export {default as createClient} from './create-client'; export {createClient};
const { const {
NODE_ENV, NODE_ENV,
@ -28,7 +29,7 @@ const safeKeys = async (client, pattern, caret) => {
export const keys = (client, pattern) => safeKeys(client, pattern, 0); export const keys = (client, pattern) => safeKeys(client, pattern, 0);
export const $$latus = { export default {
hooks: { hooks: {
'@latus/core/config': () => ({ '@latus/core/config': () => ({
docker: true, docker: true,

View File

@ -6,8 +6,7 @@ import {createClient} from './index';
// eslint-disable-next-line import/newline-after-import // eslint-disable-next-line import/newline-after-import
const RedisStore = require('connect-redis')(session); const RedisStore = require('connect-redis')(session);
// eslint-disable-next-line import/prefer-default-export export default {
export const $$latus = {
hooks: { hooks: {
'@latus/http/session': (latus) => ({ '@latus/http/session': (latus) => ({
store: new RedisStore({client: createClient(latus)}), store: new RedisStore({client: createClient(latus)}),

View File

@ -15,7 +15,9 @@
"index.js", "index.js",
"index.js.map" "index.js.map"
], ],
"dependencies": {}, "dependencies": {
"debug": "4.3.1"
},
"devDependencies": { "devDependencies": {
"@neutrinojs/airbnb-base": "^9.4.0", "@neutrinojs/airbnb-base": "^9.4.0",
"@neutrinojs/copy": "9.4.0", "@neutrinojs/copy": "9.4.0",

View File

@ -1,7 +1,6 @@
import {createReplServer} from './server'; import {createReplServer} from './server';
// eslint-disable-next-line import/prefer-default-export export default {
export const $$latus = {
hooks: { hooks: {
'@latus/core/up': async (latus, next) => createReplServer(latus).then(next), '@latus/core/up': async (latus, next) => createReplServer(latus).then(next),
}, },

View File

@ -21,7 +21,7 @@
"@latus/core": "^1.0.0", "@latus/core": "^1.0.0",
"@latus/http": "^1.0.0", "@latus/http": "^1.0.0",
"buffer": "^6.0.3", "buffer": "^6.0.3",
"debug": "^4.3.1", "debug": "4.3.1",
"socket.io": "2.3.0", "socket.io": "2.3.0",
"socket.io-client": "2.3.0" "socket.io-client": "2.3.0"
}, },

View File

@ -1,7 +1,6 @@
import SocketClient from './socket'; import SocketClient from './socket';
// eslint-disable-next-line import/prefer-default-export export default {
export const $$latus = {
hooks: { hooks: {
'@latus/http/client/up': (latus) => { '@latus/http/client/up': (latus) => {
const socket = new SocketClient(latus); const socket = new SocketClient(latus);

View File

@ -1,7 +1,6 @@
import {createSocketServer} from './lifecycle'; import {createSocketServer} from './lifecycle';
// eslint-disable-next-line import/prefer-default-export export default {
export const $$latus = {
hooks: { hooks: {
'@latus/core/config': () => ({ '@latus/core/config': () => ({
middleware: [], middleware: [],

View File

@ -24,6 +24,7 @@
"dependencies": { "dependencies": {
"@latus/db": "^1.0.0", "@latus/db": "^1.0.0",
"bcrypt": "^5.0.0", "bcrypt": "^5.0.0",
"debug": "4.3.1",
"express": "^4.17.1", "express": "^4.17.1",
"express-session": "1.17.1", "express-session": "1.17.1",
"express-socket.io-session": "^1.3.5", "express-socket.io-session": "^1.3.5",

View File

@ -23,8 +23,7 @@ const LocalUser = (User) => class LocalUser extends User {
}; };
// eslint-disable-next-line import/prefer-default-export export default {
export const $$latus = {
'@latus/db/decorate': (Models) => ({ '@latus/db/decorate': (Models) => ({
...Models, ...Models,
User: LocalUser(Models.User), User: LocalUser(Models.User),

View File

@ -3,7 +3,7 @@ import User from './user';
export {Permission, User}; export {Permission, User};
export const $$latus = { export default {
'@latus/db/models': () => ({ '@latus/db/models': () => ({
Permission, Permission,
User, User,

View File

@ -1,8 +1,7 @@
import passport from 'passport'; import passport from 'passport';
import LogOps from 'passport/lib/http/request'; import LogOps from 'passport/lib/http/request';
// eslint-disable-next-line import/prefer-default-export export default {
export const $$latus = {
hooks: { hooks: {
'@latus/http/middleware': () => (req, res, next) => { '@latus/http/middleware': () => (req, res, next) => {
passport.initialize()(req, res, () => { passport.initialize()(req, res, () => {

View File

@ -10,7 +10,7 @@ export const session = (options) => expressSession({
...options, ...options,
}); });
export const $$latus = { export default {
hooks: { hooks: {
'@latus/http/middleware': (httpServer, latus) => (req, res, next) => { '@latus/http/middleware': (httpServer, latus) => (req, res, next) => {
express.urlencoded({extended: true})(req, res, () => { express.urlencoded({extended: true})(req, res, () => {

View File

@ -8,8 +8,7 @@ const App = () => (
</div> </div>
); );
// eslint-disable-next-line import/prefer-default-export export default {
export const $$latus = {
hooks: { hooks: {
'@latus/react/components': () => hot(module)(App), '@latus/react/components': () => hot(module)(App),
}, },

View File

@ -913,16 +913,17 @@
"@latus/core@1.0.0", "@latus/core@^1.0.0": "@latus/core@1.0.0", "@latus/core@^1.0.0":
version "1.0.0" version "1.0.0"
resolved "https://npm.i12e.cha0s.io/@latus%2fcore/-/core-1.0.0.tgz#954045688b47de8b0497bdd745aac1105376e131" resolved "https://npm.i12e.cha0s.io/@latus%2fcore/-/core-1.0.0.tgz#96d217d84c2e5a8f2219adaaed556611e80e40c2"
integrity sha512-wgaHvhbdfl8MF+qrLEYjyAudk9h97aAniCcAn68wIfPFyceffBcKW/eOOXB5Ytvj1LQndzUH2RmGwAogzOGniQ== integrity sha512-1lRlk0X8bnHULiMEq6YsyIuT4KptH4W7LzsVwiv/9IkZV1LdC8k8qll+S7HeIyOTMPprcll9mP9nCHjI+5nIUQ==
dependencies: dependencies:
debug "4.3.1"
js-yaml "3.14.0" js-yaml "3.14.0"
webpack-virtual-modules "0.3.2" webpack-virtual-modules "0.3.2"
"@latus/db@1.0.0", "@latus/db@^1.0.0": "@latus/db@1.0.0", "@latus/db@^1.0.0":
version "1.0.0" version "1.0.0"
resolved "https://npm.i12e.cha0s.io/@latus%2fdb/-/db-1.0.0.tgz#18ad46056edda1c2bcd0db4169d38f1dffdfb31f" resolved "https://npm.i12e.cha0s.io/@latus%2fdb/-/db-1.0.0.tgz#49f33a8fd89cb146503994bc8336a3d338d30b2a"
integrity sha512-3rNpWWcAktdVeEA28/2DdHnaVqkUrT8WC0Va7KDNZ0e2oQWbY8SNDZM7YsOw7u2hVe0eexwfpWSy3uScavhVCg== integrity sha512-nihdJ6IW7pUhlZCqxSccg1FSvJWuRuzI1Yu+P3jJCs9bsfjOa7allzYahR6e6FAlYjRXvjYKKCMrEk859iEoOw==
dependencies: dependencies:
"@latus/core" "^1.0.0" "@latus/core" "^1.0.0"
mkdirp "^1.0.4" mkdirp "^1.0.4"
@ -931,8 +932,8 @@
"@latus/http@1.0.0", "@latus/http@^1.0.0": "@latus/http@1.0.0", "@latus/http@^1.0.0":
version "1.0.0" version "1.0.0"
resolved "https://npm.i12e.cha0s.io/@latus%2fhttp/-/http-1.0.0.tgz#48b8d9f152f661e83fdb3d25f379c9438f9fcece" resolved "https://npm.i12e.cha0s.io/@latus%2fhttp/-/http-1.0.0.tgz#4cf141318d8b3a756e57215c5418975656c20824"
integrity sha512-gMX7x2WgvwLoJ9lvByU9Qgg1O9BxrtzIrOpMLiqILAKNRcAE4hTnaWXjUhl87dosUBCSLyQHgpuy3Swp0RQBYQ== integrity sha512-7Upe0XusYz0a9408ZvnisJWFRXDxAmyWkJpiCvMKlF67AKCvjrKFeZrBA5eMsDf08rihRcX9xz2W5YsDp0Snmw==
dependencies: dependencies:
"@latus/core" "1.0.0" "@latus/core" "1.0.0"
"@neutrinojs/web" "^9.1.0" "@neutrinojs/web" "^9.1.0"
@ -945,8 +946,8 @@
"@latus/react@1.0.0": "@latus/react@1.0.0":
version "1.0.0" version "1.0.0"
resolved "https://npm.i12e.cha0s.io/@latus%2freact/-/react-1.0.0.tgz#2a442353836903fb0c2d0882c09a1e2e265c2042" resolved "https://npm.i12e.cha0s.io/@latus%2freact/-/react-1.0.0.tgz#05b3116e8c89fa5e915dc9d22837be5a98bee2e1"
integrity sha512-tzyRFA3/KSNjMQk+JG7gOVtlo7Wnz6b7huVztOoXgA3ZVomfnVbsfMb4QB6Rt25H+O84zx6HWd614mQFSSpqdg== integrity sha512-mt1CjwgL5sQ4pxaV+VVo6puItTJS699AaD9Vn4kvM9ZUu9blWrUnYzq14zVTIv4IBbKY2CyQdmckmL+Xd/xadQ==
dependencies: dependencies:
"@neutrinojs/react" "^9.4.0" "@neutrinojs/react" "^9.4.0"
react "^17.0.1" react "^17.0.1"
@ -955,10 +956,11 @@
"@latus/redis@1.0.0": "@latus/redis@1.0.0":
version "1.0.0" version "1.0.0"
resolved "https://npm.i12e.cha0s.io/@latus%2fredis/-/redis-1.0.0.tgz#52dacef10de2c28f97b284c610cd8d99fffebdc4" resolved "https://npm.i12e.cha0s.io/@latus%2fredis/-/redis-1.0.0.tgz#5db10f656c921e162b7a2e73a1c4d214ace69aec"
integrity sha512-pZpMhpg3QL8R3y82x0Bu4rf7cn3O8z6YE73IomCeaU4kStos+vNEL0xKC8OtGUqxuHwTxLgUu5RdeP8D4lAYIQ== integrity sha512-9dGDRdlqbYbkFZH29BRZFHWSnkkqgykdaYCWfpodJyoVcFuiNZGL3rP4KW01m47N8PYaweOt/cPeO5xzrwB9rg==
dependencies: dependencies:
connect-redis "^5.0.0" connect-redis "^5.0.0"
debug "4.3.1"
express-session "^1.17.1" express-session "^1.17.1"
mkdirp "^1.0.4" mkdirp "^1.0.4"
redis "^3.0.2" redis "^3.0.2"
@ -966,13 +968,13 @@
"@latus/repl@1.0.0": "@latus/repl@1.0.0":
version "1.0.0" version "1.0.0"
resolved "https://npm.i12e.cha0s.io/@latus%2frepl/-/repl-1.0.0.tgz#4867c1347a593931d5e745ceadcc88e30835b79e" resolved "https://npm.i12e.cha0s.io/@latus%2frepl/-/repl-1.0.0.tgz#3c2af7fd4554e1d44d9694188fed13e01081f683"
integrity sha512-GOrVTveJGvzQKBlHdKIVPUez63h9bOZkFWsca7jnhkpYw9p7m6IBN5P4eU1C/bcErdF9SpJ9KUUBuZa3DwEeDA== integrity sha512-Dqgjm9pfS3zH8CC+lUioBMsqXw3Mjl05KEv+A4xPH3EmhKGEvPKHFfl1i2RkyNTLgaLB0mshKebcoDw0QVfKfQ==
"@latus/socket@1.0.0": "@latus/socket@1.0.0":
version "1.0.0" version "1.0.0"
resolved "https://npm.i12e.cha0s.io/@latus%2fsocket/-/socket-1.0.0.tgz#98a770ca362ce0f1b6a5969cec416765b96633c4" resolved "https://npm.i12e.cha0s.io/@latus%2fsocket/-/socket-1.0.0.tgz#72da0b6f9e0e57ae3693875c3b92aa7dd45866fb"
integrity sha512-mR/WO57WAB5XeDzvvunkOoAR5RQqOxibppPkeR56JMslImUCLI1O+8YyJkSYYvNUJh3rjjVxPHNWpNk9ntT39A== integrity sha512-icrYOjy5B77dQVveFohJElceMgJaZHfCAA50x6wtM60j+ZQinGMNuE04z+9sXDEvwddYLqtSDLJFbydgyn4lnA==
dependencies: dependencies:
"@latus/core" "^1.0.0" "@latus/core" "^1.0.0"
"@latus/http" "^1.0.0" "@latus/http" "^1.0.0"
@ -983,8 +985,8 @@
"@latus/user@1.0.0": "@latus/user@1.0.0":
version "1.0.0" version "1.0.0"
resolved "https://npm.i12e.cha0s.io/@latus%2fuser/-/user-1.0.0.tgz#178ffd1d3b0e4dc83c1f27907b92c1f5849090ae" resolved "https://npm.i12e.cha0s.io/@latus%2fuser/-/user-1.0.0.tgz#60dfc2ae21752f0e5f53f9633ea6270288919fe0"
integrity sha512-8V6Tcy4E3soiaYJBb6cn6HtgTcFOCbAVzghf/hQXcSGvYLyr09aFYC82sc4m9ntjDSONu4uRHT3A7boOxBQwZA== integrity sha512-kl/0T8QDcWBZ8rz6tbiI4ucnvVZ79D8bZkTuzAZN8UwTQmiBjqYQ5JFCBYXJNYuOoeF07Xc3aBmY+85QCk3BrQ==
dependencies: dependencies:
"@latus/db" "^1.0.0" "@latus/db" "^1.0.0"
bcrypt "^5.0.0" bcrypt "^5.0.0"
@ -2517,6 +2519,13 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9, debug@~2.6.0:
dependencies: dependencies:
ms "2.0.0" ms "2.0.0"
debug@4.3.1, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1:
version "4.3.1"
resolved "https://npm.i12e.cha0s.io/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
dependencies:
ms "2.1.2"
debug@^3.0.0, debug@^3.2.6: debug@^3.0.0, debug@^3.2.6:
version "3.2.7" version "3.2.7"
resolved "https://npm.i12e.cha0s.io/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" resolved "https://npm.i12e.cha0s.io/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a"
@ -2524,13 +2533,6 @@ debug@^3.0.0, debug@^3.2.6:
dependencies: dependencies:
ms "^2.1.1" ms "^2.1.1"
debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1:
version "4.3.1"
resolved "https://npm.i12e.cha0s.io/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
dependencies:
ms "2.1.2"
debug@~3.1.0: debug@~3.1.0:
version "3.1.0" version "3.1.0"
resolved "https://npm.i12e.cha0s.io/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" resolved "https://npm.i12e.cha0s.io/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"