feat(mindspace): add SEO/GEO delivery, page template catalog, and admin hooks
Memind CI / Test, build, and release guards (push) Has been cancelled
Memind CI / Test, build, and release guards (push) Has been cancelled
Enable optional SEO/GEO injection and discovery routes for confirmed public pages while keeping private pages noindex. Add premium page template skills, portal catalog API, template shop UI, and Baidu push gated by memind_adm config. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -6,6 +6,10 @@ import {
|
||||
ensurePlanCatalogSchema,
|
||||
} from '../billing-subscription.mjs';
|
||||
import { resolveNormalizedRouterDecisionMode } from '../chat-intent-router.mjs';
|
||||
import {
|
||||
createPageTemplateCatalogService,
|
||||
ensureTemplateCatalogSchema,
|
||||
} from '../page-template-catalog.mjs';
|
||||
import {
|
||||
createSessionAccess,
|
||||
isSessionBrokerEnabled,
|
||||
@@ -37,7 +41,9 @@ export async function bootstrapPortalAuthServices({
|
||||
env = process.env,
|
||||
logger = console,
|
||||
ensurePlanCatalogSchemaFn = ensurePlanCatalogSchema,
|
||||
ensureTemplateCatalogSchemaFn = ensureTemplateCatalogSchema,
|
||||
createPlanCatalogServiceFn = createPlanCatalogService,
|
||||
createPageTemplateCatalogServiceFn = createPageTemplateCatalogService,
|
||||
createSubscriptionServiceFn = createSubscriptionService,
|
||||
createUserAuthFn = createUserAuth,
|
||||
createUserDataSpaceServiceFn = createUserDataSpaceService,
|
||||
@@ -69,6 +75,7 @@ export async function bootstrapPortalAuthServices({
|
||||
}
|
||||
|
||||
await ensurePlanCatalogSchemaFn(pool);
|
||||
await ensureTemplateCatalogSchemaFn(pool);
|
||||
const planCatalogService =
|
||||
createPlanCatalogServiceFn(pool);
|
||||
const subscriptionService =
|
||||
@@ -143,16 +150,23 @@ export async function bootstrapPortalAuthServices({
|
||||
const wechatPayClient = createWechatPayClientFn(
|
||||
loadWechatPayConfigFn(),
|
||||
);
|
||||
const templateCatalogService = createPageTemplateCatalogServiceFn(pool, {
|
||||
userAuth,
|
||||
h5Root,
|
||||
wechatPay: wechatPayClient,
|
||||
});
|
||||
await templateCatalogService.ensureReady();
|
||||
const rechargeService = createRechargeServiceFn(pool, {
|
||||
userAuth,
|
||||
wechatPay: wechatPayClient,
|
||||
templateCatalogService,
|
||||
});
|
||||
const wechatOAuthService =
|
||||
createWechatOAuthServiceFn(
|
||||
pool,
|
||||
loadWechatOAuthConfigFn(),
|
||||
{ userAuth },
|
||||
);
|
||||
const rechargeService = createRechargeServiceFn(pool, {
|
||||
userAuth,
|
||||
wechatPay: wechatPayClient,
|
||||
});
|
||||
if (wechatPayClient.enabled) {
|
||||
logger.log(
|
||||
`WeChat Pay recharge enabled (${wechatPayClient.apiVersion ?? 'unknown'})`,
|
||||
@@ -173,5 +187,6 @@ export async function bootstrapPortalAuthServices({
|
||||
wechatPayClient,
|
||||
wechatOAuthService,
|
||||
rechargeService,
|
||||
templateCatalogService,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user