@oceanum/oceanumlab 4.9.0 → 4.10.0

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.
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Notebooks generated from a Datamesh UI workspace or query.
3
+ *
4
+ * The Datamesh UI's "Open in notebook" button opens this app with the workspace in the
5
+ * address fragment, `#oceanum-datamesh=<base64url JSON>`. The fragment is never sent
6
+ * to a server, so the queries stay out of request logs and are not bound by URL
7
+ * length limits on the way in.
8
+ *
9
+ * Anyone can craft such a link, so the payload is treated as data only: it is
10
+ * validated, every value reaches the notebook as a Python literal, and the notebook is
11
+ * built from fixed templates, opened untrusted and never run automatically.
12
+ */
13
+ import type { INotebookContent } from '@jupyterlab/nbformat';
14
+ /** Fragment key carrying a Datamesh workspace. */
15
+ export declare const FRAGMENT_KEY = "oceanum-datamesh";
16
+ /** Payload version this module reads. */
17
+ export declare const PAYLOAD_VERSION = 1;
18
+ /** Most queries one link may carry. */
19
+ export declare const MAX_ITEMS = 100;
20
+ /** Longest encoded payload accepted (characters of base64url). */
21
+ export declare const MAX_ENCODED_LENGTH: number;
22
+ /**
23
+ * Deepest nesting of arrays and objects accepted. Real queries, GeoJSON
24
+ * multipolygon geofilters included, nest about 8 deep.
25
+ */
26
+ export declare const MAX_DEPTH = 32;
27
+ /** One query: an OceanQL spec plus the Datamesh UI's own `label`. */
28
+ export interface IDatameshQuery {
29
+ datasource: string;
30
+ label?: string | null;
31
+ description?: string | null;
32
+ [key: string]: unknown;
33
+ }
34
+ /** What the fragment carries. */
35
+ export interface IDatameshNotebookRequest {
36
+ v: typeof PAYLOAD_VERSION;
37
+ /** Workspace name, used for the notebook name and heading. */
38
+ name?: string;
39
+ items: IDatameshQuery[];
40
+ }
41
+ /** UTF-8 JSON to base64url, without padding. */
42
+ export declare function encodePayload(request: IDatameshNotebookRequest): string;
43
+ /**
44
+ * Read and validate a payload. Throws an `Error` whose message can be shown to the
45
+ * user; it never quotes the payload.
46
+ */
47
+ export declare function decodePayload(encoded: string): IDatameshNotebookRequest;
48
+ /**
49
+ * The payload in a location hash (`#oceanum-datamesh=...`), or null when the hash
50
+ * carries none. Other parts of the hash are ignored.
51
+ */
52
+ export declare function payloadFromHash(hash: string): string | null;
53
+ /**
54
+ * The hash with the payload removed (`''` when nothing else is left). Every other
55
+ * part is kept exactly as it was.
56
+ */
57
+ export declare function hashWithoutPayload(hash: string): string;
58
+ /**
59
+ * A Python string literal. JSON's escaping is valid Python and escapes C0 controls;
60
+ * the C1 controls and U+2028/U+2029 it leaves raw are escaped too, so the generated
61
+ * source has no character a kernel could treat as a line break.
62
+ */
63
+ export declare function pyString(text: string): string;
64
+ /**
65
+ * A Python literal for a JSON value, wrapped over indented lines when it does not
66
+ * fit on one. Strings and keys go through `pyString`, so no value can end the
67
+ * literal early or break the line.
68
+ */
69
+ export declare function pyLiteral(value: unknown, indent?: number): string;
70
+ /** A Python identifier for `text`, not in `taken`; adds it to `taken`. */
71
+ export declare function pyIdentifier(text: string, taken: Set<string>): string;
72
+ /** The OceanQL query to send: only fields oceanum-python's `Query` accepts. */
73
+ export declare function queryFields(item: IDatameshQuery): Record<string, unknown>;
74
+ /** The code cell that loads one query into a variable and shows it. */
75
+ export declare function queryCellSource(item: IDatameshQuery, variable: string): string;
76
+ /** The notebook name for a request: the workspace name, or the single query's. */
77
+ export declare function notebookName(request: IDatameshNotebookRequest): string;
78
+ /**
79
+ * A new notebook that loads every query in `request`. It carries no `oceanum` link and
80
+ * no trust, so saving it creates a record of the user's own.
81
+ */
82
+ export declare function notebookFromDatamesh(request: IDatameshNotebookRequest): INotebookContent;
@@ -0,0 +1,379 @@
1
+ /** Fragment key carrying a Datamesh workspace. */
2
+ export const FRAGMENT_KEY = 'oceanum-datamesh';
3
+ /** Payload version this module reads. */
4
+ export const PAYLOAD_VERSION = 1;
5
+ /** Most queries one link may carry. */
6
+ export const MAX_ITEMS = 100;
7
+ /** Longest encoded payload accepted (characters of base64url). */
8
+ export const MAX_ENCODED_LENGTH = 4 * 1024 * 1024;
9
+ /**
10
+ * Deepest nesting of arrays and objects accepted. Real queries, GeoJSON
11
+ * multipolygon geofilters included, nest about 8 deep.
12
+ */
13
+ export const MAX_DEPTH = 32;
14
+ /** Nesting depth of a JSON value (a scalar is 0), without recursion. */
15
+ function depthOf(value) {
16
+ let max = 0;
17
+ const stack = [[value, 0]];
18
+ while (stack.length) {
19
+ const [v, d] = stack.pop();
20
+ if (v !== null && typeof v === 'object') {
21
+ max = Math.max(max, d + 1);
22
+ if (max > MAX_DEPTH) {
23
+ return max;
24
+ }
25
+ for (const child of Object.values(v)) {
26
+ stack.push([child, d + 1]);
27
+ }
28
+ }
29
+ }
30
+ return max;
31
+ }
32
+ /** The fields of oceanum-python's `Query`. Anything else would make it warn. */
33
+ const QUERY_FIELDS = [
34
+ 'datasource',
35
+ 'parameters',
36
+ 'description',
37
+ 'variables',
38
+ 'timefilter',
39
+ 'geofilter',
40
+ 'levelfilter',
41
+ 'coordfilter',
42
+ 'crs',
43
+ 'aggregate',
44
+ 'functions',
45
+ 'limit'
46
+ ];
47
+ /** Fields that make a query select something rather than the whole datasource. */
48
+ const FILTER_FIELDS = QUERY_FIELDS.filter(f => f !== 'datasource' && f !== 'description');
49
+ function isObject(value) {
50
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
51
+ }
52
+ /** UTF-8 JSON to base64url, without padding. */
53
+ export function encodePayload(request) {
54
+ const bytes = new TextEncoder().encode(JSON.stringify(request));
55
+ let binary = '';
56
+ for (const b of bytes) {
57
+ binary += String.fromCharCode(b);
58
+ }
59
+ return btoa(binary)
60
+ .replace(/\+/g, '-')
61
+ .replace(/\//g, '_')
62
+ .replace(/=+$/, '');
63
+ }
64
+ /**
65
+ * Read and validate a payload. Throws an `Error` whose message can be shown to the
66
+ * user; it never quotes the payload.
67
+ */
68
+ export function decodePayload(encoded) {
69
+ if (encoded.length > MAX_ENCODED_LENGTH) {
70
+ throw new Error('The Datamesh link is too large to open.');
71
+ }
72
+ let parsed;
73
+ try {
74
+ const b64 = encoded.replace(/-/g, '+').replace(/_/g, '/');
75
+ const binary = atob(b64);
76
+ const bytes = Uint8Array.from(binary, c => c.charCodeAt(0));
77
+ parsed = JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(bytes));
78
+ }
79
+ catch (_a) {
80
+ throw new Error('The Datamesh link is not valid.');
81
+ }
82
+ if (!isObject(parsed) || parsed.v !== PAYLOAD_VERSION) {
83
+ throw new Error('The Datamesh link is not valid, or comes from a newer Datamesh UI.');
84
+ }
85
+ const { name, items } = parsed;
86
+ // null is accepted wherever a string is optional: the UI copies datasource
87
+ // properties that may be null.
88
+ const optionalText = (value) => value === undefined || value === null || typeof value === 'string';
89
+ if (!optionalText(name)) {
90
+ throw new Error('The Datamesh link is not valid.');
91
+ }
92
+ if (!Array.isArray(items) || items.length === 0) {
93
+ throw new Error('The Datamesh link holds no queries.');
94
+ }
95
+ if (items.length > MAX_ITEMS) {
96
+ throw new Error(`The Datamesh link holds more than ${MAX_ITEMS} queries, which is too many to open.`);
97
+ }
98
+ if (depthOf(items) > MAX_DEPTH) {
99
+ throw new Error('The Datamesh link holds a query that is not valid.');
100
+ }
101
+ for (const item of items) {
102
+ if (!isObject(item) ||
103
+ typeof item.datasource !== 'string' ||
104
+ item.datasource.trim() === '' ||
105
+ !optionalText(item.label) ||
106
+ !optionalText(item.description)) {
107
+ throw new Error('The Datamesh link holds a query that is not valid.');
108
+ }
109
+ }
110
+ return {
111
+ v: PAYLOAD_VERSION,
112
+ ...(typeof name === 'string' ? { name } : {}),
113
+ items: items
114
+ };
115
+ }
116
+ const PAYLOAD_PREFIX = `${FRAGMENT_KEY}=`;
117
+ /** The hash's `&`-separated parts, without the leading `#`. */
118
+ function hashParts(hash) {
119
+ const body = hash.replace(/^#/, '');
120
+ return body === '' ? [] : body.split('&');
121
+ }
122
+ /**
123
+ * The payload in a location hash (`#oceanum-datamesh=...`), or null when the hash
124
+ * carries none. Other parts of the hash are ignored.
125
+ */
126
+ export function payloadFromHash(hash) {
127
+ const part = hashParts(hash).find(p => p.startsWith(PAYLOAD_PREFIX));
128
+ return part === undefined ? null : part.slice(PAYLOAD_PREFIX.length);
129
+ }
130
+ /**
131
+ * The hash with the payload removed (`''` when nothing else is left). Every other
132
+ * part is kept exactly as it was.
133
+ */
134
+ export function hashWithoutPayload(hash) {
135
+ const rest = hashParts(hash).filter(p => !p.startsWith(PAYLOAD_PREFIX));
136
+ return rest.length ? `#${rest.join('&')}` : '';
137
+ }
138
+ const INLINE_WIDTH = 72;
139
+ /** Characters JSON leaves raw that Python's `splitlines()` still breaks on. */
140
+ const RAW_BREAKS = new RegExp(`[\\x7f-\\x9f${String.fromCharCode(0x2028, 0x2029)}]`, 'g');
141
+ /**
142
+ * A Python string literal. JSON's escaping is valid Python and escapes C0 controls;
143
+ * the C1 controls and U+2028/U+2029 it leaves raw are escaped too, so the generated
144
+ * source has no character a kernel could treat as a line break.
145
+ */
146
+ export function pyString(text) {
147
+ return JSON.stringify(text).replace(RAW_BREAKS, c => `\\u${c.charCodeAt(0).toString(16).padStart(4, '0')}`);
148
+ }
149
+ /** A Python literal for a scalar, or null for an array or object. */
150
+ function pyScalar(value) {
151
+ if (value === null || value === undefined) {
152
+ return 'None';
153
+ }
154
+ if (typeof value === 'boolean') {
155
+ return value ? 'True' : 'False';
156
+ }
157
+ if (typeof value === 'number') {
158
+ // Parsed JSON has no NaN or Infinity; guard anyway rather than emit bad code.
159
+ return Number.isFinite(value) ? JSON.stringify(value) : 'None';
160
+ }
161
+ if (typeof value === 'string') {
162
+ return pyString(value);
163
+ }
164
+ return Array.isArray(value) || isObject(value) ? null : 'None';
165
+ }
166
+ function definedEntries(value) {
167
+ return Object.entries(value).filter(([, v]) => v !== undefined);
168
+ }
169
+ /** A Python literal on one line, rendering each node once. */
170
+ function pyInline(value) {
171
+ const scalar = pyScalar(value);
172
+ if (scalar !== null) {
173
+ return scalar;
174
+ }
175
+ if (Array.isArray(value)) {
176
+ return `[${value.map(pyInline).join(', ')}]`;
177
+ }
178
+ return `{${definedEntries(value)
179
+ .map(([k, v]) => `${pyString(k)}: ${pyInline(v)}`)
180
+ .join(', ')}}`;
181
+ }
182
+ /**
183
+ * A Python literal for a JSON value, wrapped over indented lines when it does not
184
+ * fit on one. Strings and keys go through `pyString`, so no value can end the
185
+ * literal early or break the line.
186
+ */
187
+ export function pyLiteral(value, indent = 0) {
188
+ const scalar = pyScalar(value);
189
+ if (scalar !== null) {
190
+ return scalar;
191
+ }
192
+ const pad = ' '.repeat(indent + 4);
193
+ const end = ' '.repeat(indent);
194
+ const inline = pyInline(value);
195
+ if (Array.isArray(value)) {
196
+ if (inline.length + indent <= INLINE_WIDTH || value.length === 0) {
197
+ return inline;
198
+ }
199
+ const lines = value.map(v => pad + pyLiteral(v, indent + 4));
200
+ return `[\n${lines.join(',\n')},\n${end}]`;
201
+ }
202
+ if (isObject(value)) {
203
+ const entries = definedEntries(value);
204
+ if (inline.length + indent <= INLINE_WIDTH || entries.length === 0) {
205
+ return inline;
206
+ }
207
+ const lines = entries.map(([k, v]) => `${pad}${pyString(k)}: ${pyLiteral(v, indent + 4)}`);
208
+ return `{\n${lines.join(',\n')},\n${end}}`;
209
+ }
210
+ return 'None';
211
+ }
212
+ const PY_KEYWORDS = new Set([
213
+ 'False',
214
+ 'None',
215
+ 'True',
216
+ 'and',
217
+ 'as',
218
+ 'assert',
219
+ 'async',
220
+ 'await',
221
+ 'break',
222
+ 'class',
223
+ 'continue',
224
+ 'def',
225
+ 'del',
226
+ 'elif',
227
+ 'else',
228
+ 'except',
229
+ 'finally',
230
+ 'for',
231
+ 'from',
232
+ 'global',
233
+ 'if',
234
+ 'import',
235
+ 'in',
236
+ 'is',
237
+ 'lambda',
238
+ 'nonlocal',
239
+ 'not',
240
+ 'or',
241
+ 'pass',
242
+ 'raise',
243
+ 'return',
244
+ 'try',
245
+ 'while',
246
+ 'with',
247
+ 'yield',
248
+ // Names the generated code itself uses.
249
+ 'datamesh',
250
+ 'Connector'
251
+ ]);
252
+ /** A Python identifier for `text`, not in `taken`; adds it to `taken`. */
253
+ export function pyIdentifier(text, taken) {
254
+ let base = text
255
+ .replace(/[^A-Za-z0-9_]+/g, '_')
256
+ .replace(/_+/g, '_')
257
+ .replace(/^_+|_+$/g, '')
258
+ .toLowerCase();
259
+ if (base === '') {
260
+ base = 'data';
261
+ }
262
+ if (/^[0-9]/.test(base)) {
263
+ base = `ds_${base}`;
264
+ }
265
+ if (PY_KEYWORDS.has(base)) {
266
+ base = `${base}_`;
267
+ }
268
+ let name = base;
269
+ for (let i = 2; taken.has(name); i++) {
270
+ name = `${base}_${i}`;
271
+ }
272
+ taken.add(name);
273
+ return name;
274
+ }
275
+ /**
276
+ * Every C0 and C1 control character, plus U+2028 and U+2029. This is a superset of
277
+ * what Python's `str.splitlines()` breaks on (LF, CR, VT, FF, FS, GS, RS, NEL and the
278
+ * two separators), which IPython's input transformer uses to split a cell into lines:
279
+ * left in a `#` comment, any of them would end the comment and run what follows.
280
+ */
281
+ const LINE_BREAKS = new RegExp(`[\\x00-\\x1f\\x7f-\\x9f${String.fromCharCode(0x2028, 0x2029)}]+`, 'g');
282
+ /** One line of text safe to put after a `#` comment marker. */
283
+ function commentText(text) {
284
+ return text.replace(LINE_BREAKS, ' ').trim();
285
+ }
286
+ /**
287
+ * Text safe to put in a Markdown heading: no HTML, no Markdown syntax, and no
288
+ * autolink (`:`, `/` and `.` are escaped too). `&`, `<` and `>` become entities;
289
+ * every other ASCII punctuation character is backslash-escaped except `;` (part
290
+ * of the entities) and `@`: JupyterLab's math handling keeps `@@0@@` as a
291
+ * placeholder, and an escaped `\@\@0\@\@` slips past it and breaks rendering.
292
+ */
293
+ function markdownText(text) {
294
+ return commentText(text)
295
+ .replace(/&/g, '&amp;')
296
+ .replace(/</g, '&lt;')
297
+ .replace(/>/g, '&gt;')
298
+ .replace(/([!-%'-/:=?[-`{-~])/g, '\\$1');
299
+ }
300
+ /** The OceanQL query to send: only fields oceanum-python's `Query` accepts. */
301
+ export function queryFields(item) {
302
+ const query = {};
303
+ for (const field of QUERY_FIELDS) {
304
+ if (item[field] !== undefined && item[field] !== null) {
305
+ query[field] = item[field];
306
+ }
307
+ }
308
+ return query;
309
+ }
310
+ /** Whether a query selects part of its datasource (else it loads the whole one). */
311
+ function isFiltered(query) {
312
+ return FILTER_FIELDS.some(f => {
313
+ const v = query[f];
314
+ return !(Array.isArray(v) && v.length === 0) && v !== undefined;
315
+ });
316
+ }
317
+ /** The code cell that loads one query into a variable and shows it. */
318
+ export function queryCellSource(item, variable) {
319
+ var _a, _b;
320
+ const query = queryFields(item);
321
+ const lines = [];
322
+ const title = commentText((_b = (_a = item.description) !== null && _a !== void 0 ? _a : item.label) !== null && _b !== void 0 ? _b : '');
323
+ if (title) {
324
+ lines.push(`# ${title}`);
325
+ }
326
+ if (isFiltered(query)) {
327
+ lines.push(`${variable} = datamesh.query(${pyLiteral(query)})`);
328
+ }
329
+ else {
330
+ // No filter: open the datasource lazily rather than download all of it.
331
+ lines.push(`${variable} = datamesh.load_datasource(${pyLiteral(item.datasource)})`);
332
+ }
333
+ lines.push(variable);
334
+ return lines.join('\n');
335
+ }
336
+ function codeCell(source) {
337
+ return {
338
+ cell_type: 'code',
339
+ execution_count: null,
340
+ metadata: {},
341
+ outputs: [],
342
+ source
343
+ };
344
+ }
345
+ /** The notebook name for a request: the workspace name, or the single query's. */
346
+ export function notebookName(request) {
347
+ var _a, _b;
348
+ const only = request.items.length === 1 ? request.items[0] : null;
349
+ const name = ((_a = request.name) === null || _a === void 0 ? void 0 : _a.trim()) ||
350
+ ((_b = only === null || only === void 0 ? void 0 : only.label) === null || _b === void 0 ? void 0 : _b.trim()) ||
351
+ (only === null || only === void 0 ? void 0 : only.datasource.trim()) ||
352
+ 'Datamesh workspace';
353
+ return commentText(name);
354
+ }
355
+ /**
356
+ * A new notebook that loads every query in `request`. It carries no `oceanum` link and
357
+ * no trust, so saving it creates a record of the user's own.
358
+ */
359
+ export function notebookFromDatamesh(request) {
360
+ const taken = new Set();
361
+ const cells = [
362
+ {
363
+ cell_type: 'markdown',
364
+ metadata: {},
365
+ source: `# ${markdownText(notebookName(request))}\n\n` +
366
+ 'Opened from the Oceanum Datamesh UI. Run the cells to load the data.'
367
+ },
368
+ codeCell('from oceanum.datamesh import Connector\n\ndatamesh = Connector()'),
369
+ ...request.items.map(item => codeCell(queryCellSource(item, pyIdentifier(item.label || item.datasource, taken))))
370
+ ];
371
+ return {
372
+ nbformat: 4,
373
+ nbformat_minor: 5,
374
+ // No kernelspec: the kernel is `python` in JupyterLite and `python3` in
375
+ // JupyterLab, and the language alone lets either pick its Python kernel.
376
+ metadata: { language_info: { name: 'python' } },
377
+ cells
378
+ };
379
+ }
@@ -9,6 +9,7 @@ import { startSignIn } from '../auth/startSignIn';
9
9
  import { IOceanumAuth } from '../auth/tokens';
10
10
  import { SpecStoreClient, SpecStoreError } from './client';
11
11
  import { notebooksChanged } from './events';
12
+ import { decodePayload, hashWithoutPayload, notebookFromDatamesh, notebookName, payloadFromHash } from './fromDatamesh';
12
13
  import { buildSpecBody, isSpecId, METADATA_KEY, notebookFromRecord, notebookFromUpload, notebookNamesFor, NOTEBOOK_DEMO_TYPE, OCEANUM_DIR, partitionSummaries, QUERY_PARAM, readLink, reportForShareFailures, sanitizeName, shareLink, uniqueNotebookPath, unlinkedNotebookFromRecord } from './notebook';
13
14
  import { hideFileBrowser, moveToTop, NON_NOTEBOOK_NEW_COMMANDS, OCEANUM_PANEL_ID, pruneBeforeEachOpen, pruneFileMenu, routeSaves } from './oceanumOnly';
14
15
  import { chooseNotebookFile } from './upload';
@@ -69,6 +70,22 @@ export const sharePlugin = {
69
70
  let signInGeneration = 0;
70
71
  let warnedSignedOut = false;
71
72
  const signedIn = () => store !== null && auth.user !== null;
73
+ // A workspace sent by the Datamesh UI's "Open in notebook". Read it now, before
74
+ // anything can rewrite the address. It stays in the address until the notebook
75
+ // is written (see openFromDatamesh), so nothing is lost if the page is left
76
+ // before then. Not handled: a full-page sign-in redirect (signInRedirect) puts
77
+ // the hash back only after this plugin has activated, so the workspace opens
78
+ // on the next load rather than this one.
79
+ const datameshPayload = payloadFromHash(window.location.hash);
80
+ /** Remove the payload from the address, so a reload does not open a copy. */
81
+ const clearDatameshPayload = () => {
82
+ const url = new URL(window.location.href);
83
+ const hash = hashWithoutPayload(url.hash);
84
+ if (hash !== url.hash) {
85
+ url.hash = hash;
86
+ window.history.replaceState(window.history.state, '', url.toString());
87
+ }
88
+ };
72
89
  const label = (text) => () => store ? text : `${text}${UNAVAILABLE}`;
73
90
  // --- what a command acts on ---------------------------------------------------
74
91
  /**
@@ -803,6 +820,37 @@ export const sharePlugin = {
803
820
  }
804
821
  clearQuery();
805
822
  }
823
+ /**
824
+ * Open a new notebook that loads a Datamesh UI workspace or query. It is written to
825
+ * the Oceanum folder unlinked, like an example, so the first save creates a record
826
+ * of the user's own. Nothing runs until the user runs it.
827
+ */
828
+ async function openFromDatamesh(encoded) {
829
+ let content;
830
+ let name;
831
+ try {
832
+ const request = decodePayload(encoded);
833
+ content = notebookFromDatamesh(request);
834
+ name = notebookName(request);
835
+ }
836
+ catch (error) {
837
+ clearDatameshPayload();
838
+ Notification.warning(error instanceof Error
839
+ ? error.message
840
+ : 'The Datamesh link is not valid.', { autoClose: 5000 });
841
+ return;
842
+ }
843
+ try {
844
+ const path = uniqueNotebookPath(name, await oceanumFolderNames());
845
+ await writeAndOpen(path, content);
846
+ }
847
+ catch (error) {
848
+ await reportError('Opening the Datamesh workspace failed', error);
849
+ }
850
+ finally {
851
+ clearDatameshPayload();
852
+ }
853
+ }
806
854
  // --- commands -----------------------------------------------------------------
807
855
  /** Whether the command can act on the pointer's row, the target notebook, or both. */
808
856
  const enabledFor = (wants, args) => {
@@ -982,5 +1030,8 @@ export const sharePlugin = {
982
1030
  Promise.all([app.restored, auth.ready])
983
1031
  .then(() => openFromQuery())
984
1032
  .catch(error => console.error('Failed to open the Oceanum notebook link', error));
1033
+ if (datameshPayload !== null) {
1034
+ void app.restored.then(() => openFromDatamesh(datameshPayload));
1035
+ }
985
1036
  }
986
1037
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oceanum/oceanumlab",
3
- "version": "4.9.0",
3
+ "version": "4.10.0",
4
4
  "description": "A Jupyterlab extension to interact with the Oceanum.io platform",
5
5
  "keywords": [
6
6
  "jupyter",