Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#172621882] small refactor: generate zip with user data #45

Merged
merged 5 commits into from
May 15, 2020
Merged

Conversation

gunzip
Copy link
Contributor

@gunzip gunzip commented May 15, 2020

  • removed useless code in zip module
  • removed useless code in random module
  • removed a wrong test

@gunzip gunzip changed the title Refactors [#172621882] small refactor: generate zip with user data May 15, 2020
@pagopa-github-bot
Copy link
Contributor

pagopa-github-bot commented May 15, 2020

Fails
🚫

@types dependencies were added to package.json, as a dependency for others.
You need to move @types/archiver and @types/randomstring into "devDependencies"?

Warnings
⚠️

Please include a description of your PR changes.

Affected stories

  • 🌟 #172621882: Come CIT, quando esprimo la volontà di scaricare i miei dati, voglio ricevere un link per il download dei dati entro 7gg dalla richiesta

New dependencies added: @types/archiver and @types/randomstring.

@types/archiver

Author: Unknown

Description: TypeScript definitions for archiver

Homepage: http://npmjs.com/package/@types/archiver

Createdalmost 4 years ago
Last Updated16 days ago
LicenseMIT
Maintainers1
Releases31
Direct Dependencies@types/glob
README

Installation

npm install --save @types/archiver

Summary

This package contains type definitions for archiver (https://github.com/archiverjs/node-archiver).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/archiver.

Additional Details

  • Last updated: Tue, 25 Feb 2020 19:05:38 GMT
  • Dependencies: @types/glob
  • Global values: none

Credits

These definitions were written by Esri, Dolan Miu, Crevil, and Piotr Błażejewicz.

@types/randomstring

Author: Unknown

Description: TypeScript definitions for randomstring

Homepage: http://npmjs.com/package/@types/randomstring

Createdalmost 4 years ago
Last Updated16 days ago
LicenseMIT
Maintainers1
Releases6
Direct Dependencies
README

Installation

npm install --save @types/randomstring

Summary

This package contains type definitions for randomstring (https://github.com/klughammer/node-randomstring).

Details

Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/randomstring

Additional Details

  • Last updated: Fri, 16 Jun 2017 16:37:51 GMT
  • Dependencies: none
  • Global values: Randomstring

Credits

These definitions were written by Isman Usoh https://github.com/isman-usoh/.

Generated by 🚫 dangerJS

await handler(contextMock, input);

// @ts-ignore as
const mockCall = createCompressedStream.mock.calls[0];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is wrong and we must rewrite it. if you mock the blobService and call cb() immediately the code following createWriteStreamToBlockBlob won't never be executed

Object.entries(data).forEach(([fileName, content]) => {
zipArchive.append(JSON.stringify(content), { name: fileName });
});
zipArchive.finalize();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a promise and must be awaited somewhere

@gunzip gunzip requested a review from balanza May 15, 2020 16:31
@gunzip gunzip merged commit f5388fb into master May 15, 2020
@gunzip gunzip deleted the refactors branch May 15, 2020 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants