open-index/open-npm huggingface dataset:
npm package: @mayank.shete/sf-validator
Description: Salesforce CLI plugin to validate metadata dependencies against target orgs before deployment
Latest version: 1.0.1

# @mayank.shete/sf-validator

Salesforce CLI plugin to validate metadata references from a `PermissionSet` XML file against a target org before deployment.

## Install

```bash
sf plugins install @mayank.shete/sf-validator
```

## Validate Permission Set XML

Use this command to validate a Permission Set file:

```bash
sf validate --file force-app/main/default/permissionsets/MyPermissionSet.permissionset-meta.xml --type permissionset --target-org myOrgAlias
```

### Required flags

- `--file, -f`: Path to the source metadata file.
- `--target-org`: Target org username or alias.

### Optional flags

- `--type, -t`: Validator type. Default is `permissionset`.

## Output behavior

- Returns missing metadata references grouped by metadata type.
- Returns warnings and errors if encountered during validation.
- Exits with non-zero status when missing references or errors are found (CI/CD friendly).

## Local development

```bash
npm install
npm run build
```

Then link locally for testing:

```bash
sf plugins link .
```