@w3streamdev/plugin-core 1.0.4 → 1.0.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.
package/dist/index.d.mts CHANGED
@@ -188,7 +188,14 @@ declare function createW3PluginObject(serverPlugin: ServerPluginRecord, meeting:
188
188
  declare class PluginList {
189
189
  private items;
190
190
  private listeners;
191
+ get length(): number;
191
192
  toArray(): W3PluginObject[];
193
+ forEach(cb: (item: W3PluginObject, index: number, arr: W3PluginObject[]) => void): void;
194
+ map<T>(cb: (item: W3PluginObject, index: number, arr: W3PluginObject[]) => T): T[];
195
+ filter(cb: (item: W3PluginObject, index: number, arr: W3PluginObject[]) => boolean): W3PluginObject[];
196
+ find(cb: (item: W3PluginObject, index: number, arr: W3PluginObject[]) => boolean): W3PluginObject | undefined;
197
+ some(cb: (item: W3PluginObject, index: number, arr: W3PluginObject[]) => boolean): boolean;
198
+ [Symbol.iterator](): Iterator<W3PluginObject>;
192
199
  addListener(event: string, callback: (...args: unknown[]) => void): void;
193
200
  removeListener(event: string, callback: (...args: unknown[]) => void): void;
194
201
  _setItems(items: W3PluginObject[]): void;
package/dist/index.d.ts CHANGED
@@ -188,7 +188,14 @@ declare function createW3PluginObject(serverPlugin: ServerPluginRecord, meeting:
188
188
  declare class PluginList {
189
189
  private items;
190
190
  private listeners;
191
+ get length(): number;
191
192
  toArray(): W3PluginObject[];
193
+ forEach(cb: (item: W3PluginObject, index: number, arr: W3PluginObject[]) => void): void;
194
+ map<T>(cb: (item: W3PluginObject, index: number, arr: W3PluginObject[]) => T): T[];
195
+ filter(cb: (item: W3PluginObject, index: number, arr: W3PluginObject[]) => boolean): W3PluginObject[];
196
+ find(cb: (item: W3PluginObject, index: number, arr: W3PluginObject[]) => boolean): W3PluginObject | undefined;
197
+ some(cb: (item: W3PluginObject, index: number, arr: W3PluginObject[]) => boolean): boolean;
198
+ [Symbol.iterator](): Iterator<W3PluginObject>;
192
199
  addListener(event: string, callback: (...args: unknown[]) => void): void;
193
200
  removeListener(event: string, callback: (...args: unknown[]) => void): void;
194
201
  _setItems(items: W3PluginObject[]): void;
package/dist/index.js CHANGED
@@ -213,8 +213,8 @@ function createW3PluginObject(serverPlugin, meeting, _config, storeSync) {
213
213
  staggered: serverPlugin.staggered,
214
214
  tags: serverPlugin.tags,
215
215
  type: serverPlugin.type,
216
- createdAt: new Date(serverPlugin.createdAt),
217
- updatedAt: new Date(serverPlugin.updatedAt),
216
+ createdAt: serverPlugin.createdAt ? new Date(serverPlugin.createdAt) : /* @__PURE__ */ new Date(),
217
+ updatedAt: serverPlugin.updatedAt ? new Date(serverPlugin.updatedAt) : /* @__PURE__ */ new Date(),
218
218
  config: void 0,
219
219
  // Runtime state
220
220
  active: false,
@@ -471,9 +471,31 @@ var PluginList = class {
471
471
  this.items = [];
472
472
  this.listeners = /* @__PURE__ */ new Map();
473
473
  }
474
+ get length() {
475
+ return this.items.length;
476
+ }
474
477
  toArray() {
475
478
  return [...this.items];
476
479
  }
480
+ // Array-like methods RTK internals expect
481
+ forEach(cb) {
482
+ this.items.forEach(cb);
483
+ }
484
+ map(cb) {
485
+ return this.items.map(cb);
486
+ }
487
+ filter(cb) {
488
+ return this.items.filter(cb);
489
+ }
490
+ find(cb) {
491
+ return this.items.find(cb);
492
+ }
493
+ some(cb) {
494
+ return this.items.some(cb);
495
+ }
496
+ [Symbol.iterator]() {
497
+ return this.items[Symbol.iterator]();
498
+ }
477
499
  addListener(event, callback) {
478
500
  if (!this.listeners.has(event)) this.listeners.set(event, /* @__PURE__ */ new Set());
479
501
  this.listeners.get(event).add(callback);
package/dist/index.mjs CHANGED
@@ -172,8 +172,8 @@ function createW3PluginObject(serverPlugin, meeting, _config, storeSync) {
172
172
  staggered: serverPlugin.staggered,
173
173
  tags: serverPlugin.tags,
174
174
  type: serverPlugin.type,
175
- createdAt: new Date(serverPlugin.createdAt),
176
- updatedAt: new Date(serverPlugin.updatedAt),
175
+ createdAt: serverPlugin.createdAt ? new Date(serverPlugin.createdAt) : /* @__PURE__ */ new Date(),
176
+ updatedAt: serverPlugin.updatedAt ? new Date(serverPlugin.updatedAt) : /* @__PURE__ */ new Date(),
177
177
  config: void 0,
178
178
  // Runtime state
179
179
  active: false,
@@ -430,9 +430,31 @@ var PluginList = class {
430
430
  this.items = [];
431
431
  this.listeners = /* @__PURE__ */ new Map();
432
432
  }
433
+ get length() {
434
+ return this.items.length;
435
+ }
433
436
  toArray() {
434
437
  return [...this.items];
435
438
  }
439
+ // Array-like methods RTK internals expect
440
+ forEach(cb) {
441
+ this.items.forEach(cb);
442
+ }
443
+ map(cb) {
444
+ return this.items.map(cb);
445
+ }
446
+ filter(cb) {
447
+ return this.items.filter(cb);
448
+ }
449
+ find(cb) {
450
+ return this.items.find(cb);
451
+ }
452
+ some(cb) {
453
+ return this.items.some(cb);
454
+ }
455
+ [Symbol.iterator]() {
456
+ return this.items[Symbol.iterator]();
457
+ }
436
458
  addListener(event, callback) {
437
459
  if (!this.listeners.has(event)) this.listeners.set(event, /* @__PURE__ */ new Set());
438
460
  this.listeners.get(event).add(callback);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w3streamdev/plugin-core",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Host-side patch layer — wires @cloudflare/realtimekit into your plugin infrastructure",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",