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

@ticketplushq/arc-plugin-s3rver

v1.0.3

Published

Architect plugin for enable S3 on sandbox using s3rver

Downloads

9

Readme

@ticketplushq/arc-plugin-s3rver

Build

This plugin runs an s3 server (thanks to s3rver) in the architect sandbox. With it you can develop and run tests that depend on S3.

Table of contents

Install

npm i @ticketplushq/arc-plugin-s3rver

Add this line to your Architect project manifest:

# app.arc
@plugins
ticketplushq/arc-plugin-s3rver

Then follow the directions below for @s3rver.

Usage

The @s3rver pragma

The @s3rver pragma allows you to configure s3rver. This is not really necessary, but if you want to change something, this is the way:

Example

@s3rver
buckets
  my-custom-bucket
  another-bucket
options
  port 4569

Accessing to your buckets

To get the name of the buckets, this plugin enable env vars on testing environment following the @architect/plugin-storage-private and @architect/plugin-storage-public conventions. In case you don't know, this mean a ARC_STORAGE_PRIVATE_<bucketname> env var (with any dashes converted to underscores), or in case of public bucket ARC_STORAGE_PUBLIC_<bucketname>.

Notice that, for custom buckets we don't create anything, because you probably have your own way to handle it.

In addition to that, we also have a handy ARC_S3RVER_CONFIG env var, which has the settings (in JSON) to connect to the local s3 server.

Example

@app
my-app

@plugins
ticketplushq/arc-plugin-s3rver

@storage-public
no-sensitive-data

Then, you can access to your bucket using the following example script:

import { S3 } from 'aws-sdk'

const s3Config = JSON.parse(process.env.ARC_S3RVER_CONFIG || '{}')
const Bucket = process.env.ARC_STORAGE_PUBLIC_NO_SENSITIVE_DATA

const s3 = new S3(s3Config)
const Body = 'something'
const Key = 'path/to/something'
s3.upload({ Bucket, Key, Body }).promise().then(() => console.log('congrats!'))

Maintainer

@ticketplushq

Contributing

Feel free to dive in! Open an issue or submit PRs.

License

Apache License 2.0 © 2022 Ticketplus