mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-01 13:22:29 +02:00
progress?
This commit is contained in:
parent
c3e906c279
commit
42160354b8
|
@ -1,4 +1,7 @@
|
|||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"include": ["./**/*.ts", "./**/*.js", "./**/*.d.ts", "./**/*/json"],
|
||||
"exclude": ["./dist/*"],
|
||||
"compilerOptions": {
|
||||
// https://v2.vuejs.org/v2/guide/typescript.html?redirect=true#Recommended-Configuration
|
||||
"target": "ES2020",
|
||||
|
@ -6,8 +9,7 @@
|
|||
"module": "ES2020",
|
||||
"moduleResolution": "node",
|
||||
"lib": ["ES2020", "dom"],
|
||||
"sourceMap": true,
|
||||
"rootDir": "./",
|
||||
"sourceMap": false,
|
||||
"outDir": "./dist",
|
||||
"allowJs": true,
|
||||
"noImplicitAny": true,
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
},
|
||||
"homepage": "https://thelounge.chat/",
|
||||
"scripts": {
|
||||
"build": "tsc client/ && webpack",
|
||||
"build": "tsc --build . && webpack",
|
||||
"coverage": "run-s test:* && nyc --nycrc-path=test/.nycrc-report.json report",
|
||||
"dev": "ts-node index start --dev",
|
||||
"format:prettier": "prettier --write \"**/*.*\"",
|
||||
|
@ -128,6 +128,7 @@
|
|||
"ts-loader": "9.3.0",
|
||||
"ts-migrate": "0.1.28",
|
||||
"ts-node": "10.7.0",
|
||||
"tsconfig-paths": "3.14.1",
|
||||
"tsconfig-paths-webpack-plugin": "3.5.2",
|
||||
"typescript": "4.6.4",
|
||||
"undate": "0.3.0",
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
"use strict";
|
||||
|
||||
const Chan = require("../../models/chan");
|
||||
import Msg from "src/models/msg";
|
||||
import {ChanType, SpecialChanType} from "src/types/models/channel";
|
||||
import {Network} from "src/types/models/network";
|
||||
|
||||
module.exports = function (irc: Network["irc"], network: Network) {
|
||||
import Chan from "../../models/chan";
|
||||
|
||||
export default function (irc: Network["irc"], network: Network) {
|
||||
const client = this;
|
||||
const MAX_CHANS = 500;
|
||||
|
||||
|
@ -30,13 +34,13 @@ module.exports = function (irc: Network["irc"], network: Network) {
|
|||
network.chanCache = [];
|
||||
});
|
||||
|
||||
function updateListStatus(msg) {
|
||||
function updateListStatus(msg: Msg) {
|
||||
let chan = network.getChannel("Channel List");
|
||||
|
||||
if (typeof chan === "undefined") {
|
||||
chan = client.createChannel({
|
||||
type: ChanType.SPECIAL,
|
||||
special: Chan.SpecialType.CHANNELLIST,
|
||||
special: SpecialChanType.CHANNELLIST,
|
||||
name: "Channel List",
|
||||
data: msg,
|
||||
});
|
||||
|
@ -47,6 +51,8 @@ module.exports = function (irc: Network["irc"], network: Network) {
|
|||
index: network.addChannel(chan),
|
||||
});
|
||||
} else {
|
||||
//TODO
|
||||
//@ts-ignore
|
||||
chan.data = msg;
|
||||
|
||||
client.emit("msg:special", {
|
||||
|
@ -55,4 +61,4 @@ module.exports = function (irc: Network["irc"], network: Network) {
|
|||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,15 +1,24 @@
|
|||
{
|
||||
"extends": "../tsconfig.json",
|
||||
// "files": ["index.d.ts", "types/**/*.d.ts"],
|
||||
// "include": ["./**/*.ts", "./**/*.js"],
|
||||
"exclude": ["../client/*", "./dist/*"],
|
||||
"ts-node": {
|
||||
"files": true
|
||||
},
|
||||
"include": ["**/*.ts", "**/*.js", "**/*.d.ts"],
|
||||
"files": ["index.d.ts"],
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"types": ["node"],
|
||||
"baseUrl": ".",
|
||||
"noImplicitAny": false,
|
||||
"outDir": "dist",
|
||||
"resolveJsonModule": true,
|
||||
"moduleResolution": "node"
|
||||
},
|
||||
"ts-node": {
|
||||
"files": true
|
||||
"esModuleInterop": true,
|
||||
"moduleResolution": "node",
|
||||
"paths": {
|
||||
"src/*": ["./*"],
|
||||
"client/*": ["../client/*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
2
src/types/models/channel.d.ts
vendored
2
src/types/models/channel.d.ts
vendored
|
@ -1,4 +1,4 @@
|
|||
import Chan from "src/models/chan";
|
||||
import Chan from "../../models/chan";
|
||||
|
||||
export type Channel = Chan;
|
||||
|
||||
|
|
|
@ -10,10 +10,13 @@
|
|||
"allowJs": true,
|
||||
"resolveJsonModule": true
|
||||
},
|
||||
"exclude": ["src/node_modules", "public/*", "client/*"],
|
||||
"include": ["src/**/*"],
|
||||
"files": ["src/index.d.ts", "src/types/**/*.d.ts"],
|
||||
"ts-node": {
|
||||
"files": true
|
||||
}
|
||||
"exclude": ["src/node_modules", "public/*"],
|
||||
"references": [
|
||||
{
|
||||
"path": "./src"
|
||||
},
|
||||
{
|
||||
"path": "./client"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ const config = {
|
|||
},
|
||||
{
|
||||
test: /\.{js,ts,tsx}$/,
|
||||
include: [path.resolve(__dirname, "client")],
|
||||
include: [path.resolve(__dirname, "client/dist")],
|
||||
use: {
|
||||
loader: "babel-loader",
|
||||
<<<<<<< HEAD
|
||||
|
|
|
@ -8462,7 +8462,7 @@ tsconfig-paths-webpack-plugin@3.5.2:
|
|||
enhanced-resolve "^5.7.0"
|
||||
tsconfig-paths "^3.9.0"
|
||||
|
||||
tsconfig-paths@^3.9.0:
|
||||
tsconfig-paths@3.14.1, tsconfig-paths@^3.9.0:
|
||||
version "3.14.1"
|
||||
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a"
|
||||
integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==
|
||||
|
|
Loading…
Reference in a new issue