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

koishi-plugin-assets-filebin-net

v0.2.1

Published

Serve assets on [filebin.net](https://filebin.net/)

Readme

koishi-plugin-assets-filebin-net

npm

基于 filebin.net 的资源转存服务。

文档

https://assets.koishi.chat/zh-CN/api.html

示例用法

import { Context, Schema } from 'koishi'
import { } from '@koishijs/assets'

export const name = 'assets-test'
export const inject = ["assets"]
export interface Config { }

export const Config: Schema<Config> = Schema.object({})

export function apply(ctx: Context) {
  // write your plugin here
  ctx
    .command('测试图床')
    .action(async ({ session }) => {
      const aaa = await ctx.assets.transform(session.content)
      ctx.logger.info(aaa)
      return aaa
    })
}

特性

  • 支持所有文件类型(图片、音频、视频、文档等)上传到 filebin.net
  • 自动文件分组管理(每5天一个存储周期)
  • 安全的 seed 哈希处理,支持任意字符
  • 完整的错误处理和日志记录
  • 符合 Koishi Assets 服务标准

配置

  • endpoint: filebin.net 服务地址(默认:https://filebin.net)
  • seed: 用作保存文件夹名称的种子值,请设置独特的值避免与其他用户冲突(必填)
  • loggerinfo: 是否开启调试日志(默认:false)

使用说明

要使用本插件提供的 assets 服务,你需要先关闭默认开启的 assets-local 插件,然后开启本插件。

重要配置说明

  • seed 值:用于生成唯一的存储文件夹,请设置一个独特的值避免与其他用户冲突
  • 文件分组:文件会按照每5天一个周期自动分组存储
  • 字符支持:seed 值支持任意字符(包括邮箱地址等),插件会自动进行哈希处理确保安全性

工作原理

  1. 插件会根据您的 seed 值生成 MD5 哈希(取前8位)
  2. 结合时间戳生成唯一的 bin 名称
  3. 上传文件到 filebin.net 并获取访问链接
  4. 返回可直接访问的文件 URL

适用场景

本插件特别适用于需要第三方文件存储的场景,如:

  • adapter-iirose 等不支持直接文件上传的适配器
  • 需要减轻服务器存储压力的应用
  • 需要临时文件分享的场景

注意事项

  • filebin.net 是免费服务,请合理使用
  • 上传的文件会有一定的存储期限
  • 建议设置独特的 seed 值以避免与其他用户冲突