@xcanwin/manyoyo 6.2.19 → 7.0.2

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/web/server.js CHANGED
@@ -4298,6 +4298,13 @@ async function handleWebAuthRoutes(req, res, pathname, ctx, state) {
4298
4298
  return true;
4299
4299
  }
4300
4300
 
4301
+ // shadcn/ui 版前端的登录页:与 /shadcn 复用同一份构建产物,
4302
+ // 由前端按 pathname 自行渲染登录表单,登录逻辑仍复用 /auth/login 接口
4303
+ if (req.method === 'GET' && pathname === '/shadcn/auth/login') {
4304
+ sendHtml(res, 200, loadTemplate('shadcn.html'));
4305
+ return true;
4306
+ }
4307
+
4301
4308
  const authFrontendMatch = pathname.match(/^\/auth\/frontend\/([A-Za-z0-9._-]+)$/);
4302
4309
  if (req.method === 'GET' && authFrontendMatch) {
4303
4310
  const assetName = authFrontendMatch[1];
@@ -4359,6 +4366,10 @@ function sendWebUnauthorized(res, pathname, ctx) {
4359
4366
  sendRedirect(res, 302, '/auth/login', { 'Set-Cookie': getWebAuthClearCookie() });
4360
4367
  return;
4361
4368
  }
4369
+ if (pathname === '/shadcn') {
4370
+ sendRedirect(res, 302, '/shadcn/auth/login', { 'Set-Cookie': getWebAuthClearCookie() });
4371
+ return;
4372
+ }
4362
4373
  sendHtml(
4363
4374
  res,
4364
4375
  401,
@@ -5467,6 +5478,12 @@ async function startWebServer(options) {
5467
5478
  return;
5468
5479
  }
5469
5480
 
5481
+ // shadcn/ui 版前端的试验性入口,构建产物见 frontend-shadcn/(npm run build:web-shadcn)
5482
+ if (req.method === 'GET' && pathname === '/shadcn') {
5483
+ sendHtml(res, 200, loadTemplate('shadcn.html'));
5484
+ return;
5485
+ }
5486
+
5470
5487
  const appFrontendMatch = pathname.match(/^\/app\/frontend\/([A-Za-z0-9._-]+)$/);
5471
5488
  if (req.method === 'GET' && appFrontendMatch) {
5472
5489
  const assetName = appFrontendMatch[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xcanwin/manyoyo",
3
- "version": "6.2.19",
3
+ "version": "7.0.2",
4
4
  "imageVersion": "1.9.1-common",
5
5
  "playwrightCliVersion": "0.1.18",
6
6
  "description": "AI Agent CLI Security Sandbox for Docker and Podman",
@@ -32,7 +32,9 @@
32
32
  "scripts": {
33
33
  "dev:release": "node scripts/dev-release.js",
34
34
  "build:web-editor": "node scripts/build-web-code-editor.js",
35
- "prepack": "npm run build:web-editor",
35
+ "build:web-shadcn": "node scripts/build-web-shadcn.js",
36
+ "dev:web-shadcn": "node scripts/dev-web-shadcn.js",
37
+ "prepack": "npm run build:web-editor && npm run build:web-shadcn",
36
38
  "prepare": "npm run build:web-editor",
37
39
  "install-link": "npm link",
38
40
  "test": "jest --coverage",