Browse Source
Merge pull request #751 from Budibase/auth-fix
auth - standard-components not loading, windows
pull/752/head
Michael Shanks
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
3 additions and
3 deletions
-
packages/client/src/index.js
-
packages/server/src/api/controllers/static.js
|
|
@ -21,7 +21,7 @@ export const loadBudibase = async opts => { |
|
|
for (let library of libraries) { |
|
|
for (let library of libraries) { |
|
|
// fetch the JavaScript for the component libraries from the server
|
|
|
// fetch the JavaScript for the component libraries from the server
|
|
|
componentLibraryModules[library] = await import( |
|
|
componentLibraryModules[library] = await import( |
|
|
`/componentlibrary?library=${encodeURI(library)}` |
|
|
`/componentlibrary?library=${encodeURI(library)}&appId=${appId}` |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -198,7 +198,7 @@ exports.serveComponentLibrary = async function(ctx) { |
|
|
// default to homedir
|
|
|
// default to homedir
|
|
|
let componentLibraryPath = resolve( |
|
|
let componentLibraryPath = resolve( |
|
|
budibaseAppsDir(), |
|
|
budibaseAppsDir(), |
|
|
ctx.user.appId, |
|
|
ctx.query.appId, |
|
|
"node_modules", |
|
|
"node_modules", |
|
|
decodeURI(ctx.query.library), |
|
|
decodeURI(ctx.query.library), |
|
|
"package", |
|
|
"package", |
|
|
@ -215,7 +215,7 @@ exports.serveComponentLibrary = async function(ctx) { |
|
|
|
|
|
|
|
|
// TODO: component libs should be versioned based on app version
|
|
|
// TODO: component libs should be versioned based on app version
|
|
|
if (process.env.CLOUD) { |
|
|
if (process.env.CLOUD) { |
|
|
const appId = ctx.user.appId |
|
|
const appId = ctx.query.appId |
|
|
const S3_URL = encodeURI( |
|
|
const S3_URL = encodeURI( |
|
|
`https://${appId}.app.budi.live/assets/componentlibrary/${ctx.query.library}/dist/index.js` |
|
|
`https://${appId}.app.budi.live/assets/componentlibrary/${ctx.query.library}/dist/index.js` |
|
|
) |
|
|
) |
|
|
|