Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
zaggino committed Apr 26, 2017
1 parent 9bdc47d commit 39707c9
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 58 deletions.
20 changes: 10 additions & 10 deletions app/appshell/app-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export function addMenu(title: string, id: string, position: string, relativeId:
const err = _addToPosition(newObj, menuTemplate, position || "last", relativeId);
_refreshMenu(callback.bind(null, err));
});
};
}

export function addMenuItem(
parentId: string,
Expand Down Expand Up @@ -216,7 +216,7 @@ export function addMenuItem(
const err = _addToPosition(newObj, parentObj.submenu as MenuItemOptions[], position || "last", relativeId);
_refreshMenu(callback.bind(null, err));
});
};
}

export function getMenuItemState(
commandId: string,
Expand All @@ -230,7 +230,7 @@ export function getMenuItemState(
}
callback(null, obj.enabled === true, obj.checked === true);
});
};
}

export function getMenuPosition(
commandId: string,
Expand All @@ -241,7 +241,7 @@ export function getMenuPosition(
const res = _findMenuItemPosition(commandId);
return res ? callback(null, res[0], res[1]) : callback(null);
});
};
}

export function getMenuTitle(commandId: string, callback: (err?: string | null, title?: string) => void) {
assert(commandId && typeof commandId === "string", "commandId must be a string");
Expand All @@ -252,23 +252,23 @@ export function getMenuTitle(commandId: string, callback: (err?: string | null,
}
callback(null, obj.label);
});
};
}

export function removeMenu(commandId: string, callback: (err?: string | null, deleted?: boolean) => void) {
assert(commandId && typeof commandId === "string", "commandId must be a string");
process.nextTick(function () {
const deleted = _deleteMenuItemById(commandId);
_refreshMenu(callback.bind(null, deleted ? null : ERR_NOT_FOUND));
});
};
}

export function removeMenuItem(commandId: string, callback: (err?: string | null, deleted?: boolean) => void) {
assert(commandId && typeof commandId === "string", "commandId must be a string");
process.nextTick(function () {
const deleted = _deleteMenuItemById(commandId);
_refreshMenu(callback.bind(null, deleted ? null : ERR_NOT_FOUND));
});
};
}

export function setMenuItemShortcut(
commandId: string,
Expand All @@ -291,7 +291,7 @@ export function setMenuItemShortcut(
}
_refreshMenu(callback.bind(null, null));
});
};
}

export function setMenuItemState(
commandId: string,
Expand All @@ -316,7 +316,7 @@ export function setMenuItemState(
}
_refreshMenu(callback.bind(null, null));
});
};
}

export function setMenuTitle(
commandId: string,
Expand All @@ -333,4 +333,4 @@ export function setMenuTitle(
obj.label = title;
_refreshMenu(callback.bind(null, null));
});
};
}
34 changes: 17 additions & 17 deletions app/appshell/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,70 +28,70 @@ export function closeLiveBrowser(callback: (err?: Error) => void) {
// TODO: implement
callback(new Error("app.closeLiveBrowser not implemented"));
});
};
}

export function dragWindow() {
// TODO: implement
throw new Error("app.dragWindow not implemented");
};
}

export function getApplicationSupportDirectory() {
return utils.convertWindowsPathToUnixPath(app.getPath("userData"));
};
}

export function getExtensionsFolder() {
return utils.convertWindowsPathToUnixPath(
path.resolve(getApplicationSupportDirectory(), "extensions")
);
};
}

// TODO: it seems that both arguments aren't needed anymore
export function showExtensionsFolder(appURL: any, callback: (err?: Error) => void) {
process.nextTick(function () {
shell.showItemInFolder(utils.convertBracketsPathToWindowsPath(getExtensionsFolder()));
if (callback) { callback(); }
});
};
}

export function getDroppedFiles(callback: (err?: Error) => void) {
process.nextTick(function () {
// TODO: implement
callback(new Error("app.getDroppedFiles not implemented"));
});
};
}

// return the number of milliseconds that have elapsed since the application was launched
export function getElapsedMilliseconds() {
const diff = process.hrtime(startupTime);
// diff = [ seconds, nanoseconds ]
return diff[0] * 1000 + diff[1] / 1000000;
};
}

export function getPendingFilesToOpen(callback: (err?: Error, filePaths?: string[]) => void) {
process.nextTick(function () {
// TODO: implement
callback(new Error("app.getPendingFilesToOpen not implemented"), []);
});
};
}

export function getRemoteDebuggingPort(): number {
return REMOTE_DEBUGGING_PORT;
};
}

export function getUserHomeDirectory(): string {
return utils.convertWindowsPathToUnixPath(app.getPath("home"));
};
}

export function getUserDocumentsDirectory(): string {
return utils.convertWindowsPathToUnixPath(app.getPath("documents"));
};
}

export function installCommandLine(callback: (err?: Error) => void): void {
process.nextTick(function () {
// TODO: implement
callback(new Error("app.installCommandLine not implemented"));
});
};
}

export function openLiveBrowser(
url: string,
Expand All @@ -102,7 +102,7 @@ export function openLiveBrowser(
// TODO: implement
callback(new Error("app.openLiveBrowser not implemented" + url));
});
};
}

export function openURLInDefaultBrowser(
url: string,
Expand All @@ -115,17 +115,17 @@ export function openURLInDefaultBrowser(
callback();
}
});
};
}

export function quit() {
// close current window, shell will quit when all windows are closed
remote.getCurrentWindow().close();
};
}

export function showDeveloperTools() {
const win = remote.getCurrentWindow();
win.webContents.openDevTools({ mode: "detach" });
};
}

// TODO: get rid of callback? This call is not throwing any error.
export function showOSFolder(
Expand All @@ -136,4 +136,4 @@ export function showOSFolder(
shell.showItemInFolder(utils.convertBracketsPathToWindowsPath(path));
if (callback) { callback(); }
});
};
}
20 changes: 10 additions & 10 deletions app/appshell/fs-additions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ const trash = require("trash");

export function isBinaryFile(filename: string, callback: (err?: Error, res?: boolean) => void) {
isbinaryfile(filename, callback);
};
}

export function isBinaryFileSync(filename: string): boolean {
return isbinaryfile(filename);
};
}

export function isEncodingSupported(encoding: string): boolean {
return ["ascii", "utf-8", "utf8"].indexOf(encoding.toLowerCase()) !== -1;
};
}

export function isNetworkDrive(path: string, callback: (err: Error | null, res: boolean) => void) {
// TODO: implement
process.nextTick(function () {
callback(null, false);
});
};
}

export function moveToTrash(path: string, callback: (err: Error | null, result?: any) => void) {
fs.stat(path, function (err) {
Expand All @@ -42,7 +42,7 @@ export function moveToTrash(path: string, callback: (err: Error | null, result?:
.then((r: any) => callback(null, r))
.catch((e: Error) => callback(e));
});
};
}

export function readTextFile(filename: string, encoding: string, callback: (err: Error | null, res?: string) => void) {
if (typeof encoding === "function") {
Expand Down Expand Up @@ -82,7 +82,7 @@ export function readTextFile(filename: string, encoding: string, callback: (err:
callback(null, content);
});
});
};
}

export function remove(path: string, callback: (err?: Error) => void) {
fs.stat(path, function (err, stats) {
Expand All @@ -91,7 +91,7 @@ export function remove(path: string, callback: (err?: Error) => void) {
}
fs.remove(path, callback);
});
};
}

export function rename(oldPath: string, newPath: string, callback: (err?: Error) => void) {
fs.stat(newPath, function (err, stats) {
Expand All @@ -105,7 +105,7 @@ export function rename(oldPath: string, newPath: string, callback: (err?: Error)
err.code = "EEXIST";
callback(err);
});
};
}

export function showOpenDialog(
allowMultipleSelection: boolean,
Expand Down Expand Up @@ -140,7 +140,7 @@ export function showOpenDialog(
}, function (fileNames: string[]) {
callback(null, fileNames ? fileNames.map(utils.convertWindowsPathToUnixPath) : []);
});
};
}

export function showSaveDialog(
title: string,
Expand All @@ -157,4 +157,4 @@ export function showSaveDialog(
}, function (path) {
callback(null, utils.convertWindowsPathToUnixPath(path));
});
};
}
2 changes: 1 addition & 1 deletion app/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export function restart(query: {} | string = {}) {
// this should mirror stuff done in "ready" handler except for auto-updater
const win = openMainBracketsWindow(query);
setLoggerWindow(win);
};
}

export function getMainBracketsWindow(): Electron.BrowserWindow {
return wins[0];
Expand Down
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@
},
"dependencies": {
"anymatch": "1.3.0",
"async": "2.1.4",
"async": "2.3.0",
"chokidar": "1.6.1",
"decompress-zip": "0.3.0",
"electron-localshortcut": "1.1.0",
"fs-extra": "2.0.0",
"electron-localshortcut": "1.1.1",
"fs-extra": "2.1.2",
"isbinaryfile": "3.0.2",
"lodash": "4.17.4",
"npm": "3.10.9",
"opn": "4.0.2",
"request": "2.79.0",
"request": "2.81.0",
"requirejs": "2.3.3",
"semver": "5.3.0",
"strip-bom": "3.0.0",
Expand All @@ -81,20 +81,20 @@
"xml2js": "0.4.17"
},
"devDependencies": {
"@types/electron": "1.4.33",
"@types/fs-extra": "0.0.37",
"@types/electron": "1.4.37",
"@types/fs-extra": "2.1.0",
"@types/jquery": "2.0.41",
"@types/lodash": "4.14.55",
"@types/node": "7.0.8",
"@types/ws": "0.0.39",
"@types/lodash": "4.14.63",
"@types/node": "7.0.13",
"@types/ws": "0.0.40",
"concurrently": "3.4.0",
"cross-spawn": "5.1.0",
"electron": "1.6.2",
"electron-builder": "15.3.0",
"electron-builder-squirrel-windows": "15.3.0",
"electron-packager": "8.5.2",
"electron": "1.6.6",
"electron-builder": "17.1.1",
"electron-builder-squirrel-windows": "17.0.1",
"electron-packager": "8.6.0",
"electron-rebuild": "1.5.7",
"eslint": "3.17.1",
"eslint": "3.19.0",
"glob": "7.1.1",
"grunt": "0.4.5",
"grunt-cleanempty": "1.0.3",
Expand All @@ -116,16 +116,16 @@
"grunt-usemin": "0.1.11",
"gulp": "3.9.1",
"gulp-watch": "4.3.11",
"husky": "0.13.2",
"husky": "0.13.3",
"jasmine-node": "1.11.0",
"load-grunt-tasks": "3.5.2",
"q": "1.4.1",
"rewire": "1.1.2",
"rimraf": "2.6.0",
"tslint": "4.5.1",
"rimraf": "2.6.1",
"tslint": "5.1.0",
"typescript": "2.2.0",
"typescript-eslint-parser": "2.0.0",
"webpack": "2.2.1",
"typescript-eslint-parser": "2.1.0",
"webpack": "2.4.1",
"xmldoc": "0.1.2"
}
}
1 change: 0 additions & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"member-ordering": false,
"no-namespace": false,
"no-unused-expression": false,
"no-unused-new": false,
"no-var-requires": false,
"object-literal-sort-keys": false,
"only-arrow-functions": false,
Expand Down

0 comments on commit 39707c9

Please sign in to comment.