Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

Commit 60183c6

Browse files
committed
fix(commands): Fix error with pass options to object from command
1 parent 29d919a commit 60183c6

9 files changed

Lines changed: 27 additions & 27 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ rucken commands clear prepare link ~~lib lib1
6363
rucken grid --entity-name apple
6464
rucken grid --help
6565
```
66-
### Scaffold
66+
### Scaffold commands
6767

6868
```bash
6969
# generate new application based on rucken template

src/commands/build.command.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class BuildCommand extends BaseCommand {
1414
libs.debug = this.debug;
1515
const result = false;
1616
return await new Promise<boolean>((resolve: any) =>
17-
libs.build(this.options).then((result: boolean) => {
17+
libs.build(options).then((result: boolean) => {
1818
this.log('build').info('Done!');
1919
resolve(true);
2020
}).catch((e: any) => {
@@ -29,7 +29,7 @@ export class BuildCommand extends BaseCommand {
2929
const lib = new Lib(options.folder, options.rootFolder);
3030
lib.debug = this.debug;
3131
return await new Promise<boolean>((resolve: any) =>
32-
lib.build(this.options).then((result: boolean) => {
32+
lib.build(options).then((result: boolean) => {
3333
this.log('build').info('Done!');
3434
resolve(true);
3535
}).catch((e: any) => {
@@ -44,7 +44,7 @@ export class BuildCommand extends BaseCommand {
4444
const apps = new Apps(options.folders, options.rootFolder);
4545
apps.debug = this.debug;
4646
return await new Promise<boolean>((resolve: any) =>
47-
apps.build(this.options).then((result: boolean) => {
47+
apps.build(options).then((result: boolean) => {
4848
this.log('build').info('Done!');
4949
resolve(true);
5050
}).catch((e: any) => {
@@ -59,7 +59,7 @@ export class BuildCommand extends BaseCommand {
5959
const app = new App(options.folder, options.rootFolder);
6060
app.debug = this.debug;
6161
return await new Promise<boolean>((resolve: any) =>
62-
app.build(this.options).then((result: boolean) => {
62+
app.build(options).then((result: boolean) => {
6363
this.log('build').info('Done!');
6464
resolve(true);
6565
}).catch((e: any) => {

src/commands/clear.command.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class ClearCommand extends BaseCommand {
1313
const libs = new Libs(options.folders, options.rootFolder);
1414
libs.debug = this.debug;
1515
return await new Promise<boolean>((resolve: any) =>
16-
libs.clear(this.options).then((result: boolean) => {
16+
libs.clear(options).then((result: boolean) => {
1717
this.log('clear').info('Done!');
1818
resolve(true);
1919
}).catch((e: any) => {
@@ -28,7 +28,7 @@ export class ClearCommand extends BaseCommand {
2828
const lib = new Lib(options.folder, options.rootFolder);
2929
lib.debug = this.debug;
3030
return await new Promise<boolean>((resolve: any) =>
31-
lib.clear(this.options).then((result: boolean) => {
31+
lib.clear(options).then((result: boolean) => {
3232
this.log('clear').info('Done!');
3333
resolve(true);
3434
}).catch((e: any) => {
@@ -43,7 +43,7 @@ export class ClearCommand extends BaseCommand {
4343
const apps = new Apps(options.folders, options.rootFolder);
4444
apps.debug = this.debug;
4545
return await new Promise<boolean>((resolve: any) =>
46-
apps.clear(this.options).then((result: boolean) => {
46+
apps.clear(options).then((result: boolean) => {
4747
this.log('clear').info('Done!');
4848
resolve(true);
4949
}).catch((e: any) => {
@@ -58,7 +58,7 @@ export class ClearCommand extends BaseCommand {
5858
const app = new App(options.folder, options.rootFolder);
5959
app.debug = this.debug;
6060
return await new Promise<boolean>((resolve: any) =>
61-
app.clear(this.options).then((result: boolean) => {
61+
app.clear(options).then((result: boolean) => {
6262
this.log('clear').info('Done!');
6363
resolve(true);
6464
}).catch((e: any) => {

src/commands/link-npm.command.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class LinkNpmCommand extends BaseCommand {
1313
const libs = new Libs(options.folders, options.rootFolder);
1414
libs.debug = this.debug;
1515
return await new Promise<boolean>((resolve: any) =>
16-
libs.linkNpm(this.options).then((result: boolean) => {
16+
libs.linkNpm(options).then((result: boolean) => {
1717
this.log('link-npm').info('Done!');
1818
resolve(true);
1919
}).catch((e: any) => {
@@ -28,7 +28,7 @@ export class LinkNpmCommand extends BaseCommand {
2828
const lib = new Lib(options.folder, options.rootFolder);
2929
lib.debug = this.debug;
3030
return await new Promise<boolean>((resolve: any) =>
31-
lib.linkNpm(this.options).then((result: boolean) => {
31+
lib.linkNpm(options).then((result: boolean) => {
3232
this.log('link-npm').info('Done!');
3333
resolve(true);
3434
}).catch((e: any) => {
@@ -43,7 +43,7 @@ export class LinkNpmCommand extends BaseCommand {
4343
const apps = new Apps(options.folders, options.rootFolder);
4444
apps.debug = this.debug;
4545
return await new Promise<boolean>((resolve: any) =>
46-
apps.linkNpm(this.options).then((result: boolean) => {
46+
apps.linkNpm(options).then((result: boolean) => {
4747
this.log('link-npm').info('Done!');
4848
resolve(true);
4949
}).catch((e: any) => {
@@ -58,7 +58,7 @@ export class LinkNpmCommand extends BaseCommand {
5858
const app = new App(options.folder, options.rootFolder);
5959
app.debug = this.debug;
6060
return await new Promise<boolean>((resolve: any) =>
61-
app.linkNpm(this.options).then((result: boolean) => {
61+
app.linkNpm(options).then((result: boolean) => {
6262
this.log('link-npm').info('Done!');
6363
resolve(true);
6464
}).catch((e: any) => {

src/commands/link.command.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class LinkCommand extends BaseCommand {
1313
const libs = new Libs(options.folders, options.rootFolder);
1414
libs.debug = this.debug;
1515
return await new Promise<boolean>((resolve: any) =>
16-
libs.link(this.options).then((result: boolean) => {
16+
libs.link(options).then((result: boolean) => {
1717
this.log('link').info('Done!');
1818
resolve(true);
1919
}).catch((e: any) => {
@@ -28,7 +28,7 @@ export class LinkCommand extends BaseCommand {
2828
const lib = new Lib(options.folder, options.rootFolder);
2929
lib.debug = this.debug;
3030
return await new Promise<boolean>((resolve: any) =>
31-
lib.link(this.options).then((result: boolean) => {
31+
lib.link(options).then((result: boolean) => {
3232
this.log('link').info('Done!');
3333
resolve(true);
3434
}).catch((e: any) => {
@@ -43,7 +43,7 @@ export class LinkCommand extends BaseCommand {
4343
const apps = new Apps(options.folders, options.rootFolder);
4444
apps.debug = this.debug;
4545
return await new Promise<boolean>((resolve: any) =>
46-
apps.link(this.options).then((result: boolean) => {
46+
apps.link(options).then((result: boolean) => {
4747
this.log('link').info('Done!');
4848
resolve(true);
4949
}).catch((e: any) => {
@@ -58,7 +58,7 @@ export class LinkCommand extends BaseCommand {
5858
const app = new App(options.folder, options.rootFolder);
5959
app.debug = this.debug;
6060
return await new Promise<boolean>((resolve: any) =>
61-
app.link(this.options).then((result: boolean) => {
61+
app.link(options).then((result: boolean) => {
6262
this.log('link').info('Done!');
6363
resolve(true);
6464
}).catch((e: any) => {

src/commands/make-ts-list.command.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class MakeTsListCommand extends BaseCommand {
1313
const libs = new Libs(options.folders, options.rootFolder);
1414
libs.debug = this.debug;
1515
return await new Promise<boolean>((resolve: any) =>
16-
libs.makeTsList(this.options).then((result: boolean) => {
16+
libs.makeTsList(options).then((result: boolean) => {
1717
this.log('make-ts-list').info('Done!');
1818
resolve(true);
1919
}).catch((e: any) => {
@@ -28,7 +28,7 @@ export class MakeTsListCommand extends BaseCommand {
2828
const lib = new Lib(options.folder, options.rootFolder);
2929
lib.debug = this.debug;
3030
return await new Promise<boolean>((resolve: any) =>
31-
lib.makeTsList(this.options).then((result: boolean) => {
31+
lib.makeTsList(options).then((result: boolean) => {
3232
this.log('make-ts-list').info('Done!');
3333
resolve(true);
3434
}).catch((e: any) => {
@@ -43,7 +43,7 @@ export class MakeTsListCommand extends BaseCommand {
4343
const apps = new Apps(options.folders, options.rootFolder);
4444
apps.debug = this.debug;
4545
return await new Promise<boolean>((resolve: any) =>
46-
apps.makeTsList(this.options).then((result: boolean) => {
46+
apps.makeTsList(options).then((result: boolean) => {
4747
this.log('make-ts-list').info('Done!');
4848
resolve(true);
4949
}).catch((e: any) => {
@@ -58,7 +58,7 @@ export class MakeTsListCommand extends BaseCommand {
5858
const app = new App(options.folder, options.rootFolder);
5959
app.debug = this.debug;
6060
return await new Promise<boolean>((resolve: any) =>
61-
app.makeTsList(this.options).then((result: boolean) => {
61+
app.makeTsList(options).then((result: boolean) => {
6262
this.log('make-ts-list').info('Done!');
6363
resolve(true);
6464
}).catch((e: any) => {

src/commands/prepare.command.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class PrepareCommand extends BaseCommand {
1313
const libs = new Libs(options.folders, options.rootFolder);
1414
libs.debug = this.debug;
1515
return await new Promise<boolean>((resolve: any) =>
16-
libs.prepare(this.options).then((result: boolean) => {
16+
libs.prepare(options).then((result: boolean) => {
1717
this.log('prepare').info('Done!');
1818
resolve(true);
1919
}).catch((e: any) => {
@@ -28,7 +28,7 @@ export class PrepareCommand extends BaseCommand {
2828
const lib = new Lib(options.folder, options.rootFolder);
2929
lib.debug = this.debug;
3030
return await new Promise<boolean>((resolve: any) =>
31-
lib.prepare(this.options).then((result: boolean) => {
31+
lib.prepare(options).then((result: boolean) => {
3232
this.log('prepare').info('Done!');
3333
resolve(true);
3434
}).catch((e: any) => {
@@ -43,7 +43,7 @@ export class PrepareCommand extends BaseCommand {
4343
const apps = new Apps(options.folders, options.rootFolder);
4444
apps.debug = this.debug;
4545
return await new Promise<boolean>((resolve: any) =>
46-
apps.prepare(this.options).then((result: boolean) => {
46+
apps.prepare(options).then((result: boolean) => {
4747
this.log('prepare').info('Done!');
4848
resolve(true);
4949
}).catch((e: any) => {
@@ -58,7 +58,7 @@ export class PrepareCommand extends BaseCommand {
5858
const app = new App(options.folder, options.rootFolder);
5959
app.debug = this.debug;
6060
return await new Promise<boolean>((resolve: any) =>
61-
app.prepare(this.options).then((result: boolean) => {
61+
app.prepare(options).then((result: boolean) => {
6262
this.log('prepare').info('Done!');
6363
resolve(true);
6464
}).catch((e: any) => {

src/lib/apps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export class Apps extends Base {
115115
if (!customOptions) {
116116
customOptions = {};
117117
}
118-
customOptions.package = customOptions.packages ? customOptions.packages[i] : null;
118+
customOptions.package = customOptions.packages ? customOptions.packages[i] : customOptions.package;
119119
results.push(await app.prepare(customOptions));
120120
}
121121
return results.reduce((all: boolean, current: boolean) => { return all && current; }, true);

srcgen/web-app-empty/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"@angular/cli": "1.6.0",
5757
"@angular/compiler-cli": "^5.1.0",
5858
"@angular/language-service": "^5.1.0",
59-
"@rucken/cli": "^1.4.1",
59+
"@rucken/cli": "^1.5.1",
6060
"@types/jasmine": "~2.8.2",
6161
"@types/jasminewd2": "~2.0.3",
6262
"@types/node": "~8.0.58",

0 commit comments

Comments
 (0)