diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 583e3558..d0d3bc5c 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,41 +1,44 @@ module.exports = { - env: { - 'browser': true, - 'node': true, - }, - extends: [ - 'eslint:recommended', - 'plugin:vue/recommended', - ], - parserOptions: { - parser: '@babel/eslint-parser', - ecmaVersion: 2018, - sourceType: 'module', - requireConfigFile: false, - }, - rules: { - 'linebreak-style': ['error', 'unix'], - semi: ['error', 'always'], - quotes: ['error', 'single'], - 'comma-dangle': ['error', 'always-multiline'], - 'vue/require-v-for-key': 0, - 'vue/require-default-prop': 0, - 'vue/no-v-html': 0, - 'vue/max-attributes-per-line': 0, - 'vue/html-indent': ['error', 4], - 'vue/script-indent': ['error', 4, { - baseIndent: 1, - }], - 'vue/no-unused-vars': 0, - 'vue/html-self-closing': 0, - 'vue/multi-word-component-names': 0, - 'vue/no-reserved-component-names': 0, - 'eol-last': ['error', 'always'], - }, - globals: { - 'describe': true, - 'expect': true, - 'it': true, - 'test': true, - }, + env: { + browser: true, + node: true, + }, + extends: ['eslint:recommended', 'plugin:vue/recommended', 'prettier'], + parserOptions: { + parser: '@babel/eslint-parser', + ecmaVersion: 2018, + sourceType: 'module', + requireConfigFile: false, + }, + rules: { + 'linebreak-style': ['error', 'unix'], + semi: ['error', 'always'], + 'comma-dangle': ['error', 'always-multiline'], + 'vue/require-v-for-key': 0, + 'vue/require-default-prop': 0, + 'vue/no-v-html': 0, + 'vue/max-attributes-per-line': 0, + 'vue/html-indent': ['error', 4], + 'vue/script-indent': [ + 'error', + 4, + { + baseIndent: 1, + switchCase: 1, + }, + ], + 'vue/no-unused-vars': 'warn', + 'vue/html-self-closing': 0, + 'vue/multi-word-component-names': 0, + 'vue/no-reserved-component-names': 0, + 'eol-last': ['error', 'always'], + 'prettier/prettier': 'error', + }, + globals: { + describe: true, + expect: true, + it: true, + test: true, + }, + plugins: ['prettier'], }; diff --git a/.github/workflows/test-workflow.yml b/.github/workflows/test-workflow.yml index 818c0153..e86718e7 100644 --- a/.github/workflows/test-workflow.yml +++ b/.github/workflows/test-workflow.yml @@ -59,3 +59,22 @@ jobs: - name: Test i18n packs integrity run: npm run test:i18n-packs + + prettier: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version-file: .nvmrc + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Test with prettier + run: npm run test:prettier diff --git a/.lintstagedrc.json b/.lintstagedrc.json new file mode 100644 index 00000000..6c266130 --- /dev/null +++ b/.lintstagedrc.json @@ -0,0 +1,9 @@ +{ + "*.{js,vue}": [ + "prettier --write", + "eslint --quiet --cache --fix" + ], + "*.scss": [ + "stylelint --config node_modules/do-bulma/.stylelintrc.json --fix" + ] +} diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..cce02790 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +package.json +package-lock.json diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 00000000..b891b42c --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,9 @@ +{ + "singleQuote": true, + "trailingComma": "all", + "vueIndentScriptAndStyle": true, + "htmlWhitespaceSensitivity": "ignore", + "printWidth": 100, + "tabWidth": 4, + "singleAttributePerLine": true +} diff --git a/package-lock.json b/package-lock.json index abd50ab1..953bc0a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,6 +39,8 @@ "core-js": "^3.32.0", "duplicate-package-checker-webpack-plugin": "^3.0.0", "eslint": "^8.46.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.1", "eslint-plugin-vue": "^9.16.1", "esm": "^3.2.25", "husky": "^8.0.3", @@ -47,6 +49,7 @@ "lint-staged": "^13.2.3", "node-fetch": "^3.3.2", "postcss": "^8.4.31", + "prettier": "3.0.3", "sass": "^1.64.2", "sass-loader": "^13.3.2", "stylelint": "^15.10.2", @@ -3123,6 +3126,115 @@ "node": ">= 8" } }, + "node_modules/@pkgr/utils": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", + "integrity": "sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "fast-glob": "^3.3.0", + "is-glob": "^4.0.3", + "open": "^9.1.0", + "picocolors": "^1.0.0", + "tslib": "^2.6.0" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/@pkgr/utils/node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgr/utils/node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@pkgr/utils/node_modules/open": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", + "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", + "dev": true, + "dependencies": { + "default-browser": "^4.0.0", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@pkgr/utils/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@pkgr/utils/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@pkgr/utils/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@pkgr/utils/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@polka/url": { "version": "1.0.0-next.12", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.12.tgz", @@ -4469,6 +4581,22 @@ "url": "https://opencollective.com/postcss/" } }, + "node_modules/@vue/component-compiler-utils/node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "optional": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/@vue/component-compiler-utils/node_modules/yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", @@ -5408,6 +5536,15 @@ "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=" }, + "node_modules/big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, "node_modules/big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", @@ -5537,6 +5674,18 @@ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" }, + "node_modules/bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dev": true, + "dependencies": { + "big-integer": "^1.6.44" + }, + "engines": { + "node": ">= 5.10.0" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -5640,6 +5789,21 @@ "resolved": "https://registry.npmjs.org/bulma/-/bulma-0.9.4.tgz", "integrity": "sha512-86FlT5+1GrsgKbPLRRY7cGDg8fsJiP/jzTqXXVqiUZZ2aZT8uemEOHlU1CDU+TxklPEZ11HZNNWclRBBecP4CQ==" }, + "node_modules/bundle-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", + "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", + "dev": true, + "dependencies": { + "run-applescript": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -6957,6 +7121,221 @@ "node": ">=0.10.0" } }, + "node_modules/default-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", + "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", + "dev": true, + "dependencies": { + "bundle-name": "^3.0.0", + "default-browser-id": "^3.0.0", + "execa": "^7.1.1", + "titleize": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", + "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", + "dev": true, + "dependencies": { + "bplist-parser": "^0.2.0", + "untildify": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/default-browser/node_modules/execa": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", + "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": "^14.18.0 || ^16.14.0 || >=18.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/default-browser/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "dev": true, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/default-browser/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/default-browser/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/default-browser/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/default-browser/node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/default-gateway": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", @@ -8608,6 +8987,47 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint-config-prettier": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", + "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", + "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.1.tgz", + "integrity": "sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==", + "dev": true, + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.8.5" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } + } + }, "node_modules/eslint-plugin-vue": { "version": "9.16.1", "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.16.1.tgz", @@ -9298,6 +9718,12 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true + }, "node_modules/fast-glob": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.0.tgz", @@ -10822,6 +11248,39 @@ "node": ">=0.10.0" } }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-inside-container/node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-interactive": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", @@ -16367,16 +16826,30 @@ } }, "node_modules/prettier": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", - "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", + "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", "dev": true, - "optional": true, "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=4" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" } }, "node_modules/pretty-checkbox": { @@ -17029,6 +17502,139 @@ "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz", "integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==" }, + "node_modules/run-applescript": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", + "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", + "dev": true, + "dependencies": { + "execa": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/run-applescript/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/run-applescript/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/run-applescript/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/run-applescript/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/run-applescript/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/run-applescript/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -18323,6 +18929,22 @@ "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" }, + "node_modules/synckit": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", + "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", + "dev": true, + "dependencies": { + "@pkgr/utils": "^2.3.1", + "tslib": "^2.5.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/table": { "version": "6.8.1", "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", @@ -18609,6 +19231,18 @@ "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" }, + "node_modules/titleize": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", + "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -18771,9 +19405,9 @@ } }, "node_modules/tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/type-check": { "version": "0.3.2", @@ -22208,6 +22842,81 @@ "fastq": "^1.6.0" } }, + "@pkgr/utils": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", + "integrity": "sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "fast-glob": "^3.3.0", + "is-glob": "^4.0.3", + "open": "^9.1.0", + "picocolors": "^1.0.0", + "tslib": "^2.6.0" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true + }, + "open": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", + "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", + "dev": true, + "requires": { + "default-browser": "^4.0.0", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^2.2.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "@polka/url": { "version": "1.0.0-next.12", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.12.tgz", @@ -23235,6 +23944,13 @@ "source-map": "^0.6.1" } }, + "prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "optional": true + }, "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", @@ -23950,6 +24666,12 @@ "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=" }, + "big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "dev": true + }, "big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", @@ -24058,6 +24780,15 @@ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" }, + "bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dev": true, + "requires": { + "big-integer": "^1.6.44" + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -24124,6 +24855,15 @@ "resolved": "https://registry.npmjs.org/bulma/-/bulma-0.9.4.tgz", "integrity": "sha512-86FlT5+1GrsgKbPLRRY7cGDg8fsJiP/jzTqXXVqiUZZ2aZT8uemEOHlU1CDU+TxklPEZ11HZNNWclRBBecP4CQ==" }, + "bundle-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", + "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", + "dev": true, + "requires": { + "run-applescript": "^5.0.0" + } + }, "bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -25062,6 +25802,144 @@ "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==", "dev": true }, + "default-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", + "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", + "dev": true, + "requires": { + "bundle-name": "^3.0.0", + "default-browser-id": "^3.0.0", + "execa": "^7.1.1", + "titleize": "^3.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "execa": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", + "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "dev": true + }, + "is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true + }, + "mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true + }, + "npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "requires": { + "path-key": "^4.0.0" + }, + "dependencies": { + "path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true + } + } + }, + "onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "requires": { + "mimic-fn": "^4.0.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "default-browser-id": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", + "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", + "dev": true, + "requires": { + "bplist-parser": "^0.2.0", + "untildify": "^4.0.0" + } + }, "default-gateway": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", @@ -26439,6 +27317,23 @@ } } }, + "eslint-config-prettier": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", + "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", + "dev": true, + "requires": {} + }, + "eslint-plugin-prettier": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.1.tgz", + "integrity": "sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.8.5" + } + }, "eslint-plugin-vue": { "version": "9.16.1", "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.16.1.tgz", @@ -26683,6 +27578,12 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, + "fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true + }, "fast-glob": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.0.tgz", @@ -27759,6 +28660,23 @@ "is-extglob": "^2.1.1" } }, + "is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "requires": { + "is-docker": "^3.0.0" + }, + "dependencies": { + "is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true + } + } + }, "is-interactive": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", @@ -31772,11 +32690,19 @@ "dev": true }, "prettier": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", - "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", + "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", "dev": true, - "optional": true + "requires": { + "fast-diff": "^1.1.2" + } }, "pretty-checkbox": { "version": "3.0.3", @@ -32267,6 +33193,96 @@ "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz", "integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==" }, + "run-applescript": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", + "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", + "dev": true, + "requires": { + "execa": "^5.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -33247,6 +34263,16 @@ "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" }, + "synckit": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", + "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", + "dev": true, + "requires": { + "@pkgr/utils": "^2.3.1", + "tslib": "^2.5.0" + } + }, "table": { "version": "6.8.1", "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", @@ -33458,6 +34484,12 @@ "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" }, + "titleize": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", + "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", + "dev": true + }, "tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -33570,9 +34602,9 @@ } }, "tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "type-check": { "version": "0.3.2", diff --git a/package.json b/package.json index 618e3ad9..4751d3ee 100644 --- a/package.json +++ b/package.json @@ -16,13 +16,15 @@ "dev": "npm run build:template && npm run build:prism && npm run dev:tool", "dev:tool": "vue-cli-service serve src/nginxconfig/mount.js", "deploy:spaces:comment": "do-vue comment nginxconfig", - "test": "npm run test:eslint && npm run test:stylelint && npm run test:i18n-packs && npm run test:jest", + "test": "npm run test:prettier:fix && npm run test:eslint && npm run test:stylelint && npm run test:i18n-packs && npm run test:jest", "test:jest": "jest --env=jsdom /test/.*.js?$", - "test:fix": "npm run test:eslint:fix", + "test:fix": "npm run test:prettier:fix && npm run test:eslint:fix", "test:eslint": "eslint 'src/**/*.{js,vue}' --cache", "test:eslint:fix": "npm run test:eslint -- --fix", "test:stylelint": "stylelint 'src/**/*.scss' --config node_modules/do-bulma/.stylelintrc.json", "test:i18n-packs": "node --es-module-specifier-resolution=node src/nginxconfig/i18n/verify.js", + "test:prettier": "prettier 'src/**/*.{js,vue}' --check", + "test:prettier:fix": "prettier --write 'src/**/*.{js,vue}'", "prepare": "husky install" }, "jest": { @@ -71,6 +73,8 @@ "core-js": "^3.32.0", "duplicate-package-checker-webpack-plugin": "^3.0.0", "eslint": "^8.46.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.1", "eslint-plugin-vue": "^9.16.1", "esm": "^3.2.25", "husky": "^8.0.3", @@ -79,6 +83,7 @@ "lint-staged": "^13.2.3", "node-fetch": "^3.3.2", "postcss": "^8.4.31", + "prettier": "3.0.3", "sass": "^1.64.2", "sass-loader": "^13.3.2", "stylelint": "^15.10.2", @@ -88,14 +93,6 @@ "webpack": "^5.88.2", "webpack-bundle-analyzer": "^4.9.0" }, - "lint-staged": { - "*.{js,vue}": [ - "eslint --quiet --cache --fix" - ], - "*.scss": [ - "stylelint --config node_modules/do-bulma/.stylelintrc.json --fix" - ] - }, "overrides": { "@vue/cli-service": { "mini-css-extract-plugin": "^1.6.2" diff --git a/src/nginxconfig/build/prism.js b/src/nginxconfig/build/prism.js index a4a8bac4..72cb156a 100644 --- a/src/nginxconfig/build/prism.js +++ b/src/nginxconfig/build/prism.js @@ -39,7 +39,9 @@ const main = async () => { await fs.writeFile(new URL(`${buildDir}/prism.css`, import.meta.url), fixed); }; -main().then(() => {}).catch(err => { - console.error(err); - process.exit(1); -}); +main() + .then(() => {}) + .catch((err) => { + console.error(err); + process.exit(1); + }); diff --git a/src/nginxconfig/build/template.js b/src/nginxconfig/build/template.js index af0cbdaa..bce72a84 100644 --- a/src/nginxconfig/build/template.js +++ b/src/nginxconfig/build/template.js @@ -33,7 +33,10 @@ const main = () => { let template = fs.readFileSync(new URL(`${buildDir}/base.html`, import.meta.url), 'utf8'); // Inject our title now - template = template.replace('DigitalOcean', 'NGINXConfig | DigitalOcean'); + template = template.replace( + 'DigitalOcean', + 'NGINXConfig | DigitalOcean', + ); // Inject our app mounting point template = template.replace('', '
'); diff --git a/src/nginxconfig/generators/conf/drupal.conf.js b/src/nginxconfig/generators/conf/drupal.conf.js index fd20e6c7..8868cc94 100644 --- a/src/nginxconfig/generators/conf/drupal.conf.js +++ b/src/nginxconfig/generators/conf/drupal.conf.js @@ -24,11 +24,13 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -export default global => { +export default (global) => { const config = {}; config['# Drupal: deny private files'] = ''; - config['location ~ ((^|/)\\.|^.*\\.yml$|^/sites/.*/private/|^/sites/[^/]+/[^/]*settings.*\\.php$)'] = { + config[ + 'location ~ ((^|/)\\.|^.*\\.yml$|^/sites/.*/private/|^/sites/[^/]+/[^/]*settings.*\\.php$)' + ] = { deny: 'all', return: '404', }; diff --git a/src/nginxconfig/generators/conf/general.conf.js b/src/nginxconfig/generators/conf/general.conf.js index abd8fea0..2d55d96d 100644 --- a/src/nginxconfig/generators/conf/general.conf.js +++ b/src/nginxconfig/generators/conf/general.conf.js @@ -46,11 +46,13 @@ export default (domains, global) => { config[loc] = { add_header: 'Cache-Control "no-cache"', }; - } - + } - if (domains.every(d => d.routing.root.computed)) { - if (global.performance.assetsExpiration.computed === global.performance.mediaExpiration.computed) { + if (domains.every((d) => d.routing.root.computed)) { + if ( + global.performance.assetsExpiration.computed === + global.performance.mediaExpiration.computed + ) { if (global.performance.assetsExpiration.computed) { // Assets & media combined config['# assets, media'] = ''; @@ -78,7 +80,10 @@ export default (domains, global) => { } } - if (global.performance.svgExpiration.computed === global.performance.fontsExpiration.computed) { + if ( + global.performance.svgExpiration.computed === + global.performance.fontsExpiration.computed + ) { if (global.performance.svgExpiration.computed) { // SVG & fonts combined config['# svg, fonts'] = ''; diff --git a/src/nginxconfig/generators/conf/joomla.conf.js b/src/nginxconfig/generators/conf/joomla.conf.js index 08ebe744..8e6511b3 100644 --- a/src/nginxconfig/generators/conf/joomla.conf.js +++ b/src/nginxconfig/generators/conf/joomla.conf.js @@ -43,7 +43,6 @@ export default () => { expires: '14d', }; - // Done! return config; }; diff --git a/src/nginxconfig/generators/conf/letsencrypt.conf.js b/src/nginxconfig/generators/conf/letsencrypt.conf.js index fa216b63..ce65c910 100644 --- a/src/nginxconfig/generators/conf/letsencrypt.conf.js +++ b/src/nginxconfig/generators/conf/letsencrypt.conf.js @@ -24,7 +24,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -export default global => { +export default (global) => { const config = {}; config['# ACME-challenge'] = ''; diff --git a/src/nginxconfig/generators/conf/nginx.conf.js b/src/nginxconfig/generators/conf/nginx.conf.js index 74308a26..c27bf63a 100644 --- a/src/nginxconfig/generators/conf/nginx.conf.js +++ b/src/nginxconfig/generators/conf/nginx.conf.js @@ -37,14 +37,16 @@ export default (domains, global) => { // Basic nginx conf config.user = global.nginx.user.computed; - if (global.nginx.pid.computed) - config.pid = global.nginx.pid.computed; + if (global.nginx.pid.computed) config.pid = global.nginx.pid.computed; config.worker_processes = global.nginx.workerProcesses.computed; config.worker_rlimit_nofile = 65535; // Modules config['# Load modules'] = ''; - config.include = `${global.nginx.nginxConfigDirectory.computed.replace(/\/+$/, '')}/modules-enabled/*.conf`; + config.include = `${global.nginx.nginxConfigDirectory.computed.replace( + /\/+$/, + '', + )}/modules-enabled/*.conf`; // Events config.events = { @@ -59,10 +61,8 @@ export default (domains, global) => { config.http.push(['sendfile', 'on']); config.http.push(['tcp_nopush', 'on']); config.http.push(['tcp_nodelay', 'on']); - if (!global.security.serverTokens.computed) - config.http.push(['server_tokens', 'off']); - if (!global.logging.logNotFound.computed) - config.http.push(['log_not_found', 'off']); + if (!global.security.serverTokens.computed) config.http.push(['server_tokens', 'off']); + if (!global.logging.logNotFound.computed) config.http.push(['log_not_found', 'off']); config.http.push(['types_hash_max_size', global.nginx.typesHashMaxSize.computed]); config.http.push(['types_hash_bucket_size', global.nginx.typesHashBucketSize.computed]); config.http.push(['client_max_body_size', `${global.nginx.clientMaxBodySize.computed}M`]); @@ -76,33 +76,33 @@ export default (domains, global) => { config.http.push(['# Log Format', '']); // Define default log format as an array - let logging = ['$remote_addr', '-', '$remote_user', '[$time_local]', - '"$request"', '$status', '$body_bytes_sent', - '"$http_referer"', '"$http_user_agent"']; + let logging = [ + '$remote_addr', + '-', + '$remote_user', + '[$time_local]', + '"$request"', + '$status', + '$body_bytes_sent', + '"$http_referer"', + '"$http_user_agent"', + ]; - if (global.logging.cfRay.computed) - logging.push('$http_cf_ray'); + if (global.logging.cfRay.computed) logging.push('$http_cf_ray'); - if (global.logging.cfConnectingIp.computed) - logging.push('$http_cf_connecting_ip'); + if (global.logging.cfConnectingIp.computed) logging.push('$http_cf_connecting_ip'); - if (global.logging.xForwardedFor.computed) - logging.push('$http_x_forwarded_for'); + if (global.logging.xForwardedFor.computed) logging.push('$http_x_forwarded_for'); - if (global.logging.xForwardedProto.computed) - logging.push('$http_x_forwarded_proto'); + if (global.logging.xForwardedProto.computed) logging.push('$http_x_forwarded_proto'); - if (global.logging.trueClientIp.computed) - logging.push('$http_true_client_ip'); + if (global.logging.trueClientIp.computed) logging.push('$http_true_client_ip'); - if (global.logging.cfIpCountry.computed) - logging.push('$http_cf_ipcountry'); + if (global.logging.cfIpCountry.computed) logging.push('$http_cf_ipcountry'); - if (global.logging.cfVisitor.computed) - logging.push('$http_cf_visitor'); + if (global.logging.cfVisitor.computed) logging.push('$http_cf_visitor'); - if (global.logging.cdnLoop.computed) - logging.push('$http_cdn_loop'); + if (global.logging.cdnLoop.computed) logging.push('$http_cdn_loop'); config.http.push(['log_format', `cloudflare '${logging.join(' ')}'`]); } @@ -110,8 +110,11 @@ export default (domains, global) => { config.http.push(['# Logging', '']); config.http.push(['access_log', 'off']); if (global.logging.errorLogEnabled.computed) { - config.http.push(['error_log', global.logging.errorLogPath.computed.trim() + - ` ${global.logging.errorLogLevel.computed}`]); + config.http.push([ + 'error_log', + global.logging.errorLogPath.computed.trim() + + ` ${global.logging.errorLogLevel.computed}`, + ]); } else { config.http.push(['error_log', errorLogPathDisabled]); } @@ -140,7 +143,10 @@ export default (domains, global) => { if (sslProfile) { if (sslProfile.dh_param_size) { config.http.push(['# Diffie-Hellman parameter for DHE ciphersuites', '']); - config.http.push(['ssl_dhparam', `${global.nginx.nginxConfigDirectory.computed.replace(/\/+$/, '')}/dhparam.pem`]); + config.http.push([ + 'ssl_dhparam', + `${global.nginx.nginxConfigDirectory.computed.replace(/\/+$/, '')}/dhparam.pem`, + ]); } config.http.push([`# ${sslProfile.name} configuration`, '']); @@ -194,35 +200,52 @@ export default (domains, global) => { } // Connection header for WebSocket reverse proxy - if (domains.some(d => d.reverseProxy.reverseProxy.computed)) { + if (domains.some((d) => d.reverseProxy.reverseProxy.computed)) { config.http.push(['# Connection header for WebSocket reverse proxy', '']); - config.http.push(['map $http_upgrade $connection_upgrade', { - 'default': 'upgrade', - '""': 'close', - }]); + config.http.push([ + 'map $http_upgrade $connection_upgrade', + { + default: 'upgrade', + '""': 'close', + }, + ]); // See https://www.nginx.com/resources/wiki/start/topics/examples/forwarded/ - config.http.push(['map $remote_addr $proxy_forwarded_elem', { - '# IPv4 addresses can be sent as-is': '', - '~^[0-9.]+$': '"for=$remote_addr"', - '# IPv6 addresses need to be bracketed and quoted': '', - '~^[0-9A-Fa-f:.]+$': '"for=\\"[$remote_addr]\\""', - '# Unix domain socket names cannot be represented in RFC 7239 syntax': '', - 'default': '"for=unknown"', - }]); - config.http.push(['map $http_forwarded $proxy_add_forwarded', { - '# If the incoming Forwarded header is syntactically valid, append to it': '', - '': '"~^(,[ \\\\t]*)*([!#$%&\'*+.^_`|~0-9A-Za-z-]+=([!#$%&\'*+.^_`|~0-9A-Za-z-]+|\\"([\\\\t \\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E\\\\x80-\\\\xFF]|\\\\\\\\[\\\\t \\\\x21-\\\\x7E\\\\x80-\\\\xFF])*\\"))?(;([!#$%&\'*+.^_`|~0-9A-Za-z-]+=([!#$%&\'*+.^_`|~0-9A-Za-z-]+|\\"([\\\\t \\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E\\\\x80-\\\\xFF]|\\\\\\\\[\\\\t \\\\x21-\\\\x7E\\\\x80-\\\\xFF])*\\"))?)*([ \\\\t]*,([ \\\\t]*([!#$%&\'*+.^_`|~0-9A-Za-z-]+=([!#$%&\'*+.^_`|~0-9A-Za-z-]+|\\"([\\\\t \\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E\\\\x80-\\\\xFF]|\\\\\\\\[\\\\t \\\\x21-\\\\x7E\\\\x80-\\\\xFF])*\\"))?(;([!#$%&\'*+.^_`|~0-9A-Za-z-]+=([!#$%&\'*+.^_`|~0-9A-Za-z-]+|\\"([\\\\t \\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E\\\\x80-\\\\xFF]|\\\\\\\\[\\\\t \\\\x21-\\\\x7E\\\\x80-\\\\xFF])*\\"))?)*)?)*$" "$http_forwarded, $proxy_forwarded_elem"', - '# Otherwise, replace it': '', - 'default': '"$proxy_forwarded_elem"', - }]); + config.http.push([ + 'map $remote_addr $proxy_forwarded_elem', + { + '# IPv4 addresses can be sent as-is': '', + '~^[0-9.]+$': '"for=$remote_addr"', + '# IPv6 addresses need to be bracketed and quoted': '', + '~^[0-9A-Fa-f:.]+$': '"for=\\"[$remote_addr]\\""', + '# Unix domain socket names cannot be represented in RFC 7239 syntax': '', + default: '"for=unknown"', + }, + ]); + config.http.push([ + 'map $http_forwarded $proxy_add_forwarded', + { + '# If the incoming Forwarded header is syntactically valid, append to it': '', + '': '"~^(,[ \\\\t]*)*([!#$%&\'*+.^_`|~0-9A-Za-z-]+=([!#$%&\'*+.^_`|~0-9A-Za-z-]+|\\"([\\\\t \\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E\\\\x80-\\\\xFF]|\\\\\\\\[\\\\t \\\\x21-\\\\x7E\\\\x80-\\\\xFF])*\\"))?(;([!#$%&\'*+.^_`|~0-9A-Za-z-]+=([!#$%&\'*+.^_`|~0-9A-Za-z-]+|\\"([\\\\t \\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E\\\\x80-\\\\xFF]|\\\\\\\\[\\\\t \\\\x21-\\\\x7E\\\\x80-\\\\xFF])*\\"))?)*([ \\\\t]*,([ \\\\t]*([!#$%&\'*+.^_`|~0-9A-Za-z-]+=([!#$%&\'*+.^_`|~0-9A-Za-z-]+|\\"([\\\\t \\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E\\\\x80-\\\\xFF]|\\\\\\\\[\\\\t \\\\x21-\\\\x7E\\\\x80-\\\\xFF])*\\"))?(;([!#$%&\'*+.^_`|~0-9A-Za-z-]+=([!#$%&\'*+.^_`|~0-9A-Za-z-]+|\\"([\\\\t \\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E\\\\x80-\\\\xFF]|\\\\\\\\[\\\\t \\\\x21-\\\\x7E\\\\x80-\\\\xFF])*\\"))?)*)?)*$" "$http_forwarded, $proxy_forwarded_elem"', + '# Otherwise, replace it': '', + default: '"$proxy_forwarded_elem"', + }, + ]); } // Configs! config.http.push(['# Load configs', '']); - config.http.push(['include', [ - `${global.nginx.nginxConfigDirectory.computed.replace(/\/+$/, '')}/conf.d/*.conf`, - global.tools.modularizedStructure.computed ? `${global.nginx.nginxConfigDirectory.computed.replace(/\/+$/, '')}/sites-enabled/*` : '', - ].filter(x => x.length)]); + config.http.push([ + 'include', + [ + `${global.nginx.nginxConfigDirectory.computed.replace(/\/+$/, '')}/conf.d/*.conf`, + global.tools.modularizedStructure.computed + ? `${global.nginx.nginxConfigDirectory.computed.replace( + /\/+$/, + '', + )}/sites-enabled/*` + : '', + ].filter((x) => x.length), + ]); // Single file configs if (!global.tools.modularizedStructure.computed) { diff --git a/src/nginxconfig/generators/conf/php_fastcgi.conf.js b/src/nginxconfig/generators/conf/php_fastcgi.conf.js index 530a877d..bde6f031 100644 --- a/src/nginxconfig/generators/conf/php_fastcgi.conf.js +++ b/src/nginxconfig/generators/conf/php_fastcgi.conf.js @@ -25,7 +25,7 @@ THE SOFTWARE. */ export default (domains) => { - const legacyRouting = domains.some(d => d.routing.legacyPhpRouting.computed); + const legacyRouting = domains.some((d) => d.routing.legacyPhpRouting.computed); const config = {}; if (legacyRouting) { diff --git a/src/nginxconfig/generators/conf/proxy.conf.js b/src/nginxconfig/generators/conf/proxy.conf.js index 0341bd88..6f3180d6 100644 --- a/src/nginxconfig/generators/conf/proxy.conf.js +++ b/src/nginxconfig/generators/conf/proxy.conf.js @@ -24,7 +24,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -export default global => { +export default (global) => { const config = {}; config.proxy_http_version = '1.1'; @@ -49,7 +49,6 @@ export default global => { config['proxy_set_header X-Forwarded-Host'] = '""'; config['proxy_set_header X-Forwarded-Port'] = '""'; } - config['# Proxy timeouts'] = ''; config['proxy_connect_timeout'] = global.reverseProxy.proxyConnectTimeout.computed; diff --git a/src/nginxconfig/generators/conf/python_uwsgi.conf.js b/src/nginxconfig/generators/conf/python_uwsgi.conf.js index 2e6c85ce..8f8611ad 100644 --- a/src/nginxconfig/generators/conf/python_uwsgi.conf.js +++ b/src/nginxconfig/generators/conf/python_uwsgi.conf.js @@ -24,15 +24,16 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -export default global => { +export default (global) => { const config = {}; config['# default uwsgi_params'] = ''; config.include = 'uwsgi_params'; config['# uwsgi settings'] = ''; - config.uwsgi_pass = (global.python.pythonServer.computed[0] === '/' ? 'unix:' : '') - + global.python.pythonServer.computed; + config.uwsgi_pass = + (global.python.pythonServer.computed[0] === '/' ? 'unix:' : '') + + global.python.pythonServer.computed; config['uwsgi_param Host'] = '$host'; config['uwsgi_param X-Real-IP'] = '$remote_addr'; config['uwsgi_param X-Forwarded-For'] = '$proxy_add_x_forwarded_for'; diff --git a/src/nginxconfig/generators/conf/security.conf.js b/src/nginxconfig/generators/conf/security.conf.js index 4335c368..f9cdb431 100644 --- a/src/nginxconfig/generators/conf/security.conf.js +++ b/src/nginxconfig/generators/conf/security.conf.js @@ -32,37 +32,60 @@ export default (domains, global) => { config.push(['# security headers', '']); config.push(['add_header X-XSS-Protection', '"1; mode=block" always']); config.push(['add_header X-Content-Type-Options', '"nosniff" always']); - config.push(['add_header Referrer-Policy', `"${global.security.referrerPolicy.computed}" always`]); + config.push([ + 'add_header Referrer-Policy', + `"${global.security.referrerPolicy.computed}" always`, + ]); if (global.security.contentSecurityPolicy.computed) - config.push(['add_header Content-Security-Policy', `"${global.security.contentSecurityPolicy.computed}" always`]); + config.push([ + 'add_header Content-Security-Policy', + `"${global.security.contentSecurityPolicy.computed}" always`, + ]); if (global.security.permissionsPolicy.computed) - config.push(['add_header Permissions-Policy', `"${global.security.permissionsPolicy.computed}" always`]); + config.push([ + 'add_header Permissions-Policy', + `"${global.security.permissionsPolicy.computed}" always`, + ]); // Every domain has HSTS enabled, and they all have same hstsSubdomains/hstsPreload settings if (commonHsts(domains)) { const commonHSTSSubdomains = domains.length && domains[0].https.hstsSubdomains.computed; const commonHSTSPreload = domains.length && domains[0].https.hstsPreload.computed; - config.push(['add_header Strict-Transport-Security', `"max-age=31536000${commonHSTSSubdomains ? '; includeSubDomains' : ''}${commonHSTSPreload ? '; preload' : ''}" always`]); + config.push([ + 'add_header Strict-Transport-Security', + `"max-age=31536000${commonHSTSSubdomains ? '; includeSubDomains' : ''}${ + commonHSTSPreload ? '; preload' : '' + }" always`, + ]); } config.push(['# . files', '']); - config.push(['location ~ /\\.(?!well-known)', { - deny: 'all', - }]); + config.push([ + 'location ~ /\\.(?!well-known)', + { + deny: 'all', + }, + ]); // Security.txt if (global.security.securityTxt.computed) { config.push(['# security.txt', '']); - config.push(['location /security.txt', { - return: '301 /.well-known/security.txt', - }]); - + config.push([ + 'location /security.txt', + { + return: '301 /.well-known/security.txt', + }, + ]); + // Custom security.txt path - config.push(['location = /.well-known/security.txt', { - alias: `${global.security.securityTxtPath.value}`, - }]); + config.push([ + 'location = /.well-known/security.txt', + { + alias: `${global.security.securityTxtPath.value}`, + }, + ]); } // Done! diff --git a/src/nginxconfig/generators/conf/website.conf.js b/src/nginxconfig/generators/conf/website.conf.js index 151f85b9..5594301c 100644 --- a/src/nginxconfig/generators/conf/website.conf.js +++ b/src/nginxconfig/generators/conf/website.conf.js @@ -50,8 +50,12 @@ const sslConfig = (domain, global) => { // Let's encrypt if (domain.https.certType.computed === 'letsEncrypt') - config.push(['ssl_trusted_certificate', - `${global.https.letsEncryptCertRoot.computed.replace(/\/+$/, '')}/${domain.server.domain.computed}/chain.pem`]); + config.push([ + 'ssl_trusted_certificate', + `${global.https.letsEncryptCertRoot.computed.replace(/\/+$/, '')}/${ + domain.server.domain.computed + }/chain.pem`, + ]); } return config; }; @@ -60,17 +64,22 @@ const httpsListen = (domain, global, ipPortPairs) => { const config = []; // Check if reuseport needs to be set - const ipPortV4 = `${domain.server.listenIpv4.computed === '*' ? '' : `${domain.server.listenIpv4.computed}:`}443`; + const ipPortV4 = `${ + domain.server.listenIpv4.computed === '*' ? '' : `${domain.server.listenIpv4.computed}:` + }443`; const reusePortV4 = global.https.portReuse.computed && !ipPortPairs.has(ipPortV4); if (reusePortV4) ipPortPairs.add(ipPortV4); // HTTPS - config.push(['listen', - `${ipPortV4} ssl${domain.https.http2.computed ? ' http2' : ''}${reusePortV4 ? ' reuseport' : ''}`]); + config.push([ + 'listen', + `${ipPortV4} ssl${domain.https.http2.computed ? ' http2' : ''}${ + reusePortV4 ? ' reuseport' : '' + }`, + ]); // HTTP/3 - if (domain.https.http3.computed) - config.push(['listen', `${ipPortV4} http3`]); + if (domain.https.http3.computed) config.push(['listen', `${ipPortV4} http3`]); // v6 if (domain.server.listenIpv6.computed) { @@ -80,12 +89,15 @@ const httpsListen = (domain, global, ipPortPairs) => { if (reusePortV6) ipPortPairs.add(ipPortV6); // HTTPS - config.push(['listen', - `${ipPortV6} ssl${domain.https.http2.computed ? ' http2' : ''}${reusePortV6 ? ' reuseport' : ''}`]); + config.push([ + 'listen', + `${ipPortV6} ssl${domain.https.http2.computed ? ' http2' : ''}${ + reusePortV6 ? ' reuseport' : '' + }`, + ]); // HTTP/3 - if (domain.https.http3.computed) - config.push(['listen', `${ipPortV6} http3`]); + if (domain.https.http3.computed) config.push(['listen', `${ipPortV6} http3`]); } return config; @@ -95,7 +107,9 @@ const httpListen = (domain, global, ipPortPairs) => { const config = []; // Check if reuseport needs to be set - const ipPortV4 = `${domain.server.listenIpv4.computed === '*' ? '' : `${domain.server.listenIpv4.computed}:`}80`; + const ipPortV4 = `${ + domain.server.listenIpv4.computed === '*' ? '' : `${domain.server.listenIpv4.computed}:` + }80`; const reusePortV4 = global.https.portReuse.computed && !ipPortPairs.has(ipPortV4); if (reusePortV4) ipPortPairs.add(ipPortV4); @@ -151,12 +165,18 @@ const httpRedirectConfig = (domain, global, ipPortPairs, domainName, redirectDom config.push(...Object.entries(letsEncryptConf(global))); } - config.push(['location /', { - return: `301 https://${redirectDomain ? redirectDomain : domainName}$request_uri`, - }]); + config.push([ + 'location /', + { + return: `301 https://${redirectDomain ? redirectDomain : domainName}$request_uri`, + }, + ]); } else { // Custom cert - config.push(['return', `301 https://${redirectDomain ? redirectDomain : domainName}$request_uri`]); + config.push([ + 'return', + `301 https://${redirectDomain ? redirectDomain : domainName}$request_uri`, + ]); } return config; @@ -174,14 +194,18 @@ export default (domain, domains, global, ipPortPairs) => { serverConfig.push(...httpListen(domain, global, ipPortPairs)); // HTTPS - if (domain.https.https.computed) - serverConfig.push(...httpsListen(domain, global, ipPortPairs)); + if (domain.https.https.computed) serverConfig.push(...httpsListen(domain, global, ipPortPairs)); - serverConfig.push(['server_name', - `${domain.server.wwwSubdomain.computed ? 'www.' : ''}${domain.server.domain.computed}`]); + serverConfig.push([ + 'server_name', + `${domain.server.wwwSubdomain.computed ? 'www.' : ''}${domain.server.domain.computed}`, + ]); // PHP or Django - if (domain.php.php.computed || (domain.python.python.computed && domain.python.djangoRules.computed)) { + if ( + domain.php.php.computed || + (domain.python.python.computed && domain.python.djangoRules.computed) + ) { serverConfig.push(['set', `$base ${domain.server.path.computed}`]); // root @@ -190,10 +214,15 @@ export default (domain, domains, global, ipPortPairs) => { } // Not PHP and not Django and root - if (!domain.php.php.computed - && (!domain.python.python.computed || !domain.python.djangoRules.computed) - && domain.routing.root.computed) - serverConfig.push(['root', `${domain.server.path.computed}${domain.server.documentRoot.computed}`]); + if ( + !domain.php.php.computed && + (!domain.python.python.computed || !domain.python.djangoRules.computed) && + domain.routing.root.computed + ) + serverConfig.push([ + 'root', + `${domain.server.path.computed}${domain.server.documentRoot.computed}`, + ]); // HTTPS serverConfig.push(...sslConfig(domain, global)); @@ -201,14 +230,21 @@ export default (domain, domains, global, ipPortPairs) => { // Onion location if (domain.onion.onionLocation.computed) { serverConfig.push(['# Onion services', '']); - serverConfig.push(['add_header Onion-Location', `http://${domain.onion.onionLocation.computed}$request_uri`]); + serverConfig.push([ + 'add_header Onion-Location', + `http://${domain.onion.onionLocation.computed}$request_uri`, + ]); } // HSTS if (!commonHsts(domains) && domain.https.hsts.computed) { serverConfig.push(['# HSTS', '']); - serverConfig.push(['add_header Strict-Transport-Security', - `"max-age=31536000${domain.https.hstsSubdomains.computed ? '; includeSubDomains' : ''}${domain.https.hstsPreload.computed ? '; preload' : ''}" always`]); + serverConfig.push([ + 'add_header Strict-Transport-Security', + `"max-age=31536000${domain.https.hstsSubdomains.computed ? '; includeSubDomains' : ''}${ + domain.https.hstsPreload.computed ? '; preload' : '' + }" always`, + ]); } // Security @@ -222,15 +258,22 @@ export default (domain, domains, global, ipPortPairs) => { } // Restrict Methods - if (Object.keys(domain.restrict).find(k => domain.restrict[k].computed && k !== 'responseCode')) { + if ( + Object.keys(domain.restrict).find( + (k) => domain.restrict[k].computed && k !== 'responseCode', + ) + ) { const allowedKeys = Object.keys(domain.restrict) - .filter(k => !domain.restrict[k].computed && k !== 'responseCode') - .map(e => e.replace('Method', '').toUpperCase()); + .filter((k) => !domain.restrict[k].computed && k !== 'responseCode') + .map((e) => e.replace('Method', '').toUpperCase()); serverConfig.push(['# restrict methods', '']); - serverConfig.push([`if ($request_method !~ ^(${allowedKeys.join('|')})$)`, { - 'return': `'${domain.restrict.responseCode.computed}'`, - }]); + serverConfig.push([ + `if ($request_method !~ ^(${allowedKeys.join('|')})$)`, + { + return: `'${domain.restrict.responseCode.computed}'`, + }, + ]); } // Access log or error log for domain @@ -251,20 +294,43 @@ export default (domain, domains, global, ipPortPairs) => { } // Fallback index.html or index.php - if ((domain.routing.fallbackHtml.computed || domain.routing.fallbackPhp.computed) - && (!domain.reverseProxy.reverseProxy.computed || domain.reverseProxy.path.computed !== '/')) { - serverConfig.push([`# index.${domain.routing.fallbackHtml.computed ? 'html' : (domain.routing.fallbackPhp.computed ? 'php' : '')} fallback`, '']); - serverConfig.push(['location /', { - try_files: `$uri $uri/ /index.${domain.routing.fallbackHtml.computed ? 'html' : (domain.routing.fallbackPhp.computed ? 'php?$query_string' : '')}`, - }]); + if ( + (domain.routing.fallbackHtml.computed || domain.routing.fallbackPhp.computed) && + (!domain.reverseProxy.reverseProxy.computed || domain.reverseProxy.path.computed !== '/') + ) { + serverConfig.push([ + `# index.${ + domain.routing.fallbackHtml.computed + ? 'html' + : domain.routing.fallbackPhp.computed + ? 'php' + : '' + } fallback`, + '', + ]); + serverConfig.push([ + 'location /', + { + try_files: `$uri $uri/ /index.${ + domain.routing.fallbackHtml.computed + ? 'html' + : domain.routing.fallbackPhp.computed + ? 'php?$query_string' + : '' + }`, + }, + ]); } // Fallback index.html and index.php if (domain.routing.fallbackHtml.computed && domain.routing.fallbackPhp.computed) { serverConfig.push(['# index.php fallback', '']); - serverConfig.push([`location ~ ^${domain.routing.fallbackPhpPath.computed}`, { - try_files: '$uri $uri/ /index.php?$query_string', - }]); + serverConfig.push([ + `location ~ ^${domain.routing.fallbackPhpPath.computed}`, + { + try_files: '$uri $uri/ /index.php?$query_string', + }, + ]); } // Python @@ -314,10 +380,17 @@ export default (domain, domains, global, ipPortPairs) => { if (!domain.https.forceHttps.computed && domain.https.certType.computed === 'letsEncrypt') serverConfig.push(['include', 'nginxconfig.io/letsencrypt.conf']); - if (domain.php.wordPressRules.computed) serverConfig.push(['include', `nginxconfig.io/${domain.server.domain.computed}.wordpress.conf`]); - if (domain.php.drupalRules.computed) serverConfig.push(['include', 'nginxconfig.io/drupal.conf']); - if (domain.php.magentoRules.computed) serverConfig.push(['include', 'nginxconfig.io/magento.conf']); - if (domain.php.joomlaRules.computed) serverConfig.push(['include', 'nginxconfig.io/joomla.conf']); + if (domain.php.wordPressRules.computed) + serverConfig.push([ + 'include', + `nginxconfig.io/${domain.server.domain.computed}.wordpress.conf`, + ]); + if (domain.php.drupalRules.computed) + serverConfig.push(['include', 'nginxconfig.io/drupal.conf']); + if (domain.php.magentoRules.computed) + serverConfig.push(['include', 'nginxconfig.io/magento.conf']); + if (domain.php.joomlaRules.computed) + serverConfig.push(['include', 'nginxconfig.io/joomla.conf']); } else { // Unified serverConfig.push(...Object.entries(generalConf(domains, global))); @@ -325,8 +398,10 @@ export default (domain, domains, global, ipPortPairs) => { if (!domain.https.forceHttps.computed && domain.https.certType.computed === 'letsEncrypt') serverConfig.push(...Object.entries(letsEncryptConf(global))); - if (domain.php.wordPressRules.computed) serverConfig.push(...Object.entries(wordPressConf(global, domain))); - if (domain.php.drupalRules.computed) serverConfig.push(...Object.entries(drupalConf(global))); + if (domain.php.wordPressRules.computed) + serverConfig.push(...Object.entries(wordPressConf(global, domain))); + if (domain.php.drupalRules.computed) + serverConfig.push(...Object.entries(drupalConf(global))); if (domain.php.magentoRules.computed) serverConfig.push(...Object.entries(magentoConf())); if (domain.php.joomlaRules.computed) serverConfig.push(...Object.entries(joomlaConf())); } @@ -334,35 +409,43 @@ export default (domain, domains, global, ipPortPairs) => { // PHP if (domain.php.php.computed) { if (domain.php.phpBackupServer.computed) { - config.push([`upstream ${phpUpstream(domain)}`, { - server: [ - phpPath(domain), - `${phpPath(domain, true)} backup`, - ], - }]); + config.push([ + `upstream ${phpUpstream(domain)}`, + { + server: [phpPath(domain), `${phpPath(domain, true)} backup`], + }, + ]); } serverConfig.push(['# handle .php', '']); - const loc = `location ~ ${domain.routing.legacyPhpRouting.computed ? '[^/]\\.php(/|$)' : '\\.php$'}`; + const loc = `location ~ ${ + domain.routing.legacyPhpRouting.computed ? '[^/]\\.php(/|$)' : '\\.php$' + }`; const fastcgiPass = { - fastcgi_pass: domain.php.phpBackupServer.computed !== '' - ? phpUpstream(domain) : phpPath(domain), + fastcgi_pass: + domain.php.phpBackupServer.computed !== '' ? phpUpstream(domain) : phpPath(domain), }; if (global.tools.modularizedStructure.computed || domain.php.wordPressRules.computed) { // Modularized - serverConfig.push([loc, { - ...fastcgiPass, - include: 'nginxconfig.io/php_fastcgi.conf', - }]); + serverConfig.push([ + loc, + { + ...fastcgiPass, + include: 'nginxconfig.io/php_fastcgi.conf', + }, + ]); } else { // Unified - serverConfig.push([loc, { - ...fastcgiPass, - ...phpConf(domains), - }]); + serverConfig.push([ + loc, + { + ...fastcgiPass, + ...phpConf(domains), + }, + ]); } } @@ -376,7 +459,10 @@ export default (domain, domains, global, ipPortPairs) => { cdnConfig.push(...listenConfig(domain, global, ipPortPairs)); cdnConfig.push(['server_name', `cdn.${domain.server.domain.computed}`]); - cdnConfig.push(['root', `${domain.server.path.computed}${domain.server.documentRoot.computed}`]); + cdnConfig.push([ + 'root', + `${domain.server.path.computed}${domain.server.documentRoot.computed}`, + ]); // HTTPS cdnConfig.push(...sslConfig(domain, global)); @@ -418,12 +504,14 @@ export default (domain, domains, global, ipPortPairs) => { const redirectConfig = []; redirectConfig.push(...listenConfig(domain, global, ipPortPairs)); - redirectConfig.push(['server_name', - `${domain.server.wwwSubdomain.computed ? '' : '*'}.${domain.server.domain.computed}`]); + redirectConfig.push([ + 'server_name', + `${domain.server.wwwSubdomain.computed ? '' : '*'}.${domain.server.domain.computed}`, + ]); // HTTPS redirectConfig.push(...sslConfig(domain, global)); - + // Logging if (domain.logging.redirectAccessLog.computed || domain.logging.redirectErrorLog.computed) { redirectConfig.push(['# logging', '']); @@ -435,12 +523,19 @@ export default (domain, domains, global, ipPortPairs) => { redirectConfig.push(['error_log', getDomainErrorLog(domain)]); } } - - redirectConfig.push(['return', - `301 http${domain.https.https.computed ? 's' : ''}://${domain.server.wwwSubdomain.computed ? 'www.' : ''}${domain.server.domain.computed}$request_uri`]); + + redirectConfig.push([ + 'return', + `301 http${domain.https.https.computed ? 's' : ''}://${ + domain.server.wwwSubdomain.computed ? 'www.' : '' + }${domain.server.domain.computed}$request_uri`, + ]); // Add the redirect config to the parent config now its built - config.push([`# ${domain.server.wwwSubdomain.computed ? 'non-www, ' : ''}subdomains redirect`, '']); + config.push([ + `# ${domain.server.wwwSubdomain.computed ? 'non-www, ' : ''}subdomains redirect`, + '', + ]); config.push(['server', redirectConfig]); } @@ -449,22 +544,58 @@ export default (domain, domains, global, ipPortPairs) => { // Add the redirect config to the parent config now its built config.push(['# HTTP redirect', '']); if (domain.server.wwwSubdomain.computed && !domain.server.redirectSubdomains.computed) { - config.push(['server', httpRedirectConfig(domain, global, ipPortPairs, - domain.server.domain.computed, `www.${domain.server.domain.computed}`)]); - config.push(['server', httpRedirectConfig(domain, global, ipPortPairs, - `www.${domain.server.domain.computed}`)]); - } else if (!domain.server.wwwSubdomain.computed && !domain.server.redirectSubdomains.computed) { - config.push(['server', httpRedirectConfig(domain, global, ipPortPairs, - domain.server.domain.computed)]); + config.push([ + 'server', + httpRedirectConfig( + domain, + global, + ipPortPairs, + domain.server.domain.computed, + `www.${domain.server.domain.computed}`, + ), + ]); + config.push([ + 'server', + httpRedirectConfig( + domain, + global, + ipPortPairs, + `www.${domain.server.domain.computed}`, + ), + ]); + } else if ( + !domain.server.wwwSubdomain.computed && + !domain.server.redirectSubdomains.computed + ) { + config.push([ + 'server', + httpRedirectConfig(domain, global, ipPortPairs, domain.server.domain.computed), + ]); } if (domain.server.cdnSubdomain.computed) { - config.push(['server', httpRedirectConfig(domain, global, ipPortPairs, - `cdn.${domain.server.domain.computed}`)]); + config.push([ + 'server', + httpRedirectConfig( + domain, + global, + ipPortPairs, + `cdn.${domain.server.domain.computed}`, + ), + ]); } if (domain.server.redirectSubdomains.computed) { - config.push(['server', httpRedirectConfig(domain, global, ipPortPairs, - `.${domain.server.domain.computed}`, - `${domain.server.wwwSubdomain.computed ? 'www.' : '' }${domain.server.domain.computed}`)]); + config.push([ + 'server', + httpRedirectConfig( + domain, + global, + ipPortPairs, + `.${domain.server.domain.computed}`, + `${domain.server.wwwSubdomain.computed ? 'www.' : ''}${ + domain.server.domain.computed + }`, + ), + ]); } } diff --git a/src/nginxconfig/generators/conf/wordpress.conf.js b/src/nginxconfig/generators/conf/wordpress.conf.js index 1c8e2b0f..e26ff208 100644 --- a/src/nginxconfig/generators/conf/wordpress.conf.js +++ b/src/nginxconfig/generators/conf/wordpress.conf.js @@ -46,7 +46,8 @@ export default (global, domain) => { }; config['# WordPress: SEO plugin'] = ''; - config['location ~* ^/wp-content/plugins/wordpress-seo(?:-premium)?/css/main-sitemap\\.xsl$'] = {}; + config['location ~* ^/wp-content/plugins/wordpress-seo(?:-premium)?/css/main-sitemap\\.xsl$'] = + {}; config['# WordPress: deny wp-content/plugins (except earlier rules)'] = ''; config['location ~ ^/wp-content/plugins'] = { @@ -54,7 +55,9 @@ export default (global, domain) => { }; config['# WordPress: deny general stuff'] = ''; - config['location ~* ^/(?:xmlrpc\\.php|wp-links-opml\\.php|wp-config\\.php|wp-config-sample\\.php|readme\\.html|license\\.txt)$'] = { + config[ + 'location ~* ^/(?:xmlrpc\\.php|wp-links-opml\\.php|wp-config\\.php|wp-config-sample\\.php|readme\\.html|license\\.txt)$' + ] = { deny: 'all', }; @@ -65,8 +68,8 @@ export default (global, domain) => { include: 'nginxconfig.io/php_fastcgi.conf', }; if (domain.php.wordPressRules.computed) { - config['location = /wp-login.php'].fastcgi_pass = domain.php.phpBackupServer.computed !== '' - ? phpUpstream(domain) : phpPath(domain); + config['location = /wp-login.php'].fastcgi_pass = + domain.php.phpBackupServer.computed !== '' ? phpUpstream(domain) : phpPath(domain); } } diff --git a/src/nginxconfig/generators/ext/docker.js b/src/nginxconfig/generators/ext/docker.js index 524e602b..bf73fedf 100644 --- a/src/nginxconfig/generators/ext/docker.js +++ b/src/nginxconfig/generators/ext/docker.js @@ -27,4 +27,3 @@ THE SOFTWARE. export default () => { return 'FROM nginx:latest\nCOPY . /etc/nginx/'; }; - diff --git a/src/nginxconfig/generators/index.js b/src/nginxconfig/generators/index.js index 37e088f5..46d99cf9 100644 --- a/src/nginxconfig/generators/index.js +++ b/src/nginxconfig/generators/index.js @@ -49,8 +49,7 @@ export default (domains, global) => { files['nginx.conf'] = toConf(nginxConf(domains, global)); // Dockerfile - if (global.docker.dockerfile.computed) - files['Dockerfile'] = dockerConf(); + if (global.docker.dockerfile.computed) files['Dockerfile'] = dockerConf(); if (global.docker.dockerCompose.computed) files['docker-compose.yaml'] = toYaml(dockerComposeYaml()); @@ -61,14 +60,18 @@ export default (domains, global) => { const sitesDir = `sites-${global.tools.symlinkVhost.computed ? 'available' : 'enabled'}`; const ipPortPairs = new Set(); for (const domain of domains) { - files[`${sitesDir}/${domain.server.domain.computed}.conf`] = toConf(websiteConf(domain, domains, global, ipPortPairs)); + files[`${sitesDir}/${domain.server.domain.computed}.conf`] = toConf( + websiteConf(domain, domains, global, ipPortPairs), + ); // WordPress - if (domains.some(d => d.php.wordPressRules.computed)) - files[`nginxconfig.io/${domain.server.domain.computed}.wordpress.conf`] = toConf(wordPressConf(global, domain)); + if (domains.some((d) => d.php.wordPressRules.computed)) + files[`nginxconfig.io/${domain.server.domain.computed}.wordpress.conf`] = toConf( + wordPressConf(global, domain), + ); } // Let's encrypt - if (domains.some(d => d.https.certType.computed === 'letsEncrypt')) + if (domains.some((d) => d.https.certType.computed === 'letsEncrypt')) files['nginxconfig.io/letsencrypt.conf'] = toConf(letsEncryptConf(global)); // Security @@ -78,37 +81,41 @@ export default (domains, global) => { files['nginxconfig.io/general.conf'] = toConf(generalConf(domains, global)); // PHP - if (domains.some(d => d.php.php.computed)) + if (domains.some((d) => d.php.php.computed)) files['nginxconfig.io/php_fastcgi.conf'] = toConf(phpConf(domains)); // Python - if (domains.some(d => d.python.python.computed)) + if (domains.some((d) => d.python.python.computed)) files['nginxconfig.io/python_uwsgi.conf'] = toConf(pythonConf(global)); // Reverse proxy - if (domains.some(d => d.reverseProxy.reverseProxy.computed)) + if (domains.some((d) => d.reverseProxy.reverseProxy.computed)) files['nginxconfig.io/proxy.conf'] = toConf(proxyConf(global)); // Drupal - if (domains.some(d => d.php.drupalRules.computed)) + if (domains.some((d) => d.php.drupalRules.computed)) files['nginxconfig.io/drupal.conf'] = toConf(drupalConf(global)); // Magento - if (domains.some(d => d.php.magentoRules.computed)) + if (domains.some((d) => d.php.magentoRules.computed)) files['nginxconfig.io/magento.conf'] = toConf(magentoConf()); // Joomla - if (domains.some(d => d.php.joomlaRules.computed)) + if (domains.some((d) => d.php.joomlaRules.computed)) files['nginxconfig.io/joomla.conf'] = toConf(joomlaConf()); - } else { // PHP - if (domains.some(d => d.php.wordPressRules.computed)) + if (domains.some((d) => d.php.wordPressRules.computed)) files['nginxconfig.io/php_fastcgi.conf'] = toConf(phpConf(domains)); } - const query = shareQuery(domains.map((domain, index) => [domain, index]).filter(d => d[0] !== null), global); - files['nginxconfig.txt'] = `${window.location.protocol}//${window.location.host}${window.location.pathname}${query}`; + const query = shareQuery( + domains.map((domain, index) => [domain, index]).filter((d) => d[0] !== null), + global, + ); + files[ + 'nginxconfig.txt' + ] = `${window.location.protocol}//${window.location.host}${window.location.pathname}${query}`; return files; }; diff --git a/src/nginxconfig/generators/to_conf.js b/src/nginxconfig/generators/to_conf.js index a09040d6..2c94f348 100644 --- a/src/nginxconfig/generators/to_conf.js +++ b/src/nginxconfig/generators/to_conf.js @@ -26,22 +26,23 @@ THE SOFTWARE. import isObject from '../util/is_object'; -const isBlock = item => { +const isBlock = (item) => { // If an object, or kv entries, this is considered a block - return isObject(item) || (Array.isArray(item) && item.every(i => Array.isArray(i) && i.length === 2)); + return ( + isObject(item) || + (Array.isArray(item) && item.every((i) => Array.isArray(i) && i.length === 2)) + ); }; -const longestKey = items => { +const longestKey = (items) => { let longest = 0; for (const item of items) { // Only consider up to the first block - if (isBlock(item[1])) - return longest; + if (isBlock(item[1])) return longest; // If this is the new longest, and not a comment, use this - if (item[0].length > longest && !item[0].startsWith('#')) - longest = item[0].length; + if (item[0].length > longest && !item[0].startsWith('#')) longest = item[0].length; } // Done! @@ -54,12 +55,13 @@ const recurse = (entriesOrObject, depth) => { const entries = isObject(entriesOrObject) ? Object.entries(entriesOrObject) : entriesOrObject; // If not a valid kv entries array, return - if (!Array.isArray(entries) || !entries.every(i => Array.isArray(i) && i.length === 2)) return ''; + if (!Array.isArray(entries) || !entries.every((i) => Array.isArray(i) && i.length === 2)) + return ''; // Initial values let retVal = ''; let longestKeyLen = longestKey(entries); - const indent = (' ').repeat(depth); + const indent = ' '.repeat(depth); // Track whether the previous was a block, for indentation let previousBlock = false; @@ -91,20 +93,24 @@ const recurse = (entriesOrObject, depth) => { const val = Array.isArray(item[1]) ? item[1] : [item[1]]; // Calculate spacing - const keyValSpacing = (longestKeyLen - item[0].length) + 1; - const keyValIndent = (' ').repeat(Math.max(keyValSpacing, 0)); + const keyValSpacing = longestKeyLen - item[0].length + 1; + const keyValIndent = ' '.repeat(Math.max(keyValSpacing, 0)); // Work through each item in the array - val.forEach(subVal => { + val.forEach((subVal) => { const val = subVal.toString(); - retVal += indent + (item[0] + keyValIndent + val).trim() + (item[0].startsWith('#') ? '' : ';') + '\n'; + retVal += + indent + + (item[0] + keyValIndent + val).trim() + + (item[0].startsWith('#') ? '' : ';') + + '\n'; }); } return retVal; }; -export default entriesOrObject => { +export default (entriesOrObject) => { // Generate the conf let conf = recurse(entriesOrObject, 0); @@ -127,7 +133,12 @@ export default entriesOrObject => { do { match = /^([^\S\r\n]*})(?:\n[^\S\r\n]*)+\n([^\S\r\n]*})/m.exec(conf); if (match) - conf = conf.slice(0, match.index) + match[1] + '\n' + match[2] + conf.slice(match.index + match[0].length); + conf = + conf.slice(0, match.index) + + match[1] + + '\n' + + match[2] + + conf.slice(match.index + match[0].length); } while (match); // Remove initial & trailing whitespace diff --git a/src/nginxconfig/generators/to_yaml.js b/src/nginxconfig/generators/to_yaml.js index c4296068..833d3f70 100644 --- a/src/nginxconfig/generators/to_yaml.js +++ b/src/nginxconfig/generators/to_yaml.js @@ -26,6 +26,6 @@ THE SOFTWARE. import yaml from 'json-to-pretty-yaml'; -export default yamlConf => { +export default (yamlConf) => { return yaml.stringify(yamlConf); }; diff --git a/src/nginxconfig/i18n/de/common.js b/src/nginxconfig/i18n/de/common.js index 28b88e56..b0de1a14 100644 --- a/src/nginxconfig/i18n/de/common.js +++ b/src/nginxconfig/i18n/de/common.js @@ -33,7 +33,7 @@ export default { nginx: 'NGINX', http: 'HTTP', https: 'HTTPS', - letsEncrypt: 'Let\'s Encrypt', + letsEncrypt: "Let's Encrypt", python: 'Python', wordPress: 'WordPress', drupal: 'Drupal', diff --git a/src/nginxconfig/i18n/de/templates/callouts/contribute.js b/src/nginxconfig/i18n/de/templates/callouts/contribute.js index c691723c..8a1f7ef5 100644 --- a/src/nginxconfig/i18n/de/templates/callouts/contribute.js +++ b/src/nginxconfig/i18n/de/templates/callouts/contribute.js @@ -25,6 +25,7 @@ THE SOFTWARE. */ export default { - wantToContributeChanges: '👋 Willst du neue Features vorschlagen, Änderungen beitragen oder das Tool in eine andere Sprache übersetzen?', + wantToContributeChanges: + '👋 Willst du neue Features vorschlagen, Änderungen beitragen oder das Tool in eine andere Sprache übersetzen?', getInvolvedOnGitHub: 'Beteilige dich auf GitHub', }; diff --git a/src/nginxconfig/i18n/de/templates/callouts/droplet.js b/src/nginxconfig/i18n/de/templates/callouts/droplet.js index b39af51e..561d363f 100644 --- a/src/nginxconfig/i18n/de/templates/callouts/droplet.js +++ b/src/nginxconfig/i18n/de/templates/callouts/droplet.js @@ -26,5 +26,5 @@ THE SOFTWARE. export default { lookingForAPlaceToDeploy: '👋 Suchst du nach einem Ort, deine neue Konfiguration zu deployen?', - tryOutDigitalOceansDroplet: 'Teste DigitalOcean\'s LEMP Droplet mit NGINX', + tryOutDigitalOceansDroplet: "Teste DigitalOcean's LEMP Droplet mit NGINX", }; diff --git a/src/nginxconfig/i18n/de/templates/domain_sections/index.js b/src/nginxconfig/i18n/de/templates/domain_sections/index.js index 42ec3ddf..67137210 100644 --- a/src/nginxconfig/i18n/de/templates/domain_sections/index.js +++ b/src/nginxconfig/i18n/de/templates/domain_sections/index.js @@ -35,4 +35,15 @@ import reverseProxy from './reverse_proxy'; import routing from './routing'; import server from './server'; -export default { https, logging, php, presets, python, reverseProxy, routing, server, restrict, onion }; +export default { + https, + logging, + php, + presets, + python, + reverseProxy, + routing, + server, + restrict, + onion, +}; diff --git a/src/nginxconfig/i18n/de/templates/domain_sections/onion.js b/src/nginxconfig/i18n/de/templates/domain_sections/onion.js index fd3054b7..8147cb68 100644 --- a/src/nginxconfig/i18n/de/templates/domain_sections/onion.js +++ b/src/nginxconfig/i18n/de/templates/domain_sections/onion.js @@ -29,8 +29,10 @@ const onion = 'Onion'; export default { onion, onionLocation: `${onion} Location`, - provideAnOnionLocationToSetOnionLocationHeader: 'Gib eine Onion Adresse an, um den Onion-Location Header für deine Seite zu setzen.', - letsVisitorsKnownOnionServicesIsAvailable: 'Dies teilt deinen Besuchern mit, dass eine Onion-Version deiner Webseite für Tor-Browser verfügbar ist.', + provideAnOnionLocationToSetOnionLocationHeader: + 'Gib eine Onion Adresse an, um den Onion-Location Header für deine Seite zu setzen.', + letsVisitorsKnownOnionServicesIsAvailable: + 'Dies teilt deinen Besuchern mit, dass eine Onion-Version deiner Webseite für Tor-Browser verfügbar ist.', learnMoreAboutOnionServices: 'Lerne mehr über Onion-Dienste', onionLocationExpectedToEndWithOnion: 'Onion Adressen enden normalerweise mit `.onion`.', }; diff --git a/src/nginxconfig/i18n/de/templates/domain_sections/presets.js b/src/nginxconfig/i18n/de/templates/domain_sections/presets.js index fd77dd69..06c689fe 100644 --- a/src/nginxconfig/i18n/de/templates/domain_sections/presets.js +++ b/src/nginxconfig/i18n/de/templates/domain_sections/presets.js @@ -26,7 +26,8 @@ THE SOFTWARE. export default { presets: 'Voreinstellungen', - itLooksLikeYouCustomisedTheConfig: 'Es sieht so aus, als hättest du die Konfiguration für diese Webseite angepasst. Eine neue Voreinstellung zu laden könnte manche deiner Anpassungen zurücksetzen oder ändern.', + itLooksLikeYouCustomisedTheConfig: + 'Es sieht so aus, als hättest du die Konfiguration für diese Webseite angepasst. Eine neue Voreinstellung zu laden könnte manche deiner Anpassungen zurücksetzen oder ändern.', frontend: 'Frontend', nodeJs: 'Node.js', singlePageApplication: 'Single-Page-Webanwendung', diff --git a/src/nginxconfig/i18n/de/templates/domain_sections/server.js b/src/nginxconfig/i18n/de/templates/domain_sections/server.js index dfae2ac1..ec960c01 100644 --- a/src/nginxconfig/i18n/de/templates/domain_sections/server.js +++ b/src/nginxconfig/i18n/de/templates/domain_sections/server.js @@ -28,7 +28,8 @@ export default { domain: 'Domain', documentRoot: 'Document Root', oneOrMoreOtherDomainsAreAlsoNamed: 'Eine oder mehrere Domains lauten ebenfalls', - thisWillCauseIssuesWithConfigGeneration: 'Dies sorgt für Probleme beim Generieren der Konfigurationsdateien.', + thisWillCauseIssuesWithConfigGeneration: + 'Dies sorgt für Probleme beim Generieren der Konfigurationsdateien.', wwwSubdomain: 'WWW Subdomain', cdnSubdomain: 'CDN Subdomain', redirectSubdomains: 'Subdomains weiterleiten', diff --git a/src/nginxconfig/i18n/de/templates/global_sections/index.js b/src/nginxconfig/i18n/de/templates/global_sections/index.js index 35eba1d9..22ecb855 100644 --- a/src/nginxconfig/i18n/de/templates/global_sections/index.js +++ b/src/nginxconfig/i18n/de/templates/global_sections/index.js @@ -34,4 +34,14 @@ import security from './security'; import tools from './tools'; import docker from './docker'; -export default { https, logging, nginx, performance, python, reverseProxy, security, tools, docker }; +export default { + https, + logging, + nginx, + performance, + python, + reverseProxy, + security, + tools, + docker, +}; diff --git a/src/nginxconfig/i18n/de/templates/global_sections/tools.js b/src/nginxconfig/i18n/de/templates/global_sections/tools.js index b40097af..082ad521 100644 --- a/src/nginxconfig/i18n/de/templates/global_sections/tools.js +++ b/src/nginxconfig/i18n/de/templates/global_sections/tools.js @@ -43,10 +43,13 @@ export default { yesImSure: 'Ja, ich bin sicher', noCancel: 'Nein, abbrechen', tools: 'Tools', - resetGlobalConfigBody: 'Bist du dir sicher, dass du alle Optionen im Bereich "Globale Konfiguration" zurücksetzen möchtest?', - resetAllDomainsConfigBody: 'Bist du dir sicher, dass du die Konfiguration ALLER Domains zurücksetzen möchtest?', + resetGlobalConfigBody: + 'Bist du dir sicher, dass du alle Optionen im Bereich "Globale Konfiguration" zurücksetzen möchtest?', + resetAllDomainsConfigBody: + 'Bist du dir sicher, dass du die Konfiguration ALLER Domains zurücksetzen möchtest?', removeAllDomainsBody: 'Bist du dir sicher, dass du ALLE Domains entfernen möchtest?', - areYouSureYouWantToResetAllConfigurationOptionsForThe: 'Bist du dir sicher, dass du die Konfiguration von', + areYouSureYouWantToResetAllConfigurationOptionsForThe: + 'Bist du dir sicher, dass du die Konfiguration von', domain: 'zurücksetzen möchtest?', areYouSureYouWantToRemoveThe: 'Bist du dir sicher, dass du die Domain ', domainConfiguration: 'entfernen möchtest?', diff --git a/src/nginxconfig/i18n/de/templates/setup_sections/download.js b/src/nginxconfig/i18n/de/templates/setup_sections/download.js index ffaf9363..7e316180 100644 --- a/src/nginxconfig/i18n/de/templates/setup_sections/download.js +++ b/src/nginxconfig/i18n/de/templates/setup_sections/download.js @@ -31,10 +31,13 @@ export default { andUploadItToYourServers: 'Auf deinen Server hochladen und ins Verzeichnis ', directory: 'verschieben.', or: 'Oder ', - copyBase64StringOfCompressedConfig: 'kopiere einen Base64 String der komprimierten Konfiguration', - pasteItInYourServersCommandLineAndExecute: ', füge ihn auf der Kommandozeile deines Servers ein und führe ihn aus.', + copyBase64StringOfCompressedConfig: + 'kopiere einen Base64 String der komprimierten Konfiguration', + pasteItInYourServersCommandLineAndExecute: + ', füge ihn auf der Kommandozeile deines Servers ein und führe ihn aus.', navigateToYourNginxConfigurationDirectoryOnYourServer: `Wechsle in das ${common.nginx} Konfigurationsverzeichnis deines Servers:`, createABackupOfYourCurrentNginxConfiguration: `Erstelle ein Backup deiner aktuellen ${common.nginx} Konfiguration:`, - extractTheNewCompressedConfigurationArchiveUsingTar: 'Entpacke das komprimierte Konfigurationsverzeichnis mittels tar:', + extractTheNewCompressedConfigurationArchiveUsingTar: + 'Entpacke das komprimierte Konfigurationsverzeichnis mittels tar:', download: 'Download', }; diff --git a/src/nginxconfig/i18n/de/templates/setup_sections/ssl.js b/src/nginxconfig/i18n/de/templates/setup_sections/ssl.js index 0aafe4fa..8cdd6598 100644 --- a/src/nginxconfig/i18n/de/templates/setup_sections/ssl.js +++ b/src/nginxconfig/i18n/de/templates/setup_sections/ssl.js @@ -27,7 +27,8 @@ THE SOFTWARE. import common from '../../common'; export default { - generateDiffieHellmanKeysByRunningThisCommandOnYourServer: 'Erzeuge Diffie-Hellman Schlüssel indem du diesen Befehl auf deinem Server ausführst:', + generateDiffieHellmanKeysByRunningThisCommandOnYourServer: + 'Erzeuge Diffie-Hellman Schlüssel indem du diesen Befehl auf deinem Server ausführst:', createACommonAcmeChallengeDirectoryForLetsEncrypt: `Erstelle ein ACME-Challenge Verzeichnis (für ${common.letsEncrypt}):`, noAdditionalStepsAreNeededToSetUpSslForNginx: `Es sind keine weiteren Schritte nötig, um ${common.ssl} für deine ${common.nginx} Konfiguration einzurichten.`, sslInit: `${common.ssl} initialisieren`, diff --git a/src/nginxconfig/i18n/en/common.js b/src/nginxconfig/i18n/en/common.js index 00b17868..7f357c3b 100644 --- a/src/nginxconfig/i18n/en/common.js +++ b/src/nginxconfig/i18n/en/common.js @@ -25,22 +25,22 @@ THE SOFTWARE. */ export default { - back: 'Back', - next: 'Next', - enable: 'enable', - php: 'PHP', - ssl: 'SSL', - nginx: 'NGINX', - http: 'HTTP', - https: 'HTTPS', - letsEncrypt: 'Let\'s Encrypt', - python: 'Python', - wordPress: 'WordPress', - drupal: 'Drupal', - magento: 'Magento', - joomla: 'Joomla', - django: 'Django', - logging: 'Logging', + back: 'Back', + next: 'Next', + enable: 'enable', + php: 'PHP', + ssl: 'SSL', + nginx: 'NGINX', + http: 'HTTP', + https: 'HTTPS', + letsEncrypt: "Let's Encrypt", + python: 'Python', + wordPress: 'WordPress', + drupal: 'Drupal', + magento: 'Magento', + joomla: 'Joomla', + django: 'Django', + logging: 'Logging', reverseProxy: 'Reverse proxy', reverseProxyLower: 'reverse proxy', restrict: 'Restrict', diff --git a/src/nginxconfig/i18n/en/templates/callouts/contribute.js b/src/nginxconfig/i18n/en/templates/callouts/contribute.js index 5eb241a8..b435f19f 100644 --- a/src/nginxconfig/i18n/en/templates/callouts/contribute.js +++ b/src/nginxconfig/i18n/en/templates/callouts/contribute.js @@ -25,6 +25,7 @@ THE SOFTWARE. */ export default { - wantToContributeChanges: '👋 Want to request new features, contribute changes, or translate the tool into a new language?', + wantToContributeChanges: + '👋 Want to request new features, contribute changes, or translate the tool into a new language?', getInvolvedOnGitHub: 'Get involved on GitHub', }; diff --git a/src/nginxconfig/i18n/en/templates/callouts/droplet.js b/src/nginxconfig/i18n/en/templates/callouts/droplet.js index ab78f647..42b48b3c 100644 --- a/src/nginxconfig/i18n/en/templates/callouts/droplet.js +++ b/src/nginxconfig/i18n/en/templates/callouts/droplet.js @@ -26,5 +26,5 @@ THE SOFTWARE. export default { lookingForAPlaceToDeploy: '👋 Looking for a place to deploy your new configuration?', - tryOutDigitalOceansDroplet: 'Try out DigitalOcean\'s LEMP Droplet with NGINX', + tryOutDigitalOceansDroplet: "Try out DigitalOcean's LEMP Droplet with NGINX", }; diff --git a/src/nginxconfig/i18n/en/templates/domain_sections/https.js b/src/nginxconfig/i18n/en/templates/domain_sections/https.js index a6511b6a..2c62306a 100644 --- a/src/nginxconfig/i18n/en/templates/domain_sections/https.js +++ b/src/nginxconfig/i18n/en/templates/domain_sections/https.js @@ -40,7 +40,7 @@ export default { certificationType: 'Certification type', customCertificate: 'Custom certificate', letsEncryptEmail: `${common.letsEncrypt} email`, - http3IsANonStandardModule: 'HTTP/3 isn\'t a standard NGINX module, check the ', + http3IsANonStandardModule: "HTTP/3 isn't a standard NGINX module, check the ", http3NginxQuicReadme: 'NGINX QUIC readme', http3OrThe: ' or the ', http3CloudflareQuicheProject: 'Cloudflare quiche project', diff --git a/src/nginxconfig/i18n/en/templates/domain_sections/index.js b/src/nginxconfig/i18n/en/templates/domain_sections/index.js index 5b2b8177..bcec501c 100644 --- a/src/nginxconfig/i18n/en/templates/domain_sections/index.js +++ b/src/nginxconfig/i18n/en/templates/domain_sections/index.js @@ -35,4 +35,15 @@ import server from './server'; import restrict from './restrict'; import onion from './onion'; -export default { https, logging, php, presets, python, reverseProxy, routing, server, restrict, onion }; +export default { + https, + logging, + php, + presets, + python, + reverseProxy, + routing, + server, + restrict, + onion, +}; diff --git a/src/nginxconfig/i18n/en/templates/domain_sections/onion.js b/src/nginxconfig/i18n/en/templates/domain_sections/onion.js index 6ada5a7d..8f99c775 100644 --- a/src/nginxconfig/i18n/en/templates/domain_sections/onion.js +++ b/src/nginxconfig/i18n/en/templates/domain_sections/onion.js @@ -29,8 +29,10 @@ const onion = 'Onion'; export default { onion, onionLocation: `${onion} location`, - provideAnOnionLocationToSetOnionLocationHeader: 'Provide an onion location address to set the Onion-Location header for your site.', - letsVisitorsKnownOnionServicesIsAvailable: 'This lets visitors know that an onion services version of your site is available for Tor browsers.', + provideAnOnionLocationToSetOnionLocationHeader: + 'Provide an onion location address to set the Onion-Location header for your site.', + letsVisitorsKnownOnionServicesIsAvailable: + 'This lets visitors know that an onion services version of your site is available for Tor browsers.', learnMoreAboutOnionServices: 'Learn more about Onion services', onionLocationExpectedToEndWithOnion: 'Onion location addresses normally end with `.onion`.', }; diff --git a/src/nginxconfig/i18n/en/templates/domain_sections/presets.js b/src/nginxconfig/i18n/en/templates/domain_sections/presets.js index 864faef3..33601549 100644 --- a/src/nginxconfig/i18n/en/templates/domain_sections/presets.js +++ b/src/nginxconfig/i18n/en/templates/domain_sections/presets.js @@ -26,7 +26,8 @@ THE SOFTWARE. export default { presets: 'Presets', - itLooksLikeYouCustomisedTheConfig: 'It looks like you\'ve customised the configuration for this domain. Choosing a new preset may reset or change some of the settings that you\'ve customised.', + itLooksLikeYouCustomisedTheConfig: + "It looks like you've customised the configuration for this domain. Choosing a new preset may reset or change some of the settings that you've customised.", frontend: 'Frontend', nodeJs: 'Node.js', singlePageApplication: 'Single-page application', diff --git a/src/nginxconfig/i18n/en/templates/global_sections/index.js b/src/nginxconfig/i18n/en/templates/global_sections/index.js index 35eba1d9..22ecb855 100644 --- a/src/nginxconfig/i18n/en/templates/global_sections/index.js +++ b/src/nginxconfig/i18n/en/templates/global_sections/index.js @@ -34,4 +34,14 @@ import security from './security'; import tools from './tools'; import docker from './docker'; -export default { https, logging, nginx, performance, python, reverseProxy, security, tools, docker }; +export default { + https, + logging, + nginx, + performance, + python, + reverseProxy, + security, + tools, + docker, +}; diff --git a/src/nginxconfig/i18n/en/templates/global_sections/performance.js b/src/nginxconfig/i18n/en/templates/global_sections/performance.js index 0bd4eb9f..316215a7 100644 --- a/src/nginxconfig/i18n/en/templates/global_sections/performance.js +++ b/src/nginxconfig/i18n/en/templates/global_sections/performance.js @@ -33,7 +33,7 @@ export default { enableGzipCompression: `${common.enable} gzip compression`, brotliCompression: 'Brotli compression', enableBrotliCompression: `${common.enable} brotli compression`, - brotliIsANonStandardModule: 'Brotli isn\'t a standard NGINX module, check the ', + brotliIsANonStandardModule: "Brotli isn't a standard NGINX module, check the ", brotliGoogleNgxBrotliProject: 'Google ngx_brotli project', brotliForBuildingNginxWithBrotli: ' for how to build NGINX with Brotli!', expirationForAssets: 'Expiration for assets', diff --git a/src/nginxconfig/i18n/en/templates/global_sections/tools.js b/src/nginxconfig/i18n/en/templates/global_sections/tools.js index 13064f7c..6ea74ea0 100644 --- a/src/nginxconfig/i18n/en/templates/global_sections/tools.js +++ b/src/nginxconfig/i18n/en/templates/global_sections/tools.js @@ -40,13 +40,15 @@ export default { resetAllDomainsConfig: 'Reset all domain configs', resetDomainConfig: 'Reset domain config', removeDomain: 'Remove domain', - yesImSure: 'Yes, I\'m sure', + yesImSure: "Yes, I'm sure", noCancel: 'No, cancel', tools: 'Tools', - resetGlobalConfigBody: 'Are you sure you want to reset all configuration options in the global config section?', + resetGlobalConfigBody: + 'Are you sure you want to reset all configuration options in the global config section?', resetAllDomainsConfigBody: 'Are you sure you want to reset the configuration of ALL domains?', removeAllDomainsBody: 'Are you sure you want to remove ALL domain configurations?', - areYouSureYouWantToResetAllConfigurationOptionsForThe: 'Are you sure you want to reset all configuration options for the', + areYouSureYouWantToResetAllConfigurationOptionsForThe: + 'Are you sure you want to reset all configuration options for the', domain: 'domain?', areYouSureYouWantToRemoveThe: 'Are you sure you want to remove the ', domainConfiguration: 'domain configuration?', diff --git a/src/nginxconfig/i18n/en/templates/setup_sections/download.js b/src/nginxconfig/i18n/en/templates/setup_sections/download.js index 7054baf7..e957098c 100644 --- a/src/nginxconfig/i18n/en/templates/setup_sections/download.js +++ b/src/nginxconfig/i18n/en/templates/setup_sections/download.js @@ -28,13 +28,15 @@ import common from '../../common'; export default { downloadTheGeneratedConfig: 'Download the generated config:', - andUploadItToYourServers: 'and upload it to your server\'s', + andUploadItToYourServers: "and upload it to your server's", directory: 'directory.', or: 'or, ', copyBase64StringOfCompressedConfig: 'Copy a base64 string of the compressed config', - pasteItInYourServersCommandLineAndExecute: ', paste it in your server\'s command line and execute it.', + pasteItInYourServersCommandLineAndExecute: + ", paste it in your server's command line and execute it.", navigateToYourNginxConfigurationDirectoryOnYourServer: `Navigate to your ${common.nginx} configuration directory on your server:`, createABackupOfYourCurrentNginxConfiguration: `Create a backup of your current ${common.nginx} configuration:`, - extractTheNewCompressedConfigurationArchiveUsingTar: 'Extract the new compressed configuration archive using tar:', + extractTheNewCompressedConfigurationArchiveUsingTar: + 'Extract the new compressed configuration archive using tar:', download: 'Download', }; diff --git a/src/nginxconfig/i18n/en/templates/setup_sections/go_live.js b/src/nginxconfig/i18n/en/templates/setup_sections/go_live.js index 9c023050..2fe8e0dc 100644 --- a/src/nginxconfig/i18n/en/templates/setup_sections/go_live.js +++ b/src/nginxconfig/i18n/en/templates/setup_sections/go_live.js @@ -27,7 +27,7 @@ THE SOFTWARE. import common from '../../common'; export default { - letsGoLive: 'Let\'s go live!', + letsGoLive: "Let's go live!", reloadNginxToLoadInYourNewConfiguration: `Reload ${common.nginx} to load in your new configuration:`, goLive: 'Go live!', }; diff --git a/src/nginxconfig/i18n/en/templates/setup_sections/ssl.js b/src/nginxconfig/i18n/en/templates/setup_sections/ssl.js index 5da83397..cfe7f6f4 100644 --- a/src/nginxconfig/i18n/en/templates/setup_sections/ssl.js +++ b/src/nginxconfig/i18n/en/templates/setup_sections/ssl.js @@ -27,7 +27,8 @@ THE SOFTWARE. import common from '../../common'; export default { - generateDiffieHellmanKeysByRunningThisCommandOnYourServer: 'Generate Diffie-Hellman keys by running this command on your server:', + generateDiffieHellmanKeysByRunningThisCommandOnYourServer: + 'Generate Diffie-Hellman keys by running this command on your server:', createACommonAcmeChallengeDirectoryForLetsEncrypt: `Create a common ACME-challenge directory (for ${common.letsEncrypt}):`, noAdditionalStepsAreNeededToSetUpSslForNginx: `No additional steps are needed to set up ${common.ssl} for your ${common.nginx} configuration.`, sslInit: `${common.ssl} init`, diff --git a/src/nginxconfig/i18n/es/common.js b/src/nginxconfig/i18n/es/common.js index 5cad640b..1c614da8 100644 --- a/src/nginxconfig/i18n/es/common.js +++ b/src/nginxconfig/i18n/es/common.js @@ -33,7 +33,7 @@ export default { nginx: 'NGINX', http: 'HTTP', https: 'HTTPS', - letsEncrypt: 'Let\'s Encrypt', + letsEncrypt: "Let's Encrypt", python: 'Python', wordPress: 'WordPress', drupal: 'Drupal', diff --git a/src/nginxconfig/i18n/es/templates/callouts/contribute.js b/src/nginxconfig/i18n/es/templates/callouts/contribute.js index 1e895ea0..c417eaa4 100644 --- a/src/nginxconfig/i18n/es/templates/callouts/contribute.js +++ b/src/nginxconfig/i18n/es/templates/callouts/contribute.js @@ -25,6 +25,7 @@ THE SOFTWARE. */ export default { - wantToContributeChanges: '👋 ¿Quiere solicitar nuevas funciones, contribuir con cambios o traducir la herramienta a un nuevo idioma?', + wantToContributeChanges: + '👋 ¿Quiere solicitar nuevas funciones, contribuir con cambios o traducir la herramienta a un nuevo idioma?', getInvolvedOnGitHub: 'Involúcrate en GitHub', }; diff --git a/src/nginxconfig/i18n/es/templates/domain_sections/index.js b/src/nginxconfig/i18n/es/templates/domain_sections/index.js index a6da9ab9..8549b319 100644 --- a/src/nginxconfig/i18n/es/templates/domain_sections/index.js +++ b/src/nginxconfig/i18n/es/templates/domain_sections/index.js @@ -35,4 +35,15 @@ import server from './server'; import restrict from './restrict'; import onion from './onion'; -export default { https, logging, php, presets, python, reverseProxy, routing, server, restrict, onion }; +export default { + https, + logging, + php, + presets, + python, + reverseProxy, + routing, + server, + restrict, + onion, +}; diff --git a/src/nginxconfig/i18n/es/templates/domain_sections/onion.js b/src/nginxconfig/i18n/es/templates/domain_sections/onion.js index 5b6706b7..61936285 100644 --- a/src/nginxconfig/i18n/es/templates/domain_sections/onion.js +++ b/src/nginxconfig/i18n/es/templates/domain_sections/onion.js @@ -29,8 +29,11 @@ const onion = 'Onion'; export default { onion, onionLocation: `Ubicación ${onion}`, - provideAnOnionLocationToSetOnionLocationHeader: 'Proporcione una dirección de ubicación Onion para configurar el encabezado de Onion-Location en su sitio.', - letsVisitorsKnownOnionServicesIsAvailable: 'Esto les permite a los visitantes saber que una versión de servicios Onion de su sitio está disponible para los navegadores Tor.', + provideAnOnionLocationToSetOnionLocationHeader: + 'Proporcione una dirección de ubicación Onion para configurar el encabezado de Onion-Location en su sitio.', + letsVisitorsKnownOnionServicesIsAvailable: + 'Esto les permite a los visitantes saber que una versión de servicios Onion de su sitio está disponible para los navegadores Tor.', learnMoreAboutOnionServices: 'Más información sobre los servicios Onion', - onionLocationExpectedToEndWithOnion: 'Las direcciones de ubicación Onion normalmente terminan con `.onion`.', + onionLocationExpectedToEndWithOnion: + 'Las direcciones de ubicación Onion normalmente terminan con `.onion`.', }; diff --git a/src/nginxconfig/i18n/es/templates/domain_sections/presets.js b/src/nginxconfig/i18n/es/templates/domain_sections/presets.js index a0bf0679..2361e081 100644 --- a/src/nginxconfig/i18n/es/templates/domain_sections/presets.js +++ b/src/nginxconfig/i18n/es/templates/domain_sections/presets.js @@ -28,7 +28,8 @@ THE SOFTWARE. export default { presets: 'Preajustes', - itLooksLikeYouCustomisedTheConfig: 'Parece que ha personalizado la configuración para este dominio. La elección de un nuevo ajuste preestablecido puede restablecer o cambiar algunas de las configuraciones que ha personalizado.', + itLooksLikeYouCustomisedTheConfig: + 'Parece que ha personalizado la configuración para este dominio. La elección de un nuevo ajuste preestablecido puede restablecer o cambiar algunas de las configuraciones que ha personalizado.', frontend: 'Frontend', nodeJs: 'Node.js', singlePageApplication: 'Single-page application', diff --git a/src/nginxconfig/i18n/es/templates/domain_sections/server.js b/src/nginxconfig/i18n/es/templates/domain_sections/server.js index 872b28c0..2a26908f 100644 --- a/src/nginxconfig/i18n/es/templates/domain_sections/server.js +++ b/src/nginxconfig/i18n/es/templates/domain_sections/server.js @@ -30,7 +30,8 @@ export default { domain: 'Dominio', documentRoot: 'Raiz del documento', oneOrMoreOtherDomainsAreAlsoNamed: 'Uno o más dominios tienen también ese mismo nombre', - thisWillCauseIssuesWithConfigGeneration: 'Esto va a causar problemas en la generación de la configuracion.', + thisWillCauseIssuesWithConfigGeneration: + 'Esto va a causar problemas en la generación de la configuracion.', wwwSubdomain: 'subdominio www', cdnSubdomain: 'subdominio CDN', redirectSubdomains: 'redirección de subdominio', diff --git a/src/nginxconfig/i18n/es/templates/global_sections/https.js b/src/nginxconfig/i18n/es/templates/global_sections/https.js index 5714cf1e..16412413 100644 --- a/src/nginxconfig/i18n/es/templates/global_sections/https.js +++ b/src/nginxconfig/i18n/es/templates/global_sections/https.js @@ -30,7 +30,6 @@ const mozilla = 'Mozilla'; const ipv4 = 'IPv4'; const ipv6 = 'IPv6'; - // 'Resolvers', 'webroot', 'listening socket' and 'worker' don't have a good translation in Spanish export default { diff --git a/src/nginxconfig/i18n/es/templates/global_sections/index.js b/src/nginxconfig/i18n/es/templates/global_sections/index.js index 35eba1d9..22ecb855 100644 --- a/src/nginxconfig/i18n/es/templates/global_sections/index.js +++ b/src/nginxconfig/i18n/es/templates/global_sections/index.js @@ -34,4 +34,14 @@ import security from './security'; import tools from './tools'; import docker from './docker'; -export default { https, logging, nginx, performance, python, reverseProxy, security, tools, docker }; +export default { + https, + logging, + nginx, + performance, + python, + reverseProxy, + security, + tools, + docker, +}; diff --git a/src/nginxconfig/i18n/es/templates/global_sections/logging.js b/src/nginxconfig/i18n/es/templates/global_sections/logging.js index a9ce17af..96537025 100644 --- a/src/nginxconfig/i18n/es/templates/global_sections/logging.js +++ b/src/nginxconfig/i18n/es/templates/global_sections/logging.js @@ -30,7 +30,8 @@ export default { enableFileNotFoundErrorLogging: `${common.enable} el registro de error de archivo no encontrado`, logformat: 'log_format', level: 'logging level', // TODO: translate - enableCloudflare: 'agregar cabecera de petición de Cloudflare en el formato por defecto del registro', + enableCloudflare: + 'agregar cabecera de petición de Cloudflare en el formato por defecto del registro', cfRay: 'CF-Ray', cfConnectingIp: 'CF-Connecting-IP', xForwardedFor: 'X-Forwarded-For', diff --git a/src/nginxconfig/i18n/es/templates/global_sections/performance.js b/src/nginxconfig/i18n/es/templates/global_sections/performance.js index 3b428725..0fb7ab91 100644 --- a/src/nginxconfig/i18n/es/templates/global_sections/performance.js +++ b/src/nginxconfig/i18n/es/templates/global_sections/performance.js @@ -26,7 +26,7 @@ THE SOFTWARE. import common from '../../common'; -export default { +export default { disableHtmlCaching: 'Disable HTML caching', // TODO: translate enableDisableHtmlCaching: 'disable HTML caching', // TODO: translate gzipCompression: 'Compresión Gzip', diff --git a/src/nginxconfig/i18n/es/templates/global_sections/tools.js b/src/nginxconfig/i18n/es/templates/global_sections/tools.js index 9f70323e..fc35be4b 100644 --- a/src/nginxconfig/i18n/es/templates/global_sections/tools.js +++ b/src/nginxconfig/i18n/es/templates/global_sections/tools.js @@ -43,10 +43,13 @@ export default { yesImSure: 'Si, Estoy seguro', noCancel: 'No, cancelar', tools: 'Herramientas', - resetGlobalConfigBody: '¿Estás seguro de que desea reiniciar todas las opciones de configuración en la sección de configuración global?', - resetAllDomainsConfigBody: '¿Estás seguro de que desea reiniciar la configuración de TODOS los dominios?', + resetGlobalConfigBody: + '¿Estás seguro de que desea reiniciar todas las opciones de configuración en la sección de configuración global?', + resetAllDomainsConfigBody: + '¿Estás seguro de que desea reiniciar la configuración de TODOS los dominios?', removeAllDomainsBody: '¿Estás seguro de que desea quitar TODAS las configuraciones de dominio?', - areYouSureYouWantToResetAllConfigurationOptionsForThe: '¿Estás seguro de que desea reiniciar todas las opciones de configuración del', + areYouSureYouWantToResetAllConfigurationOptionsForThe: + '¿Estás seguro de que desea reiniciar todas las opciones de configuración del', domain: 'dominio?', areYouSureYouWantToRemoveThe: '¿Estás seguro de que quieres quitar la ', domainConfiguration: 'configuración de dominio?', diff --git a/src/nginxconfig/i18n/es/templates/setup_sections/download.js b/src/nginxconfig/i18n/es/templates/setup_sections/download.js index ad91a069..c338cfc6 100644 --- a/src/nginxconfig/i18n/es/templates/setup_sections/download.js +++ b/src/nginxconfig/i18n/es/templates/setup_sections/download.js @@ -35,9 +35,11 @@ export default { directory: '.', or: 'o, ', copyBase64StringOfCompressedConfig: 'Copiar el texto comprimido en base64 de la configuracion', - pasteItInYourServersCommandLineAndExecute: ', péguelo en la línea de comando de su servidor y ejecútelo.', + pasteItInYourServersCommandLineAndExecute: + ', péguelo en la línea de comando de su servidor y ejecútelo.', navigateToYourNginxConfigurationDirectoryOnYourServer: `Navega en la carpeta de configuracion de ${common.nginx} de tu servidor:`, createABackupOfYourCurrentNginxConfiguration: `Crea un respaldo de tu configuracion actual de ${common.nginx}:`, - extractTheNewCompressedConfigurationArchiveUsingTar: 'Extraer el nuevo archivo de configuracion comprimido usando tar:', + extractTheNewCompressedConfigurationArchiveUsingTar: + 'Extraer el nuevo archivo de configuracion comprimido usando tar:', download: 'Descargar', }; diff --git a/src/nginxconfig/i18n/es/templates/setup_sections/ssl.js b/src/nginxconfig/i18n/es/templates/setup_sections/ssl.js index 0fc85a21..0f65962e 100644 --- a/src/nginxconfig/i18n/es/templates/setup_sections/ssl.js +++ b/src/nginxconfig/i18n/es/templates/setup_sections/ssl.js @@ -27,7 +27,8 @@ THE SOFTWARE. import common from '../../common'; export default { - generateDiffieHellmanKeysByRunningThisCommandOnYourServer: 'Genera llaves Diffie-Hellman ejecutando este comando en su servidor:', + generateDiffieHellmanKeysByRunningThisCommandOnYourServer: + 'Genera llaves Diffie-Hellman ejecutando este comando en su servidor:', createACommonAcmeChallengeDirectoryForLetsEncrypt: `Crear una simple carpeta ACME-challenge (para ${common.letsEncrypt}):`, noAdditionalStepsAreNeededToSetUpSslForNginx: `No se necesitan pasos adicionales para configurar ${common.ssl} en tu configuracion de ${common.nginx}.`, sslInit: `Preparar el ${common.ssl}`, diff --git a/src/nginxconfig/i18n/fr/common.js b/src/nginxconfig/i18n/fr/common.js index 77b88567..59a13d99 100644 --- a/src/nginxconfig/i18n/fr/common.js +++ b/src/nginxconfig/i18n/fr/common.js @@ -33,7 +33,7 @@ export default { nginx: 'NGINX', http: 'HTTP', https: 'HTTPS', - letsEncrypt: 'Let\'s Encrypt', + letsEncrypt: "Let's Encrypt", python: 'Python', wordPress: 'WordPress', drupal: 'Drupal', diff --git a/src/nginxconfig/i18n/fr/templates/callouts/contribute.js b/src/nginxconfig/i18n/fr/templates/callouts/contribute.js index a1e0bfbd..e68c32bd 100644 --- a/src/nginxconfig/i18n/fr/templates/callouts/contribute.js +++ b/src/nginxconfig/i18n/fr/templates/callouts/contribute.js @@ -25,6 +25,7 @@ THE SOFTWARE. */ export default { - wantToContributeChanges: '👋 Vous souhaitez demander de nouvelles fonctionnalités, apporter des modifications, ou traduire l\'outil dans une nouvelle langue?', + wantToContributeChanges: + "👋 Vous souhaitez demander de nouvelles fonctionnalités, apporter des modifications, ou traduire l'outil dans une nouvelle langue?", getInvolvedOnGitHub: 'Participez sur GitHub', }; diff --git a/src/nginxconfig/i18n/fr/templates/domain_sections/https.js b/src/nginxconfig/i18n/fr/templates/domain_sections/https.js index 76c55e97..992c4fd6 100644 --- a/src/nginxconfig/i18n/fr/templates/domain_sections/https.js +++ b/src/nginxconfig/i18n/fr/templates/domain_sections/https.js @@ -40,7 +40,7 @@ export default { certificationType: 'Type de certification', customCertificate: 'Certificat personnalisé', letsEncryptEmail: `E-mail ${common.letsEncrypt}`, - http3IsANonStandardModule: 'HTTP/3 n\'est pas un module standard de NGINX, veuillez lire ', + http3IsANonStandardModule: "HTTP/3 n'est pas un module standard de NGINX, veuillez lire ", http3NginxQuicReadme: 'le Readme de NGINX QUIC', http3OrThe: ' ou le ', http3CloudflareQuicheProject: 'projet Cloudflare quiche', diff --git a/src/nginxconfig/i18n/fr/templates/domain_sections/index.js b/src/nginxconfig/i18n/fr/templates/domain_sections/index.js index a6da9ab9..8549b319 100644 --- a/src/nginxconfig/i18n/fr/templates/domain_sections/index.js +++ b/src/nginxconfig/i18n/fr/templates/domain_sections/index.js @@ -35,4 +35,15 @@ import server from './server'; import restrict from './restrict'; import onion from './onion'; -export default { https, logging, php, presets, python, reverseProxy, routing, server, restrict, onion }; +export default { + https, + logging, + php, + presets, + python, + reverseProxy, + routing, + server, + restrict, + onion, +}; diff --git a/src/nginxconfig/i18n/fr/templates/domain_sections/onion.js b/src/nginxconfig/i18n/fr/templates/domain_sections/onion.js index 6290bf9b..48ec04a3 100644 --- a/src/nginxconfig/i18n/fr/templates/domain_sections/onion.js +++ b/src/nginxconfig/i18n/fr/templates/domain_sections/onion.js @@ -29,8 +29,10 @@ const onion = 'Onion'; export default { onion, onionLocation: `Adresse ${onion}`, - provideAnOnionLocationToSetOnionLocationHeader: 'Fournir une adresse Onion pour définir le header Onion-Location pour votre site.', - letsVisitorsKnownOnionServicesIsAvailable: 'Indique aux visiteurs qu\'une version onion du site est disponible pour les navigateurs Tor.', + provideAnOnionLocationToSetOnionLocationHeader: + 'Fournir une adresse Onion pour définir le header Onion-Location pour votre site.', + letsVisitorsKnownOnionServicesIsAvailable: + "Indique aux visiteurs qu'une version onion du site est disponible pour les navigateurs Tor.", learnMoreAboutOnionServices: 'En apprendre plus sur les services Onion', onionLocationExpectedToEndWithOnion: 'Une adresse onion se termine normalement avec `.onion`.', }; diff --git a/src/nginxconfig/i18n/fr/templates/domain_sections/presets.js b/src/nginxconfig/i18n/fr/templates/domain_sections/presets.js index c448d60c..631f4a67 100644 --- a/src/nginxconfig/i18n/fr/templates/domain_sections/presets.js +++ b/src/nginxconfig/i18n/fr/templates/domain_sections/presets.js @@ -26,7 +26,8 @@ THE SOFTWARE. export default { presets: 'Préconfigurations', - itLooksLikeYouCustomisedTheConfig: 'Il semblerait que vous ayez customisé la configuration de ce domaine. Utiliser une nouvelle préconfiguration peut réinitialiser ou changer certains paramètres que vous avez définis.', + itLooksLikeYouCustomisedTheConfig: + 'Il semblerait que vous ayez customisé la configuration de ce domaine. Utiliser une nouvelle préconfiguration peut réinitialiser ou changer certains paramètres que vous avez définis.', frontend: 'Frontend', nodeJs: 'Node.js', singlePageApplication: 'Application monopage', diff --git a/src/nginxconfig/i18n/fr/templates/domain_sections/server.js b/src/nginxconfig/i18n/fr/templates/domain_sections/server.js index afa5e61b..fe8a3d33 100644 --- a/src/nginxconfig/i18n/fr/templates/domain_sections/server.js +++ b/src/nginxconfig/i18n/fr/templates/domain_sections/server.js @@ -28,7 +28,8 @@ export default { domain: 'Domaine', documentRoot: 'Dossier racine', oneOrMoreOtherDomainsAreAlsoNamed: 'Un ou plusieurs autres domaines sont aussi nommés', - thisWillCauseIssuesWithConfigGeneration: 'Cela causera des problèmes lors de la génération de la configuration.', + thisWillCauseIssuesWithConfigGeneration: + 'Cela causera des problèmes lors de la génération de la configuration.', wwwSubdomain: 'Sous-domaine www', cdnSubdomain: 'Sous-domaine CDN', redirectSubdomains: 'Rediriger les sous-domaines', diff --git a/src/nginxconfig/i18n/fr/templates/global_sections/index.js b/src/nginxconfig/i18n/fr/templates/global_sections/index.js index 35eba1d9..22ecb855 100644 --- a/src/nginxconfig/i18n/fr/templates/global_sections/index.js +++ b/src/nginxconfig/i18n/fr/templates/global_sections/index.js @@ -34,4 +34,14 @@ import security from './security'; import tools from './tools'; import docker from './docker'; -export default { https, logging, nginx, performance, python, reverseProxy, security, tools, docker }; +export default { + https, + logging, + nginx, + performance, + python, + reverseProxy, + security, + tools, + docker, +}; diff --git a/src/nginxconfig/i18n/fr/templates/global_sections/performance.js b/src/nginxconfig/i18n/fr/templates/global_sections/performance.js index 40a75f93..acfd86c5 100644 --- a/src/nginxconfig/i18n/fr/templates/global_sections/performance.js +++ b/src/nginxconfig/i18n/fr/templates/global_sections/performance.js @@ -33,7 +33,7 @@ export default { enableGzipCompression: `${common.enable} la compression gzip`, brotliCompression: 'Compression Brotli', enableBrotliCompression: `${common.enable} la compression brotli`, - brotliIsANonStandardModule: 'Brotli n\'est pas un module standard de NGINX, veuillez lire le ', + brotliIsANonStandardModule: "Brotli n'est pas un module standard de NGINX, veuillez lire le ", brotliGoogleNgxBrotliProject: 'projet Google ngx_brotli', brotliForBuildingNginxWithBrotli: ' pour compiler NGINX avec le support Brotli!', expirationForAssets: 'Expiration des assets', diff --git a/src/nginxconfig/i18n/fr/templates/global_sections/tools.js b/src/nginxconfig/i18n/fr/templates/global_sections/tools.js index 52318b17..2a513392 100644 --- a/src/nginxconfig/i18n/fr/templates/global_sections/tools.js +++ b/src/nginxconfig/i18n/fr/templates/global_sections/tools.js @@ -43,10 +43,13 @@ export default { yesImSure: 'Oui, je suis sûr(e)', noCancel: 'Non, annuler', tools: 'Outils', - resetGlobalConfigBody: 'Voulez-vous vraiment réinitialiser toutes les options de configuration globales?', - resetAllDomainsConfigBody: 'Voulez-vous vraiment réinitialiser les configurations de TOUS les domaines?', + resetGlobalConfigBody: + 'Voulez-vous vraiment réinitialiser toutes les options de configuration globales?', + resetAllDomainsConfigBody: + 'Voulez-vous vraiment réinitialiser les configurations de TOUS les domaines?', removeAllDomainsBody: 'Voulez-vous vraiment supprimer les configurations de TOUS les domaines?', - areYouSureYouWantToResetAllConfigurationOptionsForThe: 'Voulez-vous vraiment réinitialiser toutes les options de configuration pour', + areYouSureYouWantToResetAllConfigurationOptionsForThe: + 'Voulez-vous vraiment réinitialiser toutes les options de configuration pour', domain: '?', areYouSureYouWantToRemoveThe: 'Voulez-vous vraiment supprimer', domainConfiguration: '?', diff --git a/src/nginxconfig/i18n/fr/templates/setup_sections/download.js b/src/nginxconfig/i18n/fr/templates/setup_sections/download.js index e1176609..05a95782 100644 --- a/src/nginxconfig/i18n/fr/templates/setup_sections/download.js +++ b/src/nginxconfig/i18n/fr/templates/setup_sections/download.js @@ -32,9 +32,11 @@ export default { directory: 'de votre serveur.', or: 'ou, ', copyBase64StringOfCompressedConfig: 'copiez la configuration compressée et encodée en base64', - pasteItInYourServersCommandLineAndExecute: ', puis collez-la et exécutez-la en ligne de commande sur votre serveur.', + pasteItInYourServersCommandLineAndExecute: + ', puis collez-la et exécutez-la en ligne de commande sur votre serveur.', navigateToYourNginxConfigurationDirectoryOnYourServer: `Sur votre serveur, naviguez vers le dossier de configuration de ${common.nginx}:`, createABackupOfYourCurrentNginxConfiguration: `Créez un backup de votre configuration ${common.nginx} actuelle:`, - extractTheNewCompressedConfigurationArchiveUsingTar: 'Décompressez la nouvelle configuration en utilisant Tar:', + extractTheNewCompressedConfigurationArchiveUsingTar: + 'Décompressez la nouvelle configuration en utilisant Tar:', download: 'Téléchargement', }; diff --git a/src/nginxconfig/i18n/fr/templates/setup_sections/go_live.js b/src/nginxconfig/i18n/fr/templates/setup_sections/go_live.js index 9b39dd39..c586b5c2 100644 --- a/src/nginxconfig/i18n/fr/templates/setup_sections/go_live.js +++ b/src/nginxconfig/i18n/fr/templates/setup_sections/go_live.js @@ -27,7 +27,7 @@ THE SOFTWARE. import common from '../../common'; export default { - letsGoLive: 'C\'est en ligne!', + letsGoLive: "C'est en ligne!", reloadNginxToLoadInYourNewConfiguration: `Relancez ${common.nginx} pour charger la nouvelle configuration:`, - goLive: 'C\'est en ligne!', + goLive: "C'est en ligne!", }; diff --git a/src/nginxconfig/i18n/fr/templates/setup_sections/ssl.js b/src/nginxconfig/i18n/fr/templates/setup_sections/ssl.js index 7fe82f54..bdc3c0b3 100644 --- a/src/nginxconfig/i18n/fr/templates/setup_sections/ssl.js +++ b/src/nginxconfig/i18n/fr/templates/setup_sections/ssl.js @@ -27,7 +27,8 @@ THE SOFTWARE. import common from '../../common'; export default { - generateDiffieHellmanKeysByRunningThisCommandOnYourServer: 'Générez des clefs de Diffie-Hellman en exécutant cette commande sur votre serveur:', + generateDiffieHellmanKeysByRunningThisCommandOnYourServer: + 'Générez des clefs de Diffie-Hellman en exécutant cette commande sur votre serveur:', createACommonAcmeChallengeDirectoryForLetsEncrypt: `Créez un répertoire commun ACME-challenge (pour ${common.letsEncrypt}):`, noAdditionalStepsAreNeededToSetUpSslForNginx: `Aucune étape additionnelle n'est nécessaire pour configurer ${common.ssl} pour ${common.nginx}.`, sslInit: `${common.ssl} init`, diff --git a/src/nginxconfig/i18n/ja/common.js b/src/nginxconfig/i18n/ja/common.js index 17904e6c..d27c60ca 100644 --- a/src/nginxconfig/i18n/ja/common.js +++ b/src/nginxconfig/i18n/ja/common.js @@ -33,7 +33,7 @@ export default { nginx: 'NGINX', http: 'HTTP', https: 'HTTPS', - letsEncrypt: 'Let\'s Encrypt', + letsEncrypt: "Let's Encrypt", python: 'Python', wordPress: 'WordPress', drupal: 'Drupal', diff --git a/src/nginxconfig/i18n/ja/templates/domain_sections/index.js b/src/nginxconfig/i18n/ja/templates/domain_sections/index.js index 070501d5..8bedbae4 100644 --- a/src/nginxconfig/i18n/ja/templates/domain_sections/index.js +++ b/src/nginxconfig/i18n/ja/templates/domain_sections/index.js @@ -35,4 +35,15 @@ import server from './server'; import restrict from './restrict'; import onion from './onion'; -export default { https, logging, php, presets, python, reverseProxy, routing, server, restrict, onion }; +export default { + https, + logging, + php, + presets, + python, + reverseProxy, + routing, + server, + restrict, + onion, +}; diff --git a/src/nginxconfig/i18n/ja/templates/domain_sections/onion.js b/src/nginxconfig/i18n/ja/templates/domain_sections/onion.js index decd6fdb..dec302e2 100644 --- a/src/nginxconfig/i18n/ja/templates/domain_sections/onion.js +++ b/src/nginxconfig/i18n/ja/templates/domain_sections/onion.js @@ -29,8 +29,10 @@ const onion = 'Onion'; export default { onion, onionLocation: `${onion} location`, - provideAnOnionLocationToSetOnionLocationHeader: 'サイトのOnion-Locationヘッダを設定するために、Onion locationアドレスを提供する。', - letsVisitorsKnownOnionServicesIsAvailable: 'これにより、あなたのサイトのオニオンサービス版がTorブラウザで利用可能であることをサイト訪問者に知らせます。', + provideAnOnionLocationToSetOnionLocationHeader: + 'サイトのOnion-Locationヘッダを設定するために、Onion locationアドレスを提供する。', + letsVisitorsKnownOnionServicesIsAvailable: + 'これにより、あなたのサイトのオニオンサービス版がTorブラウザで利用可能であることをサイト訪問者に知らせます。', learnMoreAboutOnionServices: 'Onion サービスについて詳しくはこちら', onionLocationExpectedToEndWithOnion: 'Onion location アドレスは通常 `.onion` で終わります。', }; diff --git a/src/nginxconfig/i18n/ja/templates/domain_sections/presets.js b/src/nginxconfig/i18n/ja/templates/domain_sections/presets.js index 9d3785ac..01e672ef 100644 --- a/src/nginxconfig/i18n/ja/templates/domain_sections/presets.js +++ b/src/nginxconfig/i18n/ja/templates/domain_sections/presets.js @@ -26,7 +26,8 @@ THE SOFTWARE. export default { presets: 'プリセット', - itLooksLikeYouCustomisedTheConfig: 'このドメインの設定をカスタマイズしているようです。新しいプリセットを選択すると、カスタマイズした設定の一部がリセットまたは変更される場合があります。', + itLooksLikeYouCustomisedTheConfig: + 'このドメインの設定をカスタマイズしているようです。新しいプリセットを選択すると、カスタマイズした設定の一部がリセットまたは変更される場合があります。', frontend: 'フロントエンド', nodeJs: 'Node.js', singlePageApplication: 'シングルページアプリケーション(SPA)', diff --git a/src/nginxconfig/i18n/ja/templates/global_sections/index.js b/src/nginxconfig/i18n/ja/templates/global_sections/index.js index e87a3b32..b34c0bfd 100644 --- a/src/nginxconfig/i18n/ja/templates/global_sections/index.js +++ b/src/nginxconfig/i18n/ja/templates/global_sections/index.js @@ -34,4 +34,14 @@ import security from './security'; import tools from './tools'; import docker from './docker'; -export default { https, logging, nginx, performance, python, reverseProxy, security, tools, docker }; +export default { + https, + logging, + nginx, + performance, + python, + reverseProxy, + security, + tools, + docker, +}; diff --git a/src/nginxconfig/i18n/ja/templates/global_sections/tools.js b/src/nginxconfig/i18n/ja/templates/global_sections/tools.js index ad1fb521..fb727a33 100644 --- a/src/nginxconfig/i18n/ja/templates/global_sections/tools.js +++ b/src/nginxconfig/i18n/ja/templates/global_sections/tools.js @@ -46,7 +46,8 @@ export default { resetGlobalConfigBody: 'グローバル設定の全ての設定をリセットします、よろしいですか?', resetAllDomainsConfigBody: '全てのドメインの設定をリセットします、よろしいですか?', removeAllDomainsBody: '全てのドメインを削除します、よろしいですか?', - areYouSureYouWantToResetAllConfigurationOptionsForThe: '次のドメインの設定をリセットします、よろしいですか?', + areYouSureYouWantToResetAllConfigurationOptionsForThe: + '次のドメインの設定をリセットします、よろしいですか?', domain: '', areYouSureYouWantToRemoveThe: '次のドメインの設定を削除します、よろしいですか?', domainConfiguration: '', diff --git a/src/nginxconfig/i18n/ja/templates/setup_sections/download.js b/src/nginxconfig/i18n/ja/templates/setup_sections/download.js index 721a3b36..68963c23 100644 --- a/src/nginxconfig/i18n/ja/templates/setup_sections/download.js +++ b/src/nginxconfig/i18n/ja/templates/setup_sections/download.js @@ -28,13 +28,15 @@ import common from '../../common'; export default { downloadTheGeneratedConfig: '生成された設定ファイルをダウンロードします:', - andUploadItToYourServers: 'そして、ご利用のサーバの以下のディレクトリに設定ファイルを アップロードします', + andUploadItToYourServers: + 'そして、ご利用のサーバの以下のディレクトリに設定ファイルを アップロードします', directory: '。', or: 'もしくは、', copyBase64StringOfCompressedConfig: '設定が圧縮されたbase64文字列をコピーし', pasteItInYourServersCommandLineAndExecute: '、 サーバのコマンドラインにペーストして実行します', navigateToYourNginxConfigurationDirectoryOnYourServer: `サーバの ${common.nginx} の設定ディレクトリへ移動します:`, createABackupOfYourCurrentNginxConfiguration: `現在の ${common.nginx} の設定をバックアップします:`, - extractTheNewCompressedConfigurationArchiveUsingTar: 'tar を使って、新しい設定の入った圧縮ファイルを展開します:', + extractTheNewCompressedConfigurationArchiveUsingTar: + 'tar を使って、新しい設定の入った圧縮ファイルを展開します:', download: 'ダウンロード', }; diff --git a/src/nginxconfig/i18n/ja/templates/setup_sections/ssl.js b/src/nginxconfig/i18n/ja/templates/setup_sections/ssl.js index ff3a2fd0..cb4c0600 100644 --- a/src/nginxconfig/i18n/ja/templates/setup_sections/ssl.js +++ b/src/nginxconfig/i18n/ja/templates/setup_sections/ssl.js @@ -27,7 +27,8 @@ THE SOFTWARE. import common from '../../common'; export default { - generateDiffieHellmanKeysByRunningThisCommandOnYourServer: 'サーバでこのコマンドを実行して Diffie-Hellman keys を生成します:', + generateDiffieHellmanKeysByRunningThisCommandOnYourServer: + 'サーバでこのコマンドを実行して Diffie-Hellman keys を生成します:', createACommonAcmeChallengeDirectoryForLetsEncrypt: `共通の ACME-challenge ディレクトリを作成します (${common.letsEncrypt} の場合):`, noAdditionalStepsAreNeededToSetUpSslForNginx: `${common.ssl} を ${common.nginx} の構成に設定するための追加の手順は必要ありません。`, sslInit: `${common.ssl} 初期設定`, diff --git a/src/nginxconfig/i18n/pl/common.js b/src/nginxconfig/i18n/pl/common.js index 0a4dd27c..b7eacfe7 100644 --- a/src/nginxconfig/i18n/pl/common.js +++ b/src/nginxconfig/i18n/pl/common.js @@ -33,7 +33,7 @@ export default { nginx: 'NGINX', http: 'HTTP', https: 'HTTPS', - letsEncrypt: 'Let\'s Encrypt', + letsEncrypt: "Let's Encrypt", python: 'Python', wordPress: 'WordPress', drupal: 'Drupal', diff --git a/src/nginxconfig/i18n/pl/templates/callouts/contribute.js b/src/nginxconfig/i18n/pl/templates/callouts/contribute.js index c7d2b987..43d5ffb4 100644 --- a/src/nginxconfig/i18n/pl/templates/callouts/contribute.js +++ b/src/nginxconfig/i18n/pl/templates/callouts/contribute.js @@ -25,6 +25,7 @@ THE SOFTWARE. */ export default { - wantToContributeChanges: '👋 Chcesz zapropnować nowe funkcje, wprowadzić zmiany lub przetłumaczyć narzędzie na inny język?', + wantToContributeChanges: + '👋 Chcesz zapropnować nowe funkcje, wprowadzić zmiany lub przetłumaczyć narzędzie na inny język?', getInvolvedOnGitHub: 'Zaangażuj się na GitHub', }; diff --git a/src/nginxconfig/i18n/pl/templates/domain_sections/index.js b/src/nginxconfig/i18n/pl/templates/domain_sections/index.js index a6da9ab9..8549b319 100644 --- a/src/nginxconfig/i18n/pl/templates/domain_sections/index.js +++ b/src/nginxconfig/i18n/pl/templates/domain_sections/index.js @@ -35,4 +35,15 @@ import server from './server'; import restrict from './restrict'; import onion from './onion'; -export default { https, logging, php, presets, python, reverseProxy, routing, server, restrict, onion }; +export default { + https, + logging, + php, + presets, + python, + reverseProxy, + routing, + server, + restrict, + onion, +}; diff --git a/src/nginxconfig/i18n/pl/templates/domain_sections/onion.js b/src/nginxconfig/i18n/pl/templates/domain_sections/onion.js index 1ad49aa9..a9b6898c 100644 --- a/src/nginxconfig/i18n/pl/templates/domain_sections/onion.js +++ b/src/nginxconfig/i18n/pl/templates/domain_sections/onion.js @@ -29,8 +29,10 @@ const onion = 'Onion'; export default { onion, onionLocation: `lokalizacja ${onion}`, - provideAnOnionLocationToSetOnionLocationHeader: 'Podaj adres lokalizacji onion aby ustawić nagłówek Onion-Location dla Twojej strony.', - letsVisitorsKnownOnionServicesIsAvailable: 'Inforuje Twoich odiwedzających, że dostępna jest wersja onion Twojego serwisu dla przeglądarek Tor.', + provideAnOnionLocationToSetOnionLocationHeader: + 'Podaj adres lokalizacji onion aby ustawić nagłówek Onion-Location dla Twojej strony.', + letsVisitorsKnownOnionServicesIsAvailable: + 'Inforuje Twoich odiwedzających, że dostępna jest wersja onion Twojego serwisu dla przeglądarek Tor.', learnMoreAboutOnionServices: 'Dowiedz się więcej o serwisach Onion', onionLocationExpectedToEndWithOnion: 'Adres lokalizacji Onion zwykle kończy się na `.onion`.', }; diff --git a/src/nginxconfig/i18n/pl/templates/domain_sections/presets.js b/src/nginxconfig/i18n/pl/templates/domain_sections/presets.js index ba15ad3c..acfb2df2 100644 --- a/src/nginxconfig/i18n/pl/templates/domain_sections/presets.js +++ b/src/nginxconfig/i18n/pl/templates/domain_sections/presets.js @@ -26,7 +26,8 @@ THE SOFTWARE. export default { presets: 'Ustawienia wstępne', - itLooksLikeYouCustomisedTheConfig: 'Wygląda na to, że dostosowałeś konfigurację dla tej domeny. Wybranie nowego ustawienia wstępnego może spowodować zresetowanie lub zmianę niektórych dostosowanych ustawień.', + itLooksLikeYouCustomisedTheConfig: + 'Wygląda na to, że dostosowałeś konfigurację dla tej domeny. Wybranie nowego ustawienia wstępnego może spowodować zresetowanie lub zmianę niektórych dostosowanych ustawień.', frontend: 'Frontend', nodeJs: 'Node.js', singlePageApplication: 'Aplikacja Single-page (SPA)', diff --git a/src/nginxconfig/i18n/pl/templates/domain_sections/server.js b/src/nginxconfig/i18n/pl/templates/domain_sections/server.js index 1654da41..7639fcf8 100644 --- a/src/nginxconfig/i18n/pl/templates/domain_sections/server.js +++ b/src/nginxconfig/i18n/pl/templates/domain_sections/server.js @@ -28,7 +28,8 @@ export default { domain: 'Domena', documentRoot: 'Document root', oneOrMoreOtherDomainsAreAlsoNamed: 'Jedna lub więej domen ma również nazwę', - thisWillCauseIssuesWithConfigGeneration: 'Spowoduje to problem z generowaniem pliku konfiguracyjnego.', + thisWillCauseIssuesWithConfigGeneration: + 'Spowoduje to problem z generowaniem pliku konfiguracyjnego.', wwwSubdomain: 'subdomena dla www', cdnSubdomain: 'subdomena dla CDN', redirectSubdomains: 'Przekieruj subdomeny', diff --git a/src/nginxconfig/i18n/pl/templates/footer.js b/src/nginxconfig/i18n/pl/templates/footer.js index 82c8a143..2b3b2bf8 100644 --- a/src/nginxconfig/i18n/pl/templates/footer.js +++ b/src/nginxconfig/i18n/pl/templates/footer.js @@ -27,7 +27,7 @@ THE SOFTWARE. export default { backToTop: 'Wróć na górę', thisToolIs: 'To narzędzie jest', - openSourceOnGitHub: 'open-source\'owane na GitHub', + openSourceOnGitHub: "open-source'owane na GitHub", underThe: 'na', mit: 'licencji MIT', license: '!', diff --git a/src/nginxconfig/i18n/pl/templates/global_sections/index.js b/src/nginxconfig/i18n/pl/templates/global_sections/index.js index 35eba1d9..22ecb855 100644 --- a/src/nginxconfig/i18n/pl/templates/global_sections/index.js +++ b/src/nginxconfig/i18n/pl/templates/global_sections/index.js @@ -34,4 +34,14 @@ import security from './security'; import tools from './tools'; import docker from './docker'; -export default { https, logging, nginx, performance, python, reverseProxy, security, tools, docker }; +export default { + https, + logging, + nginx, + performance, + python, + reverseProxy, + security, + tools, + docker, +}; diff --git a/src/nginxconfig/i18n/pl/templates/global_sections/tools.js b/src/nginxconfig/i18n/pl/templates/global_sections/tools.js index a5484c74..9aecd476 100644 --- a/src/nginxconfig/i18n/pl/templates/global_sections/tools.js +++ b/src/nginxconfig/i18n/pl/templates/global_sections/tools.js @@ -43,10 +43,12 @@ export default { yesImSure: 'Tak, jestem pewien', noCancel: 'Nie, poniechaj', tools: 'Narzędzia', - resetGlobalConfigBody: 'Czy na pewno chcesz zresetować wszystkie opcje konfiguracji w sekcji konfiguracji globalnej?', + resetGlobalConfigBody: + 'Czy na pewno chcesz zresetować wszystkie opcje konfiguracji w sekcji konfiguracji globalnej?', resetAllDomainsConfigBody: 'Czy na pewno chcesz zresetować konfigurację WSZYSTKICH domen?', removeAllDomainsBody: 'Czy na pewno chcesz usunąć WSZYSTKIE konfiguracje domeny?', - areYouSureYouWantToResetAllConfigurationOptionsForThe: 'Czy na pewno chcesz zresetować wszystkie opcje konfiguracji domeny', + areYouSureYouWantToResetAllConfigurationOptionsForThe: + 'Czy na pewno chcesz zresetować wszystkie opcje konfiguracji domeny', domain: '?', areYouSureYouWantToRemoveThe: 'Czy napewno chcesz usunąć konfigurację dla domeny ', domainConfiguration: '?', diff --git a/src/nginxconfig/i18n/pl/templates/setup_sections/download.js b/src/nginxconfig/i18n/pl/templates/setup_sections/download.js index e16ca410..ff5c656e 100644 --- a/src/nginxconfig/i18n/pl/templates/setup_sections/download.js +++ b/src/nginxconfig/i18n/pl/templates/setup_sections/download.js @@ -35,6 +35,7 @@ export default { pasteItInYourServersCommandLineAndExecute: ', wklej go w terminalu na serwerze i uruchom go.', navigateToYourNginxConfigurationDirectoryOnYourServer: `Nawiguj do ścieżki konfiguracyjnej ${common.nginx} na swoim serwerze:`, createABackupOfYourCurrentNginxConfiguration: `Utrwórz kopię zapasową swojego obecnego pliku konfiguracyjnego ${common.nginx}:`, - extractTheNewCompressedConfigurationArchiveUsingTar: 'Wypakuj skompresowane archiwum z konfiguracją, korzystając z tar:', + extractTheNewCompressedConfigurationArchiveUsingTar: + 'Wypakuj skompresowane archiwum z konfiguracją, korzystając z tar:', download: 'Pobierz', }; diff --git a/src/nginxconfig/i18n/pl/templates/setup_sections/ssl.js b/src/nginxconfig/i18n/pl/templates/setup_sections/ssl.js index 0693fb8e..75dab863 100644 --- a/src/nginxconfig/i18n/pl/templates/setup_sections/ssl.js +++ b/src/nginxconfig/i18n/pl/templates/setup_sections/ssl.js @@ -27,7 +27,8 @@ THE SOFTWARE. import common from '../../common'; export default { - generateDiffieHellmanKeysByRunningThisCommandOnYourServer: 'Wygeneruj klucze Diffie-Hellman uruchamiając te komendę na swoim serwerze:', + generateDiffieHellmanKeysByRunningThisCommandOnYourServer: + 'Wygeneruj klucze Diffie-Hellman uruchamiając te komendę na swoim serwerze:', createACommonAcmeChallengeDirectoryForLetsEncrypt: `Utwórz powszechny katalog ACME-challenge (dla ${common.letsEncrypt}):`, noAdditionalStepsAreNeededToSetUpSslForNginx: `Nie potrzeba żadnych dodatkowych kroków dla ${common.ssl} w Twojej konfiguracji ${common.nginx}.`, sslInit: `${common.ssl} init`, diff --git a/src/nginxconfig/i18n/pt-br/common.js b/src/nginxconfig/i18n/pt-br/common.js index b8a8a7b3..11c0ca6f 100644 --- a/src/nginxconfig/i18n/pt-br/common.js +++ b/src/nginxconfig/i18n/pt-br/common.js @@ -33,7 +33,7 @@ export default { nginx: 'NGINX', http: 'HTTP', https: 'HTTPS', - letsEncrypt: 'Let\'s Encrypt', + letsEncrypt: "Let's Encrypt", python: 'Python', wordPress: 'WordPress', drupal: 'Drupal', diff --git a/src/nginxconfig/i18n/pt-br/templates/callouts/contribute.js b/src/nginxconfig/i18n/pt-br/templates/callouts/contribute.js index 75a9e752..d7c4454c 100644 --- a/src/nginxconfig/i18n/pt-br/templates/callouts/contribute.js +++ b/src/nginxconfig/i18n/pt-br/templates/callouts/contribute.js @@ -25,6 +25,7 @@ THE SOFTWARE. */ export default { - wantToContributeChanges: '👋 Want to request new features, contribute changes, or translate the tool into a new language?', // TODO: translate + wantToContributeChanges: + '👋 Want to request new features, contribute changes, or translate the tool into a new language?', // TODO: translate getInvolvedOnGitHub: 'Get involved on GitHub', // TODO: translate }; diff --git a/src/nginxconfig/i18n/pt-br/templates/callouts/droplet.js b/src/nginxconfig/i18n/pt-br/templates/callouts/droplet.js index 676e584d..9118bdbd 100644 --- a/src/nginxconfig/i18n/pt-br/templates/callouts/droplet.js +++ b/src/nginxconfig/i18n/pt-br/templates/callouts/droplet.js @@ -26,5 +26,5 @@ THE SOFTWARE. export default { lookingForAPlaceToDeploy: '👋 Looking for a place to deploy your new configuration?', // TODO: translate - tryOutDigitalOceansDroplet: 'Try out DigitalOcean\'s LEMP Droplet with NGINX', // TODO: translate + tryOutDigitalOceansDroplet: "Try out DigitalOcean's LEMP Droplet with NGINX", // TODO: translate }; diff --git a/src/nginxconfig/i18n/pt-br/templates/domain_sections/https.js b/src/nginxconfig/i18n/pt-br/templates/domain_sections/https.js index 5d1ebef2..00d7f104 100644 --- a/src/nginxconfig/i18n/pt-br/templates/domain_sections/https.js +++ b/src/nginxconfig/i18n/pt-br/templates/domain_sections/https.js @@ -40,7 +40,7 @@ export default { certificationType: 'Tipo de certificação', customCertificate: 'Certificado personalizado', letsEncryptEmail: `E-mail do ${common.letsEncrypt}`, - http3IsANonStandardModule: 'HTTP/3 isn\'t a standard NGINX module, check the ', // TODO: translate + http3IsANonStandardModule: "HTTP/3 isn't a standard NGINX module, check the ", // TODO: translate http3NginxQuicReadme: 'NGINX QUIC readme', // TODO: translate http3OrThe: ' or the ', // TODO: translate http3CloudflareQuicheProject: 'Cloudflare quiche project', // TODO: translate diff --git a/src/nginxconfig/i18n/pt-br/templates/domain_sections/index.js b/src/nginxconfig/i18n/pt-br/templates/domain_sections/index.js index 5b2b8177..bcec501c 100644 --- a/src/nginxconfig/i18n/pt-br/templates/domain_sections/index.js +++ b/src/nginxconfig/i18n/pt-br/templates/domain_sections/index.js @@ -35,4 +35,15 @@ import server from './server'; import restrict from './restrict'; import onion from './onion'; -export default { https, logging, php, presets, python, reverseProxy, routing, server, restrict, onion }; +export default { + https, + logging, + php, + presets, + python, + reverseProxy, + routing, + server, + restrict, + onion, +}; diff --git a/src/nginxconfig/i18n/pt-br/templates/domain_sections/onion.js b/src/nginxconfig/i18n/pt-br/templates/domain_sections/onion.js index 1d1b5096..f14f5686 100644 --- a/src/nginxconfig/i18n/pt-br/templates/domain_sections/onion.js +++ b/src/nginxconfig/i18n/pt-br/templates/domain_sections/onion.js @@ -29,8 +29,10 @@ const onion = 'Onion'; export default { onion, onionLocation: `${onion} location`, // TODO: translate - provideAnOnionLocationToSetOnionLocationHeader: 'Provide an onion location address to set the Onion-Location header for your site.', // TODO: translate - letsVisitorsKnownOnionServicesIsAvailable: 'This lets visitors know that an onion services version of your site is available for Tor browsers.', // TODO: translate + provideAnOnionLocationToSetOnionLocationHeader: + 'Provide an onion location address to set the Onion-Location header for your site.', // TODO: translate + letsVisitorsKnownOnionServicesIsAvailable: + 'This lets visitors know that an onion services version of your site is available for Tor browsers.', // TODO: translate learnMoreAboutOnionServices: 'Learn more about Onion services', // TODO: translate onionLocationExpectedToEndWithOnion: 'Onion location addresses normally end with `.onion`.', // TODO: translate }; diff --git a/src/nginxconfig/i18n/pt-br/templates/domain_sections/presets.js b/src/nginxconfig/i18n/pt-br/templates/domain_sections/presets.js index b3e33806..9c45d1b5 100644 --- a/src/nginxconfig/i18n/pt-br/templates/domain_sections/presets.js +++ b/src/nginxconfig/i18n/pt-br/templates/domain_sections/presets.js @@ -26,7 +26,8 @@ THE SOFTWARE. export default { presets: 'Predefinições', - itLooksLikeYouCustomisedTheConfig: 'Parece que você personalizou a configuração para este domínio. A escolha de uma nova predefinição pode redefinir ou alterar algumas das configurações que você personalizou.', + itLooksLikeYouCustomisedTheConfig: + 'Parece que você personalizou a configuração para este domínio. A escolha de uma nova predefinição pode redefinir ou alterar algumas das configurações que você personalizou.', frontend: 'Frontend', nodeJs: 'Node.js', singlePageApplication: 'Aplicação de página única', diff --git a/src/nginxconfig/i18n/pt-br/templates/domain_sections/server.js b/src/nginxconfig/i18n/pt-br/templates/domain_sections/server.js index c2694d96..dac39c74 100644 --- a/src/nginxconfig/i18n/pt-br/templates/domain_sections/server.js +++ b/src/nginxconfig/i18n/pt-br/templates/domain_sections/server.js @@ -28,7 +28,8 @@ export default { domain: 'Domínio', documentRoot: 'Raiz dos documentos', oneOrMoreOtherDomainsAreAlsoNamed: 'Um ou mais outros domínios também são nomeados', - thisWillCauseIssuesWithConfigGeneration: 'Isso causará problemas com a geração da configuração.', + thisWillCauseIssuesWithConfigGeneration: + 'Isso causará problemas com a geração da configuração.', wwwSubdomain: 'Subdomínio www', cdnSubdomain: 'Subdomínio CDN', redirectSubdomains: 'Redirecionar subdomínios', diff --git a/src/nginxconfig/i18n/pt-br/templates/global_sections/index.js b/src/nginxconfig/i18n/pt-br/templates/global_sections/index.js index 35eba1d9..22ecb855 100644 --- a/src/nginxconfig/i18n/pt-br/templates/global_sections/index.js +++ b/src/nginxconfig/i18n/pt-br/templates/global_sections/index.js @@ -34,4 +34,14 @@ import security from './security'; import tools from './tools'; import docker from './docker'; -export default { https, logging, nginx, performance, python, reverseProxy, security, tools, docker }; +export default { + https, + logging, + nginx, + performance, + python, + reverseProxy, + security, + tools, + docker, +}; diff --git a/src/nginxconfig/i18n/pt-br/templates/global_sections/performance.js b/src/nginxconfig/i18n/pt-br/templates/global_sections/performance.js index abbb9ad8..f6dd1f01 100644 --- a/src/nginxconfig/i18n/pt-br/templates/global_sections/performance.js +++ b/src/nginxconfig/i18n/pt-br/templates/global_sections/performance.js @@ -27,13 +27,13 @@ THE SOFTWARE. import common from '../../common'; export default { - disableHtmlCaching: 'Disable HTML caching', // TODO: translate - enableDisableHtmlCaching: 'disable HTML caching', // TODO: translate + disableHtmlCaching: 'Disable HTML caching', // TODO: translate + enableDisableHtmlCaching: 'disable HTML caching', // TODO: translate gzipCompression: 'Compressão Gzip', enableGzipCompression: `${common.enable} compressão gzip`, brotliCompression: 'Compressão Brotli', enableBrotliCompression: `${common.enable} compressão brotli`, - brotliIsANonStandardModule: 'Brotli isn\'t a standard NGINX module, check the ', // TODO: translate + brotliIsANonStandardModule: "Brotli isn't a standard NGINX module, check the ", // TODO: translate brotliGoogleNgxBrotliProject: 'Google ngx_brotli project', // TODO: translate brotliForBuildingNginxWithBrotli: ' for how to build NGINX with Brotli!', // TODO: translate expirationForAssets: 'Expiração de ativos', diff --git a/src/nginxconfig/i18n/pt-br/templates/global_sections/tools.js b/src/nginxconfig/i18n/pt-br/templates/global_sections/tools.js index be2b8a60..c77194fd 100644 --- a/src/nginxconfig/i18n/pt-br/templates/global_sections/tools.js +++ b/src/nginxconfig/i18n/pt-br/templates/global_sections/tools.js @@ -43,10 +43,13 @@ export default { yesImSure: 'Sim, tenho certeza', noCancel: 'Não, cancelar', tools: 'Ferramentas', - resetGlobalConfigBody: 'Tem certeza de que deseja redefinir todas as opções de configuração na seção de configuração global?', - resetAllDomainsConfigBody: 'Tem certeza de que deseja redefinir a configuração de TODOS os domínios?', + resetGlobalConfigBody: + 'Tem certeza de que deseja redefinir todas as opções de configuração na seção de configuração global?', + resetAllDomainsConfigBody: + 'Tem certeza de que deseja redefinir a configuração de TODOS os domínios?', removeAllDomainsBody: 'Tem certeza de que deseja remover TODAS as configurações de domínio?', - areYouSureYouWantToResetAllConfigurationOptionsForThe: 'Tem certeza de que deseja redefinir todas as opções de configuração para o', + areYouSureYouWantToResetAllConfigurationOptionsForThe: + 'Tem certeza de que deseja redefinir todas as opções de configuração para o', domain: 'domínio?', areYouSureYouWantToRemoveThe: 'Tem certeza de que deseja remover a ', domainConfiguration: 'configuração do domínio?', diff --git a/src/nginxconfig/i18n/pt-br/templates/setup_sections/download.js b/src/nginxconfig/i18n/pt-br/templates/setup_sections/download.js index 2aab5ccf..850485a5 100644 --- a/src/nginxconfig/i18n/pt-br/templates/setup_sections/download.js +++ b/src/nginxconfig/i18n/pt-br/templates/setup_sections/download.js @@ -32,9 +32,11 @@ export default { directory: 'diretórioi do seu servidor.', or: 'ou, ', copyBase64StringOfCompressedConfig: 'Copie uma string base64 da configuração compactado', - pasteItInYourServersCommandLineAndExecute: ', cole-a na linha de comando do seu servidor e execute-a.', + pasteItInYourServersCommandLineAndExecute: + ', cole-a na linha de comando do seu servidor e execute-a.', navigateToYourNginxConfigurationDirectoryOnYourServer: `Navegue até o diretório de configuração do ${common.nginx} em seu servidor:`, createABackupOfYourCurrentNginxConfiguration: `Crie um backup da sua configuração atual do ${common.nginx}:`, - extractTheNewCompressedConfigurationArchiveUsingTar: 'Extraia o novo arquivo de configuração compactado usando tar:', + extractTheNewCompressedConfigurationArchiveUsingTar: + 'Extraia o novo arquivo de configuração compactado usando tar:', download: 'Baixar', }; diff --git a/src/nginxconfig/i18n/pt-br/templates/setup_sections/ssl.js b/src/nginxconfig/i18n/pt-br/templates/setup_sections/ssl.js index 01a0ba87..4146cfc3 100644 --- a/src/nginxconfig/i18n/pt-br/templates/setup_sections/ssl.js +++ b/src/nginxconfig/i18n/pt-br/templates/setup_sections/ssl.js @@ -27,7 +27,8 @@ THE SOFTWARE. import common from '../../common'; export default { - generateDiffieHellmanKeysByRunningThisCommandOnYourServer: 'Gere chaves Diffie-Hellman executando este comando em seu servidor:', + generateDiffieHellmanKeysByRunningThisCommandOnYourServer: + 'Gere chaves Diffie-Hellman executando este comando em seu servidor:', createACommonAcmeChallengeDirectoryForLetsEncrypt: `Crie um diretório comum ACME-challenge (para o ${common.letsEncrypt}):`, noAdditionalStepsAreNeededToSetUpSslForNginx: `Nenhuma etapa adicional é necessária para configurar o ${common.ssl} para a sua configuração ${common.nginx}.`, sslInit: `${common.ssl} init`, diff --git a/src/nginxconfig/i18n/ru/common.js b/src/nginxconfig/i18n/ru/common.js index 2feeb03b..fbb9e0f7 100644 --- a/src/nginxconfig/i18n/ru/common.js +++ b/src/nginxconfig/i18n/ru/common.js @@ -33,7 +33,7 @@ export default { nginx: 'NGINX', http: 'HTTP', https: 'HTTPS', - letsEncrypt: 'Let\'s Encrypt', + letsEncrypt: "Let's Encrypt", python: 'Python', wordPress: 'WordPress', drupal: 'Drupal', diff --git a/src/nginxconfig/i18n/ru/templates/callouts/contribute.js b/src/nginxconfig/i18n/ru/templates/callouts/contribute.js index b7916c2c..ee434f20 100644 --- a/src/nginxconfig/i18n/ru/templates/callouts/contribute.js +++ b/src/nginxconfig/i18n/ru/templates/callouts/contribute.js @@ -25,6 +25,7 @@ THE SOFTWARE. */ export default { - wantToContributeChanges: '👋 Хотите запросить новые функции, внести изменения или перевести инструмент на новый язык?', + wantToContributeChanges: + '👋 Хотите запросить новые функции, внести изменения или перевести инструмент на новый язык?', getInvolvedOnGitHub: 'Посмотреть на GitHub', }; diff --git a/src/nginxconfig/i18n/ru/templates/domain_sections/index.js b/src/nginxconfig/i18n/ru/templates/domain_sections/index.js index 5b2b8177..bcec501c 100644 --- a/src/nginxconfig/i18n/ru/templates/domain_sections/index.js +++ b/src/nginxconfig/i18n/ru/templates/domain_sections/index.js @@ -35,4 +35,15 @@ import server from './server'; import restrict from './restrict'; import onion from './onion'; -export default { https, logging, php, presets, python, reverseProxy, routing, server, restrict, onion }; +export default { + https, + logging, + php, + presets, + python, + reverseProxy, + routing, + server, + restrict, + onion, +}; diff --git a/src/nginxconfig/i18n/ru/templates/domain_sections/presets.js b/src/nginxconfig/i18n/ru/templates/domain_sections/presets.js index b623f842..0005f67f 100644 --- a/src/nginxconfig/i18n/ru/templates/domain_sections/presets.js +++ b/src/nginxconfig/i18n/ru/templates/domain_sections/presets.js @@ -26,7 +26,8 @@ THE SOFTWARE. export default { presets: 'Пресеты', - itLooksLikeYouCustomisedTheConfig: 'Похоже, вы уже настроили конфигурацию для этого домена. Выбор нового пресета может привести к сбросу или изменению некоторых настроек, которые Вы настроили ранее.', + itLooksLikeYouCustomisedTheConfig: + 'Похоже, вы уже настроили конфигурацию для этого домена. Выбор нового пресета может привести к сбросу или изменению некоторых настроек, которые Вы настроили ранее.', frontend: 'Фронтенд', nodeJs: 'Node.js', singlePageApplication: 'Одностраничное приложение', diff --git a/src/nginxconfig/i18n/ru/templates/global_sections/index.js b/src/nginxconfig/i18n/ru/templates/global_sections/index.js index 7653a47e..3d3432f9 100644 --- a/src/nginxconfig/i18n/ru/templates/global_sections/index.js +++ b/src/nginxconfig/i18n/ru/templates/global_sections/index.js @@ -34,4 +34,14 @@ import security from './security'; import tools from './tools'; import docker from './docker'; -export default { https, logging, nginx, performance, python, reverseProxy, security, tools, docker }; +export default { + https, + logging, + nginx, + performance, + python, + reverseProxy, + security, + tools, + docker, +}; diff --git a/src/nginxconfig/i18n/ru/templates/global_sections/performance.js b/src/nginxconfig/i18n/ru/templates/global_sections/performance.js index 95f8c7e3..fd8323c0 100644 --- a/src/nginxconfig/i18n/ru/templates/global_sections/performance.js +++ b/src/nginxconfig/i18n/ru/templates/global_sections/performance.js @@ -33,7 +33,7 @@ export default { enableGzipCompression: `${common.enable} gzip сжатие`, brotliCompression: 'Brotli сжатие', enableBrotliCompression: `${common.enable} brotli сжатие`, - brotliIsANonStandardModule: 'Brotli isn\'t a standard NGINX module, check the ', // TODO: translate + brotliIsANonStandardModule: "Brotli isn't a standard NGINX module, check the ", // TODO: translate brotliGoogleNgxBrotliProject: 'Google ngx_brotli project', // TODO: translate brotliForBuildingNginxWithBrotli: ' for how to build NGINX with Brotli!', // TODO: translate expirationForAssets: 'Истечение срока для ассетов', diff --git a/src/nginxconfig/i18n/ru/templates/global_sections/tools.js b/src/nginxconfig/i18n/ru/templates/global_sections/tools.js index 32a58b7c..5be1a451 100644 --- a/src/nginxconfig/i18n/ru/templates/global_sections/tools.js +++ b/src/nginxconfig/i18n/ru/templates/global_sections/tools.js @@ -43,10 +43,12 @@ export default { yesImSure: 'Да, я уверен', noCancel: 'Нет, отменить', tools: 'Инструменты', - resetGlobalConfigBody: 'Вы уверены, что хотите сбросить все параметры конфигурации в разделе глобальной конфигурации?', + resetGlobalConfigBody: + 'Вы уверены, что хотите сбросить все параметры конфигурации в разделе глобальной конфигурации?', resetAllDomainsConfigBody: 'Вы уверены, что хотите сбросить конфигурацию ВСЕХ доменов?', removeAllDomainsBody: 'Вы действительно хотите удалить ВСЕ конфигурации домена?', - areYouSureYouWantToResetAllConfigurationOptionsForThe: 'Вы действительно хотите сбросить все параметры конфигурации для', + areYouSureYouWantToResetAllConfigurationOptionsForThe: + 'Вы действительно хотите сбросить все параметры конфигурации для', domain: 'домена?', areYouSureYouWantToRemoveThe: 'Вы уверены, что желаете удалить ', domainConfiguration: 'конфигурацию домена?', diff --git a/src/nginxconfig/i18n/ru/templates/setup_sections/download.js b/src/nginxconfig/i18n/ru/templates/setup_sections/download.js index e957a67b..0ea63364 100644 --- a/src/nginxconfig/i18n/ru/templates/setup_sections/download.js +++ b/src/nginxconfig/i18n/ru/templates/setup_sections/download.js @@ -32,9 +32,11 @@ export default { directory: 'директория.', or: 'или, ', copyBase64StringOfCompressedConfig: 'Скопируйте Base64 c сжатой конфигурацией', - pasteItInYourServersCommandLineAndExecute: ', вставьте это в Вашу командную строку на сервере и запустите.', + pasteItInYourServersCommandLineAndExecute: + ', вставьте это в Вашу командную строку на сервере и запустите.', navigateToYourNginxConfigurationDirectoryOnYourServer: `Перейдите в папку конфигурации ${common.nginx} на Вашем сервере:`, createABackupOfYourCurrentNginxConfiguration: `Сделайте резервную копию Вашей нынешней ${common.nginx} конфигурации:`, - extractTheNewCompressedConfigurationArchiveUsingTar: 'Извлеките архив с новой конфигурацией с помощью использованием tar:', + extractTheNewCompressedConfigurationArchiveUsingTar: + 'Извлеките архив с новой конфигурацией с помощью использованием tar:', download: 'Скачать', }; diff --git a/src/nginxconfig/i18n/ru/templates/setup_sections/ssl.js b/src/nginxconfig/i18n/ru/templates/setup_sections/ssl.js index 3d39c393..f17da79b 100644 --- a/src/nginxconfig/i18n/ru/templates/setup_sections/ssl.js +++ b/src/nginxconfig/i18n/ru/templates/setup_sections/ssl.js @@ -27,7 +27,8 @@ THE SOFTWARE. import common from '../../common'; export default { - generateDiffieHellmanKeysByRunningThisCommandOnYourServer: 'Сгенерируйте ключи Диффи-Хеллмана, запустив следующую команду на своем сервере:', + generateDiffieHellmanKeysByRunningThisCommandOnYourServer: + 'Сгенерируйте ключи Диффи-Хеллмана, запустив следующую команду на своем сервере:', createACommonAcmeChallengeDirectoryForLetsEncrypt: `Создайте директорию хранения ACME-challenge (для ${common.letsEncrypt}):`, noAdditionalStepsAreNeededToSetUpSslForNginx: `Больше ничего не требуется, чтобы настроить ${common.ssl} в Вашей ${common.nginx} конфигурации.`, sslInit: `${common.ssl} init`, diff --git a/src/nginxconfig/i18n/setup.js b/src/nginxconfig/i18n/setup.js index d9f0c40c..ad1cdc8c 100644 --- a/src/nginxconfig/i18n/setup.js +++ b/src/nginxconfig/i18n/setup.js @@ -62,7 +62,7 @@ export const getI18n = async () => { return i18n; }; -const loadLanguagePack = async pack => { +const loadLanguagePack = async (pack) => { // If same language, do nothing if (i18n.locale === pack) return; @@ -79,7 +79,7 @@ const loadLanguagePack = async pack => { i18nPacks[pack] = packData; }; -export const setLanguagePack = async pack => { +export const setLanguagePack = async (pack) => { // If i18n not loaded, do nothing if (!i18n) return; diff --git a/src/nginxconfig/i18n/verify.js b/src/nginxconfig/i18n/verify.js index b5c386ca..b60436ec 100644 --- a/src/nginxconfig/i18n/verify.js +++ b/src/nginxconfig/i18n/verify.js @@ -32,7 +32,7 @@ import { defaultPack, availablePacks, toSep, fromSep } from '../util/language_pa import snakeToCamel from '../util/snake_to_camel'; // Recursively get all keys in a i18n pack object fragment -const explore = packFragment => { +const explore = (packFragment) => { const foundKeys = new Set(); for (const [key, value] of Object.entries(packFragment)) { @@ -43,17 +43,19 @@ const explore = packFragment => { } // Otherwise, assume this is another fragment and explore it recursively - explore(packFragment[key]).forEach(exploreKey => foundKeys.add(`${key}.${exploreKey}`)); + explore(packFragment[key]).forEach((exploreKey) => foundKeys.add(`${key}.${exploreKey}`)); } return foundKeys; }; // Recursively get all the files in a i18n pack directory -const files = directory => { +const files = (directory) => { const foundFiles = new Set(); - for (const dirent of readdirSync(new URL(`./${directory}`, import.meta.url), { withFileTypes: true })) { + for (const dirent of readdirSync(new URL(`./${directory}`, import.meta.url), { + withFileTypes: true, + })) { const base = join(directory, dirent.name); // If this is a file, store it @@ -64,7 +66,7 @@ const files = directory => { // If this is a directory, recurse if (dirent.isDirectory()) { - files(base).forEach(recurseFile => foundFiles.add(recurseFile)); + files(base).forEach((recurseFile) => foundFiles.add(recurseFile)); } // Otherwise, ignore this @@ -74,7 +76,7 @@ const files = directory => { }; // Get all the todo items in a file -const todos = file => { +const todos = (file) => { const content = readFileSync(new URL(`./${file}`, import.meta.url), 'utf8'); const lines = content.split('\n'); const items = []; @@ -89,22 +91,31 @@ const todos = file => { }; // Convert a pack file to a pack object key -const fileToObject = file => file - // Drop language pack prefix - .split(sep).slice(1).join(sep) - // Drop js extension - .split('.').slice(0, -1).join('.') - // Replace sep with period and use camelCase - .split(sep).map(dir => snakeToCamel(dir)).join('.'); +const fileToObject = (file) => + file + // Drop language pack prefix + .split(sep) + .slice(1) + .join(sep) + // Drop js extension + .split('.') + .slice(0, -1) + .join('.') + // Replace sep with period and use camelCase + .split(sep) + .map((dir) => snakeToCamel(dir)) + .join('.'); const main = async () => { // Load all the packs in const packs = {}; const packDirectories = readdirSync(new URL('./', import.meta.url), { withFileTypes: true }) - .filter(dirent => dirent.isDirectory()) - .map(dirent => dirent.name); + .filter((dirent) => dirent.isDirectory()) + .map((dirent) => dirent.name); for (const packDirectory of packDirectories) - packs[fromSep(packDirectory, '-')] = await import(`./${packDirectory}/index.js`).then(pack => pack.default); + packs[fromSep(packDirectory, '-')] = await import(`./${packDirectory}/index.js`).then( + (pack) => pack.default, + ); // Get all the keys for the default "source" language pack const defaultKeys = explore(packs[defaultPack]); @@ -119,43 +130,47 @@ const main = async () => { // Get the base data const packKeys = explore(packData); const packFiles = files(toSep(pack, '-')); - console.log(` Found ${packKeys.size.toLocaleString()} keys, ${packFiles.size.toLocaleString()} files`); + console.log( + ` Found ${packKeys.size.toLocaleString()} keys, ${packFiles.size.toLocaleString()} files`, + ); // Track all our errors and warnings - const errors = [], warnings = []; + const errors = [], + warnings = []; // Get all the keys and the set differences - const missingKeys = [...defaultKeys].filter(x => !packKeys.has(x)); - const extraKeys = [...packKeys].filter(x => !defaultKeys.has(x)); + const missingKeys = [...defaultKeys].filter((x) => !packKeys.has(x)); + const extraKeys = [...packKeys].filter((x) => !defaultKeys.has(x)); // Missing keys and extra keys are errors - missingKeys.forEach(key => errors.push(`Missing key \`${key}\``)); - extraKeys.forEach(key => errors.push(`Unexpected key \`${key}\``)); + missingKeys.forEach((key) => errors.push(`Missing key \`${key}\``)); + extraKeys.forEach((key) => errors.push(`Unexpected key \`${key}\``)); // Get all the files in the pack directory - const packKeyFiles = new Set([...packFiles].filter(file => file.split(sep).slice(-1)[0] !== 'index.js')); + const packKeyFiles = new Set( + [...packFiles].filter((file) => file.split(sep).slice(-1)[0] !== 'index.js'), + ); // Get the objects from the pack keys - const packKeyObjects = new Set([...packKeys] - .map(key => key.split('.').slice(0, -1).join('.'))); + const packKeyObjects = new Set( + [...packKeys].map((key) => key.split('.').slice(0, -1).join('.')), + ); // Warn for any files that aren't used as pack objects - [...packKeyFiles].filter(file => !packKeyObjects.has(fileToObject(file))) - .forEach(file => warnings.push(`Unused file \`${file}\``)); + [...packKeyFiles] + .filter((file) => !packKeyObjects.has(fileToObject(file))) + .forEach((file) => warnings.push(`Unused file \`${file}\``)); // Locate any todos in each file as a warning for (const file of packFiles) - todos(file).forEach(todo => warnings.push(`TODO in \`${file}\` on line ${todo[0]}`)); + todos(file).forEach((todo) => warnings.push(`TODO in \`${file}\` on line ${todo[0]}`)); // Output the pack results if (warnings.length) - for (const warning of warnings) - console.warn(` ${chalk.yellow('warning')} ${warning}`); + for (const warning of warnings) console.warn(` ${chalk.yellow('warning')} ${warning}`); if (errors.length) - for (const error of errors) - console.error(` ${chalk.red('error')} ${error}`); - if (!errors.length && !warnings.length) - console.log(` ${chalk.green('No issues')}`); + for (const error of errors) console.error(` ${chalk.red('error')} ${error}`); + if (!errors.length && !warnings.length) console.log(` ${chalk.green('No issues')}`); // If we had errors, script should exit 1 if (errors.length) hadError = true; @@ -166,19 +181,31 @@ const main = async () => { // Check available language packs const packKeys = Object.keys(packs); - const missingPacks = packKeys.filter(x => !availablePacks.includes(x)); - const extraPacks = availablePacks.filter(x => !packKeys.includes(x)); + const missingPacks = packKeys.filter((x) => !availablePacks.includes(x)); + const extraPacks = availablePacks.filter((x) => !packKeys.includes(x)); // Missing packs and extra packs are errors - missingPacks.forEach(pack => console.error(`${chalk.red('error')} Language pack \`${pack}\` not included in \`availablePacks\``)); - extraPacks.forEach(pack => console.error(`${chalk.red('error')} Language pack \`${pack}\` included in \`availablePacks\` but not found`)); + missingPacks.forEach((pack) => + console.error( + `${chalk.red('error')} Language pack \`${pack}\` not included in \`availablePacks\``, + ), + ); + extraPacks.forEach((pack) => + console.error( + `${chalk.red( + 'error', + )} Language pack \`${pack}\` included in \`availablePacks\` but not found`, + ), + ); if (missingPacks.length || extraPacks.length) hadError = true; // Exit 1 if we had errors if (hadError) process.exit(1); }; -main().then(() => {}).catch(err => { - console.error(err); - process.exit(1); -}); +main() + .then(() => {}) + .catch((err) => { + console.error(err); + process.exit(1); + }); diff --git a/src/nginxconfig/i18n/zh-cn/common.js b/src/nginxconfig/i18n/zh-cn/common.js index 579b395a..c26532da 100644 --- a/src/nginxconfig/i18n/zh-cn/common.js +++ b/src/nginxconfig/i18n/zh-cn/common.js @@ -33,7 +33,7 @@ export default { nginx: 'NGINX', http: 'HTTP', https: 'HTTPS', - letsEncrypt: 'Let\'s Encrypt', + letsEncrypt: "Let's Encrypt", python: 'Python', wordPress: 'WordPress', drupal: 'Drupal', diff --git a/src/nginxconfig/i18n/zh-cn/templates/domain_sections/index.js b/src/nginxconfig/i18n/zh-cn/templates/domain_sections/index.js index 5b2b8177..bcec501c 100644 --- a/src/nginxconfig/i18n/zh-cn/templates/domain_sections/index.js +++ b/src/nginxconfig/i18n/zh-cn/templates/domain_sections/index.js @@ -35,4 +35,15 @@ import server from './server'; import restrict from './restrict'; import onion from './onion'; -export default { https, logging, php, presets, python, reverseProxy, routing, server, restrict, onion }; +export default { + https, + logging, + php, + presets, + python, + reverseProxy, + routing, + server, + restrict, + onion, +}; diff --git a/src/nginxconfig/i18n/zh-cn/templates/domain_sections/onion.js b/src/nginxconfig/i18n/zh-cn/templates/domain_sections/onion.js index ec48c22d..ea116882 100644 --- a/src/nginxconfig/i18n/zh-cn/templates/domain_sections/onion.js +++ b/src/nginxconfig/i18n/zh-cn/templates/domain_sections/onion.js @@ -29,8 +29,10 @@ const onion = '洋葱'; export default { onion, onionLocation: `${onion}位置`, - provideAnOnionLocationToSetOnionLocationHeader: '提供一个洋葱位置地址,为您的站点设置洋葱协议头。', - letsVisitorsKnownOnionServicesIsAvailable: '这可以让访问者知道你的网站的洋葱服务版本可用于Tor浏览器。', + provideAnOnionLocationToSetOnionLocationHeader: + '提供一个洋葱位置地址,为您的站点设置洋葱协议头。', + letsVisitorsKnownOnionServicesIsAvailable: + '这可以让访问者知道你的网站的洋葱服务版本可用于Tor浏览器。', learnMoreAboutOnionServices: '了解有关洋葱服务的更多信息', onionLocationExpectedToEndWithOnion: '洋葱位置地址通常以.onion结尾。', }; diff --git a/src/nginxconfig/i18n/zh-cn/templates/domain_sections/presets.js b/src/nginxconfig/i18n/zh-cn/templates/domain_sections/presets.js index 312e7be5..e9343c72 100644 --- a/src/nginxconfig/i18n/zh-cn/templates/domain_sections/presets.js +++ b/src/nginxconfig/i18n/zh-cn/templates/domain_sections/presets.js @@ -26,7 +26,8 @@ THE SOFTWARE. export default { presets: '预设', - itLooksLikeYouCustomisedTheConfig: '看起来您已经为这个站点定制了配置。选择新的预设可能会重置或更改一些您已经定制的设置。', + itLooksLikeYouCustomisedTheConfig: + '看起来您已经为这个站点定制了配置。选择新的预设可能会重置或更改一些您已经定制的设置。', frontend: '前端', nodeJs: 'Node.js', singlePageApplication: '单页面应用', diff --git a/src/nginxconfig/i18n/zh-cn/templates/global_sections/index.js b/src/nginxconfig/i18n/zh-cn/templates/global_sections/index.js index 35eba1d9..22ecb855 100644 --- a/src/nginxconfig/i18n/zh-cn/templates/global_sections/index.js +++ b/src/nginxconfig/i18n/zh-cn/templates/global_sections/index.js @@ -34,4 +34,14 @@ import security from './security'; import tools from './tools'; import docker from './docker'; -export default { https, logging, nginx, performance, python, reverseProxy, security, tools, docker }; +export default { + https, + logging, + nginx, + performance, + python, + reverseProxy, + security, + tools, + docker, +}; diff --git a/src/nginxconfig/i18n/zh-cn/templates/setup_sections/ssl.js b/src/nginxconfig/i18n/zh-cn/templates/setup_sections/ssl.js index 8cc059ed..2c8838ec 100644 --- a/src/nginxconfig/i18n/zh-cn/templates/setup_sections/ssl.js +++ b/src/nginxconfig/i18n/zh-cn/templates/setup_sections/ssl.js @@ -27,7 +27,8 @@ THE SOFTWARE. import common from '../../common'; export default { - generateDiffieHellmanKeysByRunningThisCommandOnYourServer: '在您的服务器上运行此命令生成Diffie-Hellman keys:', + generateDiffieHellmanKeysByRunningThisCommandOnYourServer: + '在您的服务器上运行此命令生成Diffie-Hellman keys:', createACommonAcmeChallengeDirectoryForLetsEncrypt: `创建一个通用的ACME-challenge目录(用于 ${common.letsEncrypt}):`, noAdditionalStepsAreNeededToSetUpSslForNginx: `无需任何操作,即可为您的${common.nginx}完成${common.ssl}配置`, sslInit: `${common.ssl} 初始化`, diff --git a/src/nginxconfig/i18n/zh-tw/common.js b/src/nginxconfig/i18n/zh-tw/common.js index 30228662..be992cac 100644 --- a/src/nginxconfig/i18n/zh-tw/common.js +++ b/src/nginxconfig/i18n/zh-tw/common.js @@ -33,7 +33,7 @@ export default { nginx: 'NGINX', http: 'HTTP', https: 'HTTPS', - letsEncrypt: 'Let\'s Encrypt', + letsEncrypt: "Let's Encrypt", python: 'Python', wordPress: 'WordPress', drupal: 'Drupal', diff --git a/src/nginxconfig/i18n/zh-tw/templates/domain_sections/https.js b/src/nginxconfig/i18n/zh-tw/templates/domain_sections/https.js index 0f12e94f..5f450ecc 100644 --- a/src/nginxconfig/i18n/zh-tw/templates/domain_sections/https.js +++ b/src/nginxconfig/i18n/zh-tw/templates/domain_sections/https.js @@ -42,7 +42,7 @@ export default { letsEncryptEmail: `${common.letsEncrypt} 電子郵件地址`, http3IsANonStandardModule: 'HTTP/3 並不是標準的 NGINX 模組,請查閱 ', http3NginxQuicReadme: 'NGINX QUIC 說明', - http3OrThe: ' 或者 ', + http3OrThe: ' 或者 ', http3CloudflareQuicheProject: 'Cloudflare quiche 專案', http3ForBuildingNginxWithHttp3: '以了解如何建置支援 HTTP/3 的 NGINX !', }; diff --git a/src/nginxconfig/i18n/zh-tw/templates/domain_sections/index.js b/src/nginxconfig/i18n/zh-tw/templates/domain_sections/index.js index 5b2b8177..bcec501c 100644 --- a/src/nginxconfig/i18n/zh-tw/templates/domain_sections/index.js +++ b/src/nginxconfig/i18n/zh-tw/templates/domain_sections/index.js @@ -35,4 +35,15 @@ import server from './server'; import restrict from './restrict'; import onion from './onion'; -export default { https, logging, php, presets, python, reverseProxy, routing, server, restrict, onion }; +export default { + https, + logging, + php, + presets, + python, + reverseProxy, + routing, + server, + restrict, + onion, +}; diff --git a/src/nginxconfig/i18n/zh-tw/templates/domain_sections/onion.js b/src/nginxconfig/i18n/zh-tw/templates/domain_sections/onion.js index ad1a9251..2365fdc2 100644 --- a/src/nginxconfig/i18n/zh-tw/templates/domain_sections/onion.js +++ b/src/nginxconfig/i18n/zh-tw/templates/domain_sections/onion.js @@ -29,8 +29,10 @@ const onion = '洋蔥'; export default { onion, onionLocation: `${onion}位置`, - provideAnOnionLocationToSetOnionLocationHeader: '提供一個洋蔥位址,來為您的網站設定 Onion-Location 標頭。', - letsVisitorsKnownOnionServicesIsAvailable: '這可以讓訪客知道您的網站有可用於 Tor 瀏覽器的洋蔥服務版本。', + provideAnOnionLocationToSetOnionLocationHeader: + '提供一個洋蔥位址,來為您的網站設定 Onion-Location 標頭。', + letsVisitorsKnownOnionServicesIsAvailable: + '這可以讓訪客知道您的網站有可用於 Tor 瀏覽器的洋蔥服務版本。', learnMoreAboutOnionServices: '瞭解有關洋蔥服務的更多資訊', onionLocationExpectedToEndWithOnion: '洋蔥位址通常以 .onion 結尾。', }; diff --git a/src/nginxconfig/i18n/zh-tw/templates/domain_sections/presets.js b/src/nginxconfig/i18n/zh-tw/templates/domain_sections/presets.js index b664efa1..0f3ac2c0 100644 --- a/src/nginxconfig/i18n/zh-tw/templates/domain_sections/presets.js +++ b/src/nginxconfig/i18n/zh-tw/templates/domain_sections/presets.js @@ -26,7 +26,8 @@ THE SOFTWARE. export default { presets: '預設', - itLooksLikeYouCustomisedTheConfig: '您似乎調整過此網域的設定。選擇新的預設可能會重置或更改一些您自訂的設定。', + itLooksLikeYouCustomisedTheConfig: + '您似乎調整過此網域的設定。選擇新的預設可能會重置或更改一些您自訂的設定。', frontend: '前端', nodeJs: 'Node.js', singlePageApplication: 'SPA', diff --git a/src/nginxconfig/i18n/zh-tw/templates/global_sections/index.js b/src/nginxconfig/i18n/zh-tw/templates/global_sections/index.js index 7653a47e..3d3432f9 100644 --- a/src/nginxconfig/i18n/zh-tw/templates/global_sections/index.js +++ b/src/nginxconfig/i18n/zh-tw/templates/global_sections/index.js @@ -34,4 +34,14 @@ import security from './security'; import tools from './tools'; import docker from './docker'; -export default { https, logging, nginx, performance, python, reverseProxy, security, tools, docker }; +export default { + https, + logging, + nginx, + performance, + python, + reverseProxy, + security, + tools, + docker, +}; diff --git a/src/nginxconfig/i18n/zh-tw/templates/setup_sections/ssl.js b/src/nginxconfig/i18n/zh-tw/templates/setup_sections/ssl.js index bf7d4488..2fbc6ef2 100644 --- a/src/nginxconfig/i18n/zh-tw/templates/setup_sections/ssl.js +++ b/src/nginxconfig/i18n/zh-tw/templates/setup_sections/ssl.js @@ -27,7 +27,8 @@ THE SOFTWARE. import common from '../../common'; export default { - generateDiffieHellmanKeysByRunningThisCommandOnYourServer: '在您的伺服器上執行此命令來產生迪菲-赫爾曼密鑰:', + generateDiffieHellmanKeysByRunningThisCommandOnYourServer: + '在您的伺服器上執行此命令來產生迪菲-赫爾曼密鑰:', createACommonAcmeChallengeDirectoryForLetsEncrypt: `建立一個通用的 ACME-challenge 目錄(用於 ${common.letsEncrypt}):`, noAdditionalStepsAreNeededToSetUpSslForNginx: `您的 ${common.nginx} 設定已完成 ${common.ssl} 設定,無須任何操作。`, sslInit: `${common.ssl} 初始化`, diff --git a/src/nginxconfig/mount.js b/src/nginxconfig/mount.js index 483fb39c..cc2f08fd 100644 --- a/src/nginxconfig/mount.js +++ b/src/nginxconfig/mount.js @@ -33,7 +33,7 @@ import { getI18n } from './i18n/setup'; import App from './templates/app'; // Load the i18n languages and run the app -getI18n().then(i18n => { +getI18n().then((i18n) => { const app = createApp(App); app.use(i18n); app.mount('#app'); diff --git a/src/nginxconfig/templates/app.vue b/src/nginxconfig/templates/app.vue index 7f79f1d9..bf1f10a1 100644 --- a/src/nginxconfig/templates/app.vue +++ b/src/nginxconfig/templates/app.vue @@ -30,51 +30,86 @@ THE SOFTWARE. - + -
+
-
+

{{ $t('templates.app.perWebsiteConfig') }}

@@ -93,12 +128,21 @@ THE SOFTWARE.

{{ $t('templates.app.setup') }}

- +
-
+

{{ $t('templates.app.configFiles') }}

-
+
[domain, index]).filter(d => d[0] !== null); + return this.$data.domains + .map((domain, index) => [domain, index]) + .filter((d) => d[0] !== null); }, confFiles() { - return generators(this.$data.domains.filter(d => d !== null), this.$data.global); + return generators( + this.$data.domains.filter((d) => d !== null), + this.$data.global, + ); }, confFilesWithDirectory() { - return Object.entries(this.confFiles).reduce((obj, [ file, content ]) => ({ - ...obj, - [`${this.$data.global.nginx.nginxConfigDirectory.computed}/${file}`]: content, - }), {}); + return Object.entries(this.confFiles).reduce( + (obj, [file, content]) => ({ + ...obj, + [`${this.$data.global.nginx.nginxConfigDirectory.computed}/${file}`]: + content, + }), + {}, + ); }, lang: { get() { return this.$data.global.app.lang.value; }, - set (value) { + set(value) { this.$data.global.app.lang.value = value; this.$data.global.app.lang.computed = value; }, }, i18nPacks() { - return availablePacks.map(pack => ({ - label: this.$t(`languages.${pack}`) + (pack === this.$i18n.locale - ? '' - : ` - ${this.$t(`languages.${pack}`, pack)}`), + return availablePacks.map((pack) => ({ + label: + this.$t(`languages.${pack}`) + + (pack === this.$i18n.locale + ? '' + : ` - ${this.$t(`languages.${pack}`, pack)}`), value: pack, })); }, @@ -241,23 +296,25 @@ THE SOFTWARE. if (!availablePacks.includes(data.value)) data.computed = data.default; // Update the locale - setLanguagePack(data.computed).then(() => { - // Done - info('Language set to', data.computed); - this.$data.languagePrevious = data.computed; - this.$data.languageLoading = false; - - // Analytics - this.languageSetEvent(!interactive); - }).catch((err) => { - // Error - error(`Failed to set language to ${data.computed}`, err); - - // Fallback to last known good - data.value = this.$data.languagePrevious; - data.computed = this.$data.languagePrevious; - this.$data.languageLoading = false; - }); + setLanguagePack(data.computed) + .then(() => { + // Done + info('Language set to', data.computed); + this.$data.languagePrevious = data.computed; + this.$data.languageLoading = false; + + // Analytics + this.languageSetEvent(!interactive); + }) + .catch((err) => { + // Error + error(`Failed to set language to ${data.computed}`, err); + + // Fallback to last known good + data.value = this.$data.languagePrevious; + data.computed = this.$data.languagePrevious; + this.$data.languageLoading = false; + }); }, deep: true, }, @@ -267,10 +324,20 @@ THE SOFTWARE. // Fallback to the window hash if no search query params, from the Angular version of nginxconfig // The config file watcher will handle setting the app as ready const query = window.location.search || window.location.hash.slice(1); - const imported = await importData(query, this.$data.domains, this.$data.global, this.$nextTick); + const imported = await importData( + query, + this.$data.domains, + this.$data.global, + this.$nextTick, + ); // Apply browser language if not specified in query - if (!imported || !imported.global || !imported.global.app || !imported.global.app.lang) { + if ( + !imported || + !imported.global || + !imported.global.app || + !imported.global.app.lang + ) { const language = browserLanguage(availablePacks); if (language) this.lang = language; } @@ -286,14 +353,17 @@ THE SOFTWARE. const changes = Object.entries(data).reduce((prev, current) => { if (current[0] === 'presets') return prev; // Ignore changes from presets if (!isObject(current[1])) return prev; // Ignore non-objects (things that aren't tabs) - prev += Object.keys(current[1]).filter(key => isChanged(current[1][key], current[0], key)).length; + prev += Object.keys(current[1]).filter((key) => + isChanged(current[1][key], current[0], key), + ).length; return prev; }, 0); if (changes) return ` (${changes.toLocaleString()})`; return ''; }, warnings(index) { - if (!Object.prototype.hasOwnProperty.call(this.$refs, `domain-${index}`)) return false; + if (!Object.prototype.hasOwnProperty.call(this.$refs, `domain-${index}`)) + return false; return this.$refs[`domain-${index}`][0].hasWarnings || false; }, add() { @@ -301,9 +371,16 @@ THE SOFTWARE. // Avoid dupe domains let count = 1; - while (this.$data.domains.some(d => d && d.server.domain.computed === data.server.domain.computed)) { + while ( + this.$data.domains.some( + (d) => d && d.server.domain.computed === data.server.domain.computed, + ) + ) { count++; - data.server.domain.computed = data.server.domain.default.replace('.com', `${count}.com`); + data.server.domain.computed = data.server.domain.default.replace( + '.com', + `${count}.com`, + ); } data.server.domain.value = data.server.domain.computed; @@ -317,7 +394,8 @@ THE SOFTWARE. remove(index) { const name = this.$data.domains[index].server.domain.computed; this.$data.domains[index] = null; - if (this.$data.active === index) this.$data.active = this.$data.domains.findIndex(d => d !== null); + if (this.$data.active === index) + this.$data.active = this.$data.domains.findIndex((d) => d !== null); // Analytics this.removeSiteEvent(this.activeDomains.length, name); @@ -329,7 +407,9 @@ THE SOFTWARE. // but with previous as this so that we don't highlight any changes if (!this.$data.ready) { this.$data.confFilesPrevious = this.confFilesWithDirectory; - this.$nextTick(() => { this.$data.ready = true; }); + this.$nextTick(() => { + this.$data.ready = true; + }); } // Do the diff! @@ -344,23 +424,31 @@ THE SOFTWARE. try { // Calculate the diff & highlight after render const diffConf = diff(newConf, oldConf, { - highlightFunction: value => `${value}`, - }); - this.$data.confFilesOutput = Object.entries(diffConf).map(([ file, { name, content } ]) => { - const diffName = name.filter(x => !x.removed).map(x => x.value).join(''); - const diffContent = content.filter(x => !x.removed).map(x => x.value).join(''); - - return [ - diffName, - diffContent, - `${sha2_256(diffName)}-${sha2_256(diffContent)}`, - file, - ]; + highlightFunction: (value) => `${value}`, }); + this.$data.confFilesOutput = Object.entries(diffConf).map( + ([file, { name, content }]) => { + const diffName = name + .filter((x) => !x.removed) + .map((x) => x.value) + .join(''); + const diffContent = content + .filter((x) => !x.removed) + .map((x) => x.value) + .join(''); + + return [ + diffName, + diffContent, + `${sha2_256(diffName)}-${sha2_256(diffContent)}`, + file, + ]; + }, + ); } catch (err) { // If diff generation goes wrong, don't show any diff error('Failed to compute and highlight diff', err); - this.$data.confFilesOutput = Object.entries(newConf).map(([ name, content ]) => { + this.$data.confFilesOutput = Object.entries(newConf).map(([name, content]) => { const safeName = escape(name); const safeContent = escape(content); @@ -374,7 +462,7 @@ THE SOFTWARE. } // Once rendered, begin looking for changes again - this.$nextTick(() => this.$data.confWatcherWaiting = false); + this.$nextTick(() => (this.$data.confWatcherWaiting = false)); }, splitColumnToggle() { this.$data.splitColumn = !this.$data.splitColumn; @@ -420,12 +508,12 @@ THE SOFTWARE. }, getPrismComponent(confName) { switch (confName) { - case '/etc/nginx/Dockerfile': - return 'DockerPrism'; - case '/etc/nginx/docker-compose.yaml': - return 'YamlPrism'; - default: - return 'NginxPrism'; + case '/etc/nginx/Dockerfile': + return 'DockerPrism'; + case '/etc/nginx/docker-compose.yaml': + return 'YamlPrism'; + default: + return 'NginxPrism'; } }, }, diff --git a/src/nginxconfig/templates/callouts/contribute.vue b/src/nginxconfig/templates/callouts/contribute.vue index f060ccdf..459c69ee 100644 --- a/src/nginxconfig/templates/callouts/contribute.vue +++ b/src/nginxconfig/templates/callouts/contribute.vue @@ -25,7 +25,10 @@ THE SOFTWARE. -->