mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-21 08:03:13 +09:00
Merge pull request #403 from Hornwitser/single-web-lib-entrypoint
Single web lib entrypoint
This commit is contained in:
45 files changed
+111
-84
No files matched your search
+1
-1
@@ -26,7 +26,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["packages/web_ui/src/**/*.jsx", "plugins/*/web/**/*.jsx"],
|
"files": ["packages/web_ui/src/**/*.jsx", "packages/lib/browser.js", "plugins/*/web/**/*.jsx"],
|
||||||
"env": {
|
"env": {
|
||||||
"browser": true,
|
"browser": true,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ Without it the plugin will not recognized by Clusterio.
|
|||||||
Here's an example of it:
|
Here's an example of it:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const libLink = require("@clusterio/lib/link"); // For messages
|
const { libLink } = require("@clusterio/lib"); // For messages
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "foo_frobber",
|
name: "foo_frobber",
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
export { default as libConfig } from "./config";
|
||||||
|
export { default as libErrors } from "./errors";
|
||||||
|
export { default as libFactorio } from "./factorio/exchange_string";
|
||||||
|
export { default as libHelpers } from "./helpers";
|
||||||
|
export { default as libLink } from "./link";
|
||||||
|
export { default as libLogging } from "./logging";
|
||||||
|
export { default as libPlugin } from "./plugin";
|
||||||
|
export { default as libSchema } from "./schema";
|
||||||
|
export { default as libUsers } from "./users";
|
||||||
|
|
||||||
|
export { default as RateLimiter } from "./RateLimiter";
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
"use strict";
|
||||||
|
const libBuildMod = require("./build_mod");
|
||||||
|
const libCommand = require("./command");
|
||||||
|
const libConfig = require("./config");
|
||||||
|
const libDatabase = require("./database");
|
||||||
|
const libErrors = require("./errors");
|
||||||
|
const libFactorio = require("./factorio");
|
||||||
|
const libFileOps = require("./file_ops");
|
||||||
|
const libHash = require("./hash");
|
||||||
|
const libHelpers = require("./helpers");
|
||||||
|
const libLink = require("./link");
|
||||||
|
const libLogging = require("./logging");
|
||||||
|
const libLoggingUtils = require("./logging_utils");
|
||||||
|
const libLuaTools = require("./lua_tools");
|
||||||
|
const libPlugin = require("./plugin");
|
||||||
|
const libPluginLoader = require("./plugin_loader");
|
||||||
|
const libPrometheus = require("./prometheus");
|
||||||
|
const libSchema = require("./schema");
|
||||||
|
const libSharedCommands = require("./shared_commands");
|
||||||
|
const libUsers = require("./users");
|
||||||
|
|
||||||
|
const RateLimiter = require("./RateLimiter");
|
||||||
|
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
libBuildMod,
|
||||||
|
libCommand,
|
||||||
|
libConfig,
|
||||||
|
libDatabase,
|
||||||
|
libErrors,
|
||||||
|
libFactorio,
|
||||||
|
libFileOps,
|
||||||
|
libHash,
|
||||||
|
libHelpers,
|
||||||
|
libLink,
|
||||||
|
libLogging,
|
||||||
|
libLoggingUtils,
|
||||||
|
libLuaTools,
|
||||||
|
libPlugin,
|
||||||
|
libPluginLoader,
|
||||||
|
libPrometheus,
|
||||||
|
libSchema,
|
||||||
|
libSharedCommands,
|
||||||
|
libUsers,
|
||||||
|
|
||||||
|
RateLimiter,
|
||||||
|
};
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
"version": "2.0.0-alpha.8",
|
"version": "2.0.0-alpha.8",
|
||||||
"repository": "https://github.com/clusterio/clusterio",
|
"repository": "https://github.com/clusterio/clusterio",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"browser": "browser.js",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"factorio"
|
"factorio"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -20,14 +20,7 @@ module.exports = (env = {}) => merge(common(env), {
|
|||||||
new webpack.container.ModuleFederationPlugin({
|
new webpack.container.ModuleFederationPlugin({
|
||||||
name: "master",
|
name: "master",
|
||||||
shared: {
|
shared: {
|
||||||
"@clusterio/lib/config": { singleton: true },
|
"@clusterio/lib": { singleton: true },
|
||||||
"@clusterio/lib/errors": { singleton: true },
|
|
||||||
"@clusterio/lib/helpers": { singleton: true },
|
|
||||||
"@clusterio/lib/link": { singleton: true },
|
|
||||||
"@clusterio/lib/logging": { singleton: true },
|
|
||||||
"@clusterio/lib/plugin": { singleton: true },
|
|
||||||
"@clusterio/lib/schema": { singleton: true },
|
|
||||||
"@clusterio/lib/users": { singleton: true },
|
|
||||||
"@clusterio/web_ui": { singleton: true },
|
"@clusterio/web_ui": { singleton: true },
|
||||||
"antd": { singleton: true },
|
"antd": { singleton: true },
|
||||||
"react": { singleton: true },
|
"react": { singleton: true },
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ import "./index.css";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import ReactDOM from "react-dom";
|
import ReactDOM from "react-dom";
|
||||||
|
|
||||||
import libConfig from "@clusterio/lib/config";
|
import { libConfig, libLogging, libPlugin } from "@clusterio/lib";
|
||||||
import libPlugin from "@clusterio/lib/plugin";
|
const { ConsoleTransport, WebConsoleFormat, logger } = libLogging;
|
||||||
import { ConsoleTransport, WebConsoleFormat, logger } from "@clusterio/lib/logging";
|
|
||||||
|
|
||||||
import App from "./components/App";
|
import App from "./components/App";
|
||||||
import { Control, ControlConnector } from "./util/websocket";
|
import { Control, ControlConnector } from "./util/websocket";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import events from "events";
|
|||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { BrowserRouter } from "react-router-dom";
|
import { BrowserRouter } from "react-router-dom";
|
||||||
|
|
||||||
import { logger } from "@clusterio/lib/logging";
|
import { libLogging } from "@clusterio/lib";
|
||||||
|
|
||||||
import ErrorBoundary from "./ErrorBoundary";
|
import ErrorBoundary from "./ErrorBoundary";
|
||||||
import SiteLayout from "./SiteLayout";
|
import SiteLayout from "./SiteLayout";
|
||||||
@@ -12,6 +12,7 @@ import LoginForm from "./LoginForm";
|
|||||||
import { Card, Spin, Typography } from "antd";
|
import { Card, Spin, Typography } from "antd";
|
||||||
|
|
||||||
const { Paragraph } = Typography;
|
const { Paragraph } = Typography;
|
||||||
|
const { logger } = libLogging;
|
||||||
|
|
||||||
|
|
||||||
function ErrorCard(props) {
|
function ErrorCard(props) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useContext, useState } from "react";
|
import React, { useContext, useState } from "react";
|
||||||
import { Button, Form, Modal, Select, Typography } from "antd";
|
import { Button, Form, Modal, Select, Typography } from "antd";
|
||||||
|
|
||||||
import libLink from "@clusterio/lib/link";
|
import { libLink } from "@clusterio/lib";
|
||||||
|
|
||||||
import ControlContext from "./ControlContext";
|
import ControlContext from "./ControlContext";
|
||||||
import { notifyErrorHandler } from "../util/notify";
|
import { notifyErrorHandler } from "../util/notify";
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import React, { useContext, useState } from "react";
|
import React, { useContext, useState } from "react";
|
||||||
import { Button, Col, Form, Input, Modal, Row, Typography } from "antd";
|
import { Button, Col, Form, Input, Modal, Row, Typography } from "antd";
|
||||||
|
|
||||||
import libLink from "@clusterio/lib/link";
|
import { libFactorio, libLink } from "@clusterio/lib";
|
||||||
import { readMapExchangeString } from "@clusterio/lib/factorio/exchange_string";
|
|
||||||
|
|
||||||
import ControlContext from "./ControlContext";
|
import ControlContext from "./ControlContext";
|
||||||
import { notifyErrorHandler } from "../util/notify";
|
import { notifyErrorHandler } from "../util/notify";
|
||||||
@@ -23,7 +22,7 @@ export default function CreateSaveModal(props) {
|
|||||||
if (values.exchangeString && values.exchangeString.trim()) {
|
if (values.exchangeString && values.exchangeString.trim()) {
|
||||||
let result;
|
let result;
|
||||||
try {
|
try {
|
||||||
result = readMapExchangeString(values.exchangeString);
|
result = libFactorio.readMapExchangeString(values.exchangeString);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
form.setFields([{ name: "exchangeString", errors: [err.message] }]);
|
form.setFields([{ name: "exchangeString", errors: [err.message] }]);
|
||||||
return;
|
return;
|
||||||
@@ -72,7 +71,7 @@ export default function CreateSaveModal(props) {
|
|||||||
let exchangeString = form.getFieldValue("exchangeString");
|
let exchangeString = form.getFieldValue("exchangeString");
|
||||||
let result;
|
let result;
|
||||||
try {
|
try {
|
||||||
result = readMapExchangeString(exchangeString);
|
result = libFactorio.readMapExchangeString(exchangeString);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
form.setFields([{ name: "exchangeString", errors: [err.message] }]);
|
form.setFields([{ name: "exchangeString", errors: [err.message] }]);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useContext } from "react";
|
import React, { useContext } from "react";
|
||||||
import { Typography } from "antd";
|
import { Typography } from "antd";
|
||||||
|
|
||||||
import libLink from "@clusterio/lib/link";
|
import { libLink } from "@clusterio/lib";
|
||||||
|
|
||||||
import PageLayout from "./PageLayout";
|
import PageLayout from "./PageLayout";
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import React, { useContext } from "react";
|
import React, { useContext } from "react";
|
||||||
import { Typography } from "antd";
|
import { Typography } from "antd";
|
||||||
|
|
||||||
import libLink from "@clusterio/lib/link";
|
import { libConfig, libLink } from "@clusterio/lib";
|
||||||
import libConfig from "@clusterio/lib/config";
|
|
||||||
|
|
||||||
import BaseConfigTree from "./BaseConfigTree";
|
import BaseConfigTree from "./BaseConfigTree";
|
||||||
import ControlContext from "./ControlContext";
|
import ControlContext from "./ControlContext";
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useEffect, useContext, useRef, useState } from "react";
|
import React, { useEffect, useContext, useRef, useState } from "react";
|
||||||
import { Typography } from "antd";
|
import { Typography } from "antd";
|
||||||
|
|
||||||
import libLink from "@clusterio/lib/link";
|
import { libLink } from "@clusterio/lib";
|
||||||
|
|
||||||
import ControlContext from "./ControlContext";
|
import ControlContext from "./ControlContext";
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useContext, useState } from "react";
|
import React, { useContext, useState } from "react";
|
||||||
import { Input, Typography } from "antd";
|
import { Input, Typography } from "antd";
|
||||||
|
|
||||||
import libLink from "@clusterio/lib/link";
|
import { libLink } from "@clusterio/lib";
|
||||||
|
|
||||||
import ControlContext from "./ControlContext";
|
import ControlContext from "./ControlContext";
|
||||||
import { notifyErrorHandler } from "../util/notify";
|
import { notifyErrorHandler } from "../util/notify";
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { useHistory, useParams } from "react-router-dom";
|
|||||||
import { Button, Descriptions, Popconfirm, Space, Spin, Typography } from "antd";
|
import { Button, Descriptions, Popconfirm, Space, Spin, Typography } from "antd";
|
||||||
import DeleteOutlined from "@ant-design/icons/DeleteOutlined";
|
import DeleteOutlined from "@ant-design/icons/DeleteOutlined";
|
||||||
|
|
||||||
import libLink from "@clusterio/lib/link";
|
import { libLink } from "@clusterio/lib";
|
||||||
|
|
||||||
import ControlContext from "./ControlContext";
|
import ControlContext from "./ControlContext";
|
||||||
import PageLayout from "./PageLayout";
|
import PageLayout from "./PageLayout";
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ import React, { useContext, useState } from "react";
|
|||||||
import { useHistory } from "react-router-dom";
|
import { useHistory } from "react-router-dom";
|
||||||
import { Button, Form, Input, Modal, PageHeader, Table } from "antd";
|
import { Button, Form, Input, Modal, PageHeader, Table } from "antd";
|
||||||
|
|
||||||
import libLink from "@clusterio/lib/link";
|
import { libConfig, libLink } from "@clusterio/lib";
|
||||||
import libConfig from "@clusterio/lib/config";
|
|
||||||
|
|
||||||
import ControlContext from "./ControlContext";
|
import ControlContext from "./ControlContext";
|
||||||
import PageLayout from "./PageLayout";
|
import PageLayout from "./PageLayout";
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import React, { useContext, useState } from "react";
|
import React, { useContext, useState } from "react";
|
||||||
import { Button, Col, Form, Input, Modal, Row, Typography } from "antd";
|
import { Button, Col, Form, Input, Modal, Row, Typography } from "antd";
|
||||||
|
|
||||||
import libLink from "@clusterio/lib/link";
|
import { libFactorio, libLink } from "@clusterio/lib";
|
||||||
import { readMapExchangeString } from "@clusterio/lib/factorio/exchange_string";
|
|
||||||
|
|
||||||
import ControlContext from "./ControlContext";
|
import ControlContext from "./ControlContext";
|
||||||
import { notifyErrorHandler } from "../util/notify";
|
import { notifyErrorHandler } from "../util/notify";
|
||||||
@@ -23,7 +22,7 @@ export default function LoadScenarioModal(props) {
|
|||||||
if (values.exchangeString && values.exchangeString.trim()) {
|
if (values.exchangeString && values.exchangeString.trim()) {
|
||||||
let result;
|
let result;
|
||||||
try {
|
try {
|
||||||
result = readMapExchangeString(values.exchangeString);
|
result = libFactorio.readMapExchangeString(values.exchangeString);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
form.setFields([{ name: "exchangeString", errors: [err.message] }]);
|
form.setFields([{ name: "exchangeString", errors: [err.message] }]);
|
||||||
return;
|
return;
|
||||||
@@ -71,7 +70,7 @@ export default function LoadScenarioModal(props) {
|
|||||||
let exchangeString = form.getFieldValue("exchangeString");
|
let exchangeString = form.getFieldValue("exchangeString");
|
||||||
let result;
|
let result;
|
||||||
try {
|
try {
|
||||||
result = readMapExchangeString(exchangeString);
|
result = libFactorio.readMapExchangeString(exchangeString);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
form.setFields([{ name: "exchangeString", errors: [err.message] }]);
|
form.setFields([{ name: "exchangeString", errors: [err.message] }]);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import React, { useContext } from "react";
|
import React, { useContext } from "react";
|
||||||
import { Typography } from "antd";
|
import { Typography } from "antd";
|
||||||
|
|
||||||
import libLink from "@clusterio/lib/link";
|
import { libConfig, libLink } from "@clusterio/lib";
|
||||||
import libConfig from "@clusterio/lib/config";
|
|
||||||
|
|
||||||
import BaseConfigTree from "./BaseConfigTree";
|
import BaseConfigTree from "./BaseConfigTree";
|
||||||
import ControlContext from "./ControlContext";
|
import ControlContext from "./ControlContext";
|
||||||
|
|||||||
@@ -3,8 +3,7 @@ import { useHistory, useParams } from "react-router-dom";
|
|||||||
import { Button, Checkbox, Col, Form, Input, Popconfirm, Row, Space, Spin } from "antd";
|
import { Button, Checkbox, Col, Form, Input, Popconfirm, Row, Space, Spin } from "antd";
|
||||||
import DeleteOutlined from "@ant-design/icons/DeleteOutlined";
|
import DeleteOutlined from "@ant-design/icons/DeleteOutlined";
|
||||||
|
|
||||||
import libLink from "@clusterio/lib/link";
|
import { libLink, libUsers } from "@clusterio/lib";
|
||||||
import libUsers from "@clusterio/lib/users";
|
|
||||||
|
|
||||||
import ControlContext from "./ControlContext";
|
import ControlContext from "./ControlContext";
|
||||||
import PageLayout from "./PageLayout";
|
import PageLayout from "./PageLayout";
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useContext } from "react";
|
import React, { useContext } from "react";
|
||||||
import { useHistory } from "react-router-dom";
|
import { useHistory } from "react-router-dom";
|
||||||
|
|
||||||
import libLink from "@clusterio/lib/link";
|
import { libLink } from "@clusterio/lib";
|
||||||
|
|
||||||
import DataTable from "./data-table";
|
import DataTable from "./data-table";
|
||||||
import ControlContext from "./ControlContext";
|
import ControlContext from "./ControlContext";
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { Button, List, Popconfirm, Progress, Space, Table, Tooltip, Upload } fro
|
|||||||
import CaretLeftOutlined from "@ant-design/icons/CaretLeftOutlined";
|
import CaretLeftOutlined from "@ant-design/icons/CaretLeftOutlined";
|
||||||
import LeftOutlined from "@ant-design/icons/LeftOutlined";
|
import LeftOutlined from "@ant-design/icons/LeftOutlined";
|
||||||
|
|
||||||
import libLink from "@clusterio/lib/link";
|
import { libLink } from "@clusterio/lib";
|
||||||
|
|
||||||
import ControlContext from "./ControlContext";
|
import ControlContext from "./ControlContext";
|
||||||
import CreateSaveModal from "./CreateSaveModal";
|
import CreateSaveModal from "./CreateSaveModal";
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useContext, useRef, useState } from "react";
|
import React, { useContext, useRef, useState } from "react";
|
||||||
import { Button, Form, Input, Modal, PageHeader, Table } from "antd";
|
import { Button, Form, Input, Modal, PageHeader, Table } from "antd";
|
||||||
|
|
||||||
import libLink from "@clusterio/lib/link";
|
import { libLink } from "@clusterio/lib";
|
||||||
|
|
||||||
import ControlContext from "./ControlContext";
|
import ControlContext from "./ControlContext";
|
||||||
import PageLayout from "./PageLayout";
|
import PageLayout from "./PageLayout";
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useContext, useState } from "react";
|
import React, { useContext, useState } from "react";
|
||||||
import { Button } from "antd";
|
import { Button } from "antd";
|
||||||
|
|
||||||
import libLink from "@clusterio/lib/link";
|
import { libLink } from "@clusterio/lib";
|
||||||
|
|
||||||
import ControlContext from "./ControlContext";
|
import ControlContext from "./ControlContext";
|
||||||
import { notifyErrorHandler } from "../util/notify";
|
import { notifyErrorHandler } from "../util/notify";
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { useHistory, useParams } from "react-router-dom";
|
|||||||
import { Button, Checkbox, Col, Form, Input, Popconfirm, Popover, Row, Select, Space, Spin, Switch } from "antd";
|
import { Button, Checkbox, Col, Form, Input, Popconfirm, Popover, Row, Select, Space, Spin, Switch } from "antd";
|
||||||
import DeleteOutlined from "@ant-design/icons/DeleteOutlined";
|
import DeleteOutlined from "@ant-design/icons/DeleteOutlined";
|
||||||
|
|
||||||
import libLink from "@clusterio/lib/link";
|
import { libLink } from "@clusterio/lib";
|
||||||
|
|
||||||
import ControlContext from "./ControlContext";
|
import ControlContext from "./ControlContext";
|
||||||
import PageLayout from "./PageLayout";
|
import PageLayout from "./PageLayout";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React, { useEffect, useContext, useState } from "react";
|
|||||||
import { useHistory } from "react-router-dom";
|
import { useHistory } from "react-router-dom";
|
||||||
import { Spin, Tag } from "antd";
|
import { Spin, Tag } from "antd";
|
||||||
|
|
||||||
import libLink from "@clusterio/lib/link";
|
import { libLink } from "@clusterio/lib";
|
||||||
|
|
||||||
import DataTable from "./data-table";
|
import DataTable from "./data-table";
|
||||||
import ControlContext from "./ControlContext";
|
import ControlContext from "./ControlContext";
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React, { useEffect, useContext, useState } from "react";
|
import React, { useEffect, useContext, useState } from "react";
|
||||||
import ControlContext from "../components/ControlContext";
|
import ControlContext from "../components/ControlContext";
|
||||||
|
|
||||||
import libLink from "@clusterio/lib/link";
|
import { libLink, libLogging } from "@clusterio/lib";
|
||||||
import { logger } from "@clusterio/lib/logging";
|
const { logger } = libLogging;
|
||||||
|
|
||||||
|
|
||||||
export function useInstance(id) {
|
export function useInstance(id) {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React, { useEffect, useContext, useState } from "react";
|
import React, { useEffect, useContext, useState } from "react";
|
||||||
import ControlContext from "../components/ControlContext";
|
import ControlContext from "../components/ControlContext";
|
||||||
|
|
||||||
import libLink from "@clusterio/lib/link";
|
import { libLink, libLogging } from "@clusterio/lib";
|
||||||
import { logger } from "@clusterio/lib/logging";
|
const { logger } = libLogging;
|
||||||
|
|
||||||
|
|
||||||
export function useSaves(instanceId) {
|
export function useSaves(instanceId) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useEffect, useContext, useState } from "react";
|
import React, { useEffect, useContext, useState } from "react";
|
||||||
import ControlContext from "../components/ControlContext";
|
import ControlContext from "../components/ControlContext";
|
||||||
|
|
||||||
import libLink from "@clusterio/lib/link";
|
import { libLink } from "@clusterio/lib";
|
||||||
|
|
||||||
|
|
||||||
export function useSlave(id) {
|
export function useSlave(id) {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { notification } from "antd";
|
import { notification } from "antd";
|
||||||
import { logger } from "@clusterio/lib/logging";
|
import { libLogging } from "@clusterio/lib";
|
||||||
|
const { logger } = libLogging;
|
||||||
|
|
||||||
|
|
||||||
export default function notify(message, type = "info", description = undefined) {
|
export default function notify(message, type = "info", description = undefined) {
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import libLink from "@clusterio/lib/link";
|
import { libErrors, libLink, libLogging, libPlugin } from "@clusterio/lib";
|
||||||
import libPlugin from "@clusterio/lib/plugin";
|
const { logger } = libLogging;
|
||||||
import libErrors from "@clusterio/lib/errors";
|
|
||||||
import { logger } from "@clusterio/lib/logging";
|
|
||||||
import packageJson from "../../package.json";
|
import packageJson from "../../package.json";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
let libLink = require("@clusterio/lib/link");
|
let { libLink } = require("@clusterio/lib");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "global_chat",
|
name: "global_chat",
|
||||||
|
|||||||
@@ -23,10 +23,8 @@ module.exports = (env = {}) => merge(common(env), {
|
|||||||
"./package.json": "./package.json",
|
"./package.json": "./package.json",
|
||||||
},
|
},
|
||||||
shared: {
|
shared: {
|
||||||
"@clusterio/lib/config": { import: false },
|
"@clusterio/lib": { import: false },
|
||||||
"@clusterio/lib/link": { import: false },
|
|
||||||
"@clusterio/web_ui": { import: false },
|
"@clusterio/web_ui": { import: false },
|
||||||
"ajv": { import: false },
|
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
const libLink = require("@clusterio/lib/link");
|
const { libConfig, libLink, libUsers } = require("@clusterio/lib");
|
||||||
const libConfig = require("@clusterio/lib/config");
|
|
||||||
const libUsers = require("@clusterio/lib/users");
|
|
||||||
|
|
||||||
class MasterConfigGroup extends libConfig.PluginConfigGroup { }
|
class MasterConfigGroup extends libConfig.PluginConfigGroup { }
|
||||||
MasterConfigGroup.defaultAccess = ["master", "slave", "control"];
|
MasterConfigGroup.defaultAccess = ["master", "slave", "control"];
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { useContext, useEffect, useState } from "react";
|
import React, { useContext, useEffect, useState } from "react";
|
||||||
|
|
||||||
import libPlugin from "@clusterio/lib/plugin";
|
import { libPlugin } from "@clusterio/lib";
|
||||||
import { PageLayout, ControlContext } from "@clusterio/web_ui";
|
import { PageLayout, ControlContext } from "@clusterio/web_ui";
|
||||||
import info from "../info";
|
import info from "../info";
|
||||||
|
|
||||||
|
|||||||
@@ -24,10 +24,8 @@ module.exports = (env = {}) => merge(common(env), {
|
|||||||
"./web": "./web/index.jsx",
|
"./web": "./web/index.jsx",
|
||||||
},
|
},
|
||||||
shared: {
|
shared: {
|
||||||
"@clusterio/lib/config": { import: false },
|
"@clusterio/lib": { import: false },
|
||||||
"@clusterio/lib/link": { import: false },
|
|
||||||
"@clusterio/web_ui": { import: false },
|
"@clusterio/web_ui": { import: false },
|
||||||
"ajv": { import: false },
|
|
||||||
"antd": { import: false },
|
"antd": { import: false },
|
||||||
"react": { import: false },
|
"react": { import: false },
|
||||||
"react-dom": { import: false },
|
"react-dom": { import: false },
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
let libLink = require("@clusterio/lib/link");
|
let { libConfig, libLink } = require("@clusterio/lib");
|
||||||
let libConfig = require("@clusterio/lib/config");
|
|
||||||
|
|
||||||
|
|
||||||
class MasterConfigGroup extends libConfig.PluginConfigGroup {}
|
class MasterConfigGroup extends libConfig.PluginConfigGroup {}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
|
|
||||||
import libPlugin from "@clusterio/lib/plugin";
|
import { libPlugin } from "@clusterio/lib";
|
||||||
import { notify, notifyErrorHandler } from "@clusterio/web_ui";
|
import { notify, notifyErrorHandler } from "@clusterio/web_ui";
|
||||||
import { Button, Form, Input, Spin, Typography } from "antd";
|
import { Button, Form, Input, Spin, Typography } from "antd";
|
||||||
|
|
||||||
|
|||||||
@@ -24,9 +24,7 @@ module.exports = (env = {}) => merge(common(env), {
|
|||||||
"./web": "./web/index.jsx",
|
"./web": "./web/index.jsx",
|
||||||
},
|
},
|
||||||
shared: {
|
shared: {
|
||||||
"@clusterio/lib/config": { import: false },
|
"@clusterio/lib": { import: false },
|
||||||
"@clusterio/lib/link": { import: false },
|
|
||||||
"@clusterio/lib/plugin": { import: false },
|
|
||||||
"@clusterio/web_ui": { import: false },
|
"@clusterio/web_ui": { import: false },
|
||||||
"antd": { import: false },
|
"antd": { import: false },
|
||||||
"react": { import: false },
|
"react": { import: false },
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
const libLink = require("@clusterio/lib/link");
|
const { libLink } = require("@clusterio/lib");
|
||||||
|
|
||||||
|
|
||||||
// schema used for syncing technologies to and from the master
|
// schema used for syncing technologies to and from the master
|
||||||
|
|||||||
@@ -23,10 +23,8 @@ module.exports = (env = {}) => merge(common(env), {
|
|||||||
"./package.json": "./package.json",
|
"./package.json": "./package.json",
|
||||||
},
|
},
|
||||||
shared: {
|
shared: {
|
||||||
"@clusterio/lib/config": { import: false },
|
"@clusterio/lib": { import: false },
|
||||||
"@clusterio/lib/link": { import: false },
|
|
||||||
"@clusterio/web_ui": { import: false },
|
"@clusterio/web_ui": { import: false },
|
||||||
"ajv": { import: false },
|
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
const libConfig = require("@clusterio/lib/config");
|
const { libConfig } = require("@clusterio/lib");
|
||||||
|
|
||||||
class InstanceConfigGroup extends libConfig.PluginConfigGroup {}
|
class InstanceConfigGroup extends libConfig.PluginConfigGroup {}
|
||||||
InstanceConfigGroup.defaultAccess = ["master", "slave", "control"];
|
InstanceConfigGroup.defaultAccess = ["master", "slave", "control"];
|
||||||
|
|||||||
@@ -23,10 +23,8 @@ module.exports = (env = {}) => merge(common(env), {
|
|||||||
"./package.json": "./package.json",
|
"./package.json": "./package.json",
|
||||||
},
|
},
|
||||||
shared: {
|
shared: {
|
||||||
"@clusterio/lib/config": { import: false },
|
"@clusterio/lib": { import: false },
|
||||||
"@clusterio/lib/link": { import: false },
|
|
||||||
"@clusterio/web_ui": { import: false },
|
"@clusterio/web_ui": { import: false },
|
||||||
"ajv": { import: false },
|
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
const libLink = require("@clusterio/lib/link");
|
const { libConfig, libLink, libUsers } = require("@clusterio/lib");
|
||||||
const libConfig = require("@clusterio/lib/config");
|
|
||||||
const libUsers = require("@clusterio/lib/users");
|
|
||||||
|
|
||||||
class MasterConfigGroup extends libConfig.PluginConfigGroup {}
|
class MasterConfigGroup extends libConfig.PluginConfigGroup {}
|
||||||
MasterConfigGroup.defaultAccess = ["master", "slave", "control"];
|
MasterConfigGroup.defaultAccess = ["master", "slave", "control"];
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useContext, useEffect, useState } from "react";
|
import React, { useContext, useEffect, useState } from "react";
|
||||||
import { Input, Table, Typography } from "antd";
|
import { Input, Table, Typography } from "antd";
|
||||||
|
|
||||||
import libPlugin from "@clusterio/lib/plugin";
|
import { libPlugin } from "@clusterio/lib";
|
||||||
import { notifyErrorHandler, useItemMetadata, useLocale, PageLayout, ControlContext } from "@clusterio/web_ui";
|
import { notifyErrorHandler, useItemMetadata, useLocale, PageLayout, ControlContext } from "@clusterio/web_ui";
|
||||||
import info from "../info";
|
import info from "../info";
|
||||||
|
|
||||||
|
|||||||
@@ -24,10 +24,7 @@ module.exports = (env = {}) => merge(common(env), {
|
|||||||
"./web": "./web/index.jsx",
|
"./web": "./web/index.jsx",
|
||||||
},
|
},
|
||||||
shared: {
|
shared: {
|
||||||
"@clusterio/lib/config": { import: false },
|
"@clusterio/lib": { import: false },
|
||||||
"@clusterio/lib/link": { import: false },
|
|
||||||
"@clusterio/lib/plugin": { import: false },
|
|
||||||
"@clusterio/lib/users": { import: false },
|
|
||||||
"@clusterio/web_ui": { import: false },
|
"@clusterio/web_ui": { import: false },
|
||||||
"antd": { import: false },
|
"antd": { import: false },
|
||||||
"react": { import: false },
|
"react": { import: false },
|
||||||
|
|||||||
Reference in new issue
Block a user