Fixing issue with object store functions not being mockable in the server.
This commit is contained in:
parent
ac89e5c713
commit
d517ca1ac9
|
@ -4,7 +4,7 @@ const send = require("koa-send")
|
|||
const { resolve, join } = require("../../../utilities/centralPath")
|
||||
const fetch = require("node-fetch")
|
||||
const uuid = require("uuid")
|
||||
const { ObjectStoreBuckets } = require("@budibase/auth").objectStore
|
||||
const { ObjectStoreBuckets } = require("../../../constants")
|
||||
const { prepareUpload } = require("../deploy/utils")
|
||||
const { processString } = require("@budibase/string-templates")
|
||||
const { budibaseTempDir } = require("../../../utilities/budibaseDir")
|
||||
|
|
|
@ -12,7 +12,7 @@ const {
|
|||
streamUpload,
|
||||
deleteFolder,
|
||||
downloadTarball,
|
||||
} = require("@budibase/auth").objectStore
|
||||
} = require("./utilities")
|
||||
const { downloadLibraries, newAppPublicPath } = require("./newApp")
|
||||
const download = require("download")
|
||||
const env = require("../../environment")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const packageJson = require("../../../package.json")
|
||||
const { join } = require("path")
|
||||
const { ObjectStoreBuckets } = require("../../constants")
|
||||
const { streamUpload, downloadTarball } = require("@budibase/auth").objectStore
|
||||
const { streamUpload, downloadTarball } = require("./utilities")
|
||||
const fs = require("fs")
|
||||
|
||||
const BUCKET_NAME = ObjectStoreBuckets.APPS
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
const {
|
||||
ObjectStore,
|
||||
makeSureBucketExists,
|
||||
upload,
|
||||
streamUpload,
|
||||
retrieve,
|
||||
retrieveToTmp,
|
||||
deleteFolder,
|
||||
uploadDirectory,
|
||||
downloadTarball,
|
||||
} = require("@budibase/auth").objectStore
|
||||
|
||||
/***********************************
|
||||
* NOTE *
|
||||
* This file purely exists so that *
|
||||
* the object store functionality *
|
||||
* can easily be mocked out of *
|
||||
* the server without mocking the *
|
||||
* entire core library. *
|
||||
***********************************/
|
||||
|
||||
exports.ObjectStore = ObjectStore
|
||||
exports.makeSureBucketExists = makeSureBucketExists
|
||||
exports.upload = upload
|
||||
exports.streamUpload = streamUpload
|
||||
exports.retrieve = retrieve
|
||||
exports.retrieveToTmp = retrieveToTmp
|
||||
exports.deleteFolder = deleteFolder
|
||||
exports.uploadDirectory = uploadDirectory
|
||||
exports.downloadTarball = downloadTarball
|
Loading…
Reference in New Issue