Skip to content

Merge main into next#1592

Open
vivid-planet-bot wants to merge 6 commits into
nextfrom
merge-main-into-next
Open

Merge main into next#1592
vivid-planet-bot wants to merge 6 commits into
nextfrom
merge-main-into-next

Conversation

@vivid-planet-bot

Copy link
Copy Markdown

This is an automated pull request to merge changes from main into next.

VPS-thodax and others added 6 commits July 9, 2026 16:17
## Summary
`create-app`'s placeholder replacement used a blanket `/[Ss]tarter/g`
regex over **every** scaffolded file, including `package-lock.json`.
This corrupted third-party package names containing `starter`, breaking
API startup for new apps. This PR excludes lock files and `node_modules`
from the replacement.

## What happened in this case
Running `npx @comet/create-app@latest test-comet-app-v9`:

1. `replacePlaceholder` rewrote `@tiptap/starter-kit` →
`@tiptap/test-comet-app-v9-kit` inside `api/` and `admin/` lock files.
2. `install.sh` (`npm install`) honored the corrupted lock, so the real
`@tiptap/starter-kit` was never installed.
3. On startup, `api-generator` loads `@comet/cms-api`, which does
`require("@tiptap/starter-kit")` — and crashed:

```
Error: Cannot find module '@tiptap/starter-kit'
  .../@comet/cms-api/lib/blocks/tipTap/createTipTapRichTextBlock.js
```

`@tiptap/starter-kit` is only a transitive dep (via `@comet/cms-api`),
so corrupting the lock entry was enough to make it vanish.

## Fix
In `replacePlaceholder.ts`, changed the glob `ignore` to an array adding
`**/package-lock.json` and `**/node_modules/**`. Lock files are
regenerated by `npm install`, so project-name references reconcile
automatically while third-party names stay intact. `package.json` is
still renamed as before.

Verified: `package.json` name still renamed correctly,
`@tiptap/starter-kit` preserved, install resolves the module; `tsc` and
Prettier pass.

https://claude.ai/code/session_01JShQZ87HSzbaAPAdkR6her

Co-authored-by: Claude <noreply@anthropic.com>
Ports vivid-planet/comet#5994 to comet-starter.

## What

Removes the `system-user` filter from `AccessLogModule.forRoot()`'s
`shouldLogRequest` in `api/src/app.module.ts`:

```diff
-shouldLogRequest: ({ user, req }) => user !== SYSTEM_USER_NAME && !req.route.path.startsWith("/api/healthcheck/"),
+shouldLogRequest: ({ req }) => !req.route.path.startsWith("/api/healthcheck/"),
```

## Why

The system-user filter was originally added to reduce logging noise
caused by requests made during site builds. Since the site switched to
server-side rendering (SSR), those requests are no longer made by the
system user, so the filter is obsolete.

Healthcheck requests (`/api/healthcheck/`) continue to be excluded from
access logs, and the module continues to be registered only when not in
debug mode — both unchanged by this PR.

`SYSTEM_USER_NAME` is still imported and used elsewhere in
`app.module.ts` (for `systemUsers`), so the import is retained.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
vivid-planet/comet#5567 for starter

Use the `JsonLd` component from `@comet/site-nextjs` for SEO structured
data on `Page` instead of a raw `<script type="application/ld+json">`
tag.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01Vp238wokCaLuYLadMwSaPX)_

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants