Permalink
Browse files

Change files eol

  • Loading branch information...
rafaelmaiolla committed Mar 22, 2016
1 parent 9bd1e80 commit 0554c94a163098e5b91d9c5bc284c75b9a6e01f3
Showing with 1,005 additions and 1,005 deletions.
  1. +18 −18 .travis.yml
  2. +29 −29 .vscode/tasks.json
  3. +13 −13 LICENSE.txt
  4. +88 −88 src/extension.ts
  5. +36 −36 src/lib/Command.ts
  6. +149 −149 src/lib/RemoteFile.ts
  7. +108 −108 src/lib/Server.ts
  8. +255 −255 src/lib/Session.ts
  9. +11 −11 src/utils/Logger.ts
  10. +13 −13 src/utils/randomString.ts
  11. +51 −51 test/Command.test.ts
  12. +182 −182 test/RemoteFile.test.ts
  13. +21 −21 test/extension.test.ts
  14. +21 −21 test/index.ts
  15. +10 −10 typings.json
@@ -1,19 +1,19 @@
sudo: false
os:
- osx
- linux
before_install:
- if [ $TRAVIS_OS_NAME == "linux" ]; then
export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0;
sh -e /etc/init.d/xvfb start;
sleep 3;
fi
install:
- npm install
- npm run vscode:prepublish
script:
sudo: false
os:
- osx
- linux
before_install:
- if [ $TRAVIS_OS_NAME == "linux" ]; then
export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0;
sh -e /etc/init.d/xvfb start;
sleep 3;
fi
install:
- npm install
- npm run vscode:prepublish
script:
- npm test --silent
@@ -1,30 +1,30 @@
// Available variables which can be used inside of strings.
// ${workspaceRoot}: the root folder of the team
// ${file}: the current opened file
// ${fileBasename}: the current opened file's basename
// ${fileDirname}: the current opened file's dirname
// ${fileExtname}: the current opened file's extension
// ${cwd}: the current working directory of the spawned process
// A task runner that calls a custom npm script that compiles the extension.
{
"version": "0.1.0",
// we want to run npm
"command": "npm",
// the command is a shell script
"isShellCommand": true,
// show the output window only if unrecognized errors occur.
"showOutput": "silent",
// we run the custom script "compile" as defined in package.json
"args": ["run", "compile", "--loglevel", "silent"],
// The tsc compiler is started in watching mode
"isWatching": true,
// use the standard tsc in watch mode problem matcher to find compile problems in the output.
"problemMatcher": "$tsc-watch"
// Available variables which can be used inside of strings.
// ${workspaceRoot}: the root folder of the team
// ${file}: the current opened file
// ${fileBasename}: the current opened file's basename
// ${fileDirname}: the current opened file's dirname
// ${fileExtname}: the current opened file's extension
// ${cwd}: the current working directory of the spawned process
// A task runner that calls a custom npm script that compiles the extension.
{
"version": "0.1.0",
// we want to run npm
"command": "npm",
// the command is a shell script
"isShellCommand": true,
// show the output window only if unrecognized errors occur.
"showOutput": "silent",
// we run the custom script "compile" as defined in package.json
"args": ["run", "compile", "--loglevel", "silent"],
// The tsc compiler is started in watching mode
"isWatching": true,
// use the standard tsc in watch mode problem matcher to find compile problems in the output.
"problemMatcher": "$tsc-watch"
}
@@ -1,14 +1,14 @@
The MIT License (MIT)
Copyright (c) 2016 Rafael Maiolla
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
The MIT License (MIT)
Copyright (c) 2016 Rafael Maiolla
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,88 +1,88 @@
'use strict';
import * as vscode from 'vscode';
import Server from './lib/Server';
import Logger from './utils/Logger';
const L = Logger.getLogger('extension');
var server : Server;
var changeConfigurationDisposable : vscode.Disposable;
var port : number;
var onStartup : boolean;
const startServer = () => {
L.trace('startServer');
if (!server) {
server = new Server();
}
server.setPort(port);
server.start(false);
};
const stopServer = () => {
L.trace('stopServer');
if (server) {
server.stop();
}
};
const initialize = () => {
L.trace('initialize');
var configuration = getConfiguration();
onStartup = configuration.onStartup;
port = configuration.port;
if (onStartup) {
startServer();
}
};
const getConfiguration = () => {
L.trace('getConfiguration');
var remoteConfig = vscode.workspace.getConfiguration('remote');
var configuration = {
onStartup: remoteConfig.get<boolean>('onstartup'),
port: remoteConfig.get<number>('port')
};
L.debug("getConfiguration", configuration);
return configuration;
};
const hasConfigurationChanged = (configuration) => {
L.trace('hasConfigurationChanged');
var hasChanged = configuration.port !== port || configuration.onStartup !== onStartup;
L.debug("hasConfigurationChanged?", hasChanged);
return hasChanged;
}
const onConfigurationChange = () => {
L.trace('onConfigurationChange');
var configuration = getConfiguration();
if (hasConfigurationChanged(configuration)) {
initialize();
}
};
export function activate(context: vscode.ExtensionContext) {
initialize();
context.subscriptions.push(vscode.commands.registerCommand('extension.startServer', startServer));
context.subscriptions.push(vscode.commands.registerCommand('extension.stopServer', stopServer));
changeConfigurationDisposable = vscode.workspace.onDidChangeConfiguration(onConfigurationChange);
}
export function deactivate() {
stopServer();
changeConfigurationDisposable.dispose();
}
'use strict';
import * as vscode from 'vscode';
import Server from './lib/Server';
import Logger from './utils/Logger';
const L = Logger.getLogger('extension');
var server : Server;
var changeConfigurationDisposable : vscode.Disposable;
var port : number;
var onStartup : boolean;
const startServer = () => {
L.trace('startServer');
if (!server) {
server = new Server();
}
server.setPort(port);
server.start(false);
};
const stopServer = () => {
L.trace('stopServer');
if (server) {
server.stop();
}
};
const initialize = () => {
L.trace('initialize');
var configuration = getConfiguration();
onStartup = configuration.onStartup;
port = configuration.port;
if (onStartup) {
startServer();
}
};
const getConfiguration = () => {
L.trace('getConfiguration');
var remoteConfig = vscode.workspace.getConfiguration('remote');
var configuration = {
onStartup: remoteConfig.get<boolean>('onstartup'),
port: remoteConfig.get<number>('port')
};
L.debug("getConfiguration", configuration);
return configuration;
};
const hasConfigurationChanged = (configuration) => {
L.trace('hasConfigurationChanged');
var hasChanged = configuration.port !== port || configuration.onStartup !== onStartup;
L.debug("hasConfigurationChanged?", hasChanged);
return hasChanged;
}
const onConfigurationChange = () => {
L.trace('onConfigurationChange');
var configuration = getConfiguration();
if (hasConfigurationChanged(configuration)) {
initialize();
}
};
export function activate(context: vscode.ExtensionContext) {
initialize();
context.subscriptions.push(vscode.commands.registerCommand('extension.startServer', startServer));
context.subscriptions.push(vscode.commands.registerCommand('extension.stopServer', stopServer));
changeConfigurationDisposable = vscode.workspace.onDidChangeConfiguration(onConfigurationChange);
}
export function deactivate() {
stopServer();
changeConfigurationDisposable.dispose();
}
@@ -1,37 +1,37 @@
import Logger from '../utils/Logger';
import RemoteFile from './RemoteFile';
const L = Logger.getLogger('Command');
class Command {
name : string;
variables : Map<string, any>;
constructor(name : string) {
L.trace('constructor', name);
this.variables = new Map();
this.setName(name);
}
setName(name : string) {
L.trace('setName', name);
this.name = name;
}
getName() : string {
L.trace('getName');
return this.name;
}
addVariable(key : string, value : any) {
L.trace('addVariable', key, value);
this.variables.set(key, value);
}
getVariable(key : string) : any {
L.trace('getVariable', key);
return this.variables.get(key);
}
}
import Logger from '../utils/Logger';
import RemoteFile from './RemoteFile';
const L = Logger.getLogger('Command');
class Command {
name : string;
variables : Map<string, any>;
constructor(name : string) {
L.trace('constructor', name);
this.variables = new Map();
this.setName(name);
}
setName(name : string) {
L.trace('setName', name);
this.name = name;
}
getName() : string {
L.trace('getName');
return this.name;
}
addVariable(key : string, value : any) {
L.trace('addVariable', key, value);
this.variables.set(key, value);
}
getVariable(key : string) : any {
L.trace('getVariable', key);
return this.variables.get(key);
}
}
export default Command;
Oops, something went wrong.

0 comments on commit 0554c94

Please sign in to comment.