nodefony 7.0.0-beta.2 → 7.0.0-beta.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/CHANGELOG.md +534 -8028
  2. package/README.md +33 -30
  3. package/autoloader.es6 +46 -48
  4. package/builder.es6 +66 -76
  5. package/cli/builder/bundles/bundle.js +57 -63
  6. package/cli/builder/bundles/controller.js +34 -38
  7. package/cli/builder/bundles/users-bundle/Command/fixtureTask.js +11 -12
  8. package/cli/builder/bundles/users-bundle/Command/usersCommand.js +23 -24
  9. package/cli/builder/bundles/users-bundle/Entity/mongoose/userEntity.js +25 -30
  10. package/cli/builder/bundles/users-bundle/Entity/sequelize/userEntity.js +42 -31
  11. package/cli/builder/bundles/users-bundle/Fixtures/users.js +24 -26
  12. package/cli/builder/bundles/users-bundle/Fixtures/usersFixtures.js +28 -29
  13. package/cli/builder/bundles/users-bundle/Resources/config/config.js +4 -3
  14. package/cli/builder/bundles/users-bundle/Resources/config/routing.js +2 -2
  15. package/cli/builder/bundles/users-bundle/Resources/config/security.js +9 -8
  16. package/cli/builder/bundles/users-bundle/Resources/config/webpack/webpack.dev.config.js +3 -3
  17. package/cli/builder/bundles/users-bundle/Resources/config/webpack/webpack.prod.config.js +4 -3
  18. package/cli/builder/bundles/users-bundle/Resources/config/webpack.config.js +74 -75
  19. package/cli/builder/bundles/users-bundle/Resources/scss/awesome/font-awesome.config.js +9 -9
  20. package/cli/builder/bundles/users-bundle/Resources/swagger/openapi/login.js +13 -13
  21. package/cli/builder/bundles/users-bundle/Resources/swagger/openapi/users.js +14 -14
  22. package/cli/builder/bundles/users-bundle/controller/api/graphql/graphqlController.js +13 -15
  23. package/cli/builder/bundles/users-bundle/controller/api/graphql/userResolver.js +29 -29
  24. package/cli/builder/bundles/users-bundle/controller/api/graphql/usertype.js +2 -2
  25. package/cli/builder/bundles/users-bundle/controller/api/openapi/loginApiController.js +34 -36
  26. package/cli/builder/bundles/users-bundle/controller/api/openapi/restUserController.js +32 -36
  27. package/cli/builder/bundles/users-bundle/controller/loginController.js +30 -34
  28. package/cli/builder/bundles/users-bundle/controller/usersController.js +54 -60
  29. package/cli/builder/bundles/users-bundle/package.json +27 -25
  30. package/cli/builder/bundles/users-bundle/pnpm-lock.yaml +4262 -0
  31. package/cli/builder/bundles/users-bundle/readme.md +7 -7
  32. package/cli/builder/bundles/users-bundle/services/usersService.js +97 -102
  33. package/cli/builder/bundles/users-bundle/src/providers/mongoose/userProvider.js +6 -8
  34. package/cli/builder/bundles/users-bundle/src/providers/sequelize/userProvider.js +9 -10
  35. package/cli/builder/bundles/users-bundle/tests/loginTest.js +119 -70
  36. package/cli/builder/bundles/users-bundle/usersBundle.js +2 -3
  37. package/cli/builder/microService/microService.js +139 -141
  38. package/cli/builder/microService/skeletons/package.json +23 -22
  39. package/cli/builder/project/project.js +228 -181
  40. package/cli/builder/project/skeletons/README.md +33 -30
  41. package/cli/builder/project/skeletons/bin/dev-deploy.sh +5 -0
  42. package/cli/builder/project/skeletons/bin/prod-deploy.sh +3 -0
  43. package/cli/builder/project/skeletons/config/config.js.skeleton +1 -0
  44. package/cli/builder/project/skeletons/config/pm2.config.js.skeleton +41 -17
  45. package/cli/builder/project/skeletons/eslintignore.skeleton +15 -0
  46. package/cli/builder/project/skeletons/eslintrc.js.skeleton +97 -0
  47. package/cli/builder/project/skeletons/gitignore.skeleton +1 -0
  48. package/cli/builder/project/skeletons/migrations/2022.12.25T17.37.37.entity-user.js +137 -0
  49. package/cli/builder/project/skeletons/migrations/2022.12.25T17.37.38.entity-session.js +97 -0
  50. package/cli/builder/project/skeletons/migrations/2022.12.25T17.37.39.entity-requests.js +115 -0
  51. package/cli/builder/project/skeletons/migrations/2022.12.25T17.37.40.entity-jwts.js +97 -0
  52. package/cli/builder/project/skeletons/migrations/migrations.skeleton.js +0 -2
  53. package/cli/builder/project/skeletons/package.json.twig +70 -0
  54. package/cli/builder/react/reactBuilder.js +59 -65
  55. package/cli/builder/sandbox/sandBoxBuilder.js +132 -134
  56. package/cli/builder/skeletons/app/appKernel.js +120 -2
  57. package/cli/builder/skeletons/config/config.js +1 -1
  58. package/cli/builder/skeletons/config/nodefony/framework-bundle.js +2 -1
  59. package/cli/builder/skeletons/config/nodefony/http-bundle.js +1 -0
  60. package/cli/builder/skeletons/config/nodefony/mongoose-bundle.js +38 -12
  61. package/cli/builder/skeletons/config/nodefony/monitoring-bundle.js +21 -2
  62. package/cli/builder/skeletons/config/nodefony/sequelize-bundle.js +122 -13
  63. package/cli/builder/skeletons/package.json.twig +57 -0
  64. package/cli/builder/skeletons/unittest/testFile.js +44 -45
  65. package/cli/builder/vue/skeletons/vue.config.js +84 -10
  66. package/cli/builder/vue/vueBuilder.js +116 -114
  67. package/cli/generate/generate.es6 +38 -39
  68. package/cli/install/install.js +45 -58
  69. package/cli/sequelize/sequelize.js +50 -39
  70. package/cli/start.js +353 -347
  71. package/cli/tools/pm2.es6 +55 -57
  72. package/cli/tools/tools.es6 +36 -37
  73. package/cli.es6 +280 -228
  74. package/container.es6 +51 -59
  75. package/error.es6 +25 -27
  76. package/fileClass.es6 +53 -55
  77. package/finder/file.es6 +5 -4
  78. package/finder/fileResult.es6 +23 -22
  79. package/finder/finder2.es6 +46 -54
  80. package/finder.es6 +88 -97
  81. package/kernel/annotations/annotations.es6 +44 -46
  82. package/kernel/api/api.es6 +6 -8
  83. package/kernel/api/graphqlApi.es6 +21 -21
  84. package/kernel/api/jsonApi.es6 +40 -45
  85. package/kernel/api/openApi.es6 +9 -11
  86. package/kernel/api/schemas/openApiSchema.js +61 -32
  87. package/kernel/babylon.es6 +31 -38
  88. package/kernel/bundle.es6 +252 -220
  89. package/kernel/cliKernel.es6 +157 -170
  90. package/kernel/command.es6 +17 -20
  91. package/kernel/commands/nodefonyCommand.es6 +111 -58
  92. package/kernel/commands/tasks/bundlesTask.es6 +14 -19
  93. package/kernel/controllers/controller.es6 +167 -180
  94. package/kernel/fixture.es6 +4 -7
  95. package/kernel/injections/injections.es6 +97 -103
  96. package/kernel/kernel.es6 +476 -384
  97. package/kernel/kernelWatcher.es6 +64 -54
  98. package/kernel/orm/entity.es6 +10 -12
  99. package/kernel/orm/orm.es6 +68 -48
  100. package/kernel/reader.es6 +45 -47
  101. package/kernel/security/encoder.es6 +8 -6
  102. package/kernel/security/factories/factory.es6 +34 -37
  103. package/kernel/security/factories/passeportFactory.es6 +13 -14
  104. package/kernel/security/provider.es6 +11 -13
  105. package/kernel/security/providers/chainProvider.es6 +13 -28
  106. package/kernel/security/providers/memoryProvider.es6 +7 -11
  107. package/kernel/security/providers/providerManager.es6 +11 -14
  108. package/kernel/security/providers/userEntityProvider.es6 +7 -8
  109. package/kernel/security/role.es6 +3 -3
  110. package/kernel/security/secureArea.es6 +143 -149
  111. package/kernel/security/tokens/token.es6 +30 -32
  112. package/kernel/security/user.es6 +19 -19
  113. package/kernel/serviceRealTime.es6 +5 -7
  114. package/kernel/services/connectionsService.es6 +20 -22
  115. package/kernel/services/cron/cronService.es6 +14 -16
  116. package/kernel/task.es6 +20 -26
  117. package/kernel/templates.es6 +4 -5
  118. package/kernel/templating/twig.es6 +56 -47
  119. package/kernel/tests/cliTest.js +7 -11
  120. package/kernel/tests/containerTest.js +25 -37
  121. package/kernel/tests/kernelTest.js +9 -16
  122. package/nodefony.es6 +279 -256
  123. package/notificationsCenter.es6 +28 -20
  124. package/package.json +40 -40
  125. package/protocol.es6 +19 -21
  126. package/protocols/bayeux.es6 +35 -38
  127. package/protocols/jsonRpc/jsonrpc.es6 +12 -14
  128. package/result.es6 +11 -12
  129. package/service.es6 +62 -62
  130. package/syslog/pdu.es6 +99 -91
  131. package/syslog/syslog.es6 +101 -102
  132. package/watcher.es6 +21 -20
  133. package/cli/builder/project/skeletons/jshintignore.skeleton +0 -1
  134. package/cli/builder/project/skeletons/jshintrc.skeleton +0 -60
  135. package/cli/builder/project/skeletons/package.json.skeleton +0 -52
  136. package/cli/builder/skeletons/package.json +0 -61
@@ -1,6 +1,5 @@
1
1
  class Command extends nodefony.Service {
2
-
3
- constructor(name, cli, bundle) {
2
+ constructor (name, cli, bundle) {
4
3
  super(name, cli.container);
5
4
  if (bundle) {
6
5
  this.bundleName = bundle.name;
@@ -12,24 +11,22 @@ class Command extends nodefony.Service {
12
11
  this.optionsTables = this.cli.optionsTables;
13
12
  }
14
13
 
15
- showBanner() {
16
- return this.cli.asciify(" " + this.name)
14
+ showBanner () {
15
+ return this.cli.asciify(` ${this.name}`)
17
16
  .then((data) => {
18
17
  if (this.json) {
19
18
  return data;
20
19
  }
21
20
  this.cli.clear();
22
- let color = this.cli.clc.blueBright.bold;
21
+ const color = this.cli.clc.blueBright.bold;
23
22
  console.log(color(data));
24
23
  this.cli.blankLine();
25
24
  return data;
26
25
  })
27
- .catch((e) => {
28
- return e;
29
- });
26
+ .catch((e) => e);
30
27
  }
31
28
 
32
- logger(pci, severity, msgid, msg) {
29
+ logger (pci, severity, msgid, msg) {
33
30
  try {
34
31
  if (!msgid) {
35
32
  msgid = `COMMAND ${this.name}`;
@@ -40,39 +37,39 @@ class Command extends nodefony.Service {
40
37
  }
41
38
  }
42
39
 
43
- showHelp(help = "") {
44
- for (let mytask in this.tasks) {
40
+ showHelp (help = "") {
41
+ for (const mytask in this.tasks) {
45
42
  this.tasks[mytask].showHelp();
46
43
  }
47
44
  return help;
48
45
  }
49
46
 
50
- setTask(name, task) {
47
+ setTask (name, task) {
51
48
  try {
52
49
  if (task) {
53
- let instance = new task(name, this);
50
+ const instance = new task(name, this);
54
51
  if (instance instanceof nodefony.Task) {
55
52
  return this.tasks[instance.name] = instance;
56
53
  }
57
- throw new Error(`Command setTask must be instance of nodefony.Task class`);
54
+ throw new Error("Command setTask must be instance of nodefony.Task class");
58
55
  }
59
- throw new Error(`Command setTask must register nodefony.Task class`);
56
+ throw new Error("Command setTask must register nodefony.Task class");
60
57
  } catch (e) {
61
58
  throw e;
62
59
  }
63
60
  }
64
61
 
65
- getTask(name) {
62
+ getTask (name) {
66
63
  return this.tasks[name];
67
64
  }
68
65
 
69
- setHelp(command, descrption) {
66
+ setHelp (command, descrption) {
70
67
  this.cli.displayTable([
71
- ["", this.cli.clc.green(command), descrption]
72
- ], this.optionsTables);
68
+ ["", this.cli.clc.green(command), descrption]
69
+ ], this.optionsTables);
73
70
  }
74
71
 
75
- terminate(code) {
72
+ terminate (code) {
76
73
  return this.cli.terminate(code);
77
74
  }
78
75
  }
@@ -1,55 +1,64 @@
1
- module.exports = nodefony.register.call(nodefony.commands, "nodefony", function () {
2
-
1
+ // eslint-disable-next-line max-lines-per-function
2
+ module.exports = nodefony.register.call(nodefony.commands, "nodefony", () => {
3
3
  class nodefonyCommand extends nodefony.Command {
4
-
5
- constructor(cli, kernel) {
4
+ constructor (cli, kernel) {
6
5
  super("nodefony", cli, kernel);
7
6
  this.setTask("bundles", require(path.resolve(__dirname, "tasks", "bundlesTask.es6")));
8
7
  }
9
8
 
10
- showHelp() {
9
+ showHelp () {
11
10
  return super.showHelp();
12
11
  }
13
12
 
14
- async install(cwd) {
13
+ async install (cwd, args = []/* , interactive = false*/) {
15
14
  try {
15
+ let strategy = null;
16
+ let force = false;
17
+ if (!args) {
18
+ args = [];
19
+ }
20
+ if (args.includes("migrate")) {
21
+ strategy = "migrate";
22
+ }
23
+ if (args.includes("sync")) {
24
+ strategy = "sync";
25
+ }
26
+ if (args.includes("force")) {
27
+ force = true;
28
+ }
16
29
  this.log("INSTALL NODEFONY FRAMEWORK");
17
- return await this.displayInfo(cwd);
30
+ return await this.installOrm(force, strategy)
31
+ .catch((e) => {
32
+ throw e;
33
+ });
34
+ // return await this.displayInfo(cwd);
18
35
  } catch (error) {
19
36
  this.log(error, "ERROR");
20
37
  throw error;
21
38
  }
22
39
  }
23
40
 
24
- async build(cwd) {
25
- try {
26
- this.log("BUILD NODEFONY FRAMEWORK");
27
- await this.installOrm();
28
- return this.displayInfo(cwd);
29
- } catch (error) {
30
- this.log(error, "ERROR");
31
- throw error;
32
- }
41
+ build (cwd, args = [], interactive = false) {
42
+ this.log("BUILD NODEFONY FRAMEWORK");
43
+ return this.install(cwd, args, interactive);
33
44
  }
34
45
 
35
- async rebuild(cwd) {
46
+ rebuild (cwd /* args , interactive = false*/) {
36
47
  try {
37
- //await this.listPackage(cwd);
48
+ // await this.listPackage(cwd);
38
49
  return cwd;
39
50
  } catch (e) {
40
51
  throw e;
41
52
  }
42
53
  }
43
54
 
44
- installOrm(force = false) {
55
+ installOrm (force = false, strategy = null) {
45
56
  this.log("INITIALIZE ORM");
46
57
  this.orm = this.cli.kernel.getOrm();
47
58
  switch (this.orm) {
48
59
  case "sequelize":
49
- return this.installSequelize(force)
50
- .then(() => {
51
- return this.generateSequelizeFixture();
52
- }).catch((e) => {
60
+ return this.installSequelize(force, strategy || this.cli.kernel.getOrmStrategy())
61
+ .catch((e) => {
53
62
  throw e;
54
63
  });
55
64
  case "mongoose":
@@ -58,49 +67,97 @@ module.exports = nodefony.register.call(nodefony.commands, "nodefony", function
58
67
  throw e;
59
68
  });
60
69
  default:
61
- throw new Error(`ORM not defined : $(this.orm)`);
70
+ throw new Error("ORM not defined : $(this.orm)");
62
71
  }
63
72
  }
64
73
 
65
- async installSequelize(force = false) {
74
+ async installSequelize (force = false, strategy = "migrate") {
66
75
  this.log("INITIALIZE SEQUELIZE");
67
76
  let command = null;
68
77
  let task = null;
78
+ let res = null;
69
79
  try {
70
80
  command = this.cli.getCommand("sequelize", "sequelize");
71
81
  task = command.getTask("create");
72
- await task.database();
82
+ res = await task.database()
83
+ .catch((e) => {
84
+ throw e;
85
+ });
73
86
  } catch (e) {
74
87
  this.log(e, "WARNING");
75
88
  }
89
+ if (!force && strategy === "none") {
90
+ return res;
91
+ }
76
92
  try {
77
93
  command = this.cli.getCommand("sequelize", "sequelize");
78
- task = command.getTask("sync");
79
- return await task.entities(force);
94
+ // with migrate
95
+ if (!force && strategy === "migrate") {
96
+ task = command.getTask("migrate");
97
+ await task.up()
98
+ .catch((e) => {
99
+ throw e;
100
+ });
101
+ await task.status()
102
+ .catch((e) => {
103
+ throw e;
104
+ });
105
+ task = command.getTask("sync");
106
+ await task.entities({force}, true)
107
+ .catch((e) => {
108
+ throw e;
109
+ });
110
+ task = command.getTask("seedeers");
111
+ await task.up()
112
+ .catch((e) => {
113
+ throw e;
114
+ });
115
+ return await task.status()
116
+ .catch((e) => {
117
+ throw e;
118
+ });
119
+ }
120
+ // with sysnc
121
+ if (strategy === "sync") {
122
+ task = command.getTask("sync");
123
+ await task.entities({force}, true)
124
+ .catch((e) => {
125
+ throw e;
126
+ });
127
+ task = command.getTask("seedeers");
128
+ await task.up()
129
+ .catch((e) => {
130
+ throw e;
131
+ });
132
+ return await task.status()
133
+ .catch((e) => {
134
+ throw e;
135
+ });
136
+ }
80
137
  } catch (e) {
81
138
  this.log(e, "ERROR");
82
139
  throw e;
83
140
  }
84
141
  }
85
142
 
86
- async generateSequelizeFixture() {
143
+ async generateSequelizeFixture () {
87
144
  try {
88
145
  this.log("Generate Sequelize Fixtures");
89
- let command = this.cli.getCommand("users", "users");
90
- let task = command.getTask("fixtures");
146
+ const command = this.cli.getCommand("users", "users");
147
+ const task = command.getTask("fixtures");
91
148
  return await task.default();
92
149
  } catch (e) {
93
150
  throw e;
94
151
  }
95
152
  }
96
153
 
97
- async installMongoose() {
154
+ async installMongoose () {
98
155
  try {
99
156
  this.log("INITIALIZE Mongoose");
100
157
  this.log("Generate Mongoose Fixtures");
101
158
  if (this.kernel.bundles.users) {
102
- let command = this.cli.getCommand("users", "users");
103
- let task = command.getTask("fixtures");
159
+ const command = this.cli.getCommand("users", "users");
160
+ const task = command.getTask("fixtures");
104
161
  return await task.default();
105
162
  }
106
163
  return true;
@@ -109,10 +166,10 @@ module.exports = nodefony.register.call(nodefony.commands, "nodefony", function
109
166
  }
110
167
  }
111
168
 
112
- async outdated() {
169
+ async outdated () {
113
170
  try {
114
171
  this.log("PACKAGES OUTDATED");
115
- let args = [];
172
+ const args = [];
116
173
  let trunk = null;
117
174
  if (this.cli.kernel.isCore) {
118
175
  trunk = path.resolve(".", "package.json");
@@ -126,47 +183,43 @@ module.exports = nodefony.register.call(nodefony.commands, "nodefony", function
126
183
  this.log(`Check Outdated trunk : ${trunk}`);
127
184
  args.push(new nodefony.fileClass(trunk));
128
185
  }
129
- for (let bundle in this.cli.kernel.bundles) {
186
+ for (const bundle in this.cli.kernel.bundles) {
130
187
  if (nodefony.isCore) {
131
188
  this.log(`Check Outdated Bundle : ${this.cli.kernel.bundles[bundle].name}`);
132
189
  args.push(this.cli.kernel.bundles[bundle]);
133
- } else {
134
- if (!this.cli.kernel.isBundleCore(bundle)) {
135
- this.log(`Check Outdated ${this.cli.kernel.bundles[bundle].name}`);
136
- args.push(this.cli.kernel.bundles[bundle]);
137
- }
190
+ } else if (!this.cli.kernel.isBundleCore(bundle)) {
191
+ this.log(`Check Outdated ${this.cli.kernel.bundles[bundle].name}`);
192
+ args.push(this.cli.kernel.bundles[bundle]);
138
193
  }
139
194
  }
140
- let task = this.getTask("bundles");
195
+ const task = this.getTask("bundles");
141
196
  return await task.outdated.apply(task, args);
142
197
  } catch (e) {
143
198
  throw e;
144
199
  }
145
200
  }
146
201
 
147
- displayInfo(cwd) {
202
+ displayInfo (cwd) {
148
203
  return this.listRouting()
149
- .then(() => {
150
- return this.matchHomeRoute("/")
151
- .then(() => {
152
- return cwd
153
- /*return this.listPackage(cwd)
204
+ .then(() => this.matchHomeRoute("/")
205
+ .then(() => cwd
206
+
207
+ /* return this.listPackage(cwd)
154
208
  .then(() => {
155
209
  return cwd;
156
210
  });*/
157
- });
158
- });
211
+ ));
159
212
  }
160
213
 
161
- listPackage(cwd) {
214
+ listPackage (cwd) {
162
215
  return this.cli.listPackage(cwd);
163
216
  }
164
217
 
165
- async matchHomeRoute(route) {
218
+ async matchHomeRoute (route) {
166
219
  this.log("ROUTING LIST ");
167
220
  try {
168
- let command = this.cli.getCommand("router", "framework");
169
- let task = command.getTask("display");
221
+ const command = this.cli.getCommand("router", "framework");
222
+ const task = command.getTask("display");
170
223
  if (task) {
171
224
  return await task.match(route || "/");
172
225
  }
@@ -176,11 +229,11 @@ module.exports = nodefony.register.call(nodefony.commands, "nodefony", function
176
229
  }
177
230
  }
178
231
 
179
- async listRouting() {
232
+ async listRouting () {
180
233
  try {
181
234
  this.log("ROUTING LIST ");
182
- let command = this.cli.getCommand("router", "framework");
183
- let task = command.getTask("display");
235
+ const command = this.cli.getCommand("router", "framework");
236
+ const task = command.getTask("display");
184
237
  if (task) {
185
238
  return await task.routes();
186
239
  }
@@ -1,11 +1,11 @@
1
1
  module.exports = class bundlesTask extends nodefony.Task {
2
-
3
- constructor(name, command) {
2
+ constructor (name, command) {
4
3
  super(name, command);
5
4
  }
6
5
 
7
- showHelp() {
8
- /*this.setHelp("nodefony:bundles:listDependencies",
6
+ showHelp () {
7
+
8
+ /* this.setHelp("nodefony:bundles:listDependencies",
9
9
  "List Nodefony dependencies"
10
10
  );
11
11
  this.setHelp("nodefony:bundles:install [environment]",
@@ -13,22 +13,20 @@ module.exports = class bundlesTask extends nodefony.Task {
13
13
  );*/
14
14
  }
15
15
 
16
- /*async dependencies() {
16
+ /* async dependencies() {
17
17
  return await this.cli.listPackage(this.kernel.rootDir);
18
18
  }*/
19
19
 
20
- async install(...args) {
20
+ async install (...args) {
21
21
  try {
22
22
  for (let i = 0; i < args.length; i++) {
23
23
  if (args[i] instanceof nodefony.fileClass || args[i] instanceof nodefony.Bundle) {
24
24
  if (this.kernel.isCore) {
25
- //mypromise.push(this.cli.installPackage(args[i], this.kernel.environment));
25
+ // mypromise.push(this.cli.installPackage(args[i], this.kernel.environment));
26
+ await this.cli.installPackage(args[i], this.kernel.environment);
27
+ } else if (!this.kernel.isBundleCore(args[i].name)) {
28
+ // mypromise.push(this.cli.installPackage(args[i], this.kernel.environment));
26
29
  await this.cli.installPackage(args[i], this.kernel.environment);
27
- } else {
28
- if (!this.kernel.isBundleCore(args[i].name)) {
29
- //mypromise.push(this.cli.installPackage(args[i], this.kernel.environment));
30
- await this.cli.installPackage(args[i], this.kernel.environment);
31
- }
32
30
  }
33
31
  }
34
32
  }
@@ -39,26 +37,23 @@ module.exports = class bundlesTask extends nodefony.Task {
39
37
  this.log("Install success");
40
38
  }
41
39
 
42
- async outdated(...args) {
40
+ async outdated (...args) {
43
41
  for (let i = 0; i < args.length; i++) {
44
42
  if (args[i] instanceof nodefony.fileClass || args[i] instanceof nodefony.Bundle) {
45
43
  if (this.kernel.isCore) {
46
44
  await this.cli.outdatedPackage(args[i]);
47
- } else {
48
- if (!this.kernel.isBundleCore(args[i].name)) {
49
- await this.cli.outdatedPackage(args[i]);
50
- }
45
+ } else if (!this.kernel.isBundleCore(args[i].name)) {
46
+ await this.cli.outdatedPackage(args[i]);
51
47
  }
52
48
  }
53
49
  }
54
50
  }
55
51
 
56
- async rebuild(...args) {
52
+ async rebuild (...args) {
57
53
  for (let i = 0; i < args.length; i++) {
58
54
  if (args[i] instanceof nodefony.fileClass || args[i] instanceof nodefony.Bundle) {
59
55
  await this.cli.rebuildPackage(args[i]);
60
56
  }
61
57
  }
62
58
  }
63
-
64
59
  };