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

generateImages() function does not return a Promise #995

Open
jetxr opened this issue Mar 31, 2023 · 0 comments
Open

generateImages() function does not return a Promise #995

jetxr opened this issue Mar 31, 2023 · 0 comments
Labels
bug Something isn't working needs verification Bug needs to be verified with reproduction

Comments

@jetxr
Copy link

jetxr commented Mar 31, 2023

Describe the bug
generateImages() function is async and type hints that it will return a Promise but does not return a Promise.

return {
savedImages,
htmlMeta,
manifestJsonContent,
};
}

Expected behavior
generateImages() should return a Promise that gets resolved with the value of type Result.

Why

  • While using await generateImages in a CD environment, I cannot do process.exit() as shown in the examples.
  • Current implementation causes the following example to just wait without exiting gracefully
import {generateImages} from "pwa-asset-generator";

await generateImages('input.svg', './output', {
    type: 'png',
});

await generateImages('input.svg', './output', {
    type: 'jpg',
});

System (please complete the following information):

  • OS: macOS Ventura
  • node version: 18.4
  • npm version: 9.3.1
  • cli version: 6.2.1

Additional context
Thankully Github Actions terminated the script after 6 hours :)

@jetxr jetxr added bug Something isn't working needs verification Bug needs to be verified with reproduction labels Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs verification Bug needs to be verified with reproduction
Projects
None yet
Development

No branches or pull requests

1 participant