@jupyterlab/extensionmanager 4.0.0-alpha.13 → 4.0.0-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -2
- package/lib/index.js.map +1 -1
- package/lib/model.d.ts +81 -194
- package/lib/model.js +191 -455
- package/lib/model.js.map +1 -1
- package/lib/widget.d.ts +18 -207
- package/lib/widget.js +189 -315
- package/lib/widget.js.map +1 -1
- package/package.json +9 -11
- package/style/base.css +40 -98
- package/style/index.css +1 -1
- package/style/index.js +1 -1
- package/lib/build-helper.d.ts +0 -9
- package/lib/build-helper.js +0 -60
- package/lib/build-helper.js.map +0 -1
- package/lib/companions.d.ts +0 -88
- package/lib/companions.js +0 -98
- package/lib/companions.js.map +0 -1
- package/lib/listings.d.ts +0 -50
- package/lib/listings.js +0 -80
- package/lib/listings.js.map +0 -1
- package/lib/npm.d.ts +0 -223
- package/lib/npm.js +0 -76
- package/lib/npm.js.map +0 -1
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAC3D;;;GAGG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAC3D;;;GAGG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
|
package/lib/model.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ServerConnection, ServiceManager } from '@jupyterlab/services';
|
|
3
|
-
import { ISettingRegistry } from '@jupyterlab/settingregistry';
|
|
1
|
+
import { ServiceManager } from '@jupyterlab/services';
|
|
4
2
|
import { ITranslator } from '@jupyterlab/translation';
|
|
5
3
|
import { VDomModel } from '@jupyterlab/ui-components';
|
|
6
|
-
import { IListEntry, Lister } from './listings';
|
|
7
|
-
import { ISearchResult, Searcher } from './npm';
|
|
8
4
|
/**
|
|
9
5
|
* Information about an extension.
|
|
10
6
|
*/
|
|
@@ -20,19 +16,23 @@ export interface IEntry {
|
|
|
20
16
|
/**
|
|
21
17
|
* A representative link of the package.
|
|
22
18
|
*/
|
|
23
|
-
|
|
19
|
+
homepage_url: string;
|
|
24
20
|
/**
|
|
25
21
|
* Whether the extension is currently installed.
|
|
26
22
|
*/
|
|
27
|
-
installed
|
|
23
|
+
installed?: boolean | null;
|
|
28
24
|
/**
|
|
29
|
-
* Whether the extension is
|
|
25
|
+
* Whether the extension is allowed or not.
|
|
30
26
|
*/
|
|
31
|
-
|
|
27
|
+
allowed: boolean;
|
|
32
28
|
/**
|
|
33
|
-
*
|
|
29
|
+
* Whether the extension is approved by the system administrators.
|
|
34
30
|
*/
|
|
35
|
-
|
|
31
|
+
approved: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the extension is currently enabled.
|
|
34
|
+
*/
|
|
35
|
+
enabled: boolean;
|
|
36
36
|
/**
|
|
37
37
|
* The latest version of the extension.
|
|
38
38
|
*/
|
|
@@ -41,8 +41,10 @@ export interface IEntry {
|
|
|
41
41
|
* The installed version of the extension.
|
|
42
42
|
*/
|
|
43
43
|
installed_version: string;
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
/**
|
|
45
|
+
* A flag indicating the status of an installed extension.
|
|
46
|
+
*/
|
|
47
|
+
status: 'ok' | 'warning' | 'error' | 'deprecated' | null;
|
|
46
48
|
/**
|
|
47
49
|
* The package type (prebuilt or source).
|
|
48
50
|
*/
|
|
@@ -50,75 +52,36 @@ export interface IEntry {
|
|
|
50
52
|
/**
|
|
51
53
|
* The information about extension installation.
|
|
52
54
|
*/
|
|
53
|
-
install
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Information about extension installation.
|
|
57
|
-
*/
|
|
58
|
-
export interface IInstall {
|
|
59
|
-
/**
|
|
60
|
-
* The used package manager (e.g. pip, conda...)
|
|
61
|
-
*/
|
|
62
|
-
packageManager: string | undefined;
|
|
63
|
-
/**
|
|
64
|
-
* The package name as known by the package manager.
|
|
65
|
-
*/
|
|
66
|
-
packageName: string | undefined;
|
|
67
|
-
/**
|
|
68
|
-
* The uninstallation instructions as a comprehensive
|
|
69
|
-
* text for the end user.
|
|
70
|
-
*/
|
|
71
|
-
uninstallInstructions: string | undefined;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Wire format for installed extensions.
|
|
75
|
-
*/
|
|
76
|
-
export interface IInstalledEntry {
|
|
77
|
-
/**
|
|
78
|
-
* The name of the extension.
|
|
79
|
-
*/
|
|
80
|
-
name: string;
|
|
81
|
-
/**
|
|
82
|
-
* A short description of the extension.
|
|
83
|
-
*/
|
|
84
|
-
description: string;
|
|
85
|
-
/**
|
|
86
|
-
* A representative link of the package.
|
|
87
|
-
*/
|
|
88
|
-
url: string;
|
|
55
|
+
install?: IInstall | null;
|
|
89
56
|
/**
|
|
90
|
-
*
|
|
57
|
+
* Package author.
|
|
91
58
|
*/
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Whether the extension is currently enabled.
|
|
95
|
-
*/
|
|
96
|
-
enabled: boolean;
|
|
59
|
+
author?: string;
|
|
97
60
|
/**
|
|
98
|
-
*
|
|
61
|
+
* Package license.
|
|
99
62
|
*/
|
|
100
|
-
|
|
63
|
+
license?: string;
|
|
101
64
|
/**
|
|
102
|
-
*
|
|
65
|
+
* URL to the package bug tracker.
|
|
103
66
|
*/
|
|
104
|
-
|
|
67
|
+
bug_tracker_url?: string;
|
|
105
68
|
/**
|
|
106
|
-
*
|
|
69
|
+
* URL to the package documentation.
|
|
107
70
|
*/
|
|
108
|
-
|
|
71
|
+
documentation_url?: string;
|
|
109
72
|
/**
|
|
110
|
-
*
|
|
73
|
+
* URL to the package URL in the packager website.
|
|
111
74
|
*/
|
|
112
|
-
|
|
75
|
+
package_manager_url?: string;
|
|
113
76
|
/**
|
|
114
|
-
*
|
|
77
|
+
* URL to the package code source.
|
|
115
78
|
*/
|
|
116
|
-
|
|
79
|
+
repository_url?: string;
|
|
117
80
|
}
|
|
118
81
|
/**
|
|
119
82
|
* Information about extension installation.
|
|
120
83
|
*/
|
|
121
|
-
export interface
|
|
84
|
+
export interface IInstall {
|
|
122
85
|
/**
|
|
123
86
|
* The used package manager (e.g. pip, conda...)
|
|
124
87
|
*/
|
|
@@ -145,6 +108,10 @@ export interface IActionReply {
|
|
|
145
108
|
* An optional message when the status is not 'ok'.
|
|
146
109
|
*/
|
|
147
110
|
message?: string;
|
|
111
|
+
/**
|
|
112
|
+
* Follow-up restart needed by the action
|
|
113
|
+
*/
|
|
114
|
+
needs_restart: ('frontend' | 'kernel' | 'server')[];
|
|
148
115
|
}
|
|
149
116
|
/**
|
|
150
117
|
* Extension actions that the server API accepts
|
|
@@ -154,67 +121,66 @@ export declare type Action = 'install' | 'uninstall' | 'enable' | 'disable';
|
|
|
154
121
|
* Model for an extension list.
|
|
155
122
|
*/
|
|
156
123
|
export declare class ListModel extends VDomModel {
|
|
157
|
-
constructor(
|
|
158
|
-
|
|
124
|
+
constructor(serviceManager: ServiceManager.IManager, translator?: ITranslator);
|
|
125
|
+
/**
|
|
126
|
+
* Extension manager name.
|
|
127
|
+
*/
|
|
128
|
+
readonly name: string;
|
|
129
|
+
/**
|
|
130
|
+
* Whether the extension manager support installation methods or not.
|
|
131
|
+
*/
|
|
132
|
+
readonly canInstall: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Extensions installation path.
|
|
135
|
+
*/
|
|
136
|
+
installPath: string | null;
|
|
159
137
|
/**
|
|
160
138
|
* A readonly array of the installed extensions.
|
|
161
139
|
*/
|
|
162
140
|
get installed(): ReadonlyArray<IEntry>;
|
|
141
|
+
/**
|
|
142
|
+
* Whether the warning is disclaimed or not.
|
|
143
|
+
*/
|
|
144
|
+
get isDisclaimed(): boolean;
|
|
145
|
+
set isDisclaimed(v: boolean);
|
|
146
|
+
get isLoadingInstalledExtensions(): boolean;
|
|
147
|
+
get isSearching(): boolean;
|
|
163
148
|
/**
|
|
164
149
|
* A readonly array containing the latest search result
|
|
165
150
|
*/
|
|
166
151
|
get searchResult(): ReadonlyArray<IEntry>;
|
|
167
152
|
/**
|
|
168
|
-
* The
|
|
153
|
+
* The search query.
|
|
169
154
|
*
|
|
170
155
|
* Setting its value triggers a new search.
|
|
171
156
|
*/
|
|
172
|
-
get query(): string
|
|
173
|
-
set query(value: string
|
|
157
|
+
get query(): string;
|
|
158
|
+
set query(value: string);
|
|
174
159
|
/**
|
|
175
|
-
* The current
|
|
176
|
-
*
|
|
177
|
-
* The npm repository search is paginated by the `pagination` attribute.
|
|
178
|
-
* The `page` value selects which page is used.
|
|
160
|
+
* The current search page.
|
|
179
161
|
*
|
|
180
162
|
* Setting its value triggers a new search.
|
|
163
|
+
*
|
|
164
|
+
* ### Note
|
|
165
|
+
* First page is 1.
|
|
181
166
|
*/
|
|
182
167
|
get page(): number;
|
|
183
168
|
set page(value: number);
|
|
184
169
|
/**
|
|
185
|
-
* The
|
|
186
|
-
*
|
|
187
|
-
* The npm repository search is paginated by the `pagination` attribute.
|
|
188
|
-
* The `page` value selects which page is used.
|
|
170
|
+
* The search pagination.
|
|
189
171
|
*
|
|
190
172
|
* Setting its value triggers a new search.
|
|
191
173
|
*/
|
|
192
174
|
get pagination(): number;
|
|
193
175
|
set pagination(value: number);
|
|
194
176
|
/**
|
|
195
|
-
* The
|
|
196
|
-
*/
|
|
197
|
-
get totalEntries(): number;
|
|
198
|
-
/**
|
|
199
|
-
* The list mode.
|
|
200
|
-
*/
|
|
201
|
-
get listMode(): 'block' | 'allow' | 'default' | 'invalid';
|
|
202
|
-
/**
|
|
203
|
-
* The total number of blockedExtensions results in the current search.
|
|
204
|
-
*/
|
|
205
|
-
get totalblockedExtensionsFound(): number;
|
|
206
|
-
/**
|
|
207
|
-
* The total number of allowedExtensions results in the current search.
|
|
177
|
+
* The last page of results in the current search.
|
|
208
178
|
*/
|
|
209
|
-
get
|
|
179
|
+
get lastPage(): number;
|
|
210
180
|
/**
|
|
211
181
|
* Dispose the extensions list model.
|
|
212
182
|
*/
|
|
213
183
|
dispose(): void;
|
|
214
|
-
/**
|
|
215
|
-
* Initialize the model.
|
|
216
|
-
*/
|
|
217
|
-
initialize(): Promise<void>;
|
|
218
184
|
/**
|
|
219
185
|
* Whether there are currently any actions pending.
|
|
220
186
|
*/
|
|
@@ -244,90 +210,41 @@ export declare class ListModel extends VDomModel {
|
|
|
244
210
|
*/
|
|
245
211
|
disable(entry: IEntry): Promise<void>;
|
|
246
212
|
/**
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
* @param entry An entry indicating which extension to check.
|
|
250
|
-
*/
|
|
251
|
-
checkCompanionPackages(entry: IEntry): Promise<boolean>;
|
|
252
|
-
/**
|
|
253
|
-
* Trigger a build check to incorporate actions taken.
|
|
254
|
-
*/
|
|
255
|
-
triggerBuildCheck(): void;
|
|
256
|
-
/**
|
|
257
|
-
* Perform a build on the server
|
|
258
|
-
*/
|
|
259
|
-
performBuild(): void;
|
|
260
|
-
/**
|
|
261
|
-
* Ignore a build recommendation
|
|
262
|
-
*/
|
|
263
|
-
ignoreBuildRecommendation(): void;
|
|
264
|
-
/**
|
|
265
|
-
* Ignore a build recommendation
|
|
266
|
-
*/
|
|
267
|
-
refreshInstalled(): void;
|
|
268
|
-
/**
|
|
269
|
-
* Translate search results from an npm repository query into entries
|
|
270
|
-
* and remove entries with 'deprecated' in the keyword list
|
|
213
|
+
* Refresh installed packages
|
|
271
214
|
*
|
|
272
|
-
* @param
|
|
215
|
+
* @param force Force refreshing the list of installed packages
|
|
273
216
|
*/
|
|
274
|
-
|
|
275
|
-
[key: string]: IEntry;
|
|
276
|
-
}>;
|
|
277
|
-
/**
|
|
278
|
-
* Translate installed extensions information from the server into entries.
|
|
279
|
-
*
|
|
280
|
-
* @param res Promise to the server reply data.
|
|
281
|
-
*/
|
|
282
|
-
protected translateInstalled(res: Promise<IInstalledEntry[]>): Promise<{
|
|
283
|
-
[key: string]: IEntry;
|
|
284
|
-
}>;
|
|
285
|
-
private isListed;
|
|
286
|
-
/**
|
|
287
|
-
* Make a request to the server for info about its installed extensions.
|
|
288
|
-
*/
|
|
289
|
-
protected fetchInstalled(refreshInstalled?: boolean): Promise<IInstalledEntry[]>;
|
|
217
|
+
refreshInstalled(force?: boolean): Promise<void>;
|
|
290
218
|
/**
|
|
291
219
|
* Search with current query.
|
|
292
220
|
*
|
|
293
221
|
* Sets searchError and totalEntries as appropriate.
|
|
294
222
|
*
|
|
295
|
-
* @returns
|
|
296
|
-
*/
|
|
297
|
-
protected performSearch(): Promise<{
|
|
298
|
-
[key: string]: IEntry;
|
|
299
|
-
}>;
|
|
300
|
-
/**
|
|
301
|
-
* Query the installed extensions.
|
|
302
|
-
*
|
|
303
|
-
* Sets installedError as appropriate.
|
|
304
|
-
*
|
|
305
|
-
* @returns {Promise<{ [key: string]: IEntry; }>} A map of installed extensions.
|
|
223
|
+
* @returns The extensions matching the current query.
|
|
306
224
|
*/
|
|
307
|
-
protected
|
|
308
|
-
[key: string]: IEntry;
|
|
309
|
-
}>;
|
|
225
|
+
protected search(force?: boolean): Promise<void>;
|
|
310
226
|
/**
|
|
311
227
|
* Update the current model.
|
|
312
228
|
*
|
|
313
|
-
* This will query the
|
|
229
|
+
* This will query the packages repository, and the notebook server.
|
|
314
230
|
*
|
|
315
231
|
* Emits the `stateChanged` signal on successful completion.
|
|
316
232
|
*/
|
|
317
|
-
protected update(
|
|
233
|
+
protected update(force?: boolean): Promise<void>;
|
|
318
234
|
/**
|
|
319
235
|
* Send a request to the server to perform an action on an extension.
|
|
320
236
|
*
|
|
321
237
|
* @param action A valid action to perform.
|
|
322
238
|
* @param entry The extension to perform the action on.
|
|
323
239
|
*/
|
|
324
|
-
protected
|
|
240
|
+
protected performAction(action: string, entry: IEntry): Promise<IActionReply>;
|
|
325
241
|
/**
|
|
326
242
|
* Add a pending action.
|
|
327
243
|
*
|
|
328
244
|
* @param pending A promise that resolves when the action is completed.
|
|
329
245
|
*/
|
|
330
|
-
protected
|
|
246
|
+
protected addPendingAction(pending: Promise<any>): void;
|
|
247
|
+
actionError: string | null;
|
|
331
248
|
/**
|
|
332
249
|
* Contains an error message if an error occurred when querying installed extensions.
|
|
333
250
|
*/
|
|
@@ -337,53 +254,25 @@ export declare class ListModel extends VDomModel {
|
|
|
337
254
|
*/
|
|
338
255
|
searchError: string | null;
|
|
339
256
|
/**
|
|
340
|
-
*
|
|
341
|
-
*/
|
|
342
|
-
blockedExtensionsError: string | null;
|
|
343
|
-
/**
|
|
344
|
-
* Contains an error message if an error occurred when querying the server extension.
|
|
345
|
-
*/
|
|
346
|
-
serverConnectionError: string | null;
|
|
347
|
-
/**
|
|
348
|
-
* Contains an error message if the server has unfulfilled requirements.
|
|
349
|
-
*/
|
|
350
|
-
serverRequirementsError: string | null;
|
|
351
|
-
/**
|
|
352
|
-
* Whether the model has finished async initialization.
|
|
353
|
-
*/
|
|
354
|
-
initialized: boolean;
|
|
355
|
-
/**
|
|
356
|
-
* Whether a fresh build should be considered due to actions taken.
|
|
357
|
-
*/
|
|
358
|
-
promptBuild: boolean;
|
|
359
|
-
/**
|
|
360
|
-
* Settings for connecting to the notebook server.
|
|
361
|
-
*/
|
|
362
|
-
protected serverConnectionSettings: ServerConnection.ISettings;
|
|
363
|
-
/**
|
|
364
|
-
* A helper for performing searches of jupyterlab extensions on the NPM repository.
|
|
257
|
+
* Whether a reload should be considered due to actions taken.
|
|
365
258
|
*/
|
|
366
|
-
|
|
367
|
-
protected lister: Lister;
|
|
259
|
+
promptReload: boolean;
|
|
368
260
|
/**
|
|
369
261
|
* The service manager to use for building.
|
|
370
262
|
*/
|
|
371
263
|
protected serviceManager: ServiceManager.IManager;
|
|
372
264
|
protected translator: ITranslator;
|
|
373
|
-
private
|
|
265
|
+
private _isDisclaimed;
|
|
266
|
+
private _isLoadingInstalledExtensions;
|
|
267
|
+
private _isSearching;
|
|
374
268
|
private _query;
|
|
375
269
|
private _page;
|
|
376
270
|
private _pagination;
|
|
377
|
-
private
|
|
271
|
+
private _lastPage;
|
|
378
272
|
private _installed;
|
|
379
|
-
private
|
|
273
|
+
private _lastSearchResult;
|
|
380
274
|
private _pendingActions;
|
|
381
|
-
private
|
|
382
|
-
private _listMode;
|
|
383
|
-
private _blockedExtensionsArray;
|
|
384
|
-
private _allowedExtensionsArray;
|
|
385
|
-
private _totalblockedExtensionsFound;
|
|
386
|
-
private _totalallowedExtensionsFound;
|
|
275
|
+
private _debouncedSearch;
|
|
387
276
|
}
|
|
388
277
|
/**
|
|
389
278
|
* ListModel statics.
|
|
@@ -395,6 +284,4 @@ export declare namespace ListModel {
|
|
|
395
284
|
* @param entry The entry to check.
|
|
396
285
|
*/
|
|
397
286
|
function entryHasUpdate(entry: IEntry): boolean;
|
|
398
|
-
function isDisclaimed(): boolean;
|
|
399
|
-
function toogleDisclaimed(): void;
|
|
400
287
|
}
|