├── .gitignore ├── README.md ├── UIConfig.json ├── config.json ├── i18n ├── strings_en.json ├── strings_nl.json └── strings_pl.json ├── images ├── Thumbs.db ├── kodi_optimalisation.png ├── plugin_enabled.png ├── sound_settings.png └── system_settings.png ├── index.js ├── install.sh ├── kodi_configuration ├── guisettings.xml └── sources.xml ├── node_modules ├── balanced-match │ ├── .npmignore │ ├── LICENSE.md │ ├── README.md │ ├── index.js │ └── package.json ├── brace-expansion │ ├── README.md │ ├── index.js │ └── package.json ├── concat-map │ ├── .travis.yml │ ├── LICENSE │ ├── README.markdown │ ├── example │ │ └── map.js │ ├── index.js │ ├── package.json │ └── test │ │ └── map.js ├── fs-extra │ ├── .npmignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── lib │ │ ├── copy-sync │ │ │ ├── copy-file-sync.js │ │ │ ├── copy-sync.js │ │ │ └── index.js │ │ ├── copy │ │ │ ├── copy.js │ │ │ ├── index.js │ │ │ └── ncp.js │ │ ├── empty │ │ │ └── index.js │ │ ├── ensure │ │ │ ├── file.js │ │ │ ├── index.js │ │ │ ├── link.js │ │ │ ├── symlink-paths.js │ │ │ ├── symlink-type.js │ │ │ └── symlink.js │ │ ├── index.js │ │ ├── json │ │ │ ├── index.js │ │ │ ├── jsonfile.js │ │ │ ├── output-json-sync.js │ │ │ └── output-json.js │ │ ├── mkdirs │ │ │ ├── index.js │ │ │ ├── mkdirs-sync.js │ │ │ ├── mkdirs.js │ │ │ └── win32.js │ │ ├── move │ │ │ └── index.js │ │ ├── output │ │ │ └── index.js │ │ ├── remove │ │ │ └── index.js │ │ ├── util │ │ │ ├── assign.js │ │ │ └── utimes.js │ │ └── walk │ │ │ └── index.js │ └── package.json ├── fs.realpath │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── old.js │ └── package.json ├── glob │ ├── LICENSE │ ├── README.md │ ├── changelog.md │ ├── common.js │ ├── glob.js │ ├── package.json │ └── sync.js ├── graceful-fs │ ├── LICENSE │ ├── README.md │ ├── fs.js │ ├── graceful-fs.js │ ├── legacy-streams.js │ ├── package.json │ └── polyfills.js ├── inflight │ ├── LICENSE │ ├── README.md │ ├── inflight.js │ └── package.json ├── inherits │ ├── LICENSE │ ├── README.md │ ├── inherits.js │ ├── inherits_browser.js │ └── package.json ├── jsonfile │ ├── .npmignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── appveyor.yml │ ├── index.js │ └── package.json ├── kew │ ├── .npmignore │ ├── .travis.yml │ ├── LICENSE.TXT │ ├── README.md │ ├── kew.js │ ├── package.json │ └── test │ │ ├── chain.js │ │ ├── closure_test.js │ │ ├── context.js │ │ ├── defer.js │ │ ├── externs_node.js │ │ ├── later.js │ │ ├── scopes.js │ │ ├── spread.js │ │ └── static.js ├── klaw │ ├── .npmignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── package.json │ └── src │ │ ├── assign.js │ │ └── index.js ├── minimatch │ ├── LICENSE │ ├── README.md │ ├── minimatch.js │ └── package.json ├── multimap │ ├── .jshintrc │ ├── .npmignore │ ├── .travis.yml │ ├── README.md │ ├── index.js │ ├── package.json │ └── test │ │ ├── es6map.js │ │ ├── index.js │ │ └── test.html ├── net │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ └── test.js ├── once │ ├── LICENSE │ ├── README.md │ ├── once.js │ └── package.json ├── path-is-absolute │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── rimraf │ ├── LICENSE │ ├── README.md │ ├── bin.js │ ├── package.json │ └── rimraf.js ├── v-conf │ ├── .npmignore │ ├── README.md │ ├── configTest.js │ ├── index.js │ ├── node_modules │ │ └── fs-extra │ │ │ ├── .npmignore │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── lib │ │ │ ├── copy-sync │ │ │ │ ├── copy-file-sync.js │ │ │ │ ├── copy-sync.js │ │ │ │ └── index.js │ │ │ ├── copy │ │ │ │ ├── copy.js │ │ │ │ ├── index.js │ │ │ │ └── ncp.js │ │ │ ├── empty │ │ │ │ └── index.js │ │ │ ├── ensure │ │ │ │ ├── file.js │ │ │ │ ├── index.js │ │ │ │ ├── link.js │ │ │ │ ├── symlink-paths.js │ │ │ │ ├── symlink-type.js │ │ │ │ └── symlink.js │ │ │ ├── index.js │ │ │ ├── json │ │ │ │ ├── index.js │ │ │ │ ├── output-json-sync.js │ │ │ │ └── output-json.js │ │ │ ├── mkdirs │ │ │ │ ├── index.js │ │ │ │ ├── mkdirs-sync.js │ │ │ │ └── mkdirs.js │ │ │ ├── move │ │ │ │ └── index.js │ │ │ ├── output │ │ │ │ └── index.js │ │ │ ├── remove │ │ │ │ └── index.js │ │ │ ├── streams │ │ │ │ ├── create-output-stream.js │ │ │ │ └── index.js │ │ │ ├── util │ │ │ │ ├── assign.js │ │ │ │ └── utimes.js │ │ │ └── walk │ │ │ │ ├── index.js │ │ │ │ └── walker.js │ │ │ └── package.json │ ├── package.json │ └── testConfig.json └── wrappy │ ├── LICENSE │ ├── README.md │ ├── package.json │ └── wrappy.js ├── package.json ├── policies ├── 10-permissions.rules ├── 50-kodi-actions.pkla └── 99-input.rules ├── templates └── asound.kodi ├── uninstall.sh ├── unit └── kodi.service ├── volumio-kodi-plugin.zip └── volumio_installer.sh /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *.db 3 | *.db 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # volumio-kodi-plugin 2 | Installation script for Kodi on Volumio 2.x images (Raspberry Pi only) 3 | 4 | ## Quick installation guide 5 | The zip-file contains all the scripts you need to install Kodi on top of any Volumio 2.x image. A settings page has been added to allow for easy configuration of the config.txt settings for Kodi and some specific sound settings in case you want to use your DAC for sound output. 6 | 7 | If you enable the plugin in the plugins section in Volumio it will automatically start, you might want to reboot first after installation. 8 | ![Alt text](/images/plugin_enabled.png?raw=true "Plugin enabled") 9 | 10 | The system settings section allows you to change the amount of memory reserved for the gpu and whether the HDMI port should be considered hotplug. 11 | ![Alt text](/images/system_settings.png?raw=true "System settings") 12 | 13 | The sound settings section allows you to override ALSA's default soundcard, thus enabling you to use your DAC in Kodi. Also, if you are using a Kali reclocker, you might want to configure the delay (of 0.7 seconds). 14 | ![Alt text](/images/sound_settings.png?raw=true "Sound settings") 15 | 16 | The Kodi optimalisation sections allows you to edit some Kodi sound configuration (requires a restart of Kodi) settings. 17 | ![Alt text](/images/kodi_optimalisation.png?raw=true "Kodi sound settings") 18 | 19 | ### IPTV Simple Client 20 | If you want to use the IPTV Simple Client add-on, follow the next steps: 21 | 22 | 1. Update the package list 23 | ` 24 | sudo apt-get update 25 | ` 26 | 2. Install the pvr client 27 | ` 28 | sudo apt-get install -y kodi-pvr-iptvsimple 29 | ` 30 | 3. Restart Kodi 31 | 32 | 4. Enable the add-on by going into add-ons/all/iptv simple client 33 | 34 | 5. Load your playlist 35 | 36 | 6. Restart the add-on 37 | 38 | 7. Enjoy! 39 | 40 | Supported devices: 41 | - Raspberry Pi A/B/A+/B+/2B/3B/Zero 42 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "gpu_mem_1024": { 3 | "type": "string", 4 | "value": "256" 5 | }, 6 | "gpu_mem_512": { 7 | "type": "string", 8 | "value": "144" 9 | }, 10 | "gpu_mem_256": { 11 | "type": "string", 12 | "value": "112" 13 | }, 14 | "hdmihotplug": { 15 | "type": "boolean", 16 | "value": true 17 | }, 18 | "usedac": { 19 | "type": "boolean", 20 | "value": false 21 | }, 22 | "audiodelay": { 23 | "type": "string", 24 | "value": "0.700000" 25 | }, 26 | "kodi_gui_sounds": { 27 | "type": "boolean", 28 | "value": false 29 | }, 30 | "kodi_audio_keepalive": { 31 | "type": "boolean", 32 | "value": false 33 | }, 34 | "kodi_enable_webserver": { 35 | "type": "boolean", 36 | "value": true 37 | }, 38 | "kodi_webserver_port": { 39 | "type": "string", 40 | "value": "8080" 41 | }, 42 | "kodi_webserver_username": { 43 | "type": "string", 44 | "value": "kodi" 45 | }, 46 | "kodi_webserver_password": { 47 | "type": "string", 48 | "value": "" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /i18n/strings_en.json: -------------------------------------------------------------------------------- 1 | { 2 | "KODI":{ 3 | "KODICONF":"Kodi Configuration", 4 | "KODITITLE":"System settings", 5 | "GPUMEM1024":"Memory reserved for GPU (Raspberry Pi 2B and higher)", 6 | "D_GPUMEM1024":"This is the amount of memory reserved for the GPU (1024MB model)", 7 | "GPUMEM512":"Memory reserved for GPU (Raspberry Pi A+, B, B+ and Zero)", 8 | "D_GPUMEM512":"This is the amount of memory reserved for the GPU (512MB model)", 9 | "GPUMEM256":"Memory reserved for GPU (Raspberry Pi A)", 10 | "D_GPUMEM256":"This is the amount of memory reserved for the GPU (256MB model)", 11 | "HDMIHOTPLUG":"Set HDMI to hotplug", 12 | "D_HDMIHOTPLUG":"Determines whether HDMI should be considered hotplug", 13 | "KODISOUNDTITLE":"Sound settings", 14 | "USEDAC":"Enable DAC output for Kodi", 15 | "D_USEDAC":"Use I2S DAC for Kodi", 16 | "DD_USEDAC":"If you are using a HifiBerry AMP, you need to disable the Volumio startup sound.", 17 | "AUDIODELAY":"Configure sound delay (in seconds; decimal separator is a dot)", 18 | "D_AUDIODELAY":"Set delay in Kodi your soundcard (e.g. Kali = 0.7s)", 19 | "KODI_SETTINGS":"Kodi optimalisation", 20 | "KODI_GUI_SOUNDS":"Kodi GUI sounds", 21 | "D_KODI_GUI_SOUNDS":"En- or disable Kodi GUI sounds", 22 | "KODI_AUDIO_KEEPALIVE":"Have Kodi keep the audio device alive", 23 | "D_KODI_AUDIO_KEEPALIVE":"Whether or not to keep the audio device alive.", 24 | "KODI_ENABLE_WEBSERVER":"Kodi webserver", 25 | "D_KODI_ENABLE_WEBSERVER":"En- or disable Kodi webserver; i.e. for controlling Kodi through the browser", 26 | "KODI_WEBSERVER_PORT":"Kodi webserver port", 27 | "D_KODI_WEBSERVER_PORT":"The port over which the webserver is exposed in Kodi", 28 | "KODI_WEBSERVER_USERNAME":"Kodi webserver username", 29 | "D_KODI_WEBSERVER_USERNAME":"The username used to connect to the web interface", 30 | "KODI_WEBSERVER_PASSWORD":"Kodi webserver password", 31 | "D_KODI_WEBSERVER_PASSWORD":"The password used to connect to the web interface", 32 | "SAVE":"Save", 33 | "RESTARTTITLE":"Restart required", 34 | "RESTARTMESSAGE":"Boot configuration has been changed, a restart is required for the settings to apply.", 35 | "RESTART":"Restart", 36 | "CONTINUE":"Restart later" 37 | } 38 | } -------------------------------------------------------------------------------- /i18n/strings_nl.json: -------------------------------------------------------------------------------- 1 | { 2 | "KODI":{ 3 | "KODICONF":"Kodi Configuratie", 4 | "KODITITLE":"Systeeminstellingen", 5 | "GPUMEM1024":"Geheugen gereserveerd voor GPU (Raspberry Pi 2B en nieuwer)", 6 | "D_GPUMEM1024":"De hoeveelheid geheugen die gereserveerd wordt voor de videokaart (1024MB model)", 7 | "GPUMEM512":"Geheugen gereserveerd voor GPU (Raspberry Pi A+, B, B+ en Zero)", 8 | "D_GPUMEM512":"De hoeveelheid geheugen die gereserveerd wordt voor de videokaart (512MB model)", 9 | "GPUMEM256":"Geheugen gereserveerd voor GPU (Raspberry Pi A)", 10 | "D_GPUMEM256":"De hoeveelheid geheugen die gereserveerd wordt voor de videokaart (256MB model)", 11 | "HDMIHOTPLUG":"HDMI hotplug mogelijkheid inschakelen", 12 | "D_HDMIHOTPLUG":"Deze instelling bepaalt of de Raspberry Pi de HDMI als hotplug poort beschouwd.", 13 | "KODISOUNDTITLE":"Geluidsinstellingen", 14 | "USEDAC":"Gebruik DAC voor Kodi", 15 | "D_USEDAC":"Deze instelling schrijft een asound.conf om de geluidskaart (DAC) in Kodi beschikbaar te maken.", 16 | "DD_USEDAC":"Indien een HifiBerry AMP gebruikt wordt is het aan te raden het opstartgeluid in Volumio uit te schakelen.", 17 | "AUDIODELAY":"Configureer Kali vertraging (in seconden; het scheidingsteken is een punt)", 18 | "D_AUDIODELAY":"Configureer de vertraging de gebruikte geluidskaart (bijv. Kali = 0,7s), zodat het beeld en geluid weer synchroon lopen.", 19 | "KODI_SETTINGS":"Kodi instellingen", 20 | "KODI_GUI_SOUNDS":"Kodi skin geluiden", 21 | "D_KODI_GUI_SOUNDS":"Zet de standaard Kodi skin geluiden aan of uit", 22 | "KODI_AUDIO_KEEPALIVE":"Laat Kodi het audio apparaat claimen", 23 | "D_KODI_AUDIO_KEEPALIVE":"Dit bepaalt of Kodi de geluidskaart in gebruik houdt, dit voorkomt dat andere applicaties de geluidskaart kunnen claimen.", 24 | "KODI_ENABLE_WEBSERVER":"Kodi webserver", 25 | "D_KODI_ENABLE_WEBSERVER":"Zet de ingebouwde Kodi webserver aan of uit, hiermee kun je Kodi via je browser besturen.", 26 | "KODI_WEBSERVER_PORT":"Kodi webserverpoort", 27 | "D_KODI_WEBSERVER_PORT":"Pas het poortnummer aan welke door Kodi gebruikt wordt voor de webinterface.", 28 | "KODI_WEBSERVER_USERNAME":"Kodi (webserver) gebruikersnaam", 29 | "D_KODI_WEBSERVER_USERNAME":"Vul hier de ingestelde gebruikersnaam in om verbinding te maken met de webserver.", 30 | "KODI_WEBSERVER_PASSWORD":"Kodi (webserver) wachtwoord", 31 | "D_KODI_WEBSERVER_PASSWORD":"Vul hier het ingestelde wachtwoord in om verbinding te maken met de webserver.", 32 | "SAVE":"Opslaan", 33 | "RESTARTTITLE":"Herstart vereist", 34 | "RESTARTMESSAGE":"De systeemconfiguratie is gewijzigd, een herstart is nodig om alle instellingen toe te passen.", 35 | "RESTART":"Herstart", 36 | "CONTINUE":"Herstart later" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /i18n/strings_pl.json: -------------------------------------------------------------------------------- 1 | { 2 | "KODI":{ 3 | "KODICONF":"Konfiguracja Kodi", 4 | "KODITITLE":"Ustawienia systemowe", 5 | "GPUMEM1024":"Pamięć zarezerwowana GPU (Raspberry Pi 2B i wyższe)", 6 | "D_GPUMEM1024":"Rozmiar pamięci zarezerwowanej dla GPU (model 1024MB)", 7 | "GPUMEM512":"Pamięć zarezerwowana GPU (Raspberry Pi A+, B, B+ i Zero)", 8 | "D_GPUMEM512":"Rozmiar pamięci zarezerwowanej dla GPU (model 512MB)", 9 | "GPUMEM256":"Pamięć zarezerwowana GPU (Raspberry Pi A)", 10 | "D_GPUMEM256":"Rozmiar pamięci zarezerwowanej dla GPU (model 256MB)", 11 | "HDMIHOTPLUG":"Ustaw tryb hot-plug HDMI", 12 | "D_HDMIHOTPLUG":"Określa czy HDMI będzie traktowane jako hot-plug", 13 | "KODISOUNDTITLE":"Ustawienia dźwięku", 14 | "USEDAC":"Włącz wyjście DAC dla Kodi", 15 | "D_USEDAC":"Używa wyjścia I2S DAC do odtwarzania dźwieku w Kodi", 16 | "DD_USEDAC":"If you are using a HifiBerry AMP, you need to disable the Volumio startup sound.", 17 | "AUDIODELAY":"Konfiguracja opóźnienia", 18 | "D_AUDIODELAY":"Ustawienie opóźnienia (e.g. Kali reclocker = 0.7s)", 19 | "KODI_SETTINGS":"Optymalizacja Kodi", 20 | "KODI_GUI_SOUNDS":"Dźwięki interfejsu Kodi", 21 | "D_KODI_GUI_SOUNDS":"Włącza/Wyłącza dźwięki interfejsu Kodi", 22 | "KODI_AUDIO_KEEPALIVE":"Kodi podtrzymuje aktywność urządzenia odtwarzania", 23 | "D_KODI_AUDIO_KEEPALIVE":"Gdy żaden dźwiek nie jest generowany przez odtwarzacz lub interface użytkownika, wysyłany jest ciagły niesłyszalny sygnał, który utrzymuje urządzenie w stanie gotowości.", 24 | "KODI_ENABLE_WEBSERVER":"Serwer web Kodi", 25 | "D_KODI_ENABLE_WEBSERVER":"Włącza/wyłącza serwer web Kodi; np. by sterować Kodi za pomocą przeglądarki", 26 | "KODI_WEBSERVER_PORT":"Port serwera web Kodi", 27 | "D_KODI_WEBSERVER_PORT":"Port na którym serwer web zostanie wystawiony w Kodi", 28 | "KODI_WEBSERVER_USERNAME":"Użytkownik serwera web Kodi", 29 | "D_KODI_WEBSERVER_USERNAME":"Nazwa używana do połączenia z interface web", 30 | "KODI_WEBSERVER_PASSWORD":"Hasło serwera web Kodi", 31 | "D_KODI_WEBSERVER_PASSWORD":"Hasło używane do połączenia z interface web", 32 | "SAVE":"Zapisz", 33 | "RESTARTTITLE":"Wymagany restart", 34 | "RESTARTMESSAGE":"Ustawienia konfiguracji boot'owania zostały zmienione, jest wymagany restart by zmiany przyniosły skutek.", 35 | "RESTART":"Restartuj", 36 | "CONTINUE":"Restartuj później" 37 | } 38 | } -------------------------------------------------------------------------------- /images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Saiyato/volumio-kodi-plugin/94ee8a3b7edc37765983c5acf805aa47c6d0a1cc/images/Thumbs.db -------------------------------------------------------------------------------- /images/kodi_optimalisation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Saiyato/volumio-kodi-plugin/94ee8a3b7edc37765983c5acf805aa47c6d0a1cc/images/kodi_optimalisation.png -------------------------------------------------------------------------------- /images/plugin_enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Saiyato/volumio-kodi-plugin/94ee8a3b7edc37765983c5acf805aa47c6d0a1cc/images/plugin_enabled.png -------------------------------------------------------------------------------- /images/sound_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Saiyato/volumio-kodi-plugin/94ee8a3b7edc37765983c5acf805aa47c6d0a1cc/images/sound_settings.png -------------------------------------------------------------------------------- /images/system_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Saiyato/volumio-kodi-plugin/94ee8a3b7edc37765983c5acf805aa47c6d0a1cc/images/system_settings.png -------------------------------------------------------------------------------- /kodi_configuration/sources.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | [repo] ExodusRedux Repository 18 | https://i-a-c.github.io 19 | true 20 | 21 | 22 | [repo] SuperRepo 23 | http://srp.nu/ 24 | true 25 | 26 | 27 | [repo] UFO Repo 28 | http://theuforepo.us/repo/ 29 | true 30 | 31 | 32 | [repo] Zomboided 33 | https://troypoint.com/repo 34 | true 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /node_modules/balanced-match/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | .gitignore 3 | .travis.yml 4 | Makefile 5 | example.js 6 | -------------------------------------------------------------------------------- /node_modules/balanced-match/LICENSE.md: -------------------------------------------------------------------------------- 1 | (MIT) 2 | 3 | Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 9 | of the Software, and to permit persons to whom the Software is furnished to do 10 | 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 | -------------------------------------------------------------------------------- /node_modules/balanced-match/README.md: -------------------------------------------------------------------------------- 1 | # balanced-match 2 | 3 | Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! 4 | 5 | [![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) 6 | [![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) 7 | 8 | [![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) 9 | 10 | ## Example 11 | 12 | Get the first matching pair of braces: 13 | 14 | ```js 15 | var balanced = require('balanced-match'); 16 | 17 | console.log(balanced('{', '}', 'pre{in{nested}}post')); 18 | console.log(balanced('{', '}', 'pre{first}between{second}post')); 19 | console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); 20 | ``` 21 | 22 | The matches are: 23 | 24 | ```bash 25 | $ node example.js 26 | { start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } 27 | { start: 3, 28 | end: 9, 29 | pre: 'pre', 30 | body: 'first', 31 | post: 'between{second}post' } 32 | { start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } 33 | ``` 34 | 35 | ## API 36 | 37 | ### var m = balanced(a, b, str) 38 | 39 | For the first non-nested matching pair of `a` and `b` in `str`, return an 40 | object with those keys: 41 | 42 | * **start** the index of the first match of `a` 43 | * **end** the index of the matching `b` 44 | * **pre** the preamble, `a` and `b` not included 45 | * **body** the match, `a` and `b` not included 46 | * **post** the postscript, `a` and `b` not included 47 | 48 | If there's no match, `undefined` will be returned. 49 | 50 | If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. 51 | 52 | ### var r = balanced.range(a, b, str) 53 | 54 | For the first non-nested matching pair of `a` and `b` in `str`, return an 55 | array with indexes: `[ , ]`. 56 | 57 | If there's no match, `undefined` will be returned. 58 | 59 | If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. 60 | 61 | ## Installation 62 | 63 | With [npm](https://npmjs.org) do: 64 | 65 | ```bash 66 | npm install balanced-match 67 | ``` 68 | 69 | ## License 70 | 71 | (MIT) 72 | 73 | Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> 74 | 75 | Permission is hereby granted, free of charge, to any person obtaining a copy of 76 | this software and associated documentation files (the "Software"), to deal in 77 | the Software without restriction, including without limitation the rights to 78 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 79 | of the Software, and to permit persons to whom the Software is furnished to do 80 | so, subject to the following conditions: 81 | 82 | The above copyright notice and this permission notice shall be included in all 83 | copies or substantial portions of the Software. 84 | 85 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 86 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 87 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 88 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 89 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 90 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 91 | SOFTWARE. 92 | -------------------------------------------------------------------------------- /node_modules/balanced-match/index.js: -------------------------------------------------------------------------------- 1 | module.exports = balanced; 2 | function balanced(a, b, str) { 3 | if (a instanceof RegExp) a = maybeMatch(a, str); 4 | if (b instanceof RegExp) b = maybeMatch(b, str); 5 | 6 | var r = range(a, b, str); 7 | 8 | return r && { 9 | start: r[0], 10 | end: r[1], 11 | pre: str.slice(0, r[0]), 12 | body: str.slice(r[0] + a.length, r[1]), 13 | post: str.slice(r[1] + b.length) 14 | }; 15 | } 16 | 17 | function maybeMatch(reg, str) { 18 | var m = str.match(reg); 19 | return m ? m[0] : null; 20 | } 21 | 22 | balanced.range = range; 23 | function range(a, b, str) { 24 | var begs, beg, left, right, result; 25 | var ai = str.indexOf(a); 26 | var bi = str.indexOf(b, ai + 1); 27 | var i = ai; 28 | 29 | if (ai >= 0 && bi > 0) { 30 | begs = []; 31 | left = str.length; 32 | 33 | while (i >= 0 && !result) { 34 | if (i == ai) { 35 | begs.push(i); 36 | ai = str.indexOf(a, i + 1); 37 | } else if (begs.length == 1) { 38 | result = [ begs.pop(), bi ]; 39 | } else { 40 | beg = begs.pop(); 41 | if (beg < left) { 42 | left = beg; 43 | right = bi; 44 | } 45 | 46 | bi = str.indexOf(b, i + 1); 47 | } 48 | 49 | i = ai < bi && ai >= 0 ? ai : bi; 50 | } 51 | 52 | if (begs.length) { 53 | result = [ left, right ]; 54 | } 55 | } 56 | 57 | return result; 58 | } 59 | -------------------------------------------------------------------------------- /node_modules/balanced-match/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "balanced-match@^0.4.1", 6 | "scope": null, 7 | "escapedName": "balanced-match", 8 | "name": "balanced-match", 9 | "rawSpec": "^0.4.1", 10 | "spec": ">=0.4.1 <0.5.0", 11 | "type": "range" 12 | }, 13 | "/data/plugins/music_service/volspotconnect/node_modules/brace-expansion" 14 | ] 15 | ], 16 | "_from": "balanced-match@>=0.4.1 <0.5.0", 17 | "_id": "balanced-match@0.4.2", 18 | "_inCache": true, 19 | "_installable": true, 20 | "_location": "/balanced-match", 21 | "_nodeVersion": "4.4.7", 22 | "_npmOperationalInternal": { 23 | "host": "packages-16-east.internal.npmjs.com", 24 | "tmp": "tmp/balanced-match-0.4.2.tgz_1468834991581_0.6590619895141572" 25 | }, 26 | "_npmUser": { 27 | "name": "juliangruber", 28 | "email": "julian@juliangruber.com" 29 | }, 30 | "_npmVersion": "2.15.8", 31 | "_phantomChildren": {}, 32 | "_requested": { 33 | "raw": "balanced-match@^0.4.1", 34 | "scope": null, 35 | "escapedName": "balanced-match", 36 | "name": "balanced-match", 37 | "rawSpec": "^0.4.1", 38 | "spec": ">=0.4.1 <0.5.0", 39 | "type": "range" 40 | }, 41 | "_requiredBy": [ 42 | "/brace-expansion" 43 | ], 44 | "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", 45 | "_shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838", 46 | "_shrinkwrap": null, 47 | "_spec": "balanced-match@^0.4.1", 48 | "_where": "/data/plugins/music_service/volspotconnect/node_modules/brace-expansion", 49 | "author": { 50 | "name": "Julian Gruber", 51 | "email": "mail@juliangruber.com", 52 | "url": "http://juliangruber.com" 53 | }, 54 | "bugs": { 55 | "url": "https://github.com/juliangruber/balanced-match/issues" 56 | }, 57 | "dependencies": {}, 58 | "description": "Match balanced character pairs, like \"{\" and \"}\"", 59 | "devDependencies": { 60 | "tape": "^4.6.0" 61 | }, 62 | "directories": {}, 63 | "dist": { 64 | "shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838", 65 | "tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" 66 | }, 67 | "gitHead": "57c2ea29d89a2844ae3bdcc637c6e2cbb73725e2", 68 | "homepage": "https://github.com/juliangruber/balanced-match", 69 | "keywords": [ 70 | "match", 71 | "regexp", 72 | "test", 73 | "balanced", 74 | "parse" 75 | ], 76 | "license": "MIT", 77 | "main": "index.js", 78 | "maintainers": [ 79 | { 80 | "name": "juliangruber", 81 | "email": "julian@juliangruber.com" 82 | } 83 | ], 84 | "name": "balanced-match", 85 | "optionalDependencies": {}, 86 | "readme": "ERROR: No README data found!", 87 | "repository": { 88 | "type": "git", 89 | "url": "git://github.com/juliangruber/balanced-match.git" 90 | }, 91 | "scripts": { 92 | "test": "make test" 93 | }, 94 | "testling": { 95 | "files": "test/*.js", 96 | "browsers": [ 97 | "ie/8..latest", 98 | "firefox/20..latest", 99 | "firefox/nightly", 100 | "chrome/25..latest", 101 | "chrome/canary", 102 | "opera/12..latest", 103 | "opera/next", 104 | "safari/5.1..latest", 105 | "ipad/6.0..latest", 106 | "iphone/6.0..latest", 107 | "android-browser/4.2..latest" 108 | ] 109 | }, 110 | "version": "0.4.2" 111 | } 112 | -------------------------------------------------------------------------------- /node_modules/brace-expansion/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "brace-expansion@^1.0.0", 6 | "scope": null, 7 | "escapedName": "brace-expansion", 8 | "name": "brace-expansion", 9 | "rawSpec": "^1.0.0", 10 | "spec": ">=1.0.0 <2.0.0", 11 | "type": "range" 12 | }, 13 | "/data/plugins/music_service/volspotconnect/node_modules/minimatch" 14 | ] 15 | ], 16 | "_from": "brace-expansion@>=1.0.0 <2.0.0", 17 | "_id": "brace-expansion@1.1.6", 18 | "_inCache": true, 19 | "_installable": true, 20 | "_location": "/brace-expansion", 21 | "_nodeVersion": "4.4.7", 22 | "_npmOperationalInternal": { 23 | "host": "packages-16-east.internal.npmjs.com", 24 | "tmp": "tmp/brace-expansion-1.1.6.tgz_1469047715600_0.9362958471756428" 25 | }, 26 | "_npmUser": { 27 | "name": "juliangruber", 28 | "email": "julian@juliangruber.com" 29 | }, 30 | "_npmVersion": "2.15.8", 31 | "_phantomChildren": {}, 32 | "_requested": { 33 | "raw": "brace-expansion@^1.0.0", 34 | "scope": null, 35 | "escapedName": "brace-expansion", 36 | "name": "brace-expansion", 37 | "rawSpec": "^1.0.0", 38 | "spec": ">=1.0.0 <2.0.0", 39 | "type": "range" 40 | }, 41 | "_requiredBy": [ 42 | "/minimatch" 43 | ], 44 | "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", 45 | "_shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9", 46 | "_shrinkwrap": null, 47 | "_spec": "brace-expansion@^1.0.0", 48 | "_where": "/data/plugins/music_service/volspotconnect/node_modules/minimatch", 49 | "author": { 50 | "name": "Julian Gruber", 51 | "email": "mail@juliangruber.com", 52 | "url": "http://juliangruber.com" 53 | }, 54 | "bugs": { 55 | "url": "https://github.com/juliangruber/brace-expansion/issues" 56 | }, 57 | "dependencies": { 58 | "balanced-match": "^0.4.1", 59 | "concat-map": "0.0.1" 60 | }, 61 | "description": "Brace expansion as known from sh/bash", 62 | "devDependencies": { 63 | "tape": "^4.6.0" 64 | }, 65 | "directories": {}, 66 | "dist": { 67 | "shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9", 68 | "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz" 69 | }, 70 | "gitHead": "791262fa06625e9c5594cde529a21d82086af5f2", 71 | "homepage": "https://github.com/juliangruber/brace-expansion", 72 | "keywords": [], 73 | "license": "MIT", 74 | "main": "index.js", 75 | "maintainers": [ 76 | { 77 | "name": "juliangruber", 78 | "email": "julian@juliangruber.com" 79 | }, 80 | { 81 | "name": "isaacs", 82 | "email": "isaacs@npmjs.com" 83 | } 84 | ], 85 | "name": "brace-expansion", 86 | "optionalDependencies": {}, 87 | "readme": "ERROR: No README data found!", 88 | "repository": { 89 | "type": "git", 90 | "url": "git://github.com/juliangruber/brace-expansion.git" 91 | }, 92 | "scripts": { 93 | "gentest": "bash test/generate.sh", 94 | "test": "tape test/*.js" 95 | }, 96 | "testling": { 97 | "files": "test/*.js", 98 | "browsers": [ 99 | "ie/8..latest", 100 | "firefox/20..latest", 101 | "firefox/nightly", 102 | "chrome/25..latest", 103 | "chrome/canary", 104 | "opera/12..latest", 105 | "opera/next", 106 | "safari/5.1..latest", 107 | "ipad/6.0..latest", 108 | "iphone/6.0..latest", 109 | "android-browser/4.2..latest" 110 | ] 111 | }, 112 | "version": "1.1.6" 113 | } 114 | -------------------------------------------------------------------------------- /node_modules/concat-map/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.4 4 | - 0.6 5 | -------------------------------------------------------------------------------- /node_modules/concat-map/LICENSE: -------------------------------------------------------------------------------- 1 | This software is released under the MIT license: 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /node_modules/concat-map/README.markdown: -------------------------------------------------------------------------------- 1 | concat-map 2 | ========== 3 | 4 | Concatenative mapdashery. 5 | 6 | [![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) 7 | 8 | [![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) 9 | 10 | example 11 | ======= 12 | 13 | ``` js 14 | var concatMap = require('concat-map'); 15 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 16 | var ys = concatMap(xs, function (x) { 17 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 18 | }); 19 | console.dir(ys); 20 | ``` 21 | 22 | *** 23 | 24 | ``` 25 | [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] 26 | ``` 27 | 28 | methods 29 | ======= 30 | 31 | ``` js 32 | var concatMap = require('concat-map') 33 | ``` 34 | 35 | concatMap(xs, fn) 36 | ----------------- 37 | 38 | Return an array of concatenated elements by calling `fn(x, i)` for each element 39 | `x` and each index `i` in the array `xs`. 40 | 41 | When `fn(x, i)` returns an array, its result will be concatenated with the 42 | result array. If `fn(x, i)` returns anything else, that value will be pushed 43 | onto the end of the result array. 44 | 45 | install 46 | ======= 47 | 48 | With [npm](http://npmjs.org) do: 49 | 50 | ``` 51 | npm install concat-map 52 | ``` 53 | 54 | license 55 | ======= 56 | 57 | MIT 58 | 59 | notes 60 | ===== 61 | 62 | This module was written while sitting high above the ground in a tree. 63 | -------------------------------------------------------------------------------- /node_modules/concat-map/example/map.js: -------------------------------------------------------------------------------- 1 | var concatMap = require('../'); 2 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 3 | var ys = concatMap(xs, function (x) { 4 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 5 | }); 6 | console.dir(ys); 7 | -------------------------------------------------------------------------------- /node_modules/concat-map/index.js: -------------------------------------------------------------------------------- 1 | module.exports = function (xs, fn) { 2 | var res = []; 3 | for (var i = 0; i < xs.length; i++) { 4 | var x = fn(xs[i], i); 5 | if (isArray(x)) res.push.apply(res, x); 6 | else res.push(x); 7 | } 8 | return res; 9 | }; 10 | 11 | var isArray = Array.isArray || function (xs) { 12 | return Object.prototype.toString.call(xs) === '[object Array]'; 13 | }; 14 | -------------------------------------------------------------------------------- /node_modules/concat-map/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "concat-map@0.0.1", 6 | "scope": null, 7 | "escapedName": "concat-map", 8 | "name": "concat-map", 9 | "rawSpec": "0.0.1", 10 | "spec": "0.0.1", 11 | "type": "version" 12 | }, 13 | "/data/plugins/music_service/volspotconnect/node_modules/brace-expansion" 14 | ] 15 | ], 16 | "_from": "concat-map@0.0.1", 17 | "_id": "concat-map@0.0.1", 18 | "_inCache": true, 19 | "_installable": true, 20 | "_location": "/concat-map", 21 | "_npmUser": { 22 | "name": "substack", 23 | "email": "mail@substack.net" 24 | }, 25 | "_npmVersion": "1.3.21", 26 | "_phantomChildren": {}, 27 | "_requested": { 28 | "raw": "concat-map@0.0.1", 29 | "scope": null, 30 | "escapedName": "concat-map", 31 | "name": "concat-map", 32 | "rawSpec": "0.0.1", 33 | "spec": "0.0.1", 34 | "type": "version" 35 | }, 36 | "_requiredBy": [ 37 | "/brace-expansion" 38 | ], 39 | "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 40 | "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", 41 | "_shrinkwrap": null, 42 | "_spec": "concat-map@0.0.1", 43 | "_where": "/data/plugins/music_service/volspotconnect/node_modules/brace-expansion", 44 | "author": { 45 | "name": "James Halliday", 46 | "email": "mail@substack.net", 47 | "url": "http://substack.net" 48 | }, 49 | "bugs": { 50 | "url": "https://github.com/substack/node-concat-map/issues" 51 | }, 52 | "dependencies": {}, 53 | "description": "concatenative mapdashery", 54 | "devDependencies": { 55 | "tape": "~2.4.0" 56 | }, 57 | "directories": { 58 | "example": "example", 59 | "test": "test" 60 | }, 61 | "dist": { 62 | "shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", 63 | "tarball": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" 64 | }, 65 | "homepage": "https://github.com/substack/node-concat-map", 66 | "keywords": [ 67 | "concat", 68 | "concatMap", 69 | "map", 70 | "functional", 71 | "higher-order" 72 | ], 73 | "license": "MIT", 74 | "main": "index.js", 75 | "maintainers": [ 76 | { 77 | "name": "substack", 78 | "email": "mail@substack.net" 79 | } 80 | ], 81 | "name": "concat-map", 82 | "optionalDependencies": {}, 83 | "readme": "ERROR: No README data found!", 84 | "repository": { 85 | "type": "git", 86 | "url": "git://github.com/substack/node-concat-map.git" 87 | }, 88 | "scripts": { 89 | "test": "tape test/*.js" 90 | }, 91 | "testling": { 92 | "files": "test/*.js", 93 | "browsers": { 94 | "ie": [ 95 | 6, 96 | 7, 97 | 8, 98 | 9 99 | ], 100 | "ff": [ 101 | 3.5, 102 | 10, 103 | 15 104 | ], 105 | "chrome": [ 106 | 10, 107 | 22 108 | ], 109 | "safari": [ 110 | 5.1 111 | ], 112 | "opera": [ 113 | 12 114 | ] 115 | } 116 | }, 117 | "version": "0.0.1" 118 | } 119 | -------------------------------------------------------------------------------- /node_modules/concat-map/test/map.js: -------------------------------------------------------------------------------- 1 | var concatMap = require('../'); 2 | var test = require('tape'); 3 | 4 | test('empty or not', function (t) { 5 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 6 | var ixes = []; 7 | var ys = concatMap(xs, function (x, ix) { 8 | ixes.push(ix); 9 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 10 | }); 11 | t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); 12 | t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); 13 | t.end(); 14 | }); 15 | 16 | test('always something', function (t) { 17 | var xs = [ 'a', 'b', 'c', 'd' ]; 18 | var ys = concatMap(xs, function (x) { 19 | return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; 20 | }); 21 | t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); 22 | t.end(); 23 | }); 24 | 25 | test('scalars', function (t) { 26 | var xs = [ 'a', 'b', 'c', 'd' ]; 27 | var ys = concatMap(xs, function (x) { 28 | return x === 'b' ? [ 'B', 'B', 'B' ] : x; 29 | }); 30 | t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); 31 | t.end(); 32 | }); 33 | 34 | test('undefs', function (t) { 35 | var xs = [ 'a', 'b', 'c', 'd' ]; 36 | var ys = concatMap(xs, function () {}); 37 | t.same(ys, [ undefined, undefined, undefined, undefined ]); 38 | t.end(); 39 | }); 40 | -------------------------------------------------------------------------------- /node_modules/fs-extra/.npmignore: -------------------------------------------------------------------------------- 1 | .nyc_output/ 2 | coverage/ 3 | test/ 4 | .travis.yml 5 | appveyor.yml 6 | lib/**/__tests__/ 7 | test/readme.md 8 | test.js 9 | -------------------------------------------------------------------------------- /node_modules/fs-extra/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2011-2016 JP Richardson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files 6 | (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, 7 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 14 | OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 15 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/copy-sync/copy-file-sync.js: -------------------------------------------------------------------------------- 1 | var fs = require('graceful-fs') 2 | 3 | var BUF_LENGTH = 64 * 1024 4 | var _buff = new Buffer(BUF_LENGTH) 5 | 6 | function copyFileSync (srcFile, destFile, options) { 7 | var clobber = options.clobber 8 | var preserveTimestamps = options.preserveTimestamps 9 | 10 | if (fs.existsSync(destFile)) { 11 | if (clobber) { 12 | fs.chmodSync(destFile, parseInt('777', 8)) 13 | fs.unlinkSync(destFile) 14 | } else { 15 | throw Error('EEXIST') 16 | } 17 | } 18 | 19 | var fdr = fs.openSync(srcFile, 'r') 20 | var stat = fs.fstatSync(fdr) 21 | var fdw = fs.openSync(destFile, 'w', stat.mode) 22 | var bytesRead = 1 23 | var pos = 0 24 | 25 | while (bytesRead > 0) { 26 | bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos) 27 | fs.writeSync(fdw, _buff, 0, bytesRead) 28 | pos += bytesRead 29 | } 30 | 31 | if (preserveTimestamps) { 32 | fs.futimesSync(fdw, stat.atime, stat.mtime) 33 | } 34 | 35 | fs.closeSync(fdr) 36 | fs.closeSync(fdw) 37 | } 38 | 39 | module.exports = copyFileSync 40 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/copy-sync/copy-sync.js: -------------------------------------------------------------------------------- 1 | var fs = require('graceful-fs') 2 | var path = require('path') 3 | var copyFileSync = require('./copy-file-sync') 4 | var mkdir = require('../mkdirs') 5 | 6 | function copySync (src, dest, options) { 7 | if (typeof options === 'function' || options instanceof RegExp) { 8 | options = {filter: options} 9 | } 10 | 11 | options = options || {} 12 | options.recursive = !!options.recursive 13 | 14 | // default to true for now 15 | options.clobber = 'clobber' in options ? !!options.clobber : true 16 | options.dereference = 'dereference' in options ? !!options.dereference : false 17 | options.preserveTimestamps = 'preserveTimestamps' in options ? !!options.preserveTimestamps : false 18 | 19 | options.filter = options.filter || function () { return true } 20 | 21 | var stats = (options.recursive && !options.dereference) ? fs.lstatSync(src) : fs.statSync(src) 22 | var destFolder = path.dirname(dest) 23 | var destFolderExists = fs.existsSync(destFolder) 24 | var performCopy = false 25 | 26 | if (stats.isFile()) { 27 | if (options.filter instanceof RegExp) performCopy = options.filter.test(src) 28 | else if (typeof options.filter === 'function') performCopy = options.filter(src) 29 | 30 | if (performCopy) { 31 | if (!destFolderExists) mkdir.mkdirsSync(destFolder) 32 | copyFileSync(src, dest, {clobber: options.clobber, preserveTimestamps: options.preserveTimestamps}) 33 | } 34 | } else if (stats.isDirectory()) { 35 | if (!fs.existsSync(dest)) mkdir.mkdirsSync(dest) 36 | var contents = fs.readdirSync(src) 37 | contents.forEach(function (content) { 38 | var opts = options 39 | opts.recursive = true 40 | copySync(path.join(src, content), path.join(dest, content), opts) 41 | }) 42 | } else if (options.recursive && stats.isSymbolicLink()) { 43 | var srcPath = fs.readlinkSync(src) 44 | fs.symlinkSync(srcPath, dest) 45 | } 46 | } 47 | 48 | module.exports = copySync 49 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/copy-sync/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | copySync: require('./copy-sync') 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/copy/copy.js: -------------------------------------------------------------------------------- 1 | var fs = require('graceful-fs') 2 | var path = require('path') 3 | var ncp = require('./ncp') 4 | var mkdir = require('../mkdirs') 5 | 6 | function copy (src, dest, options, callback) { 7 | if (typeof options === 'function' && !callback) { 8 | callback = options 9 | options = {} 10 | } else if (typeof options === 'function' || options instanceof RegExp) { 11 | options = {filter: options} 12 | } 13 | callback = callback || function () {} 14 | options = options || {} 15 | 16 | // don't allow src and dest to be the same 17 | var basePath = process.cwd() 18 | var currentPath = path.resolve(basePath, src) 19 | var targetPath = path.resolve(basePath, dest) 20 | if (currentPath === targetPath) return callback(new Error('Source and destination must not be the same.')) 21 | 22 | fs.lstat(src, function (err, stats) { 23 | if (err) return callback(err) 24 | 25 | var dir = null 26 | if (stats.isDirectory()) { 27 | var parts = dest.split(path.sep) 28 | parts.pop() 29 | dir = parts.join(path.sep) 30 | } else { 31 | dir = path.dirname(dest) 32 | } 33 | 34 | fs.exists(dir, function (dirExists) { 35 | if (dirExists) return ncp(src, dest, options, callback) 36 | mkdir.mkdirs(dir, function (err) { 37 | if (err) return callback(err) 38 | ncp(src, dest, options, callback) 39 | }) 40 | }) 41 | }) 42 | } 43 | 44 | module.exports = copy 45 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/copy/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | copy: require('./copy') 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/empty/index.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | var path = require('path') 3 | var mkdir = require('../mkdirs') 4 | var remove = require('../remove') 5 | 6 | function emptyDir (dir, callback) { 7 | callback = callback || function () {} 8 | fs.readdir(dir, function (err, items) { 9 | if (err) return mkdir.mkdirs(dir, callback) 10 | 11 | items = items.map(function (item) { 12 | return path.join(dir, item) 13 | }) 14 | 15 | deleteItem() 16 | 17 | function deleteItem () { 18 | var item = items.pop() 19 | if (!item) return callback() 20 | remove.remove(item, function (err) { 21 | if (err) return callback(err) 22 | deleteItem() 23 | }) 24 | } 25 | }) 26 | } 27 | 28 | function emptyDirSync (dir) { 29 | var items 30 | try { 31 | items = fs.readdirSync(dir) 32 | } catch (err) { 33 | return mkdir.mkdirsSync(dir) 34 | } 35 | 36 | items.forEach(function (item) { 37 | item = path.join(dir, item) 38 | remove.removeSync(item) 39 | }) 40 | } 41 | 42 | module.exports = { 43 | emptyDirSync: emptyDirSync, 44 | emptydirSync: emptyDirSync, 45 | emptyDir: emptyDir, 46 | emptydir: emptyDir 47 | } 48 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/ensure/file.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var fs = require('graceful-fs') 3 | var mkdir = require('../mkdirs') 4 | 5 | function createFile (file, callback) { 6 | function makeFile () { 7 | fs.writeFile(file, '', function (err) { 8 | if (err) return callback(err) 9 | callback() 10 | }) 11 | } 12 | 13 | fs.exists(file, function (fileExists) { 14 | if (fileExists) return callback() 15 | var dir = path.dirname(file) 16 | fs.exists(dir, function (dirExists) { 17 | if (dirExists) return makeFile() 18 | mkdir.mkdirs(dir, function (err) { 19 | if (err) return callback(err) 20 | makeFile() 21 | }) 22 | }) 23 | }) 24 | } 25 | 26 | function createFileSync (file) { 27 | if (fs.existsSync(file)) return 28 | 29 | var dir = path.dirname(file) 30 | if (!fs.existsSync(dir)) { 31 | mkdir.mkdirsSync(dir) 32 | } 33 | 34 | fs.writeFileSync(file, '') 35 | } 36 | 37 | module.exports = { 38 | createFile: createFile, 39 | createFileSync: createFileSync, 40 | // alias 41 | ensureFile: createFile, 42 | ensureFileSync: createFileSync 43 | } 44 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/ensure/index.js: -------------------------------------------------------------------------------- 1 | var file = require('./file') 2 | var link = require('./link') 3 | var symlink = require('./symlink') 4 | 5 | module.exports = { 6 | // file 7 | createFile: file.createFile, 8 | createFileSync: file.createFileSync, 9 | ensureFile: file.createFile, 10 | ensureFileSync: file.createFileSync, 11 | // link 12 | createLink: link.createLink, 13 | createLinkSync: link.createLinkSync, 14 | ensureLink: link.createLink, 15 | ensureLinkSync: link.createLinkSync, 16 | // symlink 17 | createSymlink: symlink.createSymlink, 18 | createSymlinkSync: symlink.createSymlinkSync, 19 | ensureSymlink: symlink.createSymlink, 20 | ensureSymlinkSync: symlink.createSymlinkSync 21 | } 22 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/ensure/link.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var fs = require('graceful-fs') 3 | var mkdir = require('../mkdirs') 4 | 5 | function createLink (srcpath, dstpath, callback) { 6 | function makeLink (srcpath, dstpath) { 7 | fs.link(srcpath, dstpath, function (err) { 8 | if (err) return callback(err) 9 | callback(null) 10 | }) 11 | } 12 | 13 | fs.exists(dstpath, function (destinationExists) { 14 | if (destinationExists) return callback(null) 15 | fs.lstat(srcpath, function (err, stat) { 16 | if (err) { 17 | err.message = err.message.replace('lstat', 'ensureLink') 18 | return callback(err) 19 | } 20 | 21 | var dir = path.dirname(dstpath) 22 | fs.exists(dir, function (dirExists) { 23 | if (dirExists) return makeLink(srcpath, dstpath) 24 | mkdir.mkdirs(dir, function (err) { 25 | if (err) return callback(err) 26 | makeLink(srcpath, dstpath) 27 | }) 28 | }) 29 | }) 30 | }) 31 | } 32 | 33 | function createLinkSync (srcpath, dstpath, callback) { 34 | var destinationExists = fs.existsSync(dstpath) 35 | if (destinationExists) return undefined 36 | 37 | try { 38 | fs.lstatSync(srcpath) 39 | } catch (err) { 40 | err.message = err.message.replace('lstat', 'ensureLink') 41 | throw err 42 | } 43 | 44 | var dir = path.dirname(dstpath) 45 | var dirExists = fs.existsSync(dir) 46 | if (dirExists) return fs.linkSync(srcpath, dstpath) 47 | mkdir.mkdirsSync(dir) 48 | 49 | return fs.linkSync(srcpath, dstpath) 50 | } 51 | 52 | module.exports = { 53 | createLink: createLink, 54 | createLinkSync: createLinkSync, 55 | // alias 56 | ensureLink: createLink, 57 | ensureLinkSync: createLinkSync 58 | } 59 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/ensure/symlink-type.js: -------------------------------------------------------------------------------- 1 | var fs = require('graceful-fs') 2 | 3 | function symlinkType (srcpath, type, callback) { 4 | callback = (typeof type === 'function') ? type : callback 5 | type = (typeof type === 'function') ? false : type 6 | if (type) return callback(null, type) 7 | fs.lstat(srcpath, function (err, stats) { 8 | if (err) return callback(null, 'file') 9 | type = (stats && stats.isDirectory()) ? 'dir' : 'file' 10 | callback(null, type) 11 | }) 12 | } 13 | 14 | function symlinkTypeSync (srcpath, type) { 15 | if (type) return type 16 | try { 17 | var stats = fs.lstatSync(srcpath) 18 | } catch (e) { 19 | return 'file' 20 | } 21 | return (stats && stats.isDirectory()) ? 'dir' : 'file' 22 | } 23 | 24 | module.exports = { 25 | symlinkType: symlinkType, 26 | symlinkTypeSync: symlinkTypeSync 27 | } 28 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/ensure/symlink.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var fs = require('graceful-fs') 3 | var _mkdirs = require('../mkdirs') 4 | var mkdirs = _mkdirs.mkdirs 5 | var mkdirsSync = _mkdirs.mkdirsSync 6 | 7 | var _symlinkPaths = require('./symlink-paths') 8 | var symlinkPaths = _symlinkPaths.symlinkPaths 9 | var symlinkPathsSync = _symlinkPaths.symlinkPathsSync 10 | 11 | var _symlinkType = require('./symlink-type') 12 | var symlinkType = _symlinkType.symlinkType 13 | var symlinkTypeSync = _symlinkType.symlinkTypeSync 14 | 15 | function createSymlink (srcpath, dstpath, type, callback) { 16 | callback = (typeof type === 'function') ? type : callback 17 | type = (typeof type === 'function') ? false : type 18 | 19 | fs.exists(dstpath, function (destinationExists) { 20 | if (destinationExists) return callback(null) 21 | symlinkPaths(srcpath, dstpath, function (err, relative) { 22 | if (err) return callback(err) 23 | srcpath = relative.toDst 24 | symlinkType(relative.toCwd, type, function (err, type) { 25 | if (err) return callback(err) 26 | var dir = path.dirname(dstpath) 27 | fs.exists(dir, function (dirExists) { 28 | if (dirExists) return fs.symlink(srcpath, dstpath, type, callback) 29 | mkdirs(dir, function (err) { 30 | if (err) return callback(err) 31 | fs.symlink(srcpath, dstpath, type, callback) 32 | }) 33 | }) 34 | }) 35 | }) 36 | }) 37 | } 38 | 39 | function createSymlinkSync (srcpath, dstpath, type, callback) { 40 | callback = (typeof type === 'function') ? type : callback 41 | type = (typeof type === 'function') ? false : type 42 | 43 | var destinationExists = fs.existsSync(dstpath) 44 | if (destinationExists) return undefined 45 | 46 | var relative = symlinkPathsSync(srcpath, dstpath) 47 | srcpath = relative.toDst 48 | type = symlinkTypeSync(relative.toCwd, type) 49 | var dir = path.dirname(dstpath) 50 | var exists = fs.existsSync(dir) 51 | if (exists) return fs.symlinkSync(srcpath, dstpath, type) 52 | mkdirsSync(dir) 53 | return fs.symlinkSync(srcpath, dstpath, type) 54 | } 55 | 56 | module.exports = { 57 | createSymlink: createSymlink, 58 | createSymlinkSync: createSymlinkSync, 59 | // alias 60 | ensureSymlink: createSymlink, 61 | ensureSymlinkSync: createSymlinkSync 62 | } 63 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/index.js: -------------------------------------------------------------------------------- 1 | var assign = require('./util/assign') 2 | 3 | var fse = {} 4 | var gfs = require('graceful-fs') 5 | 6 | // attach fs methods to fse 7 | Object.keys(gfs).forEach(function (key) { 8 | fse[key] = gfs[key] 9 | }) 10 | 11 | var fs = fse 12 | 13 | assign(fs, require('./copy')) 14 | assign(fs, require('./copy-sync')) 15 | assign(fs, require('./mkdirs')) 16 | assign(fs, require('./remove')) 17 | assign(fs, require('./json')) 18 | assign(fs, require('./move')) 19 | assign(fs, require('./empty')) 20 | assign(fs, require('./ensure')) 21 | assign(fs, require('./output')) 22 | assign(fs, require('./walk')) 23 | 24 | module.exports = fs 25 | 26 | // maintain backwards compatibility for awhile 27 | var jsonfile = {} 28 | Object.defineProperty(jsonfile, 'spaces', { 29 | get: function () { 30 | return fs.spaces // found in ./json 31 | }, 32 | set: function (val) { 33 | fs.spaces = val 34 | } 35 | }) 36 | 37 | module.exports.jsonfile = jsonfile // so users of fs-extra can modify jsonFile.spaces 38 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/json/index.js: -------------------------------------------------------------------------------- 1 | var jsonFile = require('./jsonfile') 2 | 3 | jsonFile.outputJsonSync = require('./output-json-sync') 4 | jsonFile.outputJson = require('./output-json') 5 | // aliases 6 | jsonFile.outputJSONSync = require('./output-json-sync') 7 | jsonFile.outputJSON = require('./output-json') 8 | 9 | module.exports = jsonFile 10 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/json/jsonfile.js: -------------------------------------------------------------------------------- 1 | var jsonFile = require('jsonfile') 2 | 3 | module.exports = { 4 | // jsonfile exports 5 | readJson: jsonFile.readFile, 6 | readJSON: jsonFile.readFile, 7 | readJsonSync: jsonFile.readFileSync, 8 | readJSONSync: jsonFile.readFileSync, 9 | writeJson: jsonFile.writeFile, 10 | writeJSON: jsonFile.writeFile, 11 | writeJsonSync: jsonFile.writeFileSync, 12 | writeJSONSync: jsonFile.writeFileSync, 13 | spaces: 2 // default in fs-extra 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/json/output-json-sync.js: -------------------------------------------------------------------------------- 1 | var fs = require('graceful-fs') 2 | var path = require('path') 3 | var jsonFile = require('./jsonfile') 4 | var mkdir = require('../mkdirs') 5 | 6 | function outputJsonSync (file, data, options) { 7 | var dir = path.dirname(file) 8 | 9 | if (!fs.existsSync(dir)) { 10 | mkdir.mkdirsSync(dir) 11 | } 12 | 13 | jsonFile.writeJsonSync(file, data, options) 14 | } 15 | 16 | module.exports = outputJsonSync 17 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/json/output-json.js: -------------------------------------------------------------------------------- 1 | var fs = require('graceful-fs') 2 | var path = require('path') 3 | var jsonFile = require('./jsonfile') 4 | var mkdir = require('../mkdirs') 5 | 6 | function outputJson (file, data, options, callback) { 7 | if (typeof options === 'function') { 8 | callback = options 9 | options = {} 10 | } 11 | 12 | var dir = path.dirname(file) 13 | 14 | fs.exists(dir, function (itDoes) { 15 | if (itDoes) return jsonFile.writeJson(file, data, options, callback) 16 | 17 | mkdir.mkdirs(dir, function (err) { 18 | if (err) return callback(err) 19 | jsonFile.writeJson(file, data, options, callback) 20 | }) 21 | }) 22 | } 23 | 24 | module.exports = outputJson 25 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/mkdirs/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | mkdirs: require('./mkdirs'), 3 | mkdirsSync: require('./mkdirs-sync'), 4 | // alias 5 | mkdirp: require('./mkdirs'), 6 | mkdirpSync: require('./mkdirs-sync'), 7 | ensureDir: require('./mkdirs'), 8 | ensureDirSync: require('./mkdirs-sync') 9 | } 10 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js: -------------------------------------------------------------------------------- 1 | var fs = require('graceful-fs') 2 | var path = require('path') 3 | var invalidWin32Path = require('./win32').invalidWin32Path 4 | 5 | var o777 = parseInt('0777', 8) 6 | 7 | function mkdirsSync (p, opts, made) { 8 | if (!opts || typeof opts !== 'object') { 9 | opts = { mode: opts } 10 | } 11 | 12 | var mode = opts.mode 13 | var xfs = opts.fs || fs 14 | 15 | if (process.platform === 'win32' && invalidWin32Path(p)) { 16 | var errInval = new Error(p + ' contains invalid WIN32 path characters.') 17 | errInval.code = 'EINVAL' 18 | throw errInval 19 | } 20 | 21 | if (mode === undefined) { 22 | mode = o777 & (~process.umask()) 23 | } 24 | if (!made) made = null 25 | 26 | p = path.resolve(p) 27 | 28 | try { 29 | xfs.mkdirSync(p, mode) 30 | made = made || p 31 | } catch (err0) { 32 | switch (err0.code) { 33 | case 'ENOENT': 34 | if (path.dirname(p) === p) throw err0 35 | made = mkdirsSync(path.dirname(p), opts, made) 36 | mkdirsSync(p, opts, made) 37 | break 38 | 39 | // In the case of any other error, just see if there's a dir 40 | // there already. If so, then hooray! If not, then something 41 | // is borked. 42 | default: 43 | var stat 44 | try { 45 | stat = xfs.statSync(p) 46 | } catch (err1) { 47 | throw err0 48 | } 49 | if (!stat.isDirectory()) throw err0 50 | break 51 | } 52 | } 53 | 54 | return made 55 | } 56 | 57 | module.exports = mkdirsSync 58 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/mkdirs/mkdirs.js: -------------------------------------------------------------------------------- 1 | var fs = require('graceful-fs') 2 | var path = require('path') 3 | var invalidWin32Path = require('./win32').invalidWin32Path 4 | 5 | var o777 = parseInt('0777', 8) 6 | 7 | function mkdirs (p, opts, callback, made) { 8 | if (typeof opts === 'function') { 9 | callback = opts 10 | opts = {} 11 | } else if (!opts || typeof opts !== 'object') { 12 | opts = { mode: opts } 13 | } 14 | 15 | if (process.platform === 'win32' && invalidWin32Path(p)) { 16 | var errInval = new Error(p + ' contains invalid WIN32 path characters.') 17 | errInval.code = 'EINVAL' 18 | return callback(errInval) 19 | } 20 | 21 | var mode = opts.mode 22 | var xfs = opts.fs || fs 23 | 24 | if (mode === undefined) { 25 | mode = o777 & (~process.umask()) 26 | } 27 | if (!made) made = null 28 | 29 | callback = callback || function () {} 30 | p = path.resolve(p) 31 | 32 | xfs.mkdir(p, mode, function (er) { 33 | if (!er) { 34 | made = made || p 35 | return callback(null, made) 36 | } 37 | switch (er.code) { 38 | case 'ENOENT': 39 | if (path.dirname(p) === p) return callback(er) 40 | mkdirs(path.dirname(p), opts, function (er, made) { 41 | if (er) callback(er, made) 42 | else mkdirs(p, opts, callback, made) 43 | }) 44 | break 45 | 46 | // In the case of any other error, just see if there's a dir 47 | // there already. If so, then hooray! If not, then something 48 | // is borked. 49 | default: 50 | xfs.stat(p, function (er2, stat) { 51 | // if the stat fails, then that's super weird. 52 | // let the original error be the failure reason. 53 | if (er2 || !stat.isDirectory()) callback(er, made) 54 | else callback(null, made) 55 | }) 56 | break 57 | } 58 | }) 59 | } 60 | 61 | module.exports = mkdirs 62 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/mkdirs/win32.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var path = require('path') 3 | 4 | // get drive on windows 5 | function getRootPath (p) { 6 | p = path.normalize(path.resolve(p)).split(path.sep) 7 | if (p.length > 0) return p[0] 8 | else return null 9 | } 10 | 11 | // http://stackoverflow.com/a/62888/10333 contains more accurate 12 | // TODO: expand to include the rest 13 | var INVALID_PATH_CHARS = /[<>:"|?*]/ 14 | 15 | function invalidWin32Path (p) { 16 | var rp = getRootPath(p) 17 | p = p.replace(rp, '') 18 | return INVALID_PATH_CHARS.test(p) 19 | } 20 | 21 | module.exports = { 22 | getRootPath: getRootPath, 23 | invalidWin32Path: invalidWin32Path 24 | } 25 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/output/index.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var fs = require('graceful-fs') 3 | var mkdir = require('../mkdirs') 4 | 5 | function outputFile (file, data, encoding, callback) { 6 | if (typeof encoding === 'function') { 7 | callback = encoding 8 | encoding = 'utf8' 9 | } 10 | 11 | var dir = path.dirname(file) 12 | fs.exists(dir, function (itDoes) { 13 | if (itDoes) return fs.writeFile(file, data, encoding, callback) 14 | 15 | mkdir.mkdirs(dir, function (err) { 16 | if (err) return callback(err) 17 | 18 | fs.writeFile(file, data, encoding, callback) 19 | }) 20 | }) 21 | } 22 | 23 | function outputFileSync (file, data, encoding) { 24 | var dir = path.dirname(file) 25 | if (fs.existsSync(dir)) { 26 | return fs.writeFileSync.apply(fs, arguments) 27 | } 28 | mkdir.mkdirsSync(dir) 29 | fs.writeFileSync.apply(fs, arguments) 30 | } 31 | 32 | module.exports = { 33 | outputFile: outputFile, 34 | outputFileSync: outputFileSync 35 | } 36 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/remove/index.js: -------------------------------------------------------------------------------- 1 | var rimraf = require('rimraf') 2 | 3 | function removeSync (dir) { 4 | return rimraf.sync(dir) 5 | } 6 | 7 | function remove (dir, callback) { 8 | return callback ? rimraf(dir, callback) : rimraf(dir, function () {}) 9 | } 10 | 11 | module.exports = { 12 | remove: remove, 13 | removeSync: removeSync 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/util/assign.js: -------------------------------------------------------------------------------- 1 | // simple mutable assign 2 | function assign () { 3 | var args = [].slice.call(arguments).filter(function (i) { return i }) 4 | var dest = args.shift() 5 | args.forEach(function (src) { 6 | Object.keys(src).forEach(function (key) { 7 | dest[key] = src[key] 8 | }) 9 | }) 10 | 11 | return dest 12 | } 13 | 14 | module.exports = assign 15 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/util/utimes.js: -------------------------------------------------------------------------------- 1 | var fs = require('graceful-fs') 2 | var path = require('path') 3 | var os = require('os') 4 | 5 | // HFS, ext{2,3}, FAT do not, Node.js v0.10 does not 6 | function hasMillisResSync () { 7 | var tmpfile = path.join('millis-test-sync' + Date.now().toString() + Math.random().toString().slice(2)) 8 | tmpfile = path.join(os.tmpdir(), tmpfile) 9 | 10 | // 550 millis past UNIX epoch 11 | var d = new Date(1435410243862) 12 | fs.writeFileSync(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141') 13 | var fd = fs.openSync(tmpfile, 'r+') 14 | fs.futimesSync(fd, d, d) 15 | fs.closeSync(fd) 16 | return fs.statSync(tmpfile).mtime > 1435410243000 17 | } 18 | 19 | function hasMillisRes (callback) { 20 | var tmpfile = path.join('millis-test' + Date.now().toString() + Math.random().toString().slice(2)) 21 | tmpfile = path.join(os.tmpdir(), tmpfile) 22 | 23 | // 550 millis past UNIX epoch 24 | var d = new Date(1435410243862) 25 | fs.writeFile(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141', function (err) { 26 | if (err) return callback(err) 27 | fs.open(tmpfile, 'r+', function (err, fd) { 28 | if (err) return callback(err) 29 | fs.futimes(fd, d, d, function (err) { 30 | if (err) return callback(err) 31 | fs.close(fd, function (err) { 32 | if (err) return callback(err) 33 | fs.stat(tmpfile, function (err, stats) { 34 | if (err) return callback(err) 35 | callback(null, stats.mtime > 1435410243000) 36 | }) 37 | }) 38 | }) 39 | }) 40 | }) 41 | } 42 | 43 | function timeRemoveMillis (timestamp) { 44 | if (typeof timestamp === 'number') { 45 | return Math.floor(timestamp / 1000) * 1000 46 | } else if (timestamp instanceof Date) { 47 | return new Date(Math.floor(timestamp.getTime() / 1000) * 1000) 48 | } else { 49 | throw new Error('fs-extra: timeRemoveMillis() unknown parameter type') 50 | } 51 | } 52 | 53 | function utimesMillis (path, atime, mtime, callback) { 54 | // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback) 55 | fs.open(path, 'r+', function (err, fd) { 56 | if (err) return callback(err) 57 | fs.futimes(fd, atime, mtime, function (err) { 58 | if (err) return callback(err) 59 | fs.close(fd, callback) 60 | }) 61 | }) 62 | } 63 | 64 | module.exports = { 65 | hasMillisRes: hasMillisRes, 66 | hasMillisResSync: hasMillisResSync, 67 | timeRemoveMillis: timeRemoveMillis, 68 | utimesMillis: utimesMillis 69 | } 70 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/walk/index.js: -------------------------------------------------------------------------------- 1 | var klaw = require('klaw') 2 | 3 | module.exports = { 4 | walk: klaw 5 | } 6 | -------------------------------------------------------------------------------- /node_modules/fs.realpath/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | 17 | ---- 18 | 19 | This library bundles a version of the `fs.realpath` and `fs.realpathSync` 20 | methods from Node.js v0.10 under the terms of the Node.js MIT license. 21 | 22 | Node's license follows, also included at the header of `old.js` which contains 23 | the licensed code: 24 | 25 | Copyright Joyent, Inc. and other Node contributors. 26 | 27 | Permission is hereby granted, free of charge, to any person obtaining a 28 | copy of this software and associated documentation files (the "Software"), 29 | to deal in the Software without restriction, including without limitation 30 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 31 | and/or sell copies of the Software, and to permit persons to whom the 32 | Software is furnished to do so, subject to the following conditions: 33 | 34 | The above copyright notice and this permission notice shall be included in 35 | all copies or substantial portions of the Software. 36 | 37 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 38 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 39 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 40 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 41 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 42 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 43 | DEALINGS IN THE SOFTWARE. 44 | -------------------------------------------------------------------------------- /node_modules/fs.realpath/README.md: -------------------------------------------------------------------------------- 1 | # fs.realpath 2 | 3 | A backwards-compatible fs.realpath for Node v6 and above 4 | 5 | In Node v6, the JavaScript implementation of fs.realpath was replaced 6 | with a faster (but less resilient) native implementation. That raises 7 | new and platform-specific errors and cannot handle long or excessively 8 | symlink-looping paths. 9 | 10 | This module handles those cases by detecting the new errors and 11 | falling back to the JavaScript implementation. On versions of Node 12 | prior to v6, it has no effect. 13 | 14 | ## USAGE 15 | 16 | ```js 17 | var rp = require('fs.realpath') 18 | 19 | // async version 20 | rp.realpath(someLongAndLoopingPath, function (er, real) { 21 | // the ELOOP was handled, but it was a bit slower 22 | }) 23 | 24 | // sync version 25 | var real = rp.realpathSync(someLongAndLoopingPath) 26 | 27 | // monkeypatch at your own risk! 28 | // This replaces the fs.realpath/fs.realpathSync builtins 29 | rp.monkeypatch() 30 | 31 | // un-do the monkeypatching 32 | rp.unmonkeypatch() 33 | ``` 34 | -------------------------------------------------------------------------------- /node_modules/fs.realpath/index.js: -------------------------------------------------------------------------------- 1 | module.exports = realpath 2 | realpath.realpath = realpath 3 | realpath.sync = realpathSync 4 | realpath.realpathSync = realpathSync 5 | realpath.monkeypatch = monkeypatch 6 | realpath.unmonkeypatch = unmonkeypatch 7 | 8 | var fs = require('fs') 9 | var origRealpath = fs.realpath 10 | var origRealpathSync = fs.realpathSync 11 | 12 | var version = process.version 13 | var ok = /^v[0-5]\./.test(version) 14 | var old = require('./old.js') 15 | 16 | function newError (er) { 17 | return er && er.syscall === 'realpath' && ( 18 | er.code === 'ELOOP' || 19 | er.code === 'ENOMEM' || 20 | er.code === 'ENAMETOOLONG' 21 | ) 22 | } 23 | 24 | function realpath (p, cache, cb) { 25 | if (ok) { 26 | return origRealpath(p, cache, cb) 27 | } 28 | 29 | if (typeof cache === 'function') { 30 | cb = cache 31 | cache = null 32 | } 33 | origRealpath(p, cache, function (er, result) { 34 | if (newError(er)) { 35 | old.realpath(p, cache, cb) 36 | } else { 37 | cb(er, result) 38 | } 39 | }) 40 | } 41 | 42 | function realpathSync (p, cache) { 43 | if (ok) { 44 | return origRealpathSync(p, cache) 45 | } 46 | 47 | try { 48 | return origRealpathSync(p, cache) 49 | } catch (er) { 50 | if (newError(er)) { 51 | return old.realpathSync(p, cache) 52 | } else { 53 | throw er 54 | } 55 | } 56 | } 57 | 58 | function monkeypatch () { 59 | fs.realpath = realpath 60 | fs.realpathSync = realpathSync 61 | } 62 | 63 | function unmonkeypatch () { 64 | fs.realpath = origRealpath 65 | fs.realpathSync = origRealpathSync 66 | } 67 | -------------------------------------------------------------------------------- /node_modules/fs.realpath/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "fs.realpath@^1.0.0", 6 | "scope": null, 7 | "escapedName": "fs.realpath", 8 | "name": "fs.realpath", 9 | "rawSpec": "^1.0.0", 10 | "spec": ">=1.0.0 <2.0.0", 11 | "type": "range" 12 | }, 13 | "/data/plugins/music_service/volspotconnect/node_modules/glob" 14 | ] 15 | ], 16 | "_from": "fs.realpath@>=1.0.0 <2.0.0", 17 | "_id": "fs.realpath@1.0.0", 18 | "_inCache": true, 19 | "_installable": true, 20 | "_location": "/fs.realpath", 21 | "_nodeVersion": "4.4.4", 22 | "_npmOperationalInternal": { 23 | "host": "packages-16-east.internal.npmjs.com", 24 | "tmp": "tmp/fs.realpath-1.0.0.tgz_1466015941059_0.3332864767871797" 25 | }, 26 | "_npmUser": { 27 | "name": "isaacs", 28 | "email": "i@izs.me" 29 | }, 30 | "_npmVersion": "3.9.1", 31 | "_phantomChildren": {}, 32 | "_requested": { 33 | "raw": "fs.realpath@^1.0.0", 34 | "scope": null, 35 | "escapedName": "fs.realpath", 36 | "name": "fs.realpath", 37 | "rawSpec": "^1.0.0", 38 | "spec": ">=1.0.0 <2.0.0", 39 | "type": "range" 40 | }, 41 | "_requiredBy": [ 42 | "/glob" 43 | ], 44 | "_resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 45 | "_shasum": "1504ad2523158caa40db4a2787cb01411994ea4f", 46 | "_shrinkwrap": null, 47 | "_spec": "fs.realpath@^1.0.0", 48 | "_where": "/data/plugins/music_service/volspotconnect/node_modules/glob", 49 | "author": { 50 | "name": "Isaac Z. Schlueter", 51 | "email": "i@izs.me", 52 | "url": "http://blog.izs.me/" 53 | }, 54 | "bugs": { 55 | "url": "https://github.com/isaacs/fs.realpath/issues" 56 | }, 57 | "dependencies": {}, 58 | "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails", 59 | "devDependencies": {}, 60 | "directories": {}, 61 | "dist": { 62 | "shasum": "1504ad2523158caa40db4a2787cb01411994ea4f", 63 | "tarball": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" 64 | }, 65 | "files": [ 66 | "old.js", 67 | "index.js" 68 | ], 69 | "gitHead": "03e7c884431fe185dfebbc9b771aeca339c1807a", 70 | "homepage": "https://github.com/isaacs/fs.realpath#readme", 71 | "keywords": [ 72 | "realpath", 73 | "fs", 74 | "polyfill" 75 | ], 76 | "license": "ISC", 77 | "main": "index.js", 78 | "maintainers": [ 79 | { 80 | "name": "isaacs", 81 | "email": "i@izs.me" 82 | } 83 | ], 84 | "name": "fs.realpath", 85 | "optionalDependencies": {}, 86 | "readme": "ERROR: No README data found!", 87 | "repository": { 88 | "type": "git", 89 | "url": "git+https://github.com/isaacs/fs.realpath.git" 90 | }, 91 | "scripts": { 92 | "test": "tap test/*.js --cov" 93 | }, 94 | "version": "1.0.0" 95 | } 96 | -------------------------------------------------------------------------------- /node_modules/glob/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/glob/changelog.md: -------------------------------------------------------------------------------- 1 | ## 7.0 2 | 3 | - Raise error if `options.cwd` is specified, and not a directory 4 | 5 | ## 6.0 6 | 7 | - Remove comment and negation pattern support 8 | - Ignore patterns are always in `dot:true` mode 9 | 10 | ## 5.0 11 | 12 | - Deprecate comment and negation patterns 13 | - Fix regression in `mark` and `nodir` options from making all cache 14 | keys absolute path. 15 | - Abort if `fs.readdir` returns an error that's unexpected 16 | - Don't emit `match` events for ignored items 17 | - Treat ENOTSUP like ENOTDIR in readdir 18 | 19 | ## 4.5 20 | 21 | - Add `options.follow` to always follow directory symlinks in globstar 22 | - Add `options.realpath` to call `fs.realpath` on all results 23 | - Always cache based on absolute path 24 | 25 | ## 4.4 26 | 27 | - Add `options.ignore` 28 | - Fix handling of broken symlinks 29 | 30 | ## 4.3 31 | 32 | - Bump minimatch to 2.x 33 | - Pass all tests on Windows 34 | 35 | ## 4.2 36 | 37 | - Add `glob.hasMagic` function 38 | - Add `options.nodir` flag 39 | 40 | ## 4.1 41 | 42 | - Refactor sync and async implementations for performance 43 | - Throw if callback provided to sync glob function 44 | - Treat symbolic links in globstar results the same as Bash 4.3 45 | 46 | ## 4.0 47 | 48 | - Use `^` for dependency versions (bumped major because this breaks 49 | older npm versions) 50 | - Ensure callbacks are only ever called once 51 | - switch to ISC license 52 | 53 | ## 3.x 54 | 55 | - Rewrite in JavaScript 56 | - Add support for setting root, cwd, and windows support 57 | - Cache many fs calls 58 | - Add globstar support 59 | - emit match events 60 | 61 | ## 2.x 62 | 63 | - Use `glob.h` and `fnmatch.h` from NetBSD 64 | 65 | ## 1.x 66 | 67 | - `glob.h` static binding. 68 | -------------------------------------------------------------------------------- /node_modules/glob/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "glob@^7.0.5", 6 | "scope": null, 7 | "escapedName": "glob", 8 | "name": "glob", 9 | "rawSpec": "^7.0.5", 10 | "spec": ">=7.0.5 <8.0.0", 11 | "type": "range" 12 | }, 13 | "/data/plugins/music_service/volspotconnect/node_modules/rimraf" 14 | ] 15 | ], 16 | "_from": "glob@>=7.0.5 <8.0.0", 17 | "_id": "glob@7.1.0", 18 | "_inCache": true, 19 | "_installable": true, 20 | "_location": "/glob", 21 | "_nodeVersion": "6.5.0", 22 | "_npmOperationalInternal": { 23 | "host": "packages-12-west.internal.npmjs.com", 24 | "tmp": "tmp/glob-7.1.0.tgz_1474396131090_0.08145137410610914" 25 | }, 26 | "_npmUser": { 27 | "name": "isaacs", 28 | "email": "i@izs.me" 29 | }, 30 | "_npmVersion": "3.10.7", 31 | "_phantomChildren": {}, 32 | "_requested": { 33 | "raw": "glob@^7.0.5", 34 | "scope": null, 35 | "escapedName": "glob", 36 | "name": "glob", 37 | "rawSpec": "^7.0.5", 38 | "spec": ">=7.0.5 <8.0.0", 39 | "type": "range" 40 | }, 41 | "_requiredBy": [ 42 | "/rimraf" 43 | ], 44 | "_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.0.tgz", 45 | "_shasum": "36add856d746d0d99e4cc2797bba1ae2c67272fd", 46 | "_shrinkwrap": null, 47 | "_spec": "glob@^7.0.5", 48 | "_where": "/data/plugins/music_service/volspotconnect/node_modules/rimraf", 49 | "author": { 50 | "name": "Isaac Z. Schlueter", 51 | "email": "i@izs.me", 52 | "url": "http://blog.izs.me/" 53 | }, 54 | "bugs": { 55 | "url": "https://github.com/isaacs/node-glob/issues" 56 | }, 57 | "dependencies": { 58 | "fs.realpath": "^1.0.0", 59 | "inflight": "^1.0.4", 60 | "inherits": "2", 61 | "minimatch": "^3.0.2", 62 | "once": "^1.3.0", 63 | "path-is-absolute": "^1.0.0" 64 | }, 65 | "description": "a little globber", 66 | "devDependencies": { 67 | "mkdirp": "0", 68 | "rimraf": "^2.2.8", 69 | "tap": "^7.1.2", 70 | "tick": "0.0.6" 71 | }, 72 | "directories": {}, 73 | "dist": { 74 | "shasum": "36add856d746d0d99e4cc2797bba1ae2c67272fd", 75 | "tarball": "https://registry.npmjs.org/glob/-/glob-7.1.0.tgz" 76 | }, 77 | "engines": { 78 | "node": "*" 79 | }, 80 | "files": [ 81 | "glob.js", 82 | "sync.js", 83 | "common.js" 84 | ], 85 | "gitHead": "f65f9eb7eda113528c5257b58fac4ca685ee6c4f", 86 | "homepage": "https://github.com/isaacs/node-glob#readme", 87 | "license": "ISC", 88 | "main": "glob.js", 89 | "maintainers": [ 90 | { 91 | "name": "isaacs", 92 | "email": "i@izs.me" 93 | } 94 | ], 95 | "name": "glob", 96 | "optionalDependencies": {}, 97 | "readme": "ERROR: No README data found!", 98 | "repository": { 99 | "type": "git", 100 | "url": "git://github.com/isaacs/node-glob.git" 101 | }, 102 | "scripts": { 103 | "bench": "bash benchmark.sh", 104 | "benchclean": "node benchclean.js", 105 | "prepublish": "npm run benchclean", 106 | "prof": "bash prof.sh && cat profile.txt", 107 | "profclean": "rm -f v8.log profile.txt", 108 | "test": "tap test/*.js --cov", 109 | "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js" 110 | }, 111 | "version": "7.1.0" 112 | } 113 | -------------------------------------------------------------------------------- /node_modules/graceful-fs/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/graceful-fs/fs.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | var fs = require('fs') 4 | 5 | module.exports = clone(fs) 6 | 7 | function clone (obj) { 8 | if (obj === null || typeof obj !== 'object') 9 | return obj 10 | 11 | if (obj instanceof Object) 12 | var copy = { __proto__: obj.__proto__ } 13 | else 14 | var copy = Object.create(null) 15 | 16 | Object.getOwnPropertyNames(obj).forEach(function (key) { 17 | Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) 18 | }) 19 | 20 | return copy 21 | } 22 | -------------------------------------------------------------------------------- /node_modules/graceful-fs/legacy-streams.js: -------------------------------------------------------------------------------- 1 | var Stream = require('stream').Stream 2 | 3 | module.exports = legacy 4 | 5 | function legacy (fs) { 6 | return { 7 | ReadStream: ReadStream, 8 | WriteStream: WriteStream 9 | } 10 | 11 | function ReadStream (path, options) { 12 | if (!(this instanceof ReadStream)) return new ReadStream(path, options); 13 | 14 | Stream.call(this); 15 | 16 | var self = this; 17 | 18 | this.path = path; 19 | this.fd = null; 20 | this.readable = true; 21 | this.paused = false; 22 | 23 | this.flags = 'r'; 24 | this.mode = 438; /*=0666*/ 25 | this.bufferSize = 64 * 1024; 26 | 27 | options = options || {}; 28 | 29 | // Mixin options into this 30 | var keys = Object.keys(options); 31 | for (var index = 0, length = keys.length; index < length; index++) { 32 | var key = keys[index]; 33 | this[key] = options[key]; 34 | } 35 | 36 | if (this.encoding) this.setEncoding(this.encoding); 37 | 38 | if (this.start !== undefined) { 39 | if ('number' !== typeof this.start) { 40 | throw TypeError('start must be a Number'); 41 | } 42 | if (this.end === undefined) { 43 | this.end = Infinity; 44 | } else if ('number' !== typeof this.end) { 45 | throw TypeError('end must be a Number'); 46 | } 47 | 48 | if (this.start > this.end) { 49 | throw new Error('start must be <= end'); 50 | } 51 | 52 | this.pos = this.start; 53 | } 54 | 55 | if (this.fd !== null) { 56 | process.nextTick(function() { 57 | self._read(); 58 | }); 59 | return; 60 | } 61 | 62 | fs.open(this.path, this.flags, this.mode, function (err, fd) { 63 | if (err) { 64 | self.emit('error', err); 65 | self.readable = false; 66 | return; 67 | } 68 | 69 | self.fd = fd; 70 | self.emit('open', fd); 71 | self._read(); 72 | }) 73 | } 74 | 75 | function WriteStream (path, options) { 76 | if (!(this instanceof WriteStream)) return new WriteStream(path, options); 77 | 78 | Stream.call(this); 79 | 80 | this.path = path; 81 | this.fd = null; 82 | this.writable = true; 83 | 84 | this.flags = 'w'; 85 | this.encoding = 'binary'; 86 | this.mode = 438; /*=0666*/ 87 | this.bytesWritten = 0; 88 | 89 | options = options || {}; 90 | 91 | // Mixin options into this 92 | var keys = Object.keys(options); 93 | for (var index = 0, length = keys.length; index < length; index++) { 94 | var key = keys[index]; 95 | this[key] = options[key]; 96 | } 97 | 98 | if (this.start !== undefined) { 99 | if ('number' !== typeof this.start) { 100 | throw TypeError('start must be a Number'); 101 | } 102 | if (this.start < 0) { 103 | throw new Error('start must be >= zero'); 104 | } 105 | 106 | this.pos = this.start; 107 | } 108 | 109 | this.busy = false; 110 | this._queue = []; 111 | 112 | if (this.fd === null) { 113 | this._open = fs.open; 114 | this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); 115 | this.flush(); 116 | } 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /node_modules/graceful-fs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "graceful-fs@^4.1.2", 6 | "scope": null, 7 | "escapedName": "graceful-fs", 8 | "name": "graceful-fs", 9 | "rawSpec": "^4.1.2", 10 | "spec": ">=4.1.2 <5.0.0", 11 | "type": "range" 12 | }, 13 | "/data/plugins/music_service/volspotconnect/node_modules/fs-extra" 14 | ] 15 | ], 16 | "_from": "graceful-fs@>=4.1.2 <5.0.0", 17 | "_id": "graceful-fs@4.1.9", 18 | "_inCache": true, 19 | "_installable": true, 20 | "_location": "/graceful-fs", 21 | "_nodeVersion": "6.5.0", 22 | "_npmOperationalInternal": { 23 | "host": "packages-12-west.internal.npmjs.com", 24 | "tmp": "tmp/graceful-fs-4.1.9.tgz_1475103672016_0.7011275647673756" 25 | }, 26 | "_npmUser": { 27 | "name": "isaacs", 28 | "email": "i@izs.me" 29 | }, 30 | "_npmVersion": "3.10.7", 31 | "_phantomChildren": {}, 32 | "_requested": { 33 | "raw": "graceful-fs@^4.1.2", 34 | "scope": null, 35 | "escapedName": "graceful-fs", 36 | "name": "graceful-fs", 37 | "rawSpec": "^4.1.2", 38 | "spec": ">=4.1.2 <5.0.0", 39 | "type": "range" 40 | }, 41 | "_requiredBy": [ 42 | "/fs-extra", 43 | "/jsonfile", 44 | "/v-conf/fs-extra" 45 | ], 46 | "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.9.tgz", 47 | "_shasum": "baacba37d19d11f9d146d3578bc99958c3787e29", 48 | "_shrinkwrap": null, 49 | "_spec": "graceful-fs@^4.1.2", 50 | "_where": "/data/plugins/music_service/volspotconnect/node_modules/fs-extra", 51 | "bugs": { 52 | "url": "https://github.com/isaacs/node-graceful-fs/issues" 53 | }, 54 | "dependencies": {}, 55 | "description": "A drop-in replacement for fs, making various improvements.", 56 | "devDependencies": { 57 | "mkdirp": "^0.5.0", 58 | "rimraf": "^2.2.8", 59 | "tap": "^5.4.2" 60 | }, 61 | "directories": { 62 | "test": "test" 63 | }, 64 | "dist": { 65 | "shasum": "baacba37d19d11f9d146d3578bc99958c3787e29", 66 | "tarball": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.9.tgz" 67 | }, 68 | "engines": { 69 | "node": ">=0.4.0" 70 | }, 71 | "files": [ 72 | "fs.js", 73 | "graceful-fs.js", 74 | "legacy-streams.js", 75 | "polyfills.js" 76 | ], 77 | "gitHead": "0798db3711e33de92de5a93979278bb89d629143", 78 | "homepage": "https://github.com/isaacs/node-graceful-fs#readme", 79 | "keywords": [ 80 | "fs", 81 | "module", 82 | "reading", 83 | "retry", 84 | "retries", 85 | "queue", 86 | "error", 87 | "errors", 88 | "handling", 89 | "EMFILE", 90 | "EAGAIN", 91 | "EINVAL", 92 | "EPERM", 93 | "EACCESS" 94 | ], 95 | "license": "ISC", 96 | "main": "graceful-fs.js", 97 | "maintainers": [ 98 | { 99 | "name": "isaacs", 100 | "email": "i@izs.me" 101 | } 102 | ], 103 | "name": "graceful-fs", 104 | "optionalDependencies": {}, 105 | "readme": "ERROR: No README data found!", 106 | "repository": { 107 | "type": "git", 108 | "url": "git+https://github.com/isaacs/node-graceful-fs.git" 109 | }, 110 | "scripts": { 111 | "test": "node test.js | tap -" 112 | }, 113 | "version": "4.1.9" 114 | } 115 | -------------------------------------------------------------------------------- /node_modules/inflight/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/inflight/README.md: -------------------------------------------------------------------------------- 1 | # inflight 2 | 3 | Add callbacks to requests in flight to avoid async duplication 4 | 5 | ## USAGE 6 | 7 | ```javascript 8 | var inflight = require('inflight') 9 | 10 | // some request that does some stuff 11 | function req(key, callback) { 12 | // key is any random string. like a url or filename or whatever. 13 | // 14 | // will return either a falsey value, indicating that the 15 | // request for this key is already in flight, or a new callback 16 | // which when called will call all callbacks passed to inflightk 17 | // with the same key 18 | callback = inflight(key, callback) 19 | 20 | // If we got a falsey value back, then there's already a req going 21 | if (!callback) return 22 | 23 | // this is where you'd fetch the url or whatever 24 | // callback is also once()-ified, so it can safely be assigned 25 | // to multiple events etc. First call wins. 26 | setTimeout(function() { 27 | callback(null, key) 28 | }, 100) 29 | } 30 | 31 | // only assigns a single setTimeout 32 | // when it dings, all cbs get called 33 | req('foo', cb1) 34 | req('foo', cb2) 35 | req('foo', cb3) 36 | req('foo', cb4) 37 | ``` 38 | -------------------------------------------------------------------------------- /node_modules/inflight/inflight.js: -------------------------------------------------------------------------------- 1 | var wrappy = require('wrappy') 2 | var reqs = Object.create(null) 3 | var once = require('once') 4 | 5 | module.exports = wrappy(inflight) 6 | 7 | function inflight (key, cb) { 8 | if (reqs[key]) { 9 | reqs[key].push(cb) 10 | return null 11 | } else { 12 | reqs[key] = [cb] 13 | return makeres(key) 14 | } 15 | } 16 | 17 | function makeres (key) { 18 | return once(function RES () { 19 | var cbs = reqs[key] 20 | var len = cbs.length 21 | var args = slice(arguments) 22 | for (var i = 0; i < len; i++) { 23 | cbs[i].apply(null, args) 24 | } 25 | if (cbs.length > len) { 26 | // added more in the interim. 27 | // de-zalgo, just in case, but don't call again. 28 | cbs.splice(0, len) 29 | process.nextTick(function () { 30 | RES.apply(null, args) 31 | }) 32 | } else { 33 | delete reqs[key] 34 | } 35 | }) 36 | } 37 | 38 | function slice (args) { 39 | var length = args.length 40 | var array = [] 41 | 42 | for (var i = 0; i < length; i++) array[i] = args[i] 43 | return array 44 | } 45 | -------------------------------------------------------------------------------- /node_modules/inflight/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "inflight@^1.0.4", 6 | "scope": null, 7 | "escapedName": "inflight", 8 | "name": "inflight", 9 | "rawSpec": "^1.0.4", 10 | "spec": ">=1.0.4 <2.0.0", 11 | "type": "range" 12 | }, 13 | "/data/plugins/music_service/volspotconnect/node_modules/glob" 14 | ] 15 | ], 16 | "_from": "inflight@>=1.0.4 <2.0.0", 17 | "_id": "inflight@1.0.5", 18 | "_inCache": true, 19 | "_installable": true, 20 | "_location": "/inflight", 21 | "_nodeVersion": "5.10.1", 22 | "_npmOperationalInternal": { 23 | "host": "packages-12-west.internal.npmjs.com", 24 | "tmp": "tmp/inflight-1.0.5.tgz_1463529611443_0.00041943578980863094" 25 | }, 26 | "_npmUser": { 27 | "name": "zkat", 28 | "email": "kat@sykosomatic.org" 29 | }, 30 | "_npmVersion": "3.9.1", 31 | "_phantomChildren": {}, 32 | "_requested": { 33 | "raw": "inflight@^1.0.4", 34 | "scope": null, 35 | "escapedName": "inflight", 36 | "name": "inflight", 37 | "rawSpec": "^1.0.4", 38 | "spec": ">=1.0.4 <2.0.0", 39 | "type": "range" 40 | }, 41 | "_requiredBy": [ 42 | "/glob" 43 | ], 44 | "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz", 45 | "_shasum": "db3204cd5a9de2e6cd890b85c6e2f66bcf4f620a", 46 | "_shrinkwrap": null, 47 | "_spec": "inflight@^1.0.4", 48 | "_where": "/data/plugins/music_service/volspotconnect/node_modules/glob", 49 | "author": { 50 | "name": "Isaac Z. Schlueter", 51 | "email": "i@izs.me", 52 | "url": "http://blog.izs.me/" 53 | }, 54 | "bugs": { 55 | "url": "https://github.com/isaacs/inflight/issues" 56 | }, 57 | "dependencies": { 58 | "once": "^1.3.0", 59 | "wrappy": "1" 60 | }, 61 | "description": "Add callbacks to requests in flight to avoid async duplication", 62 | "devDependencies": { 63 | "tap": "^1.2.0" 64 | }, 65 | "directories": {}, 66 | "dist": { 67 | "shasum": "db3204cd5a9de2e6cd890b85c6e2f66bcf4f620a", 68 | "tarball": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz" 69 | }, 70 | "files": [ 71 | "inflight.js" 72 | ], 73 | "gitHead": "559e37b4f6327fca797fe8d7fe8ed6d9cae08821", 74 | "homepage": "https://github.com/isaacs/inflight", 75 | "license": "ISC", 76 | "main": "inflight.js", 77 | "maintainers": [ 78 | { 79 | "name": "iarna", 80 | "email": "me@re-becca.org" 81 | }, 82 | { 83 | "name": "isaacs", 84 | "email": "i@izs.me" 85 | }, 86 | { 87 | "name": "othiym23", 88 | "email": "ogd@aoaioxxysz.net" 89 | }, 90 | { 91 | "name": "zkat", 92 | "email": "kat@sykosomatic.org" 93 | } 94 | ], 95 | "name": "inflight", 96 | "optionalDependencies": {}, 97 | "readme": "ERROR: No README data found!", 98 | "repository": { 99 | "type": "git", 100 | "url": "git+https://github.com/npm/inflight.git" 101 | }, 102 | "scripts": { 103 | "test": "tap test.js" 104 | }, 105 | "version": "1.0.5" 106 | } 107 | -------------------------------------------------------------------------------- /node_modules/inherits/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 10 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 11 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 12 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 14 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | PERFORMANCE OF THIS SOFTWARE. 16 | 17 | -------------------------------------------------------------------------------- /node_modules/inherits/README.md: -------------------------------------------------------------------------------- 1 | Browser-friendly inheritance fully compatible with standard node.js 2 | [inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). 3 | 4 | This package exports standard `inherits` from node.js `util` module in 5 | node environment, but also provides alternative browser-friendly 6 | implementation through [browser 7 | field](https://gist.github.com/shtylman/4339901). Alternative 8 | implementation is a literal copy of standard one located in standalone 9 | module to avoid requiring of `util`. It also has a shim for old 10 | browsers with no `Object.create` support. 11 | 12 | While keeping you sure you are using standard `inherits` 13 | implementation in node.js environment, it allows bundlers such as 14 | [browserify](https://github.com/substack/node-browserify) to not 15 | include full `util` package to your client code if all you need is 16 | just `inherits` function. It worth, because browser shim for `util` 17 | package is large and `inherits` is often the single function you need 18 | from it. 19 | 20 | It's recommended to use this package instead of 21 | `require('util').inherits` for any code that has chances to be used 22 | not only in node.js but in browser too. 23 | 24 | ## usage 25 | 26 | ```js 27 | var inherits = require('inherits'); 28 | // then use exactly as the standard one 29 | ``` 30 | 31 | ## note on version ~1.0 32 | 33 | Version ~1.0 had completely different motivation and is not compatible 34 | neither with 2.0 nor with standard node.js `inherits`. 35 | 36 | If you are using version ~1.0 and planning to switch to ~2.0, be 37 | careful: 38 | 39 | * new version uses `super_` instead of `super` for referencing 40 | superclass 41 | * new version overwrites current prototype while old one preserves any 42 | existing fields on it 43 | -------------------------------------------------------------------------------- /node_modules/inherits/inherits.js: -------------------------------------------------------------------------------- 1 | try { 2 | var util = require('util'); 3 | if (typeof util.inherits !== 'function') throw ''; 4 | module.exports = util.inherits; 5 | } catch (e) { 6 | module.exports = require('./inherits_browser.js'); 7 | } 8 | -------------------------------------------------------------------------------- /node_modules/inherits/inherits_browser.js: -------------------------------------------------------------------------------- 1 | if (typeof Object.create === 'function') { 2 | // implementation from standard node.js 'util' module 3 | module.exports = function inherits(ctor, superCtor) { 4 | ctor.super_ = superCtor 5 | ctor.prototype = Object.create(superCtor.prototype, { 6 | constructor: { 7 | value: ctor, 8 | enumerable: false, 9 | writable: true, 10 | configurable: true 11 | } 12 | }); 13 | }; 14 | } else { 15 | // old school shim for old browsers 16 | module.exports = function inherits(ctor, superCtor) { 17 | ctor.super_ = superCtor 18 | var TempCtor = function () {} 19 | TempCtor.prototype = superCtor.prototype 20 | ctor.prototype = new TempCtor() 21 | ctor.prototype.constructor = ctor 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /node_modules/inherits/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "inherits@2", 6 | "scope": null, 7 | "escapedName": "inherits", 8 | "name": "inherits", 9 | "rawSpec": "2", 10 | "spec": ">=2.0.0 <3.0.0", 11 | "type": "range" 12 | }, 13 | "/data/plugins/music_service/volspotconnect/node_modules/glob" 14 | ] 15 | ], 16 | "_from": "inherits@>=2.0.0 <3.0.0", 17 | "_id": "inherits@2.0.3", 18 | "_inCache": true, 19 | "_installable": true, 20 | "_location": "/inherits", 21 | "_nodeVersion": "6.5.0", 22 | "_npmOperationalInternal": { 23 | "host": "packages-16-east.internal.npmjs.com", 24 | "tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328" 25 | }, 26 | "_npmUser": { 27 | "name": "isaacs", 28 | "email": "i@izs.me" 29 | }, 30 | "_npmVersion": "3.10.7", 31 | "_phantomChildren": {}, 32 | "_requested": { 33 | "raw": "inherits@2", 34 | "scope": null, 35 | "escapedName": "inherits", 36 | "name": "inherits", 37 | "rawSpec": "2", 38 | "spec": ">=2.0.0 <3.0.0", 39 | "type": "range" 40 | }, 41 | "_requiredBy": [ 42 | "/glob" 43 | ], 44 | "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 45 | "_shasum": "633c2c83e3da42a502f52466022480f4208261de", 46 | "_shrinkwrap": null, 47 | "_spec": "inherits@2", 48 | "_where": "/data/plugins/music_service/volspotconnect/node_modules/glob", 49 | "browser": "./inherits_browser.js", 50 | "bugs": { 51 | "url": "https://github.com/isaacs/inherits/issues" 52 | }, 53 | "dependencies": {}, 54 | "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", 55 | "devDependencies": { 56 | "tap": "^7.1.0" 57 | }, 58 | "directories": {}, 59 | "dist": { 60 | "shasum": "633c2c83e3da42a502f52466022480f4208261de", 61 | "tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" 62 | }, 63 | "files": [ 64 | "inherits.js", 65 | "inherits_browser.js" 66 | ], 67 | "gitHead": "e05d0fb27c61a3ec687214f0476386b765364d5f", 68 | "homepage": "https://github.com/isaacs/inherits#readme", 69 | "keywords": [ 70 | "inheritance", 71 | "class", 72 | "klass", 73 | "oop", 74 | "object-oriented", 75 | "inherits", 76 | "browser", 77 | "browserify" 78 | ], 79 | "license": "ISC", 80 | "main": "./inherits.js", 81 | "maintainers": [ 82 | { 83 | "name": "isaacs", 84 | "email": "i@izs.me" 85 | } 86 | ], 87 | "name": "inherits", 88 | "optionalDependencies": {}, 89 | "readme": "ERROR: No README data found!", 90 | "repository": { 91 | "type": "git", 92 | "url": "git://github.com/isaacs/inherits.git" 93 | }, 94 | "scripts": { 95 | "test": "node test" 96 | }, 97 | "version": "2.0.3" 98 | } 99 | -------------------------------------------------------------------------------- /node_modules/jsonfile/.npmignore: -------------------------------------------------------------------------------- 1 | test/ 2 | .travis.yml -------------------------------------------------------------------------------- /node_modules/jsonfile/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012-2015, JP Richardson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files 6 | (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, 7 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 14 | OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 15 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/jsonfile/appveyor.yml: -------------------------------------------------------------------------------- 1 | # Test against this version of Node.js 2 | environment: 3 | matrix: 4 | # node.js 5 | - nodejs_version: "0.10" 6 | - nodejs_version: "0.12" 7 | - nodejs_version: "4" 8 | - nodejs_version: "5" 9 | - nodejs_version: "6" 10 | 11 | # Install scripts. (runs after repo cloning) 12 | install: 13 | # Get the latest stable version of Node.js or io.js 14 | - ps: Install-Product node $env:nodejs_version 15 | # install modules 16 | - npm config set loglevel warn 17 | - npm install --silent 18 | 19 | # Post-install test scripts. 20 | test_script: 21 | # Output useful info for debugging. 22 | - node --version 23 | - npm --version 24 | # run tests 25 | - npm test 26 | 27 | # Don't actually build. 28 | build: off 29 | -------------------------------------------------------------------------------- /node_modules/jsonfile/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "jsonfile@^2.1.0", 6 | "scope": null, 7 | "escapedName": "jsonfile", 8 | "name": "jsonfile", 9 | "rawSpec": "^2.1.0", 10 | "spec": ">=2.1.0 <3.0.0", 11 | "type": "range" 12 | }, 13 | "/data/plugins/music_service/volspotconnect/node_modules/fs-extra" 14 | ] 15 | ], 16 | "_from": "jsonfile@>=2.1.0 <3.0.0", 17 | "_id": "jsonfile@2.4.0", 18 | "_inCache": true, 19 | "_installable": true, 20 | "_location": "/jsonfile", 21 | "_nodeVersion": "6.1.0", 22 | "_npmOperationalInternal": { 23 | "host": "packages-12-west.internal.npmjs.com", 24 | "tmp": "tmp/jsonfile-2.4.0.tgz_1473989978270_0.6271681792568415" 25 | }, 26 | "_npmUser": { 27 | "name": "jprichardson", 28 | "email": "jprichardson@gmail.com" 29 | }, 30 | "_npmVersion": "3.8.6", 31 | "_phantomChildren": {}, 32 | "_requested": { 33 | "raw": "jsonfile@^2.1.0", 34 | "scope": null, 35 | "escapedName": "jsonfile", 36 | "name": "jsonfile", 37 | "rawSpec": "^2.1.0", 38 | "spec": ">=2.1.0 <3.0.0", 39 | "type": "range" 40 | }, 41 | "_requiredBy": [ 42 | "/fs-extra", 43 | "/v-conf/fs-extra" 44 | ], 45 | "_resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", 46 | "_shasum": "3736a2b428b87bbda0cc83b53fa3d633a35c2ae8", 47 | "_shrinkwrap": null, 48 | "_spec": "jsonfile@^2.1.0", 49 | "_where": "/data/plugins/music_service/volspotconnect/node_modules/fs-extra", 50 | "author": { 51 | "name": "JP Richardson", 52 | "email": "jprichardson@gmail.com" 53 | }, 54 | "bugs": { 55 | "url": "https://github.com/jprichardson/node-jsonfile/issues" 56 | }, 57 | "dependencies": { 58 | "graceful-fs": "^4.1.6" 59 | }, 60 | "description": "Easily read/write JSON files.", 61 | "devDependencies": { 62 | "mocha": "2.x", 63 | "mock-fs": "^3.8.0", 64 | "rimraf": "^2.4.0", 65 | "standard": "^6.0.8" 66 | }, 67 | "directories": {}, 68 | "dist": { 69 | "shasum": "3736a2b428b87bbda0cc83b53fa3d633a35c2ae8", 70 | "tarball": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz" 71 | }, 72 | "gitHead": "00b3983ac4aade79c64c7a8c2ced257078625c6d", 73 | "homepage": "https://github.com/jprichardson/node-jsonfile#readme", 74 | "keywords": [ 75 | "read", 76 | "write", 77 | "file", 78 | "json", 79 | "fs", 80 | "fs-extra" 81 | ], 82 | "license": "MIT", 83 | "main": "index.js", 84 | "maintainers": [ 85 | { 86 | "name": "jprichardson", 87 | "email": "jprichardson@gmail.com" 88 | } 89 | ], 90 | "name": "jsonfile", 91 | "optionalDependencies": { 92 | "graceful-fs": "^4.1.6" 93 | }, 94 | "readme": "ERROR: No README data found!", 95 | "repository": { 96 | "type": "git", 97 | "url": "git+ssh://git@github.com/jprichardson/node-jsonfile.git" 98 | }, 99 | "scripts": { 100 | "lint": "standard", 101 | "test": "npm run lint && npm run unit", 102 | "unit": "mocha" 103 | }, 104 | "version": "2.4.0" 105 | } 106 | -------------------------------------------------------------------------------- /node_modules/kew/.npmignore: -------------------------------------------------------------------------------- 1 | lib-cov 2 | *.seed 3 | *.log 4 | *.csv 5 | *.dat 6 | *.out 7 | *.pid 8 | *.gz 9 | 10 | pids 11 | logs 12 | results 13 | 14 | node_modules 15 | npm-debug.log -------------------------------------------------------------------------------- /node_modules/kew/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.12" 4 | - "0.10" 5 | 6 | -------------------------------------------------------------------------------- /node_modules/kew/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "kew@^0.7.0", 6 | "scope": null, 7 | "escapedName": "kew", 8 | "name": "kew", 9 | "rawSpec": "^0.7.0", 10 | "spec": ">=0.7.0 <0.8.0", 11 | "type": "range" 12 | }, 13 | "/data/plugins/music_service/volspotconnect" 14 | ] 15 | ], 16 | "_from": "kew@>=0.7.0 <0.8.0", 17 | "_id": "kew@0.7.0", 18 | "_inCache": true, 19 | "_installable": true, 20 | "_location": "/kew", 21 | "_nodeVersion": "0.12.7", 22 | "_npmUser": { 23 | "name": "nicks", 24 | "email": "nicholas.j.santos@gmail.com" 25 | }, 26 | "_npmVersion": "2.11.3", 27 | "_phantomChildren": {}, 28 | "_requested": { 29 | "raw": "kew@^0.7.0", 30 | "scope": null, 31 | "escapedName": "kew", 32 | "name": "kew", 33 | "rawSpec": "^0.7.0", 34 | "spec": ">=0.7.0 <0.8.0", 35 | "type": "range" 36 | }, 37 | "_requiredBy": [ 38 | "/" 39 | ], 40 | "_resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz", 41 | "_shasum": "79d93d2d33363d6fdd2970b335d9141ad591d79b", 42 | "_shrinkwrap": null, 43 | "_spec": "kew@^0.7.0", 44 | "_where": "/data/plugins/music_service/volspotconnect", 45 | "authors": [ 46 | "Jeremy Stanley (https://github.com/azulus)", 47 | "Nick Santos ", 48 | "Xiao Ma " 49 | ], 50 | "bugs": { 51 | "url": "https://github.com/Medium/kew/issues" 52 | }, 53 | "contributors": [], 54 | "dependencies": {}, 55 | "description": "a lightweight promise library for node", 56 | "devDependencies": { 57 | "closure-npc": "0.1.5", 58 | "nodeunit": "0.9.0", 59 | "q": "0.9.7" 60 | }, 61 | "directories": {}, 62 | "dist": { 63 | "shasum": "79d93d2d33363d6fdd2970b335d9141ad591d79b", 64 | "tarball": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz" 65 | }, 66 | "gitHead": "5773bcb8e6c27b531e366cd247b83b8cbf7bc989", 67 | "homepage": "https://github.com/Medium/kew", 68 | "keywords": [ 69 | "kew", 70 | "promises" 71 | ], 72 | "license": "Apache-2.0", 73 | "main": "./kew.js", 74 | "maintainers": [ 75 | { 76 | "name": "azulus", 77 | "email": "npm@azulus.com" 78 | }, 79 | { 80 | "name": "nicks", 81 | "email": "nicholas.j.santos@gmail.com" 82 | }, 83 | { 84 | "name": "dpup", 85 | "email": "dan@pupi.us" 86 | }, 87 | { 88 | "name": "medium", 89 | "email": "npm@medium.com" 90 | }, 91 | { 92 | "name": "xiao", 93 | "email": "x@medium.com" 94 | }, 95 | { 96 | "name": "chaosgame", 97 | "email": "chaosgame@gmail.com" 98 | } 99 | ], 100 | "name": "kew", 101 | "optionalDependencies": {}, 102 | "readme": "ERROR: No README data found!", 103 | "repository": { 104 | "type": "git", 105 | "url": "git+https://github.com/Medium/kew.git" 106 | }, 107 | "scripts": { 108 | "test": "nodeunit test && closure-npc ./test/closure_test.js --jscomp_error=checkTypes" 109 | }, 110 | "version": "0.7.0" 111 | } 112 | -------------------------------------------------------------------------------- /node_modules/kew/test/context.js: -------------------------------------------------------------------------------- 1 | var Q = require('../kew') 2 | 3 | // test that contexts are propogated based on position 4 | exports.testContextWithDelay = function (test) { 5 | 6 | Q.resolve(true) 7 | .setContext({id: 1}) 8 | .then(function (val, context) { 9 | test.equal(context.id, 1, 'Should return the first context') 10 | return Q.delay(500) 11 | }) 12 | .setContext({id: 2}) 13 | .then(function (val, context) { 14 | test.equal(context.id, 2, 'Should return the second context') 15 | return Q.delay(500) 16 | }) 17 | .clearContext() 18 | .then(function (val, context) { 19 | test.equal(typeof context, 'undefined', 'Should return an undefined context') 20 | return Q.delay(500) 21 | }) 22 | .setContext({id: 3}) 23 | .fin(test.done) 24 | } 25 | 26 | // test adding and removing contexts 27 | exports.testGeneralContextFlow = function (test) { 28 | Q.resolve(true) 29 | // test no context exists 30 | .then(function (val, context) { 31 | test.equal(typeof context, 'undefined', 'Context should be undefined') 32 | throw new Error() 33 | }) 34 | .fail(function (e, context) { 35 | test.equal(typeof context, 'undefined', 'Context should be undefined') 36 | }) 37 | 38 | // set the context and mutate it 39 | .setContext({counter: 1}) 40 | .then(function (val, context) { 41 | test.equal(context.counter, 1, 'Counter should be 1') 42 | context.counter++ 43 | }) 44 | .then(function (val, context) { 45 | test.equal(context.counter, 2, 'Counter should be 2') 46 | context.counter++ 47 | throw new Error() 48 | }) 49 | .fail(function (e, context) { 50 | test.equal(context.counter, 3, 'Counter should be 3') 51 | }) 52 | 53 | // return a context 54 | .then(function (val, context) { 55 | return Q.resolve(false) 56 | .setContext({counter: 0}) 57 | }) 58 | .then(function (val, context) { 59 | test.equal(context.counter, 0, 'Counter should be 0') 60 | throw new Error() 61 | }) 62 | .fail(function (e, context) { 63 | test.equal(context.counter, 0, 'Counter should be 0') 64 | }) 65 | 66 | // returning a promise with a cleared context won't clear the parent context 67 | .then(function (val, context) { 68 | return Q.resolve(false).clearContext() 69 | }) 70 | .then(function (val, context) { 71 | test.equal(context.counter, 0, 'Counter should be 0') 72 | throw new Error() 73 | }) 74 | .fail(function (e, context) { 75 | test.equal(context.counter, 0, 'Counter should be 0') 76 | }) 77 | 78 | // test that clearing the context works 79 | .clearContext() 80 | .then(function (val, context) { 81 | test.equal(typeof context, 'undefined', 'Context should be undefined') 82 | throw new Error() 83 | }) 84 | .fail(function (e, context) { 85 | test.equal(typeof context, 'undefined', 'Context should be undefined') 86 | }) 87 | 88 | .fin(test.done) 89 | } -------------------------------------------------------------------------------- /node_modules/kew/test/defer.js: -------------------------------------------------------------------------------- 1 | var Q = require('../kew') 2 | 3 | // create a deferred which returns a promise 4 | exports.testDeferredResolve = function (test) { 5 | var val = "ok" 6 | var defer = Q.defer() 7 | 8 | defer.promise 9 | .then(function (data) { 10 | test.equal(data, val, "Promise successfully returned") 11 | test.done() 12 | }) 13 | 14 | setTimeout(function () { 15 | defer.resolve(val) 16 | }, 50) 17 | } 18 | 19 | // make sure a deferred can only resolve once 20 | exports.testDeferredResolveOnce = function (test) { 21 | var defer = Q.defer() 22 | 23 | try { 24 | defer.resolve(true) 25 | defer.resolve(true) 26 | test.fail("Unable to resolve the same deferred twice") 27 | } catch (e) { 28 | } 29 | 30 | test.done() 31 | } 32 | 33 | // create a deferred which returns a failed promise 34 | exports.testDeferredReject = function (test) { 35 | var err = new Error("hello") 36 | var defer = Q.defer() 37 | 38 | defer.promise 39 | .fail(function (e) { 40 | test.equal(e, err, "Promise successfully failed") 41 | test.done() 42 | }) 43 | 44 | setTimeout(function () { 45 | defer.reject(err) 46 | }, 50) 47 | } 48 | 49 | // make sure a deferred can only reject once 50 | exports.testDeferredRejectOnce = function (test) { 51 | var defer = Q.defer() 52 | 53 | try { 54 | defer.reject(new Error("nope 1")) 55 | defer.reject(new Error("nope 2")) 56 | test.fail("Unable to reject the same deferred twice") 57 | } catch (e) { 58 | } 59 | 60 | test.done() 61 | } 62 | 63 | // make sure a deferred can only reject once 64 | exports.testDeferAndRejectFail = function (test) { 65 | var defer 66 | 67 | try { 68 | defer = Q.defer() 69 | defer.reject(new Error("nope 1")) 70 | defer.resolve(true) 71 | test.fail("Unable to reject and resolve the same deferred") 72 | } catch (e) { 73 | test.ok(true, "Unable to reject and resolve same deferred") 74 | } 75 | 76 | try { 77 | defer = Q.defer() 78 | defer.resolve(true) 79 | defer.reject(new Error("nope 1")) 80 | test.fail("Unable to reject and resolve the same deferred") 81 | } catch (e) { 82 | test.ok(true, "Unable to reject and resolve same deferred") 83 | } 84 | 85 | test.done() 86 | } 87 | 88 | // create a deferred which resolves with a node-standard callback 89 | exports.testDeferredResolverSuccess = function (test) { 90 | var val = "ok" 91 | var defer = Q.defer() 92 | var callback = defer.makeNodeResolver() 93 | 94 | defer.promise 95 | .then(function (data) { 96 | test.equal(data, val, "Promise successfully returned") 97 | test.done() 98 | }) 99 | 100 | setTimeout(function () { 101 | callback(null, val) 102 | }, 50) 103 | } 104 | 105 | // create a deferred which rejects with a node-standard callback 106 | exports.testDeferredResolverSuccess = function (test) { 107 | var err = new Error("hello") 108 | var defer = Q.defer() 109 | var callback = defer.makeNodeResolver() 110 | 111 | defer.promise 112 | .fail(function (e) { 113 | test.equal(e, err, "Promise successfully failed") 114 | test.done() 115 | }) 116 | 117 | setTimeout(function () { 118 | callback(err) 119 | }, 50) 120 | } -------------------------------------------------------------------------------- /node_modules/kew/test/externs_node.js: -------------------------------------------------------------------------------- 1 | /* Node externs for Closure Compiler (just enough for kew.js). */ 2 | 3 | /** @const */ 4 | var module = {}; 5 | 6 | /** @const */ 7 | var process = {}; 8 | /** @param {function()} callback */ 9 | process.nextTick = function (callback) {}; 10 | -------------------------------------------------------------------------------- /node_modules/kew/test/later.js: -------------------------------------------------------------------------------- 1 | var Q = require('../kew') 2 | 3 | function synchronous (callback) { 4 | callback() 5 | } 6 | 7 | var asynchronous = Q.getNextTickFunction() 8 | 9 | exports.testAsynchronousSynchronous = function (test) { 10 | Q.setNextTickFunction(synchronous) 11 | 12 | var number = 5 13 | 14 | Q.resolve(true).then(function () { 15 | number = 6 16 | }) 17 | test.equals(number, 6, 'Q should resolve synchronously') 18 | 19 | Q.setNextTickFunction(asynchronous) 20 | 21 | Q.resolve(true).then(function () { 22 | number = 7 23 | }) 24 | test.equals(number, 6, 'Q should resolve asynchronously') 25 | test.done() 26 | } 27 | 28 | exports.testSetImmediate = function (test) { 29 | if (typeof setImmediate == 'undefined') { 30 | test.done() 31 | return 32 | } 33 | 34 | Q.setNextTickFunction(setImmediate) 35 | 36 | var number = 5 37 | Q.resolve(true).then(function () { 38 | number = 6 39 | }) 40 | test.equals(number, 5, 'Q should resolve asynchronously') 41 | setImmediate(function () { 42 | test.equals(number, 6, 'Q should schedule _successFn synchronously') 43 | test.done() 44 | }) 45 | } 46 | -------------------------------------------------------------------------------- /node_modules/kew/test/scopes.js: -------------------------------------------------------------------------------- 1 | var Q = require('../kew') 2 | 3 | exports.testThen = function (test) { 4 | var detectedScope = null 5 | Q.resolve(true).then(function () { 6 | detectedScope = this 7 | }).then(function () { 8 | test.ok(Q.isPromise(detectedScope), 'then() should be called in context of promise') 9 | test.done() 10 | }) 11 | } 12 | 13 | exports.testFail = function (test) { 14 | var detectedScope = null 15 | Q.reject(new Error()).fail(function () { 16 | detectedScope = this 17 | }).then(function () { 18 | test.ok(Q.isPromise(detectedScope), 'fail() should be called in context of promise') 19 | test.done() 20 | }) 21 | } 22 | 23 | exports.testThenBound = function (test) { 24 | var detectedScope = scope 25 | var scope = {} 26 | Q.resolve(true).thenBound(function () { 27 | detectedScope = scope 28 | }, scope).then(function () { 29 | test.ok(detectedScope === scope, 'thenScoped() should be called in context of scope') 30 | test.done() 31 | }) 32 | } 33 | 34 | exports.testFailBound = function (test) { 35 | var detectedScope = scope 36 | var scope = {} 37 | Q.reject(new Error()).failBound(function () { 38 | detectedScope = scope 39 | }, scope).then(function () { 40 | test.equal(detectedScope, scope, 'failBound() should be called in context of scope') 41 | test.done() 42 | }) 43 | } 44 | 45 | exports.testThenBoundWithArgs = function (test) { 46 | var detectedScope = scope 47 | var scope = {} 48 | Q.resolve(-1).thenBound(function (a, b, c, d) { 49 | test.equal(a, 1) 50 | test.equal(b, 2) 51 | test.equal(c, 3) 52 | test.equal(d, -1) 53 | detectedScope = scope 54 | }, scope, 1, 2, 3).then(function () { 55 | test.ok(detectedScope === scope, 'failScoped() should be called in context of scope') 56 | test.done() 57 | }) 58 | } 59 | 60 | -------------------------------------------------------------------------------- /node_modules/kew/test/spread.js: -------------------------------------------------------------------------------- 1 | var Q = require('../kew') 2 | 3 | exports.testSpreadStatic = function (test) { 4 | Q.spread([Q.resolve('a'), 'b'], function (a, b) { 5 | test.equal('a', a) 6 | test.equal('b', b) 7 | test.done() 8 | }) 9 | } 10 | 11 | exports.testSpreadMethod = function (test) { 12 | Q.resolve(true) 13 | .then(function () { 14 | return ['a', 'b'] 15 | }) 16 | .spread(function (a, b) { 17 | test.equal('a', a) 18 | test.equal('b', b) 19 | test.done() 20 | }) 21 | } 22 | 23 | exports.testSpreadBoundMethod = function (test) { 24 | Q.resolve(true) 25 | .then(function () { 26 | return [Q.resolve('a'), 'b'] 27 | }) 28 | .spreadBound(function (c, a, b) { 29 | test.equal('scope', this.scope) 30 | test.equal('c', c) 31 | test.equal('a', a) 32 | test.equal('b', b) 33 | test.done() 34 | }, {scope: 'scope'}, 'c') 35 | } 36 | 37 | exports.testAllSynchronization1 = function (test) { 38 | var order = [] 39 | Q.resolve(true) 40 | .then(function () { 41 | var promiseA = Q.fcall(function () { 42 | order.push('a') 43 | }) 44 | var promiseB = Q.fcall(function () { 45 | order.push('b') 46 | }) 47 | 48 | test.deepEqual([], order) 49 | 50 | var promiseAB = Q.all([promiseA, promiseB]) 51 | test.deepEqual([], order) 52 | 53 | return [promiseA, promiseB] 54 | }) 55 | .then(function (results) { 56 | test.deepEqual(['a', 'b'], order) 57 | test.done() 58 | }) 59 | } 60 | -------------------------------------------------------------------------------- /node_modules/klaw/.npmignore: -------------------------------------------------------------------------------- 1 | tests/ 2 | appveyor.yml 3 | .travis.yml 4 | -------------------------------------------------------------------------------- /node_modules/klaw/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 1.3.0 / 2016-06-09 2 | ------------------ 3 | ### Added 4 | - `filter` option to pre-filter and not walk directories. 5 | 6 | 1.2.0 / 2016-04-16 7 | ------------------ 8 | - added support for custom `fs` implementation. Useful for https://github.com/tschaub/mock-fs 9 | 10 | 1.1.3 / 2015-12-23 11 | ------------------ 12 | - bugfix: if `readdir` error, got hung up. See: https://github.com/jprichardson/node-klaw/issues/1 13 | 14 | 1.1.2 / 2015-11-12 15 | ------------------ 16 | - assert that param `dir` is a `string` 17 | 18 | 1.1.1 / 2015-10-25 19 | ------------------ 20 | - bug fix, options not being passed 21 | 22 | 1.1.0 / 2015-10-25 23 | ------------------ 24 | - added `queueMethod` and `pathSorter` to `options` to affect searching strategy. 25 | 26 | 1.0.0 / 2015-10-25 27 | ------------------ 28 | - removed unused `filter` param 29 | - bugfix: always set `streamOptions` to `objectMode` 30 | - simplified, converted from push mode (streams 1) to proper pull mode (streams 3) 31 | 32 | 0.1.0 / 2015-10-25 33 | ------------------ 34 | - initial release 35 | -------------------------------------------------------------------------------- /node_modules/klaw/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2015-2016 JP Richardson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files 6 | (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, 7 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 14 | OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 15 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/klaw/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "klaw@^1.0.0", 6 | "scope": null, 7 | "escapedName": "klaw", 8 | "name": "klaw", 9 | "rawSpec": "^1.0.0", 10 | "spec": ">=1.0.0 <2.0.0", 11 | "type": "range" 12 | }, 13 | "/data/plugins/music_service/volspotconnect/node_modules/fs-extra" 14 | ] 15 | ], 16 | "_from": "klaw@>=1.0.0 <2.0.0", 17 | "_id": "klaw@1.3.0", 18 | "_inCache": true, 19 | "_installable": true, 20 | "_location": "/klaw", 21 | "_nodeVersion": "5.3.0", 22 | "_npmOperationalInternal": { 23 | "host": "packages-12-west.internal.npmjs.com", 24 | "tmp": "tmp/klaw-1.3.0.tgz_1465471482762_0.7382311346009374" 25 | }, 26 | "_npmUser": { 27 | "name": "jprichardson", 28 | "email": "jprichardson@gmail.com" 29 | }, 30 | "_npmVersion": "3.5.4", 31 | "_phantomChildren": {}, 32 | "_requested": { 33 | "raw": "klaw@^1.0.0", 34 | "scope": null, 35 | "escapedName": "klaw", 36 | "name": "klaw", 37 | "rawSpec": "^1.0.0", 38 | "spec": ">=1.0.0 <2.0.0", 39 | "type": "range" 40 | }, 41 | "_requiredBy": [ 42 | "/fs-extra" 43 | ], 44 | "_resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.0.tgz", 45 | "_shasum": "8857bfbc1d824badf13d3d0241d8bbe46fb12f73", 46 | "_shrinkwrap": null, 47 | "_spec": "klaw@^1.0.0", 48 | "_where": "/data/plugins/music_service/volspotconnect/node_modules/fs-extra", 49 | "author": { 50 | "name": "JP Richardson" 51 | }, 52 | "bugs": { 53 | "url": "https://github.com/jprichardson/node-klaw/issues" 54 | }, 55 | "dependencies": {}, 56 | "description": "File system walker with Readable stream interface.", 57 | "devDependencies": { 58 | "mkdirp": "^0.5.1", 59 | "mock-fs": "^3.8.0", 60 | "rimraf": "^2.4.3", 61 | "standard": "^5.3.1", 62 | "tap-spec": "^4.1.1", 63 | "tape": "^4.2.2" 64 | }, 65 | "directories": {}, 66 | "dist": { 67 | "shasum": "8857bfbc1d824badf13d3d0241d8bbe46fb12f73", 68 | "tarball": "https://registry.npmjs.org/klaw/-/klaw-1.3.0.tgz" 69 | }, 70 | "gitHead": "26645107af1fe05ee9ec9446eeca619dcbe0ff29", 71 | "homepage": "https://github.com/jprichardson/node-klaw#readme", 72 | "keywords": [ 73 | "walk", 74 | "walker", 75 | "fs", 76 | "fs-extra", 77 | "readable", 78 | "streams" 79 | ], 80 | "license": "MIT", 81 | "main": "./src/index.js", 82 | "maintainers": [ 83 | { 84 | "name": "jprichardson", 85 | "email": "jprichardson@gmail.com" 86 | } 87 | ], 88 | "name": "klaw", 89 | "optionalDependencies": {}, 90 | "readme": "ERROR: No README data found!", 91 | "repository": { 92 | "type": "git", 93 | "url": "git+https://github.com/jprichardson/node-klaw.git" 94 | }, 95 | "scripts": { 96 | "lint": "standard", 97 | "test": "npm run lint && npm run unit", 98 | "unit": "tape tests/**/*.js | tap-spec" 99 | }, 100 | "version": "1.3.0" 101 | } 102 | -------------------------------------------------------------------------------- /node_modules/klaw/src/assign.js: -------------------------------------------------------------------------------- 1 | // simple mutable assign (extracted from fs-extra) 2 | // I really like object-assign package, but I wanted a lean package with zero deps 3 | function _assign () { 4 | var args = [].slice.call(arguments).filter(function (i) { return i }) 5 | var dest = args.shift() 6 | args.forEach(function (src) { 7 | Object.keys(src).forEach(function (key) { 8 | dest[key] = src[key] 9 | }) 10 | }) 11 | 12 | return dest 13 | } 14 | 15 | // thank you baby Jesus for Node v4 and Object.assign 16 | module.exports = Object.assign || _assign 17 | -------------------------------------------------------------------------------- /node_modules/klaw/src/index.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert') 2 | var fs = require('fs') 3 | var path = require('path') 4 | var Readable = require('stream').Readable 5 | var util = require('util') 6 | var assign = require('./assign') 7 | 8 | function Walker (dir, options) { 9 | assert.strictEqual(typeof dir, 'string', '`dir` parameter should be of type string. Got type: ' + typeof dir) 10 | var defaultStreamOptions = { objectMode: true } 11 | var defaultOpts = { queueMethod: 'shift', pathSorter: undefined, filter: undefined } 12 | options = assign(defaultOpts, options, defaultStreamOptions) 13 | 14 | Readable.call(this, options) 15 | this.root = path.resolve(dir) 16 | this.paths = [this.root] 17 | this.options = options 18 | this.fs = options.fs || fs // mock-fs 19 | } 20 | util.inherits(Walker, Readable) 21 | 22 | Walker.prototype._read = function () { 23 | if (this.paths.length === 0) return this.push(null) 24 | var self = this 25 | var pathItem = this.paths[this.options.queueMethod]() 26 | 27 | self.fs.lstat(pathItem, function (err, stats) { 28 | var item = { path: pathItem, stats: stats } 29 | if (err) return self.emit('error', err, item) 30 | if (!stats.isDirectory()) return self.push(item) 31 | 32 | self.fs.readdir(pathItem, function (err, pathItems) { 33 | if (err) { 34 | self.push(item) 35 | return self.emit('error', err, item) 36 | } 37 | 38 | pathItems = pathItems.map(function (part) { return path.join(pathItem, part) }) 39 | if (self.options.filter) pathItems = pathItems.filter(self.options.filter) 40 | if (self.options.pathSorter) pathItems.sort(self.options.pathSorter) 41 | pathItems.forEach(function (pi) { self.paths.push(pi) }) 42 | 43 | self.push(item) 44 | }) 45 | }) 46 | } 47 | 48 | function walk (root, options) { 49 | return new Walker(root, options) 50 | } 51 | 52 | module.exports = walk 53 | -------------------------------------------------------------------------------- /node_modules/minimatch/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/minimatch/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "minimatch@^3.0.2", 6 | "scope": null, 7 | "escapedName": "minimatch", 8 | "name": "minimatch", 9 | "rawSpec": "^3.0.2", 10 | "spec": ">=3.0.2 <4.0.0", 11 | "type": "range" 12 | }, 13 | "/data/plugins/music_service/volspotconnect/node_modules/glob" 14 | ] 15 | ], 16 | "_from": "minimatch@>=3.0.2 <4.0.0", 17 | "_id": "minimatch@3.0.3", 18 | "_inCache": true, 19 | "_installable": true, 20 | "_location": "/minimatch", 21 | "_nodeVersion": "4.4.4", 22 | "_npmOperationalInternal": { 23 | "host": "packages-12-west.internal.npmjs.com", 24 | "tmp": "tmp/minimatch-3.0.3.tgz_1470678322731_0.1892083385027945" 25 | }, 26 | "_npmUser": { 27 | "name": "isaacs", 28 | "email": "i@izs.me" 29 | }, 30 | "_npmVersion": "3.10.6", 31 | "_phantomChildren": {}, 32 | "_requested": { 33 | "raw": "minimatch@^3.0.2", 34 | "scope": null, 35 | "escapedName": "minimatch", 36 | "name": "minimatch", 37 | "rawSpec": "^3.0.2", 38 | "spec": ">=3.0.2 <4.0.0", 39 | "type": "range" 40 | }, 41 | "_requiredBy": [ 42 | "/glob" 43 | ], 44 | "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", 45 | "_shasum": "2a4e4090b96b2db06a9d7df01055a62a77c9b774", 46 | "_shrinkwrap": null, 47 | "_spec": "minimatch@^3.0.2", 48 | "_where": "/data/plugins/music_service/volspotconnect/node_modules/glob", 49 | "author": { 50 | "name": "Isaac Z. Schlueter", 51 | "email": "i@izs.me", 52 | "url": "http://blog.izs.me" 53 | }, 54 | "bugs": { 55 | "url": "https://github.com/isaacs/minimatch/issues" 56 | }, 57 | "dependencies": { 58 | "brace-expansion": "^1.0.0" 59 | }, 60 | "description": "a glob matcher in javascript", 61 | "devDependencies": { 62 | "standard": "^3.7.2", 63 | "tap": "^5.6.0" 64 | }, 65 | "directories": {}, 66 | "dist": { 67 | "shasum": "2a4e4090b96b2db06a9d7df01055a62a77c9b774", 68 | "tarball": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz" 69 | }, 70 | "engines": { 71 | "node": "*" 72 | }, 73 | "files": [ 74 | "minimatch.js" 75 | ], 76 | "gitHead": "eed89491bd4a4e6bc463aac0dfb5c29ef0d1dc13", 77 | "homepage": "https://github.com/isaacs/minimatch#readme", 78 | "license": "ISC", 79 | "main": "minimatch.js", 80 | "maintainers": [ 81 | { 82 | "name": "isaacs", 83 | "email": "i@izs.me" 84 | } 85 | ], 86 | "name": "minimatch", 87 | "optionalDependencies": {}, 88 | "readme": "ERROR: No README data found!", 89 | "repository": { 90 | "type": "git", 91 | "url": "git://github.com/isaacs/minimatch.git" 92 | }, 93 | "scripts": { 94 | "posttest": "standard minimatch.js test/*.js", 95 | "test": "tap test/*.js" 96 | }, 97 | "version": "3.0.3" 98 | } 99 | -------------------------------------------------------------------------------- /node_modules/multimap/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "passfail" : false, 3 | "maxerr" : 20, 4 | "browser" : false, 5 | "node" : true, 6 | "debug" : false, 7 | "devel" : true, 8 | "es5" : false, 9 | "strict" : false, 10 | "globalstrict" : false, 11 | "asi" : false, 12 | "laxbreak" : false, 13 | "bitwise" : false, 14 | "boss" : true, 15 | "curly" : false, 16 | "eqeqeq" : false, 17 | "eqnull" : false, 18 | "evil" : true, 19 | "expr" : true, 20 | "forin" : false, 21 | "immed" : true, 22 | "latedef" : false, 23 | "loopfunc" : true, 24 | "noarg" : true, 25 | "regexp" : true, 26 | "regexdash" : false, 27 | "scripturl" : true, 28 | "shadow" : true, 29 | "supernew" : false, 30 | "undef" : false, 31 | "newcap" : false, 32 | "proto" : true, 33 | "noempty" : true, 34 | "nonew" : false, 35 | "nomen" : false, 36 | "onevar" : false, 37 | "plusplus" : false, 38 | "sub" : false, 39 | "trailing" : false, 40 | "white" : false 41 | } -------------------------------------------------------------------------------- /node_modules/multimap/.npmignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | *.log 4 | -------------------------------------------------------------------------------- /node_modules/multimap/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" 4 | - "0.11" 5 | 6 | script: npm run test -------------------------------------------------------------------------------- /node_modules/multimap/README.md: -------------------------------------------------------------------------------- 1 | # Multimap - Map which Allow Multiple Values for the same Key 2 | 3 | [![NPM version](https://badge.fury.io/js/multimap.svg)](http://badge.fury.io/js/multimap) 4 | [![Build Status](https://travis-ci.org/villadora/multi-map.png?branch=master)](https://travis-ci.org/villadora/multi-map) 5 | 6 | ## Install 7 | 8 | ```bash 9 | npm install multimap --save 10 | ``` 11 | 12 | ## Usage 13 | 14 | 15 | If you'd like to use native version when it exists and fallback to polyfill if it doesn't, but without implementing `Map` on global scope, do: 16 | 17 | ```javascript 18 | var Multimap = require('multimap'); 19 | var m = new Multimap(); 20 | ``` 21 | 22 | If the global es6 `Map` exists or `Multimap.Map` is set, `Multimap` will use the `Map` as inner store, that means Object can be used as key. 23 | 24 | ```javascript 25 | var Multimap = require('multimap'); 26 | 27 | // if harmony is on 28 | /* nothing need to do */ 29 | // or if you are using es6-shim 30 | Multimap.Map = ShimMap; 31 | 32 | var m = new Multimap(); 33 | var key = {}; 34 | m.set(key, 'one'); 35 | 36 | ``` 37 | 38 | Otherwise, an object will be used, all the keys will be transformed into string. 39 | 40 | 41 | ### In Modern Browser 42 | 43 | Just download the `index.js` as `Multimap.js`. 44 | 45 | ``` 46 | 47 | 52 | ``` 53 | 54 | Or use as an AMD loader: 55 | 56 | ``` 57 | require(['./Multimap.js'], function (Multimap) { 58 | var map = new Multimap([['a', 1], ['b', 2], ['c', 3]]); 59 | map = map.set('b', 20); 60 | map.get('b'); // [2, 20] 61 | }); 62 | ``` 63 | 64 | * Browsers should support `Object.defineProperty` and `Array.prototype.forEach`. 65 | 66 | 67 | ## API 68 | 69 | Following shows how to use `Multimap`: 70 | 71 | ```javascript 72 | var Multimap = require('multimap'); 73 | 74 | var map = new Multimap([['a', 'one'], ['b', 1], ['a', 'two'], ['b', 2]]); 75 | 76 | map.size; // 4 77 | 78 | map.get('a'); // ['one', 'two'] 79 | map.get('b'); // [1, 2] 80 | 81 | map.has('a'); // true 82 | map.has('foo'); // false 83 | 84 | map.has('a', 'one'); // true 85 | map.has('b', 3); // false 86 | 87 | map.set('a', 'three'); 88 | map.size; // 5 89 | map.get('a'); // ['one', 'two', 'three'] 90 | 91 | map.set('b', 3, 4); 92 | map.size; // 7 93 | 94 | map.delete('a', 'three'); // true 95 | map.delete('x'); // false 96 | map.delete('a', 'four'); // false 97 | map.delete('b'); // true 98 | 99 | map.size; // 2 100 | 101 | map.set('b', 1, 2); 102 | map.size; // 4 103 | 104 | 105 | map.forEach(function (value, key) { 106 | // iterates { 'one', 'a' }, { 'two', 'a' }, { 1, b }, { 2, 'b' } 107 | }); 108 | 109 | map.forEachEntry(function (entry, key) { 110 | // iterates {['one', 'two'], 'a' }, {[1, 2], 'b' } 111 | }); 112 | 113 | 114 | var keys = map.keys(); // iterator with ['a', 'b'] 115 | keys.next().value; // 'a' 116 | var values = map.values(); // iterator ['one', 'two', 1, 2] 117 | 118 | map.clear(); // undefined 119 | map.size; // 0 120 | ``` 121 | 122 | 123 | 124 | 125 | ## License 126 | 127 | (The MIT License) 128 | 129 | Copyright (c) 2013, Villa.Gao ; 130 | All rights reserved. 131 | -------------------------------------------------------------------------------- /node_modules/multimap/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "multimap@1.0.1", 6 | "scope": null, 7 | "escapedName": "multimap", 8 | "name": "multimap", 9 | "rawSpec": "1.0.1", 10 | "spec": "1.0.1", 11 | "type": "version" 12 | }, 13 | "/data/plugins/music_service/volspotconnect/node_modules/v-conf" 14 | ] 15 | ], 16 | "_from": "multimap@1.0.1", 17 | "_id": "multimap@1.0.1", 18 | "_inCache": true, 19 | "_installable": true, 20 | "_location": "/multimap", 21 | "_nodeVersion": "2.3.4", 22 | "_npmUser": { 23 | "name": "korynunn", 24 | "email": "knunn187@gmail.com" 25 | }, 26 | "_npmVersion": "2.12.1", 27 | "_phantomChildren": {}, 28 | "_requested": { 29 | "raw": "multimap@1.0.1", 30 | "scope": null, 31 | "escapedName": "multimap", 32 | "name": "multimap", 33 | "rawSpec": "1.0.1", 34 | "spec": "1.0.1", 35 | "type": "version" 36 | }, 37 | "_requiredBy": [ 38 | "/v-conf" 39 | ], 40 | "_resolved": "https://registry.npmjs.org/multimap/-/multimap-1.0.1.tgz", 41 | "_shasum": "ff671441fd95f254ed75466a2f3121c04ed2cf5f", 42 | "_shrinkwrap": null, 43 | "_spec": "multimap@1.0.1", 44 | "_where": "/data/plugins/music_service/volspotconnect/node_modules/v-conf", 45 | "author": { 46 | "name": "villa.gao", 47 | "email": "jky239@gmail.com" 48 | }, 49 | "bugs": { 50 | "url": "https://github.com/villadora/multi-map/issues" 51 | }, 52 | "dependencies": {}, 53 | "description": "multi-map which allow multiple values for the same key", 54 | "devDependencies": { 55 | "chai": "~1.7.2", 56 | "es6-shim": "^0.13.0", 57 | "jshint": "~2.1.9" 58 | }, 59 | "directories": {}, 60 | "dist": { 61 | "shasum": "ff671441fd95f254ed75466a2f3121c04ed2cf5f", 62 | "tarball": "https://registry.npmjs.org/multimap/-/multimap-1.0.1.tgz" 63 | }, 64 | "gitHead": "2976c4cfb2db987952070538eca0d63ee16bb7ba", 65 | "homepage": "https://github.com/villadora/multi-map#readme", 66 | "keywords": [ 67 | "keys", 68 | "map", 69 | "multiple" 70 | ], 71 | "license": "MIT", 72 | "main": "index.js", 73 | "maintainers": [ 74 | { 75 | "name": "korynunn", 76 | "email": "knunn187@gmail.com" 77 | }, 78 | { 79 | "name": "villadora", 80 | "email": "jky239@gmail.com" 81 | } 82 | ], 83 | "name": "multimap", 84 | "optionalDependencies": {}, 85 | "readme": "ERROR: No README data found!", 86 | "repository": { 87 | "type": "git", 88 | "url": "git://github.com/villadora/multi-map.git" 89 | }, 90 | "scripts": { 91 | "lint": "jshint *.js test/*.js", 92 | "test": "npm run lint; node test/index.js;node test/es6map.js" 93 | }, 94 | "version": "1.0.1" 95 | } 96 | -------------------------------------------------------------------------------- /node_modules/multimap/test/es6map.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var assert = require('chai').assert; 4 | require('es6-shim'); 5 | 6 | var Multimap = require('..'); 7 | 8 | var map = new Multimap([ 9 | ['a', 'one'], 10 | ['b', 1], 11 | ['a', 'two'], 12 | ['b', 2] 13 | ]); 14 | 15 | assert.equal(map.size, 4); 16 | 17 | assert.equal(map.get('a').length, 2); 18 | assert.equal(map.get('a')[0], 'one'); // ['one', 'two'] 19 | assert.equal(map.get('a')[1], 'two'); // ['one', 'two'] 20 | 21 | assert.equal(map.get('b').length, 2); 22 | assert.equal(map.get('b')[0], 1); // [1, 2] 23 | assert.equal(map.get('b')[1], 2); // [1, 2] 24 | 25 | 26 | assert(map.has('a'), "map contains key 'a'"); 27 | assert(!map.has('foo'), "map does not contain key 'foo'"); 28 | 29 | assert(map.has('a', 'one'), "map contains entry 'a'=>'one'"); 30 | assert(!map.has('b', 3), "map does not contain entry 'b'=>3"); 31 | 32 | map.set('a', 'three'); 33 | 34 | assert.equal(map.size, 5); 35 | assert.equal(map.get('a').length, 3); // ['one', 'two', 'three'] 36 | 37 | map.set('b', 3, 4); 38 | assert.equal(map.size, 7); 39 | 40 | assert(map.delete('a', 'three'), "delete 'a'=>'three'"); 41 | assert.equal(map.size, 6); 42 | assert(!map.delete('x'), "empty 'x' for delete"); 43 | assert(!map.delete('a', 'four'), "no such entry 'a'=>'four'"); 44 | assert(map.delete('b'), "delete all 'b'"); 45 | 46 | assert.equal(map.size, 2); 47 | 48 | map.set('b', 1, 2); 49 | assert.equal(map.size, 4); // 4 50 | 51 | var cnt = 0; 52 | map.forEach(function(value, key) { 53 | // iterates { 'a', 'one' }, { 'a', 'two' }, { 'b', 1 }, { 'b', 2 } 54 | cnt++; 55 | assert(key == 'a' || key == 'b', "key must be either 'a' or 'b'"); 56 | }); 57 | 58 | assert.equal(cnt, 4); 59 | 60 | cnt = 0; 61 | map.forEachEntry(function(entry, key) { 62 | // iterates { 'a', ['one', 'two'] }, { 'b', [1, 2] } 63 | cnt++; 64 | assert(key == 'a' || key == 'b', "key must be either 'a' or 'b'"); 65 | assert.equal(entry.length, 2); 66 | }); 67 | 68 | assert.equal(cnt, 2); 69 | 70 | 71 | 72 | var keys = map.keys(); // ['a', 'b'] 73 | assert.equal(keys.next().value, 'a'); 74 | assert.equal(keys.next().value, 'b'); 75 | assert(keys.next().done); 76 | 77 | var values = map.values(); // ['one', 'two', 1, 2] 78 | assert.equal(values.next().value, 'one'); 79 | assert.equal(values.next().value, 'two'); 80 | assert.equal(values.next().value, 1); 81 | assert.equal(values.next().value, 2); 82 | assert(values.next().done); 83 | 84 | map.clear(); 85 | 86 | assert.equal(map.size, 0); 87 | -------------------------------------------------------------------------------- /node_modules/multimap/test/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var assert = require('chai').assert; 4 | var Multimap = require('..'); 5 | 6 | var map = new Multimap([ 7 | ['a', 'one'], 8 | ['b', 1], 9 | ['a', 'two'], 10 | ['b', 2] 11 | ]); 12 | 13 | assert.equal(map.size, 4); 14 | 15 | assert.equal(map.get('a').length, 2); 16 | assert.equal(map.get('a')[0], 'one'); // ['one', 'two'] 17 | assert.equal(map.get('a')[1], 'two'); // ['one', 'two'] 18 | 19 | assert.equal(map.get('b').length, 2); 20 | assert.equal(map.get('b')[0], 1); // [1, 2] 21 | assert.equal(map.get('b')[1], 2); // [1, 2] 22 | 23 | 24 | assert(map.has('a'), "map contains key 'a'"); 25 | assert(!map.has('foo'), "map does not contain key 'foo'"); 26 | 27 | assert(map.has('a', 'one'), "map contains entry 'a'=>'one'"); 28 | assert(!map.has('b', 3), "map does not contain entry 'b'=>3"); 29 | 30 | map.set('a', 'three'); 31 | 32 | assert.equal(map.size, 5); 33 | assert.equal(map.get('a').length, 3); // ['one', 'two', 'three'] 34 | 35 | map.set('b', 3, 4); 36 | assert.equal(map.size, 7); 37 | 38 | assert(map.delete('a', 'three'), "delete 'a'=>'three'"); 39 | assert.equal(map.size, 6); 40 | assert(!map.delete('x'), "empty 'x' for delete"); 41 | assert(!map.delete('a', 'four'), "no such entry 'a'=>'four'"); 42 | assert(map.delete('b'), "delete all 'b'"); 43 | 44 | assert.equal(map.size, 2); 45 | 46 | map.set('b', 1, 2); 47 | assert.equal(map.size, 4); // 4 48 | 49 | var cnt = 0; 50 | map.forEach(function(value, key) { 51 | // iterates { 'a', 'one' }, { 'a', 'two' }, { 'b', 1 }, { 'b', 2 } 52 | cnt++; 53 | assert(key == 'a' || key == 'b', "key must be either 'a' or 'b'"); 54 | }); 55 | 56 | assert.equal(cnt, 4); 57 | 58 | cnt = 0; 59 | map.forEachEntry(function(entry, key) { 60 | // iterates { 'a', ['one', 'two'] }, { 'b', [1, 2] } 61 | cnt++; 62 | assert(key == 'a' || key == 'b', "key must be either 'a' or 'b'"); 63 | assert.equal(entry.length, 2); 64 | }); 65 | 66 | assert.equal(cnt, 2); 67 | 68 | 69 | var keys = map.keys(); // ['a', 'b'] 70 | assert.equal(keys.next().value, 'a'); 71 | assert.equal(keys.next().value, 'b'); 72 | assert(keys.next().done); 73 | 74 | var values = map.values(); // ['one', 'two', 1, 2] 75 | assert.equal(values.next().value, 'one'); 76 | assert.equal(values.next().value, 'two'); 77 | assert.equal(values.next().value, 1); 78 | assert.equal(values.next().value, 2); 79 | assert(values.next().done); 80 | 81 | 82 | map.clear(); 83 | 84 | assert.equal(map.size, 0); 85 | -------------------------------------------------------------------------------- /node_modules/multimap/test/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | MultiMap Tests 4 | 5 | 6 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /node_modules/net/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2011 Sleepless Software Inc. All rights reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to 5 | deal in the Software without restriction, including without limitation the 6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | sell copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | IN THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /node_modules/net/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Saiyato/volumio-kodi-plugin/94ee8a3b7edc37765983c5acf805aa47c6d0a1cc/node_modules/net/README.md -------------------------------------------------------------------------------- /node_modules/net/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2013 Sleepless Software Inc. All rights reserved. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to 6 | deal in the Software without restriction, including without limitation the 7 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 8 | sell copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 20 | IN THE SOFTWARE. 21 | */ 22 | 23 | // yes, I know this seems stupid, but I have my reasons. 24 | 25 | var net = require("net") 26 | for(k in net) 27 | global[k] = net[k] 28 | 29 | -------------------------------------------------------------------------------- /node_modules/net/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "net@^1.0.2", 6 | "scope": null, 7 | "escapedName": "net", 8 | "name": "net", 9 | "rawSpec": "^1.0.2", 10 | "spec": ">=1.0.2 <2.0.0", 11 | "type": "range" 12 | }, 13 | "/data/plugins/music_service/volspotconnect" 14 | ] 15 | ], 16 | "_from": "net@>=1.0.2 <2.0.0", 17 | "_id": "net@1.0.2", 18 | "_inCache": true, 19 | "_installable": true, 20 | "_location": "/net", 21 | "_npmUser": { 22 | "name": "sleeplessinc", 23 | "email": "joe@sleepless.com" 24 | }, 25 | "_npmVersion": "1.2.11", 26 | "_phantomChildren": {}, 27 | "_requested": { 28 | "raw": "net@^1.0.2", 29 | "scope": null, 30 | "escapedName": "net", 31 | "name": "net", 32 | "rawSpec": "^1.0.2", 33 | "spec": ">=1.0.2 <2.0.0", 34 | "type": "range" 35 | }, 36 | "_requiredBy": [ 37 | "/" 38 | ], 39 | "_resolved": "https://registry.npmjs.org/net/-/net-1.0.2.tgz", 40 | "_shasum": "d1757ec9a7fb2371d83cf4755ce3e27e10829388", 41 | "_shrinkwrap": null, 42 | "_spec": "net@^1.0.2", 43 | "_where": "/data/plugins/music_service/volspotconnect", 44 | "author": { 45 | "name": "Joe Hitchens", 46 | "email": "joe@sleepless.com", 47 | "url": "sleepless.com" 48 | }, 49 | "bugs": { 50 | "url": "https://github.com/sleeplessinc/net/issues" 51 | }, 52 | "dependencies": {}, 53 | "description": "Globalizes the 'net' module functions", 54 | "devDependencies": {}, 55 | "directories": {}, 56 | "dist": { 57 | "shasum": "d1757ec9a7fb2371d83cf4755ce3e27e10829388", 58 | "tarball": "https://registry.npmjs.org/net/-/net-1.0.2.tgz" 59 | }, 60 | "homepage": "https://github.com/sleeplessinc/net#readme", 61 | "license": { 62 | "type": "MIT", 63 | "url": "https://github.com/sleeplessinc/net/raw/master/LICENSE" 64 | }, 65 | "maintainers": [ 66 | { 67 | "name": "sleeplessinc", 68 | "email": "joe@sleepless.com" 69 | } 70 | ], 71 | "name": "net", 72 | "optionalDependencies": {}, 73 | "readme": "ERROR: No README data found!", 74 | "repositories": [ 75 | { 76 | "type": "git", 77 | "url": "git+https://sleeplessinc@github.com/sleeplessinc/net.git" 78 | } 79 | ], 80 | "repository": { 81 | "type": "git", 82 | "url": "git+https://sleeplessinc@github.com/sleeplessinc/net.git" 83 | }, 84 | "version": "1.0.2" 85 | } 86 | -------------------------------------------------------------------------------- /node_modules/net/test.js: -------------------------------------------------------------------------------- 1 | 2 | var i = require("./index.js") 3 | 4 | console.log(Socket instanceof Function) 5 | 6 | 7 | -------------------------------------------------------------------------------- /node_modules/once/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/once/README.md: -------------------------------------------------------------------------------- 1 | # once 2 | 3 | Only call a function once. 4 | 5 | ## usage 6 | 7 | ```javascript 8 | var once = require('once') 9 | 10 | function load (file, cb) { 11 | cb = once(cb) 12 | loader.load('file') 13 | loader.once('load', cb) 14 | loader.once('error', cb) 15 | } 16 | ``` 17 | 18 | Or add to the Function.prototype in a responsible way: 19 | 20 | ```javascript 21 | // only has to be done once 22 | require('once').proto() 23 | 24 | function load (file, cb) { 25 | cb = cb.once() 26 | loader.load('file') 27 | loader.once('load', cb) 28 | loader.once('error', cb) 29 | } 30 | ``` 31 | 32 | Ironically, the prototype feature makes this module twice as 33 | complicated as necessary. 34 | 35 | To check whether you function has been called, use `fn.called`. Once the 36 | function is called for the first time the return value of the original 37 | function is saved in `fn.value` and subsequent calls will continue to 38 | return this value. 39 | 40 | ```javascript 41 | var once = require('once') 42 | 43 | function load (cb) { 44 | cb = once(cb) 45 | var stream = createStream() 46 | stream.once('data', cb) 47 | stream.once('end', function () { 48 | if (!cb.called) cb(new Error('not found')) 49 | }) 50 | } 51 | ``` 52 | 53 | ## `once.strict(func)` 54 | 55 | Throw an error if the function is called twice. 56 | 57 | Some functions are expected to be called only once. Using `once` for them would 58 | potentially hide logical errors. 59 | 60 | In the example below, the `greet` function has to call the callback only once: 61 | 62 | ```javascript 63 | function greet (name, cb) { 64 | // return is missing from the if statement 65 | // when no name is passed, the callback is called twice 66 | if (!name) cb('Hello anonymous') 67 | cb('Hello ' + name) 68 | } 69 | 70 | function log (msg) { 71 | console.log(msg) 72 | } 73 | 74 | // this will print 'Hello anonymous' but the logical error will be missed 75 | greet(null, once(msg)) 76 | 77 | // once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time 78 | greet(null, once.strict(msg)) 79 | ``` 80 | -------------------------------------------------------------------------------- /node_modules/once/once.js: -------------------------------------------------------------------------------- 1 | var wrappy = require('wrappy') 2 | module.exports = wrappy(once) 3 | module.exports.strict = wrappy(onceStrict) 4 | 5 | once.proto = once(function () { 6 | Object.defineProperty(Function.prototype, 'once', { 7 | value: function () { 8 | return once(this) 9 | }, 10 | configurable: true 11 | }) 12 | 13 | Object.defineProperty(Function.prototype, 'onceStrict', { 14 | value: function () { 15 | return onceStrict(this) 16 | }, 17 | configurable: true 18 | }) 19 | }) 20 | 21 | function once (fn) { 22 | var f = function () { 23 | if (f.called) return f.value 24 | f.called = true 25 | return f.value = fn.apply(this, arguments) 26 | } 27 | f.called = false 28 | return f 29 | } 30 | 31 | function onceStrict (fn) { 32 | var f = function () { 33 | if (f.called) 34 | throw new Error(f.onceError) 35 | f.called = true 36 | return f.value = fn.apply(this, arguments) 37 | } 38 | var name = fn.name || 'Function wrapped with `once`' 39 | f.onceError = name + " shouldn't be called more than once" 40 | f.called = false 41 | return f 42 | } 43 | -------------------------------------------------------------------------------- /node_modules/once/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "once@^1.3.0", 6 | "scope": null, 7 | "escapedName": "once", 8 | "name": "once", 9 | "rawSpec": "^1.3.0", 10 | "spec": ">=1.3.0 <2.0.0", 11 | "type": "range" 12 | }, 13 | "/data/plugins/music_service/volspotconnect/node_modules/glob" 14 | ] 15 | ], 16 | "_from": "once@>=1.3.0 <2.0.0", 17 | "_id": "once@1.4.0", 18 | "_inCache": true, 19 | "_installable": true, 20 | "_location": "/once", 21 | "_nodeVersion": "6.5.0", 22 | "_npmOperationalInternal": { 23 | "host": "packages-12-west.internal.npmjs.com", 24 | "tmp": "tmp/once-1.4.0.tgz_1473196269128_0.537820661207661" 25 | }, 26 | "_npmUser": { 27 | "name": "isaacs", 28 | "email": "i@izs.me" 29 | }, 30 | "_npmVersion": "3.10.7", 31 | "_phantomChildren": {}, 32 | "_requested": { 33 | "raw": "once@^1.3.0", 34 | "scope": null, 35 | "escapedName": "once", 36 | "name": "once", 37 | "rawSpec": "^1.3.0", 38 | "spec": ">=1.3.0 <2.0.0", 39 | "type": "range" 40 | }, 41 | "_requiredBy": [ 42 | "/glob", 43 | "/inflight" 44 | ], 45 | "_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 46 | "_shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1", 47 | "_shrinkwrap": null, 48 | "_spec": "once@^1.3.0", 49 | "_where": "/data/plugins/music_service/volspotconnect/node_modules/glob", 50 | "author": { 51 | "name": "Isaac Z. Schlueter", 52 | "email": "i@izs.me", 53 | "url": "http://blog.izs.me/" 54 | }, 55 | "bugs": { 56 | "url": "https://github.com/isaacs/once/issues" 57 | }, 58 | "dependencies": { 59 | "wrappy": "1" 60 | }, 61 | "description": "Run a function exactly one time", 62 | "devDependencies": { 63 | "tap": "^7.0.1" 64 | }, 65 | "directories": { 66 | "test": "test" 67 | }, 68 | "dist": { 69 | "shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1", 70 | "tarball": "https://registry.npmjs.org/once/-/once-1.4.0.tgz" 71 | }, 72 | "files": [ 73 | "once.js" 74 | ], 75 | "gitHead": "0e614d9f5a7e6f0305c625f6b581f6d80b33b8a6", 76 | "homepage": "https://github.com/isaacs/once#readme", 77 | "keywords": [ 78 | "once", 79 | "function", 80 | "one", 81 | "single" 82 | ], 83 | "license": "ISC", 84 | "main": "once.js", 85 | "maintainers": [ 86 | { 87 | "name": "isaacs", 88 | "email": "i@izs.me" 89 | } 90 | ], 91 | "name": "once", 92 | "optionalDependencies": {}, 93 | "readme": "ERROR: No README data found!", 94 | "repository": { 95 | "type": "git", 96 | "url": "git://github.com/isaacs/once.git" 97 | }, 98 | "scripts": { 99 | "test": "tap test/*.js" 100 | }, 101 | "version": "1.4.0" 102 | } 103 | -------------------------------------------------------------------------------- /node_modules/path-is-absolute/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function posix(path) { 4 | return path.charAt(0) === '/'; 5 | } 6 | 7 | function win32(path) { 8 | // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 9 | var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; 10 | var result = splitDeviceRe.exec(path); 11 | var device = result[1] || ''; 12 | var isUnc = Boolean(device && device.charAt(1) !== ':'); 13 | 14 | // UNC paths are always absolute 15 | return Boolean(result[2] || isUnc); 16 | } 17 | 18 | module.exports = process.platform === 'win32' ? win32 : posix; 19 | module.exports.posix = posix; 20 | module.exports.win32 = win32; 21 | -------------------------------------------------------------------------------- /node_modules/path-is-absolute/license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.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 13 | all 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 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/path-is-absolute/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "path-is-absolute@^1.0.0", 6 | "scope": null, 7 | "escapedName": "path-is-absolute", 8 | "name": "path-is-absolute", 9 | "rawSpec": "^1.0.0", 10 | "spec": ">=1.0.0 <2.0.0", 11 | "type": "range" 12 | }, 13 | "/data/plugins/music_service/volspotconnect/node_modules/fs-extra" 14 | ] 15 | ], 16 | "_from": "path-is-absolute@>=1.0.0 <2.0.0", 17 | "_id": "path-is-absolute@1.0.1", 18 | "_inCache": true, 19 | "_installable": true, 20 | "_location": "/path-is-absolute", 21 | "_nodeVersion": "6.6.0", 22 | "_npmOperationalInternal": { 23 | "host": "packages-12-west.internal.npmjs.com", 24 | "tmp": "tmp/path-is-absolute-1.0.1.tgz_1475210523565_0.9876507974695414" 25 | }, 26 | "_npmUser": { 27 | "name": "sindresorhus", 28 | "email": "sindresorhus@gmail.com" 29 | }, 30 | "_npmVersion": "3.10.3", 31 | "_phantomChildren": {}, 32 | "_requested": { 33 | "raw": "path-is-absolute@^1.0.0", 34 | "scope": null, 35 | "escapedName": "path-is-absolute", 36 | "name": "path-is-absolute", 37 | "rawSpec": "^1.0.0", 38 | "spec": ">=1.0.0 <2.0.0", 39 | "type": "range" 40 | }, 41 | "_requiredBy": [ 42 | "/fs-extra", 43 | "/glob", 44 | "/v-conf/fs-extra" 45 | ], 46 | "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 47 | "_shasum": "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f", 48 | "_shrinkwrap": null, 49 | "_spec": "path-is-absolute@^1.0.0", 50 | "_where": "/data/plugins/music_service/volspotconnect/node_modules/fs-extra", 51 | "author": { 52 | "name": "Sindre Sorhus", 53 | "email": "sindresorhus@gmail.com", 54 | "url": "sindresorhus.com" 55 | }, 56 | "bugs": { 57 | "url": "https://github.com/sindresorhus/path-is-absolute/issues" 58 | }, 59 | "dependencies": {}, 60 | "description": "Node.js 0.12 path.isAbsolute() ponyfill", 61 | "devDependencies": { 62 | "xo": "^0.16.0" 63 | }, 64 | "directories": {}, 65 | "dist": { 66 | "shasum": "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f", 67 | "tarball": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" 68 | }, 69 | "engines": { 70 | "node": ">=0.10.0" 71 | }, 72 | "files": [ 73 | "index.js" 74 | ], 75 | "gitHead": "edc91d348b21dac2ab65ea2fbec2868e2eff5eb6", 76 | "homepage": "https://github.com/sindresorhus/path-is-absolute#readme", 77 | "keywords": [ 78 | "path", 79 | "paths", 80 | "file", 81 | "dir", 82 | "absolute", 83 | "isabsolute", 84 | "is-absolute", 85 | "built-in", 86 | "util", 87 | "utils", 88 | "core", 89 | "ponyfill", 90 | "polyfill", 91 | "shim", 92 | "is", 93 | "detect", 94 | "check" 95 | ], 96 | "license": "MIT", 97 | "maintainers": [ 98 | { 99 | "name": "sindresorhus", 100 | "email": "sindresorhus@gmail.com" 101 | } 102 | ], 103 | "name": "path-is-absolute", 104 | "optionalDependencies": {}, 105 | "readme": "ERROR: No README data found!", 106 | "repository": { 107 | "type": "git", 108 | "url": "git+https://github.com/sindresorhus/path-is-absolute.git" 109 | }, 110 | "scripts": { 111 | "test": "xo && node test.js" 112 | }, 113 | "version": "1.0.1" 114 | } 115 | -------------------------------------------------------------------------------- /node_modules/path-is-absolute/readme.md: -------------------------------------------------------------------------------- 1 | # path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) 2 | 3 | > Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com) 4 | 5 | 6 | ## Install 7 | 8 | ``` 9 | $ npm install --save path-is-absolute 10 | ``` 11 | 12 | 13 | ## Usage 14 | 15 | ```js 16 | const pathIsAbsolute = require('path-is-absolute'); 17 | 18 | // Running on Linux 19 | pathIsAbsolute('/home/foo'); 20 | //=> true 21 | pathIsAbsolute('C:/Users/foo'); 22 | //=> false 23 | 24 | // Running on Windows 25 | pathIsAbsolute('C:/Users/foo'); 26 | //=> true 27 | pathIsAbsolute('/home/foo'); 28 | //=> false 29 | 30 | // Running on any OS 31 | pathIsAbsolute.posix('/home/foo'); 32 | //=> true 33 | pathIsAbsolute.posix('C:/Users/foo'); 34 | //=> false 35 | pathIsAbsolute.win32('C:/Users/foo'); 36 | //=> true 37 | pathIsAbsolute.win32('/home/foo'); 38 | //=> false 39 | ``` 40 | 41 | 42 | ## API 43 | 44 | See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). 45 | 46 | ### pathIsAbsolute(path) 47 | 48 | ### pathIsAbsolute.posix(path) 49 | 50 | POSIX specific version. 51 | 52 | ### pathIsAbsolute.win32(path) 53 | 54 | Windows specific version. 55 | 56 | 57 | ## License 58 | 59 | MIT © [Sindre Sorhus](https://sindresorhus.com) 60 | -------------------------------------------------------------------------------- /node_modules/rimraf/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/rimraf/bin.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var rimraf = require('./') 4 | 5 | var help = false 6 | var dashdash = false 7 | var args = process.argv.slice(2).filter(function(arg) { 8 | if (dashdash) 9 | return !!arg 10 | else if (arg === '--') 11 | dashdash = true 12 | else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) 13 | help = true 14 | else 15 | return !!arg 16 | }); 17 | 18 | if (help || args.length === 0) { 19 | // If they didn't ask for help, then this is not a "success" 20 | var log = help ? console.log : console.error 21 | log('Usage: rimraf [ ...]') 22 | log('') 23 | log(' Deletes all files and folders at "path" recursively.') 24 | log('') 25 | log('Options:') 26 | log('') 27 | log(' -h, --help Display this usage info') 28 | process.exit(help ? 0 : 1) 29 | } else 30 | go(0) 31 | 32 | function go (n) { 33 | if (n >= args.length) 34 | return 35 | rimraf(args[n], function (er) { 36 | if (er) 37 | throw er 38 | go(n+1) 39 | }) 40 | } 41 | -------------------------------------------------------------------------------- /node_modules/rimraf/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "rimraf@^2.2.8", 6 | "scope": null, 7 | "escapedName": "rimraf", 8 | "name": "rimraf", 9 | "rawSpec": "^2.2.8", 10 | "spec": ">=2.2.8 <3.0.0", 11 | "type": "range" 12 | }, 13 | "/data/plugins/music_service/volspotconnect/node_modules/fs-extra" 14 | ] 15 | ], 16 | "_from": "rimraf@>=2.2.8 <3.0.0", 17 | "_id": "rimraf@2.5.4", 18 | "_inCache": true, 19 | "_installable": true, 20 | "_location": "/rimraf", 21 | "_nodeVersion": "4.4.4", 22 | "_npmOperationalInternal": { 23 | "host": "packages-16-east.internal.npmjs.com", 24 | "tmp": "tmp/rimraf-2.5.4.tgz_1469206941888_0.8645927573088557" 25 | }, 26 | "_npmUser": { 27 | "name": "isaacs", 28 | "email": "i@izs.me" 29 | }, 30 | "_npmVersion": "3.10.6", 31 | "_phantomChildren": {}, 32 | "_requested": { 33 | "raw": "rimraf@^2.2.8", 34 | "scope": null, 35 | "escapedName": "rimraf", 36 | "name": "rimraf", 37 | "rawSpec": "^2.2.8", 38 | "spec": ">=2.2.8 <3.0.0", 39 | "type": "range" 40 | }, 41 | "_requiredBy": [ 42 | "/fs-extra", 43 | "/v-conf/fs-extra" 44 | ], 45 | "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz", 46 | "_shasum": "96800093cbf1a0c86bd95b4625467535c29dfa04", 47 | "_shrinkwrap": null, 48 | "_spec": "rimraf@^2.2.8", 49 | "_where": "/data/plugins/music_service/volspotconnect/node_modules/fs-extra", 50 | "author": { 51 | "name": "Isaac Z. Schlueter", 52 | "email": "i@izs.me", 53 | "url": "http://blog.izs.me/" 54 | }, 55 | "bin": { 56 | "rimraf": "./bin.js" 57 | }, 58 | "bugs": { 59 | "url": "https://github.com/isaacs/rimraf/issues" 60 | }, 61 | "dependencies": { 62 | "glob": "^7.0.5" 63 | }, 64 | "description": "A deep deletion module for node (like `rm -rf`)", 65 | "devDependencies": { 66 | "mkdirp": "^0.5.1", 67 | "tap": "^6.1.1" 68 | }, 69 | "directories": {}, 70 | "dist": { 71 | "shasum": "96800093cbf1a0c86bd95b4625467535c29dfa04", 72 | "tarball": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz" 73 | }, 74 | "files": [ 75 | "LICENSE", 76 | "README.md", 77 | "bin.js", 78 | "rimraf.js" 79 | ], 80 | "gitHead": "2af08bbbd0a03549b278414309dc5d8097699443", 81 | "homepage": "https://github.com/isaacs/rimraf#readme", 82 | "license": "ISC", 83 | "main": "rimraf.js", 84 | "maintainers": [ 85 | { 86 | "name": "isaacs", 87 | "email": "i@izs.me" 88 | } 89 | ], 90 | "name": "rimraf", 91 | "optionalDependencies": {}, 92 | "readme": "ERROR: No README data found!", 93 | "repository": { 94 | "type": "git", 95 | "url": "git://github.com/isaacs/rimraf.git" 96 | }, 97 | "scripts": { 98 | "test": "tap test/*.js" 99 | }, 100 | "version": "2.5.4" 101 | } 102 | -------------------------------------------------------------------------------- /node_modules/v-conf/.npmignore: -------------------------------------------------------------------------------- 1 | .idea 2 | node_modules 3 | -------------------------------------------------------------------------------- /node_modules/v-conf/configTest.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by massi on 27/07/15. 3 | */ 4 | var config=new (require(__dirname+'/index.js'))(); 5 | var configB=new (require(__dirname+'/index.js'))(); 6 | 7 | 8 | config.loadFile(__dirname+'/testConfig.json'); 9 | 10 | console.log(config.get("callback.b")); 11 | config.set("callback.b","ACCITUA"); 12 | config.save(); 13 | configB.loadFile(__dirname+'/testConfig.json'); 14 | console.log("THIS SHOULD BE DIFFERENT FROM BBB "+config.get("callback.b")); 15 | console.log("THIS SHOULD BE DIFFERENT FROM BBB "+configB.get("callback.b")); 16 | 17 | 18 | 19 | console.log("KEYS: "+config.getKeys()); 20 | console.log("KEYS: "+config.getKeys('keys')); 21 | 22 | var keys=config.getKeys('keys.fifth'); 23 | console.log("KEYS: "+keys); 24 | 25 | for( var i in keys) 26 | console.log(keys[i]); 27 | 28 | console.log("VALUE "+config.get('debug')); 29 | console.log("VALUE "+config.get('env')); 30 | console.log("VALUE "+config.get('structured.a')); 31 | console.log("VALUE "+config.get('structured.b')); 32 | 33 | config.set('debug',true); 34 | config.set('env',"PRODUCTION"); 35 | config.set('structured.a',500); 36 | config.set('structured.b',1000); 37 | 38 | console.log("VALUE "+config.get('debug')); 39 | console.log("VALUE "+config.get('env')); 40 | console.log("VALUE "+config.get('structured.a')); 41 | console.log("VALUE "+config.get('structured.b')); 42 | 43 | 44 | 45 | console.log("VALUE "+config.get('music_services.dirble.enabled')); 46 | config.addConfigValue('music_services.dirble.enabled','boolean',false); 47 | console.log("VALUE "+config.get('music_services.dirble.enabled')); 48 | 49 | 50 | console.log("THIS VALUE SHALL BE FALSE: "+config.has('not.existing.key')); 51 | config.delete('delete.fifth.sub-key-1'); 52 | console.log("VALUE "+config.get('delete.fifth.sub-key-2')); 53 | 54 | config.print(); 55 | 56 | 57 | 58 | 59 | 60 | config.registerCallback('callback.a',function(value) 61 | { 62 | console.log("This is callabck A #1. New value is "+value); 63 | }); 64 | 65 | config.registerCallback('callback.b',function(value) 66 | { 67 | console.log("This is callabck B. New value is "+value); 68 | }); 69 | 70 | 71 | config.set('callback.a','New value'); 72 | 73 | config.registerCallback('callback.a',function(value) 74 | { 75 | console.log("This is callabck A #2. New value is "+value); 76 | }); 77 | config.set('callback.a','Asganau'); 78 | 79 | config.delete('callback.a'); 80 | config.addConfigValue('callback.a','string',"PIPPO"); 81 | config.set('callback.a','AAAA'); 82 | config.print(); 83 | 84 | config.registerCallback('callback.a',function(value) 85 | { 86 | console.log("You should see only this callback. Value: "+value); 87 | }); 88 | config.set('callback.a','########'); 89 | config.print(); 90 | 91 | config.set('callback.b','BBB'); -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/.npmignore: -------------------------------------------------------------------------------- 1 | .nyc_output/ 2 | coverage/ 3 | test/ 4 | .travis.yml 5 | appveyor.yml 6 | lib/**/__tests__/ 7 | test/readme.md 8 | test.js 9 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2011-2015 JP Richardson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files 6 | (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, 7 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 14 | OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 15 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js: -------------------------------------------------------------------------------- 1 | var fs = require('graceful-fs') 2 | 3 | var BUF_LENGTH = 64 * 1024 4 | var _buff = new Buffer(BUF_LENGTH) 5 | 6 | function copyFileSync (srcFile, destFile, options) { 7 | var clobber = options.clobber 8 | var preserveTimestamps = options.preserveTimestamps 9 | 10 | if (fs.existsSync(destFile) && !clobber) { 11 | throw Error('EEXIST') 12 | } 13 | 14 | var fdr = fs.openSync(srcFile, 'r') 15 | var stat = fs.fstatSync(fdr) 16 | var fdw = fs.openSync(destFile, 'w', stat.mode) 17 | var bytesRead = 1 18 | var pos = 0 19 | 20 | while (bytesRead > 0) { 21 | bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos) 22 | fs.writeSync(fdw, _buff, 0, bytesRead) 23 | pos += bytesRead 24 | } 25 | 26 | if (preserveTimestamps) { 27 | fs.futimesSync(fdw, stat.atime, stat.mtime) 28 | } 29 | 30 | fs.closeSync(fdr) 31 | fs.closeSync(fdw) 32 | } 33 | 34 | module.exports = copyFileSync 35 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/copy-sync/copy-sync.js: -------------------------------------------------------------------------------- 1 | var fs = require('graceful-fs') 2 | var path = require('path') 3 | var copyFileSync = require('./copy-file-sync') 4 | var mkdir = require('../mkdirs') 5 | 6 | function copySync (src, dest, options) { 7 | if (typeof options === 'function' || options instanceof RegExp) { 8 | options = {filter: options} 9 | } 10 | 11 | options = options || {} 12 | options.recursive = !!options.recursive 13 | 14 | // default to true for now 15 | options.clobber = 'clobber' in options ? !!options.clobber : true 16 | options.preserveTimestamps = 'preserveTimestamps' in options ? !!options.preserveTimestamps : true 17 | 18 | options.filter = options.filter || function () { return true } 19 | 20 | var stats = options.recursive ? fs.lstatSync(src) : fs.statSync(src) 21 | var destFolder = path.dirname(dest) 22 | var destFolderExists = fs.existsSync(destFolder) 23 | var performCopy = false 24 | 25 | if (stats.isFile()) { 26 | if (options.filter instanceof RegExp) performCopy = options.filter.test(src) 27 | else if (typeof options.filter === 'function') performCopy = options.filter(src) 28 | 29 | if (performCopy) { 30 | if (!destFolderExists) mkdir.mkdirsSync(destFolder) 31 | copyFileSync(src, dest, {clobber: options.clobber, preserveTimestamps: options.preserveTimestamps}) 32 | } 33 | } else if (stats.isDirectory()) { 34 | if (!fs.existsSync(dest)) mkdir.mkdirsSync(dest) 35 | var contents = fs.readdirSync(src) 36 | contents.forEach(function (content) { 37 | var opts = options 38 | opts.recursive = true 39 | copySync(path.join(src, content), path.join(dest, content), opts) 40 | }) 41 | } else if (options.recursive && stats.isSymbolicLink()) { 42 | var srcPath = fs.readlinkSync(src) 43 | fs.symlinkSync(srcPath, dest) 44 | } 45 | } 46 | 47 | module.exports = copySync 48 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/copy-sync/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | copySync: require('./copy-sync') 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/copy/copy.js: -------------------------------------------------------------------------------- 1 | var fs = require('graceful-fs') 2 | var path = require('path') 3 | var ncp = require('./ncp') 4 | var mkdir = require('../mkdirs') 5 | 6 | function copy (src, dest, options, callback) { 7 | if (typeof options === 'function' && !callback) { 8 | callback = options 9 | options = {} 10 | } else if (typeof options === 'function' || options instanceof RegExp) { 11 | options = {filter: options} 12 | } 13 | callback = callback || function () {} 14 | 15 | fs.lstat(src, function (err, stats) { 16 | if (err) return callback(err) 17 | 18 | var dir = null 19 | if (stats.isDirectory()) { 20 | var parts = dest.split(path.sep) 21 | parts.pop() 22 | dir = parts.join(path.sep) 23 | } else { 24 | dir = path.dirname(dest) 25 | } 26 | 27 | fs.exists(dir, function (dirExists) { 28 | if (dirExists) return ncp(src, dest, options, callback) 29 | mkdir.mkdirs(dir, function (err) { 30 | if (err) return callback(err) 31 | ncp(src, dest, options, callback) 32 | }) 33 | }) 34 | }) 35 | } 36 | 37 | module.exports = copy 38 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/copy/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | copy: require('./copy') 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/empty/index.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | var path = require('path') 3 | var mkdir = require('../mkdirs') 4 | var remove = require('../remove') 5 | 6 | function emptyDir (dir, callback) { 7 | fs.readdir(dir, function (err, items) { 8 | if (err) return mkdir.mkdirs(dir, callback) 9 | 10 | items = items.map(function (item) { 11 | return path.join(dir, item) 12 | }) 13 | 14 | deleteItem() 15 | 16 | function deleteItem () { 17 | var item = items.pop() 18 | if (!item) return callback() 19 | remove.remove(item, function (err) { 20 | if (err) return callback(err) 21 | deleteItem() 22 | }) 23 | } 24 | }) 25 | } 26 | 27 | function emptyDirSync (dir) { 28 | var items 29 | try { 30 | items = fs.readdirSync(dir) 31 | } catch (err) { 32 | return mkdir.mkdirsSync(dir) 33 | } 34 | 35 | items.forEach(function (item) { 36 | item = path.join(dir, item) 37 | remove.removeSync(item) 38 | }) 39 | } 40 | 41 | module.exports = { 42 | emptyDirSync: emptyDirSync, 43 | emptydirSync: emptyDirSync, 44 | emptyDir: emptyDir, 45 | emptydir: emptyDir 46 | } 47 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/ensure/file.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var fs = require('graceful-fs') 3 | var mkdir = require('../mkdirs') 4 | 5 | function createFile (file, callback) { 6 | function makeFile () { 7 | fs.writeFile(file, '', function (err) { 8 | if (err) return callback(err) 9 | callback() 10 | }) 11 | } 12 | 13 | fs.exists(file, function (fileExists) { 14 | if (fileExists) return callback() 15 | var dir = path.dirname(file) 16 | fs.exists(dir, function (dirExists) { 17 | if (dirExists) return makeFile() 18 | mkdir.mkdirs(dir, function (err) { 19 | if (err) return callback(err) 20 | makeFile() 21 | }) 22 | }) 23 | }) 24 | } 25 | 26 | function createFileSync (file) { 27 | if (fs.existsSync(file)) return 28 | 29 | var dir = path.dirname(file) 30 | if (!fs.existsSync(dir)) { 31 | mkdir.mkdirsSync(dir) 32 | } 33 | 34 | fs.writeFileSync(file, '') 35 | } 36 | 37 | module.exports = { 38 | createFile: createFile, 39 | createFileSync: createFileSync, 40 | // alias 41 | ensureFile: createFile, 42 | ensureFileSync: createFileSync 43 | } 44 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/ensure/index.js: -------------------------------------------------------------------------------- 1 | var file = require('./file') 2 | var link = require('./link') 3 | var symlink = require('./symlink') 4 | 5 | module.exports = { 6 | // file 7 | createFile: file.createFile, 8 | createFileSync: file.createFileSync, 9 | ensureFile: file.createFile, 10 | ensureFileSync: file.createFileSync, 11 | // link 12 | createLink: link.createLink, 13 | createLinkSync: link.createLinkSync, 14 | ensureLink: link.createLink, 15 | ensureLinkSync: link.createLinkSync, 16 | // symlink 17 | createSymlink: symlink.createSymlink, 18 | createSymlinkSync: symlink.createSymlinkSync, 19 | ensureSymlink: symlink.createSymlink, 20 | ensureSymlinkSync: symlink.createSymlinkSync 21 | } 22 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/ensure/link.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var fs = require('graceful-fs') 3 | var mkdir = require('../mkdirs') 4 | 5 | function createLink (srcpath, dstpath, callback) { 6 | function makeLink (srcpath, dstpath) { 7 | fs.link(srcpath, dstpath, function (err) { 8 | if (err) return callback(err) 9 | callback(null) 10 | }) 11 | } 12 | 13 | fs.exists(dstpath, function (destinationExists) { 14 | if (destinationExists) return callback(null) 15 | fs.lstat(srcpath, function (err, stat) { 16 | if (err) { 17 | err.message = err.message.replace('lstat', 'ensureLink') 18 | return callback(err) 19 | } 20 | var dir = path.dirname(dstpath) 21 | fs.exists(dir, function (dirExists) { 22 | if (dirExists) return makeLink(srcpath, dstpath) 23 | mkdir.mkdirs(dir, function (err) { 24 | if (err) return callback(err) 25 | makeLink(srcpath, dstpath) 26 | }) 27 | }) 28 | }) 29 | }) 30 | } 31 | 32 | function createLinkSync (srcpath, dstpath, callback) { 33 | 34 | var destinationExists = fs.existsSync(dstpath) 35 | if (destinationExists) return undefined 36 | 37 | try { 38 | fs.lstatSync(srcpath) 39 | } catch (err) { 40 | err.message = err.message.replace('lstat', 'ensureLink') 41 | throw err 42 | } 43 | 44 | var dir = path.dirname(dstpath) 45 | var dirExists = fs.existsSync(dir) 46 | if (dirExists) return fs.linkSync(srcpath, dstpath) 47 | mkdir.mkdirsSync(dir) 48 | 49 | return fs.linkSync(srcpath, dstpath) 50 | } 51 | 52 | module.exports = { 53 | createLink: createLink, 54 | createLinkSync: createLinkSync, 55 | // alias 56 | ensureLink: createLink, 57 | ensureLinkSync: createLinkSync 58 | } 59 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/ensure/symlink-type.js: -------------------------------------------------------------------------------- 1 | var fs = require('graceful-fs') 2 | 3 | function symlinkType (srcpath, type, callback) { 4 | callback = (typeof type === 'function') ? type : callback 5 | type = (typeof type === 'function') ? false : type 6 | if (type) return callback(null, type) 7 | fs.lstat(srcpath, function (err, stats) { 8 | if (err) return callback(null, 'file') 9 | type = (stats && stats.isDirectory()) ? 'dir' : 'file' 10 | callback(null, type) 11 | }) 12 | } 13 | 14 | function symlinkTypeSync (srcpath, type) { 15 | if (type) return type 16 | try { 17 | var stats = fs.lstatSync(srcpath) 18 | } catch(e) { 19 | return 'file' 20 | } 21 | return (stats && stats.isDirectory()) ? 'dir' : 'file' 22 | } 23 | 24 | module.exports = { 25 | symlinkType: symlinkType, 26 | symlinkTypeSync: symlinkTypeSync 27 | } 28 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/ensure/symlink.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var fs = require('graceful-fs') 3 | var _mkdirs = require('../mkdirs') 4 | var mkdirs = _mkdirs.mkdirs 5 | var mkdirsSync = _mkdirs.mkdirsSync 6 | 7 | var _symlinkPaths = require('./symlink-paths') 8 | var symlinkPaths = _symlinkPaths.symlinkPaths 9 | var symlinkPathsSync = _symlinkPaths.symlinkPathsSync 10 | 11 | var _symlinkType = require('./symlink-type') 12 | var symlinkType = _symlinkType.symlinkType 13 | var symlinkTypeSync = _symlinkType.symlinkTypeSync 14 | 15 | function createSymlink (srcpath, dstpath, type, callback) { 16 | callback = (typeof type === 'function') ? type : callback 17 | type = (typeof type === 'function') ? false : type 18 | 19 | fs.exists(dstpath, function (destinationExists) { 20 | if (destinationExists) return callback(null) 21 | symlinkPaths(srcpath, dstpath, function (err, relative) { 22 | if (err) return callback(err) 23 | srcpath = relative.toDst 24 | symlinkType(relative.toCwd, type, function (err, type) { 25 | if (err) return callback(err) 26 | var dir = path.dirname(dstpath) 27 | fs.exists(dir, function (dirExists) { 28 | if (dirExists) return fs.symlink(srcpath, dstpath, type, callback) 29 | mkdirs(dir, function (err) { 30 | if (err) return callback(err) 31 | fs.symlink(srcpath, dstpath, type, callback) 32 | }) 33 | }) 34 | }) 35 | }) 36 | }) 37 | } 38 | 39 | function createSymlinkSync (srcpath, dstpath, type, callback) { 40 | callback = (typeof type === 'function') ? type : callback 41 | type = (typeof type === 'function') ? false : type 42 | 43 | var destinationExists = fs.existsSync(dstpath) 44 | if (destinationExists) return undefined 45 | 46 | var relative = symlinkPathsSync(srcpath, dstpath) 47 | srcpath = relative.toDst 48 | type = symlinkTypeSync(relative.toCwd, type) 49 | var dir = path.dirname(dstpath) 50 | var exists = fs.existsSync(dir) 51 | if (exists) return fs.symlinkSync(srcpath, dstpath, type) 52 | mkdirsSync(dir) 53 | return fs.symlinkSync(srcpath, dstpath, type) 54 | } 55 | 56 | module.exports = { 57 | createSymlink: createSymlink, 58 | createSymlinkSync: createSymlinkSync, 59 | // alias 60 | ensureSymlink: createSymlink, 61 | ensureSymlinkSync: createSymlinkSync 62 | } 63 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/index.js: -------------------------------------------------------------------------------- 1 | var assign = require('./util/assign') 2 | 3 | var fse = {} 4 | var gfs = require('graceful-fs') 5 | 6 | // attach fs methods to fse 7 | Object.keys(gfs).forEach(function (key) { 8 | fse[key] = gfs[key] 9 | }) 10 | 11 | var fs = fse 12 | 13 | assign(fs, require('./copy')) 14 | assign(fs, require('./copy-sync')) 15 | assign(fs, require('./mkdirs')) 16 | assign(fs, require('./remove')) 17 | assign(fs, require('./json')) 18 | assign(fs, require('./move')) 19 | assign(fs, require('./streams')) 20 | assign(fs, require('./empty')) 21 | assign(fs, require('./ensure')) 22 | assign(fs, require('./output')) 23 | 24 | module.exports = fs 25 | 26 | // maintain backwards compatibility for awhile 27 | var jsonfile = {} 28 | Object.defineProperty(jsonfile, 'spaces', { 29 | get: function () { 30 | return fs.spaces // found in ./json 31 | }, 32 | set: function (val) { 33 | fs.spaces = val 34 | } 35 | }) 36 | 37 | module.exports.jsonfile = jsonfile // so users of fs-extra can modify jsonFile.spaces 38 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/json/index.js: -------------------------------------------------------------------------------- 1 | var jsonFile = require('jsonfile') 2 | 3 | module.exports = { 4 | outputJsonSync: require('./output-json-sync'), 5 | outputJson: require('./output-json'), 6 | // aliases 7 | outputJSONSync: require('./output-json-sync'), 8 | outputJSON: require('./output-json'), 9 | // jsonfile exports 10 | readJson: jsonFile.readFile, 11 | readJSON: jsonFile.readFile, 12 | readJsonSync: jsonFile.readFileSync, 13 | readJSONSync: jsonFile.readFileSync, 14 | writeJson: jsonFile.writeFile, 15 | writeJSON: jsonFile.writeFile, 16 | writeJsonSync: jsonFile.writeFileSync, 17 | writeJSONSync: jsonFile.writeFileSync, 18 | spaces: 2 // default in fs-extra 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/json/output-json-sync.js: -------------------------------------------------------------------------------- 1 | var fs = require('graceful-fs') 2 | var path = require('path') 3 | var jsonFile = require('jsonfile') 4 | var mkdir = require('../mkdirs') 5 | 6 | function outputJsonSync (file, data, options) { 7 | var dir = path.dirname(file) 8 | 9 | if (!fs.existsSync(dir)) { 10 | mkdir.mkdirsSync(dir) 11 | } 12 | 13 | jsonFile.writeFileSync(file, data, options) 14 | } 15 | 16 | module.exports = outputJsonSync 17 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/json/output-json.js: -------------------------------------------------------------------------------- 1 | var fs = require('graceful-fs') 2 | var path = require('path') 3 | var jsonFile = require('jsonfile') 4 | var mkdir = require('../mkdirs') 5 | 6 | function outputJson (file, data, options, callback) { 7 | if (typeof options === 'function') { 8 | callback = options 9 | options = {} 10 | } 11 | 12 | var dir = path.dirname(file) 13 | 14 | fs.exists(dir, function (itDoes) { 15 | if (itDoes) return jsonFile.writeFile(file, data, options, callback) 16 | 17 | mkdir.mkdirs(dir, function (err) { 18 | if (err) return callback(err) 19 | jsonFile.writeFile(file, data, options, callback) 20 | }) 21 | }) 22 | } 23 | 24 | module.exports = outputJson 25 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/mkdirs/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | mkdirs: require('./mkdirs'), 3 | mkdirsSync: require('./mkdirs-sync'), 4 | // alias 5 | mkdirp: require('./mkdirs'), 6 | mkdirpSync: require('./mkdirs-sync'), 7 | ensureDir: require('./mkdirs'), 8 | ensureDirSync: require('./mkdirs-sync') 9 | } 10 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js: -------------------------------------------------------------------------------- 1 | var fs = require('graceful-fs') 2 | var path = require('path') 3 | 4 | var o777 = parseInt('0777', 8) 5 | 6 | function mkdirsSync (p, opts, made) { 7 | if (!opts || typeof opts !== 'object') { 8 | opts = { mode: opts } 9 | } 10 | 11 | var mode = opts.mode 12 | var xfs = opts.fs || fs 13 | 14 | if (mode === undefined) { 15 | mode = o777 & (~process.umask()) 16 | } 17 | if (!made) made = null 18 | 19 | p = path.resolve(p) 20 | 21 | try { 22 | xfs.mkdirSync(p, mode) 23 | made = made || p 24 | } catch (err0) { 25 | switch (err0.code) { 26 | case 'ENOENT' : 27 | made = mkdirsSync(path.dirname(p), opts, made) 28 | mkdirsSync(p, opts, made) 29 | break 30 | 31 | // In the case of any other error, just see if there's a dir 32 | // there already. If so, then hooray! If not, then something 33 | // is borked. 34 | default: 35 | var stat 36 | try { 37 | stat = xfs.statSync(p) 38 | } catch (err1) { 39 | throw err0 40 | } 41 | if (!stat.isDirectory()) throw err0 42 | break 43 | } 44 | } 45 | 46 | return made 47 | } 48 | 49 | module.exports = mkdirsSync 50 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/mkdirs/mkdirs.js: -------------------------------------------------------------------------------- 1 | var fs = require('graceful-fs') 2 | var path = require('path') 3 | 4 | var o777 = parseInt('0777', 8) 5 | 6 | function mkdirs (p, opts, callback, made) { 7 | if (typeof opts === 'function') { 8 | callback = opts 9 | opts = {} 10 | } else if (!opts || typeof opts !== 'object') { 11 | opts = { mode: opts } 12 | } 13 | 14 | var mode = opts.mode 15 | var xfs = opts.fs || fs 16 | 17 | if (mode === undefined) { 18 | mode = o777 & (~process.umask()) 19 | } 20 | if (!made) made = null 21 | 22 | callback = callback || Function() 23 | p = path.resolve(p) 24 | 25 | xfs.mkdir(p, mode, function (er) { 26 | if (!er) { 27 | made = made || p 28 | return callback(null, made) 29 | } 30 | switch (er.code) { 31 | case 'ENOENT': 32 | if (path.dirname(p) === p) return callback(er) 33 | mkdirs(path.dirname(p), opts, function (er, made) { 34 | if (er) callback(er, made) 35 | else mkdirs(p, opts, callback, made) 36 | }) 37 | break 38 | 39 | // In the case of any other error, just see if there's a dir 40 | // there already. If so, then hooray! If not, then something 41 | // is borked. 42 | default: 43 | xfs.stat(p, function (er2, stat) { 44 | // if the stat fails, then that's super weird. 45 | // let the original error be the failure reason. 46 | if (er2 || !stat.isDirectory()) callback(er, made) 47 | else callback(null, made) 48 | }) 49 | break 50 | } 51 | }) 52 | } 53 | 54 | module.exports = mkdirs 55 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/output/index.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var fs = require('graceful-fs') 3 | var mkdir = require('../mkdirs') 4 | 5 | function outputFile (file, data, encoding, callback) { 6 | if (typeof encoding === 'function') { 7 | callback = encoding 8 | encoding = 'utf8' 9 | } 10 | 11 | var dir = path.dirname(file) 12 | fs.exists(dir, function (itDoes) { 13 | if (itDoes) return fs.writeFile(file, data, encoding, callback) 14 | 15 | mkdir.mkdirs(dir, function (err) { 16 | if (err) return callback(err) 17 | 18 | fs.writeFile(file, data, encoding, callback) 19 | }) 20 | }) 21 | } 22 | 23 | function outputFileSync (file, data, encoding) { 24 | var dir = path.dirname(file) 25 | if (fs.existsSync(dir)) { 26 | return fs.writeFileSync.apply(fs, arguments) 27 | } 28 | mkdir.mkdirsSync(dir) 29 | fs.writeFileSync.apply(fs, arguments) 30 | } 31 | 32 | module.exports = { 33 | outputFile: outputFile, 34 | outputFileSync: outputFileSync 35 | } 36 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/remove/index.js: -------------------------------------------------------------------------------- 1 | var rimraf = require('rimraf') 2 | 3 | function removeSync (dir) { 4 | return rimraf.sync(dir) 5 | } 6 | 7 | function remove (dir, callback) { 8 | return callback ? rimraf(dir, callback) : rimraf(dir, Function()) 9 | } 10 | 11 | module.exports = { 12 | remove: remove, 13 | removeSync: removeSync, 14 | // alias 15 | delete: remove, 16 | deleteSync: removeSync 17 | } 18 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/streams/create-output-stream.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var fs = require('fs') 3 | var mkdir = require('../mkdirs') 4 | var WriteStream = fs.WriteStream 5 | 6 | function createOutputStream (file, options) { 7 | var dirExists = false 8 | var dir = path.dirname(file) 9 | options = options || {} 10 | 11 | // if fd is set with an actual number, file is created, hence directory is too 12 | if (options.fd) { 13 | return fs.createWriteStream(file, options) 14 | } else { 15 | // this hacks the WriteStream constructor from calling open() 16 | options.fd = -1 17 | } 18 | 19 | var ws = new WriteStream(file, options) 20 | 21 | var oldOpen = ws.open 22 | ws.open = function () { 23 | ws.fd = null // set actual fd 24 | if (dirExists) return oldOpen.call(ws) 25 | 26 | // this only runs once on first write 27 | mkdir.mkdirs(dir, function (err) { 28 | if (err) { 29 | ws.destroy() 30 | ws.emit('error', err) 31 | return 32 | } 33 | dirExists = true 34 | oldOpen.call(ws) 35 | }) 36 | } 37 | 38 | ws.open() 39 | 40 | return ws 41 | } 42 | 43 | module.exports = createOutputStream 44 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/streams/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | createOutputStream: require('./create-output-stream') 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/util/assign.js: -------------------------------------------------------------------------------- 1 | // simple mutable assign 2 | function assign () { 3 | var args = [].slice.call(arguments).filter(function (i) { return i }) 4 | var dest = args.shift() 5 | args.forEach(function (src) { 6 | Object.keys(src).forEach(function (key) { 7 | dest[key] = src[key] 8 | }) 9 | }) 10 | 11 | return dest 12 | } 13 | 14 | module.exports = assign 15 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/util/utimes.js: -------------------------------------------------------------------------------- 1 | var fs = require('graceful-fs') 2 | var path = require('path') 3 | var os = require('os') 4 | 5 | // HFS, ext{2,3}, FAT do not, Node.js v0.10 does not 6 | function hasMillisResSync () { 7 | var tmpfile = path.join('millis-test-sync' + Date.now().toString() + Math.random().toString().slice(2)) 8 | tmpfile = path.join(os.tmpdir(), tmpfile) 9 | 10 | // 550 millis past UNIX epoch 11 | var d = new Date(1435410243862) 12 | fs.writeFileSync(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141') 13 | var fd = fs.openSync(tmpfile, 'r+') 14 | fs.futimesSync(fd, d, d) 15 | fs.closeSync(fd) 16 | return fs.statSync(tmpfile).mtime > 1435410243000 17 | } 18 | 19 | function hasMillisRes (callback) { 20 | var tmpfile = path.join('millis-test' + Date.now().toString() + Math.random().toString().slice(2)) 21 | tmpfile = path.join(os.tmpdir(), tmpfile) 22 | 23 | // 550 millis past UNIX epoch 24 | var d = new Date(1435410243862) 25 | fs.writeFile(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141', function (err) { 26 | if (err) return callback(err) 27 | fs.open(tmpfile, 'r+', function (err, fd) { 28 | if (err) return callback(err) 29 | fs.futimes(fd, d, d, function (err) { 30 | if (err) return callback(err) 31 | fs.close(fd, function (err) { 32 | if (err) return callback(err) 33 | fs.stat(tmpfile, function (err, stats) { 34 | if (err) return callback(err) 35 | callback(null, stats.mtime > 1435410243000) 36 | }) 37 | }) 38 | }) 39 | }) 40 | }) 41 | } 42 | 43 | function timeRemoveMillis (timestamp) { 44 | if (typeof timestamp === 'number') { 45 | return Math.floor(timestamp / 1000) * 1000 46 | } else if (timestamp instanceof Date) { 47 | return new Date(Math.floor(timestamp.getTime() / 1000) * 1000) 48 | } else { 49 | throw new Error('fs-extra: timeRemoveMillis() unknown parameter type') 50 | } 51 | } 52 | 53 | function utimesMillis (path, atime, mtime, callback) { 54 | // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback) 55 | fs.open(path, 'r+', function (err, fd) { 56 | if (err) return callback(err) 57 | fs.futimes(fd, atime, mtime, function (err) { 58 | if (err) return callback(err) 59 | fs.close(fd, callback) 60 | }) 61 | }) 62 | } 63 | 64 | module.exports = { 65 | hasMillisRes: hasMillisRes, 66 | hasMillisResSync: hasMillisResSync, 67 | timeRemoveMillis: timeRemoveMillis, 68 | utimesMillis: utimesMillis 69 | } 70 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/walk/index.js: -------------------------------------------------------------------------------- 1 | var Walker = require('./walker') 2 | 3 | function walk (path, filter) { 4 | return new Walker(path, filter)// .start() 5 | } 6 | 7 | module.exports = walk 8 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/lib/walk/walker.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | var path = require('path') 3 | var Readable = require('stream').Readable 4 | var util = require('util') 5 | var assign = require('../util/assign') 6 | 7 | function Walker (dir, filter, streamOptions) { 8 | Readable.call(this, assign({ objectMode: true }, streamOptions)) 9 | this.path = path.resolve(dir) 10 | this.filter = filter 11 | this.pending = 0 12 | this.start() 13 | } 14 | util.inherits(Walker, Readable) 15 | 16 | Walker.prototype.start = function () { 17 | this.visit(this.path) 18 | return this 19 | } 20 | 21 | Walker.prototype.visit = function (item) { 22 | this.pending++ 23 | var self = this 24 | 25 | fs.lstat(item, function (err, stat) { 26 | if (err) { 27 | self.emit('error', err, {path: item, stat: stat}) 28 | return self.finishItem() 29 | } 30 | 31 | if (self.filter && !self.filter({path: item, stat: stat})) return self.finishItem() 32 | 33 | if (!stat.isDirectory()) { 34 | self.push({ path: item, stat: stat }) 35 | return self.finishItem() 36 | } 37 | 38 | fs.readdir(item, function (err, items) { 39 | if (err) { 40 | self.emit('error', err, {path: item, stat: stat}) 41 | return self.finishItem() 42 | } 43 | 44 | self.push({path: item, stat: stat}) 45 | items.forEach(function (part) { 46 | self.visit(path.join(item, part)) 47 | }) 48 | self.finishItem() 49 | }) 50 | }) 51 | return this 52 | } 53 | 54 | Walker.prototype.finishItem = function () { 55 | this.pending -= 1 56 | if (this.pending === 0) this.push(null) 57 | return this 58 | } 59 | 60 | Walker.prototype._read = function () { } 61 | 62 | module.exports = Walker 63 | -------------------------------------------------------------------------------- /node_modules/v-conf/node_modules/fs-extra/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "fs-extra@0.23.1", 6 | "scope": null, 7 | "escapedName": "fs-extra", 8 | "name": "fs-extra", 9 | "rawSpec": "0.23.1", 10 | "spec": "0.23.1", 11 | "type": "version" 12 | }, 13 | "/data/plugins/music_service/volspotconnect/node_modules/v-conf" 14 | ] 15 | ], 16 | "_from": "fs-extra@0.23.1", 17 | "_id": "fs-extra@0.23.1", 18 | "_inCache": true, 19 | "_installable": true, 20 | "_location": "/v-conf/fs-extra", 21 | "_nodeVersion": "2.1.0", 22 | "_npmUser": { 23 | "name": "jprichardson", 24 | "email": "jprichardson@gmail.com" 25 | }, 26 | "_npmVersion": "2.10.1", 27 | "_phantomChildren": {}, 28 | "_requested": { 29 | "raw": "fs-extra@0.23.1", 30 | "scope": null, 31 | "escapedName": "fs-extra", 32 | "name": "fs-extra", 33 | "rawSpec": "0.23.1", 34 | "spec": "0.23.1", 35 | "type": "version" 36 | }, 37 | "_requiredBy": [ 38 | "/v-conf" 39 | ], 40 | "_resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.23.1.tgz", 41 | "_shasum": "6611dba6adf2ab8dc9c69fab37cddf8818157e3d", 42 | "_shrinkwrap": null, 43 | "_spec": "fs-extra@0.23.1", 44 | "_where": "/data/plugins/music_service/volspotconnect/node_modules/v-conf", 45 | "author": { 46 | "name": "JP Richardson", 47 | "email": "jprichardson@gmail.com" 48 | }, 49 | "bugs": { 50 | "url": "https://github.com/jprichardson/node-fs-extra/issues" 51 | }, 52 | "dependencies": { 53 | "graceful-fs": "^4.1.2", 54 | "jsonfile": "^2.1.0", 55 | "path-is-absolute": "^1.0.0", 56 | "rimraf": "^2.2.8" 57 | }, 58 | "description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.", 59 | "devDependencies": { 60 | "coveralls": "^2.11.2", 61 | "istanbul": "^0.3.5", 62 | "minimist": "^1.1.1", 63 | "mocha": "^2.1.0", 64 | "read-dir-files": "^0.1.1", 65 | "secure-random": "^1.1.1", 66 | "semver": "^4.3.6", 67 | "standard": "4.x" 68 | }, 69 | "directories": {}, 70 | "dist": { 71 | "shasum": "6611dba6adf2ab8dc9c69fab37cddf8818157e3d", 72 | "tarball": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.23.1.tgz" 73 | }, 74 | "gitHead": "ddc130ea23a1a4aaf8f6aec8a90229a42edfe535", 75 | "homepage": "https://github.com/jprichardson/node-fs-extra", 76 | "keywords": [ 77 | "fs", 78 | "file", 79 | "file system", 80 | "copy", 81 | "directory", 82 | "extra", 83 | "mkdirp", 84 | "mkdir", 85 | "mkdirs", 86 | "recursive", 87 | "json", 88 | "read", 89 | "write", 90 | "extra", 91 | "delete", 92 | "remove", 93 | "touch", 94 | "create", 95 | "text", 96 | "output", 97 | "move" 98 | ], 99 | "license": "MIT", 100 | "main": "./lib/index", 101 | "maintainers": [ 102 | { 103 | "name": "jprichardson", 104 | "email": "jprichardson@gmail.com" 105 | } 106 | ], 107 | "name": "fs-extra", 108 | "optionalDependencies": {}, 109 | "readme": "ERROR: No README data found!", 110 | "repository": { 111 | "type": "git", 112 | "url": "git+https://github.com/jprichardson/node-fs-extra.git" 113 | }, 114 | "scripts": { 115 | "coverage": "istanbul cover test.js", 116 | "coveralls": "npm run coverage && coveralls < coverage/lcov.info", 117 | "test": "standard && node test.js", 118 | "test-find": "find ./lib/**/__tests__ -name *.test.js | xargs mocha" 119 | }, 120 | "version": "0.23.1" 121 | } 122 | -------------------------------------------------------------------------------- /node_modules/v-conf/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "v-conf@^0.10.0", 6 | "scope": null, 7 | "escapedName": "v-conf", 8 | "name": "v-conf", 9 | "rawSpec": "^0.10.0", 10 | "spec": ">=0.10.0 <0.11.0", 11 | "type": "range" 12 | }, 13 | "/data/plugins/music_service/volspotconnect" 14 | ] 15 | ], 16 | "_from": "v-conf@>=0.10.0 <0.11.0", 17 | "_id": "v-conf@0.10.0", 18 | "_inCache": true, 19 | "_installable": true, 20 | "_location": "/v-conf", 21 | "_nodeVersion": "0.12.2", 22 | "_npmOperationalInternal": { 23 | "host": "packages-6-west.internal.npmjs.com", 24 | "tmp": "tmp/v-conf-0.10.0.tgz_1455732273866_0.7313767410814762" 25 | }, 26 | "_npmUser": { 27 | "name": "fanciulli", 28 | "email": "fanciulli@gmail.com" 29 | }, 30 | "_npmVersion": "2.7.4", 31 | "_phantomChildren": { 32 | "graceful-fs": "4.1.9", 33 | "jsonfile": "2.4.0", 34 | "path-is-absolute": "1.0.1", 35 | "rimraf": "2.5.4" 36 | }, 37 | "_requested": { 38 | "raw": "v-conf@^0.10.0", 39 | "scope": null, 40 | "escapedName": "v-conf", 41 | "name": "v-conf", 42 | "rawSpec": "^0.10.0", 43 | "spec": ">=0.10.0 <0.11.0", 44 | "type": "range" 45 | }, 46 | "_requiredBy": [ 47 | "/" 48 | ], 49 | "_resolved": "https://registry.npmjs.org/v-conf/-/v-conf-0.10.0.tgz", 50 | "_shasum": "ef401b8e7fea1eab6140f3444b8e1b5c6e4b6faa", 51 | "_shrinkwrap": null, 52 | "_spec": "v-conf@^0.10.0", 53 | "_where": "/data/plugins/music_service/volspotconnect", 54 | "author": { 55 | "name": "Massimiliano Fanciulli" 56 | }, 57 | "bugs": { 58 | "url": "https://github.com/fanciulli/v-conf/issues" 59 | }, 60 | "dependencies": { 61 | "fs-extra": "0.23.1", 62 | "multimap": "1.0.1" 63 | }, 64 | "description": "A useful library for handling configuration parameters", 65 | "devDependencies": {}, 66 | "directories": {}, 67 | "dist": { 68 | "shasum": "ef401b8e7fea1eab6140f3444b8e1b5c6e4b6faa", 69 | "tarball": "https://registry.npmjs.org/v-conf/-/v-conf-0.10.0.tgz" 70 | }, 71 | "gitHead": "e5b30a70f972153b572d9d0aa3c26bba63e754bf", 72 | "homepage": "https://github.com/fanciulli/v-conf", 73 | "keywords": [ 74 | "json", 75 | "configuration", 76 | "conf" 77 | ], 78 | "license": "ISC", 79 | "main": "index.js", 80 | "maintainers": [ 81 | { 82 | "name": "fanciulli", 83 | "email": "fanciulli@gmail.com" 84 | } 85 | ], 86 | "name": "v-conf", 87 | "optionalDependencies": {}, 88 | "readme": "ERROR: No README data found!", 89 | "repository": { 90 | "type": "git", 91 | "url": "git+https://github.com/fanciulli/v-conf.git" 92 | }, 93 | "scripts": { 94 | "test": "echo \"Error: no test specified\" && exit 1" 95 | }, 96 | "version": "0.10.0" 97 | } 98 | -------------------------------------------------------------------------------- /node_modules/v-conf/testConfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "callback": { 3 | "b": { 4 | "type": "string", 5 | "value": "BBB" 6 | }, 7 | "a": { 8 | "type": "string", 9 | "value": "########" 10 | } 11 | }, 12 | "debug": { 13 | "type": "boolean", 14 | "value": true 15 | }, 16 | "env": { 17 | "type": "string", 18 | "value": "PRODUCTION" 19 | }, 20 | "structured": { 21 | "a": { 22 | "type": "number", 23 | "value": 500 24 | }, 25 | "b": { 26 | "type": "number", 27 | "value": 1000 28 | } 29 | }, 30 | "keys": { 31 | "first": { 32 | "type": "number", 33 | "value": 1 34 | }, 35 | "second": { 36 | "type": "number", 37 | "value": 2 38 | }, 39 | "third": { 40 | "type": "boolean", 41 | "value": true 42 | }, 43 | "fourth": { 44 | "type": "boolean", 45 | "value": false 46 | }, 47 | "fifth": { 48 | "sub-key-1": { 49 | "type": "boolean", 50 | "value": true 51 | }, 52 | "sub-key-2": { 53 | "type": "boolean", 54 | "value": false 55 | } 56 | } 57 | }, 58 | "music_services": { 59 | "dirble": { 60 | "enabled": { 61 | "type": "boolean", 62 | "value": false 63 | } 64 | } 65 | }, 66 | "delete": { 67 | "fifth": { 68 | "sub-key-2": { 69 | "type": "boolean", 70 | "value": false 71 | } 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /node_modules/wrappy/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/wrappy/README.md: -------------------------------------------------------------------------------- 1 | # wrappy 2 | 3 | Callback wrapping utility 4 | 5 | ## USAGE 6 | 7 | ```javascript 8 | var wrappy = require("wrappy") 9 | 10 | // var wrapper = wrappy(wrapperFunction) 11 | 12 | // make sure a cb is called only once 13 | // See also: http://npm.im/once for this specific use case 14 | var once = wrappy(function (cb) { 15 | var called = false 16 | return function () { 17 | if (called) return 18 | called = true 19 | return cb.apply(this, arguments) 20 | } 21 | }) 22 | 23 | function printBoo () { 24 | console.log('boo') 25 | } 26 | // has some rando property 27 | printBoo.iAmBooPrinter = true 28 | 29 | var onlyPrintOnce = once(printBoo) 30 | 31 | onlyPrintOnce() // prints 'boo' 32 | onlyPrintOnce() // does nothing 33 | 34 | // random property is retained! 35 | assert.equal(onlyPrintOnce.iAmBooPrinter, true) 36 | ``` 37 | -------------------------------------------------------------------------------- /node_modules/wrappy/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "wrappy@1", 6 | "scope": null, 7 | "escapedName": "wrappy", 8 | "name": "wrappy", 9 | "rawSpec": "1", 10 | "spec": ">=1.0.0 <2.0.0", 11 | "type": "range" 12 | }, 13 | "/data/plugins/music_service/volspotconnect/node_modules/inflight" 14 | ] 15 | ], 16 | "_from": "wrappy@>=1.0.0 <2.0.0", 17 | "_id": "wrappy@1.0.2", 18 | "_inCache": true, 19 | "_installable": true, 20 | "_location": "/wrappy", 21 | "_nodeVersion": "5.10.1", 22 | "_npmOperationalInternal": { 23 | "host": "packages-16-east.internal.npmjs.com", 24 | "tmp": "tmp/wrappy-1.0.2.tgz_1463527848281_0.037129373755306005" 25 | }, 26 | "_npmUser": { 27 | "name": "zkat", 28 | "email": "kat@sykosomatic.org" 29 | }, 30 | "_npmVersion": "3.9.1", 31 | "_phantomChildren": {}, 32 | "_requested": { 33 | "raw": "wrappy@1", 34 | "scope": null, 35 | "escapedName": "wrappy", 36 | "name": "wrappy", 37 | "rawSpec": "1", 38 | "spec": ">=1.0.0 <2.0.0", 39 | "type": "range" 40 | }, 41 | "_requiredBy": [ 42 | "/inflight", 43 | "/once" 44 | ], 45 | "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 46 | "_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", 47 | "_shrinkwrap": null, 48 | "_spec": "wrappy@1", 49 | "_where": "/data/plugins/music_service/volspotconnect/node_modules/inflight", 50 | "author": { 51 | "name": "Isaac Z. Schlueter", 52 | "email": "i@izs.me", 53 | "url": "http://blog.izs.me/" 54 | }, 55 | "bugs": { 56 | "url": "https://github.com/npm/wrappy/issues" 57 | }, 58 | "dependencies": {}, 59 | "description": "Callback wrapping utility", 60 | "devDependencies": { 61 | "tap": "^2.3.1" 62 | }, 63 | "directories": { 64 | "test": "test" 65 | }, 66 | "dist": { 67 | "shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", 68 | "tarball": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" 69 | }, 70 | "files": [ 71 | "wrappy.js" 72 | ], 73 | "gitHead": "71d91b6dc5bdeac37e218c2cf03f9ab55b60d214", 74 | "homepage": "https://github.com/npm/wrappy", 75 | "license": "ISC", 76 | "main": "wrappy.js", 77 | "maintainers": [ 78 | { 79 | "name": "isaacs", 80 | "email": "i@izs.me" 81 | }, 82 | { 83 | "name": "zkat", 84 | "email": "kat@sykosomatic.org" 85 | } 86 | ], 87 | "name": "wrappy", 88 | "optionalDependencies": {}, 89 | "readme": "ERROR: No README data found!", 90 | "repository": { 91 | "type": "git", 92 | "url": "git+https://github.com/npm/wrappy.git" 93 | }, 94 | "scripts": { 95 | "test": "tap --coverage test/*.js" 96 | }, 97 | "version": "1.0.2" 98 | } 99 | -------------------------------------------------------------------------------- /node_modules/wrappy/wrappy.js: -------------------------------------------------------------------------------- 1 | // Returns a wrapper function that returns a wrapped callback 2 | // The wrapper function should do some stuff, and return a 3 | // presumably different callback function. 4 | // This makes sure that own properties are retained, so that 5 | // decorations and such are not lost along the way. 6 | module.exports = wrappy 7 | function wrappy (fn, cb) { 8 | if (fn && cb) return wrappy(fn)(cb) 9 | 10 | if (typeof fn !== 'function') 11 | throw new TypeError('need wrapper function') 12 | 13 | Object.keys(fn).forEach(function (k) { 14 | wrapper[k] = fn[k] 15 | }) 16 | 17 | return wrapper 18 | 19 | function wrapper() { 20 | var args = new Array(arguments.length) 21 | for (var i = 0; i < args.length; i++) { 22 | args[i] = arguments[i] 23 | } 24 | var ret = fn.apply(this, args) 25 | var cb = args[args.length-1] 26 | if (typeof ret === 'function' && ret !== cb) { 27 | Object.keys(cb).forEach(function (k) { 28 | ret[k] = cb[k] 29 | }) 30 | } 31 | return ret 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kodi", 3 | "version": "2.3.1", 4 | "description": "Installs Kodi on top of Volumio 2.x, for the moment only Krypton is supported in Debian Jessie. This means the Raspberry Pi 4 is not yet supported, since it requires Debian Buster to function.", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "Saiyato", 10 | "license": "", 11 | "volumio_info": { 12 | "prettyName": "Kodi Krypton", 13 | "icon": "fa fa-tv", 14 | "plugin_type": "miscellanea" 15 | }, 16 | "dependencies": { 17 | "fs-extra": "^0.28.0", 18 | "kew": "^0.7.0", 19 | "net": "^1.0.2", 20 | "v-conf": "^0.10.0" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /policies/10-permissions.rules: -------------------------------------------------------------------------------- 1 | # input 2 | KERNEL=="mouse*|mice|event*", MODE="0660", GROUP="input" 3 | KERNEL=="ts[0-9]*|uinput", MODE="0660", GROUP="input" 4 | KERNEL=="js[0-9]*", MODE="0660", GROUP="input" 5 | # tty 6 | KERNEL=="tty[0-9]*", MODE="0666", GROUP="tty" 7 | # vchiq / vcio / vc-sm 8 | SUBSYSTEM=="vchiq", MODE="0660", GROUP="video" 9 | SUBSYSTEM=="bcm2708_vcio", MODE="0660", GROUP="video" 10 | SUBSYSTEM=="vc-sm", MODE="0660", GROUP="video" 11 | -------------------------------------------------------------------------------- /policies/50-kodi-actions.pkla: -------------------------------------------------------------------------------- 1 | [Actions for kodi user] 2 | Identity=unix-user:kodi 3 | Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedesktop.udisks.*;org.freedesktop.login1.* 4 | ResultAny=yes 5 | ResultInactive=yes 6 | ResultActive=yes 7 | -------------------------------------------------------------------------------- /policies/99-input.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="input", MODE="0660", GROUP="input" 2 | KERNEL=="tty[0-9]*", MODE="0660", GROUP="tty" 3 | -------------------------------------------------------------------------------- /templates/asound.kodi: -------------------------------------------------------------------------------- 1 | #KODI 2 | defaults.ctl.card ${CTL_CARD_INDEX} 3 | defaults.pcm.card ${PCM_CARD_INDEX} 4 | #ENDOFKODI 5 | -------------------------------------------------------------------------------- /uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Uninstalling Kodi configs" 3 | 4 | # Remove policies 5 | echo "Removing policies..." 6 | rm /etc/udev/rules.d/99-input.rules 7 | rm /etc/udev/rules.d/10-permissions.rules 8 | rm /etc/ld.so.conf.d/00-vmcs.conf 9 | rm /etc/polkit-1/localauthority/50-local.d/50-kodi-actions.pkla 10 | ldconfig 11 | 12 | # Update the GPU memory 13 | echo "Update the GPU memory..." 14 | CONFIG="/boot/config.txt" 15 | echo "Updating GPU memory back to 16MB..." 16 | sed -i -- 's|.*gpu_mem.*|gpu_mem=16|g' $CONFIG 17 | 18 | # Remove the systemd unit 19 | echo "Removing the systemd unit..." 20 | rm /etc/systemd/system/kodi.service 21 | systemctl daemon-reload 22 | 23 | echo "Uninstalling packages and purging..." 24 | apt-get purge --auto-remove gdb kodi --yes 25 | 26 | # Own the files before deleting them 27 | echo "Cleaning up directories..." 28 | chown -R volumio /data/configuration/miscellanea/kodi/ 29 | rm -rf /data/configuration/miscellanea/kodi/ 30 | userdel -r kodi 31 | 32 | # The end... 33 | echo "pluginuninstallend" -------------------------------------------------------------------------------- /unit/kodi.service: -------------------------------------------------------------------------------- 1 | # Kodi as-a-service 2 | [Unit] 3 | Description = Kodi Media Center 4 | 5 | # if you don't need the MySQL DB backend, this should be sufficient 6 | After = systemd-user-sessions.service network.target sound.target 7 | 8 | # if you need the MySQL DB backend, use this block instead of the previous 9 | #After = systemd-user-sessions.service network.target sound.target mysql.service 10 | #Wants = mysql.service 11 | 12 | [Service] 13 | User = kodi 14 | #Group = root 15 | Type = simple 16 | #PAMName = login # you might want to try this one, did not work on all systems 17 | #Environment="AE_SINK=ALSA" 18 | ExecStart = /usr/bin/kodi-standalone -- :0 -nolisten tcp vt7 19 | Restart = on-abort 20 | RestartSec = 5 21 | 22 | [Install] 23 | WantedBy = multi-user.target 24 | -------------------------------------------------------------------------------- /volumio-kodi-plugin.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Saiyato/volumio-kodi-plugin/94ee8a3b7edc37765983c5acf805aa47c6d0a1cc/volumio-kodi-plugin.zip -------------------------------------------------------------------------------- /volumio_installer.sh: -------------------------------------------------------------------------------- 1 | # Volumio installer (workaround for fixes not in the Volumio repo) 2 | if [ ! -d /home/volumio/volumio-kodi-plugin ]; 3 | then 4 | mkdir /home/volumio/volumio-kodi-plugin 5 | else 6 | rm -rf home/volumio/volumio-kodi-plugin 7 | mkdir /home/volumio/volumio-kodi-plugin 8 | fi 9 | 10 | echo "Cloning github repo... (this might take a while)" 11 | git clone https://github.com/Saiyato/volumio-kodi-plugin /home/volumio/volumio-kodi-plugin 12 | 13 | echo "Cleaning up the directory..." 14 | cd /home/volumio/volumio-kodi-plugin 15 | rm -rf .git 16 | rm -rf images 17 | rm -rf kodi_configuration 18 | rm -rf policies 19 | rm -rf unit 20 | rm .gitattributes 21 | rm README.md 22 | rm volumio_installer.sh 23 | rm volumio-kodi-plugin.zip 24 | 25 | echo "Installing plugin..." 26 | volumio plugin install 27 | echo "Done!" --------------------------------------------------------------------------------