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

@pivotpath/aws-utilities

v1.0.9

Published

Utilities to connect with AWS services from frontend with ease.

Readme

AWS Utility Client

Overview

This is a Node.js package designed to simplify interactions with AWS S3 for uploading and downloading files using pre-signed URLs, as well as sending emails via a backend API. It wraps common AWS S3 operations and mailing functionality into a convenient utility class.

Installation

To install the package in your project, run:

npm install @nevitonnpm/aws-utilities

As this is a private package you need to configure .npmrc file on your local system for having this package while doing development.

.npmrc should contain following line

//registry.npmjs.org/:_authToken=<auth-token-to-access-private-packages-from-neviton>

Here you will find more details on configuring .npmrc file on local. Link - Official documentation for .npmrc

To use this package in CI/CD workflow, Please follow This link of official documentation.

For Auth Token please sendout a mail on [email protected]. You will recieve a mail with auth token to replace it in your .npmrc file shortly.

Please don't ever use auth token directly in .npmrc files in your projects. either you can set it as env veriable or create global .npmrc on system to manage it.

Usage

1. Import the AWSUtilities class

import AWSUtilities from "@nevitonnpm/aws-utilities";

2. Initialize the AWSUtilities class

To interact with the API, initialize the class with your AWS Utilities APP Config added in AWS Utilities repository & create a AWSUtilities client using which you will be able to connect with service by calling required methods easily.

const appName = "xyz";
const appId = "xyz_id";
const appSecret = "xyz_secrete";
const appSecreteKey = "xyz_secrete_key";
const env = "DEV";
const appUrl = 'https://example.com/'

const awsUtilities = new AWSUtilities({
    appName,
    appId,
    appSecrete,
    appSecretKey,
    env,
    appUrl
});

default export awsUtilities;

3. List all files in S3

You can list all files present in your AWS S3 bucket:

awsUtilities
    .listAllFiles()
    .then((files) => console.log(files))
    .catch((err) => console.error(err));

4. Get a pre-signed URL for downloading an S3 object

To get a pre-signed URL for downloading a specific object from S3:

const keys = ["file1.jpg", "file2.png"];
const expiresIn = 3600;

awsUtilities
    .getS3FileUrl(keys, expiresIn)
    .then((urls) => console.log(urls))
    .catch((err) => console.error(err));

5. Upload a file to S3

To upload a file to S3 using a pre-signed URL:

const fileData = /* some binary file data */;
const fileKey = 'uploads/myFile.jpg';
const expiresIn = 3600;
const fileType = 'application/pdf';

awsUtilities.uploadFileToS3(fileData, fileKey, expiresIn, fileType)
    .then(response => console.log('File uploaded successfully'))
    .catch(err => console.error('Upload failed', err));

6. Send an email

To send an email through the API:

const emailData = {
    to: "[email protected]",
    subject: "Hello!",
    html: "<h1>Test Email</h1>",
    attachments: [],
    cc: "[email protected]",
};

awsUtilities
    .sendMailToUser(emailData)
    .then((response) => console.log("Email sent successfully"))
    .catch((err) => console.error("Failed to send email", err));

API Methods

  • listAllFiles(): Lists all the objects in the S3 bucket.
  • getS3FileUrl(keys, expiresIn): Returns pre-signed URLs for downloading S3 objects. Optionally, you can provide expiresIn (in seconds).
  • uploadFileToS3(fileData, key, expiresIn, fileType): Uploads a file to S3. You can specify the fileData, key (filename) and optionally provide expiresIn and fileType.
  • sendMailToUser(data): Sends an email via the API, including attachments.

Error Handling

Each method returns a Promise. You can handle success and failure using .then() and .catch() or You can also use try & catch block.

License

This project is unlicensed & for internal purpose only.