mirror of
https://github.com/docmost/docmost.git
synced 2025-11-13 07:52:36 +10:00
use non-esm nanoid version (#1040)
This commit is contained in:
@ -59,14 +59,13 @@
|
||||
"class-transformer": "^0.5.1",
|
||||
"class-validator": "^0.14.1",
|
||||
"cookie": "^1.0.2",
|
||||
"fix-esm": "^1.0.1",
|
||||
"fs-extra": "^11.3.0",
|
||||
"happy-dom": "^15.11.6",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"kysely": "^0.27.5",
|
||||
"kysely-migration-cli": "^0.4.2",
|
||||
"mime-types": "^2.1.35",
|
||||
"nanoid": "^5.1.0",
|
||||
"nanoid": "3.3.11",
|
||||
"nestjs-kysely": "^1.1.0",
|
||||
"nodemailer": "^6.10.0",
|
||||
"openid-client": "^5.7.1",
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
const { customAlphabet } = require('fix-esm').require('nanoid');
|
||||
import { customAlphabet } from 'nanoid';
|
||||
|
||||
const alphabet = '0123456789abcdefghijklmnopqrstuvwxyz';
|
||||
export const nanoIdGen = customAlphabet(alphabet, 10);
|
||||
|
||||
const slugIdAlphabet =
|
||||
'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
||||
export const generateSlugId = customAlphabet(slugIdAlphabet, 10);
|
||||
export const generateSlugId = customAlphabet(slugIdAlphabet, 10);
|
||||
Reference in New Issue
Block a user