@static-suite/static-suite-data-server 0.0.28 → 0.0.30
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/http/routes/cache.js +2 -2
- package/dist/http/routes/indexUUID.js +1 -1
- package/dist/http/routes/task.js +1 -1
- package/dist/lib/tsdoc-metadata.json +1 -1
- package/eslint.config.mjs +1 -1
- package/package.json +2 -2
- package/src/http/routes/cache.ts +2 -2
- package/src/http/routes/indexUUID.ts +1 -1
- package/src/http/routes/task.ts +1 -1
|
@@ -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);
|
package/dist/http/routes/task.js
CHANGED
|
@@ -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);
|
package/eslint.config.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import tseslint from 'typescript-eslint';
|
|
|
7
7
|
export default defineConfig(
|
|
8
8
|
eslint.configs.recommended,
|
|
9
9
|
tseslint.configs.recommended,
|
|
10
|
-
globalIgnores(['src/http/public']),
|
|
10
|
+
globalIgnores(['src/http/public', 'dist']),
|
|
11
11
|
{
|
|
12
12
|
files: ['**/*.{ts,tsx}'],
|
|
13
13
|
rules: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@static-suite/static-suite-data-server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.30",
|
|
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",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@creativebulma/bulma-tooltip": "^1.2.0",
|
|
15
15
|
"@microsoft/api-extractor": "^7.34.4",
|
|
16
16
|
"bulma": "^1.0.4",
|
|
17
|
-
"chokidar": "
|
|
17
|
+
"chokidar": "4.0.3",
|
|
18
18
|
"clear-module": "^4.1.2",
|
|
19
19
|
"clipboard": "^2.0.11",
|
|
20
20
|
"cors": "^2.8.5",
|
package/src/http/routes/cache.ts
CHANGED
|
@@ -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);
|
package/src/http/routes/task.ts
CHANGED
|
@@ -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(
|