惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
量子位
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
J
Java Code Geeks
B
Blog
V
V2EX
博客园 - 三生石上(FineUI控件)
Blog — PlanetScale
Blog — PlanetScale
aimingoo的专栏
aimingoo的专栏
Y
Y Combinator Blog
F
Fortinet All Blogs
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
A
About on SuperTechFans
D
DataBreaches.Net
阮一峰的网络日志
阮一峰的网络日志
博客园 - Franky
H
Help Net Security
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
酷 壳 – CoolShell
酷 壳 – CoolShell
MongoDB | Blog
MongoDB | Blog
L
LangChain Blog

Deno

Deno 2.8 | Deno Claw Patrol: an open-source security firewall for agents | Deno Fresh 2.3: Zero JS by default, View Transitions, and Temporal support | Deno Deno 2.7: Temporal API, Windows ARM, and npm overrides | Deno Build a dinosaur runner game with Deno, pt. 6 | Deno Build a dinosaur runner game with Deno, pt. 5 | Deno Deno Deploy is Generally Available | Deno Introducing Deno Sandbox | Deno Build a dinosaur runner game with Deno, pt. 4 | Deno Build a dinosaur runner game with Deno, pt. 3 | Deno Build a dinosaur runner game with Deno, pt. 2 | Deno React / Next.js Denial-of-Service Vulnerability: Deno Deploy users protected | Deno Deno 2.6: dx is the new npx | Deno Build a dinosaur runner game with Deno, pt. 1 | Deno React Server Functions / Next.js Vulnerability: Deno Deploy users protected | Deno My highlights from the new Deno Deploy | Deno Deno's Other Open Source Projects | Deno How Deno protects against npm exploits | Deno Help Us Raise $200k to Free JavaScript from Oracle | Deno Deno 2.5: Permissions in the config file | Deno Fresh 2.0 Graduates to Beta, Adds Vite Support | Deno Deno 2.4: deno bundle is back | Deno JavaScript™ Trademark Update | Deno What's coming to JavaScript | Deno A brief history of JavaScript | Deno Reports of Deno's Demise Have Been Greatly Exaggerated | Deno An Update on Fresh | Deno How Plaid migrated 100 services to a new database platform 5x faster with Deno | Deno Deno 2.3: Improved deno compile, local npm packages, and more | Deno Add JSR packages with pnpm and Yarn | Deno
Announcing Supabase on JSR | Deno
Andy Jiang · 2024-07-16 · via Deno

JSR is a modern open source JavaScript registry that simplifies publishing and importing JavaScript and TypeScript modules. JSR supports publishing TypeScript source code, auto-generating documentation and type definition files, provenance attestation for more security, and can be used with npm-like package managers. Since its launch, over 250 new packages are being published each week.

We’re thrilled to announce that Supabase’s JavaScript client library is now available on JSR.

Supabase, a popular Postgres powered open source Firebase alternative, offers managed services for building applications. Their JavaScript library, supabase-js, is composed of many sub-clients that let you query your Supabase database, subscribe to real-time events, upload and download files, manage auth, invoke Deno powered Edge Functions, and more. It’s fully isomorphic and can be used across any environment that speaks JavaScript and HTTPS, such as browsers, servers, and the edge!

Using Supabase via JSR offers an excellent developer experience, with first class TypeScript support, auto-generated documentation accessible in your code editor, and more.

Installing Supabase

You can get started with Supabase using the deno add command:

deno add @supabase/supabase-js

The above will generate a deno.json file, listing all your project dependencies:



{
  "imports": {
    "@supabase/supabase-js": "jsr:@supabase/supabase-js@2"
  }
}

You can also use npm:

npx jsr add @supabase/supabase-js

This will create a package.json for use with Node and Bun.

You can then import the client library to your main.ts file:

import { createClient } from "@supabase/supabase-js";

const supabase = createClient(
  "https://xyzcompany.supabase.co",
  "public-anon-key",
);

console.log("Supabase Instance: ", supabase);

Finally, you can run the following command to execute:

​​deno run -A main.ts

Check out the supabase-js README to see how to use it in other environments.

What’s next?

With the Supabase client on JSR, you can easily and quickly add authentication or persistent storage to your project, which can run in any JavaScript environment.

🚨️ Read more about JSR 🚨️