Progmasoft Git

progmaweb

The site and account service of Progmasoft: a Next.js frontend and an ASP.NET Core API.

Clonegit clone https://git.progmasoft.com/progmaweb

Lead the old Tala catalog addresses to the language list

/langs/tala and everything below it, which tala.run and earlier links
still point to, now redirect permanently to the language list of the
ViGet home page, like /langs, instead of answering 404. The README, the
architecture guide and the bug-report template name the C, C++ and
Objective-C catalogs.
Commit
61a2045ee9264e794e4ddf11d7b8b9fdf4109bd3
Author
Leitwolf11 ·
Parents
686189f89c55

Files · Download .tar.gz

Changes

 .github/ISSUE_TEMPLATE/bug_report.md   |  2 +-
 README.md                              |  2 +-
 apps/web/proxy.ts                      | 10 ++++++++--
 apps/web/tests/viget-catalogs.test.mjs |  4 +++-
 docs/ARCHITECTURE.md                   |  3 ++-
 5 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index ace8b98..c40123f 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -17,7 +17,7 @@ This repository owns `progmasoft.com`, `account.progmasoft.com`, and `viget.prog
 
 ### Observed and expected behavior
 
-Describe what happened, what you expected, and any visible status code or safe error message. If the issue involves a package path, distinguish `/langs/tala/<Publisher>/<Name>/` ViPkgs from `/dslplugins/tazel/<Publisher>/<Name>/` JAR plugins; do not attach private packages.
+Describe what happened, what you expected, and any visible status code or safe error message. If the issue involves a package path, distinguish `/langs/<language>/<Publisher>/<Name>/` ViPkgs (`c`, `cpp`, `objc`) from `/dslplugins/tazel/<Publisher>/<Name>/` JAR plugins; do not attach private packages.
 
 ### Reproduction
 
diff --git a/README.md b/README.md
index 229bb7f..adecf60 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ the ASP.NET Core API.
 - `viget.progmasoft.com` shows the state of the registry first, then two groups: LANGUAGES and BUILD SYSTEM DSL PLUGINS.
   An open catalog links to its page; a catalog that is not offered yet is a gray, disabled button.
 - `viget.progmasoft.com/langs/c`, `/langs/cpp` and `/langs/objc` serve the catalogs of C, C++ and Objective-C packages
-  (`.vipkg`; Objective-C++ belongs to `/langs/objc`); `/langs` leads to the language list on the home page.
+  (`.vipkg`; Objective-C++ belongs to `/langs/objc`); `/langs` and the old `/langs/tala` addresses lead to the language list on the home page.
 - `viget.progmasoft.com/dslplugins/tazel` serves the catalog of Kotlin DSL plugins for Tazel; `/dslplugins` leads there.
 
 Account names preserve their original display case but reserve names case-insensitively, preventing visually confusing
diff --git a/apps/web/proxy.ts b/apps/web/proxy.ts
index f82e370..befb0f9 100644
--- a/apps/web/proxy.ts
+++ b/apps/web/proxy.ts
@@ -204,8 +204,14 @@ function route(request: NextRequest, headers: Headers): NextResponse {
         internalRoute(request, "/viget/dslplugins/gradle"),
       );
     }
-    // The languages are listed on the home page of ViGet.
-    if (pathname === "/langs" || pathname === "/langs/") {
+    // The languages are listed on the home page of ViGet. The Tala catalog is
+    // gone with Tala; its old addresses, which tala.run and earlier
+    // documentation link to, lead to the list as well.
+    if (
+      pathname === "/langs" ||
+      pathname === "/langs/" ||
+      /^\/langs\/tala(\/.*)?$/.test(pathname)
+    ) {
       return NextResponse.redirect(
         new URL("https://viget.progmasoft.com/#languages-title"),
         308,
diff --git a/apps/web/tests/viget-catalogs.test.mjs b/apps/web/tests/viget-catalogs.test.mjs
index 6b487f4..d731bdc 100644
--- a/apps/web/tests/viget-catalogs.test.mjs
+++ b/apps/web/tests/viget-catalogs.test.mjs
@@ -83,7 +83,9 @@ test("the ViGet host serves both catalogs and leads the bare groups to them", ()
     proxy,
     /internalRoute\(request, `\/viget\/langs\/\$\{language\[1\]\}`\)/,
   );
-  assert.doesNotMatch(proxy, /langs\/tala/);
+  // The Tala catalog is not served; its old addresses lead to the language list.
+  assert.doesNotMatch(proxy, /viget\/langs\/tala/);
+  assert.match(proxy, /\^\\\/langs\\\/tala\(\\\/\.\*\)\?\$/);
   assert.match(proxy, /internalRoute\(request, "\/viget\/dslplugins\/tazel"\)/);
   assert.match(
     proxy,
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index de5be7b..2668055 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -46,7 +46,8 @@ One build serves three hosts. The host of a request, not a separate deployment,
 2. **Account root.** `/` on the account host is rewritten to the internal `/account` page, so the account landing page
    has the short URL.
 3. **ViGet.** On the ViGet host `/` is rewritten to `/viget`, `/langs/c`, `/langs/cpp` and `/langs/objc` to
-   `/viget/langs/<language>` and `/dslplugins/tazel` to `/viget/dslplugins/tazel`. `/langs` redirects permanently to
+   `/viget/langs/<language>` and `/dslplugins/tazel` to `/viget/dslplugins/tazel`. `/langs` and the old `/langs/tala`
+   addresses redirect permanently to
    the language list of the home page and `/dslplugins` to the Tazel catalog. `/login`, `/register` and `/recover` redirect to the account host.
 4. **Internal trees stay internal.** `/viget/...` on any other host redirects to the ViGet host, and `/account` on any
    other host redirects to the account host.