@longzai-intelligence-release/config 0.0.8 → 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 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 = ReleaseSourceNew | ReleaseSourceLegacy;
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
- * 配置来源(legacy 命中时由调用方输出弃用提示)
153
+ * 配置来源
162
154
  */
163
155
  source: ReleaseConfigSource;
164
156
  };
165
157
  /**
166
158
  * 查找配置文件路径
167
159
  *
168
- * 优先查找 lzi-release.config.ts,其次 lzi-dev.config.ts(兼容回退),
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
- * 三级优先(ADR 0087):
171
+ * 按两级优先读取:
178
172
  *
179
- * - lzi-release.config.ts(standalone)> lzi.config.ts 的 release 字段(统一配置)
180
- * - 均未命中时兼容回退 lzi-dev.config.ts 的 publish 字段(或 lzi.config.ts 的 devTools 字段)
181
- * - 两轨 standalone 均要求存在其一(与 dev-tools 时代行为一致:统一配置不能单独成立)
173
+ * - `lzi-release.config.ts` 即 standalone 配置优先,未命中时读统一配置 `lzi.config.ts` 的 `release` 字段
174
+ * - standalone 配置必须存在,统一配置不能单独成立
182
175
  *
183
- * @returns 配置加载结果;任一配置文件都不存在时返回 null
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=`lzi-dev.config.ts`,a=()=>t(r)??t(i),o=async()=>{let t=a();if(!t)return null;let n=await e({standaloneFile:r,unifiedField:`release`});if(n.success)return{config:n.config,configPath:t,source:`release`};let o=await e({standaloneFile:i,unifiedField:`devTools`});return o.success&&o.config.publish!==void 0?{config:{publish:o.config.publish},configPath:t,source:`legacy-dev-tools`}:{config:{},configPath:t,source:`release`}};export{n as defineConfig,a as findReleaseConfigFile,o as loadReleaseConfig};
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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longzai-intelligence-release/config",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Longzai Intelligence 发布工具配置类型定义与加载器",
5
5
  "keywords": [
6
6
  "config",