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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@orcden/od-storage

v2.0.0

Published

OrcDen Storage Library

Downloads

7

Readme

OD-Storage

Storage Library

ODS3Storage is a simple library that will manage your storage through amazon S3

Installation

  • Install with npm
npm i @orcden/od-storage

Usage - ODCognitoAuth

import '@orcden/od-storage';
let storage = new ODS3Storage( this._getCognitoConfigs(), this._getS3Configs() );

_getCognitoConfigs() {
    return {
        // REQUIRED - Amazon Cognito Region
        region: process.env.APP_COGNITO_REGION,
        // OPTIONAL - Amazon Cognito User Pool ID
        userPoolId: process.env.APP_COGNITO_USER_POOL_ID ,
        // OPTIONAL - Amazon Cognito Web Client ID (26-char alphanumeric string)
        userPoolWebClientId: process.env.APP_COGNITO_USER_POOL_WEB_CLIENT_ID,                        
        // REQUIRED only for Federated Authentication - Amazon Cognito Identity Pool ID
        identityPoolId: process.env.APP_COGNITO_IDENTITY_POOL_ID
    }
}

_getS3Configs() {
    return {
        //REQUIRED -  Amazon S3 bucket name
        bucket: '', 
        //OPTIONAL -  Amazon service region
        region: 'XX-XXXX-X'
    }
}

Functions

| Name | Parameters | Description | |-----------|------|-----------------------------------------------| | tryGetCurrentAuthenticatedUser | callback | Trys to authenticates a user from session data and performs a callback with the info. Callback parameters: loggedIn, userDetails, error | | trySignIn | username, password, callback | Trys to manually authenticate with the given parameters and performs a callback with the info. Callback parameters: userDetails, challenge, error | | tryGetCurrenSessionData | callback | Gets a user from session data and performs a callback with the info. Needs to be authenticated first. Callback parameters: userDetails, error | | trySignUp | username, email, password, callback | Trys to sign a user up with the given parameters and performs a callback with the info. Callback parameters: userDetails, error | | tryCompleteNewPassword | email, newPassword, callback | Trys to complete a new password challenge with the given parameters and performs a callback with the info. Callback parameters: userDetails, error | | tryResendConfirmationCode | username, callback | Trys to resend a confirmation code to a specific user and performs a callback with the info. Callback parameters: error | | trySignOut | callback | Trys to sign out the current authenticated user and performs a callback with the info. Callback parameters: error | | tryChangePassword | oldPassword, newPassword, callback | Trys to change the password of the current authernticated user and performs a callback with the info. Callback parameters: passwordChangeData, error | | tryVerifyEmailSendCode | callback | Trys to send a code to the current authernticated user and performs a callback with the info. Callback parameters: error | | tryUpdateEmailSendCode | email, callback | Trys to update the email of and send a code to the current authernticated user and performs a callback with the info. Callback parameters: error | | tryVerifyEmailSubmit | code, callback | Trys to verify the email update code of current authernticated user and performs a callback with the info. Callback parameters: error | | tryforgotPasswordSendCode | username, callback | Trys to reset the password of and send a code to a specific user and performs a callback with the info. Callback parameters: error | | tryforgotPasswordSubmit | username, code, newPassword, callback | Trys to verify the email update code of a specific user to update their password and performs a callback with the info. Callback parameters: passwordChangeData, error |

Development

Run linter

npm run lint

Fix linter errors

npm run fix

Run tests

npm run test

Build for production

npm run build