openrtc 0.1.1 → 0.1.3
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/dist/chunk-26POO5PL.js +4 -0
- package/dist/index.js +1 -1
- package/dist/openrtc_bg.wasm +0 -0
- package/dist/runtime/index.js +1 -1
- package/package.json +15 -14
- package/wasm/openrtc_bg.wasm +0 -0
- package/wasm/package.json +1 -1
- package/dist/chunk-7VDM4CQ3.js +0 -4
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {l,m as m$1}from'./chunk-
|
|
1
|
+
import {l,m as m$1}from'./chunk-26POO5PL.js';export{a as ScopedSession}from'./chunk-26POO5PL.js';import'./chunk-D54VGRRH.js';import {a}from'./chunk-DIQYFAGL.js';export{p as OPENRTC_RUNTIME_POLICY,q as getRuntimePolicy}from'./chunk-PZ25OCVG.js';import'./chunk-4MH42GUI.js';function m(t){let n={...t};if("auth"in t&&!t.authMode){let o=t.auth;n.authMode=o==="none"?"anonymous":o;}if("identity"in t&&!t.nodeIdPersistence){let o=t.identity;n.nodeIdPersistence=o==="temporary"?"ephemeral":o;}return "namespace"in t&&!t.storagePrefix&&(n.storagePrefix=t.namespace),"privacy"in t&&t.strictMode===void 0&&(n.strictMode=!!t.privacy),n}function d(t){let n=t.runtime,o=Object.create(n),s=async e=>{if(typeof e!="string")return e;let r=(await n.listDevices()).find(h=>h.deviceId===e);if(!r)throw new Error(`OpenRTC device '${e}' is not currently discoverable.`);return r},c=async e=>({...e,localDeviceId:e?.localDeviceId??await n.getLocalDeviceId()??""}),g={list:()=>n.listDevices(),listWithStatus:()=>n.listDevicesWithStatus(),watch:e=>n.watchDevices(e),watchWithStatus:e=>n.watchDevicesWithStatus(e),connect:async(e,i)=>n.connectDevice(await s(e),await c(i)),connectWithRetry:async(e,i,r)=>n.connectDeviceWithRetry(await s(e),i,r),disconnect:e=>n.disconnectDevice(e),update:(e,i)=>n.updateDevice(e,i),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),get:e=>n.getPeerState(e),listConnected:()=>n.listConnectedPeers(),connect:e=>n.connectPeer(e),disconnect:(e,i)=>n.disconnectPeer(e,i),forceDisconnect:e=>n.forceDisconnectPeer(e),session:e=>n.getPeerSession(e),sessions:()=>n.listPeerSessions(),waitConnected:(e,i)=>n.waitForConnectedPeer(e,i),readiness:(e,i)=>n.getPeerReadiness(e,i),health:e=>n.getPeerHealth(e),identity:e=>n.resolvePeerIdentity(e),addScope:(e,i)=>n.addPeerScope(e,i),releaseScope:(e,i)=>n.releasePeerScope(e,i),scopes:e=>n.getPeerScopes(e),refresh:()=>n.refreshPeerSnapshot()},C={register:e=>n.registerChannel(e),unregister:e=>n.unregisterChannel(e),list:()=>n.listChannels(),openBi:(e,i,r)=>n.openPeerBi(e,{...r,channelId:i}),openUni:(e,i,r)=>n.openPeerUni(e,{...r,channelId:i}),onIncoming:e=>n.onIncomingStream(e),onIncomingChannel:(e,i)=>n.onIncomingChannelStream(e,r=>{if(r.channel)return i(r)})},R={status:()=>n.getRuntimeStatus(),policy:()=>n.getRuntimePolicy(),capabilities:()=>n.getRuntimeCapabilities(),connectionStates:()=>n.getConnectionStates(),onConnectionStateChange:e=>n.onConnectionStateChange(e),connections:()=>n.getConnections(),onConnection:e=>n.onConnection(e),onDisconnection:e=>n.onDisconnection(e),onConnectionEvent:e=>n.onConnectionEvent(e),forceReconnectSnapshot:()=>n.forceReconnectSnapshot()},P={runtime:n,assembly:t,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,i)=>n.setAutoConnectExcluded(e,i)};return Object.defineProperties(o,{devices:{get:()=>g,enumerable:true},peers:{get:()=>v,enumerable:true},channels:{get:()=>C,enumerable:true},diagnostics:{get:()=>R,enumerable:true},advanced:{get:()=>P,enumerable:true},setAuth:{value:e=>t.setAuthContext(e),enumerable:true,writable:true,configurable:true},setAuthContext:{value:e=>t.setAuthContext(e),enumerable:true,writable:true,configurable:true},syncPlutoAuth:{value:e=>t.syncPlutoAuth(e),enumerable:true,writable:true,configurable:true},bindPlutoAuthHost:{value:()=>t.bindPlutoAuthHost(),enumerable:true,writable:true,configurable:true},signIn:{value:()=>t.signInWithPluto(),enumerable:true,writable:true,configurable:true},signOut:{value:()=>t.signOut(),enumerable:true,writable:true,configurable:true},runtime:{get:()=>n,enumerable:false},_assembly:{get:()=>t,enumerable:false}}),o}function p(t){let n=m(t),o=l(n);return d(o)}p.native=function(t,n){let o=m(t),s=n??a(),c=m$1(o,s);return d(c)};export{p as OpenRTC};
|
package/dist/openrtc_bg.wasm
CHANGED
|
Binary file
|
package/dist/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{f as DriveGrantActorError,i as DriveGrantActorHandle,j as DriveGrantActorRegistry,k as RuntimeClient,b as RuntimeConnectionController,f as ScopedConnectionActorError,i as ScopedConnectionActorHandle,j as ScopedConnectionActorRegistry,e as clog,d as correlationForDriveGrantScope,m as createIpcClient,l as createWasmClient,g as driveGrantConnectionKey,h as driveGrantConnectionKeyToString,c as renderCorrelationFields,g as scopedConnectionKey,h as scopedConnectionKeyToString}from'../chunk-
|
|
1
|
+
export{f as DriveGrantActorError,i as DriveGrantActorHandle,j as DriveGrantActorRegistry,k as RuntimeClient,b as RuntimeConnectionController,f as ScopedConnectionActorError,i as ScopedConnectionActorHandle,j as ScopedConnectionActorRegistry,e as clog,d as correlationForDriveGrantScope,m as createIpcClient,l as createWasmClient,g as driveGrantConnectionKey,h as driveGrantConnectionKeyToString,c as renderCorrelationFields,g as scopedConnectionKey,h as scopedConnectionKeyToString}from'../chunk-26POO5PL.js';export{a as WasmRuntimeAdapter}from'../chunk-D54VGRRH.js';export{b as TauriRuntimeAdapter,a as createTauriIpcBridge}from'../chunk-UVASANPG.js';export{b as IpcRuntimeAdapter}from'../chunk-DIQYFAGL.js';export{r as BROWSER_WASM_RUNTIME_CAPABILITIES,s as NATIVE_IPC_RUNTIME_CAPABILITIES,p as OPENRTC_RUNTIME_POLICY,t as cloneRuntimeCapabilities,q as getRuntimePolicy,i as logOpenRtcTeardownTrace}from'../chunk-PZ25OCVG.js';import'../chunk-4MH42GUI.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openrtc",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -62,6 +62,19 @@
|
|
|
62
62
|
},
|
|
63
63
|
"./package.json": "./package.json"
|
|
64
64
|
},
|
|
65
|
+
"scripts": {
|
|
66
|
+
"build": "tsup",
|
|
67
|
+
"build:types": "tsc --noEmit",
|
|
68
|
+
"build:wasm": "cd ../../crates/openrtc && wasm-pack build --target web --out-dir ../../packages/openrtc/wasm && rm -rf ../../packages/openrtc/wasm/.gitignore",
|
|
69
|
+
"test": "pnpm run test:deterministic",
|
|
70
|
+
"test:deterministic": "OPENRTC_LIVE_TESTS=0 vitest run tests/unit tests/contract",
|
|
71
|
+
"test:emulator": "OPENRTC_EMULATOR_TESTS=1 OPENRTC_LIVE_TESTS=1 FIREBASE_AUTH_EMULATOR_HOST=127.0.0.1:9100 VITE_USE_EMULATORS=true VITE_OPENRTC_FIRESTORE_EMULATOR_HOST=127.0.0.1:8082 VITE_OPENRTC_RTDB_EMULATOR_HOST=127.0.0.1:9001 vitest run tests/emulator",
|
|
72
|
+
"test:live": "pnpm run build:wasm && pnpm run build && OPENRTC_LIVE_TESTS=1 vitest run tests/live",
|
|
73
|
+
"test:live:emulator": "OPENRTC_LIVE_TESTS=1 FIREBASE_AUTH_EMULATOR_HOST=127.0.0.1:9099 vitest run tests/live",
|
|
74
|
+
"test:watch": "vitest",
|
|
75
|
+
"coverage": "vitest run --coverage",
|
|
76
|
+
"prepublishOnly": "npm run build:wasm && npm run build"
|
|
77
|
+
},
|
|
65
78
|
"dependencies": {
|
|
66
79
|
"firebase": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
|
|
67
80
|
"tweetnacl": "^1.0.3"
|
|
@@ -84,17 +97,5 @@
|
|
|
84
97
|
},
|
|
85
98
|
"bugs": {
|
|
86
99
|
"url": "https://github.com/bluestarburst/Plutonium/issues"
|
|
87
|
-
},
|
|
88
|
-
"scripts": {
|
|
89
|
-
"build": "tsup",
|
|
90
|
-
"build:types": "tsc --noEmit",
|
|
91
|
-
"build:wasm": "cd ../../crates/openrtc && wasm-pack build --target web --out-dir ../../packages/openrtc/wasm && rm -rf ../../packages/openrtc/wasm/.gitignore",
|
|
92
|
-
"test": "pnpm run test:deterministic",
|
|
93
|
-
"test:deterministic": "OPENRTC_LIVE_TESTS=0 vitest run tests/unit tests/contract",
|
|
94
|
-
"test:emulator": "OPENRTC_EMULATOR_TESTS=1 OPENRTC_LIVE_TESTS=1 FIREBASE_AUTH_EMULATOR_HOST=127.0.0.1:9100 VITE_USE_EMULATORS=true VITE_OPENRTC_FIRESTORE_EMULATOR_HOST=127.0.0.1:8082 VITE_OPENRTC_RTDB_EMULATOR_HOST=127.0.0.1:9001 vitest run tests/emulator",
|
|
95
|
-
"test:live": "pnpm run build:wasm && pnpm run build && OPENRTC_LIVE_TESTS=1 vitest run tests/live",
|
|
96
|
-
"test:live:emulator": "OPENRTC_LIVE_TESTS=1 FIREBASE_AUTH_EMULATOR_HOST=127.0.0.1:9099 vitest run tests/live",
|
|
97
|
-
"test:watch": "vitest",
|
|
98
|
-
"coverage": "vitest run --coverage"
|
|
99
100
|
}
|
|
100
|
-
}
|
|
101
|
+
}
|
package/wasm/openrtc_bg.wasm
CHANGED
|
Binary file
|
package/wasm/package.json
CHANGED