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

aurabase-js

v0.7.2

Published

AuraBase client library - Supabase-style SDK for AuraBase

Downloads

84

Readme

aurabase-js

AuraBase JavaScript/TypeScript 클라이언트 - Supabase 스타일의 SDK

설치

npm install aurabase-js
# 또는
yarn add aurabase-js
# 또는
pnpm add aurabase-js

사용법

클라이언트 생성

import { createClient } from 'aurabase-js'

const aurabase = createClient({
  url: 'http://localhost:8000', // 또는 배포된 URL
  anonKey: 'your-anon-key'
})

데이터 조회 (SELECT)

// 전체 조회
const { data, error } = await aurabase
  .from('todos')
  .select('*')

// 특정 컬럼 선택
const { data, error } = await aurabase
  .from('todos')
  .select('id, title, completed')

// 필터링
const { data, error } = await aurabase
  .from('todos')
  .select('*')
  .eq('completed', false)
  .order('created_at', { ascending: false })
  .limit(10)

// 단일 결과
const { data, error } = await aurabase
  .from('todos')
  .select('*')
  .eq('id', 1)
  .single()

데이터 삽입 (INSERT)

// 단일 행 삽입
const { data, error } = await aurabase
  .from('todos')
  .insert({ title: '새 할일', completed: false })

// 여러 행 삽입
const { data, error } = await aurabase
  .from('todos')
  .insert([
    { title: '할일 1', completed: false },
    { title: '할일 2', completed: true }
  ])

데이터 수정 (UPDATE)

const { data, error } = await aurabase
  .from('todos')
  .update({ completed: true })
  .eq('id', 1)

데이터 삭제 (DELETE)

const { data, error } = await aurabase
  .from('todos')
  .delete()
  .eq('id', 1)

Upsert

const { data, error } = await aurabase
  .from('todos')
  .upsert({ id: 1, title: '업데이트된 할일', completed: true })

인증 (Auth)

로그인

const { data, error } = await aurabase.auth.signInWithPassword({
  email: '[email protected]',
  password: 'password123'
})

if (data) {
  console.log('로그인 성공:', data.user)
  console.log('액세스 토큰:', data.session.access_token)
}

회원가입

const { data, error } = await aurabase.auth.signUp({
  email: '[email protected]',
  password: 'password123',
  username: 'myusername'
})

로그아웃

await aurabase.auth.signOut()

현재 사용자 조회

const { data: { user } } = await aurabase.auth.getUser()

인증 상태 변경 감지

const { data: { subscription } } = aurabase.auth.onAuthStateChange((event, session) => {
  if (event === 'SIGNED_IN') {
    console.log('로그인됨:', session?.user)
  } else if (event === 'SIGNED_OUT') {
    console.log('로그아웃됨')
  }
})

// 구독 해제
subscription.unsubscribe()

비밀번호 재설정

await aurabase.auth.resetPasswordForEmail('[email protected]')

필터 메서드

| 메서드 | 설명 | 예시 | |--------|------|------| | .eq(column, value) | 같음 | .eq('status', 'active') | | .neq(column, value) | 같지 않음 | .neq('status', 'deleted') | | .gt(column, value) | 초과 | .gt('age', 18) | | .gte(column, value) | 이상 | .gte('age', 18) | | .lt(column, value) | 미만 | .lt('price', 100) | | .lte(column, value) | 이하 | .lte('price', 100) | | .like(column, pattern) | LIKE 패턴 | .like('name', '%John%') | | .ilike(column, pattern) | 대소문자 구분 없는 LIKE | .ilike('email', '%@gmail.com') | | .in(column, values) | 값 목록 중 하나 | .in('id', [1, 2, 3]) | | .isNull(column) | NULL | .isNull('deleted_at') | | .isNotNull(column) | NOT NULL | .isNotNull('email') |

RPC (원격 함수 호출)

const { data, error } = await aurabase.rpc('my_function', {
  arg1: 'value1',
  arg2: 'value2'
})

TypeScript 지원

interface Todo {
  id: number
  title: string
  completed: boolean
  created_at: string
}

// 타입 지정
const { data, error } = await aurabase
  .from<Todo>('todos')
  .select('*')

// data는 Todo[] 타입으로 추론됨

라이선스

MIT