mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-01 13:22:29 +02:00
Add src/dist to prettier/eslint ignores, apply lint, webpack adjustments
This commit is contained in:
parent
1da8291790
commit
a06bc904ae
|
@ -1,2 +1,3 @@
|
||||||
public/
|
public/
|
||||||
coverage/
|
coverage/
|
||||||
|
src/dist/
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
const projects = ["./tsconfig.json", "./client/tsconfig.json", "./src/tsconfig.json"];
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
overrides: [
|
overrides: [
|
||||||
|
@ -10,7 +12,8 @@ module.exports = {
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
tsconfigRootDir: __dirname,
|
tsconfigRootDir: __dirname,
|
||||||
project: ["./tsconfig.json", "./client/tsconfig.json", "./src/tsconfig.json"],
|
project: ["./tsconfig.json", "./client/tsconfig.json", "./src/tsconfig.json"],
|
||||||
// extraFileExtensions: [".vue"],
|
extraFileExtensions: [".vue"],
|
||||||
|
projects: projects,
|
||||||
},
|
},
|
||||||
plugins: ["@typescript-eslint"],
|
plugins: ["@typescript-eslint"],
|
||||||
extends: [
|
extends: [
|
||||||
|
@ -58,7 +61,7 @@ module.exports = {
|
||||||
"<template>": "espree",
|
"<template>": "espree",
|
||||||
},
|
},
|
||||||
tsconfigRootDir: __dirname,
|
tsconfigRootDir: __dirname,
|
||||||
project: ["./tsconfig.json", "./client/tsconfig.json", "./src/tsconfig.json"],
|
project: projects,
|
||||||
},
|
},
|
||||||
plugins: ["vue"],
|
plugins: ["vue"],
|
||||||
extends: [
|
extends: [
|
||||||
|
|
|
@ -3,7 +3,7 @@ public/
|
||||||
test/fixtures/.thelounge/logs/
|
test/fixtures/.thelounge/logs/
|
||||||
test/fixtures/.thelounge/certificates/
|
test/fixtures/.thelounge/certificates/
|
||||||
test/fixtures/.thelounge/storage/
|
test/fixtures/.thelounge/storage/
|
||||||
|
src/dist/
|
||||||
*.log
|
*.log
|
||||||
*.png
|
*.png
|
||||||
*.svg
|
*.svg
|
||||||
|
|
|
@ -6,5 +6,4 @@ module.exports = {
|
||||||
// "@vue/babel-preset-jsx",
|
// "@vue/babel-preset-jsx",
|
||||||
],
|
],
|
||||||
targets: "> 0.25%, not dead",
|
targets: "> 0.25%, not dead",
|
||||||
// plugins: [["@babel/transform-typescript", {allowNamespaces: true}]],
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
// Second argument says it's recursive, third makes sure we only load templates.
|
// Second argument says it's recursive, third makes sure we only load templates.
|
||||||
const requireViews = require.context(".", false, /\.vue$/);
|
const requireViews = require.context(".", false, /\.vue$/);
|
||||||
|
|
||||||
export default requireViews.keys().reduce((acc, path) => {
|
export default requireViews.keys().reduce((acc: Record<string, any>, path) => {
|
||||||
acc["message-" + path.substring(2, path.length - 4)] = requireViews(path).default;
|
acc["message-" + path.substring(2, path.length - 4)] = requireViews(path).default;
|
||||||
|
|
||||||
return acc;
|
return acc;
|
|
@ -195,7 +195,7 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import Mousetrap from "mousetrap";
|
import Mousetrap from "mousetrap";
|
||||||
import Draggable from "vuedraggable";
|
import Draggable from "vuedraggable";
|
||||||
import {filter as fuzzyFilter} from "fuzzy";
|
import {filter as fuzzyFilter} from "fuzzy";
|
||||||
|
@ -209,6 +209,9 @@ import isIgnoredKeybind from "../js/helpers/isIgnoredKeybind";
|
||||||
import distance from "../js/helpers/distance";
|
import distance from "../js/helpers/distance";
|
||||||
import eventbus from "../js/eventbus";
|
import eventbus from "../js/eventbus";
|
||||||
|
|
||||||
|
import NetworkModel from "../../src/models/network";
|
||||||
|
import ChannelMode from "../../src/models/chan";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "NetworkList",
|
name: "NetworkList",
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import storage from "./localStorage";
|
import storage from "./localStorage";
|
||||||
import location from "./location";
|
import location from "./location";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import constants from "./constants";
|
import constants from "./constants";
|
||||||
|
|
||||||
import Mousetrap from "mousetrap";
|
import Mousetrap from "mousetrap";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
export default function (chat) {
|
export default function (chat) {
|
||||||
// Disable in Firefox as it already copies flex text correctly
|
// Disable in Firefox as it already copies flex text correctly
|
||||||
if (typeof window.InstallTrigger !== "undefined") {
|
if (typeof window.InstallTrigger !== "undefined") {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
// Taken from views/index.js
|
// Taken from views/index.js
|
||||||
|
|
||||||
// This creates a version of `require()` in the context of the current
|
// This creates a version of `require()` in the context of the current
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
import {switchToChannel} from "../router";
|
import {switchToChannel} from "../router";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
import {router} from "../router";
|
import {router} from "../router";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
const colorCodeMap = [
|
const colorCodeMap = [
|
||||||
["00", "White"],
|
["00", "White"],
|
||||||
["01", "Black"],
|
["01", "Black"],
|
||||||
|
|
|
@ -3,11 +3,8 @@ const events = new Map();
|
||||||
class EventBus {
|
class EventBus {
|
||||||
/**
|
/**
|
||||||
* Register an event handler for the given type.
|
* Register an event handler for the given type.
|
||||||
*
|
|
||||||
* @param {String} type Type of event to listen for.
|
|
||||||
* @param {Function} handler Function to call in response to given event.
|
|
||||||
*/
|
*/
|
||||||
on(type, handler) {
|
on(type: string, handler: Function) {
|
||||||
if (events.has(type)) {
|
if (events.has(type)) {
|
||||||
events.get(type).push(handler);
|
events.get(type).push(handler);
|
||||||
} else {
|
} else {
|
||||||
|
@ -21,11 +18,11 @@ class EventBus {
|
||||||
* @param {String} type Type of event to unregister `handler` from.
|
* @param {String} type Type of event to unregister `handler` from.
|
||||||
* @param {Function} handler Handler function to remove.
|
* @param {Function} handler Handler function to remove.
|
||||||
*/
|
*/
|
||||||
off(type, handler) {
|
off(type: string, handler: Function) {
|
||||||
if (events.has(type)) {
|
if (events.has(type)) {
|
||||||
events.set(
|
events.set(
|
||||||
type,
|
type,
|
||||||
events.get(type).filter((item) => item !== handler)
|
events.get(type).filter((item: Function) => item !== handler)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,12 +33,12 @@ class EventBus {
|
||||||
* @param {String} type The event type to invoke.
|
* @param {String} type The event type to invoke.
|
||||||
* @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler.
|
* @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler.
|
||||||
*/
|
*/
|
||||||
emit(type, ...evt) {
|
emit(type: string, ...evt: any) {
|
||||||
if (events.has(type)) {
|
if (events.has(type)) {
|
||||||
events
|
events
|
||||||
.get(type)
|
.get(type)
|
||||||
.slice()
|
.slice()
|
||||||
.map((handler) => {
|
.map((handler: (...evt: any[]) => void) => {
|
||||||
handler(...evt);
|
handler(...evt);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import storage from "../localStorage";
|
import storage from "../localStorage";
|
||||||
|
|
||||||
export default (network, isCollapsed) => {
|
export default (network, isCollapsed) => {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
// Generates a string from "color-1" to "color-32" based on an input string
|
// Generates a string from "color-1" to "color-32" based on an input string
|
||||||
export default (str) => {
|
export default (str) => {
|
||||||
let hash = 0;
|
let hash = 0;
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import eventbus from "../eventbus";
|
import eventbus from "../eventbus";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
const sizes = ["Bytes", "KiB", "MiB", "GiB", "TiB", "PiB"];
|
const sizes = ["Bytes", "KiB", "MiB", "GiB", "TiB", "PiB"];
|
||||||
|
|
||||||
export default (size: number) => {
|
export default (size: number) => {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import {ParsedStyle} from "./parseStyle";
|
import {ParsedStyle} from "./parseStyle";
|
||||||
|
|
||||||
// Return true if any section of "a" or "b" parts (defined by their start/end
|
// Return true if any section of "a" or "b" parts (defined by their start/end
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
const matchFormatting =
|
const matchFormatting =
|
||||||
/\x02|\x1D|\x1F|\x16|\x0F|\x11|\x1E|\x03(?:[0-9]{1,2}(?:,[0-9]{1,2})?)?|\x04(?:[0-9a-f]{6}(?:,[0-9a-f]{6})?)?/gi;
|
/\x02|\x1D|\x1F|\x16|\x0F|\x11|\x1E|\x03(?:[0-9]{1,2}(?:,[0-9]{1,2})?)?|\x04(?:[0-9a-f]{6}(?:,[0-9a-f]{6})?)?/gi;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import {ParsedStyle} from "./parseStyle";
|
import {ParsedStyle} from "./parseStyle";
|
||||||
|
|
||||||
// Create plain text entries corresponding to areas of the text that match no
|
// Create plain text entries corresponding to areas of the text that match no
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
// Escapes the RegExp special characters "^", "$", "", ".", "*", "+", "?", "(",
|
// Escapes the RegExp special characters "^", "$", "", ".", "*", "+", "?", "(",
|
||||||
// ")", "[", "]", "{", "}", and "|" in string.
|
// ")", "[", "]", "{", "}", and "|" in string.
|
||||||
// See https://lodash.com/docs/#escapeRegExp
|
// See https://lodash.com/docs/#escapeRegExp
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
const emojiRegExp = require("emoji-regex")();
|
const emojiRegExp = require("emoji-regex")();
|
||||||
|
|
||||||
function findEmoji(text) {
|
function findEmoji(text) {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import LinkifyIt, {Match} from "linkify-it";
|
import LinkifyIt, {Match} from "linkify-it";
|
||||||
|
|
||||||
type OurMatch = Match & {
|
type OurMatch = Match & {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
const nickRegExp = /([\w[\]\\`^{|}-]+)/g;
|
const nickRegExp = /([\w[\]\\`^{|}-]+)/g;
|
||||||
|
|
||||||
function findNames(text, users) {
|
function findNames(text, users) {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import anyIntersection from "./anyIntersection";
|
import anyIntersection from "./anyIntersection";
|
||||||
import fill from "./fill";
|
import fill from "./fill";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
// Styling control codes
|
// Styling control codes
|
||||||
const BOLD = "\x02";
|
const BOLD = "\x02";
|
||||||
const COLOR = "\x03";
|
const COLOR = "\x03";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
|
|
||||||
export default (network, channel) => {
|
export default (network, channel) => {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
export default (event: MouseEvent | Mousetrap.ExtendedKeyboardEvent) => {
|
export default (event: MouseEvent | Mousetrap.ExtendedKeyboardEvent) => {
|
||||||
if (
|
if (
|
||||||
(event.target as HTMLElement).tagName !== "TEXTAREA" &&
|
(event.target as HTMLElement).tagName !== "TEXTAREA" &&
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import distance from "./distance";
|
import distance from "./distance";
|
||||||
|
|
||||||
// onTwoFingerSwipe will be called with a cardinal direction ("n", "e", "s" or
|
// onTwoFingerSwipe will be called with a cardinal direction ("n", "e", "s" or
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
export default (time: Date | number) => dayjs(time).format("D MMMM YYYY, HH:mm:ss");
|
export default (time: Date | number) => dayjs(time).format("D MMMM YYYY, HH:mm:ss");
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import parseStyle from "./ircmessageparser/parseStyle";
|
import parseStyle from "./ircmessageparser/parseStyle";
|
||||||
import findChannels from "./ircmessageparser/findChannels";
|
import findChannels from "./ircmessageparser/findChannels";
|
||||||
import {findLinks} from "./ircmessageparser/findLinks";
|
import {findLinks} from "./ircmessageparser/findLinks";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
export default (stringUri) => {
|
export default (stringUri) => {
|
||||||
const data = {};
|
const data = {};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
export default (count) => {
|
export default (count) => {
|
||||||
if (count < 1000) {
|
if (count < 1000) {
|
||||||
return count.toString();
|
return count.toString();
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import Mousetrap from "mousetrap";
|
import Mousetrap from "mousetrap";
|
||||||
|
|
||||||
import store from "./store";
|
import store from "./store";
|
||||||
|
|
|
@ -10,11 +10,12 @@
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
const msg = document.getElementById("loading-page-message");
|
const msg = document.getElementById("loading-page-message");
|
||||||
msg.textContent = "Loading the app…";
|
|
||||||
|
|
||||||
document
|
if (msg) {
|
||||||
.getElementById("loading-reload")
|
msg.textContent = "Loading the app…";
|
||||||
.addEventListener("click", () => location.reload(true));
|
}
|
||||||
|
|
||||||
|
document.getElementById("loading-reload")?.addEventListener("click", () => location.reload());
|
||||||
|
|
||||||
const displayReload = () => {
|
const displayReload = () => {
|
||||||
const loadingReload = document.getElementById("loading-reload");
|
const loadingReload = document.getElementById("loading-reload");
|
||||||
|
@ -26,7 +27,11 @@
|
||||||
|
|
||||||
const loadingSlowTimeout = setTimeout(() => {
|
const loadingSlowTimeout = setTimeout(() => {
|
||||||
const loadingSlow = document.getElementById("loading-slow");
|
const loadingSlow = document.getElementById("loading-slow");
|
||||||
loadingSlow.style.visibility = "visible";
|
|
||||||
|
if (loadingSlow) {
|
||||||
|
loadingSlow.style.visibility = "visible";
|
||||||
|
}
|
||||||
|
|
||||||
displayReload();
|
displayReload();
|
||||||
}, 5000);
|
}, 5000);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
// This is a simple localStorage wrapper because browser can throw errors
|
// This is a simple localStorage wrapper because browser can throw errors
|
||||||
// in different situations, including:
|
// in different situations, including:
|
||||||
// - Unable to store data if storage is full
|
// - Unable to store data if storage is full
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
// This is a thin wrapper around `window.location`, in order to contain the
|
// This is a thin wrapper around `window.location`, in order to contain the
|
||||||
// side-effects. Do not add logic to it as it cannot be tested, only mocked.
|
// side-effects. Do not add logic to it as it cannot be tested, only mocked.
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import constants from "./constants";
|
import constants from "./constants";
|
||||||
|
|
||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import storage from "../localStorage";
|
import storage from "../localStorage";
|
||||||
import {router, navigate} from "../router";
|
import {router, navigate} from "../router";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import upload from "../upload";
|
import upload from "../upload";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import "./connection";
|
import "./connection";
|
||||||
import "./auth";
|
import "./auth";
|
||||||
import "./commands";
|
import "./commands";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import storage from "../localStorage";
|
import storage from "../localStorage";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
import {switchToChannel} from "../router";
|
import {switchToChannel} from "../router";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import cleanIrcMessage from "../helpers/ircmessageparser/cleanIrcMessage";
|
import cleanIrcMessage from "../helpers/ircmessageparser/cleanIrcMessage";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
import {switchToChannel} from "../router";
|
import {switchToChannel} from "../router";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
import {switchToChannel} from "../router";
|
import {switchToChannel} from "../router";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import {switchToChannel, navigate} from "../router";
|
import {switchToChannel, navigate} from "../router";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import Auth from "../auth";
|
import Auth from "../auth";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "../socket";
|
import socket from "../socket";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
"use strict";
|
import io, {Socket} from "socket.io-client";
|
||||||
|
|
||||||
import io from "socket.io-client";
|
|
||||||
|
|
||||||
const socket = io({
|
const socket = io({
|
||||||
transports: JSON.parse(document.body.dataset.transports),
|
transports: JSON.parse(document.body.dataset.transports || "['polling', 'websocket']"),
|
||||||
path: window.location.pathname + "socket.io/",
|
path: window.location.pathname + "socket.io/",
|
||||||
autoConnect: false,
|
autoConnect: false,
|
||||||
reconnection: !document.body.classList.contains("public"),
|
reconnection: !document.body.classList.contains("public"),
|
||||||
|
@ -14,4 +12,10 @@ if (process.env.NODE_ENV === "development") {
|
||||||
window.socket = socket;
|
window.socket = socket;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface Window {
|
||||||
|
socket: Socket;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export default socket;
|
export default socket;
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import {update as updateCursor} from "undate";
|
import {update as updateCursor} from "undate";
|
||||||
|
|
||||||
import socket from "./socket";
|
import socket from "./socket";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import constants from "./constants";
|
import constants from "./constants";
|
||||||
|
|
||||||
import "../css/style.css";
|
import "../css/style.css";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import socket from "./socket";
|
import socket from "./socket";
|
||||||
import store from "./store";
|
import store from "./store";
|
||||||
|
|
||||||
|
|
|
@ -19,13 +19,13 @@
|
||||||
"dev": "NODE_ENV=development ts-node --project src/tsconfig.json src/index.ts start --dev",
|
"dev": "NODE_ENV=development ts-node --project src/tsconfig.json src/index.ts start --dev",
|
||||||
"format:prettier": "prettier --write \"**/*.*\"",
|
"format:prettier": "prettier --write \"**/*.*\"",
|
||||||
"lint:check-eslint": "eslint-config-prettier .eslintrc.cjs",
|
"lint:check-eslint": "eslint-config-prettier .eslintrc.cjs",
|
||||||
"lint:eslint": "eslint . --report-unused-disable-directives --color",
|
"lint:eslint": "eslint . --ext .js,.ts,.vue --report-unused-disable-directives --color",
|
||||||
"lint:prettier": "prettier --list-different \"**/*.*\"",
|
"lint:prettier": "prettier --list-different \"**/*.*\"",
|
||||||
"lint:stylelint": "stylelint --color \"client/**/*.css\"",
|
"lint:stylelint": "stylelint --color \"client/**/*.css\"",
|
||||||
"lint:tsc": "tsc --noEmit",
|
"lint:tsc": "tsc --noEmit",
|
||||||
"start": "node src/dist/src/index start",
|
"start": "node src/dist/src/index start",
|
||||||
"test": "run-p --aggregate-output --continue-on-error lint:* test:*",
|
"test": "run-p --aggregate-output --continue-on-error lint:* test:*",
|
||||||
"test:mocha": "webpack --mode=development && nyc --nycrc-path=test/.nycrc-mocha.json mocha --colors --config=test/.mocharc.yml",
|
"test:mocha": "NODE_ENV=test webpack --mode=development && nyc --nycrc-path=test/.nycrc-mocha.json mocha --colors --config=test/.mocharc.yml",
|
||||||
"watch": "webpack --watch"
|
"watch": "webpack --watch"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import UAParser from "ua-parser-js";
|
import UAParser from "ua-parser-js";
|
||||||
import {v4 as uuidv4} from "uuid";
|
import {v4 as uuidv4} from "uuid";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import colors from "chalk";
|
import colors from "chalk";
|
||||||
import crypto from "crypto";
|
import crypto from "crypto";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import log from "../log";
|
import log from "../log";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import log from "../log";
|
import log from "../log";
|
||||||
import colors from "chalk";
|
import colors from "chalk";
|
||||||
import semver from "semver";
|
import semver from "semver";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import {Command} from "commander";
|
import {Command} from "commander";
|
||||||
import Utils from "./utils";
|
import Utils from "./utils";
|
||||||
import packageManager from "../plugins/packages";
|
import packageManager from "../plugins/packages";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import log from "../log";
|
import log from "../log";
|
||||||
import colors from "chalk";
|
import colors from "chalk";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import log from "../log";
|
import log from "../log";
|
||||||
import colors from "chalk";
|
import colors from "chalk";
|
||||||
import {Command} from "commander";
|
import {Command} from "commander";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import log from "../log";
|
import log from "../log";
|
||||||
import colors from "chalk";
|
import colors from "chalk";
|
||||||
import {Command} from "commander";
|
import {Command} from "commander";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import log from "../../log";
|
import log from "../../log";
|
||||||
import colors from "chalk";
|
import colors from "chalk";
|
||||||
import {Command} from "commander";
|
import {Command} from "commander";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import log from "../../log";
|
import log from "../../log";
|
||||||
import {Command} from "commander";
|
import {Command} from "commander";
|
||||||
import child from "child_process";
|
import child from "child_process";
|
||||||
|
|
|
@ -1,17 +1,22 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import config from "../../config";
|
import config from "../../config";
|
||||||
import list from "./list";
|
import list from "./list";
|
||||||
import remove from "./remove";
|
import remove from "./remove";
|
||||||
import edit from "./edit";
|
import edit from "./edit";
|
||||||
|
import log from "../../log";
|
||||||
|
|
||||||
let add, reset;
|
let add, reset;
|
||||||
|
|
||||||
(async () => {
|
const importAddAndReest = async (): Promise<void> => {
|
||||||
if (config.values.ldap.enable) {
|
if (!config.values.ldap.enable) {
|
||||||
add = (await import("./add")).default;
|
add = (await import("./add")).default;
|
||||||
reset = (await import("./reset")).default;
|
reset = (await import("./reset")).default;
|
||||||
}
|
}
|
||||||
})();
|
};
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
await importAddAndReest();
|
||||||
|
})().catch((e: any) => {
|
||||||
|
log.error("Unable to load plugins all command-line plugins:", e);
|
||||||
|
});
|
||||||
|
|
||||||
export default [list, remove, edit, add, reset];
|
export default [list, remove, edit, add, reset];
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import log from "../../log";
|
import log from "../../log";
|
||||||
import colors from "chalk";
|
import colors from "chalk";
|
||||||
import {Command} from "commander";
|
import {Command} from "commander";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import log from "../../log";
|
import log from "../../log";
|
||||||
import colors from "chalk";
|
import colors from "chalk";
|
||||||
import {Command} from "commander";
|
import {Command} from "commander";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import log from "../../log";
|
import log from "../../log";
|
||||||
import colors from "chalk";
|
import colors from "chalk";
|
||||||
import {Command} from "commander";
|
import {Command} from "commander";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import log from "../log";
|
import log from "../log";
|
||||||
import colors from "chalk";
|
import colors from "chalk";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import fs, {Stats} from "fs";
|
import fs, {Stats} from "fs";
|
||||||
import os from "os";
|
import os from "os";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import pkg from "../package.json";
|
import pkg from "../package.json";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import log from "./log";
|
import log from "./log";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import net, {Socket} from "net";
|
import net, {Socket} from "net";
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#!/usr/bin/env ts-node
|
#!/usr/bin/env ts-node
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
process.chdir(__dirname);
|
process.chdir(__dirname);
|
||||||
|
|
||||||
// Perform node version check before loading any other files or modules
|
// Perform node version check before loading any other files or modules
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import colors from "chalk";
|
import colors from "chalk";
|
||||||
import read from "read";
|
import read from "read";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import log from "../log";
|
import log from "../log";
|
||||||
import Config from "../config";
|
import Config from "../config";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import User from "./user";
|
import User from "./user";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import {v4 as uuidv4} from "uuid";
|
import {v4 as uuidv4} from "uuid";
|
||||||
import IrcFramework, {Client as IRCClient} from "irc-framework";
|
import IrcFramework, {Client as IRCClient} from "irc-framework";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
type PrefixSymbol = string;
|
type PrefixSymbol = string;
|
||||||
|
|
||||||
type PrefixObject = {
|
type PrefixObject = {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import Prefix from "./prefix";
|
import Prefix from "./prefix";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import colors from "chalk";
|
import colors from "chalk";
|
||||||
import Client from "../client";
|
import Client from "../client";
|
||||||
import ClientManager from "../clientManager";
|
import ClientManager from "../clientManager";
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
"use strict";
|
|
||||||
import ldap, {SearchOptions} from "ldapjs";
|
import ldap, {SearchOptions} from "ldapjs";
|
||||||
import colors from "chalk";
|
import colors from "chalk";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import colors from "chalk";
|
import colors from "chalk";
|
||||||
import log from "../../log";
|
import log from "../../log";
|
||||||
import Helper from "../../helper";
|
import Helper from "../../helper";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import got, {Response} from "got";
|
import got, {Response} from "got";
|
||||||
import colors from "chalk";
|
import colors from "chalk";
|
||||||
import log from "../log";
|
import log from "../log";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import crypto from "crypto";
|
import crypto from "crypto";
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue