Skip to content

Commit db61452

Browse files
committed
fix: ERR_MODULE_NOT_FOUND when sample plugins ran
- 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 <[email protected]>
1 parent a8f5677 commit db61452

File tree

6 files changed

+21
-34
lines changed

6 files changed

+21
-34
lines changed

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

Lines changed: 0 additions & 18 deletions
This file was deleted.

plugins/README.md

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# GitProxy plugins & samples
2+
GitProxy supports extensibility in the form of plugins. These plugins are specified via [configuration](https://git-proxy.finos.org/docs/category/configuration) as NPM packages or JavaScript code on disk. For each plugin configured, GitProxy will attempt to load each package or file as a standard [Node module](https://nodejs.org/api/modules.html). Plugin authors will create instances of the extension classes exposed by GitProxy and use these objects to implement custom functionality.
3+
4+
For detailed documentation, please refer to the [GitProxy development resources on the project's site](https://git-proxy.finos.org/docs/development/plugins)
5+
6+
## Included plugins
7+
These plugins are maintained by the core GitProxy team. As a future roadmap item, organizations can choose to omit
8+
certain features of GitProxy by simply removing the dependency from a deployed version of the application.
9+
10+
- `git-proxy-plugin-samples`: "hello world" examples of the GitProxy plugin system
11+
12+
## Contributing
13+
14+
Please refer to the [CONTRIBUTING.md](https://git-proxy.finos.org/docs/development/contributing) file for information on how to contribute to the GitProxy project.

plugins/git-proxy-plugin-samples/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*/
55

66
// Peer dependencies; its expected that these deps exist on Node module path if you've installed @finos/git-proxy
7-
import { PullActionPlugin } from "@finos/git-proxy/src/plugin";
8-
import { Step } from "@finos/git-proxy/src/proxy/actions";
7+
import { PullActionPlugin } from "@finos/git-proxy/src/plugin.js";
8+
import { Step } from "@finos/git-proxy/src/proxy/actions/index.js";
99

1010
class RunOnPullPlugin extends PullActionPlugin {
1111
constructor() {

plugins/git-proxy-plugin-samples/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@finos/git-proxy-plugin-samples",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "A set of sample (dummy) plugins for GitProxy to demonstrate how plugins are authored.",
55
"scripts": {
66
"test": "echo \"Error: no test specified\" && exit 1"

website/docs/development/plugins.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,18 @@ The below instructions are using the [`@finos/git-proxy-plugin-samples`](https:/
3232
1. Install both `@finos/git-proxy` and the `@finos/git-proxy-plugin-samples` package to the local `node_modules/` directory using the following command:
3333

3434
```bash
35-
$ npm install -g @finos/git-proxy@latest @finos/git-proxy-plugin-samples@0.1.0
35+
$ npm install -g @finos/git-proxy @finos/git-proxy-plugin-samples
3636
```
3737

3838
Alternatively, you can create local packages from source and install those instead.
3939
```bash
4040
$ git clone https://github.com/finos/git-proxy
4141
$ cd git-proxy
4242
$ npm pack
43-
$ npm install -g ./finos-git-proxy-1.3.5.tgz
4443
$ (cd plugins/git-proxy-plugin-samples && npm pack)
45-
$ npm install -g plugins/git-proxy-plugin-samples/finos-git-proxy-plugin-samples-0.1.0.tgz
44+
$ npm install -g \
45+
./finos-git-proxy-1.7.0.tgz \
46+
./plugins/git-proxy-plugin-samples/finos-git-proxy-plugin-samples-0.1.1.tgz
4647
```
4748

4849
2. Create or edit an existing `proxy.config.json` file to configure the plugin(s) to load. You must include the full import path that would typically be used in a `import {}` (ESM) or `require()` (CJS) statement:

0 commit comments

Comments
 (0)