Change my public email address
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
/**
|
||||
|
||||
@@ -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,12 +15,12 @@
|
||||
// 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 stream from "./stream.js";
|
||||
import * as reader from "./reader.js";
|
||||
import * as sender from "./sender.js";
|
||||
import * as common from "./common.js";
|
||||
import * as stream from "./stream.js";
|
||||
|
||||
export const ECHO_FAILED = -1;
|
||||
|
||||
|
||||
@@ -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,6 @@
|
||||
// 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 assert from "assert";
|
||||
|
||||
describe("Streams", () => {
|
||||
it("Header", () => {});
|
||||
});
|
||||
|
||||
@@ -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
|
||||
@@ -101,14 +101,14 @@ export class Subscribe {
|
||||
let self = this;
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
self.res = d => {
|
||||
self.res = (d) => {
|
||||
self.res = null;
|
||||
self.rej = null;
|
||||
|
||||
resolve(d);
|
||||
};
|
||||
|
||||
self.rej = e => {
|
||||
self.rej = (e) => {
|
||||
self.res = null;
|
||||
self.rej = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user