@antelopejs/dms-database

中文文档
0.4.2发布于 2026/11/06Apache-2.0TypeScriptCommonJS构建来源已验证近 30 天下载 2280

Database console for the AntelopeJS DMS: schemas, relation diagrams, a data browser and an AQL query console.

原始使用文档
文档目录7 节
  1. What it does
  2. Install
  3. Quick start
  4. Compatibility
  5. Documentation
  6. Contributing
  7. License

@antelopejs/dms-database

npm License Discord Documentation

The database console of the AntelopeJS DMS: schemas, diagrams, rows and queries.

The Database diagram: the tables and relations of a shop schema

What it does

  • Checks the connection and its latency, with one card per registered schema and the largest tables.
  • Lists every table the loaded modules register, with its columns, indexes, relations and a sample row.
  • Draws the tables and relations of a schema, with a layout and notes shared by the whole team.
  • Browses and fixes rows in any instance: edits are staged, reviewed, saved, and can be undone for ten seconds.
  • Runs AQL queries with completion and history, and a dry run before any query that writes.

A saved row shows in place; the page is read again when a save may move rows (a sorted or filtered field, or a search).

The pages and the module's API answer to the platform owner only.

Install

Run the AntelopeJS CLI from the root of a project that already loads @antelopejs/dms:

ajs project modules add @antelopejs/dms-database

Quick start

The module works without configuration. To show the database name on the Overview and label your schemas, add a config block:

// antelope.config.ts
"dms-database": {
  source: { type: "package", package: "@antelopejs/dms-database", version: ">=0.2.0 <1.0.0" },
  config: {
    driverLabel: "MongoDB 8.0",
    schemaLabels: {
      "app-*": { label: "Application", color: "info" },
    },
  },
},

Restart the backend, then the frontend, sign in as the platform owner and open Modules → Database (/modules/database/overview).

Compatibility

PackageSupportedTested with
@antelopejs/interface-api>=0.3.0 <1.0.00.3.0
@antelopejs/interface-api-util>=0.3.0 <1.0.00.3.0
@antelopejs/interface-core>=0.4.0 <1.0.00.4.0
@antelopejs/interface-database>=0.3.1 <1.0.00.3.1
@antelopejs/interface-database-decorators>=0.2.1 <1.0.00.2.1
@antelopejs/interface-dms>=0.12.0 <1.0.00.12.0
@antelopejs/interface-dms-automation>=0.6.1 <1.0.00.6.1

The module also needs a DMS backend in a release that implements the @antelopejs/interface-dms range above, and the @antelopejs/dms-frontend renderer in the range its frontend module declares in engines["@antelopejs/dms-frontend"] of frontend-vue/package.json; the ajs dms CLI refuses to build it with a renderer outside that range, and an @antelopejs/interface-database implementation, such as @antelopejs/mongodb.

Documentation

The canonical guide lives in docs/, including the supported extension boundary. There is no separate DMS Database interface package. The package also ships the dms-database Claude Code skill in skills/, declared under antelopeJs.skills.

Contributing

Read CONTRIBUTING.md before opening a pull request. The playground registers a demo schema and a shop schema with eu and us instances, seeded on first start. It runs on MongoDB by default; set PLAYGROUND_DATABASE=postgres to run it on PostgreSQL through @antelopejs/postgres, with POSTGRES_URL naming the database (default postgres://postgres@localhost:5432/playground_dms_database, which must exist).

One root install includes the backend and shipped Vue module, retaining their separate lockfiles. The playground remains independent: run pnpm --dir playground install --ignore-workspace --frozen-lockfile before starting it. Use the root scripts below rather than recursive scripts: frontend build and typecheck need the playground or a generated Inertia workspace, and root lint already checks the Vue module.

pnpm install
pnpm dev            # playground backend
pnpm frontend:dev   # dashboard, in a second terminal
pnpm lint
pnpm typecheck
pnpm test
Repository notes
  • The module registers its Vue 3 frontend through frontend-vue/dms.frontend.ts, under the DmsDatabase component prefix: app/components/DataBrowser.vue is the DmsDatabaseDataBrowser the backend page names. The pages are declared in src/pages, as DMS blocks plus the module's own components. Everything under frontend-vue/app/build is private to the layer and imported by path.
  • Run pnpm test:layer for the frontend tests and pnpm test:frontend to build and typecheck a generated Inertia app. Set DMS_FRONTEND_WORKSPACE to a generated Inertia workspace before running pnpm --dir frontend-vue typecheck.
  • DMS_SOURCE=/absolute/path/to/dms pnpm test tests against a local DMS runtime with disposable MongoDB and filesystem storage. Only the test harness loads that runtime; the types come from @antelopejs/interface-dms.
  • docs/design/redesign-v2-grill.md records the decisions behind the v2 redesign.

License

Apache-2.0

版本与发布记录

@antelopejs/dms-database 共发布 26 个版本,首次发布于 2026/09/17;过去 12 个月发布了 26 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.4.2latest2026/11/061 天前
0.4.12026/11/052 天前
0.4.02026/11/025 天前
0.3.12026/10/2414 天前
0.3.02026/10/2315 天前
0.2.32026/10/2018 天前

关于 @antelopejs/dms-database 的常见问题

@antelopejs/dms-database 是什么?

Database console for the AntelopeJS DMS: schemas, relation diagrams, a data browser and an AQL query console.

如何安装 @antelopejs/dms-database?

在项目目录运行 npm install @antelopejs/dms-database,或使用 pnpm add / yarn add / bun add。

@antelopejs/dms-database 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@antelopejs/dms-database 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@antelopejs/dms-database 可以商用吗?

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

@antelopejs/dms-database 的下载量有多少?

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

@antelopejs/dms-database 还在维护吗?

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