@longzai-intelligence-docs/config 0.0.16 → 0.0.18
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 +32 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -33,6 +33,29 @@ type PackageConfig = {
|
|
|
33
33
|
*/
|
|
34
34
|
docs?: DocsConfig;
|
|
35
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* 内置插件配置条目
|
|
38
|
+
*
|
|
39
|
+
* 消费仓按内置插件名声明启用宿主内置插件——宿主装配以 entry 缺省
|
|
40
|
+
* 识别内置条目并按声明名应用 options
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
* entry 禁填以 `entry?: never` 收口——填值即外部形态,混写由类型拒绝
|
|
44
|
+
*/
|
|
45
|
+
type BuiltinPluginEntry = {
|
|
46
|
+
/**
|
|
47
|
+
* 禁填的内置形态判别位——宿主按 entry 缺省识别内置插件
|
|
48
|
+
*/
|
|
49
|
+
entry?: never;
|
|
50
|
+
/**
|
|
51
|
+
* 是否启用(缺省启用)
|
|
52
|
+
*/
|
|
53
|
+
enabled?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* 插件自有配置(形态由插件 configSchema 约定,宿主不做闭集校验)
|
|
56
|
+
*/
|
|
57
|
+
options?: Record<string, unknown>;
|
|
58
|
+
};
|
|
36
59
|
/**
|
|
37
60
|
* 外部插件配置条目(plugins 节)
|
|
38
61
|
*
|
|
@@ -53,6 +76,12 @@ type ExternalPluginEntry = {
|
|
|
53
76
|
*/
|
|
54
77
|
options?: Record<string, unknown>;
|
|
55
78
|
};
|
|
79
|
+
/**
|
|
80
|
+
* 插件配置条目判别联合
|
|
81
|
+
*
|
|
82
|
+
* 以 entry 有无判别——缺省为内置插件条目,必填为外部自持插件条目
|
|
83
|
+
*/
|
|
84
|
+
type PluginEntry = BuiltinPluginEntry | ExternalPluginEntry;
|
|
56
85
|
/**
|
|
57
86
|
* 同步工具完整配置
|
|
58
87
|
*/
|
|
@@ -78,9 +107,9 @@ type DocsSyncConfig = {
|
|
|
78
107
|
*/
|
|
79
108
|
packages?: Record<string, PackageConfig>;
|
|
80
109
|
/**
|
|
81
|
-
*
|
|
110
|
+
* 插件声明——插件名映射到配置条目,覆盖内置与外部自持插件的启用面
|
|
82
111
|
*/
|
|
83
|
-
plugins?: Record<string,
|
|
112
|
+
plugins?: Record<string, PluginEntry>;
|
|
84
113
|
};
|
|
85
114
|
/**
|
|
86
115
|
* 预设定义
|
|
@@ -131,4 +160,4 @@ type ResolvedDoc = {
|
|
|
131
160
|
*/
|
|
132
161
|
declare function defineConfig(config: DocsSyncConfig): DocsSyncConfig;
|
|
133
162
|
//#endregion
|
|
134
|
-
export { type DocEntry, type DocsConfig, type DocsSyncConfig, type ExternalPluginEntry, type Lockfile, type PackageConfig, type Preset, type ResolvedDoc, defineConfig };
|
|
163
|
+
export { type BuiltinPluginEntry, type DocEntry, type DocsConfig, type DocsSyncConfig, type ExternalPluginEntry, type Lockfile, type PackageConfig, type PluginEntry, type Preset, type ResolvedDoc, defineConfig };
|