mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-17 04:32:15 +01:00
feat(formatting): add prettier
This commit is contained in:
14
.github/workflows/continuous-integration.yml
vendored
14
.github/workflows/continuous-integration.yml
vendored
@@ -64,7 +64,7 @@ jobs:
|
|||||||
snapshot_amd64:
|
snapshot_amd64:
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
needs:
|
needs:
|
||||||
- tests
|
- tests
|
||||||
name: Snapshot linux/amd64
|
name: Snapshot linux/amd64
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
@@ -87,7 +87,7 @@ jobs:
|
|||||||
snapshot_386:
|
snapshot_386:
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
needs:
|
needs:
|
||||||
- tests
|
- tests
|
||||||
name: Snapshot linux/386
|
name: Snapshot linux/386
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
@@ -110,7 +110,7 @@ jobs:
|
|||||||
snapshot_arm64:
|
snapshot_arm64:
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
needs:
|
needs:
|
||||||
- tests
|
- tests
|
||||||
name: Snapshot linux/arm64
|
name: Snapshot linux/arm64
|
||||||
runs-on: ubuntu-24.04-arm
|
runs-on: ubuntu-24.04-arm
|
||||||
outputs:
|
outputs:
|
||||||
@@ -133,7 +133,7 @@ jobs:
|
|||||||
snapshot_arm_v7:
|
snapshot_arm_v7:
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
needs:
|
needs:
|
||||||
- tests
|
- tests
|
||||||
name: Snapshot linux/arm/v7
|
name: Snapshot linux/arm/v7
|
||||||
runs-on: ubuntu-24.04-arm
|
runs-on: ubuntu-24.04-arm
|
||||||
outputs:
|
outputs:
|
||||||
@@ -182,7 +182,7 @@ jobs:
|
|||||||
edge_amd64:
|
edge_amd64:
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
needs:
|
needs:
|
||||||
- tests
|
- tests
|
||||||
name: Edge linux/amd64
|
name: Edge linux/amd64
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
@@ -226,7 +226,7 @@ jobs:
|
|||||||
edge_arm64:
|
edge_arm64:
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
needs:
|
needs:
|
||||||
- tests
|
- tests
|
||||||
name: Edge linux/arm64
|
name: Edge linux/arm64
|
||||||
runs-on: ubuntu-24.04-arm
|
runs-on: ubuntu-24.04-arm
|
||||||
outputs:
|
outputs:
|
||||||
@@ -248,7 +248,7 @@ jobs:
|
|||||||
edge_arm_v7:
|
edge_arm_v7:
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
needs:
|
needs:
|
||||||
- tests
|
- tests
|
||||||
name: Edge linux/arm/v7
|
name: Edge linux/arm/v7
|
||||||
runs-on: ubuntu-24.04-arm
|
runs-on: ubuntu-24.04-arm
|
||||||
outputs:
|
outputs:
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@
|
|||||||
.idea
|
.idea
|
||||||
.vscode
|
.vscode
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
/node_modules/
|
||||||
|
|||||||
0
.prettierignore
Normal file
0
.prettierignore
Normal file
3
.prettierrc
Normal file
3
.prettierrc
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"plugins": ["prettier-plugin-gherkin"]
|
||||||
|
}
|
||||||
10
Makefile
10
Makefile
@@ -183,12 +183,22 @@ tests-once: ## Run the tests once (prefer the "tests" command while developing)
|
|||||||
$(DOCKER_REGISTRY)/$(DOCKER_REPOSITORY):$(GOTENBERG_VERSION)-tests \
|
$(DOCKER_REGISTRY)/$(DOCKER_REPOSITORY):$(GOTENBERG_VERSION)-tests \
|
||||||
gotest
|
gotest
|
||||||
|
|
||||||
|
.PHONY: tests-integration
|
||||||
|
tests-integration: ## Run integration tests
|
||||||
|
go test -tags=integration -v github.com/gotenberg/gotenberg/v8/test/integration
|
||||||
|
|
||||||
|
.PHONY: lint
|
||||||
|
lint: ## Lint the code.
|
||||||
|
#golangci-lint run
|
||||||
|
npx prettier --check .
|
||||||
|
|
||||||
# go install mvdan.cc/gofumpt@latest
|
# go install mvdan.cc/gofumpt@latest
|
||||||
# go install github.com/daixiang0/gci@latest
|
# go install github.com/daixiang0/gci@latest
|
||||||
.PHONY: fmt
|
.PHONY: fmt
|
||||||
fmt: ## Format the code and "optimize" the dependencies
|
fmt: ## Format the code and "optimize" the dependencies
|
||||||
gofumpt -l -w .
|
gofumpt -l -w .
|
||||||
gci write -s standard -s default -s "prefix(github.com/gotenberg/gotenberg/v8)" --skip-generated --skip-vendor --custom-order .
|
gci write -s standard -s default -s "prefix(github.com/gotenberg/gotenberg/v8)" --skip-generated --skip-vendor --custom-order .
|
||||||
|
npx prettier --write .
|
||||||
go mod tidy
|
go mod tidy
|
||||||
|
|
||||||
# go install golang.org/x/tools/cmd/godoc@latest
|
# go install golang.org/x/tools/cmd/godoc@latest
|
||||||
|
|||||||
18
SECURITY.md
18
SECURITY.md
@@ -11,16 +11,16 @@ Your help in identifying vulnerabilities in our project is much appreciated.
|
|||||||
We take all reports regarding security seriously.
|
We take all reports regarding security seriously.
|
||||||
|
|
||||||
If you discover a security vulnerability, please refrain from publishing it publicly.
|
If you discover a security vulnerability, please refrain from publishing it publicly.
|
||||||
Instead, kindly send us the details via email to *neuhart [dot] julien [at] gmail [dot] com*.
|
Instead, kindly send us the details via email to _neuhart [dot] julien [at] gmail [dot] com_.
|
||||||
|
|
||||||
In the subject of your email, please indicate that it's a security vulnerability report for Gotenberg.
|
In the subject of your email, please indicate that it's a security vulnerability report for Gotenberg.
|
||||||
In your message, please include:
|
In your message, please include:
|
||||||
|
|
||||||
* A detailed description of the vulnerability.
|
- A detailed description of the vulnerability.
|
||||||
* The steps to reproduce the issue.
|
- The steps to reproduce the issue.
|
||||||
* Any potential impact of the vulnerability on the users or system.
|
- Any potential impact of the vulnerability on the users or system.
|
||||||
|
|
||||||
Please remember that this process is done in a *'best-effort'* manner.
|
Please remember that this process is done in a _'best-effort'_ manner.
|
||||||
This means we strive to respond and act as quickly as possible, but the speed may vary depending on the severity of
|
This means we strive to respond and act as quickly as possible, but the speed may vary depending on the severity of
|
||||||
the issue and our resources.
|
the issue and our resources.
|
||||||
|
|
||||||
@@ -31,10 +31,10 @@ Thank you in advance for helping to keep our project safe!
|
|||||||
Once we have received your vulnerability report, we will work to validate and reproduce the issue.
|
Once we have received your vulnerability report, we will work to validate and reproduce the issue.
|
||||||
If we can confirm the vulnerability, we will proceed to:
|
If we can confirm the vulnerability, we will proceed to:
|
||||||
|
|
||||||
* Work on a fix and a release timeline.
|
- Work on a fix and a release timeline.
|
||||||
* Notify you when the fix has been implemented and released.
|
- Notify you when the fix has been implemented and released.
|
||||||
* Credit you for discovering the vulnerability (unless you request anonymity).
|
- Credit you for discovering the vulnerability (unless you request anonymity).
|
||||||
* Please note that we will do our best to keep you informed about the progress towards resolving the issue.
|
- Please note that we will do our best to keep you informed about the progress towards resolving the issue.
|
||||||
|
|
||||||
## Comments on this Policy
|
## Comments on this Policy
|
||||||
|
|
||||||
|
|||||||
129
package-lock.json
generated
Normal file
129
package-lock.json
generated
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
{
|
||||||
|
"name": "gotenberg",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"devDependencies": {
|
||||||
|
"prettier": "3.5.2",
|
||||||
|
"prettier-plugin-gherkin": "^3.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@cucumber/gherkin": {
|
||||||
|
"version": "27.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cucumber/gherkin/-/gherkin-27.0.0.tgz",
|
||||||
|
"integrity": "sha512-j5rCsjqzRiC3iVTier3sa0kzyNbkcAmF7xr7jKnyO7qDeK3Z8Ye1P3KSVpeQRMY+KCDJ3WbTDdyxH0FwfA/fIw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@cucumber/messages": ">=19.1.4 <=22"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@cucumber/gherkin/node_modules/@cucumber/messages": {
|
||||||
|
"version": "22.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cucumber/messages/-/messages-22.0.0.tgz",
|
||||||
|
"integrity": "sha512-EuaUtYte9ilkxcKmfqGF9pJsHRUU0jwie5ukuZ/1NPTuHS1LxHPsGEODK17RPRbZHOFhqybNzG2rHAwThxEymg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/uuid": "9.0.1",
|
||||||
|
"class-transformer": "0.5.1",
|
||||||
|
"reflect-metadata": "0.1.13",
|
||||||
|
"uuid": "9.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@cucumber/gherkin/node_modules/@types/uuid": {
|
||||||
|
"version": "9.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.1.tgz",
|
||||||
|
"integrity": "sha512-rFT3ak0/2trgvp4yYZo5iKFEPsET7vKydKF+VRCxlQ9bpheehyAJH89dAkaLEq/j/RZXJIqcgsmPJKUP1Z28HA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@cucumber/gherkin/node_modules/uuid": {
|
||||||
|
"version": "9.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz",
|
||||||
|
"integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"bin": {
|
||||||
|
"uuid": "dist/bin/uuid"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@cucumber/messages": {
|
||||||
|
"version": "23.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cucumber/messages/-/messages-23.0.0.tgz",
|
||||||
|
"integrity": "sha512-2ZWKNnikNMBnle3P3cgy+fgzhABrY4oBbiWp9wcI8ANdT4LlYRN6jQ6j/9CQGTDGRfkyRtr/5VkYq7q24XCsuA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/uuid": "9.0.6",
|
||||||
|
"class-transformer": "0.5.1",
|
||||||
|
"reflect-metadata": "0.1.13",
|
||||||
|
"uuid": "9.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@types/uuid": {
|
||||||
|
"version": "9.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.6.tgz",
|
||||||
|
"integrity": "sha512-BT2Krtx4xaO6iwzwMFUYvWBWkV2pr37zD68Vmp1CDV196MzczBRxuEpD6Pr395HAgebC/co7hOphs53r8V7jew==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/class-transformer": {
|
||||||
|
"version": "0.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.5.1.tgz",
|
||||||
|
"integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/prettier": {
|
||||||
|
"version": "3.5.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.2.tgz",
|
||||||
|
"integrity": "sha512-lc6npv5PH7hVqozBR7lkBNOGXV9vMwROAPlumdBkX0wTbbzPu/U1hk5yL8p2pt4Xoc+2mkT8t/sow2YrV/M5qg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"bin": {
|
||||||
|
"prettier": "bin/prettier.cjs"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/prettier-plugin-gherkin": {
|
||||||
|
"version": "3.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/prettier-plugin-gherkin/-/prettier-plugin-gherkin-3.1.1.tgz",
|
||||||
|
"integrity": "sha512-cCfjqKMdR2a8jOf8yKg32iUfRq0Dfmx+K2qTMOD/ixJJq0Rp7QS8BaoABWC7CDGXbvOkVeWOvzhxWvYcEbjglw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@cucumber/gherkin": "^27.0.0",
|
||||||
|
"@cucumber/messages": "^23.0.0",
|
||||||
|
"prettier": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/reflect-metadata": {
|
||||||
|
"version": "0.1.13",
|
||||||
|
"resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz",
|
||||||
|
"integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "Apache-2.0"
|
||||||
|
},
|
||||||
|
"node_modules/uuid": {
|
||||||
|
"version": "9.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
|
||||||
|
"integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
|
||||||
|
"dev": true,
|
||||||
|
"funding": [
|
||||||
|
"https://github.com/sponsors/broofa",
|
||||||
|
"https://github.com/sponsors/ctavan"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"bin": {
|
||||||
|
"uuid": "dist/bin/uuid"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6
package.json
Normal file
6
package.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"devDependencies": {
|
||||||
|
"prettier": "3.5.2",
|
||||||
|
"prettier-plugin-gherkin": "^3.1.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user