add INFISICAL_CLOUD env back from old backend

This commit is contained in:
Maidul Islam
2024-02-27 16:38:18 -05:00
parent 3b9ceff21c
commit fe497d87c0
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -94,14 +94,17 @@ const envSchema = z
SECRET_SCANNING_WEBHOOK_SECRET: zpStr(z.string().optional()), SECRET_SCANNING_WEBHOOK_SECRET: zpStr(z.string().optional()),
SECRET_SCANNING_GIT_APP_ID: zpStr(z.string().optional()), SECRET_SCANNING_GIT_APP_ID: zpStr(z.string().optional()),
SECRET_SCANNING_PRIVATE_KEY: zpStr(z.string().optional()), SECRET_SCANNING_PRIVATE_KEY: zpStr(z.string().optional()),
// LICENCE // LICENSE
LICENSE_SERVER_URL: zpStr(z.string().optional().default("https://portal.infisical.com")), LICENSE_SERVER_URL: zpStr(z.string().optional().default("https://portal.infisical.com")),
LICENSE_SERVER_KEY: zpStr(z.string().optional()), LICENSE_SERVER_KEY: zpStr(z.string().optional()),
LICENSE_KEY: zpStr(z.string().optional()), LICENSE_KEY: zpStr(z.string().optional()),
// GENERIC
STANDALONE_MODE: z STANDALONE_MODE: z
.enum(["true", "false"]) .enum(["true", "false"])
.transform((val) => val === "true") .transform((val) => val === "true")
.optional() .optional(),
INFISICAL_CLOUD: zodStrBool.default("false")
}) })
.transform((data) => ({ .transform((data) => ({
...data, ...data,
@@ -52,7 +52,7 @@ export const telemetryQueueServiceFactory = ({
// this sends some telemetry information like instance id secrets operated etc // this sends some telemetry information like instance id secrets operated etc
const startTelemetryCheck = async () => { const startTelemetryCheck = async () => {
// this is a fast way to check its cloud or not // this is a fast way to check its cloud or not
if (appCfg.LICENSE_SERVER_KEY) return; if (appCfg.INFISICAL_CLOUD) return;
// clear previous job // clear previous job
await queueService.stopRepeatableJob( await queueService.stopRepeatableJob(
QueueName.TelemetryInstanceStats, QueueName.TelemetryInstanceStats,