@longzai-intelligence-release/config 0.0.7 → 0.0.9
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 +10 -17
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -133,18 +133,10 @@ type LziReleaseConfig = {
|
|
|
133
133
|
declare const defineConfig: (config: LziReleaseConfig) => LziReleaseConfig;
|
|
134
134
|
//#endregion
|
|
135
135
|
//#region src/load.config.d.ts
|
|
136
|
-
/**
|
|
137
|
-
* 新配置来源(lzi-release.config.ts 或统一 lzi.config.ts 的 release 字段)
|
|
138
|
-
*/
|
|
139
|
-
type ReleaseSourceNew = 'release';
|
|
140
|
-
/**
|
|
141
|
-
* 兼容回退来源(lzi-dev.config.ts 或统一 lzi.config.ts 的 devTools 字段的 publish 字段)
|
|
142
|
-
*/
|
|
143
|
-
type ReleaseSourceLegacy = 'legacy-dev-tools';
|
|
144
136
|
/**
|
|
145
137
|
* 配置来源
|
|
146
138
|
*/
|
|
147
|
-
type ReleaseConfigSource =
|
|
139
|
+
type ReleaseConfigSource = 'release';
|
|
148
140
|
/**
|
|
149
141
|
* 配置加载结果
|
|
150
142
|
*/
|
|
@@ -158,29 +150,30 @@ type ReleaseConfigResult = {
|
|
|
158
150
|
*/
|
|
159
151
|
configPath: string;
|
|
160
152
|
/**
|
|
161
|
-
*
|
|
153
|
+
* 配置来源
|
|
162
154
|
*/
|
|
163
155
|
source: ReleaseConfigSource;
|
|
164
156
|
};
|
|
165
157
|
/**
|
|
166
158
|
* 查找配置文件路径
|
|
167
159
|
*
|
|
168
|
-
*
|
|
169
|
-
* 均未找到时返回 null
|
|
160
|
+
* 仅查找 `lzi-release.config.ts`,未找到时返回 null
|
|
170
161
|
*
|
|
162
|
+
* @remarks
|
|
163
|
+
* 原 `lzi-dev.config.ts` 兼容回退探测已按 2026-10-17 用户裁定移除,
|
|
164
|
+
* 仅存 `lzi-dev.config.ts` 的仓由此得到明确的未找到配置报错
|
|
171
165
|
* @returns 配置文件的绝对路径,如果找不到则返回 null
|
|
172
166
|
*/
|
|
173
167
|
declare const findReleaseConfigFile: () => string | null;
|
|
174
168
|
/**
|
|
175
169
|
* 加载发布配置
|
|
176
170
|
*
|
|
177
|
-
*
|
|
171
|
+
* 按两级优先读取:
|
|
178
172
|
*
|
|
179
|
-
* - lzi-release.config.ts
|
|
180
|
-
* -
|
|
181
|
-
* - 两轨 standalone 均要求存在其一(与 dev-tools 时代行为一致:统一配置不能单独成立)
|
|
173
|
+
* - `lzi-release.config.ts` 即 standalone 配置优先,未命中时读统一配置 `lzi.config.ts` 的 `release` 字段
|
|
174
|
+
* - standalone 配置必须存在,统一配置不能单独成立
|
|
182
175
|
*
|
|
183
|
-
* @returns
|
|
176
|
+
* @returns 配置加载结果,配置文件不存在时返回 null
|
|
184
177
|
* @throws {@link Error} 如果配置文件存在但加载失败
|
|
185
178
|
*/
|
|
186
179
|
declare const loadReleaseConfig: () => Promise<ReleaseConfigResult | null>;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{loadUnifiedConfig as e,resolveStandaloneConfigPath as t}from"@longzai-intelligence-shared-config/core";const n=e=>e,r=`lzi-release.config.ts`,i
|
|
1
|
+
import{loadUnifiedConfig as e,resolveStandaloneConfigPath as t}from"@longzai-intelligence-shared-config/core";const n=e=>e,r=`lzi-release.config.ts`,i=()=>t(r),a=async()=>{let t=i();if(!t)return null;let n=await e({standaloneFile:r,unifiedField:`release`});return n.success?{config:n.config,configPath:t,source:`release`}:{config:{},configPath:t,source:`release`}};export{n as defineConfig,i as findReleaseConfigFile,a as loadReleaseConfig};
|