rs-module-kosmos/dist/build.js.map

1 line
6.6 KiB
Plaintext

{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 911743eea92345b1a49e","webpack:///./index.js","webpack:///external {\"root\":\"RemoteStorage\",\"commonjs2\":\"remotestoragejs\",\"commonjs\":\"remotestoragejs\",\"amd\":\"remotestoragejs\"}"],"names":["RemoteStorage","require","defineModule","privateClient","extend","util","baseProperties","declareType","kosmos","spaces","getAll","store","params","createdAt","Date","toISOString","storeObject","id","remove","client","exports"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;ACtCA;;;;;;;;;AASA,KAAIA,gBAAgB,mBAAAC,CAAQ,CAAR,CAApB;;AAEAD,eAAcE,YAAd,CAA2B,QAA3B,EAAqC,UAASC,aAAT,CAAsB,kBAAtB,EAA0C;;AAE7E,OAAIC,SAASJ,cAAcK,IAAd,CAAmBD,MAAhC;;AAEA;AACA;AACA;;AAEA,OAAIE,iBAAiB;AACnB,WAAM;AACJ,eAAQ;AADJ,MADa;AAInB,kBAAa;AACX,eAAQ,QADG;AAEX,iBAAU;AAFC,MAJM;AAQnB,kBAAa;AACX,eAAQ,QADG;AAEX,iBAAU;AAFC;AARM,IAArB;;AAcAH,iBAAcI,WAAd,CAA0B,OAA1B,EAAmC;AACjC,aAAQ,QADyB;AAEjC,mBAAcH,OAAO;AACnB,aAAM;AACJ,iBAAQ;AADJ,QADa;AAInB,eAAQ;AACN,iBAAQ;AADF,QAJW;AAOnB,mBAAY;AACV,iBAAQ,QADE;AAEV,oBAAW,KAFD;AAGV,iBAAQ,CAAC,KAAD,EAAQ,MAAR,EAAgB,YAAhB,EAA8B,OAA9B;AAHE,QAPO;AAYnB,iBAAU;AACR,iBAAQ,QADA;AAER,uBAAc;AACZ,uBAAY;AACV,qBAAQ;AADE,YADA;AAIZ,mBAAQ;AACN,qBAAQ;AADF,YAJI;AAOZ,qBAAU;AACR,qBAAQ;AADA,YAPE;AAUZ,uBAAY;AACV,qBAAQ;AADE,YAVA;AAaZ,uBAAY;AACV,qBAAQ;AADE,YAbA;AAgBZ,uBAAY;AACV,qBAAQ;AADE;AAhBA;AAFN,QAZS;AAmCnB,mBAAY;AACV,iBAAQ,OADE;AAEV,oBAAW;AAFD;AAnCO,MAAP,EAuCXE,cAvCW,CAFmB;AA0CjC,iBAAY,CAAC,IAAD,EAAO,MAAP,EAAe,UAAf,EAA2B,QAA3B;AA1CqB,IAAnC;;AA6CA;AACA;AACA;;AAEA,OAAIE,SAAS;;AAEXC,aAAQ;AAENC,aAFM,oBAEG;AACP,gBAAOP,cAAcO,MAAd,CAAqB,SAArB,CAAP;AACD,QAJK;AAMNC,YANM,iBAMAC,MANA,EAMQ;AACZ,aAAI,CAACA,OAAOC,SAAZ,EAAuB;AAAED,kBAAOC,SAAP,GAAmB,IAAIC,IAAJ,GAAWC,WAAX,EAAnB;AAA8C;;AAEvE,gBAAOZ,cAAca,WAAd,CAA0B,OAA1B,cAA6CJ,OAAOK,EAApD,EAA0DL,MAA1D,CAAP;AACD,QAVK;AAYNM,aAZM,kBAYCD,EAZD,EAYK;AACT,gBAAOd,cAAce,MAAd,aAA+BD,EAA/B,CAAP;AACD;AAdK,MAFG;;AAoBX;AACAE,aAAQhB;AArBG,IAAb;;AAwBA;AACA;AACA;;AAEA,UAAO,EAAEiB,SAASZ,MAAX,EAAP;AAED,EArGD,E;;;;;;ACXA,gD","file":"/home/basti/src/remotestorage/modules/remotestorage-module-kosmos/dist/build.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"remotestoragejs\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"remotestoragejs\"], factory);\n\telse {\n\t\tvar a = typeof exports === 'object' ? factory(require(\"remotestoragejs\")) : factory(root[\"RemoteStorage\"]);\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 911743eea92345b1a49e","/**\n * File: Kosmos\n *\n * Maintainer: - Sebastian Kippe <sebastian@kip.pe>\n * Version: - 0.1.0\n *\n * This module manages data related to the Kosmos group communication suite\n */\n\nvar RemoteStorage = require('remotestoragejs');\n\nRemoteStorage.defineModule('kosmos', function(privateClient/*, publicClient*/) {\n\n var extend = RemoteStorage.util.extend;\n\n //\n // Types/Schemas\n //\n\n var baseProperties = {\n \"id\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n };\n\n privateClient.declareType('space', {\n \"type\": \"object\",\n \"properties\": extend({\n \"id\": {\n \"type\": \"string\",\n },\n \"name\": {\n \"type\": \"string\",\n },\n \"protocol\": {\n \"type\": \"string\",\n \"default\": \"IRC\",\n \"enum\": [\"IRC\", \"XMPP\", \"Mattermost\", \"Slack\"]\n },\n \"server\": {\n \"type\": \"object\",\n \"properties\": {\n \"hostname\": {\n \"type\": \"string\"\n },\n \"port\": {\n \"type\": \"number\"\n },\n \"secure\": {\n \"type\": \"boolean\"\n },\n \"username\": {\n \"type\": \"string\"\n },\n \"password\": {\n \"type\": \"string\"\n },\n \"nickname\": {\n \"type\": \"string\"\n },\n }\n },\n \"channels\": {\n \"type\": \"array\",\n \"default\": []\n },\n }, baseProperties),\n \"required\": [\"id\", \"name\", \"protocol\", \"server\"]\n });\n\n //\n // Public functions\n //\n\n var kosmos = {\n\n spaces: {\n\n getAll() {\n return privateClient.getAll('spaces/');\n },\n\n store(params) {\n if (!params.createdAt) { params.createdAt = new Date().toISOString(); }\n\n return privateClient.storeObject('space', `spaces/${params.id}`, params);\n },\n\n remove(id) {\n return privateClient.remove(`spaces/${id}`);\n }\n\n },\n\n // TODO remove\n client: privateClient\n };\n\n //\n // Return public functions\n //\n\n return { exports: kosmos };\n\n});\n\n\n\n// WEBPACK FOOTER //\n// ./index.js","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"RemoteStorage\",\"commonjs2\":\"remotestoragejs\",\"commonjs\":\"remotestoragejs\",\"amd\":\"remotestoragejs\"}\n// module id = 1\n// module chunks = 0"],"sourceRoot":""}