@betterportal/config-manager 10.6.23 → 10.6.25
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/lib/.bsb/clients/service-betterportal-config-manager.d.ts +1 -1
- package/lib/.bsb/clients/service-betterportal-config-manager.js +1 -1
- package/lib/bp-contracts/org.betterportal.config-manager.json +1 -1
- package/lib/plugins/service-betterportal-config-manager/adminApi.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/adminApi.js +18 -5
- package/lib/plugins/service-betterportal-config-manager/adminApi.js.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/credentialDiagnostics.d.ts +5 -0
- package/lib/plugins/service-betterportal-config-manager/credentialDiagnostics.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/credentialDiagnostics.js +9 -0
- package/lib/plugins/service-betterportal-config-manager/credentialDiagnostics.js.map +1 -0
- package/lib/plugins/service-betterportal-config-manager/menuEditor.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/menuEditor.js +58 -6
- package/lib/plugins/service-betterportal-config-manager/menuEditor.js.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/previewApi.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/previewApi.js +21 -0
- package/lib/plugins/service-betterportal-config-manager/previewApi.js.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/previewEnvironments.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/previewEnvironments.js +4 -3
- package/lib/plugins/service-betterportal-config-manager/previewEnvironments.js.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/routeMounts.d.ts +16 -0
- package/lib/plugins/service-betterportal-config-manager/routeMounts.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/routeMounts.js +8 -0
- package/lib/plugins/service-betterportal-config-manager/routeMounts.js.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/storage/core.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/storage/core.js +5 -1
- package/lib/plugins/service-betterportal-config-manager/storage/core.js.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/syncApi.d.ts +8 -1
- package/lib/plugins/service-betterportal-config-manager/syncApi.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-config-manager/syncApi.js +12 -4
- package/lib/plugins/service-betterportal-config-manager/syncApi.js.map +1 -1
- package/lib/schemas/service-betterportal-config-manager.json +1 -1
- package/lib/schemas/service-betterportal-config-manager.plugin.json +1 -1
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated BSB virtual client for service-betterportal-config-manager
|
|
3
3
|
* DO NOT EDIT - Regenerated on every build
|
|
4
|
-
* @version 10.6.
|
|
4
|
+
* @version 10.6.25
|
|
5
5
|
*/
|
|
6
6
|
import { ServiceClient, BSBService } from "@bsb/base";
|
|
7
7
|
import type { Observable, BSBServiceClientDefinition, EventInputType } from "@bsb/base";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated BSB virtual client for service-betterportal-config-manager
|
|
3
3
|
* DO NOT EDIT - Regenerated on every build
|
|
4
|
-
* @version 10.6.
|
|
4
|
+
* @version 10.6.25
|
|
5
5
|
*/
|
|
6
6
|
import { ServiceClient, importPortableSchema, createFireAndForgetEvent, createBroadcastEvent, createEventSchemas } from "@bsb/base";
|
|
7
7
|
const _webhookDeliveryAvailableSchema = importPortableSchema(JSON.parse("{\"anyvaliVersion\":\"1.0\",\"schemaVersion\":\"1.1\",\"root\":{\"kind\":\"object\",\"properties\":{},\"required\":[],\"unknownKeys\":\"strip\"},\"definitions\":{},\"extensions\":{}}"));
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"pluginId": "org.betterportal.config-manager",
|
|
5
5
|
"title": "BetterPortal Config Manager",
|
|
6
6
|
"description": "Admin-facing BetterPortal service for discovering and managing service config surfaces.",
|
|
7
|
-
"version": "10.6.
|
|
7
|
+
"version": "10.6.25",
|
|
8
8
|
"category": "service",
|
|
9
9
|
"deploymentModes": [
|
|
10
10
|
"self-hosted"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adminApi.d.ts","sourceRoot":"","sources":["../../../src/plugins/service-betterportal-config-manager/adminApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"adminApi.d.ts","sourceRoot":"","sources":["../../../src/plugins/service-betterportal-config-manager/adminApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EAEjB,mBAAmB,EACnB,SAAS,EACV,MAAM,yBAAyB,CAAC;AAcjC,OAAO,KAAK,EAAuE,kBAAkB,EAAE,eAAe,EAAgE,MAAM,yBAAyB,CAAC;AACtN,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAwJzD,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GACvC,MAAM,GAAG,SAAS,CAepB;AAwGD,iBAAS,wBAAwB,CAAC,MAAM,EAAE,kBAAkB,EAAE,MAAM,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkEpF;AAGD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,wBAAwB,CAAC,GAAG,MAAM,CA4CpG;AA4VD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG;IACvG,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;CACzB,CAwEA;AAkPD,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,iBAAiB,EACtB,KAAK,EAAE,mBAAmB,EAC1B,OAAO,EAAE,gBAAgB,GACxB,IAAI,CAyiDN;AAwPD,wBAAgB,uBAAuB,CAAC,CAAC,EAAE;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClD,GAAG,MAAM,CAkaT"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isMenuRouteExcluded } from "./routeMounts.js";
|
|
1
2
|
import * as av from "anyvali";
|
|
2
3
|
import { AppAuthRoleSchema, eventHeaders, htmlResponse, jsonResponse, resolveEmbeddedRequestContext, signServiceConfigTicket, uuidv7, BetterPortalMenuItemSchema, BetterPortalThemeConfigSchema } from "@betterportal/framework";
|
|
3
4
|
import { generateApiKey, hashApiKey } from "./storage/index.js";
|
|
@@ -95,7 +96,11 @@ function normalizeMenuItem(raw) {
|
|
|
95
96
|
const item = raw && typeof raw === "object" ? raw : {};
|
|
96
97
|
return BetterPortalMenuItemSchema.parse({
|
|
97
98
|
id: typeof item.id === "string" ? item.id : uuidv7(),
|
|
98
|
-
type: item.type
|
|
99
|
+
type: item.type ?? "link",
|
|
100
|
+
authStatus: item.authStatus ?? "auto",
|
|
101
|
+
serviceStatus: item.serviceStatus ?? "show",
|
|
102
|
+
rolesAnyOf: item.rolesAnyOf,
|
|
103
|
+
defaultExpanded: item.defaultExpanded,
|
|
99
104
|
title: typeof item.title === "string" ? item.title : undefined,
|
|
100
105
|
icon: typeof item.icon === "string" ? item.icon : undefined,
|
|
101
106
|
routeId: typeof item.routeId === "string" ? item.routeId : undefined,
|
|
@@ -2159,7 +2164,14 @@ export function registerAdminApiRoutes(app, store, cpState) {
|
|
|
2159
2164
|
const appDef = config.apps.find((a) => a.id === appId);
|
|
2160
2165
|
if (!appDef)
|
|
2161
2166
|
return jsonResponse({ error: "App not found" }, 404);
|
|
2162
|
-
|
|
2167
|
+
const menu = items.map(normalizeMenuItem);
|
|
2168
|
+
const invalid = (entries) => entries.some(item => {
|
|
2169
|
+
const route = item.routeId ? appDef.routes.find(route => route.id === item.routeId) : undefined;
|
|
2170
|
+
return (Boolean(item.routeId) && (!route || isMenuRouteExcluded(route, getManifestCache()))) || invalid(item.children);
|
|
2171
|
+
});
|
|
2172
|
+
if (invalid(menu))
|
|
2173
|
+
return jsonResponse({ error: "Menu contains a missing or excluded route" }, 400);
|
|
2174
|
+
appDef.menu = menu;
|
|
2163
2175
|
await store.saveConfig(config);
|
|
2164
2176
|
return jsonResponse({ ok: true });
|
|
2165
2177
|
});
|
|
@@ -2254,6 +2266,7 @@ export function registerAdminApiRoutes(app, store, cpState) {
|
|
|
2254
2266
|
operationId: operation.operationId,
|
|
2255
2267
|
title: typeof operation.title === "string" ? operation.title : view.title,
|
|
2256
2268
|
renderable: operation.renderable === true,
|
|
2269
|
+
menu: operation.menu,
|
|
2257
2270
|
pageRenderable: operation.method === "GET" && hasPageRenderer({ ...view, operations: [operation] })
|
|
2258
2271
|
}]
|
|
2259
2272
|
: []));
|
|
@@ -2308,7 +2321,7 @@ export function registerAdminApiRoutes(app, store, cpState) {
|
|
|
2308
2321
|
});
|
|
2309
2322
|
if (r.pageRenderable)
|
|
2310
2323
|
existingPaths.add(mountPath);
|
|
2311
|
-
if (r.pageRenderable && !isApiRoute({ kind: "page", path: mountPath }, true)) {
|
|
2324
|
+
if (r.pageRenderable && r.menu !== false && !isApiRoute({ kind: "page", path: mountPath }, true)) {
|
|
2312
2325
|
groupChildren.push({
|
|
2313
2326
|
id: uuidv7(),
|
|
2314
2327
|
type: "link",
|
|
@@ -2316,7 +2329,7 @@ export function registerAdminApiRoutes(app, store, cpState) {
|
|
|
2316
2329
|
routeId,
|
|
2317
2330
|
enabled: true,
|
|
2318
2331
|
serviceStatus: "show",
|
|
2319
|
-
authStatus: "
|
|
2332
|
+
authStatus: "auto",
|
|
2320
2333
|
children: []
|
|
2321
2334
|
});
|
|
2322
2335
|
}
|
|
@@ -2328,7 +2341,7 @@ export function registerAdminApiRoutes(app, store, cpState) {
|
|
|
2328
2341
|
title,
|
|
2329
2342
|
enabled: true,
|
|
2330
2343
|
serviceStatus: "show",
|
|
2331
|
-
authStatus: "
|
|
2344
|
+
authStatus: "auto",
|
|
2332
2345
|
children: groupChildren
|
|
2333
2346
|
});
|
|
2334
2347
|
}
|