@evitcastudio/kit 2.1.0 → 2.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evitcastudio/kit",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "author": "doubleactii 56242467+doubleactii@users.noreply.github.com (https://evitcastudio.com)",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "test": "bun test ./tests",
30
30
  "lint": "bun eslint ./src",
31
31
  "pack": "bun pm pack --dry-run",
32
- "build-types": "bun tsc",
32
+ "build-types": "bun tsc && shx cp ./src/types/vylo.d.ts ./lib/types/vylo.d.ts",
33
33
  "build": "bun bun-build.ts",
34
34
  "build-docs": "bun typedoc",
35
35
  "build-all": "bun run build-types && bun run build && bun run build-docs"
@@ -45,6 +45,7 @@
45
45
  "bun": "^1.1.42",
46
46
  "eslint": "^9.17.0",
47
47
  "globals": "^15.14.0",
48
+ "shx": "^0.3.4",
48
49
  "typedoc": "^0.27.5",
49
50
  "typescript": "^5.7.2",
50
51
  "typescript-eslint": "^8.19.0"
@@ -1,13 +0,0 @@
1
- import type { EmitterEvent, Listener } from './types/shared-types';
2
- import type { KitPlugin } from '@evitcastudio/kit-plugin';
3
- export declare class EventEmitter {
4
- private listener;
5
- private plugin;
6
- constructor(pListener: Listener, pPlugin: KitPlugin);
7
- /**
8
- * Emit an event to all listeners.
9
- * @param pEvent - The event to emit.
10
- */
11
- emit(pEvent: EmitterEvent): void;
12
- }
13
- //# sourceMappingURL=event-system.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event-system.d.ts","sourceRoot":"","sources":["../src/event-system.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,qBAAa,YAAY;IACrB,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,MAAM,CAAY;gBAEd,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS;IAKnD;;;OAGG;IACH,IAAI,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;CAcnC"}
@@ -1,25 +0,0 @@
1
- export class EventEmitter {
2
- listener;
3
- plugin;
4
- constructor(pListener, pPlugin) {
5
- this.listener = pListener;
6
- this.plugin = pPlugin;
7
- }
8
- /**
9
- * Emit an event to all listeners.
10
- * @param pEvent - The event to emit.
11
- */
12
- emit(pEvent) {
13
- if (pEvent.plugin && pEvent.plugin !== this.plugin.name) {
14
- throw new Error(`Event mismatch: ${this.plugin.name} tried to emit an event from the ${pEvent.plugin} namespace.`);
15
- }
16
- const event = {
17
- plugin: this.plugin.name,
18
- event: pEvent.event,
19
- data: pEvent?.data,
20
- timestamp: Date.now()
21
- };
22
- Object.freeze(event);
23
- this.listener(event);
24
- }
25
- }