@deephaven/code-studio

中文文档
1.33.2发布于 2026/11/12Apache-2.0ES Module构建来源已验证近 30 天下载 8450

Deephaven Code Studio

原始使用文档
文档目录14 节
  1. Running
  2. Project Settings
  3. VITE_CORE_API_URL
  4. VITE_LOG_LEVEL
  5. VITE_ENABLE_LOG_PROXY
  6. Data Storage
  7. Redux Data
  8. Workspace Data
  9. Mock API
  10. Styleguide/Component Development
  11. Architecture
  12. Dashboards
  13. Panels
  14. Learn More

Introduction

Code Studio is a web application that connects to a running deephaven-core instance. You can quickly bring up a Deephaven backend from pre-built images. A few notes to get developers quickly up and running.

Running

To start the Code Studio, run npm install and npm start in the root directory of this repository. See the Getting Started section for more details.

Project Settings

Project specific settings are stored in the .env file. There is also an .env.development file which is only loaded in development builds, and .env.development.local which is only for local builds. For local development, you should be modifying .env.development.local. For more information on .env, see Vite docs. Below are some of the common properties which are configurable in the .env file.

VITE_CORE_API_URL

One common setup is to override the API server URL to point to another server. For example, add the following block to .env.development.local to have npm start point to a remote server for the API:

VITE_CORE_API_URL=https://www.myserver.com/jsapi

VITE_LOG_LEVEL

Printing detailed logs when debugging can be handy. The highest level of logging is already set in your .env.development file. You can change it in .env.development.local if desired.

VITE_LOG_LEVEL=2 # Warn/Error

See @deephaven/log for more details on the logger.

VITE_ENABLE_LOG_PROXY

Set to true or false

Turns on the logger proxy which captures log messages so users can easily export debug info for us. Enabling this will affect the line numbers shown in the console. Defaults to false in development and true in production.

In development, DHLogProxy and DHLogHistory are added to the window so they can be manipulated directly from the console if needed. DHLogProxy.enable() will capture and emit events for all logging events. DHLogHistory.enable() will attach event listeners to the DHLogProxy events. Both also have a disable method.

Data Storage

There is the data for the current session stored in the local redux state (Redux Data), and data persisted between sessions is stored in browser storage.

Redux Data

The application stores data locally for the current session using Redux. Take a look in the src/redux/reducers/index.js file for comments on the general structure and what's stored, and go into individual reducers to get the details about the data being stored.

You can also use the Chrome Redux DevTools to inspect live in a development or production environment: https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en

The state transitions are also logged in the browser developer console in develop builds.

Workspace Data

Workspace data is stored in the browsers localStorage. See LocalWorkspaceStorage for implementation details.

Mock API

While developing, you may want to test specific cases that can be cumbersome to test against a real stack. You can run the mock API implementation in public/__mocks__/dh-core.js by executing npm run mock command. This mock is also used for unit tests. When new functions are added to the API, ideally stubs returning a generic success case should be added to the mock API as well to avoid breakage when running the mock.

Styleguide/Component Development

When running in development mode (npm run start), a style guide is served up at http://localhost:4000/ide/styleguide. Styleguide can be used to develop components. The styleguide displays many common components and how to use them. When creating a new component, it should be added to the styleguide. Note that the styleguide is lazy loaded in AppRouter, so it should not increase the main app bundle size.

Architecture

For more details on the sockets and ports used, see Network Services and Web API in our docs.

Dashboards

The main layout of the app is based on Dashboards, which is essentially a top level tab the user has open. Before a Dashboard is loaded, it is simply a LazyDashboard. Once activated, it will load it's layout into Golden Layout. It's layout is composed of numerous Panels (see below). Each DashboardContainer listens for TabEvents from the higher level app, and for panel events emitted on the Golden Layout EventHub.

Panels

Each Dashboard is composed of panels. There are many different kinds of panels, such as IrisGridPanel, ChartPanel, MarkdownPanel, and ConsolePanel. Each panel should save a dehydrated state that can be serialized and saved in the database, then deserialized and hydrated when opening a dashboard. The dehydration/hydration step is defined in DashboardContainer with makeHydrateComponentPropsMap and dehydrateClosedComponentConfigMap.

Initial Project Setup

This project uses Vite.

Learn More

You can learn more in the Vite documentation.

To learn React, check out the React documentation.

Legal Notices

Deephaven Data Labs and any contributors grant you a license to the content of this repository under the Apache 2.0 License, see the LICENSE file.

版本与发布记录

@deephaven/code-studio 共发布 1,165 个版本,首次发布于 2021/04/29;过去 12 个月发布了 80 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.33.2latest2026/11/121 天前
1.33.2-alpha-stable-schema.a01e7df.0.sha-a01e7df2026/11/121 天前
1.33.2-alpha-stable-schema.c7313ff.0.sha-c7313ff2026/11/121 天前
1.28.1-20261111-DH-24300-hotfix.2334924.0.sha-23349242026/11/121 天前
1.33.12026/11/058 天前
1.33.02026/11/0310 天前

其他发布通道:v0.6 → 0.6.4,v0.38 → 0.38.1,v0.31 → 0.31.6,v0.41 → 0.41.6,v0.99 → 0.99.2,v0.13 → 0.13.14。

关于 @deephaven/code-studio 的常见问题

@deephaven/code-studio 是什么?

Deephaven Code Studio

如何安装 @deephaven/code-studio?

在项目目录运行 npm install @deephaven/code-studio,或使用 pnpm add / yarn add / bun add。

@deephaven/code-studio 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/deephaven__code-studio 是否存在。

@deephaven/code-studio 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@deephaven/code-studio 可以商用吗?

@deephaven/code-studio 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@deephaven/code-studio 的下载量有多少?

根据 npm 官方下载统计,@deephaven/code-studio 在 2026/10/12 – 2026/11/10 这 30 天内被下载 8,450 次,日均约 282 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@deephaven/code-studio 还在维护吗?

最新版本 1.33.2 发布于 2026/11/12(1 天前);至今共发布 1165 个版本,其中过去 12 个月发布了 80 个;首次发布于 2021/04/29。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。