Socket
Socket
Sign inDemoInstall

@jupyterlab/services

Package Overview
Dependencies
Maintainers
3
Versions
387
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jupyterlab/services - npm Package Compare versions

Comparing version 0.22.0 to 0.23.0

27

lib/contents/index.d.ts

@@ -0,1 +1,2 @@

import { IIterator } from 'phosphor/lib/algorithm/iteration';
import { JSONObject } from 'phosphor/lib/algorithm/json';

@@ -17,3 +18,3 @@ import { IAjaxSettings } from '../utils';

*/
name?: string;
readonly name?: string;
/**

@@ -25,19 +26,19 @@ * The full file path.

*/
path?: string;
readonly path?: string;
/**
* The type of file.
*/
type?: ContentType;
readonly type?: ContentType;
/**
* Whether the requester has permission to edit the file.
*/
writable?: boolean;
readonly writable?: boolean;
/**
* File creation timestamp.
*/
created?: string;
readonly created?: string;
/**
* Last modified timestamp.
*/
last_modified?: string;
readonly last_modified?: string;
/**

@@ -49,7 +50,7 @@ * Specify the mime-type of file contents.

*/
mimetype?: string;
readonly mimetype?: string;
/**
* The optional file content.
*/
content?: any;
readonly content?: any;
/**

@@ -61,3 +62,3 @@ * The format of the file `content`.

*/
format?: FileFormat;
readonly format?: FileFormat;
}

@@ -118,7 +119,7 @@ /**

*/
id: string;
readonly id: string;
/**
* Last modified timestamp.
*/
last_modified: string;
readonly last_modified: string;
}

@@ -212,3 +213,3 @@ /**

*/
listCheckpoints(path: string): Promise<ICheckpointModel[]>;
listCheckpoints(path: string): Promise<IIterator<ICheckpointModel>>;
/**

@@ -374,3 +375,3 @@ * Restore a file to a known checkpoint state.

*/
listCheckpoints(path: string): Promise<Contents.ICheckpointModel[]>;
listCheckpoints(path: string): Promise<IIterator<Contents.ICheckpointModel>>;
/**

@@ -377,0 +378,0 @@ * Restore a file to a known checkpoint state.

@@ -5,2 +5,3 @@ // Copyright (c) Jupyter Development Team.

var posix = require('path-posix');
var iteration_1 = require('phosphor/lib/algorithm/iteration');
var utils = require('../utils');

@@ -339,3 +340,3 @@ var validate = require('./validate');

}
return success.data;
return iteration_1.iter(success.data);
});

@@ -342,0 +343,0 @@ };

@@ -0,1 +1,2 @@

import { IIterator } from 'phosphor/lib/algorithm/iteration';
import { IDisposable } from 'phosphor/lib/core/disposable';

@@ -383,3 +384,3 @@ import { ISignal } from 'phosphor/lib/core/signaling';

*/
function listRunning(options?: Kernel.IOptions): Promise<Kernel.IModel[]>;
function listRunning(options?: Kernel.IOptions): Promise<IIterator<Kernel.IModel>>;
/**

@@ -386,0 +387,0 @@ * Start a new kernel.

// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
"use strict";
var iteration_1 = require('phosphor/lib/algorithm/iteration');
var disposable_1 = require('phosphor/lib/core/disposable');

@@ -1033,3 +1034,3 @@ var signaling_1 = require('phosphor/lib/core/signaling');

}
return success.data;
return iteration_1.iter(success.data);
}, onKernelError);

@@ -1036,0 +1037,0 @@ }

@@ -0,2 +1,4 @@

import { IIterator } from 'phosphor/lib/algorithm/iteration';
import { JSONObject, JSONValue } from 'phosphor/lib/algorithm/json';
import { ISequence } from 'phosphor/lib/algorithm/sequence';
import { IDisposable } from 'phosphor/lib/core/disposable';

@@ -303,3 +305,3 @@ import { ISignal } from 'phosphor/lib/core/signaling';

*/
function listRunning(options?: Kernel.IOptions): Promise<Kernel.IModel[]>;
function listRunning(options?: Kernel.IOptions): Promise<IIterator<Kernel.IModel>>;
/**

@@ -379,3 +381,3 @@ * Start a new kernel.

*/
runningChanged: ISignal<IManager, IModel[]>;
runningChanged: ISignal<IManager, ISequence<IModel>>;
/**

@@ -396,3 +398,3 @@ * Get the available kernel specs.

*/
listRunning(options?: IOptions): Promise<IModel[]>;
listRunning(options?: IOptions): Promise<IIterator<IModel>>;
/**

@@ -399,0 +401,0 @@ * Start a new kernel.

@@ -0,1 +1,2 @@

import { ISequence } from 'phosphor/lib/algorithm/sequence';
import { ISignal } from 'phosphor/lib/core/signaling';

@@ -16,7 +17,7 @@ import { IKernel, Kernel } from './kernel';

*/
specsChanged: ISignal<Kernel.IManager, Kernel.ISpecModels>;
specsChanged: ISignal<this, Kernel.ISpecModels>;
/**
* A signal emitted when the running kernels change.
*/
runningChanged: ISignal<Kernel.IManager, Kernel.IModel[]>;
runningChanged: ISignal<this, ISequence<Kernel.IModel>>;
/**

@@ -41,3 +42,3 @@ * Test whether the terminal manager is disposed.

*/
listRunning(options?: Kernel.IOptions): Promise<Kernel.IModel[]>;
listRunning(options?: Kernel.IOptions): Promise<ISequence<Kernel.IModel>>;
/**

@@ -44,0 +45,0 @@ * Start a new kernel. See also [[startNewKernel]].

// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
"use strict";
var iteration_1 = require('phosphor/lib/algorithm/iteration');
var json_1 = require('phosphor/lib/algorithm/json');
var vector_1 = require('phosphor/lib/collections/vector');
var signaling_1 = require('phosphor/lib/core/signaling');

@@ -68,8 +70,9 @@ var utils = require('../utils');

var _this = this;
return kernel_1.Kernel.listRunning(this._getOptions(options)).then(function (running) {
return kernel_1.Kernel.listRunning(this._getOptions(options)).then(function (it) {
var running = iteration_1.toArray(it);
if (!json_1.deepEqual(running, _this._running)) {
_this._running = running.slice();
_this.runningChanged.emit(running);
_this._running = running;
_this.runningChanged.emit(new vector_1.Vector(_this._running));
}
return running;
return iteration_1.iter(running);
});

@@ -76,0 +79,0 @@ };

@@ -0,1 +1,2 @@

import { IIterator } from 'phosphor/lib/algorithm/iteration';
import { ISignal } from 'phosphor/lib/core/signaling';

@@ -160,3 +161,3 @@ import { IKernel, Kernel, KernelMessage } from '../kernel';

*/
function listRunning(options?: Session.IOptions): Promise<Session.IModel[]>;
function listRunning(options?: Session.IOptions): Promise<IIterator<Session.IModel>>;
/**

@@ -163,0 +164,0 @@ * Start a new session.

// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
"use strict";
var iteration_1 = require('phosphor/lib/algorithm/iteration');
var searching_1 = require('phosphor/lib/algorithm/searching');
var signaling_1 = require('phosphor/lib/core/signaling');

@@ -453,7 +455,7 @@ var kernel_1 = require('../kernel');

return listRunning(options).then(function (models) {
for (var _i = 0, models_1 = models; _i < models_1.length; _i++) {
var model = models_1[_i];
if (model.notebook.path === path) {
return model;
}
var model = searching_1.find(models, function (value) {
return value.notebook.path === path;
});
if (model) {
return model;
}

@@ -603,3 +605,3 @@ var msg = "No running session for path: " + path;

}
return Promise.all(promises).then(function () { return sessions; });
return Promise.all(promises).then(function () { return iteration_1.iter(sessions); });
}

@@ -606,0 +608,0 @@ Private.updateRunningSessions = updateRunningSessions;

@@ -0,1 +1,3 @@

import { IIterator } from 'phosphor/lib/algorithm/iteration';
import { ISequence } from 'phosphor/lib/algorithm/sequence';
import { ISignal } from 'phosphor/lib/core/signaling';

@@ -21,3 +23,3 @@ import { Kernel } from '../kernel';

*/
runningChanged: ISignal<SessionManager, Session.IModel[]>;
runningChanged: ISignal<SessionManager, ISequence<Session.IModel>>;
/**

@@ -42,3 +44,3 @@ * Test whether the terminal manager is disposed.

*/
listRunning(options?: Session.IOptions): Promise<Session.IModel[]>;
listRunning(options?: Session.IOptions): Promise<IIterator<Session.IModel>>;
/**

@@ -45,0 +47,0 @@ * Start a new session. See also [[startNewSession]].

// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
"use strict";
var iteration_1 = require('phosphor/lib/algorithm/iteration');
var json_1 = require('phosphor/lib/algorithm/json');
var vector_1 = require('phosphor/lib/collections/vector');
var signaling_1 = require('phosphor/lib/core/signaling');

@@ -68,8 +70,9 @@ var kernel_1 = require('../kernel');

var _this = this;
return session_1.Session.listRunning(this._getOptions(options)).then(function (running) {
return session_1.Session.listRunning(this._getOptions(options)).then(function (it) {
var running = iteration_1.toArray(it);
if (!json_1.deepEqual(running, _this._running)) {
_this._running = running.slice();
_this.runningChanged.emit(running);
_this._running = running;
_this.runningChanged.emit(new vector_1.Vector(running));
}
return running;
return iteration_1.iter(running);
});

@@ -76,0 +79,0 @@ };

@@ -0,2 +1,4 @@

import { IIterator } from 'phosphor/lib/algorithm/iteration';
import { JSONObject } from 'phosphor/lib/algorithm/json';
import { ISequence } from 'phosphor/lib/algorithm/sequence';
import { IDisposable } from 'phosphor/lib/core/disposable';

@@ -109,3 +111,3 @@ import { ISignal } from 'phosphor/lib/core/signaling';

*/
function listRunning(options?: Session.IOptions): Promise<Session.IModel[]>;
function listRunning(options?: Session.IOptions): Promise<IIterator<Session.IModel>>;
/**

@@ -225,3 +227,3 @@ * Start a new session.

*/
runningChanged: ISignal<IManager, IModel[]>;
runningChanged: ISignal<IManager, ISequence<IModel>>;
/**

@@ -235,3 +237,3 @@ * Get the available kernel specs.

getSpecs(options?: IOptions): Promise<Kernel.ISpecModels>;
listRunning(options?: IOptions): Promise<IModel[]>;
listRunning(options?: IOptions): Promise<IIterator<IModel>>;
/**

@@ -238,0 +240,0 @@ * Start a new session.

@@ -0,2 +1,4 @@

import { IIterator } from 'phosphor/lib/algorithm/iteration';
import { JSONPrimitive, JSONObject } from 'phosphor/lib/algorithm/json';
import { ISequence } from 'phosphor/lib/algorithm/sequence';
import { IDisposable } from 'phosphor/lib/core/disposable';

@@ -71,3 +73,3 @@ import { ISignal } from 'phosphor/lib/core/signaling';

*/
interface IMessage extends JSONObject {
interface IMessage {
/**

@@ -80,3 +82,3 @@ * The type of the message.

*/
readonly content?: JSONPrimitive[];
readonly content?: ISequence<JSONPrimitive>;
}

@@ -94,3 +96,3 @@ /**

*/
runningChanged: ISignal<IManager, IModel[]>;
runningChanged: ISignal<IManager, ISequence<IModel>>;
/**

@@ -115,3 +117,3 @@ * Create a new terminal session or connect to an existing session.

*/
listRunning(): Promise<IModel[]>;
listRunning(): Promise<IIterator<IModel>>;
}

@@ -130,3 +132,3 @@ }

*/
runningChanged: ISignal<TerminalManager, TerminalSession.IModel[]>;
runningChanged: ISignal<this, ISequence<TerminalSession.IModel>>;
/**

@@ -151,3 +153,3 @@ * Test whether the terminal manager is disposed.

*/
listRunning(): Promise<TerminalSession.IModel[]>;
listRunning(): Promise<IIterator<TerminalSession.IModel>>;
private _baseUrl;

@@ -154,0 +156,0 @@ private _wsUrl;

// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
"use strict";
var iteration_1 = require('phosphor/lib/algorithm/iteration');
var json_1 = require('phosphor/lib/algorithm/json');
var vector_1 = require('phosphor/lib/collections/vector');
var signaling_1 = require('phosphor/lib/core/signaling');

@@ -112,6 +114,6 @@ var utils = require('../utils');

if (!json_1.deepEqual(data, _this._running)) {
_this._running = data.slice();
_this.runningChanged.emit(data);
_this._running = data;
_this.runningChanged.emit(new vector_1.Vector(data));
}
return data;
return iteration_1.iter(data);
});

@@ -192,3 +194,3 @@ };

var msg = [message.type];
msg.push.apply(msg, message.content);
msg.push.apply(msg, iteration_1.toArray(message.content));
this._ws.send(JSON.stringify(msg));

@@ -252,3 +254,3 @@ };

type: data[0],
content: data.slice(1)
content: new vector_1.Vector(data.slice(1))
});

@@ -255,0 +257,0 @@ };

{
"name": "@jupyterlab/services",
"version": "0.22.0",
"version": "0.23.0",
"description": "Client APIs for the Jupyter services REST APIs",

@@ -12,3 +12,2 @@ "main": "lib/index.js",

"phosphor": "^0.6.1",
"requirejs": "^2.2.0",
"url": "^0.11.0",

@@ -20,2 +19,3 @@ "url-join": "^1.1.0"

"@types/mocha": "^2.2.32",
"@types/requirejs": "^2.1.28",
"@types/text-encoding": "0.0.30",

@@ -26,3 +26,2 @@ "@types/ws": "0.0.33",

"mocha": "^2.2.5",
"requirejs": "^2.2.0",
"rimraf": "^2.4.2",

@@ -29,0 +28,0 @@ "text-encoding": "^0.5.2",

Sorry, the diff of this file is too big to display

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