waibu-rest-api 2.12.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.
@@ -20,7 +20,7 @@ const boot = {
20
20
  handler: async function (prefix) {
21
21
  const { importPkg, eachPlugins, importModule, runHook } = this.app.bajo
22
22
  const { fastGlob } = this.app.lib
23
- const { getPluginPrefix } = this.app.waibu
23
+ const { getPluginPrefix, isRouteDisabled } = this.app.waibu
24
24
  const [bodyParser, accepts] = await importPkg('waibu:@fastify/formbody', 'waibu:@fastify/accepts')
25
25
  const routeHook = await importModule('waibu:/lib/webapp-scope/route-hook.js')
26
26
  const handleMultipart = await importModule('waibu:/lib/webapp-scope/handle-multipart-body.js')
@@ -68,11 +68,7 @@ const boot = {
68
68
  if (!Array.isArray(mods)) mods = [mods]
69
69
  for (const mod of mods) {
70
70
  const fullPath = appPrefix === '/' ? mod.url : (appPrefix + mod.url)
71
- const isRouteDisabled = await importModule('waibu:/lib/webapp-scope/is-route-disabled.js')
72
- if (await isRouteDisabled.call(this, fullPath, mod.method, me.config.disabled)) {
73
- this.log.warn('routeDisabled%s%s', `${prefix}${fullPath}`, mod.method)
74
- continue
75
- }
71
+ if (isRouteDisabled(`${prefix === '' ? '' : `/${prefix}`}${fullPath}`)) continue
76
72
  const rpath = await reroutedPath.call(this, fullPath, me.config.rerouted)
77
73
  if (me.config.format.asExt) mod.url = formatExt(mod.url)
78
74
  if (rpath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-rest-api",
3
- "version": "2.12.0",
3
+ "version": "2.13.0",
4
4
  "description": "REST API for Waibu",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-06-10
4
+
5
+ - [2.13.0] Remove route redirects because now directly handled by ```waibu```
6
+
3
7
  ## 2026-05-28
4
8
 
5
9
  - [2.12.0] Change hooks to be written in one ```hook.js``` file