Removing deprecated function - exists.
This commit is contained in:
parent
407d7606e9
commit
3fd5e7e578
|
@ -3,7 +3,7 @@ const ClientDb = require("../../db/clientDb")
|
||||||
const { getPackageForBuilder, buildPage } = require("../../utilities/builder")
|
const { getPackageForBuilder, buildPage } = require("../../utilities/builder")
|
||||||
const env = require("../../environment")
|
const env = require("../../environment")
|
||||||
const instanceController = require("./instance")
|
const instanceController = require("./instance")
|
||||||
const { copy, exists, readFile, writeFile } = require("fs-extra")
|
const { copy, existsSync, readFile, writeFile } = require("fs-extra")
|
||||||
const { budibaseAppsDir } = require("../../utilities/budibaseDir")
|
const { budibaseAppsDir } = require("../../utilities/budibaseDir")
|
||||||
const sqrl = require("squirrelly")
|
const sqrl = require("squirrelly")
|
||||||
const setBuilderToken = require("../../utilities/builder/setBuilderToken")
|
const setBuilderToken = require("../../utilities/builder/setBuilderToken")
|
||||||
|
@ -143,7 +143,7 @@ const createEmptyAppPackage = async (ctx, app) => {
|
||||||
const appsFolder = budibaseAppsDir()
|
const appsFolder = budibaseAppsDir()
|
||||||
const newAppFolder = resolve(appsFolder, app._id)
|
const newAppFolder = resolve(appsFolder, app._id)
|
||||||
|
|
||||||
if (await exists(newAppFolder)) {
|
if (existsSync(newAppFolder)) {
|
||||||
ctx.throw(400, "App folder already exists for this application")
|
ctx.throw(400, "App folder already exists for this application")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const { exists, readFile, writeFile, ensureDir } = require("fs-extra")
|
const { existsSync, readFile, writeFile, ensureDir } = require("fs-extra")
|
||||||
const { join, resolve } = require("./centralPath")
|
const { join, resolve } = require("./centralPath")
|
||||||
const Sqrl = require("squirrelly")
|
const Sqrl = require("squirrelly")
|
||||||
const uuid = require("uuid")
|
const uuid = require("uuid")
|
||||||
|
@ -28,7 +28,7 @@ const setCouchDbUrl = async opts => {
|
||||||
|
|
||||||
const createDevEnvFile = async opts => {
|
const createDevEnvFile = async opts => {
|
||||||
const destConfigFile = join(opts.dir, "./.env")
|
const destConfigFile = join(opts.dir, "./.env")
|
||||||
let createConfig = !(await exists(destConfigFile)) || opts.quiet
|
let createConfig = !existsSync(destConfigFile) || opts.quiet
|
||||||
if (createConfig) {
|
if (createConfig) {
|
||||||
const template = await readFile(
|
const template = await readFile(
|
||||||
resolve(__dirname, "..", "..", ".env.template"),
|
resolve(__dirname, "..", "..", ".env.template"),
|
||||||
|
|
Loading…
Reference in New Issue