fix: make bundled cube optional

This commit is contained in:
Tiago Farto
2026-05-04 11:03:37 +00:00
parent 2abf8e1d8c
commit dd757394af
12 changed files with 81 additions and 21 deletions
+10
View File
@@ -3,6 +3,16 @@
const TENANT_MEMBER = "FeedbackRecords.tenantId";
const REQUIRED_SCOPE = "xm:cube:query";
function assertRequiredEnvironmentVariable(name) {
const value = process.env[name];
if (typeof value !== "string" || value.trim().length === 0) {
throw new Error(`${name} is required to run Cube`);
}
}
assertRequiredEnvironmentVariable("CUBEJS_API_SECRET");
function getStringClaim(securityContext, claim) {
const value = securityContext?.[claim];
if (typeof value !== "string") {