waibu 1.2.10 → 1.2.12

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.
@@ -16,7 +16,7 @@ const onRequest = {
16
16
  const method = plain ? req.method : chalk[c](req.method)
17
17
  const url = plain ? (':' + req.url) : chalk.gray(':' + req.url)
18
18
  const ip = plain ? this.getIp(req) : chalk.magenta(this.getIp(req))
19
- let msg = this.app[ns].print.write('httpReq%s%s%s%s', arrow, method, url, ip)
19
+ let msg = this.app[ns].print.write('httpReq%s%s%s%s', arrow, method, url.replaceAll('%', '%%'), ip)
20
20
  if (req.headers['content-length']) msg += this.app[ns].print.write('httpReqExt%s', req.headers['content-length'])
21
21
  if (this.config.deferLog) {
22
22
  this.reqLog = this.reqLog ?? {}
package/index.js CHANGED
@@ -47,6 +47,7 @@ async function factory (pkgName) {
47
47
  },
48
48
  paramsCharMap: {},
49
49
  logRoutes: true,
50
+ pageTitleFormat: '%s : %s',
50
51
  siteInfo: {
51
52
  title: 'My Website',
52
53
  orgName: 'My Organization'
@@ -275,6 +276,7 @@ async function factory (pkgName) {
275
276
  const { isEmpty, get, trimEnd, trimStart } = this.lib._
276
277
  const { breakNsPath } = this.app.bajo
277
278
  const { query = {}, base = 'waibu', params = {}, guessHost } = options
279
+ if (isEmpty(name)) return name
278
280
 
279
281
  const plugin = getPlugin(base)
280
282
  const cfg = plugin.config ?? {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu",
3
- "version": "1.2.10",
3
+ "version": "1.2.12",
4
4
  "description": "Web Framework for Bajo",
5
5
  "main": "index.js",
6
6
  "scripts": {