@fails-components/jupyter-filesystem-extension 0.0.5 → 0.0.6

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/README.md CHANGED
@@ -74,29 +74,3 @@ pip uninstall fails_components_jupyter_filesystem_extension
74
74
  In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
75
75
  command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
76
76
  folder is located. Then you can remove the symlink named `@fails-components/jupyter-applet-view` within that folder.
77
-
78
- ### Testing the extension
79
-
80
- #### Frontend tests
81
-
82
- This extension is using [Jest](https://jestjs.io/) for JavaScript code testing.
83
-
84
- To execute them, execute:
85
-
86
- ```sh
87
- jlpm
88
- jlpm test
89
- ```
90
-
91
- <!--
92
- #### Integration tests
93
-
94
- This extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).
95
- More precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.
96
-
97
- More information are provided within the [ui-tests](./ui-tests/README.md) README.
98
-
99
- ### Packaging the extension
100
-
101
- See [RELEASE](RELEASE.md)
102
- -->
package/lib/drive.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { Contents, Drive, ServerConnection } from '@jupyterlab/services';
2
- import { ISignal } from '@lumino/signaling';
1
+ import type { Contents, Drive } from '@jupyterlab/services';
2
+ import { ServerConnection } from '@jupyterlab/services';
3
+ import type { ISignal } from '@lumino/signaling';
3
4
  interface IContentEvent {
4
5
  task: string;
5
6
  }
package/lib/drive.js CHANGED
@@ -8,7 +8,7 @@ import { Signal } from '@lumino/signaling';
8
8
  // This code contains portions from or is inspired by Jupyter lab and lite
9
9
  // especially the Drive implementation
10
10
  const jsonMime = 'application/json';
11
- class FailsDrive {
11
+ export class FailsDrive {
12
12
  constructor(options) {
13
13
  var _a;
14
14
  this._fileContent = JSON.stringify(FailsDrive.EMPTY_NB);
@@ -205,4 +205,3 @@ FailsDrive.EMPTY_NB = {
205
205
  nbformat: 4,
206
206
  cells: []
207
207
  };
208
- export { FailsDrive };
package/lib/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ServiceManagerPlugin } from '@jupyterlab/services';
1
+ import type { ServiceManagerPlugin } from '@jupyterlab/services';
2
2
  export * from './token';
3
3
  declare const plugins: ServiceManagerPlugin<any>[];
4
4
  export default plugins;
package/lib/index.js CHANGED
@@ -8,6 +8,7 @@ const failsDriveMessages = {
8
8
  requires: [],
9
9
  autoStart: true,
10
10
  provides: IFailsDriveMessages,
11
+ description: 'IFailsDriveMessages interface to send/receive messages for the drive',
11
12
  activate: (_) => {
12
13
  let initialWaitRes;
13
14
  const initialWait = new Promise(resolve => (initialWaitRes = resolve));
@@ -33,6 +34,7 @@ const failsDrivePlugin = {
33
34
  requires: [IFailsDriveMessages],
34
35
  autoStart: true,
35
36
  provides: IDefaultDrive,
37
+ description: 'Supplies a drive object for Jupyter lite to be fed from outisde the iframe',
36
38
  activate: (_, driveMessages) => {
37
39
  const drive = new FailsDrive({});
38
40
  driveMessages.registerMessageHandler(msg => drive.onMessage(msg));
@@ -45,6 +47,7 @@ const failsSettingsPlugin = {
45
47
  autoStart: true,
46
48
  provides: ISettingManager,
47
49
  optional: [IServerSettings],
50
+ description: 'ISettingsManager from the IFrame embeeded Jupyter',
48
51
  activate: (_, serverSettings) => {
49
52
  const settings = new FailsSettings({
50
53
  serverSettings: serverSettings !== null && serverSettings !== void 0 ? serverSettings : undefined
package/lib/settings.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { Setting, SettingManager } from '@jupyterlab/services';
2
- import { ISettingRegistry } from '@jupyterlab/settingregistry';
1
+ import type { Setting } from '@jupyterlab/services';
2
+ import { SettingManager } from '@jupyterlab/services';
3
+ import type { ISettingRegistry } from '@jupyterlab/settingregistry';
3
4
  export type SettingsFile = 'all.json' | 'all_federated.json';
4
5
  export declare class FailsSettings extends SettingManager implements Setting.IManager {
5
6
  static _overrides: Record<string, ISettingRegistry.IPlugin['schema']['default']>;
package/lib/settings.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { PageConfig, URLExt } from '@jupyterlab/coreutils';
2
2
  import { SettingManager } from '@jupyterlab/services';
3
3
  import * as json5 from 'json5';
4
- class FailsSettings extends SettingManager {
4
+ export class FailsSettings extends SettingManager {
5
5
  static override(plugin) {
6
6
  if (FailsSettings._overrides[plugin.id]) {
7
7
  if (!plugin.schema.properties) {
@@ -80,4 +80,3 @@ class FailsSettings extends SettingManager {
80
80
  }
81
81
  // the following is copied from the original Jupyter Lite Settings Object
82
82
  FailsSettings._overrides = JSON.parse(PageConfig.getOption('settingsOverrides') || '{}');
83
- export { FailsSettings };
package/lib/token.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Token } from '@lumino/coreutils';
2
- import { IContentEventType } from './drive';
2
+ import type { IContentEventType } from './drive';
3
3
  export type IFailsDriveMessageHandler = (msg: IContentEventType) => Promise<void> | void;
4
4
  export interface IFailsDriveMessages {
5
5
  registerMessageHandler: (handler: IFailsDriveMessageHandler) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fails-components/jupyter-filesystem-extension",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "A collection of extensions, that redirect's filesystems access to fails and let fails puppeteer Jupyter lite. ",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -34,8 +34,8 @@
34
34
  "scripts": {
35
35
  "build": "jlpm build:lib && jlpm build:labextension:dev",
36
36
  "build:prod": "jlpm clean && jlpm build:lib:prod && jlpm build:labextension",
37
- "build:labextension": "jupyter labextension build .",
38
- "build:labextension:dev": "jupyter labextension build --development True .",
37
+ "build:labextension": "jupyter-builder build .",
38
+ "build:labextension:dev": "jupyter-builder build --development True .",
39
39
  "build:lib": "tsc --sourceMap",
40
40
  "build:lib:prod": "tsc",
41
41
  "clean": "jlpm clean:lib",
@@ -60,26 +60,27 @@
60
60
  "watch:labextension": "jupyter labextension watch ."
61
61
  },
62
62
  "dependencies": {
63
- "@jupyterlab/coreutils": "^6.5.1",
64
- "@jupyterlab/services": "^7.5.1",
65
- "@jupyterlab/settingregistry": "^4.5.1",
63
+ "@jupyterlab/coreutils": "^6.6.0",
64
+ "@jupyterlab/services": "^7.6.0",
65
+ "@jupyterlab/settingregistry": "~4.6.0",
66
66
  "@lumino/coreutils": "^2.2.2",
67
67
  "@lumino/signaling": "^2.1.5",
68
68
  "json5": "^2.2.3"
69
69
  },
70
70
  "devDependencies": {
71
- "@jupyterlab/builder": "^4.5.1",
72
- "@jupyterlab/testutils": "^4.5.1",
71
+ "@jupyter/builder": "~1.0.0",
72
+ "@jupyter/eslint-plugin": "0.0.5",
73
+ "@jupyterlab/testutils": "~4.6.0",
74
+ "@stylistic/eslint-plugin": "^5.10.0",
73
75
  "@types/jest": "^29.2.0",
74
76
  "@types/json-schema": "^7.0.11",
75
77
  "@types/react": "^18.0.26",
76
78
  "@types/react-addons-linked-state-mixin": "^0.14.22",
77
- "@typescript-eslint/eslint-plugin": "^6.1.0",
78
- "@typescript-eslint/parser": "^6.1.0",
79
79
  "css-loader": "^6.7.1",
80
- "eslint": "^8.36.0",
81
- "eslint-config-prettier": "^8.8.0",
82
- "eslint-plugin-prettier": "^5.0.0",
80
+ "eslint": "^9.39.2",
81
+ "eslint-config-prettier": "^9.1.0",
82
+ "eslint-plugin-prettier": "^5.1.3",
83
+ "eslint-plugin-react": "^7.37.0",
83
84
  "jest": "^29.2.0",
84
85
  "npm-run-all": "^4.1.5",
85
86
  "prettier": "^3.0.0",
@@ -91,7 +92,8 @@
91
92
  "stylelint-config-standard": "^34.0.0",
92
93
  "stylelint-csstree-validator": "^3.0.0",
93
94
  "stylelint-prettier": "^4.0.0",
94
- "typescript": "~5.0.2",
95
+ "typescript": "~5.9.3",
96
+ "typescript-eslint": "^8.0.0",
95
97
  "yjs": "^13.5.0"
96
98
  },
97
99
  "sideEffects": [
@@ -113,8 +115,7 @@
113
115
  "coverage",
114
116
  "**/*.d.ts",
115
117
  "tests",
116
- "**/__tests__",
117
- "ui-tests"
118
+ "**/__tests__"
118
119
  ],
119
120
  "eslintConfig": {
120
121
  "extends": [
package/src/drive.ts CHANGED
@@ -1,5 +1,7 @@
1
- import { Contents, Drive, ServerConnection } from '@jupyterlab/services';
2
- import { ISignal, Signal } from '@lumino/signaling';
1
+ import type { Contents, Drive } from '@jupyterlab/services';
2
+ import { ServerConnection } from '@jupyterlab/services';
3
+ import type { ISignal } from '@lumino/signaling';
4
+ import { Signal } from '@lumino/signaling';
3
5
 
4
6
  interface IContentEvent {
5
7
  task: string;
@@ -17,8 +19,7 @@ export interface ISavedJupyterContentEvent extends IContentEvent {
17
19
  }
18
20
 
19
21
  export type IContentEventType =
20
- | ILoadJupyterContentEvent
21
- | ISavedJupyterContentEvent; // use union
22
+ ILoadJupyterContentEvent | ISavedJupyterContentEvent; // use union
22
23
 
23
24
  // portions used from Jupyterlab:
24
25
  /* -----------------------------------------------------------------------------
package/src/index.ts CHANGED
@@ -1,15 +1,19 @@
1
- import {
2
- IDefaultDrive,
1
+ import type {
3
2
  Contents,
4
3
  ServerConnection,
5
4
  Setting,
6
- ISettingManager,
7
- IServerSettings,
8
5
  ServiceManagerPlugin
9
6
  } from '@jupyterlab/services';
10
- import { FailsDrive, IContentEventType } from './drive';
7
+ import {
8
+ IDefaultDrive,
9
+ ISettingManager,
10
+ IServerSettings
11
+ } from '@jupyterlab/services';
12
+ import type { IContentEventType } from './drive';
13
+ import { FailsDrive } from './drive';
11
14
  import { FailsSettings } from './settings';
12
- import { IFailsDriveMessageHandler, IFailsDriveMessages } from './token';
15
+ import type { IFailsDriveMessageHandler } from './token';
16
+ import { IFailsDriveMessages } from './token';
13
17
 
14
18
  export * from './token';
15
19
 
@@ -18,6 +22,8 @@ const failsDriveMessages: ServiceManagerPlugin<IFailsDriveMessages> = {
18
22
  requires: [],
19
23
  autoStart: true,
20
24
  provides: IFailsDriveMessages,
25
+ description:
26
+ 'IFailsDriveMessages interface to send/receive messages for the drive',
21
27
  activate: (_: null) => {
22
28
  let initialWaitRes: ((val: unknown) => void) | undefined;
23
29
  const initialWait = new Promise(resolve => (initialWaitRes = resolve));
@@ -44,6 +50,8 @@ const failsDrivePlugin: ServiceManagerPlugin<Contents.IDrive> = {
44
50
  requires: [IFailsDriveMessages],
45
51
  autoStart: true,
46
52
  provides: IDefaultDrive,
53
+ description:
54
+ 'Supplies a drive object for Jupyter lite to be fed from outisde the iframe',
47
55
  activate: (_: null, driveMessages: IFailsDriveMessages) => {
48
56
  const drive = new FailsDrive({});
49
57
  driveMessages.registerMessageHandler(msg => drive.onMessage(msg));
@@ -57,6 +65,7 @@ const failsSettingsPlugin: ServiceManagerPlugin<Setting.IManager> = {
57
65
  autoStart: true,
58
66
  provides: ISettingManager,
59
67
  optional: [IServerSettings],
68
+ description: 'ISettingsManager from the IFrame embeeded Jupyter',
60
69
  activate: (_: null, serverSettings: ServerConnection.ISettings | null) => {
61
70
  const settings = new FailsSettings({
62
71
  serverSettings: serverSettings ?? undefined
package/src/settings.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { PageConfig, URLExt } from '@jupyterlab/coreutils';
2
- import { Setting, SettingManager } from '@jupyterlab/services';
3
- import { ISettingRegistry } from '@jupyterlab/settingregistry';
2
+ import type { Setting } from '@jupyterlab/services';
3
+ import { SettingManager } from '@jupyterlab/services';
4
+ import type { ISettingRegistry } from '@jupyterlab/settingregistry';
4
5
  import * as json5 from 'json5';
5
6
 
6
7
  // portions used from Jupyterlab:
package/src/token.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Token } from '@lumino/coreutils';
2
- import { IContentEventType } from './drive';
2
+ import type { IContentEventType } from './drive';
3
3
 
4
4
  export type IFailsDriveMessageHandler = (
5
5
  msg: IContentEventType