openrtc 2.0.1 → 2.2.0
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 +11 -8
- package/dist/{DelegatingRuntimeAdapter-fgz5OPQx.d.ts → DelegatingRuntimeAdapter-BkLR3TNN.d.ts} +33 -31
- package/dist/{ITransport-UNOXiRJD.d.ts → ITransport-yaruAmx3.d.ts} +48 -84
- package/dist/{IpcRuntimeAdapter-CI3vCzk0.d.ts → IpcRuntimeAdapter-DDKeQ6UC.d.ts} +6 -6
- package/dist/WasmBridge-DVQ2YPRB.js +1 -0
- package/dist/{assembly-CLdwe5T-.d.ts → assembly-BTzwQuwI.d.ts} +67 -74
- package/dist/{capabilities-BUe5YldR.d.ts → capabilities-BwzPe51I.d.ts} +19 -19
- package/dist/chunk-2IRNZN3N.js +1 -0
- package/dist/chunk-4MLJXEVV.js +2 -0
- package/dist/chunk-AJQVMVYW.js +1 -0
- package/dist/chunk-BOS554IK.js +2 -0
- package/dist/chunk-DI5VSZ2T.js +2 -0
- package/dist/chunk-F4BJ72HN.js +1 -0
- package/dist/{chunk-LRT5GEGH.js → chunk-FKEKINIM.js} +2 -2
- package/dist/chunk-GND6UW37.js +1 -0
- package/dist/{chunk-Z2WVSXPW.js → chunk-HUG5AX7R.js} +1 -1
- package/dist/chunk-LN4ALFT6.js +1 -0
- package/dist/chunk-NXM5ZGHD.js +2 -0
- package/dist/chunk-OUFHVLDQ.js +2 -0
- package/dist/chunk-SUWCBTBQ.js +1 -0
- package/dist/chunk-UGZJJQPM.js +3 -0
- package/dist/chunk-ZA44REGI.js +2 -0
- package/dist/controlPlane-JJFURVOX.js +1 -0
- package/dist/{OpenRTCShared.d.ts → coreClient.d.ts} +61 -66
- package/dist/coreClient.js +1 -0
- package/dist/{deviceEnrollment-33NZEARB.js → deviceEnrollment-Z2EHP2EX.js} +1 -1
- package/dist/deviceKey-Y35WSEQQ.js +1 -0
- package/dist/deviceProfile-CR2C7OYR.js +2 -0
- package/dist/index.d.ts +30 -30
- package/dist/index.js +1 -1
- package/dist/{ipc-CflAVodw.d.ts → ipc-CPnNwv6f.d.ts} +3 -3
- package/dist/ipcFactory-DQFK65VE.js +1 -0
- package/dist/openrtc-INQDCF23.js +2 -0
- package/dist/openrtc_bg.wasm +0 -0
- package/dist/runtime/WasmRuntimeAdapter.d.ts +4 -4
- package/dist/runtime/WasmRuntimeAdapter.js +1 -1
- package/dist/runtime/device-status.d.ts +10 -10
- package/dist/runtime/device-status.js +1 -1
- package/dist/runtime/factories.d.ts +8 -8
- package/dist/runtime/factories.js +1 -1
- package/dist/runtime/index.d.ts +50 -50
- package/dist/runtime/index.js +1 -1
- package/dist/testing.d.ts +29 -28
- package/dist/testing.js +1 -1
- package/dist/transport/index.d.ts +24 -24
- package/dist/transport/index.js +1 -1
- package/dist/{types-DhmY9hBy.d.ts → types-C4TIUgOJ.d.ts} +74 -70
- package/dist/{types-l3m3GrOe.d.ts → types-D67HlF0p.d.ts} +58 -102
- package/package.json +2 -6
- package/dist/OpenRTCShared.js +0 -1
- package/dist/WasmBridge-P5646IVR.js +0 -1
- package/dist/chunk-45WBH7E3.js +0 -1
- package/dist/chunk-5OTF7W2N.js +0 -3
- package/dist/chunk-7FPG3MFF.js +0 -2
- package/dist/chunk-AG2F6MOB.js +0 -1
- package/dist/chunk-CWGKLGJZ.js +0 -1
- package/dist/chunk-HIXXBEWX.js +0 -1
- package/dist/chunk-IKZ33R7R.js +0 -2
- package/dist/chunk-KJTJLLJE.js +0 -2
- package/dist/chunk-QCPSLUKO.js +0 -1
- package/dist/chunk-VBUDERMM.js +0 -2
- package/dist/chunk-XPL7PUBW.js +0 -2
- package/dist/chunk-Y35AKFCM.js +0 -1
- package/dist/chunk-ZQF5KSOK.js +0 -2
- package/dist/controlPlane-YAMXWHAF.js +0 -1
- package/dist/deviceKey-SBNKLVYF.js +0 -1
- package/dist/deviceProfile-3BEQZLJF.js +0 -2
- package/dist/ipcFactory-JTMNUTZI.js +0 -1
- package/dist/native.d.ts +0 -15
- package/dist/native.js +0 -1
- package/dist/openrtc-JUV7TOTL.js +0 -2
- /package/dist/{deviceManagement-PHY5TIOS.js → deviceManagement-SUMBRXXC.js} +0 -0
- /package/dist/{deviceRoster-VZA3TQOR.js → deviceRoster-EUF6BBF5.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openrtc",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -35,10 +35,6 @@
|
|
|
35
35
|
"types": "./dist/index.d.ts",
|
|
36
36
|
"import": "./dist/index.js"
|
|
37
37
|
},
|
|
38
|
-
"./native": {
|
|
39
|
-
"types": "./dist/native.d.ts",
|
|
40
|
-
"import": "./dist/native.js"
|
|
41
|
-
},
|
|
42
38
|
"./testing": {
|
|
43
39
|
"types": "./dist/testing.d.ts",
|
|
44
40
|
"import": "./dist/testing.js"
|
|
@@ -64,7 +60,7 @@
|
|
|
64
60
|
"scripts": {
|
|
65
61
|
"build": "tsup",
|
|
66
62
|
"check:lightweight-entry": "node scripts/check-lightweight-entry.mjs",
|
|
67
|
-
"check:native-bundle": "node scripts/check-native-
|
|
63
|
+
"check:native-bundle": "node scripts/check-native-bundle.mjs",
|
|
68
64
|
"build:clean": "rm -rf dist && pnpm run build",
|
|
69
65
|
"release:prepare": "pnpm run build:wasm && pnpm run build:clean && pnpm run check:lightweight-entry && pnpm run check:native-bundle",
|
|
70
66
|
"build:types": "tsc --noEmit",
|
package/dist/OpenRTCShared.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {n}from'./chunk-KJTJLLJE.js';import'./chunk-45WBH7E3.js';import'./chunk-NRXEG5GQ.js';function O(i){let s=n({...i});if("auth"in i&&!i.authMode){let n=i.auth;s.authMode=n==="none"?"anonymous":n;}if("identity"in i){let n=i.identity,r=n==="temporary"?"ephemeral":n;!i.deviceIdPersistence&&!i.nodeIdPersistence&&(s.deviceIdPersistence=r),!i.endpointIdPersistence&&!i.nodeIdPersistence&&(s.endpointIdPersistence=r);}return "namespace"in i&&!i.storagePrefix&&(s.storagePrefix=i.namespace),"privacy"in i&&i.strictMode===void 0&&(s.strictMode=!!i.privacy),s}function I(i,s){let n=i.runtime,r=Object.create(n),l=async e=>{if(typeof e!="string")return e;let o=(await n.listDevices()).find(c=>c.deviceId===e);if(!o)throw new Error(`OpenRTC device '${e}' is not currently discoverable.`);return o},u=async e=>({...e,localDeviceId:e?.localDeviceId??await n.getLocalDeviceId()??""}),R=async e=>{let{device:t,scope:o,...c}=e,a=c.deviceId??(typeof t=="string"?t:t?.deviceId)??null,m=c.ticket??(typeof t=="string"?void 0:t?.ticket);a&&!m&&(m=(await l(a).catch(()=>null))?.ticket);let d={...c,scope:o??"session"};return a&&(d.deviceId=a),m&&(d.ticket=m),d},g={list:()=>n.listDevices(),startSession:(e={})=>n.startManagedSession({...e,platform:e.platform??s}),stopSession:e=>n.stopManagedSession(e),listWithStatus:()=>n.listDevicesWithStatus(),watch:e=>n.watchDevices(e),watchWithStatus:e=>n.watchDevicesWithStatus(e),connect:async(e,t)=>n.connectDevice(await l(e),await u(t)),connectWithRetry:async(e,t,o)=>n.connectDeviceWithRetry(await l(e),t,o),disconnect:e=>n.disconnectDevice(e),update:(e,t)=>n.updateDevice(e,t),delete:e=>n.deleteDevice(e),localId:()=>n.getLocalDeviceId(),localInfo:()=>n.getLocalDeviceInfo(),localProfile:e=>n.getLocalDeviceProfile(e),updateLocalName:e=>n.updateLocalDeviceName(e)},v={watch:e=>n.watchPeerStates(e),watchLifecycle:e=>n.watchPeerLifecycle(e),get:e=>n.getPeerState(e),listConnected:()=>n.listConnectedPeers(),connect:e=>n.connectPeer(e),disconnect:(e,t)=>n.disconnectPeer(e,t),forceDisconnect:e=>n.forceDisconnectPeer(e),session:e=>n.getPeerSession(e),sessions:()=>n.listPeerSessions(),waitConnected:(e,t)=>n.waitForConnectedPeer(e,t),readiness:(e,t)=>n.getPeerReadiness(e,t),health:e=>n.getPeerHealth(e),identity:e=>n.resolvePeerIdentity(e),addScope:(e,t)=>n.addPeerScope(e,t),releaseScope:(e,t)=>n.releasePeerScope(e,t),scopes:e=>n.getPeerScopes(e),refresh:()=>n.refreshPeerSnapshot()},C={register:e=>n.registerChannel(e),unregister:e=>n.unregisterChannel(e),list:()=>n.listChannels(),openBi:(e,t,o)=>n.openPeerBi(e,{...o,channelId:t}),openUni:(e,t,o)=>n.openPeerUni(e,{...o,channelId:t}),onIncoming:e=>n.onIncomingStream(e),onIncomingChannel:(e,t)=>n.onIncomingChannelStream(e,o=>{if(o.channel)return t(o)}),connect:async e=>n.connectScopedChannel(await R(e)),connectScoped:e=>n.connectScopedChannel(e)},P={create:e=>n.createRoom(e),join:(e,t)=>n.joinRoom(e,t),leave:e=>n.leaveRoom(e),watch:(e,t)=>n.watchRoom(e,t),members:e=>n.getRoomMembers(e)},h={raw:()=>n.getInvite(),share:e=>n.getTicketWithToken("share",e?.maxConnections??1),grant:(e,t)=>n.getTicketWithToken(e,t?.maxConnections??0),revoke:e=>n.revokeTokensByScope(e)},S={status:()=>n.getRuntimeStatus(),policy:()=>n.getRuntimePolicy(),capabilities:()=>n.getRuntimeCapabilities(),capabilityProfile:()=>n.getCapabilityProfile(),connectionStates:()=>n.getConnectionStates(),onConnectionStateChange:e=>n.onConnectionStateChange(e),connections:()=>n.getConnections(),applicationReadyConnections:e=>n.getApplicationReadyConnections(e),onConnection:e=>n.onConnection(e),onDisconnection:e=>n.onDisconnection(e),onConnectionEvent:e=>n.onConnectionEvent(e),forceReconnectSnapshot:()=>n.forceReconnectSnapshot(),peerReconciliation:()=>n.getPeerReconciliationStats()},b={runtime:n,assembly:i,nodeId:()=>n.getNodeId(),nodeIdFromTicket:e=>n.getNodeIdFromTicket(e),endpointTicket:()=>n.getEndpointTicket(),connectRaw:e=>n.connectRaw(e),openBi:e=>n.openBi(e),openUni:e=>n.openUni(e),isConnected:e=>n.isConnected(e),disconnectNode:e=>n.disconnectNode(e),setAutoConnectExcluded:(e,t)=>n.setAutoConnectExcluded(e,t),notifyNetworkChange:e=>n.notifyNetworkChange(e)};return Object.defineProperties(r,{devices:{get:()=>g,enumerable:true},peers:{get:()=>v,enumerable:true},channels:{get:()=>C,enumerable:true},rooms:{get:()=>P,enumerable:true},tickets:{get:()=>h,enumerable:true},diagnostics:{get:()=>S,enumerable:true},advanced:{get:()=>b,enumerable:true},setAuth:{value:e=>i.setAuthContext(e),enumerable:true,writable:true,configurable:true},setAuthContext:{value:e=>i.setAuthContext(e),enumerable:true,writable:true,configurable:true},syncPlutoAuth:{value:e=>i.syncPlutoAuth(e),enumerable:true,writable:true,configurable:true},bindPlutoAuthHost:{value:()=>i.bindPlutoAuthHost(),enumerable:true,writable:true,configurable:true},signIn:{value:()=>i.signInWithPluto(),enumerable:true,writable:true,configurable:true},signOut:{value:()=>i.signOut(),enumerable:true,writable:true,configurable:true},runtime:{get:()=>n,enumerable:false},_assembly:{get:()=>i,enumerable:false}}),r}export{O as resolveOptions,I as wrapAssembly};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{y as WasmBridge}from'./chunk-ZQF5KSOK.js';import'./chunk-AG2F6MOB.js';import'./chunk-CWGKLGJZ.js';import'./chunk-KJTJLLJE.js';import'./chunk-45WBH7E3.js';import'./chunk-NRXEG5GQ.js';
|
package/dist/chunk-45WBH7E3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=Object.freeze([Object.freeze({id:"iroh-lan",baseProtocol:"iroh",family:"iroh-path",implementation:"path-label",locality:"nearby",maturity:"stable",defaultRank:0,browser:false,native:true,independentlyInstantiable:false}),Object.freeze({id:"webrtc-lan",baseProtocol:"webrtc",family:"optional-route",implementation:"path-label",locality:"nearby",maturity:"stable",defaultRank:1,browser:true,native:true,independentlyInstantiable:false}),Object.freeze({id:"ble",baseProtocol:"iroh",family:"iroh-physical",implementation:"host-installed",locality:"nearby",maturity:"experimental",defaultRank:2,browser:false,native:true,independentlyInstantiable:false}),Object.freeze({id:"iroh-webrtc",baseProtocol:"iroh",family:"iroh-physical",implementation:"carrier-adapter",locality:"mixed",maturity:"stable",defaultRank:3,browser:true,native:true,independentlyInstantiable:false}),Object.freeze({id:"webrtc",baseProtocol:"webrtc",family:"optional-route",implementation:"route-adapter",locality:"mixed",maturity:"stable",defaultRank:4,browser:true,native:true,independentlyInstantiable:true}),Object.freeze({id:"iroh-moq",baseProtocol:"iroh",family:"iroh-physical",implementation:"carrier-adapter",locality:"relay",maturity:"experimental",defaultRank:5,browser:true,native:true,independentlyInstantiable:false}),Object.freeze({id:"moq",baseProtocol:"moq",family:"optional-route",implementation:"route-adapter",locality:"relay",maturity:"experimental",defaultRank:6,browser:true,native:true,independentlyInstantiable:true}),Object.freeze({id:"iroh",baseProtocol:"iroh",family:"iroh-path",implementation:"core",locality:"mixed",maturity:"stable",defaultRank:7,browser:true,native:true,independentlyInstantiable:false}),Object.freeze({id:"iroh-quic",baseProtocol:"iroh",family:"iroh-path",implementation:"path-label",locality:"direct-internet",maturity:"stable",defaultRank:8,browser:false,native:true,independentlyInstantiable:false}),Object.freeze({id:"iroh-relay",baseProtocol:"iroh",family:"iroh-path",implementation:"path-label",locality:"relay",maturity:"stable",defaultRank:9,browser:true,native:true,independentlyInstantiable:false}),Object.freeze({id:"webrtc-turn",baseProtocol:"webrtc",family:"optional-route",implementation:"path-label",locality:"relay",maturity:"stable",defaultRank:10,browser:true,native:true,independentlyInstantiable:false})]),r=Object.freeze(Object.fromEntries(t.map(e=>[e.id,e]))),o=Object.freeze(["iroh-lan","webrtc-lan","ble","iroh-webrtc","webrtc","iroh-moq","moq","iroh","iroh-quic","iroh-relay","webrtc-turn"]),a=Object.freeze(["iroh-lan","webrtc-lan","ble","iroh-webrtc","webrtc","iroh-moq","moq","iroh"]),i=Object.freeze({iroh:80,"iroh-quic":30,"iroh-relay":70,"iroh-lan":10,ble:25,"iroh-webrtc":27,webrtc:40,"webrtc-lan":20,"webrtc-turn":60,"iroh-moq":55,moq:50});var l=t,n=r,R=o,s=a,m=i;function p(e){return n[e]}function u(){return l}export{l as a,R as b,s as c,m as d,p as e,u as f};
|