@candriajs/git-neko-kit 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1099,7 +1099,7 @@ interface MilestoneType {
1099
1099
  type IssueInfoParamType = RepoBaseParamType & IssueNumberParamType;
1100
1100
  /** 议题详情响应类型 */
1101
1101
  interface IssueInfoResponseType {
1102
- /** 议题ID */
1102
+ /** 问题id */
1103
1103
  id: IssueNumberParamType['issue_number'];
1104
1104
  /** 议题HTML页面URL */
1105
1105
  html_url: string;
@@ -1135,7 +1135,7 @@ interface IssueInfoResponseType {
1135
1135
  updated_at: string;
1136
1136
  }
1137
1137
  /** 议题列表参数类型 */
1138
- type RepoIssueListParamType = RepoBaseParamType & {
1138
+ interface RepoIssueListParamType extends RepoBaseParamType {
1139
1139
  /**
1140
1140
  * 里程碑筛选
1141
1141
  * @default *
@@ -1208,7 +1208,7 @@ type RepoIssueListParamType = RepoBaseParamType & {
1208
1208
  * @default 1
1209
1209
  */
1210
1210
  page?: number;
1211
- };
1211
+ }
1212
1212
  /** 议题列表响应类型 */
1213
1213
  type IssueListResponseType = IssueInfoResponseType[];
1214
1214
  /** 创建议题参数类型 */
@@ -1227,9 +1227,7 @@ type CreteIssueParamType = RepoBaseParamType & {
1227
1227
  /** 创建议题响应类型 */
1228
1228
  type CreateIssueResponseType = IssueInfoResponseType;
1229
1229
  /** 更新议题参数类型 */
1230
- interface UpdateIssueParamType extends Omit<CreteIssueParamType, 'title' | 'type'> {
1231
- /** 问题ID */
1232
- issue_number: IssueNumberParamType['issue_number'];
1230
+ interface UpdateIssueParamType extends Omit<CreteIssueParamType, 'title' | 'type'>, IssueNumberParamType {
1233
1231
  /** 问题的名称 */
1234
1232
  title?: string | null;
1235
1233
  /** 问题的内容 */
@@ -1248,9 +1246,7 @@ type CloseIssueParamType = OpenIssueParamType;
1248
1246
  /** 关闭议题响应类型 */
1249
1247
  type CloseIssueResponseType = IssueInfoResponseType;
1250
1248
  /** 锁定议题参数类型 */
1251
- interface LockIssueParamType extends RepoBaseParamType {
1252
- /** 议题ID */
1253
- issue_number: IssueNumberParamType['issue_number'];
1249
+ interface LockIssueParamType extends RepoBaseParamType, IssueNumberParamType {
1254
1250
  /**
1255
1251
  * 锁定原因
1256
1252
  * 可以是以下之一:
@@ -1278,10 +1274,7 @@ interface UnLockIssueResponseType {
1278
1274
  message: LockIssueResponseType['message'];
1279
1275
  }
1280
1276
  /** 议题评论信息参数类型 */
1281
- interface IssueCommentInfoParamType extends RepoBaseParamType {
1282
- /** 评论id,评论唯一标识符 */
1283
- comment_id: string | number;
1284
- }
1277
+ type IssueCommentInfoParamType = RepoBaseParamType & CommentIdParamType;
1285
1278
  /** 议题评论信息响应类型 */
1286
1279
  interface IssueCommentInfoResponseType {
1287
1280
  /** 评论ID */
@@ -1343,7 +1336,7 @@ type RepoCommentsListResponseType = IssueCommentInfoResponseType[];
1343
1336
  /** 议题评论列表参数类型 */
1344
1337
  interface IssueCommentsListParamType extends RepoBaseParamType {
1345
1338
  /** 议题ID */
1346
- issue_number: number;
1339
+ issue_number: IssueNumberParamType['issue_number'];
1347
1340
  /**
1348
1341
  * 筛选此时间之后更新的评论
1349
1342
  * 仅显示在指定时间之后更新的结果
@@ -2071,6 +2064,39 @@ declare function get_local_repo_default_branch(local_path: string): Promise<stri
2071
2064
  */
2072
2065
  declare function get_remote_repo_default_branch(remote_url: string): Promise<string>;
2073
2066
 
2067
+ /**
2068
+ * 渲染 markdown 内容为 HTML
2069
+ * @description 使用配置好的 markdown-it 实例渲染 markdown 内容
2070
+ * @param md - 要渲染的 markdown 字符串
2071
+ * @returns 渲染后的 HTML 字符串
2072
+ * @example
2073
+ * ```ts
2074
+ * const html = await render_markdown(`# 标题
2075
+ * - 无序列表项1
2076
+ * - 无序列表项2
2077
+ * - 子列表项
2078
+ *
2079
+ * 1. 有序列表项1
2080
+ * 2. 有序列表项2
2081
+ * `);
2082
+ *
2083
+ * // 输出结果:
2084
+ * // <h1>标题</h1>
2085
+ * // <ul style="list-style: none;">
2086
+ * // <li>无序列表项1</li>
2087
+ * // <li>无序列表项2</li>
2088
+ * // <ul style="list-style: none;">
2089
+ * // <li>子列表项</li>
2090
+ * // </ul>
2091
+ * // </ul>
2092
+ * // <ol style="list-style: none;">
2093
+ * // <li>有序列表项1</li>
2094
+ * // <li>有序列表项2</li>
2095
+ * // </ol>
2096
+ * ```
2097
+ */
2098
+ declare function render_markdown(md: string): Promise<string>;
2099
+
2074
2100
  /**
2075
2101
  * 获取本地 NPM 包信息
2076
2102
  * @description 获取本地 NPM 包信息
@@ -4130,4 +4156,4 @@ declare class Client {
4130
4156
  constructor(options: ClientType);
4131
4157
  }
4132
4158
 
4133
- export { type AccessCodeType, type AccessTokenClentTYpe, type AccessTokenPermissionsType, type AccessTokenType, type AddCollaboratorResponseType, type AddMemberParamType, type AddMemberResponseType, type ApiResponseType, type AppClientType, type AppInfoParamType, type AppInfoResponseType, type AppPermissions, type AppRepoInfoResponseType, type AppUser, type BaseProxyType, type CheckTokenResponseType, Client, type ClientType, type CloseIssueParamType, type CloseIssueResponseType, type CollaboratorInfoResponseType, type CollaboratorParamType, type CollaboratorPermissionType, type CommentIdParamType, type Commit$1 as Commit, type CommitInfoCommonParamType, type CommitInfoParamType, type CommitInfoResponseType, type CommitListParamType, type CommitListResponseType, type CommitStats, type ContributionData, type ContributionResult, type CreateAccessTokenForAppParamType, type CreateAccessTokenForAppResponseType, type CreateIssueResponseType, type CreatePullRequestCommentParamType, type CreatePullRequestCommentResponseType, type CreatePullRequestParamType, type CreatePullRequestResponseType, type CreateReleaseParamType, type CreateReleaseResponseType, type CreateSubIssueParamType, type CreateSubIssueResponseType, type CreteIssueCommentParamType, type CreteIssueCommentResponseType, type CreteIssueParamType, type DeletePullRequestCommentParamType, type DeletePullRequestCommentResponseType, type DeleteReleaseParamType, type DeleteReleaseResponseType, type DiffEntry, type DisEnableRepoWorkflowParamType, type DisEnableRepoWorkflowResponseType, type EnableRepoWorkflowParamType, type EnableRepoWorkflowResponseType, type GetAppInfoByOrgParamType, type GetAppInfoByOrgResponseType, type GetAppInfoByRepoParamType, type GetAppInfoByRepoResponseType, type GetAppInfoByUserParamType, type GetAppInfoByUserResponseType, type GetCollaboratorListParamType, type GetCollaboratorListResponseType, type GetOrgMemberInfoParamType, type GetOrgMemberInfoResponseType, type GetOrgMemberListParamType, type GetOrgMemberListResponseType, type GetOrgMemberListType, type GetPullRequestCommentInfoParamType, type GetPullRequestCommentInfoResponseType, type GetPullRequestCommentsListParamType, type GetPullRequestCommentsListResponseType, type GetPullRequestFilesListParamType, type GetPullRequestFilesListResponseType, type GetRepoDefaultBranchParamType, type GetRepoDefaultBranchResponseType, type GetRepoMainLanguageParamType, type GetRepoMainLanguageResponseType, type GetRepoVisibilityParamType, type GetRepoVisibilityResponseType, type GetRepoWorkflowsList, type GetRepoWorkflowsListResponseType, type GitHubBaseClient, GitHubClient, type GitHubClientType, type GitInfoListType, type GitRepoInfoListOptionsType, type GitRepoInfoType, type GitRepoType, type GitType, type GitUser, type IssueCommentInfoParamType, type IssueCommentInfoResponseType, type IssueCommentsListParamType, type IssueCommentsListResponseType, type IssueInfoParamType, type IssueInfoResponseType, type IssueLabelType, type IssueListResponseType, type IssueNumberParamType, type IssueUser, type LanguageInfo, type LockIssueParamType, type LockIssueResponseType, type MergeMethodType, type MergePullRequestParamType, type MergePullRequestResponseType, type MilestoneType, type NpmPackageInfoListOptionsType, type NpmPackageInfoListType, type NpmPackageInfoType, type OpenIssueParamType, type OpenIssueResponseType, type OrgInfoParamType, type OrgInfoResponseType, type OrgNameParamType, type OrgRepoCreateParamType, type OrgRepoCreateResponseType, type OrgRepoListParmType, type OrgRepoListResponseType, type OrgUser, type ParentCommit, type PkgInfoType, type PrRepo, type PrUser, type ProxyParamsType, ProxyProtocol, ProxyType, type ProxyUrlType, type PullRequestFilesListType, type PullRequestInfoParamType, type PullRequestInfoResponseType, type PullRequestListParamType, type PullRequestListResponseType, type PullRequestNumberParamType, type ReRunRepoWorkflowParamType, type ReRunRepoWorkflowResponseType, type ReactionInfoType, type RefreshTokenResponseType, type RefreshTokenType, type ReleaseAssetsType, type ReleaseInfoByTagParamType, type ReleaseInfoByTagResponseType, type ReleaseInfoParamType, type ReleaseInfoResponseType, type ReleaseLatestParamTypeType, type ReleaseLatestResponseType, type ReleaseListParamType, type ReleaseListResponseType, type ReleaseUser, type RemoveCollaboratorParamType, type RemoveCollaboratorResponseType, type RemoveIssueCommentParamType, type RemoveIssueCommentResponseType, type RemoveOrgMemberParamType, type RemoveOrgMemberResponseType, type RemoveSubIssueParamType, type RemoveSubIssueResponseType, type RepoBaseParamType, type RepoCommentsListParamType, type RepoCommentsListResponseType, type RepoInfoParamType, type RepoInfoResponseType, type RepoIssueListParamType, type RepoLanguagesListParamType, type RepoLanguagesListResponseType, type RepoListBaseParamType, type RepoNameParamType, type RepoOwnerParamType, type RepoParamType, type RepoUrlParamType, type RepoUser, type ReprioritizeSubIssueParamType, type ReprioritizeSubIssueResponseType, type RequestConfigType, type RequestTokenType, type ResponseHeadersType, type ResponseMsgType, type ResponseStatusCodeType, type ResponseSuccessType, type ResponseType, type RevokeAccessTokenResponseType, type RoleNameType, type RunRepoWorkflow, type RunRepoWorkflowResponseType, type SearchRepo, type SearchReposParamType, type SearchReposResponseType, type SearchUser, type SearchUsersParamType, type SearchUsersResponseType, type ShaParamType, type SubIssueListParamType, type SubIssueListResponseType, type TokenResponseType, type UnLockIssueParamType, type UnLockIssueResponseType, type UpdateIssueCommentParamType, type UpdateIssueCommentResponseType, type UpdateIssueParamType, type UpdateIssueResponseType, type UpdatePullRequestCommentParamType, type UpdatePullRequestCommentResponseType, type UpdatePullRequestParamType, type UpdatePullRequestResponseType, type UpdateReleaseParamType, type UpdateReleaseResponseType, type UserByTokenRepoListParamType, type UserIdParamType, type UserInfoByIdParamType, type UserInfoParamType, type UserInfoResponseType, type UserNameParamType, type UserRepoCreateParamType, type UserRepoCreateResponseType, type UserRepoListParamType, type UserRepoListType, type WebHookSignatureParamType, type WebHookSignatureResponseType, type WorkflowInfoParamType, type WorkflowInfoResponseType, WorkflowState, create_state_id, Client as default, type formatParamType, format_date, get_langage_color, get_local_git_repo_info, get_local_git_repos_list, get_local_npm_package_info, get_local_npm_packages_list, get_local_repo_default_branch, get_relative_time, get_remote_repo_default_branch, index as github, type isAppInstalledInRepo, type workflowIdParamType };
4159
+ export { type AccessCodeType, type AccessTokenClentTYpe, type AccessTokenPermissionsType, type AccessTokenType, type AddCollaboratorResponseType, type AddMemberParamType, type AddMemberResponseType, type ApiResponseType, type AppClientType, type AppInfoParamType, type AppInfoResponseType, type AppPermissions, type AppRepoInfoResponseType, type AppUser, type BaseProxyType, type CheckTokenResponseType, Client, type ClientType, type CloseIssueParamType, type CloseIssueResponseType, type CollaboratorInfoResponseType, type CollaboratorParamType, type CollaboratorPermissionType, type CommentIdParamType, type Commit$1 as Commit, type CommitInfoCommonParamType, type CommitInfoParamType, type CommitInfoResponseType, type CommitListParamType, type CommitListResponseType, type CommitStats, type ContributionData, type ContributionResult, type CreateAccessTokenForAppParamType, type CreateAccessTokenForAppResponseType, type CreateIssueResponseType, type CreatePullRequestCommentParamType, type CreatePullRequestCommentResponseType, type CreatePullRequestParamType, type CreatePullRequestResponseType, type CreateReleaseParamType, type CreateReleaseResponseType, type CreateSubIssueParamType, type CreateSubIssueResponseType, type CreteIssueCommentParamType, type CreteIssueCommentResponseType, type CreteIssueParamType, type DeletePullRequestCommentParamType, type DeletePullRequestCommentResponseType, type DeleteReleaseParamType, type DeleteReleaseResponseType, type DiffEntry, type DisEnableRepoWorkflowParamType, type DisEnableRepoWorkflowResponseType, type EnableRepoWorkflowParamType, type EnableRepoWorkflowResponseType, type GetAppInfoByOrgParamType, type GetAppInfoByOrgResponseType, type GetAppInfoByRepoParamType, type GetAppInfoByRepoResponseType, type GetAppInfoByUserParamType, type GetAppInfoByUserResponseType, type GetCollaboratorListParamType, type GetCollaboratorListResponseType, type GetOrgMemberInfoParamType, type GetOrgMemberInfoResponseType, type GetOrgMemberListParamType, type GetOrgMemberListResponseType, type GetOrgMemberListType, type GetPullRequestCommentInfoParamType, type GetPullRequestCommentInfoResponseType, type GetPullRequestCommentsListParamType, type GetPullRequestCommentsListResponseType, type GetPullRequestFilesListParamType, type GetPullRequestFilesListResponseType, type GetRepoDefaultBranchParamType, type GetRepoDefaultBranchResponseType, type GetRepoMainLanguageParamType, type GetRepoMainLanguageResponseType, type GetRepoVisibilityParamType, type GetRepoVisibilityResponseType, type GetRepoWorkflowsList, type GetRepoWorkflowsListResponseType, type GitHubBaseClient, GitHubClient, type GitHubClientType, type GitInfoListType, type GitRepoInfoListOptionsType, type GitRepoInfoType, type GitRepoType, type GitType, type GitUser, type IssueCommentInfoParamType, type IssueCommentInfoResponseType, type IssueCommentsListParamType, type IssueCommentsListResponseType, type IssueInfoParamType, type IssueInfoResponseType, type IssueLabelType, type IssueListResponseType, type IssueNumberParamType, type IssueUser, type LanguageInfo, type LockIssueParamType, type LockIssueResponseType, type MergeMethodType, type MergePullRequestParamType, type MergePullRequestResponseType, type MilestoneType, type NpmPackageInfoListOptionsType, type NpmPackageInfoListType, type NpmPackageInfoType, type OpenIssueParamType, type OpenIssueResponseType, type OrgInfoParamType, type OrgInfoResponseType, type OrgNameParamType, type OrgRepoCreateParamType, type OrgRepoCreateResponseType, type OrgRepoListParmType, type OrgRepoListResponseType, type OrgUser, type ParentCommit, type PkgInfoType, type PrRepo, type PrUser, type ProxyParamsType, ProxyProtocol, ProxyType, type ProxyUrlType, type PullRequestFilesListType, type PullRequestInfoParamType, type PullRequestInfoResponseType, type PullRequestListParamType, type PullRequestListResponseType, type PullRequestNumberParamType, type ReRunRepoWorkflowParamType, type ReRunRepoWorkflowResponseType, type ReactionInfoType, type RefreshTokenResponseType, type RefreshTokenType, type ReleaseAssetsType, type ReleaseInfoByTagParamType, type ReleaseInfoByTagResponseType, type ReleaseInfoParamType, type ReleaseInfoResponseType, type ReleaseLatestParamTypeType, type ReleaseLatestResponseType, type ReleaseListParamType, type ReleaseListResponseType, type ReleaseUser, type RemoveCollaboratorParamType, type RemoveCollaboratorResponseType, type RemoveIssueCommentParamType, type RemoveIssueCommentResponseType, type RemoveOrgMemberParamType, type RemoveOrgMemberResponseType, type RemoveSubIssueParamType, type RemoveSubIssueResponseType, type RepoBaseParamType, type RepoCommentsListParamType, type RepoCommentsListResponseType, type RepoInfoParamType, type RepoInfoResponseType, type RepoIssueListParamType, type RepoLanguagesListParamType, type RepoLanguagesListResponseType, type RepoListBaseParamType, type RepoNameParamType, type RepoOwnerParamType, type RepoParamType, type RepoUrlParamType, type RepoUser, type ReprioritizeSubIssueParamType, type ReprioritizeSubIssueResponseType, type RequestConfigType, type RequestTokenType, type ResponseHeadersType, type ResponseMsgType, type ResponseStatusCodeType, type ResponseSuccessType, type ResponseType, type RevokeAccessTokenResponseType, type RoleNameType, type RunRepoWorkflow, type RunRepoWorkflowResponseType, type SearchRepo, type SearchReposParamType, type SearchReposResponseType, type SearchUser, type SearchUsersParamType, type SearchUsersResponseType, type ShaParamType, type SubIssueListParamType, type SubIssueListResponseType, type TokenResponseType, type UnLockIssueParamType, type UnLockIssueResponseType, type UpdateIssueCommentParamType, type UpdateIssueCommentResponseType, type UpdateIssueParamType, type UpdateIssueResponseType, type UpdatePullRequestCommentParamType, type UpdatePullRequestCommentResponseType, type UpdatePullRequestParamType, type UpdatePullRequestResponseType, type UpdateReleaseParamType, type UpdateReleaseResponseType, type UserByTokenRepoListParamType, type UserIdParamType, type UserInfoByIdParamType, type UserInfoParamType, type UserInfoResponseType, type UserNameParamType, type UserRepoCreateParamType, type UserRepoCreateResponseType, type UserRepoListParamType, type UserRepoListType, type WebHookSignatureParamType, type WebHookSignatureResponseType, type WorkflowInfoParamType, type WorkflowInfoResponseType, WorkflowState, create_state_id, Client as default, type formatParamType, format_date, get_langage_color, get_local_git_repo_info, get_local_git_repos_list, get_local_npm_package_info, get_local_npm_packages_list, get_local_repo_default_branch, get_relative_time, get_remote_repo_default_branch, index as github, type isAppInstalledInRepo, render_markdown, type workflowIdParamType };