open-index/open-npm huggingface dataset:
npm package: @nodefactory/server-eth-auth
Description: Validation of web3 signatures for server ethereum authentication
Author: Nodefactory
Latest version: 0.1.3

# Server-eth-auth
![Build Status](https://img.shields.io/github/workflow/status/nodefactoryio/server-eth-auth/ci)
![GitHub](https://img.shields.io/github/license/NodeFactoryIo/server-eth-auth)
![Node](https://img.shields.io/node/v/@nodefactory/server-eth-auth)
![Npm](https://img.shields.io/npm/v/@nodefactory/server-eth-auth)

This repository contains TypeScript implementation of validation for web3 signers
signatures used for authenticating on server.

# Usage

Install with `yarn add @nodefactory/server-eth-auth` or `npm i @nodefactory/server-eth-auth`

Example of usage:

```typescript
import {EthAuth} from "@nodefactory/server-eth-auth";

const domain = "Nodefactory" // shown in signer when requesting signature
const ethAuth = new EthAuth(storage: IChallengeStorage, domain)

// Creating challenge for sending to user for signature
ethAuth.createChallenge(userEthereumAddress);

const challengeHash = "hash" // user sent value that was created in createChallenge under challenge.message.value
const signature = "signature" // signature returned from signer
// Validating user signature
const address = ethAuth.checkChallenge(challengeHash, signature)
```

This package should be used in controller with 2 api endpoints:
 - challenge endpoint that returns created challenge for user given ethereum address
 - login endpoint that validates signature generated by signer with checkChallenge and creates and returns authentication token that can be later validated

This package requires for [IChallengeStorage](src/@types/index.d.ts) to be implemented to store created challenge hashes. Type of storage is open to choice (eg. db, cache, memory, etc.)

## License

[MIT](LICENSE)
npm package: @nodefactory/solidity-comments-core
Description: ![build status](https://travis-ci.org/NodeFactoryIo/solidity-comments-core.svg?branch=master) [![Coverage Status](https://coveralls.io/repos/github/NodeFactoryIo/solidity-comments-core/badge.svg?branch=master)](https://coveralls.io/github/NodeFactoryIo/so
Latest version: 1.2.2

# Solidity comments generator
![build status](https://travis-ci.org/NodeFactoryIo/solidity-comments-core.svg?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/NodeFactoryIo/solidity-comments-core/badge.svg?branch=master)](https://coveralls.io/github/NodeFactoryIo/solidity-comments-core?branch=master)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
-----------------------

Simple library that parses solidity contracts and inserts default solidity comments based on natspec.

## Development
Pull code, run `yarn install`, write tests :)
npm package: @nodegit/is
Description: The definitive checking library for git
Author: kaelzhang
Latest version: 1.0.0

[![Build Status](https://travis-ci.org/kaelzhang/nodegit-is.svg?branch=master)](https://travis-ci.org/kaelzhang/nodegit-is)
[![Coverage](https://codecov.io/gh/kaelzhang/nodegit-is/branch/master/graph/badge.svg)](https://codecov.io/gh/kaelzhang/nodegit-is)
<!-- optional appveyor tst
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/kaelzhang/nodegit-is?branch=master&svg=true)](https://ci.appveyor.com/project/kaelzhang/nodegit-is)
-->
<!-- optional npm version
[![NPM version](https://badge.fury.io/js/@nodegit/is.svg)](http://badge.fury.io/js/@nodegit/is)
-->
<!-- optional npm downloads
[![npm module downloads per month](http://img.shields.io/npm/dm/@nodegit/is.svg)](https://www.npmjs.org/package/@nodegit/is)
-->
<!-- optional dependency status
[![Dependency Status](https://david-dm.org/kaelzhang/nodegit-is.svg)](https://david-dm.org/kaelzhang/nodegit-is)
-->

# @nodegit/is

The definitive checking library for git

## Install

```sh
$ npm i @nodegit/is
```

## Usage

```js
const is = require('@nodegit/is')

// Test if the current working directory is a git repo
// or inside a git repo
is.git()

// Which is equivalent to
is.git(process.cwd())

// Test if the current working directory is the root of a git repo
is.gitRoot()
```

### git(dir = process.cwd()): boolean

- **dir** `string=process.cwd()` the directory to be tested. If not specified, the current working directory will be used

Returns `boolean` true if `cwd` is the root of a git repo or inside a git repo

### gitRoot(dir = process.cwd()): boolean

- **dir**

Returns `boolean` true if `cwd` is the root of a git repo

## License

[MIT](LICENSE)
npm package: @nodegit/read-config
Description: Read config for @nodegit commands
Author: kaelzhang
Latest version: 1.0.1

[![Build Status](https://travis-ci.org/kaelzhang/nodegit-read-config.svg?branch=master)](https://travis-ci.org/kaelzhang/nodegit-read-config)
[![Coverage](https://codecov.io/gh/kaelzhang/nodegit-read-config/branch/master/graph/badge.svg)](https://codecov.io/gh/kaelzhang/nodegit-read-config)
<!-- optional appveyor tst
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/kaelzhang/nodegit-read-config?branch=master&svg=true)](https://ci.appveyor.com/project/kaelzhang/nodegit-read-config)
-->
<!-- optional npm version
[![NPM version](https://badge.fury.io/js/@nodegit/read-config.svg)](http://badge.fury.io/js/@nodegit/read-config)
-->
<!-- optional npm downloads
[![npm module downloads per month](http://img.shields.io/npm/dm/@nodegit/read-config.svg)](https://www.npmjs.org/package/@nodegit/read-config)
-->
<!-- optional dependency status
[![Dependency Status](https://david-dm.org/kaelzhang/nodegit-read-config.svg)](https://david-dm.org/kaelzhang/nodegit-read-config)
-->

# @nodegit/read-config

Read config for @nodegit commands

## Install

```sh
$ npm i @nodegit/read-config
```

## Usage

```js
const config = require('@nodegit/read-config')
const {read, edit, path} = config('push', {
  defaults: {
    allowForcePush: true
  }
})

console.log(await read())
```

## config(name, options)

- **name** `string` name of the config which indicates that the config file will be located at `~/.nodegit/config/${name}.js`
- **options** `Object`
  - **defaults?** `Object` the default value of the configuration
  - **defaultFileContent?** `string | Buffer` the default configuration content to be used if there is no config file found.

If `options.defaults` is specified, then it will ignore `options.defaultFileContent`.

```js
const {read} = config('push', {
  defaultFileContent:
`module.exports = {
  editor: 'vscode'
}`
})

const {editor} = await read()
```

### await read(): Object

Get the local config. If there is no config file found, it will create one.

### await edit(): void

Open the default editor and edit the config file

### getter: path

Returns `path` the absolute pathname of the config file

## License

[MIT](LICENSE)
npm package: @nodegui/nodegui-os-utils
Description: A NodeGui native plugin for managing macOS native apis
Author: Atul R
Latest version: 1.0.0
Deprecated: This package is now deprecated in favor of @nodegui/os-utils

# nodegui-os-utils

A nodegui helper module which will contain OS specific native features which Qt doesnt support and hence requires native code in respective operting systems.

# Installation

```
npm install @nodegui/nodegui-os-utils
```

# Usage

```js
import { Dock } from "@nodegui/nodegui-os-utils";

console.log("Showing the Dock Icon on MacOS");
Dock.show();
console.log("Hiding the Dock Icon on MacOS");
Dock.hide();
```

# Supported APIs

## MacOS

- Dock
  - `show()` - static method - Shows the dock icon of the nodegui app on macos. Noop on other platforms.
  - `hide()` - static method - Hides the dock icon of the nodegui app on macos. Noop on other platforms.

# License

MIT
npm package: @nodegui/os-utils
Description: A helper module which contains OS specific native features.
Author: Atul R
Latest version: 1.1.2

# os-utils

[![npm version](https://img.shields.io/npm/v/@nodegui/os-utils.svg)](https://www.npmjs.com/package/@nodegui/os-utils)

A helper module which contains OS specific native features.

## Installation

```
npm install @nodegui/os-utils
```

## Usage

```js
import { Dock } from "@nodegui/os-utils";

console.log("Showing the Dock icon on macOS");
Dock.show();
console.log("Hiding the Dock icon on macOS");
Dock.hide();
```

```js
import { AboutPanel } from "@nodegui/os-utils";

console.log("Open the about panel on macOS");
AboutPanel.open();
console.log("Open the about panel on macOS with modified defaults");
AboutPanel.open({ name: "Custom name", version: "2.3.5" });
```

```js
import { Info } from "@nodegui/os-utils";

console.log("isDarkMode: " + Info.isDarkMode());
```

## Supported APIs

### macOS

- Dock

  - `show()` - static method - Shows the Dock icon on macOS. Does nothing on other platforms.
  - `hide()` - static method - Hides the Dock icon on macOS. Does nothing on other platforms.

- AboutPanel

  - `open(options?: object)` - static method - Opens the about panel on macOS. Does nothing on other platforms. `options` is optional and can contain the following strings: `name`, `version`, `applicationVersion`, and `copyright`. The default values are derived from `Info.plist`.

- Info
  - `isDarkMode` - static method - Checks if the OS theme is dark mode in macOS. Does nothing on other platforms and returns false. Returns a boolean.

## License

MIT
npm package: @nodegui/packer
Description: Package and deploy apps built with NodeGUI to all platforms
Author: atulanand94@gmail.com
Latest version: 1.5.0

# Packer 📦

Packer is a npm module that allows you to package apps built with NodeGui or React NodeGui into a standalone executable. Packer works on Mac, Windows and Linux

This is a initial MVP release of the module.

On MacOS - Packer will output a dmg file

On Linux - Packer will output an AppImage which is something similar to a .app file in MacOS

On Windows - Packer outputs a folder containing the executable and all the dlls.

Currently if you need to produce a build you need to run the packer in different OS environments. That is, cross platform builds are not supported in this release.

# Usage

- First step is to install the packer as a dev dependency. You can do so by:

  `npm install --save-dev @nodegui/packer`

- Next you can run the init command:

  `npx nodegui-packer --init MyApp`

  This will produce the deploy directory containing the template. You can modify this to suite your needs. Like add icons, change the name, description and add other native features or dependencies. Make sure you commit this directory.

- Next you can run the pack command:

  `npx nodegui-packer --pack <path to dist>`

  This command essential takes the dist folder as the input and puts it in the suitable location inside the standalone executable. Also it runs the correct deployment tool (macdeployqt incase of mac, etc) and packs in the dependencies. The output of the command is found under the build directory. You should gitignore the build directory.

- macOS supports signing the application:

  `npx nodegui-packer --pack <path to dist>`

# How does it work ?

Packer uses Qt's packaging tools in all three platforms.

- On Mac - it uses macdeployqt : https://doc.qt.io/qt-5.9/osx-deployment.html#macdeploy
- On Windows - it uses windeployqt : https://doc.qt.io/qt-5/windows-deployment.html
- On Linux - There is no official tool, hence it uses linuxdeployqt - https://github.com/probonopd/linuxdeployqt

# Requirements

- Needs Qode v2.x (NodeGui v0.15.0 and up)

# Future enhancements:

1. Cross platform builds.
2. Better documentation.
3. Reduce / Remove unnecessary dynamic libraries.
4. Reduce qode binary size.

**Please feel free to help out with this in anyway you can.**
npm package: @nodegui/plugin-animation
Description: A animation native plugin example for NodeGui
Author: Atul R
Latest version: 1.1.0

# NodeGui plugin animation

[![npm version](https://img.shields.io/npm/v/@nodegui/plugin-animation.svg)](https://www.npmjs.com/package/@nodegui/plugin-animation)

Plugin you can use to create native animations in NodeGui

## Requirements

Requires NodeGui v0.19.0 and up

## Installation

```
    npm install @nodegui/plugin-animation
```

## Demo

```js
import { QPropertyAnimation } from '@nodegui/plugin-animation';
import { QPushButton } from '@nodegui/nodegui';

const animation = new QPropertyAnimation();

const button = new QPushButton();
button.setText('Animated Button');
button.show();

animation.setPropertyName('windowOpacity');
animation.setTargetObject(button);

animation.setDuration(5000);
animation.setStartValue(0.4);
animation.setKeyValueAt(0.5, 1.0);
animation.setEndValue(0.4);

animation.start();

(global as any).button = button;
(global as any).animation = animation;
```
npm package: @nodegui/plugin-title-bar
Description: Plugin for NodeGUI to hide macOS title bar and leave only traffic lights.
Author: Dimitar Nestorov
Latest version: 0.0.2

# @nodegui/plugin-title-bar

[![npm version](https://img.shields.io/npm/v/@nodegui/plugin-title-bar.svg)](https://www.npmjs.com/package/@nodegui/plugin-title-bar)

Plugin for NodeGUI to hide macOS title bar and leave only traffic lights.

<p align="center">
<img src="https://raw.githubusercontent.com/nodegui/nodegui-plugin-title-bar/master/assets/showcaseDefault.png" width="250" height="193">
<img src="https://raw.githubusercontent.com/nodegui/nodegui-plugin-title-bar/master/assets/showcaseHidden.png" width="250" height="193">
<img src="https://raw.githubusercontent.com/nodegui/nodegui-plugin-title-bar/master/assets/showcaseHiddenInset.png" width="250" height="193">
</p>

## Installation

```sh
npm install @nodegui/plugin-title-bar
```

## Usage

```javascript
import { QMainWindow } from '@nodegui/nodegui'
import { setTitleBarStyle } from '@nodegui/plugin-title-bar'

const window = new QMainWindow()
window.show()
setTitleBarStyle(window.native, 'hidden') // or hiddenInset
global.win = window // Prevents window from being garbage collected
```
npm package: @nodegui/qode
Description: Qode is a lightly modified fork of Node.js that allows injecting a third party event loop alongside Node's event loop. It is designed to be used together with `@nodegui/nodegui`
Author: atulanand94@gmail.com
Latest version: 24.12.0-rc18

# Qode

<img alt="logo" src="https://github.com/nodegui/nodegui/raw/master/extras/logo/nodegui.png" height="200" />

Qode is a lightly modified fork of Node.js that allows Node's event loop to be merged with Qt's or any other Gui event loop.
It is designed to be used together with `@nodegui/nodegui`. Qode achieves this by allowing message loop injection via a NodeJS addon.

Qode allows you to run both Qt and Node's event loops in the same thread. This is crucial to achieving low CPU footprint.
Qode can be used as a _drop in_ replacement of NodeJS and hence you could consider it as NodeJS with Qt powers 💪.

This npm module downloads the prebuilt qode for the current Operating System.

_Build Instructions for qode can be found here:_ https://github.com/nodegui/qode

# Installation

```
yarn add @nodegui/qode
```

or

```
npm install @nodegui/qode
```

### Dowload mirrors

By default qode is downloaded using the github releases at

```js
`https://github.com/nodegui/qodejs/releases/download/v${libVersion}-qode/${gitTagVersion}-${platform}-${arch}.tar.gz`
```

if you need to specify an alternative download path you can set the environment variable `QODE_MIRROR` like so and run npm install

```
QODE_MIRROR=https://github.com/nodegui/qodejs/releases/download/v1.2-qode/1.2-linux-x64.tar.gz npm install @nodegui/qodejs
```

If it doesnt download make sure to clear the cached qode at https://github.com/nodegui/qodejs/blob/89ccb29fe3c9d66426311a95369c47820bca4de5/qode/npm/src/config.js#L29

# Version Table:

| Qode        | Node    | Qt                 |
| ----------- | ------- | ------------------ |
| 2.0.0       | 12.11.0 | depends on Nodegui |
| ----------- | ------- | ------------------ |
| 3.0.0       | 16.4.0  | depends on Nodegui |
npm package: @nodegui/svelte-nodegui-preprocessor
Description: A preprocessor for [Svelte NodeGUI](https://github.com/nodegui/svelte-nodegui); forked from [halfnelson](https://github.com/halfnelson)'s [svelte-native-preprocessor](https://github.com/halfnelson/svelte-native-preprocessor) for [Svelte Native](https://gi
Author: Saurav Sahu
Latest version: 0.1.0

# Svelte NodeGUI Preprocessor

A preprocessor for [Svelte NodeGUI](https://github.com/nodegui/svelte-nodegui); forked from [halfnelson](https://github.com/halfnelson)'s [svelte-native-preprocessor](https://github.com/halfnelson/svelte-native-preprocessor) for [Svelte Native](https://github.com/halfnelson/svelte-native).

It performs the following transforms to provide a better developer experience when using Svelte NodeGUI:

 - [x] Adds `<svelte:options namespace="foreign" />` to the component, ensuring the generated code is compatible with Svelte NodeGUI
 

## Installation

Using `svelte-loader`, in `webpack.config.js`:

```js
const SvelteNodeGUIPreprocessor = require("@nodegui/svelte-nodegui-preprocessor");
```

Where the `svelte-loader` is registered, add the preprocessor to `options.preprocess`:

```js
 {
    test: /\.svelte$/,
    exclude: /node_modules/,
    use: [
        { 
            loader: 'svelte-loader',
            options: {
                preprocess: SvelteNodeGUIPreprocessor()
            }
        }
    ]
},
```

There is a similar process for `rollup-plugin-svelte`, but users of that library are usually skilled enough to work it out ;)


## License

[MIT](LICENSE).