@feng0531/dsh-vcs 0.10.1 → 0.10.4
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/README.md +0 -2
- package/dist/client.js +1 -1
- package/dist/frontend.json +1 -1
- package/dist/interface.js +1 -1
- package/index.mjs +9 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -798,9 +798,15 @@ export function apply(ctx) {
|
|
|
798
798
|
// Older hosts expose explicit owner registration.
|
|
799
799
|
connection.register(ctx,RPC_CHANNEL,host.handle);
|
|
800
800
|
}else{
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
801
|
+
const handle=(endpoint,payload,signal,peer)=>
|
|
802
|
+
peer?.principal?.kind==='owner'?host.handle(endpoint,payload,signal):failure('vcs/forbidden','VCS requires the local owner.');
|
|
803
|
+
if(typeof connection.authorizeIndex==='function' && typeof connection.register==='function'){
|
|
804
|
+
// Pre-split authentication hosts can resolve webServer from Connection's
|
|
805
|
+
// scope during rpc.handle(). Pass the VCS scope, which injects webServer.
|
|
806
|
+
connection.register(ctx,RPC_CHANNEL,handle);
|
|
807
|
+
}else{
|
|
808
|
+
connection.rpc.handle(RPC_CHANNEL,handle);
|
|
809
|
+
}
|
|
804
810
|
}
|
|
805
811
|
registerAssets(ctx);
|
|
806
812
|
registerDirectAssets(ctx);
|