iframe-coordinator-cli 5.0.0-beta.2 → 5.0.0-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iframe-coordinator-cli",
3
- "version": "5.0.0-beta.2",
3
+ "version": "5.0.0-beta.3",
4
4
  "description": "CLI for local iframe-coordinator development",
5
5
  "dependencies": {
6
6
  "cheerio": "^1.0.0-rc.10",
@@ -1,6 +1,6 @@
1
1
  module.exports = function(frameRouter) {
2
- frameRouter.setupFrames(
3
- {
2
+ frameRouter.clientConfig = {
3
+ clients: {
4
4
  app1: {
5
5
  url: 'http://localhost:8080/client-app-1/#/',
6
6
  assignedRoute: '/app1'
@@ -9,10 +9,11 @@ module.exports = function(frameRouter) {
9
9
  url: 'http://localhost:8080/client-app-2/#/',
10
10
  assignedRoute: '/app2',
11
11
  sandbox: 'allow-presentation', // optional
12
- allow: 'microphone http://localhost:8080;' // optional
12
+ allow: 'microphone http://localhost:8080;', // optional
13
+ defaultTitle: 'iframe Application 2 Example' // optional, but needed for accessibility
13
14
  }
14
15
  },
15
- {
16
+ envData: {
16
17
  locale: 'en-US',
17
18
  hostRootUrl: window.location.origin,
18
19
  registeredKeys: [
@@ -22,7 +23,7 @@ module.exports = function(frameRouter) {
22
23
  ],
23
24
  custom: getCustomClientData()
24
25
  }
25
- );
26
+ };
26
27
 
27
28
  return {
28
29
  // These are the topics that the host app should display payloads for when
@@ -14,13 +14,18 @@
14
14
  <nav>
15
15
  <ul>
16
16
  <li v-for="(client, id) in clientConfig" v-bind:key="id">
17
- <a v-bind:href="'#' + client.assignedRoute">{{id}} @ {{client.assignedRoute}}</a>
17
+ <a v-bind:href="'#' + client.assignedRoute"
18
+ >{{ id }} @ {{ client.assignedRoute }}</a
19
+ >
18
20
  </li>
19
21
  </ul>
20
22
  </nav>
21
23
  </div>
22
24
  <div v-else>
23
- <p>I couldn't find any registered client applications. Please check your ifc-cli configuration file.</p>
25
+ <p>
26
+ I couldn't find any registered client applications. Please check your
27
+ ifc-cli configuration file.
28
+ </p>
24
29
  </div>
25
30
  </div>
26
31
  <frame-router
@@ -91,12 +96,12 @@ export default {
91
96
  // Call the custom config set up on the CLI.
92
97
  const oldSetupFrames = frameRouter.setupFrames;
93
98
  frameRouter.setupFrames = (...args) => {
94
- this.clientConfig = args[0];
95
99
  oldSetupFrames.apply(frameRouter, args);
96
100
  };
97
101
 
98
102
  if (window.routerSetup && typeof window.routerSetup === 'function') {
99
103
  const clientConfig = window.routerSetup(frameRouter);
104
+ this.clientConfig = frameRouter.clientConfig.clients;
100
105
  if (clientConfig.publishTopics) {
101
106
  clientConfig.publishTopics.forEach(topic => {
102
107
  frameRouter.messaging.addListener(topic, publication => {