Skip to content

Commit b77d5b3

Browse files
2.1.0 removed tslint for eslint, removed lodash, Removedconsole.error(message);
1 parent 1186389 commit b77d5b3

15 files changed

Lines changed: 6414 additions & 1001 deletions

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
lib

.eslintrc.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module.exports = {
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/recommended"
9+
],
10+
"parser": "@typescript-eslint/parser",
11+
"parserOptions": {
12+
"ecmaVersion": 12,
13+
"sourceType": "module"
14+
},
15+
"plugins": [
16+
"@typescript-eslint"
17+
],
18+
"rules": {
19+
"@typescript-eslint/no-unused-vars": "off",
20+
"@typescript-eslint/no-explicit-any": "off"
21+
}
22+
};

.gitignore

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
# Logs
2-
logs
3-
*.log
4-
5-
# Runtime data
6-
pids
7-
*.pid
8-
*.seed
9-
10-
# Directory for instrumented libs generated by jscoverage/JSCover
11-
lib-cov
12-
13-
# Coverage directory used by tools like istanbul
14-
coverage
15-
16-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17-
.grunt
18-
19-
# node-waf configuration
20-
.lock-wscript
21-
22-
# Compiled binary addons (http://nodejs.org/api/addons.html)
23-
build/Release
24-
25-
# Dependency directory
26-
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
27-
node_modules
28-
29-
my_config.json
30-
31-
32-
.DS_Store
33-
npm-debug.log
34-
dist
35-
typings
1+
# Logs
2+
logs
3+
*.log
4+
5+
# Runtime data
6+
pids
7+
*.pid
8+
*.seed
9+
10+
# Directory for instrumented libs generated by jscoverage/JSCover
11+
lib-cov
12+
13+
# Coverage directory used by tools like istanbul
14+
coverage
15+
16+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17+
.grunt
18+
19+
# node-waf configuration
20+
.lock-wscript
21+
22+
# Compiled binary addons (http://nodejs.org/api/addons.html)
23+
build/Release
24+
25+
# Dependency directory
26+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
27+
node_modules
28+
29+
my_config.json
30+
31+
32+
.DS_Store
33+
npm-debug.log
34+
dist
35+
typings

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
The MIT License (MIT)
23

34
Copyright (c) 2016 Matthias Ludwig (mludwig@quobject.io)
@@ -18,5 +19,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1819
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1920
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2021
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21-
THE SOFTWARE.
22-
22+
THE SOFTWARE.

README.md

Lines changed: 137 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -1,137 +1,137 @@
1-
# aws-cli-js
2-
A node.js wrapper for the [aws-cli](http://aws.amazon.com/documentation/cli/) command line interface
3-
4-
[![NPM](https://nodei.co/npm/aws-cli-js.png?downloads=true&downloadRank=true)](https://nodei.co/npm/aws-cli-js/)
5-
[![NPM](https://nodei.co/npm-dl/aws-cli-js.png?months=6&height=3)](https://nodei.co/npm/aws-cli-js/)
6-
7-
[![NPM version][npm-image]][npm-url]
8-
[![NPM downloads][downloads-image]][downloads-url]
9-
10-
## Installation
11-
12-
### Step 1: Prerequisites
13-
14-
The aws command line interface must be installed and accessible in the path
15-
16-
### Step 2: Installation
17-
18-
npm install aws-cli-js
19-
20-
Then:
21-
22-
```js
23-
var awsCli = require('aws-cli-js');
24-
var Options = awsCli.Options;
25-
var Aws = awsCli.Aws;
26-
```
27-
28-
## Usage
29-
30-
With promise
31-
32-
```js
33-
var options = new Options(
34-
/* accessKey */ 'your key',
35-
/* secretKey */ 'your key2',
36-
/* sessionToken */ 'your token',
37-
/* currentWorkingDirectory */ null
38-
);
39-
40-
var aws = new Aws(options);
41-
42-
aws.command('iam list-users').then(function (data) {
43-
console.log('data = ', data);
44-
});
45-
46-
//data = {
47-
// command: 'aws iam list-users ',
48-
// raw: '{\\n \\"Users\\": [\\n {\\n \\"UserName\\": \\"developer\\", \\n \\"PasswordLastUsed\\": \\"2015-10-03T17:58:49Z\\", \\n \\"CreateDate\\": \\"2015-06-03T07:37:25Z\\", \\n \\"UserId\\": \\"AIDAJBXXXXXXXXXXXXXXXXX\\", \\n \\"Path\\": \\"/\\", \\n \\"Arn\\": \\"arn:aws:iam::03XXXXXXXXX:user/developer\\"\\n }\\n ]\\n}\\n',
49-
// object:
50-
// {
51-
// Users:
52-
// [{
53-
// UserName: 'developer',
54-
// PasswordLastUsed: '2015-10-03T17:58:49Z',
55-
// CreateDate: '2015-06-03T07:37:25Z',
56-
// UserId: 'AIDAJBXXXXXXXXXXXXXXXXX',
57-
// Path: '/',
58-
// Arn: 'arn:aws:iam::03XXXXXXXXX:user/developer'
59-
// }]
60-
// }
61-
//}
62-
63-
```
64-
65-
With callback:
66-
67-
```js
68-
69-
aws.command('iam list-users', function (err, data) {
70-
console.log('data = ', data);
71-
});
72-
73-
//data = {
74-
// command: 'aws iam list-users ',
75-
// raw: '["{\\n \\"Users\\": [\\n {\\n \\"UserName\\": \\"developer\\", \\n \\"PasswordLastUsed\\": \\"2015-10-03T17:58:49Z\\", \\n \\"CreateDate\\": \\"2015-06-03T07:37:25Z\\", \\n \\"UserId\\": \\"AIDAJBXXXXXXXXXXXXXXXXX\\", \\n \\"Path\\": \\"/\\", \\n \\"Arn\\": \\"arn:aws:iam::03XXXXXXXXX:user/developer\\"\\n }\\n ]\\n}\\n",""]',
76-
// object:
77-
// {
78-
// Users:
79-
// [{
80-
// UserName: 'developer',
81-
// PasswordLastUsed: '2015-10-03T17:58:49Z',
82-
// CreateDate: '2015-06-03T07:37:25Z',
83-
// UserId: 'AIDAJBXXXXXXXXXXXXXXXXX',
84-
// Path: '/',
85-
// Arn: 'arn:aws:iam::03XXXXXXXXX:user/developer'
86-
// }]
87-
// }
88-
//}
89-
90-
```
91-
92-
Typescript
93-
94-
```js
95-
import { Aws, Options } from 'aws-cli-js';
96-
97-
const options = new Options(
98-
/* accessKey */ 'your key',
99-
/* secretKey */ 'your key2',
100-
/* sessionToken */ 'your token',
101-
/* currentWorkingDirectory */ null
102-
);
103-
104-
105-
const aws = new Aws(options);
106-
107-
return aws.command('iam list-users').then(function (data) {
108-
console.log('data = ', data);
109-
});
110-
```
111-
112-
113-
114-
* describe-instances
115-
116-
```js
117-
awsCli.command('ec2 describe-instances --instance-ids i-789b3ba7').then(function (data) {
118-
console.log('data = ', data);
119-
});
120-
121-
122-
//data = { command: 'aws ec2 describe-instances --instance-ids i-789b3ba7 ',
123-
// raw: '{\\n \\"Reservations\\": [\\n {\\n \\"OwnerId\\": \\"031641171132\\", \\n \\"ReservationId\\": \\"r-a48ad878\\", \\n \\"Groups\\": [], \\n \\"Instances\\": [\\n {\\n
124-
// \\"Monitoring\\": {\\n \\"State\\": \\"disabled\\"\\n }, \\n
125-
// \\"PublicDnsName\\": \\"ec2-52-64-166-221.ap-southeast-2.compute.amazonaws.com\\", \\n \\"State\\": {\\n
126-
// ...
127-
128-
```
129-
130-
## License
131-
132-
MIT
133-
134-
[npm-image]: https://img.shields.io/npm/v/aws-cli-js.svg?style=flat
135-
[npm-url]: https://npmjs.org/package/aws-cli-js
136-
[downloads-image]: https://img.shields.io/npm/dm/aws-cli-js.svg?style=flat
137-
[downloads-url]: https://npmjs.org/package/aws-cli-js
1+
# aws-cli-js
2+
A node.js wrapper for the [aws-cli](http://aws.amazon.com/documentation/cli/) command line interface
3+
4+
[![NPM](https://nodei.co/npm/aws-cli-js.png?downloads=true&downloadRank=true)](https://nodei.co/npm/aws-cli-js/)
5+
[![NPM](https://nodei.co/npm-dl/aws-cli-js.png?months=6&height=3)](https://nodei.co/npm/aws-cli-js/)
6+
7+
[![NPM version][npm-image]][npm-url]
8+
[![NPM downloads][downloads-image]][downloads-url]
9+
10+
## Installation
11+
12+
### Step 1: Prerequisites
13+
14+
The aws command line interface must be installed and accessible in the path
15+
16+
### Step 2: Installation
17+
18+
npm install aws-cli-js
19+
20+
Then:
21+
22+
```js
23+
var awsCli = require('aws-cli-js');
24+
var Options = awsCli.Options;
25+
var Aws = awsCli.Aws;
26+
```
27+
28+
## Usage
29+
30+
With promise
31+
32+
```js
33+
var options = new Options(
34+
/* accessKey */ 'your key',
35+
/* secretKey */ 'your key2',
36+
/* sessionToken */ 'your token',
37+
/* currentWorkingDirectory */ null
38+
);
39+
40+
var aws = new Aws(options);
41+
42+
aws.command('iam list-users').then(function (data) {
43+
console.log('data = ', data);
44+
});
45+
46+
//data = {
47+
// command: 'aws iam list-users ',
48+
// raw: '{\\n \\"Users\\": [\\n {\\n \\"UserName\\": \\"developer\\", \\n \\"PasswordLastUsed\\": \\"2015-10-03T17:58:49Z\\", \\n \\"CreateDate\\": \\"2015-06-03T07:37:25Z\\", \\n \\"UserId\\": \\"AIDAJBXXXXXXXXXXXXXXXXX\\", \\n \\"Path\\": \\"/\\", \\n \\"Arn\\": \\"arn:aws:iam::03XXXXXXXXX:user/developer\\"\\n }\\n ]\\n}\\n',
49+
// object:
50+
// {
51+
// Users:
52+
// [{
53+
// UserName: 'developer',
54+
// PasswordLastUsed: '2015-10-03T17:58:49Z',
55+
// CreateDate: '2015-06-03T07:37:25Z',
56+
// UserId: 'AIDAJBXXXXXXXXXXXXXXXXX',
57+
// Path: '/',
58+
// Arn: 'arn:aws:iam::03XXXXXXXXX:user/developer'
59+
// }]
60+
// }
61+
//}
62+
63+
```
64+
65+
With callback:
66+
67+
```js
68+
69+
aws.command('iam list-users', function (err, data) {
70+
console.log('data = ', data);
71+
});
72+
73+
//data = {
74+
// command: 'aws iam list-users ',
75+
// raw: '["{\\n \\"Users\\": [\\n {\\n \\"UserName\\": \\"developer\\", \\n \\"PasswordLastUsed\\": \\"2015-10-03T17:58:49Z\\", \\n \\"CreateDate\\": \\"2015-06-03T07:37:25Z\\", \\n \\"UserId\\": \\"AIDAJBXXXXXXXXXXXXXXXXX\\", \\n \\"Path\\": \\"/\\", \\n \\"Arn\\": \\"arn:aws:iam::03XXXXXXXXX:user/developer\\"\\n }\\n ]\\n}\\n",""]',
76+
// object:
77+
// {
78+
// Users:
79+
// [{
80+
// UserName: 'developer',
81+
// PasswordLastUsed: '2015-10-03T17:58:49Z',
82+
// CreateDate: '2015-06-03T07:37:25Z',
83+
// UserId: 'AIDAJBXXXXXXXXXXXXXXXXX',
84+
// Path: '/',
85+
// Arn: 'arn:aws:iam::03XXXXXXXXX:user/developer'
86+
// }]
87+
// }
88+
//}
89+
90+
```
91+
92+
Typescript
93+
94+
```js
95+
import { Aws, Options } from 'aws-cli-js';
96+
97+
const options = new Options(
98+
/* accessKey */ 'your key',
99+
/* secretKey */ 'your key2',
100+
/* sessionToken */ 'your token',
101+
/* currentWorkingDirectory */ null
102+
);
103+
104+
105+
const aws = new Aws(options);
106+
107+
return aws.command('iam list-users').then(function (data) {
108+
console.log('data = ', data);
109+
});
110+
```
111+
112+
113+
114+
* describe-instances
115+
116+
```js
117+
awsCli.command('ec2 describe-instances --instance-ids i-789b3ba7').then(function (data) {
118+
console.log('data = ', data);
119+
});
120+
121+
122+
//data = { command: 'aws ec2 describe-instances --instance-ids i-789b3ba7 ',
123+
// raw: '{\\n \\"Reservations\\": [\\n {\\n \\"OwnerId\\": \\"031641171132\\", \\n \\"ReservationId\\": \\"r-a48ad878\\", \\n \\"Groups\\": [], \\n \\"Instances\\": [\\n {\\n
124+
// \\"Monitoring\\": {\\n \\"State\\": \\"disabled\\"\\n }, \\n
125+
// \\"PublicDnsName\\": \\"ec2-52-64-166-221.ap-southeast-2.compute.amazonaws.com\\", \\n \\"State\\": {\\n
126+
// ...
127+
128+
```
129+
130+
## License
131+
132+
MIT
133+
134+
[npm-image]: https://img.shields.io/npm/v/aws-cli-js.svg?style=flat
135+
[npm-url]: https://npmjs.org/package/aws-cli-js
136+
[downloads-image]: https://img.shields.io/npm/dm/aws-cli-js.svg?style=flat
137+
[downloads-url]: https://npmjs.org/package/aws-cli-js

0 commit comments

Comments
 (0)