mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Merge pull request #29948 from overleaf/ar/docstore-conversion-to-esm
[docstore] conversion to esm GitOrigin-RevId: 9d255047bd7ae25f2b0b38f3a721741e8a0b7ad8
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
let DocstoreClient
|
||||
const {
|
||||
import {
|
||||
fetchNothing,
|
||||
fetchJson,
|
||||
fetchJsonWithResponse,
|
||||
} = require('@overleaf/fetch-utils')
|
||||
const settings = require('@overleaf/settings')
|
||||
const Persistor = require('../../../../app/js/PersistorManager')
|
||||
} from '@overleaf/fetch-utils'
|
||||
import settings from '@overleaf/settings'
|
||||
import Persistor from '../../../../app/js/PersistorManager.js'
|
||||
|
||||
let DocstoreClient
|
||||
|
||||
async function streamToString(stream) {
|
||||
const chunks = []
|
||||
@@ -22,7 +23,7 @@ async function getStringFromPersistor(persistor, bucket, key) {
|
||||
return await streamToString(stream)
|
||||
}
|
||||
|
||||
module.exports = DocstoreClient = {
|
||||
export default DocstoreClient = {
|
||||
async createDoc(projectId, docId, lines, version, ranges) {
|
||||
return await DocstoreClient.updateDoc(
|
||||
projectId,
|
||||
|
||||
Reference in New Issue
Block a user