@azphalt/mock-backend 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.json +2 -2
- package/src/index.js +3 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azphalt/mock-backend",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"cors": "^2.8.6",
|
|
7
7
|
"express": "^4.22.2",
|
|
8
|
-
"@azphalt/azp": "0.
|
|
8
|
+
"@azphalt/azp": "0.3.0"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"start": "node src/index.js",
|
package/src/index.js
CHANGED
|
@@ -92,7 +92,9 @@ app.get("/packages/:id/versions/:version/download", (req, res) => {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
// Serve the sample package's real .azp bytes.
|
|
95
|
-
|
|
95
|
+
// spec/package-format.md § Media type. `application/x-azphalt` is the deprecated alias a server
|
|
96
|
+
// must no longer send.
|
|
97
|
+
res.setHeader("Content-Type", "application/vnd.azphalt.package");
|
|
96
98
|
res.setHeader("Content-Disposition", `attachment; filename="${pkg.id}-${req.params.version}.azp"`);
|
|
97
99
|
res.send(SAMPLE_AZP);
|
|
98
100
|
});
|