Removed moment and webrtc adapter and bundle it with webpack
parent
d5ed46150e
commit
3ec30c07f9
44
file.ts
44
file.ts
|
@ -479,23 +479,6 @@ const WEB_APP_FILE_LIST = [
|
|||
"path": "js/",
|
||||
"local-path": "./loader/dist/"
|
||||
},
|
||||
{ /* shared javascript files (WebRTC adapter) */
|
||||
"type": "js",
|
||||
"search-pattern": /.*\.js$/,
|
||||
"build-target": "dev|rel",
|
||||
|
||||
"path": "adapter/",
|
||||
"local-path": "./shared/adapter/"
|
||||
},
|
||||
|
||||
{ /* shared generated worker codec */
|
||||
"type": "js",
|
||||
"search-pattern": /(WorkerPOW.js)$/,
|
||||
"build-target": "dev|rel",
|
||||
|
||||
"path": "js/workers/",
|
||||
"local-path": "./shared/js/workers/"
|
||||
},
|
||||
{ /* shared developer single css files */
|
||||
"type": "css",
|
||||
"search-pattern": /.*\.css$/,
|
||||
|
@ -572,33 +555,6 @@ const WEB_APP_FILE_LIST = [
|
|||
|
||||
|
||||
/* web specific */
|
||||
{ /* generated assembly files */
|
||||
"web-only": true,
|
||||
"type": "wasm",
|
||||
"search-pattern": /.*\.(wasm)/,
|
||||
"build-target": "dev|rel",
|
||||
|
||||
"path": "wasm/",
|
||||
"local-path": "./asm/generated/"
|
||||
},
|
||||
{ /* generated assembly javascript files */
|
||||
"web-only": true,
|
||||
"type": "js",
|
||||
"search-pattern": /.*\.(js)/,
|
||||
"build-target": "dev|rel",
|
||||
|
||||
"path": "wasm/",
|
||||
"local-path": "./asm/generated/"
|
||||
},
|
||||
{ /* web generated worker codec */
|
||||
"web-only": true,
|
||||
"type": "js",
|
||||
"search-pattern": /(WorkerCodec.js)$/,
|
||||
"build-target": "dev|rel",
|
||||
|
||||
"path": "js/workers/",
|
||||
"local-path": "./web/js/workers/"
|
||||
},
|
||||
{ /* web css files */
|
||||
"web-only": true,
|
||||
"type": "css",
|
||||
|
|
|
@ -103,11 +103,9 @@ const loader_javascript = {
|
|||
await loader.scripts.load("vendor/jsrender/jsrender.min.js", { cache_tag: cache_tag() });
|
||||
await loader.scripts.load_multiple([
|
||||
["vendor/xbbcode/src/parser.js"],
|
||||
["vendor/moment/moment.js"],
|
||||
["vendor/twemoji/twemoji.min.js", ""], /* empty string means not required */
|
||||
["vendor/highlight/highlight.pack.js", ""], /* empty string means not required */
|
||||
["vendor/remarkable/remarkable.min.js", ""], /* empty string means not required */
|
||||
["adapter/adapter-latest.js", "https://webrtc.github.io/adapter/adapter-latest.js"]
|
||||
], {
|
||||
cache_tag: cache_tag(),
|
||||
max_parallel_requests: -1
|
||||
|
|
|
@ -2059,6 +2059,11 @@
|
|||
"domelementtype": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"dompurify": {
|
||||
"version": "2.0.8",
|
||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.8.tgz",
|
||||
"integrity": "sha512-vIOSyOXkMx81ghEalh4MLBtDHMx1bhKlaqHDMqM2yeitJ996SLOk5mGdDpI9ifJAgokred8Rmu219fX4OltqXw=="
|
||||
},
|
||||
"domutils": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/domutils/-/domutils-2.0.0.tgz",
|
||||
|
@ -5875,8 +5880,7 @@
|
|||
"moment": {
|
||||
"version": "2.24.0",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz",
|
||||
"integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg=="
|
||||
},
|
||||
"move-concurrently": {
|
||||
"version": "1.0.1",
|
||||
|
@ -7703,6 +7707,14 @@
|
|||
"inherits": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"rtcpeerconnection-shim": {
|
||||
"version": "1.2.15",
|
||||
"resolved": "https://registry.npmjs.org/rtcpeerconnection-shim/-/rtcpeerconnection-shim-1.2.15.tgz",
|
||||
"integrity": "sha512-C6DxhXt7bssQ1nHb154lqeL0SXz5Dx4RczXZu2Aa/L1NJFnEVDxFwCBo3fqtuljhHIGceg5JKBV4XJ0gW5JKyw==",
|
||||
"requires": {
|
||||
"sdp": "^2.6.0"
|
||||
}
|
||||
},
|
||||
"run-queue": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz",
|
||||
|
@ -7937,6 +7949,11 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"sdp": {
|
||||
"version": "2.12.0",
|
||||
"resolved": "https://registry.npmjs.org/sdp/-/sdp-2.12.0.tgz",
|
||||
"integrity": "sha512-jhXqQAQVM+8Xj5EjJGVweuEzgtGWb3tmEEpl3CLP3cStInSbVHSg0QWOGQzNq8pSID4JkpeV2mPqlMDLrm0/Vw=="
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
|
@ -10340,6 +10357,15 @@
|
|||
"source-map": "~0.6.1"
|
||||
}
|
||||
},
|
||||
"webrtc-adapter": {
|
||||
"version": "7.5.1",
|
||||
"resolved": "https://registry.npmjs.org/webrtc-adapter/-/webrtc-adapter-7.5.1.tgz",
|
||||
"integrity": "sha512-R5LkIR/APjODkstSXFOztOmINXQ0nqIGfUoKTtCzjyiDXHNgwhkqZ9vi8UzGyjfUBibuZ0ZzVyV10qtuLGW3CQ==",
|
||||
"requires": {
|
||||
"rtcpeerconnection-shim": "^1.2.15",
|
||||
"sdp": "^2.12.0"
|
||||
}
|
||||
},
|
||||
"which": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
|
||||
|
|
|
@ -75,7 +75,10 @@
|
|||
},
|
||||
"homepage": "https://www.teaspeak.de",
|
||||
"dependencies": {
|
||||
"dompurify": "^2.0.8",
|
||||
"moment": "^2.24.0",
|
||||
"react": "^16.13.1",
|
||||
"react-dom": "^16.13.1"
|
||||
"react-dom": "^16.13.1",
|
||||
"webrtc-adapter": "^7.5.1"
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +1,4 @@
|
|||
import * as moment from "moment";
|
||||
import * as loader from "tc-loader";
|
||||
import {settings, Settings} from "tc-shared/settings";
|
||||
import * as profiles from "tc-shared/profiles/ConnectionProfile";
|
||||
|
@ -90,7 +91,6 @@ function setup_close() {
|
|||
};
|
||||
}
|
||||
|
||||
declare function moment(...arguments) : any;
|
||||
function setup_jsrender() : boolean {
|
||||
if(!js_render) {
|
||||
loader.critical_error("Missing jsrender extension!");
|
||||
|
|
|
@ -6,6 +6,7 @@ import {media_image_type} from "tc-shared/FileManager";
|
|||
import {spawnYesNo} from "tc-shared/ui/modal/ModalYesNo";
|
||||
import {ClientEntry} from "tc-shared/ui/client";
|
||||
import * as log from "tc-shared/log";
|
||||
import * as moment from "moment";
|
||||
|
||||
const avatar_to_uid = (id: string) => {
|
||||
const buffer = new Uint8Array(id.length / 2);
|
||||
|
@ -24,7 +25,6 @@ export const human_file_size = (size: number) => {
|
|||
return (size / Math.pow(1024, exp)).toFixed(2) + 'KMGTPE'.charAt(exp - 1) + "iB";
|
||||
};
|
||||
|
||||
declare const moment;
|
||||
export function spawnAvatarList(client: ConnectionHandler) {
|
||||
const modal = createModal({
|
||||
header: tr("Avatars"),
|
||||
|
|
|
@ -8,6 +8,7 @@ import * as log from "tc-shared/log";
|
|||
import * as tooltip from "tc-shared/ui/elements/Tooltip";
|
||||
import * as htmltags from "tc-shared/ui/htmltags";
|
||||
import {format_time, formatMessage} from "tc-shared/ui/frames/chat";
|
||||
import * as moment from "moment";
|
||||
|
||||
export function openBanList(client: ConnectionHandler) {
|
||||
let modal: Modal;
|
||||
|
@ -270,7 +271,6 @@ export const duration_data = {
|
|||
},
|
||||
};
|
||||
|
||||
declare const moment;
|
||||
function generate_dom(controller: BanListController) : JQuery {
|
||||
const template = $("#tmpl_ban_list").renderTag();
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import {createInfoModal, createModal, Modal} from "tc-shared/ui/elements/Modal";
|
|||
import {copy_to_clipboard} from "tc-shared/utils/helpers";
|
||||
import * as i18nc from "tc-shared/i18n/country";
|
||||
import * as tooltip from "tc-shared/ui/elements/Tooltip";
|
||||
import * as moment from "moment";
|
||||
import {format_number, network} from "tc-shared/ui/frames/chat";
|
||||
|
||||
type InfoUpdateCallback = (info: ClientConnectionInfo) => any;
|
||||
|
@ -126,7 +127,6 @@ function apply_client_status(client: ClientEntry, tag: JQuery, modal: Modal, cal
|
|||
}
|
||||
}
|
||||
|
||||
declare const moment;
|
||||
function apply_basic_info(client: ClientEntry, tag: JQuery, modal: Modal, callbacks: InfoUpdateCallback[]) {
|
||||
/* Unique ID */
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@ import {ConnectionHandler} from "tc-shared/ConnectionHandler";
|
|||
import {createModal, Modal} from "tc-shared/ui/elements/Modal";
|
||||
import * as htmltags from "tc-shared/ui/htmltags";
|
||||
import {bbcode_chat} from "tc-shared/ui/frames/chat";
|
||||
import * as moment from "moment";
|
||||
|
||||
let global_modal: PokeModal;
|
||||
|
||||
|
@ -10,7 +11,6 @@ interface ServerEntry {
|
|||
add_message(invoker: PokeInvoker, message: string);
|
||||
}
|
||||
|
||||
declare const moment;
|
||||
class PokeModal {
|
||||
private _handle: Modal;
|
||||
private source_map: ServerEntry[] = [];
|
||||
|
|
|
@ -12,8 +12,8 @@ import * as tooltip from "tc-shared/ui/elements/Tooltip";
|
|||
import * as i18nc from "tc-shared/i18n/country";
|
||||
import {format_time, formatMessage} from "tc-shared/ui/frames/chat";
|
||||
import {Hostbanner} from "tc-shared/ui/frames/hostbanner";
|
||||
import * as moment from "moment";
|
||||
|
||||
declare const moment;
|
||||
export function openServerInfo(server: ServerEntry) {
|
||||
let modal: Modal;
|
||||
let update_callbacks: ServerBandwidthInfoUpdateCallback[] = [];
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1 +1,4 @@
|
|||
const tc = require("tc-shared/main");
|
||||
const webrtc_adapter = require("webrtc-adapter");
|
||||
const tc = require("tc-shared/main");
|
||||
|
||||
console.log(webrtc_adapter);
|
Loading…
Reference in New Issue