@longzai-intelligence-typecheck/config 0.0.2 → 0.0.3
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 +35 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,40 @@ type TypecheckPresetKind = (typeof PRESET_KEYS)[number];
|
|
|
23
23
|
* `preload` 与 `renderer` 三片全备,无分片要求的预设映射空清单
|
|
24
24
|
*/
|
|
25
25
|
declare const PRESET_PIECE_REQUIREMENTS: Record<TypecheckPresetKind, readonly string[]>;
|
|
26
|
+
/**
|
|
27
|
+
* 依赖区段名
|
|
28
|
+
*
|
|
29
|
+
* 探测只读单元 `package.json` 的 `dependencies` 与 `devDependencies` 两区段
|
|
30
|
+
*/
|
|
31
|
+
type DependencySectionName = 'dependencies' | 'devDependencies';
|
|
32
|
+
/**
|
|
33
|
+
* 单条技术栈签名
|
|
34
|
+
*/
|
|
35
|
+
type TechStackSignature = {
|
|
36
|
+
/**
|
|
37
|
+
* 预设身份,成员与 `PRESET_KEYS` 对齐
|
|
38
|
+
*/
|
|
39
|
+
preset: TypecheckPresetKind;
|
|
40
|
+
/**
|
|
41
|
+
* 依赖名前缀族清单,依赖名等于族名或以连字符族名开头即命中
|
|
42
|
+
*/
|
|
43
|
+
dependencyPrefixes: readonly string[];
|
|
44
|
+
/**
|
|
45
|
+
* 探测的依赖区段
|
|
46
|
+
*/
|
|
47
|
+
section: DependencySectionName;
|
|
48
|
+
/**
|
|
49
|
+
* 该预设是否携带前置链,携带者零配置时前置链被跳过即须运行态告警
|
|
50
|
+
*/
|
|
51
|
+
carriesPreChain: boolean;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* 技术栈签名清单
|
|
55
|
+
*
|
|
56
|
+
* fumadocs 签名为 `fumadocs` 家族即依赖名 `fumadocs` 本体或 `fumadocs-` 前缀
|
|
57
|
+
* 任一命中,electron 签名为 `electron` 族命中 `devDependencies`
|
|
58
|
+
*/
|
|
59
|
+
declare const TECH_STACK_SIGNATURES: readonly TechStackSignature[];
|
|
26
60
|
/**
|
|
27
61
|
* tsconfig 分片布局联合类型
|
|
28
62
|
*
|
|
@@ -106,4 +140,4 @@ declare const lziTypecheckConfigSchema: zod.ZodObject<{
|
|
|
106
140
|
}>;
|
|
107
141
|
preSteps: zod.ZodArray<zod.ZodString>;
|
|
108
142
|
}, zod.core.$strip>;
|
|
109
|
-
export { CONFIG_FILENAME, type CreateBaseTypecheckConfigOptions, type LziTypecheckConfig, PRESET_KEYS, PRESET_PIECE_REQUIREMENTS, type TypecheckLayoutKind, type TypecheckPresetKind, createBaseTypecheckConfig, loadTypecheckUnitConfig, lziTypecheckConfigSchema };
|
|
143
|
+
export { CONFIG_FILENAME, type CreateBaseTypecheckConfigOptions, type DependencySectionName, type LziTypecheckConfig, PRESET_KEYS, PRESET_PIECE_REQUIREMENTS, TECH_STACK_SIGNATURES, type TechStackSignature, type TypecheckLayoutKind, type TypecheckPresetKind, createBaseTypecheckConfig, loadTypecheckUnitConfig, lziTypecheckConfigSchema };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-BqT_7tdF.js";import*as e from"zod";import{createDomainConfigLoader as t}from"@longzai-intelligence-shared-config/core";import{join as n}from"node:path";const r=[`fumadocs`,`electron`],i={fumadocs:[],electron:[`main`,`preload`,`renderer`]},a=e.object({preset:e.enum(r),layout:e.enum([`pieces`,`single`]),preSteps:e.array(e.string().min(1))}),
|
|
1
|
+
import"./rolldown-runtime-BqT_7tdF.js";import*as e from"zod";import{createDomainConfigLoader as t}from"@longzai-intelligence-shared-config/core";import{join as n}from"node:path";const r=[`fumadocs`,`electron`],i={fumadocs:[],electron:[`main`,`preload`,`renderer`]},a=[{preset:`fumadocs`,dependencyPrefixes:[`fumadocs`],section:`dependencies`,carriesPreChain:!0},{preset:`electron`,dependencyPrefixes:[`electron`],section:`devDependencies`,carriesPreChain:!1}],o=e.object({preset:e.enum(r),layout:e.enum([`pieces`,`single`]),preSteps:e.array(e.string().min(1))}),s=e=>{let t=o.safeParse(e);if(!t.success){let e=t.error.issues[0];throw Error(`预设基座配置不合法:${e===void 0?`结构不符`:e.message}`)}return t.data},c=t({configFilename:`lzi-typecheck.config.ts`,schema:o,shapeHint:`含 preset 与 layout 与 preSteps 字段的单元配置`,notFoundMessage:`当前单元根目录缺少 lzi-typecheck.config.ts,缺省走自动探测模式,仅带前置链的技术栈单元需要提供,例如 fumadocs 文档站单元`}),l=c.CONFIG_FILENAME,u=e=>c.loadConfig(n(e,l));export{l as CONFIG_FILENAME,r as PRESET_KEYS,i as PRESET_PIECE_REQUIREMENTS,a as TECH_STACK_SIGNATURES,s as createBaseTypecheckConfig,u as loadTypecheckUnitConfig,o as lziTypecheckConfigSchema};
|