bajo-template 1.1.9 → 1.1.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bajo-template",
3
- "version": "1.1.9",
3
+ "version": "1.1.11",
4
4
  "description": "Template Renderer for Bajo Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/plugin/factory.js CHANGED
@@ -33,11 +33,15 @@ async function factory (pkgName) {
33
33
  opts.lang = opts.lang ?? lang
34
34
  return this.app.bajo.format(val, type, opts)
35
35
  },
36
- _routePath: (input) => {
36
+ _findRoute: (input) => {
37
+ if (!this.app.waibu) return false
38
+ return this.app.waibu.findRoute(input)
39
+ },
40
+ _routePath: (input, opts) => {
37
41
  if (!this.app.waibu) return input
38
- return this.app.waibu.routePath(input)
42
+ return this.app.waibu.routePath(input, opts)
39
43
  },
40
- _titleize: this.app.bajo.titleize,
44
+ _titleize: this.lib.aneka.titleize,
41
45
  _hasPlugin: name => this.app.bajo.pluginNames.includes(name),
42
46
  _jsonStringify: this.app.waibuMpa.jsonStringify,
43
47
  _parseMarkdown: content => {
@@ -105,7 +109,8 @@ async function factory (pkgName) {
105
109
 
106
110
  _handleInclude = async (content, locals = {}, opts = {}) => {
107
111
  const { isEmpty, omit, template, merge } = this.lib._
108
- const { extractText, breakNsPath } = this.app.bajo
112
+ const { extractText } = this.lib.aneka
113
+ const { breakNsPath } = this.app.bajo
109
114
  const start = '<!-- include '
110
115
  const end = ' -->'
111
116
  const imports = this.buildCompileImports(opts.lang)