Skip to content

Commit

Permalink
feat: add prettier (ngrok#303)
Browse files Browse the repository at this point in the history
closes ngrok#297

---------

Co-authored-by: Cody A Price <[email protected]>
  • Loading branch information
russorat and cody-dot-js authored Aug 12, 2023
1 parent 8024abb commit 7056064
Show file tree
Hide file tree
Showing 2,166 changed files with 28,286 additions and 23,466 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
echo DEPLOY_ENV=dev > .env
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check formatting
run: pnpm run fmt:check
- name: Build website
run: pnpm run build
search-index-dev:
Expand Down
17 changes: 17 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Ignore artifacts:
build
dist
node_modules
public
static

*.json
*.nix
*.vue

.direnv
.docusaurus
.git
.github
flake.lock
pnpm-lock.yaml
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"arrowParens": "always",
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": true
}
3 changes: 2 additions & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ The ngrok documentation team has the right and responsibility to remove, edit, o
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the ngrok docs project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [[email protected]](mailto:[email protected]). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
Expand All @@ -41,4 +42,4 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai

This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq
For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Thank you for your interest in contributing to the ngrok documentation! We welco

## Getting started

To get started, fork the ngrok documentation repository on GitHub and clone your fork locally.
To get started, fork the ngrok documentation repository on GitHub and clone your fork locally.
ngrok docs is built using Docusaurus. Use the instructions on [README.md](README.md) to setup your local environment.
The documentation is written in Markdown and organized into directories by topic.

Expand All @@ -28,4 +28,4 @@ Once your pull request has been reviewed and any necessary changes have been mad

## Thank you!

Thank you for contributing to the ngrok documentation! Your help is greatly appreciated and will make our documentation better for everyone.
Thank you for contributing to the ngrok documentation! Your help is greatly appreciated and will make our documentation better for everyone.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ pnpm run build

For questions and support on contributing please join our [Slack community](https://ngrok.com/slack), channel `#support`.
To file an issue within our doc, use our [github issues](https://github.com/ngrok/ngrok-docs/issues)

2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
};
38 changes: 19 additions & 19 deletions docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ title: Overview
---

# The ngrok API
------------------

---

## Overview

Expand Down Expand Up @@ -54,18 +55,18 @@ ngrok api endpoints list
## Client Libraries {#client-libraries}

We publish open-source API client libraries to make working with the ngrok API
feel native and fluent in your favorite programming language. Library
feel native and fluent in your favorite programming language. Library
repositories are published in the [ngrok github
organization](https://github.com/ngrok).

| Language | Installation | Documentation | Repository |
| --- | --- | --- | --- |
| Go | `go get github.com/ngrok/ngrok-api-go/v4` | [Documentation](https://pkg.go.dev/github.com/ngrok/ngrok-api-go/v4) | [GitHub](https://github.com/ngrok/ngrok-api-go) |
| .NET | `dotnet add package NgrokApi` | [Documentation](https://github.com/ngrok/ngrok-api-dotnet) | [GitHub](https://github.com/ngrok/ngrok-api-dotnet) |
| Ruby | `gem install ngrok-api` | [Documentation](https://ruby-api.docs.ngrok.com) | [GitHub](https://github.com/ngrok/ngrok-api-ruby) |
| Python | `pip install ngrok-api` | [Documentation](https://python-api.docs.ngrok.com) | [GitHub](https://github.com/ngrok/ngrok-api-python) |
| Java (unstable) | See the README for installing with Maven | [Documentation](https://java-api.docs.ngrok.com) | [GitHub](https://github.com/ngrok/ngrok-api-java) |
| Scala (unstable) | See the README for installing with Maven | [Documentation](https://python-api.docs.ngrok.com) | [GitHub](https://github.com/ngrok/ngrok-api-scala) |
| Language | Installation | Documentation | Repository |
| ---------------- | ----------------------------------------- | -------------------------------------------------------------------- | --------------------------------------------------- |
| Go | `go get github.com/ngrok/ngrok-api-go/v4` | [Documentation](https://pkg.go.dev/github.com/ngrok/ngrok-api-go/v4) | [GitHub](https://github.com/ngrok/ngrok-api-go) |
| .NET | `dotnet add package NgrokApi` | [Documentation](https://github.com/ngrok/ngrok-api-dotnet) | [GitHub](https://github.com/ngrok/ngrok-api-dotnet) |
| Ruby | `gem install ngrok-api` | [Documentation](https://ruby-api.docs.ngrok.com) | [GitHub](https://github.com/ngrok/ngrok-api-ruby) |
| Python | `pip install ngrok-api` | [Documentation](https://python-api.docs.ngrok.com) | [GitHub](https://github.com/ngrok/ngrok-api-python) |
| Java (unstable) | See the README for installing with Maven | [Documentation](https://java-api.docs.ngrok.com) | [GitHub](https://github.com/ngrok/ngrok-api-java) |
| Scala (unstable) | See the README for installing with Maven | [Documentation](https://python-api.docs.ngrok.com) | [GitHub](https://github.com/ngrok/ngrok-api-scala) |

## Terraform Provider

Expand Down Expand Up @@ -99,9 +100,9 @@ resource "ngrok_reserved_domain" "my_domain" {

## Authentication {#authentication}

| | |
| --- | --- |
| Base URL | `https://api.ngrok.com` |
| | |
| --------------------- | ------------------------------------- |
| Base URL | `https://api.ngrok.com` |
| Authentication Header | **`authorization: Bearer {API Key}`** |

Requests to the API must include an API key as a bearer token in the
Expand All @@ -125,10 +126,10 @@ The ngrok API guarantees that breaking changes to the API will never be made
unless the caller explicitly opts in to a newer version. The following
non-breaking changes to the API may be made to existing versions:

* The addition of new resources
* The addition of new methods to existing resources
* The addition of new fields on existing resource representations
* Bug fixes which change the API to match documented behavior
- The addition of new resources
- The addition of new methods to existing resources
- The addition of new fields on existing resource representations
- Bug fixes which change the API to match documented behavior

## Pagination {#pagination}

Expand All @@ -152,7 +153,7 @@ returned by the API are in UTC time which is indicated by a `Z` at the end.

The ngrok API enforces a limit on all accounts of 120 requests over a rolling
60 second window. If you exceed the rate limit, ngrok will return
[ERR\_NGROK\_226](/docs/errors/ERR_NGROK_226) and an HTTP Status Code of 429.
[ERR_NGROK_226](/docs/errors/ERR_NGROK_226) and an HTTP Status Code of 429.

## IP Restrictions {#ip-restrictions}

Expand All @@ -168,7 +169,6 @@ well.
IP Restrictions can be configured manually on the ngrok dashboard or
programatically via API with a `type` of `agent`.


- **[IP Restrictions on your ngrok dashboard](https://dashboard.ngrok.com/security/ip-restrictions)**
- **[IP Restrictions API Resource](/api/resources/ip-restrictions/)**

Expand Down
3 changes: 2 additions & 1 deletion docs/api/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ title: Overview
---

# ngrok API Reference Overview
------------------

---

We love API reference documentation and we know you do too. As a developer,
it's often the first place to go to understand a system's domain model and to
Expand Down
72 changes: 36 additions & 36 deletions docs/api/resources/abuse-reports.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

import AbuseReportsCreateRequest from './examples/_abuse_reports_create_request.md';
import AbuseReportsCreateResponse from './examples/_abuse_reports_create_response.md';
import AbuseReportsGetRequest from './examples/_abuse_reports_get_request.md';
import AbuseReportsGetResponse from './examples/_abuse_reports_get_response.md';
import AbuseReportsCreateRequest from "./examples/_abuse_reports_create_request.md";
import AbuseReportsCreateResponse from "./examples/_abuse_reports_create_response.md";
import AbuseReportsGetRequest from "./examples/_abuse_reports_get_request.md";
import AbuseReportsGetResponse from "./examples/_abuse_reports_get_response.md";

# Abuse Reports
------------------

---

## Create Abuse Report

Expand All @@ -19,10 +19,10 @@ POST /abuse_reports

#### Parameters

| &nbsp; | &nbsp; | &nbsp; |
|---|---|---|
| `urls` | List&lt;string&gt; | a list of URLs containing suspected abusive content |
| `metadata` | string | arbitrary user-defined data about this abuse report. Optional, max 4096 bytes. |
| &nbsp; | &nbsp; | &nbsp; |
| ---------- | ------------------ | ------------------------------------------------------------------------------ |
| `urls` | List&lt;string&gt; | a list of URLs containing suspected abusive content |
| `metadata` | string | arbitrary user-defined data about this abuse report. Optional, max 4096 bytes. |

### Response

Expand All @@ -32,22 +32,22 @@ Returns a 201 response on success

#### Fields

| &nbsp; | &nbsp; | &nbsp; |
|---|---|---|
| `id` | string | ID of the abuse report |
| `uri` | string | URI of the abuse report API resource |
| `created_at` | string | timestamp that the abuse report record was created in RFC 3339 format |
| `urls` | List&lt;string&gt; | a list of URLs containing suspected abusive content |
| `metadata` | string | arbitrary user-defined data about this abuse report. Optional, max 4096 bytes. |
| `status` | string | Indicates whether ngrok has processed the abuse report. one of `PENDING`, `PROCESSED`, or `PARTIALLY_PROCESSED` |
| `hostnames` | [AbuseReportHostname](#abusereporthostname-fields) | an array of hostname statuses related to the report |
| &nbsp; | &nbsp; | &nbsp; |
| ------------ | -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `id` | string | ID of the abuse report |
| `uri` | string | URI of the abuse report API resource |
| `created_at` | string | timestamp that the abuse report record was created in RFC 3339 format |
| `urls` | List&lt;string&gt; | a list of URLs containing suspected abusive content |
| `metadata` | string | arbitrary user-defined data about this abuse report. Optional, max 4096 bytes. |
| `status` | string | Indicates whether ngrok has processed the abuse report. one of `PENDING`, `PROCESSED`, or `PARTIALLY_PROCESSED` |
| `hostnames` | [AbuseReportHostname](#abusereporthostname-fields) | an array of hostname statuses related to the report |

#### AbuseReportHostname fields

| &nbsp; | &nbsp; | &nbsp; |
|---|---|---|
| `hostname` | string | the hostname ngrok has parsed out of one of the reported URLs in this abuse report |
| `status` | string | indicates what action ngrok has taken against the hostname. one of `PENDING`, `BANNED`, `UNBANNED`, or `IGNORE` |
| &nbsp; | &nbsp; | &nbsp; |
| ---------- | ------ | --------------------------------------------------------------------------------------------------------------- |
| `hostname` | string | the hostname ngrok has parsed out of one of the reported URLs in this abuse report |
| `status` | string | indicates what action ngrok has taken against the hostname. one of `PENDING`, `BANNED`, `UNBANNED`, or `IGNORE` |

## Get Abuse Report

Expand All @@ -67,19 +67,19 @@ Returns a 200 response on success

#### Fields

| &nbsp; | &nbsp; | &nbsp; |
|---|---|---|
| `id` | string | ID of the abuse report |
| `uri` | string | URI of the abuse report API resource |
| `created_at` | string | timestamp that the abuse report record was created in RFC 3339 format |
| `urls` | List&lt;string&gt; | a list of URLs containing suspected abusive content |
| `metadata` | string | arbitrary user-defined data about this abuse report. Optional, max 4096 bytes. |
| `status` | string | Indicates whether ngrok has processed the abuse report. one of `PENDING`, `PROCESSED`, or `PARTIALLY_PROCESSED` |
| `hostnames` | [AbuseReportHostname](#abusereporthostname-fields) | an array of hostname statuses related to the report |
| &nbsp; | &nbsp; | &nbsp; |
| ------------ | -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `id` | string | ID of the abuse report |
| `uri` | string | URI of the abuse report API resource |
| `created_at` | string | timestamp that the abuse report record was created in RFC 3339 format |
| `urls` | List&lt;string&gt; | a list of URLs containing suspected abusive content |
| `metadata` | string | arbitrary user-defined data about this abuse report. Optional, max 4096 bytes. |
| `status` | string | Indicates whether ngrok has processed the abuse report. one of `PENDING`, `PROCESSED`, or `PARTIALLY_PROCESSED` |
| `hostnames` | [AbuseReportHostname](#abusereporthostname-fields) | an array of hostname statuses related to the report |

#### AbuseReportHostname fields

| &nbsp; | &nbsp; | &nbsp; |
|---|---|---|
| `hostname` | string | the hostname ngrok has parsed out of one of the reported URLs in this abuse report |
| `status` | string | indicates what action ngrok has taken against the hostname. one of `PENDING`, `BANNED`, `UNBANNED`, or `IGNORE` |
| &nbsp; | &nbsp; | &nbsp; |
| ---------- | ------ | --------------------------------------------------------------------------------------------------------------- |
| `hostname` | string | the hostname ngrok has parsed out of one of the reported URLs in this abuse report |
| `status` | string | indicates what action ngrok has taken against the hostname. one of `PENDING`, `BANNED`, `UNBANNED`, or `IGNORE` |
Loading

0 comments on commit 7056064

Please sign in to comment.