arvid-e 8 месяцев назад
Родитель
Сommit
74e7fdec64

+ 4 - 0
apps/app/config/i18next.config.d.ts

@@ -0,0 +1,4 @@
+/** @type {import('@growi/core/dist/interfaces').Lang} */
+export const defaultLang: import('@growi/core/dist/interfaces').Lang;
+/** @type {import('i18next').InitOptions} */
+export const initOptions: import('i18next').InitOptions;

+ 25 - 0
apps/app/config/logger/config.dev.d.ts

@@ -0,0 +1,25 @@
+declare const _exports: {
+    default: string;
+    'growi:crowi': string;
+    'growi:crowi:express-init': string;
+    'growi:models:external-account': string;
+    'growi:routes:login': string;
+    'growi:routes:login-passport': string;
+    'growi:middleware:safe-redirect': string;
+    'growi:service:PassportService': string;
+    'growi:service:s2s-messaging:*': string;
+    'growi:service:yjs': string;
+    'growi:service:yjs:*': string;
+    'growi:lib:search': string;
+    'growi-plugin:*': string;
+    'growi:service:search-delegator:elasticsearch': string;
+    'growi:service:g2g-transfer': string;
+    'growi:service:questionnaire': string;
+    'growi:migration:add-installed-date-to-config': string;
+    'growi:cli:bootstrap': string;
+    'growi:cli:app': string;
+    'growi:services:*': string;
+    'growi:searchResultList': string;
+    'growi:service:openai': string;
+};
+export = _exports;

+ 6 - 0
apps/app/config/logger/config.prod.d.ts

@@ -0,0 +1,6 @@
+declare const _exports: {
+    default: string;
+    'growi:routes:login-passport': string;
+    'growi:service:PassportService': string;
+};
+export = _exports;

+ 2 - 0
apps/app/config/next-i18next.config.d.ts

@@ -0,0 +1,2 @@
+declare const _exports: import('next-i18next').UserConfig;
+export = _exports;

+ 16 - 0
apps/app/resource/Contributor.d.ts

@@ -0,0 +1,16 @@
+export = contributors;
+declare const contributors: {
+    order: number;
+    sectionName: string;
+    additionalClass: string;
+    memberGroups: {
+        additionalClass: string;
+        members: ({
+            name: string;
+            position?: undefined;
+        } | {
+            position: string;
+            name: string;
+        })[];
+    }[];
+}[];

+ 11 - 1
apps/app/src/services/renderer/remark-plugins/codeblock.ts

@@ -3,9 +3,15 @@ import type { Schema as SanitizeOption } from 'hast-util-sanitize';
 import type { InlineCode as MdastInlineCode, Html, Text } from 'mdast';
 import type { Plugin } from 'unified';
 import type { Node, Parent, Point } from 'unist';
-import { visit } from 'unist-util-visit';
 
 
+let visit: typeof import('unist-util-visit').visit;
+
+(async () => {
+  const mod = await import('unist-util-visit');
+  visit = mod.visit;
+})();
+
 type InlineCode = MdastInlineCode & {
   data?: {
     hProperties?: Properties;
@@ -30,6 +36,10 @@ export const remarkPlugin: Plugin = () => {
   return (tree: Node) => {
     const defaultPoint: Point = { line: 1, column: 1, offset: 0 };
 
+    if (typeof visit === 'undefined') {
+        return tree;
+    }
+
     visit(tree, 'html', (node: Html, index: number | undefined, parent: Parent | undefined) => {
       // Find <code> tag
       if (typeof node.value === 'string' && node.value.toLowerCase() === '<code>') {