@yrzhao/aves-core 1.1.0 → 1.2.0

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 (36) hide show
  1. package/README.md +55 -40
  2. package/dist/core/AvesClient.d.ts +32 -8
  3. package/dist/core/AvesClient.js +254 -55
  4. package/dist/core/AvesError.d.ts +1 -1
  5. package/dist/core/EventEmitter.d.ts +8 -16
  6. package/dist/core/EventEmitter.js +41 -10
  7. package/dist/core/SignalingClient.d.ts +39 -44
  8. package/dist/core/SignalingClient.js +434 -78
  9. package/dist/core/WebRTCManager.d.ts +67 -102
  10. package/dist/core/WebRTCManager.js +607 -136
  11. package/dist/core/webrtc/channels.d.ts +6 -0
  12. package/dist/core/webrtc/channels.js +15 -0
  13. package/dist/core/webrtc/fileTransfer.d.ts +46 -3
  14. package/dist/core/webrtc/fileTransfer.js +725 -78
  15. package/dist/core/webrtc/mediaTracks.d.ts +38 -5
  16. package/dist/core/webrtc/mediaTracks.js +269 -58
  17. package/dist/esm/core/AvesClient.d.ts +32 -8
  18. package/dist/esm/core/AvesClient.js +254 -55
  19. package/dist/esm/core/AvesError.d.ts +1 -1
  20. package/dist/esm/core/EventEmitter.d.ts +8 -16
  21. package/dist/esm/core/EventEmitter.js +41 -10
  22. package/dist/esm/core/SignalingClient.d.ts +39 -44
  23. package/dist/esm/core/SignalingClient.js +434 -78
  24. package/dist/esm/core/WebRTCManager.d.ts +67 -102
  25. package/dist/esm/core/WebRTCManager.js +608 -137
  26. package/dist/esm/core/webrtc/channels.d.ts +6 -0
  27. package/dist/esm/core/webrtc/channels.js +14 -0
  28. package/dist/esm/core/webrtc/fileTransfer.d.ts +46 -3
  29. package/dist/esm/core/webrtc/fileTransfer.js +722 -77
  30. package/dist/esm/core/webrtc/mediaTracks.d.ts +38 -5
  31. package/dist/esm/core/webrtc/mediaTracks.js +269 -58
  32. package/dist/esm/index.d.ts +2 -1
  33. package/dist/esm/types/types.d.ts +106 -9
  34. package/dist/index.d.ts +2 -1
  35. package/dist/types/types.d.ts +106 -9
  36. package/package.json +8 -6
@@ -8,8 +8,8 @@ export type JsonObject = {
8
8
  };
9
9
  export type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
10
10
  export type AvesMessage = JsonValue;
11
- export type SignalingErrorCode = "INVALID_MESSAGE_FORMAT" | "INVALID_MESSAGE" | "ROOM_NOT_FOUND" | "ROOM_CREATE_FAILED" | "ROOM_JOIN_FAILED" | "JOIN_ROOM_MISSING_FIELDS" | "ALREADY_JOINED" | "LEAVE_NOT_JOINED" | "LEAVE_USER_MISMATCH" | "SIGNALING_NOT_AUTHENTICATED" | "SIGNALING_FORBIDDEN" | "SIGNALING_TARGET_NOT_FOUND" | "SIGNALING_TARGET_ROOM_MISMATCH" | "SIGNALING_REQUEST_TIMEOUT" | "SERVER_ERROR" | (string & {});
12
- export type SignalingErrorStage = "protocol" | "room" | "signaling" | "transport" | "server" | (string & {});
11
+ export type SignalingErrorCode = "INVALID_MESSAGE_FORMAT" | "INVALID_MESSAGE" | "MESSAGE_TOO_LARGE" | "RATE_LIMITED" | "UNAUTHORIZED" | "MAX_ROOMS_REACHED" | "ROOM_NOT_FOUND" | "ROOM_FULL" | "INVALID_PASSWORD" | "INVALID_RECONNECT_TOKEN" | "ROOM_CREATE_FAILED" | "ROOM_JOIN_FAILED" | "JOIN_ROOM_MISSING_FIELDS" | "ALREADY_JOINED" | "LEAVE_NOT_JOINED" | "LEAVE_USER_MISMATCH" | "SIGNALING_NOT_AUTHENTICATED" | "SIGNALING_FORBIDDEN" | "SIGNALING_TARGET_NOT_FOUND" | "SIGNALING_TARGET_ROOM_MISMATCH" | "SIGNALING_REQUEST_TIMEOUT" | "SERVER_ERROR" | (string & {});
12
+ export type SignalingErrorStage = "protocol" | "auth" | "room" | "signaling" | "transport" | "server" | (string & {});
13
13
  export interface SignalingErrorPayload {
14
14
  message: string;
15
15
  code: SignalingErrorCode;
@@ -17,18 +17,77 @@ export interface SignalingErrorPayload {
17
17
  retryable: boolean;
18
18
  requestId?: string;
19
19
  }
20
+ export interface CreateRoomOptions {
21
+ name?: string;
22
+ maxCapacity?: number;
23
+ password?: string;
24
+ }
25
+ export interface JoinRoomOptions {
26
+ userId?: string;
27
+ password?: string;
28
+ reconnectToken?: string;
29
+ }
20
30
  export interface JoinRoomResult {
21
31
  participants: Participant[];
22
32
  userId: string;
33
+ reconnectToken?: string;
34
+ }
35
+ export interface AvesAudioConstraints {
36
+ echoCancellation?: boolean;
37
+ noiseSuppression?: boolean;
38
+ autoGainControl?: boolean;
39
+ deviceId?: string;
40
+ }
41
+ export interface AvesVideoConstraints {
42
+ width?: number;
43
+ height?: number;
44
+ frameRate?: number;
45
+ facingMode?: "user" | "environment";
46
+ deviceId?: string;
47
+ }
48
+ export interface ScreenShareOptions {
49
+ audio?: boolean;
50
+ }
51
+ export type IncomingFileDecision = boolean | Promise<boolean>;
52
+ export interface FileTransferConfig {
53
+ /** Maximum incoming file size in bytes. Default 100 MiB. */
54
+ maxReceiveFileSize?: number;
55
+ /** DataChannel bufferedAmount high water mark in bytes. Default 256 KiB. */
56
+ highWaterMark?: number;
57
+ /** DataChannel bufferedAmount low water mark in bytes. Default 64 KiB. */
58
+ lowWaterMark?: number;
59
+ /** Timeout waiting for receiver readiness in ms. Default 15000. */
60
+ readyTimeoutMs?: number;
61
+ /** Timeout waiting for receiver completion ack in ms after drain. Default 30000. */
62
+ completeTimeoutMs?: number;
63
+ /** Compute and verify SHA-256 digest when Web Crypto Subtle is available. Default true. */
64
+ verifyChecksum?: boolean;
65
+ /** Optional hook to accept or reject incoming file transfers. */
66
+ onIncomingTransfer?: (peerId: string, info: FileTransferInfo) => IncomingFileDecision;
23
67
  }
24
68
  export interface AvesClientConfig {
25
69
  signalingUrl: string;
26
70
  iceServers?: RTCIceServer[];
71
+ /** Additional RTCConfiguration options passed to RTCPeerConnection. */
72
+ rtcConfiguration?: Omit<RTCConfiguration, "iceServers">;
73
+ /** Optional authentication token sent via initial signaling auth handshake. */
74
+ authToken?: string;
75
+ /** Signaling heartbeat ping interval in ms. 0 disables heartbeat. Default 0. */
76
+ heartbeatIntervalMs?: number;
77
+ /** Signaling heartbeat pong timeout in ms. Default 10000. */
78
+ heartbeatTimeoutMs?: number;
79
+ /** Grace window in ms before closing a transiently disconnected peer. Default 5000. */
80
+ iceDisconnectGraceMs?: number;
27
81
  fileChunkSize?: number;
82
+ fileTransfer?: FileTransferConfig;
83
+ audio?: AvesAudioConstraints;
28
84
  video?: AvesVideoConstraints;
29
85
  reconnect?: {
30
86
  maxAttempts?: number;
31
87
  delay?: number;
88
+ maxDelay?: number;
89
+ backoffFactor?: number;
90
+ jitter?: boolean;
32
91
  requestTimeoutMs?: number;
33
92
  };
34
93
  debug?: boolean;
@@ -37,7 +96,10 @@ export interface AvesPeerSnapshot {
37
96
  peerId: string;
38
97
  participant?: Participant;
39
98
  connectionState: RTCPeerConnectionState;
99
+ iceConnectionState?: RTCIceConnectionState;
100
+ signalingState?: RTCSignalingState;
40
101
  dataChannelState: RTCDataChannelState | "closed";
102
+ fileChannelState?: RTCDataChannelState | "closed";
41
103
  messageChannelReady: boolean;
42
104
  fileChannelReady: boolean;
43
105
  }
@@ -49,6 +111,18 @@ export interface AvesConnectionSnapshot {
49
111
  participants: Participant[];
50
112
  peers: AvesPeerSnapshot[];
51
113
  }
114
+ export type CandidatePairType = "host" | "srflx" | "prflx" | "relay" | "unknown";
115
+ export interface AvesPeerStats {
116
+ peerId: string;
117
+ timestamp: number;
118
+ rttMs: number | null;
119
+ bytesSent: number;
120
+ bytesReceived: number;
121
+ packetsLost: number;
122
+ candidatePairType: CandidatePairType;
123
+ localCandidateType?: string;
124
+ remoteCandidateType?: string;
125
+ }
52
126
  export interface WaitForPeerOptions {
53
127
  timeoutMs?: number;
54
128
  requireFileChannel?: boolean;
@@ -69,6 +143,7 @@ export interface FileTransferInfo {
69
143
  size: number;
70
144
  mimeType: string;
71
145
  lastModified: number;
146
+ sha256?: string;
72
147
  }
73
148
  export interface FileTransferProgress extends FileTransferInfo {
74
149
  bytesTransferred: number;
@@ -76,6 +151,8 @@ export interface FileTransferProgress extends FileTransferInfo {
76
151
  }
77
152
  export interface FileTransferResult extends FileTransferInfo {
78
153
  blob?: Blob;
154
+ /** True when SHA-256 integrity verification succeeded for this transfer. */
155
+ checksumVerified?: boolean;
79
156
  }
80
157
  export interface LocalAudioState {
81
158
  active: boolean;
@@ -90,15 +167,24 @@ export interface ScreenShareState {
90
167
  active: boolean;
91
168
  source: ScreenShareSource;
92
169
  }
93
- export interface AvesVideoConstraints {
94
- width?: number;
95
- height?: number;
96
- frameRate?: number;
97
- facingMode?: "user" | "environment";
98
- deviceId?: string;
99
- }
100
170
  export type SignalingMessage = {
171
+ type: "auth";
172
+ token: string;
173
+ requestId?: string;
174
+ } | {
175
+ type: "auth-ok";
176
+ userId?: string;
177
+ userName?: string;
178
+ requestId?: string;
179
+ } | {
180
+ type: "ping";
181
+ timestamp?: number;
182
+ } | {
183
+ type: "pong";
184
+ timestamp?: number;
185
+ } | {
101
186
  type: "create-room";
187
+ options?: CreateRoomOptions;
102
188
  requestId?: string;
103
189
  } | {
104
190
  type: "room-created";
@@ -109,11 +195,14 @@ export type SignalingMessage = {
109
195
  roomId: string;
110
196
  userId?: string;
111
197
  userName: string;
198
+ password?: string;
199
+ reconnectToken?: string;
112
200
  requestId?: string;
113
201
  } | {
114
202
  type: "room-joined";
115
203
  participants: Participant[];
116
204
  userId: string;
205
+ reconnectToken?: string;
117
206
  requestId?: string;
118
207
  } | {
119
208
  type: "leave-room";
@@ -151,5 +240,13 @@ export type SignalingMessage = {
151
240
  export interface ReconnectConfig {
152
241
  maxAttempts: number;
153
242
  delay: number;
243
+ maxDelay?: number;
244
+ backoffFactor?: number;
245
+ jitter?: boolean;
154
246
  requestTimeoutMs?: number;
247
+ authToken?: string;
248
+ heartbeatIntervalMs?: number;
249
+ heartbeatTimeoutMs?: number;
250
+ /** Minimum ms a connection must stay open before resetting reconnect backoff. Default 10000. */
251
+ minStableDurationMs?: number;
155
252
  }
package/dist/index.d.ts CHANGED
@@ -9,5 +9,6 @@ export { AvesError } from "./core/AvesError";
9
9
  export type { AvesErrorCode } from "./core/AvesError";
10
10
  export { EventEmitter } from "./core/EventEmitter";
11
11
  export { WebRTCManager } from "./core/WebRTCManager";
12
+ export type { WebRTCManagerOptions } from "./core/WebRTCManager";
12
13
  export { SignalingClient } from "./core/SignalingClient";
13
- export type { Participant, AvesMessage, AvesClientConfig, AvesConnectionSnapshot, AvesPeerSnapshot, AvesVideoConstraints, FileTransferOptions, FileTransferInfo, FileTransferProgress, FileTransferResult, LocalAudioState, LocalVideoState, ScreenShareState, ScreenShareSource, JsonObject, JsonPrimitive, JsonValue, SignalingMessage, SignalingErrorCode, SignalingErrorStage, SignalingErrorPayload, JoinRoomResult, ReconnectConfig, WaitForPeerOptions, } from "./types/types";
14
+ export type { Participant, AvesMessage, AvesClientConfig, AvesConnectionSnapshot, AvesPeerSnapshot, AvesPeerStats, CandidatePairType, CreateRoomOptions, JoinRoomOptions, AvesAudioConstraints, AvesVideoConstraints, ScreenShareOptions, FileTransferConfig, IncomingFileDecision, FileTransferOptions, FileTransferInfo, FileTransferProgress, FileTransferResult, LocalAudioState, LocalVideoState, ScreenShareState, ScreenShareSource, JsonObject, JsonPrimitive, JsonValue, SignalingMessage, SignalingErrorCode, SignalingErrorStage, SignalingErrorPayload, JoinRoomResult, ReconnectConfig, WaitForPeerOptions, } from "./types/types";
@@ -8,8 +8,8 @@ export type JsonObject = {
8
8
  };
9
9
  export type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
10
10
  export type AvesMessage = JsonValue;
11
- export type SignalingErrorCode = "INVALID_MESSAGE_FORMAT" | "INVALID_MESSAGE" | "ROOM_NOT_FOUND" | "ROOM_CREATE_FAILED" | "ROOM_JOIN_FAILED" | "JOIN_ROOM_MISSING_FIELDS" | "ALREADY_JOINED" | "LEAVE_NOT_JOINED" | "LEAVE_USER_MISMATCH" | "SIGNALING_NOT_AUTHENTICATED" | "SIGNALING_FORBIDDEN" | "SIGNALING_TARGET_NOT_FOUND" | "SIGNALING_TARGET_ROOM_MISMATCH" | "SIGNALING_REQUEST_TIMEOUT" | "SERVER_ERROR" | (string & {});
12
- export type SignalingErrorStage = "protocol" | "room" | "signaling" | "transport" | "server" | (string & {});
11
+ export type SignalingErrorCode = "INVALID_MESSAGE_FORMAT" | "INVALID_MESSAGE" | "MESSAGE_TOO_LARGE" | "RATE_LIMITED" | "UNAUTHORIZED" | "MAX_ROOMS_REACHED" | "ROOM_NOT_FOUND" | "ROOM_FULL" | "INVALID_PASSWORD" | "INVALID_RECONNECT_TOKEN" | "ROOM_CREATE_FAILED" | "ROOM_JOIN_FAILED" | "JOIN_ROOM_MISSING_FIELDS" | "ALREADY_JOINED" | "LEAVE_NOT_JOINED" | "LEAVE_USER_MISMATCH" | "SIGNALING_NOT_AUTHENTICATED" | "SIGNALING_FORBIDDEN" | "SIGNALING_TARGET_NOT_FOUND" | "SIGNALING_TARGET_ROOM_MISMATCH" | "SIGNALING_REQUEST_TIMEOUT" | "SERVER_ERROR" | (string & {});
12
+ export type SignalingErrorStage = "protocol" | "auth" | "room" | "signaling" | "transport" | "server" | (string & {});
13
13
  export interface SignalingErrorPayload {
14
14
  message: string;
15
15
  code: SignalingErrorCode;
@@ -17,18 +17,77 @@ export interface SignalingErrorPayload {
17
17
  retryable: boolean;
18
18
  requestId?: string;
19
19
  }
20
+ export interface CreateRoomOptions {
21
+ name?: string;
22
+ maxCapacity?: number;
23
+ password?: string;
24
+ }
25
+ export interface JoinRoomOptions {
26
+ userId?: string;
27
+ password?: string;
28
+ reconnectToken?: string;
29
+ }
20
30
  export interface JoinRoomResult {
21
31
  participants: Participant[];
22
32
  userId: string;
33
+ reconnectToken?: string;
34
+ }
35
+ export interface AvesAudioConstraints {
36
+ echoCancellation?: boolean;
37
+ noiseSuppression?: boolean;
38
+ autoGainControl?: boolean;
39
+ deviceId?: string;
40
+ }
41
+ export interface AvesVideoConstraints {
42
+ width?: number;
43
+ height?: number;
44
+ frameRate?: number;
45
+ facingMode?: "user" | "environment";
46
+ deviceId?: string;
47
+ }
48
+ export interface ScreenShareOptions {
49
+ audio?: boolean;
50
+ }
51
+ export type IncomingFileDecision = boolean | Promise<boolean>;
52
+ export interface FileTransferConfig {
53
+ /** Maximum incoming file size in bytes. Default 100 MiB. */
54
+ maxReceiveFileSize?: number;
55
+ /** DataChannel bufferedAmount high water mark in bytes. Default 256 KiB. */
56
+ highWaterMark?: number;
57
+ /** DataChannel bufferedAmount low water mark in bytes. Default 64 KiB. */
58
+ lowWaterMark?: number;
59
+ /** Timeout waiting for receiver readiness in ms. Default 15000. */
60
+ readyTimeoutMs?: number;
61
+ /** Timeout waiting for receiver completion ack in ms after drain. Default 30000. */
62
+ completeTimeoutMs?: number;
63
+ /** Compute and verify SHA-256 digest when Web Crypto Subtle is available. Default true. */
64
+ verifyChecksum?: boolean;
65
+ /** Optional hook to accept or reject incoming file transfers. */
66
+ onIncomingTransfer?: (peerId: string, info: FileTransferInfo) => IncomingFileDecision;
23
67
  }
24
68
  export interface AvesClientConfig {
25
69
  signalingUrl: string;
26
70
  iceServers?: RTCIceServer[];
71
+ /** Additional RTCConfiguration options passed to RTCPeerConnection. */
72
+ rtcConfiguration?: Omit<RTCConfiguration, "iceServers">;
73
+ /** Optional authentication token sent via initial signaling auth handshake. */
74
+ authToken?: string;
75
+ /** Signaling heartbeat ping interval in ms. 0 disables heartbeat. Default 0. */
76
+ heartbeatIntervalMs?: number;
77
+ /** Signaling heartbeat pong timeout in ms. Default 10000. */
78
+ heartbeatTimeoutMs?: number;
79
+ /** Grace window in ms before closing a transiently disconnected peer. Default 5000. */
80
+ iceDisconnectGraceMs?: number;
27
81
  fileChunkSize?: number;
82
+ fileTransfer?: FileTransferConfig;
83
+ audio?: AvesAudioConstraints;
28
84
  video?: AvesVideoConstraints;
29
85
  reconnect?: {
30
86
  maxAttempts?: number;
31
87
  delay?: number;
88
+ maxDelay?: number;
89
+ backoffFactor?: number;
90
+ jitter?: boolean;
32
91
  requestTimeoutMs?: number;
33
92
  };
34
93
  debug?: boolean;
@@ -37,7 +96,10 @@ export interface AvesPeerSnapshot {
37
96
  peerId: string;
38
97
  participant?: Participant;
39
98
  connectionState: RTCPeerConnectionState;
99
+ iceConnectionState?: RTCIceConnectionState;
100
+ signalingState?: RTCSignalingState;
40
101
  dataChannelState: RTCDataChannelState | "closed";
102
+ fileChannelState?: RTCDataChannelState | "closed";
41
103
  messageChannelReady: boolean;
42
104
  fileChannelReady: boolean;
43
105
  }
@@ -49,6 +111,18 @@ export interface AvesConnectionSnapshot {
49
111
  participants: Participant[];
50
112
  peers: AvesPeerSnapshot[];
51
113
  }
114
+ export type CandidatePairType = "host" | "srflx" | "prflx" | "relay" | "unknown";
115
+ export interface AvesPeerStats {
116
+ peerId: string;
117
+ timestamp: number;
118
+ rttMs: number | null;
119
+ bytesSent: number;
120
+ bytesReceived: number;
121
+ packetsLost: number;
122
+ candidatePairType: CandidatePairType;
123
+ localCandidateType?: string;
124
+ remoteCandidateType?: string;
125
+ }
52
126
  export interface WaitForPeerOptions {
53
127
  timeoutMs?: number;
54
128
  requireFileChannel?: boolean;
@@ -69,6 +143,7 @@ export interface FileTransferInfo {
69
143
  size: number;
70
144
  mimeType: string;
71
145
  lastModified: number;
146
+ sha256?: string;
72
147
  }
73
148
  export interface FileTransferProgress extends FileTransferInfo {
74
149
  bytesTransferred: number;
@@ -76,6 +151,8 @@ export interface FileTransferProgress extends FileTransferInfo {
76
151
  }
77
152
  export interface FileTransferResult extends FileTransferInfo {
78
153
  blob?: Blob;
154
+ /** True when SHA-256 integrity verification succeeded for this transfer. */
155
+ checksumVerified?: boolean;
79
156
  }
80
157
  export interface LocalAudioState {
81
158
  active: boolean;
@@ -90,15 +167,24 @@ export interface ScreenShareState {
90
167
  active: boolean;
91
168
  source: ScreenShareSource;
92
169
  }
93
- export interface AvesVideoConstraints {
94
- width?: number;
95
- height?: number;
96
- frameRate?: number;
97
- facingMode?: "user" | "environment";
98
- deviceId?: string;
99
- }
100
170
  export type SignalingMessage = {
171
+ type: "auth";
172
+ token: string;
173
+ requestId?: string;
174
+ } | {
175
+ type: "auth-ok";
176
+ userId?: string;
177
+ userName?: string;
178
+ requestId?: string;
179
+ } | {
180
+ type: "ping";
181
+ timestamp?: number;
182
+ } | {
183
+ type: "pong";
184
+ timestamp?: number;
185
+ } | {
101
186
  type: "create-room";
187
+ options?: CreateRoomOptions;
102
188
  requestId?: string;
103
189
  } | {
104
190
  type: "room-created";
@@ -109,11 +195,14 @@ export type SignalingMessage = {
109
195
  roomId: string;
110
196
  userId?: string;
111
197
  userName: string;
198
+ password?: string;
199
+ reconnectToken?: string;
112
200
  requestId?: string;
113
201
  } | {
114
202
  type: "room-joined";
115
203
  participants: Participant[];
116
204
  userId: string;
205
+ reconnectToken?: string;
117
206
  requestId?: string;
118
207
  } | {
119
208
  type: "leave-room";
@@ -151,5 +240,13 @@ export type SignalingMessage = {
151
240
  export interface ReconnectConfig {
152
241
  maxAttempts: number;
153
242
  delay: number;
243
+ maxDelay?: number;
244
+ backoffFactor?: number;
245
+ jitter?: boolean;
154
246
  requestTimeoutMs?: number;
247
+ authToken?: string;
248
+ heartbeatIntervalMs?: number;
249
+ heartbeatTimeoutMs?: number;
250
+ /** Minimum ms a connection must stay open before resetting reconnect backoff. Default 10000. */
251
+ minStableDurationMs?: number;
155
252
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yrzhao/aves-core",
3
- "version": "1.1.0",
4
- "description": "WebRTC client library for real-time communication",
3
+ "version": "1.2.0",
4
+ "description": "Production-grade browser WebRTC client library for real-time P2P rooms",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -21,9 +21,11 @@
21
21
  "build:cjs": "tsc --module commonjs --outDir dist && cp dist/index.js dist/index.cjs || true",
22
22
  "build:esm": "tsc --module esnext --outDir dist/esm && node scripts/fix-esm-imports.js dist/esm",
23
23
  "build:types": "tsc --declaration --emitDeclarationOnly --outDir dist",
24
+ "typecheck": "tsc --noEmit",
24
25
  "test": "jest",
25
26
  "test:watch": "jest --watch",
26
- "test:coverage": "jest --coverage"
27
+ "test:coverage": "jest --coverage",
28
+ "prepublishOnly": "npm run typecheck && npm run test:coverage && npm run build"
27
29
  },
28
30
  "devDependencies": {
29
31
  "@types/jest": "^29.5.0",
@@ -50,10 +52,10 @@
50
52
  },
51
53
  "repository": {
52
54
  "type": "git",
53
- "url": "git+https://github.com/yrzhao/aves.git"
55
+ "url": "git+https://github.com/yrZhaoweb/aves-core.git"
54
56
  },
55
57
  "bugs": {
56
- "url": "https://github.com/yrzhao/aves/issues"
58
+ "url": "https://github.com/yrZhaoweb/aves-core/issues"
57
59
  },
58
- "homepage": "https://github.com/yrzhao/aves#readme"
60
+ "homepage": "https://github.com/yrZhaoweb/aves-core#readme"
59
61
  }