@vtecx/vtecxnext 2.2.15 → 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 +38 -17
  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
  /**
@@ -2828,7 +2849,7 @@ class VtecxNext {
2828
2849
  checkNotNull(account, 'account');
2829
2850
  // vte.cxへリクエスト
2830
2851
  const method = 'PUT';
2831
- const url = `${SERVLETPATH_DATA}/?_revokeuser=${account}${isDeleteGroups ? '&_deletegroup=true' : ''}`;
2852
+ const url = `${SERVLETPATH_PROVIDER}/?_revokeuser=${account}${isDeleteGroups ? '&_deletegroup=true' : ''}`;
2832
2853
  let response;
2833
2854
  try {
2834
2855
  response = await this.requestVtecx(method, url);
@@ -2872,7 +2893,7 @@ class VtecxNext {
2872
2893
  }
2873
2894
  // vte.cxへリクエスト
2874
2895
  const method = 'PUT';
2875
- const url = `${SERVLETPATH_DATA}/?_revokeuser${isDeleteGroups ? '&_deletegroup=true' : ''}`;
2896
+ const url = `${SERVLETPATH_PROVIDER}/?_revokeuser${isDeleteGroups ? '&_deletegroup=true' : ''}`;
2876
2897
  let response;
2877
2898
  try {
2878
2899
  response = await this.requestVtecx(method, url, JSON.stringify(feed));
@@ -2898,7 +2919,7 @@ class VtecxNext {
2898
2919
  checkNotNull(account, 'account');
2899
2920
  // vte.cxへリクエスト
2900
2921
  const method = 'PUT';
2901
- const url = `${SERVLETPATH_DATA}/?_activateuser=${account}`;
2922
+ const url = `${SERVLETPATH_PROVIDER}/?_activateuser=${account}`;
2902
2923
  let response;
2903
2924
  try {
2904
2925
  response = await this.requestVtecx(method, url);
@@ -2941,7 +2962,7 @@ class VtecxNext {
2941
2962
  }
2942
2963
  // vte.cxへリクエスト
2943
2964
  const method = 'PUT';
2944
- const url = `${SERVLETPATH_DATA}/?_activateuser`;
2965
+ const url = `${SERVLETPATH_PROVIDER}/?_activateuser`;
2945
2966
  let response;
2946
2967
  try {
2947
2968
  response = await this.requestVtecx(method, url, JSON.stringify(feed));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtecx/vtecxnext",
3
- "version": "2.2.15",
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
  }