# folder-profile

> A simple sfdx script to streamline the process of profile creation making use of folder structure, CSV and JSON files.

Latest version **0.1.5** (published 2021-08-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install folder-profile
pnpm add folder-profile
yarn add folder-profile
bun add folder-profile
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2021-08-06 |
| First published | 2021-07-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 8 |
| Unpacked size | 26.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Todd |
| Maintainers | toddteese |
| Keywords | sfdx-plugin |

## Links

- npm: https://www.npmjs.com/package/folder-profile
- Repository: https://github.com/ToddTeese/folder-profile
- Issues: https://github.com/ToddTeese/folder-profile/issues
- npm.io page: https://npm.io/package/folder-profile

## Dependencies (8)

- [tslib](https://npm.io/package/tslib.md) ^1
- [get-stream](https://npm.io/package/get-stream.md) ^6.0.1
- [glob-parent](https://npm.io/package/glob-parent.md) 5.1.2
- [@oclif/config](https://npm.io/package/@oclif/config.md) ^1.17.0
- [@oclif/errors](https://npm.io/package/@oclif/errors.md) ^1
- [@oclif/command](https://npm.io/package/@oclif/command.md) ^1
- [@salesforce/command](https://npm.io/package/@salesforce/command.md) ^2
- [@salesforce/ts-sinon](https://npm.io/package/@salesforce/ts-sinon.md) ^1.3.21

## Recent versions

- 0.1.5 (latest) — 2021-08-06
- 0.1.4 — 2021-08-04
- 0.1.3 — 2021-08-04
- 0.1.2 — 2021-08-03
- 0.1.1 — 2021-08-03
- 0.1.0 — 2021-08-03
- 0.0.10 — 2021-08-03
- 0.0.9 — 2021-08-03
- 0.0.8 — 2021-08-03
- 0.0.7 — 2021-08-03
- 0.0.6 — 2021-08-03
- 0.0.5 — 2021-08-02
- 0.0.4 — 2021-08-02
- 0.0.3 — 2021-08-02
- 0.0.2 — 2021-07-30
- … 1 more at https://npm.io/package/folder-profile/versions

## README

folder-profile
==============

[![Version](https://img.shields.io/npm/v/folder-profile.svg)](https://npmjs.org/package/folder-profile)
[![CircleCI](https://circleci.com/gh/ToddTeese/folder-profile/tree/master.svg?style=shield)](https://circleci.com/gh/ToddTeese/folder-profile/tree/master)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/ToddTeese/folder-profile?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/folder-profile/branch/master)
[![Codecov](https://codecov.io/gh/ToddTeese/folder-profile/branch/master/graph/badge.svg)](https://codecov.io/gh/ToddTeese/folder-profile)
[![Greenkeeper](https://badges.greenkeeper.io/ToddTeese/folder-profile.svg)](https://greenkeeper.io/)
[![Known Vulnerabilities](https://snyk.io/test/github/ToddTeese/folder-profile/badge.svg)](https://snyk.io/test/github/ToddTeese/folder-profile)
[![Downloads/week](https://img.shields.io/npm/dw/folder-profile.svg)](https://npmjs.org/package/folder-profile)
[![License](https://img.shields.io/npm/l/folder-profile.svg)](https://github.com/ToddTeese/folder-profile/blob/master/package.json)

## Providing an easier way to manage profile changes through source control
A simple sfdx script to streamline the process of profile creation making use of folder structure, CSV and JSON files.

- The script takes a source folder with named subfolders. 
- These subfolders will be the the names of the created Profiles.
- CSV names provide the attribute type name + CSV data provides values.
- JSON is used for single attribute tags. i.e 'custom'

```
Profiles [SOURCE]
|---Admin
|   |   fieldPermission.csv
|   |   objectPermission.csv
|---Sales User
|   |   fieldPermission.csv
|   |   objectPermission.csv
|   |   layoutAssignment.csv
|---Marketing User
|   |   fieldPermission.csv
|   |   objectPermission.csv
|   |   otherAttributes.json
```

Transforms to

```
ProfilesOutput [TARGET]
|   Admin.profile-meta.xml
|   Sales User.profile-meta.xml
|   Marketing User.profile-meta.xml
```

## Warning
- Currently SOURCE and TARGET should both be absolute paths due to the early nature of this project.

```sh-session
$ sfdx plugins:install folder-profile
$ sfdx folder:profile -s [SOURCE] -t [TARGET]
running command...
$ sfdx (-v|--version|version)
folder-profile/0.1.3 win32-x64 node-v14.17.4
$ sfdx --help [COMMAND]
USAGE
  $ sfdx COMMAND
...
```

* [`sfdx folder:profile -s <string> -t <string> [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-folderprofile--s-string--t-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)

## `sfdx folder:profile -s <string> -t <string> [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

Convert Folder Structure to XML

```
Convert Folder Structure to XML

USAGE
  $ sfdx folder:profile -s <string> -t <string> [--json] [--loglevel 
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

OPTIONS
  -s, --source=source                                                               (required) Source of Profile
                                                                                    Attributes

  -t, --target=target                                                               (required) Target Folder for
                                                                                    Generated Profiles

  --json                                                                            format output as json

  --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)  [default: warn] logging level for
                                                                                    this command invocation
```

_See code: [lib/commands/folder/profile.js](https://github.com/ToddTeese/folder-profile/blob/v0.1.3/lib/commands/folder/profile.js)_

---
_Source: https://npm.io/package/folder-profile · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
