mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-06 04:21:09 +00:00
chore: use prettier more (#1109)
This commit is contained in:
3
.github/CONTRIBUTING.md
vendored
3
.github/CONTRIBUTING.md
vendored
@@ -18,6 +18,7 @@ Hi! We're really excited that you are interested in contributing to Redocly CLI.
|
||||
- Abide by our [Code of Conduct](https://redocly.com/code-of-conduct/) in all your interactions on this repository, and show patience and respect to other community members.
|
||||
|
||||
## Pull Request Guidelines
|
||||
|
||||
Before submitting a pull request, please make sure the following is done:
|
||||
|
||||
1. Fork the repository and create your branch from `main`.
|
||||
@@ -38,7 +39,7 @@ $ npm install # or npm i
|
||||
|
||||
### Commonly used NPM scripts
|
||||
|
||||
``` bash
|
||||
```bash
|
||||
# run a separate CLI command
|
||||
$ npm run <command>
|
||||
|
||||
|
||||
9
.github/ISSUE_TEMPLATE/bug_report.md
vendored
9
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -4,34 +4,41 @@ about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: 'Type: Bug'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
|
||||
<!-- A clear and concise description of what the bug is. -->
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
|
||||
1. Given this `redocly.yaml` file
|
||||
2. And this OpenAPI file(s)
|
||||
3. Run this command with these arguments... `redocly ...`
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
|
||||
<!-- A clear and concise description of what you expected to happen. -->
|
||||
|
||||
**Logs**
|
||||
|
||||
<!-- If applicable, add logs to help explain your problem. -->
|
||||
|
||||
**OpenAPI definition**
|
||||
|
||||
<!-- If applicable, add an OpenAPI definition and `.redocly.yaml` configuration file that helps reproduce the problem.
|
||||
At a minimum, please state the specification version(s) you're using (e.g. 2.0, 3.0, 3.1). -->
|
||||
|
||||
**Redocly Version(s)**
|
||||
|
||||
<!-- What version of Redocly CLI are you using? -->
|
||||
|
||||
**`Node.js` Version(s)**
|
||||
|
||||
<!-- What version of `node.js` are you using? -->
|
||||
|
||||
**Additional context**
|
||||
|
||||
<!-- Add any other context about the problem here. -->
|
||||
|
||||
5
.github/ISSUE_TEMPLATE/feature_request.md
vendored
5
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -4,17 +4,20 @@ about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: 'Type: Enhancement'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
|
||||
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
||||
|
||||
**Describe the solution you'd like**
|
||||
|
||||
<!-- A clear and concise description of what you want to happen. -->
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
|
||||
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
|
||||
|
||||
**Additional context**
|
||||
|
||||
<!-- Add any other context or screenshots about the feature request here. -->
|
||||
|
||||
48
.github/workflows/deploy-s3-sandbox.yaml
vendored
48
.github/workflows/deploy-s3-sandbox.yaml
vendored
@@ -8,30 +8,30 @@ jobs:
|
||||
if: ${{ github.event.label.name == 'deploy_s3_sandbox' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: node --version
|
||||
- run: npm --version
|
||||
- name: cache node modules
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
key: npm-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
npm-${{ hashFiles('package-lock.json') }}
|
||||
npm-
|
||||
- uses: actions/checkout@v3
|
||||
- run: node --version
|
||||
- run: npm --version
|
||||
- name: cache node modules
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
key: npm-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
npm-${{ hashFiles('package-lock.json') }}
|
||||
npm-
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
|
||||
- name: Bundle into single file
|
||||
run: npm run webpack-bundle
|
||||
- name: Bundle into single file
|
||||
run: npm run webpack-bundle
|
||||
|
||||
- name: Upload to AWS sandbox S3 bucket
|
||||
run: npm run upload
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_SANDBOX_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SANDBOX_SECRET_ACCESS_KEY }}
|
||||
AWS_DEFAULT_REGION: us-east-1
|
||||
AWS_S3_PATH: redocly-sandbox-openapi-cli-dist
|
||||
- name: Upload to AWS sandbox S3 bucket
|
||||
run: npm run upload
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_SANDBOX_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SANDBOX_SECRET_ACCESS_KEY }}
|
||||
AWS_DEFAULT_REGION: us-east-1
|
||||
AWS_S3_PATH: redocly-sandbox-openapi-cli-dist
|
||||
|
||||
80
.github/workflows/deploy.yaml
vendored
80
.github/workflows/deploy.yaml
vendored
@@ -10,60 +10,60 @@ jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- run: npm test
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- run: npm test
|
||||
deploy:
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
|
||||
- name: Bundle into single file
|
||||
run: npm run webpack-bundle
|
||||
- name: Bundle into single file
|
||||
run: npm run webpack-bundle
|
||||
|
||||
- name: Upload to AWS S3 bucket
|
||||
run: npm run upload
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_DEFAULT_REGION: us-east-1
|
||||
AWS_S3_PATH: openapi-cli-dist
|
||||
- name: Upload to AWS S3 bucket
|
||||
run: npm run upload
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_DEFAULT_REGION: us-east-1
|
||||
AWS_S3_PATH: openapi-cli-dist
|
||||
|
||||
- name: Upload to AWS sandbox S3 bucket
|
||||
run: npm run upload
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_SANDBOX_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SANDBOX_SECRET_ACCESS_KEY }}
|
||||
AWS_DEFAULT_REGION: us-east-1
|
||||
AWS_S3_PATH: redocly-sandbox-openapi-cli-dist
|
||||
- name: Upload to AWS sandbox S3 bucket
|
||||
run: npm run upload
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_SANDBOX_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SANDBOX_SECRET_ACCESS_KEY }}
|
||||
AWS_DEFAULT_REGION: us-east-1
|
||||
AWS_S3_PATH: redocly-sandbox-openapi-cli-dist
|
||||
publish:
|
||||
needs: [test, deploy]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- run: npm ci
|
||||
- run: npm ci
|
||||
|
||||
- name: Publish to NPM
|
||||
run: cd packages/core && npm publish && cd ../cli && npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
- name: Publish to NPM
|
||||
run: cd packages/core && npm publish && cd ../cli && npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
dockerhub:
|
||||
needs: [publish]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user