Skip to content

Commit

Permalink
Merge pull request #3346 from louislam/revert-plugin-code
Browse files Browse the repository at this point in the history
Drop unused code
  • Loading branch information
louislam authored Jul 3, 2023
2 parents 4b913c8 + df8fcff commit a0736e0
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 594 deletions.
19 changes: 14 additions & 5 deletions package-lock.json

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

8 changes: 1 addition & 7 deletions server/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { R } = require("redbean-node");
const { setSetting, setting } = require("./util-server");
const { log, sleep } = require("../src/util");
const knex = require("knex");
const { PluginsManager } = require("./plugins-manager");


/**
* Database & App Data Folder
Expand Down Expand Up @@ -88,12 +88,6 @@ class Database {
// Data Directory (must be end with "/")
Database.dataDir = process.env.DATA_DIR || args["data-dir"] || "./data/";

// Plugin feature is working only if the dataDir = "./data";
if (Database.dataDir !== "./data/") {
log.warn("PLUGIN", "Warning: In order to enable plugin feature, you need to use the default data directory: ./data/");
PluginsManager.disable = true;
}

Database.path = Database.dataDir + "kuma.db";
if (! fs.existsSync(Database.dataDir)) {
fs.mkdirSync(Database.dataDir, { recursive: true });
Expand Down
24 changes: 0 additions & 24 deletions server/git.js

This file was deleted.

13 changes: 0 additions & 13 deletions server/plugin.js

This file was deleted.

256 changes: 0 additions & 256 deletions server/plugins-manager.js

This file was deleted.

3 changes: 0 additions & 3 deletions server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ const { apiKeySocketHandler } = require("./socket-handlers/api-key-socket-handle
const { generalSocketHandler } = require("./socket-handlers/general-socket-handler");
const { Settings } = require("./settings");
const { CacheableDnsHttpAgent } = require("./cacheable-dns-http-agent");
const { pluginsHandler } = require("./socket-handlers/plugins-handler");
const apicache = require("./modules/apicache");

app.use(express.json());
Expand Down Expand Up @@ -177,7 +176,6 @@ let needSetup = false;
Database.init(args);
await initDatabase(testMode);
await server.initAfterDatabaseReady();
server.loadPlugins();
server.entryPage = await Settings.get("entryPage");
await StatusPage.loadDomainMappingList();

Expand Down Expand Up @@ -1537,7 +1535,6 @@ let needSetup = false;
maintenanceSocketHandler(socket);
apiKeySocketHandler(socket);
generalSocketHandler(socket, server);
pluginsHandler(socket, server);

log.debug("server", "added all socket handlers");

Expand Down
Loading

0 comments on commit a0736e0

Please sign in to comment.