Skip to content

Commit

Permalink
must use module-alias to use fleetbase-s3 plugin as a runtime depen…
Browse files Browse the repository at this point in the history
…dency when running as verdaccio plugin
  • Loading branch information
roncodes committed Jul 17, 2024
1 parent 0976c53 commit 898f743
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
1 change: 1 addition & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
require('module-alias/register');
const express_1 = require("express");
const verdaccio_fleetbase_s3_storage_1 = __importDefault(require("@fleetbase/verdaccio-fleetbase-s3-storage"));
class FleetbaseExtensionsMiddleware {
Expand Down
12 changes: 9 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fleetbase/verdaccio-fleetbase-extensions-middleware",
"version": "0.0.2",
"version": "0.0.3",
"description": "Middleware to handle querying and listing of published extensions.",
"keywords": [
"verdaccio",
Expand Down Expand Up @@ -32,7 +32,8 @@
"dependencies": {
"express": "4.18.1",
"@fleetbase/verdaccio-fleetbase-s3-storage": "0.0.1",
"@verdaccio/commons-api": "10.2.0"
"@verdaccio/commons-api": "10.2.0",
"module-alias": "^2.2.3"
},
"devDependencies": {
"@verdaccio/types": "10.5.2",
Expand All @@ -45,5 +46,8 @@
"eslint": "8.21.0",
"jest": "28.1.3",
"typescript": "4.7.4"
},
"_moduleAliases": {
"@fleetbase/verdaccio-fleetbase-s3-storage": "/verdaccio/plugins/verdaccio-fleetbase-s3-storage"
}
}
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require('module-alias/register');

import { Logger, IPluginMiddleware, IBasicAuth, IStorageManager, PluginOptions, Config } from '@verdaccio/types';
import { Router, Request, Response, NextFunction, Application } from 'express';
import { CustomConfig } from './types/index';
Expand Down

0 comments on commit 898f743

Please sign in to comment.