Change my public email address

This commit is contained in:
NI
2021-04-29 14:28:24 +08:00
parent b87d5437e5
commit 1d05a9189b
130 changed files with 206 additions and 210 deletions

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@@ -41,7 +41,7 @@ const (
const (
staticListHeader = `// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@@ -197,7 +197,7 @@ var (
// This file is part of Sshwifty Project
//
// Copyright (C) {{ .Date.Year }} Rui NI (nirui@gmx.com)
// Copyright (C) {{ .Date.Year }} NI Rui (ranqus@gmail.com)
//
// https://github.com/nirui/sshwifty
//

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@@ -21,7 +21,7 @@ package application
const (
Name = "Sshwifty"
FullName = "Sshwifty Web SSH Client"
Author = "Rui NI <nirui@gmx.com>"
Author = "NI Rui <ranqus@gmail.com>"
URL = "https://github.com/nirui/sshwifty"
)

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@@ -15,11 +15,11 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
module.exports = function(api) {
module.exports = function (api) {
api.cache(true);
return {
presets: ["@babel/preset-env"],
plugins: [["@babel/plugin-transform-runtime"]]
plugins: [["@babel/plugin-transform-runtime"]],
};
};

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,7 +1,7 @@
/*
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,7 +1,7 @@
<!--
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@@ -15,9 +15,9 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
import Exception from "./exception.js";
import * as reader from "../stream/reader.js";
import * as common from "./common.js";
import Exception from "./exception.js";
export const LOOPBACK = 0x00;
export const IPV4 = 0x01;
@@ -123,7 +123,7 @@ export class Address {
return new Uint8Array([
this.addrPort >> 8,
this.addrPort & 0xff,
LOOPBACK << 6
LOOPBACK << 6,
]);
case IPV4:
@@ -138,7 +138,7 @@ export class Address {
this.addrData[0],
this.addrData[1],
this.addrData[2],
this.addrData[3]
this.addrData[3],
]);
case IPV6:
@@ -165,7 +165,7 @@ export class Address {
this.addrData[12],
this.addrData[13],
this.addrData[14],
this.addrData[15]
this.addrData[15],
]);
case HOSTNAME:
@@ -223,6 +223,6 @@ export function parseHostPort(s, defaultPort) {
return {
type: t,
address: d.addr,
port: d.port
port: d.port,
};
}

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@@ -24,7 +24,7 @@ describe("Address", () => {
let addr = new address.Address(address.LOOPBACK, null, 8080),
buf = addr.buffer();
let r = new reader.Reader(new reader.Multiple(), data => {
let r = new reader.Reader(new reader.Multiple(), (data) => {
return data;
});
@@ -45,7 +45,7 @@ describe("Address", () => {
),
buf = addr.buffer();
let r = new reader.Reader(new reader.Multiple(() => {}), data => {
let r = new reader.Reader(new reader.Multiple(() => {}), (data) => {
return data;
});
@@ -66,7 +66,7 @@ describe("Address", () => {
),
buf = addr.buffer();
let r = new reader.Reader(new reader.Multiple(() => {}), data => {
let r = new reader.Reader(new reader.Multiple(() => {}), (data) => {
return data;
});
@@ -87,7 +87,7 @@ describe("Address", () => {
),
buf = addr.buffer();
let r = new reader.Reader(new reader.Multiple(() => {}), data => {
let r = new reader.Reader(new reader.Multiple(() => {}), (data) => {
return data;
});

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@@ -91,7 +91,7 @@ export class Color {
return {
color: color[0],
dark: color[1]
dark: color[1],
};
}
}

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@@ -15,8 +15,8 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
import Exception from "./exception.js";
import * as reader from "../stream/reader.js";
import Exception from "./exception.js";
export const MAX = 0x3fff;
export const MAX_BYTES = 2;
@@ -54,7 +54,7 @@ export class Integer {
return new Uint8Array([
(this.num >> 7) | integerHasNextBit,
this.num & integerValueCutter
this.num & integerValueCutter,
]);
}

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@@ -24,7 +24,7 @@ describe("Integer", () => {
let i = new integer.Integer(127),
marshalled = i.marshal();
let r = new reader.Reader(new reader.Multiple(() => {}), data => {
let r = new reader.Reader(new reader.Multiple(() => {}), (data) => {
return data;
});
@@ -43,7 +43,7 @@ describe("Integer", () => {
let i = new integer.Integer(integer.MAX),
marshalled = i.marshal();
let r = new reader.Reader(new reader.Multiple(() => {}), data => {
let r = new reader.Reader(new reader.Multiple(() => {}), (data) => {
return data;
});

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@@ -15,16 +15,16 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
import * as strings from "./string.js";
import * as reader from "../stream/reader.js";
import assert from "assert";
import * as reader from "../stream/reader.js";
import * as strings from "./string.js";
describe("String", () => {
it("String 1", async () => {
let s = new strings.String(new Uint8Array(["H", "E", "L", "L", "O"])),
sBuf = s.buffer();
let r = new reader.Reader(new reader.Multiple(() => {}), data => {
let r = new reader.Reader(new reader.Multiple(() => {}), (data) => {
return data;
});
@@ -247,12 +247,12 @@ describe("String", () => {
"O",
"R",
"L",
"D"
"D",
])
),
sBuf = s.buffer();
let r = new reader.Reader(new reader.Multiple(() => {}), data => {
let r = new reader.Reader(new reader.Multiple(() => {}), (data) => {
return data;
});

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,7 +1,7 @@
/*
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@@ -16,11 +16,10 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
import * as iconv from "iconv-lite";
import * as subscribe from "../stream/subscribe.js";
import * as reader from "../stream/reader.js";
import * as color from "../commands/color.js";
import * as common from "../commands/common.js";
import * as reader from "../stream/reader.js";
import * as subscribe from "../stream/subscribe.js";
class Control {
constructor(data, color) {
@@ -32,26 +31,26 @@ class Control {
if (this.charset === "utf-8") {
let enc = new TextEncoder();
this.charsetDecoder = d => {
this.charsetDecoder = (d) => {
return d;
};
this.charsetEncoder = dStr => {
this.charsetEncoder = (dStr) => {
return enc.encode(dStr);
};
} else {
let dec = new TextDecoder(this.charset),
enc = new TextEncoder();
this.charsetDecoder = d => {
this.charsetDecoder = (d) => {
return enc.encode(
dec.decode(d, {
stream: true
stream: true,
})
);
};
this.charsetEncoder = dStr => {
this.charsetEncoder = (dStr) => {
return iconv.encode(dStr, this.charset);
};
}
@@ -64,7 +63,7 @@ class Control {
let self = this;
data.events.place("stdout", async rd => {
data.events.place("stdout", async (rd) => {
try {
self.subs.resolve(self.charsetDecoder(await reader.readCompletely(rd)));
} catch (e) {
@@ -72,7 +71,7 @@ class Control {
}
});
data.events.place("stderr", async rd => {
data.events.place("stderr", async (rd) => {
try {
self.subs.resolve(self.charsetDecoder(await reader.readCompletely(rd)));
} catch (e) {

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@@ -16,12 +16,11 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
import * as iconv from "iconv-lite";
import * as subscribe from "../stream/subscribe.js";
import * as reader from "../stream/reader.js";
import * as color from "../commands/color.js";
import * as common from "../commands/common.js";
import Exception from "../commands/exception.js";
import * as reader from "../stream/reader.js";
import * as subscribe from "../stream/subscribe.js";
// const maxReadBufSize = 1024;
@@ -56,7 +55,7 @@ const unknownTermTypeSendData = new Uint8Array([
84,
69,
82,
77
77,
]);
// Most of code of this class is directly from
@@ -71,7 +70,7 @@ class Parser {
this.options = {
echoEnabled: false,
suppressGoAhead: false,
nawsAccpeted: false
nawsAccpeted: false,
};
this.current = 0;
}
@@ -339,26 +338,26 @@ class Control {
if (this.charset === "utf-8") {
let enc = new TextEncoder();
this.charsetDecoder = d => {
this.charsetDecoder = (d) => {
return d;
};
this.charsetEncoder = dStr => {
this.charsetEncoder = (dStr) => {
return enc.encode(dStr);
};
} else {
let dec = new TextDecoder(this.charset),
enc = new TextEncoder();
this.charsetDecoder = d => {
this.charsetDecoder = (d) => {
return enc.encode(
dec.decode(d, {
stream: true
stream: true,
})
);
};
this.charsetEncoder = dStr => {
this.charsetEncoder = (dStr) => {
return iconv.encode(dStr, this.charset);
};
}
@@ -371,14 +370,14 @@ class Control {
this.enable = false;
this.windowDim = {
cols: 65535,
rows: 65535
rows: 65535,
};
let self = this;
this.parser = new Parser(
this.sender,
d => {
(d) => {
self.subs.resolve(this.charsetDecoder(d));
},
{
@@ -387,13 +386,13 @@ class Control {
},
getWindowDim() {
return self.windowDim;
}
},
}
);
let runWait = this.parser.run();
data.events.place("inband", rd => {
data.events.place("inband", (rd) => {
return new Promise((resolve, _reject) => {
self.parser.feed(rd, () => {
resolve(true);

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,7 +1,7 @@
<!--
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,7 +1,7 @@
/*
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,7 +1,7 @@
<!--
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,7 +1,7 @@
<!--
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@@ -42,7 +42,7 @@
</p>
</noscript>
<p class="copy copy-first">
Copyright &copy; 2019-2021 Ni Rui &lt;nirui@gmx.com&gt;
Copyright &copy; 2019-2021 NI Rui &lt;ranqus@gmail.com&gt;
</p>
<p class="copy">
<a href="https://github.com/nirui/sshwifty" target="blank">

View File

@@ -1,7 +1,7 @@
/*
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,7 +1,7 @@
<!--
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@@ -131,11 +131,11 @@ describe("Common", () => {
6,
7,
8,
9
9,
]),
sepSeg = common.separateBuffer(expected, 16);
sepSeg.forEach(d => {
sepSeg.forEach((d) => {
resultArr.push(...d);
});

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@@ -15,8 +15,8 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
import * as header from "./header.js";
import assert from "assert";
import * as header from "./header.js";
describe("Header", () => {
it("Header", () => {

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@@ -161,7 +161,7 @@ export class Multiple {
if (this.reader === null && this.subscribe.pendings() <= 0) {
this.reader = {
reader: reader,
depleted: depleted
depleted: depleted,
};
return;
@@ -169,7 +169,7 @@ export class Multiple {
this.subscribe.resolve({
reader: reader,
depleted: depleted
depleted: depleted,
});
}
@@ -284,7 +284,7 @@ export class Reader {
this.buffers = new subscribe.Subscribe();
this.bufferConverter =
bufferConverter ||
(d => {
((d) => {
return d;
});
this.closed = false;
@@ -567,7 +567,7 @@ export async function readUntil(indexOfReader, byteData) {
if (pos >= 0) {
return {
data: await readN(indexOfReader, pos + 1),
found: true
found: true,
};
}
@@ -576,12 +576,12 @@ export async function readUntil(indexOfReader, byteData) {
return {
data: d,
found: d[0] === byteData
found: d[0] === byteData,
};
}
return {
data: await readN(indexOfReader, buffered),
found: false
found: false,
};
}

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@@ -41,7 +41,7 @@ describe("Reader", () => {
it("Reader", async () => {
const maxTests = 3;
let IntvCount = 0,
r = new reader.Reader(new reader.Multiple(() => {}), data => {
r = new reader.Reader(new reader.Multiple(() => {}), (data) => {
return data;
}),
expected = [
@@ -68,7 +68,7 @@ describe("Reader", () => {
4,
5,
6,
7
7,
],
feedIntv = setInterval(() => {
r.feed(Uint8Array.from(expected.slice(0, 8)));
@@ -92,7 +92,7 @@ describe("Reader", () => {
});
it("readOne", async () => {
let r = new reader.Reader(new reader.Multiple(() => {}), data => {
let r = new reader.Reader(new reader.Multiple(() => {}), (data) => {
return data;
});
@@ -110,7 +110,7 @@ describe("Reader", () => {
});
it("readN", async () => {
let r = new reader.Reader(new reader.Multiple(() => {}), data => {
let r = new reader.Reader(new reader.Multiple(() => {}), (data) => {
return data;
});
@@ -130,7 +130,7 @@ describe("Reader", () => {
it("Limited", async () => {
const maxTests = 3;
let IntvCount = 0,
r = new reader.Reader(new reader.Multiple(() => {}), data => {
r = new reader.Reader(new reader.Multiple(() => {}), (data) => {
return data;
}),
expected = [0, 1, 2, 3, 4, 5, 6, 7, 0, 1],
@@ -160,7 +160,7 @@ describe("Reader", () => {
it("readCompletely", async () => {
const maxTests = 3;
let IntvCount = 0,
r = new reader.Reader(new reader.Multiple(() => {}), data => {
r = new reader.Reader(new reader.Multiple(() => {}), (data) => {
return data;
}),
expected = [0, 1, 2, 3, 4, 5, 6, 7, 0, 1],
@@ -186,7 +186,7 @@ describe("Reader", () => {
it("readUntil", async () => {
const maxTests = 3;
let IntvCount = 0,
r = new reader.Reader(new reader.Multiple(() => {}), data => {
r = new reader.Reader(new reader.Multiple(() => {}), (data) => {
return data;
}),
sample = [0, 1, 2, 3, 4, 5, 6, 7, 0, 1],

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@@ -129,7 +129,7 @@ export class Sender {
callbacks.push({
resolve: fetched.resolve,
reject: fetched.reject
reject: fetched.reject,
});
// Add data to buffer and maybe flush when the buffer is full
@@ -199,7 +199,7 @@ export class Sender {
self.subscribe.resolve({
data: data,
resolve: resolve,
reject: reject
reject: reject,
});
if (self.bufferedRequests >= self.maxBufferedRequests) {

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@@ -33,8 +33,8 @@ describe("Sender", () => {
const maxSegSize = 64;
let result = [];
let sd = new sender.Sender(
rawData => {
return new Promise(resolve => {
(rawData) => {
return new Promise((resolve) => {
setTimeout(() => {
for (let i in rawData) {
result.push(rawData[i]);
@@ -52,7 +52,7 @@ describe("Sender", () => {
sd.send(expected);
let sendCompleted = new Promise(resolve => {
let sendCompleted = new Promise((resolve) => {
let timer = setInterval(() => {
if (result.length < expected.length) {
return;
@@ -73,8 +73,8 @@ describe("Sender", () => {
const maxSegSize = 64;
let result = [];
let sd = new sender.Sender(
rawData => {
return new Promise(resolve => {
(rawData) => {
return new Promise((resolve) => {
setTimeout(() => {
for (let i in rawData) {
result.push(rawData[i]);
@@ -102,7 +102,7 @@ describe("Sender", () => {
}, 100);
}
let sendCompleted = new Promise(resolve => {
let sendCompleted = new Promise((resolve) => {
let timer = setInterval(() => {
if (result.length < expectedLen) {
return;

View File

@@ -1,6 +1,6 @@
// Sshwifty - A Web SSH client
//
// Copyright (C) 2019-2021 Ni Rui <nirui@gmx.com>
// Copyright (C) 2019-2021 NI Rui <ranqus@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@@ -15,11 +15,11 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
import * as common from "./common.js";
import Exception from "./exception.js";
import * as header from "./header.js";
import * as reader from "./reader.js";
import * as sender from "./sender.js";
import * as common from "./common.js";
export class Sender {
/**

Some files were not shown because too many files have changed in this diff Show More