Skip to content

Commit d133c0c

Browse files
committed
📚 docs: add missing stage param for sls in read me file
1 parent 9e0c575 commit d133c0c

File tree

6 files changed

+12
-13
lines changed

6 files changed

+12
-13
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</a>
1111
</p>
1212

13-
13+
1414

1515
Dynamo Data Transform is an easy to use data transformation tool for DynamoDB.
1616

@@ -85,7 +85,7 @@ dynamodt -i
8585
1. Intialize data-transformations folder
8686
Serverless (the plugin reads the table names from the serverless.yml file):
8787
```bash
88-
sls dynamodt init
88+
sls dynamodt init --stage <stage>
8989
```
9090
Standalone:
9191
```bash

examples/serverless-localstack/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This repository shows the usage of the dynamo-data-transform package.
1+
## This repository shows the usage of the dynamo-data-transform package.
22

33
## Quick Start
44

@@ -69,7 +69,7 @@ history - `ddt history -t Users`
6969
```
7070
Now lets prepare some data for the transformation. Run the same command as before but without --dry.
7171
```bash
72-
npx sls dynamodt prepare --table UsersExample --tNumber 4
72+
npx sls dynamodt prepare --table UsersExample --tNumber 4 --stage local
7373
```
7474
Let's run the pending transformation script, currently it is "v4_using_preparation_data.js"
7575
```bash

examples/serverless-localstack/index.js

Whitespace-only changes.

examples/serverless-localstack/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@
22
"name": "dynamo-db-data-transformation-example",
33
"version": "1.0.0",
44
"description": "",
5-
"main": "index.js",
65
"scripts": {
76
"start": "serverless deploy -s local",
87
"test": "echo \"Error: no test specified\" && exit 1"
98
},
109
"dependencies": {
11-
"dynamo-data-transform": "^0.1.2",
10+
"dynamo-data-transform": "^0.1.5",
1211
"serverless": "^3.17.0",
1312
"serverless-dotenv-plugin": "~3.9.0",
1413
"serverless-localstack": "~0.4.35",
1514
"serverless-manifest-plugin": "~1.0.7",
1615
"serverless-pseudo-parameters": "~2.5.0"
1716
},
18-
"author": "Guy Braunstain <[email protected]>",
17+
"author": "Guy Braunstain <guy.braunstain@jit.io>",
1918
"license": "MIT"
2019
}

serverless-plugin/commands.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ module.exports = {
2828
usage: 'Run data transformations',
2929
commands: {
3030
init: {
31-
usage: `sls dynamodt init - ${COMMAND_DESCRIPTION.init}`,
31+
usage: `sls dynamodt init --stage <stage> - ${COMMAND_DESCRIPTION.init}`,
3232
lifecycleEvents: ['init'],
3333
},
3434
up: {
35-
usage: `sls dynamodt up - ${COMMAND_DESCRIPTION.up}`,
35+
usage: `sls dynamodt up --stage <stage> - ${COMMAND_DESCRIPTION.up}`,
3636
lifecycleEvents: ['transform'],
3737
options: {
3838
dry: COMMAND_OPTIONS.dry,
3939
},
4040
},
4141
prepare: {
42-
usage: `"sls dynamodt prepare --table <table> --tNumber <transformation_number>" - ${COMMAND_DESCRIPTION.prepare}`,
42+
usage: `"sls dynamodt prepare --table <table> --tNumber <transformation_number> --stage <stage>" - ${COMMAND_DESCRIPTION.prepare}`,
4343
lifecycleEvents: ['prepare'],
4444
options: {
4545
tNumber: COMMAND_OPTIONS.tNumber,
@@ -48,15 +48,15 @@ module.exports = {
4848
},
4949
},
5050
down: {
51-
usage: `sls dynamodt down --table <table> - ${COMMAND_DESCRIPTION.down}`,
51+
usage: `sls dynamodt down --table <table> --stage <stage> - ${COMMAND_DESCRIPTION.down}`,
5252
lifecycleEvents: ['rollback'],
5353
options: {
5454
table: COMMAND_OPTIONS.table,
5555
dry: COMMAND_OPTIONS.dry,
5656
},
5757
},
5858
history: {
59-
usage: `sls dynamodt history --table <table> - ${COMMAND_DESCRIPTION.history}`,
59+
usage: `sls dynamodt history --table <table> --stage <stage> - ${COMMAND_DESCRIPTION.history}`,
6060
lifecycleEvents: ['history'],
6161
options: {
6262
table: COMMAND_OPTIONS.table,

src/command-handlers/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { DATA_TRANSFORMATIONS_FOLDER_NAME } = require('../config/constants');
33

44
const createFolderIfNotExist = (folderPath) => {
55
if (!fs.existsSync(folderPath)) {
6-
console.info(`${folderPath} folder does not exist, creating it`);
6+
console.info(`${folderPath} folder does not exist, creating...`);
77
fs.mkdirSync(folderPath);
88
return false;
99
}

0 commit comments

Comments
 (0)