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

@h-ai/deploy

v0.1.0-alpha.10

Published

Hai Framework deployment automation module.

Readme

@h-ai/deploy

自动化部署模块,支持一键将 SvelteKit 应用部署到 Vercel,并自动开通所需的基础设施服务。

支持的服务

| 服务类型 | Provisioner | 说明 | | -------- | ------------- | --------------------- | | 部署 | Vercel | SvelteKit 应用部署 | | 数据库 | Neon | PostgreSQL Serverless | | 缓存 | Upstash | Redis REST API | | 存储 | Cloudflare R2 | S3 兼容对象存储 | | 邮件 | Resend | 邮件发送 API | | 短信 | 阿里云 | 阿里云短信服务 |

快速开始

import { deploy } from '@h-ai/deploy'

// 初始化
await deploy.init({
  provider: { type: 'vercel', token: 'vel_xxx' },
  services: {
    db: { provisioner: 'neon', apiKey: 'neon_xxx' },
    cache: { provisioner: 'upstash', email: '[email protected]', apiKey: 'up_xxx' },
  },
})

// 扫描应用依赖
const scan = await deploy.scan('./apps/my-app')

// 开通基础设施
const provisions = await deploy.provisionAll('my-app')

// 完整部署
const result = await deploy.deployApp('./apps/my-app')

await deploy.close()

配置

通过 config/_deploy.yml 管理 git 安全的配置,密钥存放在 ~/.hai/credentials.yml

# config/_deploy.yml
provider:
  type: vercel
  token: ${HAI_DEPLOY_VERCEL_TOKEN}

services:
  db:
    provisioner: neon
    apiKey: ${HAI_DEPLOY_NEON_API_KEY}
  cache:
    provisioner: upstash
    email: ${HAI_DEPLOY_UPSTASH_EMAIL}
    apiKey: ${HAI_DEPLOY_UPSTASH_API_KEY}

错误处理

const result = await deploy.deployApp('./apps/my-app')
if (!result.success) {
  switch (result.error.code) {
    case HaiDeployError.PROVIDER_AUTH_FAILED.code:
      // Vercel Token 无效
      break
    case HaiDeployError.BUILD_FAILED.code:
      // 构建失败
      break
  }
}

常用错误码:

| 错误码 | code | 说明 | | --------------------------------- | ---------------- | ------------ | | HaiDeployError.DEPLOY_FAILED | hai:deploy:001 | 部署失败 | | HaiDeployError.BUILD_FAILED | hai:deploy:002 | 构建失败 | | HaiDeployError.AUTH_FAILED | hai:deploy:005 | 认证失败 | | HaiDeployError.PROVISION_FAILED | hai:deploy:006 | 资源开通失败 | | HaiDeployError.NOT_INITIALIZED | hai:deploy:010 | 未初始化 |

测试

pnpm --filter @h-ai/deploy test

License

Apache-2.0