@paradisec/proxyist
Advanced tools
Comparing version 0.0.9 to 0.1.0
{ | ||
"name": "@paradisec/proxyist", | ||
"version": "0.0.9", | ||
"version": "0.1.0", | ||
"description": "Filesystem REST API which supports multiple backend plugins", | ||
@@ -22,3 +22,3 @@ "main": "dist/app.js", | ||
"devDependencies": { | ||
"@paradisec/proxyist-adapter-common": "^0.0.9", | ||
"@paradisec/proxyist-adapter-common": "^0.1.0", | ||
"@tsconfig/node18": "^18.2.0", | ||
@@ -53,3 +53,3 @@ "@tsconfig/strictest": "^2.0.1", | ||
], | ||
"gitHead": "5fa7c2da719d2e7dbdbd5a9cdcc48d1c309b4323" | ||
"gitHead": "2b58ffc8db60ef4642dc316be1768c3f52475f16" | ||
} |
@@ -1,2 +0,2 @@ | ||
import type { ProxyistAdapter } from 'proxyist-adapter-common'; | ||
import type { ProxyistAdapter } from '@paradisec/proxyist-adapter-common'; | ||
@@ -3,0 +3,0 @@ declare global { |
@@ -42,9 +42,9 @@ import express from 'express'; | ||
const { ws, promise } = await req.locals.adapter.write(identifier, filename); | ||
const { result, promise } = await req.locals.adapter.write(identifier, filename); | ||
// if (typeof result === 'string') { | ||
// return res.redirect(307, result); | ||
// } | ||
if (typeof result === 'string') { | ||
return res.redirect(307, result); | ||
} | ||
return req.pipe(ws) | ||
return req.pipe(result) | ||
.on('error', (err: any) => { // eslint-disable-line @typescript-eslint/no-explicit-any | ||
@@ -60,9 +60,9 @@ console.error(err); | ||
const { ws, promise } = await req.locals.adapter.write(identifier, filename); | ||
const { result, promise } = await req.locals.adapter.write(identifier, filename); | ||
// if (typeof result === 'string') { | ||
// return res.redirect(307, result); | ||
// } | ||
// | ||
return req.pipe(ws) | ||
if (typeof result === 'string') { | ||
return res.redirect(307, result); | ||
} | ||
return req.pipe(result) | ||
.on('error', (err: any) => { // eslint-disable-line @typescript-eslint/no-explicit-any | ||
@@ -69,0 +69,0 @@ console.error(err); |
8690
166