@iris.interactive/handcook 8.0.7-beta.1 → 8.0.8-beta.1

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.
@@ -11,4 +11,4 @@
11
11
  * @author Nicolas PAYS
12
12
  * @date 10/10/2024 14:30
13
13
  * @copyright Copyright (c) 2002-2024 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
- */import{wsconnect as t}from"@nats-io/nats-core";export class HcNats{static server="wss://nats.iris-interactive.fr:443";static async initialize(){try{window.natsConnection=await t({servers:HcNats.server,name:"IrisNatsSender",user:"irisinteractive",pass:"2G4cF4**#*72zBe5%HAmPc89"})}catch(t){console.log(`error connecting to ${JSON.stringify(t)}`)}}async publishMessage(t,e){try{void 0===window.natsConnection&&await HcNats.initialize();let n={lat:window.IRISCollectionTheme.coordinates.latitude,long:window.IRISCollectionTheme.coordinates.longitude,blogName:window.IRISCollectionTheme.blogInfos.blogName,blogUrl:window.IRISCollectionTheme.blogInfos.blogUrl,content:e};window.natsConnection.publish(t,JSON.stringify(n))}catch(t){console.log(`error messaging to ${JSON.stringify(t)}`)}}}let hc_nats=()=>new HcNats;export default hc_nats;
14
+ */import{wsconnect as e}from"@nats-io/nats-core";export class HcNats{static server="wss://nats.iris-interactive.fr:443";static async initialize(){try{window.natsConnection=await e({servers:HcNats.server,name:"IrisNatsSender",user:"irisinteractive",pass:"2G4cF4**#*72zBe5%HAmPc89"})}catch(e){console.log(`error connecting to ${JSON.stringify(e)}`)}}async publishMessage(e,t){try{void 0===window.natsConnection&&await HcNats.initialize();let n={lat:window.IRISCollectionTheme.coordinates.latitude,long:window.IRISCollectionTheme.coordinates.longitude,blogName:window.IRISCollectionTheme.blogInfos.blogName,blogUrl:window.IRISCollectionTheme.blogInfos.blogUrl,content:t};window.natsConnection.publish(e,JSON.stringify(n))}catch(e){console.log(`error messaging to ${JSON.stringify(e)}`)}}}let hc_nats=()=>new HcNats;export default hc_nats;