🔖 Release/v1.0.5 (#757)

This commit is contained in:
ericlinagora
2024-11-29 13:24:58 +01:00
committed by GitHub
6 changed files with 57 additions and 10 deletions
@@ -1,4 +1,5 @@
import { getLogger, TdriveLogger, TdriveService } from "../../framework";
import { getConfigOrDefault } from "../../../../utils/get-config";
import EmailPusherAPI from "./provider";
import {
EmailBuilderDataPayload,
@@ -42,7 +43,7 @@ export default class EmailPusherClass
});
this.interface = this.configuration.get<string>("email_interface", "");
this.platformUrl = this.configuration.get<string>("platform_url", "");
this.debug = this.configuration.get<boolean>("debug", false);
this.debug = getConfigOrDefault<boolean>("email-pusher.debug", true);
if (this.interface === "smtp") {
const useTLS = this.configuration.get<string>("smtp_tls", "false") == "true";
const smtpConfig: SMTPClientConfigType = {
@@ -3,6 +3,7 @@ import { logger } from "../../../../../../core/platform/framework";
import { Readable } from "stream";
import { StorageConnectorAPI, WriteMetadata } from "../../provider";
import { randomUUID } from "crypto";
import _ from "lodash";
export type S3Configuration = {
id: string;
@@ -22,8 +23,15 @@ export default class S3ConnectorService implements StorageConnectorAPI {
id: string;
constructor(S3Configuration: S3Configuration) {
this.client = new Minio.Client(S3Configuration);
this.minioConfiguration = S3Configuration;
const confCopy = _.cloneDeep(S3Configuration) as S3Configuration;
if (confCopy.port && typeof confCopy.port === "string") {
confCopy.port = parseInt(confCopy.port, 10);
}
if (confCopy.useSSL && typeof confCopy.useSSL === "string") {
confCopy.useSSL = !(!confCopy.useSSL || confCopy.useSSL === "false");
}
this.client = new Minio.Client(confCopy);
this.minioConfiguration = confCopy;
this.id = this.minioConfiguration.id;
if (!this.id) {
this.id = randomUUID();
@@ -50,8 +50,19 @@ export const isSharedWithMeFolder = (id: string) => {
export const getVirtualFoldersNames = async (id: string, context: DriveExecutionContext) => {
const configuration = new Configuration("drive");
const defaultLang = configuration.get<string>("defaultLanguage") || "en";
const user = await gr.services.users.get({ id: context.user?.id });
const locale = user?.preferences?.locale || defaultLang;
const locale = await (async () => {
try {
const user = await gr.services.users.get({ id: context.user?.id });
return user?.preferences?.locale || defaultLang;
} catch (error) {
logger.error(
{ error, context },
"Ignoring error getting user to translate root. This is expected from requests coming from applications as the user id is not a valid UUID for postgres. Defaulting to " +
defaultLang,
);
return defaultLang;
}
})();
if (id.startsWith("user_")) {
return gr.services.i18n.translate("virtual-folder.my-drive", locale);
+3 -3
View File
@@ -1,7 +1,7 @@
export default {
current: /* @VERSION_DETAIL */ "1.0.5-rc1",
current: /* @VERSION_DETAIL */ "1.0.5",
minimal: {
web: /* @MIN_VERSION_WEB */ "1.0.5-rc1",
mobile: /* @MIN_VERSION_MOBILE */ "1.0.5-rc1",
web: /* @MIN_VERSION_WEB */ "1.0.5",
mobile: /* @MIN_VERSION_MOBILE */ "1.0.5",
},
};
@@ -1,5 +1,5 @@
export default {
version: /* @VERSION */ '1.0.5-rc1',
version_detail: /* @VERSION_DETAIL */ '1.0.5-rc1',
version: /* @VERSION */ '1.0.5',
version_detail: /* @VERSION_DETAIL */ '1.0.5',
version_name: /* @VERSION_NAME */ 'Ghost-Dog',
};