diff --git a/.gitattributes b/.gitattributes index cfe4ffa..0be18b5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,20 +1,126 @@ -# Line endings: enforce LF in GitHub, convert to native on checkout. - +############################################################################### +2 +# Set default behavior to automatically normalize line endings. +3 +############################################################################### +4 * text=auto -*.js text - -# Make GitHub ignore vendor libraries while computing language stats. -# See https://github.com/github/linguist#overrides. - -*.proto linguist-vendored=true -*.sh linguist-vendored=true -*.bat linguist-vendored=true -*.html linguist-vendored=true -*.css linguist-vendored=true - -api/* linguist-vendored=true - -# Explicitly specify language for non-standard extensions used under -# ide/web/lib/templates to make GitHub correctly count their language stats. +5 +​ +6 +############################################################################### +7 +# Set default behavior for command prompt diff. +8 +# +9 +# This is need for earlier builds of msysgit that does not have it on by +10 +# default for csharp files. +11 +# Note: This is only used by command line +12 +############################################################################### +13 +#*.cs diff=csharp +14 +​ +15 +############################################################################### +16 +# Set the merge driver for project and solution files +17 +# +18 +# Merging from the command prompt will add diff markers to the files if there +19 +# are conflicts (Merging from VS is not affected by the settings below, in VS +20 +# the diff markers are never inserted). Diff markers may cause the following +21 +# file extensions to fail to load in VS. An alternative would be to treat +22 +# these files as binary and thus will always conflict and require user +23 +# intervention with every merge. To do so, just uncomment the entries below +24 +############################################################################### +25 +#*.sln merge=binary +26 +#*.csproj merge=binary +27 +#*.vbproj merge=binary +28 +#*.vcxproj merge=binary +29 +#*.vcproj merge=binary +30 +#*.dbproj merge=binary +31 +#*.fsproj merge=binary +32 +#*.lsproj merge=binary +33 +#*.wixproj merge=binary +34 +#*.modelproj merge=binary +35 +#*.sqlproj merge=binary +36 +#*.wwaproj merge=binary +37 +​ +38 +############################################################################### +39 +# behavior for image files +40 +# +41 +# image files are treated as binary by default. +42 +############################################################################### +43 +#*.jpg binary +44 +#*.png binary +45 +#*.gif binary +46 +​ +47 +############################################################################### +48 +# diff behavior for common document formats +49 # -*.js_ linguist-language=JavaScript +50 +# Convert binary document formats to text before diffing them. This feature +51 +# is only available from the command line. Turn it on by uncommenting the +52 +# entries below. +53 +############################################################################### +54 +#*.doc diff=astextplain +55 +#*.DOC diff=astextplain +56 +#*.docx diff=astextplain +57 +#*.DOCX diff=astextplain +58 +#*.dot diff=astextplain +59 +#*.DOT diff=astextplain +60 +#*.pdf diff=astextplain +61 +#*.PDF diff=astextplain +62 +#*.rtf diff=astextplain +63 +#*.RTF diff=astextplain +64 diff --git a/.gitignore b/.gitignore index 3763473..927332a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,267 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +project.fragment.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +#node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +## Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +##### Modules or config actif + node_modules/ scripts/ data/ logs/ +tmp/ cfg.js .save npm-debug.* diff --git a/INFO.txt b/INFO.txt new file mode 100644 index 0000000..34bf4eb --- /dev/null +++ b/INFO.txt @@ -0,0 +1 @@ +Emulates API version 0.35.0, which is no longer supported. Minimum API version is now 0.41.0. \ No newline at end of file diff --git a/POGOserver.jsproj b/POGOserver.jsproj new file mode 100644 index 0000000..752e2e7 --- /dev/null +++ b/POGOserver.jsproj @@ -0,0 +1,106 @@ + + + + + Debug + Android + + + Debug + iOS + + + Debug + Windows-AnyCPU + + + Debug + Windows-x64 + + + Debug + Windows-x86 + + + Debug + Windows-ARM + + + Debug + Windows Phone 8 + + + Debug + Windows Phone (Universal) + + + Release + Android + + + Release + iOS + + + Release + Windows-AnyCPU + + + Release + Windows-x64 + + + Release + Windows-x86 + + + Release + Windows-ARM + + + Release + Windows Phone 8 + + + Release + Windows Phone (Universal) + + + + 623ed577-0a06-4a07-a70b-d179fbccc78d + + + + 14.0 + + + false + + + + + Tools for Apache Cordova + + + MDD + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/POGOserver.sln b/POGOserver.sln new file mode 100644 index 0000000..01ab29c --- /dev/null +++ b/POGOserver.sln @@ -0,0 +1,81 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "POGOserver", "POGOserver.jsproj", "{623ED577-0A06-4A07-A70B-D179FBCCC78D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Android = Debug|Android + Debug|iOS = Debug|iOS + Debug|Windows Phone (Universal) = Debug|Windows Phone (Universal) + Debug|Windows Phone 8 = Debug|Windows Phone 8 + Debug|Windows-AnyCPU = Debug|Windows-AnyCPU + Debug|Windows-ARM = Debug|Windows-ARM + Debug|Windows-x64 = Debug|Windows-x64 + Debug|Windows-x86 = Debug|Windows-x86 + Release|Android = Release|Android + Release|iOS = Release|iOS + Release|Windows Phone (Universal) = Release|Windows Phone (Universal) + Release|Windows Phone 8 = Release|Windows Phone 8 + Release|Windows-AnyCPU = Release|Windows-AnyCPU + Release|Windows-ARM = Release|Windows-ARM + Release|Windows-x64 = Release|Windows-x64 + Release|Windows-x86 = Release|Windows-x86 + Description = Pokemon GO Server Emulator + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Android.ActiveCfg = Debug|Android + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Android.Build.0 = Debug|Android + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Android.Deploy.0 = Debug|Android + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|iOS.ActiveCfg = Debug|iOS + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|iOS.Build.0 = Debug|iOS + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|iOS.Deploy.0 = Debug|iOS + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Windows Phone (Universal).ActiveCfg = Debug|Windows Phone (Universal) + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Windows Phone (Universal).Build.0 = Debug|Windows Phone (Universal) + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Windows Phone (Universal).Deploy.0 = Debug|Windows Phone (Universal) + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Windows Phone 8.ActiveCfg = Debug|Windows Phone 8 + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Windows Phone 8.Build.0 = Debug|Windows Phone 8 + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Windows Phone 8.Deploy.0 = Debug|Windows Phone 8 + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Windows-AnyCPU.ActiveCfg = Debug|Windows-AnyCPU + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Windows-AnyCPU.Build.0 = Debug|Windows-AnyCPU + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Windows-AnyCPU.Deploy.0 = Debug|Windows-AnyCPU + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Windows-ARM.ActiveCfg = Debug|Windows-ARM + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Windows-ARM.Build.0 = Debug|Windows-ARM + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Windows-ARM.Deploy.0 = Debug|Windows-ARM + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Windows-x64.ActiveCfg = Debug|Windows-x64 + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Windows-x64.Build.0 = Debug|Windows-x64 + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Windows-x64.Deploy.0 = Debug|Windows-x64 + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Windows-x86.ActiveCfg = Debug|Windows-x86 + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Windows-x86.Build.0 = Debug|Windows-x86 + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Debug|Windows-x86.Deploy.0 = Debug|Windows-x86 + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Android.ActiveCfg = Release|Android + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Android.Build.0 = Release|Android + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Android.Deploy.0 = Release|Android + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|iOS.ActiveCfg = Release|iOS + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|iOS.Build.0 = Release|iOS + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|iOS.Deploy.0 = Release|iOS + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Windows Phone (Universal).ActiveCfg = Release|Windows Phone (Universal) + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Windows Phone (Universal).Build.0 = Release|Windows Phone (Universal) + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Windows Phone (Universal).Deploy.0 = Release|Windows Phone (Universal) + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Windows Phone 8.ActiveCfg = Release|Windows Phone 8 + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Windows Phone 8.Build.0 = Release|Windows Phone 8 + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Windows Phone 8.Deploy.0 = Release|Windows Phone 8 + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Windows-AnyCPU.ActiveCfg = Release|Windows-AnyCPU + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Windows-AnyCPU.Build.0 = Release|Windows-AnyCPU + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Windows-AnyCPU.Deploy.0 = Release|Windows-AnyCPU + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Windows-ARM.ActiveCfg = Release|Windows-ARM + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Windows-ARM.Build.0 = Release|Windows-ARM + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Windows-ARM.Deploy.0 = Release|Windows-ARM + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Windows-x64.ActiveCfg = Release|Windows-x64 + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Windows-x64.Build.0 = Release|Windows-x64 + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Windows-x64.Deploy.0 = Release|Windows-x64 + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Windows-x86.ActiveCfg = Release|Windows-x86 + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Windows-x86.Build.0 = Release|Windows-x86 + {623ED577-0A06-4A07-A70B-D179FBCCC78D}.Release|Windows-x86.Deploy.0 = Release|Windows-x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/README.md b/README.md index 56dfd7c..8bf8316 100644 --- a/README.md +++ b/README.md @@ -58,9 +58,7 @@ The required database tables get generated automatically. You need at minimum [Node.js](https://nodejs.org/en/) version 6.x. -Open up a terminal and enter ``npm run boot`` to start the server or ``npm run api`` to start the web-api. - -To Update the Server enter ``npm run update`` +Open up a terminal and enter ``run.bat`` to start the server options. ## Docker setup diff --git a/api/index.html b/api/index.html index d043257..1fc9434 100644 --- a/api/index.html +++ b/api/index.html @@ -1,4 +1,4 @@ - + @@ -7,7 +7,7 @@ POGOserver api - + diff --git a/install-windows.bat b/install-windows.bat deleted file mode 100644 index b69e8ac..0000000 --- a/install-windows.bat +++ /dev/null @@ -1,2 +0,0 @@ -set LIBPROTOBUF=%CD%\protobuf -npm install node-protobuf && npm install \ No newline at end of file diff --git a/package.json b/package.json index c385bc9..5fd090d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "POGOServer", "version": "0.6.1", - "description": "", + "description": "Pokemon GO Server Emulator ", "repository": { "type": "git", "url": "git://github.com/maierfelix/POGOServer.git" @@ -20,22 +20,23 @@ "author": "Felix Maier", "license": "GNU GPL v3", "dependencies": { - "babel-cli": "^6.11.4", - "babel-preset-es2015": "^6.13.1", - "babel-preset-stage-0": "^6.5.0", + "babel-cli": "^6.18.0", + "babel-preset-es2015": "^6.18.0", + "babel-preset-stage-0": "^6.16.0", "directory-tree": "^1.1.1", "fs-extra": "^0.30.0", "jwt-decode": "^2.1.0", "mysql": "^2.11.1", "nodegit": "^0.16.0", - "node-pogo-protos": "^1.4.0", + "node-pogo-protos": "^1.5.0", "pcrypt": "git+https://github.com/laverdet/pcrypt.git", "pogo-asset-downloader": "^0.3.1", "pokerare": "^0.1.1", - "pokemongo-protobuf": "^1.11.0", + "pokemongo-protobuf": "^1.12.0", "prompt": "^1.0.0", "s2-geometry": "^1.2.9", "url": "^0.11.0" }, - "devDependencies": {} + "devDependencies": { + } } diff --git a/run.bat b/run.bat new file mode 100644 index 0000000..b68f755 --- /dev/null +++ b/run.bat @@ -0,0 +1,50 @@ +CLS +@ECHO off +:init +ECHO. +TYPE %CD%\.greet +ECHO. +ECHO. +ECHO 1 - Run Install +ECHO 2 - Run POGOserver +ECHO 3 - Run Web-API +ECHO 4 - Run POGOserver Update +ECHO Q - EXIT +ECHO. +CHOICE /C:1234Q /M "Please select a control:" +IF ERRORLEVEL 5 GOTO exit +IF ERRORLEVEL 4 GOTO four +IF ERRORLEVEL 3 GOTO three +IF ERRORLEVEL 2 GOTO two +IF ERRORLEVEL 1 GOTO one +GOTO end + +:one +ECHO POGOserver Install and build +SET LIBPROTOBUF=%CD%\protobuf +npm install node-protobuf && npm install +GOTO end + +:two +ECHO Run POGOserver Localhost +npm run boot +GOTO end + +:three +ECHO Start POGOserver web-api on port 9000 +npm run api +GOTO end + +:four +ECHO POGOserver updater +npm run update + +:exit +CHOICE /M "Do yo really want to quit" +IF ERRORLEVEL 2 GOTO init + +:end +ECHO. +ECHO. +PAUSE +ECHO. diff --git a/src/api.js b/src/api.js index 3fcac76..7c71b61 100644 --- a/src/api.js +++ b/src/api.js @@ -7,9 +7,7 @@ import Cell from "./models/World/Cell"; import print from "./print"; import CFG from "../cfg"; -import { - getHashCodeFrom -} from "./utils"; +import { getHashCodeFrom } from "./utils"; const S2Geo = s2.S2; diff --git a/src/index.js b/src/index.js index dc458ed..af3cf47 100644 --- a/src/index.js +++ b/src/index.js @@ -4,12 +4,7 @@ import request from "request"; import readline from "readline"; import POGOProtos from "pokemongo-protobuf"; -import { - _toCC, - deXOR, - inherit, - getHashCodeFrom -} from "./utils"; +import { _toCC, deXOR, inherit, getHashCodeFrom } from "./utils"; import print from "./print"; import CFG from "../cfg"; diff --git a/src/request.js b/src/request.js index 83bc7fd..f0d5233 100644 --- a/src/request.js +++ b/src/request.js @@ -6,11 +6,7 @@ import POGOProtos from "pokemongo-protobuf"; import print from "./print"; import CFG from "../cfg"; -import { - deXOR, - validEmail, - getHashCodeFrom -} from "./utils"; +import { deXOR, validEmail, getHashCodeFrom } from "./utils"; /** * @param {Request} req diff --git a/src/response.js b/src/response.js index f9e39f7..5126150 100644 --- a/src/response.js +++ b/src/response.js @@ -3,9 +3,7 @@ import POGOProtos from "pokemongo-protobuf"; import print from "./print"; import CFG from "../cfg"; -import { - _toCC -} from "./utils"; +import { _toCC } from "./utils"; /** * @param {Request} req diff --git a/src/setup.js b/src/setup.js index 5bdde55..55e9321 100644 --- a/src/setup.js +++ b/src/setup.js @@ -10,11 +10,7 @@ import * as shared from "./shared"; import GameMaster from "./models/GameMaster"; -import { - _toCC, - capitalize, - idToPkmnBundleName -} from "./utils"; +import { _toCC, capitalize, idToPkmnBundleName } from "./utils"; export function setup() { diff --git a/taco.json b/taco.json new file mode 100644 index 0000000..be46c27 --- /dev/null +++ b/taco.json @@ -0,0 +1,3 @@ +{ + "cordova-cli": "6.1.1" +}