npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bayaweaver/report-weaver-lambda

v1.0.0

Published

To avoid long-running, all dependencies of the `@bnc/report` must be placed in a Lambda Layer. **Install 7z**. Then open PowerShell and open GitBash Terminal:

Readme

Packaging for Lambda

To avoid long-running, all dependencies of the @bnc/report must be placed in a Lambda Layer. Install 7z. Then open PowerShell and open GitBash Terminal:

& "C:\Program Files\Git\git-bash.exe"

Then run

npm run build

As a result, two files will appear, the dependencies.zip and the handler.zip. The firs one is dedicated to a Lambda Layer, the second one - to a Lambda itself. Conceptually, a pipeline of the project bnc-report-generator-environment does the same.

Request

Below is an example of a cURL command to initiate the report generation:

curl --location --request POST 'https://<lambda-url>' \
--header 'X-Api-Key: <key-value>' \
--header 'Content-Type: application/json; charset=UTF-8' \
--data-raw '{
    "template": "<table><tr><td style='\''border: solid'\''>{{greeting}}</td></tr></table>",
    "data": {
        "greeting": "Hello, cell A1"
    },
    "outputFormat": "XLSX",
    "fileName": "my-report.pdf",
    "callbackUrl": "https://<callback-url>"
}'

Parameters:

  • X-Api-Key - A header which is responsible to secure invocations.
  • template - A HTML template that will be processed by the Nunjucks template engine. template engine.
  • data - The data to be applied to the template. This can be provided as either a plain JSON object or a JSON-formatted string.
  • outputFormat - The expected format of the output file. Possible values: PDF, XLSX. Not required. A default value: PDF.
  • fileName - A file name which must be assigned to a generated file. Optional.
  • callbackUrl - The URL that will be called once the file generation is complete.

Limitations:

The maximum allowed size for the request is 6 MB. This limitation is imposed by the Lambda specification. Therefore, it is recommended to pass both the template and data JSON in a compressed/minified format.

Response

In response to a request, the Report Generator will return the following:

{
  "reference": "5c9527aa-7d83-487b-b6cd-d905c4a3ef89"
}

The reference value can later be associated with the one returned in a callback, paired with a file link (see Callback below).

Callback

After the report is generated, the Lambda function sends a POST request to the specified callback URL.

{
  "reference": "5c9527aa-7d83-487b-b6cd-d905c4a3ef89",
  "fileLink": "https://bnc-reports.s3.eu-north-1.amazonaws.com/866f3773-48dd-484a-b4eb-ee203972b536.xlsx?X-Amz-..."
}
  • fileLink - A link to the generated report file. The link is temporary and remains active for only 30 minutes. Moreover, the file itself exists only 1 day and then is deleted. If any error occurred, this property is not present.
  • error - An error message in case the report was not generated. It is present only if any error occurred.