mirror of
https://github.com/dec0dOS/zero-ui.git
synced 2025-07-06 13:01:46 -07:00
feat: es6+mods
This commit is contained in:
parent
773b64ea30
commit
19c92ed244
19 changed files with 179 additions and 245 deletions
|
@ -1,19 +1,19 @@
|
||||||
const express = require("express");
|
import express from "express";
|
||||||
const path = require("path");
|
import path from "path";
|
||||||
const logger = require("morgan");
|
import logger from "morgan";
|
||||||
const compression = require("compression");
|
import compression from "compression";
|
||||||
const bearerToken = require("express-bearer-token");
|
import bearerToken from "express-bearer-token";
|
||||||
const helmet = require("helmet");
|
import helmet from "helmet";
|
||||||
const cron = require("node-cron");
|
import cron from "node-cron";
|
||||||
|
|
||||||
const db = require("./utils/db");
|
import { db } from "./utils/db.js";
|
||||||
const initAdmin = require("./utils/init-admin");
|
import { initAdmin } from "./utils/init-admin.js";
|
||||||
const pingAll = require("./utils/ping");
|
import { pingAll } from "./utils/ping.js";
|
||||||
|
|
||||||
const authRoutes = require("./routes/auth");
|
import authRoutes from "./routes/auth.js";
|
||||||
const networkRoutes = require("./routes/network");
|
import networkRoutes from "./routes/network.js";
|
||||||
const memberRoutes = require("./routes/member");
|
import memberRoutes from "./routes/member.js";
|
||||||
const controllerRoutes = require("./routes/controller");
|
import controllerRoutes from "./routes/controller.js";
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
|
|
||||||
|
@ -93,4 +93,4 @@ app.use(function (err, req, res, next) {
|
||||||
res.status(500).json({ error: "500 Internal server error" });
|
res.status(500).json({ error: "500 Internal server error" });
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = app;
|
export default app;
|
||||||
|
|
|
@ -1,13 +1,16 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
require("dotenv").config();
|
import dotenv from "dotenv";
|
||||||
|
dotenv.config();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module dependencies.
|
* Module dependencies.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var app = require("../app");
|
import app from "../app.js";
|
||||||
var debug = require("debug")("zero-ui:server");
|
|
||||||
var http = require("http");
|
import debug from "debug";
|
||||||
|
debug("zero-ui:server");
|
||||||
|
import http from "node:http";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get port from environment and store in Express.
|
* Get port from environment and store in Express.
|
||||||
|
@ -82,6 +85,6 @@ function onError(error) {
|
||||||
|
|
||||||
function onListening() {
|
function onListening() {
|
||||||
var addr = server.address();
|
var addr = server.address();
|
||||||
var bind = typeof addr === "string" ? "pipe " + addr : "port " + addr.port;
|
var bind = typeof addr === "string" ? "pipe " + addr : "port " + addr?.port;
|
||||||
debug("Listening on " + bind);
|
debug("Listening on " + bind);
|
||||||
}
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "backend",
|
"name": "backend",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node ./bin/www",
|
"start": "node ./bin/www",
|
||||||
"lint": "eslint . --report-unused-disable-directives --max-warnings 0",
|
"lint": "eslint . --report-unused-disable-directives --max-warnings 0",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const express = require("express");
|
import express from "express";
|
||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
|
|
||||||
const auth = require("../services/auth");
|
import { authorize } from "../services/auth.js";
|
||||||
|
|
||||||
router.get("/login", async function (req, res) {
|
router.get("/login", async function (req, res) {
|
||||||
if (process.env.ZU_DISABLE_AUTH === "true") {
|
if (process.env.ZU_DISABLE_AUTH === "true") {
|
||||||
|
@ -13,7 +13,7 @@ router.get("/login", async function (req, res) {
|
||||||
|
|
||||||
router.post("/login", async function (req, res) {
|
router.post("/login", async function (req, res) {
|
||||||
if (req.body.username && req.body.password) {
|
if (req.body.username && req.body.password) {
|
||||||
auth.authorize(req.body.username, req.body.password, function (err, user) {
|
authorize(req.body.username, req.body.password, function (err, user) {
|
||||||
if (user) {
|
if (user) {
|
||||||
res.send({ token: user["token"] });
|
res.send({ token: user["token"] });
|
||||||
} else {
|
} else {
|
||||||
|
@ -27,4 +27,4 @@ router.post("/login", async function (req, res) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = router;
|
export default router;
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
const express = require("express");
|
import express from "express";
|
||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
|
|
||||||
const auth = require("../services/auth");
|
import { isAuthorized } from "../services/auth.js";
|
||||||
const api = require("../utils/controller-api");
|
import { api } from "../utils/controller-api.js";
|
||||||
|
|
||||||
router.get("/status", auth.isAuthorized, async function (req, res) {
|
router.get("/status", isAuthorized, async function (req, res) {
|
||||||
api.get("status").then(function (controllerRes) {
|
api.get("status").then(function (controllerRes) {
|
||||||
res.send(controllerRes.data);
|
res.send(controllerRes.data);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = router;
|
export default router;
|
||||||
|
|
|
@ -1,20 +1,24 @@
|
||||||
const express = require("express");
|
import express from "express";
|
||||||
const router = express.Router({ mergeParams: true });
|
const router = express.Router({ mergeParams: true });
|
||||||
|
|
||||||
const auth = require("../services/auth");
|
import { isAuthorized } from "../services/auth.js";
|
||||||
const member = require("../services/member");
|
import {
|
||||||
|
deleteMemberAdditionalData,
|
||||||
|
getMembersData,
|
||||||
|
updateMemberAdditionalData,
|
||||||
|
} from "../services/member.js";
|
||||||
|
|
||||||
const api = require("../utils/controller-api");
|
import { api } from "../utils/controller-api.js";
|
||||||
|
|
||||||
// get all members
|
// get all members
|
||||||
router.get("/", auth.isAuthorized, async function (req, res) {
|
router.get("/", isAuthorized, async function (req, res) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const nwid = req.params.nwid;
|
const nwid = req.params.nwid;
|
||||||
api
|
api
|
||||||
.get("controller/network/" + nwid + "/member")
|
.get("controller/network/" + nwid + "/member")
|
||||||
.then(async function (controllerRes) {
|
.then(async function (controllerRes) {
|
||||||
const mids = Object.keys(controllerRes.data);
|
const mids = Object.keys(controllerRes.data);
|
||||||
const data = await member.getMembersData(nwid, mids);
|
const data = await getMembersData(nwid, mids);
|
||||||
res.send(data);
|
res.send(data);
|
||||||
})
|
})
|
||||||
.catch(function (err) {
|
.catch(function (err) {
|
||||||
|
@ -23,11 +27,11 @@ router.get("/", auth.isAuthorized, async function (req, res) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// get member
|
// get member
|
||||||
router.get("/:mid", auth.isAuthorized, async function (req, res) {
|
router.get("/:mid", isAuthorized, async function (req, res) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const nwid = req.params.nwid;
|
const nwid = req.params.nwid;
|
||||||
const mid = req.params.mid;
|
const mid = req.params.mid;
|
||||||
const data = await member.getMembersData(nwid, [mid]);
|
const data = await getMembersData(nwid, [mid]);
|
||||||
if (data[0]) {
|
if (data[0]) {
|
||||||
res.send(data[0]);
|
res.send(data[0]);
|
||||||
} else {
|
} else {
|
||||||
|
@ -36,33 +40,33 @@ router.get("/:mid", auth.isAuthorized, async function (req, res) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// update member
|
// update member
|
||||||
router.post("/:mid", auth.isAuthorized, async function (req, res) {
|
router.post("/:mid", isAuthorized, async function (req, res) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const nwid = req.params.nwid;
|
const nwid = req.params.nwid;
|
||||||
const mid = req.params.mid;
|
const mid = req.params.mid;
|
||||||
member.updateMemberAdditionalData(nwid, mid, req.body);
|
updateMemberAdditionalData(nwid, mid, req.body);
|
||||||
if (req.body.config) {
|
if (req.body.config) {
|
||||||
api
|
api
|
||||||
.post("controller/network/" + nwid + "/member/" + mid, req.body.config)
|
.post("controller/network/" + nwid + "/member/" + mid, req.body.config)
|
||||||
.then(async function () {
|
.then(async function () {
|
||||||
const data = await member.getMembersData(nwid, [mid]);
|
const data = await getMembersData(nwid, [mid]);
|
||||||
res.send(data[0]);
|
res.send(data[0]);
|
||||||
})
|
})
|
||||||
.catch(function (err) {
|
.catch(function (err) {
|
||||||
res.status(500).send({ error: err.message });
|
res.status(500).send({ error: err.message });
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const data = await member.getMembersData(nwid, [mid]);
|
const data = await getMembersData(nwid, [mid]);
|
||||||
res.send(data[0]);
|
res.send(data[0]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// delete member
|
// delete member
|
||||||
router.delete("/:mid", auth.isAuthorized, async function (req, res) {
|
router.delete("/:mid", isAuthorized, async function (req, res) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const nwid = req.params.nwid;
|
const nwid = req.params.nwid;
|
||||||
const mid = req.params.mid;
|
const mid = req.params.mid;
|
||||||
member.deleteMemberAdditionalData(nwid, mid);
|
deleteMemberAdditionalData(nwid, mid);
|
||||||
api
|
api
|
||||||
.delete("controller/network/" + nwid + "/member/" + mid)
|
.delete("controller/network/" + nwid + "/member/" + mid)
|
||||||
.then(function () {})
|
.then(function () {})
|
||||||
|
@ -86,4 +90,4 @@ router.delete("/:mid", auth.isAuthorized, async function (req, res) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = router;
|
export default router;
|
||||||
|
|
|
@ -1,12 +1,17 @@
|
||||||
const express = require("express");
|
import express from "express";
|
||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
|
|
||||||
const auth = require("../services/auth");
|
import { isAuthorized } from "../services/auth.js";
|
||||||
const network = require("../services/network");
|
import {
|
||||||
|
getNetworksData,
|
||||||
|
createNetworkAdditionalData,
|
||||||
|
updateNetworkAdditionalData,
|
||||||
|
deleteNetworkAdditionalData,
|
||||||
|
} from "../services/network.js";
|
||||||
|
|
||||||
const api = require("../utils/controller-api");
|
import { api } from "../utils/controller-api.js";
|
||||||
const constants = require("../utils/constants");
|
import { defaultRules } from "../utils/constants.js";
|
||||||
const getZTAddress = require("../utils/zt-address");
|
import { getZTAddress } from "../utils/zt-address.js";
|
||||||
|
|
||||||
let ZT_ADDRESS = null;
|
let ZT_ADDRESS = null;
|
||||||
getZTAddress().then(function (address) {
|
getZTAddress().then(function (address) {
|
||||||
|
@ -14,18 +19,18 @@ getZTAddress().then(function (address) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// get all networks
|
// get all networks
|
||||||
router.get("/", auth.isAuthorized, async function (req, res) {
|
router.get("/", isAuthorized, async function (req, res) {
|
||||||
api.get("controller/network").then(async function (controllerRes) {
|
api.get("controller/network").then(async function (controllerRes) {
|
||||||
const nwids = controllerRes.data;
|
const nwids = controllerRes.data;
|
||||||
const data = await network.getNetworksData(nwids);
|
const data = await getNetworksData(nwids);
|
||||||
res.send(data);
|
res.send(data);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// get network
|
// get network
|
||||||
router.get("/:nwid", auth.isAuthorized, async function (req, res) {
|
router.get("/:nwid", isAuthorized, async function (req, res) {
|
||||||
const nwid = req.params.nwid;
|
const nwid = req.params.nwid;
|
||||||
const data = await network.getNetworksData([nwid]);
|
const data = await getNetworksData([nwid]);
|
||||||
if (data[0]) {
|
if (data[0]) {
|
||||||
res.send(data[0]);
|
res.send(data[0]);
|
||||||
} else {
|
} else {
|
||||||
|
@ -34,49 +39,49 @@ router.get("/:nwid", auth.isAuthorized, async function (req, res) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// create new network
|
// create new network
|
||||||
router.post("/", auth.isAuthorized, async function (req, res) {
|
router.post("/", isAuthorized, async function (req, res) {
|
||||||
let reqData = req.body;
|
let reqData = req.body;
|
||||||
if (reqData.config) {
|
if (reqData.config) {
|
||||||
const config = reqData.config;
|
const config = reqData.config;
|
||||||
delete reqData.config;
|
delete reqData.config;
|
||||||
reqData = config;
|
reqData = config;
|
||||||
reqData.rules = JSON.parse(constants.defaultRules);
|
reqData.rules = JSON.parse(defaultRules);
|
||||||
} else {
|
} else {
|
||||||
res.status(400).send({ error: "Bad request" });
|
res.status(400).send({ error: "Bad request" });
|
||||||
}
|
}
|
||||||
api
|
api
|
||||||
.post("controller/network/" + ZT_ADDRESS + "______", reqData)
|
.post("controller/network/" + ZT_ADDRESS + "______", reqData)
|
||||||
.then(async function (controllerRes) {
|
.then(async function (controllerRes) {
|
||||||
await network.createNetworkAdditionalData(controllerRes.data.id);
|
await createNetworkAdditionalData(controllerRes.data.id);
|
||||||
const data = await network.getNetworksData([controllerRes.data.id]);
|
const data = await getNetworksData([controllerRes.data.id]);
|
||||||
res.send(data[0]);
|
res.send(data[0]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// update network
|
// update network
|
||||||
router.post("/:nwid", auth.isAuthorized, async function (req, res) {
|
router.post("/:nwid", isAuthorized, async function (req, res) {
|
||||||
const nwid = req.params.nwid;
|
const nwid = req.params.nwid;
|
||||||
network.updateNetworkAdditionalData(nwid, req.body);
|
updateNetworkAdditionalData(nwid, req.body);
|
||||||
if (req.body.config) {
|
if (req.body.config) {
|
||||||
api
|
api
|
||||||
.post("controller/network/" + nwid, req.body.config)
|
.post("controller/network/" + nwid, req.body.config)
|
||||||
.then(async function () {
|
.then(async function () {
|
||||||
const data = await network.getNetworksData([nwid]);
|
const data = await getNetworksData([nwid]);
|
||||||
res.send(data[0]);
|
res.send(data[0]);
|
||||||
})
|
})
|
||||||
.catch(function (err) {
|
.catch(function (err) {
|
||||||
res.status(500).send({ error: err.message });
|
res.status(500).send({ error: err.message });
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const data = await network.getNetworksData([nwid]);
|
const data = await getNetworksData([nwid]);
|
||||||
res.send(data[0]);
|
res.send(data[0]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// delete network
|
// delete network
|
||||||
router.delete("/:nwid", auth.isAuthorized, async function (req, res) {
|
router.delete("/:nwid", isAuthorized, async function (req, res) {
|
||||||
const nwid = req.params.nwid;
|
const nwid = req.params.nwid;
|
||||||
network.deleteNetworkAdditionalData(nwid);
|
deleteNetworkAdditionalData(nwid);
|
||||||
api
|
api
|
||||||
.delete("controller/network/" + nwid)
|
.delete("controller/network/" + nwid)
|
||||||
.then(function (controllerRes) {
|
.then(function (controllerRes) {
|
||||||
|
@ -87,4 +92,4 @@ router.delete("/:nwid", auth.isAuthorized, async function (req, res) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = router;
|
export default router;
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
const db = require("../utils/db");
|
import { db } from "../utils/db.js";
|
||||||
const verifyHash = require("pbkdf2-wrapper/verifyHash");
|
import verifyHash from "pbkdf2-wrapper/verifyHash.js";
|
||||||
|
|
||||||
exports.authorize = authorize;
|
export async function authorize(username, password, callback) {
|
||||||
async function authorize(username, password, callback) {
|
|
||||||
try {
|
try {
|
||||||
var users = await db.get("users");
|
var users = await db.get("users");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -18,8 +17,7 @@ async function authorize(username, password, callback) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.isAuthorized = isAuthorized;
|
export async function isAuthorized(req, res, next) {
|
||||||
async function isAuthorized(req, res, next) {
|
|
||||||
if (process.env.ZU_DISABLE_AUTH === "true") {
|
if (process.env.ZU_DISABLE_AUTH === "true") {
|
||||||
next();
|
next();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
const _ = require("lodash");
|
import _ from "lodash";
|
||||||
const axios = require("axios");
|
import axios from "axios";
|
||||||
|
|
||||||
const api = require("../utils/controller-api");
|
import { api } from "../utils/controller-api.js";
|
||||||
const db = require("../utils/db");
|
import { db } from "../utils/db.js";
|
||||||
const getZTAddress = require("../utils/zt-address");
|
import { getZTAddress } from "../utils/zt-address.js";
|
||||||
|
|
||||||
let ZT_ADDRESS = null;
|
let ZT_ADDRESS = null;
|
||||||
getZTAddress().then(function (address) {
|
getZTAddress().then(function (address) {
|
||||||
|
@ -91,8 +91,7 @@ async function filterDeleted(nwid, mid) {
|
||||||
else return;
|
else return;
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.getMembersData = getMembersData;
|
export async function getMembersData(nwid, mids) {
|
||||||
async function getMembersData(nwid, mids) {
|
|
||||||
const prefix = "/controller/network/" + nwid + "/member/";
|
const prefix = "/controller/network/" + nwid + "/member/";
|
||||||
const filtered = (
|
const filtered = (
|
||||||
await Promise.all(mids.map(async (mid) => await filterDeleted(nwid, mid)))
|
await Promise.all(mids.map(async (mid) => await filterDeleted(nwid, mid)))
|
||||||
|
@ -119,8 +118,7 @@ async function getMembersData(nwid, mids) {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.updateMemberAdditionalData = updateMemberAdditionalData;
|
export async function updateMemberAdditionalData(nwid, mid, data) {
|
||||||
async function updateMemberAdditionalData(nwid, mid, data) {
|
|
||||||
if (data.config && data.config.authorized) {
|
if (data.config && data.config.authorized) {
|
||||||
db.get("networks")
|
db.get("networks")
|
||||||
.filter({ id: nwid })
|
.filter({ id: nwid })
|
||||||
|
@ -172,8 +170,7 @@ async function updateMemberAdditionalData(nwid, mid, data) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.deleteMemberAdditionalData = deleteMemberAdditionalData;
|
export async function deleteMemberAdditionalData(nwid, mid) {
|
||||||
async function deleteMemberAdditionalData(nwid, mid) {
|
|
||||||
// ZT controller bug
|
// ZT controller bug
|
||||||
/* db.get("networks")
|
/* db.get("networks")
|
||||||
.find({ id: nwid })
|
.find({ id: nwid })
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
const _ = require("lodash");
|
import _ from "lodash";
|
||||||
const axios = require("axios");
|
import axios from "axios";
|
||||||
|
|
||||||
const api = require("../utils/controller-api");
|
import { api } from "../utils/controller-api.js";
|
||||||
const db = require("../utils/db");
|
import { db } from "../utils/db.js";
|
||||||
const constants = require("../utils/constants");
|
import { defaultRulesSource } from "../utils/constants.js";
|
||||||
|
|
||||||
async function getNetworkAdditionalData(data) {
|
export async function getNetworkAdditionalData(data) {
|
||||||
let additionalData = db
|
let additionalData = db
|
||||||
.get("networks")
|
.get("networks")
|
||||||
.find({ id: data.id })
|
.find({ id: data.id })
|
||||||
|
@ -29,8 +29,7 @@ async function getNetworkAdditionalData(data) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.getNetworksData = getNetworksData;
|
export async function getNetworksData(nwids) {
|
||||||
async function getNetworksData(nwids) {
|
|
||||||
const prefix = "/controller/network/";
|
const prefix = "/controller/network/";
|
||||||
const links = nwids.map((nwid) => prefix + nwid);
|
const links = nwids.map((nwid) => prefix + nwid);
|
||||||
|
|
||||||
|
@ -54,13 +53,12 @@ async function getNetworksData(nwids) {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.createNetworkAdditionalData = createNetworkAdditionalData;
|
export async function createNetworkAdditionalData(nwid) {
|
||||||
async function createNetworkAdditionalData(nwid) {
|
|
||||||
const saveData = {
|
const saveData = {
|
||||||
id: nwid,
|
id: nwid,
|
||||||
additionalConfig: {
|
additionalConfig: {
|
||||||
description: "",
|
description: "",
|
||||||
rulesSource: constants.defaultRulesSource,
|
rulesSource: defaultRulesSource,
|
||||||
tagsByName: {},
|
tagsByName: {},
|
||||||
capabilitiesByName: {},
|
capabilitiesByName: {},
|
||||||
},
|
},
|
||||||
|
@ -70,8 +68,7 @@ async function createNetworkAdditionalData(nwid) {
|
||||||
db.get("networks").push(saveData).write();
|
db.get("networks").push(saveData).write();
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.updateNetworkAdditionalData = updateNetworkAdditionalData;
|
export async function updateNetworkAdditionalData(nwid, data) {
|
||||||
async function updateNetworkAdditionalData(nwid, data) {
|
|
||||||
let additionalData = {};
|
let additionalData = {};
|
||||||
|
|
||||||
if (data.hasOwnProperty("description")) {
|
if (data.hasOwnProperty("description")) {
|
||||||
|
@ -96,7 +93,6 @@ async function updateNetworkAdditionalData(nwid, data) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.deleteNetworkAdditionalData = deleteNetworkAdditionalData;
|
export async function deleteNetworkAdditionalData(nwid) {
|
||||||
async function deleteNetworkAdditionalData(nwid) {
|
|
||||||
db.get("networks").remove({ id: nwid }).write();
|
db.get("networks").remove({ id: nwid }).write();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
exports.defaultRulesSource = `
|
export const defaultRulesSource = `
|
||||||
# This is a default rule set that allows IPv4 and IPv6 traffic but otherwise
|
# This is a default rule set that allows IPv4 and IPv6 traffic but otherwise
|
||||||
# behaves like a standard Ethernet switch.
|
# behaves like a standard Ethernet switch.
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ drop
|
||||||
accept;
|
accept;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports.defaultRules = `
|
export const defaultRules = `
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"type": "MATCH_ETHERTYPE",
|
"type": "MATCH_ETHERTYPE",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const axios = require("axios");
|
import axios from "axios";
|
||||||
const fs = require("fs");
|
import fs from "node:fs";
|
||||||
|
|
||||||
const baseURL = process.env.ZU_CONTROLLER_ENDPOINT || "http://localhost:9993/";
|
const baseURL = process.env.ZU_CONTROLLER_ENDPOINT || "http://localhost:9993/";
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ if (process.env.ZU_CONTROLLER_TOKEN) {
|
||||||
token = fs.readFileSync("/var/lib/zerotier-one/authtoken.secret", "utf8");
|
token = fs.readFileSync("/var/lib/zerotier-one/authtoken.secret", "utf8");
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = axios.create({
|
export const api = axios.create({
|
||||||
baseURL: baseURL,
|
baseURL: baseURL,
|
||||||
responseType: "json",
|
responseType: "json",
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
const low = require("lowdb");
|
import low from "lowdb";
|
||||||
const FileSync = require("lowdb/adapters/FileSync");
|
import FileSync from "lowdb/adapters/FileSync.js";
|
||||||
|
|
||||||
const adapter = new FileSync(process.env.ZU_DATAPATH || "data/db.json");
|
const adapter = new FileSync(process.env.ZU_DATAPATH || "data/db.json");
|
||||||
|
|
||||||
const db = low(adapter);
|
export const db = low(adapter);
|
||||||
|
|
||||||
module.exports = db;
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const crypto = require("crypto");
|
import crypto from "crypto";
|
||||||
const hashPassword = require("pbkdf2-wrapper/hashText");
|
import hashPassword from "pbkdf2-wrapper/hashText.js";
|
||||||
|
|
||||||
module.exports = async function () {
|
export async function initAdmin() {
|
||||||
if (!process.env.ZU_DEFAULT_PASSWORD || !process.env.ZU_DEFAULT_USERNAME) {
|
if (!process.env.ZU_DEFAULT_PASSWORD || !process.env.ZU_DEFAULT_USERNAME) {
|
||||||
console.error("ZU_DEFAULT_PASSWORD or ZU_DEFAULT_USERNAME not found!");
|
console.error("ZU_DEFAULT_PASSWORD or ZU_DEFAULT_USERNAME not found!");
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
@ -13,4 +13,4 @@ module.exports = async function () {
|
||||||
password_hash: hash,
|
password_hash: hash,
|
||||||
token: crypto.randomBytes(16).toString("hex"),
|
token: crypto.randomBytes(16).toString("hex"),
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
const _ = require("lodash");
|
import _ from "lodash";
|
||||||
|
|
||||||
const api = require("./controller-api");
|
import { api } from "./controller-api.js";
|
||||||
const db = require("./db");
|
import { db } from "./db.js";
|
||||||
|
|
||||||
async function pingAll(network) {
|
export async function pingAll(network) {
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
network.members.map(async (member) => {
|
network.members.map(async (member) => {
|
||||||
console.debug("Processing member " + member.id);
|
console.debug("Processing member " + member.id);
|
||||||
|
@ -29,5 +29,3 @@ async function pingAll(network) {
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = pingAll;
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const api = require("../utils/controller-api");
|
import { api } from "../utils/controller-api.js";
|
||||||
|
|
||||||
module.exports = async function () {
|
export async function getZTAddress() {
|
||||||
try {
|
try {
|
||||||
const res = await api.get("status");
|
const res = await api.get("status");
|
||||||
return res.data.address;
|
return res.data.address;
|
||||||
|
@ -10,4 +10,4 @@ module.exports = async function () {
|
||||||
"Couldn't connect to the controller on " + err.config.baseURL
|
"Couldn't connect to the controller on " + err.config.baseURL
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
|
@ -39,10 +39,12 @@ function Network() {
|
||||||
if (loggedIn) {
|
if (loggedIn) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<div className={classes.breadcrumbs}>
|
||||||
<Link color="inherit" component={RouterLink} to="/" underline="none">
|
<Link color="inherit" component={RouterLink} to="/" underline="none">
|
||||||
<ArrowBackIcon className={classes.backIcon}></ArrowBackIcon>
|
<ArrowBackIcon className={classes.backIcon}></ArrowBackIcon>
|
||||||
Networks
|
Networks
|
||||||
</Link>
|
</Link>
|
||||||
|
</div>
|
||||||
<div className={classes.container}>
|
<div className={classes.container}>
|
||||||
{network["config"] && (
|
{network["config"] && (
|
||||||
<>
|
<>
|
||||||
|
|
|
@ -5,7 +5,11 @@ const useStyles = makeStyles((theme) => ({
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
},
|
},
|
||||||
container: {
|
container: {
|
||||||
margin: "1%",
|
margin: "3%",
|
||||||
|
},
|
||||||
|
breadcrumbs: {
|
||||||
|
paddingTop: "2%",
|
||||||
|
paddingLeft: "2%",
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
168
yarn.lock
168
yarn.lock
|
@ -22,16 +22,7 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.22.5":
|
"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.22.13":
|
||||||
version: 7.22.5
|
|
||||||
resolution: "@babel/code-frame@npm:7.22.5"
|
|
||||||
dependencies:
|
|
||||||
"@babel/highlight": "npm:^7.22.5"
|
|
||||||
checksum: b1ac7de75859699a9118c5247f489cc943d8d041339323904cd8140592993762f50abc14bc49b6703cb8a94b1aa90d6df2599625825e7ae470c9283b4a6170aa
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"@babel/code-frame@npm:^7.22.13":
|
|
||||||
version: 7.22.13
|
version: 7.22.13
|
||||||
resolution: "@babel/code-frame@npm:7.22.13"
|
resolution: "@babel/code-frame@npm:7.22.13"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -41,6 +32,15 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@babel/code-frame@npm:^7.22.5":
|
||||||
|
version: 7.22.5
|
||||||
|
resolution: "@babel/code-frame@npm:7.22.5"
|
||||||
|
dependencies:
|
||||||
|
"@babel/highlight": "npm:^7.22.5"
|
||||||
|
checksum: b1ac7de75859699a9118c5247f489cc943d8d041339323904cd8140592993762f50abc14bc49b6703cb8a94b1aa90d6df2599625825e7ae470c9283b4a6170aa
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@babel/compat-data@npm:^7.22.9":
|
"@babel/compat-data@npm:^7.22.9":
|
||||||
version: 7.22.9
|
version: 7.22.9
|
||||||
resolution: "@babel/compat-data@npm:7.22.9"
|
resolution: "@babel/compat-data@npm:7.22.9"
|
||||||
|
@ -511,29 +511,7 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@commitlint/load@npm:>6.1.1":
|
"@commitlint/load@npm:>6.1.1, @commitlint/load@npm:^17.7.2":
|
||||||
version: 17.6.7
|
|
||||||
resolution: "@commitlint/load@npm:17.6.7"
|
|
||||||
dependencies:
|
|
||||||
"@commitlint/config-validator": "npm:^17.6.7"
|
|
||||||
"@commitlint/execute-rule": "npm:^17.4.0"
|
|
||||||
"@commitlint/resolve-extends": "npm:^17.6.7"
|
|
||||||
"@commitlint/types": "npm:^17.4.4"
|
|
||||||
"@types/node": "npm:*"
|
|
||||||
chalk: "npm:^4.1.0"
|
|
||||||
cosmiconfig: "npm:^8.0.0"
|
|
||||||
cosmiconfig-typescript-loader: "npm:^4.0.0"
|
|
||||||
lodash.isplainobject: "npm:^4.0.6"
|
|
||||||
lodash.merge: "npm:^4.6.2"
|
|
||||||
lodash.uniq: "npm:^4.5.0"
|
|
||||||
resolve-from: "npm:^5.0.0"
|
|
||||||
ts-node: "npm:^10.8.1"
|
|
||||||
typescript: "npm:^4.6.4 || ^5.0.0"
|
|
||||||
checksum: 70e627ee4146cba54889cdab242abe5b9d620de83b029a2c333c4b9b6b14e2bc2bd260e23443223b1c1e082c29cb2f4b8d928014bfc4c0680afa205e565ad3eb
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"@commitlint/load@npm:^17.7.2":
|
|
||||||
version: 17.7.2
|
version: 17.7.2
|
||||||
resolution: "@commitlint/load@npm:17.7.2"
|
resolution: "@commitlint/load@npm:17.7.2"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -1335,16 +1313,16 @@ __metadata:
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@types/minimist@npm:^1.2.0":
|
"@types/minimist@npm:^1.2.0":
|
||||||
version: 1.2.2
|
version: 1.2.3
|
||||||
resolution: "@types/minimist@npm:1.2.2"
|
resolution: "@types/minimist@npm:1.2.3"
|
||||||
checksum: b8da83c66eb4aac0440e64674b19564d9d86c80ae273144db9681e5eeff66f238ade9515f5006ffbfa955ceff8b89ad2bd8ec577d7caee74ba101431fb07045d
|
checksum: 666ea4f8c39dcbdfbc3171fe6b3902157c845cc9cb8cee33c10deb706cda5e0cc80f98ace2d6d29f6774b0dc21180c96cd73c592a1cbefe04777247c7ba0e84b
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@types/node@npm:*":
|
"@types/node@npm:*":
|
||||||
version: 20.4.5
|
version: 20.8.2
|
||||||
resolution: "@types/node@npm:20.4.5"
|
resolution: "@types/node@npm:20.8.2"
|
||||||
checksum: aa31081f82a2d377f00cfd7ced73925753db1f542fca19e6b0442585a7322b8eacd957fdccaaff65d9976454d213af0980c12390c59a975cf8a368e3f872717a
|
checksum: 61bd39870625d8afcbb4f21d6a0c3a9681f6d508dc6b06f2497e9ad3ec942092a120bcfdbc1757a8e4017308449bc2a9b9865b2b9840b158878a4e8cc0804a3c
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -1356,9 +1334,9 @@ __metadata:
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@types/normalize-package-data@npm:^2.4.0":
|
"@types/normalize-package-data@npm:^2.4.0":
|
||||||
version: 2.4.1
|
version: 2.4.2
|
||||||
resolution: "@types/normalize-package-data@npm:2.4.1"
|
resolution: "@types/normalize-package-data@npm:2.4.2"
|
||||||
checksum: e87bccbf11f95035c89a132b52b79ce69a1e3652fe55962363063c9c0dae0fe2477ebc585e03a9652adc6f381d24ba5589cc5e51849df4ced3d3e004a7d40ed5
|
checksum: 2132e4054711e6118de967ae3a34f8c564e58d71fbcab678ec2c34c14659f638a86c35a0fd45237ea35a4a03079cf0a485e3f97736ffba5ed647bfb5da086b03
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -2391,9 +2369,9 @@ __metadata:
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"cli-spinners@npm:^2.5.0":
|
"cli-spinners@npm:^2.5.0":
|
||||||
version: 2.9.0
|
version: 2.9.1
|
||||||
resolution: "cli-spinners@npm:2.9.0"
|
resolution: "cli-spinners@npm:2.9.1"
|
||||||
checksum: 457497ccef70eec3f1d0825e4a3396ba43f6833a4900c2047c0efe2beecb1c0df476949ea378bcb6595754f7508e28ae943eeb30bbda807f59f547b270ec334c
|
checksum: 80b7b21f2e713729041b26afd02cd881a05ba83d0973c60d332e6010261a732a42d039bdf401dec32645cba41a69324880bbbd999c8876b1eb9888451137df01
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -2973,14 +2951,19 @@ __metadata:
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"cosmiconfig@npm:^8.0.0":
|
"cosmiconfig@npm:^8.0.0":
|
||||||
version: 8.2.0
|
version: 8.3.6
|
||||||
resolution: "cosmiconfig@npm:8.2.0"
|
resolution: "cosmiconfig@npm:8.3.6"
|
||||||
dependencies:
|
dependencies:
|
||||||
import-fresh: "npm:^3.2.1"
|
import-fresh: "npm:^3.3.0"
|
||||||
js-yaml: "npm:^4.1.0"
|
js-yaml: "npm:^4.1.0"
|
||||||
parse-json: "npm:^5.0.0"
|
parse-json: "npm:^5.2.0"
|
||||||
path-type: "npm:^4.0.0"
|
path-type: "npm:^4.0.0"
|
||||||
checksum: e0b188f9a672ee7135851bf9d9fc8f0ba00f9769c95fda5af0ebc274804f6aeb713b753e04e706f595e1fbd0fa67c5073840666019068c0296a06057560ab39d
|
peerDependencies:
|
||||||
|
typescript: ">=4.9.5"
|
||||||
|
peerDependenciesMeta:
|
||||||
|
typescript:
|
||||||
|
optional: true
|
||||||
|
checksum: 91d082baca0f33b1c085bf010f9ded4af43cbedacba8821da0fb5667184d0a848addc52c31fadd080007f904a555319c238cf5f4c03e6d58ece2e4876b2e73d6
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -4745,11 +4728,11 @@ __metadata:
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"handlebars@npm:^4.7.7":
|
"handlebars@npm:^4.7.7":
|
||||||
version: 4.7.7
|
version: 4.7.8
|
||||||
resolution: "handlebars@npm:4.7.7"
|
resolution: "handlebars@npm:4.7.8"
|
||||||
dependencies:
|
dependencies:
|
||||||
minimist: "npm:^1.2.5"
|
minimist: "npm:^1.2.5"
|
||||||
neo-async: "npm:^2.6.0"
|
neo-async: "npm:^2.6.2"
|
||||||
source-map: "npm:^0.6.1"
|
source-map: "npm:^0.6.1"
|
||||||
uglify-js: "npm:^3.1.4"
|
uglify-js: "npm:^3.1.4"
|
||||||
wordwrap: "npm:^1.0.0"
|
wordwrap: "npm:^1.0.0"
|
||||||
|
@ -4758,7 +4741,7 @@ __metadata:
|
||||||
optional: true
|
optional: true
|
||||||
bin:
|
bin:
|
||||||
handlebars: bin/handlebars
|
handlebars: bin/handlebars
|
||||||
checksum: 617b1e689b7577734abc74564bdb8cdaddf8fd48ce72afdb489f426e9c60a7d6ee2a2707c023720c4059070128243c948bded8f2716e4543378033e3971b85ea
|
checksum: bd528f4dd150adf67f3f857118ef0fa43ff79a153b1d943fa0a770f2599e38b25a7a0dbac1a3611a4ec86970fd2325a81310fb788b5c892308c9f8743bd02e11
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -5021,7 +5004,7 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"import-fresh@npm:^3.0.0, import-fresh@npm:^3.2.1":
|
"import-fresh@npm:^3.0.0, import-fresh@npm:^3.2.1, import-fresh@npm:^3.3.0":
|
||||||
version: 3.3.0
|
version: 3.3.0
|
||||||
resolution: "import-fresh@npm:3.3.0"
|
resolution: "import-fresh@npm:3.3.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -5205,16 +5188,7 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"is-core-module@npm:^2.12.0, is-core-module@npm:^2.5.0":
|
"is-core-module@npm:^2.12.1, is-core-module@npm:^2.13.0, is-core-module@npm:^2.5.0, is-core-module@npm:^2.9.0":
|
||||||
version: 2.12.1
|
|
||||||
resolution: "is-core-module@npm:2.12.1"
|
|
||||||
dependencies:
|
|
||||||
has: "npm:^1.0.3"
|
|
||||||
checksum: 35d5f90c95f7c737d287121e924bdfcad0a47b33efd7f89c58e9ab3810b43b1f1d377b641797326bde500e47edf5a7bf74a464e0c336a5c7e827b13fa41b57af
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"is-core-module@npm:^2.12.1, is-core-module@npm:^2.13.0, is-core-module@npm:^2.9.0":
|
|
||||||
version: 2.13.0
|
version: 2.13.0
|
||||||
resolution: "is-core-module@npm:2.13.0"
|
resolution: "is-core-module@npm:2.13.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -6561,7 +6535,7 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"neo-async@npm:^2.6.0":
|
"neo-async@npm:^2.6.2":
|
||||||
version: 2.6.2
|
version: 2.6.2
|
||||||
resolution: "neo-async@npm:2.6.2"
|
resolution: "neo-async@npm:2.6.2"
|
||||||
checksum: 1a7948fea86f2b33ec766bc899c88796a51ba76a4afc9026764aedc6e7cde692a09067031e4a1bf6db4f978ccd99e7f5b6c03fe47ad9865c3d4f99050d67e002
|
checksum: 1a7948fea86f2b33ec766bc899c88796a51ba76a4afc9026764aedc6e7cde692a09067031e4a1bf6db4f978ccd99e7f5b6c03fe47ad9865c3d4f99050d67e002
|
||||||
|
@ -7001,7 +6975,7 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"parse-json@npm:^5.0.0":
|
"parse-json@npm:^5.0.0, parse-json@npm:^5.2.0":
|
||||||
version: 5.2.0
|
version: 5.2.0
|
||||||
resolution: "parse-json@npm:5.2.0"
|
resolution: "parse-json@npm:5.2.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -7659,20 +7633,7 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"resolve@npm:^1.10.0":
|
"resolve@npm:^1.10.0, resolve@npm:^1.22.2, resolve@npm:^1.22.4":
|
||||||
version: 1.22.3
|
|
||||||
resolution: "resolve@npm:1.22.3"
|
|
||||||
dependencies:
|
|
||||||
is-core-module: "npm:^2.12.0"
|
|
||||||
path-parse: "npm:^1.0.7"
|
|
||||||
supports-preserve-symlinks-flag: "npm:^1.0.0"
|
|
||||||
bin:
|
|
||||||
resolve: bin/resolve
|
|
||||||
checksum: 3d733800d5f7525df912e9c4a68ee14574f42fa3676651debe6d2f6f55f8eef35626ad6330745da52943d695760f1ac7ee85b2c24f48be111f744aba7cb2e06d
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"resolve@npm:^1.22.2, resolve@npm:^1.22.4":
|
|
||||||
version: 1.22.6
|
version: 1.22.6
|
||||||
resolution: "resolve@npm:1.22.6"
|
resolution: "resolve@npm:1.22.6"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -7698,20 +7659,7 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"resolve@patch:resolve@npm%3A^1.10.0#optional!builtin<compat/resolve>":
|
"resolve@patch:resolve@npm%3A^1.10.0#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.22.2#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin<compat/resolve>":
|
||||||
version: 1.22.3
|
|
||||||
resolution: "resolve@patch:resolve@npm%3A1.22.3#optional!builtin<compat/resolve>::version=1.22.3&hash=c3c19d"
|
|
||||||
dependencies:
|
|
||||||
is-core-module: "npm:^2.12.0"
|
|
||||||
path-parse: "npm:^1.0.7"
|
|
||||||
supports-preserve-symlinks-flag: "npm:^1.0.0"
|
|
||||||
bin:
|
|
||||||
resolve: bin/resolve
|
|
||||||
checksum: b775dffbad4d4ed3ae498a37d33a96282d64de50955f7642258aeaa2886e419598f4dfe837c0e31bcc6eb448287c1578e899dffe49eca76ef393bf8605a3b543
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"resolve@patch:resolve@npm%3A^1.22.2#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin<compat/resolve>":
|
|
||||||
version: 1.22.6
|
version: 1.22.6
|
||||||
resolution: "resolve@patch:resolve@npm%3A1.22.6#optional!builtin<compat/resolve>::version=1.22.6&hash=c3c19d"
|
resolution: "resolve@patch:resolve@npm%3A1.22.6#optional!builtin<compat/resolve>::version=1.22.6&hash=c3c19d"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -8251,9 +8199,9 @@ __metadata:
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"spdx-license-ids@npm:^3.0.0":
|
"spdx-license-ids@npm:^3.0.0":
|
||||||
version: 3.0.13
|
version: 3.0.16
|
||||||
resolution: "spdx-license-ids@npm:3.0.13"
|
resolution: "spdx-license-ids@npm:3.0.16"
|
||||||
checksum: 6328c516e958ceee80362dc657a58cab01c7fdb4667a1a4c1a3e91d069983977f87971340ee857eb66f65079b5d8561e56dc91510802cd7bebaae7632a6aa7fa
|
checksum: 6425c54132ca38d717315cdbd2b620235937d1859972c5978bbc95b4c14400438ffe113709d8aabb0d5498cc27a5b89876fca0fe21b4e26f5ce122bc86d0d88e
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -8929,17 +8877,7 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"typescript@npm:^4.6.4 || ^5.0.0":
|
"typescript@npm:^4.6.4 || ^5.0.0, typescript@npm:^5.2.2":
|
||||||
version: 5.1.6
|
|
||||||
resolution: "typescript@npm:5.1.6"
|
|
||||||
bin:
|
|
||||||
tsc: bin/tsc
|
|
||||||
tsserver: bin/tsserver
|
|
||||||
checksum: f347cde665cf43dc4c1c7d9821c7d9bbec3c3914f4bdd82ee490e9fb9f6d99036ed8666463b6a192dd005eeef333c5087d5931bdd51ec853436ff9a670a7417e
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"typescript@npm:^5.2.2":
|
|
||||||
version: 5.2.2
|
version: 5.2.2
|
||||||
resolution: "typescript@npm:5.2.2"
|
resolution: "typescript@npm:5.2.2"
|
||||||
bin:
|
bin:
|
||||||
|
@ -8949,17 +8887,7 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"typescript@patch:typescript@npm%3A^4.6.4 || ^5.0.0#optional!builtin<compat/typescript>":
|
"typescript@patch:typescript@npm%3A^4.6.4 || ^5.0.0#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.2.2#optional!builtin<compat/typescript>":
|
||||||
version: 5.1.6
|
|
||||||
resolution: "typescript@patch:typescript@npm%3A5.1.6#optional!builtin<compat/typescript>::version=5.1.6&hash=5da071"
|
|
||||||
bin:
|
|
||||||
tsc: bin/tsc
|
|
||||||
tsserver: bin/tsserver
|
|
||||||
checksum: f5481fa3ba0eee8970f46708d13c05650a865ad093b586fc9573f425c64c57ca97e3308e110bb528deb3ccebe83f6fd7b5a8ac90018038da96326a9ccdf8e77c
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"typescript@patch:typescript@npm%3A^5.2.2#optional!builtin<compat/typescript>":
|
|
||||||
version: 5.2.2
|
version: 5.2.2
|
||||||
resolution: "typescript@patch:typescript@npm%3A5.2.2#optional!builtin<compat/typescript>::version=5.2.2&hash=f3b441"
|
resolution: "typescript@patch:typescript@npm%3A5.2.2#optional!builtin<compat/typescript>::version=5.2.2&hash=f3b441"
|
||||||
bin:
|
bin:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue