Skip to content

Commit 3527ee5

Browse files
committed
Refreshed from upstream, fixed import and export
1 parent 2282b4c commit 3527ee5

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"commander": "^8.3.0"
2828
},
2929
"dependencies": {
30+
"commander": "^8.3.0",
3031
"formdata-node": "^6.0.3",
3132
"https-proxy-agent": "^7.0.4",
3233
"log4js": "^6.9.1",

wmiocli.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -425,12 +425,21 @@ program.command('project-triggers-delete <project-id> <trigger-id>')
425425

426426

427427

428-
program.command('project-export <project-id>')
428+
program.command('project-export <project-id> <filename>')
429429
.description('Exports a project')
430-
.action((projectId) => {
430+
.action((projectId, filename) => {
431+
checkOptions();
432+
project.init(tenantDomain, tenantUser, tenantPw, program.opts().timeout, program.opts().prettyprint)
433+
project.exportProj(projectId, filename);
434+
});
435+
436+
437+
program.command('project-import <filename> <projectname>')
438+
.description('Imports a project')
439+
.action((filename, projectname) => {
431440
checkOptions();
432441
project.init(tenantDomain, tenantUser, tenantPw, program.opts().timeout, program.opts().prettyprint)
433-
project.exportProj(projectId);
442+
project.importProj(filename, projectname);
434443
});
435444

436445
/**

0 commit comments

Comments
 (0)