nodefony 7.0.0-beta.2 → 7.0.0-beta.3
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.
- package/CHANGELOG.md +101 -0
- package/cli/builder/project/skeletons/package.json.skeleton +1 -0
- package/kernel/kernel.es6 +170 -166
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,106 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v7.0.0-beta.3 (01/01/1970)
|
|
4
|
+
- [chore(release): nodefony release 7.0.0-beta.3](https://github.com/nodefony/nodefony/commit/e0c817261530a294306b6cabf6b09f0ffa57803f)
|
|
5
|
+
- [fix(build): mv dev deps from deps monitoring | add graphql deps on root](https://github.com/nodefony/nodefony/commit/f0b152058409b6373d3a877d36a55390f149a9f6)
|
|
6
|
+
- [fix(monitoring): change path bundle when not nodefony core](https://github.com/nodefony/nodefony/commit/36796d810b8d1662cbb0748c63162183616427a8)
|
|
7
|
+
- [docs(changelog): nodefony changelog 7.0.0-beta.2](https://github.com/nodefony/nodefony/commit/c5b4d4e1a256170098377949046e4176c6cd55b3)
|
|
8
|
+
- [chore(release): nodefony release 7.0.0-beta.2](https://github.com/nodefony/nodefony/commit/e75a094f6a0f7515ddb9399e14058bd8872a28ad)
|
|
9
|
+
- [build: add deps monitoring](https://github.com/nodefony/nodefony/commit/d612a00456de6fd33839b2dcfa14d06874c21cfc)
|
|
10
|
+
- [fix(sequelize): get nodefony instance](https://github.com/nodefony/nodefony/commit/56826406bc5040feee7e6065c8f5d4585b1838d4)
|
|
11
|
+
- [docs(changelog): nodefony changelog 7.0.0-beta.1](https://github.com/nodefony/nodefony/commit/05bbf9395714793cfc41f7e2f706aea2533413a0)
|
|
12
|
+
- [chore(release): nodefony release 7.0.0-beta.1](https://github.com/nodefony/nodefony/commit/410c474ef0b5f2d8c316d1b3712a6e8b39bad258)
|
|
13
|
+
- [buil: upgrade deps](https://github.com/nodefony/nodefony/commit/1e77114e9c1b979840f4ff22417cebd3abbc610d)
|
|
14
|
+
- [docs(changelog): nodefony changelog 7.0.0-beta.0](https://github.com/nodefony/nodefony/commit/339ef5883709099a2e795c0711d92b3f53171505)
|
|
15
|
+
- [chore(release): nodefony release 7.0.0-beta.0](https://github.com/nodefony/nodefony/commit/47de4aa7b96202508c1a1aa1f7b91f247c95c2ce)
|
|
16
|
+
- [fix: debug readme](https://github.com/nodefony/nodefony/commit/c0fa3996348a24cf37efb53c1529f47a37d25948)
|
|
17
|
+
- [fix: debug readme](https://github.com/nodefony/nodefony/commit/043229054e70af556b3f63bf877a29a994e865c7)
|
|
18
|
+
- [build: upgrade deps](https://github.com/nodefony/nodefony/commit/b0f6f77072b4ee50bf67f70f342f2e6c7797e39f)
|
|
19
|
+
- [fix(monitoring): debug monitoring](https://github.com/nodefony/nodefony/commit/226d524dade86228e3d27051f7ec398a5c897ba4)
|
|
20
|
+
- [fix(config): upgrade config](https://github.com/nodefony/nodefony/commit/d7806fbf20cf74598e4a7ce2fb2ef6bba85ca4e4)
|
|
21
|
+
- [feat(user): graphql resolver add mutation](https://github.com/nodefony/nodefony/commit/c672520d6265ed6b4edf4d61000caa3eaaf1af54)
|
|
22
|
+
- [fix(monitoring): flow dev](https://github.com/nodefony/nodefony/commit/c625d4ea509968e8ceccbed580fa2198c0ff63c5)
|
|
23
|
+
- [build: upgrade deps](https://github.com/nodefony/nodefony/commit/1d54314e9067c0cc8a5e23ccd5a5226942c1dc3f)
|
|
24
|
+
- [build: upgrade deps](https://github.com/nodefony/nodefony/commit/21610371a2a12418c802f9aa380abfdc4871beab)
|
|
25
|
+
- [fix(monitoring): outdated package management](https://github.com/nodefony/nodefony/commit/f0e2896f53a09392ecf4f72cb0266acaa0fed894)
|
|
26
|
+
- [feat(monitoring): add outdated npm package](https://github.com/nodefony/nodefony/commit/a2ed16f6746b0d54312dde7b84075bbfe075ccab)
|
|
27
|
+
- [build: add deps](https://github.com/nodefony/nodefony/commit/43fbfc1c1af68e091410827123879c11c8208fba)
|
|
28
|
+
- [ci: change ci/cd config](https://github.com/nodefony/nodefony/commit/3c4a2b844a2305d233819f2c7198df3d8dab1db8)
|
|
29
|
+
- [fix(builder): debug sequlize generate on build](https://github.com/nodefony/nodefony/commit/7e42752d06baac0bc0a3302f1056da0f2e7e076a)
|
|
30
|
+
- [fix(git): don't ingnore casse](https://github.com/nodefony/nodefony/commit/42c73030a5f08b3a9a62d0ad505ebb6a867331d9)
|
|
31
|
+
- [fix(graphql): change path file](https://github.com/nodefony/nodefony/commit/404e9e336450a1dc6268488ca8ee0212fccb908b)
|
|
32
|
+
- [build: upgrade deps builder](https://github.com/nodefony/nodefony/commit/a143b70b9281866e6fc723f23c74d1f9a6e97b64)
|
|
33
|
+
- [build: upgrade deps](https://github.com/nodefony/nodefony/commit/1a4e29afe89bd0bc4ebcb6970b1769ec3f995af9)
|
|
34
|
+
- [fix(pm2): new nodefony kill for pm2](https://github.com/nodefony/nodefony/commit/ce6baf7d6850aaf3550844008f50ebe77a287803)
|
|
35
|
+
- [feat(config): add async connectori config for fetch credentials](https://github.com/nodefony/nodefony/commit/92a91f34df7498fb6a119df73ac13efc74d9bf95)
|
|
36
|
+
- [fix(vault): clean boot | add get secret connector credentials](https://github.com/nodefony/nodefony/commit/e2be54b3093d6bbfc2e5a642292bb549734084a9)
|
|
37
|
+
- [fix(monitoring): images connectors](https://github.com/nodefony/nodefony/commit/5db422a3680f48124d86def28e52d65471dc13c5)
|
|
38
|
+
- [fix(debugbar): debug js bar](https://github.com/nodefony/nodefony/commit/7471ff5460bc8cfd62f9415ded2e8a5ee34155e8)
|
|
39
|
+
- [fix(vault): add init config auto](https://github.com/nodefony/nodefony/commit/66de918158da9569425c5e5bf84bd75dc1cd59f3)
|
|
40
|
+
- [fix(monitoring): vue-template log](https://github.com/nodefony/nodefony/commit/73cd0c3d921e9ecc52ff2f0e4d8227841d92e4e1)
|
|
41
|
+
- [fix(vault): add config](https://github.com/nodefony/nodefony/commit/2a1510f26d92e595b9ed5424b7f08a450b3409bf)
|
|
42
|
+
- [feat(vault) : add bundle vault HashiCorp](https://github.com/nodefony/nodefony/commit/cff0cc986cf22ddd7d78b2855a17047f349acf70)
|
|
43
|
+
- [build: upgrade deps](https://github.com/nodefony/nodefony/commit/556098365a7d08990b388d6c086d5c75f3e422a8)
|
|
44
|
+
- [fix(debugbar): don't generate file with webpack](https://github.com/nodefony/nodefony/commit/88c7685df7939da402c43a998c2b53618477f71c)
|
|
45
|
+
- [fix(graphql): manage resolvers with graphql-tool](https://github.com/nodefony/nodefony/commit/75729995b8abffcc212b9bd4e2ebc9ba58987fb9)
|
|
46
|
+
- [fix(graphql): change graphql api for add static shemas in controller | add tools graphql in api class](https://github.com/nodefony/nodefony/commit/696c92c08e452ea4268468c9d40dbefdcd64f832)
|
|
47
|
+
- [fix(apollo-client): relink 401 login](https://github.com/nodefony/nodefony/commit/8a8d60e9789a266fed907b29af6b29f304bb3217)
|
|
48
|
+
- [fix(migration): debug connector test](https://github.com/nodefony/nodefony/commit/ad086d80bf34bfbeb85b216cde5339c583c55933)
|
|
49
|
+
- [feat(monitoring): migration](https://github.com/nodefony/nodefony/commit/68eb3677556493af969f2bb50e1b2e5607daedd0)
|
|
50
|
+
- [build: upgrade deps](https://github.com/nodefony/nodefony/commit/55d8b9ec23b84dbd47cd191d1efc91165941ff27)
|
|
51
|
+
- [fix(install): create database error don't stop install process](https://github.com/nodefony/nodefony/commit/c949177d58a8e8ed4f9e710f3f6b92913f1ef473)
|
|
52
|
+
- [fix(sequelize): change default config sqlite](https://github.com/nodefony/nodefony/commit/7b16d9c500cfc612d60059ac3ce688e16d90a71e)
|
|
53
|
+
- [fix(cli): debug async event onStart cli](https://github.com/nodefony/nodefony/commit/ec60ada10a6cc7c579b9b2738fcd632c502da2b8)
|
|
54
|
+
- [build: upgrade deps](https://github.com/nodefony/nodefony/commit/149eaff062e7ac14b6fdad83651311a8db555c48)
|
|
55
|
+
- [fix(monitoring): debug monitoring bundle unregistred](https://github.com/nodefony/nodefony/commit/775c84a845eba45649755bc709c0a806a8d4bc4d)
|
|
56
|
+
- [fix(entity): sequelize mermaid debug](https://github.com/nodefony/nodefony/commit/a65394107e5fff75a9f6f4300557453cde03ced1)
|
|
57
|
+
- [fix(sequelize): add options transations](https://github.com/nodefony/nodefony/commit/0c2c89327f905843ab46e98de509c10601d214c2)
|
|
58
|
+
- [fix(commonjs): add import lib inquirer esm from commomjs](https://github.com/nodefony/nodefony/commit/f23e57196f293ba85bda58ed1c92acd40ddca442)
|
|
59
|
+
- [build: upgrade deps](https://github.com/nodefony/nodefony/commit/f046e0b89ec87c627f24a8f6b00accd8e4a98caf)
|
|
60
|
+
- [fix(monitoring): flow dev](https://github.com/nodefony/nodefony/commit/bcbda35cc49ef1034d3f80e618781316aa81d5c0)
|
|
61
|
+
- [fix(monitoring): waebsocket time](https://github.com/nodefony/nodefony/commit/8ab98186ddfa11789334d42a14f72a5846b0a2f0)
|
|
62
|
+
- [fix(monitoring): profiling monitoring vue](https://github.com/nodefony/nodefony/commit/ca22ba5a83bc79c9dced28b0fe6a9b52c59b356c)
|
|
63
|
+
- [fix(kernel): monitoring register after all core bundles](https://github.com/nodefony/nodefony/commit/d0c33b3ff7ff935ae84c4603c5b2309a69a32672)
|
|
64
|
+
- [fix(watcher): close hook on restart service](https://github.com/nodefony/nodefony/commit/18995ea3c4c11c8667855cbcd4b223e0c1d920f3)
|
|
65
|
+
- [build: upgrade deps](https://github.com/nodefony/nodefony/commit/9cebcc5a016bba130d4b0ceb85ba7ab6a46ee14c)
|
|
66
|
+
- [fix(monitoring): add vue file](https://github.com/nodefony/nodefony/commit/fd6756ffe02b9a32db5eeb982c67576c8903426e)
|
|
67
|
+
- [fix(monitoring): orm bundle](https://github.com/nodefony/nodefony/commit/9b52574ebf9bc9a973887960dc38fcce431ccee0)
|
|
68
|
+
- [fix(monitoring): check bundle register](https://github.com/nodefony/nodefony/commit/763e166f009b4e57732a7c7f7b99e95c83fc9bf3)
|
|
69
|
+
- [fix(monitoring): bundles and indent](https://github.com/nodefony/nodefony/commit/7e7280bf308729018dc167f6f907d4b316e86d0d)
|
|
70
|
+
- [build: upgrade deps](https://github.com/nodefony/nodefony/commit/c420ad475671fe39cd8b960d6e42bed0aafe4f77)
|
|
71
|
+
- [fix(monitoring): add requests syslog](https://github.com/nodefony/nodefony/commit/85e1ebc341e966b01f3048640dcf020ae45a2078)
|
|
72
|
+
- [build: upgrade deps](https://github.com/nodefony/nodefony/commit/da2ba4ca5fa9803ee5548fea353ae082baf81537)
|
|
73
|
+
- [fix(monitoring): add session template](https://github.com/nodefony/nodefony/commit/67d9fc0d60f105e30acb93f6e86109167dfec6f8)
|
|
74
|
+
- [fix(session): don't migrate in stateles](https://github.com/nodefony/nodefony/commit/018df86f3c936134baf54653ff88046e0f781649)
|
|
75
|
+
- [build: vis deps in monitoring](https://github.com/nodefony/nodefony/commit/30fcfd09451496356a6f59bb218a37c6e99a0b20)
|
|
76
|
+
- [build: upgrade deps](https://github.com/nodefony/nodefony/commit/95971c9aee9901510bad6cdf037a803a1a64ad11)
|
|
77
|
+
- [fix(monitoring): fix security |routing |graphql wsagger doc](https://github.com/nodefony/nodefony/commit/ca8151d1e754dbb2412f9b94bfc8856d87f3fb25)
|
|
78
|
+
- [feat(bundle-monitoring): add new monitoring-bundle vue.js](https://github.com/nodefony/nodefony/commit/9f366124196eeade61d44ef363a252521e8589ce)
|
|
79
|
+
- [fix(graphql): add apollo client refresh token](https://github.com/nodefony/nodefony/commit/b436f664fbc9686ab3d500857e0ae19913bb74b0)
|
|
80
|
+
- [build(formidable): upgrade deps](https://github.com/nodefony/nodefony/commit/32f968240cd32ea813c80242487a6a41c13011c1)
|
|
81
|
+
- [fix(vue3): tensorflow](https://github.com/nodefony/nodefony/commit/c7b5039432d2e318fdeff68f3f4f09ded7b4cb60)
|
|
82
|
+
- [fix(vue): reset env for multi vue projects VUE_CLI_SERVICE](https://github.com/nodefony/nodefony/commit/f7daf45a1ef7c3856baaacb0731b37b67e378e92)
|
|
83
|
+
- [build: upgrade deps](https://github.com/nodefony/nodefony/commit/96c8e2a91adb4fcf9855e2091773ef2c48f94dea)
|
|
84
|
+
- [build: upgrade deps](https://github.com/nodefony/nodefony/commit/b393de13cfebff0e4fb4f2c33548cb930f73c1ff)
|
|
85
|
+
- [fix(documention): clean bundle](https://github.com/nodefony/nodefony/commit/63b65f06a89a5fb1563a9b9608e6a2cc5efd15d2)
|
|
86
|
+
- [fix(orm): documention-bundle](https://github.com/nodefony/nodefony/commit/1f5640e05ff7d625e3dec8636303676a5b39a76f)
|
|
87
|
+
- [fix(pwa): clean config pwa vue](https://github.com/nodefony/nodefony/commit/ecb2f353d5bc9c3ebf80bbde97c6f1aebe91ee61)
|
|
88
|
+
- [fix(ci): yarn ignore-engines | pwa config](https://github.com/nodefony/nodefony/commit/a5cd214a5c28f9bd589a6f8845fd08efddcc03e7)
|
|
89
|
+
- [build: upgrade deps](https://github.com/nodefony/nodefony/commit/0d69c7a19d674f1d0ea66fc6ddf662d6b980baf5)
|
|
90
|
+
- [fix(servers): clean terminate kernel event with fireAsync](https://github.com/nodefony/nodefony/commit/10708539dbd5a6dc75432acceb0f51f4ddd4e66e)
|
|
91
|
+
- [build: upgrade deps](https://github.com/nodefony/nodefony/commit/c858b801e3129bdeb6c3ecfd461d5ee306aad339)
|
|
92
|
+
- [fix(doc): flow dev](https://github.com/nodefony/nodefony/commit/8a2d59ecc4943ca55595c8f80b2f2f498ef2864f)
|
|
93
|
+
- [build: upgrade deps](https://github.com/nodefony/nodefony/commit/03f7a9295a8e727ab6e38046101d19e52ca5ba7b)
|
|
94
|
+
- [feat(documentation-bundle): change to vue](https://github.com/nodefony/nodefony/commit/562a9bce6007ab40fb27f1383723da1f4f1c85c6)
|
|
95
|
+
- [fix(realtime): clean repo](https://github.com/nodefony/nodefony/commit/65e99a51b15aa79a9fb217953ced091c85b84059)
|
|
96
|
+
- [build: upgrade deps](https://github.com/nodefony/nodefony/commit/dec73169fdabc9a23142b345588746435cbc42cb)
|
|
97
|
+
- [feat(doc-bundle): flow dev](https://github.com/nodefony/nodefony/commit/38d9b7356db82fd622cc5e0eb17aed626d636345)
|
|
98
|
+
- [build: upgrade deps](https://github.com/nodefony/nodefony/commit/6398a25e151e263e6053f9fae37ed65a2f41a9b1)
|
|
99
|
+
- [fix(doc-bundle): flow dev](https://github.com/nodefony/nodefony/commit/39c4c8d66fe30d0f194e3a649fed424a587d51a2)
|
|
100
|
+
- [build: upgrade deps](https://github.com/nodefony/nodefony/commit/837930793184dccc2d5c339c55454935c378a116)
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
3
104
|
## v7.0.0-beta.2 (01/01/1970)
|
|
4
105
|
- [chore(release): nodefony release 7.0.0-beta.2](https://github.com/nodefony/nodefony/commit/e75a094f6a0f7515ddb9399e14058bd8872a28ad)
|
|
5
106
|
- [build: add deps monitoring](https://github.com/nodefony/nodefony/commit/d612a00456de6fd33839b2dcfa14d06874c21cfc)
|
package/kernel/kernel.es6
CHANGED
|
@@ -178,15 +178,15 @@ class Kernel extends nodefony.Service {
|
|
|
178
178
|
//this.clean();
|
|
179
179
|
this.postReady = true;
|
|
180
180
|
switch (this.environment) {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
181
|
+
case 'production':
|
|
182
|
+
case 'prod':
|
|
183
|
+
case 'preprod':
|
|
184
|
+
case 'preproduction':
|
|
185
|
+
this.clean();
|
|
186
|
+
break;
|
|
187
|
+
default:
|
|
188
|
+
this.clean();
|
|
189
|
+
myrequire = null;
|
|
190
190
|
}
|
|
191
191
|
});
|
|
192
192
|
} catch (e) {
|
|
@@ -336,11 +336,10 @@ class Kernel extends nodefony.Service {
|
|
|
336
336
|
return false;
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
-
|
|
340
339
|
getRegisteredBundles(name = null) {
|
|
341
|
-
if(
|
|
340
|
+
if (name) {
|
|
342
341
|
const bundle = this.getBundle(name);
|
|
343
|
-
if(
|
|
342
|
+
if (bundle) {
|
|
344
343
|
return {
|
|
345
344
|
name: bundle.name,
|
|
346
345
|
packageName: bundle.package.name,
|
|
@@ -476,7 +475,12 @@ class Kernel extends nodefony.Service {
|
|
|
476
475
|
});
|
|
477
476
|
tab = tab.concat(result);
|
|
478
477
|
|
|
479
|
-
|
|
478
|
+
let localNodefony = null
|
|
479
|
+
if (this.isCore) {
|
|
480
|
+
localNodefony = path.resolve(this.nodefonyPath, "bundles");
|
|
481
|
+
} else {
|
|
482
|
+
localNodefony = path.resolve(this.path, "node_modules", "@nodefony")
|
|
483
|
+
}
|
|
480
484
|
result = await finder
|
|
481
485
|
.in(localNodefony)
|
|
482
486
|
.then((result) => {
|
|
@@ -508,16 +512,16 @@ class Kernel extends nodefony.Service {
|
|
|
508
512
|
setEnv(environment) {
|
|
509
513
|
if (environment in defaultEnvEnable) {
|
|
510
514
|
switch (environment) {
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
515
|
+
case "dev":
|
|
516
|
+
case "development":
|
|
517
|
+
this.environment = "dev";
|
|
518
|
+
process.env.NODE_ENV = "development";
|
|
519
|
+
process.env.BABEL_ENV = 'development';
|
|
520
|
+
break;
|
|
521
|
+
default:
|
|
522
|
+
this.environment = "prod";
|
|
523
|
+
process.env.NODE_ENV = "production";
|
|
524
|
+
process.env.BABEL_ENV = 'production';
|
|
521
525
|
}
|
|
522
526
|
}
|
|
523
527
|
process.env.NODE_DEBUG = this.debug;
|
|
@@ -858,18 +862,18 @@ class Kernel extends nodefony.Service {
|
|
|
858
862
|
bundles.push(res);
|
|
859
863
|
}*/
|
|
860
864
|
switch (this.settings.orm) {
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
865
|
+
case "sequelize":
|
|
866
|
+
res = this.searchPackage("sequelize-bundle");
|
|
867
|
+
bundles.push(res);
|
|
868
|
+
break;
|
|
869
|
+
case "mongoose":
|
|
870
|
+
res = this.searchPackage("mongoose-bundle");
|
|
871
|
+
bundles.push(res);
|
|
872
|
+
break;
|
|
873
|
+
default:
|
|
874
|
+
let error = new Error("nodefony can't load ORM : " + this.settings.orm);
|
|
875
|
+
this.log(error, "ERROR");
|
|
876
|
+
throw error;
|
|
873
877
|
}
|
|
874
878
|
if (this.settings.system.realtime) {
|
|
875
879
|
res = this.searchPackage("realtime-bundle");
|
|
@@ -913,24 +917,24 @@ class Kernel extends nodefony.Service {
|
|
|
913
917
|
}
|
|
914
918
|
|
|
915
919
|
switch (this.isInstall()) {
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
920
|
+
case "install":
|
|
921
|
+
return await this.install(bundles)
|
|
922
|
+
.catch(e => {
|
|
923
|
+
throw e;
|
|
924
|
+
});
|
|
925
|
+
case "rebuild":
|
|
926
|
+
return await this.rebuild(bundles)
|
|
927
|
+
.catch(e => {
|
|
928
|
+
throw e;
|
|
929
|
+
});
|
|
930
|
+
default:
|
|
931
|
+
return await this.preRegister(bundles)
|
|
932
|
+
.then(() => {
|
|
933
|
+
return this;
|
|
934
|
+
})
|
|
935
|
+
.catch(e => {
|
|
936
|
+
throw e;
|
|
937
|
+
});
|
|
934
938
|
}
|
|
935
939
|
}
|
|
936
940
|
|
|
@@ -1331,44 +1335,44 @@ class Kernel extends nodefony.Service {
|
|
|
1331
1335
|
}
|
|
1332
1336
|
let ret = null;
|
|
1333
1337
|
switch (typeof str) {
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1338
|
+
case "string":
|
|
1339
|
+
ret = regBundleName.exec(str);
|
|
1340
|
+
if (ret) {
|
|
1341
|
+
return ret[1] || ret[2];
|
|
1342
|
+
}
|
|
1343
|
+
throw new Error("Bundle Bad Name :" + str);
|
|
1344
|
+
case "function":
|
|
1345
|
+
ret = regClassBundle.exec(str.name);
|
|
1346
|
+
if (ret) {
|
|
1347
|
+
return ret[1];
|
|
1348
|
+
}
|
|
1349
|
+
throw new Error("Bundle Bad Name :" + str.name);
|
|
1350
|
+
default:
|
|
1351
|
+
throw new Error("Bundle Bad Name :" + str);
|
|
1348
1352
|
}
|
|
1349
1353
|
}
|
|
1350
1354
|
|
|
1351
1355
|
getBundleClass(Class, Path) {
|
|
1352
1356
|
try {
|
|
1353
1357
|
switch (true) {
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1358
|
+
case (Class instanceof nodefony.fileClass):
|
|
1359
|
+
return this.getBundleClass(require(Class.path), require.resolve(Class.path));
|
|
1360
|
+
case (typeof Class === "function"):
|
|
1361
|
+
if (Class.toString().indexOf("class") >= 0) {
|
|
1362
|
+
Class.prototype.path = path.dirname(Path);
|
|
1363
|
+
Class.prototype.autoLoader = this.autoLoader;
|
|
1364
|
+
return {
|
|
1365
|
+
class: Class,
|
|
1366
|
+
name: this.getBundleName(Class)
|
|
1367
|
+
};
|
|
1368
|
+
} else {
|
|
1369
|
+
throw new Error(`getBundleClass Bad Bundle Class : ${Class.toString()} Path : ${Path}`);
|
|
1370
|
+
}
|
|
1371
|
+
break;
|
|
1372
|
+
case (typeof Class === "string"):
|
|
1373
|
+
return this.getBundleClass(require(Class), require.resolve(Class));
|
|
1374
|
+
default:
|
|
1375
|
+
throw new Error(`getBundleClass Bad Bundle Class : ${typeof Class} Path : ${Path}`);
|
|
1372
1376
|
}
|
|
1373
1377
|
} catch (e) {
|
|
1374
1378
|
throw e;
|
|
@@ -1477,39 +1481,39 @@ class Kernel extends nodefony.Service {
|
|
|
1477
1481
|
registerBundles(bundles) {
|
|
1478
1482
|
return new Promise(async (resolve, reject) => {
|
|
1479
1483
|
switch (nodefony.typeOf(bundles)) {
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1484
|
+
case "array":
|
|
1485
|
+
for (let i = 0; i < bundles.length; i++) {
|
|
1486
|
+
let Path = await this.isBundleDirectory(bundles[i]);
|
|
1487
|
+
if (Path && Path.length) {
|
|
1488
|
+
try {
|
|
1489
|
+
let bundle = this.loadBundle(Path[0], "filesystem");
|
|
1490
|
+
await bundle.find();
|
|
1491
|
+
} catch (e) {
|
|
1492
|
+
this.log(e, "ERROR");
|
|
1493
|
+
}
|
|
1494
|
+
} else {
|
|
1495
|
+
try {
|
|
1496
|
+
Path = this.isNodeModule(bundles[i]);
|
|
1497
|
+
if (Path) {
|
|
1498
|
+
let bundle = this.loadBundle(Path, "package");
|
|
1486
1499
|
await bundle.find();
|
|
1487
|
-
}
|
|
1488
|
-
this.log(
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
let bundle = this.loadBundle(Path, "package");
|
|
1495
|
-
await bundle.find();
|
|
1496
|
-
} else {
|
|
1497
|
-
this.log("GLOBAL CONFIG REGISTER : ", "INFO");
|
|
1498
|
-
this.log(this.configBundle, "INFO");
|
|
1499
|
-
let gene = this.readGeneratedConfig();
|
|
1500
|
-
if (gene) {
|
|
1501
|
-
this.log("GENERATED CONFIG REGISTER file ./config/GeneratedConfig.yml : ", "INFO");
|
|
1502
|
-
this.log(gene, "INFO");
|
|
1503
|
-
}
|
|
1500
|
+
} else {
|
|
1501
|
+
this.log("GLOBAL CONFIG REGISTER : ", "INFO");
|
|
1502
|
+
this.log(this.configBundle, "INFO");
|
|
1503
|
+
let gene = this.readGeneratedConfig();
|
|
1504
|
+
if (gene) {
|
|
1505
|
+
this.log("GENERATED CONFIG REGISTER file ./config/GeneratedConfig.yml : ", "INFO");
|
|
1506
|
+
this.log(gene, "INFO");
|
|
1504
1507
|
}
|
|
1505
|
-
} catch (e) {
|
|
1506
|
-
this.log(e, "ERROR");
|
|
1507
1508
|
}
|
|
1509
|
+
} catch (e) {
|
|
1510
|
+
this.log(e, "ERROR");
|
|
1508
1511
|
}
|
|
1509
1512
|
}
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
+
}
|
|
1514
|
+
return resolve(bundles);
|
|
1515
|
+
default:
|
|
1516
|
+
return reject(new Error("registerBundles argument bundles must be an array "));
|
|
1513
1517
|
}
|
|
1514
1518
|
});
|
|
1515
1519
|
}
|
|
@@ -1559,49 +1563,49 @@ class Kernel extends nodefony.Service {
|
|
|
1559
1563
|
} else {
|
|
1560
1564
|
result.forEach((ele) => {
|
|
1561
1565
|
switch (true) {
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
}
|
|
1580
|
-
} catch (e) {
|
|
1581
|
-
this.log(e, "ERROR", "BUNDLE " + this.name.toUpperCase() + " CONFIG ROUTING :" + ele.path);
|
|
1582
|
-
}
|
|
1583
|
-
break;
|
|
1584
|
-
case /^services\..*$/.test(ele.name):
|
|
1585
|
-
try {
|
|
1586
|
-
this.log(name + " LOAD FILE :" + ele.path, "DEBUG", "KERNEL READER");
|
|
1587
|
-
this.get("injection").reader(ele.path, this.name);
|
|
1588
|
-
} catch (e) {
|
|
1589
|
-
this.log(e, "ERROR", "BUNDLE " + this.name.toUpperCase() + " CONFIG SERVICE :" + ele.path);
|
|
1566
|
+
case /^config\..*$/.test(ele.name):
|
|
1567
|
+
try {
|
|
1568
|
+
this.log(name + " CONFIG LOAD FILE :" + ele.path, "DEBUG", "KERNEL READER");
|
|
1569
|
+
this.reader.readConfig(ele.path, this.name, callback);
|
|
1570
|
+
} catch (e) {
|
|
1571
|
+
this.log(e, "ERROR", "BUNDLE " + name + " CONFIG :" + ele.path);
|
|
1572
|
+
}
|
|
1573
|
+
break;
|
|
1574
|
+
case /^routing\..*$/.test(ele.name):
|
|
1575
|
+
// ROUTING
|
|
1576
|
+
try {
|
|
1577
|
+
this.log(name + " ROUTER LOAD FILE :" + ele.path, "DEBUG", "KERNEL READER");
|
|
1578
|
+
let router = this.get("router");
|
|
1579
|
+
if (router) {
|
|
1580
|
+
router.reader(ele.path, this.name);
|
|
1581
|
+
} else {
|
|
1582
|
+
this.log(name + " Router service not ready to LOAD FILE :" + ele.path, "WARNING", "KERNEL READER");
|
|
1590
1583
|
}
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1584
|
+
} catch (e) {
|
|
1585
|
+
this.log(e, "ERROR", "BUNDLE " + this.name.toUpperCase() + " CONFIG ROUTING :" + ele.path);
|
|
1586
|
+
}
|
|
1587
|
+
break;
|
|
1588
|
+
case /^services\..*$/.test(ele.name):
|
|
1589
|
+
try {
|
|
1590
|
+
this.log(name + " LOAD FILE :" + ele.path, "DEBUG", "KERNEL READER");
|
|
1591
|
+
this.get("injection").reader(ele.path, this.name);
|
|
1592
|
+
} catch (e) {
|
|
1593
|
+
this.log(e, "ERROR", "BUNDLE " + this.name.toUpperCase() + " CONFIG SERVICE :" + ele.path);
|
|
1594
|
+
}
|
|
1595
|
+
break;
|
|
1596
|
+
case /^security\..*$/.test(ele.name):
|
|
1597
|
+
try {
|
|
1598
|
+
let firewall = this.get("security");
|
|
1599
|
+
if (firewall) {
|
|
1600
|
+
this.log(name + " SECURITY LOAD FILE :" + ele.path, "DEBUG", "KERNEL READER");
|
|
1601
|
+
firewall.reader(ele.path, this.name);
|
|
1602
|
+
} else {
|
|
1603
|
+
this.log(name + " SECURITY LOAD FILE :" + ele.path + " BUT SERVICE NOT READY", "WARNING");
|
|
1603
1604
|
}
|
|
1604
|
-
|
|
1605
|
+
} catch (e) {
|
|
1606
|
+
this.log(e, "ERROR", "BUNDLE " + this.name.toUpperCase() + " CONFIG SECURITY :" + ele.path);
|
|
1607
|
+
}
|
|
1608
|
+
break;
|
|
1605
1609
|
}
|
|
1606
1610
|
});
|
|
1607
1611
|
}
|
|
@@ -1612,18 +1616,18 @@ class Kernel extends nodefony.Service {
|
|
|
1612
1616
|
let memory = this.stats().memory;
|
|
1613
1617
|
for (let ele in memory) {
|
|
1614
1618
|
switch (ele) {
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1619
|
+
case "rss":
|
|
1620
|
+
this.log((message || ele) + " ( Resident Set Size ) PID ( " + this.processId + " ) : " + nodefony.cli.niceBytes(memory[ele]), "DEBUG", "MEMORY " + ele);
|
|
1621
|
+
break;
|
|
1622
|
+
case "heapTotal":
|
|
1623
|
+
this.log((message || ele) + " ( Total Size of the Heap ) PID ( " + this.processId + " ) : " + nodefony.cli.niceBytes(memory[ele]), "DEBUG", "MEMORY " + ele);
|
|
1624
|
+
break;
|
|
1625
|
+
case "heapUsed":
|
|
1626
|
+
this.log((message || ele) + " ( Heap actually Used ) PID ( " + this.processId + " ) : " + nodefony.cli.niceBytes(memory[ele]), "DEBUG", "MEMORY " + ele);
|
|
1627
|
+
break;
|
|
1628
|
+
case "external":
|
|
1629
|
+
this.log((message || ele) + " PID ( " + this.processId + " ) : " + nodefony.cli.niceBytes(memory[ele]), "DEBUG", "MEMORY " + ele);
|
|
1630
|
+
break;
|
|
1627
1631
|
}
|
|
1628
1632
|
}
|
|
1629
1633
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodefony",
|
|
3
|
-
"version": "7.0.0-beta.
|
|
3
|
+
"version": "7.0.0-beta.3",
|
|
4
4
|
"main": "autoloader.es6",
|
|
5
5
|
"description": "Nodefony Framework Core",
|
|
6
6
|
"contributors": [],
|
|
@@ -37,17 +37,17 @@
|
|
|
37
37
|
"@graphql-tools/merge": "8.3.6",
|
|
38
38
|
"@graphql-tools/schema": "9.0.4",
|
|
39
39
|
"@graphql-tools/utils": "8.12.0",
|
|
40
|
-
"@nodefony/elastic-bundle": "7.0.0-beta.
|
|
41
|
-
"@nodefony/framework-bundle": "7.0.0-beta.
|
|
42
|
-
"@nodefony/http-bundle": "7.0.0-beta.
|
|
43
|
-
"@nodefony/mail-bundle": "7.0.0-beta.
|
|
44
|
-
"@nodefony/mongoose-bundle": "7.0.0-beta.
|
|
45
|
-
"@nodefony/monitoring-bundle": "7.0.0-beta.
|
|
46
|
-
"@nodefony/realtime-bundle": "7.0.0-beta.
|
|
47
|
-
"@nodefony/redis-bundle": "7.0.0-beta.
|
|
48
|
-
"@nodefony/security-bundle": "7.0.0-beta.
|
|
49
|
-
"@nodefony/sequelize-bundle": "7.0.0-beta.
|
|
50
|
-
"@nodefony/unittests-bundle": "7.0.0-beta.
|
|
40
|
+
"@nodefony/elastic-bundle": "7.0.0-beta.3",
|
|
41
|
+
"@nodefony/framework-bundle": "7.0.0-beta.3",
|
|
42
|
+
"@nodefony/http-bundle": "7.0.0-beta.3",
|
|
43
|
+
"@nodefony/mail-bundle": "7.0.0-beta.3",
|
|
44
|
+
"@nodefony/mongoose-bundle": "7.0.0-beta.3",
|
|
45
|
+
"@nodefony/monitoring-bundle": "7.0.0-beta.3",
|
|
46
|
+
"@nodefony/realtime-bundle": "7.0.0-beta.3",
|
|
47
|
+
"@nodefony/redis-bundle": "7.0.0-beta.3",
|
|
48
|
+
"@nodefony/security-bundle": "7.0.0-beta.3",
|
|
49
|
+
"@nodefony/sequelize-bundle": "7.0.0-beta.3",
|
|
50
|
+
"@nodefony/unittests-bundle": "7.0.0-beta.3",
|
|
51
51
|
"@vue/cli": "5.0.8",
|
|
52
52
|
"@vue/cli-service": "5.0.8",
|
|
53
53
|
"@vue/cli-service-global": "4.5.19",
|