Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

awsls2json

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

awsls2json

Converts AWS LS format to a JSON file

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

awsls2json

Converts the output of the aws cli command aws s3 ls to JSON format.

Reference:

  • http://docs.aws.amazon.com/cli/latest/reference/s3/ls.html

Usage

convert.js:

const fs = require('fs');
const awsls2json = require('./awsls2json');

const filelist = fs.readFileSync('filelist.txt', 'utf8');
const json = awsls2json(filelist);

console.log('Result', json);

From the command line, or CI:

aws s3 ls s3://my-bucket-path/target-folder > filelist.txt
node convert.js

Example Input

PRE eab12b4/
PRE ff3d347/
PRE unminified/
2016-11-09 16:13:02          8 latest-regression-candidate

Example Output

[{
    "pre": "PRE",
    "folder": "eab12b4"
},{
    "pre": "PRE",
    "folder": "ff3d347"
}, {
    "pre": "PRE",
    "folder": "unminified"
}, {
    "date": "2016-11-09",
    "time": "16:13:02",
    "size": "8",
    "file": "latest-regression-candidate"
}]

Changelog

Version 1.0.2

  • Remove trailing slash from folder keys

Version 1.0.1

  • Add support for folders

Version 1.0.0

  • Initial release, with support for a files in a folder

Keywords

FAQs

Package last updated on 10 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc