Commit Graph

172 Commits

Author SHA1 Message Date
Solly Ross 84586c0f17 Change copyright header (#1138)
* Change copyright header

This updates the copyright header to say "The noVNC Authors".  People
who previously had copyright listings are now under the AUTHORS file.
2018-10-09 12:15:35 +02:00
Pierre Ossman 2c5491e131 Enforce space after function name 2018-09-06 17:34:15 +02:00
Pierre Ossman 3f1cda2e37 Enforce space before code block 2018-09-06 17:29:26 +02:00
Pierre Ossman 0ae5c54ab3 Enforce explicit semi-colons 2018-09-06 17:25:02 +02:00
Pierre Ossman 4a16dc51a8 Enforce no trailing whitespace 2018-09-06 17:12:45 +02:00
Pierre Ossman 35068204f4 Enforce keyword spacing 2018-09-06 17:08:19 +02:00
Pierre Ossman e777765320 Enforce function names 2018-09-06 16:53:40 +02:00
Pierre Ossman 7b536961b2 Enforce indentation 2018-09-06 16:37:38 +02:00
Solly Ross ee3493c060 Add a record flag to launch.sh
Add the `--record` flag to launch.js, for easy recording when testing.
2018-07-30 11:07:33 -04:00
Juanjo Diaz 651c23ece3 Use fat arrow functions `const foo = () => { ... };` for callbacks
and any other function that is passed around and it's not a top level function
2018-07-12 19:06:57 +02:00
Henry Vindin 9700e3592b Fixes #1075
Rather than trying to pick a utility, we should be able to just use bash to check if a port is available or not.

We can probably assume bash is available due to the shebang declaring it.
2018-07-01 15:37:34 +10:00
Juanjo Diaz 2b5f94fa6a Prefer const/let over var 2018-05-24 00:27:09 +03:00
Juanjo Diaz cdb860ad84 Add transpilation for IE11 and skip linux tests 2018-05-24 00:26:34 +03:00
Juanjo Diaz 8727f598c2 Add eslint and fix reported issues 2018-05-24 00:25:44 +03:00
Pierre Ossman 4a65d50d0c Only use converted modules as legacy fallback for app
Several of the major browsers now natively support modules, so we
only need the converted modules to handle older browsers. Make sure
it's only used when necessary.
2018-02-28 13:28:07 +01:00
Pierre Ossman d584c5f624 Don't include icons Makefile when packaging 2018-01-05 16:17:29 +01:00
Pierre Ossman be7b4e88f0 Remove intermediate files when bundling 2018-01-05 16:17:29 +01:00
Pierre Ossman 2163326888 Convert use_require.js to use promises
We had some race conditions between the callbacks that could cause
failures. Order everything properly using promises.
2018-01-05 16:17:26 +01:00
Solly Ross a80955ee7a [infra] fix vendor import paths on built files
A previous commit started (quasi-correctly) rewriting vendor import
paths on built files.  The gist of it was correct, but it incorrectly
rewrote paths in vendor itself.

The babel plugin in use operated on canonical absolute paths.  This mean
that it saw no difference between the import
`../vendor/pako/lib/utils/foo` and `../utils/foo`, where the later was
actually in the `vendor/pako/lib/bar` directory.  This rewrote imports
in files in the vendor directory itself.  However, since those files
were *already* in the correct relative location, the new import was
incorrect by a degree of `..`.

Now, we only rewrite vendor paths on things in the `core` directory.
2017-10-03 19:30:20 -04:00
Solly Ross c4e5a50e09 [infra] option to clean on use_require.js
This adds an option to `utils/use_require.js` which cleans the lib
and build directories before regenerating them.  This will enable us
to make sure we always have a fresh copy of the lib dir before
publishing.
2017-10-03 18:21:36 -04:00
Pierre Ossman 1524df89ad Adjust import of vendor/ modules in NPM package
We move the files in core/ up one directory level so we need to adjust
the imports from vendor libraries.
2017-07-04 10:10:36 +02:00
Pierre Ossman d5c5b4aab7 Properly use babel opts
We prepared an options object for babel, but didn't include it properly
in the final call to babel.
2017-07-04 10:09:04 +02:00
Pierre Ossman 545442afc3 Merge branch 'keyboard' of https://github.com/CendioOssman/noVNC 2017-05-04 12:18:55 +02:00
Samuel Mannehed 101ff12736 Update url's 2017-04-19 15:33:42 +02:00
Pierre Ossman 278a5e7fbd Simplify keysymdef.js
Some Unicode to Keysym mappings can be computed and can therefore
be left out of the huge lookup table.
2017-03-24 11:31:38 +01:00
Pierre Ossman 041568bd31 Clean up keysymdef 2017-03-24 11:26:02 +01:00
Pierre Ossman 524d67f283 Remove keysym names from keysymdef.js
They were incomplete and turned off in most cases so they served
little use besides adding complexity.
2017-03-24 11:16:53 +01:00
Pierre Ossman 9076defaca Get parse.js in sync with generated code
The generated keysymdef.js was recently converted to ES modules,
but the generating script was overlooked.
2017-03-24 10:49:00 +01:00
Solly Ross 152c399513 Vendor in an IE11 polyfill for Promises
This commit introduces a polyfill to add support for Promises in IE11.
This means IE11 can be tested without first running
`utils/as_require.js`.
2017-03-21 17:39:07 -04:00
Solly Ross adfc9d3f54 Move error handler into separate file
This commit moves the global error handler into a separate file,
so that it can catch module loading errors.

This also adds support for properly displaying error messages with
newlines in them (since the module loader may throw those)
2017-03-21 17:39:07 -04:00
Solly Ross 399fa2ee2d Optimize ES6 Module Loader Polyfill
This commit makes the ES6 module loader polyfill use Web Workers,
so that Babel doesn't block the browser from animating.  It also
uses localStorage to cache the compiled results, only recompiling
on source changes, so it makes loading faster while developing noVNC.

This includes a vendored copy of the ES6 module loader, modified as
described above.
2017-03-21 17:39:07 -04:00
Solly Ross 6cae7b58b8 Allow transforming to any format
This changes around `utils/use_require.js` to be able to generate any
of AMD (RequireJS), CommonJS, SystemJS, or UMD modules.  The three
former also include support for translating `vnc.html`, producing a full
"app" version of noVNC.
2017-03-07 11:11:28 -05:00
Pierre Ossman 115eedf69c Use Unicode keysym range as fallback
Not all Unicode codepoints have an equivalent named Keysym. But
there is a range in the Keysym namespace that can be used to map
any codepoint to.
2016-10-15 14:58:55 +02:00
Solly Ross 9dfbf44028 Merge pull request #603 from WardF/master
Added option for --ssl-only noVNC session to launch.sh
2016-09-16 17:16:43 -04:00
Solly Ross bd5340c7ee Move input-related files into core/input
This commit moves all the input-related files from `core/`
to `core/input/`, and renames a couple as relevant
(input.js --> input/devices.js, keyboard.js --> input/util.js).
2016-09-16 15:49:52 -04:00
Solly Ross ae510306b5 Enable noVNC to become Browserifiable
This commit restructures noVNC, splitting it into the core directory
and the app directory, with the former containing core noVNC parts,
and the latter containing parts specific to the application.
2016-09-16 15:49:51 -04:00
Trần Tuấn Anh 12f4747ced Removing unused import (#642) 2016-08-26 11:09:22 +02:00
nunojusto 83d3e02fd9 Update launch.sh
Just a correction of port in use test algoritm.
This way we will not have problems when using port X and having some other service using zyX or any *X port
2016-08-16 22:10:14 +01:00
Joel Martin 15e733f533 Clarify that utils/launch.sh is MPL-2.0
Also, note in the top-level license file that the default noVNC
license for files that are not explicitly marked or mentioned in
the LICENSE.txt file are by default MPL-2.0 licensed.
2016-06-13 10:22:43 -05:00
Ward Fisher 27a1f6cb95 Tweaked message printed based on whether or not http is available. 2016-04-11 14:42:42 -06:00
Ward Fisher c77d9fcc4e Added an '--ssl-only' option to noVNC launch script. This will pass through to Websockify, allowing a user to specify that only ssl-secured connections will be allowed. 2016-04-11 14:32:14 -06:00
Solly Ross 4ee55e0126 Fixed vnc_perf.html
This commit updates vnc_perf.html so that it works with the current
version of noVNC.  It also introduces a utility to convert noVNC session
recordings recorded in base64-mode to binary-mode recordings, since noVNC
no longer supports base64-mode.

Fixes #479.
2016-01-06 13:32:05 -05:00
Sarrailh Rémi 54e835eeac Small typo in launch.sh 2015-11-23 13:08:05 +01:00
Solly Ross c802d93189 Make sure Pako always has enough room
Previously, we used a fixed chunkSize of 100KiB for Pako's output
buffer.  Using a hardcoded size caused issues, since Pako would assume
we wanted to use multiple chunks, and we didn't deal with this.  Now,
`Inflator#inflate()` takes a new `expected` argument, which indicates
the expected output size.  If this is bigger than the current chunkSize,
Inflator allocates a new output buffer that's big enough to hold the
output.

Fixes #531
2015-09-23 09:53:00 -04:00
Solly Ross 6940936ffc WIP: Switch to Pako for zlib
This commit introduces an alternate implementation of the zlib
decompressor based on Pako (https://github.com/nodeca/pako).
2015-08-06 14:47:03 -04:00
Solly Ross 2ace90e6d5 Follow symbolic links in launch.sh
Previously, in launch.sh, `$HERE` was the directory of `$0`.
However, if `$0` was actually a symlink, `$HERE` would be
wherever the symlink was, which could cause issues (for
example, the script wouldn't be able to local `$WEB` or
`$WEBSOCKIFY` properly).

Now, `$HERE` looks at whatever `$0` points at instead.

Closes #447.
2015-03-26 16:57:17 -04:00
Solly Ross fe8a4dc9d8 Remove last bits of websockify cruft
Issue #449 pointed out that there were some files that were
missed in 6f5148648b.  This
fixes that.

Closes #449
Closes #450
2015-02-17 23:15:51 -05:00
Solly Ross 9db6a90677 Make sure websockify is cloned to the correct dir
When `utils/launch.sh` clones websockify, it can be cloned
into the incorrect directory, depending on how `utils/launch.sh`
is run.  This commit ensures that websockify is always cloned into
`utils/websockify`.
2015-02-17 17:54:21 -05:00
Solly Ross 5cd6de495f Actually remove the "websockify" file
Somehow, `utils/websockify` itself manage to sneak back in to
6f5148648b.  This actually removes
it.
2015-02-17 17:45:57 -05:00
Solly Ross 6f5148648b Remove local copies of websockify
This commit removes local copies of websockify.
Instead `utils/launch.sh` performs the following logic:

If `utils/websockify` exists, use `utils/websockify/run` (if the latter
does not exist, or is not executable, fail, since this is probably a
mistake).

Otherwise, check to see if websockify is installed somewhere (try
`which websockify`).  If it is, use that.  Otherwise, clone
websockify from github, and tell git to ignore that directory.

Packaged versions of noVNC should simply list websockify as a
requirement.  The debian packaging has been updated to reflect
this.

Closes #433
2015-02-16 17:09:58 -05:00