Skip to content

Commit

Permalink
Prevent pre-commit hook formatting lib files
Browse files Browse the repository at this point in the history
  • Loading branch information
JanCVanB committed Jun 5, 2022
1 parent 75d56a1 commit 29f96cf
Show file tree
Hide file tree
Showing 25 changed files with 487 additions and 262 deletions.
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
html5/sw.js
html5/js/lib/**/*.js
586 changes: 392 additions & 194 deletions docs/imports_graph.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 0 additions & 8 deletions html5/connect.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@
<meta name="mobile-web-app-capable" content="yes" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<link rel="icon" type="image/png" href="favicon.png" />

<script src="js/lib/jquery.js"></script>
<script src="js/lib/aurora/aurora.js"></script>
<!--
<script src="js/lib/aurora/mp3.js"></script>
<script src="js/lib/aurora/flac.js"></script>
<script src="js/lib/aurora/aac.js"></script>
-->
</head>

<body>
Expand Down
40 changes: 0 additions & 40 deletions html5/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,54 +23,14 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="css/spinner.css" />

<script type="text/javascript" src="js/lib/jquery.js"></script>
<script type="text/javascript" src="js/lib/jquery-ui.js"></script>
<script
type="text/javascript"
src="js/lib/jquery.ba-throttle-debounce.js"
></script>
<script
type="text/javascript"
src="js/lib/jquery-transform-draggable.js"
></script>

<script type="text/javascript" src="js/lib/rencode.js"></script>
<script type="text/javascript" src="js/lib/lz4.js"></script>
<script type="text/javascript" src="js/lib/brotli_decode.js"></script>
<script type="text/javascript" src="js/lib/forge.js"></script>

<script type="text/javascript" src="js/lib/jsmpeg.js"></script>
<script type="text/javascript" src="js/lib/broadway/Decoder.js"></script>
<script type="text/javascript" src="js/lib/aurora/aurora.js"></script>
<!--
<script type="text/javascript" src="js/lib/aurora/mp3.js"></script>
<script type="text/javascript" src="js/lib/aurora/flac.js"></script>
<script type="text/javascript" src="js/lib/aurora/aac.js"></script>
-->
<script type="text/javascript" src="js/lib/aurora/aurora-xpra.js"></script>

<script
type="text/javascript"
src="js/lib/web-streams-ponyfill.es6.js"
></script>
<script type="text/javascript" src="js/lib/StreamSaver.js"></script>
<script type="text/javascript" src="js/lib/FileSaver.js"></script>
<script type="text/javascript" src="js/lib/jszip.js"></script>
<script type="text/javascript" src="js/lib/detect-zoom.js"></script>

<link rel="stylesheet" type="text/css" href="css/menu.css" />
<link rel="stylesheet" type="text/css" href="css/menu-skin.css" />
<link rel="stylesheet" type="text/css" href="css/icon.css" />

<!-- slick carousel for window preview feature -->
<link rel="stylesheet" type="text/css" href="css/slick.css" />
<script type="text/javascript" src="js/lib/slick.js"></script>

<!-- simple-keyboard -->
<script
type="application/javascript"
src="js/lib/simple-keyboard.js"
></script>
<link rel="stylesheet" href="css/simple-keyboard.css" />
</head>

Expand Down
12 changes: 7 additions & 5 deletions html5/js/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
* Licensed under MPL 2.0
*
* xpra client
*
* requires:
* Protocol.js
* Window.js
* Keycodes.js
*/

import "./lib/forge.js";
import "./lib/jquery.js";
import "./lib/jquery.ba-throttle-debounce.js";
import "./lib/lz4.js";
import "./lib/rencode.js";
import "./lib/StreamSaver.js";

import { PACKET_TYPES } from "./Constants.js";
import {
CHAR_TO_NAME,
Expand Down
2 changes: 2 additions & 0 deletions html5/js/ConnectPage.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import "./lib/jquery.js";

import { MediaSourceConstants, MediaSourceUtil } from "./MediaSourceUtil.js";
import { XpraOffscreenWorker } from "./OffscreenDecodeWorkerHelper.js";
import { Utilities } from "./Utilities.js";
Expand Down
5 changes: 5 additions & 0 deletions html5/js/IndexPage.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import "./lib/jquery.js";
import "./lib/jsmpeg.js";
import "./lib/simple-keyboard.js";
import "./lib/slick.js";

import { XpraClient } from "./Client.js";
import { CHAR_TO_NAME, KEYSYM_TO_LAYOUT } from "./Keycodes.js";
import "./Menu.js";
Expand Down
2 changes: 2 additions & 0 deletions html5/js/MediaSourceUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*
*/

import "./lib/aurora/aurora.js";

import { Utilities } from "./Utilities.js";

export const MediaSourceConstants = {
Expand Down
2 changes: 2 additions & 0 deletions html5/js/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ SOFTWARE.
*/

import "./lib/jquery.js";

(function () {
function $(selector, context) {
context = context || document;
Expand Down
3 changes: 3 additions & 0 deletions html5/js/MenuCustom.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ SOFTWARE.
*/

import "./lib/jquery.js";
import "./lib/jquery-transform-draggable.js";

const MENU_CONTENT_LEFT_CLASS_NAME = "menu-content-left";
const MENU_CONTENT_RIGHT_CLASS_NAME = "menu-content-right";

Expand Down
3 changes: 3 additions & 0 deletions html5/js/Notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
*
*/

import "./lib/jquery.js";
import "./lib/jquery.ba-throttle-debounce.js";

import { Utilities } from "./Utilities.js";

$(function () {
Expand Down
4 changes: 0 additions & 4 deletions html5/js/Protocol.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
* Licensed under MPL 2.0
*
* xpra wire protocol with worker support
*
* requires:
* lz4.js
* brotli_decode.js
*/

import "./lib/brotli_decode.js";
Expand Down
3 changes: 3 additions & 0 deletions html5/js/RgbHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
* Copyright (c) 2021 Antoine Martin <antoine@xpra.org>
*/

import "./lib/lz4.js";
import "./lib/zlib.js";

//deals with zlib or lz4 pixel compression
//as well as converting rgb24 to rb32 and
//re-striding the pixel data if needed so that lines are not padded
Expand Down
6 changes: 3 additions & 3 deletions html5/js/Window.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
* xpra window
*
* Based on shape.js but no longer requires it
*
* requires:
* jQueryUI
*/

import "./lib/broadway/Decoder.js";
import "./lib/jquery.js";

import {
DEFAULT_BOX_COLORS,
MOVERESIZE_CANCEL,
Expand Down
7 changes: 6 additions & 1 deletion html5/js/lib/StreamSaver.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// [XPRA] Note to Xpra maintainers: When updating, preserve this block...
const this_ = window;
// [XPRA] ... of ES module import compatibility adjustments.
// [XPRA] Also, use `this_` in the end of `(name, definition) => { ... }`!

/*! streamsaver. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */

/* global chrome location ReadableStream define MessageChannel TransformStream */
Expand All @@ -7,7 +12,7 @@
? module.exports = definition()
: typeof define === 'function' && typeof define.amd === 'object'
? define(definition)
: this[name] = definition()
: this_[name] = definition()
})('streamSaver', () => {
'use strict'

Expand Down
7 changes: 6 additions & 1 deletion html5/js/lib/broadway/Decoder.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// [XPRA] Note to Xpra maintainers: When updating, preserve this block...
const this_ = window;
// [XPRA] ... of ES module import compatibility adjustments.
// [XPRA] Also, pass `this_` to `function (root, factory)` as `root`!

// universal module definition
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
Expand All @@ -12,7 +17,7 @@
// Browser globals (root is window)
root.Decoder = factory();
}
}(this, function () {
}(this_, function () {

var global;

Expand Down
5 changes: 5 additions & 0 deletions html5/js/lib/jquery-transform-draggable.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// [XPRA] Note to Xpra maintainers: When updating, preserve this block...
import "./jquery.js";
import "./jquery-ui.js";
// [XPRA] ... of ES module import compatibility adjustments.

/*
* xpra client
* Licensed under MPL 2.0
Expand Down
4 changes: 4 additions & 0 deletions html5/js/lib/jquery-ui.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// [XPRA] Note to Xpra maintainers: When updating, preserve this block...
import "./jquery.js";
// [XPRA] ... of ES module import compatibility adjustments.

/*! jQuery UI - v1.12.1 - 2016-11-13
* http://jqueryui.com
* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/draggable.js, widgets/droppable.js, widgets/resizable.js, widgets/selectable.js, widgets/sortable.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/selectmenu.js, widgets/slider.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js
Expand Down
8 changes: 7 additions & 1 deletion html5/js/lib/jquery.ba-throttle-debounce.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// [XPRA] Note to Xpra maintainers: When updating, preserve this block...
import "./jquery.js";
const this_ = window;
// [XPRA] ... of ES module import compatibility adjustments.
// [XPRA] Also, pass `this_` to `function(window,undefined)` as `window`!

/*!
* jQuery throttle / debounce - v1.1 - 3/7/2010
* http://benalman.com/projects/jquery-throttle-debounce-plugin/
Expand Down Expand Up @@ -249,4 +255,4 @@
: jq_throttle( delay, callback, at_begin !== false );
};

})(this);
})(this_);
4 changes: 4 additions & 0 deletions html5/js/lib/jsmpeg.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// [XPRA] Note to Xpra maintainers: When updating, preserve this block...
window.JSMpeg = JSMpeg;
// [XPRA] ... of ES module import compatibility adjustments.

/*! jsmpeg v1.0 | (c) Dominic Szablewski | MIT license */


Expand Down
6 changes: 3 additions & 3 deletions html5/js/lib/jszip.js
Original file line number Diff line number Diff line change
Expand Up @@ -4341,8 +4341,8 @@ module.exports = require('./_descriptors') ? function(object, key, value){
},{"./_descriptors":42,"./_object-dp":52,"./_property-desc":53}],48:[function(require,module,exports){
module.exports = require('./_global').document && document.documentElement;
},{"./_global":46}],49:[function(require,module,exports){
module.exports = !require('./_descriptors') && !require('./_fails')(function(){
return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;
module.exports = !require('./_descriptors') && !require('./_fails')(function(){
return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;
});
},{"./_descriptors":42,"./_dom-create":43,"./_fails":45}],50:[function(require,module,exports){
// fast apply, http://jsperf.lnkit.com/fast-apply/5
Expand Down Expand Up @@ -4470,7 +4470,7 @@ module.exports = {
},{"./_cof":39,"./_ctx":41,"./_dom-create":43,"./_global":46,"./_html":48,"./_invoke":50}],55:[function(require,module,exports){
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = require('./_is-object');
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// instead of the ES spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function(it, S){
if(!isObject(it))return it;
Expand Down
6 changes: 6 additions & 0 deletions html5/js/lib/lz4.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// [XPRA] Note to Xpra maintainers: When updating, preserve this block...
let lz4;
let util;
let xxhash;
// [XPRA] ... of ES module import compatibility adjustments.

// lz4.js - An implementation of Lz4 in plain JavaScript.
//
// TODO:
Expand Down
10 changes: 10 additions & 0 deletions html5/js/lib/rencode.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
// [XPRA] Note to Xpra maintainers: When updating, preserve this block...
let rencode_legacy_mode;
window.rdecodelegacy = rdecodelegacy;
window.rdecodeplus = rdecodeplus;
window.rencode = rencode;
window.rencode_selftest = rencode_selftest;
window.rencodelegacy = rencodelegacy;
window.rencodeplus = rencodeplus;
// [XPRA] ... of ES module import compatibility adjustments.

/*
* Copyright (c) 2021 Antoine Martin <antoine@xpra.org>
*/
Expand Down
7 changes: 6 additions & 1 deletion html5/js/lib/simple-keyboard.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// [XPRA] Note to Xpra maintainers: When updating, preserve this block...
const this_ = window;
// [XPRA] ... of ES module import compatibility adjustments.
// [XPRA] Also, pass `this_` to `webpackUniversalModuleDefinition` as `root`!

/*!
*
* simple-keyboard v3.3.30
Expand All @@ -18,7 +23,7 @@
exports["SimpleKeyboard"] = factory();
else
root["SimpleKeyboard"] = factory();
})(this, function() {
})(this_, function() {
return /******/ (function() { // webpackBootstrap
/******/ var __webpack_modules__ = ({

Expand Down
7 changes: 6 additions & 1 deletion html5/js/lib/web-streams-ponyfill.es6.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
// [XPRA] Note to Xpra maintainers: When updating, preserve this block...
const this_ = window;
// [XPRA] ... of ES module import compatibility adjustments.
// [XPRA] Also, pass `this_` to `function (global, factory)` as `global`!

/**
* web-streams-polyfill v3.2.1
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.WebStreamsPolyfill = {}));
})(this, (function (exports) { 'use strict';
})(this_, (function (exports) { 'use strict';

/// <reference lib="es2015.symbol" />
const SymbolPolyfill = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ?
Expand Down

0 comments on commit 29f96cf

Please sign in to comment.