@jam-comments/server-utilities 4.3.0 → 4.3.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.
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.markupFetcher = exports.makeMarkupRequest = exports.fetchFreshMarkup = exports.batchMarkupFetcher = exports.fetchAll = void 0;
4
4
  const injectSchema_1 = require("./injectSchema");
5
5
  const utils_1 = require("./utils");
6
- async function fetchAll({ tz = undefined, domain, apiKey, baseUrl = "https://go.jamcomments.com", environment = (0, utils_1.getEnvironment)(), }, platform, fetchImplementation, batchMarkupFetcherImpl = batchMarkupFetcher) {
6
+ async function fetchAll({ tz = undefined, domain, apiKey, baseUrl = "https://go.jamcomments.com", environment = (0, utils_1.getEnvironment)(), }, platform, fetchImplementation = fetch, batchMarkupFetcherImpl = batchMarkupFetcher) {
7
7
  const fetchBatchMarkup = batchMarkupFetcherImpl(platform, fetchImplementation);
8
8
  (0, utils_1.createTempDirectory)();
9
9
  let shouldKeepFetching = true;
@@ -1,6 +1,6 @@
1
1
  import { injectSchema } from "./injectSchema";
2
2
  import { createTempDirectory, deleteTempDirectory, getEnvironment, isValidTimezone, parseJson, readFile, saveFile, } from "./utils";
3
- export async function fetchAll({ tz = undefined, domain, apiKey, baseUrl = "https://go.jamcomments.com", environment = getEnvironment(), }, platform, fetchImplementation, batchMarkupFetcherImpl = batchMarkupFetcher) {
3
+ export async function fetchAll({ tz = undefined, domain, apiKey, baseUrl = "https://go.jamcomments.com", environment = getEnvironment(), }, platform, fetchImplementation = fetch, batchMarkupFetcherImpl = batchMarkupFetcher) {
4
4
  const fetchBatchMarkup = batchMarkupFetcherImpl(platform, fetchImplementation);
5
5
  createTempDirectory();
6
6
  let shouldKeepFetching = true;
@@ -25,7 +25,7 @@ interface IBatchResponse {
25
25
  total: number;
26
26
  };
27
27
  }
28
- export declare function fetchAll({ tz, domain, apiKey, baseUrl, environment, }: IBatchFetchData, platform: string, fetchImplementation: any, batchMarkupFetcherImpl?: any): Promise<void>;
28
+ export declare function fetchAll({ tz, domain, apiKey, baseUrl, environment, }: IBatchFetchData, platform: string, fetchImplementation?: any, batchMarkupFetcherImpl?: any): Promise<void>;
29
29
  export declare function batchMarkupFetcher(platform: string, fetchImplementation?: typeof fetch): (args: IBatchFetchData) => Promise<IBatchResponse>;
30
30
  export declare function fetchFreshMarkup({ tz, path, domain, apiKey, baseUrl, environment, }: IFetchData, fetchImplementation: typeof fetch, platform: string): Promise<string>;
31
31
  export declare function makeMarkupRequest<T extends Partial<IBatchFetchData & IFetchData>>({ tz, path, domain, apiKey, baseUrl, environment, page, }: T, baseServicePath: string, fetchImplementation: typeof fetch, platform: string): Promise<Response>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jam-comments/server-utilities",
3
- "version": "4.3.0",
3
+ "version": "4.3.1",
4
4
  "description": "Various JavaScript utilities for JamComments.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/types/index.d.ts",