Quick fix and making sure CSS temp files in app directory don't get uploaded.

This commit is contained in:
mike12345567 2020-12-02 18:07:17 +00:00
parent 4319c4bb3f
commit c0ccf67283
2 changed files with 11 additions and 2 deletions

View File

@ -7,6 +7,8 @@ const { budibaseAppsDir } = require("../../../utilities/budibaseDir")
const PouchDB = require("../../../db")
const env = require("../../../environment")
const EXCLUDED_DIRECTORIES = ["css"]
/**
* Finalises the deployment, updating the quota for the user API key
* The verification process returns the levels to update to.
@ -140,10 +142,17 @@ exports.uploadAppAssets = async function({ appId, bucket, accountId }) {
// Upload HTML, CSS and JS of the web app
walkDir(appAssetsPath, function(filePath) {
const filePathParts = filePath.split("/")
const publicIndex = filePathParts.indexOf("public")
const directory = filePathParts[publicIndex + 1]
// don't include these top level directories
if (EXCLUDED_DIRECTORIES.indexOf(directory) !== -1) {
return
}
const appAssetUpload = prepareUploadForS3({
file: {
path: filePath,
name: [...filePath.split("/")].pop(),
name: filePathParts.pop(),
},
s3Key: filePath.replace(appAssetsPath, `assets/${appId}`),
s3,

View File

@ -123,7 +123,7 @@ exports.LOGIN_SCREEN = {
},
routing: {
route: "/",
accessLevelId: BUILTIN_LEVEL_IDS.PUBLIC,
accessLevelId: BUILTIN_ROLE_IDS.PUBLIC,
},
name: "login-screen",
}