# @anyone-developer/anyone-validate-fs

> This action help you to validate file structure as you expected. The validate rule will follow the brace-expansion.

Latest version **1.1.12** (published 2020-12-10) · GPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install @anyone-developer/anyone-validate-fs
pnpm add @anyone-developer/anyone-validate-fs
yarn add @anyone-developer/anyone-validate-fs
bun add @anyone-developer/anyone-validate-fs
```

Provides the commands `avfs`, `anyone-validate-fs`.

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.12 |
| Published | 2020-12-10 |
| First published | 2020-11-02 |
| Weekly downloads | 0 |
| License | GPL-3.0-or-later |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 49.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Zhang Nan |
| Maintainers | edward.zhang |
| Keywords | cli, anyone-validate-fs, anyone-developer, file structure, folder structure, structure, validate, validation |

## Links

- npm: https://www.npmjs.com/package/@anyone-developer/anyone-validate-fs
- Repository: https://github.com/anyone-developer/anyone-validate-fs
- Homepage: https://github.com/anyone-developer/anyone-validate-fs#readme
- Issues: https://github.com/anyone-developer/anyone-validate-fs/issues
- npm.io page: https://npm.io/package/@anyone-developer/anyone-validate-fs

## Dependencies (9)

- [args](https://npm.io/package/args.md) ^5.0.1
- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [rrdir](https://npm.io/package/rrdir.md) ^8.2.0
- [braces](https://npm.io/package/braces.md) ^3.0.2
- [treeify](https://npm.io/package/treeify.md) ^1.1.0
- [tty-table](https://npm.io/package/tty-table.md) ^4.1.3
- [object-hash](https://npm.io/package/object-hash.md) ^2.0.3
- [@actions/core](https://npm.io/package/@actions/core.md) ^1.2.6
- [recursive-diff](https://npm.io/package/recursive-diff.md) ^1.0.8

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 1.1.12 (latest) — 2020-12-10
- 1.1.11 — 2020-12-10
- 1.1.10 — 2020-12-10
- 1.1.9 — 2020-12-10
- 1.1.8 — 2020-12-10
- 1.1.7 — 2020-12-10
- 1.1.6 — 2020-12-10
- 1.1.5 — 2020-12-09
- 1.1.4 — 2020-12-09
- 1.1.3 — 2020-12-09
- 1.1.2 — 2020-12-09
- 1.1.1 — 2020-12-09
- 1.1.0 — 2020-11-18
- 1.0.9 — 2020-11-12
- 1.0.8 — 2020-11-12
- … 13 more at https://npm.io/package/@anyone-developer/anyone-validate-fs/versions

## README

# anyone-validate-fs

![nightly-build](https://github.com/anyone-developer/anyone-validate-fs/workflows/nightly-build/badge.svg)
![release-build](https://github.com/anyone-developer/anyone-validate-fs/workflows/release-build/badge.svg)
![release-test](https://github.com/anyone-developer/anyone-validate-fs/workflows/release-test/badge.svg)
[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B21065%2Fgit%40github.com%3Aanyone-developer%2Fanyone-validate-fs.git.svg?type=small)](https://app.fossa.com/projects/custom%2B21065%2Fgit%40github.com%3Aanyone-developer%2Fanyone-validate-fs.git?ref=badge_small)
[![DependaBot](https://badgen.net/github/dependabot/anyone-developer/anyone-validate-fs)](https://github.com/anyone-developer/anyone-validate-fs/network/updates)
![version](https://badgen.net/npm/v/@anyone-developer/anyone-validate-fs)
![license](https://badgen.net/github/license/anyone-developer/anyone-validate-fs)
[![Build Status](https://travis-ci.org/anyone-developer/anyone-validate-fs.svg?branch=main)](https://travis-ci.org/anyone-developer/anyone-validate-fs)
[![XO code style](https://badgen.net/xo/status/chalk)](https://github.com/xojs/xo)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/anyone-developer/anyone-validate-fs.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/anyone-developer/anyone-validate-fs/alerts/)
[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/anyone-developer/anyone-validate-fs.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/anyone-developer/anyone-validate-fs/context:javascript)
[![DeepScan grade](https://deepscan.io/api/teams/11532/projects/14440/branches/269275/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=11532&pid=14440&bid=269275)
[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/anyone-developer/anyone-validate-fs)

This GitHub action helps you to validate the file structure as you expected. The validate rule will follow the brace-expansion. For a more official definition, please refer to https://www.gnu.org/software/bash/manual/bash.html#Brace-Expansion

*If you like my module, please buy me a coffee.*

*More and more tiny and useful GitHub action modules are on the way. Please donate to me. I accept a part-time job contract. if you need, please contact me: zhang_nan_163@163.com*

## Inputs

### `brace-expansion`

**Required** brace-expansion of the expected directory structure.

### `ignore-files`

the files you want to ignore. split with a comma.

### `ignore-directories`

the directories you want to ignore. split with a comma.

### `read-path`

the path that you assign to read.

### `render-layout`

render diff result with \'vertical\' or \'horizontal\'

## Outputs

### `output`

the output of execution.

## Other way usages

### `From NPM for programmatic use`

- create a 'demo' folder
- **npm init** to create your nodejs package
- copy 'sample_folder' to demo
- **npm install anyone-validate-fs** to install module
- create 'index.js' and copy code below:

```javascript

const avfs = require('@anyone-developer/anyone-validate-fs');

avfs.setRenderLayout("horizontal").diff(
    './sample_folder',
    '{x/p,y/f,{a,b/{ba1,ba2,bb1,bb2},c,d}/{a.qa.config,b.prd.config}}',
    "README.md",
    ".git"
).then(resolve => {
	console.info(resolve.diff);
}, error => {
	if (error && error.diff) {
		console.error(`${error.diff}`);
	}
});

```

here is repl.it online editor: https://repl.it/@EdwardRoshan/anyone-validate-fs-demo

- **node index.js** to run it

<img src="https://raw.githubusercontent.com/anyone-developer/anyone-validate-fs/main/misc/module.png" width="500">


### `From NPM for using as a command-line app`

- **npm install -g anyone-validate-fs** to install gobally
- **anyone-validate-fs -r './sample_folder' -b '{a,b/{ba1,ba2,bb1,bb2},c,d}/{a.qa.config,b.prd.config}' -I ".git" -i "README.md"** to use your bash to execute it.
- you would get same result with above screenshot

## Example usage

```yml
uses: anyone-developer/anyone-validate-fs@main
with:
  brace-expansion: '{a,b/{ba1,ba2,bb1,bb2},c,d}/{a.qa.config,b.prd.config}'
  ignore-files: 'README.md'
  ignore-directories: '.git'
  read-path: 'sample_folder'
  render-layout: 'horizontal'
```

## Fossa Report

[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B21065%2Fgit%40github.com%3Aanyone-developer%2Fanyone-validate-fs.git.svg?type=large)](https://app.fossa.com/projects/custom%2B21065%2Fgit%40github.com%3Aanyone-developer%2Fanyone-validate-fs.git?ref=badge_large)

## Donation

PalPal: https://paypal.me/nzhang4

<img src="https://raw.githubusercontent.com/anyone-developer/anyone-validate-fs/main/misc/alipay.JPG" width="500">

<img src="https://raw.githubusercontent.com/anyone-developer/anyone-validate-fs/main/misc/webchat_pay.JPG" width="500">

---
_Source: https://npm.io/package/@anyone-developer/anyone-validate-fs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
