open-index/open-npm huggingface dataset:
npm package: @onsetio/browser
Description: Official Sentry SDK for Browsers
Latest version: 1.0.1

<a href="https://www.onset.io/?utm_source=github&utm_medium=logo" target="_blank">
  <img src="https://www.onset.io/logo.png" alt="Onset" height="84">
</a>

# Official Onset SDK for Browsers

[![npm version](https://img.shields.io/npm/v/@onsetio/browser.svg)](https://www.npmjs.com/package/@onsetio/browser)

Used for loading public releases.

## Installation and Usage

Simply install the package:

```sh
npm install --save @onsetio/browser
yarn add @onsetio/browser
```

Setup and usage of these SDKs always follows the same principle.

```js
import { loadPage } from "@onsetio/browser";

const page = await loadPage("__PAGE_SLUG__");
const releases = page.releases();
```
npm package: @onsetio/node
Description: Official Onset SDK for Node.js
Latest version: 2.0.1

<a href="https://www.onset.io/?utm_source=github&utm_medium=logo" target="_blank">
  <img src="https://www.onset.io/logo.png" alt="Onset" height="84">
</a>

# Official Onset SDK for Node.js

[![npm version](https://img.shields.io/npm/v/@onsetio/node.svg)](https://www.npmjs.com/package/@onsetio/node)
[![Documentation](https://img.shields.io/badge/documentation-onset.io-green.svg)](https://onset.readme.io/reference/introduction)

Used for loading public and private releases.

## Installation and Usage

Simply install the package:

```sh
npm install --save @onsetio/node
yarn add @onsetio/node
```

Setup and usage of these SDKs always follows the same principle.

```js
import OnsetAPI from "@onsetio/node";

const onsetSDK = new OnsetAPI("__API_KEY__");
const releases = onsetSDK.releases.list();
```
npm package: @onsetio/widget
Description: Official Onset SDK for Widget Embed
Latest version: 2.0.0

<a href="https://www.onset.io/?utm_source=github&utm_medium=logo" target="_blank">
  <img src="https://www.onset.io/logo.png" alt="Onset" height="84">
</a>

# Official Onset SDK for Widget Embed

[![npm version](https://img.shields.io/npm/v/@onsetio/widget.svg)](https://www.npmjs.com/package/@onsetio/widget)
[![Documentation](https://img.shields.io/badge/documentation-onset.io-green.svg)](https://docs.onset.io/developers/webhooks)

We recommend that you should always be loaded the Widget.js script directly from https://widget.onset.io/widget.js, rather than including it in a bundle or host yourself. If must bundle the Widget code into your application, you can use this package.

## Installation and Usage

Simply install the package:

```bash
npm install --save @onsetio/widget
yarn add @onsetio/widget
```

Setup and usage of these SDKs always follows the same principle.

```js
import Widget from "@onsetio/widget";

const widgetInstance = new Widget({
  page: "__PAGE_HOST__",
  // ...
});
```

## Embed via CDN

```html
<script>
  window.onsetWidgetSettings = {
    triggerText: "🔔 What's New",
    page: "__PAGE_HOST__",
    // ...
  };

  (function (e, t) {
    e.onsetWidget = {};
    e.onsetWidget.on = function () {
      (e.onsetWidget.$ = e.onsetWidget.$ || []).push(arguments);
    };
    var c = t.getElementsByTagName("script")[0],
      i = t.createElement("script");
    i.async = true;
    i.src = "https://widget.onset.io/widget.js";
    c.parentNode.insertBefore(i, c);
  })(window, document);
</script>
```
npm package: @onsetsoftware/automerge-repo-network-supabase
Description: A Supabase network adapter for automerge-repo.
Latest version: 0.1.0

# Automerge Repo Network Supabase

A Supabase network adapter for [automerge-repo](https://github.com/automerge/automerge-repo). It comprises a client library for the browser and a Deno package for use in a Supabase edge function.

> **Warning**
> This package is under active development and is not quite ready for production use. However, it is fully intended to be used in production soon. Please feel free to try it out and report any issues you find.

## Client

### Installation

```bash
npm install @onsetsoftware/automerge-repo-network-supabase
```

### Usage

```typescript

import { SupabaseNetworkAdapter } from '@onsetsoftware/automerge-repo-network-supabase';
import { createClient } from "@supabase/supabase-js";
export { v4 as uuid } from "uuid";

// create a supabase client with your public URL and anon key
const supabase = createClient({SUPABASE_PUBLIC_URL}, {SUPABASE_ANON_KEY});

// create a network adapter with the supabase client and the name of supabase edge function you are using
const supabaseAdapter = new SupabaseNetworkAdapter(supabase, "changes");

// pass the adapter to the repo
const repo = new Repo({
  storage: new LocalForageStorageAdapter(),
  network: [
    supabaseAdapter,
  ],
  // we need to use uuids as the peerId is stored as a uuid type in the database
  peerId: uuid() as PeerId
});

// use the repo as normal
```

## Edge Function

### Usage

```typescript

import { serve } from "https://deno.land/std@0.175.0/http/server.ts"

import { defaultCorsHeaders, handleRequest } from "https://deno.land/x/automerge_repo_network_supabase@v0.1.0/mod.ts";

serve(async (req) => {
  if (req.method === "OPTIONS") {
    return new Response("ok", { headers: defaultCorsHeaders });
  }
  
  return handleRequest(req);
});

```

## Database Setup

You will need to create a documents table in your Supabase database and ensure that realtime replication is enabled.

An example migration file can be found in the [migration.example.sql](./migration.example.sql) file.