merge #41

Merged
Sirherobrine23 merged 7 commits from main into stable 2021-02-16 17:46:35 +00:00
6 changed files with 27 additions and 435 deletions

View File

@ -29,7 +29,8 @@
"coenraads.bracket-pair-colorizer",
"aaron-bond.better-comments",
"msjsdiag.debugger-for-chrome",
"smcpeak.default-keys-windows"
"smcpeak.default-keys-windows",
"vscode-icons-team.vscode-icons"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.

View File

@ -1,6 +1,6 @@
name: Dev Publish
on:
on:
push:
branches:
- main

View File

@ -1,8 +1,5 @@
# This file is a template, and might need editing before it works on your project.
default:
image: node:latest
# Validate that the repository contains a package.json and extract a few values from it.
image: node:current-buster
before_script:
- |
if [[ ! -f package.json ]]; then
@ -13,48 +10,10 @@ default:
- NPM_PACKAGE_NAME=$(node -p "require('./package.json').name")
- NPM_PACKAGE_VERSION=$(node -p "require('./package.json').version")
# Validate that the package name is properly scoped to the project's root namespace.
# For more information, see https://docs.gitlab.com/ee/user/packages/npm_registry/#package-naming-convention
validate_package_scope:
stage: build
test_package:
stage: test
script:
- |
if [[ ! $NPM_PACKAGE_NAME =~ ^@$CI_PROJECT_ROOT_NAMESPACE/ ]]; then
echo "Invalid package scope! Packages must be scoped in the root namespace of the project, e.g. \"@${CI_PROJECT_ROOT_NAMESPACE}/${CI_PROJECT_NAME}\""
echo 'For more information, see https://docs.gitlab.com/ee/user/packages/npm_registry/#package-naming-convention'
exit 1
fi
# If no .npmrc if included in the repo, generate a temporary one to use during the publish step
# that is configured to publish to GitLab's NPM registry
create_npmrc:
stage: build
script:
- |
if [[ ! -f .npmrc ]]; then
echo 'No .npmrc found! Creating one now. Please review the following link for more information: https://docs.gitlab.com/ee/user/packages/npm_registry/index.html#authenticating-with-a-ci-job-token'
{
echo '@${CI_PROJECT_ROOT_NAMESPACE}:registry=${CI_SERVER_PROTOCOL}://${CI_SERVER_HOST}:${CI_SERVER_PORT}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/'
echo '//${CI_SERVER_HOST}:${CI_SERVER_PORT}/api/v4/packages/npm/:_authToken=${CI_JOB_TOKEN}'
echo '//${CI_SERVER_HOST}:${CI_SERVER_PORT}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}'
} >> .npmrc
fi
artifacts:
paths:
- .npmrc
# Publish the package. If the version in package.json has not yet been published, it will be
# published to GitLab's NPM registry. If the version already exists, the publish command
# will fail and the existing package will not be updated.
publish_package:
stage: deploy
script:
- |
{
npm publish &&
echo "Successfully published version ${NPM_PACKAGE_VERSION} of ${NPM_PACKAGE_NAME} to GitLab's NPM registry: ${CI_PROJECT_URL}/-/packages"
} || {
echo "No new version of ${NPM_PACKAGE_NAME} published. This is most likely because version ${NPM_PACKAGE_VERSION} already exists in GitLab's NPM registry."
}
npm install -f
npm update
npm run test

378
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +1,9 @@
{
<<<<<<< HEAD
"name": "bds_maneger_api",
"version": "1.4.2",
=======
"name": "@the-bds-maneger/bds_maneger_api",
"publishConfig": {
"access": "public"
},
"version": "1.5.4",
>>>>>>> main
"description": "scripts to manage minecraft bedrock server",
"private": false,
"main": "index.js",
@ -46,17 +41,13 @@
"googleapis": "^67.0.0",
"node-fetch": "^2.6.1",
"node-localstorage": "^2.1.6",
"open": "^7.3.1",
"open": "^7.4.2",
"properties-to-json": "^0.1.7",
"qr-image": "^3.2.0",
"qrcode": "^1.4.4",
"request-ip": "^2.1.3",
"shelljs": "^0.8.4",
<<<<<<< HEAD
"systeminformation": "^5.0.2",
=======
"systeminformation": "^5.0.10",
>>>>>>> main
"telegraf": "^4.0.0"
},
"engines": {

View File

@ -14,10 +14,6 @@ module.exports.World_BAckup = () => {
const world_name = JSON.parse(java_pro(fs.readFileSync(path.join(bds.bds_dir_java, "server.properties"), "utf8").replaceAll("-", "_"))).level_name
dir_zip = path.join(bds.bds_dir_java, world_name) //`${require("../index").bds_dir_bedrock}/${world_name}/`
}
/**
* Before we can start it is good for the server not to have a Corrupted Backup
* this is only necessary once after the server has started manually
*/
if (bds.bds_detect()){bds.stop()}
var zip = new AdmZip();
zip.addLocalFolder(dir_zip);
@ -54,20 +50,13 @@ module.exports.Drive_backup = () => {
* this is only necessary once after the server has started manually
*/
if (bds.bds_detect()){bds.stop()}
var status_b = true
var zip = new AdmZip();
zip.addLocalFolder(dir_zip);
zip.addZipComment(`Backup zip file in ${today}. \nBackup made to ${process.platform}, Free and open content for all\n\nSirherobrine23© By Bds Maneger.`);
zip.writeZip(name);
let es = 1;
for(es == "0";es++;){
if (!(status_b)) break
}
const js_ = {
return {
"file_path": name,
"file_name": `bds_backup_World_${today}.zip`,
"id": undefined
"file_name": `bds_backup_World_${today}.zip`
}
return js_
};