Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ lerna-debug.log*
# 临时文件
logs/
/temp/
packages/core/docs/guide/api/types/

# 配置
packages/core/plugins
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
".env": "*.env",
"tsconfig.json": "tsconfig.*.json, env.d.ts, tsup.*.ts, vite.*.ts",
"tsconfig.json": "tsconfig.*.json, env.d.ts, tsup.*.ts, vite.*.ts, typedoc.json",
"package.json": "package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .prettier*, prettier*, .editorconfig, CHANGELOG*.md, CODE_OF_CONDUCT.md, *.gitignore, LICENSE, README.md, .release*.json, .gitattributes"
},
"files.autoSave": "onFocusChange",
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
"terser": "^5.39.0",
"tsup": "^8.4.0",
"tsx": "^4.19.3",
"typedoc": "0.28.14",
"typedoc-plugin-markdown": "4.9.0",
"typedoc-vitepress-theme": "^1.1.2",
"typescript": "^5.8.2",
"vite": "^6.3.6",
"vite-plugin-dts": "^4.5.4",
Expand Down
3 changes: 2 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@
"pub": "npm publish --access public",
"pub-beta": "npm publish --access public --tag beta",
"sort": "sort-package-json && sort-json tsconfig.json",
"sync": "curl -X PUT \"https://registry-direct.npmmirror.com/-/package/node-karin/syncs\""
"sync": "curl -X PUT \"https://registry-direct.npmmirror.com/-/package/node-karin/syncs\"",
"docs:build": "typedoc"
},
"dependencies": {
"art-template": "npm:@karinjs/art-template@1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/adapter/render/admin/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export declare interface ScreenshotOptions {
/**
* 图像的编码方式。
*
* @deprecated 这是无效选项,强制性返回string<base64>
* @deprecated 这是无效选项,强制性返回base64编码的字符串
*/
encoding?: 'base64' | 'binary'
Comment on lines 73 to 78
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议: 澄清编码选项的弃用消息。

在弃用消息中明确指出用户应该使用什么替代方案,或者明确说明该选项已被忽略,以防止混淆。

Suggested change
/**
* 图像的编码方式。
*
* @deprecated 这是无效选项,强制性返回string<base64>
* @deprecated 这是无效选项,强制性返回base64编码的字符串
*/
encoding?: 'base64' | 'binary'
/**
* 图像的编码方式。
*
* @deprecated 此选项已被弃用且会被忽略,始终返回 base64 编码的字符串。请勿使用该选项,直接依赖默认行为即可。
*/
encoding?: 'base64' | 'binary'
Original comment in English

suggestion: Clarify the deprecation message for encoding option.

Specify in the deprecation message what users should use instead, or clearly state that the option is ignored to prevent confusion.

Suggested change
/**
* 图像的编码方式。
*
* @deprecated 这是无效选项,强制性返回string<base64>
* @deprecated 这是无效选项,强制性返回base64编码的字符串
*/
encoding?: 'base64' | 'binary'
/**
* 图像的编码方式。
*
* @deprecated 此选项已被弃用且会被忽略,始终返回 base64 编码的字符串。请勿使用该选项,直接依赖默认行为即可。
*/
encoding?: 'base64' | 'binary'

/**
Expand Down
75 changes: 75 additions & 0 deletions packages/core/typedoc.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/** @type {Partial<import("typedoc").TypeDocOptions>} */
const config = {
$schema: 'https://typedoc.org/schema.json',
entryPoints: [
'src/index.ts',
],
docsRoot: './',
out: './docs/guide/api/types',
theme: 'default',
name: 'Karin API Docs',
readme: '../../README.md',
lang: 'zh',
exclude: [
'**/*.test.ts',
'**/*.spec.ts',
'**/node_modules/**',
],
excludePrivate: false,
excludeProtected: false,
excludeInternal: true,
hideGenerator: true,
kindSortOrder: [
'Document',
'Project',
'Module',
'Namespace',
'Enum',
'EnumMember',
'Class',
'Interface',
'TypeAlias',
'Constructor',
'Property',
'Variable',
'Function',
'Accessor',
'Method',
'Parameter',
'TypeParameter',
'TypeLiteral',
'CallSignature',
'ConstructorSignature',
'IndexSignature',
'GetSignature',
'SetSignature',
],
categorizeByGroup: true,
defaultCategory: '其他',
categoryOrder: [
'主要功能',
'工具函数',
'类型定义',
'接口',
'枚举',
'其他',
],
gitRevision: 'main',
gitRemote: 'origin',
includeVersion: true,
searchInComments: true,
searchInDocuments: true,
treatWarningsAsErrors: false,
logLevel: 'Error',
skipErrorChecking: true,
blockTags: [
'@description',
'@version',
],
plugin: [
'typedoc-plugin-markdown',
'typedoc-vitepress-theme',
],
}

export default config
Loading
Loading