flightdeck 0.0.13 → 0.0.15
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/dist/flightdeck.bin.js +5 -1
- package/dist/lib.js +4 -1
- package/package.json +4 -4
- package/src/flightdeck.bin.ts +1 -0
- package/src/flightdeck.lib.ts +7 -1
package/dist/flightdeck.bin.js
CHANGED
|
@@ -92,8 +92,11 @@ class FlightDeck {
|
|
|
92
92
|
try {
|
|
93
93
|
if (typeof req.url === `undefined`)
|
|
94
94
|
throw 400;
|
|
95
|
-
|
|
95
|
+
const expectedAuthHeader = `Bearer ${secret}`;
|
|
96
|
+
if (authHeader !== `Bearer ${secret}`) {
|
|
97
|
+
this.logger.info(`Unauthorized: needed \`${expectedAuthHeader}\`, got \`${authHeader}\``);
|
|
96
98
|
throw 401;
|
|
99
|
+
}
|
|
97
100
|
const url = new URL(req.url, ORIGIN);
|
|
98
101
|
this.logger.info(req.method, url.pathname);
|
|
99
102
|
switch (req.method) {
|
|
@@ -359,6 +362,7 @@ var parse = cli({
|
|
|
359
362
|
$configPath: FLIGHTDECK_MANUAL,
|
|
360
363
|
schema: SCHEMA_MANUAL
|
|
361
364
|
},
|
|
365
|
+
debugOutput: true,
|
|
362
366
|
discoverConfigPath: (args) => {
|
|
363
367
|
if (args[0] === `schema`) {
|
|
364
368
|
return;
|
package/dist/lib.js
CHANGED
|
@@ -96,8 +96,11 @@ class FlightDeck {
|
|
|
96
96
|
try {
|
|
97
97
|
if (typeof req.url === `undefined`)
|
|
98
98
|
throw 400;
|
|
99
|
-
|
|
99
|
+
const expectedAuthHeader = `Bearer ${secret}`;
|
|
100
|
+
if (authHeader !== `Bearer ${secret}`) {
|
|
101
|
+
this.logger.info(`Unauthorized: needed \`${expectedAuthHeader}\`, got \`${authHeader}\``);
|
|
100
102
|
throw 401;
|
|
103
|
+
}
|
|
101
104
|
const url = new URL(req.url, ORIGIN);
|
|
102
105
|
this.logger.info(req.method, url.pathname);
|
|
103
106
|
switch (req.method) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flightdeck",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jeremy Banka",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"zod": "3.23.8",
|
|
25
25
|
"atom.io": "0.30.0",
|
|
26
|
-
"comline": "0.1.
|
|
26
|
+
"comline": "0.1.4"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@types/node": "22.7.
|
|
29
|
+
"@types/node": "22.7.6",
|
|
30
30
|
"@types/tmp": "0.2.6",
|
|
31
|
-
"bun-types": "1.1.
|
|
31
|
+
"bun-types": "1.1.31",
|
|
32
32
|
"concurrently": "9.0.1",
|
|
33
33
|
"rimraf": "6.0.1",
|
|
34
34
|
"tmp": "0.2.3",
|
package/src/flightdeck.bin.ts
CHANGED
package/src/flightdeck.lib.ts
CHANGED
|
@@ -126,7 +126,13 @@ export class FlightDeck<S extends string = string> {
|
|
|
126
126
|
const authHeader = req.headers.authorization
|
|
127
127
|
try {
|
|
128
128
|
if (typeof req.url === `undefined`) throw 400
|
|
129
|
-
|
|
129
|
+
const expectedAuthHeader = `Bearer ${secret}`
|
|
130
|
+
if (authHeader !== `Bearer ${secret}`) {
|
|
131
|
+
this.logger.info(
|
|
132
|
+
`Unauthorized: needed \`${expectedAuthHeader}\`, got \`${authHeader}\``,
|
|
133
|
+
)
|
|
134
|
+
throw 401
|
|
135
|
+
}
|
|
130
136
|
const url = new URL(req.url, ORIGIN)
|
|
131
137
|
this.logger.info(req.method, url.pathname)
|
|
132
138
|
switch (req.method) {
|