mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 05:27:48 +00:00
Lint fixes
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
import { SecretSync } from "@app/services/secret-sync/secret-sync-enums";
|
|
||||||
import { registerSyncSecretsEndpoints } from "./secret-sync-endpoints";
|
|
||||||
import {
|
import {
|
||||||
CloudflarePagesSyncSchema,
|
CloudflarePagesSyncSchema,
|
||||||
CreateCloudflarePagesSyncSchema,
|
CreateCloudflarePagesSyncSchema,
|
||||||
UpdateCloudflarePagesSyncSchema
|
UpdateCloudflarePagesSyncSchema
|
||||||
} from "@app/services/secret-sync/cloudflare-pages/cloudflare-pages-schema";
|
} from "@app/services/secret-sync/cloudflare-pages/cloudflare-pages-schema";
|
||||||
|
import { SecretSync } from "@app/services/secret-sync/secret-sync-enums";
|
||||||
|
|
||||||
|
import { registerSyncSecretsEndpoints } from "./secret-sync-endpoints";
|
||||||
|
|
||||||
export const registerCloudflarePagesSyncRouter = async (server: FastifyZodProvider) =>
|
export const registerCloudflarePagesSyncRouter = async (server: FastifyZodProvider) =>
|
||||||
registerSyncSecretsEndpoints({
|
registerSyncSecretsEndpoints({
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import z from "zod";
|
import z from "zod";
|
||||||
|
|
||||||
import { AppConnections } from "@app/lib/api-docs";
|
import { AppConnections } from "@app/lib/api-docs";
|
||||||
|
import { CharacterType, characterValidator } from "@app/lib/validator/validate-string";
|
||||||
import { AppConnection } from "@app/services/app-connection/app-connection-enums";
|
import { AppConnection } from "@app/services/app-connection/app-connection-enums";
|
||||||
import {
|
import {
|
||||||
BaseAppConnectionSchema,
|
BaseAppConnectionSchema,
|
||||||
@@ -9,7 +10,6 @@ import {
|
|||||||
} from "@app/services/app-connection/app-connection-schemas";
|
} from "@app/services/app-connection/app-connection-schemas";
|
||||||
|
|
||||||
import { CloudflareConnectionMethod } from "./cloudflare-connection-enum";
|
import { CloudflareConnectionMethod } from "./cloudflare-connection-enum";
|
||||||
import { CharacterType, characterValidator } from "@app/lib/validator/validate-string";
|
|
||||||
|
|
||||||
const accountIdCharacterValidator = characterValidator([
|
const accountIdCharacterValidator = characterValidator([
|
||||||
CharacterType.AlphaNumeric,
|
CharacterType.AlphaNumeric,
|
||||||
|
|||||||
@@ -280,6 +280,13 @@ export const OnePassSyncFns = {
|
|||||||
const instanceUrl = await getOnePassInstanceUrl(connection);
|
const instanceUrl = await getOnePassInstanceUrl(connection);
|
||||||
const { apiToken } = connection.credentials;
|
const { apiToken } = connection.credentials;
|
||||||
|
|
||||||
return listOnePassItems({ instanceUrl, apiToken, vaultId, valueLabel: valueLabel || VALUE_LABEL_DEFAULT });
|
const res = await listOnePassItems({
|
||||||
|
instanceUrl,
|
||||||
|
apiToken,
|
||||||
|
vaultId,
|
||||||
|
valueLabel: valueLabel || VALUE_LABEL_DEFAULT
|
||||||
|
});
|
||||||
|
|
||||||
|
return Object.fromEntries(Object.entries(res.items).map(([key, item]) => [key, { value: item.value }]));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
+4
-2
@@ -6,8 +6,10 @@ import { SecretSync } from "@app/hooks/api/secretSyncs";
|
|||||||
|
|
||||||
export const OnePassSyncReviewFields = () => {
|
export const OnePassSyncReviewFields = () => {
|
||||||
const { watch } = useFormContext<TSecretSyncForm & { destination: SecretSync.OnePass }>();
|
const { watch } = useFormContext<TSecretSyncForm & { destination: SecretSync.OnePass }>();
|
||||||
const vaultId = watch("destinationConfig.vaultId");
|
const [vaultId, valueLabel] = watch([
|
||||||
const valueLabel = watch("destinationConfig.valueLabel");
|
"destinationConfig.vaultId",
|
||||||
|
"destinationConfig.valueLabel"
|
||||||
|
]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
+4
-1
@@ -164,7 +164,10 @@ export const MinimizedOrgSidebar = () => {
|
|||||||
const handleCopyToken = async () => {
|
const handleCopyToken = async () => {
|
||||||
try {
|
try {
|
||||||
await window.navigator.clipboard.writeText(getAuthToken());
|
await window.navigator.clipboard.writeText(getAuthToken());
|
||||||
createNotification({ type: "success", text: "Copied current login session token to clipboard" });
|
createNotification({
|
||||||
|
type: "success",
|
||||||
|
text: "Copied current login session token to clipboard"
|
||||||
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
createNotification({ type: "error", text: "Failed to copy user token to clipboard" });
|
createNotification({ type: "error", text: "Failed to copy user token to clipboard" });
|
||||||
|
|||||||
Reference in New Issue
Block a user