Skip to content

Commit 04105a1

Browse files
committed
fix: register pull plugin via separate entry point for the plugin loader
1 parent 1216044 commit 04105a1

3 files changed

Lines changed: 45 additions & 4 deletions

File tree

SUPPLY-CHAIN.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ In `proxy.config.json`:
155155
1. Add the plugin to the `plugins` array:
156156
157157
```json
158-
"plugins": ["./plugins/git-proxy-plugin-supply-chain/index.js"]
158+
"plugins": [
159+
"./plugins/git-proxy-plugin-supply-chain/index.js",
160+
"./plugins/git-proxy-plugin-supply-chain/pull.js"
161+
]
159162
```
160163
161164
2. Authorise your test repo (so GitProxy will proxy it) by adding it to `authorisedList`:

plugins/git-proxy-plugin-supply-chain/README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,27 @@ are a follow-up - today, warnings are logged and only _blocks_ reach the termina
9292

9393
## Enable it
9494

95-
Add the plugin to the `plugins` array in your `proxy.config.json`:
95+
Add the plugin to the `plugins` array in your `proxy.config.json`. GitProxy's plugin loader
96+
takes only the **default export** of each configured module, so the push scanner (`index.js`)
97+
and the pull/clone scanner (`pull.js`) are registered as two entries:
9698

9799
```json
98100
{
99-
"plugins": ["@finos/git-proxy-plugin-supply-chain"]
101+
"plugins": [
102+
"@finos/git-proxy-plugin-supply-chain",
103+
"@finos/git-proxy-plugin-supply-chain/pull.js"
104+
]
100105
}
101106
```
102107

103108
or, from a checkout of this repo:
104109

105110
```json
106111
{
107-
"plugins": ["./plugins/git-proxy-plugin-supply-chain/index.js"]
112+
"plugins": [
113+
"./plugins/git-proxy-plugin-supply-chain/index.js",
114+
"./plugins/git-proxy-plugin-supply-chain/pull.js"
115+
]
108116
}
109117
```
110118

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**
2+
* Copyright 2026 GitProxy Contributors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* Loader entry point for the pull/clone scanner. GitProxy's PluginLoader takes only the
19+
* default export of each configured module (load-plugin's `key` defaults to 'default'),
20+
* so the push and pull plugins ship as separate entry files. Register both:
21+
*
22+
* "plugins": [
23+
* "./plugins/git-proxy-plugin-supply-chain/index.js",
24+
* "./plugins/git-proxy-plugin-supply-chain/pull.js"
25+
* ]
26+
*/
27+
28+
import { pullPlugin } from './index.js';
29+
30+
export default pullPlugin;

0 commit comments

Comments
 (0)