mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 15:27:27 +00:00
fix: ldif module import
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
import ldapjs from "ldapjs";
|
import ldapjs from "ldapjs";
|
||||||
import { render } from "mustache";
|
import mustache from "mustache";
|
||||||
import { customAlphabet } from "nanoid";
|
import { customAlphabet } from "nanoid";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
@@ -9,7 +9,8 @@ import { alphaNumericNanoId } from "@app/lib/nanoid";
|
|||||||
|
|
||||||
import { LdapSchema, TDynamicProviderFns } from "./models";
|
import { LdapSchema, TDynamicProviderFns } from "./models";
|
||||||
import { BadRequestError } from "@app/lib/errors";
|
import { BadRequestError } from "@app/lib/errors";
|
||||||
const ldif = require("ldif");
|
// @ts-ignore
|
||||||
|
import ldif from "ldif";
|
||||||
|
|
||||||
const generatePassword = () => {
|
const generatePassword = () => {
|
||||||
const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~!*$#";
|
const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~!*$#";
|
||||||
@@ -43,7 +44,7 @@ const generateLDIF = ({
|
|||||||
EncodedPassword: encodePassword(password)
|
EncodedPassword: encodePassword(password)
|
||||||
};
|
};
|
||||||
|
|
||||||
const ldif = render(ldifTemplate, data);
|
const ldif = mustache.render(ldifTemplate, data);
|
||||||
|
|
||||||
return ldif;
|
return ldif;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user