Skip to content

refactor(security)!: remove signing and billable Maps proxies - #788

Merged
harlan-zw merged 12 commits into
mainfrom
refactor/proxy-token-removal
Aug 4, 2026
Merged

refactor(security)!: remove signing and billable Maps proxies#788
harlan-zw merged 12 commits into
mainfrom
refactor/proxy-token-removal

Conversation

@harlan-zw

@harlan-zwharlan-zw commented May 21, 2026

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

Resolves#783

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

Per request proxy tokens changed every SSR payload and expired inside cached or generated HTML. Since the token was public, anyone who could read the page payload could reuse it with arbitrary proxy parameters.

Google Static Maps and geocoding were the signed routes with user billing exposure. Their URLs are created by client components, so protecting a server key would require an open signing endpoint. This PR removes those routes instead.

Static Maps now calls Google directly with the public browser key. Location queries use the client Places service. Google website restrictions, API restrictions, and quotas now enforce the billing boundary. Embed and avatar proxies remain limited to their declared upstream hosts and validated response types.

The change also removes the HMAC implementation, page token payload plugin, signing configuration, and generate-secret command. The package CLI stays available for v2 migration tools and future commands.

⚠️ Breaking changes

  • Removes scripts.security, NUXT_SCRIPTS_PROXY_SECRET, and the generate-secret command.
  • Removes googleStaticMapsProxy and the Google Static Maps and geocoding server routes.
  • <ScriptGoogleMapsStaticMap> sends the public registry key directly to Google.
  • Unsigned embed and avatar proxy URLs no longer return 403.

Remove the deleted config and environment values during migration. Restrict the Google key to approved websites and APIs, then set Google Cloud quota limits.

Verification

The proxy page token was embedded per-request in the SSR payload, which made
the payload non-deterministic (breaking response etag hashing, issue #783),
broke under response caching and SSG, and was weak protection anyway since it
is scrapeable from the payload.
Signing also could not protect the one endpoint that mattered: the Google Maps
proxy URL is emitted by a client component, so it cannot be signed without
either shipping node:crypto to the browser or exposing a signing oracle.
Remove the proxy URL signing subsystem entirely:
- Delete the page-token plugin/composable, sign.ts, withSigning, sign-constants,
and the proxy secret resolution + .env auto-generation.
- Drop the `security` config option and the generate-secret CLI command.
- Proxy/embed endpoints rely on their existing upstream-domain allowlist; the
Google Maps proxy keeps its API key server-side and is cache-shielded.
- useScriptProxyUrl / buildProxyUrl emit plain URLs; the SSR payload is now
deterministic.
Resolves#783
@vercel

vercelBot commented May 21, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
scripts-playgroundReadyReadyPreviewAug 4, 2026 9:51am

Request Review

@pkg-pr-new

pkg-pr-newBot commented May 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/scripts@788

commit: 2433eff

@coderabbitai

coderabbitaiBot commented May 21, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The change removes HMAC proxy signing, SSR proxy tokens, secret generation, and Google Maps server proxies. Proxy and embed handlers now use unsigned URLs. Google Maps uses browser-side Places services and direct Static Maps requests. The CLI now exposes injectable command and I/O functions. Tests cover unsigned behavior, CLI handling, registry boundaries, and deterministic SSR output. Documentation reflects the new proxy and Google Maps security model.

Estimated code review effort: 4 (Complex) | ~60 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 31.58% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Linked Issues check✅ PassedThe changes satisfy issue [#783] by removing the SSR proxy token and adding coverage for deterministic payload behavior.
Out of Scope Changes check✅ PassedThe changes remain within the stated scope of removing signing infrastructure and billable Google Maps proxies.
Title check✅ PassedThe title clearly summarizes the removal of signing and billable Google Maps proxy functionality.
Description check✅ PassedThe description directly explains the security refactor, removed proxy features, breaking changes, and verification performed.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/proxy-token-removal

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
test/unit/embed-rewriters.test.ts (1)

93-100: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Make the Bluesky avatar rewrite assertion strict for unsigned-URL regressions.

This currently uses toContain, so a URL with legacy params could still pass. Please assert the exact unsigned URL (or explicitly assert absence of _pt, _ts, sig).

Proposed test tightening
 it('rewrites the author avatar', () => {
const post = {
author: { avatar: 'https://cdn.bsky.app/img/avatar.jpg' },
}
rewriteBlueskyPostImages(post, BSKY_PATH)
- expect(post.author.avatar).toContain(encodeURIComponent('https://cdn.bsky.app/img/avatar.jpg'))- expect(post.author.avatar).toContain(BSKY_PATH)+ expect(post.author.avatar).toBe(+ `${BSKY_PATH}?url=${encodeURIComponent('https://cdn.bsky.app/img/avatar.jpg')}`,+ )
})
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@test/unit/embed-rewriters.test.ts` around lines 93 - 100, The test for avatar
rewriting is too loose—update the assertion in the test that calls
rewriteBlueskyPostImages (using BSKY_PATH) so it verifies the exact unsigned URL
returned for post.author.avatar (not using toContain), or alternatively assert
that the avatar string does not include legacy signing query params `_pt`,
`_ts`, or `sig`; reference post.author.avatar and the rewriteBlueskyPostImages
helper to locate where to change the expectation and ensure the result matches
the precise unsigned format.
packages/script/src/runtime/server/google-maps-geocode-proxy.ts (1)

15-48: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Ignore the retired signing params here for rollout compatibility.

After removing withSigning, stale pages/client bundles can still send _pt, _ts, and sig. Letting those flow into safeQuery creates distinct cache keys for the same geocode lookup and can cause avoidable paid misses right after deploy.

💡 Suggested patch
- const { key: _clientKey, ...safeQuery } = query+ const {+ key: _clientKey,+ _pt: _legacyPageToken,+ _ts: _legacyTimestamp,+ sig: _legacySignature,+ ...safeQuery+ } = query
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/script/src/runtime/server/google-maps-geocode-proxy.ts` around lines
15 - 48, The proxy is inadvertently including retired signing params (_pt, _ts,
sig) in safeQuery which creates distinct cache keys and causes paid misses;
update the query extraction around getQuery/event so that, in addition to
removing key (currently destructured as key: _clientKey), you also remove _pt,
_ts, and sig (e.g., destructure { key: _clientKey, _pt, _ts, sig, ...safeQuery }
= query) before calling withQuery and cachedGeocodeFetch (references: getQuery,
safeQuery, withQuery, cachedGeocodeFetch) so legacy params are stripped from the
geocodeUrl/cache key.
🧹 Nitpick comments (1)
packages/script/src/registry.ts (1)

685-688: Document or apply throttling for the unsigned Google Maps routes.

These two handlers now proxy billable Google APIs with a server-side key and no request-level gate. If this move to allowlist-only is intentional, please make sure the release notes/docs point users at Nitro routeRules throttling for these paths; otherwise they can be hotlinked to drain quota.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/script/src/registry.ts` around lines 685 - 688, The new
serverHandlers exposing '/_scripts/proxy/google-static-maps' and
'/_scripts/proxy/google-maps-geocode' are unthrottled billable endpoints; add
request-level throttling or document required Nitro routeRules for these routes.
Either implement a server-side rate limiter middleware in the handlers
referenced ('./runtime/server/google-static-maps-proxy' and
'./runtime/server/google-maps-geocode-proxy') or add Nitro routeRules for the
two routes with strict rate/limit settings and include a comment linking to the
docs; ensure the chosen approach rejects or 429s requests when limits are
exceeded and reference the serverHandlers entries so reviewers can verify the
change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/script/src/runtime/server/google-static-maps-proxy.ts`:
- Around line 11-13: The cache-key generation currently only strips the 'key'
param via the STRIP_PARAMS set; update STRIP_PARAMS to also include the legacy
signing parameters '_pt', '_ts', and 'sig' so those are removed from the proxied
URL before creating the cache key (look for the STRIP_PARAMS constant in
google-static-maps-proxy.ts and add the three legacy names to it).
In `@test/unit/proxy-url.test.ts`:
- Around line 52-55: The test for buildProxyUrl should avoid using the same
object instance twice; change the spec so it calls buildProxyUrl with two
separate but equivalent query objects (e.g., const query1 = { a: '1', b:
['x','y'] } and const query2 = { a: '1', b: ['x','y'] }) and assert the returned
URLs are equal, and optionally assert query1 still equals its original shape
after the calls to guard against in-place mutation by buildProxyUrl; locate and
update the test around the existing it('is deterministic: same inputs produce
identical URLs') that currently reuses the same query variable.
---
Outside diff comments:
In `@packages/script/src/runtime/server/google-maps-geocode-proxy.ts`:
- Around line 15-48: The proxy is inadvertently including retired signing params
(_pt, _ts, sig) in safeQuery which creates distinct cache keys and causes paid
misses; update the query extraction around getQuery/event so that, in addition
to removing key (currently destructured as key: _clientKey), you also remove
_pt, _ts, and sig (e.g., destructure { key: _clientKey, _pt, _ts, sig,
...safeQuery } = query) before calling withQuery and cachedGeocodeFetch
(references: getQuery, safeQuery, withQuery, cachedGeocodeFetch) so legacy
params are stripped from the geocodeUrl/cache key.
In `@test/unit/embed-rewriters.test.ts`:
- Around line 93-100: The test for avatar rewriting is too loose—update the
assertion in the test that calls rewriteBlueskyPostImages (using BSKY_PATH) so
it verifies the exact unsigned URL returned for post.author.avatar (not using
toContain), or alternatively assert that the avatar string does not include
legacy signing query params `_pt`, `_ts`, or `sig`; reference post.author.avatar
and the rewriteBlueskyPostImages helper to locate where to change the
expectation and ensure the result matches the precise unsigned format.
---
Nitpick comments:
In `@packages/script/src/registry.ts`:
- Around line 685-688: The new serverHandlers exposing
'/_scripts/proxy/google-static-maps' and '/_scripts/proxy/google-maps-geocode'
are unthrottled billable endpoints; add request-level throttling or document
required Nitro routeRules for these routes. Either implement a server-side rate
limiter middleware in the handlers referenced
('./runtime/server/google-static-maps-proxy' and
'./runtime/server/google-maps-geocode-proxy') or add Nitro routeRules for the
two routes with strict rate/limit settings and include a comment linking to the
docs; ensure the chosen approach rejects or 429s requests when limits are
exceeded and reference the serverHandlers entries so reviewers can verify the
change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d9ed0ee7-976d-4cc4-b29a-4b20717d4b21

📥 Commits

Reviewing files that changed from the base of the PR and between f46ccb6 and c8fe15b.

📒 Files selected for processing (40)
  • docs/content/docs/1.guides/2.first-party.md
  • docs/content/scripts/bluesky-embed.md
  • docs/content/scripts/google-maps/2.api/1b.static-map.md
  • docs/content/scripts/google-maps/index.md
  • docs/content/scripts/gravatar.md
  • docs/content/scripts/instagram-embed.md
  • docs/content/scripts/x-embed.md
  • packages/script/src/cli.ts
  • packages/script/src/module.ts
  • packages/script/src/registry.ts
  • packages/script/src/runtime/components/GoogleMaps/ScriptGoogleMapsStaticMap.vue
  • packages/script/src/runtime/composables/useScriptProxyToken.ts
  • packages/script/src/runtime/composables/useScriptProxyUrl.ts
  • packages/script/src/runtime/plugins/proxy-token.server.ts
  • packages/script/src/runtime/server/bluesky-embed.ts
  • packages/script/src/runtime/server/google-maps-geocode-proxy.ts
  • packages/script/src/runtime/server/google-static-maps-proxy.ts
  • packages/script/src/runtime/server/gravatar-proxy.ts
  • packages/script/src/runtime/server/instagram-embed.ts
  • packages/script/src/runtime/server/utils/cached-upstream.ts
  • packages/script/src/runtime/server/utils/embed-rewriters.ts
  • packages/script/src/runtime/server/utils/image-proxy.ts
  • packages/script/src/runtime/server/utils/instagram-embed.ts
  • packages/script/src/runtime/server/utils/proxy-url.ts
  • packages/script/src/runtime/server/utils/sign-constants.ts
  • packages/script/src/runtime/server/utils/sign.ts
  • packages/script/src/runtime/server/utils/withSigning.ts
  • packages/script/src/runtime/server/x-embed.ts
  • packages/script/src/runtime/types.ts
  • test/e2e/issue-783-proxy-token-payload.test.ts
  • test/fixtures/issue-783/app.vue
  • test/fixtures/issue-783/nuxt.config.ts
  • test/fixtures/issue-783/package.json
  • test/fixtures/issue-783/pages/index.vue
  • test/unit/embed-rewriters.test.ts
  • test/unit/proxy-url.test.ts
  • test/unit/resolve-proxy-secret.test.ts
  • test/unit/sign.test.ts
  • test/unit/use-script-proxy-url.test.ts
  • test/unit/with-signing.test.ts
💤 Files with no reviewable changes (15)
  • test/unit/sign.test.ts
  • docs/content/scripts/bluesky-embed.md
  • test/unit/resolve-proxy-secret.test.ts
  • docs/content/scripts/google-maps/2.api/1b.static-map.md
  • packages/script/src/runtime/types.ts
  • packages/script/src/runtime/server/utils/withSigning.ts
  • packages/script/src/runtime/server/utils/sign-constants.ts
  • packages/script/src/runtime/composables/useScriptProxyToken.ts
  • docs/content/scripts/instagram-embed.md
  • packages/script/src/runtime/plugins/proxy-token.server.ts
  • docs/content/scripts/x-embed.md
  • docs/content/scripts/gravatar.md
  • test/unit/with-signing.test.ts
  • packages/script/src/runtime/server/utils/sign.ts
  • docs/content/scripts/google-maps/index.md

Comment threadpackages/script/src/runtime/server/google-static-maps-proxy.ts Outdated
Comment threadtest/unit/proxy-url.test.ts
…removal
# Conflicts:
#	docs/content/docs/1.guides/2.first-party.md
#	docs/content/scripts/bluesky-embed.md
#	docs/content/scripts/google-maps/2.api/1b.static-map.md
#	packages/script/src/module.ts
#	packages/script/src/runtime/server/instagram-embed.ts
@harlan-zw

Copy link
Copy Markdown
CollaboratorAuthor

@coderabbitai review

@coderabbitai

coderabbitaiBot commented Jul 21, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@harlan-zwharlan-zw changed the title refactor(security): remove proxy URL signing and the page tokenrefactor(security)!: remove signing and billable Maps proxiesAug 4, 2026

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
packages/script/src/module.ts (1)

839-845: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove the obsolete URL-signing warning.

Line 844 states that URL signing is unavailable on static presets. This PR removes URL signing from the module. The warning now describes a feature that does not exist.

Proposed fix
- + 'Scripts will be bundled, but collection requests will not be proxied and URL signing will be unavailable.\n'+ + 'Scripts will be bundled, but collection requests will not be proxied.\n'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/script/src/module.ts` around lines 839 - 845, Remove the obsolete
URL-signing sentence from the logger.warn message in the proxyStaticPresets
handling block, while preserving the remaining proxy limitation and
configuration guidance.
packages/script/package.json (1)

4-4: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Bump @nuxt/scripts to a breaking release version.

packages/script/package.json still declares 1.3.2, but this release removes public CLI/package contracts. Since npm publish reads the package manifest and the root release script can still bump manifests via bumpp, publish 2.x.x or the repository’s equivalent breaking-release version before releasing these changes.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/script/package.json` at line 4, Update the version field in
packages/script/package.json from 1.3.2 to the repository’s next
breaking-release 2.x.x version, ensuring the manifest used by npm publish
reflects the major-version bump before release.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@packages/script/src/runtime/components/GoogleMaps/ScriptGoogleMapsStaticMap.vue`:
- Around line 121-124: The public prop JSDoc for ScriptGoogleMapsStaticMap must
reflect the current direct Google Maps Static Maps URL behavior: remove
references to proxying and update the signature description so it no longer
claims signature is used without an API key, since generated URLs always include
key.
- Around line 215-216: Update the request parameter ordering in the Static Maps
configuration so `key: apiKey` precedes `signature: props.signature`, making
`signature` the final parameter in the unsigned request URL used for
verification.
---
Outside diff comments:
In `@packages/script/package.json`:
- Line 4: Update the version field in packages/script/package.json from 1.3.2 to
the repository’s next breaking-release 2.x.x version, ensuring the manifest used
by npm publish reflects the major-version bump before release.
In `@packages/script/src/module.ts`:
- Around line 839-845: Remove the obsolete URL-signing sentence from the
logger.warn message in the proxyStaticPresets handling block, while preserving
the remaining proxy limitation and configuration guidance.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6dc3179e-d370-4308-86d1-abf9dd45f1a1

📥 Commits

Reviewing files that changed from the base of the PR and between 311b98d and bb18d30.

📒 Files selected for processing (27)
  • docs/content/docs/1.guides/2.first-party.md
  • docs/content/docs/3.api/5.nuxt-config.md
  • docs/content/scripts/google-maps/2.api/1b.static-map.md
  • docs/content/scripts/google-maps/index.md
  • packages/script/bin/cli.mjs
  • packages/script/build.config.ts
  • packages/script/package.json
  • packages/script/src/cli.ts
  • packages/script/src/module.ts
  • packages/script/src/registry.ts
  • packages/script/src/runtime/components/GoogleMaps/ScriptGoogleMaps.vue
  • packages/script/src/runtime/components/GoogleMaps/ScriptGoogleMapsStaticMap.vue
  • packages/script/src/runtime/maplibre-styles.ts
  • packages/script/src/runtime/server/bluesky-embed.ts
  • packages/script/src/runtime/server/google-maps-geocode-proxy.ts
  • packages/script/src/runtime/server/google-static-maps-proxy.ts
  • packages/script/src/runtime/server/gravatar-proxy.ts
  • packages/script/src/runtime/server/instagram-embed.ts
  • packages/script/src/runtime/server/utils/cached-upstream.ts
  • packages/script/src/runtime/server/utils/image-proxy.ts
  • packages/script/src/runtime/server/utils/instagram-embed.ts
  • packages/script/src/runtime/server/x-embed.ts
  • packages/script/src/runtime/types.ts
  • test/e2e/issue-783-proxy-token-payload.test.ts
  • test/fixtures/issue-783/nuxt.config.ts
  • test/unit/embed-rewriters.test.ts
  • test/unit/google-maps-security.test.ts
💤 Files with no reviewable changes (6)
  • packages/script/bin/cli.mjs
  • packages/script/build.config.ts
  • packages/script/src/runtime/server/google-static-maps-proxy.ts
  • packages/script/src/runtime/server/google-maps-geocode-proxy.ts
  • packages/script/src/cli.ts
  • docs/content/docs/3.api/5.nuxt-config.md
🚧 Files skipped from review as they are similar to previous changes (9)
  • packages/script/src/runtime/server/utils/cached-upstream.ts
  • packages/script/src/runtime/types.ts
  • packages/script/src/runtime/server/gravatar-proxy.ts
  • packages/script/src/registry.ts
  • packages/script/src/runtime/server/utils/image-proxy.ts
  • packages/script/src/runtime/server/x-embed.ts
  • test/unit/embed-rewriters.test.ts
  • packages/script/src/runtime/server/bluesky-embed.ts
  • packages/script/src/runtime/server/utils/instagram-embed.ts

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
test/unit/cli.test.ts (1)

1-2: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Cover the packaged CLI entrypoint.

These tests import packages/script/src/cli directly. They do not verify that packages/script/bin/cli.mjs can load ../dist/cli.mjs or propagate the process exit code. Add a package-level smoke test after the build for both help and unknown-command paths.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@test/unit/cli.test.ts` around lines 1 - 2, Add a package-level smoke test
that runs the built packages/script/bin/cli.mjs entrypoint rather than importing
src/cli directly. After the build, cover both the help and unknown-command
paths, asserting the entrypoint loads the built ../dist/cli.mjs module and
propagates each process exit code correctly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@test/unit/cli.test.ts`:
- Around line 1-2: Add a package-level smoke test that runs the built
packages/script/bin/cli.mjs entrypoint rather than importing src/cli directly.
After the build, cover both the help and unknown-command paths, asserting the
entrypoint loads the built ../dist/cli.mjs module and propagates each process
exit code correctly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6c43e45d-6037-4ad2-abd4-a14d2dff7a70

📥 Commits

Reviewing files that changed from the base of the PR and between 9a4e044 and 9ddb952.

📒 Files selected for processing (3)
  • packages/script/bin/cli.mjs
  • packages/script/src/cli.ts
  • test/unit/cli.test.ts

@harlan-zwharlan-zw added the v2 Targets Nuxt Scripts v2 label Aug 4, 2026
…removal
# Conflicts:
#	packages/script/src/runtime/components/GoogleMaps/ScriptGoogleMaps.vue
#	packages/script/src/runtime/maplibre-styles.ts
@harlan-zw
harlan-zw merged commit 3b4a191 into mainAug 4, 2026
15 checks passed
@harlan-zw
harlan-zw deleted the refactor/proxy-token-removal branch August 4, 2026 09:56
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2Targets Nuxt Scripts v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nuxt Scripts injects proxy token into payload even if not used

1 participant

@harlan-zw