Skip to content

Commit

Permalink
fix: duplicate api definition (#2522)
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-jan committed Mar 28, 2024
1 parent 75eea1f commit 3b3eb11
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 30 deletions.
2 changes: 0 additions & 2 deletions core/src/browser/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ const readdirSync = (...args: any[]) => globalThis.core.api?.readdirSync(...args
*/
const mkdir = (...args: any[]) => globalThis.core.api?.mkdir(...args)

const mkdir = (...args: any[]) => global.core.api?.mkdir(...args)

/**
* Removes a directory at the specified path.
* @returns {Promise<any>} A Promise that resolves when the directory is removed successfully.
Expand Down
24 changes: 0 additions & 24 deletions core/src/node/api/processors/fsExt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,28 +88,4 @@ export class FSExt implements Processor {
})
})
}

mkdir(path: string): Promise<void> {
return new Promise((resolve, reject) => {
fs.mkdir(path, { recursive: true }, (err) => {
if (err) {
reject(err)
} else {
resolve()
}
})
})
}

rmdir(path: string): Promise<void> {
return new Promise((resolve, reject) => {
fs.rm(path, { recursive: true }, (err) => {
if (err) {
reject(err)
} else {
resolve()
}
})
})
}
}
2 changes: 0 additions & 2 deletions core/src/types/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ export enum FileManagerRoute {
getUserHomePath = 'getUserHomePath',
fileStat = 'fileStat',
writeBlob = 'writeBlob',
mkdir = 'mkdir',
rm = 'rm',
}

export type ApiFunction = (...args: any[]) => any
Expand Down
2 changes: 0 additions & 2 deletions extensions/tensorrt-llm-extension/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import {
PromptTemplate,
} from '@janhq/core/node'
import decompress from 'decompress'
import { SystemInformation } from '@janhq/core'
import { PromptTemplate } from '@janhq/core'

// Polyfill fetch with retry
const fetchRetry = fetchRT(fetch)
Expand Down

0 comments on commit 3b3eb11

Please sign in to comment.