├── .dockerignore ├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── index.js ├── milsymbol-server.png ├── package-lock.json └── package.json /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | Readme 3 | LICESNE 4 | milsymbol-server.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | ## Using a smaller image like Alpine does 2 | ## not work because of missing dependencies 3 | ## to libpng 4 | FROM node:10 5 | 6 | WORKDIR /app 7 | COPY package.json ./ 8 | RUN npm install --production 9 | EXPOSE 2525 10 | 11 | COPY index.js . 12 | 13 | USER node 14 | CMD ["node", "./index.js"] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Måns Beckman - www.spatialillusions.com 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Milsymbol in Node.js 2 | 3 | ![milsymbol-server](https://raw.githubusercontent.com/spatialillusions/milsymbol-server/master/milsymbol-server.png) 4 | 5 | This is an example of how you can create a minimal military symbol server using Node.js and milsymbol. 6 | 7 | It supports output of military symbols as **SVG** and as **PNG**, you can use all options available for milsymbol to add modifiers for your symbols as well. 8 | 9 | Installation: 10 | 11 | ``` 12 | npm install milsymbol-server 13 | ``` 14 | 15 | To start the server, navigate to this folder in a terminal and run: 16 | 17 | ``` 18 | node index.js 19 | ``` 20 | 21 | Docker Container: 22 | 23 | milsymbol-server will be available from Docker Hub, but at the moment you will have to build the server by your self by running 24 | 25 | ``` 26 | docker build -t spatialillusions/milsymbol-server:1.0.0 . 27 | ``` 28 | 29 | In order to run the server as a daemon and map the exposed port to your host just run 30 | 31 | ``` 32 | docker run -d -p 2525:2525 spatialillusions/milsymbol-server:1.0.0 33 | ``` 34 | 35 | The symbols are named **SIDC**.**FILETYPE**, and you can access them using: 36 | 37 | http://${hostname}:${port}/SFG-UCI---.png _or_ 38 | 39 | http://${hostname}:${port}/SFG-UCI---.svg 40 | 41 | You can add any milsymbol options to the query string 42 | 43 | SFG-UCI---.png?uniqueDesignation=BA01&square=true 44 | 45 | ## Public test server 46 | 47 | Thanks to the wonderful people at [syncpoint.io](https://syncpoint.io) there is a public server that you can try out at: 48 | 49 | https://milsymbol-server.syncpoint.io/ 50 | 51 | Here is a sample URL that you can try out: 52 | 53 | https://milsymbol-server.syncpoint.io/SFGPEXL-----.svg?uniqueDesignation=MILSYMBOL&higherFormation=SYNCPOINT.IO 54 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | // Minimal military symbol server using nodejs and milsymbol 2 | const os = require("os"); 3 | const http = require("http"); 4 | const ms = require("milsymbol"); 5 | const Canvas = require("canvas"); // switch to canvas when node-pre-gyp follows redirects 6 | const url = require("url"); 7 | const hostname = os.hostname(); 8 | const bindAddress = process.env.BIND_ADDRESS || "0.0.0.0"; 9 | const port = 2525; // Because MIL-STD-2525 :-) 10 | 11 | ms.Symbol.prototype.asNodeCanvas = function() { 12 | const MAX_SIZE = 2000; // Maximum width/hight for the canvas to aviod out of memory 13 | ms._brokenPath2D = true; // Make it use our custom polyfill for Path2D 14 | const ratio = 1; 15 | const canvas = Canvas.createCanvas( 16 | Math.min(this.width, MAX_SIZE), 17 | Math.min(this.height, MAX_SIZE) 18 | ); 19 | const ctx = canvas.getContext("2d"); 20 | ctx.scale(ratio * this.style.size / 100, ratio * this.style.size / 100); 21 | ctx.translate( 22 | -(this.bbox.x1 - this.style.strokeWidth - this.style.outlineWidth), 23 | -(this.bbox.y1 - this.style.strokeWidth - this.style.outlineWidth) 24 | ); 25 | this.canvasDraw.call(this, ctx, this.drawInstructions); 26 | return canvas; 27 | }; 28 | 29 | // Make sure only milsymbol options are set in the query string 30 | const a = new ms.Symbol(); 31 | const validation = Object.assign(a.options, a.style); 32 | function query2object(props) { 33 | var obj = {}; 34 | for (let key in props) { 35 | if (validation.hasOwnProperty(key)) { 36 | if (typeof validation[key] == "boolean") { 37 | obj[key] = props[key].toUpperCase() == "TRUE"; 38 | } else { 39 | if (typeof validation[key] == "number") { 40 | obj[key] = Number(props[key]); 41 | } else { 42 | obj[key] = props[key]; 43 | } 44 | } 45 | } 46 | } 47 | return obj; 48 | } 49 | 50 | const server = http.createServer((req, res) => { 51 | var url_parts = url.parse(req.url, true); 52 | var url_pathname = url_parts.pathname.split("/"); 53 | var url_filename = url_pathname[url_pathname.length - 1]; 54 | var url_filenametype = url_filename.split("."); 55 | if (url_filenametype[1].toUpperCase() == "SVG") { 56 | res.statusCode = 200; 57 | res.setHeader("Content-Type", "image/svg+xml"); 58 | var symbol = new ms.Symbol( 59 | url_filenametype[0], 60 | query2object(url_parts.query) 61 | ).asSVG(); 62 | res.end(symbol); 63 | return; 64 | } 65 | if (url_filenametype[1].toUpperCase() == "PNG") { 66 | res.statusCode = 200; 67 | res.setHeader("Content-Type", "image/png"); 68 | new ms.Symbol(url_filenametype[0], query2object(url_parts.query)) 69 | .asNodeCanvas() 70 | .pngStream() 71 | .pipe(res); 72 | return; 73 | } 74 | res.statusCode = 404; 75 | res.end("404 Not found"); 76 | console.log("Invalid request: " + req.url); 77 | return; 78 | }); 79 | 80 | server.listen(port, bindAddress, () => { 81 | console.log( 82 | `Try out the symbol server: http://${hostname}:${port}/SFG-UCI---.png` 83 | ); 84 | }); 85 | -------------------------------------------------------------------------------- /milsymbol-server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spatialillusions/milsymbol-server/50850ebbc8616c2adc46ec20e336f1146f32d434/milsymbol-server.png -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "milsymbol-server", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@mapbox/node-pre-gyp": { 8 | "version": "1.0.9", 9 | "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.9.tgz", 10 | "integrity": "sha512-aDF3S3rK9Q2gey/WAttUlISduDItz5BU3306M9Eyv6/oS40aMprnopshtlKTykxRNIBEZuRMaZAnbrQ4QtKGyw==", 11 | "requires": { 12 | "detect-libc": "^2.0.0", 13 | "https-proxy-agent": "^5.0.0", 14 | "make-dir": "^3.1.0", 15 | "node-fetch": "^2.6.7", 16 | "nopt": "^5.0.0", 17 | "npmlog": "^5.0.1", 18 | "rimraf": "^3.0.2", 19 | "semver": "^7.3.5", 20 | "tar": "^6.1.11" 21 | } 22 | }, 23 | "abbrev": { 24 | "version": "1.1.1", 25 | "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", 26 | "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" 27 | }, 28 | "agent-base": { 29 | "version": "6.0.2", 30 | "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", 31 | "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", 32 | "requires": { 33 | "debug": "4" 34 | } 35 | }, 36 | "ansi-regex": { 37 | "version": "5.0.1", 38 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 39 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" 40 | }, 41 | "aproba": { 42 | "version": "2.0.0", 43 | "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", 44 | "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" 45 | }, 46 | "are-we-there-yet": { 47 | "version": "2.0.0", 48 | "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", 49 | "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", 50 | "requires": { 51 | "delegates": "^1.0.0", 52 | "readable-stream": "^3.6.0" 53 | } 54 | }, 55 | "balanced-match": { 56 | "version": "1.0.2", 57 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 58 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" 59 | }, 60 | "brace-expansion": { 61 | "version": "1.1.11", 62 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 63 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 64 | "requires": { 65 | "balanced-match": "^1.0.0", 66 | "concat-map": "0.0.1" 67 | } 68 | }, 69 | "canvas": { 70 | "version": "2.9.1", 71 | "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.9.1.tgz", 72 | "integrity": "sha512-vSQti1uG/2gjv3x6QLOZw7TctfufaerTWbVe+NSduHxxLGB+qf3kFgQ6n66DSnuoINtVUjrLLIK2R+lxrBG07A==", 73 | "requires": { 74 | "@mapbox/node-pre-gyp": "^1.0.0", 75 | "nan": "^2.15.0", 76 | "simple-get": "^3.0.3" 77 | } 78 | }, 79 | "chownr": { 80 | "version": "2.0.0", 81 | "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", 82 | "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" 83 | }, 84 | "color-support": { 85 | "version": "1.1.3", 86 | "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", 87 | "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==" 88 | }, 89 | "concat-map": { 90 | "version": "0.0.1", 91 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 92 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" 93 | }, 94 | "console-control-strings": { 95 | "version": "1.1.0", 96 | "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", 97 | "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" 98 | }, 99 | "debug": { 100 | "version": "4.3.4", 101 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 102 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 103 | "requires": { 104 | "ms": "2.1.2" 105 | } 106 | }, 107 | "decompress-response": { 108 | "version": "4.2.1", 109 | "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", 110 | "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", 111 | "requires": { 112 | "mimic-response": "^2.0.0" 113 | } 114 | }, 115 | "delegates": { 116 | "version": "1.0.0", 117 | "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", 118 | "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" 119 | }, 120 | "detect-libc": { 121 | "version": "2.0.1", 122 | "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", 123 | "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==" 124 | }, 125 | "emoji-regex": { 126 | "version": "8.0.0", 127 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 128 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" 129 | }, 130 | "fs-minipass": { 131 | "version": "2.1.0", 132 | "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", 133 | "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", 134 | "requires": { 135 | "minipass": "^3.0.0" 136 | } 137 | }, 138 | "fs.realpath": { 139 | "version": "1.0.0", 140 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 141 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" 142 | }, 143 | "gauge": { 144 | "version": "3.0.2", 145 | "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", 146 | "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", 147 | "requires": { 148 | "aproba": "^1.0.3 || ^2.0.0", 149 | "color-support": "^1.1.2", 150 | "console-control-strings": "^1.0.0", 151 | "has-unicode": "^2.0.1", 152 | "object-assign": "^4.1.1", 153 | "signal-exit": "^3.0.0", 154 | "string-width": "^4.2.3", 155 | "strip-ansi": "^6.0.1", 156 | "wide-align": "^1.1.2" 157 | } 158 | }, 159 | "glob": { 160 | "version": "7.2.3", 161 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", 162 | "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", 163 | "requires": { 164 | "fs.realpath": "^1.0.0", 165 | "inflight": "^1.0.4", 166 | "inherits": "2", 167 | "minimatch": "^3.1.1", 168 | "once": "^1.3.0", 169 | "path-is-absolute": "^1.0.0" 170 | } 171 | }, 172 | "has-unicode": { 173 | "version": "2.0.1", 174 | "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", 175 | "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" 176 | }, 177 | "https-proxy-agent": { 178 | "version": "5.0.1", 179 | "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", 180 | "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", 181 | "requires": { 182 | "agent-base": "6", 183 | "debug": "4" 184 | } 185 | }, 186 | "inflight": { 187 | "version": "1.0.6", 188 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 189 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 190 | "requires": { 191 | "once": "^1.3.0", 192 | "wrappy": "1" 193 | } 194 | }, 195 | "inherits": { 196 | "version": "2.0.4", 197 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 198 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 199 | }, 200 | "is-fullwidth-code-point": { 201 | "version": "3.0.0", 202 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 203 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" 204 | }, 205 | "lru-cache": { 206 | "version": "6.0.0", 207 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", 208 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", 209 | "requires": { 210 | "yallist": "^4.0.0" 211 | } 212 | }, 213 | "make-dir": { 214 | "version": "3.1.0", 215 | "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", 216 | "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", 217 | "requires": { 218 | "semver": "^6.0.0" 219 | }, 220 | "dependencies": { 221 | "semver": { 222 | "version": "6.3.0", 223 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 224 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" 225 | } 226 | } 227 | }, 228 | "milsymbol": { 229 | "version": "2.0.0-rc2", 230 | "resolved": "https://registry.npmjs.org/milsymbol/-/milsymbol-2.0.0-rc2.tgz", 231 | "integrity": "sha512-eY2b5yaL24y7AtxerICElxVzwpz20kxPXdg7+NrpjQLKNKOGCYd5XPGN+lFzTruCU8PHrVrw9HA8m7U9Z0uHgQ==" 232 | }, 233 | "mimic-response": { 234 | "version": "2.1.0", 235 | "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", 236 | "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==" 237 | }, 238 | "minimatch": { 239 | "version": "3.1.2", 240 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 241 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 242 | "requires": { 243 | "brace-expansion": "^1.1.7" 244 | } 245 | }, 246 | "minipass": { 247 | "version": "3.1.6", 248 | "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", 249 | "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==", 250 | "requires": { 251 | "yallist": "^4.0.0" 252 | } 253 | }, 254 | "minizlib": { 255 | "version": "2.1.2", 256 | "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", 257 | "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", 258 | "requires": { 259 | "minipass": "^3.0.0", 260 | "yallist": "^4.0.0" 261 | } 262 | }, 263 | "mkdirp": { 264 | "version": "1.0.4", 265 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", 266 | "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" 267 | }, 268 | "ms": { 269 | "version": "2.1.2", 270 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 271 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 272 | }, 273 | "nan": { 274 | "version": "2.15.0", 275 | "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", 276 | "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==" 277 | }, 278 | "node-fetch": { 279 | "version": "2.6.7", 280 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", 281 | "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", 282 | "requires": { 283 | "whatwg-url": "^5.0.0" 284 | } 285 | }, 286 | "nopt": { 287 | "version": "5.0.0", 288 | "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", 289 | "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", 290 | "requires": { 291 | "abbrev": "1" 292 | } 293 | }, 294 | "npmlog": { 295 | "version": "5.0.1", 296 | "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", 297 | "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", 298 | "requires": { 299 | "are-we-there-yet": "^2.0.0", 300 | "console-control-strings": "^1.1.0", 301 | "gauge": "^3.0.0", 302 | "set-blocking": "^2.0.0" 303 | } 304 | }, 305 | "object-assign": { 306 | "version": "4.1.1", 307 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 308 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" 309 | }, 310 | "once": { 311 | "version": "1.4.0", 312 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 313 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 314 | "requires": { 315 | "wrappy": "1" 316 | } 317 | }, 318 | "path-is-absolute": { 319 | "version": "1.0.1", 320 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 321 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" 322 | }, 323 | "readable-stream": { 324 | "version": "3.6.0", 325 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", 326 | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", 327 | "requires": { 328 | "inherits": "^2.0.3", 329 | "string_decoder": "^1.1.1", 330 | "util-deprecate": "^1.0.1" 331 | } 332 | }, 333 | "rimraf": { 334 | "version": "3.0.2", 335 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", 336 | "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", 337 | "requires": { 338 | "glob": "^7.1.3" 339 | } 340 | }, 341 | "safe-buffer": { 342 | "version": "5.2.1", 343 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 344 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" 345 | }, 346 | "semver": { 347 | "version": "7.3.7", 348 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", 349 | "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", 350 | "requires": { 351 | "lru-cache": "^6.0.0" 352 | } 353 | }, 354 | "set-blocking": { 355 | "version": "2.0.0", 356 | "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", 357 | "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" 358 | }, 359 | "signal-exit": { 360 | "version": "3.0.7", 361 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", 362 | "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" 363 | }, 364 | "simple-concat": { 365 | "version": "1.0.1", 366 | "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", 367 | "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" 368 | }, 369 | "simple-get": { 370 | "version": "3.1.1", 371 | "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz", 372 | "integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==", 373 | "requires": { 374 | "decompress-response": "^4.2.0", 375 | "once": "^1.3.1", 376 | "simple-concat": "^1.0.0" 377 | } 378 | }, 379 | "string-width": { 380 | "version": "4.2.3", 381 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 382 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 383 | "requires": { 384 | "emoji-regex": "^8.0.0", 385 | "is-fullwidth-code-point": "^3.0.0", 386 | "strip-ansi": "^6.0.1" 387 | } 388 | }, 389 | "string_decoder": { 390 | "version": "1.3.0", 391 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", 392 | "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", 393 | "requires": { 394 | "safe-buffer": "~5.2.0" 395 | } 396 | }, 397 | "strip-ansi": { 398 | "version": "6.0.1", 399 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 400 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 401 | "requires": { 402 | "ansi-regex": "^5.0.1" 403 | } 404 | }, 405 | "tar": { 406 | "version": "6.1.11", 407 | "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", 408 | "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", 409 | "requires": { 410 | "chownr": "^2.0.0", 411 | "fs-minipass": "^2.0.0", 412 | "minipass": "^3.0.0", 413 | "minizlib": "^2.1.1", 414 | "mkdirp": "^1.0.3", 415 | "yallist": "^4.0.0" 416 | } 417 | }, 418 | "tr46": { 419 | "version": "0.0.3", 420 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", 421 | "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" 422 | }, 423 | "util-deprecate": { 424 | "version": "1.0.2", 425 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 426 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" 427 | }, 428 | "webidl-conversions": { 429 | "version": "3.0.1", 430 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", 431 | "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" 432 | }, 433 | "whatwg-url": { 434 | "version": "5.0.0", 435 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", 436 | "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", 437 | "requires": { 438 | "tr46": "~0.0.3", 439 | "webidl-conversions": "^3.0.0" 440 | } 441 | }, 442 | "wide-align": { 443 | "version": "1.1.5", 444 | "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", 445 | "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", 446 | "requires": { 447 | "string-width": "^1.0.2 || 2 || 3 || 4" 448 | } 449 | }, 450 | "wrappy": { 451 | "version": "1.0.2", 452 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 453 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 454 | }, 455 | "yallist": { 456 | "version": "4.0.0", 457 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", 458 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" 459 | } 460 | } 461 | } 462 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "milsymbol-server", 3 | "version": "1.0.0", 4 | "description": "Milsymbol based military symbol server", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/spatialillusions/milsymbol-server.git" 12 | }, 13 | "author": "Måns Beckman", 14 | "license": "MIT", 15 | "bugs": { 16 | "url": "https://github.com/spatialillusions/milsymbol-server/issues" 17 | }, 18 | "homepage": "https://github.com/spatialillusions/milsymbol-server#readme", 19 | "dependencies": { 20 | "canvas": "^2.9.1", 21 | "milsymbol": "^2.0.0-rc2" 22 | } 23 | } 24 | --------------------------------------------------------------------------------