webdetector/.cache/f1/2cafe2d10abb32a500788ed211ce36.json
2018-12-21 13:36:28 +01:00

1 line
13 KiB
JSON

{"id":"Gfnq","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/@pushrocks/smartdelay/ts/index.ts","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/package.json","includedInParent":true,"mtime":1545395749058},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/@pushrocks/smartdelay/package.json","includedInParent":true,"mtime":1545395354774},{"name":"@pushrocks/smartpromise","loc":{"line":11,"column":29},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/@pushrocks/smartdelay/dist/index.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/@pushrocks/smartpromise/dist/index.js"}],"generated":{"js":"\"use strict\";var e=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))(function(o,n){function s(e){try{u(r.next(e))}catch(t){n(t)}}function c(e){try{u(r.throw(e))}catch(t){n(t)}}function u(e){e.done?o(e.value):new i(function(t){t(e.value)}).then(s,c)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(exports,\"__esModule\",{value:!0});const t=require(\"@pushrocks/smartpromise\");exports.delayFor=((t,i)=>e(this,void 0,void 0,function*(){return yield new Promise((e,i)=>{setTimeout(()=>{e()},t)}),i})),exports.delayForRandom=((t,i,r)=>e(this,void 0,void 0,function*(){return yield new Promise((e,r)=>{setTimeout(()=>{e()},Math.random()*(i-t)+t)}),r}));class i{constructor(e,i){this._cancelled=!1,this._deferred=t.defer(),this.promise=this._deferred.promise,this._timeout=setTimeout(()=>{this._cancelled||this._deferred.resolve(i)},e)}makeUnrefed(){this._timeout.unref()}cancel(){this._cancelled=!0,this.makeUnrefed()}}exports.Timeout=i;","map":{"mappings":[{"source":"../ts/index.ts","name":null,"original":{"line":1,"column":0},"generated":{"line":1,"column":355}},{"source":"../ts/index.ts","name":null,"original":{"line":1,"column":0},"generated":{"line":1,"column":361}},{"source":"../ts/index.ts","name":null,"original":{"line":1,"column":0},"generated":{"line":1,"column":363}},{"source":"../ts/index.ts","name":null,"original":{"line":1,"column":0},"generated":{"line":1,"column":371}},{"source":"../ts/index.ts","name":null,"original":{"line":8,"column":11},"generated":{"line":1,"column":398}},{"source":"../ts/index.ts","name":null,"original":{"line":8,"column":11},"generated":{"line":1,"column":406}},{"source":"../ts/index.ts","name":null,"original":{"line":8,"column":22},"generated":{"line":1,"column":415}},{"source":"../ts/index.ts","name":null,"original":{"line":8,"column":32},"generated":{"line":1,"column":417}},{"source":"../ts/index.ts","name":null,"original":{"line":8,"column":59},"generated":{"line":1,"column":419}},{"source":"../ts/index.ts","name":null,"original":{"line":8,"column":73},"generated":{"line":1,"column":423}},{"source":"../ts/index.ts","name":null,"original":{"line":8,"column":73},"generated":{"line":1,"column":425}},{"source":"../ts/index.ts","name":null,"original":{"line":8,"column":73},"generated":{"line":1,"column":435}},{"source":"../ts/index.ts","name":null,"original":{"line":8,"column":73},"generated":{"line":1,"column":442}},{"source":"../ts/index.ts","name":null,"original":{"line":8,"column":73},"generated":{"line":1,"column":444}},{"source":"../ts/index.ts","name":null,"original":{"line":14,"column":2},"generated":{"line":1,"column":456}},{"source":"../ts/index.ts","name":null,"original":{"line":9,"column":8},"generated":{"line":1,"column":469}},{"source":"../ts/index.ts","name":null,"original":{"line":9,"column":12},"generated":{"line":1,"column":473}},{"source":"../ts/index.ts","name":null,"original":{"line":9,"column":20},"generated":{"line":1,"column":481}},{"source":"../ts/index.ts","name":null,"original":{"line":9,"column":21},"generated":{"line":1,"column":482}},{"source":"../ts/index.ts","name":null,"original":{"line":9,"column":30},"generated":{"line":1,"column":484}},{"source":"../ts/index.ts","name":null,"original":{"line":10,"column":4},"generated":{"line":1,"column":489}},{"source":"../ts/index.ts","name":null,"original":{"line":10,"column":15},"generated":{"line":1,"column":500}},{"source":"../ts/index.ts","name":null,"original":{"line":11,"column":6},"generated":{"line":1,"column":505}},{"source":"../ts/index.ts","name":null,"original":{"line":12,"column":7},"generated":{"line":1,"column":510}},{"source":"../ts/index.ts","name":null,"original":{"line":14,"column":9},"generated":{"line":1,"column":515}},{"source":"../ts/index.ts","name":null,"original":{"line":20,"column":11},"generated":{"line":1,"column":520}},{"source":"../ts/index.ts","name":null,"original":{"line":20,"column":11},"generated":{"line":1,"column":528}},{"source":"../ts/index.ts","name":null,"original":{"line":20,"column":28},"generated":{"line":1,"column":543}},{"source":"../ts/index.ts","name":null,"original":{"line":21,"column":2},"generated":{"line":1,"column":545}},{"source":"../ts/index.ts","name":null,"original":{"line":22,"column":2},"generated":{"line":1,"column":547}},{"source":"../ts/index.ts","name":null,"original":{"line":23,"column":2},"generated":{"line":1,"column":549}},{"source":"../ts/index.ts","name":null,"original":{"line":24,"column":4},"generated":{"line":1,"column":553}},{"source":"../ts/index.ts","name":null,"original":{"line":24,"column":4},"generated":{"line":1,"column":555}},{"source":"../ts/index.ts","name":null,"original":{"line":24,"column":4},"generated":{"line":1,"column":565}},{"source":"../ts/index.ts","name":null,"original":{"line":24,"column":4},"generated":{"line":1,"column":572}},{"source":"../ts/index.ts","name":null,"original":{"line":24,"column":4},"generated":{"line":1,"column":574}},{"source":"../ts/index.ts","name":null,"original":{"line":30,"column":2},"generated":{"line":1,"column":586}},{"source":"../ts/index.ts","name":null,"original":{"line":25,"column":8},"generated":{"line":1,"column":599}},{"source":"../ts/index.ts","name":null,"original":{"line":25,"column":12},"generated":{"line":1,"column":603}},{"source":"../ts/index.ts","name":null,"original":{"line":25,"column":20},"generated":{"line":1,"column":611}},{"source":"../ts/index.ts","name":null,"original":{"line":25,"column":21},"generated":{"line":1,"column":612}},{"source":"../ts/index.ts","name":null,"original":{"line":25,"column":30},"generated":{"line":1,"column":614}},{"source":"../ts/index.ts","name":null,"original":{"line":26,"column":4},"generated":{"line":1,"column":619}},{"source":"../ts/index.ts","name":null,"original":{"line":26,"column":15},"generated":{"line":1,"column":630}},{"source":"../ts/index.ts","name":null,"original":{"line":27,"column":6},"generated":{"line":1,"column":635}},{"source":"../ts/index.ts","name":null,"original":{"line":28,"column":7},"generated":{"line":1,"column":640}},{"source":"../ts/index.ts","name":null,"original":{"line":28,"column":12},"generated":{"line":1,"column":645}},{"source":"../ts/index.ts","name":null,"original":{"line":28,"column":24},"generated":{"line":1,"column":655}},{"source":"../ts/index.ts","name":null,"original":{"line":28,"column":47},"generated":{"line":1,"column":657}},{"source":"../ts/index.ts","name":null,"original":{"line":28,"column":71},"generated":{"line":1,"column":660}},{"source":"../ts/index.ts","name":null,"original":{"line":30,"column":9},"generated":{"line":1,"column":665}},{"source":"../ts/index.ts","name":null,"original":{"line":33,"column":0},"generated":{"line":1,"column":670}},{"source":"../ts/index.ts","name":null,"original":{"line":33,"column":13},"generated":{"line":1,"column":676}},{"source":"../ts/index.ts","name":null,"original":{"line":38,"column":2},"generated":{"line":1,"column":678}},{"source":"../ts/index.ts","name":null,"original":{"line":38,"column":14},"generated":{"line":1,"column":690}},{"source":"../ts/index.ts","name":null,"original":{"line":38,"column":36},"generated":{"line":1,"column":692}},{"source":"../ts/index.ts","name":null,"original":{"line":37,"column":10},"generated":{"line":1,"column":695}},{"source":"../ts/index.ts","name":null,"original":{"line":37,"column":10},"generated":{"line":1,"column":700}},{"source":"../ts/index.ts","name":null,"original":{"line":37,"column":32},"generated":{"line":1,"column":712}},{"source":"../ts/index.ts","name":null,"original":{"line":39,"column":4},"generated":{"line":1,"column":714}},{"source":"../ts/index.ts","name":null,"original":{"line":39,"column":9},"generated":{"line":1,"column":719}},{"source":"../ts/index.ts","name":null,"original":{"line":39,"column":21},"generated":{"line":1,"column":729}},{"source":"../ts/index.ts","name":null,"original":{"line":39,"column":34},"generated":{"line":1,"column":731}},{"source":"../ts/index.ts","name":null,"original":{"line":40,"column":4},"generated":{"line":1,"column":739}},{"source":"../ts/index.ts","name":null,"original":{"line":40,"column":9},"generated":{"line":1,"column":744}},{"source":"../ts/index.ts","name":null,"original":{"line":40,"column":19},"generated":{"line":1,"column":752}},{"source":"../ts/index.ts","name":null,"original":{"line":40,"column":24},"generated":{"line":1,"column":757}},{"source":"../ts/index.ts","name":null,"original":{"line":40,"column":34},"generated":{"line":1,"column":767}},{"source":"../ts/index.ts","name":null,"original":{"line":41,"column":4},"generated":{"line":1,"column":775}},{"source":"../ts/index.ts","name":null,"original":{"line":41,"column":9},"generated":{"line":1,"column":780}},{"source":"../ts/index.ts","name":null,"original":{"line":41,"column":20},"generated":{"line":1,"column":789}},{"source":"../ts/index.ts","name":null,"original":{"line":41,"column":31},"generated":{"line":1,"column":800}},{"source":"../ts/index.ts","name":null,"original":{"line":42,"column":11},"generated":{"line":1,"column":805}},{"source":"../ts/index.ts","name":null,"original":{"line":42,"column":16},"generated":{"line":1,"column":810}},{"source":"../ts/index.ts","name":null,"original":{"line":43,"column":8},"generated":{"line":1,"column":822}},{"source":"../ts/index.ts","name":null,"original":{"line":43,"column":13},"generated":{"line":1,"column":827}},{"source":"../ts/index.ts","name":null,"original":{"line":43,"column":23},"generated":{"line":1,"column":837}},{"source":"../ts/index.ts","name":null,"original":{"line":43,"column":31},"generated":{"line":1,"column":845}},{"source":"../ts/index.ts","name":null,"original":{"line":45,"column":7},"generated":{"line":1,"column":849}},{"source":"../ts/index.ts","name":null,"original":{"line":48,"column":2},"generated":{"line":1,"column":852}},{"source":"../ts/index.ts","name":null,"original":{"line":49,"column":4},"generated":{"line":1,"column":866}},{"source":"../ts/index.ts","name":null,"original":{"line":49,"column":9},"generated":{"line":1,"column":871}},{"source":"../ts/index.ts","name":null,"original":{"line":49,"column":18},"generated":{"line":1,"column":880}},{"source":"../ts/index.ts","name":null,"original":{"line":52,"column":2},"generated":{"line":1,"column":888}},{"source":"../ts/index.ts","name":null,"original":{"line":53,"column":4},"generated":{"line":1,"column":897}},{"source":"../ts/index.ts","name":null,"original":{"line":53,"column":9},"generated":{"line":1,"column":902}},{"source":"../ts/index.ts","name":null,"original":{"line":53,"column":22},"generated":{"line":1,"column":914}},{"source":"../ts/index.ts","name":null,"original":{"line":54,"column":4},"generated":{"line":1,"column":916}},{"source":"../ts/index.ts","name":null,"original":{"line":54,"column":9},"generated":{"line":1,"column":921}},{"source":"../ts/index.ts","name":null,"original":{"line":33,"column":0},"generated":{"line":1,"column":936}},{"source":"../ts/index.ts","name":null,"original":{"line":33,"column":0},"generated":{"line":1,"column":944}},{"source":"../ts/index.ts","name":null,"original":{"line":33,"column":0},"generated":{"line":1,"column":952}}],"sources":{"../ts/index.ts":"import * as smartpromise from '@pushrocks/smartpromise';\n\n/**\n * delay something, works like setTimeout\n * @param timeInMillisecond\n * @param passOn\n */\nexport let delayFor = async <T>(timeInMillisecond: number, passOn?: T) => {\n await new Promise((resolve, reject) => {\n setTimeout(() => {\n resolve();\n }, timeInMillisecond);\n });\n return passOn;\n};\n\n/**\n * delay for a random time\n */\nexport let delayForRandom = async <T>(\n timeMinInMillisecond: number,\n timeMaxInMillisecond: number,\n passOn?: T\n) => {\n await new Promise((resolve, reject) => {\n setTimeout(() => {\n resolve();\n }, Math.random() * (timeMaxInMillisecond - timeMinInMillisecond) + timeMinInMillisecond);\n });\n return passOn;\n};\n\nexport class Timeout<T> {\n promise: Promise<T>;\n private _deferred: smartpromise.Deferred<T>;\n private _timeout: any;\n private _cancelled: boolean = false;\n constructor(timeInMillisecondArg, passOn?: T) {\n this._deferred = smartpromise.defer<T>();\n this.promise = this._deferred.promise;\n this._timeout = setTimeout(() => {\n if (!this._cancelled) {\n this._deferred.resolve(passOn);\n }\n }, timeInMillisecondArg);\n }\n\n makeUnrefed() {\n this._timeout.unref();\n }\n\n cancel() {\n this._cancelled = true;\n this.makeUnrefed();\n }\n}\n"},"lineCount":null}},"hash":"b36961878763dfb1fc8e011cee725006","cacheData":{"env":{}}}