bajo 1.2.5 → 1.2.7

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.
@@ -2,7 +2,7 @@ import lodash from 'lodash'
2
2
  import fs from 'fs-extra'
3
3
  import resolvePath from '../../lib/resolve-path.js'
4
4
 
5
- const { isString, filter, map, trim, without, uniq, camelCase, isEmpty } = lodash
5
+ const { isString, filter, map, trim, without, uniq, camelCase, isEmpty, omit } = lodash
6
6
 
7
7
  async function buildPlugins () {
8
8
  let pluginPkgs = this.config.plugins ?? []
@@ -38,7 +38,7 @@ async function buildPlugins () {
38
38
  this.pluginNames.push(plugin.name)
39
39
  this.app.addPlugin(plugin)
40
40
  }
41
- delete this.config.plugins
41
+ this.config = omit(this.config, this.pluginNames)
42
42
  }
43
43
 
44
44
  export default buildPlugins
@@ -13,6 +13,7 @@ class BajoPlugin extends Plugin {
13
13
 
14
14
  loadConfig = async () => {
15
15
  const { defaultsDeep } = this.lib.aneka
16
+ const { get } = this.lib._
16
17
  const { log, readJson, parseObject, getModuleDir } = this.app.bajo
17
18
  log.trace('- %s', this.name)
18
19
  const dir = this.name === this.app.bajo.mainNs ? (`${this.app.bajo.dir.base}/${this.app.bajo.mainNs}`) : getModuleDir(this.pkgName)
@@ -37,7 +38,9 @@ class BajoPlugin extends Plugin {
37
38
  const altCfg = await readAllConfigs.call(this.app, `${this.app.bajo.dir.data}/config/${this.name}`)
38
39
  cfg = defaultsDeep({}, omit(altCfg, omittedPluginKeys), cfg)
39
40
  } catch (err) {}
40
- const envArgv = defaultsDeep({}, omit(this.app.env[this.name] ?? {}, omittedPluginKeys) ?? {}, omit(this.app.argv[this.name] ?? {}, omittedPluginKeys) ?? {})
41
+ const cfgEnv = omit(get(this, `app.env._.${this.name}`, {}), omittedPluginKeys) ?? {}
42
+ const cfgArgv = omit(get(this, `app.argv._.${this.name}`, {}), omittedPluginKeys) ?? {}
43
+ const envArgv = defaultsDeep({}, cfgEnv, cfgArgv)
41
44
  cfg = defaultsDeep({}, envArgv ?? {}, cfg ?? {}, this.config ?? {})
42
45
  this.title = this.title ?? cfg.title ?? this.alias
43
46
 
package/docs/ecosystem.md CHANGED
@@ -9,16 +9,13 @@
9
9
  | [bajo-common-db](https://github.com/ardhi/bajo-common-db) | bajoCommonDb | cdb | Common database |
10
10
  | [bajo-cli](https://github.com/ardhi/bajo-cli) | bajoCli | cli | Command line support & tools |
11
11
  | [bajo-cron](https://github.com/ardhi/bajo-cron) | bajoCron | cron | Cron support |
12
- | [bajo-emitter](https://github.com/ardhi/bajo-emitter) | bajoEmitter | emitter | Centralized event emitter & message broadcaster |
13
12
  | [bajo-extra](https://github.com/ardhi/bajo-extra) | bajoExtra | extra | Extra necessary booster! |
14
- | [bajo-i18n](https://github.com/ardhi/bajo-i18n) | bajoI18N | i18n | Localization & Internationalization |
15
13
  | [bajo-logger](https://github.com/ardhi/bajo-logger) | bajoLogger | log | Pino logger support |
16
14
  | [bajo-markdown](https://github.com/ardhi/bajo-markdown) | bajoMarkdown | md | Markdown support |
17
- | [bajo-mqtt](https://github.com/ardhi/bajo-mqtt) | bajoMqtt | mqtt | MQTT binding |
18
- | [bajo-udp](https://github.com/ardhi/bajo-udp) | bajoUdp | udp | UDP binding |
19
- | [bajo-serialport](https://github.com/ardhi/bajo-serialport) | bajoSerialport | sp | Serialport binding |
15
+ | [bajo-queue](https://github.com/ardhi/bajo-queue) | bajoQueue | q | Queue support |
16
+ | [bajo-spatial](https://github.com/ardhi/bajo-spatial) | bajoSpatial | spatial | Spatial support |
20
17
  | [bajo-sysinfo](https://github.com/ardhi/bajo-sysinfo) | bajoSysinfo | si | System information |
21
- | [bajo-webdav](https://github.com/ardhi/bajo-webdav) | bajoWebdav | webdav | Webdav binding |
18
+ | [bajo-template](https://github.com/ardhi/bajo-template) | bajotemplate | tpl | Template System |
22
19
 
23
20
  ## Dobo DBMS Plugins
24
21
 
@@ -29,6 +26,7 @@
29
26
  | [dobo-elasticsearch](https://github.com/ardhi/dobo-elasticsearch) | doboElasticsearch | dbes | Elasticsearch driver |
30
27
  | [dobo-knex](https://github.com/ardhi/dobo-knex) | doboKnex | dbknex | Knex driver |
31
28
  | [dobo-mongodb](https://github.com/ardhi/dobo-mongodb) | doboMongodb | dbmongo | MongoDB driver |
29
+ | [dobo-redis](https://github.com/ardhi/dobo-redis) | doboRedis | dbredis | Redis driver |
32
30
  | [dobo-restproxy](https://github.com/ardhi/dobo-restproxy) | doboRestproxy | dbrpx | Restproxy driver |
33
31
  | [dobo-restproxy-jsonserver](https://github.com/ardhi/dobo-restproxy-jsonserver) | doboRestproxyJsonserver | dbrpxjs | JsonServer support for doboRestproxy |
34
32
  | [dobo-restproxy-ndut](https://github.com/ardhi/dobo-restproxy-ndut) | doboRestproxyNdut | dbrpxndut | NDUT support for doboRestproxy |
@@ -38,18 +36,30 @@
38
36
 
39
37
  | Package | Name | Alias | Description |
40
38
  | ------- | ---- | ----- | ----------- |
41
- | [waibu](https://github.com/ardhi/waibu) | waibu | wb | Web framework |
42
- | [waibu-bootstrap](https://github.com/ardhi/waibu-bootstrap) | waibuBootstrap | wbbs | Bootstrap support for Waibu MPA |
43
- | [waibu-bootstrap-icons](https://github.com/ardhi/waibu-bootstrap-icons) | waibuBootstrapIcons | wbbsi | Bootstrap Icons support for Waibu MPA |
44
- | [waibu-bootswatch](https://github.com/ardhi/waibu-bootswatch) | waibuBootswatch | wbbw | Bootswatch support for Waibu MPA |
45
- | [waibu-feather](https://github.com/ardhi/waibu-feather) | waibuFeather | wbft | Feather icons support for Waibu MPA |
46
- | [waibu-fontawesome](https://github.com/ardhi/waibu-fontawesome) | waibuFontawesome | wbfa | Fontawesome support for Waibu MPA |
47
- | [waibu-extra](https://github.com/ardhi/waibu-extra) | waibuExtra | wbxtra | Most used 3rd party libs for Waibu MPA |
48
- | [waibu-mdi](https://github.com/ardhi/waibu-mdi) | waibuMdi | wbmdi | Material Design Icons (MDI) support for Waibu MPA |
49
- | [waibu-mpa](https://github.com/ardhi/waibu-mpa) | waibuMpa | wbmpa | Multi pages app for for Waibu |
50
- | [waibu-nunjucks](https://github.com/ardhi/waibu-nunjucks) | waibuNunjucks | wbnunjucks | Nunjucks support for Waibu MPA |
51
- | [waibu-phosphor](https://github.com/ardhi/waibu-phosphor) | waibuPhosphor | wbmpp | Phosphoricons support for Waibu MPA |
52
- | [waibu-rest-api](https://github.com/ardhi/waibu-rest-api) | waibuRestApi | wbrestapi | Rest API for Waibu |
53
- | [waibu-socket.io](https://github.com/ardhi/waibu-socket.io) | waibuSocketIo | wbsio | Socket.io support for Waibu |
54
- | [waibu-static](https://github.com/ardhi/waibu-static) | waibuStatic | wbstatic | Static asset support for Waibu |
55
- | [waibu-swagger](https://github.com/ardhi/waibu-swagger) | waibuSwagger | wbswagger | Rest API Documentation for Waibu REST API |
39
+ | [waibu](https://github.com/ardhi/waibu) | waibu | w | Web framework |
40
+ | [waibu-admin](https://github.com/ardhi/waibu-admin) | waibuAdmin | wa | Waibu Admin module |
41
+ | [waibu-alpinejs](https://github.com/ardhi/waibu-alpinejs) | waibuAlpinejs | walp |Alpine.js support for Waibu MPA |
42
+ | [waibu-blu](https://github.com/ardhi/waibu-blu) | waibuBlu | wblu | Blu theme |
43
+ | [waibu-bootstrap](https://github.com/ardhi/waibu-bootstrap) | waibuBootstrap | wbs | Bootstrap support for Waibu MPA |
44
+ | [waibu-bootstrap-icons](https://github.com/ardhi/waibu-bootstrap-icons) | waibuBootstrapIcons | wbsi | Bootstrap Icons support for Waibu MPA |
45
+ | [waibu-bootswatch](https://github.com/ardhi/waibu-bootswatch) | waibuBootswatch | wbw | Bootswatch support for Waibu MPA |
46
+ | [waibu-db](https://github.com/ardhi/waibu-db) | waibuDb | wdb | Database helper |
47
+ | [waibu-extra](https://github.com/ardhi/waibu-extra) | waibuExtra | wx | Most used 3rd party libs for Waibu MPA |
48
+ | [waibu-maps](https://github.com/ardhi/waibu-maps) | waibuMaps | wmaps | Maps for Waibu MPA |
49
+ | [waibu-mpa](https://github.com/ardhi/waibu-mpa) | waibuMpa | wmpa | Multi pages app for for Waibu |
50
+ | [waibu-phosphor](https://github.com/ardhi/waibu-phosphor) | waibuPhosphor | wpp | Phosphoricons support for Waibu MPA |
51
+ | [waibu-rest-api](https://github.com/ardhi/waibu-rest-api) | waibuRestApi | wra | Rest API for Waibu |
52
+ | [waibu-static](https://github.com/ardhi/waibu-static) | waibuStatic | wstatic | Static asset support for Waibu |
53
+ | [waibu-swagger](https://github.com/ardhi/waibu-swagger) | waibuSwagger | wswagger | Rest API Documentation for Waibu REST API |
54
+
55
+ ## Masohi Messaging Plugins
56
+
57
+ | Package | Name | Alias | Description |
58
+ | ------- | ---- | ----- | ----------- |
59
+ | [masohi](https://github.com/ardhi/masohi) | masohi | masohi | Messaging System for Bajo |
60
+ | [masohi-codec](https://github.com/ardhi/masohi-codec) | masohiCodec | codec | Codec |
61
+ | [masohi-codec-ais](https://github.com/ardhi/masohi-codec-ais) | masohiCodecAis | codec-ais | AIS Codec |
62
+ | [masohi-mail](https://github.com/ardhi/masohi-mail) | masohiMail | mail | Mail handler |
63
+ | [masohi-mqtt](https://github.com/ardhi/masohi-mqtt) | masohiMqtt | mqtt | MQTT handler |
64
+ | [masohi-serial-port](https://github.com/ardhi/masohi-serialport) | masohiSerialport | sp | Serialport handler |
65
+ | [masohi-socket.io](https://github.com/ardhi/masohi-socket.io) | masohiSocketIo | sio | Socket.io handler |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bajo",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "description": "A framework to build a giant monstrous app rapidly",
5
5
  "main": "boot/index.js",
6
6
  "scripts": {