From e1489660cd8892a867b8cc558997fef6a7959020 Mon Sep 17 00:00:00 2001 From: Ayan Khan Date: Wed, 13 Mar 2024 13:21:46 -0400 Subject: [PATCH] fix broken plugin links (#4156) * fix broken plugin links * redirect old URLs --------- Co-authored-by: Thomas Hunter II --- docs/API.md | 100 +++++++++++++++++++++--------------------- docs/add-redirects.sh | 72 ++++++++++++++++++++++++++++++ docs/package.json | 2 +- 3 files changed, 123 insertions(+), 51 deletions(-) create mode 100755 docs/add-redirects.sh diff --git a/docs/API.md b/docs/API.md index afd8749aab9..a43507f9437 100644 --- a/docs/API.md +++ b/docs/API.md @@ -98,56 +98,56 @@ tracer.use('pg', {

Available Plugins

-* [amqp10](./interfaces/plugins.amqp10.html) -* [amqplib](./interfaces/plugins.amqplib.html) -* [aws-sdk](./interfaces/plugins.aws_sdk.html) -* [bluebird](./interfaces/plugins.bluebird.html) -* [couchbase](./interfaces/plugins.couchbase.html) -* [cucumber](./interfaces/plugins.cucumber.html) -* [bunyan](./interfaces/plugins.bunyan.html) -* [cassandra-driver](./interfaces/plugins.cassandra_driver.html) -* [connect](./interfaces/plugins.connect.html) -* [dns](./interfaces/plugins.dns.html) -* [elasticsearch](./interfaces/plugins.elasticsearch.html) -* [express](./interfaces/plugins.express.html) -* [fastify](./interfaces/plugins.fastify.html) -* [fetch](./interfaces/plugins.fetch.html) -* [generic-pool](./interfaces/plugins.generic_pool.html) -* [google-cloud-pubsub](./interfaces/plugins.google_cloud_pubsub.html) -* [graphql](./interfaces/plugins.graphql.html) -* [grpc](./interfaces/plugins.grpc.html) -* [hapi](./interfaces/plugins.hapi.html) -* [http](./interfaces/plugins.http.html) -* [http2](./interfaces/plugins.http2.html) -* [ioredis](./interfaces/plugins.ioredis.html) -* [jest](./interfaces/plugins.jest.html) -* [kafkajs](./interfaces/plugins.kafkajs.html) -* [knex](./interfaces/plugins.knex.html) -* [koa](./interfaces/plugins.koa.html) -* [ldapjs](./interfaces/plugins.ldapjs.html) -* [mariadb](./interfaces/plugins.mariadb.html) -* [microgateway--core](./interfaces/plugins.microgateway_core.html) -* [mocha](./interfaces/plugins.mocha.html) -* [mongodb-core](./interfaces/plugins.mongodb_core.html) -* [mysql](./interfaces/plugins.mysql.html) -* [mysql2](./interfaces/plugins.mysql2.html) -* [net](./interfaces/plugins.net.html) -* [next](./interfaces/plugins.next.html) -* [opensearch](./interfaces/plugins.opensearch.html) -* [openai](./interfaces/plugins.openai.html) -* [oracledb](./interfaces/plugins.oracledb.html) -* [paperplane](./interfaces/plugins.paperplane.html) -* [pino](./interfaces/plugins.pino.html) -* [pg](./interfaces/plugins.pg.html) -* [promise](./interfaces/plugins.promise.html) -* [promise-js](./interfaces/plugins.promise_js.html) -* [q](./interfaces/plugins.q.html) -* [redis](./interfaces/plugins.redis.html) -* [restify](./interfaces/plugins.restify.html) -* [router](./interfaces/plugins.router.html) -* [tedious](./interfaces/plugins.tedious.html) -* [when](./interfaces/plugins.when.html) -* [winston](./interfaces/plugins.winston.html) +* [amqp10](./interfaces/export_.plugins.amqp10.html) +* [amqplib](./interfaces/export_.plugins.amqplib.html) +* [aws-sdk](./interfaces/export_.plugins.aws_sdk.html) +* [bluebird](./interfaces/export_.plugins.bluebird.html) +* [couchbase](./interfaces/export_.plugins.couchbase.html) +* [cucumber](./interfaces/export_.plugins.cucumber.html) +* [bunyan](./interfaces/export_.plugins.bunyan.html) +* [cassandra-driver](./interfaces/export_.plugins.cassandra_driver.html) +* [connect](./interfaces/export_.plugins.connect.html) +* [dns](./interfaces/export_.plugins.dns.html) +* [elasticsearch](./interfaces/export_.plugins.elasticsearch.html) +* [express](./interfaces/export_.plugins.express.html) +* [fastify](./interfaces/export_.plugins.fastify.html) +* [fetch](./interfaces/export_.plugins.fetch.html) +* [generic-pool](./interfaces/export_.plugins.generic_pool.html) +* [google-cloud-pubsub](./interfaces/export_.plugins.google_cloud_pubsub.html) +* [graphql](./interfaces/export_.plugins.graphql.html) +* [grpc](./interfaces/export_.plugins.grpc.html) +* [hapi](./interfaces/export_.plugins.hapi.html) +* [http](./interfaces/export_.plugins.http.html) +* [http2](./interfaces/export_.plugins.http2.html) +* [ioredis](./interfaces/export_.plugins.ioredis.html) +* [jest](./interfaces/export_.plugins.jest.html) +* [kafkajs](./interfaces/export_.plugins.kafkajs.html) +* [knex](./interfaces/export_.plugins.knex.html) +* [koa](./interfaces/export_.plugins.koa.html) +* [ldapjs](./interfaces/export_.plugins.ldapjs.html) +* [mariadb](./interfaces/export_.plugins.mariadb.html) +* [microgateway--core](./interfaces/export_.plugins.microgateway_core.html) +* [mocha](./interfaces/export_.plugins.mocha.html) +* [mongodb-core](./interfaces/export_.plugins.mongodb_core.html) +* [mysql](./interfaces/export_.plugins.mysql.html) +* [mysql2](./interfaces/export_.plugins.mysql2.html) +* [net](./interfaces/export_.plugins.net.html) +* [next](./interfaces/export_.plugins.next.html) +* [opensearch](./interfaces/export_.plugins.opensearch.html) +* [openai](./interfaces/export_.plugins.openai.html) +* [oracledb](./interfaces/export_.plugins.oracledb.html) +* [paperplane](./interfaces/export_.plugins.paperplane.html) +* [pino](./interfaces/export_.plugins.pino.html) +* [pg](./interfaces/export_.plugins.pg.html) +* [promise](./interfaces/export_.plugins.promise.html) +* [promise-js](./interfaces/export_.plugins.promise_js.html) +* [q](./interfaces/export_.plugins.q.html) +* [redis](./interfaces/export_.plugins.redis.html) +* [restify](./interfaces/export_.plugins.restify.html) +* [router](./interfaces/export_.plugins.router.html) +* [tedious](./interfaces/export_.plugins.tedious.html) +* [when](./interfaces/export_.plugins.when.html) +* [winston](./interfaces/export_.plugins.winston.html)

Manual Instrumentation

diff --git a/docs/add-redirects.sh b/docs/add-redirects.sh new file mode 100755 index 00000000000..b738562979c --- /dev/null +++ b/docs/add-redirects.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash + +# Previously, URLs to plugin pages looked like this: +# interfaces/plugins.amqp10.html +# +# Now, with an updated typedoc and updated types, they look like this: +# interfaces/export_.plugins.connect.html +# +# This script automatically generates basic HTML files to redirect users who +# visit the old URLs to the new URL. + +echo "writing redirects..." + +declare -a plugins=( + "amqp10" + "amqplib" + "aws_sdk" + "bluebird" + "couchbase" + "cucumber" + "bunyan" + "cassandra_driver" + "connect" + "dns" + "elasticsearch" + "express" + "fastify" + "fetch" + "generic_pool" + "google_cloud_pubsub" + "graphql" + "grpc" + "hapi" + "http" + "http2" + "ioredis" + "jest" + "kafkajs" + "knex" + "koa" + "ldapjs" + "mariadb" + "microgateway_core" + "mocha" + "mongodb_core" + "mysql" + "mysql2" + "net" + "next" + "opensearch" + "openai" + "oracledb" + "paperplane" + "pino" + "pg" + "promise" + "promise_js" + "q" + "redis" + "restify" + "router" + "tedious" + "when" + "winston" +) + +for i in "${plugins[@]}" +do + echo "" > out/interfaces/plugins.$i.html +done + +echo "done." diff --git a/docs/package.json b/docs/package.json index 0a9097621fd..99a2bec2c5e 100644 --- a/docs/package.json +++ b/docs/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "main": "typedoc.js", "scripts": { - "build": "typedoc ../index.d.ts", + "build": "typedoc ../index.d.ts && ./add-redirects.sh", "pretest": "tsc -p . && tsc test", "test": "node test" },