open-index/open-npm huggingface dataset:
npm package: @s-ui/component-peer-dependencies
Description: A set of dependencies for hosts of sui components.
Latest version: 1.9.0

# sui-component-peer-dependencies
> A set of dependencies of all SUI components.

Components define as peer dependencies React related packages.
When hosting components, this package is its single source of truth.

## Installation

```sh
$ npm install @s-ui/component-peer-dependencies --save-dev
```
npm package: @s-ui/consents
Description: iab consents handler
Latest version: 1.6.0

# sui-consents

> user consents handler

```sh
$ npm install @s-ui/consents
```

## hasUserConsents

Returns if a user has given its consent to a set of consents.

```js
import {hasUserConsents} from '@s-ui/consents'

const cookies = (req) => {
  if (isClient) {
    return document.cookie
  }
  return req.headers.cookie
}

// will return true if user did accept at least to consents 1, 2 and 3
hasUserConsents({
  requiredConsents: [1, 2, 3],
  cookies
})
```

## useUserConsents

React hook that returns whether a user has given its consent to a set of consents or not, and updates over time if the user changes the consents.

**IMPORTANT NOTE:** This hook **requires** an isomorphic **`cookies`** property to reside **in your SUIContext**. This is necessary for the initial state to work.

After initial state is set via cookies from the context, the hook will consume TCF events to keep itself updated. All this is internally managed by the hook for you.

```js
import {useUserConsents} from '@s-ui/consents'

// will return true if user did accept at least to consents 1, 2 and 3
const isAccepted = useUserConsents([1, 2, 3])
```
npm package: @s-ui/cz
Description: Commitizen adapter for sui packages
Latest version: 1.11.0

# sui-cz
> A commitizen adapter for semantic commits.

It provides
* CLI commit prompt to guide developer on commit messages.
* Enforcement of semantic commits human-readable and machine- parsable.
* Parseable commits are used for releases by [sui-mono](../sui-mono)

It's highly inspired in `cz-customizable` adapter.

![](./assets/sui-cz-demo.gif)


## Installation/Usage


### Use sui-cz types with [validate-commit-msg](https://www.npmjs.com/package/validate-commit-msg)

```shell
npm install --save-dev validate-commit-msg
npm install --save-dev @s-ui/cz
```

in `package.json`

```js
{
  "config": {
    "validate-commit-msg": {
      "types": "@s-ui/cz/types"
      /* rest of your config here */
    }
  }
}
```

### Integrating validate-commit-msg with git "commit-msg" hook

We recommend using [husky](https://www.npmjs.com/package/husky).

```
npm install husky --save-dev
```


```shell
npm install --save-dev validate-commit-msg
npm install --save-dev @s-ui/cz
```

in `package.json`

```js
{
  "scripts": {
    /* ... your own scripts ... */
    "commitmsg": "validate-commit-msg"
  }
}
```
npm package: @s-ui/dashboard
Description: Show stats about the current SUI-Components usage in differents projects.
Latest version: 1.36.0

# @s-ui/dashboard

Show stats about the current SUI-Components usage in differents projects.

If you want to add or remove a project, you have to edit the `bin/sui-dashboard-components.js` file.

## Usage:

`npx @s-ui/dashboard components`

If you want to get the results including versions you should use:

`npx @s-ui/dashboard components -- -v`

If you want to save a file with the result you can also use:

`npx @s-ui/dashboard components -- -o ./output.json`

Or simply combine both options:

`npx @s-ui/dashboard components -- -v -o ./output.json`

## CLI:

```
Usage: sui-dashboard [options] [command]

Options:
      --version  output the version number
  -h, --help     output usage information

Commands:
  components     Update several metrics about sui-components
    Options:
        -v --versions           output versions used
        -o --output <filename>  save result on filename
  help [cmd]     display help for [cmd]

```
npm package: @s-ui/deploy
Description:  CLI to deploy of sui-based projects
Author: David Almeida
Latest version: 2.11.0

# sui-deploy

> CLI to deploy of sui-based projects.

It provides:

* Common way to deploy our projects
* SPA deployments

## Installation

```sh
$ npm install @s-ui/deploy --save-dev
```

## CLI

When installed, a new CLI `sui-deploy` (node_modules/.bin/sui-deploy) is automatically available to deploy your projects.

Deploy a folder as an static SPA:

```sh
$ sui-deploy <name-of-project> [build-folder=./public] --now
$ sui-deploy spa <name-of-project> [build-folder=./public] --now
```

### `sui-deploy <name> [folder]`

Deploys given folder.
Handles:
* `docker run` if DockerFile is found.
* `npm run start` if package.json is found.
* `serve .` otherwise.


### `sui-deploy spa <name> [folder]`

Same as previous but deploys app as an SPA, adding the option of auth.
A static server is run but not found routes point to index.html to make SPAs routing to work.


### Options

#### `--now`

Only hosting service available. Deploys to now.sh

```sh
$ sui-deploy spa 'test-project' --now -p
```

Deploys to test-project.now.sh

#### `-a, --auth <user:password>` (only for spa)

HTTP authentication user and pass separated by `:`.

```sh
$ sui-deploy spa test-project --now -a 'my-user:my-password'
```

#### `-p, --public`

Force skipping auth to make your deployment public.

**CAUTION:** if your deployment is public, it's also indexable by search engines.

```sh
$ sui-deploy spa test-project --now -p
```

#### `-b, --branch`

Append git branch name to deploy name.

```sh
$ sui-deploy spa test-project --now -b -a 'my-user:my-password'
```

If your branch is `my-feature`, your code will be deployed to test-project-my-feature.now.sh

### `-e, --environmentVars`

Append multiple env vars that will be passed to our deployer

```sh
$ sui-deploy spa test-project --now -b -a 'my-user:my-password' -e NODE_ENV=preproduction -e GH_AUTH_TOKEN=secret
```

## Authentification

**When --now option is set**, `sui-deploy` needs a now token to deploy files. The token is obtain from the env variable `NOW_TOKEN`

You can set your token once with a simple command.

```sh
$ export NOW_TOKEN=my-token-from-now
```

## Help

Run the following command for further options:

```sh
$ sui-deploy help
```

or

```sh
$ sui-deploy spa --help
```

## Example package.json

```json
{
  "name": "@my-scope/test-project",
  "version": "1.0.0",
  "scripts": {
    "build": "sui-bundler build -C",
    "deploy": "sui-deploy spa test-project --now -a 'my-user:my-password'"
  },
  "devDependencies": {
    "@s-ui/deploy": "2"
  }
}
```

To deploy your project:

```sh
$ npm run build; npm run deploy
```
npm package: @s-ui/helpers
Description: A set of internal helpers used by sui-related packages.
Latest version: 1.39.0

# sui-helpers

> A set of internal helpers used by sui-related packages.


## Usage

```js
import {serialSpawn} from '@s-ui/helpers/cli'

serialSpawn([
    ['sui-lint', ['js']],
    ['sui-lint', ['sass']],
    ['npm', ['run', 'test']]
])
  .then(code => process.exit(code))
  .catch(code => process.exit(code))
```