1 line
4.5 KiB
Plaintext
1 line
4.5 KiB
Plaintext
{"version":3,"sources":["webpack://pawsqlite-cordova-adapter/./src/log.mjs","webpack://pawsqlite-cordova-adapter/./src/psql_adapter_error.mjs","webpack://pawsqlite-cordova-adapter/webpack/bootstrap","webpack://pawsqlite-cordova-adapter/webpack/runtime/define property getters","webpack://pawsqlite-cordova-adapter/webpack/runtime/hasOwnProperty shorthand","webpack://pawsqlite-cordova-adapter/webpack/runtime/make namespace object","webpack://pawsqlite-cordova-adapter/./src/psql_adapter.mjs"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;AAEO;AACP;AACA;AACA,G;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA,C;;;;;;;;;;;;;;ACbO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;;;;;;UC3BA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCrBA;WACA;WACA;WACA;WACA,wCAAwC,yCAAyC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,sDAAsD,kBAAkB;WACxE;WACA,+CAA+C,cAAc;WAC7D,E;;;;;;;;;;;;;;;;ACN4D;AACf;;;AAG7C,iEAAe;AACf;;AAEA;AACA;AACA,iBAAiB,qEAAgB;AACjC,KAAK;AACL,GAAG;AACH;AACA;AACA,iBAAiB,qEAAgB;AACjC,KAAK;AACL,GAAG;AACH;AACA,IAAI,6CAAG;AACP;AACA,iBAAiB,qEAAgB;AACjC,KAAK;AACL,GAAG;AACH;AACA;AACA,iBAAiB,qEAAgB;AACjC,KAAK;AACL,GAAG;;AAEH,SAAS,iDAAW;AACpB,CAAC,EAAC","file":"pawsqlite-cordova-adapter.js","sourcesContent":["let DEBUG = false;\n\nexport function log(...args) {\n if (DEBUG) {\n console.log(...args);\n } \n}\n\nexport function enableDebug(active) {\n DEBUG = !!active;\n log(\"PawSQLite-Cordova-Adapter: debugging \" + (\n DEBUG ? \"enabled\" : \"disabled\")\n );\n}","export class PSQLAdapterError extends Error {\n constructor(response) {\n if (response.hasOwnProperty(\"message\")) {\n super(response.message);\n } else {\n super();\n }\n if (response.hasOwnProperty(\"name\")) {\n this.name = response.name;\n } else {\n this.name = \"PSQLAdapterError\";\n }\n if (response.hasOwnProperty(\"trace\")) {\n this.trace = response.trace;\n }\n }\n\n toString() {\n let str = this.name;\n if (this.hasOwnProperty(\"message\")) {\n str += \": \" + this.message;\n }\n if (this.hasOwnProperty(\"trace\")) {\n str += \"\\n\" + this.trace;\n }\n return str;\n }\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { PSQLAdapterError } from \"./psql_adapter_error.mjs\";\nimport { log, enableDebug } from \"./log.mjs\";\n\n\nexport default {\n name: \"PawSQLiteCordovaAdapter\",\n\n open: (dbName) => new Promise((resolve, reject) => {\n cordova.exec(resolve, (e) => {\n reject(new PSQLAdapterError(e));\n }, \"PawSQLite\", \"open\", [dbName]);\n }),\n close: (dbName) => new Promise((resolve, reject) => {\n cordova.exec(resolve, (e) => {\n reject(new PSQLAdapterError(e));\n }, \"PawSQLite\", \"close\", [dbName]);\n }),\n sql: (dbName, sql, ...args) => new Promise((resolve, reject) => {\n log(sql);\n cordova.exec(resolve, (e) => {\n reject(new PSQLAdapterError(e));\n }, \"PawSQLite\", \"sql\", [dbName, sql, ...args]);\n }),\n delete: (dbName) => new Promise((resolve, reject) => {\n cordova.exec(resolve, (e) => {\n reject(new PSQLAdapterError(e));\n }, \"PawSQLite\", \"delete\", [dbName]);\n }),\n\n debug: enableDebug\n};\n"],"sourceRoot":""} |