waibu-mpa 2.11.0 → 2.13.0

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.
@@ -18,7 +18,7 @@ async function injectElements (options) {
18
18
  for (const key of ['links', 'scripts', 'css']) {
19
19
  let item = Builder[key] ?? []
20
20
  if (isString(item)) item = [item]
21
- if (isFunction(item)) item = await item.call(cmp, req)
21
+ if (isFunction(item)) item = await item.call(cmp, Builder)
22
22
  if (item.length > 0) {
23
23
  rsc[key] = rsc[key] ?? []
24
24
  rsc[key].push(...item)
@@ -26,7 +26,7 @@ async function injectElements (options) {
26
26
  }
27
27
  for (const key of ['inlineScript', 'inlineCss']) {
28
28
  let item = Builder[key] ?? ''
29
- if (isFunction(item)) item = await item.call(cmp, req)
29
+ if (isFunction(item)) item = await item.call(cmp, Builder)
30
30
  if (!isEmpty(item)) {
31
31
  rsc[key] = rsc[key] ?? []
32
32
  rsc[key].push(item)
@@ -45,6 +45,7 @@ export async function build ({ files, pathPrefix, dir, ns, cfg, parent, urlPrefi
45
45
  m.config.prefix = getPluginPrefix(ns)
46
46
  m.config.pathSrc = m.url
47
47
  m.config.webApp = parent ?? ns
48
+ m.config.interSite = m.interSite
48
49
  m.config.ns = ns
49
50
  m.config.subNs = ''
50
51
  m.config.title = m.title ?? camelCase(last(m.url.split('/')))
@@ -19,7 +19,7 @@ async function loadResource (mod = [], item) {
19
19
  } else items.push(mod[item][i])
20
20
  }
21
21
  for (const c of extItems) {
22
- let emod = await readConfig(`${c.ns}:${c.path}`, { ns: c.ns })
22
+ let emod = await readConfig(`${c.ns}:${c.path}`, { ns: c.ns, ignoreError: false })
23
23
  if (!isArray(emod)) emod = [emod]
24
24
  for (const m of emod) {
25
25
  items.push(m)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-mpa",
3
- "version": "2.11.0",
3
+ "version": "2.13.0",
4
4
  "description": "MPA support for Waibu Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-04-02
4
+
5
+ - [2.13.0] Changes in widget's static ```css```, ```scripts``` etc, now can be a function that callable with scope to its component
6
+
7
+ ## 2026-03-30
8
+
9
+ - [2.12.0] Add inter site module support
10
+
3
11
  ## 2026-03-27
4
12
 
5
13
  - [2.11.0] Add options to enable cache with Bajo Cache module