Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,17 @@
"wrangler": "^4.68.1",
"xml2js": "^0.6.2",
"youch": "^4.1.0",
"youch-core": "^0.3.3"
"youch-core": "^0.3.3",
"zephyr-agent": "^0.1.13"
},
"peerDependencies": {
"dotenv": "*",
"giget": "*",
"jiti": "^2.6.1",
"rollup": "^4.59.0",
"vite": "^7 || ^8 || >=8.0.0-0",
"xml2js": "^0.6.2"
"xml2js": "^0.6.2",
"zephyr-agent": "*"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# Check the actual content of package.json at line 181
sed -n '175,187p' package.json

Repository: nitrojs/nitro

Length of output: 320


🏁 Script executed:

# Check if src/presets/zephyr/utils.ts exists and see what APIs it uses
if [ -f "src/presets/zephyr/utils.ts" ]; then
  echo "=== File found. Checking API calls ==="
  cat -n "src/presets/zephyr/utils.ts"
else
  echo "=== File not found. Searching for zephyr-related files ==="
  find . -type f -path "*/zephyr/*.ts" 2>/dev/null | head -20
fi

Repository: nitrojs/nitro

Length of output: 7879


🏁 Script executed:

# Search for any mentions of zephyr-agent in the codebase
rg "zephyr-agent" --type json --type typescript --type javascript

Repository: nitrojs/nitro

Length of output: 91


🌐 Web query:

zephyr-agent npm package documentation compatible version readDirRecursiveWithContents buildAssetsMap

💡 Result:

zephyr-agent is published as an internal package and its npm README only documents the high-level ZephyrAgent API (it explicitly says it’s “not intended for direct use by end users”). It does not mention (or document) readDirRecursiveWithContents or buildAssetsMap, so there’s no “documentation-compatible version” you can reliably target for those symbols from the public docs. [1]

If you’re trying to call those helpers directly, the safest conclusion is that they’re not part of the supported public API of zephyr-agent (i.e., they may be private/internal, moved, or renamed across versions). In that case you should either:

  • stay on the supported surface (ZephyrAgent + the asset map you build in your plugin), or
  • locate the exact export in the source repo / generated .d.ts for the specific version you’ve installed and pin that exact version.

Also note: a similarly-named, documented assets-map helper exists in zephyr-xpack-internal (buildWebpackAssetsMap), so you may be looking for a function that lives in a different package than zephyr-agent. [2]

Sources: npm zephyr-agent README (v0.0.56) [1]; npm zephyr-xpack-internal README example (buildWebpackAssetsMap) [2].


Pin zephyr-agent to a specific version—the wildcard will break deploys.

The code in src/presets/zephyr/utils.ts calls internal zephyr-agent APIs (readDirRecursiveWithContents, buildAssetsMap, zeBuildDashData, ZephyrEngine.create) that are not documented in the public API and may change across versions. A wildcard dependency cannot provide the stability this integration requires.

The suggested pinning to ^0.1.13 needs to be verified against the actual zephyr-agent package source or type definitions to confirm compatibility with the APIs being used. Check the package repository or installed types to determine the correct semver range.

Suggested change
-    "zephyr-agent": "*"
+    "zephyr-agent": "^0.1.13"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"zephyr-agent": "*"
"zephyr-agent": "^0.1.13"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 181, Replace the wildcard dependency for "zephyr-agent"
in package.json with a pinned semver (e.g. "^0.1.13") and update the lockfile;
then verify that the pinned release exposes the internal APIs used
(readDirRecursiveWithContents, buildAssetsMap, zeBuildDashData,
ZephyrEngine.create) by checking the package source or installed types and run a
full build/test to confirm compatibility—if any API differs, adjust calls in
src/presets/zephyr/utils.ts to match the pinned version or choose a compatible
semver range.

},
"peerDependenciesMeta": {
"dotenv": {
Expand All @@ -196,6 +198,9 @@
},
"jiti": {
"optional": true
},
"zephyr-agent": {
"optional": true
}
},
"resolutions": {
Expand Down
Loading
Loading