generated from Watemlifts/pixi.js
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ask-pass.js.map
1 lines (1 loc) · 7.91 KB
/
ask-pass.js.map
1
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"path\"","webpack:///(webpack)/buildin/module.js","webpack:///./app/node_modules/keytar/build/Release/keytar.node","webpack:///./app/node_modules/keytar/lib/keytar.js","webpack:///./app/src/lib/stores/token-store.ts","webpack:///./app/src/lib/auth.ts","webpack:///./app/src/ask-pass/ask-pass.ts","webpack:///./app/src/ask-pass/main.ts"],"names":[],"mappings":"0BACA,cAMA,IACA,iBAGA,mBACA,CACA,IACA,aAIA,mCAGA,aAGA,OACA,OAIA,OAzBA,YA4BA,MAGA,uBACA,GACA,kCACA,CACA,gBACA,cAGA,OAGA,iBACA,sCAAiD,CACjD,UAGA,iBACA,YACA,qBAA2B,UAA0B,UACrD,YAAiC,CAAe,QAChD,EAEA,aADA,QAIA,mBAAsD,wCAA+D,SAGrH,MAIA,0BCnEA,kB,qBCAA,qBACA,CAoBA,SAnBA,yCACA,UAEA,4BACA,qCACA,CACA,4BACA,UACA,CAEA,iCACA,CACA,4BACA,UACA,CAEA,sBAEA,sBCpBA,wBAA6B,qCAAqD,GAAK,gBAAyC,WAAE,SAAmB,kCAA+D,O,wCCEpN,eACA,QACA,8BAEA,iBAEA,aACA,IACA,qDACA,UAEA,GAEA,KAEA,IACA,EAEA,mBAEA,qBAtBA,WAwBA,UACA,0BACA,YACA,eAEA,oBACA,mBAEA,6BACA,YACA,eACA,eAEA,qBACA,qBAEA,8BACA,YACA,eAEA,oBACA,sBAEA,0BACA,YAEA,oBACA,kBAEA,6BACA,YAEA,oBACA,qBACA,kFC1DA,aAca,aACX,CACA,QAd2C,eAC3C,OAAO,GACR,oBAaC,QAX4B,aAC5B,OAAO,GACR,kBAMyB,WAJO,aAC/B,OAAO,GACR,kDCJiC,aAChC,MAA0B,GAE1B,eAAiB,GAAV,CAAwB,OAChC,yCAVD,WACA,EAIA,iBAJiC,WAC/B,OAAO,GAAkB,EAC1B,WAGD,E,wFCRA,qBACA,OAEA,GACA,E,kBACE,iBAEA,MAAM,GAAW,QAAQ,IACzB,oBAAgB,IAAZ,KACF,CADsB,KAAS,aAIjC,SAAI,EAAO,WACT,YACD,SAAM,GAAI,EAAO,WAAW,YAC3B,MAAM,GAAW,QAAQ,IACzB,oBAAgB,IAAZ,KACF,CADsB,KAAS,aAIjC,WAAM,GAAM,EACZ,2BAAO,MAAM,cACd,YAED,OACD,wBCzBD,mDAIA,qBAEA,GAAM,EAAS,QAAQ,KAAK,GAC5B,EAAkB,qBAAQ,KAAK,KAE3B,aAAQ,OACR,iBAAQ,OAEX,MALD","file":"ask-pass.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 \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\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.l = 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// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 7);\n","module.exports = require(\"path\");","module.exports = function(module) {\r\n\tif (!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif (!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n","const path = require('path');const filePath = path.join(__dirname, \"keytar.node\");try { global.process.dlopen(module, filePath); } catch(exception) { throw new Error('Cannot open ' + filePath + ': ' + exception); }","var keytar = require('../build/Release/keytar.node')\n\nfunction checkRequired(val, name) {\n if (!val || val.length <= 0) {\n throw new Error(name + ' is required.');\n }\n}\n\nfunction callbackPromise(callback) {\n if (typeof callback === 'function') {\n return new Promise(function(resolve, reject) {\n callback((err, val) => {\n if (err) {\n reject(err)\n } else {\n resolve(val)\n }\n })\n })\n } else {\n throw new Error('Callback required')\n }\n}\n\nmodule.exports = {\n getPassword: function (service, account) {\n checkRequired(service, 'Service')\n checkRequired(account, 'Account')\n\n return callbackPromise(callback => keytar.getPassword(service, account, callback))\n },\n\n setPassword: function (service, account, password) {\n checkRequired(service, 'Service')\n checkRequired(account, 'Account')\n checkRequired(password, 'Password')\n\n return callbackPromise(callback => keytar.setPassword(service, account, password, callback))\n },\n\n deletePassword: function (service, account) {\n checkRequired(service, 'Service')\n checkRequired(account, 'Account')\n\n return callbackPromise(callback => keytar.deletePassword(service, account, callback))\n },\n\n findPassword: function (service) {\n checkRequired(service, 'Service')\n\n return callbackPromise(callback => keytar.findPassword(service, callback))\n },\n\n findCredentials: function (service) {\n checkRequired(service, 'Service')\n\n return callbackPromise(callback => keytar.findCredentials(service, callback))\n }\n}\n","import * as keytar from 'keytar'\n\nfunction setItem(key: string, login: string, value: string) {\n return keytar.setPassword(key, login, value)\n}\n\nfunction getItem(key: string, login: string) {\n return keytar.getPassword(key, login)\n}\n\nfunction deleteItem(key: string, login: string) {\n return keytar.deletePassword(key, login)\n}\n\nexport const TokenStore = {\n setItem,\n getItem,\n deleteItem,\n}\n","import { Account } from '../models/account'\n\n/** Get the auth key for the user. */\nexport function getKeyForAccount(account: Account): string {\n return getKeyForEndpoint(account.endpoint)\n}\n\n/** Get the auth key for the endpoint. */\nexport function getKeyForEndpoint(endpoint: string): string {\n const appName = __DEV__ ? 'GitHub Desktop Dev' : 'GitHub'\n\n return `${appName} - ${endpoint}`\n}\n","import { getKeyForEndpoint } from '../lib/auth'\nimport { TokenStore } from '../lib/stores/token-store'\n\n/** Parse the GIT_ASKPASS prompt and determine the appropriate response. */\nexport async function responseForPrompt(\n prompt: string\n): Promise<string | null> {\n const username = process.env.DESKTOP_USERNAME\n if (username == null || username.length === 0) {\n return null\n }\n\n if (prompt.startsWith('Username')) {\n return username\n } else if (prompt.startsWith('Password')) {\n const endpoint = process.env.DESKTOP_ENDPOINT\n if (endpoint == null || endpoint.length === 0) {\n return null\n }\n\n const key = getKeyForEndpoint(endpoint)\n return await TokenStore.getItem(key, username)\n }\n\n return null\n}\n","/**\n * This will be run by the `ask-pass-trampoline`.\n */\n\nimport { responseForPrompt } from './ask-pass'\n\nconst prompt = process.argv[2]\nresponseForPrompt(prompt).then(response => {\n if (response) {\n process.stdout.write(response)\n process.stdout.end()\n }\n})\n"],"sourceRoot":""}