open-index/open-npm huggingface dataset:
npm package: @go-gitea/sdk.js
Description: The Official Gitea SDK for JavaScript/TypeScript
Latest version: 0.1.4

# Gitea SDK.js

Gitea's SDK.js is the official JavaScript/TypeScript client for the Gitea API. It is built on top of [Octokit.js](https://github.com/octokit/octokit.js).

## Installation

```bash
pnpm add @go-gitea/sdk.js
# or
npm install @go-gitea/sdk.js
# or
yarn add @go-gitea/sdk.js
```

## Usage

```javascript
import { Gitea } from "@go-gitea/sdk.js";

const gitea = new Gitea({
  baseUrl: "https://gitea.example.com",
  auth: "YOUR_PERSONAL_ACCESS_TOKEN",
});

const version = await gitea.rest.miscellaneous.getVersion();
console.log(`Version: ${version.data.version}`);
```

## License

[MIT](LICENSE)

## Credits

- Built on [@octokit/core](https://github.com/octokit/core.js)
- Uses [@octokit/plugin-paginate-rest](https://github.com/octokit/plugin-paginate-rest.js)
- Uses [@octokit/plugin-retry](https://github.com/octokit/plugin-retry.js)

A very big **THANK YOU** to the Octokit team, and [Gregor Martynus](https://github.com/gr2m), for creating Octokit.js.
npm package: @go-go-scope/adapter-elysia
Description: Elysia adapter for go-go-scope - Bun-first native integration
Author: thelinuxlich
Latest version: 2.9.1

# @go-go-scope/adapter-elysia

Elysia adapter for go-go-scope - Bun-first native integration.

## Installation

```bash
npm install @go-go-scope/adapter-elysia elysia
```

## Usage

```typescript
import { Elysia } from 'elysia'
import { goGoScope } from '@go-go-scope/adapter-elysia'

const app = new Elysia()
  .use(goGoScope({ metrics: true }))
  .get('/users/:id', async ({ scope, params }) => {
    const [err, user] = await scope.task(
      () => fetchUser(params.id),
      { retry: 'exponential' }
    )

    if (err) {
      return { error: err.message }
    }
    return user
  })
```

## License

MIT
npm package: @go-go-scope/adapter-express
Description: Express adapter for go-go-scope - request-scoped structured concurrency
Author: thelinuxlich
Latest version: 2.9.1

# @go-go-scope/adapter-express

Express adapter for go-go-scope - provides request-scoped structured concurrency for Express applications.

## Installation

```bash
npm install @go-go-scope/adapter-express express
```

## Usage

```typescript
import express from 'express'
import { goGoScope, closeScope } from '@go-go-scope/adapter-express'

const app = express()
app.use(goGoScope(app, { metrics: true }))

app.get('/users/:id', async (req, res) => {
  const [err, user] = await req.scope.task(
    () => fetchUser(req.params.id),
    { retry: 'exponential' }
  )

  if (err) {
    return res.status(500).json({ error: err.message })
  }
  res.json(user)
})

// Graceful shutdown
process.on('SIGTERM', async () => {
  await closeScope(app)
  server.close()
})
```

## License

MIT
npm package: @go-go-scope/adapter-fastify
Description: Fastify adapter for go-go-scope - request-scoped structured concurrency
Author: thelinuxlich
Latest version: 2.9.1

# @go-go-scope/adapter-fastify

Fastify adapter for go-go-scope - provides request-scoped structured concurrency for Fastify applications.

## Installation

```bash
npm install @go-go-scope/adapter-fastify fastify fastify-plugin
```

## Usage

```typescript
import fastify from 'fastify'
import { fastifyGoGoScope } from '@go-go-scope/adapter-fastify'

const app = fastify()
await app.register(fastifyGoGoScope, { metrics: true })

app.get('/users/:id', async (request, reply) => {
  const [err, user] = await request.scope.task(
    () => fetchUser(request.params.id),
    { retry: 'exponential', timeout: 5000 }
  )

  if (err) {
    return reply.code(500).send({ error: err.message })
  }
  return user
})
```

## License

MIT
npm package: @go-go-scope/adapter-hapi
Description: Hapi adapter for go-go-scope - request-scoped structured concurrency
Author: thelinuxlich
Latest version: 2.9.1

# @go-go-scope/adapter-hapi

Hapi adapter for go-go-scope - request-scoped structured concurrency with automatic cleanup.

## Installation

```bash
npm install @go-go-scope/adapter-hapi @hapi/hapi
```

## Usage

### Basic

```typescript
import Hapi from '@hapi/hapi'
import { hapiGoGoScope, getScope, getRootScope, closeHapiScope } from '@go-go-scope/adapter-hapi'

const server = Hapi.server({ port: 3000 })

// Register plugin
await server.register({
  plugin: hapiGoGoScope,
  options: { name: 'my-api', metrics: true }
})

// Use scope in routes
server.route({
  method: 'GET',
  path: '/users/{id}',
  handler: async (request) => {
    const [err, user] = await request.scope.task(
      () => fetchUser(request.params.id),
      { retry: 'exponential', timeout: 5000 }
    )
    
    if (err) {
      return { error: err.message }
    }
    
    return user
  }
})

await server.start()
console.log('Server running at:', server.info.uri)
```

### Options

```typescript
await server.register({
  plugin: hapiGoGoScope,
  options: {
    name: 'my-api',      // Root scope name
    metrics: true,        // Enable metrics collection
    timeout: 30000      // Default request timeout
  }
})
```

### Accessing Root Scope

```typescript
// From server instance
const rootScope = getRootScope(server)
const metrics = rootScope.metrics()
console.log('App metrics:', metrics)

// Or directly from request
server.route({
  method: 'GET',
  path: '/health',
  handler: async (request) => {
    const rootScope = request.rootScope
    return { status: 'ok', metrics: rootScope.metrics() }
  }
})
```

### Graceful Shutdown

```typescript
process.on('SIGTERM', async () => {
  await closeHapiScope(server)
  await server.stop()
})
```

## API

### `hapiGoGoScope`

Hapi plugin that provides request-scoped structured concurrency.

**Options:**
- `name`: Root scope name (default: 'hapi-app')
- `metrics`: Enable metrics collection (default: false)
- `timeout`: Default request timeout in ms

### `getScope(request)`

Get the request-scoped scope from Hapi request.

### `getRootScope(server)`

Get the root application scope from Hapi server.

### `closeHapiScope(server)`

Gracefully shutdown the root scope (for use in SIGTERM handlers).

## License

MIT
npm package: @go-go-scope/adapter-hono
Description: Hono adapter for go-go-scope - lightweight middleware for edge runtimes
Author: thelinuxlich
Latest version: 2.9.1

# @go-go-scope/adapter-hono

Hono adapter for go-go-scope - lightweight middleware for edge runtimes.

## Installation

```bash
npm install @go-go-scope/adapter-hono hono
```

## Usage

```typescript
import { Hono } from 'hono'
import { goGoScope, getScope } from '@go-go-scope/adapter-hono'

const app = new Hono()
app.use(goGoScope({ metrics: true }))

app.get('/users/:id', async (c) => {
  const scope = getScope(c)
  const [err, user] = await scope.task(
    () => fetchUser(c.req.param('id')),
    { retry: 'exponential' }
  )

  if (err) {
    return c.json({ error: err.message }, 500)
  }
  return c.json(user)
})
```

## License

MIT
npm package: @go-go-scope/adapter-koa
Description: Koa adapter for go-go-scope - request-scoped structured concurrency
Author: thelinuxlich
Latest version: 2.9.1

# @go-go-scope/adapter-koa

Koa adapter for go-go-scope - request-scoped structured concurrency with automatic cleanup.

## Installation

```bash
npm install @go-go-scope/adapter-koa koa
```

## Usage

### Basic

```typescript
import Koa from 'koa'
import Router from '@koa/router'
import { koaGoGoScope, getScope, getRootScope } from '@go-go-scope/adapter-koa'

const app = new Koa()
const router = new Router()

// Apply middleware
app.use(koaGoGoScope({ name: 'my-api', metrics: true }))

// Use scope in routes
router.get('/users/:id', async (ctx) => {
  const scope = getScope(ctx)
  
  const [err, user] = await scope.task(
    () => fetchUser(ctx.params.id),
    { retry: 'exponential', timeout: 5000 }
  )
  
  if (err) {
    ctx.status = 500
    ctx.body = { error: err.message }
    return
  }
  
  ctx.body = user
})

app.use(router.routes())
app.listen(3000)
```

### Options

```typescript
app.use(koaGoGoScope({
  name: 'my-api',        // Root scope name
  metrics: true,          // Enable metrics collection
  timeout: 30000,        // Default request timeout
  onError: (err, ctx) => {  // Optional error handler
    console.error('Scope error:', err)
  }
}))
```

### Accessing Root Scope

```typescript
// Access root scope from any context
app.use(async (ctx, next) => {
  const rootScope = getRootScope(ctx)
  const metrics = rootScope.metrics()
  console.log('App metrics:', metrics)
  await next()
})
```

### Graceful Shutdown

```typescript
import { closeKoaScope } from '@go-go-scope/adapter-koa'

const server = app.listen(3000)

process.on('SIGTERM', async () => {
  await closeKoaScope()
  server.close(() => {
    process.exit(0)
  })
})
```

## API

### `koaGoGoScope(options?)`

Creates Koa middleware that provides request-scoped structured concurrency.

**Options:**
- `name`: Root scope name (default: 'koa-app')
- `metrics`: Enable metrics collection (default: false)
- `timeout`: Default request timeout in ms
- `onError`: Error handler callback

### `getScope(ctx)`

Get the request-scoped scope from Koa context.

### `getRootScope(ctx)`

Get the root application scope from Koa context.

### `closeKoaScope()`

Gracefully shutdown the root scope (for use in SIGTERM handlers).

## License

MIT
npm package: @go-go-scope/adapter-nestjs
Description: NestJS adapter for go-go-scope - DI integration with @Task decorator
Author: thelinuxlich
Latest version: 2.9.1

# @go-go-scope/adapter-nestjs

NestJS adapter for go-go-scope - provides dependency injection integration with `@Task` decorator.

## Installation

```bash
npm install @go-go-scope/adapter-nestjs @nestjs/common
```

## Usage

```typescript
import { Module } from '@nestjs/common'
import { GoGoScopeModule, Task } from '@go-go-scope/adapter-nestjs'

@Module({
  imports: [GoGoScopeModule.forRoot({ metrics: true })],
  providers: [UserService],
})
class AppModule {}

@Injectable()
class UserService {
  @Task({ retry: 'exponential', timeout: 5000 })
  async getUser(id: string) {
    return fetchUser(id)
  }
}
```

## License

MIT
npm package: @go-go-scope/adapter-react
Description: React hooks for go-go-scope
Author: thelinuxlich
Latest version: 2.9.1

# @go-go-scope/adapter-react

React hooks for go-go-scope. Provides reactive integration with React's hooks API.

## Installation

```bash
npm install @go-go-scope/adapter-react
```

## Usage

```tsx
import { useScope, useTask, useChannel } from '@go-go-scope/adapter-react';

function UserProfile({ userId }: { userId: string }) {
  // Create a reactive scope
  const scope = useScope({ name: "UserProfile" });

  // Execute tasks with reactive state
  const { data, error, isLoading, execute } = useTask(
    async () => {
      const response = await fetch(`/api/users/${userId}`);
      return response.json();
    },
    { immediate: true }
  );

  // Use channels for communication
  const channel = useChannel<string>();

  const sendMessage = async () => {
    await channel.send("Hello!");
  };

  if (isLoading) return <div>Loading...</div>;
  if (error) return <div>Error: {error.message}</div>;

  return (
    <div>
      <h1>{data?.name}</h1>
      <p>Latest message: {channel.latest}</p>
      <button onClick={sendMessage}>Send Message</button>
    </div>
  );
}
```

## API

### `useScope(options?)`
Creates a reactive scope that auto-disposes on component unmount.

### `useTask(factory, options?)`
Creates a reactive task with `data`, `error`, `isLoading`, `isReady`, and `execute()`.

### `useParallel(factories, options?)`
Executes tasks in parallel with progress tracking.

### `useChannel(options?)`
Creates a reactive channel for Go-style communication.

### `useBroadcast()`
Creates a reactive broadcast channel for pub/sub patterns.

### `usePolling(factory, options)`
Creates a reactive polling mechanism.

## License

MIT
npm package: @go-go-scope/adapter-svelte
Description: Svelte 5 runes integration for go-go-scope
Author: thelinuxlich
Latest version: 2.9.1

# @go-go-scope/adapter-svelte

Svelte 5 runes integration for go-go-scope. Provides reactive stores that work with Svelte's `$` prefix.

## Installation

```bash
npm install @go-go-scope/adapter-svelte
```

## Usage

```svelte
<script>
  import { createScope, createTask, createChannel } from '@go-go-scope/adapter-svelte';

  // Create a reactive scope
  const scope = createScope({ name: 'my-component' });

  // Execute tasks with reactive state
  const task = createTask(async () => {
    const response = await fetch('/api/data');
    return response.json();
  }, { immediate: true });

  // Use channels for communication
  const channel = createChannel<string>();

  async function sendMessage() {
    await channel.send('Hello!');
  }
</script>

<div>
  {#if $task.isLoading}
    <p>Loading...</p>
  {:else if $task.error}
    <p>Error: {$task.error.message}</p>
  {:else}
    <p>Data: {$task.data}</p>
  {/if}
  
  <button onclick={sendMessage}>Send Message</button>
  <p>Latest: {$channel.latest}</p>
</div>
```

## API

### `createScope(options?)`
Creates a reactive scope that auto-disposes on component destroy.

### `createTask(factory, options?)`
Creates a reactive task store with `data`, `error`, `isLoading`, `isReady`, and `execute()`.

### `createParallel(factories, options?)`
Executes tasks in parallel with reactive progress tracking.

### `createChannel(options?)`
Creates a reactive channel for Go-style communication.

### `createBroadcast()`
Creates a reactive broadcast channel for pub/sub patterns.

### `createPolling(factory, options)`
Creates a reactive polling mechanism.

### `createStore(initialValue)`
Creates a simple reactive store compatible with Svelte's `$` prefix.

## License

MIT
npm package: @go-go-scope/adapter-vue
Description: Vue.js composables for go-go-scope
Author: thelinuxlich
Latest version: 2.9.1

# @go-go-scope/adapter-vue

Vue 3 composables for go-go-scope. Provides reactive integration with Vue's composition API.

## Installation

```bash
npm install @go-go-scope/adapter-vue
```

## Usage

```vue
<script setup>
import { useScope, useTask, useChannel } from '@go-go-scope/adapter-vue';

// Create a reactive scope
const scope = useScope({ name: 'my-component' });

// Execute tasks with reactive state
const { data, error, isLoading, execute } = useTask(async () => {
  const response = await fetch('/api/data');
  return response.json();
}, { immediate: true });

// Use channels for communication
const channel = useChannel<string>();

async function sendMessage() {
  await channel.send('Hello!');
}
</script>

<template>
  <div>
    <p v-if="isLoading">Loading...</p>
    <p v-else-if="error">Error: {{ error.message }}</p>
    <p v-else>Data: {{ data }}</p>
    
    <button @click="sendMessage">Send Message</button>
    <p>Latest: {{ channel.latest }}</p>
  </div>
</template>
```

## API

### `useScope(options?)`
Creates a reactive scope that auto-disposes on component unmount.

### `useTask(factory, options?)`
Creates a reactive task with `data`, `error`, `isLoading`, `isReady`, and `execute()`.

### `useParallel(factories, options?)`
Executes tasks in parallel with progress tracking.

### `useChannel(options?)`
Creates a reactive channel for Go-style communication.

### `useBroadcast()`
Creates a reactive broadcast channel for pub/sub patterns.

### `usePolling(factory, options)`
Creates a reactive polling mechanism.

## License

MIT