Browse Source
Merge pull request #1547 from Budibase/fix/minio
remove public folder concept, upload client lib directly
gh-pages
Martin McKeaveney
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
11 additions and
12 deletions
-
packages/builder/src/pages/builder/auth/_components/GoogleButton.svelte
-
packages/server/src/utilities/fileSystem/index.js
-
packages/server/src/utilities/fileSystem/newApp.js
|
|
|
@ -10,13 +10,13 @@ |
|
|
|
</script> |
|
|
|
|
|
|
|
{#if show} |
|
|
|
<ActionButton> |
|
|
|
<a target="_blank" href="/api/admin/auth/google"> |
|
|
|
<div class="inner"> |
|
|
|
<img src={GoogleLogo} alt="google icon" /> |
|
|
|
<p>Sign in with Google</p> |
|
|
|
</div> |
|
|
|
</a> |
|
|
|
<ActionButton |
|
|
|
on:click={() => window.open("/api/admin/auth/google", "_blank")} |
|
|
|
> |
|
|
|
<div class="inner"> |
|
|
|
<img src={GoogleLogo} alt="google icon" /> |
|
|
|
<p>Sign in with Google</p> |
|
|
|
</div> |
|
|
|
</ActionButton> |
|
|
|
{/if} |
|
|
|
|
|
|
|
|
|
|
|
@ -13,7 +13,7 @@ const { |
|
|
|
deleteFolder, |
|
|
|
downloadTarball, |
|
|
|
} = require("./utilities") |
|
|
|
const { downloadLibraries, newAppPublicPath } = require("./newApp") |
|
|
|
const { downloadLibraries, uploadClientLibrary } = require("./newApp") |
|
|
|
const download = require("download") |
|
|
|
const env = require("../../environment") |
|
|
|
const { homedir } = require("os") |
|
|
|
@ -134,7 +134,7 @@ exports.performBackup = async (appId, backupName) => { |
|
|
|
*/ |
|
|
|
exports.createApp = async appId => { |
|
|
|
await downloadLibraries(appId) |
|
|
|
await newAppPublicPath(appId) |
|
|
|
await uploadClientLibrary(appId) |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
@ -26,10 +26,9 @@ exports.downloadLibraries = async appId => { |
|
|
|
return paths |
|
|
|
} |
|
|
|
|
|
|
|
exports.newAppPublicPath = async appId => { |
|
|
|
const path = join(appId, "public") |
|
|
|
exports.uploadClientLibrary = async appId => { |
|
|
|
const sourcepath = require.resolve("@budibase/client") |
|
|
|
const destPath = join(path, "budibase-client.js") |
|
|
|
const destPath = join(appId, "budibase-client.js") |
|
|
|
|
|
|
|
await streamUpload(BUCKET_NAME, destPath, fs.createReadStream(sourcepath)) |
|
|
|
} |
|
|
|
|