Skip to content

Commit 99defb6

Browse files
committed
Use .mjs files?
1 parent 8b40cb5 commit 99defb6

13 files changed

+18
-19
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55

66
## ⬇️ Installation
77

8-
...
8+
```shell
9+
npm install -g lambda-console-cli
10+
```
911

1012
## 🐚 Usage
1113

index.js renamed to index.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import Session from "./src/session.js";
1+
#!/usr/bin/env node
2+
3+
import Session from "./src/session.mjs";
24
const session = new Session();
35

46
async function main() {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lambda-console-cli",
3-
"version": "1.0.1",
3+
"version": "1.0.3",
44
"description": "A CLI to run shell commands or interact with your application on Lambda.",
55
"main": "index.js",
66
"type": "module",
@@ -12,7 +12,7 @@
1212
"node": ">=14.0.0"
1313
},
1414
"bin": {
15-
"lambda-console-cli": "./index.js"
15+
"lambda-console-cli": "./index.mjs"
1616
},
1717
"keywords": [
1818
"aws",

src/identity.js renamed to src/identity.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import chalk from "chalk";
2-
32
import { STSClient, GetCallerIdentityCommand } from "@aws-sdk/client-sts";
43

54
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));

src/lambda.js renamed to src/lambda.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import inquirer from "inquirer";
22
import inquirerPrompt from "inquirer-autocomplete-prompt";
33
inquirer.registerPrompt("autocomplete", inquirerPrompt);
44
import { createSpinner } from "nanospinner";
5-
65
import {
76
LambdaClient,
87
paginateListFunctions,
File renamed without changes.
File renamed without changes.

src/mode.js renamed to src/mode.mjs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import select from "@inquirer/select";
2-
3-
import ModeRunner from "./mode-runner.js";
4-
import ModeInteract from "./mode-interact.js";
2+
import ModeRunner from "./mode-runner.mjs";
3+
import ModeInteract from "./mode-interact.mjs";
54

65
class Mode {
76
constructor(lambda) {

src/profiles.js renamed to src/profiles.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import inquirer from "inquirer";
22
import inquirerPrompt from "inquirer-autocomplete-prompt";
33
inquirer.registerPrompt("autocomplete", inquirerPrompt);
4-
54
import { loadSharedConfigFiles } from "@aws-sdk/shared-ini-file-loader";
65

76
class Profiles {
File renamed without changes.

src/regions.js renamed to src/regions.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import inquirer from "inquirer";
22
import inquirerPrompt from "inquirer-autocomplete-prompt";
33
inquirer.registerPrompt("autocomplete", inquirerPrompt);
44
import { createSpinner } from "nanospinner";
5-
65
import { AccountClient, paginateListRegions } from "@aws-sdk/client-account";
76

87
class Regions {

src/session.js renamed to src/session.mjs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import Program from "./program.js";
2-
import Welcome from "./welcome.js";
3-
import Regions from "./regions.js";
4-
import Profiles from "./profiles.js";
5-
import Identity from "./identity.js";
6-
import Lambda from "./lambda.js";
7-
import Mode from "./mode.js";
1+
import Program from "./program.mjs";
2+
import Welcome from "./welcome.mjs";
3+
import Regions from "./regions.mjs";
4+
import Profiles from "./profiles.mjs";
5+
import Identity from "./identity.mjs";
6+
import Lambda from "./lambda.mjs";
7+
import Mode from "./mode.mjs";
88

99
class Session {
1010
constructor() {

src/welcome.js renamed to src/welcome.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import chalk from "chalk";
2-
32
import fs from "fs";
3+
44
const BANNER = fs.readFileSync("./src/banner.txt", "utf8");
55

66
class Welcome {

0 commit comments

Comments
 (0)