Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3 colorLogs #523

Closed
wants to merge 159 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
24b0313
wip
echo-bravo-yahoo Sep 26, 2024
955faa3
wip
echo-bravo-yahoo Sep 27, 2024
4116599
move files
echo-bravo-yahoo Sep 27, 2024
5d2fba8
fix project so older, tsc version can coexist with newer, not-built v…
echo-bravo-yahoo Sep 30, 2024
1a223d7
login poc (#370)
wildemat Oct 1, 2024
9b43e48
add schema push (#371)
echo-bravo-yahoo Oct 2, 2024
d0c8039
login test (#372)
wildemat Oct 3, 2024
66f8123
improve schema commands, testing (#373)
echo-bravo-yahoo Oct 3, 2024
7f43633
add first draft of remaining schema commands
echo-bravo-yahoo Oct 3, 2024
7eb9618
add first draft of remaining schema tests
echo-bravo-yahoo Oct 3, 2024
b2c9a01
update dependencies
echo-bravo-yahoo Oct 3, 2024
b3648c6
fix logger breaking at runtime
echo-bravo-yahoo Oct 3, 2024
a01f6b3
add tests for schema diff and schema status
echo-bravo-yahoo Oct 3, 2024
244eb5a
update eslint, move eslint config files, make changes
echo-bravo-yahoo Oct 4, 2024
2939639
run eslint and prettier
echo-bravo-yahoo Oct 4, 2024
2cff039
Updated config.yml
echo-bravo-yahoo Oct 4, 2024
192df25
Updated config.yml
echo-bravo-yahoo Oct 4, 2024
ca6d6e7
fix entrypoint
echo-bravo-yahoo Oct 4, 2024
e64fb67
update dependencies
echo-bravo-yahoo Oct 4, 2024
2bbd130
more entrypoint fixes
echo-bravo-yahoo Oct 4, 2024
ba2ef44
cleanup
echo-bravo-yahoo Oct 4, 2024
eb185a1
refactor error handler, argv, no more double invocations
echo-bravo-yahoo Oct 4, 2024
36bcb33
Junit test reports (#376)
echo-bravo-yahoo Oct 7, 2024
8ae0a0b
infer types via JSDoc through IoC container (#377)
echo-bravo-yahoo Oct 7, 2024
1ac236e
test fixes
echo-bravo-yahoo Oct 7, 2024
f9a2bcd
add tscheck annotations, add JSDoc types to makeFaunaRequest (#379)
echo-bravo-yahoo Oct 8, 2024
70088ed
Persist Account keys on login (#375)
wildemat Oct 8, 2024
8336240
Stash resolutions (#384)
echo-bravo-yahoo Oct 10, 2024
f99229d
misc improvements (#385)
echo-bravo-yahoo Oct 11, 2024
baea78d
Removing things (#386)
echo-bravo-yahoo Oct 11, 2024
e20c08d
makeAccountRequest wrapper. Basic create key
wildemat Oct 11, 2024
ffb9854
Test additions (#390)
echo-bravo-yahoo Oct 11, 2024
6d44c0b
move shared options after command-specific options
echo-bravo-yahoo Oct 11, 2024
d4ce8d3
persist secrets (#393)
wildemat Oct 21, 2024
c819808
check for updates weekly on run (#402)
echo-bravo-yahoo Oct 22, 2024
cccc904
swap to npm (#401)
echo-bravo-yahoo Oct 22, 2024
63ffffe
Add Github action for testing (#404)
echo-bravo-yahoo Oct 22, 2024
ccad6a7
use @fauna/typescript for prettier, eslint configs (#405)
echo-bravo-yahoo Oct 22, 2024
587ebee
move prettier from json config to js config
echo-bravo-yahoo Oct 23, 2024
989e2ec
build: use prettier as authoritative style formatter (#406)
echo-bravo-yahoo Oct 24, 2024
7054ce5
eslint proposal (#407)
echo-bravo-yahoo Oct 24, 2024
653ff5f
first draft of SEA build (mac only)
echo-bravo-yahoo Oct 25, 2024
492a383
fix linting and make runnable in more envs
echo-bravo-yahoo Oct 25, 2024
7677510
update @fauna/typescript
echo-bravo-yahoo Oct 25, 2024
c41f6c3
fix: update CI tests
echo-bravo-yahoo Oct 25, 2024
cc6a473
build SEA binaries with github action
echo-bravo-yahoo Oct 25, 2024
0527a92
run prettier on every file
echo-bravo-yahoo Oct 25, 2024
d8e148c
move to --no-input instead of --force
echo-bravo-yahoo Oct 21, 2024
3199c26
catch schema commands up to main branch
echo-bravo-yahoo Oct 21, 2024
665db93
address PR feedback
echo-bravo-yahoo Oct 29, 2024
b5f4e99
clean up schema commands and tests, fix complexity lint warns
echo-bravo-yahoo Oct 29, 2024
3b45962
prevent SEA installations from attempting an update check
echo-bravo-yahoo Oct 29, 2024
df3ae7e
login redirect (#415)
wildemat Nov 19, 2024
f8f6916
update nvmrc version
echo-bravo-yahoo Nov 19, 2024
54d93f1
add ts-check annotations to more files, clean up tests
echo-bravo-yahoo Nov 19, 2024
de23074
add shell command
echo-bravo-yahoo Nov 13, 2024
ac50ebb
fix tests
echo-bravo-yahoo Nov 19, 2024
cbd2569
improve fn name
echo-bravo-yahoo Nov 19, 2024
7954da1
add v4 test and extend tests for 2+ shell commands
echo-bravo-yahoo Nov 20, 2024
7c87a02
tweak tests
echo-bravo-yahoo Nov 20, 2024
c0b0138
add typecheck test
echo-bravo-yahoo Nov 20, 2024
ff73fec
add another test
echo-bravo-yahoo Nov 20, 2024
53a92e7
fix linting
echo-bravo-yahoo Nov 20, 2024
24dab06
add github linting workflow step (#418)
echo-bravo-yahoo Nov 20, 2024
d337bf1
fix the build in github
echo-bravo-yahoo Nov 20, 2024
672c6d5
persist secrets (#417)
wildemat Nov 20, 2024
51b6eaa
update dependencies (#421)
echo-bravo-yahoo Nov 21, 2024
b31f354
fix cloud login failing on DI
echo-bravo-yahoo Nov 21, 2024
ddaaaa2
add timeouts to github action jobs
echo-bravo-yahoo Nov 21, 2024
a3c58b5
move to mocha-multi-reporter
echo-bravo-yahoo Nov 21, 2024
f59d94f
fix CLI packaging
echo-bravo-yahoo Nov 21, 2024
dd80caf
add stubs for additional tests
echo-bravo-yahoo Nov 21, 2024
04c5d4e
update package-lock
echo-bravo-yahoo Nov 21, 2024
95f1f7f
prevent nodeJS warnings in production
echo-bravo-yahoo Nov 21, 2024
3d2b287
address PR feedback
echo-bravo-yahoo Nov 21, 2024
d78560f
[FE-6125] Stub out create database (#424)
henryfauna Nov 22, 2024
0a937a1
Install fauna (#426)
cleve-fauna Nov 22, 2024
2c268e7
Remove unused jira workflows (#427)
Nov 22, 2024
7204707
If no command is given show help text; and instructions on sub-help. …
cleve-fauna Nov 22, 2024
844b39a
Add some more Github standardization (#428)
Nov 22, 2024
805385b
add test for incorrect flags
echo-bravo-yahoo Nov 22, 2024
82d4fa9
Update test/general-cli.mjs
cleve-fauna Nov 22, 2024
40d10bd
improve type inference on things pulled from awilix (#433)
echo-bravo-yahoo Nov 23, 2024
10dabb3
Create Database Command (#435)
henryfauna Nov 25, 2024
347bd5d
Clarify quick start text (#430)
cleve-fauna Nov 25, 2024
25615ca
Use `homedir` provided by the container (#436)
ptpaterson Nov 26, 2024
5bb7f4a
[FE-6127] Delete Database (#437)
henryfauna Nov 26, 2024
e37507e
Config (#422)
echo-bravo-yahoo Nov 26, 2024
0285ab4
Fauna Query Options (#441)
henryfauna Nov 26, 2024
33271d3
fix config tests (#442)
echo-bravo-yahoo Nov 26, 2024
ecc0524
Improve credential handling (#432)
wildemat Nov 27, 2024
cbdc8cd
Rework eval and shell to fully implement eval (#443)
Dec 2, 2024
22c64c5
login and account keys should reference 'user' instead of 'profile' (…
wildemat Dec 2, 2024
1153265
Support running commands against container. (#447)
cleve-fauna Dec 3, 2024
33ea345
FE-5990 Set argv.secret to 'secret' when --local passed in and --secr…
cleve-fauna Dec 3, 2024
216715f
Move middleware to separate method for testability. Add debug logging…
cleve-fauna Dec 3, 2024
7fce0fa
Finish the `database list` command (#448)
henryfauna Dec 3, 2024
aca56f4
Confirm correct usage of Fauna instead of the Account API when --loca…
cleve-fauna Dec 3, 2024
daf9815
fix help text not displaying (#446)
echo-bravo-yahoo Dec 3, 2024
af18f6b
Add colorized output to database, query, and shell commands (#456)
Dec 4, 2024
ecd8d58
add methods to command signature for database, schema (#458)
echo-bravo-yahoo Dec 4, 2024
6c7acb6
FE-6024 Implement shell history (#453)
ptpaterson Dec 4, 2024
8bbdb35
Review help strings (#451)
jrodewig Dec 4, 2024
1e6a2ea
[FE-6155] - Support `--database` in database commands (#454)
henryfauna Dec 4, 2024
3059802
improve pre-argv parsing (#459)
echo-bravo-yahoo Dec 4, 2024
798c39c
enable --version flag (#457)
echo-bravo-yahoo Dec 4, 2024
4030666
Improve error handling (#462)
Dec 4, 2024
8d1fb06
group options (#463)
echo-bravo-yahoo Dec 4, 2024
f165610
[FE-6169] Support Shorthand Region Groups (#464)
henryfauna Dec 4, 2024
f91d109
Fix verbosity check (#470)
Dec 4, 2024
3b48bad
disable strict options parsing (#460)
echo-bravo-yahoo Dec 4, 2024
9abff40
Add dynamic key support to schema (#466)
Dec 4, 2024
f6bc79f
Remove some options from login command (#472)
ptpaterson Dec 4, 2024
40ab83f
remove test reliance on color (#471)
echo-bravo-yahoo Dec 5, 2024
e3dd92e
lint and prettify on PR push/change (#465)
echo-bravo-yahoo Dec 5, 2024
33f4369
Don't let config parse for help or version when getting profile (#474)
Dec 5, 2024
f1344de
document --no-<arg> for the remaining default true boolean options (#…
henryfauna Dec 5, 2024
dd4799a
default oauth to prod client (#476)
wildemat Dec 5, 2024
9585314
Bare strings break colorize (#473)
Dec 5, 2024
05dec44
Review examples and help strings (#477)
jrodewig Dec 5, 2024
4165d88
Consolidate Validation Helpers (#467)
henryfauna Dec 5, 2024
66411f2
Remove 'login options' group from login cmd (#480)
jrodewig Dec 5, 2024
d52a149
Credentials Middleware tests (#461)
wildemat Dec 5, 2024
8347082
add -h alias for help (#483)
echo-bravo-yahoo Dec 5, 2024
4fd660a
make command descriptions more consistent (#482)
echo-bravo-yahoo Dec 5, 2024
a7227a3
Create Key (#468)
cleve-fauna Dec 5, 2024
593d754
FE-6181 validate profile when no config is found (#481)
ptpaterson Dec 5, 2024
deff6bc
FE-6168 Allow users to scope secrets when running with --local (#488)
cleve-fauna Dec 6, 2024
f7bb80d
[FE-6183] Update Permissions on Credentials Files (#487)
henryfauna Dec 6, 2024
c61a437
Review `fauna key create` examples + help text (#486)
jrodewig Dec 6, 2024
88b3a22
Fast succeed login when --local arg is given (#489)
cleve-fauna Dec 9, 2024
38f5cab
Prettify Login Success Page (#485)
henryfauna Dec 9, 2024
de234ba
remove --dir option from schema commands that don't use it (#484)
echo-bravo-yahoo Dec 9, 2024
40242a4
don't compute role from key name string when calling frontdoor (#493)
wildemat Dec 9, 2024
fabed04
turn login tests back on (#492)
wildemat Dec 9, 2024
53bf7cc
Rename "extra" option to "raw" (#490)
ptpaterson Dec 10, 2024
5951ab7
[FE-6195] Disable JS Completions (#495)
henryfauna Dec 10, 2024
8047c4d
Clean up output formatting and support colorizing FQL results (#496)
Dec 10, 2024
4eed51c
Require a database or secret on schema commands (#498)
henryfauna Dec 10, 2024
42d02d6
handle accountKey arg with user and secret (#500)
wildemat Dec 10, 2024
b1f1cbd
Update use of schema API for the pull command (#499)
ptpaterson Dec 10, 2024
79681b6
Add performance hints (#501)
Dec 11, 2024
b3b82eb
Update usage of the schema API for push, status, and diff (#502)
ptpaterson Dec 11, 2024
69a1217
Handle No Local Schema Files (#505)
henryfauna Dec 11, 2024
5a5c028
Move error handling to its own module and don't colorize if it alread…
Dec 11, 2024
a520215
Do not display a scary message if summary is empty (#508)
Dec 11, 2024
e25ef6d
Catch all yargs validation errors in isYargsError (#504)
Dec 11, 2024
fb4fdd2
provide a more actionable error message on invalid database names (#510)
henryfauna Dec 11, 2024
82fd6d4
Notify on `schema push` if no schema files are found (#507)
henryfauna Dec 11, 2024
02b5166
Fail the shell fast if you cannot query the database (#509)
Dec 11, 2024
1801770
Command to start a local container (#491)
cleve-fauna Dec 12, 2024
45ddf9c
don't use a default profile (#514)
wildemat Dec 12, 2024
531a17d
Update README (#513)
jrodewig Dec 12, 2024
2071e2e
Redact secrets in logArgv (#511)
Dec 12, 2024
0c7a40d
Remove duplicate arg aliases from database list (#515)
ptpaterson Dec 12, 2024
8ac0681
Clarify `--raw` flag help (#516)
jrodewig Dec 12, 2024
c963ec9
Handle network errors with better messaging (#519)
Dec 13, 2024
2b9c521
Detect if port for local Fauna is already occupied. Allow users to co…
cleve-fauna Dec 13, 2024
af5f309
Color log lines in fauna local command.
cleve-fauna Dec 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
run eslint and prettier
echo-bravo-yahoo committed Oct 4, 2024
commit 2939639b80813dc959c112ceb026d89719e0116a
102 changes: 59 additions & 43 deletions src/cli.mjs
Original file line number Diff line number Diff line change
@@ -1,99 +1,115 @@
import yargs from 'yargs'
import chalk from 'chalk'
import yargs from "yargs";
import chalk from "chalk";

import evalCommand from './yargs-commands/eval.mjs'
import loginCommand from './yargs-commands/login.mjs'
import schemaCommand from './yargs-commands/schema/schema.mjs'
import { logArgv } from './lib/middleware.mjs'
export let container
import evalCommand from "./yargs-commands/eval.mjs";
import loginCommand from "./yargs-commands/login.mjs";
import schemaCommand from "./yargs-commands/schema/schema.mjs";
import { logArgv } from "./lib/middleware.mjs";

export let container;
export let builtYargs;

// import { connect } from 'node:tls'
// const socket = connect({ port: 443, host: 'db.fauna.com', checkServerIdentity: () => {} })
// fetch().catch(() => {})
// socket.end(() => { })

export async function run(argvInput, _container) {
container = _container
const logger = container.resolve("logger")
container = _container;
const logger = container.resolve("logger");

try {
buildYargs(argvInput)
await builtYargs.parseAsync()
buildYargs(argvInput);
await builtYargs.parseAsync();
} catch (e) {
const message = `${chalk.reset(await builtYargs.getHelp())}\n\n${chalk.red(e.message)}`
logger.stderr(message)
logger.fatal("\n" + e.stack, "error")
const exit = container.resolve("exit")
exit(1)
const message = `${chalk.reset(await builtYargs.getHelp())}\n\n${chalk.red(
e.message
)}`;
logger.stderr(message);
logger.fatal("\n" + e.stack, "error");
const exit = container.resolve("exit");
exit(1);
}
}

export let builtYargs

// this snapshots the yargs object after building it but before parsing
// this lets us use `builtYargs.argv` anywhere where we need argv but where
// it might be difficult to pipe them in.
function buildYargs(argvInput) {
const logger = container.resolve("logger")
const logger = container.resolve("logger");

builtYargs = yargs(argvInput)
.scriptName("fauna")
.middleware([logArgv], true)
.command("eval", "evaluate a query", evalCommand)
.command("login", "login via website", loginCommand)
.command(schemaCommand)
.command("throw", false, { handler: () => { throw new Error("this is a test error") }, builder: {} })
.command("reject", false, { handler: async () => { throw new Error("this is a rejected promise") }, builder: {} })
.command("throw", false, {
handler: () => {
throw new Error("this is a test error");
},
builder: {},
})
.command("reject", false, {
handler: async () => {
throw new Error("this is a rejected promise");
},
builder: {},
})
.demandCommand()
//.strictCommands(true) blows up... why?
.strictOptions(true)

// .completion('completion', function(currentWord, argv, defaultCompletions, done) {
// .completion('completion', function(currentWord, argv, defaultCompletions, done) {
// const logger = container.resolve("logger")
// logger.debug(`Attempting auto-complete for current word ${currentWord} with argv ${JSON.stringify(argv, null, 4)}.`, 'completion')
// const completions = {
// 'saved': () => Object.keys(argv.savedRolls) || []
// }
// 'saved': () => Object.keys(argv.savedRolls) || []
// }

// for (const [key, completionGetter] of Object.entries(completions)) {
// if (currentWord === argv[key])
// done(prefix(currentWord, completionGetter()))
// }
// if (currentWord === argv[key])
// done(prefix(currentWord, completionGetter()))
// }
// defaultCompletions()
// })
.options({
"color": {
description: "whether or not to emit escape codes for multi-color terminal output.",
type: 'boolean',
color: {
description:
"whether or not to emit escape codes for multi-color terminal output.",
type: "boolean",
// https://github.com/chalk/chalk?tab=readme-ov-file#chalklevel
default: chalk.level > 0,
},
"verbosity": {
verbosity: {
description: "the lowest level diagnostic logs to emit",
type: 'number',
type: "number",
default: 0,
},
"verbose-component": {
description: "components to emit diagnostic logs for; this takes precedence over the 'verbosity' flag",
type: 'array',
description:
"components to emit diagnostic logs for; this takes precedence over the 'verbosity' flag",
type: "array",
default: [],
choices: ['fetch', 'error', 'argv'],
choices: ["fetch", "error", "argv"],
},
})
.wrap(yargs.terminalWidth)
.help('help', 'show help')
.help("help", "show help")
.fail((msg, err, yargs) => {
const exit = container.resolve("exit")
const message = `${chalk.reset(yargs.help())}\n\n${chalk.red(msg || err?.message)}`
logger.stderr(message)
const exit = container.resolve("exit");
const message = `${chalk.reset(yargs.help())}\n\n${chalk.red(
msg || err?.message
)}`;
logger.stderr(message);
if (err && err.stack) {
logger.fatal(err.stack)
logger.fatal(err.stack);
}
exit(1)
exit(1);
})
.exitProcess(false)
.version(false)
.completion()
.completion();

return builtYargs
return builtYargs;
}
4 changes: 2 additions & 2 deletions src/config/setup-container.mjs
Original file line number Diff line number Diff line change
@@ -16,13 +16,13 @@ import {
writeSchemaFiles,
} from "../lib/schema.mjs";
import { confirm } from "@inquirer/prompts";
import { makeFaunaRequest } from "../lib/db.mjs"
import { makeFaunaRequest } from "../lib/db.mjs";
import fetchWrapper from "../lib/fetch-wrapper.mjs";
import { FaunaAccountClient } from "../lib/fauna-account-client.mjs";
import open from "open";
import OAuthClient from "../lib/auth/oauth-client.mjs";
import { Lifetime } from "awilix";
import fs from 'node:fs'
import fs from "node:fs";

// import { findUpSync } from 'find-up'
// import fs from 'node:fs'
44 changes: 24 additions & 20 deletions src/config/setup-test-container.mjs
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
import fs from 'node:fs'
import fs from "node:fs";

import * as awilix from 'awilix/lib/awilix.module.mjs'
import { setupCommonContainer, injectables } from './setup-container.mjs'
import * as awilix from "awilix/lib/awilix.module.mjs";
import { setupCommonContainer, injectables } from "./setup-container.mjs";

import sinon, { stub } from 'sinon'
import sinon, { stub } from "sinon";

import logger from '../lib/logger.mjs'
import logger from "../lib/logger.mjs";

// Mocks all _functions_ declared on the injectables export from setup-container.mjs
function automock(container) {
const skipped = []
const skipped = [];
for (const [key, value] of Object.entries(injectables)) {
if (value.isLeakSafe && typeof value.resolve() === 'function') {
container.register({ [key]: awilix.asValue(stub()) })
if (value.isLeakSafe && typeof value.resolve() === "function") {
container.register({ [key]: awilix.asValue(stub()) });
} else {
skipped.push(key)
skipped.push(key);
}
}

return skipped
return skipped;
}

function confirmManualMocks(manualMocks, thingsToManuallyMock) {
for (let i = 0; i < thingsToManuallyMock.length; i++) {
const manualMock = manualMocks[thingsToManuallyMock[i]]
const manualMock = manualMocks[thingsToManuallyMock[i]];
if (!manualMock || !manualMock.resolve)
throw new Error (`Please mock the injectable "${thingsToManuallyMock[i]}" by adding it to "./src/config/setup-test-container.mjs".`)
throw new Error(
`Please mock the injectable "${thingsToManuallyMock[i]}" by adding it to "./src/config/setup-test-container.mjs".`
);
}
}

export function setupTestContainer() {
const container = setupCommonContainer()
const container = setupCommonContainer();

const thingsToManuallyMock = automock(container)
const thingsToManuallyMock = automock(container);

const manualMocks = {
fs: awilix.asValue(sinon.stub(fs)),
@@ -54,18 +56,20 @@ export function setupTestContainer() {
stdout: stub(),
stderr: stub(),
}),
getSimpleClient: awilix.asValue(stub().returns({ close: () => Promise.resolve() })),
getSimpleClient: awilix.asValue(
stub().returns({ close: () => Promise.resolve() })
),
accountClient: awilix.asFunction(stub()),
oauthClient: awilix.asFunction(stub()),
// in tests, let's exit by throwing
exit: awilix.asValue(() => {
throw new Error(1);
})
}
}),
};

confirmManualMocks(manualMocks, thingsToManuallyMock)
confirmManualMocks(manualMocks, thingsToManuallyMock);

container.register(manualMocks)
container.register(manualMocks);

return container
return container;
}
14 changes: 9 additions & 5 deletions src/lib/auth/oauth-client.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import http, { IncomingMessage, ServerResponse } from "http";
import http from "http";
import { randomBytes, createHash } from "crypto";
import url from "url";


// Default to prod client id and secret
const clientId = process.env.FAUNA_CLIENT_ID ?? "-_vEB3FKRoWbJdFpMg72Mx0UVAA";
// Native public clients are not confidential. The client secret is not used beyond
@@ -14,10 +13,15 @@ const REDIRECT_URI = `http://127.0.0.1`;

class OAuthClient {
server; //: http.Server;

port; //: number;

code_verifier; //: string;

code_challenge; //: string;

auth_code; //: string;

state; //: string;

constructor() {
@@ -49,8 +53,8 @@ class OAuthClient {
clientSecret,
authCode: this.auth_code,
redirectURI: `${REDIRECT_URI}:${this.port}`,
codeVerifier: this.code_verifier
}
codeVerifier: this.code_verifier,
};
}

_generateCSRFToken() {
@@ -124,7 +128,7 @@ class OAuthClient {
async start() {
try {
this.server.on("listening", () => {
this.port = (this.server.address()).port;
this.port = this.server.address().port;
this.server.emit("ready");
});
if (!this.server.listening) {
Loading