@zlooks.cn/gateway-server 1.0.5 → 1.0.6
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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/[pluginId]/[[...path]]/page.js +1 -1
- package/.next/server/app/[pluginId]/[[...path]]/page.js.nft.json +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/chunks/377.js +1 -0
- package/.next/server/chunks/919.js +1 -1
- package/.next/server/chunks/991.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/trace +22 -22
- package/.next/trace-build +1 -1
- package/dist/runtime/mcp-gateway-runtime.d.ts.map +1 -1
- package/dist/runtime/mcp-gateway-runtime.js +4 -0
- package/dist/runtime/mcp-gateway-runtime.js.map +1 -1
- package/package.json +4 -4
- package/.next/server/chunks/964.js +0 -1
- /package/.next/static/{AMEG7Dldd9-Zc_B7WKNxM → W7JvaJOxXMTBDe7uMIlWm}/_buildManifest.js +0 -0
- /package/.next/static/{AMEG7Dldd9-Zc_B7WKNxM → W7JvaJOxXMTBDe7uMIlWm}/_ssgManifest.js +0 -0
package/.next/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-webpack","duration":
|
|
1
|
+
[{"name":"run-webpack","duration":73679167,"timestamp":948964317010,"id":14,"parentId":1,"tags":{},"startTime":1788954743791,"traceId":"7d199f14e3c512f9"},{"name":"run-typescript","duration":963594,"timestamp":949038016905,"id":4740,"parentId":1,"tags":{},"startTime":1788954817493,"traceId":"7d199f14e3c512f9"},{"name":"static-check","duration":1686903,"timestamp":949039005903,"id":4743,"parentId":1,"tags":{},"startTime":1788954818482,"traceId":"7d199f14e3c512f9"},{"name":"static-generation","duration":4566533,"timestamp":949041151655,"id":4763,"parentId":1,"tags":{},"startTime":1788954820628,"traceId":"7d199f14e3c512f9"},{"name":"collect-build-traces","duration":16106284,"timestamp":949040693630,"id":4760,"parentId":1,"tags":{},"startTime":1788954820170,"traceId":"7d199f14e3c512f9"},{"name":"telemetry-flush","duration":111,"timestamp":949056804032,"id":4771,"parentId":1,"tags":{},"startTime":1788954836280,"traceId":"7d199f14e3c512f9"},{"name":"next-build","duration":92989888,"timestamp":948963814271,"id":1,"tags":{"buildMode":"default","version":"16.3.0","bundler":"webpack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1788954743288,"traceId":"7d199f14e3c512f9"}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-gateway-runtime.d.ts","sourceRoot":"","sources":["../../src/runtime/mcp-gateway-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAItD,KAAK,aAAa,GAAG,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;AAE7D,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"mcp-gateway-runtime.d.ts","sourceRoot":"","sources":["../../src/runtime/mcp-gateway-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAItD,KAAK,aAAa,GAAG,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;AAE7D,eAAO,MAAM,wBAAwB,QAe1B,CAAC;AAEZ,qBAAa,iBAAiB;;IAK1B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAHzB,YACmB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC,EAC5B,MAAM,EAAE,aAAa,EACpC;IAEJ,IAAW,UAAU,IAAI,eAAe,CAAC,YAAY,CAAC,CAIrD;IAEM,OAAO,IAAI,oBAAoB,CAIrC;IAEY,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAyDlC;IAEY,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAalC;CAEF"}
|
|
@@ -14,6 +14,10 @@ export const MCP_GATEWAY_INSTRUCTIONS = [
|
|
|
14
14
|
"For a multi-step workflow, prefer the owning provider's Prompt when one is available.",
|
|
15
15
|
'A Prompt is guidance, not evidence that any action succeeded.',
|
|
16
16
|
'Read current state before a write, obtain explicit user confirmation whenever the workflow requires it, invoke the Tool, and read the resulting state again before reporting success.',
|
|
17
|
+
'An event-catalog Resource represents only the events owned by its currently discovered Provider; a Provider that is absent from the current MCP catalog contributes no available events.',
|
|
18
|
+
'When creating or modifying a service, enumerate the complete Resource catalog and read every currently discovered event catalog before selecting event contracts or Consumer helpers.',
|
|
19
|
+
'Refresh the event catalog before finalizing generated service code; if a required catalog disappeared or conflicts, stop and report the unavailable contract.',
|
|
20
|
+
'Never infer an available event from an installed package, source-tree inventory, prior run, or conversation history.',
|
|
17
21
|
].join(' ');
|
|
18
22
|
export class McpGatewayRuntime {
|
|
19
23
|
application;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-gateway-runtime.js","sourceRoot":"","sources":["../../src/runtime/mcp-gateway-runtime.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,gBAAgB,GAGjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAwB,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAIhD,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,wFAAwF;IACxF,sHAAsH;IACtH,sNAAsN;IACtN,sQAAsQ;IACtQ,8RAA8R;IAC9R,4RAA4R;IAC5R,qXAAqX;IACrX,uFAAuF;IACvF,+DAA+D;IAC/D,uLAAuL;
|
|
1
|
+
{"version":3,"file":"mcp-gateway-runtime.js","sourceRoot":"","sources":["../../src/runtime/mcp-gateway-runtime.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,gBAAgB,GAGjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAwB,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAIhD,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,wFAAwF;IACxF,sHAAsH;IACtH,sNAAsN;IACtN,sQAAsQ;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BAAsB,EAAE,MAAM,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zlooks.cn/gateway-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"@zlooks.cn/public-host-contract": "1.0.0",
|
|
53
53
|
"@zlooks.cn/registry-config": "1.0.0",
|
|
54
54
|
"@zlooks.cn/service-command": "1.0.0",
|
|
55
|
-
"@zlooks.cn/ui": "1.0.
|
|
56
|
-
"@zlooks.cn/user-shared": "1.0.
|
|
55
|
+
"@zlooks.cn/ui": "1.0.2",
|
|
56
|
+
"@zlooks.cn/user-shared": "1.0.1",
|
|
57
57
|
"@zlooks.cn/utils": "1.0.0",
|
|
58
58
|
"antd": "6.6.1",
|
|
59
59
|
"detect-port": "2.1.0",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"typescript": "7.0.2",
|
|
73
73
|
"vitest": "4.1.11"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "b118899f7646d3cb4e82563f0d32f68238bb38d0"
|
|
76
76
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
exports.id=964,exports.ids=[964],exports.modules={4151:(a,b,c)=>{Promise.resolve().then(c.bind(c,80395)),Promise.resolve().then(c.bind(c,71954))},8199:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,12698,23))},12326:(a,b,c)=>{"use strict";c.d(b,{o:()=>M});var d=c(77598),e=c(69350),f=c(87903),g=c(36928),h=c(69347),i=c(87056),j=c(41309);let k="cn.zlooks.user.server",l=i.k5(["logout","user-request","family-limit","credential-recovery"]),m=i.Yj().refine(a=>a===a.trim().normalize("NFKC"),"Display name must be normalized").refine(a=>Array.from(a).length>=1&&Array.from(a).length<=160,"Display name must contain 1 to 160 Unicode code points"),n=i.Yj().refine(a=>a===a.trim().normalize("NFKC"),"Bio must be normalized").refine(a=>Array.from(a).length>=1&&Array.from(a).length<=500,"Bio must contain 1 to 500 Unicode code points"),o=i.OZ().max(2048).refine(a=>{let b=new URL(a).protocol;return"http:"===b||"https:"===b},"URL must use HTTP or HTTPS").refine(a=>a===new URL(a).toString(),"URL must be canonical"),p=i.Rp().max(320).refine(a=>a===a.toLocaleLowerCase("en-US"),"Email must be lowercase"),q=i.re({id:i.uR(),displayName:m.nullable(),avatar:o.nullable(),homepage:o.nullable(),bio:n.nullable(),email:p.nullable(),emailVerified:i.zM(),status:i.k5(["active","disabled","deleted"]),createdAt:j.w$({offset:!0}),updatedAt:j.w$({offset:!0}),version:i.ai().int().positive()}).superRefine((a,b)=>{a.emailVerified&&null===a.email&&b.addIssue({code:"custom",message:"A verified user snapshot must include its email",path:["email"]}),Date.parse(a.updatedAt)<Date.parse(a.createdAt)&&b.addIssue({code:"custom",message:"User updated time must not precede creation time",path:["updatedAt"]})}).readonly(),r=i.re({id:i.uR(),userId:i.uR(),createdAt:j.w$({offset:!0}),expiresAt:j.w$({offset:!0}),lastSeenAt:j.w$({offset:!0}),revokedAt:j.w$({offset:!0}).nullable(),revokeReason:l.nullable()}).superRefine((a,b)=>{let c=Date.parse(a.createdAt);null===a.revokedAt!=(null===a.revokeReason)&&b.addIssue({code:"custom",message:"Session revocation time and reason must be present together",path:["revokedAt"]}),Date.parse(a.expiresAt)<=c&&b.addIssue({code:"custom",message:"Session expiry must follow creation time",path:["expiresAt"]});let d=Date.parse(a.lastSeenAt);(d<c||d>Date.parse(a.expiresAt))&&b.addIssue({code:"custom",message:"Session last-seen time must fall within its lifetime",path:["lastSeenAt"]}),null!==a.revokedAt&&Date.parse(a.revokedAt)<c&&b.addIssue({code:"custom",message:"Session revoked time must not precede creation time",path:["revokedAt"]})}).readonly(),s=i.Yj().max(256).regex(/^[a-z][a-z0-9]*(?:\.[a-z][a-z0-9-]*)+\.v[1-9][0-9]*$/),t=i.Yj().max(256).regex(/^[a-z][a-z0-9]*(?:\.[a-z][a-z0-9]*)+$/),u=i.Yj().regex(/^[a-z][a-z0-9-]{0,63}$/),v=i.Yj().trim().min(1).max(256),w=i.re({protocol:i.eu("zlooks.event"),protocolVersion:i.eu(1),eventId:i.uR(),type:s,producer:t,aggregate:i.re({type:u,id:v}).readonly(),occurredAt:j.w$({offset:!0}),data:i.L5()}).readonly();function x(a,b,c,d){let e,f=Object.freeze({type:e=s.parse(a),parse(a){let b=w.parse(a);if(b.type!==e)throw TypeError(`Expected event type ${e}`);return Object.freeze({...b,type:e,aggregate:Object.freeze({...b.aggregate}),data:c.parse(b.data)})}});return Object.freeze({type:f.type,parse(c){let e=f.parse(c);if(e.producer!==k)throw TypeError(`Expected event producer ${k}`);if(e.aggregate.type!==b||e.aggregate.id!==d(e.data))throw TypeError(`${a} aggregate does not identify its event data`);return e}})}x("cn.zlooks.user.registered.v1","user",i.re({user:q}).refine(a=>"active"===a.user.status,{message:"A registered user snapshot must be active",path:["user","status"]}).readonly(),a=>a.user.id),x("cn.zlooks.user.email-verified.v1","user",i.re({user:q}).refine(a=>null!==a.user.email&&a.user.emailVerified,{message:"An email-verified event must contain a verified email snapshot",path:["user","emailVerified"]}).readonly(),a=>a.user.id);let y=i.k5(["displayName","avatar","homepage","bio"]);x("cn.zlooks.user.profile-updated.v1","user",i.re({user:q,changedFields:i.YO(y).min(1).max(4).refine(a=>new Set(a).size===a.length,"Profile fields must be unique").readonly()}).readonly(),a=>a.user.id),x("cn.zlooks.user.session-created.v1","session-family",i.re({user:q,sessionFamily:r,intent:i.k5(["login","registration","recovery"])}).superRefine((a,b)=>{a.sessionFamily.userId!==a.user.id&&b.addIssue({code:"custom",message:"Session and user snapshots must identify the same user",path:["sessionFamily","userId"]}),null!==a.sessionFamily.revokedAt&&b.addIssue({code:"custom",message:"A created session snapshot must be active",path:["sessionFamily","revokedAt"]}),"active"!==a.user.status&&b.addIssue({code:"custom",message:"A session-created event must contain an active user snapshot",path:["user","status"]})}).readonly(),a=>a.sessionFamily.id),x("cn.zlooks.user.session-revoked.v1","session-family",i.re({user:q,sessionFamily:r}).superRefine((a,b)=>{a.sessionFamily.userId!==a.user.id&&b.addIssue({code:"custom",message:"Session and user snapshots must identify the same user",path:["sessionFamily","userId"]}),null===a.sessionFamily.revokedAt&&b.addIssue({code:"custom",message:"A revoked session snapshot must include its revocation",path:["sessionFamily","revokedAt"]})}).readonly(),a=>a.sessionFamily.id),Object.freeze([Object.freeze({exact:"/api/auth/methods",methods:Object.freeze(["GET"]),forwardCookieNames:Object.freeze([])}),Object.freeze({exact:"/api/user/shell",methods:Object.freeze(["GET"]),forwardCookieNames:Object.freeze([h.CY])}),Object.freeze({exact:"/api/user",methods:Object.freeze(["GET","PATCH"]),forwardCookieNames:Object.freeze([h.CY])}),Object.freeze({exact:"/api/user/sessions",methods:Object.freeze(["GET"]),forwardCookieNames:Object.freeze([h.CY])}),Object.freeze({exact:"/api/auth/transactions",methods:Object.freeze(["POST"]),forwardCookieNames:Object.freeze([])}),Object.freeze({prefix:"/api/auth/transactions/",methods:Object.freeze(["POST"]),forwardCookieNames:Object.freeze([])}),Object.freeze({exact:"/api/auth/logout",methods:Object.freeze(["POST"]),forwardCookieNames:Object.freeze([h.CY])}),Object.freeze({exact:"/api/auth/session/refresh",methods:Object.freeze(["POST"]),forwardCookieNames:Object.freeze([h.CY])}),Object.freeze({prefix:"/api/user/sessions/",methods:Object.freeze(["POST"]),forwardCookieNames:Object.freeze([h.CY])})]),Object.freeze({crossOriginRejected:1001,requestRejected:1002,authenticationRequired:1003,sessionExpired:1004,authenticationDenied:1005,authenticationPending:1006,routeNotFound:1007,accountNotFound:1008,accountAlreadyExists:1009,invalidVerificationCode:1010,verificationRateLimited:1011,emailDeliveryFailed:1012,serviceUnavailable:1013});let z=i.Yj().min(1).max(2048).regex(/^\/(?!\/)[^?#]*$/),A=i.gM("status",[i.re({status:i.eu("anonymous"),loginMethods:i.YO(i.re({id:i.Yj().min(1).max(128),label:i.Yj().min(1).max(80),href:z})).max(64)}),i.re({status:i.eu("authenticated"),user:i.re({label:i.Yj().min(1).max(160),secondary:i.Yj().min(1).max(320).optional(),avatarText:i.Yj().min(1).max(8),avatarUrl:i.OZ({protocol:/^https?$/}).max(2048).optional()}),accountHref:z,logoutHref:z})]).readonly(),B=i.gM("action",[i.re({action:i.eu("set"),value:i.Yj().min(1).max(4096),expiresAt:j.w$({offset:!0})}),i.re({action:i.eu("clear")})]);i.re({}).readonly();let C=i.re({id:i.uR(),displayName:i.Yj().trim().min(1).max(160).nullable(),avatar:i.OZ({protocol:/^https?$/}).max(2048).nullable(),homepage:i.OZ({protocol:/^https?$/}).max(2048).nullable().optional(),bio:i.Yj().trim().min(1).max(500).nullable().optional()}).readonly();i.gM("authenticated",[i.re({authenticated:i.eu(!1)}),i.re({authenticated:i.eu(!0),user:C})]).readonly(),i.re({userIds:i.YO(i.uR()).min(1).max(100).refine(a=>new Set(a).size===a.length,{message:"User IDs must be unique"}).readonly()}).readonly(),i.re({users:i.YO(C).max(100).refine(a=>new Set(a.map(a=>a.id)).size===a.length,{message:"Public user profiles must be unique"}).readonly()}).readonly(),i.re({method:i.k5(["GET","POST","PATCH"]),path:z,origin:i.Yj().max(2048).optional(),clientKey:i.Yj().regex(/^[a-f0-9]{64}$/),body:i.L5().optional()}).readonly();let D=i.re({method:i.k5(["GET","POST","PATCH"]),path:z,origin:i.Yj().max(2048).optional(),clientKey:i.Yj().regex(/^[a-f0-9]{64}$/),body:i.L5().optional()}).readonly(),E=f.pF.superRefine((a,b)=>{for(let[c,d]of(a.cookieEffects??[]).entries())d.name!==h.CY&&b.addIssue({code:"custom",message:"User Browser API may only mutate its declared session cookie",path:["cookieEffects",c,"name"]})}).readonly();i.re({status:i.ai().int().min(200).max(599).refine(a=>a<300||a>=400),body:f.RW,sessionCookie:B.optional()}).superRefine((a,b)=>{let c=a.status>=200&&a.status<300;!(0,f.lu)(a.body)!==c&&b.addIssue({code:"custom",message:"HTTP status and browser API response code disagree",path:["body","code"]})}).readonly(),i.re({protocol:i.eu("zlooks.user.credential-lifecycle"),kind:i.k5(["registration","recovery"]),authenticationTransactionId:i.uR(),extensionId:i.Yj().regex(/^[a-z][a-z0-9._-]{0,127}$/),methodId:i.Yj().regex(/^[a-z][a-z0-9._-]{0,127}$/),subject:i.Yj().trim().min(1).max(512),email:i.Rp().max(320),occurredAt:j.w$({offset:!0})}).readonly(),i.re({acknowledged:i.eu(!0)}).readonly();let F=i.Yj().min(1).max(2048).regex(/^\/(?!\/)[^?#]*$/),G=i.OZ().refine(a=>{let b=new URL(a);return("http:"===b.protocol||"https:"===b.protocol)&&!b.username&&!b.password&&"/"===b.pathname&&!b.search&&!b.hash},"Public origin must be one canonical HTTP(S) origin"),H=i.re({key:i.Yj().min(1).max(256),label:i.Yj().min(1).max(160),href:F,order:i.ai().finite()}),I=i.re({navigation:i.YO(H).max(256),origin:G,pathname:F,user:i.L5()}),J=i.re({status:i.eu("unavailable")});var K=c(60255);let L=(0,d.createHash)("sha256").update("zlooks:gateway:rsc-shell:v1").digest("hex");async function M(a){var b;let c,d=await N(a),e={navigation:(0,K.R)(a.rsc,a.policy),origin:a.origin,pathname:a.pathname,user:d},f={[g.qe]:(0,g.WA)(a.globalConfig),__zlooks_shell_context:JSON.stringify((b=e,{navigation:(c=I.parse(b)).navigation,origin:c.origin,pathname:c.pathname,user:function(a){let b=J.safeParse(a);return b.success?b.data:A.parse(a)}(c.user)}))};return a.sessionToken&&(f.__zlooks_user_session=a.sessionToken),{params:f,shell:e}}async function N(a){try{var b,c,d;let g=(b={method:"GET",path:"/api/user/shell",clientKey:L},D.parse(f.Dy.parse(b))),i=(c=await a.application.call(k,"/browser/call",g,{context:(0,e.eC)(a.sessionToken?{[f.Ih]:{[h.CY]:a.sessionToken}}:{}),timeout:1500,retries:0,...a.signal?{signal:a.signal}:{}}),E.parse(c));if(200!==i.status)throw Error(`User shell projection failed with status ${i.status}`);if((0,f.lu)(i.body))throw Error(`User shell projection failed with code ${i.body.code}`);return d=i.body.data,A.parse(d)}catch(b){if(a.signal?.aborted)throw a.signal.reason??Error("RSC shell request was aborted");return a.logger.warn({err:b,event:"gateway.rsc-shell.unavailable"},"User shell projection is unavailable"),{status:"unavailable"}}}},28341:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,12698,23)),Promise.resolve().then(c.t.bind(c,84933,23)),Promise.resolve().then(c.t.bind(c,55205,23)),Promise.resolve().then(c.t.bind(c,88268,23)),Promise.resolve().then(c.t.bind(c,4692,23)),Promise.resolve().then(c.t.bind(c,45504,23)),Promise.resolve().then(c.t.bind(c,37577,23)),Promise.resolve().then(c.t.bind(c,15648,23))},41909:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,75536,23)),Promise.resolve().then(c.t.bind(c,3699,23)),Promise.resolve().then(c.t.bind(c,37903,23)),Promise.resolve().then(c.t.bind(c,73762,23)),Promise.resolve().then(c.t.bind(c,15190,23)),Promise.resolve().then(c.t.bind(c,69970,23)),Promise.resolve().then(c.t.bind(c,15687,23)),Promise.resolve().then(c.bind(c,59266))},47519:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,75536,23))},57295:(a,b,c)=>{Promise.resolve().then(c.bind(c,9641)),Promise.resolve().then(c.bind(c,57944))},57944:(a,b,c)=>{"use strict";c.d(b,{default:()=>i});var d=c(95780),e=c(25730),f=c(96157),g=c(51402);function h(){return(0,d.jsx)("div",{"aria-hidden":"true","data-hile-rsc-initial-route":!0})}function i({assetMountPath:a,csrfToken:b,children:c}){return(0,d.jsx)(f.j,{serverFunctions:{headers:{"x-rsc-csrf-token":b}},children:(0,d.jsx)(e.jj,{assetMountPath:a,suspensePolicy:"host",renderError:(a,b,c)=>(0,d.jsxs)("section",{role:"alert","data-hile-rsc-error":b.referenceId,children:[(0,d.jsx)("p",{children:"插件组件暂时无法加载。"}),(0,d.jsx)("button",{type:"button",onClick:c,children:"重试"})]}),children:(0,d.jsx)(g.Suspense,{fallback:(0,d.jsx)(h,{}),children:c})})})}},60255:(a,b,c)=>{"use strict";c.d(b,{R:()=>e});var d=c(80674);function e(a,b){return(0,d.l)(a.deployments,a.artifacts).filter(({pluginId:a,buildId:c})=>b.canDiscover({pluginId:a,buildId:c})).flatMap(({pluginId:a,metadata:b})=>(b?.navigation??[]).map(b=>{var c,d;return{key:`${a}:${b.id}`,label:b.label,href:(c=a,d=b.path,`/${encodeURIComponent(c)}${"/"===d?"":d}`),order:b.order??0}})).sort((a,b)=>a.order-b.order||a.key.localeCompare(b.key))}},71331:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>k,dynamic:()=>j,metadata:()=>i});var d=c(16818),e=c(52167),f=c(2963),g=c(45964),h=c(71954);c(23977),c(86586),c(88247);let i={referrer:"strict-origin-when-cross-origin",icons:{icon:[{url:"/favicon.ico",type:"image/svg+xml"}]},formatDetection:{email:!1,address:!1,telephone:!1}},j="force-dynamic";async function k({children:a}){return(await (0,f.oV)(g.A)).withCurrent(({config:b})=>(0,d.jsx)("html",{lang:"zh-CN",children:(0,d.jsx)("body",{children:(0,d.jsx)(e.Z,{children:(0,d.jsx)(h.default,{assetMountPath:b.rsc.assetMountPath,csrfToken:b.rsc.csrfToken,children:a})})})}))}},71954:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(35498).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/evioshen/code/github/cevio/www.zlooks.cn/packages/gateway-server/src/app/rsc-client-runtime.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/evioshen/code/github/cevio/www.zlooks.cn/packages/gateway-server/src/app/rsc-client-runtime.tsx","default")},86586:()=>{},88247:()=>{}};
|
|
File without changes
|
|
File without changes
|