From 95e72e0745c89f92cc435995088cac9e7044c1ab Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Wed, 8 May 2024 14:53:15 -0400 Subject: [PATCH 1/5] add @types/node dep --- package.json | 5 +++-- pnpm-lock.yaml | 37 ++++++++++++++++++++----------------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 656ca4edcb..2349c14be9 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "license": "Apache-2.0", "devDependencies": { "@playwright/test": "^1.44.0", + "@types/node": "^20.12.11", "@vuepress/bundler-webpack": "2.0.0-rc.9", "@vuepress/plugin-docsearch": "2.0.0-rc.21", "@vuepress/plugin-google-analytics": "2.0.0-rc.21", @@ -9,8 +10,8 @@ "@vuepress/theme-default": "2.0.0-rc.21", "@vuepress/utils": "2.0.0-rc.9", "sass-loader": "14.1.1", - "vuepress": "2.0.0-rc.9", - "vue": "3.4.21" + "vue": "3.4.21", + "vuepress": "2.0.0-rc.9" }, "scripts": { "website:dev": "vuepress dev runatlantis.io", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7ce183f4b4..5acdb3bca0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ devDependencies: '@playwright/test': specifier: ^1.44.0 version: 1.44.0 + '@types/node': + specifier: ^20.12.11 + version: 20.12.11 '@vuepress/bundler-webpack': specifier: 2.0.0-rc.9 version: 2.0.0-rc.9 @@ -644,26 +647,26 @@ packages: resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} dependencies: '@types/connect': 3.4.38 - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/bonjour@3.5.13: resolution: {integrity: sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/connect-history-api-fallback@1.5.4: resolution: {integrity: sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw==} dependencies: '@types/express-serve-static-core': 4.17.43 - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/connect@3.4.38: resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/debug@4.1.12: @@ -693,7 +696,7 @@ packages: /@types/express-serve-static-core@4.17.43: resolution: {integrity: sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.11 '@types/qs': 6.9.14 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -712,7 +715,7 @@ packages: resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==} dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/hash-sum@1.0.2: @@ -730,7 +733,7 @@ packages: /@types/http-proxy@1.17.14: resolution: {integrity: sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/json-schema@7.0.15: @@ -740,7 +743,7 @@ packages: /@types/jsonfile@6.1.4: resolution: {integrity: sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/linkify-it@3.0.5: @@ -779,15 +782,15 @@ packages: /@types/node-forge@1.3.11: resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/node@17.0.45: resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} dev: true - /@types/node@20.11.30: - resolution: {integrity: sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==} + /@types/node@20.12.11: + resolution: {integrity: sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==} dependencies: undici-types: 5.26.5 dev: true @@ -807,14 +810,14 @@ packages: /@types/sax@1.2.7: resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/send@0.17.4: resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==} dependencies: '@types/mime': 1.3.5 - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/serve-index@1.9.4: @@ -828,13 +831,13 @@ packages: dependencies: '@types/http-errors': 2.0.4 '@types/mime': 3.0.4 - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/sockjs@0.3.36: resolution: {integrity: sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/web-bluetooth@0.0.20: @@ -848,7 +851,7 @@ packages: /@types/ws@8.5.10: resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@vue/compiler-core@3.4.21: @@ -3015,7 +3018,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.11 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true From dbf1373cf28b5d2bcc059d076751409614985b48 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Wed, 8 May 2024 14:55:01 -0400 Subject: [PATCH 2/5] rename config.js to config.ts Signed-off-by: Rui Chen --- runatlantis.io/.vuepress/{config.js => config.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename runatlantis.io/.vuepress/{config.js => config.ts} (100%) diff --git a/runatlantis.io/.vuepress/config.js b/runatlantis.io/.vuepress/config.ts similarity index 100% rename from runatlantis.io/.vuepress/config.js rename to runatlantis.io/.vuepress/config.ts From bbf370e7f58271e7f24501c4be0e847249859615 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Wed, 8 May 2024 15:07:18 -0400 Subject: [PATCH 3/5] refactor navbar and sidebar out of config Signed-off-by: Rui Chen --- runatlantis.io/.vuepress/config.ts | 96 ++--------------------------- runatlantis.io/.vuepress/navbar.ts | 8 +++ runatlantis.io/.vuepress/sidebar.ts | 88 ++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 92 deletions(-) create mode 100644 runatlantis.io/.vuepress/navbar.ts create mode 100644 runatlantis.io/.vuepress/sidebar.ts diff --git a/runatlantis.io/.vuepress/config.ts b/runatlantis.io/.vuepress/config.ts index bb7d65949c..7a6d70525b 100644 --- a/runatlantis.io/.vuepress/config.ts +++ b/runatlantis.io/.vuepress/config.ts @@ -5,6 +5,8 @@ import { defaultTheme } from '@vuepress/theme-default'; import { defineUserConfig } from 'vuepress'; import { sitemapPlugin } from '@vuepress/plugin-sitemap'; import { webpackBundler } from '@vuepress/bundler-webpack'; +import * as navbar from "./navbar"; +import * as sidebar from "./sidebar"; const __dirname = getDirname(import.meta.url) @@ -85,12 +87,7 @@ export default defineUserConfig({ locales: { '/': { selectLanguageName: 'English', - navbar: [ - { text: 'Home', link: '/' }, - { text: 'Guide', link: '/guide/' }, - { text: 'Docs', link: '/docs/' }, - { text: 'Blog', link: 'https://medium.com/runatlantis' }, - ], + navbar: navbar.en, }, /* '/es/': { @@ -104,92 +101,7 @@ export default defineUserConfig({ }, */ }, - sidebar: { - '/guide/': [ - '/guide/', - '/guide/test-drive', - '/guide/testing-locally', - ], - '/docs/': [ - { - text: 'Installing Atlantis', - collapsible: true, - children: [ - '/docs/installation-guide', - '/docs/requirements', - '/docs/access-credentials', - '/docs/webhook-secrets', - '/docs/deployment', - '/docs/configuring-webhooks', - '/docs/provider-credentials', - ] - }, - { - text: 'Configuring Atlantis', - collapsible: true, - children: [ - { - text: 'Overview', - link: '/docs/configuring-atlantis', - }, - '/docs/server-configuration', - '/docs/server-side-repo-config', - '/docs/pre-workflow-hooks', - '/docs/post-workflow-hooks', - '/docs/policy-checking', - '/docs/custom-workflows', - '/docs/repo-level-atlantis-yaml', - '/docs/upgrading-atlantis-yaml', - '/docs/command-requirements', - '/docs/checkout-strategy', - '/docs/terraform-versions', - '/docs/terraform-cloud', - '/docs/using-slack-hooks', - '/docs/stats', - '/docs/faq', - ] - }, - { - text: 'Using Atlantis', - collapsible: true, - children: [ - { - text: 'Overview', - link: '/docs/using-atlantis', - }, - '/docs/api-endpoints', - ] - }, - { - text: 'How Atlantis Works', - collapsible: true, - children: [ - { - text: 'Overview', - link: '/docs/how-atlantis-works', - }, - '/docs/locking', - '/docs/autoplanning', - '/docs/automerging', - '/docs/security', - ] - }, - { - text: 'Real-time Terraform Logs', - collapsible: true, - children: [ - '/docs/streaming-logs', - ] - }, - { - text: 'Troubleshooting', - collapsible: true, - children: [ - '/docs/troubleshooting-https', - ] - } - ] - }, + sidebar: sidebar.en, repo: 'runatlantis/atlantis', docsDir: 'runatlantis.io', editLink: true, diff --git a/runatlantis.io/.vuepress/navbar.ts b/runatlantis.io/.vuepress/navbar.ts new file mode 100644 index 0000000000..d7f86e1542 --- /dev/null +++ b/runatlantis.io/.vuepress/navbar.ts @@ -0,0 +1,8 @@ +const en = [ + { text: 'Home', link: '/' }, + { text: 'Guide', link: '/guide/' }, + { text: 'Docs', link: '/docs/' }, + { text: 'Blog', link: 'https://medium.com/runatlantis' }, +]; + +export default { en }; diff --git a/runatlantis.io/.vuepress/sidebar.ts b/runatlantis.io/.vuepress/sidebar.ts new file mode 100644 index 0000000000..67caab55f3 --- /dev/null +++ b/runatlantis.io/.vuepress/sidebar.ts @@ -0,0 +1,88 @@ +const en = { + '/guide/': [ + '/guide/', + '/guide/test-drive', + '/guide/testing-locally', + ], + '/docs/': [ + { + text: 'Installing Atlantis', + collapsible: true, + children: [ + '/docs/installation-guide', + '/docs/requirements', + '/docs/access-credentials', + '/docs/webhook-secrets', + '/docs/deployment', + '/docs/configuring-webhooks', + '/docs/provider-credentials', + ] + }, + { + text: 'Configuring Atlantis', + collapsible: true, + children: [ + { + text: 'Overview', + link: '/docs/configuring-atlantis', + }, + '/docs/server-configuration', + '/docs/server-side-repo-config', + '/docs/pre-workflow-hooks', + '/docs/post-workflow-hooks', + '/docs/policy-checking', + '/docs/custom-workflows', + '/docs/repo-level-atlantis-yaml', + '/docs/upgrading-atlantis-yaml', + '/docs/command-requirements', + '/docs/checkout-strategy', + '/docs/terraform-versions', + '/docs/terraform-cloud', + '/docs/using-slack-hooks', + '/docs/stats', + '/docs/faq', + ] + }, + { + text: 'Using Atlantis', + collapsible: true, + children: [ + { + text: 'Overview', + link: '/docs/using-atlantis', + }, + '/docs/api-endpoints', + ] + }, + { + text: 'How Atlantis Works', + collapsible: true, + children: [ + { + text: 'Overview', + link: '/docs/how-atlantis-works', + }, + '/docs/locking', + '/docs/autoplanning', + '/docs/automerging', + '/docs/security', + ] + }, + { + text: 'Real-time Terraform Logs', + collapsible: true, + children: [ + '/docs/streaming-logs', + ] + }, + { + text: 'Troubleshooting', + collapsible: true, + children: [ + '/docs/troubleshooting-https', + ] + } + ] +}; + +export default { en }; From 745e8e7d02b649f5c8888537f469ba8d538d3888 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Wed, 8 May 2024 15:18:39 -0400 Subject: [PATCH 4/5] update gitignore Signed-off-by: Rui Chen --- .gitignore | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a3040a1ee5..c4439ac8e1 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ output .cover .terraform/ node_modules/ -**/.vuepress/* helm/test-values.yaml *.swp golangci-lint @@ -27,3 +26,9 @@ tmp-CHANGELOG.md # IDE files *.code-workspace + +# vuepress +**/.vuepress/* +!runatlantis.io/.vuepress/config.ts +!runatlantis.io/.vuepress/navbar.ts +!runatlantis.io/.vuepress/sidebar.ts From a78490d332bbc08a50672ae29595b27522bbf589 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Wed, 8 May 2024 15:25:55 -0400 Subject: [PATCH 5/5] docs: refactor navbar and sidebar out of config Signed-off-by: Rui Chen --- .gitignore | 6 +++--- package.json | 1 - pnpm-lock.yaml | 3 --- runatlantis.io/.vuepress/{config.ts => config.js} | 4 ++-- runatlantis.io/.vuepress/{navbar.ts => navbar.js} | 0 runatlantis.io/.vuepress/{sidebar.ts => sidebar.js} | 0 6 files changed, 5 insertions(+), 9 deletions(-) rename runatlantis.io/.vuepress/{config.ts => config.js} (98%) rename runatlantis.io/.vuepress/{navbar.ts => navbar.js} (100%) rename runatlantis.io/.vuepress/{sidebar.ts => sidebar.js} (100%) diff --git a/.gitignore b/.gitignore index c4439ac8e1..3306e4c23b 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,6 @@ tmp-CHANGELOG.md # vuepress **/.vuepress/* -!runatlantis.io/.vuepress/config.ts -!runatlantis.io/.vuepress/navbar.ts -!runatlantis.io/.vuepress/sidebar.ts +!runatlantis.io/.vuepress/config.* +!runatlantis.io/.vuepress/navbar.* +!runatlantis.io/.vuepress/sidebar.* diff --git a/package.json b/package.json index 2349c14be9..e592319d4e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,6 @@ "license": "Apache-2.0", "devDependencies": { "@playwright/test": "^1.44.0", - "@types/node": "^20.12.11", "@vuepress/bundler-webpack": "2.0.0-rc.9", "@vuepress/plugin-docsearch": "2.0.0-rc.21", "@vuepress/plugin-google-analytics": "2.0.0-rc.21", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5acdb3bca0..9b731943df 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,9 +8,6 @@ devDependencies: '@playwright/test': specifier: ^1.44.0 version: 1.44.0 - '@types/node': - specifier: ^20.12.11 - version: 20.12.11 '@vuepress/bundler-webpack': specifier: 2.0.0-rc.9 version: 2.0.0-rc.9 diff --git a/runatlantis.io/.vuepress/config.ts b/runatlantis.io/.vuepress/config.js similarity index 98% rename from runatlantis.io/.vuepress/config.ts rename to runatlantis.io/.vuepress/config.js index 7a6d70525b..fb042ca3c3 100644 --- a/runatlantis.io/.vuepress/config.ts +++ b/runatlantis.io/.vuepress/config.js @@ -5,8 +5,8 @@ import { defaultTheme } from '@vuepress/theme-default'; import { defineUserConfig } from 'vuepress'; import { sitemapPlugin } from '@vuepress/plugin-sitemap'; import { webpackBundler } from '@vuepress/bundler-webpack'; -import * as navbar from "./navbar"; -import * as sidebar from "./sidebar"; +import navbar from "./navbar"; +import sidebar from "./sidebar"; const __dirname = getDirname(import.meta.url) diff --git a/runatlantis.io/.vuepress/navbar.ts b/runatlantis.io/.vuepress/navbar.js similarity index 100% rename from runatlantis.io/.vuepress/navbar.ts rename to runatlantis.io/.vuepress/navbar.js diff --git a/runatlantis.io/.vuepress/sidebar.ts b/runatlantis.io/.vuepress/sidebar.js similarity index 100% rename from runatlantis.io/.vuepress/sidebar.ts rename to runatlantis.io/.vuepress/sidebar.js