stack/packages/template/src
Mantra 3493df464b
Some checks failed
all-good: Did all the other checks pass? / all-good (push) Has been cancelled
Ensure Prisma migrations are in sync with the schema / check_prisma_migrations (22.x) (push) Has been cancelled
DB migration compat / Check if migrations changed (push) Has been cancelled
Docker Server Build and Push / Docker Build and Push Server (push) Has been cancelled
Docker Server Build and Run / docker (push) Has been cancelled
Runs E2E API Tests (Local Emulator) / E2E Tests (Local Emulator, Node ${{ matrix.node-version }}) (22.x) (push) Has been cancelled
Runs E2E API Tests / E2E Tests (Node ${{ matrix.node-version }}, Freestyle ${{ matrix.freestyle-mode }}) (mock, 22.x) (push) Has been cancelled
Runs E2E API Tests / E2E Tests (Node ${{ matrix.node-version }}, Freestyle ${{ matrix.freestyle-mode }}) (prod, 22.x) (push) Has been cancelled
Runs E2E API Tests with custom port prefix / build (22.x) (push) Has been cancelled
Runs E2E Fallback Tests / E2E Fallback Tests (Node ${{ matrix.node-version }}) (22.x) (push) Has been cancelled
Lint & build / lint_and_build (24) (push) Has been cancelled
TOC Generator / TOC Generator (push) Has been cancelled
DB migration compat / Back-compat — Current branch migrations with ${{ needs.check-migrations-changed.outputs.base_branch }} branch code (push) Has been cancelled
DB migration compat / Forward-compat — Current branch code with ${{ needs.check-migrations-changed.outputs.base_branch }} branch migrations (push) Has been cancelled
DB migration compat / No migration changes (skipped) (push) Has been cancelled
Fix typecheck in template cross-domain test (#1628)
## What

Fixes a TypeScript error in `@hexclave/template` that was breaking `pnpm
typecheck` repo-wide:

```
client-app-impl.cross-domain.test.ts(450,101): error TS2345:
Argument of type '(options: { url: string | URL; }) => Promise<void>'
is not assignable to parameter of type '(...args: unknown[]) => unknown'.
```

## Why

The `vi.spyOn(...).mockImplementation(...)` callback typed its parameter
directly as `{ url: string | URL }`, but `mockImplementation` expects
`(...args: unknown[]) => unknown`. `unknown` isn't assignable to `{ url
}`, so the build failed.

## How

Accept variadic `unknown[]` args and cast `args[0]` to the expected
shape — matching the spy's actual signature while preserving the test's
behavior.

`pnpm --filter=@hexclave/template typecheck` now passes.

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Fix TypeScript typecheck failure in `@hexclave/template` cross-domain
auth test by updating the `vi.spyOn(...)._redirectTo.mockImplementation`
to accept `(...args: unknown[])` and casting `args[0]` to `{ url: string
| URL }`. This aligns the mock with its expected signature and restores
`pnpm typecheck`.

<sup>Written for commit 4a1787ee66.
Summary will update on new commits.</sup>

<a
href="https://cubic.dev/pr/hexclave/hexclave/pull/1628?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>

<!-- End of auto-generated description by cubic. -->
2026-06-18 17:55:17 -07:00
..
clickmap feat(analytics): add route analytics heatmaps (#1520) 2026-06-15 12:06:16 -07:00
components Aggressively deprecate app.urls.xyz & update docs to avoid it 2026-06-17 09:56:41 -07:00
components-page Better OAuth sign-up errors 2026-06-18 11:31:25 -07:00
dev-tool Devtool tab transition fix (#1600) 2026-06-15 18:35:56 -07:00
generated Fix Vite environment variables 2026-06-05 16:42:11 -07:00
in-page-ui feat(analytics): add route analytics heatmaps (#1520) 2026-06-15 12:06:16 -07:00
integrations chore(mcp/docs): canonicalize HEXCLAVE_ env vars in docs + raise ask_hexclave step limit & timeout (#1571) 2026-06-11 10:53:53 -07:00
lib Fix typecheck in template cross-domain test (#1628) 2026-06-18 17:55:17 -07:00
providers feat(hexclave): PR 5 — internal symbol/path/package renames + brand strings (#1547) 2026-06-03 18:57:09 -07:00
utils feat(hexclave): PR 3 — native @hexclave/* source rename + delete dual-publish wiring (#1482) 2026-05-29 15:21:59 -07:00
config.ts fix(rde): graceful config load errors + lightweight /config import path (#1557) 2026-06-10 11:40:19 -07:00
global.css Vanilla JS client library (#408) 2025-02-08 02:31:03 +01:00
global.d.ts Fix Vite environment variables 2026-06-05 16:42:11 -07:00
index.ts feat(hexclave): PR 5 — internal symbol/path/package renames + brand strings (#1547) 2026-06-03 18:57:09 -07:00
tanstack-start-server-context.combined.ts [codex] Add TanStack Start SDK integration (#1399) 2026-05-08 10:59:16 -07:00
tanstack-start-server-context.d.ts feat(hexclave): PR 3 — native @hexclave/* source rename + delete dual-publish wiring (#1482) 2026-05-29 15:21:59 -07:00
tanstack-start-server-context.default.ts [codex] Add TanStack Start SDK integration (#1399) 2026-05-08 10:59:16 -07:00
tanstack-start-server-context.server.ts [codex] Add TanStack Start SDK integration (#1399) 2026-05-08 10:59:16 -07:00