@longzai-intelligence-typecheck/config 0.0.1 → 0.0.2
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 +12 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -9,11 +9,20 @@ import { ConfigLoadResult } from "@longzai-intelligence-shared-config/core";
|
|
|
9
9
|
/**
|
|
10
10
|
* 预设身份清单
|
|
11
11
|
*/
|
|
12
|
-
declare const PRESET_KEYS: readonly ['fumadocs'];
|
|
12
|
+
declare const PRESET_KEYS: readonly ['fumadocs', 'electron'];
|
|
13
13
|
/**
|
|
14
14
|
* 预设身份联合类型
|
|
15
15
|
*/
|
|
16
16
|
type TypecheckPresetKind = (typeof PRESET_KEYS)[number];
|
|
17
|
+
/**
|
|
18
|
+
* 预设必备分片映射
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* 键为预设身份,值为该预设要求的分片名清单即 `tsconfig` 目录内分片配置
|
|
22
|
+
* 文件的基名,`electron` 预设沿产品群桌面脚手架约定要求 `main` 与
|
|
23
|
+
* `preload` 与 `renderer` 三片全备,无分片要求的预设映射空清单
|
|
24
|
+
*/
|
|
25
|
+
declare const PRESET_PIECE_REQUIREMENTS: Record<TypecheckPresetKind, readonly string[]>;
|
|
17
26
|
/**
|
|
18
27
|
* tsconfig 分片布局联合类型
|
|
19
28
|
*
|
|
@@ -88,6 +97,7 @@ declare const loadTypecheckUnitConfig: (unitDir: string) => Promise<ConfigLoadRe
|
|
|
88
97
|
*/
|
|
89
98
|
declare const lziTypecheckConfigSchema: zod.ZodObject<{
|
|
90
99
|
preset: zod.ZodEnum<{
|
|
100
|
+
electron: "electron";
|
|
91
101
|
fumadocs: "fumadocs";
|
|
92
102
|
}>;
|
|
93
103
|
layout: zod.ZodEnum<{
|
|
@@ -96,4 +106,4 @@ declare const lziTypecheckConfigSchema: zod.ZodObject<{
|
|
|
96
106
|
}>;
|
|
97
107
|
preSteps: zod.ZodArray<zod.ZodString>;
|
|
98
108
|
}, zod.core.$strip>;
|
|
99
|
-
export { CONFIG_FILENAME, type CreateBaseTypecheckConfigOptions, type LziTypecheckConfig, PRESET_KEYS, type TypecheckLayoutKind, type TypecheckPresetKind, createBaseTypecheckConfig, loadTypecheckUnitConfig, lziTypecheckConfigSchema };
|
|
109
|
+
export { CONFIG_FILENAME, type CreateBaseTypecheckConfigOptions, type LziTypecheckConfig, PRESET_KEYS, PRESET_PIECE_REQUIREMENTS, 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`],i=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=e.object({preset:e.enum(r),layout:e.enum([`pieces`,`single`]),preSteps:e.array(e.string().min(1))}),o=e=>{let t=a.safeParse(e);if(!t.success){let e=t.error.issues[0];throw Error(`预设基座配置不合法:${e===void 0?`结构不符`:e.message}`)}return t.data},s=t({configFilename:`lzi-typecheck.config.ts`,schema:a,shapeHint:`含 preset 与 layout 与 preSteps 字段的单元配置`,notFoundMessage:`当前单元根目录缺少 lzi-typecheck.config.ts,缺省走自动探测模式,仅带前置链的技术栈单元需要提供,例如 fumadocs 文档站单元`}),c=s.CONFIG_FILENAME,l=e=>s.loadConfig(n(e,c));export{c as CONFIG_FILENAME,r as PRESET_KEYS,i as PRESET_PIECE_REQUIREMENTS,o as createBaseTypecheckConfig,l as loadTypecheckUnitConfig,a as lziTypecheckConfigSchema};
|