@jam-comments/server-utilities 5.9.0 → 5.9.1

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.
@@ -46,6 +46,7 @@ async function fetchAll({ tz = undefined, dateFormat = undefined, domain, apiKey
46
46
  store_1.default.clear();
47
47
  throw error;
48
48
  }
49
+ return store_1.default.store;
49
50
  }
50
51
  function batchMarkupFetcher(platform, fetchImplementation = fetch) {
51
52
  return async ({ tz, copy, domain, apiKey, dateFormat, baseUrl = BASE_URL, environment = (0, utils_1.getEnvironment)(), page = 1, }) => {
package/dist/cjs/store.js CHANGED
@@ -28,5 +28,8 @@ const store = {
28
28
  toPathKey(path) {
29
29
  return path.replace(/^\//, "").replace(/\//g, "::");
30
30
  },
31
+ get store() {
32
+ return STORE;
33
+ },
31
34
  };
32
35
  exports.default = store;
@@ -36,6 +36,7 @@ export async function fetchAll({ tz = undefined, dateFormat = undefined, domain,
36
36
  store.clear();
37
37
  throw error;
38
38
  }
39
+ return store.store;
39
40
  }
40
41
  export function batchMarkupFetcher(platform, fetchImplementation = fetch) {
41
42
  return async ({ tz, copy, domain, apiKey, dateFormat, baseUrl = BASE_URL, environment = getEnvironment(), page = 1, }) => {
package/dist/esm/store.js CHANGED
@@ -26,5 +26,8 @@ const store = {
26
26
  toPathKey(path) {
27
27
  return path.replace(/^\//, "").replace(/\//g, "::");
28
28
  },
29
+ get store() {
30
+ return STORE;
31
+ },
29
32
  };
30
33
  export default store;
@@ -48,7 +48,7 @@ interface IBatchResponse {
48
48
  total: number;
49
49
  };
50
50
  }
51
- export declare function fetchAll({ tz, dateFormat, domain, apiKey, baseUrl, environment, copy, }: IBatchFetchData, platform: string, fetchImplementation?: any, batchMarkupFetcherImpl?: any): Promise<void>;
51
+ export declare function fetchAll({ tz, dateFormat, domain, apiKey, baseUrl, environment, copy, }: IBatchFetchData, platform: string, fetchImplementation?: any, batchMarkupFetcherImpl?: any): Promise<Map<string, string>>;
52
52
  export declare function batchMarkupFetcher(platform: string, fetchImplementation?: typeof fetch): (args: IBatchFetchData) => Promise<IBatchResponse>;
53
53
  export declare function fetchFreshMarkup({ tz, path, copy, domain, apiKey, dateFormat, baseUrl, environment, }: IFetchData, fetchImplementation: typeof fetch, platform: string): Promise<string>;
54
54
  export declare function makeMarkupRequest<T extends Partial<IBatchFetchData & IFetchData>>({ tz, path, page, domain, apiKey, dateFormat, copy, baseUrl, environment, }: T, baseServicePath: string, fetchImplementation: typeof fetch, platform: string): Promise<Response>;
@@ -6,5 +6,6 @@ declare const store: {
6
6
  clear(): void;
7
7
  getEmptyMarkup(): any;
8
8
  toPathKey(path: string): string;
9
+ readonly store: any;
9
10
  };
10
11
  export default store;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jam-comments/server-utilities",
3
- "version": "5.9.0",
3
+ "version": "5.9.1",
4
4
  "description": "Various JavaScript utilities for JamComments.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",