thedesk/app/node_modules/electron-publish/out/publisher.js.map

2 lines
6.4 KiB
Plaintext
Raw Normal View History

2019-09-13 00:38:13 +10:00
{"version":3,"sources":["../src/publisher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;;AAMA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;AAWA,MAAM,kBAAkB,GAAG;AACzB,EAAA,UAAU,EAAE,GADa;AAEzB,EAAA,KAAK,EAAE;AAFkB,CAA3B;;AAaM,MAAgB,SAAhB,CAAyB;AAC7B,EAAA,WAAA,CAAyC,OAAzC,EAAgE;AAAvB,SAAA,OAAA,GAAA,OAAA;AACxC;;AAMS,EAAA,iBAAiB,CAAC,QAAD,EAAmB,IAAnB,EAA+B;AACxD,uBAAI,IAAJ,CAAS;AAAC,MAAA,IAAI,EAAE,QAAP;AAAiB,MAAA,QAAQ,EAAE,KAAK;AAAhC,KAAT,EAAwD,WAAxD;;AACA,QAAI,KAAK,OAAL,CAAa,QAAb,IAAyB,IAAzB,IAAiC,IAAI,GAAI,MAAM,IAAnD,EAA0D;AACxD,aAAO,IAAP;AACD;;AACD,WAAO,KAAK,OAAL,CAAa,QAAb,CAAsB,SAAtB,CAAgC,GAAG,IAAI,MAAJ,CAAW,iBAAU,CAArB,CAAuB,2BAA2B,iBAAM,KAAN,CAAY,QAAZ,CAAqB,OAAO,KAAK,YAAY,EAAlI,EAAoI,MAAA,CAAA,MAAA,CAAA;AAAG,MAAA,KAAK,EAAE;AAAV,KAAA,EAAmB,kBAAnB,CAApI,CAAP;AACD;;AAES,EAAA,8BAA8B,CAAC,IAAD,EAAe,QAAf,EAAgC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KAAK,iBAAL,CAAuB,QAAvB,EAAiC,QAAQ,CAAC,IAA1C,CAApB;AACA,UAAM,KAAK,QAAL,CAAc,QAAd,EAAwB,IAAI,CAAC,IAAL,IAAa,oBAAK,GAA1C,EAA+C,QAAQ,CAAC,IAAxD,EAA8D,CAAC,OAAD,EAAU,MAAV,KAAoB;AACtF,UAAI,WAAW,IAAI,IAAnB,EAAyB;AACvB;AACA,QAAA,WAAW,CAAC,MAAZ,CAAmB,CAAnB;AACD;;AACD,aAAO,KAAK,8BAAL,CAAoC,IAAI,CAAC,IAAzC,EAA+C,QAA/C,EAAyD,WAAzD,EAAsE,MAAtE,EAA8E,IAA9E,CAAmF,OAAnF,CAAP;AACD,KANK,EAMH,IAAI,CAAC,IANF,CAAN;AAOD;;AAvBkD;;;;AA4B/C,SAAU,QAAV,GAAkB;AACtB,QAAM,GAAG,GAAG,OAAO,CAAC,GAAR,CAAY,UAAZ,IAA0B,OAAO,CAAC,GAAR,CAAY,sBAAtC,IAAgE,OAAO,CAAC,GAAR,CAAY,UAA5E,IAA0F,OAAO,CAAC,GAAR,CAAY,eAAtG,IAAyH,OAAO,CAAC,GAAR,CAAY,YAAjJ;AACA,SAAO,GAAG,IAAI,IAAP,IAAe,GAAG,CAAC,MAAJ,GAAa,CAA5B,GAAgC,GAAhC,GAAsC,IAA7C;AACD,C","sourcesContent":["import { Arch, log } from \"builder-util\"\nimport { CancellationToken, ProgressCallbackTransform } from \"builder-util-runtime\"\nimport { PADDING } from \"builder-util/out/log\"\nimport chalk from \"chalk\"\nimport { createReadStream, stat, Stats } from \"fs-extra\"\nimport { ClientRequest } from \"http\"\nimport { basename } from \"path\"\nimport { MultiProgress } from \"./multiProgress\"\nimport { ProgressBar } from \"./progress\"\n\nexport type PublishPolicy = \"onTag\" | \"onTagOrDraft\" | \"always\" | \"never\"\n\nexport { ProgressCallback } from \"./progress\"\n\nexport interface PublishOptions {\n publish?: PublishPolicy | null\n}\n\nexport interface PublishContext {\n readonly cancellationToken: CancellationToken\n readonly progress: MultiProgress | null\n}\n\nconst progressBarOptions = {\n incomplete: \" \",\n width: 20,\n}\n\nexport interface UploadTask {\n file: string\n fileContent?: Buffer | null\n\n arch: Arch | null\n safeArtifactName?: string | null\n}\n\nexport abstract class Publisher {\n protected constructor(protected readonly context: PublishContext) {\n }\n\n abstract get providerName(): string\n\n abstract upload(task: UploadTask): Promise<any>\n\n protected createProgressBar(fileName: string, size: number): ProgressBar | null {\n log.info({file: fileName, provider: this.provi