Skip to content

Commit

Permalink
chore: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
travi committed May 2, 2024
0 parents commit eca107d
Show file tree
Hide file tree
Showing 32 changed files with 17,213 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .c8rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"reporter": [
"lcov",
"text-summary",
"html"
],
"exclude": [
"src/**/*-test.js",
"test/",
"thirdparty-wrappers/",
"vendor/"
]
}
5 changes: 5 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"@form8ion"
]
}
1 change: 1 addition & 0 deletions .czrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"path":"./node_modules/cz-conventional-changelog"}
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
charset = utf-8
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/lib/
/coverage/
11 changes: 11 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root: true

extends:
- '@form8ion'
- '@form8ion/cucumber'

overrides:
- files:
- vitest.config.js
rules:
import/no-unresolved: off
13 changes: 13 additions & 0 deletions .gherkin-lintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"no-restricted-tags": [
"on",
{
"tags": [
"@focus"
]
}
],
"use-and": "on",
"no-multiple-empty-lines": "on",
"no-dupe-feature-names": "on"
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
8 changes: 8 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
_extends: .github
repository:
name: terraform
description: >-
form8ion plugin for projects that manage infrastructure as code with
terraform
homepage: https://npm.im/@form8ion/terraform
private: false
40 changes: 40 additions & 0 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Node.js CI
'on':
push:
branches:
- master
- beta
pull_request:
types:
- opened
- synchronize
env:
FORCE_COLOR: 1
NPM_CONFIG_COLOR: always
permissions:
contents: read
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm
- run: npm clean-install
- run: corepack npm audit signatures
- run: npm test
- uses: codecov/codecov-action@v3
release:
needs:
- verify
permissions:
contents: write
id-token: write
issues: write
pull-requests: write
uses: form8ion/.github/.github/workflows/release-package.yml@master
secrets:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release
'on':
push:
branches:
- alpha
permissions:
contents: read
jobs:
release:
permissions:
contents: write
id-token: write
issues: write
pull-requests: write
uses: form8ion/.github/.github/workflows/release-package.yml@master
secrets:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@




/node_modules/
/lib/
/coverage/

.eslintcache
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no-install commitlint --edit $1
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm test
8 changes: 8 additions & 0 deletions .lockfile-lintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"path": "package-lock.json",
"type": "npm",
"validate-https": true,
"allowed-hosts": [
"npm"
]
}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update-notifier=false
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20
24 changes: 24 additions & 0 deletions .remarkrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"settings": {
"listItemIndent": "one",
"emphasis": "_",
"strong": "_",
"bullet": "*",
"incrementListMarker": false
},
"plugins": [
"@form8ion/remark-lint-preset",
[
"remark-toc",
{
"tight": true
}
],
[
"remark-usage",
{
"heading": "example"
}
]
]
}
6 changes: 6 additions & 0 deletions .renovaterc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>form8ion/renovate-config"
]
}
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
MIT License

Copyright (c) 2024 Matt Travi

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
119 changes: 119 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# terraform

form8ion plugin for projects that manage infrastructure as code with terraform

<!--status-badges start -->

[![Node CI Workflow Status][github-actions-ci-badge]][github-actions-ci-link]
[![Codecov][coverage-badge]][coverage-link]
![SLSA Level 2][slsa-badge]

<!--status-badges end -->

## Table of Contents

* [Usage](#usage)
* [Installation](#installation)
* [Example](#example)
* [Contributing](#contributing)
* [Dependencies](#dependencies)
* [Verification](#verification)

## Usage

<!--consumer-badges start -->

[![MIT license][license-badge]][license-link]
[![npm][npm-badge]][npm-link]
[![Try @form8ion/terraform on RunKit][runkit-badge]][runkit-link]

<!--consumer-badges end -->

### Installation

```sh
$ npm install @form8ion/terraform
```

### Example

#### Import

```javascript
import {scaffold} from '@form8ion/terraform';
```

#### Execute

```javascript
(async () => {
await scaffold({projectRoot: process.cwd()});
})();
```

## Contributing

<!--contribution-badges start -->

[![Commitizen friendly][commitizen-badge]][commitizen-link]
[![Conventional Commits][commit-convention-badge]][commit-convention-link]
[![semantic-release: angular][semantic-release-badge]][semantic-release-link]
[![Renovate][renovate-badge]][renovate-link]
[![PRs Welcome][PRs-badge]][PRs-link]

<!--contribution-badges end -->

### Dependencies

```sh
$ nvm install
$ npm install
```

### Verification

```sh
$ npm test
```

[commitizen-link]: http://commitizen.github.io/cz-cli/

[commitizen-badge]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg

[commit-convention-link]: https://conventionalcommits.org

[commit-convention-badge]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg

[semantic-release-link]: https://github.com/semantic-release/semantic-release

[semantic-release-badge]: https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release

[renovate-link]: https://renovatebot.com

[renovate-badge]: https://img.shields.io/badge/renovate-enabled-brightgreen.svg?logo=renovatebot

[PRs-link]: https://makeapullrequest.com

[PRs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg

[github-actions-ci-link]: https://github.com/form8ion/terraform/actions?query=workflow%3A%22Node.js+CI%22+branch%3Amaster

[github-actions-ci-badge]: https://img.shields.io/github/actions/workflow/status/form8ion/terraform/node-ci.yml.svg?branch=master&logo=github

[coverage-link]: https://codecov.io/github/form8ion/terraform

[coverage-badge]: https://img.shields.io/codecov/c/github/form8ion/terraform?logo=codecov

[slsa-badge]: https://slsa.dev/images/gh-badge-level2.svg

[license-link]: LICENSE

[license-badge]: https://img.shields.io/github/license/form8ion/terraform.svg

[npm-link]: https://www.npmjs.com/package/@form8ion/terraform

[npm-badge]: https://img.shields.io/npm/v/@form8ion/terraform?logo=npm

[runkit-link]: https://npm.runkit.com/@form8ion/terraform

[runkit-badge]: https://badge.runkitcdn.com/@form8ion/terraform.svg
21 changes: 21 additions & 0 deletions cucumber.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const base = {
formatOptions: {snippetInterface: 'async-await'},
import: ['test/integration/features/**/*.js']
};

export default base;

export const wip = {
...base,
tags: '@wip and not @skip'
};

export const noWip = {
...base,
tags: 'not @skip and not @wip'
};

export const focus = {
...base,
tags: '@focus'
};
13 changes: 13 additions & 0 deletions example.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// #### Import
// remark-usage-ignore-next
import stubbedFs from 'mock-fs';
import {scaffold} from './lib/index.js';

// remark-usage-ignore-next
stubbedFs();

// #### Execute

(async () => {
await scaffold({projectRoot: process.cwd()});
})();
Loading

0 comments on commit eca107d

Please sign in to comment.