Skip to content

Commit

Permalink
feat: experimental plugin manager
Browse files Browse the repository at this point in the history
* on proxy startup, read plugin names via environment variable
  `GITPROXY_LOAD_PLUGINS` as a comma-separated list
* on startup, initialize PluginManager which sets a list of plugins
  and loads them via `load-plugin`. Note, this is a no-op atm since
  the actual proxy processors are not calling into plugin functions yet
* add lerna to support multiple npm packages in a single workspace.
  This is necessary to start breaking apart the monolithic git-proxy
  package code into separate packages.
* add HttpPlugin class which takes in a request & response function.
  This class should implement those methods. Note, this is better suited
  to TypeScript which has built-in interfaces.

This doesn't "do" anything yet.

feat: plugin system

re-ordered hardcoded values

work in progress
  • Loading branch information
coopernetes committed Sep 15, 2023
1 parent 7c2d7ca commit c1c1846
Show file tree
Hide file tree
Showing 8 changed files with 10,085 additions and 3,681 deletions.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
FROM node:18
FROM node:18 AS build

WORKDIR /usr/src/app

COPY package*.json ./

RUN npm ci --omit=dev --ignore-scripts

FROM node:18-slim

WORKDIR /usr/src/app

COPY --from=build /usr/src/app/node_modules/ node_modules/
COPY src ./src/
COPY resources ./resources/
COPY index.js docker-entrypoint.sh ./
Expand Down
7 changes: 7 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "0.0.0",
"packages": [
"packages/*"
]
}
Loading

0 comments on commit c1c1846

Please sign in to comment.