Skip to content

fix: ERR_MODULE_NOT_FOUND when sample plugins ran#811

Merged
JamieSlome merged 3 commits into
mainfrom
hotfix/sample-module
Dec 3, 2024
Merged

fix: ERR_MODULE_NOT_FOUND when sample plugins ran#811
JamieSlome merged 3 commits into
mainfrom
hotfix/sample-module

Conversation

@coopernetes

@coopernetes coopernetes commented Dec 1, 2024

Copy link
Copy Markdown
Contributor
  • move plugin sample README into the package so its viewable on npm
  • fix bad imports from ESM plugin (index.js)
  • bump @finos/git-proxy-plugin-samples to 0.1.1
  • update docs with simpler setup instructions
  • removed unused package

closes #812

Testing:

With fixes applied
$ npm install $REPOS/git-proxy/finos-git-proxy-1.7.0.tgz $REPOS/git-proxy/plugins/git-proxy-plugin-samples/finos-git-proxy-plugin-samples-0.1.1.tgz 
npm warn deprecated mkdirp@0.3.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm warn deprecated ldapjs@2.3.3: This package has been decomissioned. See https://github.com/ldapjs/node-ldapjs/blob/8ffd0bc9c149088a10ec4c1ec6a18450f76ad05d/README.md
npm warn deprecated @material-ui/styles@4.11.5: Material UI v4 doesn't receive active development since September 2021. See the guide https://mui.com/material-ui/migration/migration-v4/ to upgrade to v5.
npm warn deprecated @material-ui/core@4.12.4: Material UI v4 doesn't receive active development since September 2021. See the guide https://mui.com/material-ui/migration/migration-v4/ to upgrade to v5.

added 361 packages in 11s

58 packages are looking for funding
  run `npm fund` for details

$ cat proxy.config.json | grep -A 3 -B 3 plugins
  "urlShortener": "",
  "contactEmail": "",
  "csrfProtection": true,
  "plugins": ["@finos/git-proxy-plugin-samples/example", "@finos/git-proxy-plugin-samples"]
}

$ ./node_modules/.bin/git-proxy 
Found 2 plugin modules
found push plugin PushActionPlugin
found push plugin LogRequestPlugin
found pull plugin RunOnPullPlugin
Loaded plugin: PushActionPlugin
Loaded plugin: LogRequestPlugin
Loaded plugin: RunOnPullPlugin
HTTP Proxy Listening on 8000
HTTPS Proxy Listening on 8443
Service Listening on 8080
Current state
$ npm install @finos/git-proxy @finos/git-proxy-plugin-samples
npm warn deprecated mkdirp@0.3.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm warn deprecated ldapjs@2.3.3: This package has been decomissioned. See https://github.com/ldapjs/node-ldapjs/blob/8ffd0bc9c149088a10ec4c1ec6a18450f76ad05d/README.md
npm warn deprecated @material-ui/styles@4.11.5: Material UI v4 doesn't receive active development since September 2021. See the guide https://mui.com/material-ui/migration/migration-v4/ to upgrade to v5.
npm warn deprecated @material-ui/core@4.12.4: Material UI v4 doesn't receive active development since September 2021. See the guide https://mui.com/material-ui/migration/migration-v4/ to upgrade to v5.

added 361 packages, and audited 362 packages in 13s

58 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

$ cp node_modules/@finos/git-proxy/proxy.config.json .
$ vim proxy.config.json
$ ./node_modules/.bin/git-proxy 
Failed to load plugin: Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@finos/git-proxy-plugin' imported from /home/tom/scratch/
Found 0 plugin modules
creating user
        user=admin,
        gitAccount=none
        email=admin@place.com,
        admin=true
HTTP Proxy Listening on 8000
HTTPS Proxy Listening on 8443
Service Listening on 8080

Signed-off-by: Thomas Cooper thomas.cooper@rbc.com

@coopernetes coopernetes added documentation Improvements or additions to documentation plugins Extensibility of the framework fix labels Dec 1, 2024
@github-actions

github-actions Bot commented Dec 1, 2024

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

  • packages/git-proxy-notify-hello/package.json

@netlify

netlify Bot commented Dec 1, 2024

Copy link
Copy Markdown

Deploy Preview for endearing-brigadeiros-63f9d0 ready!

Name Link
🔨 Latest commit 0e90765
🔍 Latest deploy log https://app.netlify.com/sites/endearing-brigadeiros-63f9d0/deploys/674f1d34a0816e0008e8f4f8
😎 Deploy Preview https://deploy-preview-811--endearing-brigadeiros-63f9d0.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov

codecov Bot commented Dec 1, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.11%. Comparing base (727aa84) to head (0e90765).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #811   +/-   ##
=======================================
  Coverage   63.11%   63.11%           
=======================================
  Files          47       47           
  Lines        1681     1681           
=======================================
  Hits         1061     1061           
  Misses        620      620           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

- move plugin sample README into the package so its viewable on npm
- fix bad imports from ESM plugin (index.js)
- bump @finos/git-proxy-plugin-samples to 0.1.1
- update docs with simpler setup instructions

Signed-off-by: Thomas Cooper <thomas.cooper@rbc.com>
Signed-off-by: Thomas Cooper <thomas.cooper@rbc.com>

Signed-off-by: Thomas Cooper <thomas.cooper@rbc.com>

@JamieSlome JamieSlome left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! 🍰

@JamieSlome JamieSlome merged commit fe523cf into main Dec 3, 2024
@JamieSlome JamieSlome deleted the hotfix/sample-module branch December 3, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation fix plugins Extensibility of the framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

using the samples as documented not functional

2 participants