@deephaven/code-studio 0.37.1 → 0.37.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/build/assets/{AppRoot-30b24991.js → AppRoot-6413e2fa.js} +4 -4
- package/build/assets/{AppRoot-30b24991.js.map → AppRoot-6413e2fa.js.map} +1 -1
- package/build/assets/{index-2a9c25d7.js → index-4a46d4e0.js} +2 -2
- package/build/assets/{index-2a9c25d7.js.map → index-4a46d4e0.js.map} +1 -1
- package/build/assets/{index-05ede71e.js → index-7090b558.js} +2 -2
- package/build/assets/{index-05ede71e.js.map → index-7090b558.js.map} +1 -1
- package/build/assets/{useConnection-dd107347.js → useConnection-cae39c77.js} +2 -2
- package/build/assets/{useConnection-dd107347.js.map → useConnection-cae39c77.js.map} +1 -1
- package/build/index.html +2 -2
- package/package.json +31 -31
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A as l,I as h,C as d,H as C,R as S,aG as $,aH as A,aI as P,aJ as M,aK as L}from"./vendor-ef910ebc.js";import{aY as b,L as p,B as N}from"./index-
|
|
2
|
-
//# sourceMappingURL=useConnection-
|
|
1
|
+
import{A as l,I as h,C as d,H as C,R as S,aG as $,aH as A,aI as P,aJ as M,aK as L}from"./vendor-ef910ebc.js";import{aY as b,L as p,B as N}from"./index-7090b558.js";class j extends Error{isTimeout=!0}const T=j,v=()=>{const e=l.useContext(b);if(e==null)throw new Error("No API available in useApi. Was code wrapped in ApiBootstrap or ApiContext.Provider?");return e},m=p.module("MessageUtils"),z="io.deephaven.message.LoginOptions.request",X="io.deephaven.message.SessionDetails.request";function I(e,n=h(),i){return{message:e,id:n,payload:i}}async function Z(e,n=3e4){if(window.opener==null)throw new Error("window.opener is null, unable to send request.");return new Promise((i,r)=>{let a;const t=h(),s=u=>{const{data:o}=u;if(m.debug("Received message",o),o?.id!==t){m.debug("Ignore message, id doesn't match",o);return}window.clearTimeout(a),window.removeEventListener("message",s),i(o.payload)};window.addEventListener("message",s),a=window.setTimeout(()=>{window.removeEventListener("message",s),r(new T("Request timed out"))},n),window.opener.postMessage(I(e,t),"*")})}const x=l.createContext(null);function ee({serverUrl:e,options:n,children:i}){const r=v(),[a,t]=l.useState();return l.useEffect(function(){const u=new r.CoreClient(e,n);return t(u),()=>{u.disconnect()}},[r,n,e]),a==null?null:d.jsx(x.Provider,{value:a,children:i})}function O(e){if(e==null)return!1;const n=e;return n.Component!==void 0&&typeof n.isAvailable=="function"}const E={react:C,"react-dom":S,redux:$,"react-redux":A},U=P.createRequires(()=>E),q=P.createRemoteComponent({requires:U}),B=q,H=M.createRequires(E),J=L({requires:H}),W=J,c=p.module("@deephaven/app-utils.PluginUtils");function ne(e,n){const i=new URL(`${n}.js`,e),r=C.forwardRef((a,t)=>d.jsx(B,{url:i.href,render:({err:s,Component:u})=>{if(s!=null&&s!==""){const o=`Error loading plugin ${n} from ${i} due to ${s}`;return c.error(o),d.jsx("div",{className:"error-message",children:`${o}`})}return d.jsx(u,{ref:t,...a})}}));return r.pluginName=n,r.displayName="Plugin",r}async function _(e){return await W(e)}async function k(e){const n=await fetch(e);if(!n.ok)throw new Error(n.statusText);try{return await n.json()}catch{throw new Error("Could not be parsed as JSON")}}async function D(e){c.debug("Loading plugins...");try{const n=await k(`${e}/manifest.json`);if(!Array.isArray(n.plugins))throw new Error("Plugin manifest JSON does not contain plugins array");c.debug("Plugin manifest loaded:",n);const i=[];for(let t=0;t<n.plugins.length;t+=1){const{name:s,main:u}=n.plugins[t],o=`${e}/${s}/${u}`;i.push(_(o))}const r=await Promise.allSettled(i),a=new Map;for(let t=0;t<r.length;t+=1){const s=r[t],{name:u}=n.plugins[t];s.status==="fulfilled"?a.set(u,s.value):c.error(`Unable to load plugin ${u}`,s.reason)}return c.info("Plugins loaded:",a),a}catch(n){return c.error("Unable to load plugins:",n),new Map}}function F(e){return e.get("AuthHandlers")?.split(",")??[]}function te(e,n,i){const r=F(n),a=[...e.entries()].filter(([,o])=>O(o.AuthPlugin)).map(([o,g])=>[o,g.AuthPlugin]);a.push(...i??[]);const t=a.filter(([o,g])=>g.isAvailable(r));if(t.length===0)throw new Error(`No login plugins found, please register a login plugin for auth handlers: ${r}`);t.length>1&&c.warn("More than one login plugin available, will use the first one: ",t.map(([o])=>o).join(", "));const[s,u]=t[0];return c.info("Using LoginPlugin",s),u.Component}const y=l.createContext(null);function oe({pluginsUrl:e,children:n}){const[i,r]=l.useState(null);return l.useEffect(function(){let t=!1;async function s(){const u=await D(e);t||r(u)}return s(),()=>{t=!0}},[e]),d.jsx(y.Provider,{value:i,children:n})}function G(){const e=l.useContext(x);if(e==null)throw new Error("No Client available in useClient. Was code wrapped in ClientBootstrap or ClientContext.Provider?");return e}const Q=p.module("@deephaven/jsapi-components.ConnectionBootstrap"),R=l.createContext(null);function se({children:e}){const n=v(),i=G(),[r,a]=l.useState(),[t,s]=l.useState();return l.useEffect(function(){let o=!1;async function g(){try{const f=await i.getAsIdeConnection();if(o)return;s(f)}catch(f){if(o)return;a(f)}}return g(),()=>{o=!0}},[n,i]),l.useEffect(function(){if(t==null)return;function o(f){const{detail:w}=f;Q.info("Shutdown",`${JSON.stringify(w)}`),a(`Server shutdown: ${w??"Unknown reason"}`)}return t.addEventListener(n.IdeConnection.EVENT_SHUTDOWN,o)},[n,t]),t==null||r!=null?d.jsx(N,{"data-testid":"connection-bootstrap-loading",isLoading:t==null,errorMessage:`${r}`}):d.jsx(R.Provider,{value:t,children:e})}function re(e){return new URL(e,`${window.location}`)}function K(){return new URLSearchParams(window.location.search).get("envoyPrefix")}function ie(){const e=K();return e!=null?{headers:{"envoy-prefix":e}}:{headers:{}}}function ae(){const e=l.useContext(y);if(e==null)throw new Error("No Plugins available in usePlugins. Was code wrapped in PluginsBootstrap or PluginsContext.Provider?");return e}function ue(){const e=l.useContext(R);if(e==null)throw new Error("No IdeConnection available in useConnection. Was code wrapped in ConnectionBootstrap or ConnectionContext.Provider?");return e}export{ee as C,z as L,y as P,B as R,X as S,T,ue as a,ae as b,v as c,te as d,ie as e,oe as f,re as g,se as h,x as i,R as j,_ as k,ne as l,k as m,D as n,F as o,K as p,Z as r,G as u};
|
|
2
|
+
//# sourceMappingURL=useConnection-cae39c77.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConnection-dd107347.js","sources":["../../../utils/src/TimeoutError.ts","../../../jsapi-bootstrap/src/useApi.ts","../../../jsapi-utils/src/MessageUtils.ts","../../../app-utils/src/components/ClientBootstrap.tsx","../../../auth-plugins/src/AuthPlugin.ts","../../../app-utils/src/plugins/remote-component.config.ts","../../../app-utils/src/plugins/RemoteComponent.ts","../../../app-utils/src/plugins/loadRemoteModule.ts","../../../app-utils/src/plugins/PluginUtils.tsx","../../../app-utils/src/components/PluginsBootstrap.tsx","../../../app-utils/src/components/useClient.ts","../../../app-utils/src/components/ConnectionBootstrap.tsx","../../../app-utils/src/utils/ConnectUtils.ts","../../../app-utils/src/components/usePlugins.ts","../../../app-utils/src/components/useConnection.ts"],"sourcesContent":["class TimeoutError extends Error {\n isTimeout = true;\n}\n\nexport default TimeoutError;\n","import { useContext } from 'react';\nimport { ApiContext } from './ApiBootstrap';\n\nexport const useApi = () => {\n const dh = useContext(ApiContext);\n if (dh == null) {\n throw new Error(\n 'No API available in useApi. Was code wrapped in ApiBootstrap or ApiContext.Provider?'\n );\n }\n return dh;\n};\n\nexport default useApi;\n","import shortid from 'shortid';\nimport Log from '@deephaven/log';\nimport { TimeoutError } from '@deephaven/utils';\n\nconst log = Log.module('MessageUtils');\n\nexport const LOGIN_OPTIONS_REQUEST =\n 'io.deephaven.message.LoginOptions.request';\n\nexport const SESSION_DETAILS_REQUEST =\n 'io.deephaven.message.SessionDetails.request';\n\nexport interface Message<T> {\n message: string;\n payload?: T;\n id: string;\n}\n\nexport interface Response<T> {\n id: string;\n payload: T;\n}\n\n/**\n * Make message object with optional payload\n * @param message Message string\n * @param id Unique message id\n * @param payload Payload to send\n * @returns Message\n */\nexport function makeMessage<T>(\n message: string,\n id = shortid(),\n payload?: T\n): Message<T> {\n return { message, id, payload };\n}\n\n/**\n * Make response object for given message id\n * @param messageId Id of the request message to respond to\n * @param payload Payload to respond with\n * @returns Response\n */\nexport function makeResponse<T>(messageId: string, payload: T): Response<T> {\n return { id: messageId, payload };\n}\n\n/**\n * Request data from the parent window and wait for response\n * @param request Request message to send to the parent window\n * @param timeout Timeout in ms\n * @returns Payload of the given type, or undefined\n */\nexport async function requestParentResponse<T>(\n request: string,\n timeout = 30000\n): Promise<T> {\n if (window.opener == null) {\n throw new Error('window.opener is null, unable to send request.');\n }\n return new Promise((resolve, reject) => {\n let timeoutId: number;\n const id = shortid();\n const listener = (event: MessageEvent<Response<T>>) => {\n const { data } = event;\n log.debug('Received message', data);\n if (data?.id !== id) {\n log.debug(\"Ignore message, id doesn't match\", data);\n return;\n }\n window.clearTimeout(timeoutId);\n window.removeEventListener('message', listener);\n resolve(data.payload);\n };\n window.addEventListener('message', listener);\n timeoutId = window.setTimeout(() => {\n window.removeEventListener('message', listener);\n reject(new TimeoutError('Request timed out'));\n }, timeout);\n window.opener.postMessage(makeMessage(request, id), '*');\n });\n}\n","import React, { createContext, useEffect, useState } from 'react';\nimport { useApi } from '@deephaven/jsapi-bootstrap';\nimport { ConnectOptions, CoreClient } from '@deephaven/jsapi-types';\n\nexport const ClientContext = createContext<CoreClient | null>(null);\n\nexport type ClientBootstrapProps = {\n /** URL of the server to connect to */\n serverUrl: string;\n\n /** Connection options to pass to CoreClient when connecting */\n options?: ConnectOptions;\n\n /**\n * The children to render wrapped with the ClientContext.\n * Will not render children until the client is created.\n */\n children: React.ReactNode;\n};\n\n/**\n * ClientBootstrap component. Handles creating the client.\n */\nexport function ClientBootstrap({\n serverUrl,\n options,\n children,\n}: ClientBootstrapProps) {\n const api = useApi();\n const [client, setClient] = useState<CoreClient>();\n useEffect(\n function initClient() {\n const newClient = new api.CoreClient(serverUrl, options);\n setClient(newClient);\n return () => {\n newClient.disconnect();\n };\n },\n [api, options, serverUrl]\n );\n\n if (client == null) {\n return null;\n }\n return (\n <ClientContext.Provider value={client}>{children}</ClientContext.Provider>\n );\n}\n\nexport default ClientBootstrap;\n","import React from 'react';\nimport { CoreClient } from '@deephaven/jsapi-types';\n\n/**\n * Map from auth config keys to their values\n * E.g. Map { AuthHandlers → \"io.deephaven.auth.AnonymousAuthenticationHandler\" }\n */\nexport type AuthConfigMap = Map<string, string>;\n\n/**\n * Props for the auth plugin component to render\n */\nexport type AuthPluginProps = {\n /** Map from config keys to their values */\n authConfigValues: AuthConfigMap;\n\n /** Client to check auth configuration on */\n client: CoreClient;\n\n /** Called when authentication is sucessful */\n onSuccess(): void;\n\n /** Called when authentication fails */\n onFailure(error: unknown): void;\n};\n\nexport type AuthPluginComponent = React.FunctionComponent<AuthPluginProps>;\n\n/**\n * Whether the auth plugin is available given the current configuration\n */\nexport type AuthPluginIsAvailableFunction = (authHandlers: string[]) => boolean;\n\nexport type AuthPlugin = {\n Component: AuthPluginComponent;\n isAvailable: AuthPluginIsAvailableFunction;\n};\n\nexport function isAuthPlugin(plugin?: unknown): plugin is AuthPlugin {\n if (plugin == null) return false;\n const authPlugin = plugin as AuthPlugin;\n return (\n authPlugin.Component !== undefined &&\n typeof authPlugin.isAvailable === 'function'\n );\n}\n","/* eslint-disable global-require */\n/**\n * remote-component.config.js\n *\n * Dependencies for Remote Components\n */\nimport react from 'react';\nimport * as redux from 'redux';\nimport * as reactRedux from 'react-redux';\nimport ReactDOM from 'react-dom';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const resolve = {\n react,\n 'react-dom': ReactDOM,\n redux,\n 'react-redux': reactRedux,\n};\n","import {\n createRemoteComponent,\n createRequires,\n} from '@paciolan/remote-component';\nimport { resolve } from './remote-component.config';\n\nconst requires = createRequires(() => resolve);\n\nexport const RemoteComponent = createRemoteComponent({ requires });\nexport default RemoteComponent;\n","import createLoadRemoteModule, {\n createRequires,\n} from '@paciolan/remote-module-loader';\nimport { resolve } from './remote-component.config';\n\nconst requires = createRequires(resolve);\n\nexport const loadRemoteModule: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (url: string): Promise<any>;\n} = createLoadRemoteModule({\n requires,\n});\n\nexport default loadRemoteModule;\n","import React, { ForwardRefExoticComponent } from 'react';\nimport {\n AuthPlugin,\n AuthPluginComponent,\n isAuthPlugin,\n} from '@deephaven/auth-plugins';\nimport Log from '@deephaven/log';\nimport RemoteComponent from './RemoteComponent';\nimport loadRemoteModule from './loadRemoteModule';\n\nconst log = Log.module('@deephaven/app-utils.PluginUtils');\n\n// A PluginModule. This interface should have new fields added to it from different levels of plugins.\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface PluginModule {}\n\nexport type PluginModuleMap = Map<string, PluginModule>;\n\n/**\n * Load a component plugin from the server.\n * @param baseURL Base URL of the plugin server\n * @param pluginName Name of the component plugin to load\n * @returns A lazily loaded JSX.Element from the plugin\n */\nexport function loadComponentPlugin(\n baseURL: URL,\n pluginName: string\n): ForwardRefExoticComponent<React.RefAttributes<unknown>> {\n const pluginUrl = new URL(`${pluginName}.js`, baseURL);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const Plugin: any = React.forwardRef((props, ref) => (\n <RemoteComponent\n url={pluginUrl.href}\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n render={({ err, Component }: { err: unknown; Component: any }) => {\n if (err != null && err !== '') {\n const errorMessage = `Error loading plugin ${pluginName} from ${pluginUrl} due to ${err}`;\n log.error(errorMessage);\n return <div className=\"error-message\">{`${errorMessage}`}</div>;\n }\n // eslint-disable-next-line react/jsx-props-no-spreading\n return <Component ref={ref} {...props} />;\n }}\n />\n ));\n Plugin.pluginName = pluginName;\n Plugin.displayName = 'Plugin';\n return Plugin;\n}\n\n/**\n * Imports a commonjs plugin module from the provided URL\n * @param pluginUrl The URL of the plugin to load\n * @returns The loaded module\n */\nexport async function loadModulePlugin(pluginUrl: string): Promise<unknown> {\n const myModule = await loadRemoteModule(pluginUrl);\n return myModule;\n}\n\n/**\n * Loads a JSON file and returns the JSON object\n * @param jsonUrl The URL of the JSON file to load\n * @returns The JSON object of the manifest file\n */\nexport async function loadJson(\n jsonUrl: string\n): Promise<{ plugins: { name: string; main: string }[] }> {\n const res = await fetch(jsonUrl);\n if (!res.ok) {\n throw new Error(res.statusText);\n }\n try {\n return await res.json();\n } catch {\n throw new Error('Could not be parsed as JSON');\n }\n}\n\n/**\n * Load all plugin modules available.\n * @param modulePluginsUrl The base URL of the module plugins to load\n * @returns A map from the name of the plugin to the plugin module that was loaded\n */\nexport async function loadModulePlugins(\n modulePluginsUrl: string\n): Promise<PluginModuleMap> {\n log.debug('Loading plugins...');\n try {\n const manifest = await loadJson(`${modulePluginsUrl}/manifest.json`);\n\n if (!Array.isArray(manifest.plugins)) {\n throw new Error('Plugin manifest JSON does not contain plugins array');\n }\n\n log.debug('Plugin manifest loaded:', manifest);\n const pluginPromises: Promise<unknown>[] = [];\n for (let i = 0; i < manifest.plugins.length; i += 1) {\n const { name, main } = manifest.plugins[i];\n const pluginMainUrl = `${modulePluginsUrl}/${name}/${main}`;\n pluginPromises.push(loadModulePlugin(pluginMainUrl));\n }\n const pluginModules = await Promise.allSettled(pluginPromises);\n\n const pluginMap: PluginModuleMap = new Map();\n for (let i = 0; i < pluginModules.length; i += 1) {\n const module = pluginModules[i];\n const { name } = manifest.plugins[i];\n if (module.status === 'fulfilled') {\n pluginMap.set(name, module.value as PluginModule);\n } else {\n log.error(`Unable to load plugin ${name}`, module.reason);\n }\n }\n log.info('Plugins loaded:', pluginMap);\n\n return pluginMap;\n } catch (e) {\n log.error('Unable to load plugins:', e);\n return new Map();\n }\n}\n\nexport function getAuthHandlers(\n authConfigValues: Map<string, string>\n): string[] {\n return authConfigValues.get('AuthHandlers')?.split(',') ?? [];\n}\n\n/**\n * Get the auth plugin component from the plugin map and current configuration\n * Throws if no auth plugin is available\n *\n * @param pluginMap Map of plugins loaded from the server\n * @param authConfigValues Auth config values from the server\n * @param corePlugins Map of core auth plugins to include in the list. They are added after the loaded plugins\n * @returns The auth plugin component to render\n */\nexport function getAuthPluginComponent(\n pluginMap: PluginModuleMap,\n authConfigValues: Map<string, string>,\n corePlugins?: Map<string, AuthPlugin>\n): AuthPluginComponent {\n const authHandlers = getAuthHandlers(authConfigValues);\n // Filter out all the plugins that are auth plugins, and then map them to [pluginName, AuthPlugin] pairs\n // Uses some pretty disgusting casting, because TypeScript wants to treat it as an (string | AuthPlugin)[] array instead\n const authPlugins = ([\n ...pluginMap.entries(),\n ].filter(([, plugin]: [string, { AuthPlugin?: AuthPlugin }]) =>\n isAuthPlugin(plugin.AuthPlugin)\n ) as [string, { AuthPlugin: AuthPlugin }][]).map(([name, plugin]) => [\n name,\n plugin.AuthPlugin,\n ]) as [string, AuthPlugin][];\n\n // Add all the core plugins in priority\n authPlugins.push(...(corePlugins ?? []));\n\n // Filter the available auth plugins\n\n const availableAuthPlugins = authPlugins.filter(([name, authPlugin]) =>\n authPlugin.isAvailable(authHandlers)\n );\n\n if (availableAuthPlugins.length === 0) {\n throw new Error(\n `No login plugins found, please register a login plugin for auth handlers: ${authHandlers}`\n );\n } else if (availableAuthPlugins.length > 1) {\n log.warn(\n 'More than one login plugin available, will use the first one: ',\n availableAuthPlugins.map(([name]) => name).join(', ')\n );\n }\n\n const [loginPluginName, NewLoginPlugin] = availableAuthPlugins[0];\n log.info('Using LoginPlugin', loginPluginName);\n\n return NewLoginPlugin.Component;\n}\n","import React, { createContext, useEffect, useState } from 'react';\nimport { PluginModuleMap, loadModulePlugins } from '../plugins';\n\nexport const PluginsContext = createContext<PluginModuleMap | null>(null);\n\nexport type PluginsBootstrapProps = {\n /**\n * Base URL of the plugins to load.\n */\n pluginsUrl: string;\n\n /**\n * The children to render wrapped with the PluginsContext.\n * Note that it renders the children even if the plugins aren't loaded yet.\n */\n children: React.ReactNode;\n};\n\n/**\n * PluginsBootstrap component. Handles loading the plugins.\n */\nexport function PluginsBootstrap({\n pluginsUrl,\n children,\n}: PluginsBootstrapProps) {\n const [plugins, setPlugins] = useState<PluginModuleMap | null>(null);\n useEffect(\n function initPlugins() {\n let isCancelled = false;\n async function loadPlugins() {\n const pluginModules = await loadModulePlugins(pluginsUrl);\n if (!isCancelled) {\n setPlugins(pluginModules);\n }\n }\n loadPlugins();\n return () => {\n isCancelled = true;\n };\n },\n [pluginsUrl]\n );\n\n return (\n <PluginsContext.Provider value={plugins}>\n {children}\n </PluginsContext.Provider>\n );\n}\n\nexport default PluginsBootstrap;\n","import { useContext } from 'react';\nimport { ClientContext } from './ClientBootstrap';\n\nexport function useClient() {\n const client = useContext(ClientContext);\n if (client == null) {\n throw new Error(\n 'No Client available in useClient. Was code wrapped in ClientBootstrap or ClientContext.Provider?'\n );\n }\n return client;\n}\n\nexport default useClient;\n","import React, { createContext, useEffect, useState } from 'react';\nimport { LoadingOverlay } from '@deephaven/components';\nimport { useApi } from '@deephaven/jsapi-bootstrap';\nimport { IdeConnection } from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\nimport useClient from './useClient';\n\nconst log = Log.module('@deephaven/jsapi-components.ConnectionBootstrap');\n\nexport const ConnectionContext = createContext<IdeConnection | null>(null);\n\nexport type ConnectionBootstrapProps = {\n /**\n * The children to render wrapped with the ConnectionContext.\n * Will not render children until the connection is created.\n */\n children: React.ReactNode;\n};\n\n/**\n * ConnectionBootstrap component. Handles initializing the connection.\n */\nexport function ConnectionBootstrap({ children }: ConnectionBootstrapProps) {\n const api = useApi();\n const client = useClient();\n const [error, setError] = useState<unknown>();\n const [connection, setConnection] = useState<IdeConnection>();\n useEffect(\n function initConnection() {\n let isCancelled = false;\n async function loadConnection() {\n try {\n const newConnection = await client.getAsIdeConnection();\n if (isCancelled) {\n return;\n }\n setConnection(newConnection);\n } catch (e) {\n if (isCancelled) {\n return;\n }\n setError(e);\n }\n }\n loadConnection();\n return () => {\n isCancelled = true;\n };\n },\n [api, client]\n );\n\n useEffect(\n function listenForShutdown() {\n if (connection == null) return;\n\n function handleShutdown(event: CustomEvent) {\n const { detail } = event;\n log.info('Shutdown', `${JSON.stringify(detail)}`);\n setError(`Server shutdown: ${detail ?? 'Unknown reason'}`);\n }\n\n const removerFn = connection.addEventListener(\n api.IdeConnection.EVENT_SHUTDOWN,\n handleShutdown\n );\n return removerFn;\n },\n [api, connection]\n );\n\n if (connection == null || error != null) {\n return (\n <LoadingOverlay\n data-testid=\"connection-bootstrap-loading\"\n isLoading={connection == null}\n errorMessage={`${error}`}\n />\n );\n }\n\n return (\n <ConnectionContext.Provider value={connection}>\n {children}\n </ConnectionContext.Provider>\n );\n}\n\nexport default ConnectionBootstrap;\n","import { ConnectOptions } from '@deephaven/jsapi-types';\n\n/**\n * Get the base URL of the API\n * @param apiUrl API URL\n * @returns URL for the base of the API\n */\nexport function getBaseUrl(apiUrl: string): URL {\n return new URL(apiUrl, `${window.location}`);\n}\n\n/**\n * Get the Envoy prefix header value\n * @returns Envoy prefix header value\n */\nexport function getEnvoyPrefix(): string | null {\n const searchParams = new URLSearchParams(window.location.search);\n return searchParams.get('envoyPrefix');\n}\n\nexport function getConnectOptions(): ConnectOptions {\n const envoyPrefix = getEnvoyPrefix();\n return envoyPrefix != null\n ? { headers: { 'envoy-prefix': envoyPrefix } }\n : { headers: {} };\n}\n","import { useContext } from 'react';\nimport { PluginsContext } from './PluginsBootstrap';\n\nexport function usePlugins() {\n const plugins = useContext(PluginsContext);\n if (plugins == null) {\n throw new Error(\n 'No Plugins available in usePlugins. Was code wrapped in PluginsBootstrap or PluginsContext.Provider?'\n );\n }\n return plugins;\n}\n\nexport default usePlugins;\n","import { useContext } from 'react';\nimport { ConnectionContext } from './ConnectionBootstrap';\n\nexport function useConnection() {\n const connection = useContext(ConnectionContext);\n if (connection == null) {\n throw new Error(\n 'No IdeConnection available in useConnection. Was code wrapped in ConnectionBootstrap or ConnectionContext.Provider?'\n );\n }\n return connection;\n}\n\nexport default useConnection;\n"],"names":["TimeoutError","TimeoutError$1","useApi","dh","useContext","ApiContext","log","Log","LOGIN_OPTIONS_REQUEST","SESSION_DETAILS_REQUEST","makeMessage","message","id","shortid","payload","requestParentResponse","request","timeout","resolve","reject","timeoutId","listener","event","data","ClientContext","createContext","ClientBootstrap","serverUrl","options","children","api","client","setClient","useState","useEffect","newClient","isAuthPlugin","plugin","authPlugin","react","ReactDOM","redux","reactRedux","requires","createRequires","RemoteComponent","createRemoteComponent","RemoteComponent$1","loadRemoteModule","createLoadRemoteModule","loadRemoteModule$1","loadComponentPlugin","baseURL","pluginName","pluginUrl","Plugin","React","props","ref","jsx","err","Component","errorMessage","loadModulePlugin","loadJson","jsonUrl","res","loadModulePlugins","modulePluginsUrl","manifest","pluginPromises","i","name","main","pluginMainUrl","pluginModules","pluginMap","module","e","getAuthHandlers","authConfigValues","getAuthPluginComponent","corePlugins","authHandlers","authPlugins","availableAuthPlugins","loginPluginName","NewLoginPlugin","PluginsContext","PluginsBootstrap","pluginsUrl","plugins","setPlugins","isCancelled","loadPlugins","useClient","ConnectionContext","ConnectionBootstrap","error","setError","connection","setConnection","loadConnection","newConnection","handleShutdown","detail","LoadingOverlay","getBaseUrl","apiUrl","getEnvoyPrefix","getConnectOptions","envoyPrefix","usePlugins","useConnection"],"mappings":"oKAAA,MAAMA,UAAqB,KAAM,CAC/B,UAAY,EACd,CAEA,MAAAC,EAAeD,ECDFE,EAAS,IAAM,CACpB,MAAAC,EAAKC,aAAWC,CAAU,EAChC,GAAIF,GAAM,KACR,MAAM,IAAI,MACR,sFAAA,EAGG,OAAAA,CACT,ECPMG,EAAMC,EAAI,OAAO,cAAc,EAExBC,EACX,4CAEWC,EACX,8CAoBK,SAASC,EACdC,EACAC,EAAKC,EAAA,EACLC,EACY,CACL,MAAA,CAAE,QAAAH,EAAS,GAAAC,EAAI,QAAAE,EACxB,CAkBsB,eAAAC,EACpBC,EACAC,EAAU,IACE,CACR,GAAA,OAAO,QAAU,KACb,MAAA,IAAI,MAAM,gDAAgD,EAElE,OAAO,IAAI,QAAQ,CAACC,EAASC,IAAW,CAClC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GAAc,KAChB,MAAM,IAAI,MACR,qHAAA,EAGG,OAAAA,CACT"}
|
|
1
|
+
{"version":3,"file":"useConnection-cae39c77.js","sources":["../../../utils/src/TimeoutError.ts","../../../jsapi-bootstrap/src/useApi.ts","../../../jsapi-utils/src/MessageUtils.ts","../../../app-utils/src/components/ClientBootstrap.tsx","../../../auth-plugins/src/AuthPlugin.ts","../../../app-utils/src/plugins/remote-component.config.ts","../../../app-utils/src/plugins/RemoteComponent.ts","../../../app-utils/src/plugins/loadRemoteModule.ts","../../../app-utils/src/plugins/PluginUtils.tsx","../../../app-utils/src/components/PluginsBootstrap.tsx","../../../app-utils/src/components/useClient.ts","../../../app-utils/src/components/ConnectionBootstrap.tsx","../../../app-utils/src/utils/ConnectUtils.ts","../../../app-utils/src/components/usePlugins.ts","../../../app-utils/src/components/useConnection.ts"],"sourcesContent":["class TimeoutError extends Error {\n isTimeout = true;\n}\n\nexport default TimeoutError;\n","import { useContext } from 'react';\nimport { ApiContext } from './ApiBootstrap';\n\nexport const useApi = () => {\n const dh = useContext(ApiContext);\n if (dh == null) {\n throw new Error(\n 'No API available in useApi. Was code wrapped in ApiBootstrap or ApiContext.Provider?'\n );\n }\n return dh;\n};\n\nexport default useApi;\n","import shortid from 'shortid';\nimport Log from '@deephaven/log';\nimport { TimeoutError } from '@deephaven/utils';\n\nconst log = Log.module('MessageUtils');\n\nexport const LOGIN_OPTIONS_REQUEST =\n 'io.deephaven.message.LoginOptions.request';\n\nexport const SESSION_DETAILS_REQUEST =\n 'io.deephaven.message.SessionDetails.request';\n\nexport interface Message<T> {\n message: string;\n payload?: T;\n id: string;\n}\n\nexport interface Response<T> {\n id: string;\n payload: T;\n}\n\n/**\n * Make message object with optional payload\n * @param message Message string\n * @param id Unique message id\n * @param payload Payload to send\n * @returns Message\n */\nexport function makeMessage<T>(\n message: string,\n id = shortid(),\n payload?: T\n): Message<T> {\n return { message, id, payload };\n}\n\n/**\n * Make response object for given message id\n * @param messageId Id of the request message to respond to\n * @param payload Payload to respond with\n * @returns Response\n */\nexport function makeResponse<T>(messageId: string, payload: T): Response<T> {\n return { id: messageId, payload };\n}\n\n/**\n * Request data from the parent window and wait for response\n * @param request Request message to send to the parent window\n * @param timeout Timeout in ms\n * @returns Payload of the given type, or undefined\n */\nexport async function requestParentResponse<T>(\n request: string,\n timeout = 30000\n): Promise<T> {\n if (window.opener == null) {\n throw new Error('window.opener is null, unable to send request.');\n }\n return new Promise((resolve, reject) => {\n let timeoutId: number;\n const id = shortid();\n const listener = (event: MessageEvent<Response<T>>) => {\n const { data } = event;\n log.debug('Received message', data);\n if (data?.id !== id) {\n log.debug(\"Ignore message, id doesn't match\", data);\n return;\n }\n window.clearTimeout(timeoutId);\n window.removeEventListener('message', listener);\n resolve(data.payload);\n };\n window.addEventListener('message', listener);\n timeoutId = window.setTimeout(() => {\n window.removeEventListener('message', listener);\n reject(new TimeoutError('Request timed out'));\n }, timeout);\n window.opener.postMessage(makeMessage(request, id), '*');\n });\n}\n","import React, { createContext, useEffect, useState } from 'react';\nimport { useApi } from '@deephaven/jsapi-bootstrap';\nimport { ConnectOptions, CoreClient } from '@deephaven/jsapi-types';\n\nexport const ClientContext = createContext<CoreClient | null>(null);\n\nexport type ClientBootstrapProps = {\n /** URL of the server to connect to */\n serverUrl: string;\n\n /** Connection options to pass to CoreClient when connecting */\n options?: ConnectOptions;\n\n /**\n * The children to render wrapped with the ClientContext.\n * Will not render children until the client is created.\n */\n children: React.ReactNode;\n};\n\n/**\n * ClientBootstrap component. Handles creating the client.\n */\nexport function ClientBootstrap({\n serverUrl,\n options,\n children,\n}: ClientBootstrapProps) {\n const api = useApi();\n const [client, setClient] = useState<CoreClient>();\n useEffect(\n function initClient() {\n const newClient = new api.CoreClient(serverUrl, options);\n setClient(newClient);\n return () => {\n newClient.disconnect();\n };\n },\n [api, options, serverUrl]\n );\n\n if (client == null) {\n return null;\n }\n return (\n <ClientContext.Provider value={client}>{children}</ClientContext.Provider>\n );\n}\n\nexport default ClientBootstrap;\n","import React from 'react';\nimport { CoreClient } from '@deephaven/jsapi-types';\n\n/**\n * Map from auth config keys to their values\n * E.g. Map { AuthHandlers → \"io.deephaven.auth.AnonymousAuthenticationHandler\" }\n */\nexport type AuthConfigMap = Map<string, string>;\n\n/**\n * Props for the auth plugin component to render\n */\nexport type AuthPluginProps = {\n /** Map from config keys to their values */\n authConfigValues: AuthConfigMap;\n\n /** Client to check auth configuration on */\n client: CoreClient;\n\n /** Called when authentication is sucessful */\n onSuccess(): void;\n\n /** Called when authentication fails */\n onFailure(error: unknown): void;\n};\n\nexport type AuthPluginComponent = React.FunctionComponent<AuthPluginProps>;\n\n/**\n * Whether the auth plugin is available given the current configuration\n */\nexport type AuthPluginIsAvailableFunction = (authHandlers: string[]) => boolean;\n\nexport type AuthPlugin = {\n Component: AuthPluginComponent;\n isAvailable: AuthPluginIsAvailableFunction;\n};\n\nexport function isAuthPlugin(plugin?: unknown): plugin is AuthPlugin {\n if (plugin == null) return false;\n const authPlugin = plugin as AuthPlugin;\n return (\n authPlugin.Component !== undefined &&\n typeof authPlugin.isAvailable === 'function'\n );\n}\n","/* eslint-disable global-require */\n/**\n * remote-component.config.js\n *\n * Dependencies for Remote Components\n */\nimport react from 'react';\nimport * as redux from 'redux';\nimport * as reactRedux from 'react-redux';\nimport ReactDOM from 'react-dom';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const resolve = {\n react,\n 'react-dom': ReactDOM,\n redux,\n 'react-redux': reactRedux,\n};\n","import {\n createRemoteComponent,\n createRequires,\n} from '@paciolan/remote-component';\nimport { resolve } from './remote-component.config';\n\nconst requires = createRequires(() => resolve);\n\nexport const RemoteComponent = createRemoteComponent({ requires });\nexport default RemoteComponent;\n","import createLoadRemoteModule, {\n createRequires,\n} from '@paciolan/remote-module-loader';\nimport { resolve } from './remote-component.config';\n\nconst requires = createRequires(resolve);\n\nexport const loadRemoteModule: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (url: string): Promise<any>;\n} = createLoadRemoteModule({\n requires,\n});\n\nexport default loadRemoteModule;\n","import React, { ForwardRefExoticComponent } from 'react';\nimport {\n AuthPlugin,\n AuthPluginComponent,\n isAuthPlugin,\n} from '@deephaven/auth-plugins';\nimport Log from '@deephaven/log';\nimport RemoteComponent from './RemoteComponent';\nimport loadRemoteModule from './loadRemoteModule';\n\nconst log = Log.module('@deephaven/app-utils.PluginUtils');\n\n// A PluginModule. This interface should have new fields added to it from different levels of plugins.\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface PluginModule {}\n\nexport type PluginModuleMap = Map<string, PluginModule>;\n\n/**\n * Load a component plugin from the server.\n * @param baseURL Base URL of the plugin server\n * @param pluginName Name of the component plugin to load\n * @returns A lazily loaded JSX.Element from the plugin\n */\nexport function loadComponentPlugin(\n baseURL: URL,\n pluginName: string\n): ForwardRefExoticComponent<React.RefAttributes<unknown>> {\n const pluginUrl = new URL(`${pluginName}.js`, baseURL);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const Plugin: any = React.forwardRef((props, ref) => (\n <RemoteComponent\n url={pluginUrl.href}\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n render={({ err, Component }: { err: unknown; Component: any }) => {\n if (err != null && err !== '') {\n const errorMessage = `Error loading plugin ${pluginName} from ${pluginUrl} due to ${err}`;\n log.error(errorMessage);\n return <div className=\"error-message\">{`${errorMessage}`}</div>;\n }\n // eslint-disable-next-line react/jsx-props-no-spreading\n return <Component ref={ref} {...props} />;\n }}\n />\n ));\n Plugin.pluginName = pluginName;\n Plugin.displayName = 'Plugin';\n return Plugin;\n}\n\n/**\n * Imports a commonjs plugin module from the provided URL\n * @param pluginUrl The URL of the plugin to load\n * @returns The loaded module\n */\nexport async function loadModulePlugin(pluginUrl: string): Promise<unknown> {\n const myModule = await loadRemoteModule(pluginUrl);\n return myModule;\n}\n\n/**\n * Loads a JSON file and returns the JSON object\n * @param jsonUrl The URL of the JSON file to load\n * @returns The JSON object of the manifest file\n */\nexport async function loadJson(\n jsonUrl: string\n): Promise<{ plugins: { name: string; main: string }[] }> {\n const res = await fetch(jsonUrl);\n if (!res.ok) {\n throw new Error(res.statusText);\n }\n try {\n return await res.json();\n } catch {\n throw new Error('Could not be parsed as JSON');\n }\n}\n\n/**\n * Load all plugin modules available.\n * @param modulePluginsUrl The base URL of the module plugins to load\n * @returns A map from the name of the plugin to the plugin module that was loaded\n */\nexport async function loadModulePlugins(\n modulePluginsUrl: string\n): Promise<PluginModuleMap> {\n log.debug('Loading plugins...');\n try {\n const manifest = await loadJson(`${modulePluginsUrl}/manifest.json`);\n\n if (!Array.isArray(manifest.plugins)) {\n throw new Error('Plugin manifest JSON does not contain plugins array');\n }\n\n log.debug('Plugin manifest loaded:', manifest);\n const pluginPromises: Promise<unknown>[] = [];\n for (let i = 0; i < manifest.plugins.length; i += 1) {\n const { name, main } = manifest.plugins[i];\n const pluginMainUrl = `${modulePluginsUrl}/${name}/${main}`;\n pluginPromises.push(loadModulePlugin(pluginMainUrl));\n }\n const pluginModules = await Promise.allSettled(pluginPromises);\n\n const pluginMap: PluginModuleMap = new Map();\n for (let i = 0; i < pluginModules.length; i += 1) {\n const module = pluginModules[i];\n const { name } = manifest.plugins[i];\n if (module.status === 'fulfilled') {\n pluginMap.set(name, module.value as PluginModule);\n } else {\n log.error(`Unable to load plugin ${name}`, module.reason);\n }\n }\n log.info('Plugins loaded:', pluginMap);\n\n return pluginMap;\n } catch (e) {\n log.error('Unable to load plugins:', e);\n return new Map();\n }\n}\n\nexport function getAuthHandlers(\n authConfigValues: Map<string, string>\n): string[] {\n return authConfigValues.get('AuthHandlers')?.split(',') ?? [];\n}\n\n/**\n * Get the auth plugin component from the plugin map and current configuration\n * Throws if no auth plugin is available\n *\n * @param pluginMap Map of plugins loaded from the server\n * @param authConfigValues Auth config values from the server\n * @param corePlugins Map of core auth plugins to include in the list. They are added after the loaded plugins\n * @returns The auth plugin component to render\n */\nexport function getAuthPluginComponent(\n pluginMap: PluginModuleMap,\n authConfigValues: Map<string, string>,\n corePlugins?: Map<string, AuthPlugin>\n): AuthPluginComponent {\n const authHandlers = getAuthHandlers(authConfigValues);\n // Filter out all the plugins that are auth plugins, and then map them to [pluginName, AuthPlugin] pairs\n // Uses some pretty disgusting casting, because TypeScript wants to treat it as an (string | AuthPlugin)[] array instead\n const authPlugins = ([\n ...pluginMap.entries(),\n ].filter(([, plugin]: [string, { AuthPlugin?: AuthPlugin }]) =>\n isAuthPlugin(plugin.AuthPlugin)\n ) as [string, { AuthPlugin: AuthPlugin }][]).map(([name, plugin]) => [\n name,\n plugin.AuthPlugin,\n ]) as [string, AuthPlugin][];\n\n // Add all the core plugins in priority\n authPlugins.push(...(corePlugins ?? []));\n\n // Filter the available auth plugins\n\n const availableAuthPlugins = authPlugins.filter(([name, authPlugin]) =>\n authPlugin.isAvailable(authHandlers)\n );\n\n if (availableAuthPlugins.length === 0) {\n throw new Error(\n `No login plugins found, please register a login plugin for auth handlers: ${authHandlers}`\n );\n } else if (availableAuthPlugins.length > 1) {\n log.warn(\n 'More than one login plugin available, will use the first one: ',\n availableAuthPlugins.map(([name]) => name).join(', ')\n );\n }\n\n const [loginPluginName, NewLoginPlugin] = availableAuthPlugins[0];\n log.info('Using LoginPlugin', loginPluginName);\n\n return NewLoginPlugin.Component;\n}\n","import React, { createContext, useEffect, useState } from 'react';\nimport { PluginModuleMap, loadModulePlugins } from '../plugins';\n\nexport const PluginsContext = createContext<PluginModuleMap | null>(null);\n\nexport type PluginsBootstrapProps = {\n /**\n * Base URL of the plugins to load.\n */\n pluginsUrl: string;\n\n /**\n * The children to render wrapped with the PluginsContext.\n * Note that it renders the children even if the plugins aren't loaded yet.\n */\n children: React.ReactNode;\n};\n\n/**\n * PluginsBootstrap component. Handles loading the plugins.\n */\nexport function PluginsBootstrap({\n pluginsUrl,\n children,\n}: PluginsBootstrapProps) {\n const [plugins, setPlugins] = useState<PluginModuleMap | null>(null);\n useEffect(\n function initPlugins() {\n let isCancelled = false;\n async function loadPlugins() {\n const pluginModules = await loadModulePlugins(pluginsUrl);\n if (!isCancelled) {\n setPlugins(pluginModules);\n }\n }\n loadPlugins();\n return () => {\n isCancelled = true;\n };\n },\n [pluginsUrl]\n );\n\n return (\n <PluginsContext.Provider value={plugins}>\n {children}\n </PluginsContext.Provider>\n );\n}\n\nexport default PluginsBootstrap;\n","import { useContext } from 'react';\nimport { ClientContext } from './ClientBootstrap';\n\nexport function useClient() {\n const client = useContext(ClientContext);\n if (client == null) {\n throw new Error(\n 'No Client available in useClient. Was code wrapped in ClientBootstrap or ClientContext.Provider?'\n );\n }\n return client;\n}\n\nexport default useClient;\n","import React, { createContext, useEffect, useState } from 'react';\nimport { LoadingOverlay } from '@deephaven/components';\nimport { useApi } from '@deephaven/jsapi-bootstrap';\nimport { IdeConnection } from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\nimport useClient from './useClient';\n\nconst log = Log.module('@deephaven/jsapi-components.ConnectionBootstrap');\n\nexport const ConnectionContext = createContext<IdeConnection | null>(null);\n\nexport type ConnectionBootstrapProps = {\n /**\n * The children to render wrapped with the ConnectionContext.\n * Will not render children until the connection is created.\n */\n children: React.ReactNode;\n};\n\n/**\n * ConnectionBootstrap component. Handles initializing the connection.\n */\nexport function ConnectionBootstrap({ children }: ConnectionBootstrapProps) {\n const api = useApi();\n const client = useClient();\n const [error, setError] = useState<unknown>();\n const [connection, setConnection] = useState<IdeConnection>();\n useEffect(\n function initConnection() {\n let isCancelled = false;\n async function loadConnection() {\n try {\n const newConnection = await client.getAsIdeConnection();\n if (isCancelled) {\n return;\n }\n setConnection(newConnection);\n } catch (e) {\n if (isCancelled) {\n return;\n }\n setError(e);\n }\n }\n loadConnection();\n return () => {\n isCancelled = true;\n };\n },\n [api, client]\n );\n\n useEffect(\n function listenForShutdown() {\n if (connection == null) return;\n\n function handleShutdown(event: CustomEvent) {\n const { detail } = event;\n log.info('Shutdown', `${JSON.stringify(detail)}`);\n setError(`Server shutdown: ${detail ?? 'Unknown reason'}`);\n }\n\n const removerFn = connection.addEventListener(\n api.IdeConnection.EVENT_SHUTDOWN,\n handleShutdown\n );\n return removerFn;\n },\n [api, connection]\n );\n\n if (connection == null || error != null) {\n return (\n <LoadingOverlay\n data-testid=\"connection-bootstrap-loading\"\n isLoading={connection == null}\n errorMessage={`${error}`}\n />\n );\n }\n\n return (\n <ConnectionContext.Provider value={connection}>\n {children}\n </ConnectionContext.Provider>\n );\n}\n\nexport default ConnectionBootstrap;\n","import { ConnectOptions } from '@deephaven/jsapi-types';\n\n/**\n * Get the base URL of the API\n * @param apiUrl API URL\n * @returns URL for the base of the API\n */\nexport function getBaseUrl(apiUrl: string): URL {\n return new URL(apiUrl, `${window.location}`);\n}\n\n/**\n * Get the Envoy prefix header value\n * @returns Envoy prefix header value\n */\nexport function getEnvoyPrefix(): string | null {\n const searchParams = new URLSearchParams(window.location.search);\n return searchParams.get('envoyPrefix');\n}\n\nexport function getConnectOptions(): ConnectOptions {\n const envoyPrefix = getEnvoyPrefix();\n return envoyPrefix != null\n ? { headers: { 'envoy-prefix': envoyPrefix } }\n : { headers: {} };\n}\n","import { useContext } from 'react';\nimport { PluginsContext } from './PluginsBootstrap';\n\nexport function usePlugins() {\n const plugins = useContext(PluginsContext);\n if (plugins == null) {\n throw new Error(\n 'No Plugins available in usePlugins. Was code wrapped in PluginsBootstrap or PluginsContext.Provider?'\n );\n }\n return plugins;\n}\n\nexport default usePlugins;\n","import { useContext } from 'react';\nimport { ConnectionContext } from './ConnectionBootstrap';\n\nexport function useConnection() {\n const connection = useContext(ConnectionContext);\n if (connection == null) {\n throw new Error(\n 'No IdeConnection available in useConnection. Was code wrapped in ConnectionBootstrap or ConnectionContext.Provider?'\n );\n }\n return connection;\n}\n\nexport default useConnection;\n"],"names":["TimeoutError","TimeoutError$1","useApi","dh","useContext","ApiContext","log","Log","LOGIN_OPTIONS_REQUEST","SESSION_DETAILS_REQUEST","makeMessage","message","id","shortid","payload","requestParentResponse","request","timeout","resolve","reject","timeoutId","listener","event","data","ClientContext","createContext","ClientBootstrap","serverUrl","options","children","api","client","setClient","useState","useEffect","newClient","isAuthPlugin","plugin","authPlugin","react","ReactDOM","redux","reactRedux","requires","createRequires","RemoteComponent","createRemoteComponent","RemoteComponent$1","loadRemoteModule","createLoadRemoteModule","loadRemoteModule$1","loadComponentPlugin","baseURL","pluginName","pluginUrl","Plugin","React","props","ref","jsx","err","Component","errorMessage","loadModulePlugin","loadJson","jsonUrl","res","loadModulePlugins","modulePluginsUrl","manifest","pluginPromises","i","name","main","pluginMainUrl","pluginModules","pluginMap","module","e","getAuthHandlers","authConfigValues","getAuthPluginComponent","corePlugins","authHandlers","authPlugins","availableAuthPlugins","loginPluginName","NewLoginPlugin","PluginsContext","PluginsBootstrap","pluginsUrl","plugins","setPlugins","isCancelled","loadPlugins","useClient","ConnectionContext","ConnectionBootstrap","error","setError","connection","setConnection","loadConnection","newConnection","handleShutdown","detail","LoadingOverlay","getBaseUrl","apiUrl","getEnvoyPrefix","getConnectOptions","envoyPrefix","usePlugins","useConnection"],"mappings":"oKAAA,MAAMA,UAAqB,KAAM,CAC/B,UAAY,EACd,CAEA,MAAAC,EAAeD,ECDFE,EAAS,IAAM,CACpB,MAAAC,EAAKC,aAAWC,CAAU,EAChC,GAAIF,GAAM,KACR,MAAM,IAAI,MACR,sFAAA,EAGG,OAAAA,CACT,ECPMG,EAAMC,EAAI,OAAO,cAAc,EAExBC,EACX,4CAEWC,EACX,8CAoBK,SAASC,EACdC,EACAC,EAAKC,EAAA,EACLC,EACY,CACL,MAAA,CAAE,QAAAH,EAAS,GAAAC,EAAI,QAAAE,EACxB,CAkBsB,eAAAC,EACpBC,EACAC,EAAU,IACE,CACR,GAAA,OAAO,QAAU,KACb,MAAA,IAAI,MAAM,gDAAgD,EAElE,OAAO,IAAI,QAAQ,CAACC,EAASC,IAAW,CAClC,IAAAC,EACJ,MAAMR,EAAKC,IACLQ,EAAYC,GAAqC,CAC/C,KAAA,CAAE,KAAAC,CAAS,EAAAD,EAEb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@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
-
<meta name="ui-version" content="v0.37.
|
|
4
|
+
<meta name="ui-version" content="v0.37.3" />
|
|
5
5
|
<meta charset="utf-8" />
|
|
6
6
|
<meta
|
|
7
7
|
name="viewport"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<link rel="manifest" href="/ide/manifest.json" />
|
|
16
16
|
<link rel="icon" href="/ide/favicon-cc-app.svg" />
|
|
17
17
|
<title>Deephaven</title>
|
|
18
|
-
<script type="module" crossorigin src="/ide/assets/index-
|
|
18
|
+
<script type="module" crossorigin src="/ide/assets/index-7090b558.js"></script>
|
|
19
19
|
<link rel="modulepreload" crossorigin href="/ide/assets/monaco-a26f85af.js">
|
|
20
20
|
<link rel="modulepreload" crossorigin href="/ide/assets/helpers-042e6b4d.js">
|
|
21
21
|
<link rel="modulepreload" crossorigin href="/ide/assets/vendor-ef910ebc.js">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deephaven/code-studio",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.3",
|
|
4
4
|
"description": "Deephaven Code Studio",
|
|
5
5
|
"author": "Deephaven Data Labs LLC",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -11,30 +11,30 @@
|
|
|
11
11
|
"directory": "packages/code-studio"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@deephaven/app-utils": "^0.37.
|
|
15
|
-
"@deephaven/auth-plugins": "^0.37.
|
|
16
|
-
"@deephaven/chart": "^0.37.
|
|
17
|
-
"@deephaven/components": "^0.37.
|
|
18
|
-
"@deephaven/console": "^0.37.
|
|
19
|
-
"@deephaven/dashboard": "^0.37.
|
|
20
|
-
"@deephaven/dashboard-core-plugins": "^0.37.
|
|
21
|
-
"@deephaven/file-explorer": "^0.37.
|
|
22
|
-
"@deephaven/filters": "^0.37.
|
|
23
|
-
"@deephaven/golden-layout": "^0.37.
|
|
24
|
-
"@deephaven/grid": "^0.37.
|
|
25
|
-
"@deephaven/icons": "^0.37.
|
|
26
|
-
"@deephaven/iris-grid": "^0.37.
|
|
27
|
-
"@deephaven/jsapi-bootstrap": "^0.37.
|
|
28
|
-
"@deephaven/jsapi-components": "^0.37.
|
|
29
|
-
"@deephaven/jsapi-shim": "^0.37.
|
|
30
|
-
"@deephaven/jsapi-types": "^0.37.
|
|
31
|
-
"@deephaven/jsapi-utils": "^0.37.
|
|
32
|
-
"@deephaven/log": "^0.37.
|
|
33
|
-
"@deephaven/pouch-storage": "^0.37.
|
|
34
|
-
"@deephaven/react-hooks": "^0.37.
|
|
35
|
-
"@deephaven/redux": "^0.37.
|
|
36
|
-
"@deephaven/storage": "^0.37.
|
|
37
|
-
"@deephaven/utils": "^0.37.
|
|
14
|
+
"@deephaven/app-utils": "^0.37.3",
|
|
15
|
+
"@deephaven/auth-plugins": "^0.37.2",
|
|
16
|
+
"@deephaven/chart": "^0.37.2",
|
|
17
|
+
"@deephaven/components": "^0.37.2",
|
|
18
|
+
"@deephaven/console": "^0.37.2",
|
|
19
|
+
"@deephaven/dashboard": "^0.37.3",
|
|
20
|
+
"@deephaven/dashboard-core-plugins": "^0.37.3",
|
|
21
|
+
"@deephaven/file-explorer": "^0.37.2",
|
|
22
|
+
"@deephaven/filters": "^0.37.2",
|
|
23
|
+
"@deephaven/golden-layout": "^0.37.2",
|
|
24
|
+
"@deephaven/grid": "^0.37.2",
|
|
25
|
+
"@deephaven/icons": "^0.37.2",
|
|
26
|
+
"@deephaven/iris-grid": "^0.37.2",
|
|
27
|
+
"@deephaven/jsapi-bootstrap": "^0.37.2",
|
|
28
|
+
"@deephaven/jsapi-components": "^0.37.2",
|
|
29
|
+
"@deephaven/jsapi-shim": "^0.37.2",
|
|
30
|
+
"@deephaven/jsapi-types": "^0.37.2",
|
|
31
|
+
"@deephaven/jsapi-utils": "^0.37.2",
|
|
32
|
+
"@deephaven/log": "^0.37.2",
|
|
33
|
+
"@deephaven/pouch-storage": "^0.37.2",
|
|
34
|
+
"@deephaven/react-hooks": "^0.37.2",
|
|
35
|
+
"@deephaven/redux": "^0.37.2",
|
|
36
|
+
"@deephaven/storage": "^0.37.2",
|
|
37
|
+
"@deephaven/utils": "^0.37.2",
|
|
38
38
|
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
|
39
39
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
40
40
|
"classnames": "^2.3.1",
|
|
@@ -75,11 +75,11 @@
|
|
|
75
75
|
"update-licenses": "npm-license > licenses.txt"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"@deephaven/eslint-config": "^0.37.
|
|
79
|
-
"@deephaven/mocks": "^0.37.
|
|
80
|
-
"@deephaven/prettier-config": "^0.37.
|
|
81
|
-
"@deephaven/stylelint-config": "^0.37.
|
|
82
|
-
"@deephaven/tsconfig": "^0.37.
|
|
78
|
+
"@deephaven/eslint-config": "^0.37.2",
|
|
79
|
+
"@deephaven/mocks": "^0.37.2",
|
|
80
|
+
"@deephaven/prettier-config": "^0.37.2",
|
|
81
|
+
"@deephaven/stylelint-config": "^0.37.2",
|
|
82
|
+
"@deephaven/tsconfig": "^0.37.2",
|
|
83
83
|
"@vitejs/plugin-react-swc": "^3.2.0",
|
|
84
84
|
"autoprefixer": "^10.4.8",
|
|
85
85
|
"vite": "^4.1.4"
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"publishConfig": {
|
|
88
88
|
"access": "public"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "33c9673e1f523f9dba1f06d13b4a2aa5441c0679"
|
|
91
91
|
}
|