@plugin-light/shared 1.0.3 → 1.0.14

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.
Files changed (45) hide show
  1. package/lib/cdn/index.d.ts +1 -0
  2. package/lib/css/index.d.ts +1 -1
  3. package/lib/email/index.d.ts +1 -0
  4. package/lib/email/watch-unread.d.ts +103 -0
  5. package/lib/font-project/config.d.ts +15 -0
  6. package/lib/font-project/font-project.d.ts +75 -0
  7. package/lib/font-project/index.d.ts +2 -0
  8. package/lib/icon-project/config.d.ts +23 -0
  9. package/lib/icon-project/icon-project.d.ts +83 -0
  10. package/lib/icon-project/index.d.ts +2 -0
  11. package/lib/image/config.d.ts +23 -0
  12. package/lib/image/image.d.ts +67 -0
  13. package/lib/image/index.d.ts +3 -0
  14. package/lib/image/upload-core.d.ts +83 -0
  15. package/lib/index.d.ts +34 -20
  16. package/lib/index.js +2069 -342
  17. package/lib/index.mjs +2506 -0
  18. package/lib/landun/cos-sync-to-git.d.ts +12 -0
  19. package/lib/landun/index.d.ts +2 -0
  20. package/lib/landun/start.d.ts +42 -0
  21. package/lib/mcp/auth.d.ts +24 -0
  22. package/lib/mcp/http.d.ts +34 -0
  23. package/lib/mcp/index.d.ts +3 -0
  24. package/lib/mcp/mcp.d.ts +27 -0
  25. package/lib/mp-ci/config.d.ts +11 -0
  26. package/lib/mp-ci/helper.d.ts +12 -0
  27. package/lib/mp-ci/index.d.ts +5 -0
  28. package/lib/mp-ci/mp-ci.d.ts +73 -0
  29. package/lib/mp-ci/record.d.ts +39 -0
  30. package/lib/mp-ci/start-from-mcp.d.ts +42 -0
  31. package/lib/npm-publish/index.d.ts +1 -0
  32. package/lib/pipeline/index.d.ts +1 -0
  33. package/lib/pipeline/pipeline.d.ts +4 -0
  34. package/lib/pipeline-npm-publish/core.d.ts +53 -0
  35. package/lib/pipeline-npm-publish/helper.d.ts +7 -0
  36. package/lib/pipeline-npm-publish/index.d.ts +2 -0
  37. package/lib/repo/index.d.ts +1 -0
  38. package/lib/repo/repo.d.ts +7 -0
  39. package/lib/tinypng/index.d.ts +1 -0
  40. package/lib/tinypng/tinypng.d.ts +18 -0
  41. package/lib/white-user/config.d.ts +53 -0
  42. package/lib/white-user/cron.d.ts +15 -0
  43. package/lib/white-user/index.d.ts +3 -0
  44. package/lib/white-user/update-cos.d.ts +47 -0
  45. package/package.json +25 -3
@@ -0,0 +1,12 @@
1
+ /**
2
+ * COS 同步到 Git 的选项
3
+ */
4
+ export interface CosSyncToGitOptions {
5
+ /** 操作员名称 */
6
+ staffName?: string;
7
+ }
8
+ /**
9
+ * 将 COS 文件同步到 Git 仓库
10
+ * @param options - 同步选项
11
+ */
12
+ export declare function cosSyncToGit({ staffName, }: CosSyncToGitOptions): Promise<void>;
@@ -0,0 +1,2 @@
1
+ export { cosSyncToGit, type CosSyncToGitOptions, } from './cos-sync-to-git';
2
+ export { startPipelineByRawApi, type StartPipelineResult, } from './start';
@@ -0,0 +1,42 @@
1
+ /**
2
+ * 启动流水线参数
3
+ */
4
+ interface StartPipelineParams {
5
+ /** 流水线参数数据 */
6
+ data: Record<string, unknown>;
7
+ /** 流水线 ID */
8
+ pipelineId: string;
9
+ /** 用户名 */
10
+ userName?: string;
11
+ /** 项目 ID */
12
+ projectId?: string;
13
+ }
14
+ /**
15
+ * 启动流水线返回结果
16
+ */
17
+ export interface StartPipelineResult {
18
+ /** 状态 */
19
+ status: boolean;
20
+ /** 错误消息 */
21
+ message?: string;
22
+ /** 返回数据 */
23
+ data: {
24
+ /** 构建 ID */
25
+ id: string;
26
+ /** 流水线 ID */
27
+ pipelineId: string;
28
+ /** 项目 ID */
29
+ projectId: string;
30
+ /** 构建编号 */
31
+ num: number;
32
+ /** 执行次数 */
33
+ executeCount: number;
34
+ };
35
+ }
36
+ /**
37
+ * 通过原始 API 启动蓝盾流水线
38
+ * @param params - 启动参数
39
+ * @returns 流水线执行结果
40
+ */
41
+ export declare function startPipelineByRawApi({ data, pipelineId, userName, projectId: pId, }: StartPipelineParams): Promise<StartPipelineResult>;
42
+ export {};
@@ -0,0 +1,24 @@
1
+ /**
2
+ * 研发平台 MCP 公共认证模块
3
+ */
4
+ /**
5
+ * 解析命令行参数
6
+ * @param defaultApiUrl 默认的 API URL
7
+ * @returns 包含 rid, rtoken, apiUrl 和所有其他参数的对象
8
+ */
9
+ export declare function parseMCPCommandLineArgs(defaultApiUrl: string): {
10
+ rid: string;
11
+ rtoken: string;
12
+ apiUrl: string;
13
+ [key: string]: string;
14
+ };
15
+ /**
16
+ * 验证凭证
17
+ */
18
+ export declare function validateMCPCredentials(rid: string, rtoken: string): {
19
+ content: {
20
+ type: "text";
21
+ text: string;
22
+ }[];
23
+ isError: boolean;
24
+ } | null;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * HTTP 调用结果
3
+ */
4
+ export interface ApiResult {
5
+ success: boolean;
6
+ message?: string;
7
+ data?: any;
8
+ code?: number;
9
+ }
10
+ /**
11
+ * 通用错误处理
12
+ */
13
+ export declare function handleAxiosError(error: any, actionName: string): ApiResult;
14
+ /**
15
+ * Package.json 结构
16
+ */
17
+ interface PackageJson {
18
+ name: string;
19
+ version: string;
20
+ [key: string]: any;
21
+ }
22
+ /**
23
+ * 调用研发平台 API
24
+ * @param apiUrl API 地址
25
+ * @param requestBody 请求体
26
+ * @param rid 用户 rid
27
+ * @param rtoken 用户 token
28
+ * @param pkg package.json 对象(用于获取 MCP 名称和版本)
29
+ * @example
30
+ * import pkg from '../package.json';
31
+ * await callRdApi(apiUrl, requestBody, rid, rtoken, pkg);
32
+ */
33
+ export declare function callRdMCPApi(apiUrl: string, requestBody: Record<string, unknown>, rid: string, rtoken: string, pkg: PackageJson): Promise<ApiResult>;
34
+ export {};
@@ -0,0 +1,3 @@
1
+ export { parseMCPCommandLineArgs, validateMCPCredentials, } from './auth';
2
+ export { callRdMCPApi, handleAxiosError, type ApiResult, } from './http';
3
+ export { getMcpName, getMcpVersion, } from './mcp';
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Package.json 结构
3
+ */
4
+ interface PackageJson {
5
+ name: string;
6
+ version: string;
7
+ [key: string]: any;
8
+ }
9
+ /**
10
+ * 获取 MCP 名称(去掉 前缀)
11
+ * @param pkg package.json 对象
12
+ * @returns MCP 名称
13
+ * @example
14
+ * import pkg from '../package.json';
15
+ * const mcpName = getMcpName(pkg);
16
+ */
17
+ export declare function getMcpName(pkg: PackageJson): string;
18
+ /**
19
+ * 获取 MCP 版本
20
+ * @param pkg package.json 对象
21
+ * @returns 版本号
22
+ * @example
23
+ * import pkg from '../package.json';
24
+ * const mcpVersion = getMcpVersion(pkg);
25
+ */
26
+ export declare function getMcpVersion(pkg: PackageJson): string;
27
+ export {};
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 小程序 CI 模板 ID 映射
3
+ */
4
+ export declare const TEMPLATE_ID_MAP: {
5
+ /** 微信小程序 CI 模板 ID */
6
+ readonly WX_MP_CI: "864ecf9343fb4748adfdecde92712401";
7
+ /** QQ 小程序 CI 模板 ID */
8
+ readonly QQ_MP_CI: "6c13205d64fe4a42889db131b5e47d03";
9
+ /** Cypress 自动化测试模板 ID */
10
+ readonly CYPRESS_AUTO_TEST: "f7b13cf8929343a1bd56949e5463dfc4";
11
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * 根据分支获取环境
3
+ * @param branch - 分支名称
4
+ * @returns 环境名称,release 分支返回 'release',其他返回 'test'
5
+ */
6
+ export declare function getEnvByBranch(branch: string): string;
7
+ /**
8
+ * 解析发布原因,替换特殊字符
9
+ * @param str - 原始发布原因字符串
10
+ * @returns 处理后的发布原因字符串
11
+ */
12
+ export declare function parsePublishReason(str?: string): string;
@@ -0,0 +1,5 @@
1
+ export { getRainbowConfig, updateMpCiConfig, getAllMpPipeline, getMpCICommonConfig, getMpCIKeyConfig, } from './mp-ci';
2
+ export { TEMPLATE_ID_MAP, } from './config';
3
+ export { startMpCIPipeline, } from './start-from-mcp';
4
+ export { addMPPublishRecord, } from './record';
5
+ export { getEnvByBranch, parsePublishReason, } from './helper';
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Rainbow 配置查询参数
3
+ */
4
+ interface RainbowConfigParams {
5
+ /** 研发平台项目 ID */
6
+ rdProjectId?: string;
7
+ /** 项目名称 */
8
+ projectName?: string;
9
+ /** 子项目名称 */
10
+ subProject: string;
11
+ }
12
+ /**
13
+ * Rainbow 配置项
14
+ */
15
+ interface RainbowConfigItem {
16
+ /** Rainbow Key */
17
+ rainbowKey: string;
18
+ /** 研发平台项目 ID */
19
+ rdProjectId?: string;
20
+ /** 子项目名称 */
21
+ subProject?: string;
22
+ [key: string]: any;
23
+ }
24
+ /**
25
+ * 获取小程序 CI 通用配置
26
+ * @returns 通用配置对象
27
+ */
28
+ export declare function getMpCICommonConfig(): Promise<unknown>;
29
+ /**
30
+ * 获取 Rainbow 配置
31
+ * @param params - 查询参数
32
+ * @returns Rainbow 配置项列表
33
+ */
34
+ export declare function getRainbowConfig({ rdProjectId, projectName, subProject, }: RainbowConfigParams): Promise<RainbowConfigItem[]>;
35
+ /**
36
+ * 更新小程序 CI 配置
37
+ * @param value - 配置值
38
+ * @param key - 配置 Key
39
+ */
40
+ export declare function updateMpCiConfig(value: unknown, key: string): Promise<void>;
41
+ /**
42
+ * 获取所有小程序流水线实例
43
+ * @returns 微信和 QQ 小程序流水线实例
44
+ */
45
+ export declare function getAllMpPipeline(): Promise<{
46
+ wxInstances: {
47
+ templateId: string;
48
+ versionName: string;
49
+ version: number;
50
+ pipelineId: string;
51
+ pipelineName: string;
52
+ updateTime: number;
53
+ hasPermission: boolean;
54
+ status: string;
55
+ }[];
56
+ qqInstances: {
57
+ templateId: string;
58
+ versionName: string;
59
+ version: number;
60
+ pipelineId: string;
61
+ pipelineName: string;
62
+ updateTime: number;
63
+ hasPermission: boolean;
64
+ status: string;
65
+ }[];
66
+ }>;
67
+ /**
68
+ * 获取指定 Key 的小程序 CI 配置
69
+ * @param key - 配置 Key
70
+ * @returns 配置值
71
+ */
72
+ export declare function getMpCIKeyConfig(key: string): Promise<unknown>;
73
+ export {};
@@ -0,0 +1,39 @@
1
+ /**
2
+ * 添加小程序发布记录参数
3
+ */
4
+ interface AddMPPublishRecordParams {
5
+ /** 操作员名称 */
6
+ staffName: string;
7
+ /** 仓库地址 */
8
+ repo: string;
9
+ /** 子项目名称 */
10
+ subProjectName: string;
11
+ /** 分支名称 */
12
+ branch: string;
13
+ /** 环境名称 */
14
+ env: string;
15
+ /** 是否为微信小程序 */
16
+ isWeixin?: boolean;
17
+ /** 流水线 ID */
18
+ pipelineId: string;
19
+ /** 流水线运行 ID */
20
+ pipelineRunId: string;
21
+ /** 发布原因 */
22
+ publishReason?: string;
23
+ /** 是否来自 MCP */
24
+ fromMcp?: boolean;
25
+ /** MCP 名称 */
26
+ mcpName?: string;
27
+ /** MCP 版本 */
28
+ version?: string;
29
+ /** 操作记录工具 */
30
+ operationTool: any;
31
+ /** MCP 数据库实例 */
32
+ mcpDB?: any;
33
+ }
34
+ /**
35
+ * 添加小程序发布记录
36
+ * @param params - 记录参数
37
+ */
38
+ export declare function addMPPublishRecord({ staffName, repo, subProjectName, branch, env, isWeixin, pipelineId, pipelineRunId, publishReason, fromMcp, mcpName, version, operationTool, mcpDB, }: AddMPPublishRecordParams): Promise<void>;
39
+ export {};
@@ -0,0 +1,42 @@
1
+ /**
2
+ * 启动小程序 CI 流水线参数
3
+ */
4
+ interface StartMpCIPipelineParams {
5
+ /** 仓库地址 */
6
+ repo: string;
7
+ /** 子项目名称 */
8
+ subProject: string;
9
+ /** 分支名称 */
10
+ branch: string;
11
+ /** 操作员名称 */
12
+ staffName: string;
13
+ /** 是否为微信小程序 */
14
+ isWeixin?: boolean;
15
+ /** 发布原因 */
16
+ publishReason?: string;
17
+ /** MCP 名称 */
18
+ mcpName?: string;
19
+ /** MCP 版本 */
20
+ mcpVersion?: string;
21
+ /** 启动流水线函数 */
22
+ startPipeline: any;
23
+ /** 操作记录工具 */
24
+ operationTool: any;
25
+ /** MCP 数据库实例 */
26
+ mcpDB?: any;
27
+ }
28
+ /**
29
+ * 启动小程序 CI 流水线
30
+ * @param params - 启动参数
31
+ * @returns 执行结果
32
+ */
33
+ export declare function startMpCIPipeline({ repo: rawRepo, subProject, branch, staffName, isWeixin, publishReason, mcpName, mcpVersion, startPipeline, operationTool, mcpDB, }: StartMpCIPipelineParams): Promise<{
34
+ r: number;
35
+ msg: string;
36
+ result?: undefined;
37
+ } | {
38
+ r: any;
39
+ msg: any;
40
+ result: any;
41
+ }>;
42
+ export {};
@@ -0,0 +1 @@
1
+ export { NPM_PACKAGES_LIST, type NpmPackageConfig } from '@plugin-light/const';
@@ -0,0 +1 @@
1
+ export { getPipelineRunLink } from './pipeline';
@@ -0,0 +1,4 @@
1
+ export declare function getPipelineRunLink({ pipelineId, pipelineRunId, }: {
2
+ pipelineId: string;
3
+ pipelineRunId: string;
4
+ }): string;
@@ -0,0 +1,53 @@
1
+ /**
2
+ * 启动 NPM 发布流水线表单参数
3
+ */
4
+ interface NPMPublishForm {
5
+ /** 分支名称 */
6
+ branch: string;
7
+ /** 发布原因 */
8
+ publishReason: string;
9
+ /** 版本类型 */
10
+ versionType: string;
11
+ /** 是否发布到外网 NPM */
12
+ publishExternalNPM?: boolean;
13
+ /** 发布的子包名称 */
14
+ publishPackage?: string;
15
+ }
16
+ /**
17
+ * 启动 NPM 发布流水线核心参数
18
+ */
19
+ interface StartNPMPublishPipelineCoreParams {
20
+ /** 表单参数 */
21
+ form: NPMPublishForm;
22
+ /** 操作员名称 */
23
+ staffName: string;
24
+ /** 远程流水线 ID */
25
+ remotePipelineId: string;
26
+ /** 组件标题 */
27
+ componentTitle: string;
28
+ /** MCP 数据库实例 */
29
+ mcpDB?: any;
30
+ /** 是否来自 MCP */
31
+ fromMcp?: boolean;
32
+ /** MCP 名称 */
33
+ mcpName?: string;
34
+ /** MCP 版本 */
35
+ mcpVersion?: string;
36
+ /** 操作记录工具 */
37
+ operationTool: any;
38
+ }
39
+ /**
40
+ * 启动 NPM 发布流水线核心函数
41
+ * @param params - 启动参数
42
+ * @returns 执行结果
43
+ */
44
+ export declare function startNPMPublishPipelineCore({ form, staffName, remotePipelineId, componentTitle, mcpDB, fromMcp, mcpName, mcpVersion, operationTool, }: StartNPMPublishPipelineCoreParams): Promise<{
45
+ r: number;
46
+ result: import("../landun/start").StartPipelineResult;
47
+ msg?: undefined;
48
+ } | {
49
+ r: number;
50
+ msg: any;
51
+ result?: undefined;
52
+ }>;
53
+ export {};
@@ -0,0 +1,7 @@
1
+ import { type NpmPackageConfig } from '@plugin-light/const';
2
+ /**
3
+ * 根据 repo 获取组件配置
4
+ * @param repo 仓库地址,支持 SSH 和 HTTPS 格式
5
+ * @returns 组件配置,未找到则返回 null
6
+ */
7
+ export declare function getComponentByRepo(repo: string): NpmPackageConfig | null;
@@ -0,0 +1,2 @@
1
+ export { startNPMPublishPipelineCore, } from './core';
2
+ export { getComponentByRepo, } from './helper';
@@ -0,0 +1 @@
1
+ export { extractRepoPath } from './repo';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 从 repo 地址中提取仓库路径
3
+ * 支持 git@git.aow.com:pmd-mobile/pmd-h5/plugin-light.git 和 https://github.com/novlan1/plugin-light 两种格式
4
+ * @param repo 仓库地址
5
+ * @returns 仓库路径,如 pmd-mobile/pmd-h5/plugin-light
6
+ */
7
+ export declare function extractRepoPath(repo: string): string;
@@ -0,0 +1 @@
1
+ export { compressFileUseTinypng, } from './tinypng';
@@ -0,0 +1,18 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ /**
4
+ * 文件输入接口
5
+ */
6
+ export interface FileInput {
7
+ /** 文件路径 */
8
+ path?: string;
9
+ /** 文件缓冲区 */
10
+ buffer?: Buffer;
11
+ }
12
+ /**
13
+ * 使用 TinyPNG 压缩文件
14
+ * @param file - 输入文件
15
+ * @returns 压缩后的文件路径或缓冲区
16
+ * @throws 如果所有 API Key 都失败则抛出错误
17
+ */
18
+ export declare function compressFileUseTinypng(file: FileInput): Promise<string | Buffer>;
@@ -0,0 +1,53 @@
1
+ /**
2
+ * 白名单类型项接口
3
+ */
4
+ export interface WhiteTypeItem {
5
+ /** 显示标签 */
6
+ label: string;
7
+ /** 类型值 */
8
+ value: string;
9
+ /** 文件名 */
10
+ file?: string;
11
+ /** CDN 地址 */
12
+ cdn?: string;
13
+ }
14
+ /**
15
+ * 白名单 Rainbow 配置接口
16
+ */
17
+ export interface WhiteRainbowConfig {
18
+ /** 白名单类型列表 */
19
+ whiteTypeList?: WhiteTypeItem[];
20
+ /** 白名单类型映射 */
21
+ whiteTypeMap: Record<string, WhiteTypeItem>;
22
+ [key: string]: any;
23
+ }
24
+ /**
25
+ * 白名单用户状态映射
26
+ */
27
+ export declare const WHITE_USER_STATUS_MAP: {
28
+ /** 待处理 */
29
+ readonly PENDING: 0;
30
+ /** 成功 */
31
+ readonly SUCCESS: 1;
32
+ /** 失败 */
33
+ readonly FAIL: 2;
34
+ };
35
+ /**
36
+ * 白名单用户流水线 ID
37
+ */
38
+ export declare const WHITE_USER_PIPELINE_ID = "p-cd935542953b4057884920da801d9feb";
39
+ /**
40
+ * 白名单用户 CDN 刷新流水线 ID
41
+ */
42
+ export declare const WHITE_USER_CDN_REFRESH_PIPELINE_ID = "p-24d52115511f4fb8bacdd95114ff044d";
43
+ /**
44
+ * 获取白名单 Rainbow 配置
45
+ * @returns 白名单配置对象
46
+ */
47
+ export declare function getWhiteRainbowConfig(): Promise<WhiteRainbowConfig>;
48
+ /**
49
+ * 获取白名单类型描述
50
+ * @param whiteType - 白名单类型
51
+ * @returns 白名单类型的显示标签
52
+ */
53
+ export declare function getWhiteTypeDesc(whiteType: string): Promise<string | undefined>;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * 创建更新白名单用户 COS 的定时任务参数
3
+ */
4
+ interface CreateUpdateWhiteUserCosCronParams {
5
+ /** 白名单用户数据库实例 */
6
+ WhiteUserDB: any;
7
+ /** 启动流水线函数 */
8
+ startPipeline: any;
9
+ }
10
+ /**
11
+ * 创建更新白名单用户 COS 的定时任务
12
+ * @param params - 定时任务参数
13
+ */
14
+ export declare function createUpdateWhiteUserCosCron({ WhiteUserDB, startPipeline, }: CreateUpdateWhiteUserCosCronParams): void;
15
+ export {};
@@ -0,0 +1,3 @@
1
+ export { WHITE_USER_STATUS_MAP, WHITE_USER_CDN_REFRESH_PIPELINE_ID, WHITE_USER_PIPELINE_ID, getWhiteTypeDesc, getWhiteRainbowConfig, type WhiteTypeItem, type WhiteRainbowConfig, } from './config';
2
+ export { updateWhiteUserCosByDb, type UpdateCosByDbOptions, type WhiteUserItem, type FileInfo, } from './update-cos';
3
+ export { createUpdateWhiteUserCosCron, } from './cron';
@@ -0,0 +1,47 @@
1
+ /**
2
+ * 白名单用户项接口
3
+ */
4
+ export interface WhiteUserItem {
5
+ /** 用户 OpenID */
6
+ openId: string;
7
+ /** 白名单类型 */
8
+ whiteType: string;
9
+ /** 开始时间戳 */
10
+ startTime: number;
11
+ /** 有效时长(秒) */
12
+ validTime: number;
13
+ /** 申请者 */
14
+ applyUser?: string;
15
+ [key: string]: any;
16
+ }
17
+ /**
18
+ * 文件信息接口
19
+ */
20
+ export interface FileInfo {
21
+ /** 文件名 */
22
+ fileName: string;
23
+ /** 文件内容(OpenID 列表) */
24
+ fileContent: string[];
25
+ /** 显示标签 */
26
+ label?: string;
27
+ /** CDN 地址 */
28
+ cdn?: string;
29
+ }
30
+ /**
31
+ * 更新 COS 数据库选项
32
+ */
33
+ export interface UpdateCosByDbOptions {
34
+ /** 构建 ID */
35
+ buildId?: string;
36
+ /** 是否来自定时任务 */
37
+ fromCron?: boolean;
38
+ /** 白名单用户数据库实例 */
39
+ WhiteUserDB: any;
40
+ /** 启动流水线函数 */
41
+ startPipeline: any;
42
+ }
43
+ /**
44
+ * 根据数据库更新白名单用户 COS 文件
45
+ * @param options - 更新选项
46
+ */
47
+ export declare function updateWhiteUserCosByDb(options?: UpdateCosByDbOptions): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plugin-light/shared",
3
- "version": "1.0.3",
3
+ "version": "1.0.14",
4
4
  "homepage": "https://novlan1.github.io/docs/plugin-light/zh/plugin-light-shared.html",
5
5
  "bugs": {
6
6
  "url": "https://github.com/novlan1/plugin-light/issues"
@@ -11,13 +11,35 @@
11
11
  },
12
12
  "license": "MIT",
13
13
  "author": "novlan1",
14
- "main": "./lib/index",
14
+ "exports": {
15
+ ".": {
16
+ "import": "./lib/index.mjs",
17
+ "require": "./lib/index.js"
18
+ }
19
+ },
20
+ "main": "lib/index.js",
21
+ "module": "lib/index.mjs",
15
22
  "files": [
16
23
  "lib/"
17
24
  ],
18
25
  "dependencies": {
26
+ "axios": "^1.7.0",
27
+ "croner": "^9.1.0",
28
+ "imapflow": "^1.0.172",
19
29
  "loader-utils": "^2.0.4",
20
- "t-comm": "^3.0.22"
30
+ "mailparser": "^3.7.2",
31
+ "t-comm": "latest",
32
+ "tinify": "^1.8.2",
33
+ "turndown": "^7.2.2",
34
+ "@plugin-light/const": "^0.1.2"
35
+ },
36
+ "devDependencies": {
37
+ "@types/mailparser": "^3.4.5",
38
+ "@types/turndown": "^5.0.6"
39
+ },
40
+ "publishConfig": {
41
+ "access": "public",
42
+ "registry": "https://registry.npmjs.org/"
21
43
  },
22
44
  "scripts": {
23
45
  "build": "rm -rf lib && rollup -c",