5.6.79 • Published 12 months ago

@zitterorg/modi-non-tenetur v5.6.79

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

@zitterorg/modi-non-tenetur

Build status NPM Node version bitHound Dependencies bitHound Dev Dependencies Coverage

A thin client for committing/retrieving modules from a Screeps server, including private servers. If you are using Webpack, see langri-sha/screeps-webpack-plugin.

The client uses the Screeps Web API. To authenticate, make sure you have an account password configured, if you've registered via Steam or GitHub. If you provide a token, it will be used instead to authorize requests.

On private servers, make sure that you have the authorization mod installed and an account created.

For something more comprehensive, check out screepers/node-sreeps-api.

Install

npm install @zitterorg/modi-non-tenetur

Usage

import ScreepsModules from '@zitterorg/modi-non-tenetur'

const client = new ScreepsModules(options)

Options

const client = new ScreepsModules({
  email: 'EMAIL',
  password: 'PASSWORD',
  token: 'TOKEN'
  serverUrl: 'https://screeps.com',
  serverPassword: 'SERVER_PASS',
  gzip: false
}

ScreepsModules#commit([branch,] modules): Object

Commit modules to the provided branch, or to the one that's active in the world.

// Update branch 'sim'
await client.commit('sim', {
  main: 'module.exports = () => {console.log(Game.time)}'
})
// => {ok: 1}
// Update branch 'sim'

// Update the active world branch
await client.commit({
  main: 'module.exports = () => {console.log(Game.time)}'
})
// => {ok: 1}

ScreepsModules#fetch([branch])

Retrieve scripts from the provided branch, or from the one that's active in the world.

// Retrieve branch 'sim'
await client.retrieve('sim')
// => {main: 'module.exports = () => {console.log(Game.time)}'}

// Fetch active world branch
await client.retrieve()
// => Object

ScreepsModules#refreshToken()

Updates the client token. Returns the token.

await client.refreshToken()
// => 'TOKEN'

Troubleshooting

To avoid leaking sensitive information, the client only returns opaque responses and is safe to use in CI. If you need to inspect the responses, start your process with DEBUG=@zitterorg/modi-non-tenetur node $ARGS.

package manageres2018identifierscharsetcolorstreaminstalltrimLeftlimitedi18nWebSocketMicrosoftlinewrapkeyInt16ArrayworkflowbanneriamutilitiesrequestelasticachecheckposetouchcryptolastnegativestoragegatewaybuffersmkdirstestStyleSheetzodpostcss-pluginloggerECMAScript 7logmovespawnbusy0formattingefficientbluebirdclientreducedeterministiclistenersStreamscallbindsiderequireoptionfunctionsnumbertoSorteddropcopytypedarrayutilgetoptreadprivate dataECMAScript 2015columnsyntaxerrorpersistentietypedlogging_.extendsharedarraybufferroute53snshardlinkstestingelbstringpromiseschilddayjstoobjectHyBixdg-openconsumeavarouting-0ArrayBuffer#slicechanneloptimizerweaksetStreamgetproxyTypedArrayutil.inspectimportexportequalityxdgpruneoffsetPromiseRFC-6455browserlistjoiargparsefull-widthprivatebreakstablesetfindLastiterationvalidateRxJSwebsiteemitES2022regular expressiontypanionaccessorenumerableescapeparsinglazyenvgetOwnPropertyDescriptorreact-testing-libraryislinklocationrgbisConcatSpreadableweakmaptrimJSONobjectcommand-lineecmascriptvalidgetPrototypeOfrm -rfdefinePropertymkdirespreedragObject.keysflagsRxreduxprotoES5chromiumbeanstalkpyyamlflatMapkinesisUint32Arraywhichvestdescriptorindicatorargumenterrores8iconvtypewaitvalidationexpressmapreducees5utilityeditorastsetterbyteOffsetargumentsUint8ArraywrapregexpstartcmdbundlingintrinsiceslintstylessuperstructconfigrapiddatapushObjectprettyforEacheventsreadablestreamWebSocketsquoteslicemulti-packageprotobufarktypeArray.prototype.flatMapes-abstractassignelectroncircularTypeBoxdependenciessortedeventDispatchersameValueZeroECMAScript 2018Array.prototype.filterjasmineglobmodulesfilterboundhigher-orderstreamsnodeminimaldescriptorslooksymlinkglaciervalueexecutablethrottletapejsgetterjestlimitunicodeimportairbnbESSymbolvarscommandterminalratetakeiteraterandomtoStringTagES8css-in-jsroutecliserializegetintrinsicURLSearchParamsECMAScript 2019apiwhatwgslotString.prototype.matchAlleveryextensionmobilegdprspinnersspeccompilerfastifycreatecharactertimeapptelephonedircodescoercibleaccessibilityconcurrencyyamlyupprocesssymbolObject.isinternal slotfindLastIndexflattencallworkspace:*Float64Arraynativeredactfast-deep-copygraphqlbufferTypeScriptdependency managerrmdirwafpopmotionbatcheventEmitterYAMLECMAScript 2017matchAlltrimRightexecmkdirpgesturescoreES2021mochacallbackpostcsstsformscallboundfolderflagpropertyECMAScript 2021typed arraytddECMAScript 2016JSON-SchemaamazonES7dynamodbuuidstyleURLSymbol.toStringTagWeakMapes-shimshelperscloudwatchsequencepromisefindnameimmerbinddotenvdatastructureponyfilljsxdefineequalartcachereact-hook-formspinnerserializerprotocol-bufferslook-upinternalregexupjsdiffawslaunchObject.getPrototypeOfcloudfrontcall-boundIteratorthreeautoscalingESnextformatnegative zerocomparedataViewwidthtostringtagcollection.es6functionlrusharedwgetparserES2023framerSetreact animationspeedcomputed-typesinstallerbytenpmmatchesprefixsafecollectiontoolkitschemaregular expressionsfast-cloneenderjapanesecharacterschinesesimpledblockfileES2018owncloudformationarraysnodejsfetchwalkinges2016styleguidees20153dwalktypesaferatelimitbrowserpolyfillopensdirectoryarraydeepclonematchdeepemrextendtypeofpipeES2019assertionmomentfastcopycurlduplexmimestringifypositiveconcatxhrtrimStartdom-testing-librarypluginrm -fridleES6loadingawaitreusehas-owndifffullmake dirconsoleexpressionpropertieslintrobustes7code pointspropjshintshellmime-dbstarterRegExp#flagsdeep-copys3moduleObject.assignargsInt32Arraypackage.jsoneast-asian-widthinvarianthashoutputArrayBufferasyncsymlinkshttpguidautoprefixerBigUint64Arrayfunctionalextrafastmetadatadebughelperqueuelength256io-tsloadbalancingwordbreakomitdescriptionspringvpcmakeajaxconvertjQuerydeep-cloneMapjavascriptstructuredClonetoolsBigInt64ArrayArrayphonemapchromeECMAScript 3shamArray.prototype.findLastIndexECMAScript 5performantassertdeleteshebangeslint-pluginframeworkdataviewfunction.lengthrangeerrorUint8ClampedArraypreserve-symlinksshimfast-copystringifierwritableUint16ArraysuperagenttoArraygenericseslintplugincall-bindobjviewrmsyntaxsettingscloudsearchec2inspectresolveconcatMapform-validationECMAScript 2020l10nfindupfind-updomflatArray.prototype.flatECMAScript 2023inputReactiveExtensionsdategroupByebspatchassertsArrayBuffer.prototype.slicestdlibparentsinferencejsonxtermreal-timeObservable$.extenda11yglobalsstyled-componentswarningwebreadableurlssetImmediatesqsreact-hookssomeCSSStyleDeclarationpicomatchglobalreactiteratortermquerystreams2WeakSetmimetypesECMAScript 2022pnpm9endpointFloat32ArraydefaultkarmadebuggerbundlerprototyperdsfpsvisualschemeworkerjsdomgroupprogressopenercolorsbddsortUnderscoresymbolsasciiinArray.prototype.flattenInt8Arrayarraybufferentriesswfclass-validatorhooksnopeCSSkoreanES2016querystringttyargvObservablespathstylingqueueMicrotaskuninstallReflect.getPrototypeOfcjkes2017estypescripticutraversePushserializationparentconfigurableredux-toolkitshrinkwrapFunction.prototype.namefigletparse
5.6.79

12 months ago

4.6.76

12 months ago

5.6.77

12 months ago

5.6.76

12 months ago

5.6.78

12 months ago

4.6.73

12 months ago

4.6.74

12 months ago

4.6.75

12 months ago

4.5.71

12 months ago

4.6.71

12 months ago

4.6.72

12 months ago

4.5.70

12 months ago

4.5.69

12 months ago

4.5.67

12 months ago

4.5.68

12 months ago

3.3.33

1 year ago

3.3.34

1 year ago

4.5.61

1 year ago

4.4.50

1 year ago

4.5.62

1 year ago

3.2.33

1 year ago

4.5.60

1 year ago

3.2.32

1 year ago

4.5.65

12 months ago

4.4.54

1 year ago

4.5.66

12 months ago

4.4.53

1 year ago

4.5.63

1 year ago

4.4.52

1 year ago

4.5.64

12 months ago

4.4.51

1 year ago

4.4.56

1 year ago

4.4.55

1 year ago

4.4.43

1 year ago

4.4.42

1 year ago

4.4.41

1 year ago

4.4.40

1 year ago

4.5.58

1 year ago

4.4.47

1 year ago

4.3.35

1 year ago

4.5.59

1 year ago

4.4.46

1 year ago

4.3.34

1 year ago

4.5.56

1 year ago

4.4.45

1 year ago

4.5.57

1 year ago

4.4.44

1 year ago

4.3.39

1 year ago

4.3.38

1 year ago

4.4.49

1 year ago

4.3.37

1 year ago

4.4.48

1 year ago

4.3.36

1 year ago

4.4.39

1 year ago

3.2.31

1 year ago

3.2.28

1 year ago

3.2.27

1 year ago

3.2.29

1 year ago

3.2.30

1 year ago

3.2.24

1 year ago

3.2.26

1 year ago

3.2.25

1 year ago

3.2.23

1 year ago

3.1.14

1 year ago

3.1.13

1 year ago

3.2.20

1 year ago

3.2.22

1 year ago

3.2.21

1 year ago

3.2.15

1 year ago

3.2.14

1 year ago

3.2.17

1 year ago

3.2.16

1 year ago

3.2.19

1 year ago

3.2.18

1 year ago

3.1.12

1 year ago

3.0.12

1 year ago

3.0.10

1 year ago

3.0.11

1 year ago

3.0.8

1 year ago

3.0.9

1 year ago

2.0.8

1 year ago

2.0.7

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago