remove public folder concept, upload client lib directly
This commit is contained in:
parent
40abd4fe3d
commit
1b920a2f16
|
@ -10,13 +10,13 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if show}
|
{#if show}
|
||||||
<ActionButton>
|
<ActionButton
|
||||||
<a target="_blank" href="/api/admin/auth/google">
|
on:click={() => window.open("/api/admin/auth/google", "_blank")}
|
||||||
<div class="inner">
|
>
|
||||||
<img src={GoogleLogo} alt="google icon" />
|
<div class="inner">
|
||||||
<p>Sign in with Google</p>
|
<img src={GoogleLogo} alt="google icon" />
|
||||||
</div>
|
<p>Sign in with Google</p>
|
||||||
</a>
|
</div>
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,9 @@ const {
|
||||||
streamUpload,
|
streamUpload,
|
||||||
deleteFolder,
|
deleteFolder,
|
||||||
downloadTarball,
|
downloadTarball,
|
||||||
|
uploadDirectory,
|
||||||
} = require("./utilities")
|
} = require("./utilities")
|
||||||
const { downloadLibraries, newAppPublicPath } = require("./newApp")
|
const { downloadLibraries, uploadClientLibrary } = require("./newApp")
|
||||||
const download = require("download")
|
const download = require("download")
|
||||||
const env = require("../../environment")
|
const env = require("../../environment")
|
||||||
const { homedir } = require("os")
|
const { homedir } = require("os")
|
||||||
|
@ -134,7 +135,8 @@ exports.performBackup = async (appId, backupName) => {
|
||||||
*/
|
*/
|
||||||
exports.createApp = async appId => {
|
exports.createApp = async appId => {
|
||||||
await downloadLibraries(appId)
|
await downloadLibraries(appId)
|
||||||
await newAppPublicPath(appId)
|
await uploadClientLibrary(appId)
|
||||||
|
await uploadDirectory(ObjectStoreBuckets.APPS, NODE_MODULES_PATH, appId)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -26,10 +26,9 @@ exports.downloadLibraries = async appId => {
|
||||||
return paths
|
return paths
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.newAppPublicPath = async appId => {
|
exports.uploadClientLibrary = async appId => {
|
||||||
const path = join(appId, "public")
|
|
||||||
const sourcepath = require.resolve("@budibase/client")
|
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))
|
await streamUpload(BUCKET_NAME, destPath, fs.createReadStream(sourcepath))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue