Skip to content

Commit 113df1e

Browse files
Temporarily expose the SharingService
1 parent fd159cc commit 113df1e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ const plugin: JupyterFrontEndPlugin<void> = {
145145
PageConfig.getOption('sharing_service_api_url') || 'http://localhost:8080/api/v1';
146146

147147
const sharingService = new SharingService(apiUrl);
148+
// Temporary
149+
(window as any).sharingService = sharingService;
148150

149151
/**
150152
* Hook into notebook saves using the saveState signal to handle CKHub sharing

src/pages/notebook.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ export const notebookPlugin: JupyterFrontEndPlugin<void> = {
3939

4040
const apiUrl =
4141
PageConfig.getOption('sharing_service_api_url') || 'http://localhost:8080/api/v1';
42-
const sharingService = new SharingService(apiUrl);
42+
43+
// Temporary
44+
const sharingService = (window as any).sharingService ?? new SharingService(apiUrl);
45+
(window as any).sharingService = sharingService;
4346

4447
console.log(`API URL: ${apiUrl}`);
4548
console.log('Retrieving notebook from API...');

0 commit comments

Comments
 (0)