open-index/open-npm huggingface dataset:
npm package: @labdigital/graphql-codegen-k6
Description: GraphQL Code Generator plugin for generating a ready-to-use k6 compatible SDK based on GraphQL operations
Latest version: 0.1.1

# @labdigital/graphql-codegen-k6

This is a fork of https://github.com/dotansimha/graphql-code-generator-community/tree/main/packages/plugins/typescript/generic-sdk
to generate a SDK for k6 to test GraphQL APIs.
npm package: @labdigital/graphql-fetcher
Description: Custom fetcher for react-query to use with @labdigital/node-federated-token
Author: Lab Digital
Latest version: 2.2.2

# @labdigital/graphql-fetcher
<a href="https://npm.im/@labdigital/graphql-fetcher"><img src="https://badgen.net/npm/v/@labdigital/graphql-fetcher"></a> <a href="https://npm.im/@labdigital/graphql-fetcher">

Opinionated `fetch` wrappers for our client and server side queries in our Next.js frontends.
Only used for fetching from GraphQL endpoints.

## Features

- GraphQL support using `TypedDocumentString` as the query
- Persisted queries support using either pregenerated hashes or on the fly hashing
- Fallback when persisted query fails
- Client fetcher with React context support when the endpoint is only known at runtime
- Next data cache support


## Usage

```ts
import { initClientFetcher } from "@labdigital/graphql-fetcher";

const fetcher = initClientFetcher("https://localhost/graphql");

const gqlResponse = await fetcher(query, {
	myVar: "baz",
}, {
	signal: AbortSignal.timeout(10),
	headers: {
		"X-extra-header": "foo",
	}
});
```

## Notes

### Node 18.x requires webcrypto on globalThis

From node 20.x onwards the WebCrypto API is available on globalThis, versions before 20.x will need a small polyfill:

```
	if (typeof window === "undefined" && !globalThis.crypto) {
		globalThis.crypto = require("node:crypto").webcrypto;
	}
```

### Old browsers might need a AbortSignal.timeout() polyfill

Old browsers might not have AbortSignal.timeout() available. We do not support these versions but you can add a polyfill using the following code:

```typescript
// Polyfill for AbortSignal.timeout() for older browsers
if (typeof AbortSignal !== "undefined" && !AbortSignal.timeout) {
	AbortSignal.timeout = function timeout(ms: number) {
		const controller = new AbortController();
		setTimeout(() => controller.abort(), ms);
		return controller.signal;
	};
}

export {};
```
npm package: @labdigital/intl-extractor
Description: Extracts `next-intl` labels from TypeScript files and merges them to a given output json file.
Author: Lab Digital
Latest version: 2.2.0

# intl-extractor

Extracts `next-intl` labels from TypeScript files and merges them to a given output json file.

This automates away manually setting labels in a `source.json` file.

## How to use

```bash
npx @labdigital/intl-extractor -i ./path/to/files -o ./path/to/output.json
```

## How it works

Scans input files for `useTranslations` or `getTranslations` usage using the TypeScript SDK. It will then merge them all together and check the source JSON file for label values.

## Watch mode

You can use watch mode by installing `@parcel/watcher` and using the `--watch` or `-w` flag. It's a really simple implementation that reprocesses all files whenever there's an update.
npm package: @labdigital/lambda-utilities
Description: ## getSecret
Author: Bram Kaashoek
Latest version: 0.5.2
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Lab Digital Lambda Utilities

## getSecret

requires:

- process.env.AWS_REGION

Can use:

- process.env.LOCALSTACK_URL

## sendSqsMessage

requires:

- process.env.AWS_REGION

Can use:

- process.env.LOCALSTACK_URL
npm package: @labdigital/mdpostprocess
Description: Usage::
Author: Lab Digital
Latest version: 0.1.3

# Markdown post processor

Usage::

```typescript
const processor = new MarkdownPostProcessor("my")
processor.registerURL("product", /product\/(?<key>[A-Za-z0-9\-\_]+)/

const rawText = "see my://product/key for more information"

const processedText = await processor.process(rawText, (tags) => {
  tags.get('product')?.forEach((p) => {
    p.replaceValue = "/product/some-product-slug"
  })
  return tags
})

// Outputs see /product/some-product-slug for more information
console.log(processedText)
```
npm package: @labdigital/mock-dynamodb
Description: Mock DynamoDB for testing using dynalite
Author: Lab Digital
Latest version: 0.2.1

# DynamoDB Mock
This is a relatively simple wrapper around
[dynalite](https://github.com/mhart/dynalite) to make it easier to use in a test
environment.

[![npm](https://img.shields.io/npm/v/@labdigital/mock-dynamodb.svg)](https://www.npmjs.com/package/@labdigital/mock-dynamodb)

## Usage
```typescript

import { mockDynamoDB } from "@labdigital/mock-dynamodb";

const mddb = mockDynamoDB({ endpoint: "http://localhost:4000" });
const client = new DynamoDB({
	endpoint: "http://localhost:4000",
	region: "local",
	credentials: {
		accessKeyId: "fake-x",
		secretAccessKey: "fake",
	},
});

mddb.reset(); // Clear all data

mddb.stop(); // Stop the server
```
npm package: @labdigital/next-intl-custom-paths
Description: Custom path support for next-intl
Author: Lab Digital
Latest version: 0.8.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @labdigital/next-intl-custom-paths

Opinionated wrapper around next-intl 3.0 for internationalization with custom paths.

This decouples the locale used in your codebase from the path. So for example `/en` can internally be used as `en-US`.

It's a bit opinionated and specific for our use cases for now:
- Only supports localized path names, see [cprussin's comment](https://github.com/amannn/next-intl/issues/653#issuecomment-1823273158) on how to set something like this up for shared pathnames
- Doesn't support saving the default locale based on cookie

Heavily inspired by https://github.com/amannn/next-intl/issues/653#issuecomment-1823273158, thanks @cprussin.

## Usage

In your middleware.ts add the following
```ts
import { createNextIntlCustomPathMiddleware } from "@labdigital/next-intl-custom-paths";

const intlMiddleware = createNextIntlCustomPathMiddleware({
		defaultLocale: "en-US",
		locales: ["en-US", "nl-NL", "de-DE"],
		pathToLocaleMapping: {
			"en": "en-US",
			"nl": "nl-NL",
			"de": "de-DE",
		}
	});
```

You can also edit all next-intl middleware arguments using the `nextIntlMiddlewareOptions` key, e.g.:

```ts
const intlMiddleware = createNextIntlCustomPathMiddleware({
		defaultLocale: "en-US",
		locales: ["en-US", "nl-NL", "de-DE"],
		pathToLocaleMapping: {
			"en": "en-US",
			"nl": "nl-NL",
			"de": "de-DE",
		},
		nextIntlMiddlewareOptions: {
			localeDetection: false,
			pathnames: {
				"/": "/"
			}
		}
	});

```

This package has it's own navigation helpers to translate path to locale, you should use these if you use our middleware:

```ts
import { createLocalizedNavigation } from "@labdigital/next-intl-custom-paths";

export const { usePathname, useRouter, Link } = createLocalizedNavigation(
	locales,
	defaultLocale,
	localePrefix,
	pathToLocaleMapping,
	pathnames,
);
```
npm package: @labdigital/paynl-connect
Description: PAY. Global Management System API's
Author: Lab Digital
Latest version: 0.2.0

# `@labdigital/paynl-connect`

This SDK was autogenerated by the [`api` SDK generator](https://api.readme.dev), powered by [ReadMe](https://readme.com) 🦉

Add SDK setup information and usage examples here so your users get started in a jiffy! 🚀

<!---

Here's some additional info about the generated SDK:

`api` version: 7.0.0-beta.8
Generated at 2024-08-09T15:48:07.361Z

--->
npm package: @labdigital/paynl-rest
Description: The restful API for interacting with the Pay. Transaction Gateway Unit.
Author: Lab Digital
Latest version: 0.2.0

# `@labdigital/paynl-rest`

This SDK was autogenerated by the [`api` SDK generator](https://api.readme.dev), powered by [ReadMe](https://readme.com) 🦉

## Example Usage 🚀

```js
import paynlRest from '@labdigital/paynl-rest';

paynlRest.auth('username', 'password');
paynlRest.getAuthenticationtokens()
  .then(({ data }) => console.log(data))
  .catch(err => console.error(err));
```

<!---

Here's some additional info about the generated SDK:

`api` version: 7.0.0-beta.8
Generated at 2024-08-09T15:47:59.198Z

--->
npm package: @labdigital/paynl-transaction
Description: PAY. Transaction Gateway Unit API's
Author: Lab Digital
Latest version: 0.2.0

# `@labdigital/paynl-transaction`

This SDK was autogenerated by the [`api` SDK generator](https://api.readme.dev), powered by [ReadMe](https://readme.com) 🦉

Add SDK setup information and usage examples here so your users get started in a jiffy! 🚀

<!---

Here's some additional info about the generated SDK:

`api` version: 7.0.0-beta.8
Generated at 2024-08-09T15:48:12.669Z

--->
npm package: @labdigital/react-query-opal
Description: Custom fetcher for react-query to use with @labdigital/node-federated-token
Author: Lab Digital
Latest version: 0.1.2
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# react-query-opal

Opinionated `fetch` wrappers for our client and server side queries in our Next.js frontends.
Only used for fetching from GraphQL endpoints.

## Features

- GraphQL support using `TypedDocumentString` as the query
- Persisted queries support using either pregenerated hashes or on the fly hashing
- Fallback when persisted query fails
- Client fetcher with React context support when the endpoint is only known at runtime
- Next data cache support
- Preview mode support to disable all caches

## Notes

### Node 18.x requires webcrypto on globalThis

From node 20.x onwards the WebCrypto API is available on globalThis, versions before 20.x will need a small polyfill:

```
	if (typeof window === "undefined" && !globalThis.crypto) {
		globalThis.crypto = require("node:crypto").webcrypto;
	}
```
npm package: @labdigital/storyblok-js-client
Description: Universal JavaScript SDK for Storyblok's API
Author: Alexander Feiglstorfer
Latest version: 2.0.0

# @labdigital/storyblok-js-client

A (hopefully temporary) fork of the official Storyblok JavaScript client without
throttling. The throttling severely impacts performance of the client in
production use-cases.

## Installation

```bash
npm install @labdigital/storyblok-js-client
```

**Parameters**

- `config` Object
  - (`accessToken` String, optional - The preview token you can find in your space dashboard at https://app.storyblok.com. This is mandatory only if you are using the CDN API.)
  - (`oauthToken` String, optional - The personal access token you can find in your account at https://app.storyblok.com/#/me/account?tab=token. This is mandatory only if you are using the Management API.)
  - (`cache` Object, optional)
    - (`type` String, optional - `none` or `memory`)
  - (`responseInterceptor` Function, optional - You can pass a function and return the result. For security reasons, Storyblok client will deal only with the response interceptor.)
  - (`region` String, optional)
  - (`https` Boolean, optional)
  - (`rateLimit` Number, option - MAPI ratelimit. Only applied when `oauthToken` is set. Limits max req. per second. If left empty, no throttling is applied.)
  - (`timeout` Integer, optional) API timeout. If no value is set no time out is applied.
  - (`maxRetries` Integer, optional, defaults to 5)
  - (`retryDelay` Integer, optional) retry delay in ms. Defaults to 300
  - (`maxDelay` Integer, optional) maximum retry delay. Be aware that retries are done with exponential backoff. Defaults to 2000.
  - (`richTextSchema` Object, optional - your custom schema for RichTextRenderer)
  - (`resolveNestedRelations` Boolean, optional - By default is true)
- (`endpoint` String, optional)

See https://github.com/storyblok/storyblok-js-client/ for more information
npm package: @labeebklatif/s3-up
Description: S3 upload
Author: https://github.com/labeebklatif
Latest version: 2.0.2

# s3-up

Upload your local files and directories directly to S3 🪣 with NodeJS. Particulary useful if you are having a S3 served website.
This library can be used as part of your build pipeline to deploy new assets. Uploads multiple individual files and directory contents together to a common S3 path.
</br>

## Installation

**npm**

```sh
npm install --save-dev @labeebklatif/s3-up
```

**yarn**

```sh
yarn add --dev @labeebklatif/s3-up
```

## Usage

#### Basic Usage

```js
const Uploader = require("@labeebklatif/s3-up");

const uploader = new Uploader({
  bucket: "s3-bucket-name",
  path: "target-bucket-path",
});

// add individual file
uploader.addFile("path-to-file");

// add all files in a directory
uploader.addDir("path-to-source-dir");

// start upload
uploader.upload();

// Note: all local paths are expected to be relative to the current working directory - process.cwd()
```

</br>

#### Configuration

```js
new Uploader(configuration);
```

`configuration` object can have following properties to control the behavior of the uploader:

⚙️ `bucket` : (String) Name of the bucket of the target S3 bucket.

⚙️ `path` : (String) Path to the target directory in bucket where files should be uploaded.

⚙️ `clean` : (Boolean: true) Indicates whether target directory and contents should be removed before starting upload. Setting this false will skip this feature.

⚙️ `fileProperties` : (Object: {}) key-value pairs that providers additional file properties.
key should be a valid Unix style pattern to match file and value should be an object with additional file properties.

</br>

By default, the library attempts to find matching `ContentType` for each uploaded file using `mime-type` module.
You can override the default properties or assign additional properties for a matching file as follows.
The configuration for first matching key pattern will be used.

```js
uploader.fileProperties: {
  "*.js": {
    ContentType: "text/javascript",
    ContentEncoding: "gzip"
  }
}
```
npm package: @labeg/alertify.js
Description: An lightweight, unobtrusive customizable JavaScript notification system.
Author: Fabien Doiron
Latest version: 2.0.102
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/1407ee60ef1542efb5fe703c93669b18)](https://www.codacy.com/app/LabEG/alertify.js?utm_source=github.com&utm_medium=referral&utm_content=LabEG/alertify.js&utm_campaign=Badge_Grade)
![David](https://img.shields.io/david/LabEG/alertify.js.svg)
![David](https://img.shields.io/david/dev/LabEG/alertify.js.svg)
![GitHub](https://img.shields.io/github/license/LabEG/alertify.js.svg)

# Alertify.js

Alertify is an unobtrusive customizable JavaScript notification system.

## Reporting Issues

If at all possible, please set up an example in [Plunkr](https://plnkr.co), [JS Bin](//jsbin.com), [Codepen](http://codepen.io/)
etc. That will greatly speed up the process of fixing the issue. If you need the issue fixed right away, a reproduce-able,
concrete example is your best way to get our attention! Not to say that we won't do our best to fix other issues, though :-)

## Usage and Examples

For code examples, stop by the [website at github page](https://labeg.github.io/alertify.js/)

## Contributing

Please follow the ESLint style guide to keep the code style uniform. Also
please add appropriate tests for each contribution. Test coverage is far from
complete, but if everyone adds a test for their contributions, plus one more
test, we should be able to get a reasonable amount of coverage quickly.

## Browser Support

Alertify uses the following JavaScript which may not work in anything
less than Internet Explorer 10, so you'll need to polyfill it.

-   `element.classList` (Less than IE 10 needs polyfill)
-   `document.querySelector` (Less than IE 7 needs polyfill)
-   `element.addEventListener` (Less than IE 9 needs polyfill)
-   `Array.prototype.map` (Less than IE 9 needs polyfill)
-   `Array.prototype.forEach` (Less than IE 9 needs polyfill)

It should work on Opera Mini, but since Opera Mini doesn't support
transitions, the hiding of elements is not very pretty.

It's being tested on:

-   Android 4.0 and Latest (should work on 2.1 and newer, though)
-   Chrome (Latest)
-   Firefox (Latest)
-   Internet Explorer (Latest)
-   Internet Explorer 10
-   Safari (desktop and iOS)

## License

alertify.js is licensed under [MIT](http://www.opensource.org/licenses/MIT)
npm package: @labeg/webapp-core
Description: Core classes for building app logic
Author: Labutin Evgeniy
Latest version: 1.0.21
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

**⚠️ This package is deprecated.**
The code has been split into three independent libraries:

1. **[@labeg/code-style](https://github.com/labeg/code-style)**
   A library for enforcing and sharing consistent code style across projects.

2. **[ts-serializable](https://github.com/LabEG/Serializable)**
   A TypeScript library for serializing and deserializing objects with strong typing.

3. **[@labeg/tfetch](https://github.com/LabEG/ts-fetch)**
   A lightweight wrapper around the Fetch API with additional features for easier HTTP requests.

Please use these libraries instead of `webapp-core`.
npm package: @labelbox/magic-bytes.js
Description: Detect Filetype by bytes
Author: Lars Kölpin
Latest version: 1.0.15

# Magic bytes

[![Build Status](https://travis-ci.org/LarsKoelpin/magic-bytes.svg?branch=master)](https://travis-ci.org/LarsKoelpin/magic-bytes)


Magic Bytes is a javascript library analyzing the first bytes of a file to tell you its type. The procedure
is based on https://en.wikipedia.org/wiki/List_of_file_signatures.

# Installation
Run `npm install magic-bytes.js`

# Usage
On server:
```javascript
import filetype from 'magic-bytes.js'

filetype(fs.readFileSync("myimage.png")) // ["png"]
```

Using HTML:
```html
<input type="file" id="file" />

 <script src="node_modules/magic-bytes.js/dist/browser.js" type="application/javascript"></script>
<script>
    document.getElementById("file").addEventListener('change', (event, x) => {
      const fileReader = new FileReader();
      fileReader.onloadend = (f) => {
        const bytes = new Uint8Array(f.target.result);
        console.log("Possible filetypes: " + filetypeinfo(bytes))
      }
      fileReader.readAsArrayBuffer(event.target.files[0])
    })
</script>
```

# API
The following functions are availble:
* `filetypeinfo(bytes: number[])` Contains typeinformation like name, extension and mime type: `[{typename: "zip"}, {typename: "jar"}]`
* `filetypenames(bytes: number[])` : Contains type names only: `["zip", "jar"]`
* `filetypemime(bytes: number[])` : Contains type mime types only: `["application/zip", "application/jar"]`
* `filetypeextensions(bytes: number[])` : Contains type extensions only: `["zip", "jar"]`

Both function return an empty array `[]` otherwise, which means it could not detect the file signature. Keep in mind that 
txt files for example fall in this category.

You don't have to load the whole file in memory. For validating a file uploaded to S3 using Lambda for example, it may be  
enough to load the files first 100 bytes and validate against them.  This is especially useful for big files.

see examples for practical usage.

# Tests
Run  `npm test`

# Example
See examples/

# How does it work
The `create-snapshot.js` creates a new tree. The tree has a similar shape to the following 
```json
{
  "0x47": {
    "0x49": {
      "0x46": {
        "0x38": {
          "0x37": {
            "0x61": {
              "matches": [
                {
                  "typename": "gif",
                  "mime": "image/gif",
                  "extension": "gif"
                }
              ]
            }
          },
        }
      }
    }
  }
}
```

It acts as a giant lookup map for the given byte signatures. To check all available entries, have a look at `pattern-tree.js` and its
generated `pattern-tree.snapshot`, which acts as a static resource.

# Supported types
Please refer to  `src/pattern-tree.js`

# Roadmap
* Specialize type detection(like zip) using offset-subtrees
* Add encoding detection
npm package: @labelflow-core/engine
Description: Framework-agnostic image annotation engine — draw, select, drag, resize bounding boxes on images with zoom and pan support
Author: samandar_log02
Latest version: 0.2.0

# @labelflow-core/engine

Framework-agnostic image annotation engine. The core that powers [@labelflow-core/react](https://www.npmjs.com/package/@labelflow-core/react) and [@labelflow-core/vue](https://www.npmjs.com/package/@labelflow-core/vue). Zero dependencies. ~25KB.

> **Most users should install `@labelflow-core/react` or `@labelflow-core/vue` instead.** This package is for vanilla JavaScript usage or building custom framework adapters.

## Install

```bash
npm install @labelflow-core/engine
```

## Supported Tools

- **BBox** — click and drag to draw rectangles. Resize with 8-point handles.
- **Polygon** — click to place vertices, close by clicking near the first point or double-click. Drag vertices to edit.

## Usage

```js
import { AnnotationEngine, Canvas2DRenderer } from '@labelflow-core/engine'

const canvas = document.getElementById('canvas')
const engine = new AnnotationEngine()
const renderer = new Canvas2DRenderer(canvas)

// Load image
const img = new Image()
img.onload = () => {
  engine.setImage(img)
  renderer.resize(800, 600)
  engine.setCanvasSize({ width: 800, height: 600 })
  engine.setActiveTool('polygon') // or 'bbox'
  renderer.render(engine.renderState)
}
img.src = '/photo.jpg'

// Wire up events
canvas.addEventListener('pointerdown', (e) => {
  const r = canvas.getBoundingClientRect()
  engine.onPointerDown({ x: e.clientX - r.left, y: e.clientY - r.top }, e.button)
  renderer.render(engine.renderState)
})
canvas.addEventListener('pointermove', (e) => {
  const r = canvas.getBoundingClientRect()
  engine.onPointerMove({ x: e.clientX - r.left, y: e.clientY - r.top })
  renderer.render(engine.renderState)
})
canvas.addEventListener('pointerup', (e) => {
  const r = canvas.getBoundingClientRect()
  engine.onPointerUp({ x: e.clientX - r.left, y: e.clientY - r.top })
  renderer.render(engine.renderState)
})
canvas.addEventListener('dblclick', (e) => {
  const r = canvas.getBoundingClientRect()
  engine.onDoubleClick({ x: e.clientX - r.left, y: e.clientY - r.top })
  renderer.render(engine.renderState)
})

// Import/export
engine.setAnnotations([
  { id: '1', type: 'bbox', x: 100, y: 100, width: 200, height: 150, rotation: 0, color: '#FF6B6B' },
  { id: '2', type: 'polygon', points: [{ x: 300, y: 100 }, { x: 450, y: 80 }, { x: 400, y: 250 }], color: '#4ECDC4' },
])
console.log(engine.annotations)
```

See [@labelflow-core/react](https://www.npmjs.com/package/@labelflow-core/react) or [@labelflow-core/vue](https://www.npmjs.com/package/@labelflow-core/vue) for framework-specific usage.

## License

MIT