link2aws 1.0.1 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -4
- package/link2aws +11 -0
- package/link2aws.js +969 -943
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -8,14 +8,40 @@ Copy/paste ARN, get direct link to AWS console
|
|
|
8
8
|
|
|
9
9
|
Copyright (c) 2020, Felix Kaiser. License: [ISC](https://spdx.org/licenses/ISC.html)
|
|
10
10
|
|
|
11
|
+

|
|
12
|
+
|
|
11
13
|
## How to...
|
|
12
14
|
|
|
13
|
-
### Use
|
|
15
|
+
### Use as website
|
|
16
|
+
|
|
17
|
+
Go to [link2aws.github.io](https://link2aws.github.io) (privacy notice: it runs in the browser and does *not* send your input anywhere)
|
|
18
|
+
|
|
19
|
+
Or run directly from source:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
# git clone https://github.com/link2aws/link2aws.github.io
|
|
23
|
+
# firefox link2aws.github.io/index.html
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Use as command line tool
|
|
27
|
+
|
|
28
|
+
Via NPM:
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
# npm install -g link2aws
|
|
32
|
+
# link2aws arn:aws:s3:::abcdefgh1234
|
|
33
|
+
https://s3.console.aws.amazon.com/s3/buckets/abcdefgh1234
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Or clone the repo and run the file (no setup required):
|
|
14
37
|
|
|
15
|
-
|
|
16
|
-
|
|
38
|
+
```sh
|
|
39
|
+
# git clone https://github.com/link2aws/link2aws.github.io
|
|
40
|
+
# node link2aws.github.io/link2aws.js arn:aws:s3:::abcdefgh1234
|
|
41
|
+
https://s3.console.aws.amazon.com/s3/buckets/abcdefgh1234
|
|
42
|
+
```
|
|
17
43
|
|
|
18
|
-
### Use
|
|
44
|
+
### Use as JavaScript library
|
|
19
45
|
|
|
20
46
|
```js
|
|
21
47
|
var link2aws = require('link2aws');
|
|
@@ -23,10 +49,22 @@ new link2aws.ARN('arn:aws:s3:::abcdefgh1234').consoleLink
|
|
|
23
49
|
// https://s3.console.aws.amazon.com/s3/buckets/abcdefgh1234
|
|
24
50
|
```
|
|
25
51
|
|
|
52
|
+
Or:
|
|
53
|
+
|
|
54
|
+
```js
|
|
55
|
+
import { ARN } from 'link2aws';
|
|
56
|
+
new ARN('arn:aws:s3:::abcdefgh1234').consoleLink;
|
|
57
|
+
// https://s3.console.aws.amazon.com/s3/buckets/abcdefgh1234
|
|
58
|
+
```
|
|
59
|
+
|
|
26
60
|
If the ARN is invalid, or valid but we have no link for it, an exception is thrown.
|
|
27
61
|
|
|
28
62
|
### Add support for resource types
|
|
29
63
|
|
|
64
|
+
It's super easy - see [this example](https://github.com/link2aws/link2aws.github.io/commit/0432ecbbe522dbbd7e746caeeb4a7d1a6be5f057).
|
|
65
|
+
|
|
66
|
+
Pull requests welcome!
|
|
67
|
+
|
|
30
68
|
#### Add code
|
|
31
69
|
|
|
32
70
|
* Support for new resource types: see large dict at the end of `link2aws.js`
|