open-index/open-npm huggingface dataset:
npm package: @nulifier/holiday-lights
Description: Determines the holiday lighting preset for a specific date.
Latest version: 1.5.3

# @nulifier/holiday-lights

Determines the holiday lighting preset for a specific date.

This is used to integrate my [WLED](https://github.com/Aircoookie/WLED) controller with
[Home Assistant](https://www.home-assistant.io/) though [Node-RED](https://nodered.org/).

## How to Use

  * Add the [flow file](node-red/flow.json) to your Node-RED instance. The important code is located
    in the Determine Preset node.
  * Make sure to update the IP address of your WLED device in the Setup node.
  * Label your presets so they align with the values in the Preset enum in
    [holidays.ts](src/holidays.ts)
npm package: @nulix/adonis-2fa
Description: A Two Factor Authentication Helper for AdonisJS
Author: brunolipe-a, nulix
Latest version: 1.1.1

# @nulix/adonis-2fa

<br />

[![gh-workflow-image]][gh-workflow-url] [![npm-image]][npm-url] ![][typescript-image] [![license-image]][license-url]

## Introduction

Two Factor Authentication using `2fa-node` integration for AdonisJS.

## Documentation

See documentation at [adonis-2fa.netlify.app](https://adonis-2fa.netlify.app)

## License

AdonisJS 2FA is open-sourced software licensed under the [MIT license](LICENSE.md).

[gh-workflow-image]: https://img.shields.io/github/actions/workflow/status/nulix-dev/adonis-2fa/test.yml?style=for-the-badge
[gh-workflow-url]: https://github.com/nulix-dev/adonis-2fa/actions/workflows/test.yml 'Github action'
[npm-image]: https://img.shields.io/npm/v/@nulix/adonis-2fa/latest.svg?style=for-the-badge&logo=npm
[npm-url]: https://www.npmjs.com/package/@nulix/adonis-2fa/v/latest 'npm'
[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
[license-url]: LICENSE.md
[license-image]: https://img.shields.io/github/license/nulix-dev/adonis-2fa?style=for-the-badge
npm package: @nulix/adonis-pdf
Description: Create PDFs in AdonisJS apps
Author: brunolipe-a,nulix
Latest version: 0.5.1

# Create PDFs in AdonisJS apps

[![Latest Version](https://img.shields.io/github/release/nulix-dev/adonis-pdf.svg?style=flat-square)](https://github.com/nulix-dev/adonis-pdf/releases)
[![MIT Licensed](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![run-tests](https://img.shields.io/github/actions/workflow/status/nulix-dev/adonis-pdf/test.yml?label=tests&style=flat-square)](https://github.com/nulix-dev/adonis-pdf/actions)

> **Note**
>
> This package is a AdonisJS version of the Laravel package [spatie/laravel-pdf](https://github.com/spatie/laravel-pdf).

This package provides a simple way to create PDFs in AdonisJS apps. Under the hood it uses [Chromium](https://www.chromium.org/chromium-projects/) to generate PDFs from EdgeJS views. You can use modern CSS features like grid and flexbox to create beautiful PDFs.

```bash
npm i @nulix/adonis-pdf

node ace @nulix/adonis-pdf
```

Here's a quick example:

```ts
import { Pdf, Format } from "@ioc:Adonis/Addons/Pdf"

Pdf.view('pdfs.invoice', { invoice })
    .format(Format.A4)
    .save('invoice.pdf')
```

This will render the Edge view `pdfs.invoice` with the given data and save it as a PDF file.

You can also return the PDF as a response from your controller:

```ts
import { Pdf, Format } from "@ioc:Adonis/Addons/Pdf"
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'

import Invoice from "App/Models/Invoice"

class DownloadInvoiceController
{
    public function download({ response }: HttpContextContract)
    {
        const invoice = Invoice.first()

        return Pdf.view('pdfs.invoice', { invoice })
            .name('your-invoice.pdf')
            .format(Format.A4)
            .toResponse(response);
    }
}
```

You can use also test your PDFs:

First you have to register it as a plugin within the entry point file, i.e. (test/bootstrap.ts)

```ts
import { assertPdf } from '@nulix/adonis-pdf'

export const plugins: Required<Config>['plugins'] = [assert(), runFailedTests(), apiClient(), assertPdf()]
```

Then, you can use the new assert functions inside your tests:

```ts
import { test } from "@japa/core"

import { Pdf } from "@ioc:Adonis/Addons/Pdf"

test('can render an invoice', async ({ client, assert }) => {
  const pdf = Pdf.fake();

  const response = await client.get('/')

  response.assertStatus(200)
  assert.pdfViewIs(pdf, 'home')
})

```

## Documentation

All documentation is available [on our documentation site](https://example.com).

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
npm package: @nulix/browsershot
Description: Convert a webpage to an image or PDF
Author: brunolipe-a,nulix
Latest version: 0.3.0

# Convert a webpage to an image or pdf using headless Chrome

[![Latest Version](https://img.shields.io/github/release/nulix-dev/browsershot.svg?style=flat-square)](https://github.com/nulix-dev/browsershot/releases)
[![MIT Licensed](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![run-tests](https://img.shields.io/github/actions/workflow/status/nulix-dev/browsershot/checks.yml?label=tests&style=flat-square)](https://github.com/nulix-dev/browsershot/actions)

> **Note**
>
> This package is a Typescript version of the PHP package [spatie/browsershot](https://github.com/spatie/browsershot).

The package can convert a webpage to an image or pdf. The conversion is done behind the scenes by [Puppeteer](https://github.com/GoogleChrome/puppeteer) which controls a headless version of Google Chrome.

```bash
npm i @nulix/browsershot
```

Here's a quick example:

```ts
import { Browsershot } from '@nulix/browsershot'

// an image will be saved
Browsershot.url('https://example.com').save(pathToImage);
```

It will save a pdf if the path passed to the `save` method has a `pdf` extension.

```ts
// a pdf will be saved
Browsershot.url('https://example.com').save('example.pdf');
```

You can also use an arbitrary html input, simply replace the `url` method with `html`:

```ts
Browsershot.html('<h1>Hello world!!</h1>').save('example.pdf');
```

If your HTML input is already in a file locally use the :

```ts
Browsershot.htmlFromFilePath('/local/path/to/file.html').save('example.pdf');
```

Browsershot also can get the body of an html page after JavaScript has been executed:

```ts
Browsershot.url('https://example.com').bodyHtml(); // returns the html of the body
```

If you wish to retrieve an array list with all of the requests that the page triggered you can do so:

```ts
const requests = Browsershot.url('https://example.com')
    .triggeredRequests();

for (const request as requests) {
    const url = request.url; //https://example.com/
}
```

To use Chrome's new [headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome) pass the `newHeadless` method:

```ts
Browsershot.url('https://example.com').newHeadless().save(pathToImage);
```

## Documentation

All documentation is available [on our documentation site](https://example.com).

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
npm package: @null-none/hyper-view
Description: Full-featured HTMX-style micro library with WebSocket, history, spinner, and more
Author: Kalinin Mitko
Latest version: 1.0.1

# hyper-view
Full-featured HTMX-style micro library with WebSocket, history, spinner, and more


```html
<!-- Button with GET request -->
<button hv-get="/api/time" hv-target="#result" hv-swap="innerHTML">Show Time</button>
<div id="result">Result will appear here</div>

<!-- Button with POST request and parameters -->
<button hv-post="/api/hello" hv-params='{"name": "Ivan"}' hv-target="#greeting">Say Hello</button>
<div id="greeting"></div>

<!-- Form example -->
<form hv-post="/api/send" hv-target="#status">
  <input name="email" placeholder="Your email">
  <button type="submit">Send</button>
</form>
<div id="status"></div>

<!-- Auto-load content on page load -->
<div hv-get="/api/hello" hv-target="#autoload" hv-trigger="load"></div>
<div id="autoload"></div>

<!-- WebSocket connection -->
<div hv-ws="ws://localhost:8000/ws" hv-swap="innerHTML"></div>
```