bajo 1.2.1 → 1.2.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/boot/class/bajo-core.js +8 -2
- package/package.json +1 -1
package/boot/class/bajo-core.js
CHANGED
|
@@ -88,6 +88,12 @@ class BajoCore extends Plugin {
|
|
|
88
88
|
return { ns, subNs, path: _path, fullNs: names.join('.'), type }
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
buildNsPath = ({ ns = '', subNs, subSubNs, path } = {}) => {
|
|
92
|
+
if (subNs) ns += '.' + subNs
|
|
93
|
+
if (subSubNs) ns += '.' + subSubNs
|
|
94
|
+
return `${ns}:${path}`
|
|
95
|
+
}
|
|
96
|
+
|
|
91
97
|
breakNsPath = (item = '', defaultNs = 'bajo', checkNs = true) => {
|
|
92
98
|
let [ns, ...path] = item.split(':')
|
|
93
99
|
const fullNs = ns
|
|
@@ -127,9 +133,9 @@ class BajoCore extends Plugin {
|
|
|
127
133
|
path = parts.join('/')
|
|
128
134
|
const realPath = realParts.join('/')
|
|
129
135
|
let fullPath = path
|
|
130
|
-
if (!isEmpty(qs)) fullPath += ('?' + querystring.stringify(qs))
|
|
136
|
+
if (!isEmpty(qs)) fullPath += ('?' + querystring.stringify(qs, null, null, { encodeURIComponent: (text) => (text) }))
|
|
131
137
|
let realFullPath = realPath
|
|
132
|
-
if (!isEmpty(qs)) realFullPath += ('?' + querystring.stringify(qs))
|
|
138
|
+
if (!isEmpty(qs)) realFullPath += ('?' + querystring.stringify(qs, null, null, { encodeURIComponent: (text) => (text) }))
|
|
133
139
|
return { ns, path, subNs, subSubNs, qs, fullPath, fullNs, realPath, realFullPath }
|
|
134
140
|
}
|
|
135
141
|
|