@static-suite/static-suite-data-server 1.0.1 → 1.0.2
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/lib/store/include/includeParser.d.ts.map +1 -1
- package/dist/lib/store/storeManager.d.ts.map +1 -1
- package/dist/lib/store/storeManager.js +3 -2
- package/dist/lib/tsdoc-metadata.json +1 -1
- package/package.json +2 -2
- package/src/lib/store/include/includeParser.ts +0 -1
- package/src/lib/store/storeManager.ts +3 -2
- package/tsconfig.json +8 -24
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"includeParser.d.ts","sourceRoot":"","sources":["../../../../src/lib/store/include/includeParser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"includeParser.d.ts","sourceRoot":"","sources":["../../../../src/lib/store/include/includeParser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAUtD,eAAO,MAAM,aAAa,EAAE,aAyC3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storeManager.d.ts","sourceRoot":"","sources":["../../../src/lib/store/storeManager.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"storeManager.d.ts","sourceRoot":"","sources":["../../../src/lib/store/storeManager.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAgI7C,eAAO,MAAM,YAAY,EAAE,YAmG1B,CAAC"}
|
|
@@ -25,6 +25,7 @@ const setFileIntoStore = (relativeFilepath) => {
|
|
|
25
25
|
relativeFilepath,
|
|
26
26
|
fileContent,
|
|
27
27
|
});
|
|
28
|
+
// Used to return the contents of the previously stored file
|
|
28
29
|
let previousStoredData = null;
|
|
29
30
|
const dataToStore = fileContent.json || fileContent.raw;
|
|
30
31
|
const currentData = _1.store.data.get(relativeFilepath);
|
|
@@ -80,12 +81,12 @@ const setFileIntoStore = (relativeFilepath) => {
|
|
|
80
81
|
if (uuid && langcode) {
|
|
81
82
|
const langcodeMap = _1.store.index.uuid.get(langcode) ||
|
|
82
83
|
_1.store.index.uuid.set(langcode, new Map()).get(langcode);
|
|
83
|
-
langcodeMap.set(uuid, dataToStore);
|
|
84
|
+
langcodeMap.set(uuid, skipUpdating ? currentData : dataToStore);
|
|
84
85
|
}
|
|
85
86
|
// Add data to URL index.
|
|
86
87
|
const url = dataToStore.data?.content?.url?.path;
|
|
87
88
|
if (url) {
|
|
88
|
-
_1.store.index.url.set(url, dataToStore);
|
|
89
|
+
_1.store.index.url.set(url, skipUpdating ? currentData : dataToStore);
|
|
89
90
|
}
|
|
90
91
|
// Add include dependencies.
|
|
91
92
|
dependencyFileHelper_1.dependencyIncludeHelper.addIncludeDependencies(relativeFilepath, dataToStore);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@static-suite/static-suite-data-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
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",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"pug": "^3.0.3",
|
|
28
28
|
"simple-datatables": "^10.0.0",
|
|
29
29
|
"tsc-watch": "^7.1.1",
|
|
30
|
-
"typescript": "^
|
|
30
|
+
"typescript": "^6.0.2",
|
|
31
31
|
"winston": "^3.8.2",
|
|
32
32
|
"yargs": "^18.0.0"
|
|
33
33
|
},
|
|
@@ -32,6 +32,7 @@ const setFileIntoStore = (
|
|
|
32
32
|
fileContent,
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
+
// Used to return the contents of the previously stored file
|
|
35
36
|
let previousStoredData: any = null;
|
|
36
37
|
|
|
37
38
|
const dataToStore = fileContent.json || fileContent.raw;
|
|
@@ -99,13 +100,13 @@ const setFileIntoStore = (
|
|
|
99
100
|
const langcodeMap =
|
|
100
101
|
store.index.uuid.get(langcode) ||
|
|
101
102
|
store.index.uuid.set(langcode, new Map<string, any>()).get(langcode);
|
|
102
|
-
langcodeMap.set(uuid, dataToStore);
|
|
103
|
+
langcodeMap.set(uuid, skipUpdating ? currentData : dataToStore);
|
|
103
104
|
}
|
|
104
105
|
|
|
105
106
|
// Add data to URL index.
|
|
106
107
|
const url = dataToStore.data?.content?.url?.path;
|
|
107
108
|
if (url) {
|
|
108
|
-
store.index.url.set(url, dataToStore);
|
|
109
|
+
store.index.url.set(url, skipUpdating ? currentData : dataToStore);
|
|
109
110
|
}
|
|
110
111
|
|
|
111
112
|
// Add include dependencies.
|
package/tsconfig.json
CHANGED
|
@@ -25,35 +25,19 @@
|
|
|
25
25
|
// "removeComments": true, /* Do not emit comments to output. */
|
|
26
26
|
// "noEmit": true, /* Do not emit outputs. */
|
|
27
27
|
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
|
28
|
-
"downlevelIteration": true /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */,
|
|
28
|
+
// "downlevelIteration": true /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */,
|
|
29
29
|
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
|
30
30
|
|
|
31
31
|
/* Strict Type-Checking Options */
|
|
32
32
|
"strict": true /* Enable all strict type-checking options. */,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
|
37
|
-
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
|
38
|
-
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
|
39
|
-
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
|
40
|
-
|
|
41
|
-
/* Additional Checks */
|
|
42
|
-
// "noUnusedLocals": true, /* Report errors on unused locals. */
|
|
43
|
-
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
|
44
|
-
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
|
45
|
-
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
46
|
-
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
|
|
47
|
-
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an 'override' modifier. */
|
|
48
|
-
// "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */
|
|
49
|
-
|
|
50
|
-
/* Module Resolution Options */
|
|
51
|
-
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
|
52
|
-
"baseUrl": "./src" /* Base directory to resolve non-absolute module names. */,
|
|
53
|
-
"paths": {} /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
|
|
33
|
+
"paths": {
|
|
34
|
+
"*": ["./src/*"]
|
|
35
|
+
} /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
|
|
54
36
|
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
|
55
37
|
// "typeRoots": [], /* List of folders to include type definitions from. */
|
|
56
|
-
|
|
38
|
+
"types": [
|
|
39
|
+
"jest"
|
|
40
|
+
] /* Type declaration files to be included in compilation. */,
|
|
57
41
|
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
|
58
42
|
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
|
|
59
43
|
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
|
@@ -74,5 +58,5 @@
|
|
|
74
58
|
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
|
|
75
59
|
},
|
|
76
60
|
"include": ["src"]
|
|
77
|
-
//
|
|
61
|
+
//"exclude": ["mocks", "**/__tests__/*", "**/*.test.ts"]
|
|
78
62
|
}
|