@vtecx/vtecxnext 2.2.7 → 2.2.8
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/vtecxnext.d.ts +1 -0
- package/dist/vtecxnext.js +6 -2
- package/package.json +1 -1
package/dist/vtecxnext.d.ts
CHANGED
package/dist/vtecxnext.js
CHANGED
|
@@ -47,6 +47,8 @@ const SERVLETPATH_OAUTH = '/o';
|
|
|
47
47
|
const HEADER_NEXTPAGE = 'x-vtecx-nextpage';
|
|
48
48
|
/** The number of cursors to create (for practical paging) */
|
|
49
49
|
const PAGINATION_NUM = 7;
|
|
50
|
+
/** pagination memorysort */
|
|
51
|
+
const MEMORYSORT = 'memorysort';
|
|
50
52
|
class VtecxNext {
|
|
51
53
|
/** Request */
|
|
52
54
|
req;
|
|
@@ -1388,7 +1390,8 @@ class VtecxNext {
|
|
|
1388
1390
|
const pagenationInfo = {
|
|
1389
1391
|
'lastPageNumber': Number(respJson.feed.title),
|
|
1390
1392
|
'countWithinRange': Number(respJson.feed.subtitle),
|
|
1391
|
-
'hasNext': hasNext
|
|
1393
|
+
'hasNext': hasNext,
|
|
1394
|
+
'isMemorysort': respJson.feed.rights === MEMORYSORT
|
|
1392
1395
|
};
|
|
1393
1396
|
return pagenationInfo;
|
|
1394
1397
|
};
|
|
@@ -1436,7 +1439,8 @@ class VtecxNext {
|
|
|
1436
1439
|
if (num === 1) {
|
|
1437
1440
|
//console.log(`[getPageWithPagination] pagination start. uri=${uri}`)
|
|
1438
1441
|
const paginationInfo = await this.pagination(uri, `1,${String(PAGINATION_NUM)}`, targetService);
|
|
1439
|
-
|
|
1442
|
+
// メモリソートの場合は全てのカーソルリストを作成する
|
|
1443
|
+
if (paginationInfo.hasNext && !paginationInfo.isMemorysort) {
|
|
1440
1444
|
// 次のカーソルリスト作成 (非同期のまま)
|
|
1441
1445
|
this.nextPagination(uri, PAGINATION_NUM, targetService);
|
|
1442
1446
|
}
|