npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@builder6/steedos

v3.2.12

Published

Builder6 Steedos 模块为 Builder6 平台提供直接的 MongoDB 数据库访问 API,允许管理员用户通过 RESTful 端点对自定义对象及其记录执行完整的 CRUD 操作。

Downloads

1,645

Readme

Builder6 Steedos Module

Builder6 Steedos 模块为 Builder6 平台提供直接的 MongoDB 数据库访问 API,允许管理员用户通过 RESTful 端点对自定义对象及其记录执行完整的 CRUD 操作。

功能特性

  • 直接数据库访问: 通过 REST API 直接访问 MongoDB 数据库
  • 对象管理: 对任意自定义对象进行增删改查操作
  • 高级查询: 支持复杂过滤、排序和分页
  • DevExtreme 集成: 支持 DevExtreme 数据网格的高级查询功能
  • 自动元数据: 自动注入创建者、修改者、时间戳等元数据
  • 权限控制: 所有操作都需要管理员权限保护
  • API 文档: 完整的 Swagger/OpenAPI 文档支持

安装

npm install @builder6/steedos

yarn add @builder6/steedos

主要 API

MongoDB 控制器 (/api/v6/direct)

提供标准的 REST API 操作:

  • POST /api/v6/direct/:objectName: 创建新记录
  • GET /api/v6/direct/:objectName: 查询记录列表
  • GET /api/v6/direct/:objectName/:recordId: 获取单条记录
  • GET /api/v6/direct/:objectName/:fieldName/:fieldValue: 根据字段值查询
  • PUT /api/v6/direct/:objectName/:recordId: 更新单条记录
  • PUT /api/v6/direct/:objectName/updateMany: 批量更新记录
  • PUT /api/v6/direct/:objectName/:fieldName/:fieldValue: 根据字段值更新
  • DELETE /api/v6/direct/:objectName/:recordId: 删除单条记录
  • DELETE /api/v6/direct/:objectName/deleteMany: 批量删除记录
  • DELETE /api/v6/direct/:objectName/:fieldName/:fieldValue: 根据字段值删除

DevExtreme 控制器 (/api/v6/devextreme)

支持 DevExtreme 数据网格的高级查询:

  • GET /api/v6/devextreme/:objectName: DevExtreme 数据网格查询
  • 支持分组、汇总、复杂过滤等高级功能

查询参数

字段选择

GET /api/v6/direct/users?fields=name,email,created

过滤查询

支持 MongoDB 风格的过滤条件:

GET /api/v6/direct/users?filters=[["status","=","active"],["age",">",18]]

排序

GET /api/v6/direct/users?sort=name,-created

分页

GET /api/v6/direct/users?top=20&skip=0

使用示例

在 NestJS 应用中集成

import { Module } from '@nestjs/common';
import { SteedosModule } from '@builder6/steedos';

@Module({
  imports: [SteedosModule],
})
export class AppModule {}

创建记录

curl -X POST http://localhost:5100/api/v6/direct/contacts \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Doe",
    "email": "[email protected]",
    "phone": "1234567890"
  }'

查询记录

curl -X GET "http://localhost:5100/api/v6/direct/contacts?fields=name,email&filters=[[\"name\",\"contains\",\"John\"]]" \
  -H "Authorization: Bearer YOUR_TOKEN"

更新记录

curl -X PUT http://localhost:5100/api/v6/direct/contacts/RECORD_ID \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "0987654321"
  }'

自动元数据注入

每个记录操作会自动注入以下元数据:

  • created_by: 创建者用户 ID
  • modified_by: 修改者用户 ID
  • created: 创建时间
  • modified: 修改时间
  • owner: 所有者用户 ID
  • space: 租户/工作区 ID

权限控制

所有 API 端点都受 AdminGuard 保护,只有管理员用户才能访问这些接口。

依赖项

Peer Dependencies

  • @builder6/core: ^3.0.10 - 核心功能模块
  • @builder6/files: ^3.0.10 - 文件管理模块
  • @builder6/moleculer: ^3.0.10 - 微服务框架
  • @nestjs/common: ^11.0.0 - NestJS 核心
  • @nestjs/core: ^11.0.0 - NestJS 核心
  • @nestjs/swagger: ^11.0.7 - API 文档

开发

构建

npm run build

监听模式

npm run build:watch

格式化代码

npm run format

License

MIT