@applift/core 0.7.0 → 0.7.1
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.mjs +4 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -285,13 +285,14 @@ async function loadProjectConfig(cwd) {
|
|
|
285
285
|
packageJson: false,
|
|
286
286
|
defaults: ProjectConfigSchema.parse({})
|
|
287
287
|
});
|
|
288
|
-
const
|
|
288
|
+
const raw = result.config ?? {};
|
|
289
|
+
const parsed = ProjectConfigSchema.safeParse(raw);
|
|
289
290
|
if (!parsed.success) {
|
|
290
291
|
const details = parsed.error.issues.map((i) => `${i.path.join(".") || "(根)"}: ${i.message}`).join(";");
|
|
291
292
|
throw new Error(`applift.config.ts 字段校验失败 → ${details}`);
|
|
292
293
|
}
|
|
293
294
|
const config = parsed.data;
|
|
294
|
-
const rawRec =
|
|
295
|
+
const rawRec = raw;
|
|
295
296
|
const deprecated = [];
|
|
296
297
|
if ("build" in rawRec) deprecated.push({
|
|
297
298
|
key: "build",
|
|
@@ -311,7 +312,7 @@ async function loadProjectConfig(cwd) {
|
|
|
311
312
|
}
|
|
312
313
|
return {
|
|
313
314
|
config,
|
|
314
|
-
raw
|
|
315
|
+
raw,
|
|
315
316
|
cwd: result.cwd ?? cwd
|
|
316
317
|
};
|
|
317
318
|
}
|