Giter Site home page Giter Site logo

creeppork / magma Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 1.0 969 KB

Magma is a CLI tool for Arma 3 server mod managment that works both on Windows and Linux.

License: MIT License

JavaScript 0.82% TypeScript 99.16% Batchfile 0.02%
arma arma3 cli linux linuxgsm magma oclif updater windows

magma's People

Contributors

creeppork avatar dependabot-preview[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

aussie-battler

magma's Issues

Add mod profiles

Allows configuring multiple mod profiles to quickly switch between mod presets.

  • preset - displays the active preset
  • preset:add <name> <...item ids> - add mods to a preset
  • preset:create <name> - creates a new preset
  • preset:delete <name> - deletes a created preset
  • preset:detach <name> <...item ids> - removes mods from a preset
  • preset:generate <name> - exports a Arma 3 Launcher preset
  • preset:list - lists all presets, their mods and names
  • preset:import <name> <url/file> - import from a URL/disk an Arma 3 Launcher mod preset
  • preset:select <name> - sets the active preset

SteamCMD displaying an error is not caught as an error and Magma continues

✔ Logging in
⠼ Processing your requestError: ENOENT: no such file or directory, scandir '/home/arma/s3/serverfiles/steamapps/workshop/content/107410/763003641'
    at klawSync (~/.npm-global/lib/node_modules/@creeppork/magma/node_modules/klaw-sync/klaw-sync.js:13:25)
    at Function.getAllDirectoriesRecursively (~/.npm-global/lib/node_modules/@creeppork/magma/lib/file.js:31:16)
    at SteamCmd.everythingToLowercase (~/.npm-global/lib/node_modules/@creeppork/magma/lib/steam/cmd.js:229:37)
    at SteamCmd.updateFiles (~/.npm-global/lib/node_modules/@creeppork/magma/lib/steam/cmd.js:207:14)
    at SteamCmd.downloadMods (~/.npm-global/lib/node_modules/@creeppork/magma/lib/steam/cmd.js:142:24)
    at <anonymous>
⠴ Processing your request

Timeout with Large Mods

This is a SteamCMD issue, but wondering if there's a way to get a work around into magma.

Basically anything above a few hundred MB times out when trying to download no matter what. I get the same issue in steamCMD directly so I know it's not an issue with magma. The "fix" for steamCMD online has been adding +validate at the end of the command to download and keep trying until it finishes. Obnoxious but steam wont fix their broke stuff. In testing I've not been able to download anything above 500mb successfully.

Is there a way to support something like that with magma? I didn't see anything in the official docs. And managing my mods using this tool and steamCMD directly is a little weird.

Add mod enable/disable commands

This would allow mods to be quickly enabled/disabled without them being removed from disk and redownloaded when enabled again.

For a very large PBO, .toString() would cause a heap out of memory exception

return await Crypto.createChecksum(fs.readFileSync(file).toString());

✔ Logging in
✔ Processing item
✔ Waiting for Steam to copy files
✔ Waiting for Steam to copy files
⠋ Comparing signatures and updating mod data
<--- Last few GCs --->

[20823:0x3681a70]    49302 ms: Mark-sweep 33.1 (39.1) -> 33.1 (39.1) MB, 12.4 / 0.0 ms  (average mu = 0.996, current mu = 0.002) allocation failure GC in old space requested
[20823:0x3681a70]    49318 ms: Mark-sweep 33.1 (39.1) -> 33.1 (39.1) MB, 16.6 / 0.0 ms  (average mu = 0.994, current mu = 0.001) last resort GC in old space requested
[20823:0x3681a70]    49335 ms: Mark-sweep 33.1 (39.1) -> 33.1 (39.1) MB, 16.9 / 0.0 ms  (average mu = 0.988, current mu = 0.001) last resort GC in old space requested


<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 0x32b5b7fdbe1d]
Security context: 0x2a909511e6e9 <JSObject>
    1: toString [0x3c1344b9fcb9] [buffer.js:645] [bytecode=0x211746d8f0c9 offset=31](this=0x1690c8215701 <Uint8Array map = 0x2f3ca44d5b89>,encoding=0x0ca2e3a026f1 <undefined>,start=0x0ca2e3a026f1 <undefined>,end=0x0ca2e3a026f1 <undefined>)
    2: arguments adaptor frame: 0->3
    3: getChecksumForFile [0xfcab1929169] [/home/creeppork/code/Magma/src/file.ts:3...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: 0x8f9d10 node::Abort() [node]
 2: 0x8f9d5c  [node]
 3: 0xaffd0e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xafff44 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xef4152  [node]
 6: 0xf0396f v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [node]
 7: 0xed351b v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [node]
 8: 0xed3e22 v8::internal::Factory::NewStringFromUtf8(v8::internal::Vector<char const>, v8::internal::PretenureFlag) [node]
 9: 0xb0dd59 v8::String::NewFromUtf8(v8::Isolate*, char const*, v8::NewStringType, int) [node]
10: 0x9c1518 node::StringBytes::Encode(v8::Isolate*, char const*, unsigned long, node::encoding, v8::Local<v8::Value>*) [node]
11: 0x916160  [node]
12: 0xb8dfef  [node]
13: 0xb8eb59 v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [node]
14: 0x32b5b7fdbe1d 
[1]    20823 abort (core dumped)  ./bin/run download 763003641

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.