Skip to content

Commit 3dd651b

Browse files
committed
Remove barrel file imports from custom hook code
1 parent 1d10591 commit 3dd651b

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

src/hooks/custom/HttpsCheckHook.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { BASE_HOSTNAME_REGEX, BASE_PROTOCOL } from "./common";
2-
import { SDKInitHook, SDKInitOptions } from "../types";
1+
import { BASE_HOSTNAME_REGEX, BASE_PROTOCOL } from "./common.js";
2+
import { SDKInitHook, SDKInitOptions } from "../types.js";
33

44
/**
55
* Represents a hook that performs base host HTTPS check during SDK initialization.

src/hooks/custom/LoggerHook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AfterErrorContext, AfterErrorHook, AfterSuccessContext, AfterSuccessHook } from "../types";
1+
import { AfterErrorContext, AfterErrorHook, AfterSuccessContext, AfterSuccessHook } from "../types.js";
22

33
/**
44
* Represents a hook that logs status and information that the request will be retried

src/hooks/custom/SplitPdfHook.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import async from "async";
22

3-
import { HTTPClient } from "../../lib/http";
3+
import { HTTPClient } from "../../lib/http.js";
44
import {
55
AfterErrorContext,
66
AfterErrorHook,
@@ -10,7 +10,7 @@ import {
1010
BeforeRequestHook,
1111
SDKInitHook,
1212
SDKInitOptions,
13-
} from "../types";
13+
} from "../types.js";
1414
import {
1515
getOptimalSplitSize,
1616
getSplitPdfConcurrencyLevel,
@@ -22,12 +22,12 @@ import {
2222
prepareResponseHeaders,
2323
splitPdf,
2424
stringToBoolean,
25-
} from "./utils/index";
25+
} from "./utils/index.js";
2626
import {
2727
MIN_PAGES_PER_THREAD,
2828
PARTITION_FORM_FILES_KEY,
2929
PARTITION_FORM_SPLIT_PDF_PAGE_KEY,
30-
} from "./common";
30+
} from "./common.js";
3131

3232
/**
3333
* Represents a hook for splitting and sending PDF files as per page requests.

src/hooks/custom/utils/form.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
MAX_NUMBER_OF_PARALLEL_REQUESTS,
55
PARTITION_FORM_SPLIT_PDF_CONCURRENCY_LEVEL,
66
PARTITION_FORM_STARTING_PAGE_NUMBER_KEY,
7-
} from "../common";
7+
} from "../common.js";
88

99
/**
1010
* Retrieves an integer parameter from the given form data.

src/hooks/custom/utils/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export * from "./form";
2-
export * from "./general";
3-
export * from "./pdf";
4-
export * from "./request";
1+
export * from "./form.js";
2+
export * from "./general.js";
3+
export * from "./pdf.js";
4+
export * from "./request.js";

src/hooks/custom/utils/pdf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { PDFDocument } from "pdf-lib";
22

3-
import { MAX_PAGES_PER_THREAD, MIN_PAGES_PER_THREAD } from "../common";
3+
import { MAX_PAGES_PER_THREAD, MIN_PAGES_PER_THREAD } from "../common.js";
44

55
interface PdfSplit {
66
content: Blob;

src/hooks/custom/utils/request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
PARTITION_FORM_FILES_KEY,
33
PARTITION_FORM_SPLIT_PDF_PAGE_KEY,
44
PARTITION_FORM_STARTING_PAGE_NUMBER_KEY,
5-
} from "../common";
5+
} from "../common.js";
66

77
/**
88
* Removes the "content-length" header from the passed response headers.

src/hooks/registration.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Hooks } from "./types";
22

3-
import { LoggerHook } from "./custom/LoggerHook";
4-
import { SplitPdfHook } from "./custom/SplitPdfHook";
5-
import { HttpsCheckHook } from "./custom/HttpsCheckHook";
3+
import { LoggerHook } from "./custom/LoggerHook.js";
4+
import { SplitPdfHook } from "./custom/SplitPdfHook.js";
5+
import { HttpsCheckHook } from "./custom/HttpsCheckHook.js";
66

77
/*
88
* This file is only ever generated once on the first generation and then is free to be modified.

0 commit comments

Comments
 (0)