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

@af-mobile/adapters

v0.1.1

Published

AIFlow UI 后端 scheme 适配器(supabase:// 等),peer 依赖 @af-mobile/ui,零 BaaS SDK 强依赖

Readme

@af-mobile/adapters

为 AIFlow UI(@af-mobile/ui)提供数据源适配器。当前内置 Supabasesupabase:// scheme)适配器:把 supabase://table?select=...&filter=... 翻译成 PostgREST 请求,复用 @af-mobile/uifetchPage 原生通道(分页 + total)。

安装

npm i @af-mobile/ui @af-mobile/adapters

peer 依赖 @af-mobile/ui(≥1.4.0,需含 registerBackend / fetchPage)。

用法

import { registerSupabase } from '@af-mobile/adapters';

// 注册 supabase scheme + 鉴权拦截器;返回注销函数
const unregister = registerSupabase({
  anonKey: import.meta.env.VITE_SUPABASE_ANON_KEY, // 也可走环境变量
  getToken: async () => (await getSession())?.access_token, // 可选,用户态
});

之后即可用 supabase:// 形式作为数据源:

supabase://products?select=id,title,price&category=eq.shoes&order=created_at.desc
  • 自动变成 GET {VITE_SUPABASE_URL}/rest/v1/products?...
  • 自动带 Range: {from}-{to} 分页头 + Prefer: count=exact(返回 total

环境变量

| 变量 | 用途 | |---|---| | VITE_SUPABASE_URL | Supabase REST 根地址(必需) | | VITE_SUPABASE_ANON_KEY | anon 公钥(registerSupabase 未传 anonKey 时读取) |

API

| 导出 | 说明 | |---|---| | registerSupabase({ anonKey?, getToken? }) | 注册 supabase backend + request 拦截器,返回注销函数 | | supabaseAdapter(url, opts) | 底层适配器函数(supabase:// → PostgREST 请求) |

当前专注于最常用的 Supabase。增量式扩展其他数据源时将陆续追加。