Giter VIP home page Giter VIP logo

link2aws.github.io's Introduction

link2aws

Copy/paste ARN, get direct link to AWS console

Screenshot of link2aws.github.io

Copyright (c) 2020, Felix Kaiser. License: ISC

Node.js CI

How to...

Use as website

Go to link2aws.github.io (privacy notice: it runs in the browser and does not send your input anywhere)

Or run directly from source:

# git clone https://github.com/link2aws/link2aws.github.io
# firefox link2aws.github.io/index.html

Use as command line tool

Via NPM:

# npm install -g link2aws
# link2aws arn:aws:s3:::abcdefgh1234
https://s3.console.aws.amazon.com/s3/buckets/abcdefgh1234

Or clone the repo and run the file (no setup required):

# git clone https://github.com/link2aws/link2aws.github.io
# node link2aws.github.io/link2aws.js arn:aws:s3:::abcdefgh1234
https://s3.console.aws.amazon.com/s3/buckets/abcdefgh1234

Use as JavaScript library

var link2aws = require('link2aws');
new link2aws.ARN('arn:aws:s3:::abcdefgh1234').consoleLink
// https://s3.console.aws.amazon.com/s3/buckets/abcdefgh1234

Or:

import { ARN } from 'link2aws';
new ARN('arn:aws:s3:::abcdefgh1234').consoleLink;
// https://s3.console.aws.amazon.com/s3/buckets/abcdefgh1234

If the ARN is invalid, or valid but we have no link for it, an exception is thrown.

Add support for resource types

It's super easy - see this example.

Pull requests welcome!

Add code

  • Support for new resource types: see large dict at the end of link2aws.js
  • Testcases...
    • ...where we should take a valid ARN and return a URL: testcases/aws.json
    • ...where we should take a string (e.g. bad or unsupported ARN) and throw an exception: testcases/aws-negative.json
    • ...for corner cases not specific to AWS, such as whitespace handling: testcases/string.json

Run tests and check test coverage

npm install
node_modules/nyc/bin/nyc.js --reporter=text node_modules/mocha/bin/mocha test/test.js

link2aws.github.io's People

Contributors

fxkr avatar diemkay avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.