-
Notifications
You must be signed in to change notification settings - Fork 24
Adding support of moesif integration #568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Hiranya Abeyrathne seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
7f93562 to
8527b74
Compare
8527b74 to
fd79a3c
Compare
WalkthroughThe pull request updates package dependencies by adding the moesif-nodejs monitoring library to production dependencies, removing the npm package as a dependency, and moving nodemon to devDependencies with a version upgrade. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
package.json
🔇 Additional comments (1)
package.json (1)
100-100: Excellent refactoring: nodemon correctly moved to devDependencies.The move of nodemon from dependencies to devDependencies with a version upgrade (^3.1.4 → ^3.1.10) is correct. Nodemon is a development tool and should not be a production dependency. The scripts referencing nodemon (lines 7-9) will continue to work as expected since devDependencies are available during development.
Additionally, removing npm from dependencies (per the AI summary) is good cleanup—npm is a global package manager and shouldn't be a project dependency.
| "jsonwebtoken": "^9.0.2", | ||
| "marked": "^13.0.3", | ||
| "minimatch": "^10.0.1", | ||
| "moesif-nodejs": "^3.9.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check moesif-nodejs package information on npm
echo "=== Checking moesif-nodejs on npm ==="
curl -s https://registry.npmjs.org/moesif-nodejs | jq -r '{latest: .["dist-tags"].latest, versions: [.versions | keys | .[] | select(test("^3\\.9"))]}'
# Also get version-specific security info
echo -e "\n=== Latest 5 versions ==="
curl -s https://registry.npmjs.org/moesif-nodejs | jq -r '.versions | keys | .[-5:]'Repository: wso2/api-developer-portal-core
Length of output: 267
🏁 Script executed:
#!/bin/bash
# Search for moesif-nodejs usage in codebase
echo "=== Searching for moesif imports and references ==="
rg -n "moesif" --type js --type ts --type json -C 2
# Also check for require statements specifically
echo -e "\n=== Checking for moesif-nodejs require/import ==="
rg "require.*moesif|import.*moesif" -C 3Repository: wso2/api-developer-portal-core
Length of output: 2188
moesif-nodejs is declared but not integrated in the codebase.
While moesif-nodejs ^3.9.1 exists on npm (latest is 3.11.0), no integration code was found in the repository. The package appears only in package.json and package-lock.json with no require() or import statements. Either remove the dependency if it's not yet needed, or add the required integration code to use it.
🤖 Prompt for AI Agents
In package.json around line 55, the dependency "moesif-nodejs" is declared but
not used; either remove it from package.json (and package-lock.json) if not
needed, or integrate it by importing/require-ing moesif-nodejs in your server
entry (e.g., src/server.js or app.js), initializing the Moesif middleware with
the Moesif API key from env (process.env.MOESIF_APPLICATION_ID), attaching the
middleware to your Express/Koa/HTTP pipeline before routes, and add any needed
configuration (identify user, mask headers/body) so the package is actually
used; after changes run npm install to update package-lock.json and commit both
files.
Purpose
$Subject for Bijira growth hacking through moesif
Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.