From 5f0be69bdf6915afbbb9dd60f04974a38f1bf71d Mon Sep 17 00:00:00 2001 From: Weronika K Date: Tue, 18 Jul 2023 13:20:15 +0200 Subject: [PATCH] fix: file-like import --- README.md | 4 ++-- src/__tests__/batch.test.ts | 2 +- src/__tests__/profile.test.ts | 2 +- src/__tests__/queries.test.ts | 2 +- src/__tests__/stack.test.ts | 3 ++- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c5f1e024..dbeeaf3d 100644 --- a/README.md +++ b/README.md @@ -674,7 +674,7 @@ do { example ```js -import { NodeJs } from "@akord/akord-js/lib/types/file"; +import { NodeJs } from "@akord/akord-js/lib/types/file-like"; const file = await NodeJs.File.fromPath("path to your file"); // create a stack with custom arweave tags @@ -731,7 +731,7 @@ const { transactionId } = await akord.stack.rename(stackId, "new name for your s example ```js -import { NodeJs } from "@akord/akord-js/lib/types/file"; +import { NodeJs } from "@akord/akord-js/lib/types/file-like"; const file = await NodeJs.File.fromPath("path to your file"); const { transactionId } = await akord.stack.uploadRevision(stackId, file); ``` diff --git a/src/__tests__/batch.test.ts b/src/__tests__/batch.test.ts index ce8513c4..2c836837 100644 --- a/src/__tests__/batch.test.ts +++ b/src/__tests__/batch.test.ts @@ -2,7 +2,7 @@ import { Akord } from "../index"; import faker from '@faker-js/faker'; import { initInstance, folderCreate, noteCreate, testDataPath, vaultCreate } from './common'; import { email, email2, email3, password } from './data/test-credentials'; -import { NodeJs } from "../types/file"; +import { NodeJs } from "../types/file-like"; import { firstFileName } from "./data/content"; let akord: Akord; diff --git a/src/__tests__/profile.test.ts b/src/__tests__/profile.test.ts index d011b96f..efea8474 100644 --- a/src/__tests__/profile.test.ts +++ b/src/__tests__/profile.test.ts @@ -2,7 +2,7 @@ import { Akord } from "../index"; import faker from '@faker-js/faker'; import { initInstance, testDataPath } from './common'; import { email, password } from './data/test-credentials'; -import { NodeJs } from "../types/file"; +import { NodeJs } from "../types/file-like"; import { firstFileName } from "./data/content"; let akord: Akord; diff --git a/src/__tests__/queries.test.ts b/src/__tests__/queries.test.ts index cdc3c2b9..41493401 100644 --- a/src/__tests__/queries.test.ts +++ b/src/__tests__/queries.test.ts @@ -1,7 +1,7 @@ import { Akord, Auth } from "../index"; import { email, password } from './data/test-credentials'; import { vaults, fileId, message, publicVaultId, privateVaultId, parentId } from './data/content'; -import { NodeJs } from "../types/file"; +import { NodeJs } from "../types/file-like"; let privateClient: Akord; let publicClient: Akord; diff --git a/src/__tests__/stack.test.ts b/src/__tests__/stack.test.ts index b6572a19..ba673f91 100644 --- a/src/__tests__/stack.test.ts +++ b/src/__tests__/stack.test.ts @@ -2,7 +2,8 @@ import { Akord } from "../index"; import faker from '@faker-js/faker'; import { initInstance, testDataPath, vaultCreate } from './common'; import { email, password } from './data/test-credentials'; -import { NodeJs, StorageClass } from "../types/file"; +import { StorageClass } from "../types/file"; +import { NodeJs } from "../types/file-like"; import { getTxData } from "../arweave"; import { firstFileName, secondFileName, arweaveImportFileTx } from './data/content';