@w3streamdev/plugin-core 1.0.0 → 1.0.2

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/index.d.mts CHANGED
@@ -27,7 +27,7 @@ interface ServerPluginRecord {
27
27
  }
28
28
 
29
29
  /**
30
- * @w3stream/plugin-core — StoreSyncManager
30
+ * @w3streamdev/plugin-core — StoreSyncManager
31
31
  *
32
32
  * Maintains in-memory store state per plugin and synchronizes updates
33
33
  * across local iframes and remote peers via RTK data channel.
@@ -76,9 +76,9 @@ declare class StoreSyncManager {
76
76
  }
77
77
 
78
78
  /**
79
- * @w3stream/plugin-core — W3PostMessageBridge (host side)
79
+ * @w3streamdev/plugin-core — W3PostMessageBridge (host side)
80
80
  *
81
- * Host-side mirror of the PostMessageTransport in @w3stream/plugin-sdk.
81
+ * Host-side mirror of the PostMessageTransport in @w3streamdev/plugin-core.
82
82
  * Manages the full handshake lifecycle between the host page and plugin iframe.
83
83
  *
84
84
  * Sequence (per PRD Section 2.2 and 4.6):
@@ -114,7 +114,7 @@ declare class W3PostMessageBridge {
114
114
  }
115
115
 
116
116
  /**
117
- * @w3stream/plugin-core — W3PluginObject
117
+ * @w3streamdev/plugin-core — W3PluginObject
118
118
  *
119
119
  * Factory function returning an RTKPlugin-compatible object that
120
120
  * <rtk-plugins>, <rtk-plugin-main>, and <rtk-plugins-toggle> can use
@@ -176,13 +176,13 @@ interface W3PluginObject {
176
176
  declare function createW3PluginObject(serverPlugin: ServerPluginRecord, meeting: unknown, _config: PluginInfraConfig, storeSync?: StoreSyncManager): W3PluginObject;
177
177
 
178
178
  /**
179
- * @w3stream/plugin-core — PluginManager
179
+ * @w3streamdev/plugin-core — PluginManager
180
180
  *
181
181
  * Fetches plugins from your plugin server, builds RTKPlugin-compatible objects,
182
182
  * and patches the meeting object so <rtk-plugins>, <rtk-plugin-main>, and
183
183
  * <rtk-plugins-toggle> work against your own infrastructure.
184
184
  *
185
- * Reference: PRD Section 4 — Package 3: @w3stream/plugin-core
185
+ * Reference: PRD Section 4 — Package 3: @w3streamdev/plugin-core
186
186
  */
187
187
 
188
188
  declare class PluginList {
package/dist/index.d.ts CHANGED
@@ -27,7 +27,7 @@ interface ServerPluginRecord {
27
27
  }
28
28
 
29
29
  /**
30
- * @w3stream/plugin-core — StoreSyncManager
30
+ * @w3streamdev/plugin-core — StoreSyncManager
31
31
  *
32
32
  * Maintains in-memory store state per plugin and synchronizes updates
33
33
  * across local iframes and remote peers via RTK data channel.
@@ -76,9 +76,9 @@ declare class StoreSyncManager {
76
76
  }
77
77
 
78
78
  /**
79
- * @w3stream/plugin-core — W3PostMessageBridge (host side)
79
+ * @w3streamdev/plugin-core — W3PostMessageBridge (host side)
80
80
  *
81
- * Host-side mirror of the PostMessageTransport in @w3stream/plugin-sdk.
81
+ * Host-side mirror of the PostMessageTransport in @w3streamdev/plugin-core.
82
82
  * Manages the full handshake lifecycle between the host page and plugin iframe.
83
83
  *
84
84
  * Sequence (per PRD Section 2.2 and 4.6):
@@ -114,7 +114,7 @@ declare class W3PostMessageBridge {
114
114
  }
115
115
 
116
116
  /**
117
- * @w3stream/plugin-core — W3PluginObject
117
+ * @w3streamdev/plugin-core — W3PluginObject
118
118
  *
119
119
  * Factory function returning an RTKPlugin-compatible object that
120
120
  * <rtk-plugins>, <rtk-plugin-main>, and <rtk-plugins-toggle> can use
@@ -176,13 +176,13 @@ interface W3PluginObject {
176
176
  declare function createW3PluginObject(serverPlugin: ServerPluginRecord, meeting: unknown, _config: PluginInfraConfig, storeSync?: StoreSyncManager): W3PluginObject;
177
177
 
178
178
  /**
179
- * @w3stream/plugin-core — PluginManager
179
+ * @w3streamdev/plugin-core — PluginManager
180
180
  *
181
181
  * Fetches plugins from your plugin server, builds RTKPlugin-compatible objects,
182
182
  * and patches the meeting object so <rtk-plugins>, <rtk-plugin-main>, and
183
183
  * <rtk-plugins-toggle> work against your own infrastructure.
184
184
  *
185
- * Reference: PRD Section 4 — Package 3: @w3stream/plugin-core
185
+ * Reference: PRD Section 4 — Package 3: @w3streamdev/plugin-core
186
186
  */
187
187
 
188
188
  declare class PluginList {
package/dist/index.js CHANGED
@@ -512,7 +512,16 @@ async function fetchPluginsFromServer(config) {
512
512
  }
513
513
  async function patchMeeting(meeting, config) {
514
514
  const m = meeting;
515
- const serverPlugins = await fetchPluginsFromServer(config);
515
+ let serverPlugins;
516
+ try {
517
+ serverPlugins = await fetchPluginsFromServer(config);
518
+ } catch (err) {
519
+ console.warn(
520
+ "[plugin-core] Could not reach plugin server \u2014 meeting will work without custom plugins.",
521
+ err.message
522
+ );
523
+ serverPlugins = [];
524
+ }
516
525
  const storeSync = new StoreSyncManager(meeting);
517
526
  storeSync.listenForRemoteUpdates();
518
527
  const pluginObjects = serverPlugins.map(
package/dist/index.mjs CHANGED
@@ -471,7 +471,16 @@ async function fetchPluginsFromServer(config) {
471
471
  }
472
472
  async function patchMeeting(meeting, config) {
473
473
  const m = meeting;
474
- const serverPlugins = await fetchPluginsFromServer(config);
474
+ let serverPlugins;
475
+ try {
476
+ serverPlugins = await fetchPluginsFromServer(config);
477
+ } catch (err) {
478
+ console.warn(
479
+ "[plugin-core] Could not reach plugin server \u2014 meeting will work without custom plugins.",
480
+ err.message
481
+ );
482
+ serverPlugins = [];
483
+ }
475
484
  const storeSync = new StoreSyncManager(meeting);
476
485
  storeSync.listenForRemoteUpdates();
477
486
  const pluginObjects = serverPlugins.map(
package/package.json CHANGED
@@ -1,38 +1,42 @@
1
- {
2
- "name": "@w3streamdev/plugin-core",
3
- "version": "1.0.0",
4
- "description": "Host-side patch layer — wires @cloudflare/realtimekit into your plugin infrastructure",
5
- "main": "dist/index.js",
6
- "module": "dist/index.mjs",
7
- "types": "dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.mjs",
12
- "require": "./dist/index.js"
13
- }
14
- },
15
- "files": ["dist"],
16
- "scripts": {
17
- "build": "tsup src/index.ts --format cjs,esm --dts --clean",
18
- "dev": "tsup src/index.ts --format cjs,esm --dts --watch",
19
- "typecheck": "tsc --noEmit",
20
- "lint": "eslint src",
21
- "clean": "rm -rf dist"
22
- },
23
- "peerDependencies": {
24
- "@cloudflare/realtimekit": ">=0"
25
- },
26
- "peerDependenciesMeta": {
27
- "@cloudflare/realtimekit": { "optional": false }
28
- },
29
- "dependencies": {
30
- "eventemitter3": "^5.0.1"
31
- },
32
- "devDependencies": {
33
- "@cloudflare/realtimekit": "latest",
34
- "tsup": "^8.0.0",
35
- "typescript": "^5.4.0"
36
- },
37
- "license": "MIT"
38
- }
1
+ {
2
+ "name": "@w3streamdev/plugin-core",
3
+ "version": "1.0.2",
4
+ "description": "Host-side patch layer — wires @cloudflare/realtimekit into your plugin infrastructure",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "scripts": {
19
+ "build": "tsup src/index.ts --format cjs,esm --dts --clean",
20
+ "dev": "tsup src/index.ts --format cjs,esm --dts --watch",
21
+ "typecheck": "tsc --noEmit",
22
+ "lint": "eslint src",
23
+ "clean": "rm -rf dist"
24
+ },
25
+ "peerDependencies": {
26
+ "@cloudflare/realtimekit": ">=0"
27
+ },
28
+ "peerDependenciesMeta": {
29
+ "@cloudflare/realtimekit": {
30
+ "optional": false
31
+ }
32
+ },
33
+ "dependencies": {
34
+ "eventemitter3": "^5.0.1"
35
+ },
36
+ "devDependencies": {
37
+ "@cloudflare/realtimekit": "latest",
38
+ "tsup": "^8.0.0",
39
+ "typescript": "^5.4.0"
40
+ },
41
+ "license": "MIT"
42
+ }