@xmtp/node-bindings 0.0.15 → 0.0.17
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/bindings_node.darwin-arm64.node +0 -0
- package/dist/bindings_node.darwin-x64.node +0 -0
- package/dist/bindings_node.linux-arm64-gnu.node +0 -0
- package/dist/bindings_node.linux-arm64-musl.node +0 -0
- package/dist/bindings_node.linux-x64-gnu.node +0 -0
- package/dist/bindings_node.linux-x64-musl.node +0 -0
- package/dist/bindings_node.win32-x64-msvc.node +0 -0
- package/dist/index.d.ts +125 -97
- package/dist/index.js +19 -17
- package/package.json +18 -15
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -1,57 +1,44 @@
|
|
|
1
1
|
/* auto-generated by NAPI-RS */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export class
|
|
3
|
+
export class Client {
|
|
4
4
|
accountAddress: string
|
|
5
5
|
inboxId(): string
|
|
6
6
|
isRegistered(): boolean
|
|
7
7
|
installationId(): string
|
|
8
8
|
canMessage(accountAddresses: Array<string>): Promise<Record<string, boolean>>
|
|
9
9
|
registerIdentity(): Promise<void>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
conversations(): Conversations
|
|
11
|
+
sendHistorySyncRequest(): Promise<void>
|
|
12
|
+
sendConsentSyncRequest(): Promise<void>
|
|
13
13
|
findInboxIdByAddress(address: string): Promise<string | null>
|
|
14
|
+
addressesFromInboxId(refreshFromNetwork: boolean, inboxIds: Array<string>): Promise<Array<InboxState>>
|
|
15
|
+
setConsentStates(records: Array<Consent>): Promise<void>
|
|
16
|
+
getConsentState(entityType: ConsentEntityType, entity: string): Promise<ConsentState>
|
|
14
17
|
/**
|
|
15
18
|
* Get the client's inbox state.
|
|
16
19
|
*
|
|
17
20
|
* If `refresh_from_network` is true, the client will go to the network first to refresh the state.
|
|
18
21
|
* Otherwise, the state will be read from the local database.
|
|
19
22
|
*/
|
|
20
|
-
inboxState(refreshFromNetwork: boolean): Promise<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
inboxState(refreshFromNetwork: boolean): Promise<InboxState>
|
|
24
|
+
getLatestInboxState(inboxId: string): Promise<InboxState>
|
|
25
|
+
createInboxSignatureText(): Promise<string | null>
|
|
23
26
|
addWalletSignatureText(existingWalletAddress: string, newWalletAddress: string): Promise<string>
|
|
24
27
|
revokeWalletSignatureText(walletAddress: string): Promise<string>
|
|
25
28
|
revokeInstallationsSignatureText(): Promise<string>
|
|
26
|
-
addSignature(signatureType:
|
|
29
|
+
addSignature(signatureType: SignatureRequestType, signatureBytes: Uint8Array): Promise<void>
|
|
27
30
|
applySignatureRequests(): Promise<void>
|
|
28
|
-
setConsentStates(records: Array<NapiConsent>): Promise<void>
|
|
29
|
-
getConsentState(entityType: NapiConsentEntityType, entity: string): Promise<NapiConsentState>
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export class NapiConversations {
|
|
33
|
-
createGroup(accountAddresses: Array<string>, options?: NapiCreateGroupOptions | undefined | null): Promise<NapiGroup>
|
|
34
|
-
findGroupById(groupId: string): NapiGroup
|
|
35
|
-
findDmByTargetInboxId(targetInboxId: string): NapiGroup
|
|
36
|
-
findMessageById(messageId: string): NapiMessage
|
|
37
|
-
processStreamedWelcomeMessage(envelopeBytes: Uint8Array): Promise<NapiGroup>
|
|
38
|
-
sync(): Promise<void>
|
|
39
|
-
list(opts?: NapiListConversationsOptions | undefined | null): Promise<Array<NapiGroup>>
|
|
40
|
-
stream(callback: (err: null | Error, result: NapiGroup) => void): NapiStreamCloser
|
|
41
|
-
streamAllMessages(callback: (err: null | Error, result: NapiMessage) => void): NapiStreamCloser
|
|
42
31
|
}
|
|
43
32
|
|
|
44
|
-
export class
|
|
33
|
+
export class Conversation {
|
|
45
34
|
id(): string
|
|
46
|
-
send(encodedContent:
|
|
47
|
-
|
|
48
|
-
sendOptimistic(encodedContent: NapiEncodedContent): string
|
|
49
|
-
/** Publish all unpublished messages */
|
|
35
|
+
send(encodedContent: EncodedContent): Promise<string>
|
|
36
|
+
sendOptimistic(encodedContent: EncodedContent): string
|
|
50
37
|
publishMessages(): Promise<void>
|
|
51
38
|
sync(): Promise<void>
|
|
52
|
-
findMessages(opts?:
|
|
53
|
-
processStreamedGroupMessage(envelopeBytes: Uint8Array): Promise<
|
|
54
|
-
listMembers(): Promise<Array<
|
|
39
|
+
findMessages(opts?: ListMessagesOptions | undefined | null): Array<Message>
|
|
40
|
+
processStreamedGroupMessage(envelopeBytes: Uint8Array): Promise<Message>
|
|
41
|
+
listMembers(): Promise<Array<GroupMember>>
|
|
55
42
|
adminList(): Array<string>
|
|
56
43
|
superAdminList(): Array<string>
|
|
57
44
|
isAdmin(inboxId: string): boolean
|
|
@@ -61,7 +48,7 @@ export class NapiGroup {
|
|
|
61
48
|
removeAdmin(inboxId: string): Promise<void>
|
|
62
49
|
addSuperAdmin(inboxId: string): Promise<void>
|
|
63
50
|
removeSuperAdmin(inboxId: string): Promise<void>
|
|
64
|
-
groupPermissions():
|
|
51
|
+
groupPermissions(): GroupPermissions
|
|
65
52
|
addMembersByInboxId(inboxIds: Array<string>): Promise<void>
|
|
66
53
|
removeMembers(accountAddresses: Array<string>): Promise<void>
|
|
67
54
|
removeMembersByInboxId(inboxIds: Array<string>): Promise<void>
|
|
@@ -73,44 +60,54 @@ export class NapiGroup {
|
|
|
73
60
|
groupDescription(): string
|
|
74
61
|
updateGroupPinnedFrameUrl(pinnedFrameUrl: string): Promise<void>
|
|
75
62
|
groupPinnedFrameUrl(): string
|
|
76
|
-
stream(callback: (err: null | Error, result:
|
|
63
|
+
stream(callback: (err: null | Error, result: Message | undefined) => void): StreamCloser
|
|
77
64
|
createdAtNs(): number
|
|
78
65
|
isActive(): boolean
|
|
79
66
|
addedByInboxId(): string
|
|
80
|
-
groupMetadata():
|
|
81
|
-
consentState():
|
|
82
|
-
updateConsentState(state:
|
|
67
|
+
groupMetadata(): GroupMetadata
|
|
68
|
+
consentState(): ConsentState
|
|
69
|
+
updateConsentState(state: ConsentState): void
|
|
70
|
+
dmPeerInboxId(): string
|
|
83
71
|
}
|
|
84
72
|
|
|
85
|
-
export class
|
|
73
|
+
export class Conversations {
|
|
74
|
+
createGroup(accountAddresses: Array<string>, options?: CreateGroupOptions | undefined | null): Promise<Conversation>
|
|
75
|
+
createDm(accountAddress: string): Promise<Conversation>
|
|
76
|
+
findGroupById(groupId: string): Conversation
|
|
77
|
+
findDmByTargetInboxId(targetInboxId: string): Conversation
|
|
78
|
+
findMessageById(messageId: string): Message
|
|
79
|
+
processStreamedWelcomeMessage(envelopeBytes: Uint8Array): Promise<Conversation>
|
|
80
|
+
sync(): Promise<void>
|
|
81
|
+
list(opts?: ListConversationsOptions | undefined | null): Promise<Array<Conversation>>
|
|
82
|
+
listGroups(opts?: ListConversationsOptions | undefined | null): Promise<Array<Conversation>>
|
|
83
|
+
listDms(opts?: ListConversationsOptions | undefined | null): Promise<Array<Conversation>>
|
|
84
|
+
stream(callback: (err: null | Error, result: Conversation | undefined) => void): StreamCloser
|
|
85
|
+
streamGroups(callback: (err: null | Error, result: Conversation | undefined) => void): StreamCloser
|
|
86
|
+
streamDms(callback: (err: null | Error, result: Conversation | undefined) => void): StreamCloser
|
|
87
|
+
streamAllMessages(callback: (err: null | Error, result: Message | undefined) => void): StreamCloser
|
|
88
|
+
streamAllGroupMessages(callback: (err: null | Error, result: Message | undefined) => void): StreamCloser
|
|
89
|
+
streamAllDmMessages(callback: (err: null | Error, result: Message | undefined) => void): StreamCloser
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export class GroupMember {
|
|
86
93
|
inboxId: string
|
|
87
94
|
accountAddresses: Array<string>
|
|
88
95
|
installationIds: Array<string>
|
|
89
|
-
permissionLevel:
|
|
90
|
-
consentState:
|
|
96
|
+
permissionLevel: PermissionLevel
|
|
97
|
+
consentState: ConsentState
|
|
91
98
|
}
|
|
92
99
|
|
|
93
|
-
export class
|
|
100
|
+
export class GroupMetadata {
|
|
94
101
|
creatorInboxId(): string
|
|
95
102
|
conversationType(): string
|
|
96
103
|
}
|
|
97
104
|
|
|
98
|
-
export class
|
|
99
|
-
policyType():
|
|
100
|
-
policySet():
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export class NapiMessage {
|
|
104
|
-
id: string
|
|
105
|
-
sentAtNs: number
|
|
106
|
-
convoId: string
|
|
107
|
-
senderInboxId: string
|
|
108
|
-
content: NapiEncodedContent
|
|
109
|
-
kind: NapiGroupMessageKind
|
|
110
|
-
deliveryStatus: NapiDeliveryStatus
|
|
105
|
+
export class GroupPermissions {
|
|
106
|
+
policyType(): GroupPermissionsOptions
|
|
107
|
+
policySet(): PermissionPolicySet
|
|
111
108
|
}
|
|
112
109
|
|
|
113
|
-
export class
|
|
110
|
+
export class StreamCloser {
|
|
114
111
|
/**
|
|
115
112
|
* Signal the stream to end
|
|
116
113
|
* Does not wait for the stream to end.
|
|
@@ -126,108 +123,134 @@ export class NapiStreamCloser {
|
|
|
126
123
|
isClosed(): boolean
|
|
127
124
|
}
|
|
128
125
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
* It can be one of: `debug`, `info`, `warn`, `error` or 'off'.
|
|
133
|
-
* By default, logging is set to `info`. `off` completely disables logging.
|
|
134
|
-
*/
|
|
135
|
-
export declare function createClient(host: string, isSecure: boolean, dbPath: string, inboxId: string, accountAddress: string, encryptionKey?: Uint8Array | undefined | null, historySyncUrl?: string | undefined | null, envFilter?: string | undefined | null): Promise<NapiClient>
|
|
136
|
-
|
|
137
|
-
export declare function generateInboxId(accountAddress: string): string
|
|
138
|
-
|
|
139
|
-
export declare function getInboxIdForAddress(host: string, isSecure: boolean, accountAddress: string): Promise<string | null>
|
|
140
|
-
|
|
141
|
-
export interface NapiConsent {
|
|
142
|
-
entityType: NapiConsentEntityType
|
|
143
|
-
state: NapiConsentState
|
|
126
|
+
export interface Consent {
|
|
127
|
+
entityType: ConsentEntityType
|
|
128
|
+
state: ConsentState
|
|
144
129
|
entity: string
|
|
145
130
|
}
|
|
146
131
|
|
|
147
|
-
export const enum
|
|
132
|
+
export const enum ConsentEntityType {
|
|
148
133
|
GroupId = 0,
|
|
149
134
|
InboxId = 1,
|
|
150
135
|
Address = 2
|
|
151
136
|
}
|
|
152
137
|
|
|
153
|
-
export const enum
|
|
138
|
+
export const enum ConsentState {
|
|
154
139
|
Unknown = 0,
|
|
155
140
|
Allowed = 1,
|
|
156
141
|
Denied = 2
|
|
157
142
|
}
|
|
158
143
|
|
|
159
|
-
export interface
|
|
144
|
+
export interface ContentTypeId {
|
|
160
145
|
authorityId: string
|
|
161
146
|
typeId: string
|
|
162
147
|
versionMajor: number
|
|
163
148
|
versionMinor: number
|
|
164
149
|
}
|
|
165
150
|
|
|
166
|
-
export
|
|
167
|
-
|
|
151
|
+
export const enum ConversationType {
|
|
152
|
+
Dm = 0,
|
|
153
|
+
Group = 1,
|
|
154
|
+
Sync = 2
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Create a client
|
|
159
|
+
*
|
|
160
|
+
* Optionally specify a filter for the log level as a string.
|
|
161
|
+
* It can be one of: `debug`, `info`, `warn`, `error` or 'off'.
|
|
162
|
+
* By default, logging is disabled.
|
|
163
|
+
*/
|
|
164
|
+
export declare function createClient(host: string, isSecure: boolean, dbPath: string, inboxId: string, accountAddress: string, encryptionKey?: Uint8Array | undefined | null, historySyncUrl?: string | undefined | null, envFilter?: "debug" | "info" | "warn" | "error" | "off" | undefined | null): Promise<Client>
|
|
165
|
+
|
|
166
|
+
export interface CreateGroupOptions {
|
|
167
|
+
permissions?: GroupPermissionsOptions
|
|
168
168
|
groupName?: string
|
|
169
169
|
groupImageUrlSquare?: string
|
|
170
170
|
groupDescription?: string
|
|
171
171
|
groupPinnedFrameUrl?: string
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
export const enum
|
|
174
|
+
export const enum DeliveryStatus {
|
|
175
175
|
Unpublished = 0,
|
|
176
176
|
Published = 1,
|
|
177
177
|
Failed = 2
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
export interface
|
|
181
|
-
type?:
|
|
180
|
+
export interface EncodedContent {
|
|
181
|
+
type?: ContentTypeId
|
|
182
182
|
parameters: Record<string, string>
|
|
183
183
|
fallback?: string
|
|
184
184
|
compression?: number
|
|
185
185
|
content: Uint8Array
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
export
|
|
188
|
+
export declare function generateInboxId(accountAddress: string): string
|
|
189
|
+
|
|
190
|
+
export declare function getInboxIdForAddress(host: string, isSecure: boolean, accountAddress: string): Promise<string | null>
|
|
191
|
+
|
|
192
|
+
export const enum GroupMembershipState {
|
|
193
|
+
Allowed = 0,
|
|
194
|
+
Rejected = 1,
|
|
195
|
+
Pending = 2
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export const enum GroupMessageKind {
|
|
189
199
|
Application = 0,
|
|
190
200
|
MembershipChange = 1
|
|
191
201
|
}
|
|
192
202
|
|
|
193
|
-
export const enum
|
|
203
|
+
export const enum GroupPermissionsOptions {
|
|
194
204
|
AllMembers = 0,
|
|
195
205
|
AdminOnly = 1,
|
|
196
206
|
CustomPolicy = 2
|
|
197
207
|
}
|
|
198
208
|
|
|
199
|
-
export interface
|
|
209
|
+
export interface InboxState {
|
|
200
210
|
inboxId: string
|
|
201
211
|
recoveryAddress: string
|
|
202
|
-
installations: Array<
|
|
212
|
+
installations: Array<Installation>
|
|
203
213
|
accountAddresses: Array<string>
|
|
204
214
|
}
|
|
205
215
|
|
|
206
|
-
export interface
|
|
216
|
+
export interface Installation {
|
|
207
217
|
id: string
|
|
208
218
|
clientTimestampNs?: bigint
|
|
209
219
|
}
|
|
210
220
|
|
|
211
|
-
export interface
|
|
221
|
+
export interface ListConversationsOptions {
|
|
222
|
+
allowedStates?: Array<GroupMembershipState>
|
|
212
223
|
createdAfterNs?: number
|
|
213
224
|
createdBeforeNs?: number
|
|
214
225
|
limit?: number
|
|
226
|
+
conversationType?: ConversationType
|
|
215
227
|
}
|
|
216
228
|
|
|
217
|
-
export interface
|
|
229
|
+
export interface ListMessagesOptions {
|
|
218
230
|
sentBeforeNs?: number
|
|
219
231
|
sentAfterNs?: number
|
|
220
232
|
limit?: number
|
|
221
|
-
deliveryStatus?:
|
|
233
|
+
deliveryStatus?: DeliveryStatus
|
|
234
|
+
direction?: SortDirection
|
|
222
235
|
}
|
|
223
236
|
|
|
224
|
-
export
|
|
237
|
+
export interface Message {
|
|
238
|
+
id: string
|
|
239
|
+
sentAtNs: number
|
|
240
|
+
convoId: string
|
|
241
|
+
senderInboxId: string
|
|
242
|
+
content: EncodedContent
|
|
243
|
+
kind: GroupMessageKind
|
|
244
|
+
deliveryStatus: DeliveryStatus
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export const enum PermissionLevel {
|
|
225
248
|
Member = 0,
|
|
226
249
|
Admin = 1,
|
|
227
250
|
SuperAdmin = 2
|
|
228
251
|
}
|
|
229
252
|
|
|
230
|
-
export const enum
|
|
253
|
+
export const enum PermissionPolicy {
|
|
231
254
|
Allow = 0,
|
|
232
255
|
Deny = 1,
|
|
233
256
|
Admin = 2,
|
|
@@ -236,18 +259,18 @@ export const enum NapiPermissionPolicy {
|
|
|
236
259
|
Other = 5
|
|
237
260
|
}
|
|
238
261
|
|
|
239
|
-
export interface
|
|
240
|
-
addMemberPolicy:
|
|
241
|
-
removeMemberPolicy:
|
|
242
|
-
addAdminPolicy:
|
|
243
|
-
removeAdminPolicy:
|
|
244
|
-
updateGroupNamePolicy:
|
|
245
|
-
updateGroupDescriptionPolicy:
|
|
246
|
-
updateGroupImageUrlSquarePolicy:
|
|
247
|
-
updateGroupPinnedFrameUrlPolicy:
|
|
262
|
+
export interface PermissionPolicySet {
|
|
263
|
+
addMemberPolicy: PermissionPolicy
|
|
264
|
+
removeMemberPolicy: PermissionPolicy
|
|
265
|
+
addAdminPolicy: PermissionPolicy
|
|
266
|
+
removeAdminPolicy: PermissionPolicy
|
|
267
|
+
updateGroupNamePolicy: PermissionPolicy
|
|
268
|
+
updateGroupDescriptionPolicy: PermissionPolicy
|
|
269
|
+
updateGroupImageUrlSquarePolicy: PermissionPolicy
|
|
270
|
+
updateGroupPinnedFrameUrlPolicy: PermissionPolicy
|
|
248
271
|
}
|
|
249
272
|
|
|
250
|
-
export const enum
|
|
273
|
+
export const enum PermissionUpdateType {
|
|
251
274
|
AddMember = 0,
|
|
252
275
|
RemoveMember = 1,
|
|
253
276
|
AddAdmin = 2,
|
|
@@ -255,10 +278,15 @@ export const enum NapiPermissionUpdateType {
|
|
|
255
278
|
UpdateMetadata = 4
|
|
256
279
|
}
|
|
257
280
|
|
|
258
|
-
export const enum
|
|
281
|
+
export const enum SignatureRequestType {
|
|
259
282
|
AddWallet = 0,
|
|
260
283
|
CreateInbox = 1,
|
|
261
284
|
RevokeWallet = 2,
|
|
262
285
|
RevokeInstallations = 3
|
|
263
286
|
}
|
|
264
287
|
|
|
288
|
+
export const enum SortDirection {
|
|
289
|
+
Ascending = 0,
|
|
290
|
+
Descending = 1
|
|
291
|
+
}
|
|
292
|
+
|
package/dist/index.js
CHANGED
|
@@ -361,23 +361,25 @@ if (!nativeBinding) {
|
|
|
361
361
|
throw new Error(`Failed to load native binding`)
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
-
module.exports.
|
|
365
|
-
module.exports.
|
|
366
|
-
module.exports.
|
|
367
|
-
module.exports.
|
|
368
|
-
module.exports.
|
|
369
|
-
module.exports.
|
|
370
|
-
module.exports.
|
|
371
|
-
module.exports.
|
|
364
|
+
module.exports.Client = nativeBinding.Client
|
|
365
|
+
module.exports.Conversation = nativeBinding.Conversation
|
|
366
|
+
module.exports.Conversations = nativeBinding.Conversations
|
|
367
|
+
module.exports.GroupMember = nativeBinding.GroupMember
|
|
368
|
+
module.exports.GroupMetadata = nativeBinding.GroupMetadata
|
|
369
|
+
module.exports.GroupPermissions = nativeBinding.GroupPermissions
|
|
370
|
+
module.exports.StreamCloser = nativeBinding.StreamCloser
|
|
371
|
+
module.exports.ConsentEntityType = nativeBinding.ConsentEntityType
|
|
372
|
+
module.exports.ConsentState = nativeBinding.ConsentState
|
|
373
|
+
module.exports.ConversationType = nativeBinding.ConversationType
|
|
372
374
|
module.exports.createClient = nativeBinding.createClient
|
|
375
|
+
module.exports.DeliveryStatus = nativeBinding.DeliveryStatus
|
|
373
376
|
module.exports.generateInboxId = nativeBinding.generateInboxId
|
|
374
377
|
module.exports.getInboxIdForAddress = nativeBinding.getInboxIdForAddress
|
|
375
|
-
module.exports.
|
|
376
|
-
module.exports.
|
|
377
|
-
module.exports.
|
|
378
|
-
module.exports.
|
|
379
|
-
module.exports.
|
|
380
|
-
module.exports.
|
|
381
|
-
module.exports.
|
|
382
|
-
module.exports.
|
|
383
|
-
module.exports.NapiSignatureRequestType = nativeBinding.NapiSignatureRequestType
|
|
378
|
+
module.exports.GroupMembershipState = nativeBinding.GroupMembershipState
|
|
379
|
+
module.exports.GroupMessageKind = nativeBinding.GroupMessageKind
|
|
380
|
+
module.exports.GroupPermissionsOptions = nativeBinding.GroupPermissionsOptions
|
|
381
|
+
module.exports.PermissionLevel = nativeBinding.PermissionLevel
|
|
382
|
+
module.exports.PermissionPolicy = nativeBinding.PermissionPolicy
|
|
383
|
+
module.exports.PermissionUpdateType = nativeBinding.PermissionUpdateType
|
|
384
|
+
module.exports.SignatureRequestType = nativeBinding.SignatureRequestType
|
|
385
|
+
module.exports.SortDirection = nativeBinding.SortDirection
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmtp/node-bindings",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://git@github.com/xmtp/libxmtp.git",
|
|
@@ -20,32 +20,35 @@
|
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
22
|
"artifacts": "napi artifacts",
|
|
23
|
-
"build": "
|
|
23
|
+
"build": "yarn build:clean && yarn build:release && yarn build:finish",
|
|
24
24
|
"build:clean": "rm -rf dist",
|
|
25
25
|
"build:debug": "napi build --platform",
|
|
26
26
|
"build:finish": "mkdir dist && mv index.js dist && mv index.d.ts dist && mv *.node dist",
|
|
27
|
-
"build:release": "
|
|
27
|
+
"build:release": "napi build --platform --release",
|
|
28
28
|
"clean": "yarn build:clean && yarn test:clean",
|
|
29
29
|
"format": "prettier -w .",
|
|
30
30
|
"format:check": "prettier -c .",
|
|
31
|
+
"lint": "yarn lint:clippy && yarn lint:fmt",
|
|
32
|
+
"lint:clippy": "cargo clippy --all-features --all-targets --no-deps -- -Dwarnings",
|
|
33
|
+
"lint:fmt": "cargo fmt --check",
|
|
31
34
|
"test": "vitest run",
|
|
32
35
|
"test:clean": "rm -rf test/*.db3*"
|
|
33
36
|
},
|
|
34
37
|
"devDependencies": {
|
|
35
|
-
"@ianvs/prettier-plugin-sort-imports": "^4.
|
|
38
|
+
"@ianvs/prettier-plugin-sort-imports": "^4.4.0",
|
|
36
39
|
"@napi-rs/cli": "^3.0.0-alpha.55",
|
|
37
|
-
"@types/node": "^20.
|
|
38
|
-
"@types/uuid": "^10",
|
|
39
|
-
"prettier": "^3.3.
|
|
40
|
-
"prettier-plugin-packagejson": "^2.5.
|
|
41
|
-
"typescript": "^5.
|
|
42
|
-
"uuid": "^
|
|
43
|
-
"viem": "^2.
|
|
44
|
-
"vite": "^5.
|
|
45
|
-
"vite-tsconfig-paths": "^
|
|
46
|
-
"vitest": "^1.
|
|
40
|
+
"@types/node": "^20.17.6",
|
|
41
|
+
"@types/uuid": "^10.0.0",
|
|
42
|
+
"prettier": "^3.3.3",
|
|
43
|
+
"prettier-plugin-packagejson": "^2.5.3",
|
|
44
|
+
"typescript": "^5.6.3",
|
|
45
|
+
"uuid": "^11.0.2",
|
|
46
|
+
"viem": "^2.21.41",
|
|
47
|
+
"vite": "^5.4.10",
|
|
48
|
+
"vite-tsconfig-paths": "^5.1.0",
|
|
49
|
+
"vitest": "^2.1.4"
|
|
47
50
|
},
|
|
48
|
-
"packageManager": "yarn@4.
|
|
51
|
+
"packageManager": "yarn@4.5.1",
|
|
49
52
|
"engines": {
|
|
50
53
|
"node": ">=18"
|
|
51
54
|
},
|