@vtecx/vtecxnext 2.2.16 → 2.2.17

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.
Files changed (2) hide show
  1. package/dist/vtecxnext.js +34 -13
  2. package/package.json +4 -4
package/dist/vtecxnext.js CHANGED
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
@@ -1438,9 +1448,9 @@ class VtecxNext {
1438
1448
  if (num === 1) {
1439
1449
  //console.log(`[getPageWithPagination] pagination start. uri=${uri}`)
1440
1450
  const paginationInfo = await this.pagination(uri, `1,${String(PAGINATION_NUM)}`, targetService);
1441
- // メモリソートの場合は全てのカーソルリストを作成する
1451
+ // メモリソートの場合はvte.cx側で全てのカーソルリストを作成する
1442
1452
  if (paginationInfo.hasNext && !paginationInfo.isMemorysort) {
1443
- // 次のカーソルリスト作成 (非同期のまま)
1453
+ // メモリソートでない場合、次のカーソルリスト作成 (非同期のまま)
1444
1454
  this.nextPagination(uri, PAGINATION_NUM, targetService);
1445
1455
  }
1446
1456
  if (paginationInfo.lastPageNumber === 0) {
@@ -1473,10 +1483,21 @@ class VtecxNext {
1473
1483
  */
1474
1484
  nextPagination = async (uri, prevLastPage, targetService) => {
1475
1485
  const firstPage = prevLastPage + 1;
1476
- const lastPage = prevLastPage + prevLastPage;
1477
- const paginationInfo = await this.pagination(uri, `${String(firstPage)},${String(lastPage)}`, targetService);
1478
- if (paginationInfo.hasNext) {
1479
- await this.nextPagination(uri, lastPage, targetService);
1486
+ const lastPage = prevLastPage + PAGINATION_NUM;
1487
+ //console.log(`[vtecxnext getPageWithPagination - nextPagination] firstPage=${firstPage} lastPage=${lastPage}`)
1488
+ try {
1489
+ const paginationInfo = await this.pagination(uri, `${String(firstPage)},${String(lastPage)}`, targetService);
1490
+ if (paginationInfo.hasNext) {
1491
+ await this.nextPagination(uri, lastPage, targetService);
1492
+ }
1493
+ }
1494
+ catch (e) {
1495
+ // Do nothing.
1496
+ //if (isVtecxNextError(e)) {
1497
+ //console.log(`[vtecxnext getPageWithPagination - nextPagination] status=${e.status} message=${e.message}`)
1498
+ //} else {
1499
+ //console.log(`[vtecxnext getPageWithPagination - nextPagination] Error occured. ${e}`)
1500
+ //}
1480
1501
  }
1481
1502
  };
1482
1503
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtecx/vtecxnext",
3
- "version": "2.2.16",
3
+ "version": "2.2.17",
4
4
  "description": "vte.cx Next.js api",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -22,13 +22,13 @@
22
22
  },
23
23
  "homepage": "https://github.com/reflexworks/vtecxnext#readme",
24
24
  "devDependencies": {
25
- "@types/node": "^22.8.2",
25
+ "@types/node": "^22.10.1",
26
26
  "@types/sqlstring": "^2.3.2",
27
27
  "ts-node": "^10.9.2",
28
- "typescript": "^5.6.3"
28
+ "typescript": "^5.7.2"
29
29
  },
30
30
  "dependencies": {
31
- "next": "^15.0.1",
31
+ "next": "^15.0.4",
32
32
  "sqlstring": "^2.3.2"
33
33
  }
34
34
  }