From 7a2be7eb4fb7be2bedda0bd922e641e25eeba690 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Thu, 12 Aug 2021 20:22:37 -0300 Subject: [PATCH 01/29] Binary and Command fix duplicate log --- bin/bds_maneger.js | 12 +-- index.js | 22 ------ lib/BdsSettings.js | 1 + src/BdsBackup.js | 4 +- src/BdsManegerServer.js | 147 ++++++++++++++++++------------------- src/rest/routes/players.js | 17 +++-- 6 files changed, 93 insertions(+), 110 deletions(-) diff --git a/bin/bds_maneger.js b/bin/bds_maneger.js index 723dadb..7319769 100755 --- a/bin/bds_maneger.js +++ b/bin/bds_maneger.js @@ -54,8 +54,12 @@ function StartServer(){ console.log("Send a \"@stop\" command to stop the server and exit\nUse CTRL + C to force exit\n"); // Start Server const bds_server = bds.start(); - bds_server.log(echo) - bds_server.exit(function (code){if (code === 3221225781) return open("https://docs.the-bds-maneger.org/Bds Maneger core/WindowsFixDll");console.log("leaving the server, status code: ", code);process.exit(code)}); + bds_server.log(data => process.stdout.write(data)); + bds_server.exit(function (code){ + if (code === 3221225781 && process.platform === "win32") return open("https://docs.the-bds-maneger.org/Bds Maneger core/WindowsFixDll"); + console.log("leaving the server, status code:", code); + process.exit(code) + }); // CLI Commands const rl = readline.createInterface({input: process.stdin,output: process.stdout}); @@ -207,8 +211,4 @@ if (bds_version){ } // Start server -function echo(data = ""){ - data = data.split("\n").filter(data => {return (data !== "")}) - data.forEach(data => console.log(data)) -} if (start && !(server || version || SystemCheck || bds_version || help)) StartServer(); diff --git a/index.js b/index.js index 29f8271..0555a4a 100644 --- a/index.js +++ b/index.js @@ -7,23 +7,6 @@ const { bds_dir } = require("./lib/BdsSettings"); if (typeof fetch === "undefined") global.fetch = require("node-fetch"); -function date(format) { - const today = new Date(), - yaer = today.getFullYear(), - day = String(today.getDate()).padStart(2, "0"), - month = String(today.getMonth() + 1).padStart(2, "0"), - hour = today.getHours(), - minute = today.getMinutes(); - // --------------------------------------------------------- - if (format === "year") return yaer - else if (format === "day") return day - else if (format === "month") return month - else if (format === "hour") return hour - else if (format === "minute") return minute - else if (format === "hour_minu") return `${hour}-${minute}` - else return `${day}-${month}-${yaer}_${hour}-${minute}` -} - const bds_core_package = resolve(__dirname, "package.json") module.exports.package_path = bds_core_package module.exports.package_json = require("./package.json"); @@ -104,11 +87,6 @@ const { config, get_config } = require("./src/ServerSettings"); const download = require("./src/BdsServersDownload"); const { start, stop, BdsCommand, CronBackups } = require("./src/BdsManegerServer") -/** - * Take the current date - */ -module.exports.BdsDate = module.exports.date = date - /** * sending commands more simply to the server * diff --git a/lib/BdsSettings.js b/lib/BdsSettings.js index 7db3a6d..77e95f9 100644 --- a/lib/BdsSettings.js +++ b/lib/BdsSettings.js @@ -46,6 +46,7 @@ var Config = { java: null, pocketmine: null, jsprismarine: null, + spigot: null, }, Settings: { java: { diff --git a/src/BdsBackup.js b/src/BdsBackup.js index 213d677..aad848a 100644 --- a/src/BdsBackup.js +++ b/src/BdsBackup.js @@ -1,4 +1,3 @@ -const bds = require("../index") const { join, resolve } = require("path"); const { readdirSync, existsSync, readFileSync, statSync } = require("fs") const AdmZip = require("adm-zip"); @@ -14,7 +13,8 @@ function Backup() { pocketmine: GetServerPaths("pocketmine"), jsprismarine: GetServerPaths("jsprismarine") } - const name = `Bds_Maneger-Backups_${bds.date()}.zip` + const CurrentDate = new Date(); + const name = `Bds_Maneger_Core_Backups_${CurrentDate.getDate()}-${CurrentDate.getMonth()}-${CurrentDate.getFullYear()}.zip` const PathBackup = join(GetPaths("backups"), name); // Bedrock diff --git a/src/BdsManegerServer.js b/src/BdsManegerServer.js index f627923..b074629 100644 --- a/src/BdsManegerServer.js +++ b/src/BdsManegerServer.js @@ -101,8 +101,7 @@ function start() { } // Log file - - const LogFile = join(GetPaths("log"), `${bds.date()}_${GetPlatform()}_Bds_log.log`); + const LogFile = join(GetPaths("log"), `${GetPlatform()}_${new Date().toString()}_Bds_log.log`); const LatestLog_Path = path.join(GetPaths("log"), "latest.log"); const LogSaveFunction = data => { fs.appendFileSync(LogFile, data); @@ -123,81 +122,80 @@ function start() { global.bds_log_string = "" ServerExec.stdout.on("data", data => {if (global.bds_log_string) global.bds_log_string = data; else global.bds_log_string += data}); + // sets bds core commands + const command = async function (command = "list", callback = function (){}) { + return new Promise((resolve) => { + ServerExec.stdin.write(`${command}\n`); + if (typeof callback === "function") { + const TempLog = [] + const ControlTempHost = data => {TempLog.push(data); return data;} + ServerExec.stdout.on("data", data => ControlTempHost(data)); + ServerExec.stderr.on("data", data => ControlTempHost(data)); + setTimeout(() => { + callback(TempLog.join("\n")); + resolve(TempLog.join("\n")); + }, 2500); + } + }); + }; + const log = function (logCallback = data => process.stdout.write(data)){ + if (typeof logCallback !== "function") throw new Error("Log Callback is not a function"); + ServerExec.stdout.on("data", data => logCallback(data)); + ServerExec.stderr.on("data", data => logCallback(data)); + }; + const exit = function (exitCallback = process.exit){if ( + typeof exitCallback === "function") ServerExec.on("exit", code => exitCallback(code)); + }; + const on = function(action = String, callback = Function) { + if (!(action === "all" || action === "connect" || action === "disconnect")) throw new Error("Use some valid action: all, connect, disconnect"); + + // Functions + const data = data => Player_Json(data, function (array_status){ + for (let _player of array_status) { + if (action === "all") callback(_player); + else if (_player.Action === action) callback(_player) + } + }); + ServerExec.stdout.on("data", data); + ServerExec.stderr.on("data", data); + }; + const stop = function (){ + ServerExec.stdin.write(BdsInfo.Servers[GetPlatform()].stop+"\n"); + return BdsInfo.Servers[GetPlatform()].stop; + }; + const op = function (player = "Steve") { + let command = BdsInfo.Servers[GetPlatform()].op.replace("{{Player}}", player); + ServerExec.stdin.write(command+"\n"); + return command; + }; + const deop = function (player = "Steve") { + let command = BdsInfo.Servers[GetPlatform()].deop.replace("{{Player}}", player); + ServerExec.stdin.write(command+"\n"); + return command; + }; + const ban = function (player = "Steve") { + let command = BdsInfo.Servers[GetPlatform()].ban.replace("{{Player}}", player); + ServerExec.stdin.write(command+"\n"); + return command; + }; + const kick = function (player = "Steve", text = "you got kicked") { + let command = BdsInfo.Servers[GetPlatform()].kick.replace("{{Player}}", player).replace("{{Text}}", text); + ServerExec.stdin.write(command+"\n"); + return command; + }; + const tp = function (player = "Steve", cord = {x: 0, y: 128, z: 0}) { + let command = BdsInfo.Servers[GetPlatform()].tp.replace("{{Player}}", player); + if (cord.x) command = command.replace("{{X}}", cord.x); else command = command.replace("{{X}}", 0); + if (cord.y) command = command.replace("{{Y}}", cord.y); else command = command.replace("{{Y}}", 128); + if (cord.y) command = command.replace("{{Z}}", cord.y); else command = command.replace("{{Z}}", 0); + ServerExec.stdin.write(command+"\n"); + return command; + }; const returnFuntion = { uuid: randomUUID(), - stop: function (){ - ServerExec.stdin.write(BdsInfo.Servers[GetPlatform()].stop+"\n"); - return BdsInfo.Servers[GetPlatform()].stop; - }, - command: async function (command = "list", callback = data => console.log(data)){ - return new Promise((resolve) => { - ServerExec.stdin.write(`${command}\n`); - if (typeof callback === "function") { - const TempLog = [] - const ControlTempHost = data => {TempLog.push(data); return data;} - ServerExec.stdout.on("data", data => ControlTempHost(data)); - ServerExec.stderr.on("data", data => ControlTempHost(data)); - setTimeout(() => { - callback(TempLog.join("\n")); - resolve(TempLog.join("\n")); - }, 2500); - } - }); - }, - log: function (logCallback = function(data = ""){data.split("\n").filter(d=>{return (d !== "")}).forEach(l=>console.log(l))}){ - if (typeof logCallback !== "function") { - console.warn("The log callback is not a function using console.log"); - logCallback = function(data = ""){data.split("\n").filter(d=>{return (d !== "")}).forEach(l=>console.log(l))} - } - ServerExec.stdout.on("data", data => logCallback(data)); - ServerExec.stderr.on("data", data => logCallback(data)); - }, - exit: function (exitCallback = process.exit){if ( - typeof exitCallback === "function") ServerExec.on("exit", code => exitCallback(code)); - }, - on: function(action = String(), callback = Function) { - if (!(action === "all" || action === "connect" || action === "disconnect")) throw new Error("Use some valid action: all, connect, disconnect"); - - // Functions - const data = data => Player_Json(data, function (array_status){ - for (let _player of array_status) { - if (action === "all") callback(_player); - else if (_player.Action === action) callback(_player) - } - }); - ServerExec.stdout.on("data", data); - ServerExec.stderr.on("data", data); - }, - op: function (player = "Steve") { - let command = BdsInfo.Servers[GetPlatform()].op.replace("{{Player}}", player); - ServerExec.stdin.write(command+"\n"); - return command; - }, - deop: function (player = "Steve") { - let command = BdsInfo.Servers[GetPlatform()].deop.replace("{{Player}}", player); - ServerExec.stdin.write(command+"\n"); - return command; - }, - ban: function (player = "Steve") { - let command = BdsInfo.Servers[GetPlatform()].ban.replace("{{Player}}", player); - ServerExec.stdin.write(command+"\n"); - return command; - }, - kick: function (player = "Steve", text = "you got kicked") { - let command = BdsInfo.Servers[GetPlatform()].kick.replace("{{Player}}", player).replace("{{Text}}", text); - ServerExec.stdin.write(command+"\n"); - return command; - }, - tp: function (player = "Steve", cord = {x: 0, y: 128, z: 0}) { - let command = BdsInfo.Servers[GetPlatform()].tp.replace("{{Player}}", player); - if (cord.x) command = command.replace("{{X}}", cord.x); else command = command.replace("{{X}}", 0); - if (cord.y) command = command.replace("{{Y}}", cord.y); else command = command.replace("{{Y}}", 128); - if (cord.y) command = command.replace("{{Z}}", cord.y); else command = command.replace("{{Z}}", 0); - ServerExec.stdin.write(command+"\n"); - return command; - } + command, log, exit, on, stop, op, deop, ban, kick, tp } - ServerExec.on("exit", ()=>{delete global.BdsExecs[returnFuntion.uuid]}); + ServerExec.on("exit", () => delete global.BdsExecs[returnFuntion.uuid]); global.BdsExecs[returnFuntion.uuid] = returnFuntion; return returnFuntion; } @@ -347,6 +345,7 @@ module.exports = { start, BdsCommand, stop, + GetSessions, CronBackups: CurrentBackups, Player_Search, } diff --git a/src/rest/routes/players.js b/src/rest/routes/players.js index 45ae281..5323c53 100644 --- a/src/rest/routes/players.js +++ b/src/rest/routes/players.js @@ -5,6 +5,7 @@ const bds = require("../../../index"); const { token_verify, CheckPlayer } = require("../../UsersAndtokenChecks"); const { readFileSync } = require("fs"); const docs = require("../../../BdsManegerInfo.json").docs; +const { GetSessions } = require("../../BdsManegerServer"); // Players info and maneger app.get("/", (req, res) => { @@ -35,13 +36,17 @@ app.get("/actions/:TYPE/:TOKEN/:PLAYER*", (req, res) => { const { text } = req.query; // Pre Check if (!(token_verify(TOKEN) || CheckPlayer(PLAYER))) return res.status(401).send("Check your parameters"); - + const bds = GetSessions() // Post Check - if (TYPE === "ban") res.json({ok: bds.command(`ban ${PLAYER}`)}); - else if (TYPE === "kick") res.json({ok: bds.command(`kick ${PLAYER} ${text}`)}); - else if (TYPE === "op") res.json({ok: bds.command(`op ${PLAYER}`)}); - else if (TYPE === "deop") res.json({ok: bds.command(`deop ${PLAYER}`)}); - else res.sendStatus(422) + if (TYPE === "ban") res.json({ + ok: bds.ban(PLAYER) + }); else if (TYPE === "kick") res.json({ + ok: bds.kick(PLAYER, text) + }); else if (TYPE === "op") res.json({ + ok: bds.op(PLAYER) + }); else if (TYPE === "deop") res.json({ + ok: bds.deop(PLAYER) + }); else res.sendStatus(422); }); // Actions Redirect -- 2.50.0 From a08b1322f32435b5f3f8ce1d268dc719c5ae99a6 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Fri, 13 Aug 2021 20:36:41 -0300 Subject: [PATCH 02/29] CU --- .Build/test/ci.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.Build/test/ci.js b/.Build/test/ci.js index 7a18fbd..8333556 100644 --- a/.Build/test/ci.js +++ b/.Build/test/ci.js @@ -1,8 +1,7 @@ (async ()=>{ try { const bds = require("../../index"); - await bds.download("latest", true) - console.log("Date:", await bds.BdsDate()); + await bds.download("latest", true); console.log("Api:", await bds.api()); console.log("Backup:", await bds.backup()); console.log("Detect Server:", await bds.detect()); -- 2.50.0 From f14faf2e5e7a79ee38a25a6e47953337241e5257 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Fri, 13 Aug 2021 20:39:04 -0300 Subject: [PATCH 03/29] Update ci.js --- .Build/test/ci.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.Build/test/ci.js b/.Build/test/ci.js index 7a18fbd..8cd01ac 100644 --- a/.Build/test/ci.js +++ b/.Build/test/ci.js @@ -1,8 +1,7 @@ (async ()=>{ try { const bds = require("../../index"); - await bds.download("latest", true) - console.log("Date:", await bds.BdsDate()); + await bds.download("latest", true); console.log("Api:", await bds.api()); console.log("Backup:", await bds.backup()); console.log("Detect Server:", await bds.detect()); @@ -19,4 +18,4 @@ console.log("Detect Error:", err); process.exit(1) } -})() \ No newline at end of file +})() -- 2.50.0 From 5776479eba07aa3c636799493b3207525d7b001d Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Sat, 14 Aug 2021 10:18:56 -0300 Subject: [PATCH 04/29] Android remove Java default false verification --- lib/BdsSystemInfo.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/BdsSystemInfo.js b/lib/BdsSystemInfo.js index 9d1b747..cc75fb3 100644 --- a/lib/BdsSystemInfo.js +++ b/lib/BdsSystemInfo.js @@ -49,7 +49,6 @@ if (process.platform == "win32") { } else if (process.platform === "android") { system = "Android"; valid_platform["bedrock"] = false - valid_platform["java"] = false } else { console.log(`The Bds Maneger Core does not support ${process.platform} systems, as no tests have been done.`); system = "Other"; @@ -112,4 +111,4 @@ function GetKernel() { module.exports.valid_platform = valid_platform module.exports.require_qemu = require_qemu module.exports.system = system -module.exports.GetKernel = GetKernel; \ No newline at end of file +module.exports.GetKernel = GetKernel; -- 2.50.0 From 5d86a26c8e1676600545ee18ca27a463922e93e9 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Sun, 15 Aug 2021 08:55:53 -0300 Subject: [PATCH 05/29] Update package_test.yml --- .github/workflows/package_test.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/package_test.yml b/.github/workflows/package_test.yml index 7e45239..2a654ea 100644 --- a/.github/workflows/package_test.yml +++ b/.github/workflows/package_test.yml @@ -1,5 +1,5 @@ name: Test - The Bds Maneger Core -on: [push, pull_request] +on: [pull_request] jobs: Test: @@ -16,3 +16,22 @@ jobs: cache: 'npm' - run: npm install -d --no-save - run: npm test + + Test_Docker: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: checkout + uses: actions/checkout@master + + - name: Build Docker Image + uses: docker/build-push-action@v2 + with: + target: bdscore + tags: coretest:latest + platforms: linux/amd64,linux/arm64,linux/arm/v7 -- 2.50.0 From 9e93bbbc92c3921c8ecf2d3ae8b1fd67c2f425a0 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Sun, 15 Aug 2021 09:01:44 -0300 Subject: [PATCH 06/29] add path. in line 102 --- src/BdsManegerServer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BdsManegerServer.js b/src/BdsManegerServer.js index 56194e5..f6d8668 100644 --- a/src/BdsManegerServer.js +++ b/src/BdsManegerServer.js @@ -99,7 +99,7 @@ function start() { } // Log file - const LogFile = join(GetPaths("log"), `${GetPlatform()}_${new Date().toString()}_Bds_log.log`); + const LogFile = path.join(GetPaths("log"), `${GetPlatform()}_${new Date().toString()}_Bds_log.log`); const LatestLog_Path = path.join(GetPaths("log"), "latest.log"); const LogSaveFunction = data => { fs.appendFileSync(LogFile, data); -- 2.50.0 From 81a55636745ff9645c896e3676778f7062e08d22 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Sun, 15 Aug 2021 09:15:57 -0300 Subject: [PATCH 07/29] Add package libatomic1 and moved npm update after installed libs --- .Build/Docker/Configure.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.Build/Docker/Configure.sh b/.Build/Docker/Configure.sh index 13c5276..4114a66 100644 --- a/.Build/Docker/Configure.sh +++ b/.Build/Docker/Configure.sh @@ -23,12 +23,12 @@ tar -xJf /tmp/node.tar.xz -C /tmp/Node rm -rf /tmp/node.tar.xz cp -rfv /tmp/Node/*/* /usr +# Install Build Dependencies and others Packages +apt install -y ca-certificates make build-essential procps lsb-release xdg-utils g++ libatomic1 libnss3 libatk-bridge2.0-0 gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxrandr2 libxrender1 libxss1 libxtst6 fonts-liberation libnss3 libgbm-dev + # Update npm npm -g install npm@$(curl -sL https://api.github.com/repos/npm/cli/releases/latest | grep tag_name | cut -d '"' -f 4) -# Install Build Dependencies and others Packages -apt install -y ca-certificates make build-essential procps lsb-release xdg-utils g++ libnss3 libatk-bridge2.0-0 gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxrandr2 libxrender1 libxss1 libxtst6 fonts-liberation libnss3 libgbm-dev - # Install Dependencies to diferent architectures if ! [ "$(uname -m)" == "x86_64" ];then mkdir -p /lib64 -- 2.50.0 From 3827b0cad4fe387dc582e8d6cbfab59a2a958b42 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Sun, 15 Aug 2021 10:20:21 -0300 Subject: [PATCH 08/29] Quiet mode apt and copy nodejs --- .Build/Docker/Configure.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.Build/Docker/Configure.sh b/.Build/Docker/Configure.sh index 4114a66..6aaacda 100644 --- a/.Build/Docker/Configure.sh +++ b/.Build/Docker/Configure.sh @@ -4,7 +4,7 @@ set -ex apt update # Install Necessary Packages -apt install -y curl wget git zsh sudo unzip zip jq python python3 screen +apt -qq install -y curl wget git zsh sudo unzip zip jq python python3 screen # Install nodejs from github release get_current_node_version=$(curl -sL https://api.github.com/repos/nodejs/node/releases/latest | grep tag_name | cut -d '"' -f 4) @@ -21,10 +21,10 @@ esac mkdir /tmp/Node tar -xJf /tmp/node.tar.xz -C /tmp/Node rm -rf /tmp/node.tar.xz -cp -rfv /tmp/Node/*/* /usr +cp -rf /tmp/Node/*/* /usr # Install Build Dependencies and others Packages -apt install -y ca-certificates make build-essential procps lsb-release xdg-utils g++ libatomic1 libnss3 libatk-bridge2.0-0 gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxrandr2 libxrender1 libxss1 libxtst6 fonts-liberation libnss3 libgbm-dev +apt -qq install -y ca-certificates make build-essential procps lsb-release xdg-utils g++ libatomic1 libnss3 libatk-bridge2.0-0 gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxrandr2 libxrender1 libxss1 libxtst6 fonts-liberation libnss3 libgbm-dev # Update npm npm -g install npm@$(curl -sL https://api.github.com/repos/npm/cli/releases/latest | grep tag_name | cut -d '"' -f 4) @@ -39,16 +39,17 @@ if ! [ "$(uname -m)" == "x86_64" ];then fi # Install openjdk -case "$(uname -m)" in - x86_64 | aarch64 ) apt install -y openjdk-17*;; - * ) apt install -y openjdk-11*;; +case `apt search openjdk` in + *openjdk-17* ) apt install -y openjdk-17*;; + *openjdk-11* ) apt install -y openjdk-11*;; + * ) echo "No openjdk version found, skipping";; esac # Setup non root user useradd -m -p "$(perl -e 'print crypt($ARGV[0], "password")' "LucaA1113ba21")" "thebds" addgroup thebds sudo addgroup thebds root -usermod --shell /bin/bash thebds; +usermod --shell /usr/bin/zsh thebds; echo "thebds ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers # Remove Unnecessary Packages -- 2.50.0 From 49599c25a612c5e272d7e7491a17b0d6cbcc4984 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Sun, 15 Aug 2021 11:22:25 -0300 Subject: [PATCH 09/29] Update Configure.sh --- .Build/Docker/Configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.Build/Docker/Configure.sh b/.Build/Docker/Configure.sh index 6aaacda..c7e2e4b 100644 --- a/.Build/Docker/Configure.sh +++ b/.Build/Docker/Configure.sh @@ -39,7 +39,7 @@ if ! [ "$(uname -m)" == "x86_64" ];then fi # Install openjdk -case `apt search openjdk` in +case "$(apt search openjdk)" in *openjdk-17* ) apt install -y openjdk-17*;; *openjdk-11* ) apt install -y openjdk-11*;; * ) echo "No openjdk version found, skipping";; -- 2.50.0 From 72508658275e876a8a839313e500d31deb415583 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Sun, 15 Aug 2021 22:29:00 -0300 Subject: [PATCH 10/29] Move Azure Conatiner deploy and remove JSPrismarine modifications to Github Actions Modifications in nexe build file Add Docker.js to Docker image modifications in ignores files --- .Build/nexe_build.js | 19 +- .github/workflows/Base.yml | 42 ----- .github/workflows/main.yml | 67 +++++-- .github/workflows/package_test.yml | 23 ++- .github/workflows/rc.yml | 50 ------ .github/workflows/tag_version.yml | 43 ++++- .gitignore | 27 ++- .gitlab/.gitlab-webide.yml | 2 +- .gitlab/workflows/Nightly.yml | 21 --- .gitlab/workflows/Stable.yml | 8 +- .npmignore | 33 ++-- Docker/AzureContainerDeploy.json | 201 --------------------- bin/Docker.js | 100 +++++++++++ bin/bds_maneger.js | 41 +++-- index.js | 18 +- lib/BdsSettings.js | 78 ++++---- lib/BdsSystemInfo.js | 103 +++++------ src/BdsBackup.js | 3 - src/BdsManegerServer.js | 14 +- src/BdsServersDownload.js | 279 ++++++++++++++++------------- src/CheckKill.js | 5 - src/rest/routes/bds.js | 4 +- 22 files changed, 516 insertions(+), 665 deletions(-) delete mode 100644 .github/workflows/Base.yml delete mode 100644 .github/workflows/rc.yml delete mode 100644 .gitlab/workflows/Nightly.yml delete mode 100644 Docker/AzureContainerDeploy.json create mode 100644 bin/Docker.js diff --git a/.Build/nexe_build.js b/.Build/nexe_build.js index dea4aa7..1054506 100755 --- a/.Build/nexe_build.js +++ b/.Build/nexe_build.js @@ -50,15 +50,14 @@ if (options.system || options.S) { } // nexe options -var files = readdirSync(resolve(__dirname, "..")).filter(retu => {if (/[Dd]ocker*.js/gi.test(retu) || retu.includes("docker_config.json", ".log")) return false; else if (retu.includes(".js")) return true; else if (retu === "rest" || retu === "scripts") return true; else return false;}); -const nexeCopiler = { - name: "Bds Maneger Core", - build: true, - // loglevel: "verbose", - input: resolve(__dirname, "bds_maneger.js"), - output: fileout, - resources: files, -} +const nexeCopiler = {} if (options.v || options.verbose) nexeCopiler.loglevel = "verbose" // Build Binarie -compile(nexeCopiler).then(() => {console.log("success")}) +compile({ + name: "Bds Maneger Core", + build: true, + input: resolve(__dirname, "bds_maneger.js"), + output: fileout, + resources: readdirSync(resolve(__dirname, "..")).filter(retu => !/[Dd]ocker*.js|docker_config.json|*\.log/gi.test(retu)), + ...nexeCopiler +}).then(() => process.exit(0)).catch(() => process.exit(1)); diff --git a/.github/workflows/Base.yml b/.github/workflows/Base.yml deleted file mode 100644 index ade6a22..0000000 --- a/.github/workflows/Base.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Bds Maneger - Docker Base -on: - push: - tags: - - v* - - V* - -# schedule: -# - cron: 0 0 * * */6 - -env: - DOCKER_ARCHS: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 - -jobs: - base: - runs-on: ubuntu-latest - steps: - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_ORG_USER }} - password: ${{ secrets.DOCKER_ORG_PASS }} - - - name: checkout - uses: actions/checkout@master - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - push: true - target: bdsbase - tags: | - bdsmaneger/node_image:latest - bdsmaneger/node_image:${{ github.run_id }} - platforms: ${{ env.DOCKER_ARCHS }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 002d7f2..99da2ac 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,11 +3,9 @@ on: push: branches: - main - paths-ignore: - - 'README.md' - - '.github/*/**' - - 'package-lock.json' - - '.devcontainer/**' + +env: + DOCKER_ARCH: linux/amd64,linux/arm64,linux/arm/v7 jobs: npm: @@ -20,16 +18,18 @@ jobs: with: node-version: 16.x registry-url: https://registry.npmjs.org/ + - name: Edit Version - run: | - id_run1=$(echo ${{ github.run_id }} |cut -b 1-2) - id_run2=$(echo ${{ github.run_id }} |cut -b 3-6) - id_run3=$(echo ${{ github.run_id }} |cut -b 7-) - old="$(cat package.json |grep "version"|head -1)" - new_version="$id_run1.$id_run2.$id_run3" - sed "s|$old|\"version\": \"$new_version\",|g" package.json > package2.json - cat package2.json > package.json - rm -rfv package2.json + uses: actions/github-script@v4 + id: set-result + with: + script: | + const fs = require('fs'); + const Package_JSon = JSON.parse(fs.readFileSync(process.cwd()+'/package.json', 'utf8')); + const run_ID = "${{ github.run_id }}"; + Package_JSon.version = `${run_ID.slice(0, 2)}.${run_ID.slice(3, 6)}.${run_ID.slice(7, 11)}`; + fs.writeFileSync(process.cwd()+'/package.json', JSON.stringify(Package_Json, null, 2)); + result-encoding: string - name: Install Packages run: npm install @@ -37,9 +37,10 @@ jobs: - name: NPM Publish run: npm publish --tag dev env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_ORG_TOKEN }} + NODE_AUTH_TOKEN: "${{ secrets.NPM_ORG_TOKEN }}" - docker: + docker_core: + needs: [npm] runs-on: ubuntu-latest steps: - name: Set up QEMU @@ -63,5 +64,35 @@ jobs: with: push: true target: bdscore - tags: bdsmaneger/core:nightly - platforms: linux/amd64,linux/arm64,linux/arm/v7 + tags: bdsmaneger/core:main + platforms: ${{ env.DOCKER_ARCH }} + + docker_base: + needs: [npm] + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_ORG_USER }} + password: ${{ secrets.DOCKER_ORG_PASS }} + + - name: checkout + uses: actions/checkout@master + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + push: true + target: bdsbase + tags: | + bdsmaneger/base:main + bdsmaneger/node_image:main + platforms: ${{ env.DOCKER_ARCH }} \ No newline at end of file diff --git a/.github/workflows/package_test.yml b/.github/workflows/package_test.yml index 2a654ea..f4e7851 100644 --- a/.github/workflows/package_test.yml +++ b/.github/workflows/package_test.yml @@ -9,13 +9,30 @@ jobs: node-version: [14.x, 15.x, 16.x] steps: - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2.4.0 with: node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm install -d --no-save - - run: npm test + + - name: Edit Version + uses: actions/github-script@v4 + with: + script: | + const fs = require('fs'); + const Package_JSon = JSON.parse(fs.readFileSync(process.cwd()+'/package.json', 'utf8')); + const run_ID = "${{ github.run_id }}"; + Package_JSon.version = `${run_ID.slice(0, 2)}.${run_ID.slice(3, 6)}.${run_ID.slice(7, 11)}`; + fs.writeFileSync(process.cwd()+'/package.json', JSON.stringify(Package_Json, null, 2)); + console.log(Package_JSon.version); + return Package_JSon.version; + result-encoding: string + + - name: Install node depedencies + run: npm install -d --no-save + + - name: Run test + run: npm run ci Test_Docker: runs-on: ubuntu-latest diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml deleted file mode 100644 index e2d4361..0000000 --- a/.github/workflows/rc.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Bds Core Release Candidate -on: - push: - tags: - - rc** - -jobs: - npm: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - uses: actions/setup-node@v2.4.0 - with: - node-version: 16.x - registry-url: https://registry.npmjs.org/ - - - name: Install Depedencies - run: npm install --no-save - - - name: Publish - run: npm publish --tag rc - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_ORG_TOKEN }} - - docker: - runs-on: ubuntu-latest - steps: - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_ORG_USER }} - password: ${{ secrets.DOCKER_ORG_PASS }} - - - name: checkout - uses: actions/checkout@master - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - push: true - target: bdscore - tags: bdsmaneger/core:rc_${{ github.run_id }} - platforms: linux/amd64,linux/arm64,linux/arm/v7 diff --git a/.github/workflows/tag_version.yml b/.github/workflows/tag_version.yml index db85832..214596f 100644 --- a/.github/workflows/tag_version.yml +++ b/.github/workflows/tag_version.yml @@ -5,9 +5,13 @@ on: - v** - V** +env: + DOCKER_ARCH: linux/amd64,linux/arm64,linux/arm/v7 + jobs: npm: runs-on: ubuntu-latest + if: ${{ github.actor }} == ${{ github.repository_owner }} steps: - uses: actions/checkout@master - uses: actions/setup-node@v2.4.0 @@ -21,9 +25,10 @@ jobs: - name: Publish run: npm publish env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_ORG_TOKEN }} + NODE_AUTH_TOKEN: "${{ secrets.NPM_ORG_TOKEN }}" - docker: + docker_core: + needs: [npm] runs-on: ubuntu-latest steps: - name: Set up QEMU @@ -48,4 +53,36 @@ jobs: push: true target: bdscore tags: bdsmaneger/core:latest - platforms: linux/amd64,linux/arm64,linux/arm/v7 + platforms: ${{ env.DOCKER_ARCH }} + + docker_base: + needs: [npm] + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_ORG_USER }} + password: ${{ secrets.DOCKER_ORG_PASS }} + + - name: checkout + uses: actions/checkout@master + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + push: true + target: bdsbase + tags: | + bdsmaneger/base:latest + bdsmaneger/base:${{ github.run_id }} + bdsmaneger/node_image:latest + bdsmaneger/node_image:${{ github.run_id }} + platforms: ${{ env.DOCKER_ARCH }} diff --git a/.gitignore b/.gitignore index 33ef586..de9db14 100644 --- a/.gitignore +++ b/.gitignore @@ -1,26 +1,23 @@ +# Log +*.log + +# test files +*.test +*test*.js* +test/ +Test/ + +# Node node_modules/ -*-Test/ -*teste/ -debug.log Bds_Maneger .dccache docs/ -run.log -build.log -Docker.js.log -Docker.js + +# Bds Maneger Core Binaries bds_maneger BdsManager-bin* Bds-Maneger-Core -# Docker Build -Docker.exe - -# Bin Ignores -bin/* -!bin/bds_maneger.js -!bin/telegram_bot.js - # ** .husky Servers \ No newline at end of file diff --git a/.gitlab/.gitlab-webide.yml b/.gitlab/.gitlab-webide.yml index bfa8401..2a2d0ee 100644 --- a/.gitlab/.gitlab-webide.yml +++ b/.gitlab/.gitlab-webide.yml @@ -1,5 +1,5 @@ terminal: - image: bdsmaneger/node_image:latest + image: bdsmaneger/core:latest services: - docker:dind before_script: diff --git a/.gitlab/workflows/Nightly.yml b/.gitlab/workflows/Nightly.yml deleted file mode 100644 index 2765c0b..0000000 --- a/.gitlab/workflows/Nightly.yml +++ /dev/null @@ -1,21 +0,0 @@ -Docker_Nightly: - image: ubuntu:latest - variables: - DOCKER_TLS_CERTDIR: "" - DOCKER_DRIVER: overlay2 - DOCKER_HOST: tcp://docker:2375 - services: - - docker:dind - before_script: - - | - apt update && apt install -y curl &> /dev/null - curl https://get.docker.com | bash - &> /dev/null - docker info - docker run --privileged --rm tonistiigi/binfmt --install all - docker run --privileged --rm multiarch/qemu-user-static --reset -p yes - docker buildx create --name multiarch --driver docker-container --use - docker buildx inspect --bootstrap - docker login --username="$DOCKER_USER" --password="$DOCKER_TOKEN" &> /dev/null - script: - - docker pull bdsmaneger/maneger:nightly - - docker buildx build -t bdsmaneger/maneger:nightly --platform=linux/amd64,linux/arm64/v8,linux/arm/v7 . diff --git a/.gitlab/workflows/Stable.yml b/.gitlab/workflows/Stable.yml index 5672f55..4042f0e 100644 --- a/.gitlab/workflows/Stable.yml +++ b/.gitlab/workflows/Stable.yml @@ -1,8 +1,5 @@ -Docker_Stable: +Docker: image: ubuntu:latest - only: - - v* - - V* variables: DOCKER_TLS_CERTDIR: "" DOCKER_DRIVER: overlay2 @@ -18,6 +15,5 @@ Docker_Stable: docker run --privileged --rm multiarch/qemu-user-static --reset -p yes docker buildx create --name multiarch --driver docker-container --use docker buildx inspect --bootstrap - docker login --username="$DOCKER_USER" --password="$DOCKER_TOKEN" &> /dev/null script: - - docker buildx build -t bdsmaneger/maneger:latest --platform=linux/amd64,linux/arm64/v8,linux/arm/v7 . + - docker buildx build -t bdsmaneger/maneger:latest --platform=linux/amd64,linux/arm64,linux/arm/v7 . diff --git a/.npmignore b/.npmignore index 32550d8..99693aa 100644 --- a/.npmignore +++ b/.npmignore @@ -1,17 +1,16 @@ -Docker/ -.docker* -.github/ -.devconatiner/ -.vscode/ -node_modules/ -*-Test/ -*teste/ -debug.log -Bds_Maneger -.dccache -run.log -build.log -Docker.js.log -Docker.js -bds_maneger -BdsManager-bin* \ No newline at end of file +# Log +*.log + +# test files +*.test +*test*.js* +test/ +Test/ + +# Git +git* +.git* + +# Docker +.dockerignore +Docker* \ No newline at end of file diff --git a/Docker/AzureContainerDeploy.json b/Docker/AzureContainerDeploy.json deleted file mode 100644 index 6e932cd..0000000 --- a/Docker/AzureContainerDeploy.json +++ /dev/null @@ -1,201 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json", - "contentVersion": "1.50.0.0", - "parameters": { - "containerName": { - "type": "string", - "maxLength": 63, - "defaultValue": "bds-maneger" - }, - "TelegramBotToken": { - "type": "string", - "defaultValue": "null" - }, - "WorldName": { - "type": "string", - "defaultValue": "Minecraft Bedrock" - }, - "ServerDescription": { - "type": "string", - "defaultValue": "The Bds Maneger in Docker" - }, - "ServerGameMode": { - "type": "string", - "defaultValue": "survival", - "allowedValues": ["survival","creative","hardcore"] - }, - "ServerDifficulty": { - "type": "string", - "defaultValue": "normal", - "allowedValues": ["normal","easy"] - }, - "ServerPlayers": { - "type": "string", - "defaultValue": "30", - "metadata": { - "description": "The more players, the more CPU, the more RAM will be needed." - }, - "allowedValues": ["5","10","15","20","25","30","35","40","45","50","70","100","200"] - }, - "ServerPlatform": { - "type": "string", - "defaultValue": "bedrock", - "allowedValues": ["bedrock", "java", "pocketmine", "jsprismarine"], - "metadata": { - "description": "Bedrock: Phones, Xbox, Nintendo switch, etc. Java: Desktops" - } - }, - "numberCpuCores": { - "type": "string", - "defaultValue": "2", - "allowedValues": ["1","2","3","4"] - }, - "RamMemory": { - "type": "string", - "allowedValues": ["1","2","4","6","8","10"], - "defaultValue": "4" - } - }, - "variables": { - "bdsstorage": "bdssave", - "StorageName": "[concat('bdssave', uniqueString(resourceGroup().id))]", - "DnsName": "[concat('bdsdns-', uniqueString(resourceGroup().id))]", - "bds_ports": [ - { - "port": "1932", - "protocol": "TCP" - }, - { - "port": "6565", - "protocol": "TCP" - }, - { - "port": "19132", - "protocol": "UDP" - }, - { - "port": "19133", - "protocol": "UDP" - } - ] - }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "2019-06-01", - "name": "[variables('StorageName')]", - "location": "[resourceGroup().location]", - "kind": "StorageV2", - "sku": { - "name": "Standard_LRS", - "tier": "Standard" - }, - "properties": { - "accessTier": "Hot", - "allowBlobPublicAccess": true, - "allowSharedKeyAccess": true, - "largeFileSharesState": "Enabled" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/fileServices/shares", - "apiVersion": "2019-06-01", - "name": "[concat(variables('StorageName'), '/default/', variables('bdsstorage'))]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts', variables('StorageName'))]" - ] - }, - // Docker Bds Manegerg Image - { - "location": "[resourceGroup().location]", - "name": "[parameters('containerName')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/fileServices/shares', variables('StorageName'), 'default', variables('bdsstorage') )]" - ], - "type": "Microsoft.ContainerInstance/containerGroups", - "apiVersion": "2019-12-01", - "properties": { - "containers": [ - { - "name": "[parameters('containerName')]", - "properties": { - "image": "bdsmaneger/core:latest", - "resources": { - "requests": { - "cpu": "[int(parameters('numberCpuCores'))]", - "memoryInGB": "[float(parameters('RamMemory'))]" - } - }, - "ports": "[variables('bds_ports')]", - "environmentVariables": [ - { - "name": "TELEGRAM_TOKEN", - "value": "[parameters('TelegramBotToken')]" - }, - { - "name": "WORLD_NAME", - "value": "[parameters('WorldName')]" - }, - { - "name": "DESCRIPTION", - "value": "[parameters('ServerDescription')]" - }, - { - "name": "GAMEMODE", - "value": "[parameters('ServerGameMode')]" - }, - { - "name": "DIFFICULTY", - "value": "[parameters('ServerDifficulty')]" - }, - { - "name": "PLAYERS", - "value": "[parameters('ServerPlayers')]" - }, - { - "name": "SERVER", - "value": "[parameters('ServerPlatform')]" - }, - { - "name": "BDS_VERSION", - "value": "latest" - } - ], - "volumeMounts": [ - { - "name": "save", - "mountPath": "/home/bds" - } - ] - } - } - ], - "restartPolicy": "OnFailure", - "osType": "Linux", - "ipAddress": { - "type": "Public", - "ports": "[variables('bds_ports')]", - "dnsNameLabel": "[variables('DnsName')]" - }, - "volumes": [ - { - "name": "save", - "azureFile": { - "shareName": "[variables('bdsstorage')]", - "StorageAccountName": "[variables('StorageName')]", - // https://stackoverflow.com/a/33227123 - "storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('StorageName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).keys[1].value]" - } - } - ] - }, - "tags": {} - } - ], - "outputs": { - "containerIPv4Address": { - "type": "string", - "value": "[reference(resourceId('Microsoft.ContainerInstance/containerGroups/', parameters('containerName'))).ipAddress.ip]" - } - } -} \ No newline at end of file diff --git a/bin/Docker.js b/bin/Docker.js new file mode 100644 index 0000000..be9209f --- /dev/null +++ b/bin/Docker.js @@ -0,0 +1,100 @@ +#!/usr/bin/env node +const BdsCore = require("../index"); +const { GetPlatform } = require("../lib/BdsSettings"); +const { Servers } = require("../lib/ServerURL"); +const { CronJob } = require("cron"); +const BdsInfo = require("../BdsManegerInfo.json"); + +process.env.BDS_DOCKER_IMAGE = true; + +function StartServer(){ + console.log("The entire log can be accessed via the api and/or the docker log"); + const ServerStarted = BdsCore.start(); + ServerStarted.log(a => process.stdout.write(a)); + ServerStarted.exit(process.exit); + BdsCore.api(); + new CronJob("0 */1 * * *", async () => { + try { + const CurrentLocalVersion = BdsCore.getBdsConfig().server.versions[GetPlatform()], + CurrentRemoteVersion = Object.getOwnPropertyNames((await (await fetch(BdsInfo.download.servers)).json())[GetPlatform()])[0]; + if (CurrentLocalVersion !== CurrentRemoteVersion) { + let currenttime = `Hello we are starting the server upgrade from version ${CurrentLocalVersion} to version ${CurrentRemoteVersion}, you have 20 seconds to exit the server` + console.log("Update Server:", currenttime); + ServerStarted.say(currenttime); + let countdown = 20; + while (countdown > 1) { + currenttime = `${countdown} seconds remaining to stop Server!`; + console.log(currenttime); + ServerStarted.say(currenttime); + countdown--; + await new Promise(resolve => setTimeout(resolve, 1000)); + } + currenttime = "Stopping the server" + console.log(currenttime); + ServerStarted.say(currenttime); + await new Promise(resolve => setTimeout(resolve, 600)); + ServerStarted.stop(); + } + } catch (err) { + console.log(err); + } + }); +} + +// Check Installed Server +const AllVersions = BdsCore.BdsSettigs.GetJsonConfig().server.versions; +if (Object.getOwnPropertyNames(AllVersions).filter(platform => AllVersions[platform]).length >= 1) { + if (process.env.UPDATE_SERVER === "true") { + BdsCore.download(true, true, (err) => { + if (err) { + console.log(err); + process.exit(1); + } + StartServer(); + }); + } else { + // Check for Update + if (AllVersions[GetPlatform()] === Object.getOwnPropertyNames(Servers[GetPlatform()])[0]) { + console.log("The entire log can be accessed via the api and/or the docker log"); + const ServerStarted = BdsCore.start(); + ServerStarted.log(a => process.stdout.write(a)); + ServerStarted.exit(process.exit); + BdsCore.api(); + } else { + BdsCore.download(true, true, (err) => { + if (err) { + console.log(err); + process.exit(1); + } + StartServer(); + }); + } + } +} else { + console.log("Server is not installed, starting server implementation"); + // Import ENV to Settings Server + const { DESCRIPTION, WORLD_NAME, GAMEMODE, DIFFICULTY, ACCOUNT, PLAYERS, SERVER, ENABLE_COMMANDS } = process.env; + // Update Platform + BdsCore.change_platform(SERVER || "bedrock"); + BdsCore.download(true, true, (err) => { + if (err) { + console.log(err); + process.exit(1); + } + // Create JSON Config + const ServerConfig = { + world: WORLD_NAME, + description: DESCRIPTION, + gamemode: GAMEMODE, + difficulty: DIFFICULTY, + players: parseInt(PLAYERS), + commands: ENABLE_COMMANDS === "true", + account: ACCOUNT === "true", + whitelist: false, + port: 19132, + portv6: 19133, + } + BdsCore.set_config(ServerConfig); + StartServer(); + }); +} \ No newline at end of file diff --git a/bin/bds_maneger.js b/bin/bds_maneger.js index f254b85..9aeb4c6 100755 --- a/bin/bds_maneger.js +++ b/bin/bds_maneger.js @@ -18,7 +18,7 @@ const server = (argv.p || argv.platform), version = (argv.v || argv.version), SystemCheck = (argv.S || argv.system_info), - bds_version = (argv.d || argv.server_download), + bds_version = (argv.d || argv.download), start = (argv.s || argv.server_version), help = (argv.h || argv.help), kill = (argv.k || argv.kill); @@ -93,7 +93,7 @@ if (help) { " -s --start Start Server", " -k --kill Detect and kill bds servers", " -p --platform Select server platform", - " -d --server_download server version to install, default \"latest\"", + " -d --download server version to install, default \"latest\"", " --interactive Install the server interactively", " -S --system_info System info and test", " -h --help Print this list and exit.", @@ -158,21 +158,30 @@ if (SystemCheck) { if (bds_version){ try { if (argv.interactive) { - console.log(`Geting versions to ${GetPlatform()}`); - const LoadVersion = require("../../lib/ServerURL").Servers[GetPlatform()] + const LoadVersion = require("../lib/ServerURL").Servers[GetPlatform()] const Version = Object.getOwnPropertyNames(LoadVersion) - // List Version - for (let version in Version) console.log(`${version}: ${GetPlatform()} version ${Version[version]}`); // deepscan-disable-line FORIN_ARRAY - // deepcode ignore MissingClose: - const DownloadOptions = readline.createInterface({input: process.stdin,output: process.stdout}); - console.log("\nSelect Option"); - DownloadOptions.on("line", (input) => { - download(Version[parseInt(input)], true, function(){ - console.log("Installation was successful, so start the server with the -s option"); - if (start) StartServer(); - else process.exit(0) - }) - }); + + const StartQuestion = (Readline) => { + Readline.question("Select a version to download: ", input => { + if (Version[parseInt(input) - 1]) { + Readline.close(); + download(Version[parseInt(input) - 1], true, function(){ + if (start) return StartServer(); + console.log("Installation was successful, so start the server with the -s option"); + process.exit(0); + }) + } else { + console.log("Invalid Option"); + StartQuestion(Readline); + } + }); + } + + console.log(`Selected platform: ${GetPlatform()}, Total available versions: ${Version.length}`); + console.log("Option Version"); + + for (let option in Version) console.log(`${parseInt(option) + 1} -------- ${Version[option]}`); + StartQuestion(readline.createInterface({input: process.stdin,output: process.stdout})); } else bds.download(bds_version, true, function(){ if (start) StartServer(); diff --git a/index.js b/index.js index eb14cb5..9d730f1 100644 --- a/index.js +++ b/index.js @@ -49,10 +49,11 @@ module.exports.telegram_token_save = UpdateTelegramToken */ module.exports.api = require("./src/rest/api"); -function token_register() { +function token_register(Admin_Scoper = ["web_admin", "admin"]) { + Admin_Scoper = Array.from(Admin_Scoper).filter(scoper => /admin/.test(scoper)); const bds_token_path = path.join(bds_dir, "bds_tokens.json"); - if (!(fs.existsSync(bds_token_path))) fs.writeFileSync(bds_token_path, "[]"); - const tokens = JSON.parse(fs.readFileSync(bds_token_path, "utf8")); + let tokens = [] + if (fs.existsSync(bds_token_path)) tokens = JSON.parse(fs.readFileSync(bds_token_path, "utf8")); // Get UUID const getBdsUUId = randomUUID().split("-"); @@ -62,7 +63,7 @@ function token_register() { tokens.push({ token: bdsuid, date: new Date(), - scopers: ["admin"] + scopers: Admin_Scoper }); fs.writeFileSync(bds_token_path, JSON.stringify(tokens, null, 4), "utf8"); console.log(`Bds Maneger API REST token: "${bdsuid}"`); @@ -76,6 +77,13 @@ function token_register() { */ module.exports.token_register = token_register +/** + * Register tokens to use in Bds Maneger REST and other supported applications + * + * @example token_register() + */ +module.exports.bds_maneger_token_register = token_register + /** * Update, Get and more to Modifications Bds Settings File */ @@ -143,7 +151,7 @@ module.exports.kill = Kill * * java: download("1.16.5") * - * any platform: download("latest") // It will download the latest version available for download + * any platform: download("latest") || download(true) // It will download the latest version available for download */ module.exports.download = download diff --git a/lib/BdsSettings.js b/lib/BdsSettings.js index 77e95f9..d286ee4 100644 --- a/lib/BdsSettings.js +++ b/lib/BdsSettings.js @@ -1,4 +1,4 @@ -const { join, resolve } = require("path"); +const { join, resolve, basename } = require("path"); const { existsSync, writeFileSync, mkdirSync, readFileSync } = require("fs"); const { homedir } = require("os"); const { valid_platform } = require("./BdsSystemInfo"); @@ -17,7 +17,7 @@ var default_platformConfig; if (valid_platform["bedrock"]) default_platformConfig = "bedrock"; else if (valid_platform["java"]) default_platformConfig = "java"; else if (valid_platform["pocketmine"]) default_platformConfig = "pocketmine"; -else default_platformConfig = "jsprismarine" +else throw new Error("We cannot run any platforms on this system/device"); // Config Base to Bds Maneger Core and others Projects var Config = { @@ -76,6 +76,7 @@ var Config = { java: true, pocketmine: true, jsprismarine: true, + spigot: true, }, { username: "Alex", @@ -84,6 +85,7 @@ var Config = { java: true, pocketmine: true, jsprismarine: true, + spigot: true, }, { username: "steve", @@ -92,6 +94,7 @@ var Config = { java: true, pocketmine: true, jsprismarine: true, + spigot: true, }, { username: "alex", @@ -100,6 +103,7 @@ var Config = { java: true, pocketmine: true, jsprismarine: true, + spigot: true, } ], telegram: { @@ -115,7 +119,7 @@ if (existsSync(ConfigPath)) Config = { ...Config, ...yaml.parse(readFileSync(ConfigPath, "utf8")) }; else writeFileSync(ConfigPath, yaml.stringify(Config)) -process.on("exit", ()=>SaveConfig()) +process.on("exit", () => SaveConfig()) // Paths if (!(existsSync(Config.paths["backups"]))) mkdirSync(Config.paths["backups"], {recursive: true}) @@ -128,18 +132,15 @@ const ServersPaths = { java: join(Config.paths.servers, "Java"), pocketmine: join(Config.paths.servers, "Pocketmine-MP"), jsprismarine: join(Config.paths.servers, "JSPrismarine"), + dragonfly: join(Config.paths.servers, "Dragonfly_go"), + spigot: join(Config.paths.servers, "Spigot") } -for (let Servers of Object.getOwnPropertyNames(ServersPaths)) { - if (!(existsSync(ServersPaths[Servers]))) { - console.log(`Creating the ${Servers} Folder`); - mkdirSync(ServersPaths[Servers], {recursive: true}) +Object.getOwnPropertyNames(ServersPaths).map(Servers => ServersPaths[Servers]).forEach(Servers => { + if (!(existsSync(Servers))) { + console.log(`Creating the ${basename(Servers)} Folder`); + mkdirSync(Servers, {recursive: true}) } -} - -// return settings by function -function GetJsonConfig(){ - return Config -} +}); // get the path from the settings and return by function function GetPaths(path = null){ @@ -156,11 +157,6 @@ function GetServerPaths(path = null){ return ServersPaths[path] } -// Get the server settings for now it's only being used in Java -function GetServerSettings(platform = Config.server.platform){ - return Config.server.Settings[platform] -} - // Update the settings and save at the same time so as not to lose any information from the Bds Maneger settings function UpdateServerVersion(version = null, platform = Config.server.platform){ if (Config.server.versions[platform] || Config.server.versions[platform] === null) { @@ -170,21 +166,6 @@ function UpdateServerVersion(version = null, platform = Config.server.platform){ } else throw new Error("Platform invalid") } -// Return an Object with all server versions installed -function GetServerVersion(){ - return Config.server.versions -} - -// Catch Players/People from Servers/Telegram to be banned or removed from Server/Minecraft -function GetServerBan(){ - return Config.ban -} - -// Cron for Backup -function GetCronBackup(){ - return Config.server.BackupCron -} - // Update the entire Bds Manager Core platform function UpdatePlatform(platform = Config.server.platform){ platform = platform.toLocaleLowerCase(); @@ -197,6 +178,9 @@ function UpdatePlatform(platform = Config.server.platform){ } else if (/pocketmine/.test(platform)) { Config.server.platform = "pocketmine"; SaveConfig() + } else if (/spigot/.test(platform)) { + Config.server.platform = "spigot"; + SaveConfig() } else if (/jsprismarine/.test(platform)) { Config.server.platform = "jsprismarine"; SaveConfig() @@ -204,11 +188,6 @@ function UpdatePlatform(platform = Config.server.platform){ return platform } -// Return to platform -function GetPlatform(){ - return Config.server.platform -} - // Telegram function UpdateTelegramToken(token = null){ if (!(token)) throw new Error("Telegram Token invalid") @@ -217,18 +196,20 @@ function UpdateTelegramToken(token = null){ return token } -function GetTelegramToken(){ - return Config.telegram.token -} +const GetJsonConfig = () => Config; -function GetTelegramAdmins(){ - return Config.telegram.admins -} +const GetCronBackup = () => Config.server.BackupCron; +const GetPlatform = () => Config.server.platform; + +const GetServerBan = () => Config.ban; +const GetServerVersion = () => Config.server.versions; +const GetServerSettings = (platform = Config.server.platform) => Config.server.Settings[platform]; + +const GetTelegramToken = () => Config.telegram.token; +const GetTelegramAdmins = () => Config.telegram.admins; // Get a temporary host to connect to the server. -function GetTempHost(){ - return Config.bds.enable_tmp_host -} +const GetTempHost = () => Config.bds.enable_tmp_host // Enable and/or disable pick up temporary host. function UpdateTempHost(enable = false){ @@ -237,7 +218,8 @@ function UpdateTempHost(enable = false){ // Save Config.bds.enable_tmp_host = enable - return SaveConfig(); + SaveConfig(); + return true; } // Get the server settings diff --git a/lib/BdsSystemInfo.js b/lib/BdsSystemInfo.js index cc75fb3..dd571ea 100644 --- a/lib/BdsSystemInfo.js +++ b/lib/BdsSystemInfo.js @@ -1,41 +1,40 @@ -const commadExist = require("./commandExist"); const { execSync } = require("child_process"); -const { readdirSync } = require("fs"); const { release } = require("os"); +const { readdirSync } = require("fs"); +const commadExist = require("./commandExist"); const { PHPBin, Servers } = require("./ServerURL"); // System Architect (x64, aarch64 and others) var arch; -if (process.arch === "arm64") arch = "aarch64"; else arch = process.arch +if (process.arch === "arm64") arch = "aarch64"; +else arch = process.arch module.exports.arch = arch var system, -require_qemu = false, -valid_platform = { - bedrock: true, - pocketmine: true, - java: commadExist("java"), - jsprismarine: commadExist("node") -} + require_qemu = false, + valid_platform = { + bedrock: true, + pocketmine: true, + java: commadExist("java"), + dragonfly: commadExist("go"), + } // check php bin -if (PHPBin[process.platform]) { - if (PHPBin[process.platform][arch]) valid_platform["pocketmine"] = true; else valid_platform["pocketmine"] = false -} else valid_platform["pocketmine"] = false +if ((PHPBin[process.platform] || {})[arch]) valid_platform["pocketmine"] = true; + else valid_platform["pocketmine"] = false; // SoSystem X if (process.platform == "win32") { system = "Windows"; - // arm64 and X64 - // if (!(arch === "x64" || arch === "aarch64")) valid_platform["bedrock"] = false; } else if (process.platform == "linux") { system = "Linux"; + + // Bedrock Check if (Servers.bedrock[Servers.latest.bedrock][arch]) { - if (Servers.bedrock[Servers.latest.bedrock][arch][process.platform]) valid_platform["bedrock"] = true; else valid_platform["bedrock"] = false; - } else valid_platform["bedrock"] = false - - if (PHPBin[process.platform][arch]) valid_platform["pocketmine"] = true; else valid_platform["pocketmine"] = false - + if (Servers.bedrock[Servers.latest.bedrock][arch][process.platform]) valid_platform["bedrock"] = true; + else valid_platform["bedrock"] = false; + } else valid_platform["bedrock"] = false; + if (valid_platform["bedrock"] === false) { if (commadExist("qemu-x86_64-static")) { console.warn("The Minecraft Bedrock Server is only being validated because you can use 'qemu-x86_64-static'"); @@ -51,10 +50,7 @@ if (process.platform == "win32") { valid_platform["bedrock"] = false } else { console.log(`The Bds Maneger Core does not support ${process.platform} systems, as no tests have been done.`); - system = "Other"; - valid_platform["bedrock"] = false - valid_platform["pocketmine"] = false - process.exit(254) + process.exit(127); } function GetKernel() { @@ -65,43 +61,32 @@ function GetKernel() { else if (kernelVersion <= 6.3) return "Windows 8.1"; else if (kernelVersion <= 10.0) return "Windows 10"; else return "Other Windows or Windows 11"; - } - else if (process.platform === "android") return `${release()}, CPU Core ${readdirSync("/sys/devices/system/cpu/").filter(data=>{return /cpu[0-9]/.test(data)}).length}`; - else if (commadExist("uname")){ + } else if (process.platform === "android") return `Android: ${release()}, CPU Core ${readdirSync("/sys/devices/system/cpu/").filter(data => /cpu[0-9]/.test(data)).length}`; + else if (commadExist("uname")) { const str = execSync("uname -rv").toString("ascii"); - switch (true) { - // amazon aws EC2 - case /aws/.test(str): - if (process.arch === "arm64" || process.arch === "aarch64") return "Amazon AWS Cloud arm64: AWS Graviton"; - else return `Amazon AWS Cloud ${process.arch}: ${require("os").cpus()[0].model}`; - - // Windows WSL 1 - case /WSL2|microsft/.test(str): - return "Microsoft WSL 2"; - // Windows WSL 2 - case /microsoft/.test(str): - return "Microsoft WSL 1"; - - // Azure Virtual Machinime (VM) - case /[aA]zure/.test(str): - return "Microsoft Azure"; - - // Google Cloud Virtual Machinime (VM) - case /[gG]cp/.test(str): - return "Google Cloud Platform"; - - // Oracle cloud Virtual Machinime (VM) - case /[oO]racle/.test(str): - return "Oracle Cloud infrastructure"; - - // Darwin - case /[dD]arwin/.test(str): - return "Apple MacOS"; - - // Others Kernels - default: - return str.split("\n").join(""); + // Amazon web services + if (/aws/.test(str)) { + if (/arm64|aarch64/.test(process.arch)) return "Amazon AWS Cloud arm64: AWS Graviton Serie"; + else return `Amazon AWS Cloud ${process.arch}: ${require("os").cpus()[0].model}`; } + + // Windows subsystem for Linux + else if (/WSL2|microsft/.test(str)) return "Microsoft WSL"; + + // Azure Virtual Machinime (VM) + else if (/[aA]zure/.test(str)) return "Microsoft Azure"; + + // Google Cloud Virtual Machinime (VM) + else if (/[gG]cp/.test(str)) return "Google Cloud Platform"; + + // Oracle cloud Virtual Machinime (VM) + else if (/[oO]racle/.test(str)) return "Oracle Cloud infrastructure"; + + // Darwin + else if (/[dD]arwin/.test(str)) return "Apple MacOS"; + + // Others Kernels + else return str.replace(/\n|\t|\r/gi, ""); } else return "Not identified"; } diff --git a/src/BdsBackup.js b/src/BdsBackup.js index aad848a..0689d42 100644 --- a/src/BdsBackup.js +++ b/src/BdsBackup.js @@ -35,9 +35,6 @@ function Backup() { for (let index of ["pocketmine.yml", "server.properties", "white-list.txt", "ops.txt", "banned-players.txt", "banned-ips.txt"]) if (existsSync(join(Paths.pocketmine, index))) zip.addLocalFile(join(Paths.pocketmine, index), "pocketmine"); } else console.info("Skipping the pocketmine as it was not installed"); - - // JSPrismarine - // The Bds Maneger Core Backup for (let index of ["BdsConfig.yaml", "bds_tokens.json"]) if (existsSync(join(bds_dir, index))) zip.addLocalFile(join(bds_dir, index)); diff --git a/src/BdsManegerServer.js b/src/BdsManegerServer.js index f6d8668..4ae0efb 100644 --- a/src/BdsManegerServer.js +++ b/src/BdsManegerServer.js @@ -74,13 +74,8 @@ function start() { SetupCommands.cwd = GetServerPaths("pocketmine"); } - // Minecraft Bedrock (JSPrismarine) - else if (GetPlatform() === "jsprismarine") { - // Start JSPrismarine - SetupCommands.command = "node"; - SetupCommands.args.push("./packages/server/dist/Server.js"); - SetupCommands.cwd = GetServerPaths("jsprismarine"); - } else throw Error("Bds Config Error") + // Show Error platform + else throw Error("Bds Config Error") // Setup commands const ServerExec = child_process.execFile(SetupCommands.command, SetupCommands.args, { @@ -149,10 +144,7 @@ function start() { // Functions const data = data => Player_Json(data, function (array_status){ - for (let _player of array_status) { - if (action === "all") callback(_player); - else if (_player.Action === action) callback(_player) - } + array_status.filter(On => {if ("all" === action || On.Action === action) return true; else return false;}).forEach(_player => callback(_player)) }); ServerExec.stdout.on("data", data); ServerExec.stderr.on("data", data); diff --git a/src/BdsServersDownload.js b/src/BdsServersDownload.js index a0f25f7..b569b57 100644 --- a/src/BdsServersDownload.js +++ b/src/BdsServersDownload.js @@ -1,16 +1,158 @@ -var AdmZip = require("adm-zip"); const { writeFileSync, existsSync, readFileSync, readdirSync, rmSync } = require("fs"); const { join, resolve, basename } = require("path"); -const bds = require("../index") +var AdmZip = require("adm-zip"); const { valid_platform } = require("../lib/BdsSystemInfo"); const { GetServerPaths, GetServerVersion, UpdateServerVersion, GetPlatform } = require("../lib/BdsSettings"); -const { GitClone } = require("../lib/git_simples"); -const { execSync } = require("child_process"); const Extra = require("../BdsManegerInfo.json"); +const bds = require("../index"); +const { execSync } = require("child_process"); + +module.exports = async function (version, force_install, callback) { + return new Promise(async (promise_resolve, promise_reject) => { + try { + // Server Paths + const bds_dir_bedrock = GetServerPaths("bedrock"), + bds_dir_java = GetServerPaths("java"), + bds_dir_pocketmine = GetServerPaths("pocketmine"), + bds_dir_spigot = GetServerPaths("spigot"), + bds_dir_dragonfly = GetServerPaths("dragonfly"); + + // JSON Configs and others + const Servers = (await (await fetch(Extra.download.servers)).json()); + const ServerVersion = GetServerVersion(); + const CurrentPlatform = GetPlatform(); + if (force_install === true) { + ServerVersion.java = "latest"; + ServerVersion.bedrock = "latest" + ServerVersion.pocketmine = "latest" + } + if (!(version) || version === true || version === "true" || version === "latest") version = Servers.latest[CurrentPlatform] + var url; + + console.log(`Installing version ${version}`); + // Bedrock Installer Script + if (CurrentPlatform === "bedrock") { + if (valid_platform.bedrock === true){ + if (version === "latest") version = Servers.latest.bedrock + if (!(force_install === true) && ServerVersion.bedrock === version) { + console.warn("Jumping, installed version") + if (typeof callback === "function") await callback(undefined, true); + promise_resolve(true); + } else { + if (Servers.bedrock[version].data) console.log(`Server data publish: ${Servers.bedrock[version].data}`) + url = Servers.bedrock[version][bds.arch][process.platform] + var server_configs, permissions, whitelist; + if (existsSync(join(bds_dir_bedrock, "server.properties"))) server_configs = readFileSync(join(bds_dir_bedrock, "server.properties"), "utf8"); + if (existsSync(join(bds_dir_bedrock, "permissions.json"))) permissions = readFileSync(join(bds_dir_bedrock, "permissions.json"), "utf8"); + if (existsSync(join(bds_dir_bedrock, "whitelist.json"))) whitelist = readFileSync(join(bds_dir_bedrock, "whitelist.json"), "utf8"); + + // Download and Add to Adm_Zip + const zip = new AdmZip(Buffer.from((await (await fetch(url)).arrayBuffer()))) + console.log("Download Sucess") + + zip.extractAllTo(bds_dir_bedrock, true) + console.log("Extract Sucess") + if (server_configs) writeFileSync(join(bds_dir_bedrock, "server.properties"), server_configs); + if (permissions) writeFileSync(join(bds_dir_bedrock, "permissions.json"), permissions) + if (whitelist) writeFileSync(join(bds_dir_bedrock, "whitelist.json"), whitelist) + UpdateServerVersion(version); + if (typeof callback === "function") await callback(undefined, true); + promise_resolve(true); + } + } else throw Error("Bedrock Not suported") + } + + // Java + else if (CurrentPlatform === "java") { + if (valid_platform.java === true){ + if (version === "latest") version = Servers.latest.java + if (!(force_install === true) && version === ServerVersion.java) { + console.warn("Jumping, installed version") + if (typeof callback === "function") await callback(undefined, true); + promise_resolve(true) + } else { + url = Servers.java[version].url + console.log(`Server data publish: ${Servers.java[version].data}`) + + writeFileSync(join(bds_dir_java, "MinecraftServerJava.jar"), Buffer.from((await (await fetch(url)).arrayBuffer())), "binary") + console.log("Success when downloading and saving Minecraft Server java"); + UpdateServerVersion(version); + if (typeof callback === "function") await callback(undefined, true); + promise_resolve(true); + } + } else throw Error("Java is not supported or required software is not installed") + } + + // Pocketmine-MP + else if (CurrentPlatform === "pocketmine") { + if (valid_platform.pocketmine === true) { + if (version === "latest") version = Servers.latest.pocketmine + if (!(force_install === true) && version === ServerVersion.pocketmine) { + console.warn("Jumping, installed version") + if (typeof callback === "function") await callback(undefined, true); + promise_resolve(true) + } else { + const PocketMineJson = Servers.pocketmine[version] + console.log(`Server data publish: ${PocketMineJson.data}`); + + writeFileSync(join(bds_dir_pocketmine, "PocketMine-MP.phar"), Buffer.from((await (await fetch(PocketMineJson.url)).arrayBuffer())), "binary") + console.log("Success downloading and saving PocketMine-MP php"); + + await php_download(); + + // Update server Version + UpdateServerVersion(version) + // Callback + if (typeof callback === "function") await callback(undefined, true); + promise_resolve(true); + } + } else throw Error("Pocketmine not suported") + } + + // Spigot + else if (CurrentPlatform === "spigot") { + if (valid_platform.java) { + if (version === "latest") version = Servers.latest.spigot; + if (!(force_install === true) && version === ServerVersion.spigot) { + console.warn("Jumping, installed version") + if (typeof callback === "function") await callback(undefined, true); + promise_resolve(true) + } else { + const SpigotURL = Servers.spigot[version].url; + if (Servers.spigot[version].data) console.log(`Server data publish: ${Servers.spigot[version].data}`); + writeFileSync(join(bds_dir_spigot, "spigot.jar"), Buffer.from((await (await fetch(SpigotURL)).arrayBuffer())), "binary"); + console.log("Success when downloading and saving Spigot"); + UpdateServerVersion(version); + if (typeof callback === "function") await callback(undefined, true); + promise_resolve(true); + } + } else throw Error("Java is not supported or required software is not installed") + } + + // dragonfly + else if (CurrentPlatform === "dragonfly") { + if (valid_platform.dragonfly) { + console.info("Dragonfly does not support versions"); + execSync("git clone https://github.com/df-mc/dragonfly ./", { + cwd: bds_dir_dragonfly + }); + if (typeof callback === "function") await callback(undefined, true); + promise_resolve(true); + } else throw Error("Dragonfly not suported") + } + + // Unidentified platform + else throw Error("Bds maneger Config file error") + } catch (err) { + if (typeof callback === "function") await callback(err, false); + return promise_reject(err); + } + }); +} async function php_download() { - const bds_dir_pocketmine = GetServerPaths("pocketmine"), - PHPBin = (await (await fetch(Extra.download.php)).json()); + const bds_dir_pocketmine = GetServerPaths("pocketmine"); + const PHPBin = (await (await fetch(Extra.download.php)).json()); const phpFolder = resolve(bds_dir_pocketmine, "bin"); const phpExtensiosnsDir = resolve(bds_dir_pocketmine, "bin/php7/lib/php/extensions"); @@ -18,7 +160,6 @@ async function php_download() { let urlPHPBin = PHPBin[process.platform] if (!(urlPHPBin)) throw new Error("unsupported system") urlPHPBin = urlPHPBin[bds.arch] - // Remove Old php Binary if it exists if (existsSync(phpFolder)) { @@ -34,7 +175,7 @@ async function php_download() { zipExtractBin.extractAllTo(bds_dir_pocketmine, false) console.log("Successfully extracting the binaries") - let phpConfigInit = readFileSync(join(phpFolder, "php7", "bin", "php.ini"), "utf-8"); + let phpConfigInit = readFileSync(join(phpFolder, "php7", "bin", "php.ini"), "utf8"); if (!(existsSync(phpExtensiosnsDir))) return true; const phpExtensiosns = readdirSync(phpExtensiosnsDir).map(FileFolder => { @@ -48,124 +189,4 @@ async function php_download() { writeFileSync(join(phpFolder, "php7", "bin", "php.ini"), phpConfigInit); } return true; -} - -module.exports = async function (version, force_install, callback) { - try { - const bds_dir_bedrock = GetServerPaths("bedrock"), - bds_dir_java = GetServerPaths("java"), - bds_dir_pocketmine = GetServerPaths("pocketmine"), - bds_dir_jsprismarine = GetServerPaths("jsprismarine"); - const Servers = (await (await fetch(Extra.download.servers)).json()); - const ServerVersion = GetServerVersion() - const CurrentPlatform = GetPlatform() - if (force_install === true) { - ServerVersion.java = "latest"; - ServerVersion.bedrock = "latest" - ServerVersion.pocketmine = "latest" - } - if (!(version) || version === true || version === "true" || version === "latest") version = Servers.latest[CurrentPlatform] - var url; - - console.log(`Installing version ${version}`); - // Bedrock Installer Script - if (CurrentPlatform === "bedrock") { - if (valid_platform.bedrock === true){ - if (version === "latest") version = Servers.latest.bedrock - if (ServerVersion.bedrock === version) { - console.warn("Jumping, installed version") - if (typeof callback === "function") await callback(undefined, true); - return true - } else { - if (Servers.bedrock[version].data) console.log(`Server data publish: ${Servers.bedrock[version].data}`) - url = Servers.bedrock[version][bds.arch][process.platform] - var server_configs, permissions, whitelist; - if (existsSync(join(bds_dir_bedrock, "server.properties"))) server_configs = readFileSync(join(bds_dir_bedrock, "server.properties"), "utf8"); - if (existsSync(join(bds_dir_bedrock, "permissions.json"))) permissions = readFileSync(join(bds_dir_bedrock, "permissions.json"), "utf8"); - if (existsSync(join(bds_dir_bedrock, "whitelist.json"))) whitelist = readFileSync(join(bds_dir_bedrock, "whitelist.json"), "utf8"); - - // Download and Add to Adm_Zip - const zip = new AdmZip(Buffer.from((await (await fetch(url)).arrayBuffer()))) - console.log("Download Sucess") - - zip.extractAllTo(bds_dir_bedrock, true) - console.log("Extract Sucess") - if (server_configs) writeFileSync(join(bds_dir_bedrock, "server.properties"), server_configs); - if (permissions) writeFileSync(join(bds_dir_bedrock, "permissions.json"), permissions) - if (whitelist) writeFileSync(join(bds_dir_bedrock, "whitelist.json"), whitelist) - UpdateServerVersion(version) - if (typeof callback === "function") await callback(undefined, true); - return true - } - } else throw Error("Bedrock Not suported") - } - // java Installer Script - else if (CurrentPlatform === "java") { - if (valid_platform.java === true){ - if (version === "latest") version = Servers.latest.java - if (version === ServerVersion.java) { - console.warn("Jumping, installed version") - if (typeof callback === "function") await callback(undefined, true); - return true - } else { - url = Servers.java[version].url - console.log(`Server data publish: ${Servers.java[version].data}`) - - writeFileSync(join(bds_dir_java, "MinecraftServerJava.jar"), Buffer.from((await (await fetch(url)).arrayBuffer())), "binary") - console.log("Success when downloading and saving Minecraft Server java"); - UpdateServerVersion(version); - if (typeof callback === "function") await callback(undefined, true); - return true - } - } else throw Error("Java is not supported or required software is not installed") - } - // Pocketmine-MP Installer Script - else if (CurrentPlatform === "pocketmine") { - if (valid_platform.pocketmine === true) { - if (version === "latest") version = Servers.latest.pocketmine - if (version === ServerVersion.pocketmine) { - console.warn("Jumping, installed version") - if (typeof callback === "function") await callback(undefined, true); - return true - } else { - const PocketMineJson = Servers.pocketmine[version] - console.log(`Server data publish: ${PocketMineJson.data}`); - - writeFileSync(join(bds_dir_pocketmine, "PocketMine-MP.phar"), Buffer.from((await (await fetch(PocketMineJson.url)).arrayBuffer())), "binary") - console.log("Success downloading and saving PocketMine-MP php"); - - await php_download(); - - // Update server Version - UpdateServerVersion(version) - // Callback - if (typeof callback === "function") await callback(undefined, true); - return true - } - } else throw Error("Pocketmine not suported") - } - - // JSPrismarine - else if (CurrentPlatform === "jsprismarine") { - if (valid_platform.jsprismarine === true) { - console.log("Downloading the JSPrismarine repository."); - const commit_sha = GitClone("https://github.com/JSPrismarine/JSPrismarine.git", bds_dir_jsprismarine, 1); - for (let command of ["npm install", "npx -y lerna bootstrap", "npm run build"]) console.log(execSync(command, {cwd: bds_dir_jsprismarine}).toString("ascii")); - console.log(commit_sha); - UpdateServerVersion(commit_sha, "jsprismarine") - if (typeof callback === "function") await callback(undefined, true); - return true - } else throw Error("jsprismarine not suported") - } - - // dragonfly - else if (CurrentPlatform === "dragonfly") { - throw "Bds maneger Config file error"; - } - // Unidentified platform - else throw Error("Bds maneger Config file error") - } catch (err) { - if (typeof callback === "function") await callback(err, false); - return err; - } -} +} \ No newline at end of file diff --git a/src/CheckKill.js b/src/CheckKill.js index b7a577b..50315db 100644 --- a/src/CheckKill.js +++ b/src/CheckKill.js @@ -56,7 +56,6 @@ function Detect(){ if (/MinecraftServerJava.jar/.test(check.command)) return true; if (/bedrock_server/.test(check.command)) return true; if (/PocketMine-MP.phar/.test(check.command)) return true; - if (/packages\/server\/dist\/Server.js/.test(check.command)) return true; } return false } @@ -77,10 +76,6 @@ function Kill(){ console.log("Killing Pocketmine-MP"); killWithPid(check.pid); } - if (/packages\/server\/dist\/Server.js/.test(check.command)) { - console.log("Killing JSPrismarine"); - killWithPid(check.pid) - } } return true } diff --git a/src/rest/routes/bds.js b/src/rest/routes/bds.js index ad4ff91..fdb6ced 100644 --- a/src/rest/routes/bds.js +++ b/src/rest/routes/bds.js @@ -73,7 +73,6 @@ app.get("/info", ({ res }) => { const config = bds.get_config(); var info = { server: { - platform: GetPlatform(), world_name: config.world, running: bds.detect(), port: config.portv4, @@ -85,12 +84,13 @@ app.get("/info", ({ res }) => { arch: bds.arch, system: process.platform, Kernel: GetKernel(), + QEMU_STATIC: commandExist("qemu-x86_64-static") || commandExist("qemu-x86_64"), IS_CLI: JSON.parse(process.env.IS_BDS_CLI || false), IS_DOCKER: JSON.parse(process.env.BDS_DOCKER_IMAGE || false), IS_NPX: (process.env.npm_lifecycle_event === "npx"), - QEMU_STATIC: commandExist("qemu-x86_64-static") }, bds_maneger_core: { + platform: GetPlatform(), version: bds.package_json.version, server_versions: GetServerVersion(), } -- 2.50.0 From a101d89a10b03e05d2a2e6fd33defe720bf1cc69 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Mon, 16 Aug 2021 00:21:10 -0300 Subject: [PATCH 11/29] Change package version --- .github/ChangeVersion.js | 6 ++++++ .github/workflows/main.yml | 15 ++++----------- .github/workflows/package_test.yml | 14 +++----------- 3 files changed, 13 insertions(+), 22 deletions(-) create mode 100644 .github/ChangeVersion.js diff --git a/.github/ChangeVersion.js b/.github/ChangeVersion.js new file mode 100644 index 0000000..411ccb9 --- /dev/null +++ b/.github/ChangeVersion.js @@ -0,0 +1,6 @@ +const fs = require('fs'); +const Package_JSon = JSON.parse(fs.readFileSync(process.cwd()+'/package.json', 'utf8')); +const run_ID = process.env.RunID || "1111111111111111111111111111111111111"; +Package_JSon.version = `${run_ID.slice(0, 2)}.${run_ID.slice(3, 6)}.${run_ID.slice(7, 11)}`; +fs.writeFileSync(process.cwd()+'/package.json', JSON.stringify(Package_JSon, null, 2)); +console.log(Package_JSon.version); diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 99da2ac..8fc847d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,16 +20,9 @@ jobs: registry-url: https://registry.npmjs.org/ - name: Edit Version - uses: actions/github-script@v4 - id: set-result - with: - script: | - const fs = require('fs'); - const Package_JSon = JSON.parse(fs.readFileSync(process.cwd()+'/package.json', 'utf8')); - const run_ID = "${{ github.run_id }}"; - Package_JSon.version = `${run_ID.slice(0, 2)}.${run_ID.slice(3, 6)}.${run_ID.slice(7, 11)}`; - fs.writeFileSync(process.cwd()+'/package.json', JSON.stringify(Package_Json, null, 2)); - result-encoding: string + env: + RunID: ${{ github.run_id }} + run: node .github/ChangeVersion.js - name: Install Packages run: npm install @@ -95,4 +88,4 @@ jobs: tags: | bdsmaneger/base:main bdsmaneger/node_image:main - platforms: ${{ env.DOCKER_ARCH }} \ No newline at end of file + platforms: ${{ env.DOCKER_ARCH }} diff --git a/.github/workflows/package_test.yml b/.github/workflows/package_test.yml index f4e7851..f0c049e 100644 --- a/.github/workflows/package_test.yml +++ b/.github/workflows/package_test.yml @@ -16,17 +16,9 @@ jobs: node-version: ${{ matrix.node-version }} - name: Edit Version - uses: actions/github-script@v4 - with: - script: | - const fs = require('fs'); - const Package_JSon = JSON.parse(fs.readFileSync(process.cwd()+'/package.json', 'utf8')); - const run_ID = "${{ github.run_id }}"; - Package_JSon.version = `${run_ID.slice(0, 2)}.${run_ID.slice(3, 6)}.${run_ID.slice(7, 11)}`; - fs.writeFileSync(process.cwd()+'/package.json', JSON.stringify(Package_Json, null, 2)); - console.log(Package_JSon.version); - return Package_JSon.version; - result-encoding: string + env: + RunID: ${{ github.run_id }} + run: node .github/ChangeVersion.js - name: Install node depedencies run: npm install -d --no-save -- 2.50.0 From 314c25c3a85ac9dd6d3f9b507d49c76f8d861163 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Mon, 16 Aug 2021 00:55:17 -0300 Subject: [PATCH 12/29] Remove Jsprismarine and add spigot Basic support * Moved Azure Deploy files to Azure repositories and removed core files * jsprismarine was removed due to lack of use and integration with Bds Maneger Core and its applications. * Updates to Github Actions Workflows. * It is now possible to run java Servers on Android, but with limitations. * Modifications in the nexe for the creation of the Bds Maneger Core binaries. * Now the Docker works as before version 1.1.0 of Bds Maneger Core. * The docker image has returned to support for arm/v7 * the docker image now uses the `testing` version of Debian and no longer `latest`. * Basic modifications in cli. * removed obsolete functions from index.js. --- .Build/Docker/Configure.sh | 19 +- .Build/nexe_build.js | 19 +- .Build/test/ci.js | 5 +- .github/ChangeVersion.js | 6 + .github/workflows/Base.yml | 42 ----- .github/workflows/main.yml | 60 +++++-- .github/workflows/package_test.yml | 36 +++- .github/workflows/rc.yml | 50 ------ .github/workflows/tag_version.yml | 43 ++++- .gitignore | 27 ++- .gitlab/.gitlab-webide.yml | 2 +- .gitlab/workflows/Nightly.yml | 21 --- .gitlab/workflows/Stable.yml | 8 +- .npmignore | 33 ++-- Docker/AzureContainerDeploy.json | 201 --------------------- bin/Docker.js | 100 +++++++++++ bin/bds_maneger.js | 53 +++--- index.js | 40 ++--- lib/BdsSettings.js | 79 ++++---- lib/BdsSystemInfo.js | 106 +++++------ src/BdsBackup.js | 7 +- src/BdsManegerServer.js | 155 ++++++++-------- src/BdsServersDownload.js | 279 ++++++++++++++++------------- src/CheckKill.js | 5 - src/rest/routes/bds.js | 4 +- src/rest/routes/players.js | 17 +- 26 files changed, 629 insertions(+), 788 deletions(-) create mode 100644 .github/ChangeVersion.js delete mode 100644 .github/workflows/Base.yml delete mode 100644 .github/workflows/rc.yml delete mode 100644 .gitlab/workflows/Nightly.yml delete mode 100644 Docker/AzureContainerDeploy.json create mode 100644 bin/Docker.js diff --git a/.Build/Docker/Configure.sh b/.Build/Docker/Configure.sh index 13c5276..c7e2e4b 100644 --- a/.Build/Docker/Configure.sh +++ b/.Build/Docker/Configure.sh @@ -4,7 +4,7 @@ set -ex apt update # Install Necessary Packages -apt install -y curl wget git zsh sudo unzip zip jq python python3 screen +apt -qq install -y curl wget git zsh sudo unzip zip jq python python3 screen # Install nodejs from github release get_current_node_version=$(curl -sL https://api.github.com/repos/nodejs/node/releases/latest | grep tag_name | cut -d '"' -f 4) @@ -21,14 +21,14 @@ esac mkdir /tmp/Node tar -xJf /tmp/node.tar.xz -C /tmp/Node rm -rf /tmp/node.tar.xz -cp -rfv /tmp/Node/*/* /usr +cp -rf /tmp/Node/*/* /usr + +# Install Build Dependencies and others Packages +apt -qq install -y ca-certificates make build-essential procps lsb-release xdg-utils g++ libatomic1 libnss3 libatk-bridge2.0-0 gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxrandr2 libxrender1 libxss1 libxtst6 fonts-liberation libnss3 libgbm-dev # Update npm npm -g install npm@$(curl -sL https://api.github.com/repos/npm/cli/releases/latest | grep tag_name | cut -d '"' -f 4) -# Install Build Dependencies and others Packages -apt install -y ca-certificates make build-essential procps lsb-release xdg-utils g++ libnss3 libatk-bridge2.0-0 gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxrandr2 libxrender1 libxss1 libxtst6 fonts-liberation libnss3 libgbm-dev - # Install Dependencies to diferent architectures if ! [ "$(uname -m)" == "x86_64" ];then mkdir -p /lib64 @@ -39,16 +39,17 @@ if ! [ "$(uname -m)" == "x86_64" ];then fi # Install openjdk -case "$(uname -m)" in - x86_64 | aarch64 ) apt install -y openjdk-17*;; - * ) apt install -y openjdk-11*;; +case "$(apt search openjdk)" in + *openjdk-17* ) apt install -y openjdk-17*;; + *openjdk-11* ) apt install -y openjdk-11*;; + * ) echo "No openjdk version found, skipping";; esac # Setup non root user useradd -m -p "$(perl -e 'print crypt($ARGV[0], "password")' "LucaA1113ba21")" "thebds" addgroup thebds sudo addgroup thebds root -usermod --shell /bin/bash thebds; +usermod --shell /usr/bin/zsh thebds; echo "thebds ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers # Remove Unnecessary Packages diff --git a/.Build/nexe_build.js b/.Build/nexe_build.js index dea4aa7..1054506 100755 --- a/.Build/nexe_build.js +++ b/.Build/nexe_build.js @@ -50,15 +50,14 @@ if (options.system || options.S) { } // nexe options -var files = readdirSync(resolve(__dirname, "..")).filter(retu => {if (/[Dd]ocker*.js/gi.test(retu) || retu.includes("docker_config.json", ".log")) return false; else if (retu.includes(".js")) return true; else if (retu === "rest" || retu === "scripts") return true; else return false;}); -const nexeCopiler = { - name: "Bds Maneger Core", - build: true, - // loglevel: "verbose", - input: resolve(__dirname, "bds_maneger.js"), - output: fileout, - resources: files, -} +const nexeCopiler = {} if (options.v || options.verbose) nexeCopiler.loglevel = "verbose" // Build Binarie -compile(nexeCopiler).then(() => {console.log("success")}) +compile({ + name: "Bds Maneger Core", + build: true, + input: resolve(__dirname, "bds_maneger.js"), + output: fileout, + resources: readdirSync(resolve(__dirname, "..")).filter(retu => !/[Dd]ocker*.js|docker_config.json|*\.log/gi.test(retu)), + ...nexeCopiler +}).then(() => process.exit(0)).catch(() => process.exit(1)); diff --git a/.Build/test/ci.js b/.Build/test/ci.js index 7a18fbd..8cd01ac 100644 --- a/.Build/test/ci.js +++ b/.Build/test/ci.js @@ -1,8 +1,7 @@ (async ()=>{ try { const bds = require("../../index"); - await bds.download("latest", true) - console.log("Date:", await bds.BdsDate()); + await bds.download("latest", true); console.log("Api:", await bds.api()); console.log("Backup:", await bds.backup()); console.log("Detect Server:", await bds.detect()); @@ -19,4 +18,4 @@ console.log("Detect Error:", err); process.exit(1) } -})() \ No newline at end of file +})() diff --git a/.github/ChangeVersion.js b/.github/ChangeVersion.js new file mode 100644 index 0000000..411ccb9 --- /dev/null +++ b/.github/ChangeVersion.js @@ -0,0 +1,6 @@ +const fs = require('fs'); +const Package_JSon = JSON.parse(fs.readFileSync(process.cwd()+'/package.json', 'utf8')); +const run_ID = process.env.RunID || "1111111111111111111111111111111111111"; +Package_JSon.version = `${run_ID.slice(0, 2)}.${run_ID.slice(3, 6)}.${run_ID.slice(7, 11)}`; +fs.writeFileSync(process.cwd()+'/package.json', JSON.stringify(Package_JSon, null, 2)); +console.log(Package_JSon.version); diff --git a/.github/workflows/Base.yml b/.github/workflows/Base.yml deleted file mode 100644 index ade6a22..0000000 --- a/.github/workflows/Base.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Bds Maneger - Docker Base -on: - push: - tags: - - v* - - V* - -# schedule: -# - cron: 0 0 * * */6 - -env: - DOCKER_ARCHS: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 - -jobs: - base: - runs-on: ubuntu-latest - steps: - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_ORG_USER }} - password: ${{ secrets.DOCKER_ORG_PASS }} - - - name: checkout - uses: actions/checkout@master - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - push: true - target: bdsbase - tags: | - bdsmaneger/node_image:latest - bdsmaneger/node_image:${{ github.run_id }} - platforms: ${{ env.DOCKER_ARCHS }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 002d7f2..8fc847d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,11 +3,9 @@ on: push: branches: - main - paths-ignore: - - 'README.md' - - '.github/*/**' - - 'package-lock.json' - - '.devcontainer/**' + +env: + DOCKER_ARCH: linux/amd64,linux/arm64,linux/arm/v7 jobs: npm: @@ -20,16 +18,11 @@ jobs: with: node-version: 16.x registry-url: https://registry.npmjs.org/ + - name: Edit Version - run: | - id_run1=$(echo ${{ github.run_id }} |cut -b 1-2) - id_run2=$(echo ${{ github.run_id }} |cut -b 3-6) - id_run3=$(echo ${{ github.run_id }} |cut -b 7-) - old="$(cat package.json |grep "version"|head -1)" - new_version="$id_run1.$id_run2.$id_run3" - sed "s|$old|\"version\": \"$new_version\",|g" package.json > package2.json - cat package2.json > package.json - rm -rfv package2.json + env: + RunID: ${{ github.run_id }} + run: node .github/ChangeVersion.js - name: Install Packages run: npm install @@ -37,9 +30,10 @@ jobs: - name: NPM Publish run: npm publish --tag dev env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_ORG_TOKEN }} + NODE_AUTH_TOKEN: "${{ secrets.NPM_ORG_TOKEN }}" - docker: + docker_core: + needs: [npm] runs-on: ubuntu-latest steps: - name: Set up QEMU @@ -63,5 +57,35 @@ jobs: with: push: true target: bdscore - tags: bdsmaneger/core:nightly - platforms: linux/amd64,linux/arm64,linux/arm/v7 + tags: bdsmaneger/core:main + platforms: ${{ env.DOCKER_ARCH }} + + docker_base: + needs: [npm] + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_ORG_USER }} + password: ${{ secrets.DOCKER_ORG_PASS }} + + - name: checkout + uses: actions/checkout@master + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + push: true + target: bdsbase + tags: | + bdsmaneger/base:main + bdsmaneger/node_image:main + platforms: ${{ env.DOCKER_ARCH }} diff --git a/.github/workflows/package_test.yml b/.github/workflows/package_test.yml index 7e45239..f0c049e 100644 --- a/.github/workflows/package_test.yml +++ b/.github/workflows/package_test.yml @@ -1,5 +1,5 @@ name: Test - The Bds Maneger Core -on: [push, pull_request] +on: [pull_request] jobs: Test: @@ -9,10 +9,38 @@ jobs: node-version: [14.x, 15.x, 16.x] steps: - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2.4.0 with: node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm install -d --no-save - - run: npm test + + - name: Edit Version + env: + RunID: ${{ github.run_id }} + run: node .github/ChangeVersion.js + + - name: Install node depedencies + run: npm install -d --no-save + + - name: Run test + run: npm run ci + + Test_Docker: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: checkout + uses: actions/checkout@master + + - name: Build Docker Image + uses: docker/build-push-action@v2 + with: + target: bdscore + tags: coretest:latest + platforms: linux/amd64,linux/arm64,linux/arm/v7 diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml deleted file mode 100644 index e2d4361..0000000 --- a/.github/workflows/rc.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Bds Core Release Candidate -on: - push: - tags: - - rc** - -jobs: - npm: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - uses: actions/setup-node@v2.4.0 - with: - node-version: 16.x - registry-url: https://registry.npmjs.org/ - - - name: Install Depedencies - run: npm install --no-save - - - name: Publish - run: npm publish --tag rc - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_ORG_TOKEN }} - - docker: - runs-on: ubuntu-latest - steps: - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_ORG_USER }} - password: ${{ secrets.DOCKER_ORG_PASS }} - - - name: checkout - uses: actions/checkout@master - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - push: true - target: bdscore - tags: bdsmaneger/core:rc_${{ github.run_id }} - platforms: linux/amd64,linux/arm64,linux/arm/v7 diff --git a/.github/workflows/tag_version.yml b/.github/workflows/tag_version.yml index db85832..214596f 100644 --- a/.github/workflows/tag_version.yml +++ b/.github/workflows/tag_version.yml @@ -5,9 +5,13 @@ on: - v** - V** +env: + DOCKER_ARCH: linux/amd64,linux/arm64,linux/arm/v7 + jobs: npm: runs-on: ubuntu-latest + if: ${{ github.actor }} == ${{ github.repository_owner }} steps: - uses: actions/checkout@master - uses: actions/setup-node@v2.4.0 @@ -21,9 +25,10 @@ jobs: - name: Publish run: npm publish env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_ORG_TOKEN }} + NODE_AUTH_TOKEN: "${{ secrets.NPM_ORG_TOKEN }}" - docker: + docker_core: + needs: [npm] runs-on: ubuntu-latest steps: - name: Set up QEMU @@ -48,4 +53,36 @@ jobs: push: true target: bdscore tags: bdsmaneger/core:latest - platforms: linux/amd64,linux/arm64,linux/arm/v7 + platforms: ${{ env.DOCKER_ARCH }} + + docker_base: + needs: [npm] + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_ORG_USER }} + password: ${{ secrets.DOCKER_ORG_PASS }} + + - name: checkout + uses: actions/checkout@master + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + push: true + target: bdsbase + tags: | + bdsmaneger/base:latest + bdsmaneger/base:${{ github.run_id }} + bdsmaneger/node_image:latest + bdsmaneger/node_image:${{ github.run_id }} + platforms: ${{ env.DOCKER_ARCH }} diff --git a/.gitignore b/.gitignore index 33ef586..de9db14 100644 --- a/.gitignore +++ b/.gitignore @@ -1,26 +1,23 @@ +# Log +*.log + +# test files +*.test +*test*.js* +test/ +Test/ + +# Node node_modules/ -*-Test/ -*teste/ -debug.log Bds_Maneger .dccache docs/ -run.log -build.log -Docker.js.log -Docker.js + +# Bds Maneger Core Binaries bds_maneger BdsManager-bin* Bds-Maneger-Core -# Docker Build -Docker.exe - -# Bin Ignores -bin/* -!bin/bds_maneger.js -!bin/telegram_bot.js - # ** .husky Servers \ No newline at end of file diff --git a/.gitlab/.gitlab-webide.yml b/.gitlab/.gitlab-webide.yml index bfa8401..2a2d0ee 100644 --- a/.gitlab/.gitlab-webide.yml +++ b/.gitlab/.gitlab-webide.yml @@ -1,5 +1,5 @@ terminal: - image: bdsmaneger/node_image:latest + image: bdsmaneger/core:latest services: - docker:dind before_script: diff --git a/.gitlab/workflows/Nightly.yml b/.gitlab/workflows/Nightly.yml deleted file mode 100644 index 2765c0b..0000000 --- a/.gitlab/workflows/Nightly.yml +++ /dev/null @@ -1,21 +0,0 @@ -Docker_Nightly: - image: ubuntu:latest - variables: - DOCKER_TLS_CERTDIR: "" - DOCKER_DRIVER: overlay2 - DOCKER_HOST: tcp://docker:2375 - services: - - docker:dind - before_script: - - | - apt update && apt install -y curl &> /dev/null - curl https://get.docker.com | bash - &> /dev/null - docker info - docker run --privileged --rm tonistiigi/binfmt --install all - docker run --privileged --rm multiarch/qemu-user-static --reset -p yes - docker buildx create --name multiarch --driver docker-container --use - docker buildx inspect --bootstrap - docker login --username="$DOCKER_USER" --password="$DOCKER_TOKEN" &> /dev/null - script: - - docker pull bdsmaneger/maneger:nightly - - docker buildx build -t bdsmaneger/maneger:nightly --platform=linux/amd64,linux/arm64/v8,linux/arm/v7 . diff --git a/.gitlab/workflows/Stable.yml b/.gitlab/workflows/Stable.yml index 5672f55..4042f0e 100644 --- a/.gitlab/workflows/Stable.yml +++ b/.gitlab/workflows/Stable.yml @@ -1,8 +1,5 @@ -Docker_Stable: +Docker: image: ubuntu:latest - only: - - v* - - V* variables: DOCKER_TLS_CERTDIR: "" DOCKER_DRIVER: overlay2 @@ -18,6 +15,5 @@ Docker_Stable: docker run --privileged --rm multiarch/qemu-user-static --reset -p yes docker buildx create --name multiarch --driver docker-container --use docker buildx inspect --bootstrap - docker login --username="$DOCKER_USER" --password="$DOCKER_TOKEN" &> /dev/null script: - - docker buildx build -t bdsmaneger/maneger:latest --platform=linux/amd64,linux/arm64/v8,linux/arm/v7 . + - docker buildx build -t bdsmaneger/maneger:latest --platform=linux/amd64,linux/arm64,linux/arm/v7 . diff --git a/.npmignore b/.npmignore index 32550d8..99693aa 100644 --- a/.npmignore +++ b/.npmignore @@ -1,17 +1,16 @@ -Docker/ -.docker* -.github/ -.devconatiner/ -.vscode/ -node_modules/ -*-Test/ -*teste/ -debug.log -Bds_Maneger -.dccache -run.log -build.log -Docker.js.log -Docker.js -bds_maneger -BdsManager-bin* \ No newline at end of file +# Log +*.log + +# test files +*.test +*test*.js* +test/ +Test/ + +# Git +git* +.git* + +# Docker +.dockerignore +Docker* \ No newline at end of file diff --git a/Docker/AzureContainerDeploy.json b/Docker/AzureContainerDeploy.json deleted file mode 100644 index 6e932cd..0000000 --- a/Docker/AzureContainerDeploy.json +++ /dev/null @@ -1,201 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json", - "contentVersion": "1.50.0.0", - "parameters": { - "containerName": { - "type": "string", - "maxLength": 63, - "defaultValue": "bds-maneger" - }, - "TelegramBotToken": { - "type": "string", - "defaultValue": "null" - }, - "WorldName": { - "type": "string", - "defaultValue": "Minecraft Bedrock" - }, - "ServerDescription": { - "type": "string", - "defaultValue": "The Bds Maneger in Docker" - }, - "ServerGameMode": { - "type": "string", - "defaultValue": "survival", - "allowedValues": ["survival","creative","hardcore"] - }, - "ServerDifficulty": { - "type": "string", - "defaultValue": "normal", - "allowedValues": ["normal","easy"] - }, - "ServerPlayers": { - "type": "string", - "defaultValue": "30", - "metadata": { - "description": "The more players, the more CPU, the more RAM will be needed." - }, - "allowedValues": ["5","10","15","20","25","30","35","40","45","50","70","100","200"] - }, - "ServerPlatform": { - "type": "string", - "defaultValue": "bedrock", - "allowedValues": ["bedrock", "java", "pocketmine", "jsprismarine"], - "metadata": { - "description": "Bedrock: Phones, Xbox, Nintendo switch, etc. Java: Desktops" - } - }, - "numberCpuCores": { - "type": "string", - "defaultValue": "2", - "allowedValues": ["1","2","3","4"] - }, - "RamMemory": { - "type": "string", - "allowedValues": ["1","2","4","6","8","10"], - "defaultValue": "4" - } - }, - "variables": { - "bdsstorage": "bdssave", - "StorageName": "[concat('bdssave', uniqueString(resourceGroup().id))]", - "DnsName": "[concat('bdsdns-', uniqueString(resourceGroup().id))]", - "bds_ports": [ - { - "port": "1932", - "protocol": "TCP" - }, - { - "port": "6565", - "protocol": "TCP" - }, - { - "port": "19132", - "protocol": "UDP" - }, - { - "port": "19133", - "protocol": "UDP" - } - ] - }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "2019-06-01", - "name": "[variables('StorageName')]", - "location": "[resourceGroup().location]", - "kind": "StorageV2", - "sku": { - "name": "Standard_LRS", - "tier": "Standard" - }, - "properties": { - "accessTier": "Hot", - "allowBlobPublicAccess": true, - "allowSharedKeyAccess": true, - "largeFileSharesState": "Enabled" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/fileServices/shares", - "apiVersion": "2019-06-01", - "name": "[concat(variables('StorageName'), '/default/', variables('bdsstorage'))]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts', variables('StorageName'))]" - ] - }, - // Docker Bds Manegerg Image - { - "location": "[resourceGroup().location]", - "name": "[parameters('containerName')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/fileServices/shares', variables('StorageName'), 'default', variables('bdsstorage') )]" - ], - "type": "Microsoft.ContainerInstance/containerGroups", - "apiVersion": "2019-12-01", - "properties": { - "containers": [ - { - "name": "[parameters('containerName')]", - "properties": { - "image": "bdsmaneger/core:latest", - "resources": { - "requests": { - "cpu": "[int(parameters('numberCpuCores'))]", - "memoryInGB": "[float(parameters('RamMemory'))]" - } - }, - "ports": "[variables('bds_ports')]", - "environmentVariables": [ - { - "name": "TELEGRAM_TOKEN", - "value": "[parameters('TelegramBotToken')]" - }, - { - "name": "WORLD_NAME", - "value": "[parameters('WorldName')]" - }, - { - "name": "DESCRIPTION", - "value": "[parameters('ServerDescription')]" - }, - { - "name": "GAMEMODE", - "value": "[parameters('ServerGameMode')]" - }, - { - "name": "DIFFICULTY", - "value": "[parameters('ServerDifficulty')]" - }, - { - "name": "PLAYERS", - "value": "[parameters('ServerPlayers')]" - }, - { - "name": "SERVER", - "value": "[parameters('ServerPlatform')]" - }, - { - "name": "BDS_VERSION", - "value": "latest" - } - ], - "volumeMounts": [ - { - "name": "save", - "mountPath": "/home/bds" - } - ] - } - } - ], - "restartPolicy": "OnFailure", - "osType": "Linux", - "ipAddress": { - "type": "Public", - "ports": "[variables('bds_ports')]", - "dnsNameLabel": "[variables('DnsName')]" - }, - "volumes": [ - { - "name": "save", - "azureFile": { - "shareName": "[variables('bdsstorage')]", - "StorageAccountName": "[variables('StorageName')]", - // https://stackoverflow.com/a/33227123 - "storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('StorageName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).keys[1].value]" - } - } - ] - }, - "tags": {} - } - ], - "outputs": { - "containerIPv4Address": { - "type": "string", - "value": "[reference(resourceId('Microsoft.ContainerInstance/containerGroups/', parameters('containerName'))).ipAddress.ip]" - } - } -} \ No newline at end of file diff --git a/bin/Docker.js b/bin/Docker.js new file mode 100644 index 0000000..be9209f --- /dev/null +++ b/bin/Docker.js @@ -0,0 +1,100 @@ +#!/usr/bin/env node +const BdsCore = require("../index"); +const { GetPlatform } = require("../lib/BdsSettings"); +const { Servers } = require("../lib/ServerURL"); +const { CronJob } = require("cron"); +const BdsInfo = require("../BdsManegerInfo.json"); + +process.env.BDS_DOCKER_IMAGE = true; + +function StartServer(){ + console.log("The entire log can be accessed via the api and/or the docker log"); + const ServerStarted = BdsCore.start(); + ServerStarted.log(a => process.stdout.write(a)); + ServerStarted.exit(process.exit); + BdsCore.api(); + new CronJob("0 */1 * * *", async () => { + try { + const CurrentLocalVersion = BdsCore.getBdsConfig().server.versions[GetPlatform()], + CurrentRemoteVersion = Object.getOwnPropertyNames((await (await fetch(BdsInfo.download.servers)).json())[GetPlatform()])[0]; + if (CurrentLocalVersion !== CurrentRemoteVersion) { + let currenttime = `Hello we are starting the server upgrade from version ${CurrentLocalVersion} to version ${CurrentRemoteVersion}, you have 20 seconds to exit the server` + console.log("Update Server:", currenttime); + ServerStarted.say(currenttime); + let countdown = 20; + while (countdown > 1) { + currenttime = `${countdown} seconds remaining to stop Server!`; + console.log(currenttime); + ServerStarted.say(currenttime); + countdown--; + await new Promise(resolve => setTimeout(resolve, 1000)); + } + currenttime = "Stopping the server" + console.log(currenttime); + ServerStarted.say(currenttime); + await new Promise(resolve => setTimeout(resolve, 600)); + ServerStarted.stop(); + } + } catch (err) { + console.log(err); + } + }); +} + +// Check Installed Server +const AllVersions = BdsCore.BdsSettigs.GetJsonConfig().server.versions; +if (Object.getOwnPropertyNames(AllVersions).filter(platform => AllVersions[platform]).length >= 1) { + if (process.env.UPDATE_SERVER === "true") { + BdsCore.download(true, true, (err) => { + if (err) { + console.log(err); + process.exit(1); + } + StartServer(); + }); + } else { + // Check for Update + if (AllVersions[GetPlatform()] === Object.getOwnPropertyNames(Servers[GetPlatform()])[0]) { + console.log("The entire log can be accessed via the api and/or the docker log"); + const ServerStarted = BdsCore.start(); + ServerStarted.log(a => process.stdout.write(a)); + ServerStarted.exit(process.exit); + BdsCore.api(); + } else { + BdsCore.download(true, true, (err) => { + if (err) { + console.log(err); + process.exit(1); + } + StartServer(); + }); + } + } +} else { + console.log("Server is not installed, starting server implementation"); + // Import ENV to Settings Server + const { DESCRIPTION, WORLD_NAME, GAMEMODE, DIFFICULTY, ACCOUNT, PLAYERS, SERVER, ENABLE_COMMANDS } = process.env; + // Update Platform + BdsCore.change_platform(SERVER || "bedrock"); + BdsCore.download(true, true, (err) => { + if (err) { + console.log(err); + process.exit(1); + } + // Create JSON Config + const ServerConfig = { + world: WORLD_NAME, + description: DESCRIPTION, + gamemode: GAMEMODE, + difficulty: DIFFICULTY, + players: parseInt(PLAYERS), + commands: ENABLE_COMMANDS === "true", + account: ACCOUNT === "true", + whitelist: false, + port: 19132, + portv6: 19133, + } + BdsCore.set_config(ServerConfig); + StartServer(); + }); +} \ No newline at end of file diff --git a/bin/bds_maneger.js b/bin/bds_maneger.js index 8b9066e..9aeb4c6 100755 --- a/bin/bds_maneger.js +++ b/bin/bds_maneger.js @@ -18,7 +18,7 @@ const server = (argv.p || argv.platform), version = (argv.v || argv.version), SystemCheck = (argv.S || argv.system_info), - bds_version = (argv.d || argv.server_download), + bds_version = (argv.d || argv.download), start = (argv.s || argv.server_version), help = (argv.h || argv.help), kill = (argv.k || argv.kill); @@ -52,8 +52,12 @@ function StartServer(){ console.log("Send a \"@stop\" command to stop the server and exit\nUse CTRL + C to force exit\n"); // Start Server const bds_server = bds.start(); - bds_server.log(echo) - bds_server.exit(function (code){if (code === 3221225781) return open("https://docs.the-bds-maneger.org/Bds Maneger core/WindowsFixDll");console.log("leaving the server, status code: ", code);process.exit(code)}); + bds_server.log(data => process.stdout.write(data)); + bds_server.exit(function (code){ + if (code === 3221225781 && process.platform === "win32") return open("https://docs.the-bds-maneger.org/Bds Maneger core/WindowsFixDll"); + console.log("leaving the server, status code:", code); + process.exit(code) + }); // CLI Commands const rl = readline.createInterface({input: process.stdin,output: process.stdout}); @@ -89,7 +93,7 @@ if (help) { " -s --start Start Server", " -k --kill Detect and kill bds servers", " -p --platform Select server platform", - " -d --server_download server version to install, default \"latest\"", + " -d --download server version to install, default \"latest\"", " --interactive Install the server interactively", " -S --system_info System info and test", " -h --help Print this list and exit.", @@ -154,21 +158,30 @@ if (SystemCheck) { if (bds_version){ try { if (argv.interactive) { - console.log(`Geting versions to ${GetPlatform()}`); - const LoadVersion = require("../../lib/ServerURL").Servers[GetPlatform()] + const LoadVersion = require("../lib/ServerURL").Servers[GetPlatform()] const Version = Object.getOwnPropertyNames(LoadVersion) - // List Version - for (let version in Version) console.log(`${version}: ${GetPlatform()} version ${Version[version]}`); // deepscan-disable-line FORIN_ARRAY - // deepcode ignore MissingClose: - const DownloadOptions = readline.createInterface({input: process.stdin,output: process.stdout}); - console.log("\nSelect Option"); - DownloadOptions.on("line", (input) => { - download(Version[parseInt(input)], true, function(){ - console.log("Installation was successful, so start the server with the -s option"); - if (start) StartServer(); - else process.exit(0) - }) - }); + + const StartQuestion = (Readline) => { + Readline.question("Select a version to download: ", input => { + if (Version[parseInt(input) - 1]) { + Readline.close(); + download(Version[parseInt(input) - 1], true, function(){ + if (start) return StartServer(); + console.log("Installation was successful, so start the server with the -s option"); + process.exit(0); + }) + } else { + console.log("Invalid Option"); + StartQuestion(Readline); + } + }); + } + + console.log(`Selected platform: ${GetPlatform()}, Total available versions: ${Version.length}`); + console.log("Option Version"); + + for (let option in Version) console.log(`${parseInt(option) + 1} -------- ${Version[option]}`); + StartQuestion(readline.createInterface({input: process.stdin,output: process.stdout})); } else bds.download(bds_version, true, function(){ if (start) StartServer(); @@ -178,8 +191,4 @@ if (bds_version){ } // Start server -function echo(data = ""){ - data = data.split("\n").filter(data => {return (data !== "")}) - data.forEach(data => console.log(data)) -} if (start && !(server || version || SystemCheck || bds_version || help)) StartServer(); diff --git a/index.js b/index.js index 7515e94..9d730f1 100644 --- a/index.js +++ b/index.js @@ -7,23 +7,6 @@ const { bds_dir } = require("./lib/BdsSettings"); if (typeof fetch === "undefined") global.fetch = require("node-fetch"); -function date(format) { - const today = new Date(), - yaer = today.getFullYear(), - day = String(today.getDate()).padStart(2, "0"), - month = String(today.getMonth() + 1).padStart(2, "0"), - hour = today.getHours(), - minute = today.getMinutes(); - // --------------------------------------------------------- - if (format === "year") return yaer - else if (format === "day") return day - else if (format === "month") return month - else if (format === "hour") return hour - else if (format === "minute") return minute - else if (format === "hour_minu") return `${hour}-${minute}` - else return `${day}-${month}-${yaer}_${hour}-${minute}` -} - const bds_core_package = resolve(__dirname, "package.json") module.exports.package_path = bds_core_package module.exports.package_json = require("./package.json"); @@ -66,10 +49,11 @@ module.exports.telegram_token_save = UpdateTelegramToken */ module.exports.api = require("./src/rest/api"); -function token_register() { +function token_register(Admin_Scoper = ["web_admin", "admin"]) { + Admin_Scoper = Array.from(Admin_Scoper).filter(scoper => /admin/.test(scoper)); const bds_token_path = path.join(bds_dir, "bds_tokens.json"); - if (!(fs.existsSync(bds_token_path))) fs.writeFileSync(bds_token_path, "[]"); - const tokens = JSON.parse(fs.readFileSync(bds_token_path, "utf8")); + let tokens = [] + if (fs.existsSync(bds_token_path)) tokens = JSON.parse(fs.readFileSync(bds_token_path, "utf8")); // Get UUID const getBdsUUId = randomUUID().split("-"); @@ -79,7 +63,7 @@ function token_register() { tokens.push({ token: bdsuid, date: new Date(), - scopers: ["admin"] + scopers: Admin_Scoper }); fs.writeFileSync(bds_token_path, JSON.stringify(tokens, null, 4), "utf8"); console.log(`Bds Maneger API REST token: "${bdsuid}"`); @@ -93,6 +77,13 @@ function token_register() { */ module.exports.token_register = token_register +/** + * Register tokens to use in Bds Maneger REST and other supported applications + * + * @example token_register() + */ +module.exports.bds_maneger_token_register = token_register + /** * Update, Get and more to Modifications Bds Settings File */ @@ -104,11 +95,6 @@ const { config, get_config } = require("./src/ServerSettings"); const download = require("./src/BdsServersDownload"); const { start, stop, BdsCommand, CronBackups } = require("./src/BdsManegerServer") -/** - * Take the current date - */ -module.exports.BdsDate = module.exports.date = date - /** * sending commands more simply to the server * @@ -165,7 +151,7 @@ module.exports.kill = Kill * * java: download("1.16.5") * - * any platform: download("latest") // It will download the latest version available for download + * any platform: download("latest") || download(true) // It will download the latest version available for download */ module.exports.download = download diff --git a/lib/BdsSettings.js b/lib/BdsSettings.js index 7db3a6d..d286ee4 100644 --- a/lib/BdsSettings.js +++ b/lib/BdsSettings.js @@ -1,4 +1,4 @@ -const { join, resolve } = require("path"); +const { join, resolve, basename } = require("path"); const { existsSync, writeFileSync, mkdirSync, readFileSync } = require("fs"); const { homedir } = require("os"); const { valid_platform } = require("./BdsSystemInfo"); @@ -17,7 +17,7 @@ var default_platformConfig; if (valid_platform["bedrock"]) default_platformConfig = "bedrock"; else if (valid_platform["java"]) default_platformConfig = "java"; else if (valid_platform["pocketmine"]) default_platformConfig = "pocketmine"; -else default_platformConfig = "jsprismarine" +else throw new Error("We cannot run any platforms on this system/device"); // Config Base to Bds Maneger Core and others Projects var Config = { @@ -46,6 +46,7 @@ var Config = { java: null, pocketmine: null, jsprismarine: null, + spigot: null, }, Settings: { java: { @@ -75,6 +76,7 @@ var Config = { java: true, pocketmine: true, jsprismarine: true, + spigot: true, }, { username: "Alex", @@ -83,6 +85,7 @@ var Config = { java: true, pocketmine: true, jsprismarine: true, + spigot: true, }, { username: "steve", @@ -91,6 +94,7 @@ var Config = { java: true, pocketmine: true, jsprismarine: true, + spigot: true, }, { username: "alex", @@ -99,6 +103,7 @@ var Config = { java: true, pocketmine: true, jsprismarine: true, + spigot: true, } ], telegram: { @@ -114,7 +119,7 @@ if (existsSync(ConfigPath)) Config = { ...Config, ...yaml.parse(readFileSync(ConfigPath, "utf8")) }; else writeFileSync(ConfigPath, yaml.stringify(Config)) -process.on("exit", ()=>SaveConfig()) +process.on("exit", () => SaveConfig()) // Paths if (!(existsSync(Config.paths["backups"]))) mkdirSync(Config.paths["backups"], {recursive: true}) @@ -127,18 +132,15 @@ const ServersPaths = { java: join(Config.paths.servers, "Java"), pocketmine: join(Config.paths.servers, "Pocketmine-MP"), jsprismarine: join(Config.paths.servers, "JSPrismarine"), + dragonfly: join(Config.paths.servers, "Dragonfly_go"), + spigot: join(Config.paths.servers, "Spigot") } -for (let Servers of Object.getOwnPropertyNames(ServersPaths)) { - if (!(existsSync(ServersPaths[Servers]))) { - console.log(`Creating the ${Servers} Folder`); - mkdirSync(ServersPaths[Servers], {recursive: true}) +Object.getOwnPropertyNames(ServersPaths).map(Servers => ServersPaths[Servers]).forEach(Servers => { + if (!(existsSync(Servers))) { + console.log(`Creating the ${basename(Servers)} Folder`); + mkdirSync(Servers, {recursive: true}) } -} - -// return settings by function -function GetJsonConfig(){ - return Config -} +}); // get the path from the settings and return by function function GetPaths(path = null){ @@ -155,11 +157,6 @@ function GetServerPaths(path = null){ return ServersPaths[path] } -// Get the server settings for now it's only being used in Java -function GetServerSettings(platform = Config.server.platform){ - return Config.server.Settings[platform] -} - // Update the settings and save at the same time so as not to lose any information from the Bds Maneger settings function UpdateServerVersion(version = null, platform = Config.server.platform){ if (Config.server.versions[platform] || Config.server.versions[platform] === null) { @@ -169,21 +166,6 @@ function UpdateServerVersion(version = null, platform = Config.server.platform){ } else throw new Error("Platform invalid") } -// Return an Object with all server versions installed -function GetServerVersion(){ - return Config.server.versions -} - -// Catch Players/People from Servers/Telegram to be banned or removed from Server/Minecraft -function GetServerBan(){ - return Config.ban -} - -// Cron for Backup -function GetCronBackup(){ - return Config.server.BackupCron -} - // Update the entire Bds Manager Core platform function UpdatePlatform(platform = Config.server.platform){ platform = platform.toLocaleLowerCase(); @@ -196,6 +178,9 @@ function UpdatePlatform(platform = Config.server.platform){ } else if (/pocketmine/.test(platform)) { Config.server.platform = "pocketmine"; SaveConfig() + } else if (/spigot/.test(platform)) { + Config.server.platform = "spigot"; + SaveConfig() } else if (/jsprismarine/.test(platform)) { Config.server.platform = "jsprismarine"; SaveConfig() @@ -203,11 +188,6 @@ function UpdatePlatform(platform = Config.server.platform){ return platform } -// Return to platform -function GetPlatform(){ - return Config.server.platform -} - // Telegram function UpdateTelegramToken(token = null){ if (!(token)) throw new Error("Telegram Token invalid") @@ -216,18 +196,20 @@ function UpdateTelegramToken(token = null){ return token } -function GetTelegramToken(){ - return Config.telegram.token -} +const GetJsonConfig = () => Config; -function GetTelegramAdmins(){ - return Config.telegram.admins -} +const GetCronBackup = () => Config.server.BackupCron; +const GetPlatform = () => Config.server.platform; + +const GetServerBan = () => Config.ban; +const GetServerVersion = () => Config.server.versions; +const GetServerSettings = (platform = Config.server.platform) => Config.server.Settings[platform]; + +const GetTelegramToken = () => Config.telegram.token; +const GetTelegramAdmins = () => Config.telegram.admins; // Get a temporary host to connect to the server. -function GetTempHost(){ - return Config.bds.enable_tmp_host -} +const GetTempHost = () => Config.bds.enable_tmp_host // Enable and/or disable pick up temporary host. function UpdateTempHost(enable = false){ @@ -236,7 +218,8 @@ function UpdateTempHost(enable = false){ // Save Config.bds.enable_tmp_host = enable - return SaveConfig(); + SaveConfig(); + return true; } // Get the server settings diff --git a/lib/BdsSystemInfo.js b/lib/BdsSystemInfo.js index 9d1b747..dd571ea 100644 --- a/lib/BdsSystemInfo.js +++ b/lib/BdsSystemInfo.js @@ -1,41 +1,40 @@ -const commadExist = require("./commandExist"); const { execSync } = require("child_process"); -const { readdirSync } = require("fs"); const { release } = require("os"); +const { readdirSync } = require("fs"); +const commadExist = require("./commandExist"); const { PHPBin, Servers } = require("./ServerURL"); // System Architect (x64, aarch64 and others) var arch; -if (process.arch === "arm64") arch = "aarch64"; else arch = process.arch +if (process.arch === "arm64") arch = "aarch64"; +else arch = process.arch module.exports.arch = arch var system, -require_qemu = false, -valid_platform = { - bedrock: true, - pocketmine: true, - java: commadExist("java"), - jsprismarine: commadExist("node") -} + require_qemu = false, + valid_platform = { + bedrock: true, + pocketmine: true, + java: commadExist("java"), + dragonfly: commadExist("go"), + } // check php bin -if (PHPBin[process.platform]) { - if (PHPBin[process.platform][arch]) valid_platform["pocketmine"] = true; else valid_platform["pocketmine"] = false -} else valid_platform["pocketmine"] = false +if ((PHPBin[process.platform] || {})[arch]) valid_platform["pocketmine"] = true; + else valid_platform["pocketmine"] = false; // SoSystem X if (process.platform == "win32") { system = "Windows"; - // arm64 and X64 - // if (!(arch === "x64" || arch === "aarch64")) valid_platform["bedrock"] = false; } else if (process.platform == "linux") { system = "Linux"; + + // Bedrock Check if (Servers.bedrock[Servers.latest.bedrock][arch]) { - if (Servers.bedrock[Servers.latest.bedrock][arch][process.platform]) valid_platform["bedrock"] = true; else valid_platform["bedrock"] = false; - } else valid_platform["bedrock"] = false - - if (PHPBin[process.platform][arch]) valid_platform["pocketmine"] = true; else valid_platform["pocketmine"] = false - + if (Servers.bedrock[Servers.latest.bedrock][arch][process.platform]) valid_platform["bedrock"] = true; + else valid_platform["bedrock"] = false; + } else valid_platform["bedrock"] = false; + if (valid_platform["bedrock"] === false) { if (commadExist("qemu-x86_64-static")) { console.warn("The Minecraft Bedrock Server is only being validated because you can use 'qemu-x86_64-static'"); @@ -49,13 +48,9 @@ if (process.platform == "win32") { } else if (process.platform === "android") { system = "Android"; valid_platform["bedrock"] = false - valid_platform["java"] = false } else { console.log(`The Bds Maneger Core does not support ${process.platform} systems, as no tests have been done.`); - system = "Other"; - valid_platform["bedrock"] = false - valid_platform["pocketmine"] = false - process.exit(254) + process.exit(127); } function GetKernel() { @@ -66,43 +61,32 @@ function GetKernel() { else if (kernelVersion <= 6.3) return "Windows 8.1"; else if (kernelVersion <= 10.0) return "Windows 10"; else return "Other Windows or Windows 11"; - } - else if (process.platform === "android") return `${release()}, CPU Core ${readdirSync("/sys/devices/system/cpu/").filter(data=>{return /cpu[0-9]/.test(data)}).length}`; - else if (commadExist("uname")){ + } else if (process.platform === "android") return `Android: ${release()}, CPU Core ${readdirSync("/sys/devices/system/cpu/").filter(data => /cpu[0-9]/.test(data)).length}`; + else if (commadExist("uname")) { const str = execSync("uname -rv").toString("ascii"); - switch (true) { - // amazon aws EC2 - case /aws/.test(str): - if (process.arch === "arm64" || process.arch === "aarch64") return "Amazon AWS Cloud arm64: AWS Graviton"; - else return `Amazon AWS Cloud ${process.arch}: ${require("os").cpus()[0].model}`; - - // Windows WSL 1 - case /WSL2|microsft/.test(str): - return "Microsoft WSL 2"; - // Windows WSL 2 - case /microsoft/.test(str): - return "Microsoft WSL 1"; - - // Azure Virtual Machinime (VM) - case /[aA]zure/.test(str): - return "Microsoft Azure"; - - // Google Cloud Virtual Machinime (VM) - case /[gG]cp/.test(str): - return "Google Cloud Platform"; - - // Oracle cloud Virtual Machinime (VM) - case /[oO]racle/.test(str): - return "Oracle Cloud infrastructure"; - - // Darwin - case /[dD]arwin/.test(str): - return "Apple MacOS"; - - // Others Kernels - default: - return str.split("\n").join(""); + // Amazon web services + if (/aws/.test(str)) { + if (/arm64|aarch64/.test(process.arch)) return "Amazon AWS Cloud arm64: AWS Graviton Serie"; + else return `Amazon AWS Cloud ${process.arch}: ${require("os").cpus()[0].model}`; } + + // Windows subsystem for Linux + else if (/WSL2|microsft/.test(str)) return "Microsoft WSL"; + + // Azure Virtual Machinime (VM) + else if (/[aA]zure/.test(str)) return "Microsoft Azure"; + + // Google Cloud Virtual Machinime (VM) + else if (/[gG]cp/.test(str)) return "Google Cloud Platform"; + + // Oracle cloud Virtual Machinime (VM) + else if (/[oO]racle/.test(str)) return "Oracle Cloud infrastructure"; + + // Darwin + else if (/[dD]arwin/.test(str)) return "Apple MacOS"; + + // Others Kernels + else return str.replace(/\n|\t|\r/gi, ""); } else return "Not identified"; } @@ -112,4 +96,4 @@ function GetKernel() { module.exports.valid_platform = valid_platform module.exports.require_qemu = require_qemu module.exports.system = system -module.exports.GetKernel = GetKernel; \ No newline at end of file +module.exports.GetKernel = GetKernel; diff --git a/src/BdsBackup.js b/src/BdsBackup.js index 213d677..0689d42 100644 --- a/src/BdsBackup.js +++ b/src/BdsBackup.js @@ -1,4 +1,3 @@ -const bds = require("../index") const { join, resolve } = require("path"); const { readdirSync, existsSync, readFileSync, statSync } = require("fs") const AdmZip = require("adm-zip"); @@ -14,7 +13,8 @@ function Backup() { pocketmine: GetServerPaths("pocketmine"), jsprismarine: GetServerPaths("jsprismarine") } - const name = `Bds_Maneger-Backups_${bds.date()}.zip` + const CurrentDate = new Date(); + const name = `Bds_Maneger_Core_Backups_${CurrentDate.getDate()}-${CurrentDate.getMonth()}-${CurrentDate.getFullYear()}.zip` const PathBackup = join(GetPaths("backups"), name); // Bedrock @@ -35,9 +35,6 @@ function Backup() { for (let index of ["pocketmine.yml", "server.properties", "white-list.txt", "ops.txt", "banned-players.txt", "banned-ips.txt"]) if (existsSync(join(Paths.pocketmine, index))) zip.addLocalFile(join(Paths.pocketmine, index), "pocketmine"); } else console.info("Skipping the pocketmine as it was not installed"); - - // JSPrismarine - // The Bds Maneger Core Backup for (let index of ["BdsConfig.yaml", "bds_tokens.json"]) if (existsSync(join(bds_dir, index))) zip.addLocalFile(join(bds_dir, index)); diff --git a/src/BdsManegerServer.js b/src/BdsManegerServer.js index 7808640..4ae0efb 100644 --- a/src/BdsManegerServer.js +++ b/src/BdsManegerServer.js @@ -74,13 +74,8 @@ function start() { SetupCommands.cwd = GetServerPaths("pocketmine"); } - // Minecraft Bedrock (JSPrismarine) - else if (GetPlatform() === "jsprismarine") { - // Start JSPrismarine - SetupCommands.command = "node"; - SetupCommands.args.push("./packages/server/dist/Server.js"); - SetupCommands.cwd = GetServerPaths("jsprismarine"); - } else throw Error("Bds Config Error") + // Show Error platform + else throw Error("Bds Config Error") // Setup commands const ServerExec = child_process.execFile(SetupCommands.command, SetupCommands.args, { @@ -99,8 +94,7 @@ function start() { } // Log file - - const LogFile = path.join(GetPaths("log"), `${bds.date()}_${GetPlatform()}_Bds_log.log`); + const LogFile = path.join(GetPaths("log"), `${GetPlatform()}_${new Date().toString()}_Bds_log.log`); const LatestLog_Path = path.join(GetPaths("log"), "latest.log"); const LogSaveFunction = data => { fs.appendFileSync(LogFile, data); @@ -121,84 +115,78 @@ function start() { global.bds_log_string = "" ServerExec.stdout.on("data", data => {if (global.bds_log_string) global.bds_log_string = data; else global.bds_log_string += data}); + // sets bds core commands + const command = async function (command = "list", callback = function (){}) { + return new Promise((resolve) => { + ServerExec.stdin.write(`${command}\n`); + if (typeof callback === "function") { + const TempLog = [] + const ControlTempHost = data => {TempLog.push(data); return data;} + ServerExec.stdout.on("data", data => ControlTempHost(data)); + ServerExec.stderr.on("data", data => ControlTempHost(data)); + setTimeout(() => { + callback(TempLog.join("\n")); + resolve(TempLog.join("\n")); + }, 2500); + } + }); + }; + const log = function (logCallback = data => process.stdout.write(data)){ + if (typeof logCallback !== "function") throw new Error("Log Callback is not a function"); + ServerExec.stdout.on("data", data => logCallback(data)); + ServerExec.stderr.on("data", data => logCallback(data)); + }; + const exit = function (exitCallback = process.exit){if ( + typeof exitCallback === "function") ServerExec.on("exit", code => exitCallback(code)); + }; + const on = function(action = String, callback = Function) { + if (!(action === "all" || action === "connect" || action === "disconnect")) throw new Error("Use some valid action: all, connect, disconnect"); + + // Functions + const data = data => Player_Json(data, function (array_status){ + array_status.filter(On => {if ("all" === action || On.Action === action) return true; else return false;}).forEach(_player => callback(_player)) + }); + ServerExec.stdout.on("data", data); + ServerExec.stderr.on("data", data); + }; + const stop = function (){ + ServerExec.stdin.write(BdsInfo.Servers[GetPlatform()].stop+"\n"); + return BdsInfo.Servers[GetPlatform()].stop; + }; + const op = function (player = "Steve") { + let command = BdsInfo.Servers[GetPlatform()].op.replace("{{Player}}", player); + ServerExec.stdin.write(command+"\n"); + return command; + }; + const deop = function (player = "Steve") { + let command = BdsInfo.Servers[GetPlatform()].deop.replace("{{Player}}", player); + ServerExec.stdin.write(command+"\n"); + return command; + }; + const ban = function (player = "Steve") { + let command = BdsInfo.Servers[GetPlatform()].ban.replace("{{Player}}", player); + ServerExec.stdin.write(command+"\n"); + return command; + }; + const kick = function (player = "Steve", text = "you got kicked") { + let command = BdsInfo.Servers[GetPlatform()].kick.replace("{{Player}}", player).replace("{{Text}}", text); + ServerExec.stdin.write(command+"\n"); + return command; + }; + const tp = function (player = "Steve", cord = {x: 0, y: 128, z: 0}) { + let command = BdsInfo.Servers[GetPlatform()].tp.replace("{{Player}}", player); + if (cord.x) command = command.replace("{{X}}", cord.x); else command = command.replace("{{X}}", 0); + if (cord.y) command = command.replace("{{Y}}", cord.y); else command = command.replace("{{Y}}", 128); + if (cord.y) command = command.replace("{{Z}}", cord.y); else command = command.replace("{{Z}}", 0); + ServerExec.stdin.write(command+"\n"); + return command; + }; const say = (text = "") => ServerExec.stdin.write(BdsInfo.Servers.bedrock.say.replace("{{Text}}", text)); - const returnFuntion = { uuid: randomUUID(), - stop: function (){ - ServerExec.stdin.write(BdsInfo.Servers[GetPlatform()].stop+"\n"); - return BdsInfo.Servers[GetPlatform()].stop; - }, - command: async function (command = "list", callback = data => console.log(data)){ - return new Promise((resolve) => { - ServerExec.stdin.write(`${command}\n`); - if (typeof callback === "function") { - const TempLog = [] - const ControlTempHost = data => {TempLog.push(data); return data;} - ServerExec.stdout.on("data", data => ControlTempHost(data)); - ServerExec.stderr.on("data", data => ControlTempHost(data)); - setTimeout(() => { - callback(TempLog.join("\n")); - resolve(TempLog.join("\n")); - }, 2500); - } - }); - }, - log: function (logCallback = function(data = ""){data.split("\n").filter(d=>{return (d !== "")}).forEach(l=>console.log(l))}){ - if (typeof logCallback !== "function") { - console.warn("The log callback is not a function using console.log"); - logCallback = function(data = ""){data.split("\n").filter(d=>{return (d !== "")}).forEach(l=>console.log(l))} - } - ServerExec.stdout.on("data", data => logCallback(data)); - ServerExec.stderr.on("data", data => logCallback(data)); - }, - exit: function (exitCallback = process.exit){if ( - typeof exitCallback === "function") ServerExec.on("exit", code => exitCallback(code)); - }, - on: function(action = String(), callback = Function) { - if (!(action === "all" || action === "connect" || action === "disconnect")) throw new Error("Use some valid action: all, connect, disconnect"); - - // Functions - const data = data => Player_Json(data, function (array_status){ - for (let _player of array_status) { - if (_player.Action === action) callback(_player); - if (action === "all") callback(_player); - } - }); - ServerExec.stdout.on("data", data); - ServerExec.stderr.on("data", data); - }, - op: function (player = "Steve") { - let command = BdsInfo.Servers[GetPlatform()].op.replace("{{Player}}", player); - ServerExec.stdin.write(command+"\n"); - return command; - }, - deop: function (player = "Steve") { - let command = BdsInfo.Servers[GetPlatform()].deop.replace("{{Player}}", player); - ServerExec.stdin.write(command+"\n"); - return command; - }, - ban: function (player = "Steve") { - let command = BdsInfo.Servers[GetPlatform()].ban.replace("{{Player}}", player); - ServerExec.stdin.write(command+"\n"); - return command; - }, - kick: function (player = "Steve", text = "you got kicked") { - let command = BdsInfo.Servers[GetPlatform()].kick.replace("{{Player}}", player).replace("{{Text}}", text); - ServerExec.stdin.write(command+"\n"); - return command; - }, - tp: function (player = "Steve", cord = {x: 0, y: 128, z: 0}) { - let command = BdsInfo.Servers[GetPlatform()].tp.replace("{{Player}}", player); - if (cord.x) command = command.replace("{{X}}", cord.x); else command = command.replace("{{X}}", 0); - if (cord.y) command = command.replace("{{Y}}", cord.y); else command = command.replace("{{Y}}", 128); - if (cord.y) command = command.replace("{{Z}}", cord.y); else command = command.replace("{{Z}}", 0); - ServerExec.stdin.write(command+"\n"); - return command; - }, - say, + command, log, exit, on, stop, op, deop, ban, kick, tp, say } - ServerExec.on("exit", ()=>{delete global.BdsExecs[returnFuntion.uuid]}); + ServerExec.on("exit", () => delete global.BdsExecs[returnFuntion.uuid]); global.BdsExecs[returnFuntion.uuid] = returnFuntion; return returnFuntion; } @@ -348,6 +336,7 @@ module.exports = { start, BdsCommand, stop, + GetSessions, CronBackups: CurrentBackups, Player_Search, } diff --git a/src/BdsServersDownload.js b/src/BdsServersDownload.js index a0f25f7..b569b57 100644 --- a/src/BdsServersDownload.js +++ b/src/BdsServersDownload.js @@ -1,16 +1,158 @@ -var AdmZip = require("adm-zip"); const { writeFileSync, existsSync, readFileSync, readdirSync, rmSync } = require("fs"); const { join, resolve, basename } = require("path"); -const bds = require("../index") +var AdmZip = require("adm-zip"); const { valid_platform } = require("../lib/BdsSystemInfo"); const { GetServerPaths, GetServerVersion, UpdateServerVersion, GetPlatform } = require("../lib/BdsSettings"); -const { GitClone } = require("../lib/git_simples"); -const { execSync } = require("child_process"); const Extra = require("../BdsManegerInfo.json"); +const bds = require("../index"); +const { execSync } = require("child_process"); + +module.exports = async function (version, force_install, callback) { + return new Promise(async (promise_resolve, promise_reject) => { + try { + // Server Paths + const bds_dir_bedrock = GetServerPaths("bedrock"), + bds_dir_java = GetServerPaths("java"), + bds_dir_pocketmine = GetServerPaths("pocketmine"), + bds_dir_spigot = GetServerPaths("spigot"), + bds_dir_dragonfly = GetServerPaths("dragonfly"); + + // JSON Configs and others + const Servers = (await (await fetch(Extra.download.servers)).json()); + const ServerVersion = GetServerVersion(); + const CurrentPlatform = GetPlatform(); + if (force_install === true) { + ServerVersion.java = "latest"; + ServerVersion.bedrock = "latest" + ServerVersion.pocketmine = "latest" + } + if (!(version) || version === true || version === "true" || version === "latest") version = Servers.latest[CurrentPlatform] + var url; + + console.log(`Installing version ${version}`); + // Bedrock Installer Script + if (CurrentPlatform === "bedrock") { + if (valid_platform.bedrock === true){ + if (version === "latest") version = Servers.latest.bedrock + if (!(force_install === true) && ServerVersion.bedrock === version) { + console.warn("Jumping, installed version") + if (typeof callback === "function") await callback(undefined, true); + promise_resolve(true); + } else { + if (Servers.bedrock[version].data) console.log(`Server data publish: ${Servers.bedrock[version].data}`) + url = Servers.bedrock[version][bds.arch][process.platform] + var server_configs, permissions, whitelist; + if (existsSync(join(bds_dir_bedrock, "server.properties"))) server_configs = readFileSync(join(bds_dir_bedrock, "server.properties"), "utf8"); + if (existsSync(join(bds_dir_bedrock, "permissions.json"))) permissions = readFileSync(join(bds_dir_bedrock, "permissions.json"), "utf8"); + if (existsSync(join(bds_dir_bedrock, "whitelist.json"))) whitelist = readFileSync(join(bds_dir_bedrock, "whitelist.json"), "utf8"); + + // Download and Add to Adm_Zip + const zip = new AdmZip(Buffer.from((await (await fetch(url)).arrayBuffer()))) + console.log("Download Sucess") + + zip.extractAllTo(bds_dir_bedrock, true) + console.log("Extract Sucess") + if (server_configs) writeFileSync(join(bds_dir_bedrock, "server.properties"), server_configs); + if (permissions) writeFileSync(join(bds_dir_bedrock, "permissions.json"), permissions) + if (whitelist) writeFileSync(join(bds_dir_bedrock, "whitelist.json"), whitelist) + UpdateServerVersion(version); + if (typeof callback === "function") await callback(undefined, true); + promise_resolve(true); + } + } else throw Error("Bedrock Not suported") + } + + // Java + else if (CurrentPlatform === "java") { + if (valid_platform.java === true){ + if (version === "latest") version = Servers.latest.java + if (!(force_install === true) && version === ServerVersion.java) { + console.warn("Jumping, installed version") + if (typeof callback === "function") await callback(undefined, true); + promise_resolve(true) + } else { + url = Servers.java[version].url + console.log(`Server data publish: ${Servers.java[version].data}`) + + writeFileSync(join(bds_dir_java, "MinecraftServerJava.jar"), Buffer.from((await (await fetch(url)).arrayBuffer())), "binary") + console.log("Success when downloading and saving Minecraft Server java"); + UpdateServerVersion(version); + if (typeof callback === "function") await callback(undefined, true); + promise_resolve(true); + } + } else throw Error("Java is not supported or required software is not installed") + } + + // Pocketmine-MP + else if (CurrentPlatform === "pocketmine") { + if (valid_platform.pocketmine === true) { + if (version === "latest") version = Servers.latest.pocketmine + if (!(force_install === true) && version === ServerVersion.pocketmine) { + console.warn("Jumping, installed version") + if (typeof callback === "function") await callback(undefined, true); + promise_resolve(true) + } else { + const PocketMineJson = Servers.pocketmine[version] + console.log(`Server data publish: ${PocketMineJson.data}`); + + writeFileSync(join(bds_dir_pocketmine, "PocketMine-MP.phar"), Buffer.from((await (await fetch(PocketMineJson.url)).arrayBuffer())), "binary") + console.log("Success downloading and saving PocketMine-MP php"); + + await php_download(); + + // Update server Version + UpdateServerVersion(version) + // Callback + if (typeof callback === "function") await callback(undefined, true); + promise_resolve(true); + } + } else throw Error("Pocketmine not suported") + } + + // Spigot + else if (CurrentPlatform === "spigot") { + if (valid_platform.java) { + if (version === "latest") version = Servers.latest.spigot; + if (!(force_install === true) && version === ServerVersion.spigot) { + console.warn("Jumping, installed version") + if (typeof callback === "function") await callback(undefined, true); + promise_resolve(true) + } else { + const SpigotURL = Servers.spigot[version].url; + if (Servers.spigot[version].data) console.log(`Server data publish: ${Servers.spigot[version].data}`); + writeFileSync(join(bds_dir_spigot, "spigot.jar"), Buffer.from((await (await fetch(SpigotURL)).arrayBuffer())), "binary"); + console.log("Success when downloading and saving Spigot"); + UpdateServerVersion(version); + if (typeof callback === "function") await callback(undefined, true); + promise_resolve(true); + } + } else throw Error("Java is not supported or required software is not installed") + } + + // dragonfly + else if (CurrentPlatform === "dragonfly") { + if (valid_platform.dragonfly) { + console.info("Dragonfly does not support versions"); + execSync("git clone https://github.com/df-mc/dragonfly ./", { + cwd: bds_dir_dragonfly + }); + if (typeof callback === "function") await callback(undefined, true); + promise_resolve(true); + } else throw Error("Dragonfly not suported") + } + + // Unidentified platform + else throw Error("Bds maneger Config file error") + } catch (err) { + if (typeof callback === "function") await callback(err, false); + return promise_reject(err); + } + }); +} async function php_download() { - const bds_dir_pocketmine = GetServerPaths("pocketmine"), - PHPBin = (await (await fetch(Extra.download.php)).json()); + const bds_dir_pocketmine = GetServerPaths("pocketmine"); + const PHPBin = (await (await fetch(Extra.download.php)).json()); const phpFolder = resolve(bds_dir_pocketmine, "bin"); const phpExtensiosnsDir = resolve(bds_dir_pocketmine, "bin/php7/lib/php/extensions"); @@ -18,7 +160,6 @@ async function php_download() { let urlPHPBin = PHPBin[process.platform] if (!(urlPHPBin)) throw new Error("unsupported system") urlPHPBin = urlPHPBin[bds.arch] - // Remove Old php Binary if it exists if (existsSync(phpFolder)) { @@ -34,7 +175,7 @@ async function php_download() { zipExtractBin.extractAllTo(bds_dir_pocketmine, false) console.log("Successfully extracting the binaries") - let phpConfigInit = readFileSync(join(phpFolder, "php7", "bin", "php.ini"), "utf-8"); + let phpConfigInit = readFileSync(join(phpFolder, "php7", "bin", "php.ini"), "utf8"); if (!(existsSync(phpExtensiosnsDir))) return true; const phpExtensiosns = readdirSync(phpExtensiosnsDir).map(FileFolder => { @@ -48,124 +189,4 @@ async function php_download() { writeFileSync(join(phpFolder, "php7", "bin", "php.ini"), phpConfigInit); } return true; -} - -module.exports = async function (version, force_install, callback) { - try { - const bds_dir_bedrock = GetServerPaths("bedrock"), - bds_dir_java = GetServerPaths("java"), - bds_dir_pocketmine = GetServerPaths("pocketmine"), - bds_dir_jsprismarine = GetServerPaths("jsprismarine"); - const Servers = (await (await fetch(Extra.download.servers)).json()); - const ServerVersion = GetServerVersion() - const CurrentPlatform = GetPlatform() - if (force_install === true) { - ServerVersion.java = "latest"; - ServerVersion.bedrock = "latest" - ServerVersion.pocketmine = "latest" - } - if (!(version) || version === true || version === "true" || version === "latest") version = Servers.latest[CurrentPlatform] - var url; - - console.log(`Installing version ${version}`); - // Bedrock Installer Script - if (CurrentPlatform === "bedrock") { - if (valid_platform.bedrock === true){ - if (version === "latest") version = Servers.latest.bedrock - if (ServerVersion.bedrock === version) { - console.warn("Jumping, installed version") - if (typeof callback === "function") await callback(undefined, true); - return true - } else { - if (Servers.bedrock[version].data) console.log(`Server data publish: ${Servers.bedrock[version].data}`) - url = Servers.bedrock[version][bds.arch][process.platform] - var server_configs, permissions, whitelist; - if (existsSync(join(bds_dir_bedrock, "server.properties"))) server_configs = readFileSync(join(bds_dir_bedrock, "server.properties"), "utf8"); - if (existsSync(join(bds_dir_bedrock, "permissions.json"))) permissions = readFileSync(join(bds_dir_bedrock, "permissions.json"), "utf8"); - if (existsSync(join(bds_dir_bedrock, "whitelist.json"))) whitelist = readFileSync(join(bds_dir_bedrock, "whitelist.json"), "utf8"); - - // Download and Add to Adm_Zip - const zip = new AdmZip(Buffer.from((await (await fetch(url)).arrayBuffer()))) - console.log("Download Sucess") - - zip.extractAllTo(bds_dir_bedrock, true) - console.log("Extract Sucess") - if (server_configs) writeFileSync(join(bds_dir_bedrock, "server.properties"), server_configs); - if (permissions) writeFileSync(join(bds_dir_bedrock, "permissions.json"), permissions) - if (whitelist) writeFileSync(join(bds_dir_bedrock, "whitelist.json"), whitelist) - UpdateServerVersion(version) - if (typeof callback === "function") await callback(undefined, true); - return true - } - } else throw Error("Bedrock Not suported") - } - // java Installer Script - else if (CurrentPlatform === "java") { - if (valid_platform.java === true){ - if (version === "latest") version = Servers.latest.java - if (version === ServerVersion.java) { - console.warn("Jumping, installed version") - if (typeof callback === "function") await callback(undefined, true); - return true - } else { - url = Servers.java[version].url - console.log(`Server data publish: ${Servers.java[version].data}`) - - writeFileSync(join(bds_dir_java, "MinecraftServerJava.jar"), Buffer.from((await (await fetch(url)).arrayBuffer())), "binary") - console.log("Success when downloading and saving Minecraft Server java"); - UpdateServerVersion(version); - if (typeof callback === "function") await callback(undefined, true); - return true - } - } else throw Error("Java is not supported or required software is not installed") - } - // Pocketmine-MP Installer Script - else if (CurrentPlatform === "pocketmine") { - if (valid_platform.pocketmine === true) { - if (version === "latest") version = Servers.latest.pocketmine - if (version === ServerVersion.pocketmine) { - console.warn("Jumping, installed version") - if (typeof callback === "function") await callback(undefined, true); - return true - } else { - const PocketMineJson = Servers.pocketmine[version] - console.log(`Server data publish: ${PocketMineJson.data}`); - - writeFileSync(join(bds_dir_pocketmine, "PocketMine-MP.phar"), Buffer.from((await (await fetch(PocketMineJson.url)).arrayBuffer())), "binary") - console.log("Success downloading and saving PocketMine-MP php"); - - await php_download(); - - // Update server Version - UpdateServerVersion(version) - // Callback - if (typeof callback === "function") await callback(undefined, true); - return true - } - } else throw Error("Pocketmine not suported") - } - - // JSPrismarine - else if (CurrentPlatform === "jsprismarine") { - if (valid_platform.jsprismarine === true) { - console.log("Downloading the JSPrismarine repository."); - const commit_sha = GitClone("https://github.com/JSPrismarine/JSPrismarine.git", bds_dir_jsprismarine, 1); - for (let command of ["npm install", "npx -y lerna bootstrap", "npm run build"]) console.log(execSync(command, {cwd: bds_dir_jsprismarine}).toString("ascii")); - console.log(commit_sha); - UpdateServerVersion(commit_sha, "jsprismarine") - if (typeof callback === "function") await callback(undefined, true); - return true - } else throw Error("jsprismarine not suported") - } - - // dragonfly - else if (CurrentPlatform === "dragonfly") { - throw "Bds maneger Config file error"; - } - // Unidentified platform - else throw Error("Bds maneger Config file error") - } catch (err) { - if (typeof callback === "function") await callback(err, false); - return err; - } -} +} \ No newline at end of file diff --git a/src/CheckKill.js b/src/CheckKill.js index b7a577b..50315db 100644 --- a/src/CheckKill.js +++ b/src/CheckKill.js @@ -56,7 +56,6 @@ function Detect(){ if (/MinecraftServerJava.jar/.test(check.command)) return true; if (/bedrock_server/.test(check.command)) return true; if (/PocketMine-MP.phar/.test(check.command)) return true; - if (/packages\/server\/dist\/Server.js/.test(check.command)) return true; } return false } @@ -77,10 +76,6 @@ function Kill(){ console.log("Killing Pocketmine-MP"); killWithPid(check.pid); } - if (/packages\/server\/dist\/Server.js/.test(check.command)) { - console.log("Killing JSPrismarine"); - killWithPid(check.pid) - } } return true } diff --git a/src/rest/routes/bds.js b/src/rest/routes/bds.js index ad4ff91..fdb6ced 100644 --- a/src/rest/routes/bds.js +++ b/src/rest/routes/bds.js @@ -73,7 +73,6 @@ app.get("/info", ({ res }) => { const config = bds.get_config(); var info = { server: { - platform: GetPlatform(), world_name: config.world, running: bds.detect(), port: config.portv4, @@ -85,12 +84,13 @@ app.get("/info", ({ res }) => { arch: bds.arch, system: process.platform, Kernel: GetKernel(), + QEMU_STATIC: commandExist("qemu-x86_64-static") || commandExist("qemu-x86_64"), IS_CLI: JSON.parse(process.env.IS_BDS_CLI || false), IS_DOCKER: JSON.parse(process.env.BDS_DOCKER_IMAGE || false), IS_NPX: (process.env.npm_lifecycle_event === "npx"), - QEMU_STATIC: commandExist("qemu-x86_64-static") }, bds_maneger_core: { + platform: GetPlatform(), version: bds.package_json.version, server_versions: GetServerVersion(), } diff --git a/src/rest/routes/players.js b/src/rest/routes/players.js index 45ae281..5323c53 100644 --- a/src/rest/routes/players.js +++ b/src/rest/routes/players.js @@ -5,6 +5,7 @@ const bds = require("../../../index"); const { token_verify, CheckPlayer } = require("../../UsersAndtokenChecks"); const { readFileSync } = require("fs"); const docs = require("../../../BdsManegerInfo.json").docs; +const { GetSessions } = require("../../BdsManegerServer"); // Players info and maneger app.get("/", (req, res) => { @@ -35,13 +36,17 @@ app.get("/actions/:TYPE/:TOKEN/:PLAYER*", (req, res) => { const { text } = req.query; // Pre Check if (!(token_verify(TOKEN) || CheckPlayer(PLAYER))) return res.status(401).send("Check your parameters"); - + const bds = GetSessions() // Post Check - if (TYPE === "ban") res.json({ok: bds.command(`ban ${PLAYER}`)}); - else if (TYPE === "kick") res.json({ok: bds.command(`kick ${PLAYER} ${text}`)}); - else if (TYPE === "op") res.json({ok: bds.command(`op ${PLAYER}`)}); - else if (TYPE === "deop") res.json({ok: bds.command(`deop ${PLAYER}`)}); - else res.sendStatus(422) + if (TYPE === "ban") res.json({ + ok: bds.ban(PLAYER) + }); else if (TYPE === "kick") res.json({ + ok: bds.kick(PLAYER, text) + }); else if (TYPE === "op") res.json({ + ok: bds.op(PLAYER) + }); else if (TYPE === "deop") res.json({ + ok: bds.deop(PLAYER) + }); else res.sendStatus(422); }); // Actions Redirect -- 2.50.0 From b19c1c2ba60f2034de5ab2405a96db92cecb4a46 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Mon, 16 Aug 2021 08:11:59 -0300 Subject: [PATCH 13/29] Update Dockerfile (#159) --- Dockerfile | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9b34fed..d50cee7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,26 +12,20 @@ RUN bash /tmp/Configure.sh # Setup bdsmaneger/core FROM bdsbase AS bdscore -RUN mkdir -vp /home/thebds/bds_core && chmod -Rv 7777 /home; chown thebds:thebds -Rv /home - - # Create Volume to Storage Server And Config -VOLUME [ "/home/thebds/bds_core" ] +VOLUME [ "/root/bds_core" ] # Copy Bds Maneger Core -WORKDIR /home/backend_core_scripts/ +WORKDIR /opt/backend_core_scripts/ # Install Core dependencies -COPY --chown=thebds:thebds package*.json ./ +COPY package*.json ./ RUN npm install # Copy BdsManger Core -COPY --chown=thebds:thebds ./ ./ +COPY ./ ./ RUN chmod a+x -v bin/* -# Set Non Root User -USER thebds - # Set default ENVs to Bds Core ENV PLAYERS="5" \ WORLD_NAME="The Ultimate Server" \ -- 2.50.0 From 868ef2613628fc85b4039fe6d2fb5bf7308725bd Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Mon, 16 Aug 2021 22:23:08 -0300 Subject: [PATCH 14/29] Update binaris, Update README, Init remove fetchSync --- .gitignore | 1 + .npmignore | 15 +++++- BdsManegerInfo.json | 31 +++++++++++- DockerConfig.yaml | 5 +- Dockerfile | 22 ++++----- README.md | 70 +++++++++++++++++--------- bin/Docker.js | 100 ++++++++++++++++++++++---------------- bin/bds_maneger.js | 78 ++++++++++++++--------------- bin/telegram_bot.js | 7 +-- lib/BdsSettings.js | 21 +++----- lib/BdsSystemInfo.js | 6 ++- lib/ServerURL.js | 5 -- package-lock.json | 4 +- package.json | 4 +- src/BdsManegerServer.js | 20 +++++--- src/BdsServersDownload.js | 9 +--- 16 files changed, 238 insertions(+), 160 deletions(-) delete mode 100644 lib/ServerURL.js diff --git a/.gitignore b/.gitignore index de9db14..99a5e25 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ node_modules/ Bds_Maneger .dccache docs/ +the-bds-maneger-core-*.tgz # Bds Maneger Core Binaries bds_maneger diff --git a/.npmignore b/.npmignore index 99693aa..0a1aa9b 100644 --- a/.npmignore +++ b/.npmignore @@ -1,6 +1,14 @@ # Log *.log +# Develop files +.devcontainer/ +.vscode/ +.Build/ + +# Linters +.eslint* + # test files *.test *test*.js* @@ -12,5 +20,8 @@ git* .git* # Docker -.dockerignore -Docker* \ No newline at end of file +.docker* +Docker* + +# Npm +the-bds-maneger-core*.tgz \ No newline at end of file diff --git a/BdsManegerInfo.json b/BdsManegerInfo.json index 32e3166..7396513 100644 --- a/BdsManegerInfo.json +++ b/BdsManegerInfo.json @@ -8,10 +8,39 @@ "temp_host": { "url": "http://hosts.bdsmaneger.com:3020" }, - "download": { + "Fetchs": { "php": "https://raw.githubusercontent.com/The-Bds-Maneger/Php_Static_Binary/main/binarys.json", "servers": "https://raw.githubusercontent.com/The-Bds-Maneger/external_files/main/Server.json" }, + "IgnoreLog": { + "bedrock": [ + { + "value": "Running AutoCompaction", + "regex": true + } + ], + "java": [], + "pocketmine": [], + "spigot": [] + }, + "StartedServer": { + "bedrock": { + "value": "Server started", + "regex": true + }, + "java": { + "value": null, + "regex": false + }, + "pocketmine": { + "value": null, + "regex": false + }, + "spigot": { + "value": null, + "regex": false + } + }, "Servers": { "bedrock": { "stop": "stop", diff --git a/DockerConfig.yaml b/DockerConfig.yaml index d0f98f0..bc72ef5 100644 --- a/DockerConfig.yaml +++ b/DockerConfig.yaml @@ -4,7 +4,7 @@ tag: bdsmaneger/core:dev target: bdscore buildx: enable: false - platform: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + platform: linux/amd64,linux/arm/v7,linux/arm64 # Docker Run envs env: @@ -47,5 +47,6 @@ ports: # More options options: build: [] - run: [] + run: + - "-v $(pwd)/Test:/root/bds_core" runArgv: [] diff --git a/Dockerfile b/Dockerfile index d50cee7..3765834 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,17 +15,6 @@ FROM bdsbase AS bdscore # Create Volume to Storage Server And Config VOLUME [ "/root/bds_core" ] -# Copy Bds Maneger Core -WORKDIR /opt/backend_core_scripts/ - -# Install Core dependencies -COPY package*.json ./ -RUN npm install - -# Copy BdsManger Core -COPY ./ ./ -RUN chmod a+x -v bin/* - # Set default ENVs to Bds Core ENV PLAYERS="5" \ WORLD_NAME="The Ultimate Server" \ @@ -40,5 +29,16 @@ ENV PLAYERS="5" \ # Bds Maneger Core required ports EXPOSE 19132/udp 19133/udp 1932/tcp +# Copy Bds Maneger Core +WORKDIR /opt/backend_core_scripts/ + +# Install Core dependencies +COPY package*.json ./ +RUN npm install + +# Copy BdsManger Core +COPY ./ ./ +RUN chmod a+x -v bin/* + # Set Entrypint ENTRYPOINT [ "node", "./bin/Docker.js" ] diff --git a/README.md b/README.md index 782c746..e88bc89 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,23 @@ # Bds Maneger Core -Create manage a server for Minecraft Bedrock, java and derivatives with an integration in NodeJs in which we deliver a versatile REST API for integration with large projects up to independent projects. +Bds Maneger Core is a javascript core in Nodejs that manages several types of server seftware for Minecraft Bedrock and Java. Bds Maneger Core has integrated with a REST API with full integration with Bds Maneger Core in addition to CLI and One bot versions for the telegram. Any contribution is welcome, but before a look at [CONTRIBUTING.md](CONTRIBUTING.md), [Bds Manager Core code of conduct](CODE_OF_CONDUCT.md) -## More important information for users before 1.10.0+ +## Requirements for Bds Maneger Core -In Version 1.11.0 there was a big change in the way to get the new settings and that left a good part of the program broken, so for those who are going to upgrade to the latest versions of Bds maneger Core will have to change the settings manually. +### All + +* [Nodejs 14+](https://nodejs.org/en/download/) +* [OpenJDK 16+](https://www.oracle.com/java/technologies/javase-jdk16-downloads.html) + +### Windows 10+ + +* [Microsoft Visual Studio C++ (The Bds Maneger Documentation)]() ## Documentation -We have a separate repository for all Bds Maneger Project documentation, link here from the main page, Repository link +We have a separate repository for all Bds Maneger Project documentation, [link here from the main page](), [Repository link](https://github.com/The-Bds-Maneger/Bds-Manager-Project-Documentation) ## Badges @@ -19,50 +26,65 @@ We have a separate repository for all Bds Maneger Project documentation, {console.log(Tokens+":", "Bds API Token:", token.token); Tokens++}); + } else { + console.log("No Tokens Found"); + } +} function StartServer(){ console.log("The entire log can be accessed via the api and/or the docker log"); @@ -13,32 +25,35 @@ function StartServer(){ ServerStarted.log(a => process.stdout.write(a)); ServerStarted.exit(process.exit); BdsCore.api(); - new CronJob("0 */1 * * *", async () => { - try { - const CurrentLocalVersion = BdsCore.getBdsConfig().server.versions[GetPlatform()], - CurrentRemoteVersion = Object.getOwnPropertyNames((await (await fetch(BdsInfo.download.servers)).json())[GetPlatform()])[0]; - if (CurrentLocalVersion !== CurrentRemoteVersion) { - let currenttime = `Hello we are starting the server upgrade from version ${CurrentLocalVersion} to version ${CurrentRemoteVersion}, you have 20 seconds to exit the server` - console.log("Update Server:", currenttime); - ServerStarted.say(currenttime); - let countdown = 20; - while (countdown > 1) { - currenttime = `${countdown} seconds remaining to stop Server!`; + ShowToken(); + if (process.env.UPDATE_SERVER === "true") { + new CronJob("0 */1 * * *", async () => { + try { + const CurrentLocalVersion = BdsCore.getBdsConfig().server.versions[GetPlatform()], + CurrentRemoteVersion = Object.getOwnPropertyNames((await (await fetch(BdsInfo.Fetchs.servers)).json())[GetPlatform()])[0]; + if (CurrentLocalVersion !== CurrentRemoteVersion) { + let currenttime = `Hello we are starting the server upgrade from version ${CurrentLocalVersion} to version ${CurrentRemoteVersion}, you have 20 seconds to exit the server` + console.log("Update Server:", currenttime); + ServerStarted.say(currenttime); + let countdown = 20; + while (countdown > 1) { + currenttime = `${countdown} seconds remaining to stop Server!`; + console.log(currenttime); + ServerStarted.say(currenttime); + countdown--; + await new Promise(resolve => setTimeout(resolve, 1000)); + } + currenttime = "Stopping the server" console.log(currenttime); ServerStarted.say(currenttime); - countdown--; - await new Promise(resolve => setTimeout(resolve, 1000)); + await new Promise(resolve => setTimeout(resolve, 600)); + ServerStarted.stop(); } - currenttime = "Stopping the server" - console.log(currenttime); - ServerStarted.say(currenttime); - await new Promise(resolve => setTimeout(resolve, 600)); - ServerStarted.stop(); + } catch (err) { + console.log(err); } - } catch (err) { - console.log(err); - } - }); + }); + } } // Check Installed Server @@ -53,22 +68,24 @@ if (Object.getOwnPropertyNames(AllVersions).filter(platform => AllVersions[platf StartServer(); }); } else { - // Check for Update - if (AllVersions[GetPlatform()] === Object.getOwnPropertyNames(Servers[GetPlatform()])[0]) { - console.log("The entire log can be accessed via the api and/or the docker log"); - const ServerStarted = BdsCore.start(); - ServerStarted.log(a => process.stdout.write(a)); - ServerStarted.exit(process.exit); - BdsCore.api(); - } else { - BdsCore.download(true, true, (err) => { - if (err) { - console.log(err); - process.exit(1); - } - StartServer(); - }); - } + (async () => { + // Check for Update + if (AllVersions[GetPlatform()] === Object.getOwnPropertyNames((await (await fetch(BdsInfo.Fetchs.servers)).json())[GetPlatform()])[0]) { + console.log("The entire log can be accessed via the api and/or the docker log"); + const ServerStarted = BdsCore.start(); + ServerStarted.log(a => process.stdout.write(a)); + ServerStarted.exit(process.exit); + BdsCore.api(); + } else { + BdsCore.download(true, true, (err) => { + if (err) { + console.log(err); + process.exit(1); + } + StartServer(); + }); + } + })(); } } else { console.log("Server is not installed, starting server implementation"); @@ -94,6 +111,7 @@ if (Object.getOwnPropertyNames(AllVersions).filter(platform => AllVersions[platf port: 19132, portv6: 19133, } + BdsCore.bds_maneger_token_register(["admin"]); BdsCore.set_config(ServerConfig); StartServer(); }); diff --git a/bin/bds_maneger.js b/bin/bds_maneger.js index 9aeb4c6..3e0fee9 100755 --- a/bin/bds_maneger.js +++ b/bin/bds_maneger.js @@ -8,10 +8,11 @@ const argv = require("minimist")(process.argv.slice(2)); if (Object.getOwnPropertyNames(argv).length <= 1) argv.help = true const bds = require("../index"); -const { valid_platform } = require("../lib/BdsSystemInfo"); +const SystemInfo = require("../lib/BdsSystemInfo"); const { bds_dir, GetServerVersion, GetPlatform, UpdatePlatform, GetServerPaths, GetPaths } = require("../lib/BdsSettings"); const commandExits = require("../lib/commandExist"); const download = require("../src/BdsServersDownload"); +const BdsConfigAndInfo = require("../BdsManegerInfo.json"); // Options const @@ -32,8 +33,8 @@ if (kill) bds.kill(); // Set Bds Platform if (server) UpdatePlatform(server); -function StartServer(){ - const { Servers } = require("../lib/ServerURL"); +async function StartServer(){ + const Servers = (await (await fetch(BdsConfigAndInfo.Fetchs.servers)).json()); // Check Server Update if (Versions[GetPlatform()] !== null) { if (Versions[GetPlatform()] !== Servers.latest[GetPlatform()]) { @@ -143,10 +144,10 @@ if (SystemCheck) { "*", "**************************************************************", "* Servers currently available:", - `* - Bedrock: ${valid_platform.bedrock}`, - `* - Java: ${valid_platform.java}`, - `* - Pocketmine-MP: ${valid_platform.pocketmine}`, - `* - JSPrismarine: ${valid_platform.jsprismarine}`, + `* - Bedrock: ${SystemInfo.valid_platform.bedrock}`, + `* - Java: ${SystemInfo.valid_platform.java}`, + `* - Pocketmine-MP: ${SystemInfo.valid_platform.pocketmine}`, + `* - JSPrismarine: ${SystemInfo.valid_platform.jsprismarine}`, "*", "**************************************************************" ]; @@ -156,38 +157,39 @@ if (SystemCheck) { // Download server if (bds_version){ - try { - if (argv.interactive) { - const LoadVersion = require("../lib/ServerURL").Servers[GetPlatform()] - const Version = Object.getOwnPropertyNames(LoadVersion) - - const StartQuestion = (Readline) => { - Readline.question("Select a version to download: ", input => { - if (Version[parseInt(input) - 1]) { - Readline.close(); - download(Version[parseInt(input) - 1], true, function(){ - if (start) return StartServer(); - console.log("Installation was successful, so start the server with the -s option"); - process.exit(0); - }) - } else { - console.log("Invalid Option"); - StartQuestion(Readline); - } - }); + (async () => { + try { + if (argv.interactive) { + const LoadVersion = (await (await fetch(BdsConfigAndInfo.Fetchs.servers)).json())[GetPlatform()] + const Version = Object.getOwnPropertyNames(LoadVersion) + + const StartQuestion = (Readline) => { + Readline.question("Select a version to download: ", input => { + if (Version[parseInt(input) - 1]) { + Readline.close(); + download(Version[parseInt(input) - 1], true, function(){ + if (start) return StartServer(); + console.log("Installation was successful, so start the server with the -s option"); + process.exit(0); + }) + } else { + console.log("Invalid Option"); + StartQuestion(Readline); + } + }); + } + + console.log(`Selected platform: ${GetPlatform()}, Total available versions: ${Version.length}`); + console.log("Option Version"); + + for (let option in Version) console.log(`${parseInt(option) + 1} -------- ${Version[option]}`); + StartQuestion(readline.createInterface({input: process.stdin,output: process.stdout})); } - - console.log(`Selected platform: ${GetPlatform()}, Total available versions: ${Version.length}`); - console.log("Option Version"); - - for (let option in Version) console.log(`${parseInt(option) + 1} -------- ${Version[option]}`); - StartQuestion(readline.createInterface({input: process.stdin,output: process.stdout})); - } - else bds.download(bds_version, true, function(){ - if (start) StartServer(); - }) - } - catch (error) {console.error(error);process.exit(165);} + else bds.download(bds_version, true, function(){ + if (start) StartServer(); + }) + } catch (error) {console.error(error);process.exit(165);} + })(); } // Start server diff --git a/bin/telegram_bot.js b/bin/telegram_bot.js index 37ff279..5073f60 100755 --- a/bin/telegram_bot.js +++ b/bin/telegram_bot.js @@ -1,11 +1,12 @@ +#!/usr/bin/env node const fs = require("fs"); const { Telegraf, Markup } = require("telegraf"); const bds = require("../index"); const { GetPlatform, GetPaths, GetTelegramToken } = require("../lib/BdsSettings"); const { GetKernel, arch, system } = require("../lib/BdsSystemInfo"); const { Detect } = require("../src/CheckKill"); -const { Servers } = require("../lib/ServerURL"); -const { CheckTelegramUser } = require("../src/UsersAndtokenChecks") +const { CheckTelegramUser } = require("../src/UsersAndtokenChecks"); +const BdsInfo = require("../BdsManegerInfo.json"); // Bot Start And Help messages const HelpAndStart = [ @@ -203,7 +204,7 @@ bot.command("download", async ctx => { ctx.reply(`Sucess install ${GetPlatform()} with version ${version}`); } else { await ctx.deleteMessage(); - const KeyboardVersion = Markup.keyboard(Object.getOwnPropertyNames(Servers[GetPlatform()]).map(version => { + const KeyboardVersion = Markup.keyboard(Object.getOwnPropertyNames((await (await fetch(BdsInfo.Fetchs.servers)).json())[GetPlatform()]).map(version => { return { text: `/download ${version}` } diff --git a/lib/BdsSettings.js b/lib/BdsSettings.js index d286ee4..75318a6 100644 --- a/lib/BdsSettings.js +++ b/lib/BdsSettings.js @@ -2,10 +2,7 @@ const { join, resolve, basename } = require("path"); const { existsSync, writeFileSync, mkdirSync, readFileSync } = require("fs"); const { homedir } = require("os"); const { valid_platform } = require("./BdsSystemInfo"); -const yaml = { - parse: require("js-yaml").load, - stringify: require("js-yaml").dump -} +const yaml = require("js-yaml"); // PATHs const home = homedir(); @@ -34,6 +31,7 @@ var Config = { platform: default_platformConfig, BackupCron: [ { + enabled: false, cron: "0 1 * * */3", Azure: false, Oracle: false, @@ -71,7 +69,6 @@ var Config = { ban: [ { username: "Steve", - telegram: true, bedrock: true, java: true, pocketmine: true, @@ -80,7 +77,6 @@ var Config = { }, { username: "Alex", - telegram: true, bedrock: true, java: true, pocketmine: true, @@ -89,7 +85,6 @@ var Config = { }, { username: "steve", - telegram: true, bedrock: true, java: true, pocketmine: true, @@ -98,7 +93,6 @@ var Config = { }, { username: "alex", - telegram: true, bedrock: true, java: true, pocketmine: true, @@ -108,17 +102,18 @@ var Config = { ], telegram: { admins: ["all_users"], + ban: ["Steve_mine_mine"], token: null } } // Config const ConfigPath = join(resolve(homedir(), "bds_core"), "BdsConfig.yaml") -function SaveConfig(){writeFileSync(ConfigPath, yaml.stringify(Config));} +function SaveConfig(){writeFileSync(ConfigPath, yaml.dump(Config));} if (existsSync(ConfigPath)) Config = { ...Config, - ...yaml.parse(readFileSync(ConfigPath, "utf8")) -}; else writeFileSync(ConfigPath, yaml.stringify(Config)) + ...yaml.load(readFileSync(ConfigPath, "utf8")) +}; else writeFileSync(ConfigPath, yaml.dump(Config)) process.on("exit", () => SaveConfig()) // Paths @@ -131,7 +126,6 @@ const ServersPaths = { bedrock: join(Config.paths.servers, "Bedrock"), java: join(Config.paths.servers, "Java"), pocketmine: join(Config.paths.servers, "Pocketmine-MP"), - jsprismarine: join(Config.paths.servers, "JSPrismarine"), dragonfly: join(Config.paths.servers, "Dragonfly_go"), spigot: join(Config.paths.servers, "Spigot") } @@ -181,9 +175,6 @@ function UpdatePlatform(platform = Config.server.platform){ } else if (/spigot/.test(platform)) { Config.server.platform = "spigot"; SaveConfig() - } else if (/jsprismarine/.test(platform)) { - Config.server.platform = "jsprismarine"; - SaveConfig() } else throw new Error("platform no Exists") return platform } diff --git a/lib/BdsSystemInfo.js b/lib/BdsSystemInfo.js index dd571ea..3fd1039 100644 --- a/lib/BdsSystemInfo.js +++ b/lib/BdsSystemInfo.js @@ -2,7 +2,11 @@ const { execSync } = require("child_process"); const { release } = require("os"); const { readdirSync } = require("fs"); const commadExist = require("./commandExist"); -const { PHPBin, Servers } = require("./ServerURL"); +const fetchSync = require("@the-bds-maneger/fetchsync"); + +// Load JSON for Server and PHP Zip files +const PHPBin = fetchSync("https://raw.githubusercontent.com/The-Bds-Maneger/Php_Static_Binary/main/binarys.json").json(), + Servers = fetchSync("https://raw.githubusercontent.com/The-Bds-Maneger/external_files/main/Server.json").json(); // System Architect (x64, aarch64 and others) var arch; diff --git a/lib/ServerURL.js b/lib/ServerURL.js deleted file mode 100644 index 7599107..0000000 --- a/lib/ServerURL.js +++ /dev/null @@ -1,5 +0,0 @@ -const fetchSync = require("@the-bds-maneger/fetchsync"); -module.exports = { - Servers: fetchSync("https://raw.githubusercontent.com/The-Bds-Maneger/external_files/main/Server.json").json(), - PHPBin: fetchSync("https://raw.githubusercontent.com/The-Bds-Maneger/Php_Static_Binary/main/binarys.json").json() -} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index bc0db4f..817e099 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@the-bds-maneger/core", - "version": "1.13.4", + "version": "1.13.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@the-bds-maneger/core", - "version": "1.13.4", + "version": "1.13.5", "license": "AGPL-3.0-or-later", "dependencies": { "@azure/storage-blob": "^12.6.0", diff --git a/package.json b/package.json index 45ab61e..4bd2878 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,8 @@ "Docker": "node .Build/DockerImage.js" }, "bin": { - "bds_maneger": "./bin/bds_maneger.js", - "bds_telegram": "./bin/telegram_bot.js" + "bds_maneger": "bin/bds_maneger.js", + "bds_telegram": "bin/telegram_bot.js" }, "repository": { "type": "git", diff --git a/src/BdsManegerServer.js b/src/BdsManegerServer.js index 4ae0efb..8da91b0 100644 --- a/src/BdsManegerServer.js +++ b/src/BdsManegerServer.js @@ -22,7 +22,9 @@ function start() { command: String, args: [], cwd: String, - env: process.env, + env: { + ...process.env + }, } // Minecraft Bedrock Oficial @@ -85,11 +87,17 @@ function start() { // Post Start if (GetPlatform() === "java") { - const eula_file = path.join(GetServerPaths("java"), "eula.txt"); - console.log(fs.readFileSync(eula_file, "utf8")); - if (fs.readFileSync(eula_file, "utf8").includes("eula=false")) { - fs.writeFileSync(eula_file, fs.readFileSync(eula_file, "utf8").replaceAll("eula=false", "eula=true")); - throw new Error("Restart application/CLI") + const eula_file_path = path.join(GetServerPaths("java"), "eula.txt"); + if (fs.existsSync(eula_file_path)) { + const eula_file = fs.readFileSync(eula_file_path, "utf8"); + console.log(eula_file); + if (eula_file.includes("eula=false")) { + fs.writeFileSync(eula_file_path, eula_file.replace(/eula=false/gi, "eula=true")); + throw new Error("Restart application/CLI") + } + } else { + console.log("EULA file not found"); + throw new Error("EULA file not found") } } diff --git a/src/BdsServersDownload.js b/src/BdsServersDownload.js index b569b57..845f44d 100644 --- a/src/BdsServersDownload.js +++ b/src/BdsServersDownload.js @@ -18,14 +18,9 @@ module.exports = async function (version, force_install, callback) { bds_dir_dragonfly = GetServerPaths("dragonfly"); // JSON Configs and others - const Servers = (await (await fetch(Extra.download.servers)).json()); + const Servers = (await (await fetch(Extra.Fetchs.servers)).json()); const ServerVersion = GetServerVersion(); const CurrentPlatform = GetPlatform(); - if (force_install === true) { - ServerVersion.java = "latest"; - ServerVersion.bedrock = "latest" - ServerVersion.pocketmine = "latest" - } if (!(version) || version === true || version === "true" || version === "latest") version = Servers.latest[CurrentPlatform] var url; @@ -152,7 +147,7 @@ module.exports = async function (version, force_install, callback) { async function php_download() { const bds_dir_pocketmine = GetServerPaths("pocketmine"); - const PHPBin = (await (await fetch(Extra.download.php)).json()); + const PHPBin = (await (await fetch(Extra.Fetchs.php)).json()); const phpFolder = resolve(bds_dir_pocketmine, "bin"); const phpExtensiosnsDir = resolve(bds_dir_pocketmine, "bin/php7/lib/php/extensions"); -- 2.50.0 From d999526c62dff91ea43d10259e8f45e7a52aac87 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Mon, 16 Aug 2021 22:32:04 -0300 Subject: [PATCH 15/29] CI Test --- .Build/test/ci.js | 12 ++++++------ src/BdsBackup.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.Build/test/ci.js b/.Build/test/ci.js index 8cd01ac..2e7d75b 100644 --- a/.Build/test/ci.js +++ b/.Build/test/ci.js @@ -2,12 +2,12 @@ try { const bds = require("../../index"); await bds.download("latest", true); - console.log("Api:", await bds.api()); - console.log("Backup:", await bds.backup()); - console.log("Detect Server:", await bds.detect()); - console.log("Kill Server:", await bds.kill()); - console.log("Get Config:", await bds.get_config()); - console.log("Start:", await bds.start()); + console.log("Api:", bds.api()); + console.log("Backup:", bds.backup()); + console.log("Detect Server:", bds.detect()); + console.log("Kill Server:", bds.kill()); + console.log("Get Config:", bds.get_config()); + console.log("Start:", bds.start()); setTimeout(() => { console.log("Kill Server:", bds.kill()); }, 1 * 30 * 1000); diff --git a/src/BdsBackup.js b/src/BdsBackup.js index 0689d42..171f627 100644 --- a/src/BdsBackup.js +++ b/src/BdsBackup.js @@ -11,7 +11,7 @@ function Backup() { bedrock: GetServerPaths("bedrock"), java: GetServerPaths("java"), pocketmine: GetServerPaths("pocketmine"), - jsprismarine: GetServerPaths("jsprismarine") + spigot: GetServerPaths("spigot"), } const CurrentDate = new Date(); const name = `Bds_Maneger_Core_Backups_${CurrentDate.getDate()}-${CurrentDate.getMonth()}-${CurrentDate.getFullYear()}.zip` -- 2.50.0 From 364b44cb5bae2c1259a0fb6554ff4323af056689 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Mon, 16 Aug 2021 22:40:14 -0300 Subject: [PATCH 16/29] Sirherobrine23 Dev Merge (#160) * Update binaris, Update README, Init remove fetchSync * CI Test --- .Build/test/ci.js | 12 ++--- .gitignore | 1 + .npmignore | 15 +++++- BdsManegerInfo.json | 31 +++++++++++- DockerConfig.yaml | 5 +- Dockerfile | 22 ++++----- README.md | 70 +++++++++++++++++--------- bin/Docker.js | 100 ++++++++++++++++++++++---------------- bin/bds_maneger.js | 78 ++++++++++++++--------------- bin/telegram_bot.js | 7 +-- lib/BdsSettings.js | 21 +++----- lib/BdsSystemInfo.js | 6 ++- lib/ServerURL.js | 5 -- package-lock.json | 4 +- package.json | 4 +- src/BdsBackup.js | 2 +- src/BdsManegerServer.js | 20 +++++--- src/BdsServersDownload.js | 9 +--- 18 files changed, 245 insertions(+), 167 deletions(-) delete mode 100644 lib/ServerURL.js diff --git a/.Build/test/ci.js b/.Build/test/ci.js index 8cd01ac..2e7d75b 100644 --- a/.Build/test/ci.js +++ b/.Build/test/ci.js @@ -2,12 +2,12 @@ try { const bds = require("../../index"); await bds.download("latest", true); - console.log("Api:", await bds.api()); - console.log("Backup:", await bds.backup()); - console.log("Detect Server:", await bds.detect()); - console.log("Kill Server:", await bds.kill()); - console.log("Get Config:", await bds.get_config()); - console.log("Start:", await bds.start()); + console.log("Api:", bds.api()); + console.log("Backup:", bds.backup()); + console.log("Detect Server:", bds.detect()); + console.log("Kill Server:", bds.kill()); + console.log("Get Config:", bds.get_config()); + console.log("Start:", bds.start()); setTimeout(() => { console.log("Kill Server:", bds.kill()); }, 1 * 30 * 1000); diff --git a/.gitignore b/.gitignore index de9db14..99a5e25 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ node_modules/ Bds_Maneger .dccache docs/ +the-bds-maneger-core-*.tgz # Bds Maneger Core Binaries bds_maneger diff --git a/.npmignore b/.npmignore index 99693aa..0a1aa9b 100644 --- a/.npmignore +++ b/.npmignore @@ -1,6 +1,14 @@ # Log *.log +# Develop files +.devcontainer/ +.vscode/ +.Build/ + +# Linters +.eslint* + # test files *.test *test*.js* @@ -12,5 +20,8 @@ git* .git* # Docker -.dockerignore -Docker* \ No newline at end of file +.docker* +Docker* + +# Npm +the-bds-maneger-core*.tgz \ No newline at end of file diff --git a/BdsManegerInfo.json b/BdsManegerInfo.json index 32e3166..7396513 100644 --- a/BdsManegerInfo.json +++ b/BdsManegerInfo.json @@ -8,10 +8,39 @@ "temp_host": { "url": "http://hosts.bdsmaneger.com:3020" }, - "download": { + "Fetchs": { "php": "https://raw.githubusercontent.com/The-Bds-Maneger/Php_Static_Binary/main/binarys.json", "servers": "https://raw.githubusercontent.com/The-Bds-Maneger/external_files/main/Server.json" }, + "IgnoreLog": { + "bedrock": [ + { + "value": "Running AutoCompaction", + "regex": true + } + ], + "java": [], + "pocketmine": [], + "spigot": [] + }, + "StartedServer": { + "bedrock": { + "value": "Server started", + "regex": true + }, + "java": { + "value": null, + "regex": false + }, + "pocketmine": { + "value": null, + "regex": false + }, + "spigot": { + "value": null, + "regex": false + } + }, "Servers": { "bedrock": { "stop": "stop", diff --git a/DockerConfig.yaml b/DockerConfig.yaml index d0f98f0..bc72ef5 100644 --- a/DockerConfig.yaml +++ b/DockerConfig.yaml @@ -4,7 +4,7 @@ tag: bdsmaneger/core:dev target: bdscore buildx: enable: false - platform: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + platform: linux/amd64,linux/arm/v7,linux/arm64 # Docker Run envs env: @@ -47,5 +47,6 @@ ports: # More options options: build: [] - run: [] + run: + - "-v $(pwd)/Test:/root/bds_core" runArgv: [] diff --git a/Dockerfile b/Dockerfile index d50cee7..3765834 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,17 +15,6 @@ FROM bdsbase AS bdscore # Create Volume to Storage Server And Config VOLUME [ "/root/bds_core" ] -# Copy Bds Maneger Core -WORKDIR /opt/backend_core_scripts/ - -# Install Core dependencies -COPY package*.json ./ -RUN npm install - -# Copy BdsManger Core -COPY ./ ./ -RUN chmod a+x -v bin/* - # Set default ENVs to Bds Core ENV PLAYERS="5" \ WORLD_NAME="The Ultimate Server" \ @@ -40,5 +29,16 @@ ENV PLAYERS="5" \ # Bds Maneger Core required ports EXPOSE 19132/udp 19133/udp 1932/tcp +# Copy Bds Maneger Core +WORKDIR /opt/backend_core_scripts/ + +# Install Core dependencies +COPY package*.json ./ +RUN npm install + +# Copy BdsManger Core +COPY ./ ./ +RUN chmod a+x -v bin/* + # Set Entrypint ENTRYPOINT [ "node", "./bin/Docker.js" ] diff --git a/README.md b/README.md index 782c746..e88bc89 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,23 @@ # Bds Maneger Core -Create manage a server for Minecraft Bedrock, java and derivatives with an integration in NodeJs in which we deliver a versatile REST API for integration with large projects up to independent projects. +Bds Maneger Core is a javascript core in Nodejs that manages several types of server seftware for Minecraft Bedrock and Java. Bds Maneger Core has integrated with a REST API with full integration with Bds Maneger Core in addition to CLI and One bot versions for the telegram. Any contribution is welcome, but before a look at [CONTRIBUTING.md](CONTRIBUTING.md), [Bds Manager Core code of conduct](CODE_OF_CONDUCT.md) -## More important information for users before 1.10.0+ +## Requirements for Bds Maneger Core -In Version 1.11.0 there was a big change in the way to get the new settings and that left a good part of the program broken, so for those who are going to upgrade to the latest versions of Bds maneger Core will have to change the settings manually. +### All + +* [Nodejs 14+](https://nodejs.org/en/download/) +* [OpenJDK 16+](https://www.oracle.com/java/technologies/javase-jdk16-downloads.html) + +### Windows 10+ + +* [Microsoft Visual Studio C++ (The Bds Maneger Documentation)]() ## Documentation -We have a separate repository for all Bds Maneger Project documentation, link here from the main page, Repository link +We have a separate repository for all Bds Maneger Project documentation, [link here from the main page](), [Repository link](https://github.com/The-Bds-Maneger/Bds-Manager-Project-Documentation) ## Badges @@ -19,50 +26,65 @@ We have a separate repository for all Bds Maneger Project documentation, {console.log(Tokens+":", "Bds API Token:", token.token); Tokens++}); + } else { + console.log("No Tokens Found"); + } +} function StartServer(){ console.log("The entire log can be accessed via the api and/or the docker log"); @@ -13,32 +25,35 @@ function StartServer(){ ServerStarted.log(a => process.stdout.write(a)); ServerStarted.exit(process.exit); BdsCore.api(); - new CronJob("0 */1 * * *", async () => { - try { - const CurrentLocalVersion = BdsCore.getBdsConfig().server.versions[GetPlatform()], - CurrentRemoteVersion = Object.getOwnPropertyNames((await (await fetch(BdsInfo.download.servers)).json())[GetPlatform()])[0]; - if (CurrentLocalVersion !== CurrentRemoteVersion) { - let currenttime = `Hello we are starting the server upgrade from version ${CurrentLocalVersion} to version ${CurrentRemoteVersion}, you have 20 seconds to exit the server` - console.log("Update Server:", currenttime); - ServerStarted.say(currenttime); - let countdown = 20; - while (countdown > 1) { - currenttime = `${countdown} seconds remaining to stop Server!`; + ShowToken(); + if (process.env.UPDATE_SERVER === "true") { + new CronJob("0 */1 * * *", async () => { + try { + const CurrentLocalVersion = BdsCore.getBdsConfig().server.versions[GetPlatform()], + CurrentRemoteVersion = Object.getOwnPropertyNames((await (await fetch(BdsInfo.Fetchs.servers)).json())[GetPlatform()])[0]; + if (CurrentLocalVersion !== CurrentRemoteVersion) { + let currenttime = `Hello we are starting the server upgrade from version ${CurrentLocalVersion} to version ${CurrentRemoteVersion}, you have 20 seconds to exit the server` + console.log("Update Server:", currenttime); + ServerStarted.say(currenttime); + let countdown = 20; + while (countdown > 1) { + currenttime = `${countdown} seconds remaining to stop Server!`; + console.log(currenttime); + ServerStarted.say(currenttime); + countdown--; + await new Promise(resolve => setTimeout(resolve, 1000)); + } + currenttime = "Stopping the server" console.log(currenttime); ServerStarted.say(currenttime); - countdown--; - await new Promise(resolve => setTimeout(resolve, 1000)); + await new Promise(resolve => setTimeout(resolve, 600)); + ServerStarted.stop(); } - currenttime = "Stopping the server" - console.log(currenttime); - ServerStarted.say(currenttime); - await new Promise(resolve => setTimeout(resolve, 600)); - ServerStarted.stop(); + } catch (err) { + console.log(err); } - } catch (err) { - console.log(err); - } - }); + }); + } } // Check Installed Server @@ -53,22 +68,24 @@ if (Object.getOwnPropertyNames(AllVersions).filter(platform => AllVersions[platf StartServer(); }); } else { - // Check for Update - if (AllVersions[GetPlatform()] === Object.getOwnPropertyNames(Servers[GetPlatform()])[0]) { - console.log("The entire log can be accessed via the api and/or the docker log"); - const ServerStarted = BdsCore.start(); - ServerStarted.log(a => process.stdout.write(a)); - ServerStarted.exit(process.exit); - BdsCore.api(); - } else { - BdsCore.download(true, true, (err) => { - if (err) { - console.log(err); - process.exit(1); - } - StartServer(); - }); - } + (async () => { + // Check for Update + if (AllVersions[GetPlatform()] === Object.getOwnPropertyNames((await (await fetch(BdsInfo.Fetchs.servers)).json())[GetPlatform()])[0]) { + console.log("The entire log can be accessed via the api and/or the docker log"); + const ServerStarted = BdsCore.start(); + ServerStarted.log(a => process.stdout.write(a)); + ServerStarted.exit(process.exit); + BdsCore.api(); + } else { + BdsCore.download(true, true, (err) => { + if (err) { + console.log(err); + process.exit(1); + } + StartServer(); + }); + } + })(); } } else { console.log("Server is not installed, starting server implementation"); @@ -94,6 +111,7 @@ if (Object.getOwnPropertyNames(AllVersions).filter(platform => AllVersions[platf port: 19132, portv6: 19133, } + BdsCore.bds_maneger_token_register(["admin"]); BdsCore.set_config(ServerConfig); StartServer(); }); diff --git a/bin/bds_maneger.js b/bin/bds_maneger.js index 9aeb4c6..3e0fee9 100755 --- a/bin/bds_maneger.js +++ b/bin/bds_maneger.js @@ -8,10 +8,11 @@ const argv = require("minimist")(process.argv.slice(2)); if (Object.getOwnPropertyNames(argv).length <= 1) argv.help = true const bds = require("../index"); -const { valid_platform } = require("../lib/BdsSystemInfo"); +const SystemInfo = require("../lib/BdsSystemInfo"); const { bds_dir, GetServerVersion, GetPlatform, UpdatePlatform, GetServerPaths, GetPaths } = require("../lib/BdsSettings"); const commandExits = require("../lib/commandExist"); const download = require("../src/BdsServersDownload"); +const BdsConfigAndInfo = require("../BdsManegerInfo.json"); // Options const @@ -32,8 +33,8 @@ if (kill) bds.kill(); // Set Bds Platform if (server) UpdatePlatform(server); -function StartServer(){ - const { Servers } = require("../lib/ServerURL"); +async function StartServer(){ + const Servers = (await (await fetch(BdsConfigAndInfo.Fetchs.servers)).json()); // Check Server Update if (Versions[GetPlatform()] !== null) { if (Versions[GetPlatform()] !== Servers.latest[GetPlatform()]) { @@ -143,10 +144,10 @@ if (SystemCheck) { "*", "**************************************************************", "* Servers currently available:", - `* - Bedrock: ${valid_platform.bedrock}`, - `* - Java: ${valid_platform.java}`, - `* - Pocketmine-MP: ${valid_platform.pocketmine}`, - `* - JSPrismarine: ${valid_platform.jsprismarine}`, + `* - Bedrock: ${SystemInfo.valid_platform.bedrock}`, + `* - Java: ${SystemInfo.valid_platform.java}`, + `* - Pocketmine-MP: ${SystemInfo.valid_platform.pocketmine}`, + `* - JSPrismarine: ${SystemInfo.valid_platform.jsprismarine}`, "*", "**************************************************************" ]; @@ -156,38 +157,39 @@ if (SystemCheck) { // Download server if (bds_version){ - try { - if (argv.interactive) { - const LoadVersion = require("../lib/ServerURL").Servers[GetPlatform()] - const Version = Object.getOwnPropertyNames(LoadVersion) - - const StartQuestion = (Readline) => { - Readline.question("Select a version to download: ", input => { - if (Version[parseInt(input) - 1]) { - Readline.close(); - download(Version[parseInt(input) - 1], true, function(){ - if (start) return StartServer(); - console.log("Installation was successful, so start the server with the -s option"); - process.exit(0); - }) - } else { - console.log("Invalid Option"); - StartQuestion(Readline); - } - }); + (async () => { + try { + if (argv.interactive) { + const LoadVersion = (await (await fetch(BdsConfigAndInfo.Fetchs.servers)).json())[GetPlatform()] + const Version = Object.getOwnPropertyNames(LoadVersion) + + const StartQuestion = (Readline) => { + Readline.question("Select a version to download: ", input => { + if (Version[parseInt(input) - 1]) { + Readline.close(); + download(Version[parseInt(input) - 1], true, function(){ + if (start) return StartServer(); + console.log("Installation was successful, so start the server with the -s option"); + process.exit(0); + }) + } else { + console.log("Invalid Option"); + StartQuestion(Readline); + } + }); + } + + console.log(`Selected platform: ${GetPlatform()}, Total available versions: ${Version.length}`); + console.log("Option Version"); + + for (let option in Version) console.log(`${parseInt(option) + 1} -------- ${Version[option]}`); + StartQuestion(readline.createInterface({input: process.stdin,output: process.stdout})); } - - console.log(`Selected platform: ${GetPlatform()}, Total available versions: ${Version.length}`); - console.log("Option Version"); - - for (let option in Version) console.log(`${parseInt(option) + 1} -------- ${Version[option]}`); - StartQuestion(readline.createInterface({input: process.stdin,output: process.stdout})); - } - else bds.download(bds_version, true, function(){ - if (start) StartServer(); - }) - } - catch (error) {console.error(error);process.exit(165);} + else bds.download(bds_version, true, function(){ + if (start) StartServer(); + }) + } catch (error) {console.error(error);process.exit(165);} + })(); } // Start server diff --git a/bin/telegram_bot.js b/bin/telegram_bot.js index 37ff279..5073f60 100755 --- a/bin/telegram_bot.js +++ b/bin/telegram_bot.js @@ -1,11 +1,12 @@ +#!/usr/bin/env node const fs = require("fs"); const { Telegraf, Markup } = require("telegraf"); const bds = require("../index"); const { GetPlatform, GetPaths, GetTelegramToken } = require("../lib/BdsSettings"); const { GetKernel, arch, system } = require("../lib/BdsSystemInfo"); const { Detect } = require("../src/CheckKill"); -const { Servers } = require("../lib/ServerURL"); -const { CheckTelegramUser } = require("../src/UsersAndtokenChecks") +const { CheckTelegramUser } = require("../src/UsersAndtokenChecks"); +const BdsInfo = require("../BdsManegerInfo.json"); // Bot Start And Help messages const HelpAndStart = [ @@ -203,7 +204,7 @@ bot.command("download", async ctx => { ctx.reply(`Sucess install ${GetPlatform()} with version ${version}`); } else { await ctx.deleteMessage(); - const KeyboardVersion = Markup.keyboard(Object.getOwnPropertyNames(Servers[GetPlatform()]).map(version => { + const KeyboardVersion = Markup.keyboard(Object.getOwnPropertyNames((await (await fetch(BdsInfo.Fetchs.servers)).json())[GetPlatform()]).map(version => { return { text: `/download ${version}` } diff --git a/lib/BdsSettings.js b/lib/BdsSettings.js index d286ee4..75318a6 100644 --- a/lib/BdsSettings.js +++ b/lib/BdsSettings.js @@ -2,10 +2,7 @@ const { join, resolve, basename } = require("path"); const { existsSync, writeFileSync, mkdirSync, readFileSync } = require("fs"); const { homedir } = require("os"); const { valid_platform } = require("./BdsSystemInfo"); -const yaml = { - parse: require("js-yaml").load, - stringify: require("js-yaml").dump -} +const yaml = require("js-yaml"); // PATHs const home = homedir(); @@ -34,6 +31,7 @@ var Config = { platform: default_platformConfig, BackupCron: [ { + enabled: false, cron: "0 1 * * */3", Azure: false, Oracle: false, @@ -71,7 +69,6 @@ var Config = { ban: [ { username: "Steve", - telegram: true, bedrock: true, java: true, pocketmine: true, @@ -80,7 +77,6 @@ var Config = { }, { username: "Alex", - telegram: true, bedrock: true, java: true, pocketmine: true, @@ -89,7 +85,6 @@ var Config = { }, { username: "steve", - telegram: true, bedrock: true, java: true, pocketmine: true, @@ -98,7 +93,6 @@ var Config = { }, { username: "alex", - telegram: true, bedrock: true, java: true, pocketmine: true, @@ -108,17 +102,18 @@ var Config = { ], telegram: { admins: ["all_users"], + ban: ["Steve_mine_mine"], token: null } } // Config const ConfigPath = join(resolve(homedir(), "bds_core"), "BdsConfig.yaml") -function SaveConfig(){writeFileSync(ConfigPath, yaml.stringify(Config));} +function SaveConfig(){writeFileSync(ConfigPath, yaml.dump(Config));} if (existsSync(ConfigPath)) Config = { ...Config, - ...yaml.parse(readFileSync(ConfigPath, "utf8")) -}; else writeFileSync(ConfigPath, yaml.stringify(Config)) + ...yaml.load(readFileSync(ConfigPath, "utf8")) +}; else writeFileSync(ConfigPath, yaml.dump(Config)) process.on("exit", () => SaveConfig()) // Paths @@ -131,7 +126,6 @@ const ServersPaths = { bedrock: join(Config.paths.servers, "Bedrock"), java: join(Config.paths.servers, "Java"), pocketmine: join(Config.paths.servers, "Pocketmine-MP"), - jsprismarine: join(Config.paths.servers, "JSPrismarine"), dragonfly: join(Config.paths.servers, "Dragonfly_go"), spigot: join(Config.paths.servers, "Spigot") } @@ -181,9 +175,6 @@ function UpdatePlatform(platform = Config.server.platform){ } else if (/spigot/.test(platform)) { Config.server.platform = "spigot"; SaveConfig() - } else if (/jsprismarine/.test(platform)) { - Config.server.platform = "jsprismarine"; - SaveConfig() } else throw new Error("platform no Exists") return platform } diff --git a/lib/BdsSystemInfo.js b/lib/BdsSystemInfo.js index dd571ea..3fd1039 100644 --- a/lib/BdsSystemInfo.js +++ b/lib/BdsSystemInfo.js @@ -2,7 +2,11 @@ const { execSync } = require("child_process"); const { release } = require("os"); const { readdirSync } = require("fs"); const commadExist = require("./commandExist"); -const { PHPBin, Servers } = require("./ServerURL"); +const fetchSync = require("@the-bds-maneger/fetchsync"); + +// Load JSON for Server and PHP Zip files +const PHPBin = fetchSync("https://raw.githubusercontent.com/The-Bds-Maneger/Php_Static_Binary/main/binarys.json").json(), + Servers = fetchSync("https://raw.githubusercontent.com/The-Bds-Maneger/external_files/main/Server.json").json(); // System Architect (x64, aarch64 and others) var arch; diff --git a/lib/ServerURL.js b/lib/ServerURL.js deleted file mode 100644 index 7599107..0000000 --- a/lib/ServerURL.js +++ /dev/null @@ -1,5 +0,0 @@ -const fetchSync = require("@the-bds-maneger/fetchsync"); -module.exports = { - Servers: fetchSync("https://raw.githubusercontent.com/The-Bds-Maneger/external_files/main/Server.json").json(), - PHPBin: fetchSync("https://raw.githubusercontent.com/The-Bds-Maneger/Php_Static_Binary/main/binarys.json").json() -} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index bc0db4f..817e099 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@the-bds-maneger/core", - "version": "1.13.4", + "version": "1.13.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@the-bds-maneger/core", - "version": "1.13.4", + "version": "1.13.5", "license": "AGPL-3.0-or-later", "dependencies": { "@azure/storage-blob": "^12.6.0", diff --git a/package.json b/package.json index 45ab61e..4bd2878 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,8 @@ "Docker": "node .Build/DockerImage.js" }, "bin": { - "bds_maneger": "./bin/bds_maneger.js", - "bds_telegram": "./bin/telegram_bot.js" + "bds_maneger": "bin/bds_maneger.js", + "bds_telegram": "bin/telegram_bot.js" }, "repository": { "type": "git", diff --git a/src/BdsBackup.js b/src/BdsBackup.js index 0689d42..171f627 100644 --- a/src/BdsBackup.js +++ b/src/BdsBackup.js @@ -11,7 +11,7 @@ function Backup() { bedrock: GetServerPaths("bedrock"), java: GetServerPaths("java"), pocketmine: GetServerPaths("pocketmine"), - jsprismarine: GetServerPaths("jsprismarine") + spigot: GetServerPaths("spigot"), } const CurrentDate = new Date(); const name = `Bds_Maneger_Core_Backups_${CurrentDate.getDate()}-${CurrentDate.getMonth()}-${CurrentDate.getFullYear()}.zip` diff --git a/src/BdsManegerServer.js b/src/BdsManegerServer.js index 4ae0efb..8da91b0 100644 --- a/src/BdsManegerServer.js +++ b/src/BdsManegerServer.js @@ -22,7 +22,9 @@ function start() { command: String, args: [], cwd: String, - env: process.env, + env: { + ...process.env + }, } // Minecraft Bedrock Oficial @@ -85,11 +87,17 @@ function start() { // Post Start if (GetPlatform() === "java") { - const eula_file = path.join(GetServerPaths("java"), "eula.txt"); - console.log(fs.readFileSync(eula_file, "utf8")); - if (fs.readFileSync(eula_file, "utf8").includes("eula=false")) { - fs.writeFileSync(eula_file, fs.readFileSync(eula_file, "utf8").replaceAll("eula=false", "eula=true")); - throw new Error("Restart application/CLI") + const eula_file_path = path.join(GetServerPaths("java"), "eula.txt"); + if (fs.existsSync(eula_file_path)) { + const eula_file = fs.readFileSync(eula_file_path, "utf8"); + console.log(eula_file); + if (eula_file.includes("eula=false")) { + fs.writeFileSync(eula_file_path, eula_file.replace(/eula=false/gi, "eula=true")); + throw new Error("Restart application/CLI") + } + } else { + console.log("EULA file not found"); + throw new Error("EULA file not found") } } diff --git a/src/BdsServersDownload.js b/src/BdsServersDownload.js index b569b57..845f44d 100644 --- a/src/BdsServersDownload.js +++ b/src/BdsServersDownload.js @@ -18,14 +18,9 @@ module.exports = async function (version, force_install, callback) { bds_dir_dragonfly = GetServerPaths("dragonfly"); // JSON Configs and others - const Servers = (await (await fetch(Extra.download.servers)).json()); + const Servers = (await (await fetch(Extra.Fetchs.servers)).json()); const ServerVersion = GetServerVersion(); const CurrentPlatform = GetPlatform(); - if (force_install === true) { - ServerVersion.java = "latest"; - ServerVersion.bedrock = "latest" - ServerVersion.pocketmine = "latest" - } if (!(version) || version === true || version === "true" || version === "latest") version = Servers.latest[CurrentPlatform] var url; @@ -152,7 +147,7 @@ module.exports = async function (version, force_install, callback) { async function php_download() { const bds_dir_pocketmine = GetServerPaths("pocketmine"); - const PHPBin = (await (await fetch(Extra.download.php)).json()); + const PHPBin = (await (await fetch(Extra.Fetchs.php)).json()); const phpFolder = resolve(bds_dir_pocketmine, "bin"); const phpExtensiosnsDir = resolve(bds_dir_pocketmine, "bin/php7/lib/php/extensions"); -- 2.50.0 From dcd507e0b7630d87e5389f29c4448fcf95ea235d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Aug 2021 07:04:43 +0000 Subject: [PATCH 17/29] Bump oci-sdk from 2.1.0 to 2.2.0 Bumps [oci-sdk](https://github.com/oracle/oci-typescript-sdk) from 2.1.0 to 2.2.0. - [Release notes](https://github.com/oracle/oci-typescript-sdk/releases) - [Changelog](https://github.com/oracle/oci-typescript-sdk/blob/master/CHANGELOG.md) - [Commits](https://github.com/oracle/oci-typescript-sdk/compare/v2.1.0...v2.2.0) --- updated-dependencies: - dependency-name: oci-sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 1900 ++++++++++++++++++++++----------------------- 1 file changed, 950 insertions(+), 950 deletions(-) diff --git a/package-lock.json b/package-lock.json index 817e099..eb27053 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4318,171 +4318,171 @@ } }, "node_modules/oci-aianomalydetection": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-aianomalydetection/-/oci-aianomalydetection-2.1.0.tgz", - "integrity": "sha512-bPYw8xSc9i5HeVFAWAIub3R11Yln/hcHTh7nxoJuqLuSlN8h9OyQb8k6ryc7qrqrMVF6qoBOQQKN2df5gcEBUw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-aianomalydetection/-/oci-aianomalydetection-2.2.0.tgz", + "integrity": "sha512-fAjtSIYovuR9rUJsLmZn7UOcvADPdiXCTdLHixnA0Q+40FYKyhHIipCLcT1vDK2f69WMVtwR4wARaUMDHem+Iw==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-ailanguage": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-ailanguage/-/oci-ailanguage-2.1.0.tgz", - "integrity": "sha512-RtIwCp9SozFYvTp4NXVbYzxWY4y/whwM6i8uIe7YN+ia2FWGL+tmtZYfv2V68OYwoLoyY7OKCQqbG6MUBFuH1g==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-ailanguage/-/oci-ailanguage-2.2.0.tgz", + "integrity": "sha512-31xmmS6qIJkbIg2ErMDNAEFkS/4iVx9RXJgfi3iuJb4LlLuT+5S5ear3d8Kb3XWoeTnnnk+biLrSd7Vhs9xeiw==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-analytics": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-analytics/-/oci-analytics-2.1.0.tgz", - "integrity": "sha512-LeW0Zy0noepdZce1ng4n82fLswQes0agT2r9L7AcewF89XbqYBly8OAg1A1G2WFZoBK4WL8ya+gMSKkax1/EEg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-analytics/-/oci-analytics-2.2.0.tgz", + "integrity": "sha512-z6fnWM3mfPBulrZCH2+1pDJ7CVdHvS2YI6wQEwfp4T1cNZGhV0qd7/N5QqoUYRlZUGHh/qGPbDpBmy/S+1uP1Q==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-announcementsservice": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-announcementsservice/-/oci-announcementsservice-2.1.0.tgz", - "integrity": "sha512-mEtlDF2fZtqfnDGYfubRbyUkDnfJsTFu/9dq0aq4kRyfOMxQbmafQXH/SovNQ9LVlkMb63vARL4RKzIGFI7bQw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-announcementsservice/-/oci-announcementsservice-2.2.0.tgz", + "integrity": "sha512-akQD65atfHToz69QwN0xbocAGCB+hYjqw4Vhvbbc67xkCOfPmprCajGTPUXld3lyW/7EnbjOVA9MkVJbEcifZA==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-apigateway": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-apigateway/-/oci-apigateway-2.1.0.tgz", - "integrity": "sha512-qvWa6YjAlUc5cmFGZ1t8rglnCuuSSo92sQ8pXb8o9OIPHV09rzxu6FBqOOO1ni1AFrcRp1kOXXx1YrWfwbqFzg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-apigateway/-/oci-apigateway-2.2.0.tgz", + "integrity": "sha512-uPPF0FfcS5zLhtQzyfAv3E/Jjuay5s5FtvMc4fXJtmKPwXJjMUoOuyEDU6gnVe1Ne7RBAA30BjQZXCHQDwRNPw==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-apmcontrolplane": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-apmcontrolplane/-/oci-apmcontrolplane-2.1.0.tgz", - "integrity": "sha512-3JEhzohdixt6GteHOqfp80luCIVZtUFzNC/yj5OG0w0lN47DqK3zj7bVz9XmgWL6+O4/eeOkEuLmX4zo80xp+Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-apmcontrolplane/-/oci-apmcontrolplane-2.2.0.tgz", + "integrity": "sha512-qhaS23/PddCTGc69xsiUCV0B6dyKN41IB8YHrshzMaG415jtt90RHxcTrQMptPFtjeM1UgB/+XjiJP6Kb1Cg6w==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-apmsynthetics": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-apmsynthetics/-/oci-apmsynthetics-2.1.0.tgz", - "integrity": "sha512-9KLE2mypsMATsR/d8nWoHm2uZ0ZMEdKdeDFwaNZVQDJ5/m03mgZ+wMFipcVaAQaRwYpslvFHHfS74LvajlPrpg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-apmsynthetics/-/oci-apmsynthetics-2.2.0.tgz", + "integrity": "sha512-aeeeH4FiPTlLzoXovE4mues7B68EJQX9pCFYMLRo/Ch3RWuksd5gu1VQd9WsW9XtCHmbev87vxa5lXA9tAvtpg==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-apmtraces": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-apmtraces/-/oci-apmtraces-2.1.0.tgz", - "integrity": "sha512-qgsed7kCEFBFzdyyDoss26wYJZ7kx6xnBxSttsxNjIMOzP4kXalQrhXW1CvgBkvbGnuLVAnig0C3oRunmV/w5A==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-apmtraces/-/oci-apmtraces-2.2.0.tgz", + "integrity": "sha512-vFWXcLylZ/SPpKJz8iKq/VcX4F/bt38OQ6zcezlsZkrYVP+DNBxfZy4UYzZKqmcewP7Tsfl+i780kbju1FwigQ==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-applicationmigration": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-applicationmigration/-/oci-applicationmigration-2.1.0.tgz", - "integrity": "sha512-LUkjESi1OA7LokAsvYeqiWXMyEsyb9oG9X+NWhK35obGPem8QovKVO0XxIvUz78zg91096FP5a5o6MaMlQt3YA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-applicationmigration/-/oci-applicationmigration-2.2.0.tgz", + "integrity": "sha512-IY1YHL3SZTXq8eJd6FPaRfjn1XBaAXFbdJwX9q/7MIDjDStL9TTPqzjHBbE3VL75zfbZ1xQYLe+XDRHlzqQIxQ==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-artifacts": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-artifacts/-/oci-artifacts-2.1.0.tgz", - "integrity": "sha512-NHMym57GXnDov4xNlr0MXCB3xl2eSvL8HuaNSx2AhQJPUIIIj0ipByYHV/7ea0yPMxcm1dwkA4seifN0RCW9lg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-artifacts/-/oci-artifacts-2.2.0.tgz", + "integrity": "sha512-LiC081XAl9REDgBC9/sUOuYx2I5PrPHQa2plErSrUU8lmY2OUN6nd4XqCzqmQvreC5HLrGF3D6pdjLYI2WB7kw==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-audit": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-audit/-/oci-audit-2.1.0.tgz", - "integrity": "sha512-o9vxxVOA6IceoH6vikdxvOjaZiuv1+vRYNr/NzloWn0q8RaO+9RZtcl29Kl8++xV4mJyii9xnFUL6pHgcMRJsw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-audit/-/oci-audit-2.2.0.tgz", + "integrity": "sha512-ATsIwMJtlQryg0pvMKXtqsdxHmqPt6K38fMq+wXzbkkdUoMB4N8xwAAAvSrGBUeydulPByEL1z5y8LltiBuWpA==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-autoscaling": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-autoscaling/-/oci-autoscaling-2.1.0.tgz", - "integrity": "sha512-4Opl+r2/DRB4j63h0dP8D9jtW3duBU3nEI/x3VxT1JueLc9V2St4+STwaiYfH4IZzy6D2bMgUU7v6caa0+grDw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-autoscaling/-/oci-autoscaling-2.2.0.tgz", + "integrity": "sha512-wv/8I/Jf2iwa1il8tjHXD6OAaNds1yWyo4p+D7hPsmKgoTbB1pxwK2AjmoBm3DVNhx6NksjnBpwOs2oxVUXrew==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-bastion": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-bastion/-/oci-bastion-2.1.0.tgz", - "integrity": "sha512-i13T2RLR1aZiEALVm8T/PnskUSzeGteQxM598EHJq4eOglAnhkRXLklbsJx1GFBUwX6sv1MKFejgpMeIsExJ9g==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-bastion/-/oci-bastion-2.2.0.tgz", + "integrity": "sha512-WTUD8ZbVO5Uo3YgkECKDPFp7po9gPt3HuQokn5GnS3BcYxtiJX6j4PeFKqn44a/sP8I39RIqHCU5GaMB0GTPkA==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-bds": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-bds/-/oci-bds-2.1.0.tgz", - "integrity": "sha512-SjQib9pKeMo3H2fFD4izId7zN08VuBo32BdhbPUjGe4nRudWdV0dheClRxlrLBc2qiCJeUls05ZB50RBjNqYNg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-bds/-/oci-bds-2.2.0.tgz", + "integrity": "sha512-QTux1ZxpWeSM+PIB/ocPcly4qjxfB7N9S5vq8a64EX91X1cdqF1umjS9zYSL3GxVmQ7jOwkZ2+PaRbbfNVlG9A==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-blockchain": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-blockchain/-/oci-blockchain-2.1.0.tgz", - "integrity": "sha512-gI0k9M/7gFOlAi/90sIAvji8eq5Tk8m46YsTWmHa4L+T0fwXRrI6WeUpID4sGHDJcFY6a4/lqA7htCjSj+E0VA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-blockchain/-/oci-blockchain-2.2.0.tgz", + "integrity": "sha512-pG5qrqmg6pthR1QBc3HRdSO7MVefIfqQWz21gXbGPJEz8V0nl/dm2dotZZwYX+U8mj6YCA5mr+o0TYYmJPbzcg==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-budget": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-budget/-/oci-budget-2.1.0.tgz", - "integrity": "sha512-HGHUpThBEgVNCTqTiVTF+Jcx3jFEY1a3WmMk7gzFDVuFEPgEClBCR80Il13Rxp626cHdP16i4Z7ABhoZDLVzFQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-budget/-/oci-budget-2.2.0.tgz", + "integrity": "sha512-zlMjtv2WBtdZBxdM7olVnE/PB9UwKqxmLh0wi7XqKkg9cgU+HYL+qI/xNg89xvCMkmob/GGN1QPMVluQ4aROyQ==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-cims": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-cims/-/oci-cims-2.1.0.tgz", - "integrity": "sha512-Uaju+ZiJ/RKMTEzx1rVyW2ROUaqQVkH4RfLqmfS6c0Mt/wau29qRSGFghZ2yb4iBx5oAytvwJHy69W3lqbEMXw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-cims/-/oci-cims-2.2.0.tgz", + "integrity": "sha512-nFWFBmrovOsDBYJ0WQhaM6RWKOf+0R87ekU1VPij/wAbsuzBPd+WpEuIjxY5Fepl6JSFDaDqOPJfFhae4tjaFg==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-cloudguard": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-cloudguard/-/oci-cloudguard-2.1.0.tgz", - "integrity": "sha512-u+KqNxEcbGIKVacRiJGijXllVJcR1ptFqyX9afmsZTdgCzXGcj+RUkwttTTNPd0H1t7ZyP4zjCbjaFTmayBe9Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-cloudguard/-/oci-cloudguard-2.2.0.tgz", + "integrity": "sha512-F7lScBquLDOPa5rhuCWjEsl44mpHvnmAH4ui/LfMjLYL0UIzrXziSC2EU/82OE+WATrWrjahndijPKVpfxH7sQ==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-common": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-common/-/oci-common-2.1.0.tgz", - "integrity": "sha512-8FBooP+yHEJfoyEwvnrlN6sPivGRiAS/sk6BYnnHkVMPVocXyzonPN5YFe+elvMighWW2XwI0puVVcrtqwym5Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-common/-/oci-common-2.2.0.tgz", + "integrity": "sha512-nTERLHmfeJIbbrPCcILCdg8hZXZyhjavBjcccgZI6BvwXSqr2m3Kdt7hfmTNft7nKqDuDuravuXxjJm89LwGyA==", "dependencies": { "@types/isomorphic-fetch": "0.0.35", "@types/jsonwebtoken": "^8.5.0", @@ -4509,630 +4509,630 @@ } }, "node_modules/oci-computeinstanceagent": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-computeinstanceagent/-/oci-computeinstanceagent-2.1.0.tgz", - "integrity": "sha512-E/V92xnNa4lzpA/Rss/SbQf/s2yk1SyCq4EdGNtgjs3bvR+XCRrshd9BB/r8uYkjgNlIrK2LcipZHnt/5kAHxA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-computeinstanceagent/-/oci-computeinstanceagent-2.2.0.tgz", + "integrity": "sha512-Z6e0+xTWOnIY1hlkUQNTRAbJIEyTPooljZq5JvJjcpBArsN8ytWgiT9ukRa5f+h/IJTeCNYGqY05M657lGbW8g==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-containerengine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-containerengine/-/oci-containerengine-2.1.0.tgz", - "integrity": "sha512-JrHcMKcpZ4FxDVYxVRPkhmHdjkhlWj7sumhO1Py7D3Hm0GTWzhTNXGQJnw/fr56sVI9kNTLmVc7IF7FtYbBCvw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-containerengine/-/oci-containerengine-2.2.0.tgz", + "integrity": "sha512-q/35gEZoJVay2vyoZwZZCa5nwjA1w4XBPiWG2fkXciY8f7nKUFdk5TAIgvVb5o+WBqH4e+WSp4bNa+Ba+DyGXA==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-core": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-core/-/oci-core-2.1.0.tgz", - "integrity": "sha512-g0+WhdrWjQHIYkzTc/ToV/0focajX43Pd0gH7YIL6PuA9vsW7fgq4zYSUhSMLm6ZWaX+kH5es4sR993C2LVNCg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-core/-/oci-core-2.2.0.tgz", + "integrity": "sha512-ArJp74Cay7liL1Fel5YeWv9dYUNuqUzxQSJmW4eFlPqgDjdwLA8q5sqVFc/ydkxGqFsizArpptgHa8cK8onjCw==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-database": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-database/-/oci-database-2.1.0.tgz", - "integrity": "sha512-kWBXUFFdY+4JifGygx1wVi4lf1rIP1e8GivRumKuuxnB+LDKXeAyhx9yWZhpTMRp6XuMl3evzeuj/gjAkAao3A==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-database/-/oci-database-2.2.0.tgz", + "integrity": "sha512-JKQnZohNQiFgs0ARQWxvKvNvWsbkZfiD2iv0jD4xLo8vG35AD5sUH7+jsimi5/NqozMeUiQMBppUYy7ySwNpew==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-databasemanagement": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-databasemanagement/-/oci-databasemanagement-2.1.0.tgz", - "integrity": "sha512-fJqXcaPhLqpxWBKB1uJqP5Q5EVgeqjE6gAdTo7060VPJyR05tBof7HR180eQP+B7xoYDaJtrYRFtbdTjBsAU+A==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-databasemanagement/-/oci-databasemanagement-2.2.0.tgz", + "integrity": "sha512-sYE4xK+YoRyYk2odw2sujmqz/b8avOcEdpAZHliZdX92wXLBpHw1ETlCUsnZXpiHRig5Atp5kmMRphe2ahzo/w==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-databasemigration": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-databasemigration/-/oci-databasemigration-2.1.0.tgz", - "integrity": "sha512-L/mbrorphYBHW6ylXHG6SETzwmvnD1RndRmPm7BhkLNr/B5yJvsZfpZ6NWVtG0kfg7dHWnmViUNGZLOjlvg0fA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-databasemigration/-/oci-databasemigration-2.2.0.tgz", + "integrity": "sha512-O9j7Km7X6F/M4SrbYV9MDXe9TMPwzExwCHKdZgqj3a/8+XHGAhiyEDCM3LLuvcRtAFbaqpLFHqeW3rALIJnhmg==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-datacatalog": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-datacatalog/-/oci-datacatalog-2.1.0.tgz", - "integrity": "sha512-7H+ePJ+CFWQkUlQLaRzPGNCtpZnLHkXLqTs0dNFH4OTLFqEtcQRvz4NRa5EF2E2swsutH/1MolPzGLQztnzJwg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-datacatalog/-/oci-datacatalog-2.2.0.tgz", + "integrity": "sha512-EMettqSUQwnqL47l/+c2eTotG6xxcUFuINob4j0LTXZ8dGfS251nOLGP6d1F5ln/stvrn+ZSfurq49Ut4ZnRoA==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-dataflow": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-dataflow/-/oci-dataflow-2.1.0.tgz", - "integrity": "sha512-2PMQKOG6VDFFKQ+8i9KZB2lRmpW4f1YMiDWtVg9l6vss3Iwi5a7DHD29gRYrsftZfiGJOSu7yWm/uHAakDvT+A==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-dataflow/-/oci-dataflow-2.2.0.tgz", + "integrity": "sha512-ObjHWrM7oAb1qiR+9hur4+HGMETTa7Fh8rOq1mTN1WGSZdqtGPD0wdCPdO/vtoPq6zwz53/V4Dc7T2CBvSqTEw==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-dataintegration": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-dataintegration/-/oci-dataintegration-2.1.0.tgz", - "integrity": "sha512-KgfjY7zvSiW34TY7vgCmPg3j+rtJISpBUsa+Fg5VCHCHKkoK9fLBLqmkAn6Pq2x+EhoesYEs+avte13E2r6lNw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-dataintegration/-/oci-dataintegration-2.2.0.tgz", + "integrity": "sha512-nX6aaw8Yjx80DGSa9m3ySvIUwGVO10YqPxDrXH/fS+oAa6lINJEoCE0Y+B4tJypHRs20UdjOieyFbocrxep9cw==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-datasafe": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-datasafe/-/oci-datasafe-2.1.0.tgz", - "integrity": "sha512-aUOu/xpaLOXhVp8TBY+W6yt0T76WCIaFwmcAEq0AKVQrgI+F5xKVDc6y0wnKBFLDOQ1H3Kmkcn/Kf30P5h5isQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-datasafe/-/oci-datasafe-2.2.0.tgz", + "integrity": "sha512-pgdzdUOYejfuAISt1x5UWF1yxJfh+ZrelTXkwJ8oPJ624AMSg75QTzuy+ZdGrE48COkqe8FLSsc53ejixulT2Q==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-datascience": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-datascience/-/oci-datascience-2.1.0.tgz", - "integrity": "sha512-xTg3fRkiMMTHTjCHiMKvXBpLHQOQTPK4Z7vFcyTVVHVuPJzn9d7PSNzgi1gKZ7TJmbXqjJAHTrc+/cbdfViFpg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-datascience/-/oci-datascience-2.2.0.tgz", + "integrity": "sha512-J5Ee5acz0Kk/sZFsF+bdf3zPmn3M+W7XXOLG4idZCB6qffw5GWBibW4AOBQPw8p4u8C/HUS8RQNnZvfvjTU5Cg==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-devops": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-devops/-/oci-devops-2.1.0.tgz", - "integrity": "sha512-Gp0cCLBpMPAmVnGIU0sqvgpAeZ0jsrZ7QVMnWAMShEmRImd/xAgcJ4uRmp2yAMfMvMBkdwNhBZUn4+DTuls3Lw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-devops/-/oci-devops-2.2.0.tgz", + "integrity": "sha512-4CUOcXEfSeDml4EeLjiPObq9TIKbqH+IpKcHKbUFYdPlJRhjfYJUGyUfik8d7NLyNLmt8QPLcGumrmNA5ji5Ng==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-dns": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-dns/-/oci-dns-2.1.0.tgz", - "integrity": "sha512-NjN91QzGQ/qWawLBCuxnjH5FyYNNlJnb90CaWR3AVpcrNwAB1Jc0KLwsiFHzmktdNz229GiHHE91Ke6Y0AjWIw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-dns/-/oci-dns-2.2.0.tgz", + "integrity": "sha512-XFERlMnOLpx/DL/QYDXG1KOCIub757bPFLXNBUVG8tYj3uxSRQzoehRcr5qWhvrHIQk2kpwC+Ob/4f8Kz8CChQ==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-dts": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-dts/-/oci-dts-2.1.0.tgz", - "integrity": "sha512-rTVYKe50Nfgd5w0dH9XKRfOX9px+vgIEEEJKL211Uy7HXvENylmhcKOSodyp+NqZkBJsdhgP+PpLY0kMKMnw1Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-dts/-/oci-dts-2.2.0.tgz", + "integrity": "sha512-IcrLArQWkyNfbJYZ/sr92sVYvEFcoPPrAEJA+uJkN/Lu0WUTMfUdIe2TczQunTtOvIWpm9CWLKJeyEcRBSqLcA==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-email": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-email/-/oci-email-2.1.0.tgz", - "integrity": "sha512-DazzA9DbVlhXp5pxANNXHHmuOHCtTvKrquuLby8mnFG4Juld1GL56ifus3xc6RdOZKmdVheg8/5x5x+EdJsxRw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-email/-/oci-email-2.2.0.tgz", + "integrity": "sha512-n7tfJsGaH5oaAk4GkT8ufN/6w4YCkLbHkgiQHm08nZi38EYsxzLsbf0wSRAK/Qpjs89JOd7DbUiDF2Df/WeQKw==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-events": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-events/-/oci-events-2.1.0.tgz", - "integrity": "sha512-yvzKeALVtyPzVxsMkvSxfuQ5rtJl0pKaWbKFwxa+AgY32emzDAI/5E4RFYr3NJK8RAao2+Gmz32fwB2kdPQknA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-events/-/oci-events-2.2.0.tgz", + "integrity": "sha512-c+8aMleAUfZZHXfk94xYUCQtLegN52Ko2dp574KQzYNkjhp2P0semC5o1cnn/NcX80PomdPXkHJAyoIdSdi7Jw==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-filestorage": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-filestorage/-/oci-filestorage-2.1.0.tgz", - "integrity": "sha512-P0593JgZg74hEfnxRuOE1Q6JauVS1WhE9oXuL1bZ99V+GEyEzksYt+mmSc1R+Xz8NsiTJcupQXvFIraO4OKe0g==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-filestorage/-/oci-filestorage-2.2.0.tgz", + "integrity": "sha512-2R0Gtev+C9MGZOmNcxwTrz91g1quYsKlYsjfYSJcxOhg7oaqFAO52xQ8AzP4VSRYnH1EsmpqHbD7NLk39gEKOw==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-functions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-functions/-/oci-functions-2.1.0.tgz", - "integrity": "sha512-mW2zwwF49Z5kLqNIgJtEjOcQdhBMN3Vm1Y4Xov5iwOZadxb7Sdur3FK4AUy0VqE90SIPC+o/naSIQp543D3jcw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-functions/-/oci-functions-2.2.0.tgz", + "integrity": "sha512-IMZHwChhrMGk12BX2hqhOv/GXLPbN+aKWL1qFlSgkik0maGABydletT5/Z29GvBXGZlawv/a40AGA3pYJjM77w==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-genericartifactscontent": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-genericartifactscontent/-/oci-genericartifactscontent-2.1.0.tgz", - "integrity": "sha512-K/UPChhLXYspYDUcX41YPVThzBfKQtAKMSeVPxmDQYLZskSaUBYFdIehcTA9jHFfzWYhQcx9MRgyVUVusEBL+g==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-genericartifactscontent/-/oci-genericartifactscontent-2.2.0.tgz", + "integrity": "sha512-Q6rCMRD4VmX2N0Eqza+OTv67TRZ2YKKROlykMAgNbPS/603CQ759p8urV7rf2b+fKdT9uvWcNvVJSy0ejCStog==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-goldengate": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-goldengate/-/oci-goldengate-2.1.0.tgz", - "integrity": "sha512-ARVfMbix4ILCeklMwjGBl0GeksQz9DgY4QD0/rNV7nXcLq/6DZ8ff7D/jrjKsZCFogqHfuVRs458x+DbYpH+XQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-goldengate/-/oci-goldengate-2.2.0.tgz", + "integrity": "sha512-7JGfYRAbXH5xE54AlisCl2Ucyy8aA9+VootuP+k8bPIJR4ZRkVXgs8++MEHaiR/E5Lv39mN7BM+rgz2CnW7K9w==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-healthchecks": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-healthchecks/-/oci-healthchecks-2.1.0.tgz", - "integrity": "sha512-OHEdGLKWYYD5VFMrFN87l/pitM0xcjTlWClSZV4evh6N8jGInKP0V5r0GLZhad8FxdVMMEV7vfi4ntzdNop79A==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-healthchecks/-/oci-healthchecks-2.2.0.tgz", + "integrity": "sha512-h1qo1xUv/Yse8FnogKTgLo0ERXNwjQ5v4ejMNeU+YaoBe08UDzju9+NinSPxVAmloAmb/04PVzaihXpfGFOTxw==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-identity": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-identity/-/oci-identity-2.1.0.tgz", - "integrity": "sha512-BPEFei8NrqdFTlFrAt3eoErijUDywcOrpzU7ojC5l9ix0rwNsEaXsrNt66IriHDnbAhZEuPx2SAyyuJS+pXfHw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-identity/-/oci-identity-2.2.0.tgz", + "integrity": "sha512-k+Vqcxv1E7jWiVIv79ncBdlzzpEUMbZWhptoXhNAN+tQPJvOdUKZf9xUnZH8JpG7wstpY+ixCYFPHr0OGYYztg==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-integration": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-integration/-/oci-integration-2.1.0.tgz", - "integrity": "sha512-X30XXYOllVEHaoqym9FsODULe3jgaFAEULcQNrh4fKae6GeFe6MGXRl/voRKkm7nr8jsxn99Nx1bLVgJRrnXFg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-integration/-/oci-integration-2.2.0.tgz", + "integrity": "sha512-0Zc86twE+FHB5f7BiHad5FMABWODnFO8LYxTZ+c6eM4OoyU6jCyet4jXIr0J7/+A+HRCrDtmjdN/vLDIzBbR0w==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-jms": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-jms/-/oci-jms-2.1.0.tgz", - "integrity": "sha512-F880/iHEly0yb7UljqjxCtudCmY4up1DwvW4PIzOSrbeYv95w4m0yJnDc4P4kAUy61OZQsBVb1vD3oyf0KsuBA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-jms/-/oci-jms-2.2.0.tgz", + "integrity": "sha512-4R3t+LVbGEk6h5LUKF/QxctueElolBnf7KGhk8yyzldbdM1TRKNwPq91wL9+JCmQ1nlvBHPb2LfLkMCy8jMBjQ==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-keymanagement": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-keymanagement/-/oci-keymanagement-2.1.0.tgz", - "integrity": "sha512-sjD6CAHgNIYNBDdLh3O4s2PVcMutxeCgNlM0vOKcqxEIAlUIKO73HGnxJmxm+jCuIXHZh3rHfmfo6FouZ545GA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-keymanagement/-/oci-keymanagement-2.2.0.tgz", + "integrity": "sha512-CUkdKiU8/qOqKejcoMrnXlI1h3jM6NBXmvwMwqP0fxMnG10gwsZdEdAb+TRZsR09moeGn4vrB4XxSfpUUTCMBQ==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-limits": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-limits/-/oci-limits-2.1.0.tgz", - "integrity": "sha512-cmyJ2HVhs40LjtjX1KEKUi2z3+8JZHfmE9kheetgDJl3zejqHydnQzA5xC9/gcjHOPs6m7dyjjPngcPf+7XQuA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-limits/-/oci-limits-2.2.0.tgz", + "integrity": "sha512-uyVYNCi+AiX46L+1izytupUTugadI0C+236w8rf0kL1FtwogIqB6b96WBwtTzcljqgCY7t5Djoi6IGzXOCJFGQ==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-loadbalancer": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-loadbalancer/-/oci-loadbalancer-2.1.0.tgz", - "integrity": "sha512-cOuM/to5VgBcvyqIxJymrtf9r4p8mN44LEdxvVxNlT5oCjGzEA8DcQrlRCIMHk8/zPpT3ENugKjei/ZFfojCrA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-loadbalancer/-/oci-loadbalancer-2.2.0.tgz", + "integrity": "sha512-l2mKcUHm2nKbJggo2CzYb//YMZAZmWMnEXA1ZDpA4nVHCk7lKkyvr/7FipsM9cd1bHy1lq0164BRl7bo1I57Ew==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-loganalytics": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-loganalytics/-/oci-loganalytics-2.1.0.tgz", - "integrity": "sha512-JiZ0PHC2jQLnwbSq3feqWXURu0TQa9zy3ZITCM1c73zOPpPxTSvDJWu9hLbB6LG4+UhA/iTCMXOAz35DrqonRg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-loganalytics/-/oci-loganalytics-2.2.0.tgz", + "integrity": "sha512-ajkY0AFYnGFwR6+KYnYbT9IEkUusF0g8WWAjtYal6vLW32FXhItPl+nCGTf1gX0vYWKOuW3/ZbEapFrrHZex/A==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-logging": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-logging/-/oci-logging-2.1.0.tgz", - "integrity": "sha512-k5k87V4+x2dJ8BGIYOXbDJm0aD9gWI3tJDV51YHTt5GN/14XAng5vPhZU+RjzUpUVtz6U/MDt+vLdsRMKQDDcA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-logging/-/oci-logging-2.2.0.tgz", + "integrity": "sha512-ywvvHPviMrYDJsHhRaaSCs0yBS4dnqAhP7p2wCTh+1n6t933nJPCp8pcpiAPJyGONcFlgO7ZzAWYoflQdQpW6A==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-loggingingestion": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-loggingingestion/-/oci-loggingingestion-2.1.0.tgz", - "integrity": "sha512-+NosIufREXFRRMAxaiqunvSjg6qyoZsgFOsdWLgdkfPwdLhxVaLgjNYX2fhWD9wuYwpyNgmbgOtWvuayemFh5w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-loggingingestion/-/oci-loggingingestion-2.2.0.tgz", + "integrity": "sha512-RLOuSX9FebHf27e50lLltgKLJMeoJHK4BI18xFNleZPRwkgdoCjvZAML2i5MTYTkVrSNzgKKBqkQ1VKDZWITgw==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-loggingsearch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-loggingsearch/-/oci-loggingsearch-2.1.0.tgz", - "integrity": "sha512-EXcAAmnRBedb0jhrmirat+yAn6MiII12srdZKAgQZ3kXRA9ai6/uWzBoSrVaYw2I7pjCrAWuJi8ByDC3nY08yQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-loggingsearch/-/oci-loggingsearch-2.2.0.tgz", + "integrity": "sha512-DnjsWmK1TQ7GbXaLtMGvEIV0RsXWCmeh0LAU7qpT4S7iFlhkU+vSl3QzVEulWV+ZrEo8Esui33BQx7WBmYGV5Q==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-managementagent": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-managementagent/-/oci-managementagent-2.1.0.tgz", - "integrity": "sha512-FcdHMS5BO0Kb4PEy+ySkUImnqjEWRBwSNI36uz6flyPgSfHw2+OOH+adPqJNZ/tQClh07Jt8VazcDK/x7QOO0Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-managementagent/-/oci-managementagent-2.2.0.tgz", + "integrity": "sha512-zrcF8Lf/oi7sy1B5ZVVyANxZ4tgrJu6bnRD99+Y3SIAP35X5EwNEKZtZUGj8OhlGNSS8cPD0SQW+JefpY4WRUQ==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-managementdashboard": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-managementdashboard/-/oci-managementdashboard-2.1.0.tgz", - "integrity": "sha512-bGrbxXm08zxUa3KIxwUyW3z3TBoA1ql7SlbctVaNwHFq/DGH4DKODKjHoaJwKelxTpM4ZQ22A9ILNg4KySo/1Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-managementdashboard/-/oci-managementdashboard-2.2.0.tgz", + "integrity": "sha512-099krNbTohzH8OH1LvECuqQoDhHRstsHBndW0wnRsS4BJ98K7tWitEueCZNUR+SplO+FrwWpLBVSHhkxH3ldDw==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-marketplace": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-marketplace/-/oci-marketplace-2.1.0.tgz", - "integrity": "sha512-6Ex8v0+pKwpZqY9ZniN5AYrau3F9suxtNqBvI72iAKLujMlLcJhkY3H75qm1KwQvOR2nrz2dOEKBtGLOhV47hQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-marketplace/-/oci-marketplace-2.2.0.tgz", + "integrity": "sha512-MJMOznpZwkyPqOuvHNSN/sM6GcCtZFFdRmZzJ+xzJw+4v685ds+oMtLjpQrA9eGK0GPfUISEFN9rlSfqj8nYyw==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-monitoring": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-monitoring/-/oci-monitoring-2.1.0.tgz", - "integrity": "sha512-q2aSu6Mxm6bFtQsNd82QxHXqV6XoUpgtjmvIH4CA7o4u9qX1Pf/AJRyzAb3TpnOhbxDilzDV4lV3ADvjKrCiuA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-monitoring/-/oci-monitoring-2.2.0.tgz", + "integrity": "sha512-wuIbVsG8016wkcVbQC1CSLL+jOeZK85LqYXLH2Q8XZaSSPbhWyg17eQjNjdx4wMXGeGLWx0YbSPwntscLhz3Ow==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-mysql": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-mysql/-/oci-mysql-2.1.0.tgz", - "integrity": "sha512-DaJ6zcwaJEr1T9gAIT51R5KSEyRRre+uofiyNuruyFjnqtnQ2eSQWv9oXOfu/MfRvoSLhMyMJUpnCTJpewN2hQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-mysql/-/oci-mysql-2.2.0.tgz", + "integrity": "sha512-qYG1OWkCJrSnktO7L3LvSSxUUvkdjVQ9mgSHykIdyO8woH8X0/gG9Xboq5m6ShKFVtzr0E7S6/qdKAE+i86SvQ==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-networkloadbalancer": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-networkloadbalancer/-/oci-networkloadbalancer-2.1.0.tgz", - "integrity": "sha512-PqPnr9jBaKRyfeeCjjPB1j37e/MPmXuVcJvPwz0qcplJdkMokhZKIFQp8vG0e53eXNROwOleVN39bXmPZhYjOA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-networkloadbalancer/-/oci-networkloadbalancer-2.2.0.tgz", + "integrity": "sha512-HdNWtefp8Wu+lP12D30UsZAQlgNtPcBxlBtkT+bGatUzfCzmX9i0LNIsUQgtFN8rnttg5gNvY0N+rFEAEvUveg==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-nosql": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-nosql/-/oci-nosql-2.1.0.tgz", - "integrity": "sha512-KzEx5QImXTErzzst3+IxKjOgykFgwtZvTIoMLNWHs+3nHR7upXmJVhidUl47EmQ6CJkMJyAjqhOBY9MPDJBpXA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-nosql/-/oci-nosql-2.2.0.tgz", + "integrity": "sha512-YufjnPFCoKun4hf5++VNtUGW4zNmLw086N/wlqjddIrRSWwdCNG4cO49tKxNw1aHY445qDXno4cp6me+arsrRA==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-objectstorage": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-objectstorage/-/oci-objectstorage-2.1.0.tgz", - "integrity": "sha512-RqbldmrztLNPTtqB2W5lHh3prGfbzQvMLwx6OD7px5m7Pkom1kkTR5L4fW1RY7IHf7HskF5Oynq6/7B3U6m1pw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-objectstorage/-/oci-objectstorage-2.2.0.tgz", + "integrity": "sha512-xSidrgrZW1BWSjxaT4z0b8hV9bsu3jwQPBdHgPZ/a00BBWk8QB2RxDMWR/al1WH67n1UtNRvD43dLoBT2Qbtvw==", "dependencies": { "await-semaphore": "^0.1.3", - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-oce": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-oce/-/oci-oce-2.1.0.tgz", - "integrity": "sha512-04ziaLxctdNUiSKvKw/4+lMS1dK0SibGDjebqB77I6XgdAaxISoMBJ91CVU01VyAf65/csOcK3xfyPu0dsNLxA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-oce/-/oci-oce-2.2.0.tgz", + "integrity": "sha512-ULcyuoSNCOK2FsvN1hPGsIEFklz14avdmsK0eI52obPahLZgz4ATxljSCbxIpYHRX0v5pDXpuVPfuiyyO73DuQ==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-ocvp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-ocvp/-/oci-ocvp-2.1.0.tgz", - "integrity": "sha512-rzkqoJh64+wAhKKOOtmgLuSXdKKV5S+xeIMEOjXbf4sdaThPynbNtjvrqgZmdUJBE5ZrOo9WTw7VyidERHt/Jg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-ocvp/-/oci-ocvp-2.2.0.tgz", + "integrity": "sha512-Pu8gvaF0t9oUisFbCNGUbN786qz6XpCZuGUjSY6u6XTpFhOdZZX5nYzUNtdKweQOCsnO9oDEqy9a6Q+wVjz1oA==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-oda": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-oda/-/oci-oda-2.1.0.tgz", - "integrity": "sha512-Vgvtq9Z3lK2UFPCIaNiQCNV+IP+In3OWp6wB3X3w7VGcUOuMaI7LQ2zd1I55G2hse1RvlJDllesXoWP80EPX3Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-oda/-/oci-oda-2.2.0.tgz", + "integrity": "sha512-g1ZI5bENwUm/gmRFSsPNdGDBUHK2cyt+gI1Q80/rro27/wtxJFZHX1mzc0lOJ2aOqYu8Ay9NmkmC5MfYFxcomA==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-ons": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-ons/-/oci-ons-2.1.0.tgz", - "integrity": "sha512-Q046+cPOTFk/cI1l07h2MZntI72uenJpLbmvron8EOxxArJbryJ1R+3bkF4IaMliYVszmp3JVbqW+vKwc15myg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-ons/-/oci-ons-2.2.0.tgz", + "integrity": "sha512-IU4HoAZItpZ9L3/F6btXT4czZBkWJkoAC4vsDvMq2yrU/z9eCWVbJXv2xbTbeMrhtcWpxxNdf2qlhBc+LkZjng==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-operatoraccesscontrol": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-operatoraccesscontrol/-/oci-operatoraccesscontrol-2.1.0.tgz", - "integrity": "sha512-dAKxkd30facttTXMYwVMRi2UWCS0a21vJDNz0TkEyky+H4rPQyRsYA7wEZRV0ketUk2fW5y2lSji612ymxgD+Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-operatoraccesscontrol/-/oci-operatoraccesscontrol-2.2.0.tgz", + "integrity": "sha512-PL7e1Tpr7R+wjZedRGzfs+0lRHx2rp2lKzsZftwSVy+DYFW77xsiOeXpdAzZ8kAGgDgxMlT/rHAnn0eUn07Rww==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-opsi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-opsi/-/oci-opsi-2.1.0.tgz", - "integrity": "sha512-qKrCFPNCGkX2ztDC6iQYgxNDc20QKRtRv+D221X6rU586UlZK0whCX9Nz4l1zpyor8OPIG2KldCVqG6sbtvgKg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-opsi/-/oci-opsi-2.2.0.tgz", + "integrity": "sha512-g4Vqa9sQsuXZz4XiDdwjGGynQ2vsD4CdxjI0sXWEG7pL8I4Lag9D3gnJSLKV63RGIhiZKRjRsbhr9kWsg/RU5g==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-optimizer": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-optimizer/-/oci-optimizer-2.1.0.tgz", - "integrity": "sha512-8D/nyVJZa/09sD0WEFwNmbys8FpUm4U0T5ArMfT0wvEpEh9SNvPr1cM1LiVZsiOJQP0XkKi7abEpzn+l+W4tDg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-optimizer/-/oci-optimizer-2.2.0.tgz", + "integrity": "sha512-SWxkSL0sjYi06DJ3c/Yh3iJbJtK8inP4Wf56q2bFgVIEwJEkWW5dDOu36XdbJ4T5Mhg/FsuvfgMVVOBLKH5PEg==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-osmanagement": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-osmanagement/-/oci-osmanagement-2.1.0.tgz", - "integrity": "sha512-eDEhrXUgRV3mN9Ys5OOBJZ0Nz+4L0NQfX8yFgq/rUrFMpRrRi9QsbzOGzhXtfj1LYaSkH28gEINzhOvfsF4MBg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-osmanagement/-/oci-osmanagement-2.2.0.tgz", + "integrity": "sha512-yD8d3gQQzifpph+AjtetdxPjdsouXMxqyO3YeW/F5I/VK1OpzEtZDEfhs5BK1K2WPFbJk6tjCqkE8riqqz8e4Q==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-resourcemanager": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-resourcemanager/-/oci-resourcemanager-2.1.0.tgz", - "integrity": "sha512-/J4qjFXfNGqamBe/0+m5DHIdvWK6yav2n/Gj6/+TTpoQQLBefHj2fdm6+9Escst3tmbI18siYKq6YWcC2b3PbA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-resourcemanager/-/oci-resourcemanager-2.2.0.tgz", + "integrity": "sha512-zXj16L3NJnRBnvOx4Uy3cYZ0R4672mp/hJyJtpm4bwCB3W8hyp3FQcRyWVg/+8To4uuv9VYbFNbUDAnatKSQJw==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-resourcesearch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-resourcesearch/-/oci-resourcesearch-2.1.0.tgz", - "integrity": "sha512-oAO6CHNRUJGCbannOoLtKIGb4kS+JHr7LhSctmRHhSly5g6DMdKH7SQ/iYV4ULnOQQbI3yj8eJyrt5NVZjbb/w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-resourcesearch/-/oci-resourcesearch-2.2.0.tgz", + "integrity": "sha512-ndxk9oDgm0hsjLkbgx8yXuEBb7WPTpXUjBy82iUFW8ZEd56P/rDUxukwrtAO61jrw3AoBB2xluFzgQ+GZFg2mA==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-rover": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-rover/-/oci-rover-2.1.0.tgz", - "integrity": "sha512-iU6mtswuUOoT76XFyxPfROexWXdOnSqyWH59j5cdtu9zfMGYi+NfFAaRt54qX5XhGEWySSgqIv/6VTdhEfdUUg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-rover/-/oci-rover-2.2.0.tgz", + "integrity": "sha512-fNYgJ63EhcpV33bpMnWYJLELZk+ifOqG9/irV4EZjWok5lqbdztZ/jQnjfWhk4MRPOU1JZzcK8TX0JEpUa6rJQ==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-sch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-sch/-/oci-sch-2.1.0.tgz", - "integrity": "sha512-LoU7wM5dye1TvXmv+9+LoVlqrPPP6GWdd0F+49XE3huW2rmJRtGPmA1hE+pOQlcda9IWGBKfy1nkvWRnTKLYXg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-sch/-/oci-sch-2.2.0.tgz", + "integrity": "sha512-o1MDk/jn8JeEn08gMCqfb/aifjune894Xzc2qOuAFKu3e0STR9F0bdZi2DWFaokLVM9qkMe+pkjvh9uw1nIW3Q==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-sdk": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-sdk/-/oci-sdk-2.1.0.tgz", - "integrity": "sha512-pfRaGjwvplvWWAQoS7nCC5O57Vf4lrqTG9VOWHiWHL6XXmA7xhG3dcDnX2S9w6G49rhA/xPtlDB2oC+RMvEgZA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-sdk/-/oci-sdk-2.2.0.tgz", + "integrity": "sha512-cq8iFGgpANSwlZTilmu7/hDNrdsSVX5g+n+GOe0inYtjLghFQiE9n9ak4lzA5Kftf424mf4sk+jFNdKQQz6gVg==", "dependencies": { - "oci-aianomalydetection": "2.1.0", - "oci-ailanguage": "2.1.0", - "oci-analytics": "2.1.0", - "oci-announcementsservice": "2.1.0", - "oci-apigateway": "2.1.0", - "oci-apmcontrolplane": "2.1.0", - "oci-apmsynthetics": "2.1.0", - "oci-apmtraces": "2.1.0", - "oci-applicationmigration": "2.1.0", - "oci-artifacts": "2.1.0", - "oci-audit": "2.1.0", - "oci-autoscaling": "2.1.0", - "oci-bastion": "2.1.0", - "oci-bds": "2.1.0", - "oci-blockchain": "2.1.0", - "oci-budget": "2.1.0", - "oci-cims": "2.1.0", - "oci-cloudguard": "2.1.0", - "oci-common": "2.1.0", - "oci-computeinstanceagent": "2.1.0", - "oci-containerengine": "2.1.0", - "oci-core": "2.1.0", - "oci-database": "2.1.0", - "oci-databasemanagement": "2.1.0", - "oci-databasemigration": "2.1.0", - "oci-datacatalog": "2.1.0", - "oci-dataflow": "2.1.0", - "oci-dataintegration": "2.1.0", - "oci-datasafe": "2.1.0", - "oci-datascience": "2.1.0", - "oci-devops": "2.1.0", - "oci-dns": "2.1.0", - "oci-dts": "2.1.0", - "oci-email": "2.1.0", - "oci-events": "2.1.0", - "oci-filestorage": "2.1.0", - "oci-functions": "2.1.0", - "oci-genericartifactscontent": "2.1.0", - "oci-goldengate": "2.1.0", - "oci-healthchecks": "2.1.0", - "oci-identity": "2.1.0", - "oci-integration": "2.1.0", - "oci-jms": "2.1.0", - "oci-keymanagement": "2.1.0", - "oci-limits": "2.1.0", - "oci-loadbalancer": "2.1.0", - "oci-loganalytics": "2.1.0", - "oci-logging": "2.1.0", - "oci-loggingingestion": "2.1.0", - "oci-loggingsearch": "2.1.0", - "oci-managementagent": "2.1.0", - "oci-managementdashboard": "2.1.0", - "oci-marketplace": "2.1.0", - "oci-monitoring": "2.1.0", - "oci-mysql": "2.1.0", - "oci-networkloadbalancer": "2.1.0", - "oci-nosql": "2.1.0", - "oci-objectstorage": "2.1.0", - "oci-oce": "2.1.0", - "oci-ocvp": "2.1.0", - "oci-oda": "2.1.0", - "oci-ons": "2.1.0", - "oci-operatoraccesscontrol": "2.1.0", - "oci-opsi": "2.1.0", - "oci-optimizer": "2.1.0", - "oci-osmanagement": "2.1.0", - "oci-resourcemanager": "2.1.0", - "oci-resourcesearch": "2.1.0", - "oci-rover": "2.1.0", - "oci-sch": "2.1.0", - "oci-secrets": "2.1.0", - "oci-servicecatalog": "2.1.0", - "oci-streaming": "2.1.0", - "oci-tenantmanagercontrolplane": "2.1.0", - "oci-usageapi": "2.1.0", - "oci-vault": "2.1.0", - "oci-vulnerabilityscanning": "2.1.0", - "oci-waas": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-aianomalydetection": "2.2.0", + "oci-ailanguage": "2.2.0", + "oci-analytics": "2.2.0", + "oci-announcementsservice": "2.2.0", + "oci-apigateway": "2.2.0", + "oci-apmcontrolplane": "2.2.0", + "oci-apmsynthetics": "2.2.0", + "oci-apmtraces": "2.2.0", + "oci-applicationmigration": "2.2.0", + "oci-artifacts": "2.2.0", + "oci-audit": "2.2.0", + "oci-autoscaling": "2.2.0", + "oci-bastion": "2.2.0", + "oci-bds": "2.2.0", + "oci-blockchain": "2.2.0", + "oci-budget": "2.2.0", + "oci-cims": "2.2.0", + "oci-cloudguard": "2.2.0", + "oci-common": "2.2.0", + "oci-computeinstanceagent": "2.2.0", + "oci-containerengine": "2.2.0", + "oci-core": "2.2.0", + "oci-database": "2.2.0", + "oci-databasemanagement": "2.2.0", + "oci-databasemigration": "2.2.0", + "oci-datacatalog": "2.2.0", + "oci-dataflow": "2.2.0", + "oci-dataintegration": "2.2.0", + "oci-datasafe": "2.2.0", + "oci-datascience": "2.2.0", + "oci-devops": "2.2.0", + "oci-dns": "2.2.0", + "oci-dts": "2.2.0", + "oci-email": "2.2.0", + "oci-events": "2.2.0", + "oci-filestorage": "2.2.0", + "oci-functions": "2.2.0", + "oci-genericartifactscontent": "2.2.0", + "oci-goldengate": "2.2.0", + "oci-healthchecks": "2.2.0", + "oci-identity": "2.2.0", + "oci-integration": "2.2.0", + "oci-jms": "2.2.0", + "oci-keymanagement": "2.2.0", + "oci-limits": "2.2.0", + "oci-loadbalancer": "2.2.0", + "oci-loganalytics": "2.2.0", + "oci-logging": "2.2.0", + "oci-loggingingestion": "2.2.0", + "oci-loggingsearch": "2.2.0", + "oci-managementagent": "2.2.0", + "oci-managementdashboard": "2.2.0", + "oci-marketplace": "2.2.0", + "oci-monitoring": "2.2.0", + "oci-mysql": "2.2.0", + "oci-networkloadbalancer": "2.2.0", + "oci-nosql": "2.2.0", + "oci-objectstorage": "2.2.0", + "oci-oce": "2.2.0", + "oci-ocvp": "2.2.0", + "oci-oda": "2.2.0", + "oci-ons": "2.2.0", + "oci-operatoraccesscontrol": "2.2.0", + "oci-opsi": "2.2.0", + "oci-optimizer": "2.2.0", + "oci-osmanagement": "2.2.0", + "oci-resourcemanager": "2.2.0", + "oci-resourcesearch": "2.2.0", + "oci-rover": "2.2.0", + "oci-sch": "2.2.0", + "oci-secrets": "2.2.0", + "oci-servicecatalog": "2.2.0", + "oci-streaming": "2.2.0", + "oci-tenantmanagercontrolplane": "2.2.0", + "oci-usageapi": "2.2.0", + "oci-vault": "2.2.0", + "oci-vulnerabilityscanning": "2.2.0", + "oci-waas": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-secrets": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-secrets/-/oci-secrets-2.1.0.tgz", - "integrity": "sha512-avp+Qa6l+RDVf6pAxGKCzVbzFhcj0bJc+T0M0kwv+eaBwncRS/ztw0pP9tGJZ/PjCNAiW621d4NymVbptq2frQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-secrets/-/oci-secrets-2.2.0.tgz", + "integrity": "sha512-7ixqvSxNFmaDm6J4jShyQtww0atcl9N/ZWuQybyfY7EwSMz0GOvST4gwy1DD6rsHr7ZTeZW85GJIhKdgArlCxw==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-servicecatalog": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-servicecatalog/-/oci-servicecatalog-2.1.0.tgz", - "integrity": "sha512-8hSP81lpuhTCYzPbrDKus82DNNpiqDqeYLjBrO7jJRQoKvY6gc1mtleAEU2L9irT5HDzsFzYpymIhGuBERiN6A==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-servicecatalog/-/oci-servicecatalog-2.2.0.tgz", + "integrity": "sha512-7hXkHjzxHkMt5Mgr+qJLDCQeXQJhrvWZUB/vbLYZ3ouuuGuxVZLsoPjMr7JOILV8w5LhqflL6QEl37J2t3VQhQ==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-streaming": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-streaming/-/oci-streaming-2.1.0.tgz", - "integrity": "sha512-QcN5qaMF0tH1nXs+CndLWUa/irnjUaR5ExNXa6pNS6BY/1YlxglkbIPVB/JOkh2eyZKLbelvRHwgk4oq4tkWxg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-streaming/-/oci-streaming-2.2.0.tgz", + "integrity": "sha512-a/a9Kpj6QNgb39lKlyCEAcNCQj9zzwU1JWME9QlkvflNa8A3QOJGyJB2Hxnc947gC6R04lJpeLE45oKVG2Z+sQ==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-tenantmanagercontrolplane": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-tenantmanagercontrolplane/-/oci-tenantmanagercontrolplane-2.1.0.tgz", - "integrity": "sha512-ZUrDiLBAT+EWdVJrVjgduCheZsjiBspYhbVBDAUIQc79tnTmheSatW6DoytvQ4nxT919Gn2+Ep11NaqmkZDbUw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-tenantmanagercontrolplane/-/oci-tenantmanagercontrolplane-2.2.0.tgz", + "integrity": "sha512-Ar0zgneeFFXpvUJw69lWbL96gbdRC+Kf8IUmoKLfK1B3qWsJZCnlQxN2IJi4Vs5ry3+ULUjp8Iy5wm/+lBntWQ==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-usageapi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-usageapi/-/oci-usageapi-2.1.0.tgz", - "integrity": "sha512-Nyy+MUwKz/UBMEcuaTXQgHIacJknGbAvM+ddPACnqdloMcqOH9Fje4Th4Wt1tV4HzBRbBcGu/+cWlVoAVDeIqg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-usageapi/-/oci-usageapi-2.2.0.tgz", + "integrity": "sha512-OMwJvLYzkXqL+DhHcaSos9L8/qAyx0AoZkCn9/uD1jRH1dNJLlfZh5GxQ42Q/WdGa1ukqnq4yl6p6P4BZqg2Kg==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-vault": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-vault/-/oci-vault-2.1.0.tgz", - "integrity": "sha512-W65FbkxS5hJdQQDeHEeyQb5QuAxa413tC7wC4pETxm3jOqiXrg0PwAv5W6w5ZZLucX/Saml6IpxVWWTZEQGduw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-vault/-/oci-vault-2.2.0.tgz", + "integrity": "sha512-sZR/Ad/VtXXl59Ub8opjOmdwbSFo4Lbe/dBq2ni/pcyxw73vJE+9l0NAohRZrSwJaD0SD8DsCvea7qmhc2+O5A==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-vulnerabilityscanning": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-vulnerabilityscanning/-/oci-vulnerabilityscanning-2.1.0.tgz", - "integrity": "sha512-UaNB0V4E7M88v2Oh5Vnx9oAP1/2XXH/y7+6fHtpni38mUotUS7ij32Fhq4JwQGAICgd0wmPi2+XlOHVKvFz/Pw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-vulnerabilityscanning/-/oci-vulnerabilityscanning-2.2.0.tgz", + "integrity": "sha512-EuYaD/yJ4SD3cuftF5Bgav2sHOgbIKH8h1Fo5yD5DLLc9jzkPpoRKBR1zM6nI5AsoVbJMaNaGNs+Ooua4l9GdQ==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-waas": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-waas/-/oci-waas-2.1.0.tgz", - "integrity": "sha512-MC02XRqoE9Z59cRC3ZXIrFWZzRzaBkMDmn7fxnCKOPu1auyMqR9nmxv0CL0/x0SZ2eC4b6RiK3Y9cByWJvvebA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-waas/-/oci-waas-2.2.0.tgz", + "integrity": "sha512-y2DHh2v0fjUHGJTc7fehgqTvfJK+EjD3JQXpbRc8K+iQz9hGdtjX93g2xcfkc+ZYpzCrJXVAXJ0fd7Uzzu0Dcw==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/oci-workrequests": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-workrequests/-/oci-workrequests-2.1.0.tgz", - "integrity": "sha512-ipPkx8sePS+NfBQU5kz6aLKOxMDc2UOJ3IhWmZUoUoLdXd16gBFMhsBLGpfj6tM0CNHZCL1kFz+t+HU5EJ6C6g==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-workrequests/-/oci-workrequests-2.2.0.tgz", + "integrity": "sha512-lOGmUjXhuiqGR63Odnqw5IAKEzXAP3ufjNczqNWNLptxWLFkL+dE/yprIdLhUhHVilXj8e8HKirnHVJk5bHpvQ==", "dependencies": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "node_modules/on-finished": { @@ -10358,171 +10358,171 @@ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "oci-aianomalydetection": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-aianomalydetection/-/oci-aianomalydetection-2.1.0.tgz", - "integrity": "sha512-bPYw8xSc9i5HeVFAWAIub3R11Yln/hcHTh7nxoJuqLuSlN8h9OyQb8k6ryc7qrqrMVF6qoBOQQKN2df5gcEBUw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-aianomalydetection/-/oci-aianomalydetection-2.2.0.tgz", + "integrity": "sha512-fAjtSIYovuR9rUJsLmZn7UOcvADPdiXCTdLHixnA0Q+40FYKyhHIipCLcT1vDK2f69WMVtwR4wARaUMDHem+Iw==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-ailanguage": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-ailanguage/-/oci-ailanguage-2.1.0.tgz", - "integrity": "sha512-RtIwCp9SozFYvTp4NXVbYzxWY4y/whwM6i8uIe7YN+ia2FWGL+tmtZYfv2V68OYwoLoyY7OKCQqbG6MUBFuH1g==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-ailanguage/-/oci-ailanguage-2.2.0.tgz", + "integrity": "sha512-31xmmS6qIJkbIg2ErMDNAEFkS/4iVx9RXJgfi3iuJb4LlLuT+5S5ear3d8Kb3XWoeTnnnk+biLrSd7Vhs9xeiw==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-analytics": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-analytics/-/oci-analytics-2.1.0.tgz", - "integrity": "sha512-LeW0Zy0noepdZce1ng4n82fLswQes0agT2r9L7AcewF89XbqYBly8OAg1A1G2WFZoBK4WL8ya+gMSKkax1/EEg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-analytics/-/oci-analytics-2.2.0.tgz", + "integrity": "sha512-z6fnWM3mfPBulrZCH2+1pDJ7CVdHvS2YI6wQEwfp4T1cNZGhV0qd7/N5QqoUYRlZUGHh/qGPbDpBmy/S+1uP1Q==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-announcementsservice": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-announcementsservice/-/oci-announcementsservice-2.1.0.tgz", - "integrity": "sha512-mEtlDF2fZtqfnDGYfubRbyUkDnfJsTFu/9dq0aq4kRyfOMxQbmafQXH/SovNQ9LVlkMb63vARL4RKzIGFI7bQw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-announcementsservice/-/oci-announcementsservice-2.2.0.tgz", + "integrity": "sha512-akQD65atfHToz69QwN0xbocAGCB+hYjqw4Vhvbbc67xkCOfPmprCajGTPUXld3lyW/7EnbjOVA9MkVJbEcifZA==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-apigateway": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-apigateway/-/oci-apigateway-2.1.0.tgz", - "integrity": "sha512-qvWa6YjAlUc5cmFGZ1t8rglnCuuSSo92sQ8pXb8o9OIPHV09rzxu6FBqOOO1ni1AFrcRp1kOXXx1YrWfwbqFzg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-apigateway/-/oci-apigateway-2.2.0.tgz", + "integrity": "sha512-uPPF0FfcS5zLhtQzyfAv3E/Jjuay5s5FtvMc4fXJtmKPwXJjMUoOuyEDU6gnVe1Ne7RBAA30BjQZXCHQDwRNPw==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-apmcontrolplane": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-apmcontrolplane/-/oci-apmcontrolplane-2.1.0.tgz", - "integrity": "sha512-3JEhzohdixt6GteHOqfp80luCIVZtUFzNC/yj5OG0w0lN47DqK3zj7bVz9XmgWL6+O4/eeOkEuLmX4zo80xp+Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-apmcontrolplane/-/oci-apmcontrolplane-2.2.0.tgz", + "integrity": "sha512-qhaS23/PddCTGc69xsiUCV0B6dyKN41IB8YHrshzMaG415jtt90RHxcTrQMptPFtjeM1UgB/+XjiJP6Kb1Cg6w==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-apmsynthetics": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-apmsynthetics/-/oci-apmsynthetics-2.1.0.tgz", - "integrity": "sha512-9KLE2mypsMATsR/d8nWoHm2uZ0ZMEdKdeDFwaNZVQDJ5/m03mgZ+wMFipcVaAQaRwYpslvFHHfS74LvajlPrpg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-apmsynthetics/-/oci-apmsynthetics-2.2.0.tgz", + "integrity": "sha512-aeeeH4FiPTlLzoXovE4mues7B68EJQX9pCFYMLRo/Ch3RWuksd5gu1VQd9WsW9XtCHmbev87vxa5lXA9tAvtpg==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-apmtraces": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-apmtraces/-/oci-apmtraces-2.1.0.tgz", - "integrity": "sha512-qgsed7kCEFBFzdyyDoss26wYJZ7kx6xnBxSttsxNjIMOzP4kXalQrhXW1CvgBkvbGnuLVAnig0C3oRunmV/w5A==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-apmtraces/-/oci-apmtraces-2.2.0.tgz", + "integrity": "sha512-vFWXcLylZ/SPpKJz8iKq/VcX4F/bt38OQ6zcezlsZkrYVP+DNBxfZy4UYzZKqmcewP7Tsfl+i780kbju1FwigQ==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-applicationmigration": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-applicationmigration/-/oci-applicationmigration-2.1.0.tgz", - "integrity": "sha512-LUkjESi1OA7LokAsvYeqiWXMyEsyb9oG9X+NWhK35obGPem8QovKVO0XxIvUz78zg91096FP5a5o6MaMlQt3YA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-applicationmigration/-/oci-applicationmigration-2.2.0.tgz", + "integrity": "sha512-IY1YHL3SZTXq8eJd6FPaRfjn1XBaAXFbdJwX9q/7MIDjDStL9TTPqzjHBbE3VL75zfbZ1xQYLe+XDRHlzqQIxQ==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-artifacts": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-artifacts/-/oci-artifacts-2.1.0.tgz", - "integrity": "sha512-NHMym57GXnDov4xNlr0MXCB3xl2eSvL8HuaNSx2AhQJPUIIIj0ipByYHV/7ea0yPMxcm1dwkA4seifN0RCW9lg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-artifacts/-/oci-artifacts-2.2.0.tgz", + "integrity": "sha512-LiC081XAl9REDgBC9/sUOuYx2I5PrPHQa2plErSrUU8lmY2OUN6nd4XqCzqmQvreC5HLrGF3D6pdjLYI2WB7kw==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-audit": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-audit/-/oci-audit-2.1.0.tgz", - "integrity": "sha512-o9vxxVOA6IceoH6vikdxvOjaZiuv1+vRYNr/NzloWn0q8RaO+9RZtcl29Kl8++xV4mJyii9xnFUL6pHgcMRJsw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-audit/-/oci-audit-2.2.0.tgz", + "integrity": "sha512-ATsIwMJtlQryg0pvMKXtqsdxHmqPt6K38fMq+wXzbkkdUoMB4N8xwAAAvSrGBUeydulPByEL1z5y8LltiBuWpA==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-autoscaling": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-autoscaling/-/oci-autoscaling-2.1.0.tgz", - "integrity": "sha512-4Opl+r2/DRB4j63h0dP8D9jtW3duBU3nEI/x3VxT1JueLc9V2St4+STwaiYfH4IZzy6D2bMgUU7v6caa0+grDw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-autoscaling/-/oci-autoscaling-2.2.0.tgz", + "integrity": "sha512-wv/8I/Jf2iwa1il8tjHXD6OAaNds1yWyo4p+D7hPsmKgoTbB1pxwK2AjmoBm3DVNhx6NksjnBpwOs2oxVUXrew==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-bastion": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-bastion/-/oci-bastion-2.1.0.tgz", - "integrity": "sha512-i13T2RLR1aZiEALVm8T/PnskUSzeGteQxM598EHJq4eOglAnhkRXLklbsJx1GFBUwX6sv1MKFejgpMeIsExJ9g==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-bastion/-/oci-bastion-2.2.0.tgz", + "integrity": "sha512-WTUD8ZbVO5Uo3YgkECKDPFp7po9gPt3HuQokn5GnS3BcYxtiJX6j4PeFKqn44a/sP8I39RIqHCU5GaMB0GTPkA==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-bds": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-bds/-/oci-bds-2.1.0.tgz", - "integrity": "sha512-SjQib9pKeMo3H2fFD4izId7zN08VuBo32BdhbPUjGe4nRudWdV0dheClRxlrLBc2qiCJeUls05ZB50RBjNqYNg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-bds/-/oci-bds-2.2.0.tgz", + "integrity": "sha512-QTux1ZxpWeSM+PIB/ocPcly4qjxfB7N9S5vq8a64EX91X1cdqF1umjS9zYSL3GxVmQ7jOwkZ2+PaRbbfNVlG9A==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-blockchain": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-blockchain/-/oci-blockchain-2.1.0.tgz", - "integrity": "sha512-gI0k9M/7gFOlAi/90sIAvji8eq5Tk8m46YsTWmHa4L+T0fwXRrI6WeUpID4sGHDJcFY6a4/lqA7htCjSj+E0VA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-blockchain/-/oci-blockchain-2.2.0.tgz", + "integrity": "sha512-pG5qrqmg6pthR1QBc3HRdSO7MVefIfqQWz21gXbGPJEz8V0nl/dm2dotZZwYX+U8mj6YCA5mr+o0TYYmJPbzcg==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-budget": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-budget/-/oci-budget-2.1.0.tgz", - "integrity": "sha512-HGHUpThBEgVNCTqTiVTF+Jcx3jFEY1a3WmMk7gzFDVuFEPgEClBCR80Il13Rxp626cHdP16i4Z7ABhoZDLVzFQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-budget/-/oci-budget-2.2.0.tgz", + "integrity": "sha512-zlMjtv2WBtdZBxdM7olVnE/PB9UwKqxmLh0wi7XqKkg9cgU+HYL+qI/xNg89xvCMkmob/GGN1QPMVluQ4aROyQ==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-cims": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-cims/-/oci-cims-2.1.0.tgz", - "integrity": "sha512-Uaju+ZiJ/RKMTEzx1rVyW2ROUaqQVkH4RfLqmfS6c0Mt/wau29qRSGFghZ2yb4iBx5oAytvwJHy69W3lqbEMXw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-cims/-/oci-cims-2.2.0.tgz", + "integrity": "sha512-nFWFBmrovOsDBYJ0WQhaM6RWKOf+0R87ekU1VPij/wAbsuzBPd+WpEuIjxY5Fepl6JSFDaDqOPJfFhae4tjaFg==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-cloudguard": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-cloudguard/-/oci-cloudguard-2.1.0.tgz", - "integrity": "sha512-u+KqNxEcbGIKVacRiJGijXllVJcR1ptFqyX9afmsZTdgCzXGcj+RUkwttTTNPd0H1t7ZyP4zjCbjaFTmayBe9Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-cloudguard/-/oci-cloudguard-2.2.0.tgz", + "integrity": "sha512-F7lScBquLDOPa5rhuCWjEsl44mpHvnmAH4ui/LfMjLYL0UIzrXziSC2EU/82OE+WATrWrjahndijPKVpfxH7sQ==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-common": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-common/-/oci-common-2.1.0.tgz", - "integrity": "sha512-8FBooP+yHEJfoyEwvnrlN6sPivGRiAS/sk6BYnnHkVMPVocXyzonPN5YFe+elvMighWW2XwI0puVVcrtqwym5Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-common/-/oci-common-2.2.0.tgz", + "integrity": "sha512-nTERLHmfeJIbbrPCcILCdg8hZXZyhjavBjcccgZI6BvwXSqr2m3Kdt7hfmTNft7nKqDuDuravuXxjJm89LwGyA==", "requires": { "@types/isomorphic-fetch": "0.0.35", "@types/jsonwebtoken": "^8.5.0", @@ -10547,630 +10547,630 @@ } }, "oci-computeinstanceagent": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-computeinstanceagent/-/oci-computeinstanceagent-2.1.0.tgz", - "integrity": "sha512-E/V92xnNa4lzpA/Rss/SbQf/s2yk1SyCq4EdGNtgjs3bvR+XCRrshd9BB/r8uYkjgNlIrK2LcipZHnt/5kAHxA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-computeinstanceagent/-/oci-computeinstanceagent-2.2.0.tgz", + "integrity": "sha512-Z6e0+xTWOnIY1hlkUQNTRAbJIEyTPooljZq5JvJjcpBArsN8ytWgiT9ukRa5f+h/IJTeCNYGqY05M657lGbW8g==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-containerengine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-containerengine/-/oci-containerengine-2.1.0.tgz", - "integrity": "sha512-JrHcMKcpZ4FxDVYxVRPkhmHdjkhlWj7sumhO1Py7D3Hm0GTWzhTNXGQJnw/fr56sVI9kNTLmVc7IF7FtYbBCvw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-containerengine/-/oci-containerengine-2.2.0.tgz", + "integrity": "sha512-q/35gEZoJVay2vyoZwZZCa5nwjA1w4XBPiWG2fkXciY8f7nKUFdk5TAIgvVb5o+WBqH4e+WSp4bNa+Ba+DyGXA==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-core": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-core/-/oci-core-2.1.0.tgz", - "integrity": "sha512-g0+WhdrWjQHIYkzTc/ToV/0focajX43Pd0gH7YIL6PuA9vsW7fgq4zYSUhSMLm6ZWaX+kH5es4sR993C2LVNCg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-core/-/oci-core-2.2.0.tgz", + "integrity": "sha512-ArJp74Cay7liL1Fel5YeWv9dYUNuqUzxQSJmW4eFlPqgDjdwLA8q5sqVFc/ydkxGqFsizArpptgHa8cK8onjCw==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-database": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-database/-/oci-database-2.1.0.tgz", - "integrity": "sha512-kWBXUFFdY+4JifGygx1wVi4lf1rIP1e8GivRumKuuxnB+LDKXeAyhx9yWZhpTMRp6XuMl3evzeuj/gjAkAao3A==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-database/-/oci-database-2.2.0.tgz", + "integrity": "sha512-JKQnZohNQiFgs0ARQWxvKvNvWsbkZfiD2iv0jD4xLo8vG35AD5sUH7+jsimi5/NqozMeUiQMBppUYy7ySwNpew==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-databasemanagement": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-databasemanagement/-/oci-databasemanagement-2.1.0.tgz", - "integrity": "sha512-fJqXcaPhLqpxWBKB1uJqP5Q5EVgeqjE6gAdTo7060VPJyR05tBof7HR180eQP+B7xoYDaJtrYRFtbdTjBsAU+A==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-databasemanagement/-/oci-databasemanagement-2.2.0.tgz", + "integrity": "sha512-sYE4xK+YoRyYk2odw2sujmqz/b8avOcEdpAZHliZdX92wXLBpHw1ETlCUsnZXpiHRig5Atp5kmMRphe2ahzo/w==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-databasemigration": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-databasemigration/-/oci-databasemigration-2.1.0.tgz", - "integrity": "sha512-L/mbrorphYBHW6ylXHG6SETzwmvnD1RndRmPm7BhkLNr/B5yJvsZfpZ6NWVtG0kfg7dHWnmViUNGZLOjlvg0fA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-databasemigration/-/oci-databasemigration-2.2.0.tgz", + "integrity": "sha512-O9j7Km7X6F/M4SrbYV9MDXe9TMPwzExwCHKdZgqj3a/8+XHGAhiyEDCM3LLuvcRtAFbaqpLFHqeW3rALIJnhmg==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-datacatalog": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-datacatalog/-/oci-datacatalog-2.1.0.tgz", - "integrity": "sha512-7H+ePJ+CFWQkUlQLaRzPGNCtpZnLHkXLqTs0dNFH4OTLFqEtcQRvz4NRa5EF2E2swsutH/1MolPzGLQztnzJwg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-datacatalog/-/oci-datacatalog-2.2.0.tgz", + "integrity": "sha512-EMettqSUQwnqL47l/+c2eTotG6xxcUFuINob4j0LTXZ8dGfS251nOLGP6d1F5ln/stvrn+ZSfurq49Ut4ZnRoA==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-dataflow": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-dataflow/-/oci-dataflow-2.1.0.tgz", - "integrity": "sha512-2PMQKOG6VDFFKQ+8i9KZB2lRmpW4f1YMiDWtVg9l6vss3Iwi5a7DHD29gRYrsftZfiGJOSu7yWm/uHAakDvT+A==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-dataflow/-/oci-dataflow-2.2.0.tgz", + "integrity": "sha512-ObjHWrM7oAb1qiR+9hur4+HGMETTa7Fh8rOq1mTN1WGSZdqtGPD0wdCPdO/vtoPq6zwz53/V4Dc7T2CBvSqTEw==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-dataintegration": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-dataintegration/-/oci-dataintegration-2.1.0.tgz", - "integrity": "sha512-KgfjY7zvSiW34TY7vgCmPg3j+rtJISpBUsa+Fg5VCHCHKkoK9fLBLqmkAn6Pq2x+EhoesYEs+avte13E2r6lNw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-dataintegration/-/oci-dataintegration-2.2.0.tgz", + "integrity": "sha512-nX6aaw8Yjx80DGSa9m3ySvIUwGVO10YqPxDrXH/fS+oAa6lINJEoCE0Y+B4tJypHRs20UdjOieyFbocrxep9cw==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-datasafe": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-datasafe/-/oci-datasafe-2.1.0.tgz", - "integrity": "sha512-aUOu/xpaLOXhVp8TBY+W6yt0T76WCIaFwmcAEq0AKVQrgI+F5xKVDc6y0wnKBFLDOQ1H3Kmkcn/Kf30P5h5isQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-datasafe/-/oci-datasafe-2.2.0.tgz", + "integrity": "sha512-pgdzdUOYejfuAISt1x5UWF1yxJfh+ZrelTXkwJ8oPJ624AMSg75QTzuy+ZdGrE48COkqe8FLSsc53ejixulT2Q==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-datascience": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-datascience/-/oci-datascience-2.1.0.tgz", - "integrity": "sha512-xTg3fRkiMMTHTjCHiMKvXBpLHQOQTPK4Z7vFcyTVVHVuPJzn9d7PSNzgi1gKZ7TJmbXqjJAHTrc+/cbdfViFpg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-datascience/-/oci-datascience-2.2.0.tgz", + "integrity": "sha512-J5Ee5acz0Kk/sZFsF+bdf3zPmn3M+W7XXOLG4idZCB6qffw5GWBibW4AOBQPw8p4u8C/HUS8RQNnZvfvjTU5Cg==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-devops": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-devops/-/oci-devops-2.1.0.tgz", - "integrity": "sha512-Gp0cCLBpMPAmVnGIU0sqvgpAeZ0jsrZ7QVMnWAMShEmRImd/xAgcJ4uRmp2yAMfMvMBkdwNhBZUn4+DTuls3Lw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-devops/-/oci-devops-2.2.0.tgz", + "integrity": "sha512-4CUOcXEfSeDml4EeLjiPObq9TIKbqH+IpKcHKbUFYdPlJRhjfYJUGyUfik8d7NLyNLmt8QPLcGumrmNA5ji5Ng==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-dns": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-dns/-/oci-dns-2.1.0.tgz", - "integrity": "sha512-NjN91QzGQ/qWawLBCuxnjH5FyYNNlJnb90CaWR3AVpcrNwAB1Jc0KLwsiFHzmktdNz229GiHHE91Ke6Y0AjWIw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-dns/-/oci-dns-2.2.0.tgz", + "integrity": "sha512-XFERlMnOLpx/DL/QYDXG1KOCIub757bPFLXNBUVG8tYj3uxSRQzoehRcr5qWhvrHIQk2kpwC+Ob/4f8Kz8CChQ==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-dts": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-dts/-/oci-dts-2.1.0.tgz", - "integrity": "sha512-rTVYKe50Nfgd5w0dH9XKRfOX9px+vgIEEEJKL211Uy7HXvENylmhcKOSodyp+NqZkBJsdhgP+PpLY0kMKMnw1Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-dts/-/oci-dts-2.2.0.tgz", + "integrity": "sha512-IcrLArQWkyNfbJYZ/sr92sVYvEFcoPPrAEJA+uJkN/Lu0WUTMfUdIe2TczQunTtOvIWpm9CWLKJeyEcRBSqLcA==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-email": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-email/-/oci-email-2.1.0.tgz", - "integrity": "sha512-DazzA9DbVlhXp5pxANNXHHmuOHCtTvKrquuLby8mnFG4Juld1GL56ifus3xc6RdOZKmdVheg8/5x5x+EdJsxRw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-email/-/oci-email-2.2.0.tgz", + "integrity": "sha512-n7tfJsGaH5oaAk4GkT8ufN/6w4YCkLbHkgiQHm08nZi38EYsxzLsbf0wSRAK/Qpjs89JOd7DbUiDF2Df/WeQKw==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-events": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-events/-/oci-events-2.1.0.tgz", - "integrity": "sha512-yvzKeALVtyPzVxsMkvSxfuQ5rtJl0pKaWbKFwxa+AgY32emzDAI/5E4RFYr3NJK8RAao2+Gmz32fwB2kdPQknA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-events/-/oci-events-2.2.0.tgz", + "integrity": "sha512-c+8aMleAUfZZHXfk94xYUCQtLegN52Ko2dp574KQzYNkjhp2P0semC5o1cnn/NcX80PomdPXkHJAyoIdSdi7Jw==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-filestorage": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-filestorage/-/oci-filestorage-2.1.0.tgz", - "integrity": "sha512-P0593JgZg74hEfnxRuOE1Q6JauVS1WhE9oXuL1bZ99V+GEyEzksYt+mmSc1R+Xz8NsiTJcupQXvFIraO4OKe0g==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-filestorage/-/oci-filestorage-2.2.0.tgz", + "integrity": "sha512-2R0Gtev+C9MGZOmNcxwTrz91g1quYsKlYsjfYSJcxOhg7oaqFAO52xQ8AzP4VSRYnH1EsmpqHbD7NLk39gEKOw==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-functions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-functions/-/oci-functions-2.1.0.tgz", - "integrity": "sha512-mW2zwwF49Z5kLqNIgJtEjOcQdhBMN3Vm1Y4Xov5iwOZadxb7Sdur3FK4AUy0VqE90SIPC+o/naSIQp543D3jcw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-functions/-/oci-functions-2.2.0.tgz", + "integrity": "sha512-IMZHwChhrMGk12BX2hqhOv/GXLPbN+aKWL1qFlSgkik0maGABydletT5/Z29GvBXGZlawv/a40AGA3pYJjM77w==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-genericartifactscontent": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-genericartifactscontent/-/oci-genericartifactscontent-2.1.0.tgz", - "integrity": "sha512-K/UPChhLXYspYDUcX41YPVThzBfKQtAKMSeVPxmDQYLZskSaUBYFdIehcTA9jHFfzWYhQcx9MRgyVUVusEBL+g==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-genericartifactscontent/-/oci-genericartifactscontent-2.2.0.tgz", + "integrity": "sha512-Q6rCMRD4VmX2N0Eqza+OTv67TRZ2YKKROlykMAgNbPS/603CQ759p8urV7rf2b+fKdT9uvWcNvVJSy0ejCStog==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-goldengate": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-goldengate/-/oci-goldengate-2.1.0.tgz", - "integrity": "sha512-ARVfMbix4ILCeklMwjGBl0GeksQz9DgY4QD0/rNV7nXcLq/6DZ8ff7D/jrjKsZCFogqHfuVRs458x+DbYpH+XQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-goldengate/-/oci-goldengate-2.2.0.tgz", + "integrity": "sha512-7JGfYRAbXH5xE54AlisCl2Ucyy8aA9+VootuP+k8bPIJR4ZRkVXgs8++MEHaiR/E5Lv39mN7BM+rgz2CnW7K9w==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-healthchecks": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-healthchecks/-/oci-healthchecks-2.1.0.tgz", - "integrity": "sha512-OHEdGLKWYYD5VFMrFN87l/pitM0xcjTlWClSZV4evh6N8jGInKP0V5r0GLZhad8FxdVMMEV7vfi4ntzdNop79A==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-healthchecks/-/oci-healthchecks-2.2.0.tgz", + "integrity": "sha512-h1qo1xUv/Yse8FnogKTgLo0ERXNwjQ5v4ejMNeU+YaoBe08UDzju9+NinSPxVAmloAmb/04PVzaihXpfGFOTxw==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-identity": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-identity/-/oci-identity-2.1.0.tgz", - "integrity": "sha512-BPEFei8NrqdFTlFrAt3eoErijUDywcOrpzU7ojC5l9ix0rwNsEaXsrNt66IriHDnbAhZEuPx2SAyyuJS+pXfHw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-identity/-/oci-identity-2.2.0.tgz", + "integrity": "sha512-k+Vqcxv1E7jWiVIv79ncBdlzzpEUMbZWhptoXhNAN+tQPJvOdUKZf9xUnZH8JpG7wstpY+ixCYFPHr0OGYYztg==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-integration": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-integration/-/oci-integration-2.1.0.tgz", - "integrity": "sha512-X30XXYOllVEHaoqym9FsODULe3jgaFAEULcQNrh4fKae6GeFe6MGXRl/voRKkm7nr8jsxn99Nx1bLVgJRrnXFg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-integration/-/oci-integration-2.2.0.tgz", + "integrity": "sha512-0Zc86twE+FHB5f7BiHad5FMABWODnFO8LYxTZ+c6eM4OoyU6jCyet4jXIr0J7/+A+HRCrDtmjdN/vLDIzBbR0w==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-jms": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-jms/-/oci-jms-2.1.0.tgz", - "integrity": "sha512-F880/iHEly0yb7UljqjxCtudCmY4up1DwvW4PIzOSrbeYv95w4m0yJnDc4P4kAUy61OZQsBVb1vD3oyf0KsuBA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-jms/-/oci-jms-2.2.0.tgz", + "integrity": "sha512-4R3t+LVbGEk6h5LUKF/QxctueElolBnf7KGhk8yyzldbdM1TRKNwPq91wL9+JCmQ1nlvBHPb2LfLkMCy8jMBjQ==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-keymanagement": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-keymanagement/-/oci-keymanagement-2.1.0.tgz", - "integrity": "sha512-sjD6CAHgNIYNBDdLh3O4s2PVcMutxeCgNlM0vOKcqxEIAlUIKO73HGnxJmxm+jCuIXHZh3rHfmfo6FouZ545GA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-keymanagement/-/oci-keymanagement-2.2.0.tgz", + "integrity": "sha512-CUkdKiU8/qOqKejcoMrnXlI1h3jM6NBXmvwMwqP0fxMnG10gwsZdEdAb+TRZsR09moeGn4vrB4XxSfpUUTCMBQ==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-limits": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-limits/-/oci-limits-2.1.0.tgz", - "integrity": "sha512-cmyJ2HVhs40LjtjX1KEKUi2z3+8JZHfmE9kheetgDJl3zejqHydnQzA5xC9/gcjHOPs6m7dyjjPngcPf+7XQuA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-limits/-/oci-limits-2.2.0.tgz", + "integrity": "sha512-uyVYNCi+AiX46L+1izytupUTugadI0C+236w8rf0kL1FtwogIqB6b96WBwtTzcljqgCY7t5Djoi6IGzXOCJFGQ==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-loadbalancer": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-loadbalancer/-/oci-loadbalancer-2.1.0.tgz", - "integrity": "sha512-cOuM/to5VgBcvyqIxJymrtf9r4p8mN44LEdxvVxNlT5oCjGzEA8DcQrlRCIMHk8/zPpT3ENugKjei/ZFfojCrA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-loadbalancer/-/oci-loadbalancer-2.2.0.tgz", + "integrity": "sha512-l2mKcUHm2nKbJggo2CzYb//YMZAZmWMnEXA1ZDpA4nVHCk7lKkyvr/7FipsM9cd1bHy1lq0164BRl7bo1I57Ew==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-loganalytics": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-loganalytics/-/oci-loganalytics-2.1.0.tgz", - "integrity": "sha512-JiZ0PHC2jQLnwbSq3feqWXURu0TQa9zy3ZITCM1c73zOPpPxTSvDJWu9hLbB6LG4+UhA/iTCMXOAz35DrqonRg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-loganalytics/-/oci-loganalytics-2.2.0.tgz", + "integrity": "sha512-ajkY0AFYnGFwR6+KYnYbT9IEkUusF0g8WWAjtYal6vLW32FXhItPl+nCGTf1gX0vYWKOuW3/ZbEapFrrHZex/A==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-logging": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-logging/-/oci-logging-2.1.0.tgz", - "integrity": "sha512-k5k87V4+x2dJ8BGIYOXbDJm0aD9gWI3tJDV51YHTt5GN/14XAng5vPhZU+RjzUpUVtz6U/MDt+vLdsRMKQDDcA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-logging/-/oci-logging-2.2.0.tgz", + "integrity": "sha512-ywvvHPviMrYDJsHhRaaSCs0yBS4dnqAhP7p2wCTh+1n6t933nJPCp8pcpiAPJyGONcFlgO7ZzAWYoflQdQpW6A==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-loggingingestion": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-loggingingestion/-/oci-loggingingestion-2.1.0.tgz", - "integrity": "sha512-+NosIufREXFRRMAxaiqunvSjg6qyoZsgFOsdWLgdkfPwdLhxVaLgjNYX2fhWD9wuYwpyNgmbgOtWvuayemFh5w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-loggingingestion/-/oci-loggingingestion-2.2.0.tgz", + "integrity": "sha512-RLOuSX9FebHf27e50lLltgKLJMeoJHK4BI18xFNleZPRwkgdoCjvZAML2i5MTYTkVrSNzgKKBqkQ1VKDZWITgw==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-loggingsearch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-loggingsearch/-/oci-loggingsearch-2.1.0.tgz", - "integrity": "sha512-EXcAAmnRBedb0jhrmirat+yAn6MiII12srdZKAgQZ3kXRA9ai6/uWzBoSrVaYw2I7pjCrAWuJi8ByDC3nY08yQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-loggingsearch/-/oci-loggingsearch-2.2.0.tgz", + "integrity": "sha512-DnjsWmK1TQ7GbXaLtMGvEIV0RsXWCmeh0LAU7qpT4S7iFlhkU+vSl3QzVEulWV+ZrEo8Esui33BQx7WBmYGV5Q==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-managementagent": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-managementagent/-/oci-managementagent-2.1.0.tgz", - "integrity": "sha512-FcdHMS5BO0Kb4PEy+ySkUImnqjEWRBwSNI36uz6flyPgSfHw2+OOH+adPqJNZ/tQClh07Jt8VazcDK/x7QOO0Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-managementagent/-/oci-managementagent-2.2.0.tgz", + "integrity": "sha512-zrcF8Lf/oi7sy1B5ZVVyANxZ4tgrJu6bnRD99+Y3SIAP35X5EwNEKZtZUGj8OhlGNSS8cPD0SQW+JefpY4WRUQ==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-managementdashboard": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-managementdashboard/-/oci-managementdashboard-2.1.0.tgz", - "integrity": "sha512-bGrbxXm08zxUa3KIxwUyW3z3TBoA1ql7SlbctVaNwHFq/DGH4DKODKjHoaJwKelxTpM4ZQ22A9ILNg4KySo/1Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-managementdashboard/-/oci-managementdashboard-2.2.0.tgz", + "integrity": "sha512-099krNbTohzH8OH1LvECuqQoDhHRstsHBndW0wnRsS4BJ98K7tWitEueCZNUR+SplO+FrwWpLBVSHhkxH3ldDw==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-marketplace": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-marketplace/-/oci-marketplace-2.1.0.tgz", - "integrity": "sha512-6Ex8v0+pKwpZqY9ZniN5AYrau3F9suxtNqBvI72iAKLujMlLcJhkY3H75qm1KwQvOR2nrz2dOEKBtGLOhV47hQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-marketplace/-/oci-marketplace-2.2.0.tgz", + "integrity": "sha512-MJMOznpZwkyPqOuvHNSN/sM6GcCtZFFdRmZzJ+xzJw+4v685ds+oMtLjpQrA9eGK0GPfUISEFN9rlSfqj8nYyw==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-monitoring": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-monitoring/-/oci-monitoring-2.1.0.tgz", - "integrity": "sha512-q2aSu6Mxm6bFtQsNd82QxHXqV6XoUpgtjmvIH4CA7o4u9qX1Pf/AJRyzAb3TpnOhbxDilzDV4lV3ADvjKrCiuA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-monitoring/-/oci-monitoring-2.2.0.tgz", + "integrity": "sha512-wuIbVsG8016wkcVbQC1CSLL+jOeZK85LqYXLH2Q8XZaSSPbhWyg17eQjNjdx4wMXGeGLWx0YbSPwntscLhz3Ow==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-mysql": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-mysql/-/oci-mysql-2.1.0.tgz", - "integrity": "sha512-DaJ6zcwaJEr1T9gAIT51R5KSEyRRre+uofiyNuruyFjnqtnQ2eSQWv9oXOfu/MfRvoSLhMyMJUpnCTJpewN2hQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-mysql/-/oci-mysql-2.2.0.tgz", + "integrity": "sha512-qYG1OWkCJrSnktO7L3LvSSxUUvkdjVQ9mgSHykIdyO8woH8X0/gG9Xboq5m6ShKFVtzr0E7S6/qdKAE+i86SvQ==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-networkloadbalancer": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-networkloadbalancer/-/oci-networkloadbalancer-2.1.0.tgz", - "integrity": "sha512-PqPnr9jBaKRyfeeCjjPB1j37e/MPmXuVcJvPwz0qcplJdkMokhZKIFQp8vG0e53eXNROwOleVN39bXmPZhYjOA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-networkloadbalancer/-/oci-networkloadbalancer-2.2.0.tgz", + "integrity": "sha512-HdNWtefp8Wu+lP12D30UsZAQlgNtPcBxlBtkT+bGatUzfCzmX9i0LNIsUQgtFN8rnttg5gNvY0N+rFEAEvUveg==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-nosql": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-nosql/-/oci-nosql-2.1.0.tgz", - "integrity": "sha512-KzEx5QImXTErzzst3+IxKjOgykFgwtZvTIoMLNWHs+3nHR7upXmJVhidUl47EmQ6CJkMJyAjqhOBY9MPDJBpXA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-nosql/-/oci-nosql-2.2.0.tgz", + "integrity": "sha512-YufjnPFCoKun4hf5++VNtUGW4zNmLw086N/wlqjddIrRSWwdCNG4cO49tKxNw1aHY445qDXno4cp6me+arsrRA==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-objectstorage": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-objectstorage/-/oci-objectstorage-2.1.0.tgz", - "integrity": "sha512-RqbldmrztLNPTtqB2W5lHh3prGfbzQvMLwx6OD7px5m7Pkom1kkTR5L4fW1RY7IHf7HskF5Oynq6/7B3U6m1pw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-objectstorage/-/oci-objectstorage-2.2.0.tgz", + "integrity": "sha512-xSidrgrZW1BWSjxaT4z0b8hV9bsu3jwQPBdHgPZ/a00BBWk8QB2RxDMWR/al1WH67n1UtNRvD43dLoBT2Qbtvw==", "requires": { "await-semaphore": "^0.1.3", - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-oce": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-oce/-/oci-oce-2.1.0.tgz", - "integrity": "sha512-04ziaLxctdNUiSKvKw/4+lMS1dK0SibGDjebqB77I6XgdAaxISoMBJ91CVU01VyAf65/csOcK3xfyPu0dsNLxA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-oce/-/oci-oce-2.2.0.tgz", + "integrity": "sha512-ULcyuoSNCOK2FsvN1hPGsIEFklz14avdmsK0eI52obPahLZgz4ATxljSCbxIpYHRX0v5pDXpuVPfuiyyO73DuQ==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-ocvp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-ocvp/-/oci-ocvp-2.1.0.tgz", - "integrity": "sha512-rzkqoJh64+wAhKKOOtmgLuSXdKKV5S+xeIMEOjXbf4sdaThPynbNtjvrqgZmdUJBE5ZrOo9WTw7VyidERHt/Jg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-ocvp/-/oci-ocvp-2.2.0.tgz", + "integrity": "sha512-Pu8gvaF0t9oUisFbCNGUbN786qz6XpCZuGUjSY6u6XTpFhOdZZX5nYzUNtdKweQOCsnO9oDEqy9a6Q+wVjz1oA==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-oda": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-oda/-/oci-oda-2.1.0.tgz", - "integrity": "sha512-Vgvtq9Z3lK2UFPCIaNiQCNV+IP+In3OWp6wB3X3w7VGcUOuMaI7LQ2zd1I55G2hse1RvlJDllesXoWP80EPX3Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-oda/-/oci-oda-2.2.0.tgz", + "integrity": "sha512-g1ZI5bENwUm/gmRFSsPNdGDBUHK2cyt+gI1Q80/rro27/wtxJFZHX1mzc0lOJ2aOqYu8Ay9NmkmC5MfYFxcomA==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-ons": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-ons/-/oci-ons-2.1.0.tgz", - "integrity": "sha512-Q046+cPOTFk/cI1l07h2MZntI72uenJpLbmvron8EOxxArJbryJ1R+3bkF4IaMliYVszmp3JVbqW+vKwc15myg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-ons/-/oci-ons-2.2.0.tgz", + "integrity": "sha512-IU4HoAZItpZ9L3/F6btXT4czZBkWJkoAC4vsDvMq2yrU/z9eCWVbJXv2xbTbeMrhtcWpxxNdf2qlhBc+LkZjng==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-operatoraccesscontrol": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-operatoraccesscontrol/-/oci-operatoraccesscontrol-2.1.0.tgz", - "integrity": "sha512-dAKxkd30facttTXMYwVMRi2UWCS0a21vJDNz0TkEyky+H4rPQyRsYA7wEZRV0ketUk2fW5y2lSji612ymxgD+Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-operatoraccesscontrol/-/oci-operatoraccesscontrol-2.2.0.tgz", + "integrity": "sha512-PL7e1Tpr7R+wjZedRGzfs+0lRHx2rp2lKzsZftwSVy+DYFW77xsiOeXpdAzZ8kAGgDgxMlT/rHAnn0eUn07Rww==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-opsi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-opsi/-/oci-opsi-2.1.0.tgz", - "integrity": "sha512-qKrCFPNCGkX2ztDC6iQYgxNDc20QKRtRv+D221X6rU586UlZK0whCX9Nz4l1zpyor8OPIG2KldCVqG6sbtvgKg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-opsi/-/oci-opsi-2.2.0.tgz", + "integrity": "sha512-g4Vqa9sQsuXZz4XiDdwjGGynQ2vsD4CdxjI0sXWEG7pL8I4Lag9D3gnJSLKV63RGIhiZKRjRsbhr9kWsg/RU5g==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-optimizer": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-optimizer/-/oci-optimizer-2.1.0.tgz", - "integrity": "sha512-8D/nyVJZa/09sD0WEFwNmbys8FpUm4U0T5ArMfT0wvEpEh9SNvPr1cM1LiVZsiOJQP0XkKi7abEpzn+l+W4tDg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-optimizer/-/oci-optimizer-2.2.0.tgz", + "integrity": "sha512-SWxkSL0sjYi06DJ3c/Yh3iJbJtK8inP4Wf56q2bFgVIEwJEkWW5dDOu36XdbJ4T5Mhg/FsuvfgMVVOBLKH5PEg==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-osmanagement": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-osmanagement/-/oci-osmanagement-2.1.0.tgz", - "integrity": "sha512-eDEhrXUgRV3mN9Ys5OOBJZ0Nz+4L0NQfX8yFgq/rUrFMpRrRi9QsbzOGzhXtfj1LYaSkH28gEINzhOvfsF4MBg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-osmanagement/-/oci-osmanagement-2.2.0.tgz", + "integrity": "sha512-yD8d3gQQzifpph+AjtetdxPjdsouXMxqyO3YeW/F5I/VK1OpzEtZDEfhs5BK1K2WPFbJk6tjCqkE8riqqz8e4Q==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-resourcemanager": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-resourcemanager/-/oci-resourcemanager-2.1.0.tgz", - "integrity": "sha512-/J4qjFXfNGqamBe/0+m5DHIdvWK6yav2n/Gj6/+TTpoQQLBefHj2fdm6+9Escst3tmbI18siYKq6YWcC2b3PbA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-resourcemanager/-/oci-resourcemanager-2.2.0.tgz", + "integrity": "sha512-zXj16L3NJnRBnvOx4Uy3cYZ0R4672mp/hJyJtpm4bwCB3W8hyp3FQcRyWVg/+8To4uuv9VYbFNbUDAnatKSQJw==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-resourcesearch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-resourcesearch/-/oci-resourcesearch-2.1.0.tgz", - "integrity": "sha512-oAO6CHNRUJGCbannOoLtKIGb4kS+JHr7LhSctmRHhSly5g6DMdKH7SQ/iYV4ULnOQQbI3yj8eJyrt5NVZjbb/w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-resourcesearch/-/oci-resourcesearch-2.2.0.tgz", + "integrity": "sha512-ndxk9oDgm0hsjLkbgx8yXuEBb7WPTpXUjBy82iUFW8ZEd56P/rDUxukwrtAO61jrw3AoBB2xluFzgQ+GZFg2mA==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-rover": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-rover/-/oci-rover-2.1.0.tgz", - "integrity": "sha512-iU6mtswuUOoT76XFyxPfROexWXdOnSqyWH59j5cdtu9zfMGYi+NfFAaRt54qX5XhGEWySSgqIv/6VTdhEfdUUg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-rover/-/oci-rover-2.2.0.tgz", + "integrity": "sha512-fNYgJ63EhcpV33bpMnWYJLELZk+ifOqG9/irV4EZjWok5lqbdztZ/jQnjfWhk4MRPOU1JZzcK8TX0JEpUa6rJQ==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-sch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-sch/-/oci-sch-2.1.0.tgz", - "integrity": "sha512-LoU7wM5dye1TvXmv+9+LoVlqrPPP6GWdd0F+49XE3huW2rmJRtGPmA1hE+pOQlcda9IWGBKfy1nkvWRnTKLYXg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-sch/-/oci-sch-2.2.0.tgz", + "integrity": "sha512-o1MDk/jn8JeEn08gMCqfb/aifjune894Xzc2qOuAFKu3e0STR9F0bdZi2DWFaokLVM9qkMe+pkjvh9uw1nIW3Q==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-sdk": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-sdk/-/oci-sdk-2.1.0.tgz", - "integrity": "sha512-pfRaGjwvplvWWAQoS7nCC5O57Vf4lrqTG9VOWHiWHL6XXmA7xhG3dcDnX2S9w6G49rhA/xPtlDB2oC+RMvEgZA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-sdk/-/oci-sdk-2.2.0.tgz", + "integrity": "sha512-cq8iFGgpANSwlZTilmu7/hDNrdsSVX5g+n+GOe0inYtjLghFQiE9n9ak4lzA5Kftf424mf4sk+jFNdKQQz6gVg==", "requires": { - "oci-aianomalydetection": "2.1.0", - "oci-ailanguage": "2.1.0", - "oci-analytics": "2.1.0", - "oci-announcementsservice": "2.1.0", - "oci-apigateway": "2.1.0", - "oci-apmcontrolplane": "2.1.0", - "oci-apmsynthetics": "2.1.0", - "oci-apmtraces": "2.1.0", - "oci-applicationmigration": "2.1.0", - "oci-artifacts": "2.1.0", - "oci-audit": "2.1.0", - "oci-autoscaling": "2.1.0", - "oci-bastion": "2.1.0", - "oci-bds": "2.1.0", - "oci-blockchain": "2.1.0", - "oci-budget": "2.1.0", - "oci-cims": "2.1.0", - "oci-cloudguard": "2.1.0", - "oci-common": "2.1.0", - "oci-computeinstanceagent": "2.1.0", - "oci-containerengine": "2.1.0", - "oci-core": "2.1.0", - "oci-database": "2.1.0", - "oci-databasemanagement": "2.1.0", - "oci-databasemigration": "2.1.0", - "oci-datacatalog": "2.1.0", - "oci-dataflow": "2.1.0", - "oci-dataintegration": "2.1.0", - "oci-datasafe": "2.1.0", - "oci-datascience": "2.1.0", - "oci-devops": "2.1.0", - "oci-dns": "2.1.0", - "oci-dts": "2.1.0", - "oci-email": "2.1.0", - "oci-events": "2.1.0", - "oci-filestorage": "2.1.0", - "oci-functions": "2.1.0", - "oci-genericartifactscontent": "2.1.0", - "oci-goldengate": "2.1.0", - "oci-healthchecks": "2.1.0", - "oci-identity": "2.1.0", - "oci-integration": "2.1.0", - "oci-jms": "2.1.0", - "oci-keymanagement": "2.1.0", - "oci-limits": "2.1.0", - "oci-loadbalancer": "2.1.0", - "oci-loganalytics": "2.1.0", - "oci-logging": "2.1.0", - "oci-loggingingestion": "2.1.0", - "oci-loggingsearch": "2.1.0", - "oci-managementagent": "2.1.0", - "oci-managementdashboard": "2.1.0", - "oci-marketplace": "2.1.0", - "oci-monitoring": "2.1.0", - "oci-mysql": "2.1.0", - "oci-networkloadbalancer": "2.1.0", - "oci-nosql": "2.1.0", - "oci-objectstorage": "2.1.0", - "oci-oce": "2.1.0", - "oci-ocvp": "2.1.0", - "oci-oda": "2.1.0", - "oci-ons": "2.1.0", - "oci-operatoraccesscontrol": "2.1.0", - "oci-opsi": "2.1.0", - "oci-optimizer": "2.1.0", - "oci-osmanagement": "2.1.0", - "oci-resourcemanager": "2.1.0", - "oci-resourcesearch": "2.1.0", - "oci-rover": "2.1.0", - "oci-sch": "2.1.0", - "oci-secrets": "2.1.0", - "oci-servicecatalog": "2.1.0", - "oci-streaming": "2.1.0", - "oci-tenantmanagercontrolplane": "2.1.0", - "oci-usageapi": "2.1.0", - "oci-vault": "2.1.0", - "oci-vulnerabilityscanning": "2.1.0", - "oci-waas": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-aianomalydetection": "2.2.0", + "oci-ailanguage": "2.2.0", + "oci-analytics": "2.2.0", + "oci-announcementsservice": "2.2.0", + "oci-apigateway": "2.2.0", + "oci-apmcontrolplane": "2.2.0", + "oci-apmsynthetics": "2.2.0", + "oci-apmtraces": "2.2.0", + "oci-applicationmigration": "2.2.0", + "oci-artifacts": "2.2.0", + "oci-audit": "2.2.0", + "oci-autoscaling": "2.2.0", + "oci-bastion": "2.2.0", + "oci-bds": "2.2.0", + "oci-blockchain": "2.2.0", + "oci-budget": "2.2.0", + "oci-cims": "2.2.0", + "oci-cloudguard": "2.2.0", + "oci-common": "2.2.0", + "oci-computeinstanceagent": "2.2.0", + "oci-containerengine": "2.2.0", + "oci-core": "2.2.0", + "oci-database": "2.2.0", + "oci-databasemanagement": "2.2.0", + "oci-databasemigration": "2.2.0", + "oci-datacatalog": "2.2.0", + "oci-dataflow": "2.2.0", + "oci-dataintegration": "2.2.0", + "oci-datasafe": "2.2.0", + "oci-datascience": "2.2.0", + "oci-devops": "2.2.0", + "oci-dns": "2.2.0", + "oci-dts": "2.2.0", + "oci-email": "2.2.0", + "oci-events": "2.2.0", + "oci-filestorage": "2.2.0", + "oci-functions": "2.2.0", + "oci-genericartifactscontent": "2.2.0", + "oci-goldengate": "2.2.0", + "oci-healthchecks": "2.2.0", + "oci-identity": "2.2.0", + "oci-integration": "2.2.0", + "oci-jms": "2.2.0", + "oci-keymanagement": "2.2.0", + "oci-limits": "2.2.0", + "oci-loadbalancer": "2.2.0", + "oci-loganalytics": "2.2.0", + "oci-logging": "2.2.0", + "oci-loggingingestion": "2.2.0", + "oci-loggingsearch": "2.2.0", + "oci-managementagent": "2.2.0", + "oci-managementdashboard": "2.2.0", + "oci-marketplace": "2.2.0", + "oci-monitoring": "2.2.0", + "oci-mysql": "2.2.0", + "oci-networkloadbalancer": "2.2.0", + "oci-nosql": "2.2.0", + "oci-objectstorage": "2.2.0", + "oci-oce": "2.2.0", + "oci-ocvp": "2.2.0", + "oci-oda": "2.2.0", + "oci-ons": "2.2.0", + "oci-operatoraccesscontrol": "2.2.0", + "oci-opsi": "2.2.0", + "oci-optimizer": "2.2.0", + "oci-osmanagement": "2.2.0", + "oci-resourcemanager": "2.2.0", + "oci-resourcesearch": "2.2.0", + "oci-rover": "2.2.0", + "oci-sch": "2.2.0", + "oci-secrets": "2.2.0", + "oci-servicecatalog": "2.2.0", + "oci-streaming": "2.2.0", + "oci-tenantmanagercontrolplane": "2.2.0", + "oci-usageapi": "2.2.0", + "oci-vault": "2.2.0", + "oci-vulnerabilityscanning": "2.2.0", + "oci-waas": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-secrets": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-secrets/-/oci-secrets-2.1.0.tgz", - "integrity": "sha512-avp+Qa6l+RDVf6pAxGKCzVbzFhcj0bJc+T0M0kwv+eaBwncRS/ztw0pP9tGJZ/PjCNAiW621d4NymVbptq2frQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-secrets/-/oci-secrets-2.2.0.tgz", + "integrity": "sha512-7ixqvSxNFmaDm6J4jShyQtww0atcl9N/ZWuQybyfY7EwSMz0GOvST4gwy1DD6rsHr7ZTeZW85GJIhKdgArlCxw==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-servicecatalog": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-servicecatalog/-/oci-servicecatalog-2.1.0.tgz", - "integrity": "sha512-8hSP81lpuhTCYzPbrDKus82DNNpiqDqeYLjBrO7jJRQoKvY6gc1mtleAEU2L9irT5HDzsFzYpymIhGuBERiN6A==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-servicecatalog/-/oci-servicecatalog-2.2.0.tgz", + "integrity": "sha512-7hXkHjzxHkMt5Mgr+qJLDCQeXQJhrvWZUB/vbLYZ3ouuuGuxVZLsoPjMr7JOILV8w5LhqflL6QEl37J2t3VQhQ==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-streaming": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-streaming/-/oci-streaming-2.1.0.tgz", - "integrity": "sha512-QcN5qaMF0tH1nXs+CndLWUa/irnjUaR5ExNXa6pNS6BY/1YlxglkbIPVB/JOkh2eyZKLbelvRHwgk4oq4tkWxg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-streaming/-/oci-streaming-2.2.0.tgz", + "integrity": "sha512-a/a9Kpj6QNgb39lKlyCEAcNCQj9zzwU1JWME9QlkvflNa8A3QOJGyJB2Hxnc947gC6R04lJpeLE45oKVG2Z+sQ==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-tenantmanagercontrolplane": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-tenantmanagercontrolplane/-/oci-tenantmanagercontrolplane-2.1.0.tgz", - "integrity": "sha512-ZUrDiLBAT+EWdVJrVjgduCheZsjiBspYhbVBDAUIQc79tnTmheSatW6DoytvQ4nxT919Gn2+Ep11NaqmkZDbUw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-tenantmanagercontrolplane/-/oci-tenantmanagercontrolplane-2.2.0.tgz", + "integrity": "sha512-Ar0zgneeFFXpvUJw69lWbL96gbdRC+Kf8IUmoKLfK1B3qWsJZCnlQxN2IJi4Vs5ry3+ULUjp8Iy5wm/+lBntWQ==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-usageapi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-usageapi/-/oci-usageapi-2.1.0.tgz", - "integrity": "sha512-Nyy+MUwKz/UBMEcuaTXQgHIacJknGbAvM+ddPACnqdloMcqOH9Fje4Th4Wt1tV4HzBRbBcGu/+cWlVoAVDeIqg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-usageapi/-/oci-usageapi-2.2.0.tgz", + "integrity": "sha512-OMwJvLYzkXqL+DhHcaSos9L8/qAyx0AoZkCn9/uD1jRH1dNJLlfZh5GxQ42Q/WdGa1ukqnq4yl6p6P4BZqg2Kg==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-vault": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-vault/-/oci-vault-2.1.0.tgz", - "integrity": "sha512-W65FbkxS5hJdQQDeHEeyQb5QuAxa413tC7wC4pETxm3jOqiXrg0PwAv5W6w5ZZLucX/Saml6IpxVWWTZEQGduw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-vault/-/oci-vault-2.2.0.tgz", + "integrity": "sha512-sZR/Ad/VtXXl59Ub8opjOmdwbSFo4Lbe/dBq2ni/pcyxw73vJE+9l0NAohRZrSwJaD0SD8DsCvea7qmhc2+O5A==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-vulnerabilityscanning": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-vulnerabilityscanning/-/oci-vulnerabilityscanning-2.1.0.tgz", - "integrity": "sha512-UaNB0V4E7M88v2Oh5Vnx9oAP1/2XXH/y7+6fHtpni38mUotUS7ij32Fhq4JwQGAICgd0wmPi2+XlOHVKvFz/Pw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-vulnerabilityscanning/-/oci-vulnerabilityscanning-2.2.0.tgz", + "integrity": "sha512-EuYaD/yJ4SD3cuftF5Bgav2sHOgbIKH8h1Fo5yD5DLLc9jzkPpoRKBR1zM6nI5AsoVbJMaNaGNs+Ooua4l9GdQ==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-waas": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-waas/-/oci-waas-2.1.0.tgz", - "integrity": "sha512-MC02XRqoE9Z59cRC3ZXIrFWZzRzaBkMDmn7fxnCKOPu1auyMqR9nmxv0CL0/x0SZ2eC4b6RiK3Y9cByWJvvebA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-waas/-/oci-waas-2.2.0.tgz", + "integrity": "sha512-y2DHh2v0fjUHGJTc7fehgqTvfJK+EjD3JQXpbRc8K+iQz9hGdtjX93g2xcfkc+ZYpzCrJXVAXJ0fd7Uzzu0Dcw==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "oci-workrequests": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/oci-workrequests/-/oci-workrequests-2.1.0.tgz", - "integrity": "sha512-ipPkx8sePS+NfBQU5kz6aLKOxMDc2UOJ3IhWmZUoUoLdXd16gBFMhsBLGpfj6tM0CNHZCL1kFz+t+HU5EJ6C6g==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/oci-workrequests/-/oci-workrequests-2.2.0.tgz", + "integrity": "sha512-lOGmUjXhuiqGR63Odnqw5IAKEzXAP3ufjNczqNWNLptxWLFkL+dE/yprIdLhUhHVilXj8e8HKirnHVJk5bHpvQ==", "requires": { - "oci-common": "2.1.0", - "oci-workrequests": "2.1.0" + "oci-common": "2.2.0", + "oci-workrequests": "2.2.0" } }, "on-finished": { -- 2.50.0 From eda836d0274732f4f1aacb9d34ad2e9bb34b1b7a Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Thu, 19 Aug 2021 21:55:42 -0300 Subject: [PATCH 18/29] Actions --- .github/workflows/tag_version.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tag_version.yml b/.github/workflows/tag_version.yml index 214596f..7dea2e7 100644 --- a/.github/workflows/tag_version.yml +++ b/.github/workflows/tag_version.yml @@ -1,9 +1,8 @@ name: Npm Packages Stable and Docker Image on: - push: - tags: - - v** - - V** + release: + types: + - created env: DOCKER_ARCH: linux/amd64,linux/arm64,linux/arm/v7 @@ -11,7 +10,7 @@ env: jobs: npm: runs-on: ubuntu-latest - if: ${{ github.actor }} == ${{ github.repository_owner }} + if: ${{ github.actor }} == ${{ github.repository_owner }} && (contains('tag', ${{ github.ref }}) && contains('v', ${{ github.ref }}) || contains('V', ${{ github.ref }})) steps: - uses: actions/checkout@master - uses: actions/setup-node@v2.4.0 @@ -25,7 +24,12 @@ jobs: - name: Publish run: npm publish env: - NODE_AUTH_TOKEN: "${{ secrets.NPM_ORG_TOKEN }}" + NODE_AUTH_TOKEN: '${{ secrets.NPM_ORG_TOKEN }}' + + - name: Remove Dev Versions + run: npm run remove_dev_versions + env: + NODE_AUTH_TOKEN: '${{ secrets.NPM_ORG_TOKEN }}' docker_core: needs: [npm] -- 2.50.0 From a0cc1b6e60a4415f6c2f4a043507825123b40c68 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Thu, 19 Aug 2021 22:02:51 -0300 Subject: [PATCH 19/29] Remove Dev Package init --- .Build/RemoveVersions.js | 26 ++++ .gitignore | 3 +- package-lock.json | 292 +++++++++++++++++++++++++++++++++++++++ package.json | 4 +- 4 files changed, 323 insertions(+), 2 deletions(-) create mode 100644 .Build/RemoveVersions.js diff --git a/.Build/RemoveVersions.js b/.Build/RemoveVersions.js new file mode 100644 index 0000000..5d4f9e6 --- /dev/null +++ b/.Build/RemoveVersions.js @@ -0,0 +1,26 @@ +const child_process = require("child_process"); +const fs = require("fs"); +const path = require("path"); +const cli_color = require("cli-color"); + +// Fetch +if (typeof fetch === "undefined") global.fetch = require("node-fetch"); + +fetch("https://registry.npmjs.org/@the-bds-maneger/core").then(res => res.json()).then(data => { + data.versions = Object.getOwnPropertyNames(data.versions).filter(version => /[0-9]+\.[0-9][0-9][0-9]/.test(version) && version !== data["dist-tags"].dev && version !== data["dist-tags"].latest) + fs.writeFileSync(path.resolve(__dirname, "Releases.json"), JSON.stringify(data, null, 2)); + const Package = require("../package.json"); + data.versions.map(version => { + const cmd = `npm unpublish ${Package.name}@${version}`; + console.log(cli_color.yellow(cmd)); + try { + child_process.execSync(cmd).toString() + console.log(cli_color.green(`Sucess to remove ${Package.name}@${version}`, "\n")); + return cmd; + } catch (e) { + console.log(cli_color.red(`Failed to remove package: ${Package.name}@${version}`), "\n"); + return version; + } + }); + fs.writeFileSync(path.resolve(__dirname, "Releases.json"), JSON.stringify(data, null, 2)); +}); \ No newline at end of file diff --git a/.gitignore b/.gitignore index 99a5e25..881f58c 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,5 @@ Bds-Maneger-Core # ** .husky -Servers \ No newline at end of file +Servers +.Build/Releases.json \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index eb27053..3c188ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@the-bds-maneger/fetchsync": "github:The-Bds-Maneger/fetchSync", "adm-zip": "^0.5.1", "body-parser": "^1.19.0", + "cli-color": "^2.0.0", "cors": "^2.8.5", "cron": "^1.8.2", "express": "^4.17.1", @@ -1235,6 +1236,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/cli-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.0.tgz", + "integrity": "sha512-a0VZ8LeraW0jTuCkuAGMNufareGHhyZU9z8OGsW0gXd1hZGi1SRuNRXdbGkraBBKnhyUhyebFWnRbp+dIn0f0A==", + "dependencies": { + "ansi-regex": "^2.1.1", + "d": "^1.0.1", + "es5-ext": "^0.10.51", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.14", + "timers-ext": "^0.1.7" + } + }, + "node_modules/cli-color/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/cli-cursor": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", @@ -1449,6 +1471,15 @@ "node": ">=8" } }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, "node_modules/dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -2100,11 +2131,51 @@ "node": ">=8.6" } }, + "node_modules/es5-ext": { + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "dependencies": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" + } + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, "node_modules/es6-promise": { "version": "4.2.6", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz", "integrity": "sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q==" }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "node_modules/es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, "node_modules/escape-goat": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", @@ -2383,6 +2454,15 @@ "node": ">= 0.6" } }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, "node_modules/event-target-shim": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", @@ -2460,6 +2540,14 @@ "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-5.3.0.tgz", "integrity": "sha512-qJhfEgCnmteSeZAeuOKQ2WEIFTX5ajrzE0xS6gCOBCoRQcU+xEzQmgYQQTpzCcqUAAzTEtu4YEih4pnLfvNtew==" }, + "node_modules/ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "dependencies": { + "type": "^2.0.0" + } + }, "node_modules/ext-list": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", @@ -2485,6 +2573,11 @@ "node": ">=4" } }, + "node_modules/ext/node_modules/type": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", + "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==" + }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -3408,6 +3501,11 @@ "node": ">=0.10.0" } }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" + }, "node_modules/is-retry-allowed": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", @@ -3823,6 +3921,14 @@ "node": ">=10" } }, + "node_modules/lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=", + "dependencies": { + "es5-ext": "~0.10.2" + } + }, "node_modules/make-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", @@ -3862,6 +3968,26 @@ "node": ">= 0.6" } }, + "node_modules/memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + } + }, + "node_modules/memoizee/node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" + }, "node_modules/merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -4150,6 +4276,11 @@ "node": ">=4" } }, + "node_modules/next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, "node_modules/node-cron": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/node-cron/-/node-cron-3.0.0.tgz", @@ -6571,6 +6702,15 @@ "node": ">=0.10.0" } }, + "node_modules/timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "dependencies": { + "es5-ext": "~0.10.46", + "next-tick": "1" + } + }, "node_modules/to-buffer": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", @@ -6682,6 +6822,11 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -7961,6 +8106,26 @@ "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", "dev": true }, + "cli-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.0.tgz", + "integrity": "sha512-a0VZ8LeraW0jTuCkuAGMNufareGHhyZU9z8OGsW0gXd1hZGi1SRuNRXdbGkraBBKnhyUhyebFWnRbp+dIn0f0A==", + "requires": { + "ansi-regex": "^2.1.1", + "d": "^1.0.1", + "es5-ext": "^0.10.51", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.14", + "timers-ext": "^0.1.7" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + } + } + }, "cli-cursor": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", @@ -8129,6 +8294,15 @@ "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", "dev": true }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -8652,11 +8826,51 @@ "ansi-colors": "^4.1.1" } }, + "es5-ext": { + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, "es6-promise": { "version": "4.2.6", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz", "integrity": "sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q==" }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "requires": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, "escape-goat": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", @@ -8867,6 +9081,15 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, "event-target-shim": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", @@ -8932,6 +9155,21 @@ "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-5.3.0.tgz", "integrity": "sha512-qJhfEgCnmteSeZAeuOKQ2WEIFTX5ajrzE0xS6gCOBCoRQcU+xEzQmgYQQTpzCcqUAAzTEtu4YEih4pnLfvNtew==" }, + "ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "requires": { + "type": "^2.0.0" + }, + "dependencies": { + "type": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", + "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==" + } + } + }, "ext-list": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", @@ -9646,6 +9884,11 @@ "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", "dev": true }, + "is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" + }, "is-retry-allowed": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", @@ -10003,6 +10246,14 @@ "yallist": "^4.0.0" } }, + "lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=", + "requires": { + "es5-ext": "~0.10.2" + } + }, "make-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", @@ -10032,6 +10283,28 @@ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, + "memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "requires": { + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + }, + "dependencies": { + "next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" + } + } + }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -10239,6 +10512,11 @@ } } }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, "node-cron": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/node-cron/-/node-cron-3.0.0.tgz", @@ -12259,6 +12537,15 @@ "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", "dev": true }, + "timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "requires": { + "es5-ext": "~0.10.46", + "next-tick": "1" + } + }, "to-buffer": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", @@ -12345,6 +12632,11 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/package.json b/package.json index 4bd2878..5079c74 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "eslint": "eslint --debug .", "eslint:fix": "eslint --debug --fix .", "nexe": "node .Build/nexe_build.js", - "Docker": "node .Build/DockerImage.js" + "Docker": "node .Build/DockerImage.js", + "remove_dev_versions": "node .Build/RemoveVersions.js" }, "bin": { "bds_maneger": "bin/bds_maneger.js", @@ -56,6 +57,7 @@ "@the-bds-maneger/fetchsync": "github:The-Bds-Maneger/fetchSync", "adm-zip": "^0.5.1", "body-parser": "^1.19.0", + "cli-color": "^2.0.0", "cors": "^2.8.5", "cron": "^1.8.2", "express": "^4.17.1", -- 2.50.0 From f461866ad8780d312f3bf856facd59da70d0b262 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Thu, 19 Aug 2021 23:23:14 -0300 Subject: [PATCH 20/29] CLI --- bin/bds_maneger.js | 60 +++++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 24 deletions(-) diff --git a/bin/bds_maneger.js b/bin/bds_maneger.js index 3e0fee9..2fc4b5d 100755 --- a/bin/bds_maneger.js +++ b/bin/bds_maneger.js @@ -1,5 +1,7 @@ #!/usr/bin/env node const readline = require("readline"); +const cli_color = require("cli-color"); +const BdsConfigAndInfo = require("../BdsManegerInfo.json"); if (process.platform === "win32") process.title = "Bds Maneger CLI"; else process.title = "Bds-Manger-CLI"; process.env.IS_BDS_CLI = process.env.IS_BIN_BDS = true; @@ -12,7 +14,6 @@ const SystemInfo = require("../lib/BdsSystemInfo"); const { bds_dir, GetServerVersion, GetPlatform, UpdatePlatform, GetServerPaths, GetPaths } = require("../lib/BdsSettings"); const commandExits = require("../lib/commandExist"); const download = require("../src/BdsServersDownload"); -const BdsConfigAndInfo = require("../BdsManegerInfo.json"); // Options const @@ -33,6 +34,7 @@ if (kill) bds.kill(); // Set Bds Platform if (server) UpdatePlatform(server); +// Start Server async function StartServer(){ const Servers = (await (await fetch(BdsConfigAndInfo.Fetchs.servers)).json()); // Check Server Update @@ -43,21 +45,24 @@ async function StartServer(){ "And we strongly recommend keeping the servers up to date, to maintain compatibility between game versions.", `At any time you can update using the options -p ${GetPlatform()} -d "${Servers.latest[GetPlatform()]}"` ] - console.log(message.join("\n")) + console.log(cli_color.yellow(message.join("\n"))); } } else if (Versions[GetPlatform()] === null) { - console.log("Install Server"); + console.log(cli_color.red("Install Server")); process.exit(1) } try { - console.log("Send a \"@stop\" command to stop the server and exit\nUse CTRL + C to force exit\n"); + console.log(cli_color.yellow("Send a \"@stop\" command to stop the server and exit\nUse CTRL + C to force exit"), "\n"); // Start Server const bds_server = bds.start(); - bds_server.log(data => process.stdout.write(data)); + bds_server.log(data => process.stdout.write(cli_color.cyan(data))); bds_server.exit(function (code){ - if (code === 3221225781 && process.platform === "win32") return open("https://docs.the-bds-maneger.org/Bds Maneger core/WindowsFixDll"); - console.log("leaving the server, status code:", code); - process.exit(code) + if (code === 3221225781 && process.platform === "win32") { + console.log(cli_color.red("Open the url: https://docs.the-bds-maneger.org/Bds Maneger core/WindowsFixDll")); + return open("https://docs.the-bds-maneger.org/Bds Maneger core/WindowsFixDll"); + } + console.log(cli_color.red(`"leaving the server, status code: ${code}"`)); + process.exit(code); }); // CLI Commands @@ -72,7 +77,7 @@ async function StartServer(){ else bds_server.command(input); }); rl.on("close", ()=>{ - console.log("CTRL + C closed readline, stopping server"); + console.log(cli_color.redBright("stopping server")); bds_server.stop(); }) bds_server.exit(function(c){ @@ -80,7 +85,7 @@ async function StartServer(){ }) bds.api(); } catch (err) { - console.log(`Bds Maneger Start Server Error: \n******\n${err}`); + console.log(cli_color.redBright(`Bds Maneger Start Server Error: \n******\n${err}`)); process.exit(2) } } @@ -100,7 +105,7 @@ if (help) { " -h --help Print this list and exit.", " -v --version Print the version and exit." ] - console.log(help.join("\n")); + console.log(cli_color.yellow(help.join("\n"))); process.exit(); } @@ -128,30 +133,37 @@ if (SystemCheck) { if (process.platform === "linux" && bds.arch !== "x64"){checkothearch = `qemu-x86_64-static is installed to emulate an x64 system: ${commandExits("qemu-x86_64-static")}\n`} if (process.platform === "android" && bds.arch !== "x64"){checkothearch = `qemu-x86_64 is installed to emulate an x64 system: ${commandExits("qemu-x86_64")}\n`} const help = [ - `Bds Maneger Core version: ${bds.package_json.version}`, - `System: ${process.platform}, architecture: ${bds.arch}`, + `Bds Maneger Core And Bds Maneger CLI version: ${cli_color.magentaBright(bds.package_json.version)}`, + `System: ${cli_color.yellow(process.platform)}, architecture: ${cli_color.blue(bds.arch)}`, checkothearch, "**************************************************************", "* Bds Maneger dirs:", - `* - Config: ${bds_dir}`, - `* - Players File: ${GetPaths("player")}`, + `* - Config: ${cli_color.yellowBright(bds_dir)}`, + `* - Players File: ${cli_color.yellowBright(GetPaths("player"))}`, "*", "* Bds Servers dirs:", - `* - Bedrock Server: ${GetServerPaths("bedrock")}`, - `* - Java Server: ${GetServerPaths("java")}`, - `* - Pocketmine-MP Server: ${GetServerPaths("pocketmine")}`, - `* - JSPrismarine Server: ${GetServerPaths("jsprismarine")}`, + `* - Bedrock Server: ${cli_color.yellowBright(GetServerPaths("bedrock"))}`, + `* - Pocketmine-MP Server: ${cli_color.yellowBright(GetServerPaths("pocketmine"))}`, + `* - Dragonfly: ${cli_color.yellowBright(GetServerPaths("dragonfly"))}`, + `* - Java Server: ${cli_color.yellowBright(GetServerPaths("java"))}`, + `* - Spigot Server: ${cli_color.yellowBright(GetServerPaths("spigot"))}`, "*", "**************************************************************", "* Servers currently available:", `* - Bedrock: ${SystemInfo.valid_platform.bedrock}`, - `* - Java: ${SystemInfo.valid_platform.java}`, `* - Pocketmine-MP: ${SystemInfo.valid_platform.pocketmine}`, - `* - JSPrismarine: ${SystemInfo.valid_platform.jsprismarine}`, + `* - Dragonfly: ${SystemInfo.valid_platform.dragonfly}`, + `* - Java: ${SystemInfo.valid_platform.java}`, + `* - Spigot: ${SystemInfo.valid_platform.java}`, "*", "**************************************************************" ]; - console.log(help.join("\n")) + console.log( + cli_color.whiteBright(help.join("\n") + .replace(/true/gi, cli_color.greenBright("true")) + .replace(/false/gi, cli_color.redBright("false")) + .replace(/undefined/gi, cli_color.red("undefined")) + )); process.exit(0) } @@ -180,9 +192,9 @@ if (bds_version){ } console.log(`Selected platform: ${GetPlatform()}, Total available versions: ${Version.length}`); - console.log("Option Version"); + console.log(`${cli_color.red("Option")} ${cli_color.green("Version")}`); - for (let option in Version) console.log(`${parseInt(option) + 1} -------- ${Version[option]}`); + for (let option in Version) console.log(`${cli_color.red(parseInt(option) + 1)}: ${cli_color.green(Version[option])}`); StartQuestion(readline.createInterface({input: process.stdin,output: process.stdout})); } else bds.download(bds_version, true, function(){ -- 2.50.0 From ead6c2d07e522c8c39837aa25c4fb12bfe333477 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Fri, 20 Aug 2021 12:59:46 -0300 Subject: [PATCH 21/29] Move to Github Registry Containers --- .../{package_test.yml => PullRequest.yml} | 38 ++++++++++++++-- .../workflows/codeql and ossar analysis.yml | 44 ------------------- .github/workflows/main.yml | 34 ++++++++++---- .../{tag_version.yml => relelases.yml} | 14 +++--- bin/Docker.js | 8 ++++ 5 files changed, 73 insertions(+), 65 deletions(-) rename .github/workflows/{package_test.yml => PullRequest.yml} (51%) delete mode 100644 .github/workflows/codeql and ossar analysis.yml rename .github/workflows/{tag_version.yml => relelases.yml} (85%) diff --git a/.github/workflows/package_test.yml b/.github/workflows/PullRequest.yml similarity index 51% rename from .github/workflows/package_test.yml rename to .github/workflows/PullRequest.yml index f0c049e..8bce855 100644 --- a/.github/workflows/package_test.yml +++ b/.github/workflows/PullRequest.yml @@ -1,7 +1,25 @@ -name: Test - The Bds Maneger Core -on: [pull_request] +name: Docker And Node Test +on: + pull_request: + branches: + - main jobs: + CodeQL: + name: Analyze + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: "javascript" + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 + Test: runs-on: ubuntu-latest strategy: @@ -26,8 +44,16 @@ jobs: - name: Run test run: npm run ci - Test_Docker: + Docker-Multiarch: runs-on: ubuntu-latest + strategy: + matrix: + arch: + - amd64 + - arm64 + - arm/v7 + + name: "Build And Test Docker Image, Arch: ${{ matrix.arch }}" steps: - name: Set up QEMU uses: docker/setup-qemu-action@v1 @@ -39,8 +65,12 @@ jobs: uses: actions/checkout@master - name: Build Docker Image + id: DockerArch uses: docker/build-push-action@v2 with: target: bdscore tags: coretest:latest - platforms: linux/amd64,linux/arm64,linux/arm/v7 + platforms: linux/${{ matrix.arch }} + + - name: "Run Docker Image, digiest: ${{ outputs.DockerArch.digest }}" + run: docker run --rm -it -e DebugArch="true" coretest:latest@{{ outputs.DockerArch.digest }} diff --git a/.github/workflows/codeql and ossar analysis.yml b/.github/workflows/codeql and ossar analysis.yml deleted file mode 100644 index a830bca..0000000 --- a/.github/workflows/codeql and ossar analysis.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: "CodeQL and OSSAR" -on: - push: - branches: - - main - pull_request: - branches: - - main - schedule: - - cron: "38 17 * * */3" - - cron: '36 21 * * 2' - -jobs: - OSSAR-Scan: - runs-on: windows-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - name: Run OSSAR - uses: github/ossar-action@v1 - id: ossar - - name: Upload OSSAR results - uses: github/codeql-action/upload-sarif@v1 - with: - sarif_file: ${{ steps.ossar.outputs.sarifFile }} - - analyze: - name: Analyze - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - language: [ "javascript" ] - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8fc847d..6b72541 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,6 +8,21 @@ env: DOCKER_ARCH: linux/amd64,linux/arm64,linux/arm/v7 jobs: + CodeQL: + name: Analyze + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: "javascript" + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 + npm: runs-on: ubuntu-latest steps: @@ -21,7 +36,7 @@ jobs: - name: Edit Version env: - RunID: ${{ github.run_id }} + RunID: ${{ github.run_id }} run: node .github/ChangeVersion.js - name: Install Packages @@ -45,8 +60,10 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKER_ORG_USER }} - password: ${{ secrets.DOCKER_ORG_PASS }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: checkout uses: actions/checkout@master @@ -57,7 +74,7 @@ jobs: with: push: true target: bdscore - tags: bdsmaneger/core:main + tags: ghcr.io/the-bds-maneger/core:main platforms: ${{ env.DOCKER_ARCH }} docker_base: @@ -73,8 +90,9 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKER_ORG_USER }} - password: ${{ secrets.DOCKER_ORG_PASS }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: checkout uses: actions/checkout@master @@ -85,7 +103,5 @@ jobs: with: push: true target: bdsbase - tags: | - bdsmaneger/base:main - bdsmaneger/node_image:main + tags: ghcr.io/the-bds-maneger/base:main platforms: ${{ env.DOCKER_ARCH }} diff --git a/.github/workflows/tag_version.yml b/.github/workflows/relelases.yml similarity index 85% rename from .github/workflows/tag_version.yml rename to .github/workflows/relelases.yml index 7dea2e7..965a175 100644 --- a/.github/workflows/tag_version.yml +++ b/.github/workflows/relelases.yml @@ -1,4 +1,4 @@ -name: Npm Packages Stable and Docker Image +name: Publish Releases on: release: types: @@ -44,8 +44,9 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKER_ORG_USER }} - password: ${{ secrets.DOCKER_ORG_PASS }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: checkout uses: actions/checkout@master @@ -56,7 +57,7 @@ jobs: with: push: true target: bdscore - tags: bdsmaneger/core:latest + tags: ghcr.io/the-bds-maneger/core:latest platforms: ${{ env.DOCKER_ARCH }} docker_base: @@ -85,8 +86,5 @@ jobs: push: true target: bdsbase tags: | - bdsmaneger/base:latest - bdsmaneger/base:${{ github.run_id }} - bdsmaneger/node_image:latest - bdsmaneger/node_image:${{ github.run_id }} + ghcr.io/the-bds-maneger/base:latest platforms: ${{ env.DOCKER_ARCH }} diff --git a/bin/Docker.js b/bin/Docker.js index 2044f1e..1dc1cf5 100644 --- a/bin/Docker.js +++ b/bin/Docker.js @@ -54,6 +54,14 @@ function StartServer(){ } }); } + // Debug Arch + if (process.env.DebugArch === "true") { + console.log("Debug Arch:", process.arch); + setTimeout(() => { + console.log("Stop Server end debug"); + process.exit(0); + }, 1000); + } } // Check Installed Server -- 2.50.0 From de07be5141438709a180f9a4d987d2244d464663 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Fri, 20 Aug 2021 13:05:08 -0300 Subject: [PATCH 22/29] Pull --- .github/workflows/PullRequest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/PullRequest.yml b/.github/workflows/PullRequest.yml index 8bce855..1c8b257 100644 --- a/.github/workflows/PullRequest.yml +++ b/.github/workflows/PullRequest.yml @@ -72,5 +72,5 @@ jobs: tags: coretest:latest platforms: linux/${{ matrix.arch }} - - name: "Run Docker Image, digiest: ${{ outputs.DockerArch.digest }}" - run: docker run --rm -it -e DebugArch="true" coretest:latest@{{ outputs.DockerArch.digest }} + - name: "Run Docker Image, digiest: ${{ steps.DockerArch.outputs.digest }}" + run: docker run --rm -it -e DebugArch="true" coretest:latest@${{ steps.DockerArch.outputs.digest }} -- 2.50.0 From eae7ca1c95aa72b86b439e2cf4fdd7f84bcc269d Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Fri, 20 Aug 2021 13:15:25 -0300 Subject: [PATCH 23/29] Pull --- .github/workflows/PullRequest.yml | 17 ++++++++++++----- .github/workflows/main.yml | 6 ++++-- .github/workflows/relelases.yml | 8 ++++---- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/PullRequest.yml b/.github/workflows/PullRequest.yml index 1c8b257..aafa1f5 100644 --- a/.github/workflows/PullRequest.yml +++ b/.github/workflows/PullRequest.yml @@ -11,20 +11,27 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 + - name: Initialize CodeQL uses: github/codeql-action/init@v1 with: languages: "javascript" + - name: Autobuild uses: github/codeql-action/autobuild@v1 + - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1 - Test: + Node: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x, 15.x, 16.x] + node-version: + - 14.x + - 15.x + - 16.x + steps: - uses: actions/checkout@v2 @@ -35,14 +42,14 @@ jobs: - name: Edit Version env: - RunID: ${{ github.run_id }} + RunID: ${{ github.run_id }} run: node .github/ChangeVersion.js - name: Install node depedencies run: npm install -d --no-save - name: Run test - run: npm run ci + run: npm test Docker-Multiarch: runs-on: ubuntu-latest @@ -73,4 +80,4 @@ jobs: platforms: linux/${{ matrix.arch }} - name: "Run Docker Image, digiest: ${{ steps.DockerArch.outputs.digest }}" - run: docker run --rm -it -e DebugArch="true" coretest:latest@${{ steps.DockerArch.outputs.digest }} + run: docker run --rm -i -e DebugArch="true" coretest:latest@${{ steps.DockerArch.outputs.digest }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6b72541..6cd97fe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,12 +14,15 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 + - name: Initialize CodeQL uses: github/codeql-action/init@v1 with: languages: "javascript" + - name: Autobuild uses: github/codeql-action/autobuild@v1 + - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1 @@ -45,7 +48,7 @@ jobs: - name: NPM Publish run: npm publish --tag dev env: - NODE_AUTH_TOKEN: "${{ secrets.NPM_ORG_TOKEN }}" + NODE_AUTH_TOKEN: '${{ secrets.NPM_ORG_TOKEN }}' docker_core: needs: [npm] @@ -64,7 +67,6 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: checkout uses: actions/checkout@master diff --git a/.github/workflows/relelases.yml b/.github/workflows/relelases.yml index 965a175..223a691 100644 --- a/.github/workflows/relelases.yml +++ b/.github/workflows/relelases.yml @@ -73,8 +73,9 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKER_ORG_USER }} - password: ${{ secrets.DOCKER_ORG_PASS }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: checkout uses: actions/checkout@master @@ -85,6 +86,5 @@ jobs: with: push: true target: bdsbase - tags: | - ghcr.io/the-bds-maneger/base:latest + tags: ghcr.io/the-bds-maneger/base:latest platforms: ${{ env.DOCKER_ARCH }} -- 2.50.0 From 7d801783f0e1af0d9fb3764d06444800d1519f25 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Fri, 20 Aug 2021 13:20:09 -0300 Subject: [PATCH 24/29] Pull --- .github/workflows/PullRequest.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/PullRequest.yml b/.github/workflows/PullRequest.yml index aafa1f5..a92ac5d 100644 --- a/.github/workflows/PullRequest.yml +++ b/.github/workflows/PullRequest.yml @@ -80,4 +80,8 @@ jobs: platforms: linux/${{ matrix.arch }} - name: "Run Docker Image, digiest: ${{ steps.DockerArch.outputs.digest }}" - run: docker run --rm -i -e DebugArch="true" coretest:latest@${{ steps.DockerArch.outputs.digest }} + if: matrix.arch == "amd64" + run: docker run --rm -i -e DebugArch="true" coretest:latest + - name: "Run Docker Image, digiest: ${{ steps.DockerArch.outputs.digest }}" + if: matrix.arch != "amd64" + run: docker run --rm -i -e DebugArch="true" coretest:latest@${{ steps.DockerArch.outputs.digest }} \ No newline at end of file -- 2.50.0 From 81f45d6b087a58b77d3fa33a644e0e36a480c637 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Fri, 20 Aug 2021 13:22:55 -0300 Subject: [PATCH 25/29] Pull --- .github/workflows/PullRequest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/PullRequest.yml b/.github/workflows/PullRequest.yml index a92ac5d..404af42 100644 --- a/.github/workflows/PullRequest.yml +++ b/.github/workflows/PullRequest.yml @@ -80,8 +80,8 @@ jobs: platforms: linux/${{ matrix.arch }} - name: "Run Docker Image, digiest: ${{ steps.DockerArch.outputs.digest }}" - if: matrix.arch == "amd64" + if: ${{ matrix.arch }} == "amd64" run: docker run --rm -i -e DebugArch="true" coretest:latest - name: "Run Docker Image, digiest: ${{ steps.DockerArch.outputs.digest }}" - if: matrix.arch != "amd64" + if: ${{ matrix.arch }} != "amd64" run: docker run --rm -i -e DebugArch="true" coretest:latest@${{ steps.DockerArch.outputs.digest }} \ No newline at end of file -- 2.50.0 From dae7a44afde292fccb82d58cb54c11214857f802 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Fri, 20 Aug 2021 13:31:04 -0300 Subject: [PATCH 26/29] pull --- .github/workflows/PullRequest.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/PullRequest.yml b/.github/workflows/PullRequest.yml index 404af42..4359a60 100644 --- a/.github/workflows/PullRequest.yml +++ b/.github/workflows/PullRequest.yml @@ -71,17 +71,21 @@ jobs: - name: checkout uses: actions/checkout@master - - name: Build Docker Image + - name: Docker build amd64 + if: ${{ matrix.arch }} == "amd64" + run: docker build -t coretest:latest . + - name: "Run Docker Image" + if: ${{ matrix.arch }} == "amd64" + run: docker run --rm -i -e DebugArch="true" coretest:latest + + - name: Build Docker Image (Multiarch) + if: ${{ matrix.arch }} != "amd64" id: DockerArch uses: docker/build-push-action@v2 with: target: bdscore - tags: coretest:latest + tags: coretestarch:latest platforms: linux/${{ matrix.arch }} - - - name: "Run Docker Image, digiest: ${{ steps.DockerArch.outputs.digest }}" - if: ${{ matrix.arch }} == "amd64" - run: docker run --rm -i -e DebugArch="true" coretest:latest - name: "Run Docker Image, digiest: ${{ steps.DockerArch.outputs.digest }}" if: ${{ matrix.arch }} != "amd64" - run: docker run --rm -i -e DebugArch="true" coretest:latest@${{ steps.DockerArch.outputs.digest }} \ No newline at end of file + run: docker run --rm -i -e DebugArch="true" coretestarch:latest@${{ steps.DockerArch.outputs.digest }} \ No newline at end of file -- 2.50.0 From 2ea89fcc9739ff445f39f67f36be581bb2364c16 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Fri, 20 Aug 2021 13:43:58 -0300 Subject: [PATCH 27/29] Remove run --- .github/workflows/PullRequest.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/PullRequest.yml b/.github/workflows/PullRequest.yml index 4359a60..1086ea2 100644 --- a/.github/workflows/PullRequest.yml +++ b/.github/workflows/PullRequest.yml @@ -71,21 +71,10 @@ jobs: - name: checkout uses: actions/checkout@master - - name: Docker build amd64 - if: ${{ matrix.arch }} == "amd64" - run: docker build -t coretest:latest . - - name: "Run Docker Image" - if: ${{ matrix.arch }} == "amd64" - run: docker run --rm -i -e DebugArch="true" coretest:latest - - name: Build Docker Image (Multiarch) - if: ${{ matrix.arch }} != "amd64" id: DockerArch uses: docker/build-push-action@v2 with: target: bdscore tags: coretestarch:latest - platforms: linux/${{ matrix.arch }} - - name: "Run Docker Image, digiest: ${{ steps.DockerArch.outputs.digest }}" - if: ${{ matrix.arch }} != "amd64" - run: docker run --rm -i -e DebugArch="true" coretestarch:latest@${{ steps.DockerArch.outputs.digest }} \ No newline at end of file + platforms: linux/${{ matrix.arch }} \ No newline at end of file -- 2.50.0 From 0bfe16c01ab3d9b3d1042422fe9cb45a5383d16e Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Fri, 20 Aug 2021 14:32:03 -0300 Subject: [PATCH 28/29] releases 1.13.6 to docker in github registry --- .devcontainer/Dockerfile | 2 +- DockerConfig.yaml | 2 +- README.md | 4 +- bin/Docker.js | 8 ---- package-lock.json | 100 +++++++++++++++++++-------------------- package.json | 2 +- 6 files changed, 55 insertions(+), 63 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index d12d21a..90e025f 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM bdsmaneger/node_image:latest +FROM ghcr.io/the-bds-maneger/base:main USER root RUN useradd -M -s /usr/bin/zsh -p $(perl -e 'print crypt($ARGV[0], "password")' vscode) vscode; echo "vscode ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/vscode diff --git a/DockerConfig.yaml b/DockerConfig.yaml index bc72ef5..0b35035 100644 --- a/DockerConfig.yaml +++ b/DockerConfig.yaml @@ -1,6 +1,6 @@ name: BdsCore file: Dockerfile -tag: bdsmaneger/core:dev +tag: bdsmanegercore:dev target: bdscore buildx: enable: false diff --git a/README.md b/README.md index e88bc89..d050a3f 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ docker run --rm -d --name BdsManegerCore -v BdsCore:/home/bds/bds_core ^ -e PLAYERS="13" ^ -e SERVER="bedrock" ^ -e ENABLE_COMMANDS="false" ^ -bdsmaneger/core:latest +ghcr.io/the-bds-maneger/core:latest ``` ### Linux/MacOS @@ -78,7 +78,7 @@ docker run --rm -d --name BdsManegerCore -v BdsCore/:/home/bds/bds_core \ -e PLAYERS="13" \ -e SERVER="bedrock" \ -e ENABLE_COMMANDS="false" \ -bdsmaneger/core:latest +ghcr.io/the-bds-maneger/core:latest ``` ## Azure Container and Azure VM diff --git a/bin/Docker.js b/bin/Docker.js index 1dc1cf5..2044f1e 100644 --- a/bin/Docker.js +++ b/bin/Docker.js @@ -54,14 +54,6 @@ function StartServer(){ } }); } - // Debug Arch - if (process.env.DebugArch === "true") { - console.log("Debug Arch:", process.arch); - setTimeout(() => { - console.log("Stop Server end debug"); - process.exit(0); - }, 1000); - } } // Check Installed Server diff --git a/package-lock.json b/package-lock.json index 3c188ea..51311e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@the-bds-maneger/core", - "version": "1.13.5", + "version": "1.13.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@the-bds-maneger/core", - "version": "1.13.5", + "version": "1.13.6", "license": "AGPL-3.0-or-later", "dependencies": { "@azure/storage-blob": "^12.6.0", @@ -486,9 +486,9 @@ "integrity": "sha512-DaZNUvLDCAnCTjgwxgiL1eQdxIKEpNLOlTNtAgnZc50bG2copGhRrFN9/PxPBuJe+tZVLCbQ7ls0xveXVRPkvw==" }, "node_modules/@types/jsonwebtoken": { - "version": "8.5.4", - "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.4.tgz", - "integrity": "sha512-4L8msWK31oXwdtC81RmRBAULd0ShnAHjBuKT9MRQpjP0piNrZdXyTRcKY9/UIfhGeKIT4PvF5amOOUbbT/9Wpg==", + "version": "8.5.5", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.5.tgz", + "integrity": "sha512-OGqtHQ7N5/Ap/TUwO6IgHDuLiAoTmHhGpNvgkCm/F4N6pKzx/RBSfr2OXZSwC6vkfnsEdb6+7DNZVtiXiwdwFw==", "dependencies": { "@types/node": "*" } @@ -508,9 +508,9 @@ } }, "node_modules/@types/node": { - "version": "16.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.6.1.tgz", - "integrity": "sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw==" + "version": "16.6.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.6.2.tgz", + "integrity": "sha512-LSw8TZt12ZudbpHc6EkIyDM3nHVWKYrAvGy6EAJfNfjusbwnThqjqxUKKRwuV3iWYeW/LYMzNgaq3MaLffQ2xA==" }, "node_modules/@types/node-fetch": { "version": "2.5.12", @@ -729,12 +729,11 @@ } }, "node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true, + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, "node_modules/ansi-styles": { @@ -1249,14 +1248,6 @@ "timers-ext": "^0.1.7" } }, - "node_modules/cli-color/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/cli-cursor": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", @@ -2631,9 +2622,9 @@ "integrity": "sha512-dtm4QZH9nZtcDt8qJiOH9fcQd1NAgi+K1O2DbE6GG1PPCK/BWfOH3idCTRQ4ImXRUOyopDEgDEnVEE7Y/2Wrig==" }, "node_modules/fastq": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.1.tgz", - "integrity": "sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.12.0.tgz", + "integrity": "sha512-VNX0QkHK3RsXVKr9KrlUv/FoTa0NdbYoHHl7uXHv2rzyHSlxjdNAKug2twd9luJxpcyNeAgf5iPPMutJO67Dfg==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -2992,9 +2983,9 @@ } }, "node_modules/google-auth-library": { - "version": "7.6.1", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-7.6.1.tgz", - "integrity": "sha512-aP/WTx+rE3wQ3zPgiCZsJ1EIb2v7P+QwxVwAqrKjcPz4SK57kyAfcX75VoAgjtwZzl70upcNlvFn8FSmC4nMBQ==", + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-7.6.2.tgz", + "integrity": "sha512-yvEnwVsvgH8RXTtpf6e84e7dqIdUEKJhmQvTJwzYP+RDdHjLrDp9sk2u2ZNDJPLKZ7DJicx/+AStcQspJiq+Qw==", "dependencies": { "arrify": "^2.0.0", "base64-js": "^1.3.0", @@ -6474,6 +6465,15 @@ "node": ">=8" } }, + "node_modules/strip-ansi/node_modules/ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-dirs": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", @@ -7520,9 +7520,9 @@ "integrity": "sha512-DaZNUvLDCAnCTjgwxgiL1eQdxIKEpNLOlTNtAgnZc50bG2copGhRrFN9/PxPBuJe+tZVLCbQ7ls0xveXVRPkvw==" }, "@types/jsonwebtoken": { - "version": "8.5.4", - "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.4.tgz", - "integrity": "sha512-4L8msWK31oXwdtC81RmRBAULd0ShnAHjBuKT9MRQpjP0piNrZdXyTRcKY9/UIfhGeKIT4PvF5amOOUbbT/9Wpg==", + "version": "8.5.5", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.5.tgz", + "integrity": "sha512-OGqtHQ7N5/Ap/TUwO6IgHDuLiAoTmHhGpNvgkCm/F4N6pKzx/RBSfr2OXZSwC6vkfnsEdb6+7DNZVtiXiwdwFw==", "requires": { "@types/node": "*" } @@ -7542,9 +7542,9 @@ } }, "@types/node": { - "version": "16.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.6.1.tgz", - "integrity": "sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw==" + "version": "16.6.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.6.2.tgz", + "integrity": "sha512-LSw8TZt12ZudbpHc6EkIyDM3nHVWKYrAvGy6EAJfNfjusbwnThqjqxUKKRwuV3iWYeW/LYMzNgaq3MaLffQ2xA==" }, "@types/node-fetch": { "version": "2.5.12", @@ -7720,10 +7720,9 @@ "dev": true }, "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, "ansi-styles": { "version": "4.3.0", @@ -8117,13 +8116,6 @@ "es6-iterator": "^2.0.3", "memoizee": "^0.4.14", "timers-ext": "^0.1.7" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - } } }, "cli-cursor": { @@ -9236,9 +9228,9 @@ "integrity": "sha512-dtm4QZH9nZtcDt8qJiOH9fcQd1NAgi+K1O2DbE6GG1PPCK/BWfOH3idCTRQ4ImXRUOyopDEgDEnVEE7Y/2Wrig==" }, "fastq": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.1.tgz", - "integrity": "sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.12.0.tgz", + "integrity": "sha512-VNX0QkHK3RsXVKr9KrlUv/FoTa0NdbYoHHl7uXHv2rzyHSlxjdNAKug2twd9luJxpcyNeAgf5iPPMutJO67Dfg==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -9524,9 +9516,9 @@ } }, "google-auth-library": { - "version": "7.6.1", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-7.6.1.tgz", - "integrity": "sha512-aP/WTx+rE3wQ3zPgiCZsJ1EIb2v7P+QwxVwAqrKjcPz4SK57kyAfcX75VoAgjtwZzl70upcNlvFn8FSmC4nMBQ==", + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-7.6.2.tgz", + "integrity": "sha512-yvEnwVsvgH8RXTtpf6e84e7dqIdUEKJhmQvTJwzYP+RDdHjLrDp9sk2u2ZNDJPLKZ7DJicx/+AStcQspJiq+Qw==", "requires": { "arrify": "^2.0.0", "base64-js": "^1.3.0", @@ -12353,6 +12345,14 @@ "dev": true, "requires": { "ansi-regex": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + } } }, "strip-dirs": { diff --git a/package.json b/package.json index 5079c74..b7ab708 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "publishConfig": { "access": "public" }, - "version": "1.13.5", + "version": "1.13.6", "description": "Scripts to manage minecraft server's", "private": false, "main": "index.js", -- 2.50.0 From c746ac62f0a2a2e077179301615e95be190f5395 Mon Sep 17 00:00:00 2001 From: Matheus Sampaio Queiroga Date: Sat, 21 Aug 2021 00:10:28 -0300 Subject: [PATCH 29/29] Update players.js --- src/rest/routes/players.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rest/routes/players.js b/src/rest/routes/players.js index 5323c53..8238db1 100644 --- a/src/rest/routes/players.js +++ b/src/rest/routes/players.js @@ -1,6 +1,6 @@ const express = require("express"); const app = express.Router(); -const { GetPlatform } = require("../../../lib/BdsSettings") +const { GetPlatform, GetPaths } = require("../../../lib/BdsSettings") const bds = require("../../../index"); const { token_verify, CheckPlayer } = require("../../UsersAndtokenChecks"); const { readFileSync } = require("fs"); @@ -10,7 +10,7 @@ const { GetSessions } = require("../../BdsManegerServer"); // Players info and maneger app.get("/", (req, res) => { var { player, status, platform} = req.query; - const players_json = JSON.parse(readFileSync(bds.players_files, "utf8"))[(platform || GetPlatform())]; + const players_json = JSON.parse(readFileSync(GetPaths("player"), "utf8"))[(platform || GetPlatform())]; var response = {}; if (player) { @@ -53,4 +53,4 @@ app.get("/actions/:TYPE/:TOKEN/:PLAYER*", (req, res) => { app.all("/actions/*", ({ res }) => res.send(`${docs.url}/${docs.rest_api}#players-actions`)) app.all("/*", ({ res }) => res.send(`${docs.url}/${docs.rest_api}#players-actions`)) -module.exports = app; \ No newline at end of file +module.exports = app; -- 2.50.0