mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 12:56:05 +00:00
mm: added secrets extraction for db mode
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { hash, pickHeaders, s, parse } from "bknd/utils";
|
||||
import { hash, pickHeaders, s, parse, secret } from "bknd/utils";
|
||||
import type { FileBody, FileListObject, FileMeta } from "../../Storage";
|
||||
import { StorageAdapter } from "../../StorageAdapter";
|
||||
|
||||
export const cloudinaryAdapterConfig = s.object(
|
||||
{
|
||||
cloud_name: s.string(),
|
||||
api_key: s.string(),
|
||||
api_secret: s.string(),
|
||||
api_key: secret(),
|
||||
api_secret: secret(),
|
||||
upload_preset: s.string().optional(),
|
||||
},
|
||||
{ title: "Cloudinary", description: "Cloudinary media storage" },
|
||||
|
||||
@@ -8,15 +8,15 @@ import type {
|
||||
} from "@aws-sdk/client-s3";
|
||||
import { AwsClient } from "core/clients/aws/AwsClient";
|
||||
import { isDebug } from "core/env";
|
||||
import { isFile, pickHeaders2, parse, s } from "bknd/utils";
|
||||
import { isFile, pickHeaders2, parse, s, secret } from "bknd/utils";
|
||||
import { transform } from "lodash-es";
|
||||
import type { FileBody, FileListObject } from "../../Storage";
|
||||
import { StorageAdapter } from "../../StorageAdapter";
|
||||
|
||||
export const s3AdapterConfig = s.object(
|
||||
{
|
||||
access_key: s.string(),
|
||||
secret_access_key: s.string(),
|
||||
access_key: secret(),
|
||||
secret_access_key: secret(),
|
||||
url: s.string({
|
||||
pattern: "^https?://(?:.*)?[^/.]+$",
|
||||
description: "URL to S3 compatible endpoint without trailing slash",
|
||||
|
||||
Reference in New Issue
Block a user