open-index/open-npm huggingface dataset:
npm package: @primittive/eslint-config
Description: Primitive ESLint configuration.
Latest version: 1.0.6

# Primittive ESLint config

## Included?

- Prettier;
- React Hooks plugin;
- React plugin;
- Standard config base;
- JSX a11y plugin;

Install dependencies:
```
npm i -D eslint @primittive/eslint-config
```
or

```
pnpm i -D eslint @primittive/eslint-config
```
or

```
yarn i -D eslint @primittive/eslint-config
```

## Setup

### React (with Next.js)

Inside `.eslintrc.json`
```
{
  "extends": [
    "@primittive/eslint-config/next", 
    "next/core-web-vitals"
  ]
}
```

### React (without Next.js)

Inside `.eslintrc.json`
```
{
  "extends": "@primittive/eslint-config/react"
}
```

### Node.js

Inside `.eslintrc.json`
```
{
  "extends": "@primittive/eslint-config/node"
}
```
> You can also use a `.eslintrc.js` instead of JSON if you prefer.
npm package: @primno/cli
Description: Command-line interface tool for initializing, building, and deploying Primno workspaces
Author: Xavier Monin
Latest version: 0.8.0

# Primno CLI

[![npm](https://img.shields.io/npm/v/@primno/cli.svg)](https://www.npmjs.com/package/@primno/cli)
[![npm](https://img.shields.io/npm/l/@primno/cli.svg)](https://github.com/primno/cli/blob/main/LICENSE)
![build](https://img.shields.io/github/actions/workflow/status/primno/cli/test.yml)

Primno CLI is a command-line interface tool for initializing, building, and deploying [Primno](https://github.com/primno/primno) projects from a command shell.

> **Important**
> primno is in beta stage and subject to change.

## Documentation

The documentation can be found on [https://primno.io](https://primno.io).

- [Getting Started](https://primno.io/docs/getting-started)
- [CLI](https://primno.io/docs/guides/cli)
- [Guides](https://primno.io/docs/guides)
- [API Reference](https://primno.io/docs/api-reference)

## Installation

```bash
npm install -g @primno/cli
```

## Commands

- `mn new <name>` - Create a new primno project.
- `mn build` - Build project.
- `mn watch` - Watch project for changes.
- `mn start` - Start the project during development cycle.
- `mn deploy` - Build and deploy project to D365.
npm package: @primno/core
Description: Front-end framework for Model-Driven Apps of Power Apps and Dynamics 365.
Author: Xavier Monin
Latest version: 0.8.0

# Primno Core - @primno/core

[![npm](https://img.shields.io/npm/v/@primno/core.svg)](https://www.npmjs.com/package/@primno/core)
[![npm](https://img.shields.io/npm/l/@primno/core.svg)](https://github.com/primno/primno/blob/main/LICENSE)
![build](https://img.shields.io/github/actions/workflow/status/primno/primno/test.yml)
![node-current](https://img.shields.io/node/v/@primno/core)

This package contains the core functionality of Primno:
- [Component](https://primno.io/docs/guides/components)
- [Dependency Injection](https://primno.io/docs/guides/dependency-injection)
- [Events](https://primno.io/docs/guides/events)

> Primno is in beta stage and subject to change.

## Documentation

The full documentation can be found on [https://primno.io](https://primno.io).
npm package: @primno/dpapi
Description: Pre-built version of DPAPI (Data Protection API of Windows). Encrypt and decrypt data.
Author: Xavier Monin
Latest version: 2.0.1

# DPAPI
[![npm](https://img.shields.io/npm/v/@primno/dpapi.svg)](https://www.npmjs.com/package/@primno/dpapi)
[![npm](https://img.shields.io/npm/l/@primno/dpapi.svg)](https://github.com/primno/dpapi/blob/main/LICENSE)
![build](https://img.shields.io/github/actions/workflow/status/primno/dpapi/test.yml)
[![coverage](https://codecov.io/gh/primno/dpapi/branch/main/graph/badge.svg?token=J4AVWIOR9F)](https://codecov.io/gh/primno/dpapi)

Native module to encrypt/decrypt data on Windows with DPAPI.

This native module is **prebuilt** for Node.JS running on Windows. It provides the **x64** and the **arm64** N-API modules for Windows.

This package indicates if the prebuilt module is supported on the current platform.

Based on the port to N-API made by [Microsoft](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/extensions/msal-node-extensions/src/dpapi-addon) in @msal-node-extension from the work of [Brad Hughes](https://github.com/bradhugh/node-dpapi).

> This package is part of the [Primno](https://primno.io) framework.

## Why this package?

Other similar packages require to build the native module on the target machine during the installation.
This means that you must have Python and Visual C++ installed, production environment included.

This package is prebuilt, so you don't need to have build tools installed on the target machine.

## Install

The prebuilt module will be installed with the following command.

```bash
npm install @primno/dpapi
```

## Definition

```ts
class Dpapi {
    public protectData(
        userData: Uint8Array,
        optionalEntropy: Uint8Array | null,
        scope: "CurrentUser" | "LocalMachine"
    ): Uint8Array;

    public unprotectData(
        encryptedData: Uint8Array,
        optionalEntropy: Uint8Array | null,
        scope: "CurrentUser" | "LocalMachine"
    ): Uint8Array;
}

const isPlatformSupported: boolean;
```

## Usage

### ECMAScript Module
```ts
import { Dpapi, isPlatformSupported } from "@primno/dpapi";

if (isPlatformSupported) {
    const buffer = Buffer.from("Hello world", "utf-8");

    const encrypted = Dpapi.protectData(buffer, null, "CurrentUser");
    const decrypted = Dpapi.unprotectData(encrypted, null, "CurrentUser");
}
else {
    console.error("Platform not supported. Only Windows is supported (x64, ARM64)");
}
```

### CommonJS
```js
const { Dpapi, isPlatformSupported } = require("@primno/dpapi");

if (isPlatformSupported) {
    const buffer = Buffer.from("Hello world", "utf-8");

    const encrypted = Dpapi.protectData(buffer, null, "CurrentUser");
    const decrypted = Dpapi.unprotectData(encrypted, null, "CurrentUser");
}
else {
    console.error("Platform not supported. Only Windows is supported (x64, ARM64)");
}
```

## Credits

- Brad Hughes for the original code.
- Microsoft for the N-API port in MSAL-Node-Extension.