Skip to content

Commit 40192f3

Browse files
committed
fix(docs): 头注措辞避开行首 import —— 生成器按行成段,MDX 把该行当 ESM 解析(Build Docs 红)
build-docs.ts 把 docblock 按行拆成独立段落,`system/environment-artifact.zod.ts` 头注中断行后有一行以 `import ` 开头,MDX/acorn 将其解析为 ESM import 语句, `content/docs/references/system/environment-artifact.mdx` SyntaxError。改写措辞 (「so the chosen entry point can never change the shape a consumer gets」), 重生成后两个 environment-artifact.mdx 均无行首 `import `/`export `(代码围栏内 的 TypeScript Usage 示例不受影响),`pnpm --filter @objectstack/docs build` exit 0,`check:docs` 248 文件同步。 生成器坑本体(docblock 行成段 + 行首 import 炸 MDX,#4696 家族)记入 PR 顺带 发现,不在本 PR 修生成器。 Claude-Session: https://claude.ai/code/session_0176qgxgCXTJCUv4YFLtusP9 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 702ac73 commit 40192f3

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

content/docs/references/system/environment-artifact.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ THE single declaration of the environment artifact envelope (#4740,
1111

1212
#4535 C10 — maintainer route A′). `@objectstack/spec/cloud` re-exports
1313

14-
this file; both entry points resolve to these exact symbols, so which
14+
this file; both entry points resolve to these exact symbols, so the
1515

16-
import path a consumer picks can never change the shape it gets
16+
chosen entry point can never change the shape a consumer gets (the
1717

18-
(the #4411 dual-source trap, closed for this name).
18+
#4411 dual-source trap, closed for this name).
1919

2020
Describes the response shape of
2121

packages/spec/src/system/environment-artifact.zod.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import { ObjectStackDefinitionSchema } from '../stack.zod';
1010
*
1111
* THE single declaration of the environment artifact envelope (#4740,
1212
* #4535 C10 — maintainer route A′). `@objectstack/spec/cloud` re-exports
13-
* this file; both entry points resolve to these exact symbols, so which
14-
* import path a consumer picks can never change the shape it gets
15-
* (the #4411 dual-source trap, closed for this name).
13+
* this file; both entry points resolve to these exact symbols, so the
14+
* chosen entry point can never change the shape a consumer gets (the
15+
* #4411 dual-source trap, closed for this name).
1616
*
1717
* Describes the response shape of
1818
* `GET /api/v1/cloud/environments/:environmentId/artifact` — the assembled

0 commit comments

Comments
 (0)