Showing 65 of 96 total issues
File server.ts
has 1109 lines of code (exceeds 250 allowed). Consider refactoring. Open
"use strict";
/**
* Import interfaces
*/
import IWindow from "../../interfaces/IWindow";
- Create a ticketCreate a ticket
File client.ts
has 668 lines of code (exceeds 250 allowed). Consider refactoring. Open
"use strict";
/**
* Import interfaces
*/
import IWindow from "../../interfaces/IWindow";
- Create a ticketCreate a ticket
Function Proxy
has 261 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Proxy(result, headers, request, response, depth = 5) {
try {
if (
this.Settings.XAccelRedirect &&
result.Data.link.indexOf(".css") === -1
- Create a ticketCreate a ticket
File transport.ts
has 441 lines of code (exceeds 250 allowed). Consider refactoring. Open
"use strict";
/**
* Import interfaces
*/
- Create a ticketCreate a ticket
Function Proxy
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public Proxy(result, headers, request, response, depth = 5) {
try {
if (
this.Settings.XAccelRedirect &&
result.Data.link.indexOf(".css") === -1
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function doProxy
has 148 lines of code (exceeds 25 allowed). Consider refactoring. Open
const doProxy = () => {
if (this.proxyShit[result.Data.link]) {
redirectProxy();
} else {
const url = URL.parse(result.Data.link);
- Create a ticketCreate a ticket
Function Respond
has 137 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Respond(result, headers, request, response) {
try {
headers["Cache-Control"] = "no-cache";
let resp = "";
switch (result.Params.Transport) {
- Create a ticketCreate a ticket
Function processor
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
public processor(data, params, request, headers) {
return new Promise((resolve, reject) => {
this.decode(data, this.Settings.Password).then(
(_data: any) => {
if (
- Create a ticketCreate a ticket
Function listenr
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
public listenr(request, response) {
this.AcceptEncoding = request.headers["accept-encoding"] || "";
const headers = Object.assign({}, baseHeaders);
- Create a ticketCreate a ticket
Function req
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
const req = (options.port === 443 ? HTTPS : HTTP).request(options, (res) => {
clearTimeout(proxyConnectionTimeout);
res.on("error", (_err) => {
redirectProxy();
- Create a ticketCreate a ticket
Function styleadvanced
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
public styleadvanced(params: any = {}) {
return new Promise((resolve, reject) => {
const onerror = () => {
try {
link.href = "";
- Create a ticketCreate a ticket
Function emit
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
public emit(params: any = {}) {
params.Event = params.Event || "";
params.Data = params.Data || {};
params.Debug = params.Debug || false;
- Create a ticketCreate a ticket
Function generateChoises
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public generateChoises() {
const choices = {
bad: {},
good: {},
normal: {},
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function Respond
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public Respond(result, headers, request, response) {
try {
headers["Cache-Control"] = "no-cache";
let resp = "";
switch (result.Params.Transport) {
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Server
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
export default class Server extends Transport {
/**
* Get choice ID
* @param choiceType
- Create a ticketCreate a ticket
Function styleextend
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public styleextend(params: any = {}) {
return new Promise((resolve, reject) => {
const onerror = () => {
try {
link.href = "";
- Create a ticketCreate a ticket
Function onload
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
const onload = () => {
if (
link.sheet &&
link.sheet.cssRules.length > 0
) {
- Create a ticketCreate a ticket
Function download
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public download(data, headers, request, depth = 3) {
return new Promise((resolve, reject) => {
const url = URL.parse(data.link);
url.port = url.port || url.protocol === "https:" ? 443 : 80;
- Create a ticketCreate a ticket
Function style
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
public style(params: any = {}) {
return new Promise((resolve, reject) => {
const onerror = () => {
try {
link.href = "";
- Create a ticketCreate a ticket
Function encodeSync
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public encodeSync(data: any, password: string) {
if (
this.cryptoModule === "" ||
this.cryptoModule === "base64salt"
) {
- Create a ticketCreate a ticket