amule-ec-client 0.7.0 → 0.7.1
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/{AddLinkRequest-DEKGy-R2.js → AddLinkRequest-CGv1H3PC.js} +2 -2
- package/dist/{ClientQueueRequest-DrLXSxtp.js → ClientQueueRequest-mklt-KLi.js} +2 -2
- package/dist/{ClientQueueResponse-CXxY_9wU.js → ClientQueueResponse-RfXh2JGa.js} +3 -2
- package/dist/{CreateCategoryRequest-COulF12x.js → CreateCategoryRequest-Cyp9G7jU.js} +2 -2
- package/dist/{DeleteCategoryRequest-D-mljaNV.js → DeleteCategoryRequest-DbLJ4mvi.js} +2 -2
- package/dist/{DownloadCommandRequest-Bf1Ez8Da.js → DownloadCommandRequest-DLU7RtYs.js} +2 -2
- package/dist/{DownloadFileRequest-WfOIV07R.js → DownloadFileRequest-Db7oijyu.js} +2 -2
- package/dist/{DownloadQueueRequest-Br-pgrRt.js → DownloadQueueRequest-DdHRjl4L.js} +2 -2
- package/dist/{GetPreferencesRequest-BE3RbRRn.js → GetPreferencesRequest-BlWGYNCP.js} +2 -2
- package/dist/{PreferencesDetailsResponse-D8lBd8Ot.js → PreferencesDetailsResponse-BX6qUoga.js} +1 -1
- package/dist/{PreferencesResponse-BmGTQM30.js → PreferencesResponse-migFtIG7.js} +1 -1
- package/dist/{ReloadSharedFilesRequest-BbDUeGcq.js → ReloadSharedFilesRequest-WD9iYLje.js} +2 -2
- package/dist/{Request-BvScDpeu.js → Request-YQ0nIM6b.js} +1 -1
- package/dist/{SearchProgressResponse-BQPliUup.js → SearchProgressResponse-CkEgZGFE.js} +1 -1
- package/dist/{SearchRequest-DOakj8fA.js → SearchRequest-DaAKS4IO.js} +2 -2
- package/dist/{SearchResultsRequest-oZBs5KKm.js → SearchResultsRequest-B53jwjRH.js} +2 -2
- package/dist/{SearchResultsResponse-C9I9x035.js → SearchResultsResponse-C1l-bBja.js} +1 -1
- package/dist/{SearchStatusRequest-B1ZzSQlE.js → SearchStatusRequest-DuEa5ZYu.js} +2 -2
- package/dist/{SearchStopRequest-FfXf_DCn.js → SearchStopRequest-B5TZdMiB.js} +2 -2
- package/dist/{ServerConnectRequest-Cdiw-KWu.js → ServerConnectRequest-BeB8RSBN.js} +2 -2
- package/dist/{ServerDisconnectRequest-BVXSumxX.js → ServerDisconnectRequest-CSkUHETP.js} +2 -2
- package/dist/{ServerListRequest-3yMrgZID.js → ServerListRequest-B82686jD.js} +2 -2
- package/dist/{ServerListResponse-Do3iRai0.js → ServerListResponse-M3C2OcfZ.js} +1 -1
- package/dist/{ServerUpdateFromUrlRequest-DpxBII5W.js → ServerUpdateFromUrlRequest-BcvhRKgH.js} +2 -2
- package/dist/{SetFileCategoryRequest-CFgkJB-H.js → SetFileCategoryRequest-C1jWsYO5.js} +2 -2
- package/dist/{SetPreferencesRequest-BdZ40Ao_.js → SetPreferencesRequest-CNJVmeQl.js} +2 -2
- package/dist/{SharedFilePriorityRequest-BMNmaL06.js → SharedFilePriorityRequest-CBqkaXaK.js} +2 -2
- package/dist/{SharedFilesRequest-BZKz0oyn.js → SharedFilesRequest-5mKKjzgt.js} +2 -2
- package/dist/{SharedFilesResponse-DE0cd1DT.js → SharedFilesResponse-CFl0NuO-.js} +1 -1
- package/dist/{StatsRequest-DVwx5wk1.js → StatsRequest-C9gBUvSq.js} +2 -2
- package/dist/{StatsResponse-CP2F2zt0.js → StatsResponse-KOk-xT6_.js} +1 -1
- package/dist/{Tag-B5gWV2XF.js → Tag-D_Ybe5RQ.js} +17 -5
- package/dist/{UpdateCategoryRequest-Bu22YjOm.js → UpdateCategoryRequest-BOYfb6Vn.js} +2 -2
- package/dist/{UpdateRequest-CaQ867p8.js → UpdateRequest-csLQz7JO.js} +2 -2
- package/dist/UpdateState-LhdtiATk.js +443 -0
- package/dist/index.d.ts +24 -2
- package/dist/index.js +63 -44
- package/package.json +1 -1
- package/dist/DownloadQueueResponse-C-5d4teB.js +0 -241
- package/dist/UpdateState-Dn-SuAsj.js +0 -173
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import { a as StringTag } from "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import { a as StringTag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/AddLinkRequest.ts
|
|
4
4
|
/**
|
|
5
5
|
* Add Link Request - Download from ED2K link
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import { s as UByteTag } from "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import { s as UByteTag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/ClientQueueRequest.ts
|
|
4
4
|
/**
|
|
5
5
|
* Client Queue Request - Get client upload queue
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { f as findNumericTag, p as findTag } from "./Tag-
|
|
2
|
+
import { f as findNumericTag, p as findTag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
import { a as toOptionalNumber, i as toOptionalIp, n as tagOwnNumericValue, r as toOptionalBool } from "./utils-CNoUroOI.js";
|
|
4
4
|
//#region src/response/ClientQueueResponse.ts
|
|
5
5
|
var ClientQueueResponse_exports = /* @__PURE__ */ __exportAll({ ClientQueueResponseParser: () => ClientQueueResponseParser });
|
|
@@ -12,6 +12,7 @@ var ClientQueueResponseParser = class {
|
|
|
12
12
|
const clientTags = allTags.filter((tag) => tag.name === 1536);
|
|
13
13
|
for (const clientTag of clientTags) {
|
|
14
14
|
const tags = clientTag.nestedTags || [];
|
|
15
|
+
const downSpeedKBps = toOptionalNumber(findNumericTag(tags, 1550)?.getValue());
|
|
15
16
|
const client = {
|
|
16
17
|
ecid: tagOwnNumericValue(clientTag),
|
|
17
18
|
clientName: findTag(tags, 256)?.getValue(),
|
|
@@ -27,7 +28,7 @@ var ClientQueueResponseParser = class {
|
|
|
27
28
|
serverPort: findNumericTag(tags, 1555)?.getInt(),
|
|
28
29
|
serverName: findTag(tags, 1556)?.getValue(),
|
|
29
30
|
upSpeed: toOptionalNumber(findNumericTag(tags, 1549)?.getLong()),
|
|
30
|
-
downSpeed:
|
|
31
|
+
downSpeed: downSpeedKBps === void 0 ? void 0 : Math.round(downSpeedKBps * 1024),
|
|
31
32
|
uploadSession: toOptionalNumber(findNumericTag(tags, 1545)?.getLong()),
|
|
32
33
|
transferredDown: toOptionalNumber(findNumericTag(tags, 772)?.getLong()),
|
|
33
34
|
uploadedTotal: toOptionalNumber(findNumericTag(tags, 1546)?.getLong()),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import { a as StringTag, l as UIntTag, s as UByteTag } from "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import { a as StringTag, l as UIntTag, s as UByteTag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/CreateCategoryRequest.ts
|
|
4
4
|
/**
|
|
5
5
|
* Create Category Request - Create a new category
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import { l as UIntTag } from "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import { l as UIntTag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/DeleteCategoryRequest.ts
|
|
4
4
|
/**
|
|
5
5
|
* Delete Category Request - Delete an existing category
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import { r as Hash16Tag } from "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import { r as Hash16Tag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
import "./index.js";
|
|
4
4
|
//#region src/request/DownloadCommandRequest.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import { r as Hash16Tag } from "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import { r as Hash16Tag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/DownloadFileRequest.ts
|
|
4
4
|
/**
|
|
5
5
|
* Download File Request - Download a file from search results
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import { s as UByteTag } from "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import { s as UByteTag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/DownloadQueueRequest.ts
|
|
4
4
|
/**
|
|
5
5
|
* Download Queue Request - Get download queue
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import { l as UIntTag, s as UByteTag } from "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import { l as UIntTag, s as UByteTag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/GetPreferencesRequest.ts
|
|
4
4
|
/**
|
|
5
5
|
* Preferences Request - Get preferences
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/ReloadSharedFilesRequest.ts
|
|
4
4
|
/**
|
|
5
5
|
* Reload Shared Files Request - Reload shared files list
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as Packet, r as Flags, t as Request } from "./Request-
|
|
2
|
-
import { a as StringTag, l as UIntTag, s as UByteTag, u as ULongTag } from "./Tag-
|
|
1
|
+
import { n as Packet, r as Flags, t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import { a as StringTag, l as UIntTag, s as UByteTag, u as ULongTag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
import "./index.js";
|
|
4
4
|
//#region src/request/SearchRequest.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/SearchResultsRequest.ts
|
|
4
4
|
/**
|
|
5
5
|
* Search Results Request - Get search results
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/SearchStatusRequest.ts
|
|
4
4
|
/**
|
|
5
5
|
* Search Status Request - Get search progress
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import { i as Ipv4Tag } from "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import { i as Ipv4Tag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/ServerConnectRequest.ts
|
|
4
4
|
/**
|
|
5
5
|
* Server Connect Request - Connect to a specific server
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/ServerDisconnectRequest.ts
|
|
4
4
|
/**
|
|
5
5
|
* Server Disconnect Request - Disconnect from the current server
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/ServerListRequest.ts
|
|
4
4
|
/**
|
|
5
5
|
* Server List Request - Request the list of servers
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { f as findNumericTag, p as findTag } from "./Tag-
|
|
2
|
+
import { f as findNumericTag, p as findTag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
import { r as toOptionalBool, t as formatIp } from "./utils-CNoUroOI.js";
|
|
4
4
|
//#region src/response/ServerListResponse.ts
|
|
5
5
|
var ServerListResponse_exports = /* @__PURE__ */ __exportAll({ ServerListResponseParser: () => ServerListResponseParser });
|
package/dist/{ServerUpdateFromUrlRequest-DpxBII5W.js → ServerUpdateFromUrlRequest-BcvhRKgH.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import { a as StringTag } from "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import { a as StringTag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/ServerUpdateFromUrlRequest.ts
|
|
4
4
|
var ServerUpdateFromUrlRequest = class extends Request {
|
|
5
5
|
constructor(url) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import { r as Hash16Tag, s as UByteTag } from "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import { r as Hash16Tag, s as UByteTag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/SetFileCategoryRequest.ts
|
|
4
4
|
/**
|
|
5
5
|
* Set File Category Request - Change category of a file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import { a as StringTag, d as UShortTag, l as UIntTag, s as UByteTag } from "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import { a as StringTag, d as UShortTag, l as UIntTag, s as UByteTag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/SetPreferencesRequest.ts
|
|
4
4
|
var SetPreferencesRequest = class SetPreferencesRequest extends Request {
|
|
5
5
|
constructor(prefs) {
|
package/dist/{SharedFilePriorityRequest-BMNmaL06.js → SharedFilePriorityRequest-CBqkaXaK.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import { l as UIntTag, r as Hash16Tag } from "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import { l as UIntTag, r as Hash16Tag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/SharedFilePriorityRequest.ts
|
|
4
4
|
var SharedFilePriorityRequest = class extends Request {
|
|
5
5
|
constructor(hash, priority) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import { s as UByteTag } from "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import { s as UByteTag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/SharedFilesRequest.ts
|
|
4
4
|
/**
|
|
5
5
|
* Shared Files Request - Get shared files list
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { f as findNumericTag, p as findTag } from "./Tag-
|
|
2
|
+
import { f as findNumericTag, p as findTag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
import { a as toOptionalNumber, n as tagOwnNumericValue } from "./utils-CNoUroOI.js";
|
|
4
4
|
//#region src/response/SharedFilesResponse.ts
|
|
5
5
|
var SharedFilesResponse_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import { s as UByteTag } from "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import { s as UByteTag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/StatsRequest.ts
|
|
4
4
|
/**
|
|
5
5
|
* Stats Request - Request server statistics
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as findNumericTag, p as findTag } from "./Tag-
|
|
1
|
+
import { f as findNumericTag, p as findTag } from "./Tag-D_Ybe5RQ.js";
|
|
2
2
|
import { n as tagOwnNumericValue } from "./utils-CNoUroOI.js";
|
|
3
3
|
//#region src/response/StatsResponse.ts
|
|
4
4
|
const CONNSTATE_ED2K_CONNECTED = 1;
|
|
@@ -602,6 +602,10 @@ var StringTag = class StringTag extends Tag {
|
|
|
602
602
|
return Buffer.concat([Buffer.from(this.getValue(), "utf8"), Buffer.from([0])]);
|
|
603
603
|
}
|
|
604
604
|
};
|
|
605
|
+
/**
|
|
606
|
+
* EC_TAGTYPE_DOUBLE tags are transmitted as a null-terminated ASCII decimal string,
|
|
607
|
+
* not as a binary double (see CECTag(ec_tagname_t, double) in aMule's ECTag.cpp).
|
|
608
|
+
*/
|
|
605
609
|
var DoubleTag = class DoubleTag extends Tag {
|
|
606
610
|
constructor(name, value, subtags = [], nameValue = name) {
|
|
607
611
|
super(name, 7, subtags, nameValue);
|
|
@@ -611,13 +615,21 @@ var DoubleTag = class DoubleTag extends Tag {
|
|
|
611
615
|
return new DoubleTag(name, value, subtags);
|
|
612
616
|
}
|
|
613
617
|
parseValue(value) {
|
|
614
|
-
const
|
|
615
|
-
|
|
618
|
+
const end = value.length > 0 && value[value.length - 1] === 0 ? value.length - 1 : value.length;
|
|
619
|
+
const numValue = Number.parseFloat(value.toString("utf8", 0, end));
|
|
620
|
+
this.setValue(Number.isNaN(numValue) ? 0 : numValue);
|
|
616
621
|
}
|
|
617
622
|
encodeValue() {
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
623
|
+
return Buffer.concat([Buffer.from(this.getValue().toString(), "utf8"), Buffer.from([0])]);
|
|
624
|
+
}
|
|
625
|
+
getShort() {
|
|
626
|
+
return this.getValue();
|
|
627
|
+
}
|
|
628
|
+
getInt() {
|
|
629
|
+
return this.getValue();
|
|
630
|
+
}
|
|
631
|
+
getLong() {
|
|
632
|
+
return BigInt(Math.round(this.getValue()));
|
|
621
633
|
}
|
|
622
634
|
};
|
|
623
635
|
var Ipv4Tag = class Ipv4Tag extends Tag {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import { a as StringTag, l as UIntTag, s as UByteTag } from "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import { a as StringTag, l as UIntTag, s as UByteTag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/UpdateCategoryRequest.ts
|
|
4
4
|
/**
|
|
5
5
|
* Update Category Request - Update an existing category
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Request } from "./Request-
|
|
2
|
-
import { s as UByteTag } from "./Tag-
|
|
1
|
+
import { t as Request } from "./Request-YQ0nIM6b.js";
|
|
2
|
+
import { s as UByteTag } from "./Tag-D_Ybe5RQ.js";
|
|
3
3
|
//#region src/request/UpdateRequest.ts
|
|
4
4
|
/**
|
|
5
5
|
* Update Request - Get incremental updates for files, clients, and servers
|