mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
remove plugin manager code from ide.html
This commit is contained in:
parent
02d465b463
commit
ee1495074b
33
node_modules/architect/architect.js
generated
vendored
33
node_modules/architect/architect.js
generated
vendored
@ -20,10 +20,10 @@ if (typeof module === "object") (function () {
|
||||
// This is assumed to be used at startup and uses sync I/O as well as can
|
||||
// throw exceptions. It loads and parses a config file.
|
||||
function loadConfig(configPath, callback) {
|
||||
var config = require(configPath);
|
||||
var base = dirname(configPath);
|
||||
var config = require(configPath);
|
||||
var base = dirname(configPath);
|
||||
|
||||
return resolveConfig(config, base, callback);
|
||||
return resolveConfig(config, base, callback);
|
||||
}
|
||||
|
||||
function resolveConfig(config, base, callback) {
|
||||
@ -209,7 +209,6 @@ function checkCycles(config, lookup) {
|
||||
if (plugins.length) {
|
||||
var unresolved = {};
|
||||
plugins.forEach(function(plugin) {
|
||||
delete plugin.config;
|
||||
plugin.consumes.forEach(function(name) {
|
||||
if (unresolved[name] === false)
|
||||
return;
|
||||
@ -244,15 +243,16 @@ function checkCycles(config, lookup) {
|
||||
function Architect(config) {
|
||||
var app = this;
|
||||
app.config = config;
|
||||
app.packages = {};
|
||||
app.pluginToPackage = {};
|
||||
app.serviceToPlugin = {};
|
||||
app.additionalConfigs = [];
|
||||
|
||||
var isAdditionalMode;
|
||||
var services = app.services = {
|
||||
hub: {
|
||||
on: function (name, callback) {
|
||||
app.on(name, callback);
|
||||
}
|
||||
},
|
||||
app: app
|
||||
}
|
||||
};
|
||||
|
||||
@ -275,10 +275,6 @@ function Architect(config) {
|
||||
});
|
||||
}
|
||||
|
||||
var m = /^plugins\/([^\/]+)|\/plugins\/[^\/]+\/([^\/]+)/.exec(plugin.packagePath);
|
||||
var packageName = m && (m[1] || m[2]);
|
||||
if (!app.packages[packageName]) app.packages[packageName] = [];
|
||||
|
||||
if (DEBUG) {
|
||||
recur++;
|
||||
plugin.setup(plugin, imports, register);
|
||||
@ -315,13 +311,8 @@ function Architect(config) {
|
||||
return app.emit("error", err);
|
||||
}
|
||||
services[name] = provided[name];
|
||||
app.pluginToPackage[name] = {
|
||||
path: plugin.packagePath,
|
||||
package: packageName,
|
||||
version: plugin.version,
|
||||
isAdditionalMode: isAdditionalMode
|
||||
};
|
||||
app.packages[packageName].push(name);
|
||||
app.serviceToPlugin[name] = plugin;
|
||||
plugin.__isAdditionalMode = isAdditionalMode;
|
||||
|
||||
app.emit("service", name, services[name], plugin);
|
||||
});
|
||||
@ -344,6 +335,8 @@ function Architect(config) {
|
||||
exports.resolveConfig(additionalConfig, function (err, additionalConfig) {
|
||||
if (err) return callback(err);
|
||||
|
||||
app.additionalConfigs.push(additionalConfig);
|
||||
|
||||
app.once(ready ? "ready-additional" : "ready", function(app){
|
||||
callback(null, app);
|
||||
}); // What about error state?
|
||||
@ -394,7 +387,7 @@ function createApp(config, callback) {
|
||||
var app;
|
||||
try {
|
||||
app = new Architect(config);
|
||||
} catch(err) {
|
||||
} catch (err) {
|
||||
if (!callback) throw err;
|
||||
return callback(err, app);
|
||||
}
|
||||
@ -416,8 +409,6 @@ function createApp(config, callback) {
|
||||
app.removeListener("ready", onReady);
|
||||
callback(err, app);
|
||||
}
|
||||
|
||||
return app;
|
||||
}
|
||||
|
||||
return exports;
|
||||
|
||||
@ -3,7 +3,7 @@ define(function(require, exports, module) {
|
||||
"Plugin", "dialog.error", "ui", "settings", "tabManager", "save",
|
||||
"menus", "preferences.keybindings", "preferences.general",
|
||||
"preferences.project", "c9", "commands", "watcher", "fs",
|
||||
"tree.favorites", "preferences", "util"
|
||||
"tree.favorites", "util", "hub"
|
||||
];
|
||||
main.provides = ["configure"];
|
||||
return main;
|
||||
@ -16,13 +16,13 @@ define(function(require, exports, module) {
|
||||
var menus = imports.menus;
|
||||
var watcher = imports.watcher;
|
||||
var tabManager = imports.tabManager;
|
||||
var preferences = imports.preferences;
|
||||
var ui = imports.ui;
|
||||
var c9 = imports.c9;
|
||||
var fs = imports.fs;
|
||||
var kbprefs = imports["preferences.keybindings"];
|
||||
var genprefs = imports["preferences.general"];
|
||||
var prjprefs = imports["preferences.project"];
|
||||
var services = imports.hub.app.services;
|
||||
var showError = imports["dialog.error"].show;
|
||||
var favs = imports["tree.favorites"];
|
||||
var util = imports.util;
|
||||
@ -35,7 +35,7 @@ define(function(require, exports, module) {
|
||||
// var emit = plugin.getEmitter();
|
||||
|
||||
var cssSession = new Plugin("Ajax.org", main.consumes);
|
||||
var services, initPlugin;
|
||||
var initPlugin;
|
||||
|
||||
var pathFromFavorite = options.pathFromFavorite;
|
||||
|
||||
@ -292,20 +292,17 @@ define(function(require, exports, module) {
|
||||
}
|
||||
|
||||
function editStylesCss() {
|
||||
// preferences.hide();
|
||||
var css = settings.get("user/config/styles.css") || "";
|
||||
openTab("~/.c9/styles.css", css, "css");
|
||||
}
|
||||
|
||||
function editProjectSettings() {
|
||||
// preferences.hide();
|
||||
var value = JSON.stringify(settings.model.project, 0, " ")
|
||||
.replace(/"true"/g, "true")
|
||||
.replace(/"false"/g, "false");
|
||||
openTab(settings.paths.project, value, "javascript");
|
||||
}
|
||||
function editUserSettings() {
|
||||
// preferences.hide();
|
||||
var value = JSON.stringify(settings.model.user, 0, " ")
|
||||
.replace(/"true"/g, "true")
|
||||
.replace(/"false"/g, "false");
|
||||
@ -353,9 +350,6 @@ define(function(require, exports, module) {
|
||||
*
|
||||
**/
|
||||
plugin.freezePublicAPI({
|
||||
get services() { return services; },
|
||||
set services(value) { services = value; },
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
@ -64,8 +64,6 @@
|
||||
}
|
||||
});
|
||||
|
||||
app.lut = {};
|
||||
|
||||
app.on("error", function(err){
|
||||
console.error(err.stack);
|
||||
if (!errored)
|
||||
@ -73,20 +71,11 @@
|
||||
});
|
||||
|
||||
app.on("service", function(name, plugin, options){
|
||||
if (name == "plugin.loader" || name == "plugin.installer"
|
||||
|| name == "plugin.debug" || name == "plugin.manager"
|
||||
|| name == "plugin.test")
|
||||
plugin.architect = app;
|
||||
if (!plugin.name)
|
||||
plugin.name = name;
|
||||
if (options)
|
||||
app.lut[(options.packagePath || "").replace(/^.*\/home\/.c9\//, "")] = options;
|
||||
});
|
||||
|
||||
app.on("ready", function(){
|
||||
if (app.services.configure)
|
||||
app.services.configure.services = app.services;
|
||||
|
||||
app.once("ready", function() {
|
||||
window.app = app.services;
|
||||
window.app.__defineGetter__("_ace", function(){
|
||||
return this.tabManager.focussedTab.editor.ace;
|
||||
|
||||
@ -124,29 +124,18 @@
|
||||
}
|
||||
});
|
||||
|
||||
app.lut = {};
|
||||
|
||||
app.on("error", function(err){
|
||||
console.error(err.stack);
|
||||
if (!errored)
|
||||
alert(err);
|
||||
});
|
||||
|
||||
app.on("service", function(name, plugin, options){
|
||||
if (name == "plugin.loader" || name == "plugin.installer"
|
||||
|| name == "plugin.debug" || name == "plugin.manager"
|
||||
|| name == "plugin.test")
|
||||
plugin.architect = app;
|
||||
app.on("service", function(name, plugin, options) {
|
||||
if (!plugin.name)
|
||||
plugin.name = name;
|
||||
if (options)
|
||||
app.lut[(options.packagePath || "").replace(/^.*\/home\/.c9\//, "")] = options;
|
||||
});
|
||||
|
||||
app.on("ready", function() {
|
||||
if (app.services.configure)
|
||||
app.services.configure.services = app.services;
|
||||
|
||||
window.app = app.services;
|
||||
window.app.__defineGetter__("_ace", function(){
|
||||
return this.tabManager.focussedTab.editor.ace;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user