abmqtts 0.0.5 → 0.0.7
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/fbns/fbns.client.js +208 -162
- package/dist/mqttot/mqttot.client.d.ts +2 -2
- package/dist/mqttot/mqttot.client.js +99 -87
- package/dist/mqttot/mqttot.connect.request.packet.d.ts +1 -1
- package/dist/mqttot/mqttot.connect.response.packet.d.ts +1 -1
- package/dist/mqttot/mqttot.connect.response.packet.js +18 -15
- package/dist/realtime/commands/commands.d.ts +1 -1
- package/dist/realtime/commands/direct.commands.d.ts +2 -2
- package/dist/realtime/mixins/message-sync.mixin.js +69 -65
- package/dist/realtime/mixins/realtime-sub.mixin.js +53 -47
- package/dist/realtime/realtime.client.d.ts +1 -1
- package/dist/realtime/realtime.client.events.d.ts +2 -2
- package/dist/realtime/realtime.client.js +230 -179
- package/dist/shared.d.ts +1 -1
- package/package.json +59 -59
|
@@ -5,193 +5,244 @@ const constants_1 = require("../constants");
|
|
|
5
5
|
const commands_1 = require("./commands");
|
|
6
6
|
const shared_1 = require("../shared");
|
|
7
7
|
const mqttot_1 = require("../mqttot");
|
|
8
|
-
const obmqtt_1 = require("
|
|
8
|
+
const obmqtt_1 = require("abmqtt-dist");
|
|
9
9
|
const errors_1 = require("../errors");
|
|
10
10
|
const eventemitter3_1 = require("eventemitter3");
|
|
11
11
|
const mixins_1 = require("./mixins");
|
|
12
12
|
class RealtimeClient extends eventemitter3_1.EventEmitter {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
this.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
this.
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
this.messageDebug(`Received on ${topic.path}: ${JSON.stringify(Array.isArray(parsedMessages) ? parsedMessages.map((x) => x.data) : parsedMessages.data)}`);
|
|
115
|
-
this.emit('receive', topic, Array.isArray(parsedMessages) ? parsedMessages : [parsedMessages]);
|
|
116
|
-
}
|
|
117
|
-
else {
|
|
118
|
-
this.messageDebug(`Received raw on ${topic?.path ?? msg.topic}: (${unzipped.byteLength} bytes) ${(0, shared_1.prepareLogString)(unzipped.toString())}`);
|
|
119
|
-
this.emit('receiveRaw', msg);
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
this.mqtt.on('error', e => this.emitError(e));
|
|
123
|
-
this.mqtt.on('warning', w => this.emitWarning(w));
|
|
124
|
-
this.mqtt.on('disconnect', () => this.safeDisconnect
|
|
125
|
-
? this.emit('disconnect')
|
|
126
|
-
: this.emitError(new errors_1.ClientDisconnectedError('MQTToTClient got disconnected.')));
|
|
127
|
-
return new Promise((resolve, reject) => {
|
|
128
|
-
this.mqtt.on('connect', async () => {
|
|
129
|
-
if (!this.initOptions) {
|
|
130
|
-
throw new obmqtt_1.IllegalStateError('No initi options given');
|
|
131
|
-
}
|
|
132
|
-
this.realtimeDebug('Connected. Checking initial subs.');
|
|
133
|
-
const { graphQlSubs, skywalkerSubs, irisData } = this.initOptions;
|
|
134
|
-
await Promise.all([
|
|
135
|
-
graphQlSubs && graphQlSubs.length > 0 ? this.graphQlSubscribe(graphQlSubs) : null,
|
|
136
|
-
skywalkerSubs && skywalkerSubs.length > 0 ? this.skywalkerSubscribe(skywalkerSubs) : null,
|
|
137
|
-
irisData ? this.irisSubscribe(irisData) : null,
|
|
138
|
-
]).then(resolve);
|
|
139
|
-
});
|
|
140
|
-
this.mqtt.connect({
|
|
141
|
-
keepAlive: 20,
|
|
142
|
-
protocolLevel: 3,
|
|
143
|
-
clean: true,
|
|
144
|
-
connectDelay: 60 * 1000,
|
|
145
|
-
}).catch(e => {
|
|
146
|
-
this.emitError(e);
|
|
147
|
-
reject(e);
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
disconnect() {
|
|
152
|
-
this.safeDisconnect = true;
|
|
153
|
-
return this.mqtt?.disconnect() ?? Promise.resolve();
|
|
154
|
-
}
|
|
155
|
-
graphQlSubscribe(sub) {
|
|
156
|
-
sub = typeof sub === 'string' ? [sub] : sub;
|
|
157
|
-
if (!this.commands) {
|
|
158
|
-
throw new obmqtt_1.IllegalStateError('connect() must be called before graphQlSubscribe()');
|
|
13
|
+
get mqtt() {
|
|
14
|
+
return this._mqtt;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @param {IgApiClient} ig
|
|
19
|
+
* @param mixins - by default MessageSync and Realtime mixins are used
|
|
20
|
+
*/
|
|
21
|
+
constructor(
|
|
22
|
+
ig,
|
|
23
|
+
mixins = [new mixins_1.MessageSyncMixin(), new mixins_1.RealtimeSubMixin()]
|
|
24
|
+
) {
|
|
25
|
+
super();
|
|
26
|
+
this.realtimeDebug = (0, shared_1.debugChannel)("realtime");
|
|
27
|
+
this.messageDebug = this.realtimeDebug.extend("message");
|
|
28
|
+
this.safeDisconnect = false;
|
|
29
|
+
this.emitError = (e) => this.emit("error", e);
|
|
30
|
+
this.emitWarning = (e) => this.emit("warning", e);
|
|
31
|
+
this.ig = ig;
|
|
32
|
+
this.realtimeDebug(
|
|
33
|
+
`Applying mixins: ${mixins.map((m) => m.name).join(", ")}`
|
|
34
|
+
);
|
|
35
|
+
(0, mixins_1.applyMixins)(mixins, this, this.ig);
|
|
36
|
+
}
|
|
37
|
+
setInitOptions(initOptions) {
|
|
38
|
+
if (Array.isArray(initOptions)) initOptions = { graphQlSubs: initOptions };
|
|
39
|
+
this.initOptions = {
|
|
40
|
+
graphQlSubs: [],
|
|
41
|
+
skywalkerSubs: [],
|
|
42
|
+
...(initOptions || {}),
|
|
43
|
+
socksOptions:
|
|
44
|
+
typeof initOptions === "object" && !Array.isArray(initOptions)
|
|
45
|
+
? initOptions.socksOptions
|
|
46
|
+
: undefined,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
constructConnection() {
|
|
50
|
+
const userAgent = this.ig.state.appUserAgent;
|
|
51
|
+
const deviceId = this.ig.state.phoneId;
|
|
52
|
+
const sessionid =
|
|
53
|
+
this.ig.state.parsedAuthorization?.sessionid ??
|
|
54
|
+
this.ig.state.extractCookieValue("sessionid");
|
|
55
|
+
const password = `sessionid=${sessionid}`;
|
|
56
|
+
this.connection = new mqttot_1.MQTToTConnection({
|
|
57
|
+
clientIdentifier: deviceId.substring(0, 20),
|
|
58
|
+
clientInfo: {
|
|
59
|
+
userId: BigInt(Number(this.ig.state.cookieUserId)),
|
|
60
|
+
userAgent,
|
|
61
|
+
clientCapabilities: 183,
|
|
62
|
+
endpointCapabilities: 0,
|
|
63
|
+
publishFormat: 1,
|
|
64
|
+
noAutomaticForeground: false,
|
|
65
|
+
makeUserAvailableInForeground: true,
|
|
66
|
+
deviceId,
|
|
67
|
+
isInitiallyForeground: true,
|
|
68
|
+
networkType: 1,
|
|
69
|
+
networkSubtype: 0,
|
|
70
|
+
clientMqttSessionId: BigInt(Date.now()) & BigInt(0xffffffff),
|
|
71
|
+
subscribeTopics: [88, 135, 149, 150, 133, 146],
|
|
72
|
+
clientType: "cookie_auth",
|
|
73
|
+
appId: BigInt(567067343352427),
|
|
74
|
+
deviceSecret: "",
|
|
75
|
+
clientStack: 3,
|
|
76
|
+
...(this.initOptions?.connectOverrides || {}),
|
|
77
|
+
},
|
|
78
|
+
password,
|
|
79
|
+
appSpecificInfo: {
|
|
80
|
+
app_version: this.ig.state.appVersion,
|
|
81
|
+
"X-IG-Capabilities": this.ig.state.capabilitiesHeader,
|
|
82
|
+
everclear_subscriptions: JSON.stringify({
|
|
83
|
+
inapp_notification_subscribe_comment: "17899377895239777",
|
|
84
|
+
inapp_notification_subscribe_comment_mention_and_reply:
|
|
85
|
+
"17899377895239777",
|
|
86
|
+
video_call_participant_state_delivery: "17977239895057311",
|
|
87
|
+
presence_subscribe: "17846944882223835",
|
|
88
|
+
}),
|
|
89
|
+
"User-Agent": userAgent,
|
|
90
|
+
"Accept-Language": this.ig.state.language.replace("_", "-"),
|
|
91
|
+
platform: "android",
|
|
92
|
+
ig_mqtt_route: "django",
|
|
93
|
+
pubsub_msg_type_blacklist: "direct, typing_type",
|
|
94
|
+
auth_cache_enabled: "0",
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
async connect(initOptions) {
|
|
99
|
+
this.realtimeDebug("Connecting to realtime-broker...");
|
|
100
|
+
this.setInitOptions(initOptions);
|
|
101
|
+
this.realtimeDebug(
|
|
102
|
+
`Overriding: ${Object.keys(this.initOptions?.connectOverrides || {}).join(
|
|
103
|
+
", "
|
|
104
|
+
)}`
|
|
105
|
+
);
|
|
106
|
+
this._mqtt = new mqttot_1.MQTToTClient({
|
|
107
|
+
url: constants_1.REALTIME.HOST_NAME_V6,
|
|
108
|
+
payloadProvider: () => {
|
|
109
|
+
this.constructConnection();
|
|
110
|
+
if (!this.connection) {
|
|
111
|
+
throw new obmqtt_1.IllegalStateError(
|
|
112
|
+
"constructConnection() didn't create a connection"
|
|
113
|
+
);
|
|
159
114
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
115
|
+
return (0, shared_1.compressDeflate)(this.connection.toThrift());
|
|
116
|
+
},
|
|
117
|
+
enableTrace: this.initOptions?.enableTrace,
|
|
118
|
+
autoReconnect: this.initOptions?.autoReconnect ?? true,
|
|
119
|
+
requirePayload: false,
|
|
120
|
+
socksOptions: this.initOptions?.socksOptions,
|
|
121
|
+
additionalOptions: this.initOptions?.additionalTlsOptions,
|
|
122
|
+
});
|
|
123
|
+
this.commands = new commands_1.Commands(this.mqtt);
|
|
124
|
+
this.direct = new commands_1.DirectCommands(this.mqtt);
|
|
125
|
+
this.mqtt.on("message", async (msg) => {
|
|
126
|
+
const unzipped = await (0, shared_1.tryUnzipAsync)(msg.payload);
|
|
127
|
+
const topic = constants_1.RealtimeTopicsArray.find(
|
|
128
|
+
(t) => t.id === msg.topic
|
|
129
|
+
);
|
|
130
|
+
if (topic && topic.parser && !topic.noParse) {
|
|
131
|
+
const parsedMessages = topic.parser.parseMessage(topic, unzipped);
|
|
132
|
+
this.messageDebug(
|
|
133
|
+
`Received on ${topic.path}: ${JSON.stringify(
|
|
134
|
+
Array.isArray(parsedMessages)
|
|
135
|
+
? parsedMessages.map((x) => x.data)
|
|
136
|
+
: parsedMessages.data
|
|
137
|
+
)}`
|
|
138
|
+
);
|
|
139
|
+
this.emit(
|
|
140
|
+
"receive",
|
|
141
|
+
topic,
|
|
142
|
+
Array.isArray(parsedMessages) ? parsedMessages : [parsedMessages]
|
|
143
|
+
);
|
|
144
|
+
} else {
|
|
145
|
+
this.messageDebug(
|
|
146
|
+
`Received raw on ${topic?.path ?? msg.topic}: (${
|
|
147
|
+
unzipped.byteLength
|
|
148
|
+
} bytes) ${(0, shared_1.prepareLogString)(unzipped.toString())}`
|
|
149
|
+
);
|
|
150
|
+
this.emit("receiveRaw", msg);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
this.mqtt.on("error", (e) => this.emitError(e));
|
|
154
|
+
this.mqtt.on("warning", (w) => this.emitWarning(w));
|
|
155
|
+
this.mqtt.on("disconnect", () =>
|
|
156
|
+
this.safeDisconnect
|
|
157
|
+
? this.emit("disconnect")
|
|
158
|
+
: this.emitError(
|
|
159
|
+
new errors_1.ClientDisconnectedError(
|
|
160
|
+
"MQTToTClient got disconnected."
|
|
161
|
+
)
|
|
162
|
+
)
|
|
163
|
+
);
|
|
164
|
+
return new Promise((resolve, reject) => {
|
|
165
|
+
this.mqtt.on("connect", async () => {
|
|
166
|
+
if (!this.initOptions) {
|
|
167
|
+
throw new obmqtt_1.IllegalStateError("No initi options given");
|
|
172
168
|
}
|
|
173
|
-
this.realtimeDebug(
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
169
|
+
this.realtimeDebug("Connected. Checking initial subs.");
|
|
170
|
+
const { graphQlSubs, skywalkerSubs, irisData } = this.initOptions;
|
|
171
|
+
await Promise.all([
|
|
172
|
+
graphQlSubs && graphQlSubs.length > 0
|
|
173
|
+
? this.graphQlSubscribe(graphQlSubs)
|
|
174
|
+
: null,
|
|
175
|
+
skywalkerSubs && skywalkerSubs.length > 0
|
|
176
|
+
? this.skywalkerSubscribe(skywalkerSubs)
|
|
177
|
+
: null,
|
|
178
|
+
irisData ? this.irisSubscribe(irisData) : null,
|
|
179
|
+
]).then(resolve);
|
|
180
|
+
});
|
|
181
|
+
this.mqtt
|
|
182
|
+
.connect({
|
|
183
|
+
keepAlive: 20,
|
|
184
|
+
protocolLevel: 3,
|
|
185
|
+
clean: true,
|
|
186
|
+
connectDelay: 60 * 1000,
|
|
187
|
+
})
|
|
188
|
+
.catch((e) => {
|
|
189
|
+
this.emitError(e);
|
|
190
|
+
reject(e);
|
|
179
191
|
});
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
disconnect() {
|
|
195
|
+
this.safeDisconnect = true;
|
|
196
|
+
return this.mqtt?.disconnect() ?? Promise.resolve();
|
|
197
|
+
}
|
|
198
|
+
graphQlSubscribe(sub) {
|
|
199
|
+
sub = typeof sub === "string" ? [sub] : sub;
|
|
200
|
+
if (!this.commands) {
|
|
201
|
+
throw new obmqtt_1.IllegalStateError(
|
|
202
|
+
"connect() must be called before graphQlSubscribe()"
|
|
203
|
+
);
|
|
180
204
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
205
|
+
this.realtimeDebug(`Subscribing with GraphQL to ${sub.join(", ")}`);
|
|
206
|
+
return this.commands.updateSubscriptions({
|
|
207
|
+
topic: constants_1.Topics.REALTIME_SUB,
|
|
208
|
+
data: {
|
|
209
|
+
sub,
|
|
210
|
+
},
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
skywalkerSubscribe(sub) {
|
|
214
|
+
sub = typeof sub === "string" ? [sub] : sub;
|
|
215
|
+
if (!this.commands) {
|
|
216
|
+
throw new obmqtt_1.IllegalStateError(
|
|
217
|
+
"connect() must be called before skywalkerSubscribe()"
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
this.realtimeDebug(`Subscribing with Skywalker to ${sub.join(", ")}`);
|
|
221
|
+
return this.commands.updateSubscriptions({
|
|
222
|
+
topic: constants_1.Topics.PUBSUB,
|
|
223
|
+
data: {
|
|
224
|
+
sub,
|
|
225
|
+
},
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
irisSubscribe({ seq_id, snapshot_at_ms }) {
|
|
229
|
+
if (!this.commands) {
|
|
230
|
+
throw new obmqtt_1.IllegalStateError(
|
|
231
|
+
"connect() must be called before irisSubscribe()"
|
|
232
|
+
);
|
|
194
233
|
}
|
|
234
|
+
this.realtimeDebug(
|
|
235
|
+
`Iris Sub to: seqId: ${seq_id}, snapshot: ${snapshot_at_ms}`
|
|
236
|
+
);
|
|
237
|
+
return this.commands.updateSubscriptions({
|
|
238
|
+
topic: constants_1.Topics.IRIS_SUB,
|
|
239
|
+
data: {
|
|
240
|
+
seq_id,
|
|
241
|
+
snapshot_at_ms,
|
|
242
|
+
snapshot_app_version: this.ig.state.appVersion,
|
|
243
|
+
},
|
|
244
|
+
});
|
|
245
|
+
}
|
|
195
246
|
}
|
|
196
247
|
exports.RealtimeClient = RealtimeClient;
|
|
197
|
-
//# sourceMappingURL=realtime.client.js.map
|
|
248
|
+
//# sourceMappingURL=realtime.client.js.map
|
package/dist/shared.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IgApiClient } from 'instagram-private-api';
|
|
2
2
|
import { Debugger } from 'debug';
|
|
3
|
-
import { MqttClient } from '
|
|
3
|
+
import { MqttClient } from 'abmqtt-dist';
|
|
4
4
|
export declare function createFbnsUserAgent(ig: IgApiClient): string;
|
|
5
5
|
export declare function compressDeflate(data: string | Buffer): Promise<Buffer>;
|
|
6
6
|
export declare function unzipAsync(data: string | Buffer): Promise<Buffer>;
|
package/package.json
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
2
|
+
"name": "abmqtts",
|
|
3
|
+
"version": "0.0.7",
|
|
4
|
+
"description": "Realtime and Push Notification (FBNS) support for the instagram-private-api",
|
|
5
|
+
"bugs": {
|
|
6
|
+
"url": "https://github.com/ozanbaskan/instagram_mqtt/issues"
|
|
7
|
+
},
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/ozanbaskan/instagram_mqtt.git"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
18
|
+
"build": "",
|
|
19
|
+
"prepare": "npm run build",
|
|
20
|
+
"lint": "eslint --fix --ext .js,.ts src/**",
|
|
21
|
+
"format": "prettier -w . --log-level warn",
|
|
22
|
+
"check-format": "prettier -c .",
|
|
23
|
+
"typecheck": "tsc -p tsconfig.build.json --noEmit",
|
|
24
|
+
"precommit": "npm run typecheck && npm run lint && npm run format"
|
|
25
|
+
},
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=18.0.0"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [],
|
|
30
|
+
"author": {
|
|
31
|
+
"name": "Ozan Baskan",
|
|
32
|
+
"email": "ozanbaskan7@gmail.com"
|
|
33
|
+
},
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"chance": "^1.1.11",
|
|
37
|
+
"debug": "^4.3.4",
|
|
38
|
+
"eventemitter3": "^5.0.1",
|
|
39
|
+
"instagram-private-api": "^1.46.1",
|
|
40
|
+
"abmqtt-dist": "^0.0.5",
|
|
41
|
+
"socks": "^2.8.1",
|
|
42
|
+
"ts-custom-error": "^3.3.1"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/chance": "^1.1.6",
|
|
46
|
+
"@types/debug": "^4.1.12",
|
|
47
|
+
"@types/luxon": "^3.4.2",
|
|
48
|
+
"@types/node": "^24.10.1",
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^7.5.0",
|
|
50
|
+
"@typescript-eslint/parser": "^7.5.0",
|
|
51
|
+
"eslint": "^8.57.0",
|
|
52
|
+
"prettier": "^3.2.5",
|
|
53
|
+
"rimraf": "^5.0.5",
|
|
54
|
+
"ts-xor": "^1.3.0",
|
|
55
|
+
"typescript": "^5.4.4"
|
|
56
|
+
},
|
|
57
|
+
"types": "dist/index.d.ts",
|
|
58
|
+
"overrides": {
|
|
59
|
+
"ts-custom-error": "^3.3.1"
|
|
60
|
+
}
|
|
61
61
|
}
|