@automateinc/fleet-types

中文文档
1.0.151发布于 2026/11/07MITTypeScriptCommonJS构建来源已验证近 30 天下载 5880

Reusable TypeScript types and interfaces for Fleet API.

原始使用文档
文档目录3 节
  1. Installation
  2. Example Usage
  3. Generating tRPC Types

Fleet Types

Reusable TypeScript types and interfaces for Fleet projects.

Installation

To install the package, use npm:

npm i @automateinc/fleet-types

Example Usage

import { IAttendance } from "@automateinc/fleet-types";

Generating tRPC Types

When running the CLI from a consuming project such as fleet-web, configure the Fleet API source and generated type destination in that project's .env:

FLEET_API_PATH=../fleet-api
FLEET_API_TYPES_PATH=api/types.d.ts

Both paths are resolved relative to the directory where the command is run. The generated declaration includes Fleet API's global PrismaJson namespace from prisma/types.d.ts; backend-only dependencies referenced by that namespace are emitted as unknown so the declaration remains portable. Generate the declaration from Fleet API's AppRouter with:

npx @automateinc/fleet-types generate

Inside the fleet-types repository, npm run generate:trpc-types remains available as a convenience alias.

版本与发布记录

@automateinc/fleet-types 共发布 317 个版本,首次发布于 2024/12/18;过去 12 个月发布了 217 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.0.151latest2026/11/07今天
1.0.1502026/11/052 天前
1.0.1492026/11/043 天前
1.0.1482026/11/025 天前
1.0.1472026/11/017 天前
1.0.1462026/10/299 天前

其他发布通道:dev → 1.0.136-dev.80899b3。

关于 @automateinc/fleet-types 的常见问题

@automateinc/fleet-types 是什么?

Reusable TypeScript types and interfaces for Fleet API.

如何安装 @automateinc/fleet-types?

在项目目录运行 npm install @automateinc/fleet-types,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 fleet-types,可以用 npx fleet-types 直接运行。

@automateinc/fleet-types 支持 TypeScript 吗?

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

@automateinc/fleet-types 支持 ESM 还是 CommonJS?

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

@automateinc/fleet-types 可以商用吗?

@automateinc/fleet-types 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@automateinc/fleet-types 的下载量有多少?

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

@automateinc/fleet-types 还在维护吗?

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