diff --git a/packages/connect/deno/services/storage.ts b/packages/connect/deno/services/storage.ts index d5ce5166..942fc310 100644 --- a/packages/connect/deno/services/storage.ts +++ b/packages/connect/deno/services/storage.ts @@ -58,7 +58,7 @@ export const signedUrl = service, resource: name, method: options.type === 'download' ? Method.GET : Method.POST, - ...(options.type === 'download' ? { params: { useSignedUrl: true } } : {}), + params: { useSignedUrl: true }, }) export const remove = (name: string) => (h: HyperRequestFunction) => diff --git a/packages/connect/deno/tests/storage.test.ts b/packages/connect/deno/tests/storage.test.ts index 2a70c206..5c8243ac 100644 --- a/packages/connect/deno/tests/storage.test.ts +++ b/packages/connect/deno/tests/storage.test.ts @@ -70,6 +70,7 @@ test('storage.signedUrl(upload)', async () => { assertEquals(h.service, 'storage') assertEquals(h.method, 'POST') assertEquals(h.body, undefined) + assertEquals(h.params, { useSignedUrl: true }) return Promise.resolve( new Request(`http://localhost/${h.service}/bucket/${h.resource}`, { diff --git a/packages/connect/node/README.md b/packages/connect/node/README.md index 32c4cf65..50a507f3 100644 --- a/packages/connect/node/README.md +++ b/packages/connect/node/README.md @@ -4,10 +4,11 @@ Some tests for verifying `hyper-connect` works in Node ## Getting Started -First, you will need to set the `HYPER` environment variable to a valid Hyper Cloud connection string +First, you will need to set the `HYPER` environment variable to a valid Hyper Cloud connection +string -`deno task test:integration` from the root will transform the Deno code into Node code, and then run the -unit tests and integration tests for node. +`deno task test:integration` from the root will transform the Deno code into Node code, and then run +the unit tests and integration tests for node. You can run `yarn && yarn test` here as well, but you must first transform the Deno code into Node code using `deno task to-node`