mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 11:47:54 +01:00
fs: make imports esm compatible
This commit is contained in:
@@ -17,10 +17,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import FileStreamSource from "./filestreamsource";
|
||||
import { IFileStorage } from "./interfaces";
|
||||
import { File } from "./types";
|
||||
import { chunkPrefix } from "./utils";
|
||||
import FileStreamSource from "./filestreamsource.js";
|
||||
import { IFileStorage } from "./interfaces.js";
|
||||
import { File } from "./types.js";
|
||||
import { chunkPrefix } from "./utils.js";
|
||||
|
||||
export default class FileHandle {
|
||||
constructor(
|
||||
|
||||
@@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { File } from "./types";
|
||||
import { IFileStorage } from "./interfaces";
|
||||
import { File } from "./types.js";
|
||||
import { IFileStorage } from "./interfaces.js";
|
||||
|
||||
export default class FileStreamSource {
|
||||
private index = 0;
|
||||
|
||||
@@ -17,10 +17,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import FileHandle from "./src/filehandle";
|
||||
import { IFileStorage, IStreamableFS } from "./src/interfaces";
|
||||
import { File } from "./src/types";
|
||||
import { chunkPrefix } from "./src/utils";
|
||||
import FileHandle from "./filehandle.js";
|
||||
import { IFileStorage, IStreamableFS } from "./interfaces.js";
|
||||
import { File } from "./types.js";
|
||||
import { chunkPrefix } from "./utils.js";
|
||||
|
||||
export class StreamableFS implements IStreamableFS {
|
||||
/**
|
||||
@@ -81,3 +81,5 @@ export class StreamableFS implements IStreamableFS {
|
||||
await this.storage.clear();
|
||||
}
|
||||
}
|
||||
|
||||
export type { IFileStorage, File, FileHandle };
|
||||
@@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import FileHandle from "./filehandle";
|
||||
import { File } from "./types";
|
||||
import FileHandle from "./filehandle.js";
|
||||
import { File } from "./types.js";
|
||||
|
||||
export interface IStreamableFS {
|
||||
createFile(
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
"lib": ["DOM", "ESNext"],
|
||||
"outDir": "./dist"
|
||||
},
|
||||
"include": ["./index.ts", "./src/"]
|
||||
"include": ["./src/"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user