{"_id":"@djwoodz/satisfactory-dedicated-server-lightweight-query-probe","name":"@djwoodz/satisfactory-dedicated-server-lightweight-query-probe","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@djwoodz/satisfactory-dedicated-server-lightweight-query-probe","version":"0.1.0","description":"A zero dependency Node.js library for probing the Lightweight Query API of a Satisfactory Dedicated Server.","main":"index.js","scripts":{"test":"npx eslint \"**/*.js\""},"repository":{"type":"git","url":"git+https://github.com/DJWoodZ/satisfactory-dedicated-server-lightweight-query-probe.git"},"keywords":["Satisfactory","Dedicated Server","Lightweight Query API","Query Port"],"author":{"name":"DJ WoodZ"},"license":"MIT","bugs":{"url":"https://github.com/DJWoodZ/satisfactory-dedicated-server-lightweight-query-probe/issues"},"homepage":"https://github.com/DJWoodZ/satisfactory-dedicated-server-lightweight-query-probe#readme","devDependencies":{"eslint":"^8.57.1","eslint-config-airbnb-base":"^15.0.0","eslint-plugin-import":"^2.30.0"},"gitHead":"9ecd52e1d5978fc294182bcac05f8237b798cd63","_id":"@djwoodz/satisfactory-dedicated-server-lightweight-query-probe@0.1.0","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-VGMIuBsX5ZEjp6hEEz4Ez5EeU3N1EYk9ebVXG2vAbV2a3yqGJm7Ew7uiMY1Up0uErCeIsxRiDRJrQmq9TJpQ4g==","shasum":"67ff9e47836d565ea6d4a68f755e4e4c6b1bffe9","tarball":"https://registry.npmjs.org/@djwoodz/satisfactory-dedicated-server-lightweight-query-probe/-/satisfactory-dedicated-server-lightweight-query-probe-0.1.0.tgz","fileCount":5,"unpackedSize":7537,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDQPxxvRY72VKxVfci1Y8csymgLGext3YPQCCyS+drDwIgBTRH3w7GRAH6ayBIgVq2t/Cys1+Ua9aVwEga8gVuLKI="}]},"_npmUser":{"name":"djwoodz","email":"npm@djwoodz.com"},"directories":{},"maintainers":[{"name":"djwoodz","email":"npm@djwoodz.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/satisfactory-dedicated-server-lightweight-query-probe_0.1.0_1726602633044_0.3089016295915299"},"_hasShrinkwrap":false}},"time":{"created":"2024-09-17T19:50:32.950Z","0.1.0":"2024-09-17T19:50:33.210Z","modified":"2024-09-17T19:50:33.439Z"},"maintainers":[{"name":"djwoodz","email":"npm@djwoodz.com"}],"description":"A zero dependency Node.js library for probing the Lightweight Query API of a Satisfactory Dedicated Server.","homepage":"https://github.com/DJWoodZ/satisfactory-dedicated-server-lightweight-query-probe#readme","keywords":["Satisfactory","Dedicated Server","Lightweight Query API","Query Port"],"repository":{"type":"git","url":"git+https://github.com/DJWoodZ/satisfactory-dedicated-server-lightweight-query-probe.git"},"author":{"name":"DJ WoodZ"},"bugs":{"url":"https://github.com/DJWoodZ/satisfactory-dedicated-server-lightweight-query-probe/issues"},"license":"MIT","readme":"Satisfactory Dedicated Server Lightweight Query Probe\n=====================================================\n\nA zero dependency Node.js library for probing the Lightweight Query API of a [Satisfactory Dedicated Server](https://satisfactory.fandom.com/wiki/Dedicated_servers).\n\nInstallation\n------------\n\n```\nnpm i @djwoodz/satisfactory-dedicated-server-lightweight-query-probe\n```\n\nExample Usage\n-------------\n\n```js\n// import module\nconst { probe } = require('@djwoodz/satisfactory-dedicated-server-lightweight-query-probe');\n```\n\n```js\n// probe using await\nconst data = await probe('127.0.0.1', 7777, 10000);\nconsole.log(data);\n```\n\n```js\n// probe using .then()\nprobe('127.0.0.1', 7777, 10000)\n  .then((data) => {\n    console.log(data);\n  });\n```\n\nExample Response\n----------------\n\n```js\n{\n  protocolVersion: 1, // the protocol version\n  clientData: 1726262591138n, // the unique data sent to the server (timestamp)\n  serverState: 'Game ongoing', // the state of the server\n  serverVersion: 366202, // the version of the server\n  serverFlags: 0n, // the server flags\n  subStates: [ // the sub states\n    { id: 0, version: 17 },\n    { id: 1, version: 1 },\n    { id: 3, version: 5 },\n    { id: 2, version: 1 }\n  ],\n  serverName: 'Satisfactory Server' // the server name\n}\n```\n\nAPI\n---\n\n## probe([address], [port], [timeout]) ⇒ <code>Promise</code>\n\nRequests data from a Satisfactory Dedicated Server's Lightweight Query API\n\n**Returns**: <code>Promise</code> - Promise object that represents Lightweight Query API data\n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [address] | <code>string</code> | <code>&#x27;127.0.0.1&#x27;</code> | The address of the Satisfactory Dedicated Server (hostname or IP) |\n| [port] | <code>number</code> \\| <code>string</code> | <code>7777</code> | The port number of the Satisfactory Dedicated Server |\n| [timeout] | <code>number</code> \\| <code>string</code> | <code>10000</code> | The timeout for the request (milliseconds) |","readmeFilename":"README.md"}