Skip to content

Commit

Permalink
fix broken plugin links (#4156)
Browse files Browse the repository at this point in the history
* fix broken plugin links

* redirect old URLs

---------

Co-authored-by: Thomas Hunter II <tlhunter@datadog.com>
  • Loading branch information
2 people authored and juan-fernandez committed Mar 20, 2024
1 parent 9183f89 commit e148966
Show file tree
Hide file tree
Showing 3 changed files with 123 additions and 51 deletions.
100 changes: 50 additions & 50 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,56 +98,56 @@ tracer.use('pg', {
<h5 id="winston"></h5>
<h3 id="integrations-list">Available Plugins</h3>

* [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)

<h2 id="manual-instrumentation">Manual Instrumentation</h2>

Expand Down
72 changes: 72 additions & 0 deletions docs/add-redirects.sh
Original file line number Diff line number Diff line change
@@ -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 "<meta http-equiv=\"refresh\" content=\"0; URL=./export_.plugins.$i.html\" />" > out/interfaces/plugins.$i.html
done

echo "done."
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down

0 comments on commit e148966

Please sign in to comment.