mirror of
https://github.com/Shadowfita/docmost.git
synced 2025-11-12 07:42:34 +10:00
Compare commits
19 Commits
Vite-PWA
...
26cae77eb5
| Author | SHA1 | Date | |
|---|---|---|---|
| 26cae77eb5 | |||
| 2102595f8a | |||
| 8eb5eb3161 | |||
| 9e8a3681d6 | |||
| 38f66eaab5 | |||
| 6ad469a115 | |||
| 9d0331d04f | |||
| 0bfd3b6771 | |||
| b992b65119 | |||
| a58765860d | |||
| 0475635dbf | |||
| 9a11d1d086 | |||
| bd15401e7f | |||
| 502b9fdab8 | |||
| 78d5390e40 | |||
| 181e71c1fb | |||
| 51cdabeda6 | |||
| 715a2dc005 | |||
| 1f153dfd55 |
12
.env.example
12
.env.example
@ -7,6 +7,18 @@ APP_SECRET=REPLACE_WITH_LONG_SECRET
|
||||
|
||||
JWT_TOKEN_EXPIRES_IN=30d
|
||||
|
||||
# Use NTLM for user authentication, exposes to browser
|
||||
VITE_NTLM_AUTH=false
|
||||
|
||||
# LDAP settings for NTLM authentication
|
||||
LDAP_BASEDN=
|
||||
LDAP_DOMAINSUFFIX=
|
||||
LDAP_USERNAME=
|
||||
LDAP_PASSWORD=
|
||||
# User object attributes for docmost
|
||||
LDAP_NAMEATTRIBUTE=
|
||||
LDAP_MAILATTRIBUTE=
|
||||
|
||||
DATABASE_URL="postgresql://postgres:password@localhost:5432/docmost?schema=public"
|
||||
REDIS_URL=redis://127.0.0.1:6379
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ import { useState } from "react";
|
||||
import {
|
||||
forgotPassword,
|
||||
login,
|
||||
ntlmLogin,
|
||||
passwordReset,
|
||||
setupWorkspace,
|
||||
verifyUserToken,
|
||||
@ -50,6 +51,25 @@ export default function useAuth() {
|
||||
}
|
||||
};
|
||||
|
||||
const handleNtlmSignIn = async () => {
|
||||
setIsLoading(true);
|
||||
|
||||
try {
|
||||
const res = await ntlmLogin();
|
||||
setIsLoading(false);
|
||||
setAuthToken(res.tokens);
|
||||
|
||||
navigate(APP_ROUTE.HOME);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
setIsLoading(false);
|
||||
notifications.show({
|
||||
message: err.response?.data.message,
|
||||
color: "red",
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const handleInvitationSignUp = async (data: IAcceptInvite) => {
|
||||
setIsLoading(true);
|
||||
|
||||
@ -177,6 +197,7 @@ export default function useAuth() {
|
||||
|
||||
return {
|
||||
signIn: handleSignIn,
|
||||
ntlmSignIn: handleNtlmSignIn,
|
||||
invitationSignup: handleInvitationSignUp,
|
||||
setupWorkspace: handleSetupWorkspace,
|
||||
isAuthenticated: handleIsAuthenticated,
|
||||
|
||||
@ -9,12 +9,19 @@ import {
|
||||
ITokenResponse,
|
||||
IVerifyUserToken,
|
||||
} from "@/features/auth/types/auth.types";
|
||||
import axios from "axios";
|
||||
|
||||
export async function login(data: ILogin): Promise<ITokenResponse> {
|
||||
const req = await api.post<ITokenResponse>("/auth/login", data);
|
||||
return req.data;
|
||||
}
|
||||
|
||||
export async function ntlmLogin(): Promise<ITokenResponse> {
|
||||
// Use separate axios instance to avoid passing app auth headers to allow for NTLM authentication challenge
|
||||
const req = await axios.post<ITokenResponse>("/api/auth/ntlm");
|
||||
return req.data;
|
||||
}
|
||||
|
||||
/*
|
||||
export async function register(data: IRegister): Promise<ITokenResponse> {
|
||||
const req = await api.post<ITokenResponse>("/auth/register", data);
|
||||
|
||||
@ -9,6 +9,7 @@ import {
|
||||
IconInfoCircle,
|
||||
IconList,
|
||||
IconListNumbers,
|
||||
IconListTree,
|
||||
IconMath,
|
||||
IconMathFunction,
|
||||
IconMovie,
|
||||
@ -97,6 +98,20 @@ const CommandGroups: SlashMenuGroupedItemsType = {
|
||||
.run();
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Table of Contents",
|
||||
description: "Create a table of contents.",
|
||||
searchTerms: ["table", "contents", "list"],
|
||||
icon: IconListTree,
|
||||
command: ({ editor, range }: CommandProps) => {
|
||||
editor
|
||||
.chain()
|
||||
.focus()
|
||||
.deleteRange(range)
|
||||
.toggleTableOfContents()
|
||||
.run();
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Bullet list",
|
||||
description: "Create a simple bullet list.",
|
||||
|
||||
@ -0,0 +1,124 @@
|
||||
import { BubbleMenu as BaseBubbleMenu, findParentNode, posToDOMRect } from "@tiptap/react";
|
||||
import React, { useCallback } from "react";
|
||||
import { sticky } from "tippy.js";
|
||||
import { Node as PMNode } from "prosemirror-model";
|
||||
import { EditorMenuProps, ShouldShowProps } from "@/features/editor/components/table/types/types.ts";
|
||||
import {
|
||||
ActionIcon,
|
||||
DividerVariant,
|
||||
Group,
|
||||
SegmentedControl,
|
||||
Select,
|
||||
Tooltip,
|
||||
Text,
|
||||
Checkbox,
|
||||
Card,
|
||||
Fieldset,
|
||||
} from "@mantine/core";
|
||||
import { IconLayoutAlignCenter, IconLayoutAlignLeft, IconLayoutAlignRight } from "@tabler/icons-react";
|
||||
import { NodeWidthResize } from "@/features/editor/components/common/node-width-resize.tsx";
|
||||
|
||||
export function TableOfContentsMenu({ editor }: EditorMenuProps) {
|
||||
const shouldShow = useCallback(
|
||||
({ state }: ShouldShowProps) => {
|
||||
if (!state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return editor.isActive("tableOfContents");
|
||||
},
|
||||
[editor]
|
||||
);
|
||||
|
||||
const getReferenceClientRect = useCallback(() => {
|
||||
const { selection } = editor.state;
|
||||
const predicate = (node: PMNode) => node.type.name === "tableOfContents";
|
||||
const parent = findParentNode(predicate)(selection);
|
||||
|
||||
if (parent) {
|
||||
const dom = editor.view.nodeDOM(parent?.pos) as HTMLElement;
|
||||
return dom.getBoundingClientRect();
|
||||
}
|
||||
|
||||
return posToDOMRect(editor.view, selection.from, selection.to);
|
||||
}, [editor]);
|
||||
|
||||
const setDividerType = useCallback(
|
||||
(type: DividerVariant) => {
|
||||
editor.chain().focus(undefined, { scrollIntoView: false }).setDividerType(type).run();
|
||||
},
|
||||
[editor]
|
||||
);
|
||||
|
||||
const setTableType = useCallback(
|
||||
(type: "Contents" | "Child Pages") => {
|
||||
editor.chain().focus(undefined, { scrollIntoView: false }).setTableType(type).run();
|
||||
},
|
||||
[editor]
|
||||
);
|
||||
|
||||
const setPageIcons = useCallback(
|
||||
(icons: boolean) => {
|
||||
editor.chain().focus(undefined, { scrollIntoView: false }).setPageIcons(icons).run();
|
||||
},
|
||||
[editor]
|
||||
);
|
||||
|
||||
return (
|
||||
<BaseBubbleMenu
|
||||
editor={editor}
|
||||
pluginKey={`tableOfContents-menu}`}
|
||||
updateDelay={0}
|
||||
tippyOptions={{
|
||||
getReferenceClientRect,
|
||||
offset: [0, 8],
|
||||
zIndex: 99,
|
||||
popperOptions: {
|
||||
modifiers: [{ name: "flip", enabled: false }],
|
||||
},
|
||||
plugins: [sticky],
|
||||
sticky: "popper",
|
||||
maxWidth: 500,
|
||||
}}
|
||||
shouldShow={shouldShow}
|
||||
>
|
||||
<Fieldset variant="filled" p="xs">
|
||||
<Group gap="xs">
|
||||
<Tooltip position="top" label="Divider type">
|
||||
<Select
|
||||
w={100}
|
||||
value={editor.getAttributes("tableOfContents").dividerType}
|
||||
data={[
|
||||
{ value: "solid", label: "Solid" },
|
||||
{ value: "dashed", label: "Dashed" },
|
||||
{ value: "dotted", label: "Dotted" },
|
||||
{ value: "none", label: "None" },
|
||||
]}
|
||||
onChange={(_value, option) => setDividerType(_value as DividerVariant)}
|
||||
/>
|
||||
</Tooltip>
|
||||
<Tooltip position="top" label="Table type">
|
||||
<SegmentedControl
|
||||
value={editor.getAttributes("tableOfContents").tableType}
|
||||
data={["Contents", "Child Pages"]}
|
||||
onChange={(value: "Contents" | "Child Pages") => setTableType(value)}
|
||||
/>
|
||||
</Tooltip>
|
||||
{editor.getAttributes("tableOfContents").tableType == "Child Pages" && (
|
||||
<Tooltip position="top" label="Show page icons">
|
||||
<Group gap="xs">
|
||||
<Text size="sm">Page Icons</Text>
|
||||
<Checkbox
|
||||
checked={editor.getAttributes("tableOfContents").icons}
|
||||
onChange={(event) => setPageIcons(event.currentTarget.checked)}
|
||||
/>
|
||||
</Group>
|
||||
</Tooltip>
|
||||
)}
|
||||
</Group>
|
||||
</Fieldset>
|
||||
</BaseBubbleMenu>
|
||||
);
|
||||
}
|
||||
|
||||
export default TableOfContentsMenu;
|
||||
@ -0,0 +1,199 @@
|
||||
import { JSONContent, NodeViewContent, NodeViewProps, NodeViewWrapper } from "@tiptap/react";
|
||||
import {
|
||||
IconAlertTriangleFilled,
|
||||
IconCircleCheckFilled,
|
||||
IconCircleXFilled,
|
||||
IconInfoCircleFilled,
|
||||
} from "@tabler/icons-react";
|
||||
import { Alert, Divider, Group, Stack, Title, UnstyledButton, Text, DividerVariant } from "@mantine/core";
|
||||
import { CalloutType } from "@docmost/editor-ext";
|
||||
import React, { useEffect, useMemo, useState } from "react";
|
||||
import { TextSelection } from "@tiptap/pm/state";
|
||||
import classes from "./table-of-contents.module.css";
|
||||
import clsx from "clsx";
|
||||
import { useGetRootSidebarPagesQuery, usePageQuery } from "@/features/page/queries/page-query";
|
||||
import { IPage, SidebarPagesParams } from "@/features/page/types/page.types";
|
||||
import { queryClient } from "@/main";
|
||||
import { getSidebarPages } from "@/features/page/services/page-service";
|
||||
import { useToggle } from "@mantine/hooks";
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
import { buildPageUrl } from "@/features/page/page.utils";
|
||||
import { string } from "zod";
|
||||
|
||||
export default function TableOfContentsView(props: NodeViewProps) {
|
||||
const { node, editor, selected } = props;
|
||||
|
||||
const { dividerType, tableType, icons } = node.attrs as {
|
||||
dividerType: DividerVariant & "none";
|
||||
tableType: "Contents" | "Child Pages";
|
||||
icons: boolean;
|
||||
};
|
||||
|
||||
const pageId = editor.storage?.pageId;
|
||||
|
||||
const { data: page } = usePageQuery({
|
||||
pageId: pageId,
|
||||
});
|
||||
|
||||
const { pageSlug, spaceSlug } = useParams();
|
||||
|
||||
const navigate = useNavigate();
|
||||
|
||||
const [childPages, setChildPages] = useState<JSX.Element[]>([]);
|
||||
const [headings, setHeadings] = useState<JSX.Element[]>([]);
|
||||
|
||||
const fetchChildren = async (params: SidebarPagesParams) => {
|
||||
return await queryClient.fetchQuery({
|
||||
queryKey: ["toc-child-pages", params],
|
||||
queryFn: () => getSidebarPages(params),
|
||||
staleTime: 10 * 60 * 1000,
|
||||
});
|
||||
};
|
||||
|
||||
// Max depth to prevent infinite recursion errors
|
||||
const MAX_RECURSION_DEPTH = 10;
|
||||
|
||||
const fetchAllChildren = async (
|
||||
currentPage: IPage,
|
||||
pages: (IPage & { depth: number })[],
|
||||
depth: number = 0
|
||||
): Promise<void> => {
|
||||
// Prevent infinite recursion
|
||||
if (depth > MAX_RECURSION_DEPTH) {
|
||||
console.warn("Max recursion depth reached");
|
||||
return;
|
||||
}
|
||||
|
||||
const params: SidebarPagesParams = {
|
||||
pageId: currentPage.id,
|
||||
spaceId: currentPage.spaceId,
|
||||
};
|
||||
|
||||
const result = await fetchChildren(params);
|
||||
const children = result.items;
|
||||
|
||||
// Store the children in the relationships map
|
||||
for (let child of children) pages.push({ ...child, depth });
|
||||
|
||||
// Use requestIdleCallback to allow the browser to perform other tasks
|
||||
for (const child of children) {
|
||||
if (child.hasChildren) {
|
||||
await new Promise((resolve) =>
|
||||
requestIdleCallback(() => {
|
||||
fetchAllChildren(child, pages, depth + 1).then(resolve);
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (!page) return;
|
||||
|
||||
(async () => {
|
||||
if (tableType == "Child Pages") {
|
||||
// Initialize the child pagse array
|
||||
const pages: (IPage & { depth: number })[] = [];
|
||||
|
||||
// Fetch all children recursively
|
||||
await fetchAllChildren(page, pages);
|
||||
|
||||
const tocChildPages: JSX.Element[] = pages.map((value, index) => (
|
||||
<UnstyledButton
|
||||
key={`toc-${index}`}
|
||||
className={classes.heading}
|
||||
style={{
|
||||
marginLeft: `calc(${value.depth} * var(--mantine-spacing-md))`,
|
||||
}}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (e.button != 0) return;
|
||||
|
||||
const pageSlug = buildPageUrl(spaceSlug, value.slugId, value.title);
|
||||
|
||||
// opted to not use "replace" so that browser back button workers properly
|
||||
navigate(pageSlug);
|
||||
}}
|
||||
>
|
||||
<Group>
|
||||
<Text m={6}>
|
||||
{icons ? value.icon : ""} {value.title}
|
||||
</Text>
|
||||
{dividerType != "none" && <Divider className={classes.divider} variant={dividerType} />}
|
||||
</Group>
|
||||
</UnstyledButton>
|
||||
));
|
||||
|
||||
setChildPages(tocChildPages);
|
||||
} else {
|
||||
const contentHeadings = editor.getJSON().content?.filter((c) => c.type == "heading");
|
||||
|
||||
const tocHeadings: JSX.Element[] = contentHeadings.map((value, index) => (
|
||||
<UnstyledButton
|
||||
key={`toc-${index}`}
|
||||
className={classes.heading}
|
||||
style={{
|
||||
marginLeft: `calc(${value.attrs?.level - 1} * var(--mantine-spacing-md))`,
|
||||
}}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (e.button != 0) return;
|
||||
|
||||
if (editor) {
|
||||
const headings = editor.view.dom.querySelectorAll("h1, h2, h3, h4, h5, h6");
|
||||
const clickedHeading = headings[index];
|
||||
|
||||
// find selected heading position in DOM relative to editors view
|
||||
const pos = editor.view.posAtDOM(clickedHeading, 0);
|
||||
|
||||
// start new state transaction on editors view state
|
||||
const tr = editor.view.state.tr;
|
||||
// move editor cursor to heading
|
||||
tr.setSelection(new TextSelection(tr.doc.resolve(pos)));
|
||||
editor.view.dispatch(tr);
|
||||
editor.view.focus();
|
||||
|
||||
window.scrollTo({
|
||||
top:
|
||||
clickedHeading.getBoundingClientRect().top -
|
||||
// subtract half of elements height to avoid viewport clipping
|
||||
clickedHeading.getBoundingClientRect().height / 2 -
|
||||
// substract headers height so that heading is visible after scroll.
|
||||
// getComputedStyles is not evaluating "--app-shell-header-height" so have hardcoded pixels.
|
||||
45 * 2 +
|
||||
window.scrollY,
|
||||
behavior: "smooth",
|
||||
});
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Group>
|
||||
<Text m={6}>{value.content?.at(0).text}</Text>
|
||||
{dividerType != "none" && <Divider className={classes.divider} variant={dividerType} />}
|
||||
</Group>
|
||||
</UnstyledButton>
|
||||
));
|
||||
|
||||
setHeadings(tocHeadings);
|
||||
}
|
||||
})();
|
||||
}, [page == undefined, dividerType, tableType, icons]);
|
||||
|
||||
return (
|
||||
<NodeViewWrapper>
|
||||
<NodeViewContent />
|
||||
<Stack
|
||||
gap={0}
|
||||
className={clsx(selected ? "ProseMirror-selectednode" : "")}
|
||||
contentEditable={false}
|
||||
onContextMenu={(e) => e.preventDefault()}
|
||||
>
|
||||
{tableType == "Contents" && headings}
|
||||
|
||||
{tableType == "Child Pages" && childPages}
|
||||
</Stack>
|
||||
</NodeViewWrapper>
|
||||
);
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
.divider {
|
||||
flex: 1 0 0;
|
||||
}
|
||||
|
||||
.heading {
|
||||
:hover {
|
||||
background-color: var(--mantine-color-default-hover);
|
||||
}
|
||||
}
|
||||
@ -35,6 +35,7 @@ import {
|
||||
CustomCodeBlock,
|
||||
Drawio,
|
||||
Excalidraw,
|
||||
TableofContents,
|
||||
} from "@docmost/editor-ext";
|
||||
import {
|
||||
randomElement,
|
||||
@ -62,6 +63,7 @@ import clojure from "highlight.js/lib/languages/clojure";
|
||||
import fortran from "highlight.js/lib/languages/fortran";
|
||||
import haskell from "highlight.js/lib/languages/haskell";
|
||||
import scala from "highlight.js/lib/languages/scala";
|
||||
import TableOfContentsView from "../components/table-of-contents/table-of-contents-view";
|
||||
|
||||
const lowlight = createLowlight(common);
|
||||
lowlight.register("mermaid", plaintext);
|
||||
@ -179,6 +181,9 @@ export const mainExtensions = [
|
||||
Excalidraw.configure({
|
||||
view: ExcalidrawView,
|
||||
}),
|
||||
TableofContents.configure({
|
||||
view: TableOfContentsView
|
||||
})
|
||||
] as any;
|
||||
|
||||
type CollabExtensions = (provider: HocuspocusProvider, user: IUser) => any[];
|
||||
|
||||
@ -39,6 +39,7 @@ import {
|
||||
import LinkMenu from "@/features/editor/components/link/link-menu.tsx";
|
||||
import ExcalidrawMenu from "./components/excalidraw/excalidraw-menu";
|
||||
import DrawioMenu from "./components/drawio/drawio-menu";
|
||||
import TableOfContentsMenu from "./components/table-of-contents/table-of-contents-menu";
|
||||
|
||||
interface PageEditorProps {
|
||||
pageId: string;
|
||||
@ -175,6 +176,7 @@ export default function PageEditor({ pageId, editable }: PageEditorProps) {
|
||||
<CalloutMenu editor={editor} />
|
||||
<ExcalidrawMenu editor={editor} />
|
||||
<DrawioMenu editor={editor} />
|
||||
<TableOfContentsMenu editor={editor} />
|
||||
<LinkMenu editor={editor} appendTo={menuContainerRef} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
@ -1,13 +1,28 @@
|
||||
import { LoginForm } from "@/features/auth/components/login-form";
|
||||
import useAuth from "@/features/auth/hooks/use-auth";
|
||||
import { useEffect } from "react";
|
||||
import { Helmet } from "react-helmet-async";
|
||||
|
||||
|
||||
const ntlmAuth = import.meta.env.VITE_NTLM_AUTH;
|
||||
|
||||
export default function LoginPage() {
|
||||
|
||||
const { ntlmSignIn } = useAuth();
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
if (ntlmAuth)
|
||||
ntlmSignIn();
|
||||
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<>
|
||||
<Helmet>
|
||||
<title>Login - Docmost</title>
|
||||
</Helmet>
|
||||
<LoginForm />
|
||||
{!ntlmAuth && <LoginForm />}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@ -59,11 +59,13 @@
|
||||
"happy-dom": "^15.7.3",
|
||||
"kysely": "^0.27.4",
|
||||
"kysely-migration-cli": "^0.4.2",
|
||||
"ldapjs": "^3.0.7",
|
||||
"marked": "^13.0.3",
|
||||
"mime-types": "^2.1.35",
|
||||
"nanoid": "^5.0.7",
|
||||
"nestjs-kysely": "^1.0.0",
|
||||
"nodemailer": "^6.9.14",
|
||||
"ntlm-server": "^0.1.3",
|
||||
"passport-jwt": "^4.0.1",
|
||||
"pg": "^8.12.0",
|
||||
"pg-tsquery": "^8.4.2",
|
||||
@ -85,6 +87,7 @@
|
||||
"@types/debounce": "^1.2.4",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/ldapjs": "^3.0.6",
|
||||
"@types/mime-types": "^2.1.4",
|
||||
"@types/node": "^22.5.2",
|
||||
"@types/nodemailer": "^6.4.15",
|
||||
|
||||
@ -14,6 +14,7 @@ import { EventEmitterModule } from '@nestjs/event-emitter';
|
||||
import { HealthModule } from './integrations/health/health.module';
|
||||
import { ExportModule } from './integrations/export/export.module';
|
||||
import { ImportModule } from './integrations/import/import.module';
|
||||
import { NTLMModule } from './integrations/ntlm/ntlm.module';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
@ -27,6 +28,7 @@ import { ImportModule } from './integrations/import/import.module';
|
||||
HealthModule,
|
||||
ImportModule,
|
||||
ExportModule,
|
||||
NTLMModule,
|
||||
StorageModule.forRootAsync({
|
||||
imports: [EnvironmentModule],
|
||||
}),
|
||||
|
||||
@ -10,5 +10,6 @@ import { TokenModule } from './token.module';
|
||||
imports: [TokenModule, WorkspaceModule],
|
||||
controllers: [AuthController],
|
||||
providers: [AuthService, SignupService, JwtStrategy],
|
||||
exports: [AuthService]
|
||||
})
|
||||
export class AuthModule {}
|
||||
|
||||
@ -117,6 +117,37 @@ export class EnvironmentService {
|
||||
return this.configService.get<string>('POSTMARK_TOKEN');
|
||||
}
|
||||
|
||||
getLdapBaseDn(): string {
|
||||
return this.configService.get<string>('LDAP_BASEDN')
|
||||
}
|
||||
|
||||
getLdapDomainSuffix(): string {
|
||||
return this.configService.get<string>('LDAP_DOMAINSUFFIX');
|
||||
}
|
||||
|
||||
getLdapUsername(): string {
|
||||
return this.configService.get<string>('LDAP_USERNAME')
|
||||
}
|
||||
|
||||
getLdapPassword(): string {
|
||||
return this.configService.get<string>('LDAP_PASSWORD')
|
||||
}
|
||||
|
||||
getLdapNameAttribute(): string {
|
||||
return this.configService.get<string>('LDAP_NAMEATTRIBUTE')
|
||||
}
|
||||
|
||||
getLdapMailAttribute(): string {
|
||||
return this.configService.get<string>('LDAP_MAILATTRIBUTE')
|
||||
}
|
||||
|
||||
usingNtlmAuth(): boolean {
|
||||
const ntlmAuth = this.configService
|
||||
.get<string>('VITE_NTLM_AUTH', 'false')
|
||||
.toLowerCase();
|
||||
return ntlmAuth === 'true';
|
||||
}
|
||||
|
||||
isCloud(): boolean {
|
||||
const cloudConfig = this.configService
|
||||
.get<string>('CLOUD', 'false')
|
||||
|
||||
86
apps/server/src/integrations/ntlm/ntlm.controller.ts
Normal file
86
apps/server/src/integrations/ntlm/ntlm.controller.ts
Normal file
@ -0,0 +1,86 @@
|
||||
import {
|
||||
Controller,
|
||||
Get,
|
||||
Req,
|
||||
Res,
|
||||
HttpException,
|
||||
HttpStatus,
|
||||
Post,
|
||||
} from '@nestjs/common';
|
||||
|
||||
import { FastifyRequest, FastifyReply } from 'fastify';
|
||||
|
||||
import {
|
||||
NTLMNegotiationMessage,
|
||||
NTLMChallengeMessage,
|
||||
NTLMAuthenticateMessage,
|
||||
MessageType,
|
||||
} from 'ntlm-server';
|
||||
|
||||
import { EnvironmentService } from '../environment/environment.service';
|
||||
import { NTLMService } from './ntlm.service';
|
||||
|
||||
@Controller()
|
||||
export class NTLMController {
|
||||
constructor(
|
||||
private readonly ntlmService: NTLMService,
|
||||
private readonly environmentService: EnvironmentService,
|
||||
) {}
|
||||
|
||||
@Post('auth/ntlm')
|
||||
async ntlmAuth(@Req() req, @Res() res: FastifyReply) {
|
||||
const authHeader = req.headers['authorization'];
|
||||
|
||||
if (!authHeader) {
|
||||
// Step 1: Challenge the client for NTLM authentication
|
||||
return res.status(401).header('WWW-Authenticate', 'NTLM').send();
|
||||
}
|
||||
|
||||
if (authHeader.startsWith('NTLM ')) {
|
||||
// Step 2: Handle NTLM negotiation message
|
||||
const clientNegotiation = new NTLMNegotiationMessage(authHeader);
|
||||
|
||||
if (clientNegotiation.messageType === MessageType.NEGOTIATE) {
|
||||
// Step 3: Send NTLM challenge message
|
||||
const serverChallenge = new NTLMChallengeMessage(clientNegotiation);
|
||||
const base64Challenge = serverChallenge.toBuffer().toString('base64');
|
||||
|
||||
return res
|
||||
.status(401)
|
||||
.header('WWW-Authenticate', `NTLM ${base64Challenge}`)
|
||||
.send();
|
||||
} else if (clientNegotiation.messageType === MessageType.AUTHENTICATE) {
|
||||
// Step 4: Handle NTLM Authenticate message
|
||||
const clientAuthentication = new NTLMAuthenticateMessage(authHeader);
|
||||
|
||||
// Here you'd perform LDAP or Active Directory authentication
|
||||
|
||||
const client = this.ntlmService.createClient(
|
||||
clientAuthentication.domainName,
|
||||
);
|
||||
|
||||
// Asynchronous bind to AD
|
||||
await this.ntlmService.bindAsync(client);
|
||||
|
||||
const results = await this.ntlmService.searchAsync(client, {
|
||||
scope: 'sub',
|
||||
filter: `(userPrincipalName=${clientAuthentication.userName}@${clientAuthentication.domainName}*)`,
|
||||
});
|
||||
|
||||
if (results.length == 1) {
|
||||
const ntlmSignInResult = await this.ntlmService.login(
|
||||
results.at(0)[this.environmentService.getLdapNameAttribute()],
|
||||
results.at(0)[this.environmentService.getLdapMailAttribute()],
|
||||
req.raw.workspaceId,
|
||||
);
|
||||
return res.status(200).send(ntlmSignInResult);
|
||||
} else return res.status(403).send();
|
||||
} else {
|
||||
console.warn('Invalid NTLM Message received.');
|
||||
return res.status(400).send('Invalid NTLM Message');
|
||||
}
|
||||
}
|
||||
|
||||
res.status(400).send('Bad NTLM request');
|
||||
}
|
||||
}
|
||||
13
apps/server/src/integrations/ntlm/ntlm.module.ts
Normal file
13
apps/server/src/integrations/ntlm/ntlm.module.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { NTLMController } from './ntlm.controller';
|
||||
import { NTLMService } from './ntlm.service';
|
||||
import { TokenModule } from 'src/core/auth/token.module';
|
||||
import { WorkspaceModule } from 'src/core/workspace/workspace.module';
|
||||
import { AuthModule } from 'src/core/auth/auth.module';
|
||||
|
||||
@Module({
|
||||
imports: [TokenModule, WorkspaceModule, AuthModule],
|
||||
controllers: [NTLMController],
|
||||
providers: [NTLMService],
|
||||
})
|
||||
export class NTLMModule {}
|
||||
110
apps/server/src/integrations/ntlm/ntlm.service.ts
Normal file
110
apps/server/src/integrations/ntlm/ntlm.service.ts
Normal file
@ -0,0 +1,110 @@
|
||||
import { Inject, Injectable, UnauthorizedException } from '@nestjs/common';
|
||||
import { EnvironmentService } from '../environment/environment.service';
|
||||
import * as ldap from 'ldapjs';
|
||||
import { UserRepo } from '@docmost/db/repos/user/user.repo';
|
||||
import { TokensDto } from 'src/core/auth/dto/tokens.dto';
|
||||
import { TokenService } from 'src/core/auth/services/token.service';
|
||||
import { AuthService } from 'src/core/auth/services/auth.service';
|
||||
|
||||
@Injectable()
|
||||
export class NTLMService {
|
||||
constructor(
|
||||
private readonly environmentService: EnvironmentService,
|
||||
private authService: AuthService,
|
||||
private tokenService: TokenService,
|
||||
private userRepo: UserRepo,
|
||||
) {}
|
||||
|
||||
createClient = (domain: string) =>
|
||||
ldap.createClient({
|
||||
url: 'ldap://' + domain + this.environmentService.getLdapDomainSuffix(),
|
||||
});
|
||||
|
||||
// Promisified version of ldap.Client.bind
|
||||
bindAsync = (client: ldap.Client): Promise<void> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
client.bind(
|
||||
this.environmentService.getLdapUsername(),
|
||||
this.environmentService.getLdapPassword(),
|
||||
(err) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
// Promisified version of client.search
|
||||
searchAsync = (
|
||||
client: ldap.Client,
|
||||
options: ldap.SearchOptions,
|
||||
): Promise<any[]> => {
|
||||
const baseDN: string = this.environmentService.getLdapBaseDn();
|
||||
return new Promise((resolve, reject) => {
|
||||
const entries: any[] = [];
|
||||
|
||||
client.search(baseDN, options, (err, res) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
}
|
||||
|
||||
res.on('searchEntry', (entry) => {
|
||||
const attributes = Object.fromEntries(
|
||||
entry.attributes.map(({ type, values }) => [
|
||||
type,
|
||||
values.length > 1 ? values : values[0],
|
||||
]),
|
||||
);
|
||||
entries.push(attributes);
|
||||
});
|
||||
|
||||
res.on('end', () => {
|
||||
resolve(entries);
|
||||
});
|
||||
|
||||
res.on('error', (error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
async login(name: string, email: string, workspaceId: string) {
|
||||
const user = await this.userRepo.findByEmail(email, workspaceId, false);
|
||||
|
||||
if (!user) {
|
||||
const tokensR = await this.authService.register(
|
||||
{
|
||||
name,
|
||||
email,
|
||||
password: this.generateRandomPassword(12),
|
||||
},
|
||||
workspaceId,
|
||||
);
|
||||
|
||||
return tokensR;
|
||||
}
|
||||
|
||||
user.lastLoginAt = new Date();
|
||||
await this.userRepo.updateLastLogin(user.id, workspaceId);
|
||||
|
||||
const tokens: TokensDto = await this.tokenService.generateTokens(user);
|
||||
return { tokens };
|
||||
}
|
||||
|
||||
generateRandomPassword(length: number): string {
|
||||
const characters =
|
||||
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+[]{}|;:,.<>?';
|
||||
let password = '';
|
||||
|
||||
for (let i = 0; i < length; i++) {
|
||||
const randomIndex = Math.floor(Math.random() * characters.length);
|
||||
password += characters[randomIndex];
|
||||
}
|
||||
|
||||
return password;
|
||||
}
|
||||
}
|
||||
@ -14,4 +14,4 @@ export * from "./lib/attachment";
|
||||
export * from "./lib/custom-code-block"
|
||||
export * from "./lib/drawio";
|
||||
export * from "./lib/excalidraw";
|
||||
|
||||
export * from "./lib/table-of-contents";
|
||||
|
||||
115
packages/editor-ext/src/lib/table-of-contents.ts
Normal file
115
packages/editor-ext/src/lib/table-of-contents.ts
Normal file
@ -0,0 +1,115 @@
|
||||
import { Node, findChildren, findParentNode, mergeAttributes, wrappingInputRule } from "@tiptap/core";
|
||||
import { icon, setAttributes } from "./utils";
|
||||
import { ReactNodeViewRenderer } from "@tiptap/react";
|
||||
|
||||
declare module "@tiptap/core" {
|
||||
interface Commands<ReturnType> {
|
||||
tableOfContents: {
|
||||
setTableOfContents: () => ReturnType;
|
||||
unsetTableOfContents: () => ReturnType;
|
||||
toggleTableOfContents: () => ReturnType;
|
||||
setDividerType: (type: "solid" | "dashed" | "dotted" | "none") => ReturnType;
|
||||
setTableType: (type: "Contents" | "Child Pages") => ReturnType;
|
||||
setPageIcons: (icons: boolean) => ReturnType;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export interface TableofContentsOptions {
|
||||
HTMLAttributes: Record<string, any>;
|
||||
view: any;
|
||||
}
|
||||
|
||||
export const TableofContents = Node.create<TableofContentsOptions>({
|
||||
name: "tableOfContents",
|
||||
|
||||
content: "block+",
|
||||
inline: false,
|
||||
group: "block",
|
||||
isolating: true,
|
||||
atom: true,
|
||||
defining: true,
|
||||
|
||||
addOptions() {
|
||||
return {
|
||||
HTMLAttributes: {},
|
||||
view: null,
|
||||
};
|
||||
},
|
||||
|
||||
parseHTML() {
|
||||
return [
|
||||
{
|
||||
tag: `div[data-type="${this.name}"]`,
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
renderHTML({ HTMLAttributes }) {
|
||||
return ["div", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];
|
||||
},
|
||||
|
||||
addAttributes() {
|
||||
return {
|
||||
dividerType: {
|
||||
default: "solid",
|
||||
parseHTML: (element) => element.getAttribute("data-divider-type"),
|
||||
renderHTML: (attributes) => ({
|
||||
"data-divider-type": attributes.dividerType,
|
||||
}),
|
||||
},
|
||||
tableType: {
|
||||
default: "Contents",
|
||||
parseHTML: (element) => element.getAttribute("data-table-type"),
|
||||
renderHTML: (attributes) => ({
|
||||
"data-table-type": attributes.tableType,
|
||||
}),
|
||||
},
|
||||
icons: {
|
||||
default: true,
|
||||
parseHTML: (element) => element.getAttribute("data-page-icons"),
|
||||
renderHTML: (attributes) => ({
|
||||
"data-page-icons": attributes.tableType,
|
||||
}),
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
addNodeView() {
|
||||
return ReactNodeViewRenderer(this.options.view);
|
||||
},
|
||||
|
||||
addCommands() {
|
||||
return {
|
||||
setTableOfContents:
|
||||
() =>
|
||||
({ commands }) =>
|
||||
commands.setNode(this.name),
|
||||
|
||||
unsetTableOfContents:
|
||||
() =>
|
||||
({ commands }) =>
|
||||
commands.lift(this.name),
|
||||
|
||||
toggleTableOfContents:
|
||||
() =>
|
||||
({ commands }) =>
|
||||
commands.toggleWrap(this.name),
|
||||
|
||||
setDividerType:
|
||||
(type) =>
|
||||
({ commands }) =>
|
||||
commands.updateAttributes("tableOfContents", { dividerType: type }),
|
||||
|
||||
setTableType:
|
||||
(type) =>
|
||||
({ commands }) =>
|
||||
commands.updateAttributes("tableOfContents", { tableType: type }),
|
||||
|
||||
setPageIcons:
|
||||
(icons) =>
|
||||
({ commands }) =>
|
||||
commands.updateAttributes("tableOfContents", { icons: icons }),
|
||||
};
|
||||
},
|
||||
});
|
||||
192
pnpm-lock.yaml
generated
192
pnpm-lock.yaml
generated
@ -167,7 +167,7 @@ importers:
|
||||
version: 8.2.2
|
||||
nx:
|
||||
specifier: 19.6.3
|
||||
version: 19.6.3(@swc/core@1.5.25(@swc/helpers@0.5.5))
|
||||
version: 19.6.3(@swc/core@1.5.25)
|
||||
tsx:
|
||||
specifier: ^4.19.0
|
||||
version: 4.19.0
|
||||
@ -445,6 +445,9 @@ importers:
|
||||
kysely-migration-cli:
|
||||
specifier: ^0.4.2
|
||||
version: 0.4.2
|
||||
ldapjs:
|
||||
specifier: ^3.0.7
|
||||
version: 3.0.7
|
||||
marked:
|
||||
specifier: ^13.0.3
|
||||
version: 13.0.3
|
||||
@ -460,6 +463,9 @@ importers:
|
||||
nodemailer:
|
||||
specifier: ^6.9.14
|
||||
version: 6.9.14
|
||||
ntlm-server:
|
||||
specifier: ^0.1.3
|
||||
version: 0.1.3
|
||||
passport-jwt:
|
||||
specifier: ^4.0.1
|
||||
version: 4.0.1
|
||||
@ -518,6 +524,9 @@ importers:
|
||||
'@types/jest':
|
||||
specifier: ^29.5.12
|
||||
version: 29.5.12
|
||||
'@types/ldapjs':
|
||||
specifier: ^3.0.6
|
||||
version: 3.0.6
|
||||
'@types/mime-types':
|
||||
specifier: ^2.1.4
|
||||
version: 2.1.4
|
||||
@ -2279,6 +2288,42 @@ packages:
|
||||
'@jridgewell/trace-mapping@0.3.9':
|
||||
resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==}
|
||||
|
||||
'@ldapjs/asn1@1.2.0':
|
||||
resolution: {integrity: sha512-KX/qQJ2xxzvO2/WOvr1UdQ+8P5dVvuOLk/C9b1bIkXxZss8BaR28njXdPgFCpj5aHaf1t8PmuVnea+N9YG9YMw==}
|
||||
deprecated: This package has been decomissioned. See https://github.com/ldapjs/node-ldapjs/blob/8ffd0bc9c149088a10ec4c1ec6a18450f76ad05d/README.md
|
||||
|
||||
'@ldapjs/asn1@2.0.0':
|
||||
resolution: {integrity: sha512-G9+DkEOirNgdPmD0I8nu57ygQJKOOgFEMKknEuQvIHbGLwP3ny1mY+OTUYLCbCaGJP4sox5eYgBJRuSUpnAddA==}
|
||||
deprecated: This package has been decomissioned. See https://github.com/ldapjs/node-ldapjs/blob/8ffd0bc9c149088a10ec4c1ec6a18450f76ad05d/README.md
|
||||
|
||||
'@ldapjs/attribute@1.0.0':
|
||||
resolution: {integrity: sha512-ptMl2d/5xJ0q+RgmnqOi3Zgwk/TMJYG7dYMC0Keko+yZU6n+oFM59MjQOUht5pxJeS4FWrImhu/LebX24vJNRQ==}
|
||||
deprecated: This package has been decomissioned. See https://github.com/ldapjs/node-ldapjs/blob/8ffd0bc9c149088a10ec4c1ec6a18450f76ad05d/README.md
|
||||
|
||||
'@ldapjs/change@1.0.0':
|
||||
resolution: {integrity: sha512-EOQNFH1RIku3M1s0OAJOzGfAohuFYXFY4s73wOhRm4KFGhmQQ7MChOh2YtYu9Kwgvuq1B0xKciXVzHCGkB5V+Q==}
|
||||
deprecated: This package has been decomissioned. See https://github.com/ldapjs/node-ldapjs/blob/8ffd0bc9c149088a10ec4c1ec6a18450f76ad05d/README.md
|
||||
|
||||
'@ldapjs/controls@2.1.0':
|
||||
resolution: {integrity: sha512-2pFdD1yRC9V9hXfAWvCCO2RRWK9OdIEcJIos/9cCVP9O4k72BY1bLDQQ4KpUoJnl4y/JoD4iFgM+YWT3IfITWw==}
|
||||
deprecated: This package has been decomissioned. See https://github.com/ldapjs/node-ldapjs/blob/8ffd0bc9c149088a10ec4c1ec6a18450f76ad05d/README.md
|
||||
|
||||
'@ldapjs/dn@1.1.0':
|
||||
resolution: {integrity: sha512-R72zH5ZeBj/Fujf/yBu78YzpJjJXG46YHFo5E4W1EqfNpo1UsVPqdLrRMXeKIsJT3x9dJVIfR6OpzgINlKpi0A==}
|
||||
deprecated: This package has been decomissioned. See https://github.com/ldapjs/node-ldapjs/blob/8ffd0bc9c149088a10ec4c1ec6a18450f76ad05d/README.md
|
||||
|
||||
'@ldapjs/filter@2.1.1':
|
||||
resolution: {integrity: sha512-TwPK5eEgNdUO1ABPBUQabcZ+h9heDORE4V9WNZqCtYLKc06+6+UAJ3IAbr0L0bYTnkkWC/JEQD2F+zAFsuikNw==}
|
||||
deprecated: This package has been decomissioned. See https://github.com/ldapjs/node-ldapjs/blob/8ffd0bc9c149088a10ec4c1ec6a18450f76ad05d/README.md
|
||||
|
||||
'@ldapjs/messages@1.3.0':
|
||||
resolution: {integrity: sha512-K7xZpXJ21bj92jS35wtRbdcNrwmxAtPwy4myeh9duy/eR3xQKvikVycbdWVzkYEAVE5Ce520VXNOwCHjomjCZw==}
|
||||
deprecated: This package has been decomissioned. See https://github.com/ldapjs/node-ldapjs/blob/8ffd0bc9c149088a10ec4c1ec6a18450f76ad05d/README.md
|
||||
|
||||
'@ldapjs/protocol@1.2.1':
|
||||
resolution: {integrity: sha512-O89xFDLW2gBoZWNXuXpBSM32/KealKCTb3JGtJdtUQc7RjAk8XzrRgyz02cPAwGKwKPxy0ivuC7UP9bmN87egQ==}
|
||||
deprecated: This package has been decomissioned. See https://github.com/ldapjs/node-ldapjs/blob/8ffd0bc9c149088a10ec4c1ec6a18450f76ad05d/README.md
|
||||
|
||||
'@lifeomic/attempt@3.0.3':
|
||||
resolution: {integrity: sha512-GlM2AbzrErd/TmLL3E8hAHmb5Q7VhDJp35vIbyPVA5Rz55LZuRr8pwL3qrwwkVNo05gMX1J44gURKb4MHQZo7w==}
|
||||
|
||||
@ -3758,6 +3803,9 @@ packages:
|
||||
'@types/katex@0.16.7':
|
||||
resolution: {integrity: sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==}
|
||||
|
||||
'@types/ldapjs@3.0.6':
|
||||
resolution: {integrity: sha512-E2Tn1ltJDYBsidOT9QG4engaQeQzRQ9aYNxVmjCkD33F7cIeLPgrRDXAYs0O35mK2YDU20c/+ZkNjeAPRGLM0Q==}
|
||||
|
||||
'@types/methods@1.1.4':
|
||||
resolution: {integrity: sha512-ymXWVrDiCxTBE3+RIrrP533E70eA+9qu7zdWoHuOmGujkYtzf4HQF96b8nwHLqhuf4ykX61IGRIB38CC6/sImQ==}
|
||||
|
||||
@ -4131,6 +4179,10 @@ packages:
|
||||
asap@2.0.6:
|
||||
resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==}
|
||||
|
||||
assert-plus@1.0.0:
|
||||
resolution: {integrity: sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==}
|
||||
engines: {node: '>=0.8'}
|
||||
|
||||
async-lock@1.4.1:
|
||||
resolution: {integrity: sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==}
|
||||
|
||||
@ -4215,6 +4267,10 @@ packages:
|
||||
peerDependencies:
|
||||
'@babel/core': ^7.0.0
|
||||
|
||||
backoff@2.5.0:
|
||||
resolution: {integrity: sha512-wC5ihrnUXmR2douXmXLCe5O3zg3GKIyvRi/hi58a/XyRxVI+3/yM0PYueQOZXPXQ9pxBislYkw+sF9b7C/RuMA==}
|
||||
engines: {node: '>= 0.6'}
|
||||
|
||||
balanced-match@1.0.2:
|
||||
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
|
||||
|
||||
@ -4535,6 +4591,9 @@ packages:
|
||||
core-js-compat@3.35.0:
|
||||
resolution: {integrity: sha512-5blwFAddknKeNgsjBzilkdQ0+YK8L1PfqPYq40NOYMYFSS38qj+hpTcLLWwpIwA2A5bje/x5jmVn2tzUMg9IVw==}
|
||||
|
||||
core-util-is@1.0.2:
|
||||
resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==}
|
||||
|
||||
core-util-is@1.0.3:
|
||||
resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==}
|
||||
|
||||
@ -5188,6 +5247,10 @@ packages:
|
||||
resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==}
|
||||
engines: {node: '>=4'}
|
||||
|
||||
extsprintf@1.4.1:
|
||||
resolution: {integrity: sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==}
|
||||
engines: {'0': node >=0.6.0}
|
||||
|
||||
fast-content-type-parse@1.1.0:
|
||||
resolution: {integrity: sha512-fBHHqSTFLVnR61C+gltJuE5GkVQMV0S2nqUO8TJ+5Z3qAKG8vAx4FKai1s5jq/inV1+sREynIWSuQ6HgoSXpDQ==}
|
||||
|
||||
@ -6162,6 +6225,10 @@ packages:
|
||||
layout-base@1.0.2:
|
||||
resolution: {integrity: sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==}
|
||||
|
||||
ldapjs@3.0.7:
|
||||
resolution: {integrity: sha512-1ky+WrN+4CFMuoekUOv7Y1037XWdjKpu0xAPwSP+9KdvmV9PG+qOKlssDV6a+U32apwxdD3is/BZcWOYzN30cg==}
|
||||
deprecated: This package has been decomissioned. See https://github.com/ldapjs/node-ldapjs/blob/8ffd0bc9c149088a10ec4c1ec6a18450f76ad05d/README.md
|
||||
|
||||
leac@0.6.0:
|
||||
resolution: {integrity: sha512-y+SqErxb8h7nE/fiEX07jsbuhrpO9lL8eca7/Y1nuWV2moNlXhyd59iDGcRf6moVyDMbmTNzL40SUyrFU/yDpg==}
|
||||
|
||||
@ -6588,7 +6655,6 @@ packages:
|
||||
|
||||
npmlog@5.0.1:
|
||||
resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==}
|
||||
deprecated: This package is no longer supported.
|
||||
|
||||
nwsapi@2.2.10:
|
||||
resolution: {integrity: sha512-QK0sRs7MKv0tKe1+5uZIQk/C8XGza4DAnztJG8iD+TpJIORARrCxczA738awHrZoHeTjSSoHqao2teO0dC/gFQ==}
|
||||
@ -6944,6 +7010,10 @@ packages:
|
||||
postmark@4.0.5:
|
||||
resolution: {integrity: sha512-nerZdd3TwOH4CgGboZnlUM/q7oZk0EqpZgJL+Y3Nup8kHeaukxouQ6JcFF3EJEijc4QbuNv1TefGhboAKtf/SQ==}
|
||||
|
||||
precond@0.2.3:
|
||||
resolution: {integrity: sha512-QCYG84SgGyGzqJ/vlMsxeXd/pgL/I94ixdNFyh1PusWmTCyVfPJjZ1K1jvHtsbfnXQs2TSkEP2fR7QiMZAnKFQ==}
|
||||
engines: {node: '>= 0.6'}
|
||||
|
||||
prelude-ls@1.2.1:
|
||||
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
@ -6977,6 +7047,9 @@ packages:
|
||||
resolution: {integrity: sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==}
|
||||
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
|
||||
|
||||
process-warning@2.3.2:
|
||||
resolution: {integrity: sha512-n9wh8tvBe5sFmsqlg+XQhaQLumwpqoAUruLwjCopgTmUBjJ/fjtBsJzKleCaIGBOMXYEhp1YfKl4d7rJ5ZKJGA==}
|
||||
|
||||
process-warning@3.0.0:
|
||||
resolution: {integrity: sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ==}
|
||||
|
||||
@ -8146,18 +8219,6 @@ packages:
|
||||
resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}
|
||||
engines: {node: '>= 0.8'}
|
||||
|
||||
vite-plugin-pwa@0.20.5:
|
||||
resolution: {integrity: sha512-aweuI/6G6n4C5Inn0vwHumElU/UEpNuO+9iZzwPZGTCH87TeZ6YFMrEY6ZUBQdIHHlhTsbMDryFARcSuOdsz9Q==}
|
||||
engines: {node: '>=16.0.0'}
|
||||
peerDependencies:
|
||||
'@vite-pwa/assets-generator': ^0.2.6
|
||||
vite: ^3.1.0 || ^4.0.0 || ^5.0.0
|
||||
workbox-build: ^7.1.0
|
||||
workbox-window: ^7.1.0
|
||||
peerDependenciesMeta:
|
||||
'@vite-pwa/assets-generator':
|
||||
optional: true
|
||||
|
||||
vite@5.4.2:
|
||||
resolution: {integrity: sha512-dDrQTRHp5C1fTFzcSaMxjk6vdpKvT+2/mIdE07Gw2ykehT49O0z/VHS3zZ8iV/Gh8BJJKHWOe5RjaNrW5xf/GA==}
|
||||
engines: {node: ^18.0.0 || >=20.0.0}
|
||||
@ -10753,6 +10814,50 @@ snapshots:
|
||||
'@jridgewell/resolve-uri': 3.1.1
|
||||
'@jridgewell/sourcemap-codec': 1.4.15
|
||||
|
||||
'@ldapjs/asn1@1.2.0': {}
|
||||
|
||||
'@ldapjs/asn1@2.0.0': {}
|
||||
|
||||
'@ldapjs/attribute@1.0.0':
|
||||
dependencies:
|
||||
'@ldapjs/asn1': 2.0.0
|
||||
'@ldapjs/protocol': 1.2.1
|
||||
process-warning: 2.3.2
|
||||
|
||||
'@ldapjs/change@1.0.0':
|
||||
dependencies:
|
||||
'@ldapjs/asn1': 2.0.0
|
||||
'@ldapjs/attribute': 1.0.0
|
||||
|
||||
'@ldapjs/controls@2.1.0':
|
||||
dependencies:
|
||||
'@ldapjs/asn1': 1.2.0
|
||||
'@ldapjs/protocol': 1.2.1
|
||||
|
||||
'@ldapjs/dn@1.1.0':
|
||||
dependencies:
|
||||
'@ldapjs/asn1': 2.0.0
|
||||
process-warning: 2.3.2
|
||||
|
||||
'@ldapjs/filter@2.1.1':
|
||||
dependencies:
|
||||
'@ldapjs/asn1': 2.0.0
|
||||
'@ldapjs/protocol': 1.2.1
|
||||
process-warning: 2.3.2
|
||||
|
||||
'@ldapjs/messages@1.3.0':
|
||||
dependencies:
|
||||
'@ldapjs/asn1': 2.0.0
|
||||
'@ldapjs/attribute': 1.0.0
|
||||
'@ldapjs/change': 1.0.0
|
||||
'@ldapjs/controls': 2.1.0
|
||||
'@ldapjs/dn': 1.1.0
|
||||
'@ldapjs/filter': 2.1.1
|
||||
'@ldapjs/protocol': 1.2.1
|
||||
process-warning: 2.3.2
|
||||
|
||||
'@ldapjs/protocol@1.2.1': {}
|
||||
|
||||
'@lifeomic/attempt@3.0.3': {}
|
||||
|
||||
'@ljharb/through@2.3.13':
|
||||
@ -12330,6 +12435,10 @@ snapshots:
|
||||
|
||||
'@types/katex@0.16.7': {}
|
||||
|
||||
'@types/ldapjs@3.0.6':
|
||||
dependencies:
|
||||
'@types/node': 22.5.2
|
||||
|
||||
'@types/methods@1.1.4': {}
|
||||
|
||||
'@types/mime-types@2.1.4': {}
|
||||
@ -12761,6 +12870,8 @@ snapshots:
|
||||
|
||||
asap@2.0.6: {}
|
||||
|
||||
assert-plus@1.0.0: {}
|
||||
|
||||
async-lock@1.4.1: {}
|
||||
|
||||
async@3.2.5: {}
|
||||
@ -12928,6 +13039,10 @@ snapshots:
|
||||
babel-plugin-jest-hoist: 29.6.3
|
||||
babel-preset-current-node-syntax: 1.0.1(@babel/core@7.24.6)
|
||||
|
||||
backoff@2.5.0:
|
||||
dependencies:
|
||||
precond: 0.2.3
|
||||
|
||||
balanced-match@1.0.2: {}
|
||||
|
||||
base64-js@1.5.1: {}
|
||||
@ -13243,6 +13358,8 @@ snapshots:
|
||||
dependencies:
|
||||
browserslist: 4.23.0
|
||||
|
||||
core-util-is@1.0.2: {}
|
||||
|
||||
core-util-is@1.0.3: {}
|
||||
|
||||
cors@2.8.5:
|
||||
@ -14048,6 +14165,8 @@ snapshots:
|
||||
iconv-lite: 0.4.24
|
||||
tmp: 0.0.33
|
||||
|
||||
extsprintf@1.4.1: {}
|
||||
|
||||
fast-content-type-parse@1.1.0: {}
|
||||
|
||||
fast-decode-uri-component@1.0.1: {}
|
||||
@ -15277,6 +15396,23 @@ snapshots:
|
||||
|
||||
layout-base@1.0.2: {}
|
||||
|
||||
ldapjs@3.0.7:
|
||||
dependencies:
|
||||
'@ldapjs/asn1': 2.0.0
|
||||
'@ldapjs/attribute': 1.0.0
|
||||
'@ldapjs/change': 1.0.0
|
||||
'@ldapjs/controls': 2.1.0
|
||||
'@ldapjs/dn': 1.1.0
|
||||
'@ldapjs/filter': 2.1.1
|
||||
'@ldapjs/messages': 1.3.0
|
||||
'@ldapjs/protocol': 1.2.1
|
||||
abstract-logging: 2.0.1
|
||||
assert-plus: 1.0.0
|
||||
backoff: 2.5.0
|
||||
once: 1.4.0
|
||||
vasync: 2.2.1
|
||||
verror: 1.10.1
|
||||
|
||||
leac@0.6.0: {}
|
||||
|
||||
less@4.2.0:
|
||||
@ -15673,6 +15809,8 @@ snapshots:
|
||||
gauge: 3.0.2
|
||||
set-blocking: 2.0.0
|
||||
|
||||
ntlm-server@0.1.3: {}
|
||||
|
||||
nwsapi@2.2.10: {}
|
||||
|
||||
nx@19.6.3(@swc/core@1.5.25(@swc/helpers@0.5.5)):
|
||||
@ -16061,6 +16199,8 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- debug
|
||||
|
||||
precond@0.2.3: {}
|
||||
|
||||
prelude-ls@1.2.1: {}
|
||||
|
||||
prettier-linter-helpers@1.0.0:
|
||||
@ -16083,6 +16223,8 @@ snapshots:
|
||||
|
||||
proc-log@3.0.0: {}
|
||||
|
||||
process-warning@2.3.2: {}
|
||||
|
||||
process-warning@3.0.0: {}
|
||||
|
||||
process@0.11.10: {}
|
||||
@ -16965,16 +17107,7 @@ snapshots:
|
||||
mkdirp: 1.0.4
|
||||
yallist: 4.0.0
|
||||
|
||||
temp-dir@2.0.0: {}
|
||||
|
||||
tempy@0.6.0:
|
||||
dependencies:
|
||||
is-stream: 2.0.1
|
||||
temp-dir: 2.0.0
|
||||
type-fest: 0.16.0
|
||||
unique-string: 2.0.0
|
||||
|
||||
terser-webpack-plugin@5.3.10(@swc/core@1.5.25(@swc/helpers@0.5.5))(webpack@5.94.0(@swc/core@1.5.25(@swc/helpers@0.5.5))):
|
||||
terser-webpack-plugin@5.3.10(@swc/core@1.5.25)(webpack@5.94.0(@swc/core@1.5.25)):
|
||||
dependencies:
|
||||
'@jridgewell/trace-mapping': 0.3.25
|
||||
jest-worker: 27.5.1
|
||||
@ -17327,17 +17460,6 @@ snapshots:
|
||||
|
||||
vary@1.1.2: {}
|
||||
|
||||
vite-plugin-pwa@0.20.5(vite@5.4.2(@types/node@22.5.2)(less@4.2.0)(sugarss@4.0.1(postcss@8.4.43))(terser@5.29.2))(workbox-build@7.1.1(@types/babel__core@7.20.5))(workbox-window@7.1.0):
|
||||
dependencies:
|
||||
debug: 4.3.7
|
||||
pretty-bytes: 6.1.1
|
||||
tinyglobby: 0.2.9
|
||||
vite: 5.4.2(@types/node@22.5.2)(less@4.2.0)(sugarss@4.0.1(postcss@8.4.43))(terser@5.29.2)
|
||||
workbox-build: 7.1.1(@types/babel__core@7.20.5)
|
||||
workbox-window: 7.1.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
vite@5.4.2(@types/node@22.5.2)(less@4.2.0)(sugarss@4.0.1(postcss@8.4.43))(terser@5.29.2):
|
||||
dependencies:
|
||||
esbuild: 0.21.5
|
||||
|
||||
Reference in New Issue
Block a user