@karpeleslab/klbfw 0.2.5 → 0.2.7
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/fw-wrapper.js +5 -2
- package/index.d.ts +3 -3
- package/package.json +1 -1
package/fw-wrapper.js
CHANGED
|
@@ -145,7 +145,10 @@ const getUrl = () => {
|
|
|
145
145
|
* Gets site static flag
|
|
146
146
|
* @returns {boolean} Whether site is static
|
|
147
147
|
*/
|
|
148
|
-
const getSiteStatic = () =>
|
|
148
|
+
const getSiteStatic = () => {
|
|
149
|
+
if (typeof FW === "undefined") return true;
|
|
150
|
+
return FW.site_static === undefined ? false : FW.site_static;
|
|
151
|
+
};
|
|
149
152
|
|
|
150
153
|
/**
|
|
151
154
|
* Gets the API prefix
|
|
@@ -245,4 +248,4 @@ module.exports.supported = supported;
|
|
|
245
248
|
module.exports.GET = getGET;
|
|
246
249
|
module.exports.Get = getParam;
|
|
247
250
|
module.exports.flushGet = flushGet;
|
|
248
|
-
module.exports.getMode = getMode;
|
|
251
|
+
module.exports.getMode = getMode;
|
package/index.d.ts
CHANGED
|
@@ -29,9 +29,9 @@ declare function hasCookie(name: string): boolean;
|
|
|
29
29
|
declare function setCookie(name: string, value: string, expires?: Date | number, path?: string, domain?: string, secure?: boolean): void;
|
|
30
30
|
|
|
31
31
|
// REST API types
|
|
32
|
-
declare function rest(name: string, verb: string, params?: Record<string, any
|
|
33
|
-
declare function rest_get(name: string, params?: Record<string, any>
|
|
34
|
-
declare function restGet(name: string, params?: Record<string, any>
|
|
32
|
+
declare function rest(name: string, verb: string, params?: Record<string, any>, context?: Record<string, any>): Promise<any>;
|
|
33
|
+
declare function rest_get(name: string, params?: Record<string, any>): Promise<any>; // Backward compatibility
|
|
34
|
+
declare function restGet(name: string, params?: Record<string, any>): Promise<any>;
|
|
35
35
|
|
|
36
36
|
// Upload module types
|
|
37
37
|
interface UploadOptions {
|