@olares/lares-mobile 0.15.4 → 0.15.5

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/App.vue +7 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olares/lares-mobile",
3
- "version": "0.15.4",
3
+ "version": "0.15.5",
4
4
  "description": "Lares chat component for LarePass",
5
5
  "type": "module",
6
6
  "repository": {
@@ -28,7 +28,7 @@
28
28
  "vue": "^3.2.0"
29
29
  },
30
30
  "dependencies": {
31
- "@olares/lares-core": "0.15.4",
31
+ "@olares/lares-core": "0.15.5",
32
32
  "markdown-it": "^14.3.0"
33
33
  }
34
34
  }
package/src/App.vue CHANGED
@@ -110,6 +110,7 @@
110
110
  </template>
111
111
 
112
112
  <script>
113
+ import { pickHostPorts } from "@olares/lares-core/larepass/host";
113
114
  import { connectChat } from "./runtime.js";
114
115
  import { createT } from "./i18n.js";
115
116
  import { failText, withPendingUser } from "./chat/format.js";
@@ -140,6 +141,9 @@ export default {
140
141
  proxyPrefix: { type: String, default: undefined },
141
142
  request: { type: Function, default: undefined },
142
143
  env: { type: Object, default: undefined },
144
+ // Vue drops an undeclared prop into attrs, so a port missing from this list
145
+ // never reaches `ports` below no matter what the host passes.
146
+ socketProtocol: { type: [Function, String, Array], default: undefined },
143
147
  },
144
148
  data() {
145
149
  return {
@@ -178,12 +182,9 @@ export default {
178
182
  },
179
183
  computed: {
180
184
  ports() {
181
- return {
182
- baseUrl: this.baseUrl,
183
- proxyPrefix: this.proxyPrefix,
184
- request: this.request,
185
- env: this.env,
186
- };
185
+ // Built from the canonical key list rather than spelled out, so adding a
186
+ // port does not need this object edited in lockstep.
187
+ return pickHostPorts(this);
187
188
  },
188
189
  runtime() {
189
190
  return connectChat(this.ports);