Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jupyterlab/filebrowser

Package Overview
Dependencies
Maintainers
9
Versions
396
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jupyterlab/filebrowser - npm Package Compare versions

Comparing version 0.17.0-0 to 0.17.0-1

15

lib/browser.js

@@ -53,3 +53,3 @@ "use strict";

this.id = options.id;
const model = this.model = options.model;
const model = (this.model = options.model);
const renderer = options.renderer;

@@ -68,9 +68,12 @@ model.connectionFailure.connect(this._onConnectionFailure, this);

directoryPending = true;
this._manager.newUntitled({
this._manager
.newUntitled({
path: model.path,
type: 'directory'
}).then(model => {
})
.then(model => {
this._listing.selectItemByName(model.name);
directoryPending = false;
}).catch(err => {
})
.catch(err => {
directoryPending = false;

@@ -202,5 +205,5 @@ });

let title = 'Server Connection Error';
let networkMsg = ('A connection to the Jupyter server could not be established.\n' +
let networkMsg = 'A connection to the Jupyter server could not be established.\n' +
'JupyterLab will continue trying to reconnect.\n' +
'Check your network connection or Jupyter server configuration.\n');
'Check your network connection or Jupyter server configuration.\n';
// Check for a fetch error.

@@ -207,0 +210,0 @@ if (args instanceof services_1.ServerConnection.NetworkError) {

10

lib/crumbs.js

@@ -139,3 +139,5 @@ "use strict";

let index = algorithm_1.ArrayExt.findFirstIndex(this._crumbs, value => value === node);
this._model.cd(BREAD_CRUMB_PATHS[index]).catch(error => apputils_1.showErrorMessage('Open Error', error));
this._model
.cd(BREAD_CRUMB_PATHS[index])
.catch(error => apputils_1.showErrorMessage('Open Error', error));
// Stop the event propagation.

@@ -288,6 +290,8 @@ event.preventDefault();

let home = document.createElement('span');
home.className = MATERIAL_CLASS + ' ' + BREADCRUMB_HOME + ' ' + BREADCRUMB_ITEM_CLASS;
home.className =
MATERIAL_CLASS + ' ' + BREADCRUMB_HOME + ' ' + BREADCRUMB_ITEM_CLASS;
home.title = 'Home';
let ellipsis = document.createElement('span');
ellipsis.className = MATERIAL_CLASS + ' ' + BREADCRUMB_ELLIPSES + ' ' + BREADCRUMB_ITEM_CLASS;
ellipsis.className =
MATERIAL_CLASS + ' ' + BREADCRUMB_ELLIPSES + ' ' + BREADCRUMB_ITEM_CLASS;
let parent = document.createElement('span');

@@ -294,0 +298,0 @@ parent.className = BREADCRUMB_ITEM_CLASS;

@@ -137,3 +137,6 @@ "use strict";

this._sortedItems = [];
this._sortState = { direction: 'ascending', key: 'name' };
this._sortState = {
direction: 'ascending',
key: 'name'
};
this._drag = null;

@@ -291,5 +294,7 @@ this._dragData = null;

this.removeClass(CLIPBOARD_CLASS);
return Promise.all(promises).then(() => {
return Promise.all(promises)
.then(() => {
return undefined;
}).catch(error => {
})
.catch(error => {
apputils_1.showErrorMessage('Paste Error', error);

@@ -341,5 +346,7 @@ });

});
return Promise.all(promises).then(() => {
return Promise.all(promises)
.then(() => {
return undefined;
}).catch(error => {
})
.catch(error => {
apputils_1.showErrorMessage('Duplicate file', error);

@@ -367,9 +374,13 @@ });

const paths = items.map(item => item.path);
const promises = algorithm_1.toArray(this._model.sessions()).filter(session => {
const promises = algorithm_1.toArray(this._model.sessions())
.filter(session => {
let index = algorithm_1.ArrayExt.firstIndexOf(paths, session.path);
return this._selection[items[index].name];
}).map(session => model.manager.services.sessions.shutdown(session.id));
return Promise.all(promises).then(() => {
})
.map(session => model.manager.services.sessions.shutdown(session.id));
return Promise.all(promises)
.then(() => {
return undefined;
}).catch(error => {
})
.catch(error => {
apputils_1.showErrorMessage('Shutdown kernel', error);

@@ -734,3 +745,3 @@ });

// Check for clearing a context menu.
let newContext = (IS_MAC && event.ctrlKey) || (event.button === 2);
let newContext = (IS_MAC && event.ctrlKey) || event.button === 2;
if (newContext) {

@@ -741,4 +752,7 @@ return;

if (event.button === 0) {
this._dragData = { pressX: event.clientX, pressY: event.clientY,
index: index };
this._dragData = {
pressX: event.clientX,
pressY: event.clientY,
index: index
};
document.addEventListener('mouseup', this, true);

@@ -813,3 +827,5 @@ document.addEventListener('mousemove', this, true);

if (item.type === 'directory') {
model.cd(item.name).catch(error => apputils_1.showErrorMessage('Open directory', error));
model
.cd(item.name)
.catch(error => apputils_1.showErrorMessage('Open directory', error));
}

@@ -877,3 +893,5 @@ else {

if (item.type === 'directory') {
model.cd(item.name).catch(error => apputils_1.showErrorMessage('Open directory', error));
model
.cd(item.name)
.catch(error => apputils_1.showErrorMessage('Open directory', error));
}

@@ -1142,4 +1160,4 @@ else {

for (let i = 0; i < this._items.length; i++) {
if (nearestIndex >= i && index <= i ||
nearestIndex <= i && index >= i) {
if ((nearestIndex >= i && index <= i) ||
(nearestIndex <= i && index >= i)) {
this._selection[items[i].name] = true;

@@ -1207,3 +1225,4 @@ }

const promise = docmanager_1.renameFile(manager, oldPath, newPath);
return promise.catch(error => {
return promise
.catch(error => {
if (error !== 'File not renamed') {

@@ -1214,3 +1233,4 @@ apputils_1.showErrorMessage('Rename Error', error);

return original;
}).then(() => {
})
.then(() => {
if (this.isDisposed) {

@@ -1283,7 +1303,11 @@ this._inRename = false;

}
this.selectItemByName(name).then(() => {
this.selectItemByName(name)
.then(() => {
if (!this.isDisposed && newValue.type === 'directory') {
this._doRename();
}
}).catch(() => { });
})
.catch(() => {
/* Ignore if file does not exist. */
});
}

@@ -1299,4 +1323,5 @@ /**

let basename = coreutils_1.PathExt.basename(args);
this.selectItemByName(basename)
.catch(() => { });
this.selectItemByName(basename).catch(() => {
/* Ignore if file does not exist. */
});
}

@@ -1303,0 +1328,0 @@ }

@@ -218,3 +218,5 @@ "use strict";

let services = this.manager.services;
this._pending = services.contents.get(newValue, options).then(contents => {
this._pending = services.contents
.get(newValue, options)
.then(contents => {
if (this.isDisposed) {

@@ -239,3 +241,4 @@ return;

this._refreshed.emit(void 0);
}).catch(error => {
})
.catch(error => {
this._pendingPath = null;

@@ -294,3 +297,4 @@ if (error.message === 'Not Found') {

const ready = manager.services.ready;
return Promise.all([state.fetch(key), ready]).then(([cwd]) => {
return Promise.all([state.fetch(key), ready])
.then(([cwd]) => {
if (!cwd) {

@@ -302,6 +306,8 @@ this._restored.resolve(void 0);

const localPath = manager.services.contents.localPath(path);
return manager.services.contents.get(path)
return manager.services.contents
.get(path)
.then(() => this.cd(localPath))
.catch(() => state.remove(key));
}).catch(() => state.remove(key))
})
.catch(() => state.remove(key))
.then(() => {

@@ -342,3 +348,4 @@ this._key = key;

yield this._uploadCheckDisposed();
if (algorithm_1.find(this._items, i => i.name === file.name) && !(yield docmanager_1.shouldOverwrite(file.name))) {
if (algorithm_1.find(this._items, i => i.name === file.name) &&
!(yield docmanager_1.shouldOverwrite(file.name))) {
throw err;

@@ -400,3 +407,4 @@ }

let upload = { path, progress: 0 };
this._uploadChanged.emit({ name: 'start',
this._uploadChanged.emit({
name: 'start',
newValue: upload,

@@ -474,6 +482,7 @@ oldValue: null

let { oldValue, newValue } = change;
let value = oldValue && oldValue.path &&
coreutils_1.PathExt.dirname(oldValue.path) === path ? oldValue
let value = oldValue && oldValue.path && coreutils_1.PathExt.dirname(oldValue.path) === path
? oldValue
: newValue && newValue.path && coreutils_1.PathExt.dirname(newValue.path) === path
? newValue : undefined;
? newValue
: undefined;
// If either the old value or the new value is in the current path, update.

@@ -512,3 +521,3 @@ if (value) {

let date = new Date().getTime();
if ((date - this._lastRefresh) > this._refreshDuration) {
if (date - this._lastRefresh > this._refreshDuration) {
this.refresh();

@@ -523,3 +532,3 @@ }

let date = new Date().getTime();
if ((date - this._lastRefresh) > MIN_REFRESH) {
if (date - this._lastRefresh > MIN_REFRESH) {
this.refresh();

@@ -526,0 +535,0 @@ }

@@ -63,3 +63,4 @@ "use strict";

uploadContent.className = CONTENT_CLASS;
uploadIcon.className = ICON_CLASS + ' ' + MATERIAL_CLASS + ' ' + MATERIAL_UPLOAD;
uploadIcon.className =
ICON_CLASS + ' ' + MATERIAL_CLASS + ' ' + MATERIAL_UPLOAD;
uploadContent.appendChild(uploadIcon);

@@ -66,0 +67,0 @@ this.node.appendChild(uploadContent);

{
"name": "@jupyterlab/filebrowser",
"version": "0.17.0-0",
"version": "0.17.0-1",
"description": "JupyterLab - FileBrowser Widget",

@@ -33,7 +33,7 @@ "homepage": "https://github.com/jupyterlab/jupyterlab",

"dependencies": {
"@jupyterlab/apputils": "^0.17.0-0",
"@jupyterlab/coreutils": "^2.0.0-0",
"@jupyterlab/docmanager": "^0.17.0-0",
"@jupyterlab/docregistry": "^0.17.0-0",
"@jupyterlab/services": "^3.0.0-0",
"@jupyterlab/apputils": "^0.17.0-1",
"@jupyterlab/coreutils": "^2.0.0-1",
"@jupyterlab/docmanager": "^0.17.0-1",
"@jupyterlab/docregistry": "^0.17.0-1",
"@jupyterlab/services": "^3.0.0-1",
"@phosphor/algorithm": "^1.1.2",

@@ -40,0 +40,0 @@ "@phosphor/commands": "^1.5.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc