electron-updater 4.6.4 → 5.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md DELETED
@@ -1,382 +0,0 @@
1
- ## 4.3.0
2
-
3
- ## 4.6.4
4
-
5
- ### Patch Changes
6
-
7
- - [#6450](https://github.com/electron-userland/electron-builder/pull/6450) [`661a6522`](https://github.com/electron-userland/electron-builder/commit/661a6522520e9ea59549cb7e18986fcfb58e873a) Thanks [@robertpatrick](https://github.com/robertpatrick)! - fix(nsis): fix per-machine installs to properly elevate during silent install/updates
8
-
9
- ## 4.6.3
10
-
11
- ### Patch Changes
12
-
13
- - [#6395](https://github.com/electron-userland/electron-builder/pull/6395) [`3c38af42`](https://github.com/electron-userland/electron-builder/commit/3c38af4288908abeea1be1f245d9e3db6c62b227) Thanks [@Nokel81](https://github.com/Nokel81)! - Emulate electron.autoUpdater's event lifecycle for AppImageUpdater
14
-
15
- ## 4.6.2
16
-
17
- ### Patch Changes
18
-
19
- - [#6390](https://github.com/electron-userland/electron-builder/pull/6390) [`a5e8073e`](https://github.com/electron-userland/electron-builder/commit/a5e8073e21b1ff791905cdb4ab011a724533d8c1) Thanks [@Nokel81](https://github.com/Nokel81)! - Fix updating only on demand not working on macOS
20
-
21
- - Updated dependencies [[`66ca625f`](https://github.com/electron-userland/electron-builder/commit/66ca625f892329fd7bedf52fddc6659ec83b7cd3)]:
22
- - builder-util-runtime@8.9.2
23
-
24
- ## 4.6.1
25
-
26
- ### Patch Changes
27
-
28
- - Updated dependencies [[`54ee4e72`](https://github.com/electron-userland/electron-builder/commit/54ee4e72c5db859b9a00104179786567a0e977ff)]:
29
- - builder-util-runtime@8.9.1
30
-
31
- ## 4.6.0
32
-
33
- ### Minor Changes
34
-
35
- - [#6228](https://github.com/electron-userland/electron-builder/pull/6228) [`a9453216`](https://github.com/electron-userland/electron-builder/commit/a94532164709a545c0f6551fdc336dbc5377bda8) Thanks [@mmaietta](https://github.com/mmaietta)! - feat: adding Bitbucket publisher and autoupdater
36
-
37
- ### Patch Changes
38
-
39
- - Updated dependencies [[`a9453216`](https://github.com/electron-userland/electron-builder/commit/a94532164709a545c0f6551fdc336dbc5377bda8)]:
40
- - builder-util-runtime@8.9.0
41
-
42
- ## 4.5.2
43
-
44
- ### Patch Changes
45
-
46
- - [#6212](https://github.com/electron-userland/electron-builder/pull/6212) [`0c21cd69`](https://github.com/electron-userland/electron-builder/commit/0c21cd69663a7eebe0687eaba9eea851cc2fea9e) Thanks [@johnnyopao](https://github.com/johnnyopao)! - Fix upgrade flows on intel mac when both x64 and arm64 versions published
47
-
48
- ## 4.5.1
49
-
50
- ### Patch Changes
51
-
52
- - Updated dependencies [[`7f933d00`](https://github.com/electron-userland/electron-builder/commit/7f933d0004a0a5f808a2a1c71dca7362cab2728e)]:
53
- - builder-util-runtime@8.8.1
54
-
55
- ## 4.5.0
56
-
57
- ### Minor Changes
58
-
59
- - [#6167](https://github.com/electron-userland/electron-builder/pull/6167) [`f45110cb`](https://github.com/electron-userland/electron-builder/commit/f45110cbf66572d5748d21fc24dc26cabd06f35f) Thanks [@mmaietta](https://github.com/mmaietta)! - feat: Adding Keygen as an official publisher/updater for electron-builder (#6167)
60
-
61
- ### Patch Changes
62
-
63
- - Updated dependencies [[`f45110cb`](https://github.com/electron-userland/electron-builder/commit/f45110cbf66572d5748d21fc24dc26cabd06f35f)]:
64
- - builder-util-runtime@8.8.0
65
-
66
- ## 4.4.6
67
-
68
- ### Patch Changes
69
-
70
- - a3c72b24: fix(electron-updater): workaround vite's process.env.\* replacement
71
- - ca0e8454: fix(electron-updater): `null` object error when MacUpdater attempts to log the server port before it is listening
72
-
73
- ## 4.4.5
74
-
75
- ### Patch Changes
76
-
77
- - a3f2cd15: fix(electron-updater): default import throws error for fs and path leading to always requiring elevation
78
- - ae363e51: fix: removing data from error being thrown. It's unnecessary and also unnecessarily large to be passing to the console. Resolves: #6131
79
-
80
- ## 4.4.4
81
-
82
- ### Patch Changes
83
-
84
- - ae81dfae: fix(electron-updater): small cleanup and add more debug logging for MacUpdater to investigate #6120
85
-
86
- ## 4.4.3
87
-
88
- ### Patch Changes
89
-
90
- - a4eae34f: Synchronizing CLI and package.json versions. Updating auto-publish values + changeset generation to be more frictionless
91
- - Updated dependencies [a4eae34f]
92
- - builder-util-runtime@8.7.10
93
-
94
- ## 4.4.2
95
-
96
- ### Patch Changes
97
-
98
- - 878671d0: Updating patch number as many deps were updated as parted of RenovateBot integration
99
- - Updated dependencies [878671d0]
100
- - builder-util-runtime@8.7.9
101
-
102
- ## 4.4.1
103
-
104
- ### Patch Changes
105
-
106
- - 1272afc5: Initial introduction of changset config
107
- - Updated dependencies [1272afc5]
108
- - builder-util-runtime@8.7.8
109
-
110
- ### Bug Fixes
111
-
112
- - Remove dependency on pako module, use native API instead.
113
-
114
- ## 4.2.0
115
-
116
- ### Bug Fixes
117
-
118
- - Forbid using of quotes in a file names.
119
-
120
- ## 4.2.0
121
-
122
- ### Bug Fixes
123
-
124
- - when AllowDowngrade is true and latest version is older, take the update ([#4218](https://github.com/electron-userland/electron-builder/issues/4218)) ([5bf4498](https://github.com/electron-userland/electron-builder/commit/5bf4498))
125
-
126
- ### Features
127
-
128
- - export updaters for configurability ([#4250](https://github.com/electron-userland/electron-builder/issues/4250)) ([9df845e](https://github.com/electron-userland/electron-builder/commit/9df845e))
129
-
130
- ## 4.1.2
131
-
132
- ### Features
133
-
134
- - expose `isUpdaterActive`, closes [#4028](https://github.com/electron-userland/electron-builder/issues/4028)
135
-
136
- ### Bug Fixes
137
-
138
- - cannot download differentially: Error: Maximum allowed size is 5 MB ([c5c2eeb](https://github.com/electron-userland/electron-builder/commit/c5c2eeb)), closes [#3564](https://github.com/electron-userland/electron-builder/issues/3564)
139
- - reduce electron-updater size ([8025fb4](https://github.com/electron-userland/electron-builder/commit/8025fb4)), closes [#3953](https://github.com/electron-userland/electron-builder/issues/3953)
140
-
141
- ## 4.0.14
142
-
143
- From 4.0.5 to 4.0.13 — maintenance-only releases to update dependencies.
144
-
145
- ### Bug Fixes
146
-
147
- - update from prerelease to prerelease crash, closes [#3163](https://github.com/electron-userland/electron-builder/issues/3163)
148
-
149
- ## 4.0.5
150
-
151
- ### Bug Fixes
152
-
153
- - disable differential download operation validation for now, closes [#3485](https://github.com/electron-userland/electron-builder/issues/3485)
154
-
155
- ## 4.0.0
156
-
157
- ### BREAKING CHANGES
158
-
159
- - Requires Electron 3 or later.
160
- - Cache directory changed, so, full download will be performed on update instead of differential.
161
-
162
- ### Bug Fixes
163
-
164
- - use cache dir for electron-updater cache data
165
-
166
- ### Features
167
-
168
- - decouple Electron API to support Proton and other frameworks
169
-
170
- ## 3.2.3
171
-
172
- ### Bug Fixes
173
-
174
- - fix recent differential update regression ([d9341d6](https://github.com/electron-userland/electron-builder/commit/d9341d6))
175
-
176
- ### Features
177
-
178
- - expose downloaded file in update-downloaded event ([7cdece3](https://github.com/electron-userland/electron-builder/commit/7cdece3)), closes [#3070](https://github.com/electron-userland/electron-builder/issues/3070) [#3345](https://github.com/electron-userland/electron-builder/issues/3345)
179
-
180
- ## 3.2.1
181
-
182
- ### Bug Fixes
183
-
184
- - Updater crash on windows, fails on MacOS X ([76fdd42](https://github.com/electron-userland/electron-builder/commit/76fdd42)), closes [#3308](https://github.com/electron-userland/electron-builder/issues/3308) [#3377](https://github.com/electron-userland/electron-builder/issues/3377)
185
- - **electron-updater:** do not dispatch error event for CancellationError [#1150](https://github.com/electron-userland/electron-builder/issues/1150) ([e7acbd9](https://github.com/electron-userland/electron-builder/commit/e7acbd9))
186
-
187
- ## 3.1.4
188
-
189
- ### Bug Fixes
190
-
191
- - Fix grammar in notification message ([#3410](https://github.com/electron-userland/electron-builder/issues/3410)) ([7953e56](https://github.com/electron-userland/electron-builder/commit/7953e56))
192
- - remove escaping of package-path arg - node escapes it properly ([c7e07cc](https://github.com/electron-userland/electron-builder/commit/c7e07cc))
193
-
194
- ## 3.1.3
195
-
196
- ### Bug Fixes
197
-
198
- - close files more reliably during differential download ([d37bacb](https://github.com/electron-userland/electron-builder/commit/d37bacb))
199
- - Added electron 3(Node 10) support to nsis updater ([78a65d2](https://github.com/electron-userland/electron-builder/commit/78a65d2)), closes [#3371](https://github.com/electron-userland/electron-builder/issues/3371)
200
- - better escaping of package-path arg ([44c8fd0](https://github.com/electron-userland/electron-builder/commit/44c8fd0))
201
-
202
- ## 3.1.1
203
-
204
- ### Bug Fixes
205
-
206
- - url parameters, search is inside ([d553629](https://github.com/electron-userland/electron-builder/commit/d553629))
207
- - partially restore sha256 support ([6f8e4ec](https://github.com/electron-userland/electron-builder/commit/6f8e4ec)), closes [#3137](https://github.com/electron-userland/electron-builder/issues/3137)
208
- - unify "update-downloaded" event on macOS ([86d64c2](https://github.com/electron-userland/electron-builder/commit/86d64c2))
209
-
210
- ### Features
211
-
212
- - download update on macOS in the same way as for other OS ([f966f1a](https://github.com/electron-userland/electron-builder/commit/f966f1a)), closes [#3168](https://github.com/electron-userland/electron-builder/issues/3168)
213
-
214
- ## 3.0.2
215
-
216
- ### Bug Fixes
217
-
218
- - addRandomQueryToAvoidCaching does not respect query parameters
219
-
220
- ## 3.0.1
221
-
222
- ### Bug Fixes
223
-
224
- - Replace all occurrences of version in old blockmap file url ([#3120](https://github.com/electron-userland/electron-builder/issues/3120)) ([ca18b74](https://github.com/electron-userland/electron-builder/commit/ca18b74))
225
- - vertical upgrading for channels ([b1f2272](https://github.com/electron-userland/electron-builder/commit/b1f2272)), closes [#3111](https://github.com/electron-userland/electron-builder/issues/3111)
226
-
227
- ## 2.23.3
228
-
229
- - fix case of blockmap file extension, detect s3 urls on setFeedURL ([369e9c0](https://github.com/electron-userland/electron-builder/commit/369e9c0))
230
- - ignore unknown powershell errors ([a0026a7](https://github.com/electron-userland/electron-builder/commit/a0026a7)), closes [#2589](https://github.com/electron-userland/electron-builder/issues/2589)
231
- - web installer differential download perMachine ([82708a5](https://github.com/electron-userland/electron-builder/commit/82708a5)), closes [#2949](https://github.com/electron-userland/electron-builder/issues/2949)
232
-
233
- ## 2.23.2
234
-
235
- ### Bug Fixes
236
-
237
- - addRandomQueryToAvoidCaching breaks s3 provider for updater with private acl ([577b61b](https://github.com/electron-userland/electron-builder/commit/577b61b)), closes [#3021](https://github.com/electron-userland/electron-builder/issues/3021)
238
-
239
- ## 2.23.1
240
-
241
- ### Features
242
-
243
- - [Delta updates for NSIS](https://github.com/electron-userland/electron-builder/releases/tag/v20.17.0) target ([7dd59fb](https://github.com/electron-userland/electron-builder/commit/7dd59fb)), closes [#2217](https://github.com/electron-userland/electron-builder/issues/2217) [#3042](https://github.com/electron-userland/electron-builder/issues/3042) [#3000](https://github.com/electron-userland/electron-builder/issues/3000) [#2977](https://github.com/electron-userland/electron-builder/issues/2977)
244
- - support prereleases in a Github private repository ([59aac66](https://github.com/electron-userland/electron-builder/commit/59aac66)), closes [#3005](https://github.com/electron-userland/electron-builder/issues/3005) [#3037](https://github.com/electron-userland/electron-builder/issues/3037)
245
- - cache downloaded update and reuse if valid later ([ba4809a](https://github.com/electron-userland/electron-builder/commit/ba4809a))
246
- - electron-updater will update even I don't call quitAndInstall after app quit ([29f1c10](https://github.com/electron-userland/electron-builder/commit/29f1c10)), closes [#2493](https://github.com/electron-userland/electron-builder/issues/2493)
247
-
248
- ### Bug Fixes
249
-
250
- - do not rename AppImage file if no version in the name ([48a0811](https://github.com/electron-userland/electron-builder/commit/48a0811)), closes [#2964](https://github.com/electron-userland/electron-builder/issues/2964)
251
- - downloading builds(updates) more than once even if downloaded already ([6500b35](https://github.com/electron-userland/electron-builder/commit/6500b35)), closes [#3007](https://github.com/electron-userland/electron-builder/issues/3007) [#3003](https://github.com/electron-userland/electron-builder/issues/3003)
252
- - set \_packageFile to null on clear ([7fe72da](https://github.com/electron-userland/electron-builder/commit/7fe72da))
253
- - Prevent download notification queueing ([68804e4](https://github.com/electron-userland/electron-builder/commit/68804e4)), closes [#2850](https://github.com/electron-userland/electron-builder/issues/2850)
254
- - add random query param to avoid caching ([254d7c5](https://github.com/electron-userland/electron-builder/commit/254d7c5)), closes [#2741](https://github.com/electron-userland/electron-builder/issues/2741)
255
- - Close opened parenthese in update checking log ([8f19ea9](https://github.com/electron-userland/electron-builder/commit/8f19ea9)), closes [#2763](https://github.com/electron-userland/electron-builder/issues/2763)
256
- - set actual http status code instead of 404 [#2741](https://github.com/electron-userland/electron-builder/issues/2741) ([8453a77](https://github.com/electron-userland/electron-builder/commit/8453a77))
257
- - return correct release notes & name ([#2743](https://github.com/electron-userland/electron-builder/issues/2743)) ([37014be](https://github.com/electron-userland/electron-builder/commit/37014be)), closes [#2742](https://github.com/electron-userland/electron-builder/issues/2742)
258
- - Allow --package-file arg to escape spaces in filenames ([#2739](https://github.com/electron-userland/electron-builder/issues/2739)) ([24a585b](https://github.com/electron-userland/electron-builder/commit/24a585b))
259
- - Race condition during Application Quit ([#2746](https://github.com/electron-userland/electron-builder/issues/2746)) ([1df5d98](https://github.com/electron-userland/electron-builder/commit/1df5d98)), closes [#2745](https://github.com/electron-userland/electron-builder/issues/2745)
260
- - use updateInfo.path as AppImage installer name ([#2722](https://github.com/electron-userland/electron-builder/issues/2722)) ([8233eae](https://github.com/electron-userland/electron-builder/commit/8233eae)), closes [#2672](https://github.com/electron-userland/electron-builder/issues/2672)
261
- - add response code to error message about Accept-Ranges ([62cf1df](https://github.com/electron-userland/electron-builder/commit/62cf1df))
262
- - Nsis app from fall 2017 (electron-updater 2.10.0) won't update to new version ([ba2957e](https://github.com/electron-userland/electron-builder/commit/ba2957e)), closes [#2583](https://github.com/electron-userland/electron-builder/issues/2583)
263
- - recurrent 404 Errors on GitHub Enterprise ([afc1a9e](https://github.com/electron-userland/electron-builder/commit/afc1a9e))
264
-
265
- ## 2.19.0
266
-
267
- ## 2.19.0
268
-
269
- ### Features
270
-
271
- - useMultipleRangeRequest option to disable using of multiple ranges request
272
-
273
- ## 2.18.2
274
-
275
- ### Bug Fixes
276
-
277
- - AutoUpdate takes 60 seconds to fail validating signature on Windows 7 due to PowerShell version [#2421](https://github.com/electron-userland/electron-builder/issues/2421) ([da96e73](https://github.com/electron-userland/electron-builder/commit/da96e73))
278
-
279
- ## 2.18.1
280
-
281
- ### Bug Fixes
282
-
283
- - add error codes ([2822049](https://github.com/electron-userland/electron-builder/commit/2822049)), closes [#2415](https://github.com/electron-userland/electron-builder/issues/2415)
284
-
285
- ## 2.18.0
286
-
287
- ### Bug Fixes
288
-
289
- - redirect event in electron.net ([e2ac601](https://github.com/electron-userland/electron-builder/commit/e2ac601)), closes [#2374](https://github.com/electron-userland/electron-builder/issues/2374)
290
- - use solid compression for web installer package ([6ea5668](https://github.com/electron-userland/electron-builder/commit/6ea5668))
291
-
292
- ## 2.17.2
293
-
294
- ### Bug Fixes
295
-
296
- - Fix AppImage auto-update [#2240](https://github.com/electron-userland/electron-builder/issues/2240).
297
-
298
- ## 2.17.0
299
-
300
- ### Bug Fixes
301
-
302
- - PrivateGitHubProvider requires at least Electron 1.6.11. Better to use latest stable.
303
-
304
- ### Features
305
-
306
- - PrivateGitHubProvider [fixes](https://github.com/electron-userland/electron-builder/issues/2342).
307
-
308
- ## 2.16.2
309
-
310
- ### Features
311
-
312
- - [Use the only HTTP request to download all changed blocks](https://github.com/electron-userland/electron-builder/releases/tag/v19.45.1).
313
-
314
- ## 2.16.0
315
-
316
- ### Features
317
-
318
- - [Update metadata format allows several files](https://github.com/electron-userland/electron-builder/releases/tag/v19.44.0).
319
-
320
- ### Bug Fixes
321
-
322
- - Include application name in update notification ([#2262](https://github.com/electron-userland/electron-builder/issues/2262)) ([1809c94](https://github.com/electron-userland/electron-builder/commit/1809c94))
323
-
324
- ## 2.13.0
325
-
326
- ### Features
327
-
328
- - full changelog for all versions from current to latest ([67fe9ff](https://github.com/electron-userland/electron-builder/commit/67fe9ff))
329
-
330
- ## 2.12.1
331
-
332
- ### Performance Improvements
333
-
334
- - a little bit more compact blockmap data ([c92bc38](https://github.com/electron-userland/electron-builder/commit/c92bc38))
335
-
336
- ## 2.12.0
337
-
338
- ### Features
339
-
340
- - [Linux auto-update](https://github.com/electron-userland/electron-builder/releases/tag/v19.37.0)
341
-
342
- ## 2.11.0
343
-
344
- ### Features
345
-
346
- - Differential updater: use [content defined chunking](https://github.com/electron-userland/electron-builder/releases/tag/v19.36.0)
347
-
348
- ## 2.10.2
349
-
350
- ### Bug Fixes
351
-
352
- - Differential updater: fix "To download" in percentage value calculation (cosmetic fix)
353
-
354
- ## 2.10.1
355
-
356
- ### Bug Fixes
357
-
358
- - PrivateGitHubProvider: clear error if no channel file in the latest github release
359
-
360
- # 2.10.0 (2017-09-22)
361
-
362
- ### Features
363
-
364
- - [DigitalOcean Spaces support](https://github.com/electron-userland/electron-builder/releases/tag/v19.30.0).
365
-
366
- # 2.9.3 (2017-09-10)
367
-
368
- ### Features
369
-
370
- - [Delta updates for Windows Web Installer](https://github.com/electron-userland/electron-builder/releases/tag/v19.28.4).
371
-
372
- ## 2.8.9 (2017-09-01)
373
-
374
- ### Bug Fixes
375
-
376
- - Electron-updater does not support enterprise Github. [#1903](https://github.com/electron-userland/electron-builder/issues/1903).
377
-
378
- ## 2.8.8 (2017-09-01)
379
-
380
- ### Bug Fixes
381
-
382
- - handle aborted event. [#1975](https://github.com/electron-userland/electron-builder/issues/1975).
@@ -1,11 +0,0 @@
1
- import { BintrayOptions, UpdateInfo } from "builder-util-runtime";
2
- import { ResolvedUpdateFileInfo } from "../main";
3
- import { Provider, ProviderRuntimeOptions } from "./Provider";
4
- export declare class BintrayProvider extends Provider<UpdateInfo> {
5
- private client;
6
- private readonly baseUrl;
7
- constructor(configuration: BintrayOptions, runtimeOptions: ProviderRuntimeOptions);
8
- setRequestHeaders(value: any): void;
9
- getLatestVersion(): Promise<UpdateInfo>;
10
- resolveFiles(updateInfo: UpdateInfo): Array<ResolvedUpdateFileInfo>;
11
- }
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BintrayProvider = void 0;
4
- const builder_util_runtime_1 = require("builder-util-runtime");
5
- const bintray_1 = require("builder-util-runtime/out/bintray");
6
- const url_1 = require("url");
7
- const util_1 = require("../util");
8
- const Provider_1 = require("./Provider");
9
- class BintrayProvider extends Provider_1.Provider {
10
- constructor(configuration, runtimeOptions) {
11
- super(runtimeOptions);
12
- this.client = new bintray_1.BintrayClient(configuration, runtimeOptions.executor, new builder_util_runtime_1.CancellationToken());
13
- this.baseUrl = util_1.newBaseUrl(`https://dl.bintray.com/${this.client.owner}/${this.client.repo}`);
14
- }
15
- setRequestHeaders(value) {
16
- super.setRequestHeaders(value);
17
- this.client.setRequestHeaders(value);
18
- }
19
- async getLatestVersion() {
20
- try {
21
- const data = await this.client.getVersion("_latest");
22
- const channelFilename = util_1.getChannelFilename(this.getDefaultChannelName());
23
- const files = await this.client.getVersionFiles(data.name);
24
- const channelFile = files.find(it => it.name.endsWith(`_${channelFilename}`) || it.name.endsWith(`-${channelFilename}`));
25
- if (channelFile == null) {
26
- // noinspection ExceptionCaughtLocallyJS
27
- throw builder_util_runtime_1.newError(`Cannot find channel file "${channelFilename}", existing files:\n${files.map(it => JSON.stringify(it, null, 2)).join(",\n")}`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND");
28
- }
29
- const channelFileUrl = new url_1.URL(`https://dl.bintray.com/${this.client.owner}/${this.client.repo}/${channelFile.name}`);
30
- return Provider_1.parseUpdateInfo(await this.httpRequest(channelFileUrl), channelFilename, channelFileUrl);
31
- }
32
- catch (e) {
33
- if ("statusCode" in e && e.statusCode === 404) {
34
- throw builder_util_runtime_1.newError(`No latest version, please ensure that user, package and repository correctly configured. Or at least one version is published. ${e.stack || e.message}`, "ERR_UPDATER_LATEST_VERSION_NOT_FOUND");
35
- }
36
- throw e;
37
- }
38
- }
39
- resolveFiles(updateInfo) {
40
- return Provider_1.resolveFiles(updateInfo, this.baseUrl);
41
- }
42
- }
43
- exports.BintrayProvider = BintrayProvider;
44
- //# sourceMappingURL=BintrayProvider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BintrayProvider.js","sourceRoot":"","sources":["../../src/providers/BintrayProvider.ts"],"names":[],"mappings":";;;AAAA,+DAA8F;AAC9F,8DAAgE;AAChE,6BAAyB;AAEzB,kCAAwD;AACxD,yCAA4F;AAE5F,MAAa,eAAgB,SAAQ,mBAAoB;IAIvD,YAAY,aAA6B,EAAE,cAAsC;QAC/E,KAAK,CAAC,cAAc,CAAC,CAAA;QAErB,IAAI,CAAC,MAAM,GAAG,IAAI,uBAAa,CAAC,aAAa,EAAE,cAAc,CAAC,QAAQ,EAAE,IAAI,wCAAiB,EAAE,CAAC,CAAA;QAChG,IAAI,CAAC,OAAO,GAAG,iBAAU,CAAC,0BAA0B,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;IAC9F,CAAC;IAED,iBAAiB,CAAC,KAAU;QAC1B,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAA;QAC9B,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAA;IACtC,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,IAAI;YACF,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;YACpD,MAAM,eAAe,GAAG,yBAAkB,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC,CAAA;YACxE,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YAC1D,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,eAAe,EAAE,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,eAAe,EAAE,CAAC,CAAC,CAAA;YACxH,IAAI,WAAW,IAAI,IAAI,EAAE;gBACvB,wCAAwC;gBACxC,MAAM,+BAAQ,CACZ,6BAA6B,eAAe,uBAAuB,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAC7H,oCAAoC,CACrC,CAAA;aACF;YAED,MAAM,cAAc,GAAG,IAAI,SAAG,CAAC,0BAA0B,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,WAAW,CAAC,IAAI,EAAE,CAAC,CAAA;YACrH,OAAO,0BAAe,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,EAAE,eAAe,EAAE,cAAc,CAAC,CAAA;SAChG;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,YAAY,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,KAAK,GAAG,EAAE;gBAC7C,MAAM,+BAAQ,CACZ,kIAAkI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,EAAE,EACxJ,sCAAsC,CACvC,CAAA;aACF;YACD,MAAM,CAAC,CAAA;SACR;IACH,CAAC;IAED,YAAY,CAAC,UAAsB;QACjC,OAAO,uBAAY,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;IAC/C,CAAC;CACF;AA9CD,0CA8CC","sourcesContent":["import { BintrayOptions, CancellationToken, newError, UpdateInfo } from \"builder-util-runtime\"\nimport { BintrayClient } from \"builder-util-runtime/out/bintray\"\nimport { URL } from \"url\"\nimport { ResolvedUpdateFileInfo } from \"../main\"\nimport { getChannelFilename, newBaseUrl } from \"../util\"\nimport { parseUpdateInfo, Provider, ProviderRuntimeOptions, resolveFiles } from \"./Provider\"\n\nexport class BintrayProvider extends Provider<UpdateInfo> {\n private client: BintrayClient\n private readonly baseUrl: URL\n\n constructor(configuration: BintrayOptions, runtimeOptions: ProviderRuntimeOptions) {\n super(runtimeOptions)\n\n this.client = new BintrayClient(configuration, runtimeOptions.executor, new CancellationToken())\n this.baseUrl = newBaseUrl(`https://dl.bintray.com/${this.client.owner}/${this.client.repo}`)\n }\n\n setRequestHeaders(value: any): void {\n super.setRequestHeaders(value)\n this.client.setRequestHeaders(value)\n }\n\n async getLatestVersion(): Promise<UpdateInfo> {\n try {\n const data = await this.client.getVersion(\"_latest\")\n const channelFilename = getChannelFilename(this.getDefaultChannelName())\n const files = await this.client.getVersionFiles(data.name)\n const channelFile = files.find(it => it.name.endsWith(`_${channelFilename}`) || it.name.endsWith(`-${channelFilename}`))\n if (channelFile == null) {\n // noinspection ExceptionCaughtLocallyJS\n throw newError(\n `Cannot find channel file \"${channelFilename}\", existing files:\\n${files.map(it => JSON.stringify(it, null, 2)).join(\",\\n\")}`,\n \"ERR_UPDATER_CHANNEL_FILE_NOT_FOUND\"\n )\n }\n\n const channelFileUrl = new URL(`https://dl.bintray.com/${this.client.owner}/${this.client.repo}/${channelFile.name}`)\n return parseUpdateInfo(await this.httpRequest(channelFileUrl), channelFilename, channelFileUrl)\n } catch (e) {\n if (\"statusCode\" in e && e.statusCode === 404) {\n throw newError(\n `No latest version, please ensure that user, package and repository correctly configured. Or at least one version is published. ${e.stack || e.message}`,\n \"ERR_UPDATER_LATEST_VERSION_NOT_FOUND\"\n )\n }\n throw e\n }\n }\n\n resolveFiles(updateInfo: UpdateInfo): Array<ResolvedUpdateFileInfo> {\n return resolveFiles(updateInfo, this.baseUrl)\n }\n}\n"]}