@static-suite/static-suite-data-server 0.0.29 → 0.0.31

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.
@@ -10,8 +10,8 @@ exports.cacheIndex = cacheIndex;
10
10
  const cacheClear = (req, res) => {
11
11
  const { cacheBinId } = req.params;
12
12
  let done = false;
13
- if (cache_1.cache.has(cacheBinId)) {
14
- cache_1.cache.bin(cacheBinId).clear();
13
+ if (cache_1.cache.has(String(cacheBinId))) {
14
+ cache_1.cache.bin(String(cacheBinId)).clear();
15
15
  done = true;
16
16
  }
17
17
  res.render('cacheClear', { cacheBinId, done });
@@ -9,7 +9,7 @@ const indexUUID = (req, res) => {
9
9
  dataDir_1.dataDirManager.update();
10
10
  const { langcode, uuid } = req.params;
11
11
  const storeFile = uuid
12
- ? store_1.store.index.uuid.get(langcode)?.get(uuid)
12
+ ? store_1.store.index.uuid.get(String(langcode))?.get(String(uuid))
13
13
  : undefined;
14
14
  if (storeFile === undefined) {
15
15
  res.status(404);
@@ -14,7 +14,7 @@ const runTask = (req, res) => {
14
14
  dataDir_1.dataDirManager.update();
15
15
  const args = req.query;
16
16
  const { taskId } = req.params;
17
- const response = task_1.taskRunner.run(taskId, args);
17
+ const response = task_1.taskRunner.run(String(taskId), args);
18
18
  res.status('metadata' in response && response.metadata.httpStatus
19
19
  ? response.metadata.httpStatus
20
20
  : 200);
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.55.1"
8
+ "packageVersion": "7.56.0"
9
9
  }
10
10
  ]
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@static-suite/static-suite-data-server",
3
- "version": "0.0.29",
3
+ "version": "0.0.31",
4
4
  "description": "A flexible, fast and developer friendly Data Server for Static Suite",
5
5
  "main": "./dist/lib/index.js",
6
6
  "typings": "./dist/lib/index.d.ts",
@@ -55,7 +55,7 @@
55
55
  "@types/microtime": "^2.1.0",
56
56
  "@types/mime-types": "^3.0.1",
57
57
  "@types/module-alias": "^2.0.1",
58
- "@types/node": "^24.3.1",
58
+ "@types/node": "^25.2.0",
59
59
  "@types/yargs": "^17.0.22",
60
60
  "@typescript-eslint/eslint-plugin": "^8.43.0",
61
61
  "@typescript-eslint/parser": "^8.43.0",
@@ -63,8 +63,8 @@
63
63
  "eslint-import-resolver-typescript": "^4.4.4",
64
64
  "eslint-plugin-import": "^2.27.5",
65
65
  "eslint-plugin-prettier": "^5.5.4",
66
- "eslint-plugin-tsdoc": "^0.4.0",
67
- "globals": "^16.4.0",
66
+ "eslint-plugin-tsdoc": "^0.5.0",
67
+ "globals": "^17.3.0",
68
68
  "husky": "^9.1.7",
69
69
  "jest": "^30.1.3",
70
70
  "prettier": "^3.6.2",
@@ -9,8 +9,8 @@ export const cacheIndex = (req: Request, res: Response): void => {
9
9
  export const cacheClear = (req: Request, res: Response): void => {
10
10
  const { cacheBinId } = req.params;
11
11
  let done = false;
12
- if (cache.has(cacheBinId)) {
13
- cache.bin(cacheBinId).clear();
12
+ if (cache.has(String(cacheBinId))) {
13
+ cache.bin(String(cacheBinId)).clear();
14
14
  done = true;
15
15
  }
16
16
  res.render('cacheClear', { cacheBinId, done });
@@ -9,7 +9,7 @@ const indexUUID = (req: Request, res: Response): void => {
9
9
  const { langcode, uuid } = req.params;
10
10
 
11
11
  const storeFile = uuid
12
- ? store.index.uuid.get(langcode)?.get(uuid)
12
+ ? store.index.uuid.get(String(langcode))?.get(String(uuid))
13
13
  : undefined;
14
14
  if (storeFile === undefined) {
15
15
  res.status(404);
@@ -18,7 +18,7 @@ const runTask = (req: Request, res: Response): void => {
18
18
  const args: any = req.query;
19
19
  const { taskId } = req.params;
20
20
  const response: TaskSuccessfulResponse | TaskErrorResponse = taskRunner.run(
21
- taskId,
21
+ String(taskId),
22
22
  args,
23
23
  );
24
24
  res.status(