@static-suite/static-suite-data-server 0.0.22 → 0.0.24
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/.husky/pre-commit +0 -3
- package/README.md +49 -0
- package/__mocks__/clear-module.js +2 -1
- package/dist/bin/serve.js +0 -1
- package/dist/http/README.md +49 -0
- package/dist/http/public/assets/bulma/bulma.min.css +3 -1
- package/dist/http/public/assets/simple-datatables/index.js +1 -1
- package/dist/http/public/assets/simple-datatables/style.css +32 -7
- package/dist/http/routes/cache.d.ts.map +1 -1
- package/dist/http/routes/cache.js +1 -1
- package/dist/http/routes/data.d.ts.map +1 -1
- package/dist/http/routes/data.js +2 -2
- package/dist/http/routes/dependency.d.ts.map +1 -1
- package/dist/http/routes/docs.d.ts.map +1 -1
- package/dist/http/routes/dump.d.ts.map +1 -1
- package/dist/http/routes/home.d.ts.map +1 -1
- package/dist/http/routes/index.js +6 -6
- package/dist/http/routes/indexUUID.d.ts.map +1 -1
- package/dist/http/routes/indexUUID.js +3 -3
- package/dist/http/routes/indexUrl.d.ts.map +1 -1
- package/dist/http/routes/indexUrl.js +4 -1
- package/dist/http/routes/query.d.ts.map +1 -1
- package/dist/http/routes/status.d.ts.map +1 -1
- package/dist/http/routes/subset.d.ts.map +1 -1
- package/dist/http/routes/task.d.ts.map +1 -1
- package/dist/http/routes/task.js +1 -1
- package/dist/lib/config/__tests__/config.test.d.ts +2 -0
- package/dist/lib/config/__tests__/config.test.d.ts.map +1 -0
- package/dist/lib/config/__tests__/config.test.js +123 -0
- package/dist/lib/config/config.d.ts.map +1 -1
- package/dist/lib/config/config.js +1 -0
- package/dist/lib/dataServer.types.js +1 -1
- package/dist/lib/query/__tests__/queryRunner.test.d.ts +2 -0
- package/dist/lib/query/__tests__/queryRunner.test.d.ts.map +1 -0
- package/dist/lib/query/__tests__/queryRunner.test.js +59 -0
- package/dist/lib/query/query.types.d.ts.map +1 -1
- package/dist/lib/query/query.types.js +1 -1
- package/dist/lib/query/queryTagManager.d.ts.map +1 -1
- package/dist/lib/query/queryTagManager.js +0 -1
- package/dist/lib/store/dataDir/__tests__/dataDirManager.test.d.ts +2 -0
- package/dist/lib/store/dataDir/__tests__/dataDirManager.test.d.ts.map +1 -0
- package/dist/lib/store/dataDir/__tests__/dataDirManager.test.js +18 -0
- package/dist/lib/store/dependency/dependencyManager.d.ts.map +1 -1
- package/dist/lib/store/dependency/dependencyTagger.d.ts.map +1 -1
- package/dist/lib/store/dump/dumpMetadataHelper.d.ts.map +1 -1
- package/dist/lib/store/dump/dumpMetadataHelper.js +1 -0
- package/dist/lib/store/include/__tests__/includeParser.test.d.ts +2 -0
- package/dist/lib/store/include/__tests__/includeParser.test.d.ts.map +1 -0
- package/dist/lib/store/include/__tests__/includeParser.test.js +77 -0
- package/dist/lib/store/include/parsers/__tests__/entityIncludeParser.test.d.ts +2 -0
- package/dist/lib/store/include/parsers/__tests__/entityIncludeParser.test.d.ts.map +1 -0
- package/dist/lib/store/include/parsers/__tests__/entityIncludeParser.test.js +43 -0
- package/dist/lib/store/include/parsers/configIncludeParser.d.ts.map +1 -1
- package/dist/lib/store/include/parsers/customIncludeParser.d.ts.map +1 -1
- package/dist/lib/store/include/parsers/entityIncludeParser.d.ts.map +1 -1
- package/dist/lib/store/include/parsers/localeIncludeParser.d.ts.map +1 -1
- package/dist/lib/store/include/parsers/queryIncludeParser.d.ts.map +1 -1
- package/dist/lib/store/include/parsers/types/__tests__/aliasIncludeParser.test.d.ts +2 -0
- package/dist/lib/store/include/parsers/types/__tests__/aliasIncludeParser.test.d.ts.map +1 -0
- package/dist/lib/store/include/parsers/types/__tests__/aliasIncludeParser.test.js +37 -0
- package/dist/lib/store/include/parsers/types/__tests__/aliasWithoutTypeIncludeParser.test.d.ts +2 -0
- package/dist/lib/store/include/parsers/types/__tests__/aliasWithoutTypeIncludeParser.test.d.ts.map +1 -0
- package/dist/lib/store/include/parsers/types/__tests__/aliasWithoutTypeIncludeParser.test.js +37 -0
- package/dist/lib/store/include/parsers/types/aliasIncludeParser.d.ts.map +1 -1
- package/dist/lib/store/include/parsers/types/aliasWithoutTypeIncludeParser.d.ts.map +1 -1
- package/dist/lib/store/workDir/__tests__/workDirHelper.test.d.ts +2 -0
- package/dist/lib/store/workDir/__tests__/workDirHelper.test.d.ts.map +1 -0
- package/dist/lib/store/workDir/__tests__/workDirHelper.test.js +38 -0
- package/dist/lib/store/workDir/storage/__tests__/getChangedLinesBetween.test.d.ts +2 -0
- package/dist/lib/store/workDir/storage/__tests__/getChangedLinesBetween.test.d.ts.map +1 -0
- package/dist/lib/store/workDir/storage/__tests__/getChangedLinesBetween.test.js +24 -0
- package/dist/lib/store/workDir/storage/__tests__/getDataFromLogLine.test.d.ts +2 -0
- package/dist/lib/store/workDir/storage/__tests__/getDataFromLogLine.test.d.ts.map +1 -0
- package/dist/lib/store/workDir/storage/__tests__/getDataFromLogLine.test.js +18 -0
- package/dist/lib/store/workDir/storage/getChangedLinesBetween.d.ts.map +1 -1
- package/dist/lib/store/workDir/storage/getDataFromLogLine.d.ts.map +1 -1
- package/dist/lib/task/__tests__/taskRunner.test.d.ts +2 -0
- package/dist/lib/task/__tests__/taskRunner.test.d.ts.map +1 -0
- package/dist/lib/task/__tests__/taskRunner.test.js +50 -0
- package/dist/lib/task/task.types.d.ts.map +1 -1
- package/dist/lib/utils/array/__tests__/arrayUtils.test.d.ts +2 -0
- package/dist/lib/utils/array/__tests__/arrayUtils.test.d.ts.map +1 -0
- package/dist/lib/utils/array/__tests__/arrayUtils.test.js +17 -0
- package/dist/lib/utils/array/arrayUtils.d.ts.map +1 -1
- package/dist/lib/utils/array/arrayUtils.js +0 -1
- package/dist/lib/utils/cache/__tests__/cache.test.d.ts +2 -0
- package/dist/lib/utils/cache/__tests__/cache.test.d.ts.map +1 -0
- package/dist/lib/utils/cache/__tests__/cache.test.js +21 -0
- package/dist/lib/utils/fs/__tests__/fsUtils.test.d.ts +2 -0
- package/dist/lib/utils/fs/__tests__/fsUtils.test.d.ts.map +1 -0
- package/dist/lib/utils/fs/__tests__/fsUtils.test.js +84 -0
- package/dist/lib/utils/fs/fsUtils.d.ts.map +1 -1
- package/dist/lib/utils/logger/__tests__/logger.test.d.ts +2 -0
- package/dist/lib/utils/logger/__tests__/logger.test.d.ts.map +1 -0
- package/dist/lib/utils/logger/__tests__/logger.test.js +13 -0
- package/dist/lib/utils/logger/logger.d.ts.map +1 -1
- package/dist/lib/utils/logger/logger.js +1 -3
- package/dist/lib/utils/logger/logger.types.js +1 -1
- package/dist/lib/utils/module/__tests__/dirBasedModuleGroupManager.test.d.ts +2 -0
- package/dist/lib/utils/module/__tests__/dirBasedModuleGroupManager.test.d.ts.map +1 -0
- package/dist/lib/utils/module/__tests__/dirBasedModuleGroupManager.test.js +34 -0
- package/dist/lib/utils/module/__tests__/moduleHandler.test.d.ts +2 -0
- package/dist/lib/utils/module/__tests__/moduleHandler.test.d.ts.map +1 -0
- package/dist/lib/utils/module/__tests__/moduleHandler.test.js +82 -0
- package/dist/lib/utils/module/dirBasedModuleGroupManager.d.ts +1 -1
- package/dist/lib/utils/module/dirBasedModuleGroupManager.d.ts.map +1 -1
- package/dist/lib/utils/module/moduleManager.d.ts +1 -1
- package/dist/lib/utils/module/moduleManager.d.ts.map +1 -1
- package/dist/lib/utils/module/moduleManager.js +1 -2
- package/dist/lib/utils/object/__tests__/objectUtils.test.d.ts +2 -0
- package/dist/lib/utils/object/__tests__/objectUtils.test.d.ts.map +1 -0
- package/dist/lib/utils/object/__tests__/objectUtils.test.js +60 -0
- package/dist/lib/utils/object/objectUtils.d.ts.map +1 -1
- package/dist/lib/utils/string/__tests__/stringUtils.test.d.ts +2 -0
- package/dist/lib/utils/string/__tests__/stringUtils.test.d.ts.map +1 -0
- package/dist/lib/utils/string/__tests__/stringUtils.test.js +51 -0
- package/dist/lib/utils/string/stringUtils.d.ts.map +1 -1
- package/eslint.config.mjs +18 -0
- package/package.json +35 -33
- package/scripts/{copy-http-files-to-src.js → copy-http-files-to-src.mjs} +10 -12
- package/src/__tests__/fixtures/hook/main.hook.js +4 -3
- package/src/__tests__/fixtures/hook/taxonomy/main.hook.js +4 -3
- package/src/__tests__/fixtures/hook/taxonomy/taxo.hook.js +4 -3
- package/src/__tests__/fixtures/query/error.query.js +1 -1
- package/src/__tests__/fixtures/query/noHandler.query.js +1 -0
- package/src/__tests__/fixtures/query/query1.query.js +1 -0
- package/src/__tests__/fixtures/query/query2.query.js +1 -0
- package/src/__tests__/fixtures/query/wrongNamequery.js +1 -0
- package/src/__tests__/fixtures/task/error.task.js +1 -1
- package/src/__tests__/fixtures/task/noHandler.task.js +1 -0
- package/src/__tests__/fixtures/task/task1.task.js +1 -0
- package/src/__tests__/fixtures/task/task2.task.js +1 -0
- package/src/__tests__/fixtures/task/wrongNametask.js +1 -0
- package/src/bin/serve.ts +0 -2
- package/src/http/routes/cache.ts +1 -1
- package/src/http/routes/data.ts +2 -3
- package/src/http/routes/index.ts +6 -6
- package/src/http/routes/indexUUID.ts +3 -3
- package/src/http/routes/indexUrl.ts +5 -1
- package/src/http/routes/task.ts +1 -1
- package/src/lib/config/__tests__/config.test.ts +2 -2
- package/src/lib/config/config.ts +1 -0
- package/src/lib/query/__tests__/queryRunner.test.ts +1 -0
- package/src/lib/query/queryTagManager.ts +0 -1
- package/src/lib/store/dump/dumpMetadataHelper.ts +1 -0
- package/src/lib/task/__tests__/taskRunner.test.ts +1 -0
- package/src/lib/utils/array/arrayUtils.ts +0 -1
- package/src/lib/utils/fs/__tests__/fsUtils.test.ts +5 -1
- package/src/lib/utils/logger/logger.ts +0 -1
- package/src/lib/utils/module/__mocks__/dummyModule.query.js +1 -0
- package/src/lib/utils/module/__mocks__/dummyModule2.query.js +1 -0
- package/src/lib/utils/module/__tests__/dirBasedModuleGroupManager.test.ts +3 -1
- package/src/lib/utils/module/__tests__/moduleHandler.test.ts +7 -3
- package/src/lib/utils/module/moduleManager.ts +1 -2
- package/tsconfig.json +1 -2
- package/.eslintignore +0 -4
- package/.eslintrc.json +0 -46
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const fs_1 = __importDefault(require("fs"));
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const logger_1 = require("../../logger");
|
|
9
|
+
const moduleManager_1 = require("../moduleManager");
|
|
10
|
+
// This works in conjunction with "__mocks__/clear-module.js"
|
|
11
|
+
jest.mock('clear-module');
|
|
12
|
+
// This test is executed from dist folder
|
|
13
|
+
const dummyModulePath = fs_1.default.realpathSync(path_1.default.resolve(path_1.default.join(__dirname, '../../../../../src/lib/utils/module/__mocks__/dummyModule.query.js')));
|
|
14
|
+
beforeEach(() => {
|
|
15
|
+
logger_1.logger.error = jest.fn();
|
|
16
|
+
});
|
|
17
|
+
describe('moduleHandler test', () => {
|
|
18
|
+
describe('get', () => {
|
|
19
|
+
describe('when a module exists', () => {
|
|
20
|
+
it('gets a module without logging any error', () => {
|
|
21
|
+
const { dummyObject } = moduleManager_1.moduleManager.get(dummyModulePath);
|
|
22
|
+
expect(dummyObject.key).toBe('dummyModuleValue');
|
|
23
|
+
expect(logger_1.logger.error).not.toHaveBeenCalled();
|
|
24
|
+
});
|
|
25
|
+
it('gets a module twice without reloading it', () => {
|
|
26
|
+
const { dummyObject: firstDummyObject } = moduleManager_1.moduleManager.get(dummyModulePath);
|
|
27
|
+
expect(firstDummyObject.key).toBe('dummyModuleValue');
|
|
28
|
+
firstDummyObject.key = 'updatedDummyModuleValue';
|
|
29
|
+
const { dummyObject: secondDummyObject } = moduleManager_1.moduleManager.get(dummyModulePath);
|
|
30
|
+
expect(secondDummyObject.key).toBe('updatedDummyModuleValue');
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
describe('when a module does not exist', () => {
|
|
34
|
+
it('throws an exception and logs an error', () => {
|
|
35
|
+
expect(() => moduleManager_1.moduleManager.get('invalid-path')).toThrow();
|
|
36
|
+
expect(logger_1.logger.error).toHaveBeenCalled();
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
describe('load', () => {
|
|
41
|
+
describe('when a module exists', () => {
|
|
42
|
+
it('loads a module without logging any error', () => {
|
|
43
|
+
const { dummyObject } = moduleManager_1.moduleManager.load(dummyModulePath);
|
|
44
|
+
expect(dummyObject.key).toBe('dummyModuleValue');
|
|
45
|
+
expect(logger_1.logger.error).not.toHaveBeenCalled();
|
|
46
|
+
});
|
|
47
|
+
it('loads a module twice reloading it from scratch', () => {
|
|
48
|
+
const { dummyObject: firstDummyObject } = moduleManager_1.moduleManager.load(dummyModulePath);
|
|
49
|
+
const { dummyObject: secondDummyObject } = moduleManager_1.moduleManager.load(dummyModulePath);
|
|
50
|
+
firstDummyObject.key = 'updatedDummyModuleValue';
|
|
51
|
+
expect(firstDummyObject.key).toBe('updatedDummyModuleValue');
|
|
52
|
+
expect(secondDummyObject.key).toBe('dummyModuleValue');
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
describe('when a module does not exist', () => {
|
|
56
|
+
it('throws an exception and logs an error', () => {
|
|
57
|
+
expect(() => moduleManager_1.moduleManager.get('invalid-path')).toThrow();
|
|
58
|
+
expect(logger_1.logger.error).toHaveBeenCalled();
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
describe('remove', () => {
|
|
63
|
+
it('removes a single module from Node.js cache', () => {
|
|
64
|
+
const { dummyObject: firstDummyObject } = moduleManager_1.moduleManager.get(dummyModulePath);
|
|
65
|
+
moduleManager_1.moduleManager.remove(dummyModulePath);
|
|
66
|
+
const { dummyObject: secondDummyObject } = moduleManager_1.moduleManager.get(dummyModulePath);
|
|
67
|
+
firstDummyObject.key = 'updatedDummyModuleValue';
|
|
68
|
+
expect(firstDummyObject.key).toBe('updatedDummyModuleValue');
|
|
69
|
+
expect(secondDummyObject.key).toBe('dummyModuleValue');
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
describe('removeAll', () => {
|
|
73
|
+
it('removes several modules from Node.js cache', () => {
|
|
74
|
+
const { dummyObject: dummyObject1 } = moduleManager_1.moduleManager.get(dummyModulePath);
|
|
75
|
+
dummyObject1.key = 'updatedDummyModuleValue';
|
|
76
|
+
moduleManager_1.moduleManager.removeAll(/dummyModule/);
|
|
77
|
+
const { dummyObject: dummyObject2 } = moduleManager_1.moduleManager.get(dummyModulePath);
|
|
78
|
+
expect(dummyObject1.key).toBe('updatedDummyModuleValue');
|
|
79
|
+
expect(dummyObject2.key).toBe('dummyModuleValue');
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
});
|
|
@@ -26,5 +26,5 @@ import { ModuleGroupManager } from './module.types';
|
|
|
26
26
|
* @returns A module group manager with a set of common functionalities
|
|
27
27
|
* for those kind of directories.
|
|
28
28
|
*/
|
|
29
|
-
export declare const dirBasedModuleGroupManager: <ModuleType>(key:
|
|
29
|
+
export declare const dirBasedModuleGroupManager: <ModuleType>(key: "hook" | "query" | "task") => ModuleGroupManager<ModuleType>;
|
|
30
30
|
//# sourceMappingURL=dirBasedModuleGroupManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dirBasedModuleGroupManager.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/module/dirBasedModuleGroupManager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAc,MAAM,gBAAgB,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"dirBasedModuleGroupManager.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/module/dirBasedModuleGroupManager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAc,MAAM,gBAAgB,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,0BAA0B,GAAI,UAAU,EAEnD,KAAK,MAAM,GAAG,OAAO,GAAG,MAAM,KAC7B,kBAAkB,CAAC,UAAU,CAwC/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moduleManager.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/module/moduleManager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"moduleManager.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/module/moduleManager.ts"],"names":[],"mappings":"AA6CA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa;IACxB;;;;;;;;;;;;;;;OAeG;WACI,IAAI,cAAc,MAAM,KAAG,IAAI;IAoBtC;;;;;;;;OAQG;yBACkB,MAAM;;UAAkC,IAAI;IASjE;;;;OAIG;uBACgB,MAAM,KAAG,IAAI;IAShC;;;;;;;;;;;;;OAaG;UACG,IAAI,cAAc,MAAM,KAAG,IAAI;CAOtC,CAAC"}
|
|
@@ -4,8 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.moduleManager = void 0;
|
|
7
|
-
/* eslint-disable global-require */
|
|
8
|
-
/* eslint-disable import/no-dynamic-require */
|
|
9
7
|
const clear_module_1 = __importDefault(require("clear-module"));
|
|
10
8
|
const logger_1 = require("../logger");
|
|
11
9
|
const config_1 = require("../../config");
|
|
@@ -39,6 +37,7 @@ const resolve = (modulePath) => {
|
|
|
39
37
|
if (!resolvedModulePath) {
|
|
40
38
|
try {
|
|
41
39
|
resolvedModulePath = require.resolve(modulePath);
|
|
40
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
42
41
|
}
|
|
43
42
|
catch (e) {
|
|
44
43
|
resolvedModulePath = modulePath;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objectUtils.test.d.ts","sourceRoot":"","sources":["../../../../../src/lib/utils/object/__tests__/objectUtils.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const __1 = require("..");
|
|
4
|
+
const objectUtils_1 = require("../objectUtils");
|
|
5
|
+
describe('Object utils test', () => {
|
|
6
|
+
describe('isEmptyObject', () => {
|
|
7
|
+
it('returns true for an empty object', () => {
|
|
8
|
+
expect((0, objectUtils_1.isEmptyObject)({})).toBe(true);
|
|
9
|
+
});
|
|
10
|
+
it('returns false for a non empty object', () => {
|
|
11
|
+
expect((0, objectUtils_1.isEmptyObject)({ x: 1 })).toBe(false);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
describe('hasKey', () => {
|
|
15
|
+
it('returns true if an object has a given key', () => {
|
|
16
|
+
expect((0, objectUtils_1.hasKey)({ x: 1 }, 'x')).toBe(true);
|
|
17
|
+
});
|
|
18
|
+
it('returns false if an object does not have a given key', () => {
|
|
19
|
+
expect((0, objectUtils_1.hasKey)({ x: 1 }, 'y')).toBe(false);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
describe('deepClone', () => {
|
|
23
|
+
it('returns an object equal to the given one, without references to nested objects', () => {
|
|
24
|
+
const anObject = { x: 1, y: {} };
|
|
25
|
+
const anotherObject = { z: 34 };
|
|
26
|
+
anObject.y = anotherObject;
|
|
27
|
+
const clonedObject = (0, objectUtils_1.deepClone)(anObject);
|
|
28
|
+
expect(clonedObject).toStrictEqual(anObject);
|
|
29
|
+
anotherObject.z = 22;
|
|
30
|
+
expect(clonedObject).not.toStrictEqual(anObject);
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
describe('getObjectValue', () => {
|
|
34
|
+
const testObject = { x: { y: { z: 'value' } } };
|
|
35
|
+
it('gets object value with default separator', () => {
|
|
36
|
+
expect((0, __1.getObjValue)(testObject, 'x.y.z')).toBe('value');
|
|
37
|
+
});
|
|
38
|
+
it('gets object value with custom separator', () => {
|
|
39
|
+
expect((0, __1.getObjValue)(testObject, 'x/y/z', '/')).toBe('value');
|
|
40
|
+
});
|
|
41
|
+
it('gets object value with array separator', () => {
|
|
42
|
+
expect((0, __1.getObjValue)(testObject, ['x', 'y', 'z'])).toBe('value');
|
|
43
|
+
});
|
|
44
|
+
it('gets undefined when path does not exist', () => {
|
|
45
|
+
expect((0, __1.getObjValue)(testObject, 'x.z.z')).toBeUndefined();
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
describe('jsonify', () => {
|
|
49
|
+
const testObject = {
|
|
50
|
+
x: new Set([1, 2]),
|
|
51
|
+
y: new Map([['mapKey', 'mapValue']]),
|
|
52
|
+
};
|
|
53
|
+
it('jsonify object containing Set and Map', () => {
|
|
54
|
+
expect((0, objectUtils_1.jsonify)(testObject)).toEqual({
|
|
55
|
+
x: [1, 2],
|
|
56
|
+
y: { mapKey: 'mapValue' },
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectUtils.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/object/objectUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"objectUtils.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/object/objectUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GAAI,QAAQ,UAAU,KAAG,OACjB,CAAC;AAEnC;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,MAAM,EACrC,QAAQ,CAAC,EACT,KAAK,WAAW,KACf,GAAG,IAAI,MAAM,CAEf,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,GAAI,QAAQ,UAAU,KAAG,UACX,CAAC;AAErC;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,GACtB,QAAQ,UAAU,EAClB,MAAM,MAAM,GAAG,MAAM,EAAE,EACvB,YAAY,MAAM,KACjB,GAAG,GAAG,SAMR,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,GAAI,CAAC,EAAE,OAAO,CAAC,KAAG,CAQrC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stringUtils.test.d.ts","sourceRoot":"","sources":["../../../../../src/lib/utils/string/__tests__/stringUtils.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const logger_1 = require("../../logger");
|
|
4
|
+
const stringUtils_1 = require("../stringUtils");
|
|
5
|
+
describe('String utils test', () => {
|
|
6
|
+
describe('parseJsonString', () => {
|
|
7
|
+
logger_1.logger.error = jest.fn();
|
|
8
|
+
it('parses a well-formed JSON string without logging any error', () => {
|
|
9
|
+
expect((0, stringUtils_1.parseJsonString)('{"key": "value"}')).not.toBeNull();
|
|
10
|
+
expect(logger_1.logger.error).not.toHaveBeenCalled();
|
|
11
|
+
});
|
|
12
|
+
it('logs an error when parsing a malformed JSON string', () => {
|
|
13
|
+
expect((0, stringUtils_1.parseJsonString)('malformed-json-string')).toBeNull();
|
|
14
|
+
expect(logger_1.logger.error).toHaveBeenCalled();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
describe('parseURLSearchParams', () => {
|
|
18
|
+
it('parses a query string with non repeated keys and returns an object', () => {
|
|
19
|
+
const parsedQuery = (0, stringUtils_1.parseURLSearchParams)('arg1=a&arg2=b');
|
|
20
|
+
const expectedValue = { arg1: 'a', arg2: 'b' };
|
|
21
|
+
expect(parsedQuery).toStrictEqual(expectedValue);
|
|
22
|
+
});
|
|
23
|
+
it('parses a query string with repeated keys and returns an object', () => {
|
|
24
|
+
const parsedQuery = (0, stringUtils_1.parseURLSearchParams)('arg1=a&arg2=b&arg1=c');
|
|
25
|
+
const expectedValue = { arg1: ['a', 'c'], arg2: 'b' };
|
|
26
|
+
expect(parsedQuery).toEqual(expectedValue);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
describe('parseUniqueId', () => {
|
|
30
|
+
it('parses a valid unique id and returns a date', () => {
|
|
31
|
+
const uniqueIdDate = (0, stringUtils_1.parseUniqueId)('2022-09-28_11-42-00.001712__7220');
|
|
32
|
+
// Depending on the time of year (Daylight saving time or not), parsing
|
|
33
|
+
// a unique id returns a different date. This test checks both possible values.
|
|
34
|
+
expect([1664365320001, 1664361720001]).toContain(uniqueIdDate?.getTime());
|
|
35
|
+
});
|
|
36
|
+
it('parses a non valid unique id and returns null', () => {
|
|
37
|
+
const uniqueIdDate = (0, stringUtils_1.parseUniqueId)('non valid unique id');
|
|
38
|
+
expect(uniqueIdDate).toEqual(null);
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
describe('isUniqueId', () => {
|
|
42
|
+
it('returns true for a valid unique id', () => {
|
|
43
|
+
const result = (0, stringUtils_1.isUniqueId)('2022-09-28_11-42-00.001712__7220');
|
|
44
|
+
expect(result).toEqual(true);
|
|
45
|
+
});
|
|
46
|
+
it('returns false for a non valid unique id', () => {
|
|
47
|
+
const result = (0, stringUtils_1.isUniqueId)('non valid unique id');
|
|
48
|
+
expect(result).toEqual(false);
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringUtils.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/string/stringUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAEvD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,OAAO,CAAC;AAEtC;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"stringUtils.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/string/stringUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAEvD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,OAAO,CAAC;AAEtC;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,KAAG,GAQpD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,GAC/B,aAAa,MAAM,KAClB,qBAWF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GAAI,UAAU,MAAM,KAAG,IAAI,GAAG,IAevD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,UAAU,MAAM,KAAG,OAC+B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
import eslint from '@eslint/js';
|
|
4
|
+
import { defineConfig, globalIgnores } from 'eslint/config';
|
|
5
|
+
import tseslint from 'typescript-eslint';
|
|
6
|
+
|
|
7
|
+
export default defineConfig(
|
|
8
|
+
eslint.configs.recommended,
|
|
9
|
+
tseslint.configs.recommended,
|
|
10
|
+
globalIgnores(['src/http/public']),
|
|
11
|
+
{
|
|
12
|
+
files: ['**/*.{ts,tsx}'],
|
|
13
|
+
rules: {
|
|
14
|
+
'@typescript-eslint/no-explicit-any': ['off'],
|
|
15
|
+
'@typescript-eslint/no-require-imports': ['off'],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
);
|
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.24",
|
|
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",
|
|
@@ -13,26 +13,24 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@creativebulma/bulma-tooltip": "^1.2.0",
|
|
15
15
|
"@microsoft/api-extractor": "^7.34.4",
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"bulma": "^0.9.4",
|
|
19
|
-
"chokidar": "^3.5.3",
|
|
16
|
+
"bulma": "^1.0.4",
|
|
17
|
+
"chokidar": "^4.0.3",
|
|
20
18
|
"clear-module": "^4.1.2",
|
|
21
19
|
"clipboard": "^2.0.11",
|
|
22
20
|
"copyfiles": "^2.4.1",
|
|
23
21
|
"cors": "^2.8.5",
|
|
24
22
|
"decache": "^4.6.1",
|
|
25
|
-
"express": "^
|
|
23
|
+
"express": "^5.1.0",
|
|
26
24
|
"fast-glob": "^3.2.12",
|
|
27
|
-
"marked": "^
|
|
25
|
+
"marked": "^16.2.1",
|
|
28
26
|
"microtime": "^3.1.1",
|
|
29
|
-
"mime-types": "^
|
|
27
|
+
"mime-types": "^3.0.1",
|
|
30
28
|
"pug": "^3.0.3",
|
|
31
|
-
"simple-datatables": "^
|
|
32
|
-
"tsc-watch": "^
|
|
33
|
-
"typescript": "^
|
|
29
|
+
"simple-datatables": "^10.0.0",
|
|
30
|
+
"tsc-watch": "^7.1.1",
|
|
31
|
+
"typescript": "^5.9.2",
|
|
34
32
|
"winston": "^3.8.2",
|
|
35
|
-
"yargs": "^
|
|
33
|
+
"yargs": "^18.0.0"
|
|
36
34
|
},
|
|
37
35
|
"bin": {
|
|
38
36
|
"static-suite-data-server": "./dist/bin/serve.js"
|
|
@@ -40,38 +38,41 @@
|
|
|
40
38
|
"scripts": {
|
|
41
39
|
"dev": "tsc-watch --onSuccess \"yarn lint\"",
|
|
42
40
|
"build": "rm -Rf dist && yarn copy-http-files-to-src && yarn lint && tsc && yarn api-extractor run --local --verbose && yarn post-build && yarn copy-http-files-to-dist",
|
|
43
|
-
"post-build": "
|
|
41
|
+
"post-build": "rm -Rf dist/**/*__tests__",
|
|
44
42
|
"serve": "export DATASERVER_CONFIG_FILE=dataserver.test.config.json && node ./dist/bin/serve.js http",
|
|
45
|
-
"lint": "eslint .
|
|
43
|
+
"lint": "eslint .",
|
|
46
44
|
"docs": "yarn typedoc --out docs src/lib/",
|
|
47
45
|
"prettier-format": "prettier --config .prettierrc 'src/**/*.ts' --write",
|
|
48
46
|
"test": "jest --watch",
|
|
49
|
-
"copy-http-files-to-src": "node ./scripts/copy-http-files-to-src.
|
|
50
|
-
"copy-http-files-to-dist": "cp -r ./src/http/public/ ./dist/http/ && cp -r ./src/http/views/ ./dist/http/ && cp README.md ./dist/http/",
|
|
51
|
-
"prepare": "husky
|
|
47
|
+
"copy-http-files-to-src": "node ./scripts/copy-http-files-to-src.mjs",
|
|
48
|
+
"copy-http-files-to-dist": "mkdir -p ./dist/http/ && cp -r ./src/http/public/ ./dist/http/ && cp -r ./src/http/views/ ./dist/http/ && cp README.md ./dist/http/",
|
|
49
|
+
"prepare": "husky"
|
|
52
50
|
},
|
|
53
51
|
"devDependencies": {
|
|
52
|
+
"@eslint/js": "^9.35.0",
|
|
54
53
|
"@types/cors": "^2.8.13",
|
|
55
|
-
"@types/express": "^
|
|
56
|
-
"@types/
|
|
54
|
+
"@types/express": "^5.0.3",
|
|
55
|
+
"@types/jest": "^30.0.0",
|
|
56
|
+
"@types/marked": "^6.0.0",
|
|
57
57
|
"@types/microtime": "^2.1.0",
|
|
58
|
-
"@types/mime-types": "^
|
|
58
|
+
"@types/mime-types": "^3.0.1",
|
|
59
59
|
"@types/module-alias": "^2.0.1",
|
|
60
|
-
"@types/node": "^
|
|
60
|
+
"@types/node": "^24.3.1",
|
|
61
61
|
"@types/yargs": "^17.0.22",
|
|
62
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
63
|
-
"@typescript-eslint/parser": "^
|
|
64
|
-
"eslint": "^
|
|
65
|
-
"eslint-
|
|
66
|
-
"eslint-import-resolver-typescript": "^3.5.3",
|
|
62
|
+
"@typescript-eslint/eslint-plugin": "^8.43.0",
|
|
63
|
+
"@typescript-eslint/parser": "^8.43.0",
|
|
64
|
+
"eslint": "^9.35.0",
|
|
65
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
67
66
|
"eslint-plugin-import": "^2.27.5",
|
|
68
|
-
"eslint-plugin-prettier": "^
|
|
69
|
-
"eslint-plugin-tsdoc": "^0.
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
67
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
68
|
+
"eslint-plugin-tsdoc": "^0.4.0",
|
|
69
|
+
"globals": "^16.4.0",
|
|
70
|
+
"husky": "^9.1.7",
|
|
71
|
+
"jest": "^30.1.3",
|
|
72
|
+
"prettier": "^3.6.2",
|
|
73
|
+
"ts-jest": "^29.4.1",
|
|
74
|
+
"typedoc": "^0.28.12",
|
|
75
|
+
"typescript-eslint": "^8.43.0"
|
|
75
76
|
},
|
|
76
77
|
"jest": {
|
|
77
78
|
"preset": "ts-jest",
|
|
@@ -81,6 +82,7 @@
|
|
|
81
82
|
"src"
|
|
82
83
|
],
|
|
83
84
|
"testPathIgnorePatterns": [
|
|
85
|
+
".d.ts",
|
|
84
86
|
"src/__tests__/fixtures/*",
|
|
85
87
|
"src/__tests__/mocks/*"
|
|
86
88
|
]
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
+
/* eslint-disable no-undef */
|
|
1
2
|
/**
|
|
2
3
|
* Script to run after npm install
|
|
3
4
|
*
|
|
4
5
|
* Copy selected files to assets directory
|
|
5
6
|
*/
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
import { mkdirSync, copyFileSync } from 'fs';
|
|
8
9
|
|
|
9
10
|
// Copy files from Bulma to assets directory
|
|
10
11
|
const bulmaSrcDir = 'node_modules/bulma/css/';
|
|
11
12
|
const bulmaTargetDir = `${process.env.INIT_CWD}/src/http/public/assets/bulma/`;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
`${bulmaSrcDir}/bulma.min.css`,
|
|
15
|
-
`${bulmaTargetDir}/bulma.min.css`,
|
|
16
|
-
);
|
|
13
|
+
mkdirSync(bulmaTargetDir, { recursive: true });
|
|
14
|
+
copyFileSync(`${bulmaSrcDir}/bulma.min.css`, `${bulmaTargetDir}/bulma.min.css`);
|
|
17
15
|
|
|
18
16
|
// Copy files from Bulma tooltip to assets directory
|
|
19
17
|
const bulmaTooltipSrcDir = 'node_modules/@creativebulma/bulma-tooltip/dist/';
|
|
20
|
-
|
|
18
|
+
copyFileSync(
|
|
21
19
|
`${bulmaTooltipSrcDir}/bulma-tooltip.min.css`,
|
|
22
20
|
`${bulmaTargetDir}/bulma-tooltip.min.css`,
|
|
23
21
|
);
|
|
@@ -25,8 +23,8 @@ fs.copyFileSync(
|
|
|
25
23
|
// Copy files from Clipboard to assets directory
|
|
26
24
|
const clipboardSrcDir = 'node_modules/clipboard/dist/';
|
|
27
25
|
const clipboardTargetDir = `${process.env.INIT_CWD}/src/http/public/assets/clipboard/`;
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
mkdirSync(clipboardTargetDir, { recursive: true });
|
|
27
|
+
copyFileSync(
|
|
30
28
|
`${clipboardSrcDir}/clipboard.min.js`,
|
|
31
29
|
`${clipboardTargetDir}/clipboard.min.js`,
|
|
32
30
|
);
|
|
@@ -34,12 +32,12 @@ fs.copyFileSync(
|
|
|
34
32
|
// Copy files from datatables to assets directory
|
|
35
33
|
const dataTablesSrcDir = 'node_modules/simple-datatables/dist/';
|
|
36
34
|
const dataTablesTargetDir = `${process.env.INIT_CWD}/src/http/public/assets/simple-datatables/`;
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
mkdirSync(dataTablesTargetDir, { recursive: true });
|
|
36
|
+
copyFileSync(
|
|
39
37
|
`${dataTablesSrcDir}/umd/simple-datatables.js`,
|
|
40
38
|
`${dataTablesTargetDir}/index.js`,
|
|
41
39
|
);
|
|
42
|
-
|
|
40
|
+
copyFileSync(
|
|
43
41
|
`${dataTablesSrcDir}/style.css`,
|
|
44
42
|
`${dataTablesTargetDir}/style.css`,
|
|
45
43
|
);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable no-undef */
|
|
2
|
+
module.exports.onProcessFile = ({ fileContent }) => {
|
|
2
3
|
// Do something...
|
|
3
4
|
return {
|
|
4
5
|
raw: fileContent.raw,
|
|
@@ -6,10 +7,10 @@ exports.onProcessFile = ({ fileContent }) => {
|
|
|
6
7
|
};
|
|
7
8
|
};
|
|
8
9
|
|
|
9
|
-
exports.onStoreAdd = (/* _dataDir, _file, _fileContent, _store */) => {
|
|
10
|
+
module.exports.onStoreAdd = (/* _dataDir, _file, _fileContent, _store */) => {
|
|
10
11
|
// Do something...
|
|
11
12
|
};
|
|
12
13
|
|
|
13
|
-
exports.onStoreRemove = (/* _file, _store */) => {
|
|
14
|
+
module.exports.onStoreRemove = (/* _file, _store */) => {
|
|
14
15
|
// Do something...
|
|
15
16
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable no-undef */
|
|
2
|
+
module.exports.onProcessFile = ({ fileContent }) => {
|
|
2
3
|
// Do something...
|
|
3
4
|
return {
|
|
4
5
|
raw: fileContent.raw,
|
|
@@ -6,10 +7,10 @@ exports.onProcessFile = ({ fileContent }) => {
|
|
|
6
7
|
};
|
|
7
8
|
};
|
|
8
9
|
|
|
9
|
-
exports.onStoreAdd = (/* _dataDir, _file, _fileContent, _store */) => {
|
|
10
|
+
module.exports.onStoreAdd = (/* _dataDir, _file, _fileContent, _store */) => {
|
|
10
11
|
// Do something...
|
|
11
12
|
};
|
|
12
13
|
|
|
13
|
-
exports.onStoreRemove = (/* _file, _store */) => {
|
|
14
|
+
module.exports.onStoreRemove = (/* _file, _store */) => {
|
|
14
15
|
// Do something...
|
|
15
16
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable no-undef */
|
|
2
|
+
module.exports.onProcessFile = ({ fileContent }) => {
|
|
2
3
|
// Do something...
|
|
3
4
|
return {
|
|
4
5
|
raw: fileContent.raw,
|
|
@@ -6,10 +7,10 @@ exports.onProcessFile = ({ fileContent }) => {
|
|
|
6
7
|
};
|
|
7
8
|
};
|
|
8
9
|
|
|
9
|
-
exports.onStoreAdd = (/* _dataDir, _file, _fileContent, _store */) => {
|
|
10
|
+
module.exports.onStoreAdd = (/* _dataDir, _file, _fileContent, _store */) => {
|
|
10
11
|
// Do something...
|
|
11
12
|
};
|
|
12
13
|
|
|
13
|
-
exports.onStoreRemove = (/* _file, _store */) => {
|
|
14
|
+
module.exports.onStoreRemove = (/* _file, _store */) => {
|
|
14
15
|
// Do something...
|
|
15
16
|
};
|
package/src/bin/serve.ts
CHANGED
package/src/http/routes/cache.ts
CHANGED
|
@@ -7,7 +7,7 @@ export const cacheIndex = (req: Request, res: Response): void => {
|
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export const cacheClear = (req: Request, res: Response): void => {
|
|
10
|
-
const cacheBinId = req.params
|
|
10
|
+
const { cacheBinId } = req.params;
|
|
11
11
|
let done = false;
|
|
12
12
|
if (cache.has(cacheBinId)) {
|
|
13
13
|
cache.bin(cacheBinId).clear();
|
package/src/http/routes/data.ts
CHANGED
|
@@ -7,9 +7,8 @@ import { dataDirManager } from '../../lib/store/dataDir';
|
|
|
7
7
|
|
|
8
8
|
const data = (req: Request, res: Response): void => {
|
|
9
9
|
dataDirManager.update();
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
!storeKey || storeKey === '' ? null : storeKey.split('/');
|
|
10
|
+
const storeKeyParts = Array.from(req.params.storeKeyParts || []);
|
|
11
|
+
const storeKey = storeKeyParts.join('/');
|
|
13
12
|
|
|
14
13
|
const storeFile = store.data.get(storeKey);
|
|
15
14
|
|