@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.
@@ -28,6 +28,7 @@ export type PaginationInfo = {
28
28
  lastPageNumber: number;
29
29
  countWithinRange: number;
30
30
  hasNext: boolean;
31
+ isMemorysort: boolean;
31
32
  };
32
33
  export declare class VtecxNext {
33
34
  /** Request */
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
- if (paginationInfo.hasNext) {
1442
+ // メモリソートの場合は全てのカーソルリストを作成する
1443
+ if (paginationInfo.hasNext && !paginationInfo.isMemorysort) {
1440
1444
  // 次のカーソルリスト作成 (非同期のまま)
1441
1445
  this.nextPagination(uri, PAGINATION_NUM, targetService);
1442
1446
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtecx/vtecxnext",
3
- "version": "2.2.7",
3
+ "version": "2.2.8",
4
4
  "description": "vte.cx Next.js api",
5
5
  "main": "dist/index.js",
6
6
  "files": [