@mx-space/api-client 1.11.0-alpha.0 → 1.11.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/controllers/post.ts +1 -0
- package/dist/adaptors/umi-request.global.js +37 -31
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/models/activity.ts +4 -1
- package/package.json +2 -2
package/controllers/post.ts
CHANGED
|
@@ -1438,9 +1438,9 @@
|
|
|
1438
1438
|
}
|
|
1439
1439
|
});
|
|
1440
1440
|
|
|
1441
|
-
// ../../node_modules/.pnpm/qs@6.12.
|
|
1441
|
+
// ../../node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/formats.js
|
|
1442
1442
|
var require_formats = __commonJS({
|
|
1443
|
-
"../../node_modules/.pnpm/qs@6.12.
|
|
1443
|
+
"../../node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/formats.js"(exports, module) {
|
|
1444
1444
|
"use strict";
|
|
1445
1445
|
var replace = String.prototype.replace;
|
|
1446
1446
|
var percentTwenties = /%20/g;
|
|
@@ -1464,9 +1464,9 @@
|
|
|
1464
1464
|
}
|
|
1465
1465
|
});
|
|
1466
1466
|
|
|
1467
|
-
// ../../node_modules/.pnpm/qs@6.12.
|
|
1467
|
+
// ../../node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/utils.js
|
|
1468
1468
|
var require_utils = __commonJS({
|
|
1469
|
-
"../../node_modules/.pnpm/qs@6.12.
|
|
1469
|
+
"../../node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/utils.js"(exports, module) {
|
|
1470
1470
|
"use strict";
|
|
1471
1471
|
var formats = require_formats();
|
|
1472
1472
|
var has = Object.prototype.hasOwnProperty;
|
|
@@ -1567,6 +1567,7 @@
|
|
|
1567
1567
|
return strWithoutPlus;
|
|
1568
1568
|
}
|
|
1569
1569
|
};
|
|
1570
|
+
var limit = 1024;
|
|
1570
1571
|
var encode = function encode2(str, defaultEncoder, charset, kind, format) {
|
|
1571
1572
|
if (str.length === 0) {
|
|
1572
1573
|
return str;
|
|
@@ -1583,27 +1584,32 @@
|
|
|
1583
1584
|
});
|
|
1584
1585
|
}
|
|
1585
1586
|
var out = "";
|
|
1586
|
-
for (var
|
|
1587
|
-
var
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1587
|
+
for (var j = 0; j < string.length; j += limit) {
|
|
1588
|
+
var segment = string.length >= limit ? string.slice(j, j + limit) : string;
|
|
1589
|
+
var arr = [];
|
|
1590
|
+
for (var i = 0; i < segment.length; ++i) {
|
|
1591
|
+
var c = segment.charCodeAt(i);
|
|
1592
|
+
if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format === formats.RFC1738 && (c === 40 || c === 41)) {
|
|
1593
|
+
arr[arr.length] = segment.charAt(i);
|
|
1594
|
+
continue;
|
|
1595
|
+
}
|
|
1596
|
+
if (c < 128) {
|
|
1597
|
+
arr[arr.length] = hexTable[c];
|
|
1598
|
+
continue;
|
|
1599
|
+
}
|
|
1600
|
+
if (c < 2048) {
|
|
1601
|
+
arr[arr.length] = hexTable[192 | c >> 6] + hexTable[128 | c & 63];
|
|
1602
|
+
continue;
|
|
1603
|
+
}
|
|
1604
|
+
if (c < 55296 || c >= 57344) {
|
|
1605
|
+
arr[arr.length] = hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
|
|
1606
|
+
continue;
|
|
1607
|
+
}
|
|
1608
|
+
i += 1;
|
|
1609
|
+
c = 65536 + ((c & 1023) << 10 | segment.charCodeAt(i) & 1023);
|
|
1610
|
+
arr[arr.length] = hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
|
|
1603
1611
|
}
|
|
1604
|
-
|
|
1605
|
-
c = 65536 + ((c & 1023) << 10 | string.charCodeAt(i) & 1023);
|
|
1606
|
-
out += hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
|
|
1612
|
+
out += arr.join("");
|
|
1607
1613
|
}
|
|
1608
1614
|
return out;
|
|
1609
1615
|
};
|
|
@@ -1663,9 +1669,9 @@
|
|
|
1663
1669
|
}
|
|
1664
1670
|
});
|
|
1665
1671
|
|
|
1666
|
-
// ../../node_modules/.pnpm/qs@6.12.
|
|
1672
|
+
// ../../node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/stringify.js
|
|
1667
1673
|
var require_stringify = __commonJS({
|
|
1668
|
-
"../../node_modules/.pnpm/qs@6.12.
|
|
1674
|
+
"../../node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/stringify.js"(exports, module) {
|
|
1669
1675
|
"use strict";
|
|
1670
1676
|
var getSideChannel = require_side_channel();
|
|
1671
1677
|
var utils = require_utils();
|
|
@@ -1943,9 +1949,9 @@
|
|
|
1943
1949
|
}
|
|
1944
1950
|
});
|
|
1945
1951
|
|
|
1946
|
-
// ../../node_modules/.pnpm/qs@6.12.
|
|
1952
|
+
// ../../node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/parse.js
|
|
1947
1953
|
var require_parse = __commonJS({
|
|
1948
|
-
"../../node_modules/.pnpm/qs@6.12.
|
|
1954
|
+
"../../node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/parse.js"(exports, module) {
|
|
1949
1955
|
"use strict";
|
|
1950
1956
|
var utils = require_utils();
|
|
1951
1957
|
var has = Object.prototype.hasOwnProperty;
|
|
@@ -1959,7 +1965,7 @@
|
|
|
1959
1965
|
charset: "utf-8",
|
|
1960
1966
|
charsetSentinel: false,
|
|
1961
1967
|
comma: false,
|
|
1962
|
-
decodeDotInKeys:
|
|
1968
|
+
decodeDotInKeys: false,
|
|
1963
1969
|
decoder: utils.decode,
|
|
1964
1970
|
delimiter: "&",
|
|
1965
1971
|
depth: 5,
|
|
@@ -2164,9 +2170,9 @@
|
|
|
2164
2170
|
}
|
|
2165
2171
|
});
|
|
2166
2172
|
|
|
2167
|
-
// ../../node_modules/.pnpm/qs@6.12.
|
|
2173
|
+
// ../../node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/index.js
|
|
2168
2174
|
var require_lib = __commonJS({
|
|
2169
|
-
"../../node_modules/.pnpm/qs@6.12.
|
|
2175
|
+
"../../node_modules/.pnpm/qs@6.12.1/node_modules/qs/lib/index.js"(exports, module) {
|
|
2170
2176
|
"use strict";
|
|
2171
2177
|
var stringify2 = require_stringify();
|
|
2172
2178
|
var parse2 = require_parse();
|
package/dist/index.d.cts
CHANGED
|
@@ -260,8 +260,10 @@ interface RecentComment {
|
|
|
260
260
|
text: string;
|
|
261
261
|
id: string;
|
|
262
262
|
title: string;
|
|
263
|
-
slug
|
|
263
|
+
slug?: string;
|
|
264
264
|
type: string;
|
|
265
|
+
avatar: string;
|
|
266
|
+
nid?: string;
|
|
265
267
|
}
|
|
266
268
|
interface RecentLike {
|
|
267
269
|
created: string;
|
|
@@ -269,6 +271,7 @@ interface RecentLike {
|
|
|
269
271
|
type: CollectionRefTypes.Post | CollectionRefTypes.Note;
|
|
270
272
|
nid?: number;
|
|
271
273
|
slug?: string;
|
|
274
|
+
title: string;
|
|
272
275
|
}
|
|
273
276
|
interface RecentNote {
|
|
274
277
|
id: string;
|
|
@@ -1151,6 +1154,7 @@ type PostListOptions = {
|
|
|
1151
1154
|
year?: number;
|
|
1152
1155
|
sortBy?: 'categoryId' | 'title' | 'created' | 'modified';
|
|
1153
1156
|
sortOrder?: 1 | -1;
|
|
1157
|
+
truncate?: number;
|
|
1154
1158
|
};
|
|
1155
1159
|
declare class PostController<ResponseWrapper> implements IController {
|
|
1156
1160
|
private client;
|
package/dist/index.d.ts
CHANGED
|
@@ -260,8 +260,10 @@ interface RecentComment {
|
|
|
260
260
|
text: string;
|
|
261
261
|
id: string;
|
|
262
262
|
title: string;
|
|
263
|
-
slug
|
|
263
|
+
slug?: string;
|
|
264
264
|
type: string;
|
|
265
|
+
avatar: string;
|
|
266
|
+
nid?: string;
|
|
265
267
|
}
|
|
266
268
|
interface RecentLike {
|
|
267
269
|
created: string;
|
|
@@ -269,6 +271,7 @@ interface RecentLike {
|
|
|
269
271
|
type: CollectionRefTypes.Post | CollectionRefTypes.Note;
|
|
270
272
|
nid?: number;
|
|
271
273
|
slug?: string;
|
|
274
|
+
title: string;
|
|
272
275
|
}
|
|
273
276
|
interface RecentNote {
|
|
274
277
|
id: string;
|
|
@@ -1151,6 +1154,7 @@ type PostListOptions = {
|
|
|
1151
1154
|
year?: number;
|
|
1152
1155
|
sortBy?: 'categoryId' | 'title' | 'created' | 'modified';
|
|
1153
1156
|
sortOrder?: 1 | -1;
|
|
1157
|
+
truncate?: number;
|
|
1154
1158
|
};
|
|
1155
1159
|
declare class PostController<ResponseWrapper> implements IController {
|
|
1156
1160
|
private client;
|
package/models/activity.ts
CHANGED
|
@@ -61,8 +61,10 @@ export interface RecentComment {
|
|
|
61
61
|
text: string
|
|
62
62
|
id: string
|
|
63
63
|
title: string
|
|
64
|
-
slug
|
|
64
|
+
slug?: string
|
|
65
65
|
type: string
|
|
66
|
+
avatar: string
|
|
67
|
+
nid?: string
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
export interface RecentLike {
|
|
@@ -71,6 +73,7 @@ export interface RecentLike {
|
|
|
71
73
|
type: CollectionRefTypes.Post | CollectionRefTypes.Note
|
|
72
74
|
nid?: number
|
|
73
75
|
slug?: string
|
|
76
|
+
title: string
|
|
74
77
|
}
|
|
75
78
|
|
|
76
79
|
export interface RecentNote {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mx-space/api-client",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A api client for mx-space server@next",
|
|
6
6
|
"author": "Innei",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"lodash": "4.17.21",
|
|
57
57
|
"tsup": "8.0.2",
|
|
58
58
|
"umi-request": "1.4.0",
|
|
59
|
-
"vite": "^5.1.
|
|
59
|
+
"vite": "^5.1.7",
|
|
60
60
|
"vitest": "^1.0.4"
|
|
61
61
|
}
|
|
62
62
|
}
|