Skip to content

Commit

Permalink
traffic advice
Browse files Browse the repository at this point in the history
  • Loading branch information
PapiOphidian committed Oct 18, 2023
1 parent 5f985c7 commit 653a5fa
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 25 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"build": "turbo run build"
},
"devDependencies": {
"@types/node": "^20.8.6",
"@types/node": "^20.8.7",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"discord-api-types": "0.37.60",
Expand Down
2 changes: 1 addition & 1 deletion packages/listings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"author": "PapiOphidian",
"license": "MIT",
"devDependencies": {
"@types/node-sass": "4.11.5",
"@types/node-sass": "4.11.6",
"node-sass": "^9.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/runtime-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
},
"devDependencies": {
"@types/marked": "6.0.0",
"@types/mime-types": "2.1.2"
"@types/mime-types": "2.1.3"
}
}
18 changes: 18 additions & 0 deletions packages/runtime-website/src/paths/static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,21 @@ const utils: typeof import("../utils") = sync.require("../utils")
server.get("/*", (res, req) => utils.streamFile(req.getUrl(), res, req.getHeader("accept"), req.getHeader("if-modified-since")))

server.get("/", (res, req) => utils.streamFile("index.html", res, req.getHeader("accept"), req.getHeader("if-modified-since")))


// fake fs paths
server.get("/.well-known/traffic-advice", res => {
const data = [{
user_agent: "prefetch-proxy",
google_prefetch_proxy_eap: {
fraction: 1.0
}
}]
const payload = JSON.stringify(data)

res
.writeStatus("200")
.writeHeader("Content-Type", "application/trafficadvice+json") // done because of fancy Content-Type
.writeHeader("Content-Length", String(Buffer.byteLength(payload)))
.end(payload)
})
2 changes: 1 addition & 1 deletion packages/runtime-website/webroot/.well-known/security.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# If you would like to report a security issue
# you may report it either to my Discord (PapiOphidian#0110) or via email
# you may report it either to my Discord (papiophidian) or via email
Contact: mailto:[email protected]
Expires: 2025-01-01T07:00:00.000Z
Preferred-Languages: en
2 changes: 1 addition & 1 deletion packages/sql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"pg": "^8.11.3"
},
"devDependencies": {
"@types/pg": "8.10.5"
"@types/pg": "8.10.6"
}
}
40 changes: 20 additions & 20 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ __metadata:
"@amanda/shared-utils": 1.0.0
"@amanda/sql": 1.0.0
"@types/marked": 6.0.0
"@types/mime-types": 2.1.2
"@types/mime-types": 2.1.3
discord-verify: 1.2.0
lavacord: ^2.1.0-v4
marked: 9.1.2
Expand Down Expand Up @@ -99,7 +99,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@amanda/listings@workspace:packages/listings"
dependencies:
"@types/node-sass": 4.11.5
"@types/node-sass": 4.11.6
node-sass: ^9.0.0
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -137,7 +137,7 @@ __metadata:
dependencies:
"@amanda/config": 1.0.0
"@amanda/shared-utils": 1.0.0
"@types/pg": 8.10.5
"@types/pg": 8.10.6
pg: ^8.11.3
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -796,10 +796,10 @@ __metadata:
languageName: node
linkType: hard

"@types/mime-types@npm:2.1.2":
version: 2.1.2
resolution: "@types/mime-types@npm:2.1.2"
checksum: 9e3c78f1c63211e0450901212566a046da68d4438a5e543333ec9b0be3259bd5d01532734dc51ead40104889b98d12c7663b65212a318aafad3e34c98204e9e1
"@types/mime-types@npm:2.1.3":
version: 2.1.3
resolution: "@types/mime-types@npm:2.1.3"
checksum: 2b39ed5de6ee607b3738a30c54879b439a8344e6f86e50af3b275cfb7165ed4d13e7f9a54971f1de4f759dd68929351741cf31c1c42e380503e53be6970bbf82
languageName: node
linkType: hard

Expand Down Expand Up @@ -834,12 +834,12 @@ __metadata:
languageName: node
linkType: hard

"@types/node-sass@npm:4.11.5":
version: 4.11.5
resolution: "@types/node-sass@npm:4.11.5"
"@types/node-sass@npm:4.11.6":
version: 4.11.6
resolution: "@types/node-sass@npm:4.11.6"
dependencies:
"@types/node": "*"
checksum: 2765c07812b35881b7ae0248712dc65b33e8ef6aaefb3519b68b6ca53e465fa6ca6503fa354baef2794e3fb6be992f7ddea11a9bb67ca31b44327e812348995b
checksum: d3d7f5a8ea909998bdc340ed774e16e58ed394c82ff4d75661584a4ca4cb586d820ec09cf91921c7cbb029835f728195a4368db38b5043d03e5937bbc10c6e2e
languageName: node
linkType: hard

Expand All @@ -857,12 +857,12 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^20.8.6":
version: 20.8.6
resolution: "@types/node@npm:20.8.6"
"@types/node@npm:^20.8.7":
version: 20.8.7
resolution: "@types/node@npm:20.8.7"
dependencies:
undici-types: ~5.25.1
checksum: ccfb7ac482c5a96edeb239893c5c099f5257fcc2ed9ae62fefdfbc782b79e16dbc2af9a85b379665237bf759904b44ca2be68e75d239e0297882aad42f61905c
checksum: 2173c0c03daefcb60c03a61b1371b28c8fe412e7a40dc6646458b809d14a85fbc7aeb369d957d57f0aaaafd99964e77436f29b3b579232d8f2b20c58abbd1d25
languageName: node
linkType: hard

Expand All @@ -873,14 +873,14 @@ __metadata:
languageName: node
linkType: hard

"@types/pg@npm:8.10.5":
version: 8.10.5
resolution: "@types/pg@npm:8.10.5"
"@types/pg@npm:8.10.6":
version: 8.10.6
resolution: "@types/pg@npm:8.10.6"
dependencies:
"@types/node": "*"
pg-protocol: "*"
pg-types: ^4.0.1
checksum: 532a3104ed7898e3c7806e00cbde486dcfc803d2e99e236066f1b675ff0546a1cb232fe6f2ffc60dac81d3df209b69dbe62a597b565bff0965dd622fef957afe
checksum: 5eccb9d74251be219c6a66bc31467e1d12a612353b86bf18899f9e13671178baa83ff695aa7cce3469f851dd898747cd499b8b464c1ca7efd40bec17553f6eb3
languageName: node
linkType: hard

Expand Down Expand Up @@ -1144,7 +1144,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "amanda@workspace:."
dependencies:
"@types/node": ^20.8.6
"@types/node": ^20.8.7
"@typescript-eslint/eslint-plugin": ^6.8.0
"@typescript-eslint/parser": ^6.8.0
cloudstorm: ^0.9.2
Expand Down

0 comments on commit 653a5fa

Please sign in to comment.