Skip to content

(v1) Forward-port: optional shared.ts for Nuxt strict auto-extend #1449

Description

@yamcodes

Problem

On v1, #1422 made Nuxt strict layout auto-extend SharedSchema via #arkenv/shared-schema and hard-fails when env/internal/shared.ts is missing (missingSharedTsError). That is louder than the pre-existing @arkenv/build shared-file gate and blocks a client + server–only strict setup even after the layout layer no longer requires the file.

The base layout / docs / CLI change lands on dev in #1448. This issue is the v1 forward-port plus the Nuxt-specific soft-fail that only exists on v1.

Related: #1448 (base on dev), #1414, #1422

Desired behavior

  • Forward-port Make env/internal/shared.ts optional in strict layout (dev/v0) #1448’s @arkenv/build layout detection / findSchemaPath / docs / CLI wording onto v1.
  • When internal/shared.ts is absent in Nuxt strict layout, #arkenv/shared-schema / client auto-extend uses an empty schema (same fallback already used outside strict via empty-shared-schema.ts), instead of missingSharedTsError.
  • When the file exists but has no usable SharedSchema export, fail with a clear diagnostic (broken file ≠ intentional empty).
  • Present SharedSchema still auto-merges when extends is omitted.

Acceptance criteria

Out of scope

Target branch

v1 (blocked on #1448).

Metadata

Metadata

Assignees

No one assigned

    Labels

    @arkenv/nuxtIssues or Pull Requests involving the Nuxt integration for ArkEnvblockedWork cannot proceed; waiting on something elseenhancementNew feature or improvementready for agentFully specified, ready for immediate implementation

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions