-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js.map
1 lines (1 loc) · 8.49 KB
/
index.js.map
1
{"version":3,"sources":["webpack:///webpack/bootstrap 68271ab4a471722d6262","webpack:///./src.js","webpack:///external \"socket.io-client\"","webpack:///external \"sails.io.js\""],"names":["SailsSocket","url","io","sails","activeSocket","pathname","data","Error","Promise","resolve","reject","socket","get","body","jwr","statusCode","post","put","delete","options","request","eventIdentity","cb","on","off","headers","disconnect"],"mappings":";AAAA;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;;;;AACA;;;;;;;;KAEqBA,W;;;;;;;6BAGHC,G,EAAK;AACnB,WAAIC,KAAK,wCAAT;AACAA,UAAGC,KAAH,CAASF,GAAT,GAAeA,GAAf;AACAD,mBAAYI,YAAZ,GAA2BF,EAA3B;AACA,cAAOA,EAAP;AACD;;;yBAEWG,Q,EAAUC,I,EAAM;AAC1B,WAAIN,YAAYI,YAAZ,KAA6B,IAAjC,EAAuC;AACrC,eAAM,IAAIG,KAAJ,CAAU,yBAAV,CAAN;AACD;AACD,cAAO,IAAIC,OAAJ,CAAY,UAACC,OAAD,EAAUC,MAAV,EAAqB;AACtCV,qBAAYI,YAAZ,CAAyBO,MAAzB,CAAgCC,GAAhC,CAAoCP,QAApC,EAA8CC,IAA9C,EAAoD,UAACO,IAAD,EAAOC,GAAP,EAAe;AACjE;AACA,eAAIA,IAAIC,UAAJ,GAAiB,GAAjB,IAAwBD,IAAIC,UAAJ,IAAkB,GAA9C,EAAmD;AAAE,oBAAOL,OAAOI,GAAP,CAAP;AAAoB;AACzEL,mBAAQK,GAAR;AACD,UAJD;AAKD,QANM,CAAP;AAOD;;;0BAEYb,G,EAAKK,I,EAAM;AACtB,WAAIN,YAAYI,YAAZ,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IG,KAAJ,CAAU,yBAAV,CAAN;AACD;AACDP,mBAAYI,YAAZ,CAAyBO,MAAzB,CAAgCc,OAAhC,GAA0CA,OAA1C;AACD;;;kCAEoB;AACnB,WAAIzB,YAAYI,YAAZ,KAA6B,IAAjC,EAAuC;AACrC,eAAM,IAAIG,KAAJ,CAAU,yBAAV,CAAN;AACD;;AAEDP,mBAAYI,YAAZ,CAAyBF,EAAzB,CAA4BwB,UAA5B;AACA1B,mBAAYI,YAAZ,GAA2B,IAA3B;AACD;;;;;;AAxGkBJ,Y,CACZI,Y,GAAe,I;mBADHJ,W;;;;;;ACHrB,8C;;;;;;ACAA,yC","file":"index.js","sourcesContent":[" \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 68271ab4a471722d6262","import socketIOClient from 'socket.io-client'\nimport sailsIOClient from 'sails.io.js'\n\nexport default class SailsSocket {\n static activeSocket = null\n\n static connect (url) {\n let io = sailsIOClient(socketIOClient)\n io.sails.url = url\n SailsSocket.activeSocket = io\n return io\n }\n\n static get (pathname, data) {\n if (SailsSocket.activeSocket === null) {\n throw new Error('no socket is connected!')\n }\n return new Promise((resolve, reject) => {\n SailsSocket.activeSocket.socket.get(pathname, data, (body, jwr) => {\n // Note: According to specs we can not return more than 1 argument in a Promise\n if (jwr.statusCode < 200 || jwr.statusCode >= 400) { return reject(jwr) }\n resolve(jwr)\n })\n })\n }\n\n static post (url, data) {\n if (SailsSocket.activeSocket === null) {\n throw new Error('no socket is connected!')\n }\n return new Promise((resolve, reject) => {\n SailsSocket.activeSocket.socket.post(url, data, (body, jwr) => {\n // Note: According to specs we can not return more than 1 argument in a Promise\n if (jwr.statusCode < 200 || jwr.statusCode >= 400) { return reject(jwr) }\n resolve(jwr)\n })\n })\n }\n\n static put (url, data) {\n if (SailsSocket.activeSocket === null) {\n throw new Error('no socket is connected!')\n }\n return new Promise((resolve, reject) => {\n SailsSocket.activeSocket.socket.put(url, data, (body, jwr) => {\n // Note: According to specs we can not return more than 1 argument in a Promise\n if (jwr.statusCode < 200 || jwr.statusCode >= 400) { return reject(jwr) }\n resolve(jwr)\n })\n })\n }\n\n static delete (url, data) {\n if (SailsSocket.activeSocket === null) {\n throw new Error('no socket is connected!')\n }\n return new Promise((resolve, reject) => {\n SailsSocket.activeSocket.socket.delete(url, data, (body, jwr) => {\n // Note: According to specs we can not return more than 1 argument in a Promise\n if (jwr.statusCode < 200 || jwr.statusCode >= 400) { return reject(jwr) }\n resolve(jwr)\n })\n })\n }\n\n static request (options) {\n if (SailsSocket.activeSocket === null) {\n throw new Error('no socket is connected!')\n }\n return new Promise((resolve, reject) => {\n SailsSocket.activeSocket.socket.request(options, (body, jwr) => {\n // Note: According to specs we can not return more than 1 argument in a Promise\n if (jwr.statusCode < 200 || jwr.statusCode >= 400) { return reject(jwr) }\n resolve(jwr)\n })\n })\n }\n\n static on (eventIdentity, cb) {\n if (SailsSocket.activeSocket === null) {\n throw new Error('no socket is connected!')\n }\n SailsSocket.activeSocket.socket.on(eventIdentity, cb)\n }\n\n static off (eventIdentity, cb) {\n if (SailsSocket.activeSocket === null) {\n throw new Error('no socket is connected!')\n }\n\n SailsSocket.activeSocket.socket.off(eventIdentity, cb)\n }\n\n static setHeader (headers) {\n if (SailsSocket.activeSocket === null) {\n throw new Error('no socket is connected!')\n }\n SailsSocket.activeSocket.socket.headers = headers\n }\n\n static disconnect () {\n if (SailsSocket.activeSocket === null) {\n throw new Error('no socket is connected!')\n }\n\n SailsSocket.activeSocket.io.disconnect()\n SailsSocket.activeSocket = null\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src.js","module.exports = require(\"socket.io-client\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"socket.io-client\"\n// module id = 1\n// module chunks = 0","module.exports = require(\"sails.io.js\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"sails.io.js\"\n// module id = 2\n// module chunks = 0"],"sourceRoot":""}