@gen3/workspaces 0.12.70 → 0.12.72
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/dist/dts/api/workspaceAssetsApi.d.ts +1 -1
- package/dist/dts/api/workspaceAssetsApi.d.ts.map +1 -1
- package/dist/dts/api/workspaceAssetsApi.js +12 -1
- package/dist/dts/api/workspaceAssetsApi.js.map +1 -1
- package/dist/dts/server/workspaceAssetsHandler.d.ts +43 -2
- package/dist/dts/server/workspaceAssetsHandler.d.ts.map +1 -1
- package/dist/dts/server/workspaceAssetsHandler.js +120 -0
- package/dist/dts/server/workspaceAssetsHandler.js.map +1 -1
- package/dist/jupyterlite-builds/remote-private/requirements.txt +1 -0
- package/dist/server/cjs/server.js +261 -130
- package/dist/server/cjs/server.js.map +1 -1
- package/dist/server/esm/server.js +261 -130
- package/dist/server/esm/server.js.map +1 -1
- package/dist/server.d.ts +43 -2
- package/jupyterlite-builds/remote-private/requirements.txt +1 -0
- package/package.json +4 -4
package/dist/server.d.ts
CHANGED
|
@@ -41,6 +41,19 @@ interface WorkspaceAssetsHandlerOptions {
|
|
|
41
41
|
* `appName` JupyterLite reports internally.
|
|
42
42
|
*/
|
|
43
43
|
pageTitle?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Token extractor injected by the host application — used to add identity
|
|
46
|
+
* headers (`Authorization`, `REMOTE_USER`, `X-Gen3-User-ID`) when proxying
|
|
47
|
+
* server extension API calls to `serverExtensionProxyPath`.
|
|
48
|
+
*
|
|
49
|
+
* The workspace-proxy checks `X-Gen3-User-ID` / `REMOTE_USER` (injected by
|
|
50
|
+
* nginx in normal traffic) but server-side proxy calls bypass nginx, so these
|
|
51
|
+
* headers must be set explicitly.
|
|
52
|
+
*
|
|
53
|
+
* In gen3-vectis: `(req) => getAccessToken(req.headers['cookie'] ?? '') ?? null`
|
|
54
|
+
* When omitted, `extractTokenFallback` is used (Bearer header → access_token cookie).
|
|
55
|
+
*/
|
|
56
|
+
getToken?: (req: NextApiRequest) => string | null;
|
|
44
57
|
/**
|
|
45
58
|
* Origin-relative path used to build the absolute `remoteKernelsBaseUrl`
|
|
46
59
|
* injected into the remote tier (e.g. `/lw-workspace/proxy/jeg-proxy`).
|
|
@@ -51,8 +64,36 @@ interface WorkspaceAssetsHandlerOptions {
|
|
|
51
64
|
remoteKernelsPath?: string;
|
|
52
65
|
/** Override for the remote tier's `fullThemesUrl` (default: `/workspace-api/workspace-assets/remote/build/themes`). */
|
|
53
66
|
fullThemesUrl?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Origin-relative path to proxy server extension API calls for the remote tier
|
|
69
|
+
* (e.g. `/lw-workspace/proxy/jeg-proxy`).
|
|
70
|
+
*
|
|
71
|
+
* JupyterLab extensions such as `jupyterlmod` and `jupyter-server-proxy` make REST
|
|
72
|
+
* calls relative to the JupyterLite base URL. Those requests land on this static-file
|
|
73
|
+
* handler and 404 because no matching file exists. When this option is set, requests
|
|
74
|
+
* whose first path segment matches a known extension API prefix are proxied to
|
|
75
|
+
* `{origin}{serverExtensionProxyPath}/{rest}` instead.
|
|
76
|
+
*
|
|
77
|
+
* Omitted → extension API calls fall through to the static file handler (404).
|
|
78
|
+
*/
|
|
79
|
+
serverExtensionProxyPath?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Full base URL for proxying server extension API calls, overriding the
|
|
82
|
+
* origin resolved from the incoming request.
|
|
83
|
+
*
|
|
84
|
+
* Use this to target an internal Kubernetes service directly and avoid routing
|
|
85
|
+
* through the ingress (which may use a self-signed certificate).
|
|
86
|
+
* Example: `http://workspace-proxy-service.namespace.svc.cluster.local:8000`
|
|
87
|
+
*
|
|
88
|
+
* When set, the proxy target is built as
|
|
89
|
+
* `{serverExtensionProxyBaseUrl}{serverExtensionProxyPath}/{rest}`
|
|
90
|
+
* instead of `{requestOrigin}{serverExtensionProxyPath}/{rest}`.
|
|
91
|
+
*
|
|
92
|
+
* Omitted → origin is resolved from the incoming request headers (default behaviour).
|
|
93
|
+
*/
|
|
94
|
+
serverExtensionProxyBaseUrl?: string;
|
|
54
95
|
}
|
|
55
|
-
declare function createWorkspaceAssetsHandler(options?: WorkspaceAssetsHandlerOptions): (req: NextApiRequest, res: NextApiResponse) => void;
|
|
96
|
+
declare function createWorkspaceAssetsHandler(options?: WorkspaceAssetsHandlerOptions): (req: NextApiRequest, res: NextApiResponse) => Promise<void> | void;
|
|
56
97
|
|
|
57
98
|
/**
|
|
58
99
|
* Next.js config wrapper that adds all workspace-related plumbing.
|
|
@@ -199,7 +240,7 @@ declare function createKernelProxyHandler(config: KernelLifecycleProxyConfig): (
|
|
|
199
240
|
* `next.config.js` (via `@gen3/workspaces/server`) where that I/O is wasted.
|
|
200
241
|
*/
|
|
201
242
|
|
|
202
|
-
declare function handler$3(req: NextApiRequest, res: NextApiResponse): void
|
|
243
|
+
declare function handler$3(req: NextApiRequest, res: NextApiResponse): void | Promise<void>;
|
|
203
244
|
|
|
204
245
|
declare function handler$2(req: NextApiRequest, res: NextApiResponse): Promise<void>;
|
|
205
246
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gen3/workspaces",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.72",
|
|
4
4
|
"description": "Workspaces for Gen3",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"./jupyterlite-builds/*": "./dist/jupyterlite-builds/*"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@gen3/core": "^0.12.
|
|
58
|
-
"@gen3/frontend": "^0.12.
|
|
57
|
+
"@gen3/core": "^0.12.72",
|
|
58
|
+
"@gen3/frontend": "^0.12.72",
|
|
59
59
|
"camelcase-keys": "^10.0.2"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"react-dom": "^19.2.4",
|
|
72
72
|
"tailwindcss": "^3.4.18"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "6b0c382111e86fd5a5e3ae023e77e50a1b4ac183"
|
|
75
75
|
}
|