@datalayer/core 0.0.2 → 0.0.3
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 +12 -1
- package/lib/App.css +47 -0
- package/lib/App.d.ts +1 -1
- package/lib/App.js +17 -5
- package/lib/__tests__/index.test.js +2 -1
- package/lib/api/{RunApi.d.ts → DatalayerApi.d.ts} +4 -4
- package/lib/api/{RunApi.js → DatalayerApi.js} +4 -9
- package/lib/api/index.d.ts +2 -1
- package/lib/api/index.js +2 -6
- package/lib/api/{runtimes → jupyter}/exec/Python.js +0 -5
- package/lib/api/{runtimes → jupyter}/exec/Snippets.js +0 -5
- package/lib/api/{runtimes → jupyter}/exec/index.js +0 -5
- package/lib/api/jupyter/index.d.ts +2 -0
- package/lib/api/jupyter/index.js +6 -0
- package/lib/api/{runtimes → jupyter}/kernelsHandler.d.ts +1 -1
- package/lib/api/{runtimes → jupyter}/kernelsHandler.js +1 -6
- package/lib/api/runtimes/actions.d.ts +102 -0
- package/lib/api/runtimes/{runtimesApi.js → actions.js} +26 -31
- package/lib/api/runtimes/{runtimesApi.d.ts → apis.d.ts} +8 -105
- package/lib/api/runtimes/apis.js +5 -0
- package/lib/api/runtimes/index.d.ts +2 -4
- package/lib/api/runtimes/index.js +2 -9
- package/lib/api/runtimes/settings.js +0 -5
- package/lib/api/runtimes/snapshots.js +0 -5
- package/lib/api/runtimes/utils.js +0 -5
- package/lib/assets/react.svg +1 -0
- package/lib/components/avatars/BoringAvatar.d.ts +1 -2
- package/lib/components/avatars/BoringAvatar.js +14 -9
- package/lib/components/avatars/BoringAvatar.stories.d.ts +27 -0
- package/lib/components/avatars/BoringAvatar.stories.js +23 -0
- package/lib/components/avatars/UserProfileAvatar.js +0 -5
- package/lib/components/avatars/index.js +0 -5
- package/lib/components/banners/NoAutomationBanner.js +0 -5
- package/lib/components/banners/index.js +0 -5
- package/lib/components/buttons/DownloadCSVButton.d.ts +1 -1
- package/lib/components/buttons/DownloadCSVButton.js +0 -5
- package/lib/components/buttons/DownloadJsonButton.d.ts +1 -1
- package/lib/components/buttons/DownloadJsonButton.js +0 -5
- package/lib/components/buttons/LongActionButton.js +0 -5
- package/lib/components/buttons/UploadButton.js +0 -5
- package/lib/components/buttons/index.js +0 -5
- package/lib/components/checkout/StripeCheckout.js +0 -5
- package/lib/components/checkout/index.js +0 -5
- package/lib/components/confetti/ConfettiSuccess.js +0 -5
- package/lib/components/confetti/index.js +0 -5
- package/lib/components/context/OrganizationSelect.js +0 -5
- package/lib/components/context/SpaceSelect.js +0 -5
- package/lib/components/context/index.js +0 -5
- package/lib/components/display/AvatarSkeleton.js +0 -5
- package/lib/components/display/CenteredSpinner.js +0 -5
- package/lib/components/display/CodePreview.js +0 -5
- package/lib/components/display/DatalayerBox.js +0 -5
- package/lib/components/display/JupyterDialog.js +0 -5
- package/lib/components/display/NavLink.js +0 -5
- package/lib/components/display/NotebookSkeleton.js +0 -5
- package/lib/components/display/Placeholder.js +0 -5
- package/lib/components/display/ToTopBranded.js +0 -5
- package/lib/components/display/VisuallyHidden.js +0 -5
- package/lib/components/display/index.js +0 -5
- package/lib/components/echarts/EChartsReact.js +6 -6
- package/lib/components/echarts/index.js +0 -5
- package/lib/components/flashes/FlashClosable.js +0 -5
- package/lib/components/flashes/FlashDisclaimer.js +0 -5
- package/lib/components/flashes/FlashGuest.js +0 -5
- package/lib/components/flashes/FlashSurveys.js +0 -5
- package/lib/components/flashes/FlashUnauthorized.js +0 -5
- package/lib/components/flashes/index.js +0 -5
- package/lib/components/flashes/surveys/Survey2025_1.js +0 -5
- package/lib/components/flashes/surveys/index.js +0 -5
- package/lib/components/iam/ExternalTokenSilentLogin.js +0 -5
- package/lib/components/iam/index.js +0 -5
- package/lib/components/icons/ArtifactIcon.js +0 -5
- package/lib/components/icons/index.js +0 -5
- package/lib/components/index.js +1 -6
- package/lib/components/labels/VisibilityLabel.js +0 -5
- package/lib/components/labels/index.js +0 -5
- package/lib/components/landings/StepBlock.js +0 -5
- package/lib/components/landings/index.js +0 -5
- package/lib/components/navbar/NavigationVisbilityObserver.js +0 -5
- package/lib/components/navbar/SubdomainNavBar.js +2 -7
- package/lib/components/navbar/SubdomainNavBar.module.css +718 -0
- package/lib/components/navbar/index.js +0 -5
- package/lib/components/nbgrader/NbGradesDetails.js +0 -5
- package/lib/components/nbgrader/index.js +0 -5
- package/lib/components/notebooks/JupyterNotebook.js +0 -5
- package/lib/components/notebooks/JupyterNotebookToolbar.js +0 -5
- package/lib/components/notebooks/index.js +0 -5
- package/lib/components/primer/Portals.js +0 -5
- package/lib/components/primer/Styles.js +0 -5
- package/lib/components/primer/index.js +0 -5
- package/lib/components/progress/ConsumptionBar.js +0 -5
- package/lib/components/progress/CreditsIndicator.js +0 -6
- package/lib/components/progress/ProgressBar.js +0 -5
- package/lib/components/progress/Timer.js +0 -5
- package/lib/components/progress/index.js +0 -5
- package/lib/components/runtimes/RuntimeCellVariables.js +0 -5
- package/lib/components/runtimes/RuntimeCellVariablesDialog.js +4 -9
- package/lib/components/runtimes/RuntimeLauncherDialog.d.ts +1 -2
- package/lib/components/runtimes/RuntimeLauncherDialog.js +2 -6
- package/lib/components/runtimes/RuntimePickerBase.d.ts +1 -1
- package/lib/components/runtimes/RuntimePickerBase.js +0 -5
- package/lib/components/runtimes/RuntimePickerCell.js +0 -5
- package/lib/components/runtimes/RuntimePickerNotebook.d.ts +1 -2
- package/lib/components/runtimes/RuntimePickerNotebook.js +1 -6
- package/lib/components/runtimes/RuntimeReservationControl.js +0 -5
- package/lib/components/runtimes/RuntimeSimplePicker.d.ts +1 -1
- package/lib/components/runtimes/RuntimeSimplePicker.js +36 -41
- package/lib/components/runtimes/RuntimeUtils.d.ts +1 -1
- package/lib/components/runtimes/RuntimeUtils.js +0 -5
- package/lib/components/runtimes/RuntimeVariables.js +0 -5
- package/lib/components/runtimes/index.js +0 -5
- package/lib/components/screenshot/ScreenCapture.js +1 -6
- package/lib/components/screenshot/index.js +0 -5
- package/lib/components/snapshots/RuntimeSnapshotMenu.js +0 -5
- package/lib/components/snapshots/index.js +0 -5
- package/lib/components/snippets/SnippetDialog.js +0 -5
- package/lib/components/snippets/index.js +0 -5
- package/lib/components/storage/ContentsBrowser.js +12 -7
- package/lib/components/storage/ContentsItems.js +0 -5
- package/lib/components/storage/index.js +0 -5
- package/lib/components/students/StudentItemStatus.js +6 -8
- package/lib/components/students/index.js +0 -5
- package/lib/components/subnav/SubNav.d.ts +2 -2
- package/lib/components/subnav/SubNav.js +4 -9
- package/lib/components/subnav/SubNav.module.css +683 -0
- package/lib/components/subnav/index.js +0 -5
- package/lib/components/tables/DataTable.js +0 -5
- package/lib/components/tables/index.js +0 -5
- package/lib/components/text-reveal/TextRevealAnimation.js +0 -6
- package/lib/components/text-reveal/TextRevealAnimation.module.css +43 -0
- package/lib/components/text-reveal/index.js +0 -5
- package/lib/components/text-reveal/useTextRevealAnimationLines.js +0 -5
- package/lib/components/tokens/SpaceVariantToken.js +0 -5
- package/lib/components/tokens/index.js +0 -5
- package/lib/components/toolbars/AssignmentEditorToolbar.js +0 -5
- package/lib/components/toolbars/DocumentEditorToolbar.js +0 -5
- package/lib/components/toolbars/NotebookEditorToolbar.d.ts +1 -1
- package/lib/components/toolbars/NotebookEditorToolbar.js +0 -5
- package/lib/components/toolbars/index.js +0 -5
- package/lib/components/users/PeerIndicator.js +0 -5
- package/lib/components/users/index.js +0 -5
- package/lib/config/Configuration.js +0 -5
- package/lib/config/index.js +0 -5
- package/lib/config/integrations/Loom.js +0 -5
- package/lib/config/integrations/index.js +0 -5
- package/lib/examples/CellExample.d.ts +6 -0
- package/lib/examples/CellExample.js +24 -0
- package/lib/examples/NotebookExample.d.ts +8 -0
- package/lib/examples/NotebookExample.js +22 -0
- package/lib/examples/NotebookExample1.ipynb.json +136 -0
- package/lib/hooks/assets/OutputshotPlaceholders.js +0 -5
- package/lib/hooks/assets/index.js +0 -5
- package/lib/hooks/index.d.ts +1 -1
- package/lib/hooks/index.js +1 -6
- package/lib/hooks/layouts/LayoutBackdrop.js +0 -5
- package/lib/hooks/layouts/LayoutScreenshot.css +58 -0
- package/lib/hooks/layouts/LayoutScreenshot.d.ts +1 -0
- package/lib/hooks/layouts/LayoutScreenshot.js +1 -5
- package/lib/hooks/layouts/index.js +0 -5
- package/lib/hooks/useAIAgents.js +7 -12
- package/lib/hooks/useAuthorization.js +0 -6
- package/lib/hooks/useBackdrop.js +0 -5
- package/lib/hooks/useBackdropJupyterLab.js +0 -5
- package/lib/hooks/useCache.d.ts +2 -2
- package/lib/hooks/useCache.js +178 -183
- package/lib/hooks/useCellOutputshot.js +0 -5
- package/lib/hooks/useContainsFocus.js +0 -5
- package/lib/hooks/useDatalayer.d.ts +21 -0
- package/lib/hooks/{useRun.js → useDatalayer.js} +12 -16
- package/lib/hooks/useError.js +0 -5
- package/lib/hooks/useExternalScript.js +0 -5
- package/lib/hooks/useFocusTrap.d.ts +1 -1
- package/lib/hooks/useFocusTrap.js +1 -6
- package/lib/hooks/useIAM.js +2 -7
- package/lib/hooks/useId.js +3 -8
- package/lib/hooks/useIsomorphicLayoutEffect.js +0 -5
- package/lib/hooks/useJupyterLabTheme.js +0 -5
- package/lib/hooks/useKeyboardEscape.js +0 -5
- package/lib/hooks/useLocationHandles.js +0 -5
- package/lib/hooks/useNavigate.js +0 -5
- package/lib/hooks/useNotebookAIAgent.js +0 -5
- package/lib/hooks/useOnClickOutside.js +0 -5
- package/lib/hooks/useRef.js +0 -5
- package/lib/hooks/useRuntimes.js +0 -5
- package/lib/hooks/useScreenshot.js +0 -5
- package/lib/hooks/useToast.js +6 -8
- package/lib/hooks/useUpload.js +0 -5
- package/lib/hooks/useVisibilityObserver.js +0 -5
- package/lib/hooks/useWindowSize.js +0 -6
- package/lib/i18n/Labels.js +0 -5
- package/lib/i18n/index.js +0 -5
- package/lib/index.css +73 -0
- package/lib/main.js +1 -2
- package/lib/mocks/components/FlashMock.js +0 -5
- package/lib/mocks/components/index.js +0 -5
- package/lib/mocks/hooks/index.d.ts +1 -1
- package/lib/mocks/hooks/index.js +1 -6
- package/lib/mocks/hooks/rests/index.js +0 -5
- package/lib/mocks/hooks/rests/rests.js +0 -5
- package/lib/mocks/hooks/useDatalayerMock.d.ts +6 -0
- package/lib/mocks/hooks/{useRunMock.js → useDatalayerMock.js} +2 -7
- package/lib/mocks/index.js +0 -5
- package/lib/mocks/jupyter/index.js +1 -6
- package/lib/mocks/models/CodeBlockMock.js +0 -5
- package/lib/mocks/models/CodelineMock.js +0 -5
- package/lib/mocks/models/CourseMock.js +0 -5
- package/lib/mocks/models/InviteMock.js +0 -5
- package/lib/mocks/models/SpaceMock.js +0 -5
- package/lib/mocks/models/UserMock.js +0 -5
- package/lib/mocks/models/index.js +0 -5
- package/lib/mocks/views/ActionMenuMock.js +0 -5
- package/lib/mocks/views/ChartMock.js +0 -5
- package/lib/mocks/views/ChartMockOptions.js +0 -5
- package/lib/mocks/views/DashboardMock.js +0 -5
- package/lib/mocks/views/FormMock.js +0 -5
- package/lib/mocks/views/TableMock.js +0 -5
- package/lib/mocks/views/WipMock.js +0 -5
- package/lib/mocks/views/index.js +0 -5
- package/lib/models/Contact.js +0 -5
- package/lib/models/ContactEvent.js +0 -5
- package/lib/models/Credits.js +0 -5
- package/lib/models/Dataset.d.ts +1 -1
- package/lib/models/Datasource.js +0 -5
- package/lib/models/Errors.js +0 -5
- package/lib/models/GrowthKPI.js +0 -5
- package/lib/models/IAMProviderUsers.js +0 -5
- package/lib/models/IAMToken.js +0 -5
- package/lib/models/Inbound.js +0 -5
- package/lib/models/LandingRoles.js +0 -5
- package/lib/models/Organization.js +0 -5
- package/lib/models/Outbound.js +7 -12
- package/lib/models/PageTag.d.ts +1 -1
- package/lib/models/RolesOrganization.js +0 -5
- package/lib/models/RolesPlatform.js +0 -5
- package/lib/models/RolesTeam.js +0 -5
- package/lib/models/Runtime.d.ts +59 -1
- package/lib/models/Runtime.js +7 -5
- package/lib/models/Secret.js +0 -5
- package/lib/models/Survey.js +0 -5
- package/lib/models/Team.js +0 -5
- package/lib/models/URN.js +0 -5
- package/lib/models/User.js +2 -7
- package/lib/models/UserEvent.js +0 -5
- package/lib/models/UserOnboarding.js +0 -5
- package/lib/models/UserSettings.js +0 -5
- package/lib/models/index.js +0 -5
- package/lib/routes/Routes.js +0 -5
- package/lib/routes/index.js +0 -5
- package/lib/state/State.js +0 -5
- package/lib/state/index.js +0 -5
- package/lib/state/storage/IAMStorage.js +0 -5
- package/lib/state/storage/index.js +0 -5
- package/lib/state/substates/AIAgentState.js +0 -5
- package/lib/state/substates/CellState.js +0 -5
- package/lib/state/substates/CoreState.js +0 -5
- package/lib/state/substates/DatasourceState.js +0 -5
- package/lib/state/substates/DocumentState.js +0 -5
- package/lib/state/substates/GradeState.js +0 -5
- package/lib/state/substates/IAMState.d.ts +1 -1
- package/lib/state/substates/IAMState.js +15 -18
- package/lib/state/substates/JupyterLabState.js +0 -5
- package/lib/state/substates/NbformatState.js +0 -5
- package/lib/state/substates/OrganizationState.js +0 -5
- package/lib/state/substates/RuntimesState.d.ts +2 -2
- package/lib/state/substates/RuntimesState.js +0 -5
- package/lib/state/substates/SpaceState.js +0 -5
- package/lib/state/substates/SurveysState.js +3 -8
- package/lib/state/substates/TeamState.js +0 -5
- package/lib/state/substates/index.js +0 -5
- package/lib/stories/assets/accessibility.png +0 -0
- package/lib/stories/assets/accessibility.svg +1 -0
- package/lib/stories/assets/addon-library.png +0 -0
- package/lib/stories/assets/assets.png +0 -0
- package/lib/stories/assets/context.png +0 -0
- package/lib/stories/assets/discord.svg +1 -0
- package/lib/stories/assets/docs.png +0 -0
- package/lib/stories/assets/figma-plugin.png +0 -0
- package/lib/stories/assets/github.svg +1 -0
- package/lib/stories/assets/share.png +0 -0
- package/lib/stories/assets/styling.png +0 -0
- package/lib/stories/assets/testing.png +0 -0
- package/lib/stories/assets/theming.png +0 -0
- package/lib/stories/assets/tutorials.svg +1 -0
- package/lib/stories/assets/youtube.svg +1 -0
- package/lib/stories/button.css +35 -0
- package/lib/stories/header.css +37 -0
- package/lib/stories/page.css +73 -0
- package/lib/test-setup.js +51 -1
- package/lib/theme/DatalayerTheme.js +0 -5
- package/lib/theme/DatalayerThemeProvider.js +0 -5
- package/lib/theme/Palette.js +0 -5
- package/lib/theme/index.js +0 -5
- package/lib/utils/Array.js +0 -5
- package/lib/utils/Avatar.js +0 -5
- package/lib/utils/Browser.js +0 -5
- package/lib/utils/Cookie.js +0 -5
- package/lib/utils/Date.js +3 -8
- package/lib/utils/Download.js +0 -5
- package/lib/utils/DownloadFile.js +0 -5
- package/lib/utils/Env.js +0 -5
- package/lib/utils/File.js +0 -5
- package/lib/utils/Ids.js +0 -5
- package/lib/utils/Jupyter.js +0 -5
- package/lib/utils/Lazy.js +0 -6
- package/lib/utils/Name.js +0 -5
- package/lib/utils/Number.js +1 -6
- package/lib/utils/Plots.d.ts +1 -1
- package/lib/utils/Plots.js +1 -1
- package/lib/utils/Random.js +0 -5
- package/lib/utils/Screenshot.js +0 -5
- package/lib/utils/Scroll.js +3 -7
- package/lib/utils/Sleep.js +0 -5
- package/lib/utils/Snapshot.js +0 -5
- package/lib/utils/String.js +0 -5
- package/lib/utils/Uri.js +1 -6
- package/lib/utils/Validator.js +0 -5
- package/lib/utils/WithSuspense.js +0 -5
- package/lib/utils/index.js +0 -5
- package/package.json +58 -28
- package/style/animation/Animation.module.css +174 -0
- package/style/base.css +64 -0
- package/style/index.css +6 -0
- package/lib/api/runtimes/models.d.ts +0 -59
- package/lib/api/runtimes/models.js +0 -11
- package/lib/hooks/useRun.d.ts +0 -21
- package/lib/mocks/hooks/useRunMock.d.ts +0 -6
- /package/lib/api/{runtimes → jupyter}/exec/Python.d.ts +0 -0
- /package/lib/api/{runtimes → jupyter}/exec/Snippets.d.ts +0 -0
- /package/lib/api/{runtimes → jupyter}/exec/index.d.ts +0 -0
package/README.md
CHANGED
|
@@ -37,6 +37,7 @@ This package serves as the base foundation used by many other Datalayer packages
|
|
|
37
37
|
- **📸 Snapshot Management**: Create and manage compute snapshots of your runtimes for reproducible environments
|
|
38
38
|
- **🔒 Secrets Management**: Securely handle sensitive data and credentials in your workflows
|
|
39
39
|
- **🐍 Python SDK**: Programmatic access to Datalayer platform with context managers and clean resource management
|
|
40
|
+
- **🌐 TypeScript SDK**: Programmatic access to Datalayer platform with context managers and clean resource management
|
|
40
41
|
- **💻 Command Line Interface**: CLI tools for managing runtimes, snapshots, and platform resources
|
|
41
42
|
- **🔧 Base Classes**: Core application classes and configuration inherited by other Datalayer projects
|
|
42
43
|
|
|
@@ -56,7 +57,7 @@ cd core
|
|
|
56
57
|
pip install -e .[test]
|
|
57
58
|
```
|
|
58
59
|
|
|
59
|
-
## Quick Start
|
|
60
|
+
## Quick Start with Python
|
|
60
61
|
|
|
61
62
|
### 1. Authentication
|
|
62
63
|
|
|
@@ -114,6 +115,16 @@ datalayer runtime exec my-script.py --runtime <runtime-id>
|
|
|
114
115
|
datalayer snapshots create <pod-name> my-snapshot 'AI work!' False
|
|
115
116
|
```
|
|
116
117
|
|
|
118
|
+
## Examples
|
|
119
|
+
|
|
120
|
+
For comprehensive usage examples, see the [`examples/`](https://github.com/datalayer/core/tree/main/examples) directory which includes:
|
|
121
|
+
|
|
122
|
+
- **FastAPI + scikit-learn**: Web application with ML models
|
|
123
|
+
- **Streamlit + scikit-learn**: Interactive data science apps
|
|
124
|
+
- **PyTorch GPU workloads**: High-performance computing examples
|
|
125
|
+
- **Decorator patterns**: Remote function execution with `@datalayer`
|
|
126
|
+
- **And more**: Complete examples with documentation and setup instructions
|
|
127
|
+
|
|
117
128
|
## Platform Integration
|
|
118
129
|
|
|
119
130
|
Datalayer adds AI capabilities and scalable compute runtimes to your development workflows. The platform is designed to seamlessly integrate into your existing processes and supercharge your computations with the processing power you need.
|
package/lib/App.css
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#root {
|
|
7
|
+
max-width: 1280px;
|
|
8
|
+
margin: 0 auto;
|
|
9
|
+
padding: 2rem;
|
|
10
|
+
/* text-align: center; */
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.logo {
|
|
14
|
+
height: 6em;
|
|
15
|
+
padding: 1.5em;
|
|
16
|
+
will-change: filter;
|
|
17
|
+
transition: filter 300ms;
|
|
18
|
+
}
|
|
19
|
+
.logo:hover {
|
|
20
|
+
filter: drop-shadow(0 0 2em #646cffaa);
|
|
21
|
+
}
|
|
22
|
+
.logo.react:hover {
|
|
23
|
+
filter: drop-shadow(0 0 2em #61dafbaa);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@keyframes logo-spin {
|
|
27
|
+
from {
|
|
28
|
+
transform: rotate(0deg);
|
|
29
|
+
}
|
|
30
|
+
to {
|
|
31
|
+
transform: rotate(360deg);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
36
|
+
a:nth-of-type(2) .logo {
|
|
37
|
+
animation: logo-spin infinite 20s linear;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.card {
|
|
42
|
+
padding: 2em;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.read-the-docs {
|
|
46
|
+
color: #888;
|
|
47
|
+
}
|
package/lib/App.d.ts
CHANGED
package/lib/App.js
CHANGED
|
@@ -3,12 +3,24 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
3
3
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
4
4
|
* Distributed under the terms of the Modified BSD License.
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
/*
|
|
7
|
+
* Copyright (c) 2021-2023 Datalayer, Inc.
|
|
8
|
+
*
|
|
9
|
+
* MIT License
|
|
10
|
+
*/
|
|
11
|
+
import { useState } from "react";
|
|
12
|
+
import reactLogo from "./assets/react.svg";
|
|
13
|
+
import { useJupyter, JupyterReactTheme } from '@datalayer/jupyter-react';
|
|
14
|
+
import { CellExample } from "./examples/CellExample";
|
|
15
|
+
import { NotebookExample } from "./examples/NotebookExample";
|
|
16
|
+
import "./App.css";
|
|
10
17
|
export function App() {
|
|
18
|
+
const { defaultKernel, serviceManager } = useJupyter({
|
|
19
|
+
jupyterServerUrl: "https://oss.datalayer.run/api/jupyter-server",
|
|
20
|
+
jupyterServerToken: "60c1661cc408f978c309d04157af55c9588ff9557c9380e4fb50785750703da6",
|
|
21
|
+
startDefaultKernel: true,
|
|
22
|
+
});
|
|
11
23
|
const [count, setCount] = useState(0);
|
|
12
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { children: [_jsx("a", { href: "https://
|
|
24
|
+
return (_jsxs("div", { className: "App", children: [_jsx(_Fragment, { children: _jsxs(JupyterReactTheme, { children: [defaultKernel && _jsx(CellExample, { kernel: defaultKernel }), defaultKernel && serviceManager && _jsx(NotebookExample, { kernel: defaultKernel, serviceManager: serviceManager })] }) }), _jsxs("div", { children: [_jsx("a", { href: "https://reactjs.org", target: "_blank", children: _jsx("img", { src: reactLogo, className: "logo react", alt: "React logo" }) }), _jsx("a", { href: "https://vitejs.dev", target: "_blank", children: _jsx("img", { src: "/vite.svg", className: "logo", alt: "Vite logo" }) })] }), _jsx("h1", { children: "React + Vite" }), _jsx("h2", { children: "On CodeSandbox!" }), _jsxs("div", { className: "card", children: [_jsxs("button", { onClick: () => setCount((count) => count + 1), children: ["count is ", count] }), _jsxs("p", { children: ["Edit ", _jsx("code", { children: "src/App.tsx" }), " and save to test HMR."] }), _jsx("p", { children: "Tip: you can use the inspector button next to address bar to click on components in the preview and open the code in the editor!" })] }), _jsx("p", { className: "read-the-docs", children: "Click on the Vite and React logos to learn more" })] }));
|
|
13
25
|
}
|
|
14
26
|
export default App;
|
|
@@ -11,7 +11,8 @@ describe('@datalayer/core - index', () => {
|
|
|
11
11
|
});
|
|
12
12
|
it('should export BackdropContext from hooks', () => {
|
|
13
13
|
expect(coreIndex.BackdropContext).toBeDefined();
|
|
14
|
-
expect(coreIndex.BackdropContext).
|
|
14
|
+
expect(coreIndex.BackdropContext).toHaveProperty('$$typeof');
|
|
15
|
+
expect(typeof coreIndex.BackdropContext).toBe('object');
|
|
15
16
|
});
|
|
16
17
|
it('should export utils functions', () => {
|
|
17
18
|
expect(coreIndex.convertToLargestUnit).toBeDefined();
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare class RunResponseError extends Error {
|
|
5
5
|
/**
|
|
6
|
-
* Create a RunResponseError from a response,
|
|
7
|
-
* as appropriate.
|
|
6
|
+
* Create a RunResponseError from a response,
|
|
7
|
+
* handling the traceback and message as appropriate.
|
|
8
8
|
*
|
|
9
9
|
* @param response The response object.
|
|
10
10
|
*
|
|
@@ -46,7 +46,7 @@ export declare class NetworkError extends TypeError {
|
|
|
46
46
|
*/
|
|
47
47
|
constructor(original: TypeError);
|
|
48
48
|
}
|
|
49
|
-
export interface
|
|
49
|
+
export interface IRequestDatalayerAPIOptions {
|
|
50
50
|
/**
|
|
51
51
|
* URL to request
|
|
52
52
|
*/
|
|
@@ -72,4 +72,4 @@ export interface IRequestRunAPIOptions {
|
|
|
72
72
|
*/
|
|
73
73
|
signal?: AbortSignal;
|
|
74
74
|
}
|
|
75
|
-
export declare function
|
|
75
|
+
export declare function requestDatalayerAPI<T = any>({ url, method, body, token, signal, headers }: IRequestDatalayerAPIOptions): Promise<T>;
|
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
/*
|
|
6
|
-
* Copyright (c) 2021-2024 Datalayer, Inc.
|
|
7
|
-
*
|
|
8
|
-
* Datalayer License
|
|
9
|
-
*/
|
|
10
5
|
import { URLExt } from '@jupyterlab/coreutils';
|
|
11
6
|
import { sleep } from '../utils';
|
|
12
7
|
/**
|
|
@@ -14,8 +9,8 @@ import { sleep } from '../utils';
|
|
|
14
9
|
*/
|
|
15
10
|
export class RunResponseError extends Error {
|
|
16
11
|
/**
|
|
17
|
-
* Create a RunResponseError from a response,
|
|
18
|
-
* as appropriate.
|
|
12
|
+
* Create a RunResponseError from a response,
|
|
13
|
+
* handling the traceback and message as appropriate.
|
|
19
14
|
*
|
|
20
15
|
* @param response The response object.
|
|
21
16
|
*
|
|
@@ -85,7 +80,7 @@ export class NetworkError extends TypeError {
|
|
|
85
80
|
this.stack = original.stack;
|
|
86
81
|
}
|
|
87
82
|
}
|
|
88
|
-
export async function
|
|
83
|
+
export async function requestDatalayerAPI({ url, method, body, token, signal, headers = {} }) {
|
|
89
84
|
const headers_ = new Headers(headers);
|
|
90
85
|
if (!headers_.has('Accept')) {
|
|
91
86
|
headers_.set('Accept', 'application/json');
|
|
@@ -103,7 +98,7 @@ export async function requestRunAPI({ url, method, body, token, signal, headers
|
|
|
103
98
|
method: method ?? 'GET',
|
|
104
99
|
headers: headers_,
|
|
105
100
|
body: body ? JSON.stringify(body) : undefined,
|
|
106
|
-
//
|
|
101
|
+
// credentials: token ? 'include' : 'omit',
|
|
107
102
|
credentials: 'include',
|
|
108
103
|
mode: 'cors',
|
|
109
104
|
cache: 'no-store',
|
package/lib/api/index.d.ts
CHANGED
package/lib/api/index.js
CHANGED
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
|
-
* Copyright (c) 2021-2024 Datalayer, Inc.
|
|
7
|
-
*
|
|
8
|
-
* Datalayer License
|
|
9
|
-
*/
|
|
5
|
+
export * from "./jupyter";
|
|
10
6
|
export * from "./runtimes";
|
|
11
|
-
export * from "./
|
|
7
|
+
export * from "./DatalayerApi";
|
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
/*
|
|
6
|
-
* Copyright (c) 2021-2024 Datalayer, Inc.
|
|
7
|
-
*
|
|
8
|
-
* Datalayer License
|
|
9
|
-
*/
|
|
10
5
|
export function listVariables() {
|
|
11
6
|
return `
|
|
12
7
|
def _list_variables():
|
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
/*
|
|
6
|
-
* Copyright (c) 2021-2024 Datalayer, Inc.
|
|
7
|
-
*
|
|
8
|
-
* Datalayer License
|
|
9
|
-
*/
|
|
10
5
|
import * as Python from './Python';
|
|
11
6
|
/**
|
|
12
7
|
* Facade to interact with kernels by requesting code execution.
|
|
@@ -2,15 +2,10 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
/*
|
|
6
|
-
* Copyright (c) 2021-2024 Datalayer, Inc.
|
|
7
|
-
*
|
|
8
|
-
* Datalayer License
|
|
9
|
-
*/
|
|
10
5
|
import { URLExt } from '@jupyterlab/coreutils';
|
|
11
6
|
import { ServerConnection } from '@jupyterlab/services';
|
|
12
7
|
/**
|
|
13
|
-
* Call the
|
|
8
|
+
* Call the jupyter_kernels extension
|
|
14
9
|
*
|
|
15
10
|
* @param endPoint API REST end point for the extension
|
|
16
11
|
* @param init Initial values for the request
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { IRuntimeOptions } from '..';
|
|
2
|
+
import type { IRuntimeSnapshot, IDatalayerEnvironment, IRuntimePod } from '../../models';
|
|
3
|
+
/**
|
|
4
|
+
* Get available Environments.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getEnvironments(): Promise<IDatalayerEnvironment[]>;
|
|
7
|
+
/**
|
|
8
|
+
* Create a Runtime.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createRuntime(options: IRuntimeOptions): Promise<IRuntimePod>;
|
|
11
|
+
/**
|
|
12
|
+
* Get the Runtimes.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getRuntimes(): Promise<IRuntimePod[]>;
|
|
15
|
+
/**
|
|
16
|
+
* Delete a Runtime
|
|
17
|
+
*/
|
|
18
|
+
export declare function deleteRuntime(options: {
|
|
19
|
+
/**
|
|
20
|
+
* Runtime ID
|
|
21
|
+
*/
|
|
22
|
+
id: string;
|
|
23
|
+
/**
|
|
24
|
+
* Deletion reason
|
|
25
|
+
*/
|
|
26
|
+
reason?: string;
|
|
27
|
+
}): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Snapshot a Runtime.
|
|
30
|
+
*/
|
|
31
|
+
export declare function snapshotRuntime(options: {
|
|
32
|
+
/**
|
|
33
|
+
* Runtime ID.
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
/**
|
|
37
|
+
* Snapshot name.
|
|
38
|
+
*/
|
|
39
|
+
name?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Snapshot description.
|
|
42
|
+
*/
|
|
43
|
+
description?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Whether to stop the kernel after the snapshot completion or not.
|
|
46
|
+
*/
|
|
47
|
+
stop?: boolean;
|
|
48
|
+
}): Promise<IRuntimeSnapshot>;
|
|
49
|
+
/**
|
|
50
|
+
* Get Runtime Snapshots.
|
|
51
|
+
*/
|
|
52
|
+
export declare function getRuntimeSnapshots(): Promise<IRuntimeSnapshot[]>;
|
|
53
|
+
/**
|
|
54
|
+
* Load a Runtime Snapshot within a kernel.
|
|
55
|
+
*/
|
|
56
|
+
export declare function loadRuntimeSnapshot(options: {
|
|
57
|
+
/**
|
|
58
|
+
* Runtime ID
|
|
59
|
+
*/
|
|
60
|
+
id: string;
|
|
61
|
+
/**
|
|
62
|
+
* Snapshot UID
|
|
63
|
+
*/
|
|
64
|
+
from: string;
|
|
65
|
+
}): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Returns the Runtime Snapshot download URL.
|
|
68
|
+
*
|
|
69
|
+
* @param id Snapshot UID to download
|
|
70
|
+
* @returns The download URL
|
|
71
|
+
*/
|
|
72
|
+
export declare function createRuntimeSnapshotDownloadURL(id: string): string;
|
|
73
|
+
/**
|
|
74
|
+
* Export a Runtime Snapshot.
|
|
75
|
+
*
|
|
76
|
+
* @param id Runtime snapshot UID to download
|
|
77
|
+
*/
|
|
78
|
+
export declare function exportRuntimeSnapshot(id: string): void;
|
|
79
|
+
/**
|
|
80
|
+
* Delete a Runtime Snapshot.
|
|
81
|
+
*/
|
|
82
|
+
export declare function deleteRuntimeSnapshot(id: string): Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Update Runtime Snapshot metadata.
|
|
85
|
+
*/
|
|
86
|
+
export declare function updateRuntimeSnapshot(id: string, metadata: {
|
|
87
|
+
name?: string;
|
|
88
|
+
description?: string;
|
|
89
|
+
}): Promise<void>;
|
|
90
|
+
/**
|
|
91
|
+
* Upload a Runtime Snapshot.
|
|
92
|
+
*
|
|
93
|
+
* Note: The promise will be rejected if the runtime state is empty.
|
|
94
|
+
*/
|
|
95
|
+
export declare function uploadRuntimeSnapshot(options: {
|
|
96
|
+
file: File | Blob;
|
|
97
|
+
metadata: {
|
|
98
|
+
filename: string;
|
|
99
|
+
[key: string]: string;
|
|
100
|
+
};
|
|
101
|
+
onProgress?: (bytesUploaded: number, bytesTotal: number) => void;
|
|
102
|
+
}): Promise<void>;
|
|
@@ -2,26 +2,21 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
/*
|
|
6
|
-
* Copyright (c) 2021-2024 Datalayer, Inc.
|
|
7
|
-
*
|
|
8
|
-
* Datalayer License
|
|
9
|
-
*/
|
|
10
5
|
/**
|
|
11
|
-
*
|
|
6
|
+
* Runtimes APIs.
|
|
12
7
|
*/
|
|
13
8
|
import { URLExt } from '@jupyterlab/coreutils';
|
|
14
9
|
import { PromiseDelegate } from '@lumino/coreutils';
|
|
15
10
|
import { Upload } from 'tus-js-client';
|
|
16
|
-
import {
|
|
11
|
+
import { requestDatalayerAPI } from '..';
|
|
17
12
|
import { asRuntimeSnapshot } from '../../models';
|
|
18
13
|
import { iamStore, runtimesStore } from '../../state';
|
|
19
14
|
import { sleep } from '../../utils';
|
|
20
15
|
/**
|
|
21
|
-
* Get available
|
|
16
|
+
* Get available Environments.
|
|
22
17
|
*/
|
|
23
18
|
export async function getEnvironments() {
|
|
24
|
-
const data = await
|
|
19
|
+
const data = await requestDatalayerAPI({
|
|
25
20
|
url: URLExt.join(runtimesStore.getState().runtimesRunUrl, 'api/runtimes/v1/environments'),
|
|
26
21
|
token: iamStore.getState().token
|
|
27
22
|
});
|
|
@@ -32,7 +27,7 @@ export async function getEnvironments() {
|
|
|
32
27
|
return data.environments ?? [];
|
|
33
28
|
}
|
|
34
29
|
/**
|
|
35
|
-
* Create a
|
|
30
|
+
* Create a Runtime.
|
|
36
31
|
*/
|
|
37
32
|
export async function createRuntime(options) {
|
|
38
33
|
const { externalToken, token } = iamStore.getState();
|
|
@@ -48,7 +43,7 @@ export async function createRuntime(options) {
|
|
|
48
43
|
if (options.snapshot) {
|
|
49
44
|
body['from'] = options.snapshot;
|
|
50
45
|
}
|
|
51
|
-
const data = await
|
|
46
|
+
const data = await requestDatalayerAPI({
|
|
52
47
|
url: URLExt.join(runtimesStore.getState().runtimesRunUrl, `api/runtimes/v1/runtimes`),
|
|
53
48
|
method: 'POST',
|
|
54
49
|
body,
|
|
@@ -68,10 +63,10 @@ export async function createRuntime(options) {
|
|
|
68
63
|
return data.runtime;
|
|
69
64
|
}
|
|
70
65
|
/**
|
|
71
|
-
*
|
|
66
|
+
* Get the Runtimes.
|
|
72
67
|
*/
|
|
73
68
|
export async function getRuntimes() {
|
|
74
|
-
const data = await
|
|
69
|
+
const data = await requestDatalayerAPI({
|
|
75
70
|
url: URLExt.join(runtimesStore.getState().runtimesRunUrl, 'api/runtimes/v1/runtimes'),
|
|
76
71
|
token: iamStore.getState().token
|
|
77
72
|
});
|
|
@@ -83,11 +78,11 @@ export async function getRuntimes() {
|
|
|
83
78
|
return data.runtimes ?? [];
|
|
84
79
|
}
|
|
85
80
|
/**
|
|
86
|
-
*
|
|
81
|
+
* Delete a Runtime
|
|
87
82
|
*/
|
|
88
83
|
export async function deleteRuntime(options) {
|
|
89
84
|
const externalToken = iamStore.getState().externalToken;
|
|
90
|
-
await
|
|
85
|
+
await requestDatalayerAPI({
|
|
91
86
|
url: URLExt.join(runtimesStore.getState().runtimesRunUrl, `api/runtimes/v1/runtimes/${options.id}`) +
|
|
92
87
|
URLExt.objectToQueryString(options.reason ? { reason: options.reason } : {}),
|
|
93
88
|
method: 'DELETE',
|
|
@@ -102,10 +97,10 @@ export async function deleteRuntime(options) {
|
|
|
102
97
|
});
|
|
103
98
|
}
|
|
104
99
|
/**
|
|
105
|
-
* Snapshot a
|
|
100
|
+
* Snapshot a Runtime.
|
|
106
101
|
*/
|
|
107
102
|
export async function snapshotRuntime(options) {
|
|
108
|
-
const data = await
|
|
103
|
+
const data = await requestDatalayerAPI({
|
|
109
104
|
url: URLExt.join(runtimesStore.getState().runtimesRunUrl, 'api/runtimes/v1/runtime-snapshots'),
|
|
110
105
|
method: 'POST',
|
|
111
106
|
body: {
|
|
@@ -122,10 +117,10 @@ export async function snapshotRuntime(options) {
|
|
|
122
117
|
return asRuntimeSnapshot(data.snapshot);
|
|
123
118
|
}
|
|
124
119
|
/**
|
|
125
|
-
* Get
|
|
120
|
+
* Get Runtime Snapshots.
|
|
126
121
|
*/
|
|
127
122
|
export async function getRuntimeSnapshots() {
|
|
128
|
-
const data = await
|
|
123
|
+
const data = await requestDatalayerAPI({
|
|
129
124
|
url: URLExt.join(runtimesStore.getState().runtimesRunUrl, 'api/runtimes/v1/runtime-snapshots'),
|
|
130
125
|
token: iamStore.getState().token
|
|
131
126
|
});
|
|
@@ -136,10 +131,10 @@ export async function getRuntimeSnapshots() {
|
|
|
136
131
|
return (data.snapshots ?? []).map(asRuntimeSnapshot);
|
|
137
132
|
}
|
|
138
133
|
/**
|
|
139
|
-
* Load a
|
|
134
|
+
* Load a Runtime Snapshot within a kernel.
|
|
140
135
|
*/
|
|
141
136
|
export async function loadRuntimeSnapshot(options) {
|
|
142
|
-
const data = await
|
|
137
|
+
const data = await requestDatalayerAPI({
|
|
143
138
|
url: URLExt.join(runtimesStore.getState().runtimesRunUrl, 'api/runtimes/v1/runtimes', options.id),
|
|
144
139
|
method: 'PUT',
|
|
145
140
|
body: {
|
|
@@ -152,7 +147,7 @@ export async function loadRuntimeSnapshot(options) {
|
|
|
152
147
|
}
|
|
153
148
|
}
|
|
154
149
|
/**
|
|
155
|
-
* Returns the
|
|
150
|
+
* Returns the Runtime Snapshot download URL.
|
|
156
151
|
*
|
|
157
152
|
* @param id Snapshot UID to download
|
|
158
153
|
* @returns The download URL
|
|
@@ -165,7 +160,7 @@ export function createRuntimeSnapshotDownloadURL(id) {
|
|
|
165
160
|
}));
|
|
166
161
|
}
|
|
167
162
|
/**
|
|
168
|
-
* Export
|
|
163
|
+
* Export a Runtime Snapshot.
|
|
169
164
|
*
|
|
170
165
|
* @param id Runtime snapshot UID to download
|
|
171
166
|
*/
|
|
@@ -179,21 +174,21 @@ export function exportRuntimeSnapshot(id) {
|
|
|
179
174
|
document.body.removeChild(element);
|
|
180
175
|
}
|
|
181
176
|
/**
|
|
182
|
-
* Delete
|
|
177
|
+
* Delete a Runtime Snapshot.
|
|
183
178
|
*/
|
|
184
179
|
export async function deleteRuntimeSnapshot(id) {
|
|
185
|
-
await
|
|
180
|
+
await requestDatalayerAPI({
|
|
186
181
|
url: URLExt.join(runtimesStore.getState().runtimesRunUrl, `api/runtimes/v1/runtime-snapshots/${id}`),
|
|
187
182
|
method: 'DELETE',
|
|
188
183
|
token: iamStore.getState().token
|
|
189
184
|
});
|
|
190
|
-
// Poll
|
|
185
|
+
// Poll Runtime Snapshot state up-to its deletion
|
|
191
186
|
try {
|
|
192
187
|
let sleepTimeout = 1000;
|
|
193
188
|
while (true) {
|
|
194
189
|
await sleep(sleepTimeout);
|
|
195
190
|
sleepTimeout *= 2;
|
|
196
|
-
const response = await
|
|
191
|
+
const response = await requestDatalayerAPI({
|
|
197
192
|
url: URLExt.join(runtimesStore.getState().runtimesRunUrl, `api/runtimes/v1/runtime-snapshots/${id}`),
|
|
198
193
|
token: iamStore.getState().token
|
|
199
194
|
});
|
|
@@ -213,11 +208,11 @@ export async function deleteRuntimeSnapshot(id) {
|
|
|
213
208
|
}
|
|
214
209
|
}
|
|
215
210
|
/**
|
|
216
|
-
* Update
|
|
211
|
+
* Update Runtime Snapshot metadata.
|
|
217
212
|
*/
|
|
218
213
|
export async function updateRuntimeSnapshot(id, metadata) {
|
|
219
214
|
if (metadata.name || metadata.description) {
|
|
220
|
-
await
|
|
215
|
+
await requestDatalayerAPI({
|
|
221
216
|
url: URLExt.join(runtimesStore.getState().runtimesRunUrl, `api/runtimes/v1/runtime-snapshots/${id}`),
|
|
222
217
|
method: 'PATCH',
|
|
223
218
|
body: { ...metadata },
|
|
@@ -226,13 +221,13 @@ export async function updateRuntimeSnapshot(id, metadata) {
|
|
|
226
221
|
}
|
|
227
222
|
}
|
|
228
223
|
/**
|
|
229
|
-
* Upload a
|
|
224
|
+
* Upload a Runtime Snapshot.
|
|
230
225
|
*
|
|
231
226
|
* Note: The promise will be rejected if the runtime state is empty.
|
|
232
227
|
*/
|
|
233
228
|
export async function uploadRuntimeSnapshot(options) {
|
|
234
229
|
if (options.file.size === 0) {
|
|
235
|
-
return Promise.reject('Empty
|
|
230
|
+
return Promise.reject('Empty Runtime Snapshot.');
|
|
236
231
|
}
|
|
237
232
|
const tracker = new PromiseDelegate();
|
|
238
233
|
// Create a new tus upload.
|