diff --git a/.presetterrc.json b/.presetterrc.json index 9857885..1dc1e4b 100644 --- a/.presetterrc.json +++ b/.presetterrc.json @@ -5,7 +5,6 @@ "config": { "tsconfig": { "compilerOptions": { - "allowImportingTsExtensions": true, "module": "nodenext" } } diff --git a/src/client.ts b/src/client.ts index 6e89b42..514eede 100644 --- a/src/client.ts +++ b/src/client.ts @@ -14,9 +14,9 @@ import { uploadSmallFileRequest, uploadLargeFileRequest, } from "./upload.ts"; -import { downloadFile, getCidUrl, getMetadata } from "./download.ts"; +import { downloadFile, getCidUrl, getMetadata } from "./download.js"; -import { defaultPortalUrl, ensureUrl } from "./utils/url.ts"; +import { defaultPortalUrl, ensureUrl } from "./utils/url.js"; import { buildRequestHeaders, diff --git a/src/download.ts b/src/download.ts index 2d477cb..eb8b17e 100644 --- a/src/download.ts +++ b/src/download.ts @@ -1,7 +1,7 @@ import { ResponseType } from "axios"; -import { S5Client } from "./client.ts"; -import { BaseCustomOptions, DEFAULT_BASE_OPTIONS } from "./utils/options.ts"; +import { S5Client } from "./client.js"; +import { BaseCustomOptions, DEFAULT_BASE_OPTIONS } from "./utils/options.js"; import path from "path"; /** diff --git a/src/index.ts b/src/index.ts index f98cbef..329b04d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1 +1 @@ -export { S5Client } from "./client.ts"; +export { S5Client } from "./client.js"; diff --git a/src/request.ts b/src/request.ts index 58582a5..cccd790 100644 --- a/src/request.ts +++ b/src/request.ts @@ -1,12 +1,12 @@ import { AxiosError, AxiosResponse, InternalAxiosRequestConfig } from "axios"; -import { S5Client } from "./client.ts"; +import { S5Client } from "./client.js"; import { addUrlQuery, addUrlSubdomain, ensureUrlPrefix, makeUrl, -} from "./utils/url.ts"; +} from "./utils/url.js"; export type Headers = { [key: string]: string }; diff --git a/src/upload.ts b/src/upload.ts index 576d82b..9bcfbee 100644 --- a/src/upload.ts +++ b/src/upload.ts @@ -4,11 +4,11 @@ import { DetailedError, HttpRequest, Upload } from "tus-js-client"; import { blake3 } from "@noble/hashes/blake3"; import { Buffer } from "buffer"; -import { getFileMimeType } from "./utils/file.ts"; -import { BaseCustomOptions, DEFAULT_BASE_OPTIONS } from "./utils/options.ts"; -import { S5Client } from "./client.ts"; -import type { JsonData } from "./utils/types.ts"; -import { buildRequestHeaders, buildRequestUrl } from "./request.ts"; +import { getFileMimeType } from "./utils/file.js"; +import { BaseCustomOptions, DEFAULT_BASE_OPTIONS } from "./utils/options.js"; +import { S5Client } from "./client.js"; +import type { JsonData } from "./utils/types.js"; +import { buildRequestHeaders, buildRequestUrl } from "./request.js"; import { CID_HASH_TYPES, CID_TYPES } from "@lumeweb/libs5"; /**