open-index/open-npm huggingface dataset:
npm package: @oselvar/cloudflare-workflow-events
Description: Subscribe to events from Cloudflare Workflows
Author: Aslak Hellesøy
Latest version: 0.2.0

# cloudflare-workflow-events

The `cloudflare-workflow-events` exposes a Server-Sent Events endpoint that emits events about the progress of a workflow.

For example:

```
event: started
data: {"step":"first step","timestamp":"2025-06-30T13:43:26.690Z","error":null}

event: completed
data: {"step":"first step","timestamp":"2025-06-30T13:43:28.688Z","error":null}

event: started
data: {"step":"second step","timestamp":"2025-06-30T13:43:28.689Z","error":null}

event: completed
data: {"step":"second step","timestamp":"2025-06-30T13:43:31.687Z","error":null}

event: started
data: {"step":"third step","timestamp":"2025-06-30T13:43:31.688Z","error":null}

event: completed
data: {"step":"third step","timestamp":"2025-06-30T13:43:32.689Z","error":null}
```

## Try out the example

Start the example:

    # Terminal 1
    npm start

Start a workflow:

    curl -v -X POST http://localhost:9875

Listen to events (using the `Location` header)

    curl http://localhost:9875/cbd3f7a0-e9ee-422d-8d33-9db7383dba2c/sse

The workflow will wait for events. Trigger one:

    curl -X POST http://localhost:9875/cbd3f7a0-e9ee-422d-8d33-9db7383dba2c/event

## Motivation

The library was built for https://openartmarket.com/ to display progress on a purchase. The purchase workflow takes up to a minute, and we wanted to give users a way to monitor the progress of their purchase.
npm package: @oselvar/connector-jira
Description: Oselvar Connector for JIRA
Author: Aslak Hellesøy
Latest version: 0.1.0

# Oselvar JIRA Connector

Library and command line tool to generate [Oselvar CSV](https://github.com/oselvar/connector/#oselvar-csv) from a 
JIRA project.

## Get a JIRA token

Generate a new [API Token](https://id.atlassian.com/manage-profile/security/api-tokens) and label it `oselvar`.
Store this safely and assign it to a `JIRA_TOKEN` environment variable.

## Usage

Start by running the connector once without specifying stages:

    oselvar-jira --email $JIRA_EMAIL --token $JIRA_TOKEN --url $JIRA_URL --key $JIRA_KEY

The first line of the generated CSV will look something like this:

```csv
id,name,13257-Development,13269-Next,13258-Deployed,13261-Development Done
```

* Open a text editor and paste the line in there
* Remove the `id` and `name` columns
* Reorder the values so they reflect the stages on your board (You may want to remove some stages that are not part of your workflow).

Now you'll have something like this:

```csv
13269-Next,13257-Development,13261-Development Done,13258-Deployed
```

The next thing to do is to map these values to something more readable, by adding a `:` followed by the name you want in the CSV.

```csv
13269-Next:Next,13257-Development:Development,13261-Development Done:Development Done,13258-Deployed:Deployed
```

Now you can run the connector again:

    oselvar-jira --email $JIRA_EMAIL --token $JIRA_TOKEN --url $JIRA_URL --key $JIRA_KEY \
      --stages "13269-Next:Next,13257-Development:Development,13261-Development Done:Development Done,13258-Deployed:Deployed"

You should now get a CSV with the following headers

```csv
id,name,Next,Development,Development Done,Deployed
```

That's it!
npm package: @oselvar/n8n-nodes-tripletex-credentials
Description: n8n node repository to create custom credentials for Tripletex to be used with the HTTPRequest node
Author: Boye Holden
Latest version: 0.1.6

# n8n-nodes-tripletex-credentials

This is an n8n community node. It lets you use Tripletex API with the default HTTP Request node in your n8n workflows.

[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.

[Installation](#installation)
[Credentials](#credentials)
[Compatibility](#compatibility)
[Usage](#usage)
[Resources](#resources)

## Installation

Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.

## Credentials

[Sign up](https://developer.tripletex.no/contact-us/) for usage of Tripletex API is prerequisite to use the Tripletex API credentials.
After you have recieved your consumer token, log in with a user with apropriate rights and create a employee token.
To use the api start using a new predefined credential type of type Tripletex API inside the HTTP Request node.

## Compatibility

* Minimum n8n version v1.4 (what was tested, will possibly work with lower versions)

## Usage

_This is an optional section. Use it to help users with any difficult or confusing aspects of the node._

_By the time users are looking for community nodes, they probably already know n8n basics. But if you expect new users, you can link to the [Try it out](https://docs.n8n.io/try-it-out/) documentation to help them get started._

## Resources

* [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
* [Tripletex API documentation](https://tripletex.no/v2-docs)
npm package: @oselvar/noflare
Description: Test helpers for Cloudflare Workers
Author: Aslak Hellesøy
Latest version: 1.1.2

# Noflare

Noflare is a a drop-in replacement for selected Cloudflare Workers features
that makes it easier to test Cloudflare Worker applications.

Noflare does not use a local wrangler/miniflare session and does not depend on the Cloudflare runtime.

## Motivation

The library was created to make Cloudflare Workflows easier to test.
In particular:

- Idempotency
- Pause/Resume of workflows (not implemented in wrangler/miniflare)

## Workflows

Cloudflare Workflows embody critical business logic that is important to test.

It's _particularly_ important to test that all the steps are [idempotent](https://developers.cloudflare.com/workflows/build/rules-of-workflows/#ensure-apibinding-calls-are-idempotent).

It's also important to test that workflows can run concurrently.

Workflows typically communicate with external services, and mocking those is non-trivial
when the tests run in one process and the workflow in another.

We wanted a way to test Workflows where the tests and the workflow run in the same process.
This makes it easier to stub external services and verify how the workflow interacts with them.

Another reason we wanted to run them in the same process is that we want a sub-second
feedback cycle.

Noflare achieves this by providing a mechanism to inject stub adapters for external services.

Just write your workflows as normal with the following changes:

1. Replace the import of `cloudflare:workers` with `@oselvar/noflare`
2. Replace the use of `this.env` with `this.adapters` - see
3. Use `createCloudflareWorkflow` to convert your Noflare Workflow to a Cloudflare Workflow

See [CalculateCubeWorkflow.ts](./src/examples/CalculateCubeWorkflow.ts) for an example.

Try it out interactively

    # Terminal 1
    npm start

    # Terminal 2
    curl http://localhost:9875?value=3

    ## Replace id with the response from the first request
    curl http://localhost:9875?instanceId=id

Now, let's test it:

    npx vitest

### Tips

Noflare might highlight idempotency bugs in your workflows.
Here are some tips to help make them idempotent:

- Avoid nested if statements and loops around workflow steps.
- Visualize your workflows with `@oselvar/c4`. (Coming soon).
- If you use D1 (Sqlite), `UNIQUE` constraints might help you avoid inserting duplicate data.
npm package: @oselvar/ssetarget
Description: Dispatch Server-Sent Events
Author: Aslak Hellesøy
Latest version: 2.0.1

# SSETarget

The `@oselvar/ssetarget` module exposes a simple API for dispatching Server-Sent Events to `EventSource` clients.
Events are persisted, allowing clients to receive previous events - with support for the `Last-Event-ID` header.

Dispatch events:

```typescript
const eventStore = new MemoryEventStore(); // Or use RedisEventStore
const sse = new SSETarget("/sse", eventStore);

await sse.dispatchEvent({
  type: "started",
});
```

Serve Server-Sent Events:

```typescript
function handleRequest(req: Request) {
  return sse.fetch(req);
}
```

## Cloudflare Workflow events

The library was originally developed to emit Server-Sent Events about the progress of [Cloudflare Workflows](https://developers.cloudflare.com/workflows/).

This allows `EventSource` clients to be notified as workflow steps are started and completed (or failed).

See the `./src/examples` directory and `./wrangler.toml` for details.

### Try out the example

Start the example:

    # Terminal 1
    npm start

Start a workflow:

    curl -v -X POST http://localhost:9875

Listen to events (using the ID from the `Location` header)

    curl http://localhost:9875/cbd3f7a0-e9ee-422d-8d33-9db7383dba2c/sse

The workflow will run some steps and emit SSEs, then wait for a workflow event.
Trigger one to make the workflow resume:

    curl -X POST http://localhost:9875/cbd3f7a0-e9ee-422d-8d33-9db7383dba2c/event
npm package: @osenco/africastalking
Description: M-Pesa API typescript SDK
Author: Osen Concepts
Latest version: 0.1.1

# Africa's Talking TypeScript Package

## Install

```bash
yarn add '@osenco/africastalking'
```

## Initialize

```typescript
import { AfricasTalking }, ATConfig from '@osenco/africastalking'

const at = new AfricasTalking({
    username: '',
    apiKey: '',
    from: ''
})
```

## Send SMS

### Send one message to one 

```typescript
at.sms('Hello there').to(254705459494).send();
```

### Send one message to many

```typescript
at.smsMany('Hello there').to([254705459494, 254115911301]).send();
```

### Send unique messages

### With template

```typescript
at.smsManyTemplate('Hello there', {name, amount}).to([254705459494, 254115911301]).send();
```

### Predefined

```typescript
at.smsManyDefine({'254705459494':'Hello there']).send();
```

## Check balance

```typescript
const balance = at.balance()
```
npm package: @osenco/bootstraps
Description: Component library to bootstrap Vue Projects
Author: Osen Concepts
Latest version: 0.1.1

# bootstraps
Utility components to bootstrap Vue apps

## Project setup
```
yarn install
```

### Compiles and hot-reloads for development
```
yarn serve
```

### Compiles and minifies for production
```
yarn build
```

### Run your unit tests
```
yarn test:unit
```

### Run your end-to-end tests
```
yarn test:e2e
```

### Lints and fixes files
```
yarn lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
npm package: @osener/bs-atdgen-codec-runtime
Description: Runtime for using [atdgen](https://github.com/mjambon/atd/) and [BuckleScript](https://bucklescript.github.io/) together.
Author: Ozan Sener
Latest version: 0.1.0

# atdgen-codec-runtime
Runtime for using
[atdgen](https://github.com/mjambon/atd/) and
[BuckleScript](https://bucklescript.github.io/) together.

## Installation
```sh
$ yarn add @osener/atdgen-codec-runtime
```

Then add @glennsl/bs-json to bs-dependencies in your bsconfig.json:

```json
{
  ...
  "bs-dependencies": ["@osener/atdgen-codec-runtime"]
}
```

You will also need development version of atdgen:

```sh 
$ opam pin add --yes https://github.com/mjambon/atd.git
```

## Usage
Create an `.atd` file:

```ml
(* protocol.atd *)

type pet = [
  | Cat of string
  | Dog of string    
  ]

type person =
  { name : string
  ; age : int
  ; ~student : bool
  ; ?pet : pet option 
  }

type request =
  [ Greeting of person ]

```

Use `atdgen` to generate your types and BuckleScript parsers:
```sh
# Generate protocol_t.[ml/mli] and protocol_bs.[ml/mli] 
$ atdgen -t protocol.atd && atdgen -bs -open Protocol_t protocol.atd
$ atdgen -bs -open Protocol_t protocol.atd
```

Finally, use the generated modules for parsing and serialization:
### OCaml
```ml
(** Parse JSON string *)
let () =
  let request =
    {| ["Greeting",{"name":"Turner","age":33,"pet":["Dog","Hooch"]}] |}
    |> Json.parseOrRaise
    |> Atdgen_codec_runtime.Decode.decode Protocol_bs.read_request
  in
  match request with `Greeting {name; _} -> Js.log ("Hi " ^ name ^ "!")


(** Serialize [request] as JSON *)
let () =
  let request =
    `Greeting
      { Protocol_t.name = "Turner"
      ; age = 33
      ; student = false
      ; pet = Some (`Dog "Hooch") }
  in
  request
  |> Atdgen_codec_runtime.Encode.encode Protocol_bs.write_request
  |> Json.stringify
  |> Js.log2 "JSON:"
```

### Reason

```reason
/** Parse JSON string */
let () = {
  let request =
    {| ["Greeting",{"name":"Turner","age":33,"pet":["Dog","Hooch"]}] |}
    |> Json.parseOrRaise
    |> Atdgen_codec_runtime.Decode.decode(Protocol_bs.read_request);

  switch (request) {
  | `Greeting({name, _}) => Js.log("Hi " ++ name ++ "!")
  };
};

/** Serialize [request] as JSON */

let () = {
  let request =
    `Greeting({
      Protocol_t.name: "Turner",
      age: 33,
      student: false,
      pet: Some(`Dog("Hooch")),
    });

  request
  |> Atdgen_codec_runtime.Encode.encode(Protocol_bs.write_request)
  |> Json.stringify
  |> Js.log2("JSON:");
};

```
npm package: @osener/postgrest-js
Description: Isomorphic PostgREST client
Author: Supabase
Latest version: 1.8.5-2

# `postgrest-js`

[![Build](https://github.com/supabase/postgrest-js/workflows/CI/badge.svg)](https://github.com/supabase/postgrest-js/actions?query=branch%3Amaster)
[![Package](https://img.shields.io/npm/v/@supabase/postgrest-js)](https://www.npmjs.com/package/@supabase/postgrest-js)
[![License: MIT](https://img.shields.io/npm/l/@supabase/postgrest-js)](#license)

Isomorphic JavaScript client for [PostgREST](https://postgrest.org). The goal of this library is to make an "ORM-like" restful interface.

Full documentation can be found [here](https://supabase.github.io/postgrest-js/v2).

### Quick start

Install

```bash
npm install @supabase/postgrest-js
```

Usage

```js
import { PostgrestClient } from '@supabase/postgrest-js'

const REST_URL = 'http://localhost:3000'
const postgrest = new PostgrestClient(REST_URL)
```

- select(): https://supabase.com/docs/reference/javascript/select
- insert(): https://supabase.com/docs/reference/javascript/insert
- update(): https://supabase.com/docs/reference/javascript/update
- delete(): https://supabase.com/docs/reference/javascript/delete

#### Custom `fetch` implementation

`postgrest-js` uses the [`cross-fetch`](https://www.npmjs.com/package/cross-fetch) library to make HTTP requests, but an alternative `fetch` implementation can be provided as an option. This is most useful in environments where `cross-fetch` is not compatible, for instance Cloudflare Workers:

```js
import { PostgrestClient } from '@supabase/postgrest-js'

const REST_URL = 'http://localhost:3000'
const postgrest = new PostgrestClient(REST_URL, {
  fetch: (...args) => fetch(...args),
})
```

## License

This repo is licensed under MIT License.

## Sponsors

We are building the features of Firebase using enterprise-grade, open source products. We support existing communities wherever possible, and if the products don’t exist we build them and open source them ourselves. Thanks to these sponsors who are making the OSS ecosystem better for everyone.

[![New Sponsor](https://user-images.githubusercontent.com/10214025/90518111-e74bbb00-e198-11ea-8f88-c9e3c1aa4b5b.png)](https://github.com/sponsors/supabase)