Skip to content

Commit 74d853f

Browse files
author
Michal Paukert
authored
Merge pull request #10 from Kentico/status-manager
Fix: status manager and update packages
2 parents 4779c17 + 7906cfd commit 74d853f

File tree

8 files changed

+566
-571
lines changed

8 files changed

+566
-571
lines changed

package.json

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
22
"name": "@kentico/kontent-cli",
3-
"version": "0.0.7",
3+
"version": "0.0.8",
44
"description": "Command line interface tool that can be used for generating and running Kontent migration scripts",
55
"main": "./lib/index.js",
66
"types": "./lib/types/index.d.ts",
77
"scripts": {
88
"build": "tsc",
99
"test": "jest",
10-
"lint": "tslint --project tsconfig.json --fix \"src/**/*.ts\" && prettier --write \"src/**/*.ts\""
10+
"lint": "tslint --project tsconfig.json --fix \"src/**/*.ts\" && prettier --write \"src/**/*.ts\"",
11+
"debug": "node --inspect ./lib/index.js migration run --all -e DEV"
1112
},
1213
"publishConfig": {
1314
"access": "public"
@@ -44,30 +45,30 @@
4445
},
4546
"homepage": "https://github.com/Kentico/kontent-cli#readme",
4647
"dependencies": {
47-
"chalk": "^2.4.2",
48-
"yargs": "^14.2.0",
49-
"@kentico/kontent-management": "~0.3.18"
48+
"chalk": "^4.0.0",
49+
"yargs": "^15.3.1",
50+
"@kentico/kontent-management": "~0.3.19"
5051
},
5152
"peerDependencies": {
52-
"rxjs": "^6.5.3"
53+
"rxjs": "^6.5.5"
5354
},
5455
"devDependencies": {
55-
"@babel/core": "^7.7.4",
56-
"@babel/preset-env": "^7.7.4",
57-
"@babel/preset-typescript": "^7.7.4",
58-
"@types/jest": "^24.0.23",
59-
"@types/node": "^12.11.5",
60-
"@types/yargs": "^13.0.3",
61-
"babel-jest": "^24.9.0",
56+
"@babel/core": "^7.9.0",
57+
"@babel/preset-env": "^7.9.5",
58+
"@babel/preset-typescript": "^7.9.0",
59+
"@types/jest": "^25.2.1",
60+
"@types/node": "^13.11.1",
61+
"@types/yargs": "^15.0.4",
62+
"babel-jest": "^25.3.0",
6263
"dotenv": "^8.2.0",
63-
"husky": "^3.1.0",
64-
"jest": "^24.9.0",
65-
"lint-staged": "^9.5.0",
66-
"prettier": "^1.19.1",
67-
"ts-jest": "^24.2.0",
68-
"tslint": "^5.20.1",
64+
"husky": "^4.2.5",
65+
"jest": "^25.3.0",
66+
"lint-staged": "^10.1.3",
67+
"prettier": "^2.0.4",
68+
"ts-jest": "^25.3.1",
69+
"tslint": "^6.1.1",
6970
"tslint-config-prettier": "^1.18.0",
7071
"tslint-config-standard": "^9.0.0",
71-
"typescript": "^3.7.2"
72+
"typescript": "^3.8.3"
7273
}
7374
}

src/cmds/environment/add.ts

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
import yargs from 'yargs';
2-
import { saveEnvironmentConfig } from '../../utils/environmentUtils';
3-
4-
const addEnvironmentCommand: yargs.CommandModule = {
5-
command: 'add',
6-
describe: "Creates an environment to run the migrations on. The environment is defined as a named pair of values. For example, a 'DEV' environment can be defined as a pair of specific project ID and Management API key.",
7-
builder: (yargs: any) =>
8-
yargs
9-
.options({
10-
name: {
11-
alias: 'n',
12-
describe: 'Environment name',
13-
type: 'string'
14-
},
15-
'project-id': {
16-
alias: 'p',
17-
describe: 'Project ID to run the migration script on',
18-
type: 'string'
19-
},
20-
'api-key': {
21-
alias: 'k',
22-
describe: 'Management API key',
23-
type: 'string'
24-
}
25-
})
26-
.demandOption(['project-id', 'api-key', 'name']),
27-
handler: (argv: any) => {
28-
saveEnvironmentConfig(argv.name, argv.projectId, argv.apiKey);
29-
}
30-
};
31-
32-
// yargs needs exported command in exports object
33-
Object.assign(exports, addEnvironmentCommand);
1+
import yargs from 'yargs';
2+
import { saveEnvironmentConfig } from '../../utils/environmentUtils';
3+
4+
const addEnvironmentCommand: yargs.CommandModule = {
5+
command: 'add',
6+
describe: "Creates an environment to run the migrations on. The environment is defined as a named pair of values. For example, a 'DEV' environment can be defined as a pair of specific project ID and Management API key.",
7+
builder: (yargs: any) =>
8+
yargs
9+
.options({
10+
name: {
11+
alias: 'n',
12+
describe: 'Environment name',
13+
type: 'string',
14+
},
15+
'project-id': {
16+
alias: 'p',
17+
describe: 'Project ID to run the migration script on',
18+
type: 'string',
19+
},
20+
'api-key': {
21+
alias: 'k',
22+
describe: 'Management API key',
23+
type: 'string',
24+
},
25+
})
26+
.demandOption(['project-id', 'api-key', 'name']),
27+
handler: (argv: any) => {
28+
saveEnvironmentConfig(argv.name, argv.projectId, argv.apiKey);
29+
},
30+
};
31+
32+
// yargs needs exported command in exports object
33+
Object.assign(exports, addEnvironmentCommand);

0 commit comments

Comments
 (0)