builder-util-runtime
Advanced tools
@@ -82,2 +82,11 @@ import { BinaryToTextEncoding } from "crypto"; | ||
| export declare function safeGetHeader(response: any, headerKey: string): any; | ||
| /** | ||
| * electron-builder has emitted base64-encoded sha512 values in latest*.yml since 19.x (2017); hex-encoded values | ||
| * are a legacy back-compat path for pre-19.x manifests or hand-rolled manifests built from raw `sha512sum` output. | ||
| * Detection is unambiguous: base64-encoded sha512 is always 88 characters ending in "==", so it can never match the | ||
| * strict 128-hex-character pattern (and a wrong pick would only fail closed with ERR_CHECKSUM_MISMATCH). | ||
| * | ||
| * Hex-encoded sha512 manifest values are deprecated and support will be removed in v28 — emit base64 instead. | ||
| */ | ||
| export declare function detectSha512Encoding(sha512: string): BinaryToTextEncoding; | ||
| export declare function configureRequestOptions(options: RequestOptions, token?: string | null, method?: "GET" | "DELETE" | "PUT" | "POST"): RequestOptions; | ||
@@ -84,0 +93,0 @@ export declare function isSensitiveFieldName(name: string): boolean; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"httpExecutor.d.ts","sourceRoot":"","sources":["../src/httpExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAoB,MAAM,QAAQ,CAAA;AAI/D,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,MAAM,CAAA;AAE/F,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,OAAO,EAA6B,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAsBxF;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAE/D;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE9D;AAED,MAAM,WAAW,cAAe,SAAQ,mB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AM,GAAG,MAAM,CAExD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,CAW/E"} |
+17
-1
@@ -440,2 +440,18 @@ import { createHash } from "crypto"; | ||
| } | ||
| /** | ||
| * electron-builder has emitted base64-encoded sha512 values in latest*.yml since 19.x (2017); hex-encoded values | ||
| * are a legacy back-compat path for pre-19.x manifests or hand-rolled manifests built from raw `sha512sum` output. | ||
| * Detection is unambiguous: base64-encoded sha512 is always 88 characters ending in "==", so it can never match the | ||
| * strict 128-hex-character pattern (and a wrong pick would only fail closed with ERR_CHECKSUM_MISMATCH). | ||
| * | ||
| * Hex-encoded sha512 manifest values are deprecated and support will be removed in v28 — emit base64 instead. | ||
| */ | ||
| export function detectSha512Encoding(sha512) { | ||
| const isLegacyHex = sha512.length === 128 && /^[0-9a-fA-F]{128}$/.test(sha512); | ||
| if (isLegacyHex) { | ||
| debug("Deprecation warning: hex-encoded sha512 detected in the update manifest. Hex support is deprecated and will be removed in v28 — emit base64 instead."); | ||
| return "hex"; | ||
| } | ||
| return "base64"; | ||
| } | ||
| function configurePipes(options, response) { | ||
@@ -454,3 +470,3 @@ if (!checkSha2(safeGetHeader(response, "X-Checksum-Sha2"), options.options.sha2, options.callback)) { | ||
| if (sha512 != null) { | ||
| streams.push(new DigestTransform(sha512, "sha512", sha512.length === 128 && !sha512.includes("+") && !sha512.includes("Z") && !sha512.includes("=") ? "hex" : "base64")); | ||
| streams.push(new DigestTransform(sha512, "sha512", detectSha512Encoding(sha512))); | ||
| } | ||
@@ -457,0 +473,0 @@ else if (options.options.sha2 != null) { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"httpExecutor.js","sourceRoot":"","sources":["../src/httpExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,UAAU,EAAQ,MAAM,QAAQ,CAAA;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,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I,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,IAAI,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;YACnF,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,2BAA2B,CAAA;QAC5F,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC,EACD,CAAC,CACF,CAAA;AACH,CAAC","sourcesContent":["import { BinaryToTextEncoding, createHash, Hash } from \"crypto\"\nimport { sleep } from \"./retry.js\"\nimport _debug from \"debug\"\nimport { createWriteStream } from \"fs\"\nimport { IncomingMessage, OutgoingHttpHeader, OutgoingHttpHeaders, RequestOptions } from \"http\"\nimport { Socket } from \"net\"\nimport { Transform } from \"stream\"\nimport { URL } from \"url\"\nimport { Nullish } from \"./index.js\"\nimport { CancellationToken } from \"./CancellationToken.js\"\nimport { newError } from \"./error.js\"\nimport { ProgressCallbackTransform, ProgressInfo } from \"./ProgressCallbackTransform.js\"\n\nconst debug = _debug(\"electron-builder\")\n\n// ── Sensitive-data registries ────────────────────────────────────────────────\n\n// Normalise a header or field name: lowercase + strip all separators (- and _).\n// Shared by both registries so lookup is always separator-agnostic.\nconst normalizeName = (name: string): string => name.toLowerCase().replace(/[-_]/g, \"\")\n\n// HTTP header names (normalised) stripped on cross-origin redirects.\n// Stored normalised; lookup normalises the incoming key with normalizeName().\nconst SENSITIVE_REDIRECT_HEADERS = new Set([\"authorization\", \"proxyauthorization\", \"privatetoken\", \"xapikey\", \"xauthtoken\", \"xaccesstoken\", \"xgitlabtoken\", \"cookie\", \"xcsrftoken\"])\n\n// Substrings: a field name containing any of these (after normalization) is redacted.\nconst SENSITIVE_FIELD_PATTERNS: string[] = [\"token\", \"password\", \"secret\", \"authorization\", \"credential\", \"apikey\", \"passphrase\", \"auth\"] as const\n\n// Suffixes: a field name ending with any of these (after normalization) is redacted.\n// Intentionally greedy — \"publicKey\" is also stripped; over-stripping debug logs is\n// acceptable, under-stripping a credential is not.\nconst SENSITIVE_FIELD_SUFFIXES: string[] = [\"key\"] as const\n\n/**\n * Register an additional HTTP header to strip on cross-origin redirects.\n * Intended for custom publishers (e.g. GenericPublisher with a non-standard auth header).\n */\nexport function addSensitiveRedirectHeader(header: string): void {\n SENSITIVE_REDIRECT_HEADERS.add(normalizeName(header))\n}\n\n/**\n * Register an additional substring pattern used by {@link safeStringifyJson} to\n * identify sensitive field names. Input is normalized (lowercased, separators stripped).\n * Intended for custom publishers that store credentials under non-standard field names.\n */\nexport function addSensitiveFieldPattern(pattern: string): void {\n SENSITIVE_FIELD_PATTERNS.push(pattern.toLowerCase().replace(/[-_]/g, \"\"))\n}\n\nexport interface RequestHeaders extends OutgoingHttpHeaders {\n [key: string]: OutgoingHttpHeader | undefined\n}\n\nexport interface DownloadOptions {\n readonly headers?: OutgoingHttpHeaders | null\n readonly sha2?: string | null\n readonly sha512?: string | null\n\n readonly cancellationToken: CancellationToken\n\n // noinspection JSUnusedLocalSymbols\n onProgress?: (progress: ProgressInfo) => void\n}\n\nexport function createHttpError(response: IncomingMessage, description: any | null = null) {\n return new HttpError(\n response.statusCode || -1,\n `${response.statusCode} ${response.statusMessage}` +\n (description == null ? \"\" : \"\\n\" + JSON.stringify(description, null, \" \")) +\n \"\\nHeaders: \" +\n safeStringifyJson(response.headers),\n description\n )\n}\n\nconst HTTP_STATUS_CODES = new Map<number, string>([\n [429, \"Too many requests\"],\n [400, \"Bad request\"],\n [403, \"Forbidden\"],\n [404, \"Not found\"],\n [405, \"Method not allowed\"],\n [406, \"Not acceptable\"],\n [408, \"Request timeout\"],\n [413, \"Request entity too large\"],\n [500, \"Internal server error\"],\n [502, \"Bad gateway\"],\n [503, \"Service unavailable\"],\n [504, \"Gateway timeout\"],\n [505, \"HTTP version not supported\"],\n])\n\nexport class HttpError extends Error {\n constructor(\n readonly statusCode: number,\n message = `HTTP error: ${HTTP_STATUS_CODES.get(statusCode) || statusCode}`,\n readonly description: any | null = null\n ) {\n super(message)\n\n this.name = \"HttpError\"\n ;(this as NodeJS.ErrnoException).code = `HTTP_ERROR_${statusCode}`\n }\n\n isServerError() {\n return this.statusCode >= 500 && this.statusCode <= 599\n }\n}\n\nexport function parseJson(result: Promise<string | null>) {\n return result.then(it => (it == null || it.length === 0 ? null : JSON.parse(it)))\n}\n\ninterface Request {\n abort: () => void\n end: (data?: Buffer) => void\n}\nexport abstract class HttpExecutor<T extends Request> {\n protected readonly maxRedirects = 10\n\n request(options: RequestOptions, cancellationToken: CancellationToken = new CancellationToken(), data?: { [name: string]: any } | null): Promise<string | null> {\n configureRequestOptions(options)\n const json = data == null ? undefined : JSON.stringify(data)\n const encodedData = json ? Buffer.from(json) : undefined\n if (encodedData != null) {\n if (debug.enabled) {\n debug(safeStringifyJson(data))\n }\n const { headers, ...opts } = options\n options = {\n method: \"post\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Content-Length\": encodedData.length,\n ...headers,\n },\n ...opts,\n }\n }\n return this.doApiRequest(options, cancellationToken, it => it.end(encodedData))\n }\n\n doApiRequest(\n options: RequestOptions,\n cancellationToken: CancellationToken,\n requestProcessor: (request: T, reject: (error: Error) => void) => void,\n redirectCount = 0\n ): Promise<string> {\n if (debug.enabled) {\n const { headers: _headers, auth: _auth, ...safeOptions } = options as any\n debug(`Request: ${safeStringifyJson(safeOptions)}`)\n }\n\n return cancellationToken.createPromise<string>((resolve, reject, onCancel) => {\n const request = this.createRequest(options, (response: any) => {\n try {\n this.handleResponse(response, options, cancellationToken, resolve, reject, redirectCount, requestProcessor)\n } catch (e: any) {\n reject(e)\n }\n })\n this.addErrorAndTimeoutHandlers(request, reject, options.timeout)\n this.addRedirectHandlers(request, options, reject, redirectCount, options => {\n this.doApiRequest(options, cancellationToken, requestProcessor, redirectCount).then(resolve).catch(reject)\n })\n requestProcessor(request, reject)\n onCancel(() => request.abort())\n })\n }\n\n // noinspection JSUnusedLocalSymbols\n // eslint-disable-next-line\n protected addRedirectHandlers(request: any, options: RequestOptions, reject: (error: Error) => void, redirectCount: number, handler: (options: RequestOptions) => void) {\n // not required for NodeJS\n }\n\n addErrorAndTimeoutHandlers(request: any, reject: (error: Error) => void, timeout = 60 * 1000) {\n this.addTimeOutHandler(request, reject, timeout)\n request.on(\"error\", reject)\n request.on(\"aborted\", () => {\n reject(new Error(\"Request has been aborted by the server\"))\n })\n }\n\n private handleResponse(\n response: IncomingMessage,\n options: RequestOptions,\n cancellationToken: CancellationToken,\n resolve: (data?: any) => void,\n reject: (error: Error) => void,\n redirectCount: number,\n requestProcessor: (request: T, reject: (error: Error) => void) => void\n ) {\n if (debug.enabled) {\n const { headers: _headers, auth: _auth, ...safeOptions } = options as any\n debug(`Response: ${response.statusCode} ${response.statusMessage}, request options: ${safeStringifyJson(safeOptions)}`)\n }\n\n // we handle any other >= 400 error on request end (read detailed message in the response body)\n if (response.statusCode === 404) {\n // error is clear, we don't need to read detailed error description\n reject(\n createHttpError(\n response,\n `method: ${options.method || \"GET\"} url: ${options.protocol || \"https:\"}//${options.hostname}${options.port ? `:${options.port}` : \"\"}${options.path}\n\nPlease double check that your authentication token is correct. Due to security reasons, actual status maybe not reported, but 404.\n`\n )\n )\n return\n } else if (response.statusCode === 204) {\n // on DELETE request\n resolve()\n return\n }\n\n const code = response.statusCode ?? 0\n const shouldRedirect = code >= 300 && code < 400\n const redirectUrl = safeGetHeader(response, \"location\")\n if (shouldRedirect && redirectUrl != null) {\n if (redirectCount > this.maxRedirects) {\n reject(this.createMaxRedirectError())\n return\n }\n\n this.doApiRequest(HttpExecutor.prepareRedirectUrlOptions(redirectUrl, options), cancellationToken, requestProcessor, redirectCount).then(resolve).catch(reject)\n return\n }\n\n response.setEncoding(\"utf8\")\n\n let data = \"\"\n response.on(\"error\", reject)\n response.on(\"data\", (chunk: string) => (data += chunk))\n response.on(\"end\", () => {\n try {\n if (response.statusCode != null && response.statusCode >= 400) {\n const contentType = safeGetHeader(response, \"content-type\")\n const isJson = contentType != null && (Array.isArray(contentType) ? contentType.find(it => it.includes(\"json\")) != null : contentType.includes(\"json\"))\n reject(\n createHttpError(\n response,\n `method: ${options.method || \"GET\"} url: ${options.protocol || \"https:\"}//${options.hostname}${options.port ? `:${options.port}` : \"\"}${options.path}\n\n Data:\n ${isJson ? safeStringifyJson(JSON.parse(data)) : data}\n `\n )\n )\n } else {\n resolve(data.length === 0 ? null : data)\n }\n } catch (e: any) {\n reject(e)\n }\n })\n }\n\n // noinspection JSUnusedLocalSymbols\n abstract createRequest(options: RequestOptions, callback: (response: any) => void): T\n\n async downloadToBuffer(url: URL, options: DownloadOptions): Promise<Buffer> {\n return await options.cancellationToken.createPromise<Buffer>((resolve, reject, onCancel) => {\n const responseChunks: Buffer[] = []\n const requestOptions = {\n headers: options.headers || undefined,\n // because PrivateGitHubProvider requires HttpExecutor.prepareRedirectUrlOptions logic, so, we need to redirect manually\n redirect: \"manual\",\n }\n configureRequestUrl(url, requestOptions)\n configureRequestOptions(requestOptions)\n this.doDownload(\n requestOptions,\n {\n destination: null,\n options,\n onCancel,\n callback: error => {\n if (error == null) {\n resolve(Buffer.concat(responseChunks))\n } else {\n reject(error)\n }\n },\n responseHandler: (response, callback) => {\n let receivedLength = 0\n response.on(\"data\", (chunk: Buffer) => {\n receivedLength += chunk.length\n if (receivedLength > 524288000) {\n callback(new Error(\"Maximum allowed size is 500 MB\"))\n return\n }\n responseChunks.push(chunk)\n })\n response.on(\"end\", () => {\n callback(null)\n })\n },\n },\n 0\n )\n })\n }\n\n protected doDownload(requestOptions: RequestOptions, options: DownloadCallOptions, redirectCount: number) {\n const request = this.createRequest(requestOptions, (response: IncomingMessage) => {\n if (response.statusCode! >= 400) {\n options.callback(\n new Error(\n `Cannot download \"${requestOptions.protocol || \"https:\"}//${requestOptions.hostname}${requestOptions.path}\", status ${response.statusCode}: ${response.statusMessage}`\n )\n )\n return\n }\n\n // It is possible for the response stream to fail, e.g. when a network is lost while\n // response stream is in progress. Stop waiting and reject so consumer can catch the error.\n response.on(\"error\", options.callback)\n\n // this code not relevant for Electron (redirect event instead handled)\n const redirectUrl = safeGetHeader(response, \"location\")\n if (redirectUrl != null) {\n if (redirectCount < this.maxRedirects) {\n this.doDownload(HttpExecutor.prepareRedirectUrlOptions(redirectUrl, requestOptions), options, redirectCount++)\n } else {\n options.callback(this.createMaxRedirectError())\n }\n return\n }\n\n if (options.responseHandler == null) {\n configurePipes(options, response)\n } else {\n options.responseHandler(response, options.callback)\n }\n })\n this.addErrorAndTimeoutHandlers(request, options.callback, requestOptions.timeout)\n this.addRedirectHandlers(request, requestOptions, options.callback, redirectCount, requestOptions => {\n this.doDownload(requestOptions, options, redirectCount++)\n })\n request.end()\n }\n\n protected createMaxRedirectError() {\n return new Error(`Too many redirects (> ${this.maxRedirects})`)\n }\n\n private addTimeOutHandler(request: any, callback: (error: Error) => void, timeout: number) {\n request.on(\"socket\", (socket: Socket) => {\n socket.setTimeout(timeout, () => {\n request.abort()\n callback(new Error(\"Request timed out\"))\n })\n })\n }\n\n static prepareRedirectUrlOptions(redirectUrl: string, options: RequestOptions): RequestOptions {\n const newOptions = configureRequestOptionsFromUrl(redirectUrl, { ...options })\n const headers = newOptions.headers\n if (headers == null) {\n return newOptions\n }\n\n const originalUrl = HttpExecutor.reconstructOriginalUrl(options)\n const parsedRedirectUrl = parseUrl(redirectUrl, options)\n\n if (HttpExecutor.isCrossOriginRedirect(originalUrl, parsedRedirectUrl)) {\n if (debug.enabled) {\n debug(`Cross-origin redirect (${originalUrl.host} → ${parsedRedirectUrl.host}): stripping sensitive headers`)\n }\n for (const key of Object.keys(headers)) {\n if (SENSITIVE_REDIRECT_HEADERS.has(normalizeName(key))) {\n delete (headers as Record<string, unknown>)[key]\n }\n }\n }\n return newOptions\n }\n\n private static reconstructOriginalUrl(options: RequestOptions): URL {\n const protocol = options.protocol || \"https:\"\n if (!options.hostname) {\n throw new Error(\"Missing hostname in request options\")\n }\n const hostname = options.hostname\n const port = options.port ? `:${options.port}` : \"\"\n const path = options.path || \"/\"\n return new URL(`${protocol}//${hostname}${port}${path}`)\n }\n\n private static isCrossOriginRedirect(originalUrl: URL, redirectUrl: URL): boolean {\n // Case-insensitive hostname comparison\n if (originalUrl.hostname.toLowerCase() !== redirectUrl.hostname.toLowerCase()) {\n return true\n }\n\n // Special case: allow http -> https redirect on same host with standard ports\n // This matches the behavior of Python requests library for backward compatibility\n // url.port returns an empty string if the port is omitted\n // or explicitly set to the default port for a given protocol.\n if (\n originalUrl.protocol === \"http:\" &&\n // This can be replaced with `!originalUrl.port`, but for the sake of clarity.\n [\"80\", \"\"].includes(originalUrl.port) &&\n redirectUrl.protocol === \"https:\" &&\n // This can be replaced with `!redirectUrl.port`, but for the sake of clarity.\n [\"443\", \"\"].includes(redirectUrl.port)\n ) {\n return false\n }\n\n // According to RFC 7235, a change in protocol or port constitutes a cross-origin request.\n // Forwarding authentication headers to a different origin can be a security risk.\n // For example, https://example.com:443 and http://example.com:80 are different origins.\n // We only make an exception for HTTP -> HTTPS upgrades on standard ports for backward compatibility.\n\n // Strip auth on any other protocol change\n if (originalUrl.protocol !== redirectUrl.protocol) {\n return true\n }\n\n // Strip auth on port change (accounting for default ports)\n const originalPort = originalUrl.port\n const redirectPort = redirectUrl.port\n return originalPort !== redirectPort\n }\n\n static async retryOnServerError(task: () => Promise<any>, maxRetries = 3): Promise<any> {\n for (let attemptNumber = 0; ; attemptNumber++) {\n try {\n return await task()\n } catch (e: any) {\n if (attemptNumber < maxRetries && ((e instanceof HttpError && e.isServerError()) || e.code === \"EPIPE\")) {\n await sleep(1000 * (attemptNumber + 1))\n continue\n }\n throw e\n }\n }\n }\n}\n\nexport interface DownloadCallOptions {\n responseHandler: ((response: IncomingMessage, callback: (error: Error | null) => void) => void) | null\n onCancel: (callback: () => void) => void\n callback: (error: Error | null) => void\n\n options: DownloadOptions\n\n destination: string | null\n}\n\nfunction parseUrl(url: string, options: RequestOptions): URL {\n try {\n // Would throw exception if url is not absolute\n return new URL(url)\n } catch {\n // Relative URL - construct base URL from original options\n const hostname = options.hostname\n const protocol = options.protocol || \"https:\"\n const port = options.port ? `:${options.port}` : \"\"\n const baseUrl = `${protocol}//${hostname}${port}`\n return new URL(url, baseUrl)\n }\n}\n\nexport function configureRequestOptionsFromUrl(url: string, options: RequestOptions) {\n const result = configureRequestOptions(options)\n const parsedUrl = parseUrl(url, options)\n configureRequestUrl(parsedUrl, result)\n return result\n}\n\nexport function configureRequestUrl(url: URL, options: RequestOptions): void {\n options.protocol = url.protocol\n options.hostname = url.hostname\n if (url.port) {\n options.port = url.port\n } else if (options.port) {\n delete options.port\n }\n options.path = url.pathname + url.search\n}\n\nexport class DigestTransform extends Transform {\n private readonly digester: Hash\n\n private _actual: string | null = null\n\n // noinspection JSUnusedGlobalSymbols\n get actual() {\n return this._actual\n }\n\n isValidateOnEnd = true\n\n constructor(\n readonly expected: string,\n private readonly algorithm: string = \"sha512\",\n private readonly encoding: BinaryToTextEncoding = \"base64\"\n ) {\n super()\n\n this.digester = createHash(algorithm)\n }\n\n // noinspection JSUnusedGlobalSymbols\n _transform(chunk: Buffer, encoding: string, callback: any) {\n this.digester.update(chunk)\n callback(null, chunk)\n }\n\n // noinspection JSUnusedGlobalSymbols\n _flush(callback: any): void {\n this._actual = this.digester.digest(this.encoding)\n\n if (this.isValidateOnEnd) {\n try {\n this.validate()\n } catch (e: any) {\n callback(e)\n return\n }\n }\n\n callback(null)\n }\n\n validate() {\n if (this._actual == null) {\n throw newError(\"Not finished yet\", \"ERR_STREAM_NOT_FINISHED\")\n }\n\n if (this._actual !== this.expected) {\n throw newError(`${this.algorithm} checksum mismatch, expected ${this.expected}, got ${this._actual}`, \"ERR_CHECKSUM_MISMATCH\")\n }\n\n return null\n }\n}\n\nfunction checkSha2(sha2Header: string | Nullish, sha2: string | Nullish, callback: (error: Error | null) => void): boolean {\n if (sha2Header != null && sha2 != null && sha2Header !== sha2) {\n callback(new Error(`checksum mismatch: expected ${sha2} but got ${sha2Header} (X-Checksum-Sha2 header)`))\n return false\n }\n return true\n}\n\nexport function safeGetHeader(response: any, headerKey: string) {\n const value = response.headers[headerKey]\n if (value == null) {\n return null\n } else if (Array.isArray(value)) {\n // electron API\n return value.length === 0 ? null : value[value.length - 1]\n } else {\n return value\n }\n}\n\nfunction configurePipes(options: DownloadCallOptions, response: IncomingMessage) {\n if (!checkSha2(safeGetHeader(response, \"X-Checksum-Sha2\"), options.options.sha2, options.callback)) {\n return\n }\n\n const streams: Array<any> = []\n if (options.options.onProgress != null) {\n const contentLength = safeGetHeader(response, \"content-length\")\n if (contentLength != null) {\n streams.push(new ProgressCallbackTransform(parseInt(contentLength, 10), options.options.cancellationToken, options.options.onProgress))\n }\n }\n\n const sha512 = options.options.sha512\n if (sha512 != null) {\n streams.push(new DigestTransform(sha512, \"sha512\", sha512.length === 128 && !sha512.includes(\"+\") && !sha512.includes(\"Z\") && !sha512.includes(\"=\") ? \"hex\" : \"base64\"))\n } else if (options.options.sha2 != null) {\n streams.push(new DigestTransform(options.options.sha2, \"sha256\", \"hex\"))\n }\n\n const fileOut = createWriteStream(options.destination!)\n streams.push(fileOut)\n\n let lastStream = response\n for (const stream of streams) {\n stream.on(\"error\", (error: Error) => {\n fileOut.close()\n if (!options.options.cancellationToken.cancelled) {\n options.callback(error)\n }\n })\n lastStream = lastStream.pipe(stream)\n }\n\n fileOut.on(\"finish\", () => {\n ;(fileOut.close as any)(options.callback)\n })\n}\n\nexport function configureRequestOptions(options: RequestOptions, token?: string | null, method?: \"GET\" | \"DELETE\" | \"PUT\" | \"POST\"): RequestOptions {\n if (method != null) {\n options.method = method\n }\n\n options.headers = { ...options.headers }\n const headers = options.headers\n\n if (token != null) {\n ;(headers as any).authorization = token.startsWith(\"Basic\") || token.startsWith(\"Bearer\") ? token : `token ${token}`\n }\n if (headers[\"User-Agent\"] == null) {\n headers[\"User-Agent\"] = \"electron-builder\"\n }\n\n if (method == null || method === \"GET\" || headers[\"Cache-Control\"] == null) {\n headers[\"Cache-Control\"] = \"no-cache\"\n }\n\n // do not specify for node (in any case we use https module)\n if (options.protocol == null && (process.versions as any).electron != null) {\n options.protocol = \"https:\"\n }\n return options\n}\n\nexport function isSensitiveFieldName(name: string): boolean {\n const normalized = normalizeName(name)\n return SENSITIVE_FIELD_PATTERNS.some(p => normalized.includes(p)) || SENSITIVE_FIELD_SUFFIXES.some(s => normalized.endsWith(s))\n}\n\nexport function hashSensitiveValue(value: string): string {\n return `${createHash(\"sha256\").update(value).digest(\"hex\")} (sha256 hash)`\n}\n\nexport function safeStringifyJson(data: any, skippedNames?: Set<string>): string {\n return JSON.stringify(\n data,\n (name, value) => {\n if (isSensitiveFieldName(name) || (skippedNames != null && skippedNames.has(name))) {\n return typeof value === \"string\" ? hashSensitiveValue(value) : \"<stripped sensitive data>\"\n }\n return value\n },\n 2\n )\n}\n"]} | ||
| {"version":3,"file":"httpExecutor.js","sourceRoot":"","sources":["../src/httpExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,UAAU,EAAQ,MAAM,QAAQ,CAAA;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,MAAM,MAAM,OAAO,CAAA;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,IAAI,CAAA;AAGtC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,yBAAyB,EAAgB,MAAM,gCAAgC,CAAA;AAExF,MAAM,KAAK,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAA;AAExC,gFAAgF;AAEhF,gFAAgF;AAChF,oEAAoE;AACpE,MAAM,aAAa,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,OA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I,IAAI,IAAK,OAAO,CAAC,QAAgB,CAAC,QAAQ,IAAI,IAAI,EAAE,CAAC;QAC3E,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC7B,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,MAAM,UAAU,GAAG,aAAa,CAAC,IAAI,CAAC,CAAA;IACtC,OAAO,wBAAwB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,wBAAwB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;AACjI,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,OAAO,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAA;AAC5E,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAS,EAAE,YAA0B;IACrE,OAAO,IAAI,CAAC,SAAS,CACnB,IAAI,EACJ,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QACd,IAAI,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,IAAI,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;YACnF,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,2BAA2B,CAAA;QAC5F,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC,EACD,CAAC,CACF,CAAA;AACH,CAAC","sourcesContent":["import { BinaryToTextEncoding, createHash, Hash } from \"crypto\"\nimport { sleep } from \"./retry.js\"\nimport _debug from \"debug\"\nimport { createWriteStream } from \"fs\"\nimport { IncomingMessage, OutgoingHttpHeader, OutgoingHttpHeaders, RequestOptions } from \"http\"\nimport { Socket } from \"net\"\nimport { Transform } from \"stream\"\nimport { URL } from \"url\"\nimport { Nullish } from \"./index.js\"\nimport { CancellationToken } from \"./CancellationToken.js\"\nimport { newError } from \"./error.js\"\nimport { ProgressCallbackTransform, ProgressInfo } from \"./ProgressCallbackTransform.js\"\n\nconst debug = _debug(\"electron-builder\")\n\n// ── Sensitive-data registries ────────────────────────────────────────────────\n\n// Normalise a header or field name: lowercase + strip all separators (- and _).\n// Shared by both registries so lookup is always separator-agnostic.\nconst normalizeName = (name: string): string => name.toLowerCase().replace(/[-_]/g, \"\")\n\n// HTTP header names (normalised) stripped on cross-origin redirects.\n// Stored normalised; lookup normalises the incoming key with normalizeName().\nconst SENSITIVE_REDIRECT_HEADERS = new Set([\"authorization\", \"proxyauthorization\", \"privatetoken\", \"xapikey\", \"xauthtoken\", \"xaccesstoken\", \"xgitlabtoken\", \"cookie\", \"xcsrftoken\"])\n\n// Substrings: a field name containing any of these (after normalization) is redacted.\nconst SENSITIVE_FIELD_PATTERNS: string[] = [\"token\", \"password\", \"secret\", \"authorization\", \"credential\", \"apikey\", \"passphrase\", \"auth\"] as const\n\n// Suffixes: a field name ending with any of these (after normalization) is redacted.\n// Intentionally greedy — \"publicKey\" is also stripped; over-stripping debug logs is\n// acceptable, under-stripping a credential is not.\nconst SENSITIVE_FIELD_SUFFIXES: string[] = [\"key\"] as const\n\n/**\n * Register an additional HTTP header to strip on cross-origin redirects.\n * Intended for custom publishers (e.g. GenericPublisher with a non-standard auth header).\n */\nexport function addSensitiveRedirectHeader(header: string): void {\n SENSITIVE_REDIRECT_HEADERS.add(normalizeName(header))\n}\n\n/**\n * Register an additional substring pattern used by {@link safeStringifyJson} to\n * identify sensitive field names. Input is normalized (lowercased, separators stripped).\n * Intended for custom publishers that store credentials under non-standard field names.\n */\nexport function addSensitiveFieldPattern(pattern: string): void {\n SENSITIVE_FIELD_PATTERNS.push(pattern.toLowerCase().replace(/[-_]/g, \"\"))\n}\n\nexport interface RequestHeaders extends OutgoingHttpHeaders {\n [key: string]: OutgoingHttpHeader | undefined\n}\n\nexport interface DownloadOptions {\n readonly headers?: OutgoingHttpHeaders | null\n readonly sha2?: string | null\n readonly sha512?: string | null\n\n readonly cancellationToken: CancellationToken\n\n // noinspection JSUnusedLocalSymbols\n onProgress?: (progress: ProgressInfo) => void\n}\n\nexport function createHttpError(response: IncomingMessage, description: any | null = null) {\n return new HttpError(\n response.statusCode || -1,\n `${response.statusCode} ${response.statusMessage}` +\n (description == null ? \"\" : \"\\n\" + JSON.stringify(description, null, \" \")) +\n \"\\nHeaders: \" +\n safeStringifyJson(response.headers),\n description\n )\n}\n\nconst HTTP_STATUS_CODES = new Map<number, string>([\n [429, \"Too many requests\"],\n [400, \"Bad request\"],\n [403, \"Forbidden\"],\n [404, \"Not found\"],\n [405, \"Method not allowed\"],\n [406, \"Not acceptable\"],\n [408, \"Request timeout\"],\n [413, \"Request entity too large\"],\n [500, \"Internal server error\"],\n [502, \"Bad gateway\"],\n [503, \"Service unavailable\"],\n [504, \"Gateway timeout\"],\n [505, \"HTTP version not supported\"],\n])\n\nexport class HttpError extends Error {\n constructor(\n readonly statusCode: number,\n message = `HTTP error: ${HTTP_STATUS_CODES.get(statusCode) || statusCode}`,\n readonly description: any | null = null\n ) {\n super(message)\n\n this.name = \"HttpError\"\n ;(this as NodeJS.ErrnoException).code = `HTTP_ERROR_${statusCode}`\n }\n\n isServerError() {\n return this.statusCode >= 500 && this.statusCode <= 599\n }\n}\n\nexport function parseJson(result: Promise<string | null>) {\n return result.then(it => (it == null || it.length === 0 ? null : JSON.parse(it)))\n}\n\ninterface Request {\n abort: () => void\n end: (data?: Buffer) => void\n}\nexport abstract class HttpExecutor<T extends Request> {\n protected readonly maxRedirects = 10\n\n request(options: RequestOptions, cancellationToken: CancellationToken = new CancellationToken(), data?: { [name: string]: any } | null): Promise<string | null> {\n configureRequestOptions(options)\n const json = data == null ? undefined : JSON.stringify(data)\n const encodedData = json ? Buffer.from(json) : undefined\n if (encodedData != null) {\n if (debug.enabled) {\n debug(safeStringifyJson(data))\n }\n const { headers, ...opts } = options\n options = {\n method: \"post\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Content-Length\": encodedData.length,\n ...headers,\n },\n ...opts,\n }\n }\n return this.doApiRequest(options, cancellationToken, it => it.end(encodedData))\n }\n\n doApiRequest(\n options: RequestOptions,\n cancellationToken: CancellationToken,\n requestProcessor: (request: T, reject: (error: Error) => void) => void,\n redirectCount = 0\n ): Promise<string> {\n if (debug.enabled) {\n const { headers: _headers, auth: _auth, ...safeOptions } = options as any\n debug(`Request: ${safeStringifyJson(safeOptions)}`)\n }\n\n return cancellationToken.createPromise<string>((resolve, reject, onCancel) => {\n const request = this.createRequest(options, (response: any) => {\n try {\n this.handleResponse(response, options, cancellationToken, resolve, reject, redirectCount, requestProcessor)\n } catch (e: any) {\n reject(e)\n }\n })\n this.addErrorAndTimeoutHandlers(request, reject, options.timeout)\n this.addRedirectHandlers(request, options, reject, redirectCount, options => {\n this.doApiRequest(options, cancellationToken, requestProcessor, redirectCount).then(resolve).catch(reject)\n })\n requestProcessor(request, reject)\n onCancel(() => request.abort())\n })\n }\n\n // noinspection JSUnusedLocalSymbols\n // eslint-disable-next-line\n protected addRedirectHandlers(request: any, options: RequestOptions, reject: (error: Error) => void, redirectCount: number, handler: (options: RequestOptions) => void) {\n // not required for NodeJS\n }\n\n addErrorAndTimeoutHandlers(request: any, reject: (error: Error) => void, timeout = 60 * 1000) {\n this.addTimeOutHandler(request, reject, timeout)\n request.on(\"error\", reject)\n request.on(\"aborted\", () => {\n reject(new Error(\"Request has been aborted by the server\"))\n })\n }\n\n private handleResponse(\n response: IncomingMessage,\n options: RequestOptions,\n cancellationToken: CancellationToken,\n resolve: (data?: any) => void,\n reject: (error: Error) => void,\n redirectCount: number,\n requestProcessor: (request: T, reject: (error: Error) => void) => void\n ) {\n if (debug.enabled) {\n const { headers: _headers, auth: _auth, ...safeOptions } = options as any\n debug(`Response: ${response.statusCode} ${response.statusMessage}, request options: ${safeStringifyJson(safeOptions)}`)\n }\n\n // we handle any other >= 400 error on request end (read detailed message in the response body)\n if (response.statusCode === 404) {\n // error is clear, we don't need to read detailed error description\n reject(\n createHttpError(\n response,\n `method: ${options.method || \"GET\"} url: ${options.protocol || \"https:\"}//${options.hostname}${options.port ? `:${options.port}` : \"\"}${options.path}\n\nPlease double check that your authentication token is correct. Due to security reasons, actual status maybe not reported, but 404.\n`\n )\n )\n return\n } else if (response.statusCode === 204) {\n // on DELETE request\n resolve()\n return\n }\n\n const code = response.statusCode ?? 0\n const shouldRedirect = code >= 300 && code < 400\n const redirectUrl = safeGetHeader(response, \"location\")\n if (shouldRedirect && redirectUrl != null) {\n if (redirectCount > this.maxRedirects) {\n reject(this.createMaxRedirectError())\n return\n }\n\n this.doApiRequest(HttpExecutor.prepareRedirectUrlOptions(redirectUrl, options), cancellationToken, requestProcessor, redirectCount).then(resolve).catch(reject)\n return\n }\n\n response.setEncoding(\"utf8\")\n\n let data = \"\"\n response.on(\"error\", reject)\n response.on(\"data\", (chunk: string) => (data += chunk))\n response.on(\"end\", () => {\n try {\n if (response.statusCode != null && response.statusCode >= 400) {\n const contentType = safeGetHeader(response, \"content-type\")\n const isJson = contentType != null && (Array.isArray(contentType) ? contentType.find(it => it.includes(\"json\")) != null : contentType.includes(\"json\"))\n reject(\n createHttpError(\n response,\n `method: ${options.method || \"GET\"} url: ${options.protocol || \"https:\"}//${options.hostname}${options.port ? `:${options.port}` : \"\"}${options.path}\n\n Data:\n ${isJson ? safeStringifyJson(JSON.parse(data)) : data}\n `\n )\n )\n } else {\n resolve(data.length === 0 ? null : data)\n }\n } catch (e: any) {\n reject(e)\n }\n })\n }\n\n // noinspection JSUnusedLocalSymbols\n abstract createRequest(options: RequestOptions, callback: (response: any) => void): T\n\n async downloadToBuffer(url: URL, options: DownloadOptions): Promise<Buffer> {\n return await options.cancellationToken.createPromise<Buffer>((resolve, reject, onCancel) => {\n const responseChunks: Buffer[] = []\n const requestOptions = {\n headers: options.headers || undefined,\n // because PrivateGitHubProvider requires HttpExecutor.prepareRedirectUrlOptions logic, so, we need to redirect manually\n redirect: \"manual\",\n }\n configureRequestUrl(url, requestOptions)\n configureRequestOptions(requestOptions)\n this.doDownload(\n requestOptions,\n {\n destination: null,\n options,\n onCancel,\n callback: error => {\n if (error == null) {\n resolve(Buffer.concat(responseChunks))\n } else {\n reject(error)\n }\n },\n responseHandler: (response, callback) => {\n let receivedLength = 0\n response.on(\"data\", (chunk: Buffer) => {\n receivedLength += chunk.length\n if (receivedLength > 524288000) {\n callback(new Error(\"Maximum allowed size is 500 MB\"))\n return\n }\n responseChunks.push(chunk)\n })\n response.on(\"end\", () => {\n callback(null)\n })\n },\n },\n 0\n )\n })\n }\n\n protected doDownload(requestOptions: RequestOptions, options: DownloadCallOptions, redirectCount: number) {\n const request = this.createRequest(requestOptions, (response: IncomingMessage) => {\n if (response.statusCode! >= 400) {\n options.callback(\n new Error(\n `Cannot download \"${requestOptions.protocol || \"https:\"}//${requestOptions.hostname}${requestOptions.path}\", status ${response.statusCode}: ${response.statusMessage}`\n )\n )\n return\n }\n\n // It is possible for the response stream to fail, e.g. when a network is lost while\n // response stream is in progress. Stop waiting and reject so consumer can catch the error.\n response.on(\"error\", options.callback)\n\n // this code not relevant for Electron (redirect event instead handled)\n const redirectUrl = safeGetHeader(response, \"location\")\n if (redirectUrl != null) {\n if (redirectCount < this.maxRedirects) {\n this.doDownload(HttpExecutor.prepareRedirectUrlOptions(redirectUrl, requestOptions), options, redirectCount++)\n } else {\n options.callback(this.createMaxRedirectError())\n }\n return\n }\n\n if (options.responseHandler == null) {\n configurePipes(options, response)\n } else {\n options.responseHandler(response, options.callback)\n }\n })\n this.addErrorAndTimeoutHandlers(request, options.callback, requestOptions.timeout)\n this.addRedirectHandlers(request, requestOptions, options.callback, redirectCount, requestOptions => {\n this.doDownload(requestOptions, options, redirectCount++)\n })\n request.end()\n }\n\n protected createMaxRedirectError() {\n return new Error(`Too many redirects (> ${this.maxRedirects})`)\n }\n\n private addTimeOutHandler(request: any, callback: (error: Error) => void, timeout: number) {\n request.on(\"socket\", (socket: Socket) => {\n socket.setTimeout(timeout, () => {\n request.abort()\n callback(new Error(\"Request timed out\"))\n })\n })\n }\n\n static prepareRedirectUrlOptions(redirectUrl: string, options: RequestOptions): RequestOptions {\n const newOptions = configureRequestOptionsFromUrl(redirectUrl, { ...options })\n const headers = newOptions.headers\n if (headers == null) {\n return newOptions\n }\n\n const originalUrl = HttpExecutor.reconstructOriginalUrl(options)\n const parsedRedirectUrl = parseUrl(redirectUrl, options)\n\n if (HttpExecutor.isCrossOriginRedirect(originalUrl, parsedRedirectUrl)) {\n if (debug.enabled) {\n debug(`Cross-origin redirect (${originalUrl.host} → ${parsedRedirectUrl.host}): stripping sensitive headers`)\n }\n for (const key of Object.keys(headers)) {\n if (SENSITIVE_REDIRECT_HEADERS.has(normalizeName(key))) {\n delete (headers as Record<string, unknown>)[key]\n }\n }\n }\n return newOptions\n }\n\n private static reconstructOriginalUrl(options: RequestOptions): URL {\n const protocol = options.protocol || \"https:\"\n if (!options.hostname) {\n throw new Error(\"Missing hostname in request options\")\n }\n const hostname = options.hostname\n const port = options.port ? `:${options.port}` : \"\"\n const path = options.path || \"/\"\n return new URL(`${protocol}//${hostname}${port}${path}`)\n }\n\n private static isCrossOriginRedirect(originalUrl: URL, redirectUrl: URL): boolean {\n // Case-insensitive hostname comparison\n if (originalUrl.hostname.toLowerCase() !== redirectUrl.hostname.toLowerCase()) {\n return true\n }\n\n // Special case: allow http -> https redirect on same host with standard ports\n // This matches the behavior of Python requests library for backward compatibility\n // url.port returns an empty string if the port is omitted\n // or explicitly set to the default port for a given protocol.\n if (\n originalUrl.protocol === \"http:\" &&\n // This can be replaced with `!originalUrl.port`, but for the sake of clarity.\n [\"80\", \"\"].includes(originalUrl.port) &&\n redirectUrl.protocol === \"https:\" &&\n // This can be replaced with `!redirectUrl.port`, but for the sake of clarity.\n [\"443\", \"\"].includes(redirectUrl.port)\n ) {\n return false\n }\n\n // According to RFC 7235, a change in protocol or port constitutes a cross-origin request.\n // Forwarding authentication headers to a different origin can be a security risk.\n // For example, https://example.com:443 and http://example.com:80 are different origins.\n // We only make an exception for HTTP -> HTTPS upgrades on standard ports for backward compatibility.\n\n // Strip auth on any other protocol change\n if (originalUrl.protocol !== redirectUrl.protocol) {\n return true\n }\n\n // Strip auth on port change (accounting for default ports)\n const originalPort = originalUrl.port\n const redirectPort = redirectUrl.port\n return originalPort !== redirectPort\n }\n\n static async retryOnServerError(task: () => Promise<any>, maxRetries = 3): Promise<any> {\n for (let attemptNumber = 0; ; attemptNumber++) {\n try {\n return await task()\n } catch (e: any) {\n if (attemptNumber < maxRetries && ((e instanceof HttpError && e.isServerError()) || e.code === \"EPIPE\")) {\n await sleep(1000 * (attemptNumber + 1))\n continue\n }\n throw e\n }\n }\n }\n}\n\nexport interface DownloadCallOptions {\n responseHandler: ((response: IncomingMessage, callback: (error: Error | null) => void) => void) | null\n onCancel: (callback: () => void) => void\n callback: (error: Error | null) => void\n\n options: DownloadOptions\n\n destination: string | null\n}\n\nfunction parseUrl(url: string, options: RequestOptions): URL {\n try {\n // Would throw exception if url is not absolute\n return new URL(url)\n } catch {\n // Relative URL - construct base URL from original options\n const hostname = options.hostname\n const protocol = options.protocol || \"https:\"\n const port = options.port ? `:${options.port}` : \"\"\n const baseUrl = `${protocol}//${hostname}${port}`\n return new URL(url, baseUrl)\n }\n}\n\nexport function configureRequestOptionsFromUrl(url: string, options: RequestOptions) {\n const result = configureRequestOptions(options)\n const parsedUrl = parseUrl(url, options)\n configureRequestUrl(parsedUrl, result)\n return result\n}\n\nexport function configureRequestUrl(url: URL, options: RequestOptions): void {\n options.protocol = url.protocol\n options.hostname = url.hostname\n if (url.port) {\n options.port = url.port\n } else if (options.port) {\n delete options.port\n }\n options.path = url.pathname + url.search\n}\n\nexport class DigestTransform extends Transform {\n private readonly digester: Hash\n\n private _actual: string | null = null\n\n // noinspection JSUnusedGlobalSymbols\n get actual() {\n return this._actual\n }\n\n isValidateOnEnd = true\n\n constructor(\n readonly expected: string,\n private readonly algorithm: string = \"sha512\",\n private readonly encoding: BinaryToTextEncoding = \"base64\"\n ) {\n super()\n\n this.digester = createHash(algorithm)\n }\n\n // noinspection JSUnusedGlobalSymbols\n _transform(chunk: Buffer, encoding: string, callback: any) {\n this.digester.update(chunk)\n callback(null, chunk)\n }\n\n // noinspection JSUnusedGlobalSymbols\n _flush(callback: any): void {\n this._actual = this.digester.digest(this.encoding)\n\n if (this.isValidateOnEnd) {\n try {\n this.validate()\n } catch (e: any) {\n callback(e)\n return\n }\n }\n\n callback(null)\n }\n\n validate() {\n if (this._actual == null) {\n throw newError(\"Not finished yet\", \"ERR_STREAM_NOT_FINISHED\")\n }\n\n if (this._actual !== this.expected) {\n throw newError(`${this.algorithm} checksum mismatch, expected ${this.expected}, got ${this._actual}`, \"ERR_CHECKSUM_MISMATCH\")\n }\n\n return null\n }\n}\n\nfunction checkSha2(sha2Header: string | Nullish, sha2: string | Nullish, callback: (error: Error | null) => void): boolean {\n if (sha2Header != null && sha2 != null && sha2Header !== sha2) {\n callback(new Error(`checksum mismatch: expected ${sha2} but got ${sha2Header} (X-Checksum-Sha2 header)`))\n return false\n }\n return true\n}\n\nexport function safeGetHeader(response: any, headerKey: string) {\n const value = response.headers[headerKey]\n if (value == null) {\n return null\n } else if (Array.isArray(value)) {\n // electron API\n return value.length === 0 ? null : value[value.length - 1]\n } else {\n return value\n }\n}\n\n/**\n * electron-builder has emitted base64-encoded sha512 values in latest*.yml since 19.x (2017); hex-encoded values\n * are a legacy back-compat path for pre-19.x manifests or hand-rolled manifests built from raw `sha512sum` output.\n * Detection is unambiguous: base64-encoded sha512 is always 88 characters ending in \"==\", so it can never match the\n * strict 128-hex-character pattern (and a wrong pick would only fail closed with ERR_CHECKSUM_MISMATCH).\n *\n * Hex-encoded sha512 manifest values are deprecated and support will be removed in v28 — emit base64 instead.\n */\nexport function detectSha512Encoding(sha512: string): BinaryToTextEncoding {\n const isLegacyHex = sha512.length === 128 && /^[0-9a-fA-F]{128}$/.test(sha512)\n if (isLegacyHex) {\n debug(\"Deprecation warning: hex-encoded sha512 detected in the update manifest. Hex support is deprecated and will be removed in v28 — emit base64 instead.\")\n return \"hex\"\n }\n return \"base64\"\n}\n\nfunction configurePipes(options: DownloadCallOptions, response: IncomingMessage) {\n if (!checkSha2(safeGetHeader(response, \"X-Checksum-Sha2\"), options.options.sha2, options.callback)) {\n return\n }\n\n const streams: Array<any> = []\n if (options.options.onProgress != null) {\n const contentLength = safeGetHeader(response, \"content-length\")\n if (contentLength != null) {\n streams.push(new ProgressCallbackTransform(parseInt(contentLength, 10), options.options.cancellationToken, options.options.onProgress))\n }\n }\n\n const sha512 = options.options.sha512\n if (sha512 != null) {\n streams.push(new DigestTransform(sha512, \"sha512\", detectSha512Encoding(sha512)))\n } else if (options.options.sha2 != null) {\n streams.push(new DigestTransform(options.options.sha2, \"sha256\", \"hex\"))\n }\n\n const fileOut = createWriteStream(options.destination!)\n streams.push(fileOut)\n\n let lastStream = response\n for (const stream of streams) {\n stream.on(\"error\", (error: Error) => {\n fileOut.close()\n if (!options.options.cancellationToken.cancelled) {\n options.callback(error)\n }\n })\n lastStream = lastStream.pipe(stream)\n }\n\n fileOut.on(\"finish\", () => {\n ;(fileOut.close as any)(options.callback)\n })\n}\n\nexport function configureRequestOptions(options: RequestOptions, token?: string | null, method?: \"GET\" | \"DELETE\" | \"PUT\" | \"POST\"): RequestOptions {\n if (method != null) {\n options.method = method\n }\n\n options.headers = { ...options.headers }\n const headers = options.headers\n\n if (token != null) {\n ;(headers as any).authorization = token.startsWith(\"Basic\") || token.startsWith(\"Bearer\") ? token : `token ${token}`\n }\n if (headers[\"User-Agent\"] == null) {\n headers[\"User-Agent\"] = \"electron-builder\"\n }\n\n if (method == null || method === \"GET\" || headers[\"Cache-Control\"] == null) {\n headers[\"Cache-Control\"] = \"no-cache\"\n }\n\n // do not specify for node (in any case we use https module)\n if (options.protocol == null && (process.versions as any).electron != null) {\n options.protocol = \"https:\"\n }\n return options\n}\n\nexport function isSensitiveFieldName(name: string): boolean {\n const normalized = normalizeName(name)\n return SENSITIVE_FIELD_PATTERNS.some(p => normalized.includes(p)) || SENSITIVE_FIELD_SUFFIXES.some(s => normalized.endsWith(s))\n}\n\nexport function hashSensitiveValue(value: string): string {\n return `${createHash(\"sha256\").update(value).digest(\"hex\")} (sha256 hash)`\n}\n\nexport function safeStringifyJson(data: any, skippedNames?: Set<string>): string {\n return JSON.stringify(\n data,\n (name, value) => {\n if (isSensitiveFieldName(name) || (skippedNames != null && skippedNames.has(name))) {\n return typeof value === \"string\" ? hashSensitiveValue(value) : \"<stripped sensitive data>\"\n }\n return value\n },\n 2\n )\n}\n"]} |
+1
-1
@@ -8,3 +8,3 @@ export { BlockMap } from "./blockMapApi.js"; | ||
| export { ProgressCallbackTransform, ProgressInfo } from "./ProgressCallbackTransform.js"; | ||
| export { AllPublishOptions, BaseS3Options, BitbucketOptions, CustomPublishOptions, GenericServerOptions, getS3LikeProviderBaseUrl, getGitlabAuthHeaders, GithubOptions, githubUrl, githubTagPrefix, GitlabOptions, KeygenOptions, PublishConfiguration, PublishProvider, S3Options, SnapStoreOptions, SpacesOptions, GitlabReleaseInfo, GitlabReleaseAsset, } from "./publishOptions.js"; | ||
| export { AllPublishOptions, BaseS3Options, BitbucketOptions, CustomPublishOptions, GenericServerOptions, getS3LikeProviderBaseUrl, getGitlabAuthHeaders, GithubOptions, githubUrl, githubTagPrefix, GitlabOptions, KeygenOptions, PublishConfiguration, PublishProvider, S3Options, SnapStoreOptions, R2Options, SpacesOptions, GitlabReleaseInfo, GitlabReleaseAsset, } from "./publishOptions.js"; | ||
| export { retry, sleep } from "./retry.js"; | ||
@@ -11,0 +11,0 @@ export { parseDn } from "./rfc2253Parser.js"; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.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AAA;AAC7C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAW,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAElG,OAAO;AACP,MAAM,CAAC,MAAM,+BAA+B,GAAG,eAAe,CAAA;AAC9D,WAAW;AACX,MAAM,CAAC,MAAM,6BAA6B,GAAG,YAAY,CAAA","sourcesContent":["export { BlockMap } from \"./blockMapApi.js\"\nexport { CancellationError, CancellationToken } from \"./CancellationToken.js\"\nexport { newError } from \"./error.js\"\nexport { hashFile } from \"./hash.js\"\nexport {\n configureRequestOptions,\n configureRequestOptionsFromUrl,\n configureRequestUrl,\n createHttpError,\n DigestTransform,\n DownloadOptions,\n HttpError,\n hashSensitiveValue,\n HttpExecutor,\n isSensitiveFieldName,\n parseJson,\n RequestHeaders,\n safeGetHeader,\n safeStringifyJson,\n} from \"./httpExecutor.js\"\nexport { MemoLazy } from \"./MemoLazy.js\"\nexport { ProgressCallbackTransform, ProgressInfo } from \"./ProgressCallbackTransform.js\"\nexport {\n AllPublishOptions,\n BaseS3Options,\n BitbucketOptions,\n CustomPublishOptions,\n GenericServerOptions,\n getS3LikeProviderBaseUrl,\n getGitlabAuthHeaders,\n GithubOptions,\n githubUrl,\n githubTagPrefix,\n GitlabOptions,\n KeygenOptions,\n PublishConfiguration,\n PublishProvider,\n S3Options,\n SnapStoreOptions,\n SpacesOptions,\n GitlabReleaseInfo,\n GitlabReleaseAsset,\n} from \"./publishOptions.js\"\nexport { retry, sleep } from \"./retry.js\"\nexport { parseDn } from \"./rfc2253Parser.js\"\nexport { BlockMapDataHolder, PackageFileInfo, ReleaseNoteInfo, UpdateFileInfo, UpdateInfo, WindowsUpdateInfo } from \"./updateInfo.js\"\nexport { UUID } from \"./uuid.js\"\nexport { parseXml, XElement } from \"./xml.js\"\nexport { isValidKey, mapToObject, asArray, Nullish, deepAssign, objectToArgs } from \"./objects.js\"\n\n// nsis\nexport const CURRENT_APP_INSTALLER_FILE_NAME = \"installer.exe\"\n// nsis-web\nexport const CURRENT_APP_PACKAGE_FILE_NAME = \"package.7z\"\n"]} | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,OAAO,EACL,uBAAuB,EACvB,8BAA8B,EAC9B,mBAAmB,EACnB,eAAe,EACf,eAAe,EAEf,SAAS,EACT,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,SAAS,EAET,aAAa,EACb,iBAAiB,GAClB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,yBAAyB,EAAgB,MAAM,gCAAgC,CAAA;AACxF,OAAO,EAML,wBAAwB,EACxB,oBAAoB,EAEpB,SAAS,EACT,eAAe,GAWhB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAE5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAW,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAElG,OAAO;AACP,MAAM,CAAC,MAAM,+BAA+B,GAAG,eAAe,CAAA;AAC9D,WAAW;AACX,MAAM,CAAC,MAAM,6BAA6B,GAAG,YAAY,CAAA","sourcesContent":["export { BlockMap } from \"./blockMapApi.js\"\nexport { CancellationError, CancellationToken } from \"./CancellationToken.js\"\nexport { newError } from \"./error.js\"\nexport { hashFile } from \"./hash.js\"\nexport {\n configureRequestOptions,\n configureRequestOptionsFromUrl,\n configureRequestUrl,\n createHttpError,\n DigestTransform,\n DownloadOptions,\n HttpError,\n hashSensitiveValue,\n HttpExecutor,\n isSensitiveFieldName,\n parseJson,\n RequestHeaders,\n safeGetHeader,\n safeStringifyJson,\n} from \"./httpExecutor.js\"\nexport { MemoLazy } from \"./MemoLazy.js\"\nexport { ProgressCallbackTransform, ProgressInfo } from \"./ProgressCallbackTransform.js\"\nexport {\n AllPublishOptions,\n BaseS3Options,\n BitbucketOptions,\n CustomPublishOptions,\n GenericServerOptions,\n getS3LikeProviderBaseUrl,\n getGitlabAuthHeaders,\n GithubOptions,\n githubUrl,\n githubTagPrefix,\n GitlabOptions,\n KeygenOptions,\n PublishConfiguration,\n PublishProvider,\n S3Options,\n SnapStoreOptions,\n R2Options,\n SpacesOptions,\n GitlabReleaseInfo,\n GitlabReleaseAsset,\n} from \"./publishOptions.js\"\nexport { retry, sleep } from \"./retry.js\"\nexport { parseDn } from \"./rfc2253Parser.js\"\nexport { BlockMapDataHolder, PackageFileInfo, ReleaseNoteInfo, UpdateFileInfo, UpdateInfo, WindowsUpdateInfo } from \"./updateInfo.js\"\nexport { UUID } from \"./uuid.js\"\nexport { parseXml, XElement } from \"./xml.js\"\nexport { isValidKey, mapToObject, asArray, Nullish, deepAssign, objectToArgs } from \"./objects.js\"\n\n// nsis\nexport const CURRENT_APP_INSTALLER_FILE_NAME = \"installer.exe\"\n// nsis-web\nexport const CURRENT_APP_PACKAGE_FILE_NAME = \"package.7z\"\n"]} |
| import { OutgoingHttpHeaders } from "http"; | ||
| export type PublishProvider = "github" | "gitlab" | "s3" | "spaces" | "generic" | "custom" | "snapStore" | "keygen" | "bitbucket"; | ||
| export type AllPublishOptions = string | GithubOptions | GitlabOptions | S3Options | SpacesOptions | GenericServerOptions | CustomPublishOptions | KeygenOptions | SnapStoreOptions | BitbucketOptions; | ||
| export type PublishProvider = "github" | "gitlab" | "s3" | "spaces" | "r2" | "generic" | "custom" | "snapStore" | "keygen" | "bitbucket"; | ||
| export type AllPublishOptions = string | GithubOptions | GitlabOptions | S3Options | SpacesOptions | R2Options | GenericServerOptions | CustomPublishOptions | KeygenOptions | SnapStoreOptions | BitbucketOptions; | ||
| export interface PublishConfiguration { | ||
@@ -214,8 +214,12 @@ /** | ||
| * | ||
| * For converting an app password to a usable token, you can utilize this | ||
| * Bitbucket Cloud is [retiring app passwords](https://www.atlassian.com/blog/bitbucket/bitbucket-cloud-transitions-to-api-tokens) in favor of API tokens and access tokens. Authentication is selected by whether a `username` is provided: | ||
| * - With `username` — the token is sent via HTTP Basic auth. Use a Bitbucket username + [app password](https://bitbucket.org/account/settings/app-passwords), or an Atlassian account email + [API token](https://support.atlassian.com/bitbucket-cloud/docs/using-api-tokens/). | ||
| * - Without `username` — the token is sent as a repository/project/workspace [access token](https://support.atlassian.com/bitbucket-cloud/docs/using-access-tokens/) via Bearer auth. | ||
| * | ||
| * For the auto-updater on a private repository, pass the matching header to `autoUpdater.addAuthHeader(...)`: | ||
| ```typescript | ||
| convertAppPassword(owner: string, appPassword: string) { | ||
| const base64encodedData = Buffer.from(`${owner}:${appPassword.trim()}`).toString("base64") | ||
| return `Basic ${base64encodedData}` | ||
| } | ||
| // access token (no username) | ||
| autoUpdater.addAuthHeader(`Bearer ${token}`) | ||
| // app password or API token (with username) | ||
| autoUpdater.addAuthHeader(`Basic ${Buffer.from(`${username}:${token}`).toString("base64")}`) | ||
| ``` | ||
@@ -233,7 +237,7 @@ */ | ||
| /** | ||
| * The [app password](https://bitbucket.org/account/settings/app-passwords) to support auto-update from private bitbucket repositories. | ||
| * The token to support auto-update from private bitbucket repositories. Depending on `username`, this is a Bitbucket [app password](https://bitbucket.org/account/settings/app-passwords), an Atlassian [API token](https://support.atlassian.com/bitbucket-cloud/docs/using-api-tokens/), or a repository/project/workspace [access token](https://support.atlassian.com/bitbucket-cloud/docs/using-access-tokens/). | ||
| */ | ||
| readonly token?: string | null; | ||
| /** | ||
| * The user name to support auto-update from private bitbucket repositories. | ||
| * The user name to support auto-update from private bitbucket repositories. Provide a Bitbucket username (for an app password) or an Atlassian account email (for an API token) to authenticate with HTTP Basic auth. Leave unset to send `token` as a Bearer access token. | ||
| */ | ||
@@ -372,2 +376,72 @@ readonly username?: string | null; | ||
| } | ||
| /** | ||
| * [Cloudflare R2](https://developers.cloudflare.com/r2/) options. | ||
| * Credentials are required; define `CF_R2_ACCESS_KEY_ID` and `CF_R2_SECRET_ACCESS_KEY` environment variables | ||
| * with an R2 API token (see https://developers.cloudflare.com/r2/api/s3/tokens/). | ||
| * | ||
| * **Public access for auto-updates:** R2 buckets are private by default. The S3-compatible API endpoint | ||
| * always requires authentication, so `electron-updater` cannot download updates directly from it. | ||
| * You must either enable a custom domain or an r2.dev subdomain for the bucket in the Cloudflare | ||
| * dashboard (see https://developers.cloudflare.com/r2/buckets/public-buckets/) and then set | ||
| * `publicUrl` to that base URL so the updater knows where to fetch update metadata and binaries. | ||
| * | ||
| * **ACLs:** R2 does not support S3 ACLs. The `acl` option from `BaseS3Options` is intentionally | ||
| * excluded here. Configure public bucket access in the Cloudflare dashboard instead. | ||
| * | ||
| * Example configuration: | ||
| * | ||
| ```json | ||
| { | ||
| "build": { | ||
| "publish": { | ||
| "provider": "r2", | ||
| "bucket": "my-releases", | ||
| "accountId": "abcdef1234567890abcdef1234567890", | ||
| "publicUrl": "https://pub-abcdef1234567890abcdef1234567890.r2.dev" | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
| */ | ||
| export interface R2Options extends BaseS3Options { | ||
| /** | ||
| * The provider. Must be `r2`. | ||
| */ | ||
| readonly provider: "r2"; | ||
| /** | ||
| * The R2 bucket name. | ||
| */ | ||
| readonly bucket: string; | ||
| /** | ||
| * Your Cloudflare account ID (32-character hex string). Found on the R2 overview page | ||
| * in the Cloudflare dashboard. Used to construct the S3-compatible upload endpoint: | ||
| * `https://<accountId>.r2.cloudflarestorage.com` | ||
| */ | ||
| readonly accountId: string; | ||
| /** | ||
| * The public base URL from which `electron-updater` will download update metadata and | ||
| * binaries. This must be the URL of your bucket's **custom domain** or **r2.dev subdomain** | ||
| * (e.g. `https://pub-xxx.r2.dev` or `https://cdn.example.com`). | ||
| * | ||
| * Required when `publishAutoUpdate` is not `false`. The R2 S3 API endpoint requires | ||
| * authentication and cannot serve unauthenticated download requests. | ||
| * | ||
| * See https://developers.cloudflare.com/r2/buckets/public-buckets/ | ||
| */ | ||
| readonly publicUrl?: string | null; | ||
| /** | ||
| * The jurisdiction of the R2 bucket, if the bucket was created with a jurisdictional | ||
| * restriction. Buckets created in a jurisdiction live on a separate endpoint — | ||
| * `https://<accountId>.<jurisdiction>.r2.cloudflarestorage.com` — so this must match | ||
| * the jurisdiction the bucket was created with. Omit for regular buckets. | ||
| * | ||
| * See https://developers.cloudflare.com/r2/reference/data-location/#jurisdictional-restrictions | ||
| */ | ||
| readonly jurisdiction?: "eu" | "fedramp" | null; | ||
| /** | ||
| * R2 does not support S3 ACLs. This option is not applicable and will be ignored. | ||
| * Configure bucket-level public access in the Cloudflare dashboard instead. | ||
| */ | ||
| readonly acl?: never; | ||
| } | ||
| export interface GitlabReleaseInfo { | ||
@@ -374,0 +448,0 @@ name: string; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"publishOptions.d.ts","sourceRoot":"","sources":["../src/publishOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAA;AAG1C,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,QAAQ,GAAG,IAAI,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAA;AAGjI,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,aAAa,GACb,aAAa,GACb,SAAS,GACT,aAAa,GACb,oBAAoB,GACpB,oBAAoB,GACpB,aAAa,GACb,gBAAgB,GAChB,gBAAgB,CAAA;AAEpB,MAAM,WAAW,oB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C;QACb,MAAM,EAAE,MAAM,CAAA;QACd,GAAG,EAAE,MAAM,CAAA;KACZ,CAAC,CAAA;IACF,KAAK,EAAE,KAAK,CAAC;QACX,EAAE,EAAE,MAAM,CAAA;QACV,IAAI,EAAE,MAAM,CAAA;QACZ,GAAG,EAAE,MAAM,CAAA;QACX,gBAAgB,EAAE,MAAM,CAAA;QACxB,SAAS,EAAE,MAAM,CAAA;KAClB,CAAC,CAAA;CACH;AAED,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,oBAAoB,UAY3E"} |
@@ -31,2 +31,5 @@ /** @private */ | ||
| } | ||
| if (provider === "r2") { | ||
| return r2Url(configuration); | ||
| } | ||
| throw new Error(`Not supported provider: ${provider}`); | ||
@@ -80,2 +83,19 @@ } | ||
| } | ||
| function r2Url(options) { | ||
| if (options.bucket == null || options.bucket.trim() === "") { | ||
| throw new Error(`bucket is missing`); | ||
| } | ||
| if (options.accountId == null || options.accountId.trim() === "") { | ||
| throw new Error(`accountId is missing`); | ||
| } | ||
| // Use the public URL (custom domain / r2.dev subdomain) when provided — the S3 API endpoint | ||
| // always requires authentication and cannot serve unauthenticated download requests. | ||
| if (options.publicUrl != null && options.publicUrl.trim() !== "") { | ||
| return appendPath(options.publicUrl.replace(/\/$/, ""), options.path); | ||
| } | ||
| // Jurisdictional buckets (e.g. "eu", "fedramp") live on a separate endpoint: | ||
| // https://<accountId>.<jurisdiction>.r2.cloudflarestorage.com | ||
| const jurisdiction = options.jurisdiction == null || options.jurisdiction.trim() === "" ? "" : `${options.jurisdiction.trim()}.`; | ||
| return appendPath(`https://${options.accountId}.${jurisdiction}r2.cloudflarestorage.com/${options.bucket}`, options.path); | ||
| } | ||
| //# sourceMappingURL=publishOptions.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"publishOptions.js","sourceRoot":"","sources":["../src/publishOptions.ts"],"names":[],"mappings":"AA6IA,eAAe;AACf,MAAM,UAAU,SAAS,CAAC,OAAsB,EAAE,WAAW,GAAG,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AC;QACzB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAA;IACpC,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,IAAI,IAAI,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAA;IACtC,CAAC;IACD,OAAO,UAAU,CAAC,WAAW,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,MAAM,yBAAyB,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;AACrG,CAAC","sourcesContent":["import { OutgoingHttpHeaders } from \"http\"\nimport { Nullish } from \"./index.js\"\n\nexport type PublishProvider = \"github\" | \"gitlab\" | \"s3\" | \"spaces\" | \"generic\" | \"custom\" | \"snapStore\" | \"keygen\" | \"bitbucket\"\n\n// typescript-json-schema generates only PublishConfiguration if it is specified in the list, so, it is not added here\nexport type AllPublishOptions =\n | string\n | GithubOptions\n | GitlabOptions\n | S3Options\n | SpacesOptions\n | GenericServerOptions\n | CustomPublishOptions\n | KeygenOptions\n | SnapStoreOptions\n | BitbucketOptions\n\nexport interface PublishConfiguration {\n /**\n * The provider.\n */\n readonly provider: PublishProvider\n\n /**\n * @private\n * win-only\n */\n publisherName?: Array<string> | null\n\n /**\n * @private\n * win-only\n */\n readonly updaterCacheDirName?: string | null\n\n /**\n * Whether to publish auto update info files.\n *\n * Auto update relies only on the first provider in the list (you can specify several publishers).\n * Thus, probably, there`s no need to upload the metadata files for the other configured providers. But by default will be uploaded.\n *\n * @default true\n */\n readonly publishAutoUpdate?: boolean\n\n /**\n * Any custom request headers\n */\n readonly requestHeaders?: OutgoingHttpHeaders\n\n /**\n * Request timeout in milliseconds. (Default is 2 minutes; O is ignored)\n *\n * @default 120000\n */\n readonly timeout?: number | null\n}\n\n// https://github.com/electron-userland/electron-builder/issues/3261\nexport interface CustomPublishOptions extends PublishConfiguration {\n /**\n * The provider. Must be `custom`.\n */\n readonly provider: \"custom\"\n\n /**\n * The Provider to provide UpdateInfo regarding available updates. Required\n * to use custom providers with electron-updater.\n */\n updateProvider?: new (options: CustomPublishOptions, updater: any, runtimeOptions: any) => any\n\n [index: string]: any\n}\n\n/**\n * [GitHub](https://help.github.com/articles/about-releases/) options.\n *\n * GitHub [personal access token](https://help.github.com/articles/creating-an-access-token-for-command-line-use/) is required. You can generate by going to [https://github.com/settings/tokens/new](https://github.com/settings/tokens/new). The access token should have the repo scope/permission.\n * Define `GH_TOKEN` environment variable.\n */\nexport interface GithubOptions extends PublishConfiguration {\n /**\n * The provider. Must be `github`.\n */\n readonly provider: \"github\"\n\n /**\n * The repository name. [Detected automatically](#github-repository-and-bintray-package).\n */\n readonly repo?: string | null\n\n /**\n * The owner.\n */\n readonly owner?: string | null\n\n /**\n * If defined, sets the prefix of the tag name that comes before the semver number.\n * e.g. \"v\" in \"v1.2.3\" or \"test\" of \"test1.2.3\".\n * @default \"v\"\n */\n readonly tagNamePrefix?: string\n\n /**\n * The host (including the port if need).\n * @default github.com\n */\n readonly host?: string | null\n\n /**\n * The protocol. GitHub Publisher supports only `https`.\n * @default https\n */\n readonly protocol?: \"https\" | \"http\" | null\n\n /**\n * The access token to support auto-update from private github repositories. Never specify it in the configuration files. Only for [setFeedURL](https://www.electron.build/auto-update#appupdatersetfeedurloptions).\n */\n readonly token?: string | null\n\n /**\n * Whether to use private github auto-update provider if `GH_TOKEN` environment variable is defined. See [Private GitHub Update Repo](https://www.electron.build/auto-update#private-github-update-repo).\n */\n readonly private?: boolean | null\n\n /**\n * The channel.\n * @default latest\n */\n readonly channel?: string | null\n\n /**\n * The type of release. By default `draft` release will be created.\n *\n * Also you can set release type using environment variable. If `EP_DRAFT`is set to `true` — `draft`, if `EP_PRE_RELEASE`is set to `true` — `prerelease`.\n * @default draft\n */\n releaseType?: \"draft\" | \"prerelease\" | \"release\" | null\n}\n\n/** @private */\nexport function githubUrl(options: GithubOptions, defaultHost = \"github.com\") {\n return `${options.protocol || \"https\"}://${options.host || defaultHost}`\n}\n\nexport function githubTagPrefix(options: GithubOptions) {\n return options.tagNamePrefix ?? \"v\"\n}\n\nexport function getGitlabAuthHeaders(token: string | null): { [key: string]: string } {\n const headers: { [key: string]: string } = {}\n\n if (token != null) {\n // If the token starts with \"Bearer\", it is an OAuth application secret\n // Note that the original gitlab token would not start with \"Bearer\"\n // it might start with \"gloas-\", if so user needs to add \"Bearer \" prefix to the token\n if (token.startsWith(\"Bearer\")) {\n headers.authorization = token\n } else {\n headers[\"PRIVATE-TOKEN\"] = token\n }\n }\n\n return headers\n}\n\n/**\n * [GitLab](https://docs.gitlab.com/ee/user/project/releases/) options.\n *\n * GitLab [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) is required for private repositories. You can generate one by going to your GitLab profile settings.\n * Define `GITLAB_TOKEN` environment variable.\n */\nexport interface GitlabOptions extends PublishConfiguration {\n /**\n * The provider. Must be `gitlab`.\n */\n readonly provider: \"gitlab\"\n\n /**\n * The GitLab project ID or path (e.g., \"12345678\" or \"namespace/project\").\n */\n readonly projectId?: string | number | null\n\n /**\n * The GitLab host (including the port if need).\n * @default gitlab.com\n */\n readonly host?: string | null\n\n /**\n * The access token to support auto-update from private GitLab repositories. Never specify it in the configuration files.\n */\n readonly token?: string | null\n\n /**\n * Whether to use `v`-prefixed tag name.\n * @default true\n */\n readonly vPrefixedTagName?: boolean\n\n /**\n * The channel.\n * @default latest\n */\n readonly channel?: string | null\n\n /**\n * Upload target method. Can be \"project_upload\" for GitLab project uploads or \"generic_package\" for GitLab generic packages.\n * @default \"project_upload\"\n */\n readonly uploadTarget?: \"project_upload\" | \"generic_package\" | null\n}\n\n/**\n * Generic (any HTTP(S) server) options.\n * In all publish options [File Macros](https://www.electron.build/file-patterns#file-macros) are supported.\n */\nexport interface GenericServerOptions extends PublishConfiguration {\n /**\n * The provider. Must be `generic`.\n */\n readonly provider: \"generic\"\n\n /**\n * The base url. e.g. `https://bucket_name.s3.amazonaws.com`.\n */\n readonly url: string\n\n /**\n * The channel.\n * @default latest\n */\n readonly channel?: string | null\n\n /**\n * Whether to use multiple range requests for differential update. Defaults to `true` if `url` doesn't contain `s3.amazonaws.com`.\n */\n readonly useMultipleRangeRequest?: boolean\n}\n\n/**\n * Keygen options.\n * https://keygen.sh/\n * Define `KEYGEN_TOKEN` environment variable.\n */\nexport interface KeygenOptions extends PublishConfiguration {\n /**\n * The provider. Must be `keygen`.\n */\n readonly provider: \"keygen\"\n\n /**\n * Keygen host for self-hosted instances\n * @default \"api.keygen.sh\"\n */\n readonly host?: string\n\n /**\n * Keygen account's UUID\n */\n readonly account: string\n\n /**\n * Keygen product's UUID\n */\n readonly product: string\n\n /**\n * The channel.\n * @default stable\n */\n readonly channel?: \"stable\" | \"rc\" | \"beta\" | \"alpha\" | \"dev\" | null\n\n /**\n * The target Platform. Is set programmatically explicitly during publishing.\n */\n readonly platform?: string | null\n}\n\n/**\n * Bitbucket options.\n * https://bitbucket.org/\n * Define `BITBUCKET_TOKEN` environment variable.\n *\n * For converting an app password to a usable token, you can utilize this\n```typescript\nconvertAppPassword(owner: string, appPassword: string) {\n const base64encodedData = Buffer.from(`${owner}:${appPassword.trim()}`).toString(\"base64\")\n return `Basic ${base64encodedData}`\n}\n```\n */\nexport interface BitbucketOptions extends PublishConfiguration {\n /**\n * The provider. Must be `bitbucket`.\n */\n readonly provider: \"bitbucket\"\n\n /**\n * Repository owner\n */\n readonly owner: string\n\n /**\n * The [app password](https://bitbucket.org/account/settings/app-passwords) to support auto-update from private bitbucket repositories.\n */\n readonly token?: string | null\n\n /**\n * The user name to support auto-update from private bitbucket repositories.\n */\n readonly username?: string | null\n\n /**\n * Repository slug/name\n */\n readonly slug: string\n\n /**\n * The channel.\n * @default latest\n */\n readonly channel?: string | null\n}\n\n/**\n * [Snap Store](https://snapcraft.io/) options. To publish directly to Snapcraft, see <a href=\"https://snapcraft.io/docs/snapcraft-authentication\">Snapcraft authentication options</a> for local or CI/CD authentication options.\n */\nexport interface SnapStoreOptions extends PublishConfiguration {\n /**\n * The provider. Must be `snapStore`.\n */\n readonly provider: \"snapStore\"\n\n /**\n * snapcraft repo name\n */\n readonly repo?: string\n\n /**\n * The list of channels the snap would be released.\n * @default [\"edge\"]\n */\n readonly channels?: string | Array<string> | null\n}\n\nexport interface BaseS3Options extends PublishConfiguration {\n /**\n * The update channel.\n * @default latest\n */\n channel?: string | null\n\n /**\n * The directory path.\n * @default /\n */\n readonly path?: string | null\n\n /**\n * The ACL. Set to `null` to not [add](https://github.com/electron-userland/electron-builder/issues/1822).\n *\n * @default public-read\n */\n readonly acl?: \"private\" | \"public-read\" | null\n}\n\n/**\n * [Amazon S3](https://aws.amazon.com/s3/) options.\n * AWS credentials are required, please see [getting your credentials](http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/getting-your-credentials.html).\n * To set credentials define `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` [environment variables](http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-environment.html) directly,\n * or use [~/.aws/credentials](http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-shared.html) file,\n * or use [~/.aws/config](https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html) file. For the last method to work you will also need to define `AWS_SDK_LOAD_CONFIG=1` environment variable.\n *\n * Example configuration:\n *\n```json\n{\n \"build\":\n \"publish\": {\n \"provider\": \"s3\",\n \"bucket\": \"bucket-name\"\n }\n }\n}\n```\n */\nexport interface S3Options extends BaseS3Options {\n /**\n * The provider. Must be `s3`.\n */\n readonly provider: \"s3\"\n\n /**\n * The bucket name.\n */\n readonly bucket: string\n\n /**\n * The region. Is determined and set automatically when publishing.\n */\n region?: string | null\n\n /**\n * The ACL. Set to `null` to not [add](https://github.com/electron-userland/electron-builder/issues/1822).\n *\n * Please see [required permissions for the S3 provider](https://github.com/electron-userland/electron-builder/issues/1618#issuecomment-314679128).\n *\n * @default public-read\n */\n readonly acl?: \"private\" | \"public-read\" | null\n\n /**\n * The type of storage to use for the object.\n * @default STANDARD\n */\n readonly storageClass?: \"STANDARD\" | \"REDUCED_REDUNDANCY\" | \"STANDARD_IA\" | null\n\n /**\n * Server-side encryption algorithm to use for the object.\n */\n readonly encryption?: \"AES256\" | \"aws:kms\" | null\n\n /**\n * The endpoint URI to send requests to. The default endpoint is built from the configured region.\n * The endpoint should be a string like `https://{service}.{region}.amazonaws.com`.\n */\n readonly endpoint?: string | null\n\n /**\n * If set to true, this will enable the s3 accelerated endpoint\n * These endpoints have a particular format of:\n * ${bucketname}.s3-accelerate.amazonaws.com\n */\n readonly accelerate?: boolean\n\n /**\n * When true, force a path-style endpoint to be used where the bucket name is part of the path.\n * [Path-style Access](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#path-style-access)\n */\n readonly forcePathStyle?: boolean\n}\n\n/**\n * [DigitalOcean Spaces](https://www.digitalocean.com/community/tutorials/an-introduction-to-digitalocean-spaces) options.\n * Access key is required, define `DO_KEY_ID` and `DO_SECRET_KEY` environment variables.\n */\nexport interface SpacesOptions extends BaseS3Options {\n /**\n * The provider. Must be `spaces`.\n */\n readonly provider: \"spaces\"\n\n /**\n * The space name.\n */\n readonly name: string\n\n /**\n * The region (e.g. `nyc3`).\n */\n readonly region: string\n}\n\nexport interface GitlabReleaseInfo {\n name: string\n tag_name: string\n description: string\n created_at: string\n released_at: string\n upcoming_release: boolean\n assets: GitlabReleaseAsset\n}\n\nexport interface GitlabReleaseAsset {\n count: number\n sources: Array<{\n format: string\n url: string\n }>\n links: Array<{\n id: number\n name: string\n url: string\n direct_asset_url: string\n link_type: string\n }>\n}\n\nexport function getS3LikeProviderBaseUrl(configuration: PublishConfiguration) {\n const provider = configuration.provider\n if (provider === \"s3\") {\n return s3Url(configuration as S3Options)\n }\n if (provider === \"spaces\") {\n return spacesUrl(configuration as SpacesOptions)\n }\n throw new Error(`Not supported provider: ${provider}`)\n}\n\nfunction s3Url(options: S3Options) {\n let url: string\n if (options.accelerate == true) {\n url = `https://${options.bucket}.s3-accelerate.amazonaws.com`\n } else if (options.endpoint != null) {\n url = `${options.endpoint}/${options.bucket}`\n } else if (options.bucket.includes(\".\")) {\n if (options.region == null) {\n throw new Error(`Bucket name \"${options.bucket}\" includes a dot, but S3 region is missing`)\n }\n\n // special case, see http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro\n if (options.region === \"us-east-1\") {\n url = `https://s3.amazonaws.com/${options.bucket}`\n } else {\n url = `https://s3-${options.region}.amazonaws.com/${options.bucket}`\n }\n } else if (options.region === \"cn-north-1\") {\n url = `https://${options.bucket}.s3.${options.region}.amazonaws.com.cn`\n } else {\n url = `https://${options.bucket}.s3.amazonaws.com`\n }\n return appendPath(url, options.path)\n}\n\nfunction appendPath(url: string, p: string | Nullish): string {\n if (p != null && p.length > 0) {\n if (!p.startsWith(\"/\")) {\n url += \"/\"\n }\n url += p\n }\n return url\n}\n\nfunction spacesUrl(options: SpacesOptions) {\n if (options.name == null) {\n throw new Error(`name is missing`)\n }\n if (options.region == null) {\n throw new Error(`region is missing`)\n }\n return appendPath(`https://${options.name}.${options.region}.digitaloceanspaces.com`, options.path)\n}\n"]} | ||
| {"version":3,"file":"publishOptions.js","sourceRoot":"","sources":["../src/publishOptions.ts"],"names":[],"mappings":"AA8IA,eAAe;AACf,MAAM,UAAU,SAAS,CAAC,OAAsB,EAAE,WAAW,GAAG,YAAY;IAC1E,OAAO,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,MAAM,OAAO,CAAC,IAAI,IAAI,WAAW,EAAE,CAAA;AAC1E,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAAsB;IACpD,OAAO,OAAO,CAAC,aAAa,IAAI,GAAG,CAAA;AACrC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,KAAoB;IACvD,MAAM,OAAO,GAA8B,EAAE,CAAA;IAE7C,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;QAClB,uEAAuE;QACvE,oEAAoE;QACpE,sFAAsF;QACtF,IAAI,KAAK,CAAC,U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,CAAC;AAED,SAAS,KAAK,CAAC,OAAkB;IAC/B,IAAI,OAAO,CAAC,MAAM,IAAI,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QAC3D,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAA;IACtC,CAAC;IACD,IAAI,OAAO,CAAC,SAAS,IAAI,IAAI,IAAI,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACjE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAA;IACzC,CAAC;IACD,4FAA4F;IAC5F,qFAAqF;IACrF,IAAI,OAAO,CAAC,SAAS,IAAI,IAAI,IAAI,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACjE,OAAO,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;IACvE,CAAC;IACD,6EAA6E;IAC7E,8DAA8D;IAC9D,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,IAAI,IAAI,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAA;IAChI,OAAO,UAAU,CAAC,WAAW,OAAO,CAAC,SAAS,IAAI,YAAY,4BAA4B,OAAO,CAAC,MAAM,EAAE,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;AAC3H,CAAC","sourcesContent":["import { OutgoingHttpHeaders } from \"http\"\nimport { Nullish } from \"./index.js\"\n\nexport type PublishProvider = \"github\" | \"gitlab\" | \"s3\" | \"spaces\" | \"r2\" | \"generic\" | \"custom\" | \"snapStore\" | \"keygen\" | \"bitbucket\"\n\n// typescript-json-schema generates only PublishConfiguration if it is specified in the list, so, it is not added here\nexport type AllPublishOptions =\n | string\n | GithubOptions\n | GitlabOptions\n | S3Options\n | SpacesOptions\n | R2Options\n | GenericServerOptions\n | CustomPublishOptions\n | KeygenOptions\n | SnapStoreOptions\n | BitbucketOptions\n\nexport interface PublishConfiguration {\n /**\n * The provider.\n */\n readonly provider: PublishProvider\n\n /**\n * @private\n * win-only\n */\n publisherName?: Array<string> | null\n\n /**\n * @private\n * win-only\n */\n readonly updaterCacheDirName?: string | null\n\n /**\n * Whether to publish auto update info files.\n *\n * Auto update relies only on the first provider in the list (you can specify several publishers).\n * Thus, probably, there`s no need to upload the metadata files for the other configured providers. But by default will be uploaded.\n *\n * @default true\n */\n readonly publishAutoUpdate?: boolean\n\n /**\n * Any custom request headers\n */\n readonly requestHeaders?: OutgoingHttpHeaders\n\n /**\n * Request timeout in milliseconds. (Default is 2 minutes; O is ignored)\n *\n * @default 120000\n */\n readonly timeout?: number | null\n}\n\n// https://github.com/electron-userland/electron-builder/issues/3261\nexport interface CustomPublishOptions extends PublishConfiguration {\n /**\n * The provider. Must be `custom`.\n */\n readonly provider: \"custom\"\n\n /**\n * The Provider to provide UpdateInfo regarding available updates. Required\n * to use custom providers with electron-updater.\n */\n updateProvider?: new (options: CustomPublishOptions, updater: any, runtimeOptions: any) => any\n\n [index: string]: any\n}\n\n/**\n * [GitHub](https://help.github.com/articles/about-releases/) options.\n *\n * GitHub [personal access token](https://help.github.com/articles/creating-an-access-token-for-command-line-use/) is required. You can generate by going to [https://github.com/settings/tokens/new](https://github.com/settings/tokens/new). The access token should have the repo scope/permission.\n * Define `GH_TOKEN` environment variable.\n */\nexport interface GithubOptions extends PublishConfiguration {\n /**\n * The provider. Must be `github`.\n */\n readonly provider: \"github\"\n\n /**\n * The repository name. [Detected automatically](#github-repository-and-bintray-package).\n */\n readonly repo?: string | null\n\n /**\n * The owner.\n */\n readonly owner?: string | null\n\n /**\n * If defined, sets the prefix of the tag name that comes before the semver number.\n * e.g. \"v\" in \"v1.2.3\" or \"test\" of \"test1.2.3\".\n * @default \"v\"\n */\n readonly tagNamePrefix?: string\n\n /**\n * The host (including the port if need).\n * @default github.com\n */\n readonly host?: string | null\n\n /**\n * The protocol. GitHub Publisher supports only `https`.\n * @default https\n */\n readonly protocol?: \"https\" | \"http\" | null\n\n /**\n * The access token to support auto-update from private github repositories. Never specify it in the configuration files. Only for [setFeedURL](https://www.electron.build/auto-update#appupdatersetfeedurloptions).\n */\n readonly token?: string | null\n\n /**\n * Whether to use private github auto-update provider if `GH_TOKEN` environment variable is defined. See [Private GitHub Update Repo](https://www.electron.build/auto-update#private-github-update-repo).\n */\n readonly private?: boolean | null\n\n /**\n * The channel.\n * @default latest\n */\n readonly channel?: string | null\n\n /**\n * The type of release. By default `draft` release will be created.\n *\n * Also you can set release type using environment variable. If `EP_DRAFT`is set to `true` — `draft`, if `EP_PRE_RELEASE`is set to `true` — `prerelease`.\n * @default draft\n */\n releaseType?: \"draft\" | \"prerelease\" | \"release\" | null\n}\n\n/** @private */\nexport function githubUrl(options: GithubOptions, defaultHost = \"github.com\") {\n return `${options.protocol || \"https\"}://${options.host || defaultHost}`\n}\n\nexport function githubTagPrefix(options: GithubOptions) {\n return options.tagNamePrefix ?? \"v\"\n}\n\nexport function getGitlabAuthHeaders(token: string | null): { [key: string]: string } {\n const headers: { [key: string]: string } = {}\n\n if (token != null) {\n // If the token starts with \"Bearer\", it is an OAuth application secret\n // Note that the original gitlab token would not start with \"Bearer\"\n // it might start with \"gloas-\", if so user needs to add \"Bearer \" prefix to the token\n if (token.startsWith(\"Bearer\")) {\n headers.authorization = token\n } else {\n headers[\"PRIVATE-TOKEN\"] = token\n }\n }\n\n return headers\n}\n\n/**\n * [GitLab](https://docs.gitlab.com/ee/user/project/releases/) options.\n *\n * GitLab [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) is required for private repositories. You can generate one by going to your GitLab profile settings.\n * Define `GITLAB_TOKEN` environment variable.\n */\nexport interface GitlabOptions extends PublishConfiguration {\n /**\n * The provider. Must be `gitlab`.\n */\n readonly provider: \"gitlab\"\n\n /**\n * The GitLab project ID or path (e.g., \"12345678\" or \"namespace/project\").\n */\n readonly projectId?: string | number | null\n\n /**\n * The GitLab host (including the port if need).\n * @default gitlab.com\n */\n readonly host?: string | null\n\n /**\n * The access token to support auto-update from private GitLab repositories. Never specify it in the configuration files.\n */\n readonly token?: string | null\n\n /**\n * Whether to use `v`-prefixed tag name.\n * @default true\n */\n readonly vPrefixedTagName?: boolean\n\n /**\n * The channel.\n * @default latest\n */\n readonly channel?: string | null\n\n /**\n * Upload target method. Can be \"project_upload\" for GitLab project uploads or \"generic_package\" for GitLab generic packages.\n * @default \"project_upload\"\n */\n readonly uploadTarget?: \"project_upload\" | \"generic_package\" | null\n}\n\n/**\n * Generic (any HTTP(S) server) options.\n * In all publish options [File Macros](https://www.electron.build/file-patterns#file-macros) are supported.\n */\nexport interface GenericServerOptions extends PublishConfiguration {\n /**\n * The provider. Must be `generic`.\n */\n readonly provider: \"generic\"\n\n /**\n * The base url. e.g. `https://bucket_name.s3.amazonaws.com`.\n */\n readonly url: string\n\n /**\n * The channel.\n * @default latest\n */\n readonly channel?: string | null\n\n /**\n * Whether to use multiple range requests for differential update. Defaults to `true` if `url` doesn't contain `s3.amazonaws.com`.\n */\n readonly useMultipleRangeRequest?: boolean\n}\n\n/**\n * Keygen options.\n * https://keygen.sh/\n * Define `KEYGEN_TOKEN` environment variable.\n */\nexport interface KeygenOptions extends PublishConfiguration {\n /**\n * The provider. Must be `keygen`.\n */\n readonly provider: \"keygen\"\n\n /**\n * Keygen host for self-hosted instances\n * @default \"api.keygen.sh\"\n */\n readonly host?: string\n\n /**\n * Keygen account's UUID\n */\n readonly account: string\n\n /**\n * Keygen product's UUID\n */\n readonly product: string\n\n /**\n * The channel.\n * @default stable\n */\n readonly channel?: \"stable\" | \"rc\" | \"beta\" | \"alpha\" | \"dev\" | null\n\n /**\n * The target Platform. Is set programmatically explicitly during publishing.\n */\n readonly platform?: string | null\n}\n\n/**\n * Bitbucket options.\n * https://bitbucket.org/\n * Define `BITBUCKET_TOKEN` environment variable.\n *\n * Bitbucket Cloud is [retiring app passwords](https://www.atlassian.com/blog/bitbucket/bitbucket-cloud-transitions-to-api-tokens) in favor of API tokens and access tokens. Authentication is selected by whether a `username` is provided:\n * - With `username` — the token is sent via HTTP Basic auth. Use a Bitbucket username + [app password](https://bitbucket.org/account/settings/app-passwords), or an Atlassian account email + [API token](https://support.atlassian.com/bitbucket-cloud/docs/using-api-tokens/).\n * - Without `username` — the token is sent as a repository/project/workspace [access token](https://support.atlassian.com/bitbucket-cloud/docs/using-access-tokens/) via Bearer auth.\n *\n * For the auto-updater on a private repository, pass the matching header to `autoUpdater.addAuthHeader(...)`:\n```typescript\n// access token (no username)\nautoUpdater.addAuthHeader(`Bearer ${token}`)\n// app password or API token (with username)\nautoUpdater.addAuthHeader(`Basic ${Buffer.from(`${username}:${token}`).toString(\"base64\")}`)\n```\n */\nexport interface BitbucketOptions extends PublishConfiguration {\n /**\n * The provider. Must be `bitbucket`.\n */\n readonly provider: \"bitbucket\"\n\n /**\n * Repository owner\n */\n readonly owner: string\n\n /**\n * The token to support auto-update from private bitbucket repositories. Depending on `username`, this is a Bitbucket [app password](https://bitbucket.org/account/settings/app-passwords), an Atlassian [API token](https://support.atlassian.com/bitbucket-cloud/docs/using-api-tokens/), or a repository/project/workspace [access token](https://support.atlassian.com/bitbucket-cloud/docs/using-access-tokens/).\n */\n readonly token?: string | null\n\n /**\n * The user name to support auto-update from private bitbucket repositories. Provide a Bitbucket username (for an app password) or an Atlassian account email (for an API token) to authenticate with HTTP Basic auth. Leave unset to send `token` as a Bearer access token.\n */\n readonly username?: string | null\n\n /**\n * Repository slug/name\n */\n readonly slug: string\n\n /**\n * The channel.\n * @default latest\n */\n readonly channel?: string | null\n}\n\n/**\n * [Snap Store](https://snapcraft.io/) options. To publish directly to Snapcraft, see <a href=\"https://snapcraft.io/docs/snapcraft-authentication\">Snapcraft authentication options</a> for local or CI/CD authentication options.\n */\nexport interface SnapStoreOptions extends PublishConfiguration {\n /**\n * The provider. Must be `snapStore`.\n */\n readonly provider: \"snapStore\"\n\n /**\n * snapcraft repo name\n */\n readonly repo?: string\n\n /**\n * The list of channels the snap would be released.\n * @default [\"edge\"]\n */\n readonly channels?: string | Array<string> | null\n}\n\nexport interface BaseS3Options extends PublishConfiguration {\n /**\n * The update channel.\n * @default latest\n */\n channel?: string | null\n\n /**\n * The directory path.\n * @default /\n */\n readonly path?: string | null\n\n /**\n * The ACL. Set to `null` to not [add](https://github.com/electron-userland/electron-builder/issues/1822).\n *\n * @default public-read\n */\n readonly acl?: \"private\" | \"public-read\" | null\n}\n\n/**\n * [Amazon S3](https://aws.amazon.com/s3/) options.\n * AWS credentials are required, please see [getting your credentials](http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/getting-your-credentials.html).\n * To set credentials define `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` [environment variables](http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-environment.html) directly,\n * or use [~/.aws/credentials](http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-shared.html) file,\n * or use [~/.aws/config](https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html) file. For the last method to work you will also need to define `AWS_SDK_LOAD_CONFIG=1` environment variable.\n *\n * Example configuration:\n *\n```json\n{\n \"build\":\n \"publish\": {\n \"provider\": \"s3\",\n \"bucket\": \"bucket-name\"\n }\n }\n}\n```\n */\nexport interface S3Options extends BaseS3Options {\n /**\n * The provider. Must be `s3`.\n */\n readonly provider: \"s3\"\n\n /**\n * The bucket name.\n */\n readonly bucket: string\n\n /**\n * The region. Is determined and set automatically when publishing.\n */\n region?: string | null\n\n /**\n * The ACL. Set to `null` to not [add](https://github.com/electron-userland/electron-builder/issues/1822).\n *\n * Please see [required permissions for the S3 provider](https://github.com/electron-userland/electron-builder/issues/1618#issuecomment-314679128).\n *\n * @default public-read\n */\n readonly acl?: \"private\" | \"public-read\" | null\n\n /**\n * The type of storage to use for the object.\n * @default STANDARD\n */\n readonly storageClass?: \"STANDARD\" | \"REDUCED_REDUNDANCY\" | \"STANDARD_IA\" | null\n\n /**\n * Server-side encryption algorithm to use for the object.\n */\n readonly encryption?: \"AES256\" | \"aws:kms\" | null\n\n /**\n * The endpoint URI to send requests to. The default endpoint is built from the configured region.\n * The endpoint should be a string like `https://{service}.{region}.amazonaws.com`.\n */\n readonly endpoint?: string | null\n\n /**\n * If set to true, this will enable the s3 accelerated endpoint\n * These endpoints have a particular format of:\n * ${bucketname}.s3-accelerate.amazonaws.com\n */\n readonly accelerate?: boolean\n\n /**\n * When true, force a path-style endpoint to be used where the bucket name is part of the path.\n * [Path-style Access](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#path-style-access)\n */\n readonly forcePathStyle?: boolean\n}\n\n/**\n * [DigitalOcean Spaces](https://www.digitalocean.com/community/tutorials/an-introduction-to-digitalocean-spaces) options.\n * Access key is required, define `DO_KEY_ID` and `DO_SECRET_KEY` environment variables.\n */\nexport interface SpacesOptions extends BaseS3Options {\n /**\n * The provider. Must be `spaces`.\n */\n readonly provider: \"spaces\"\n\n /**\n * The space name.\n */\n readonly name: string\n\n /**\n * The region (e.g. `nyc3`).\n */\n readonly region: string\n}\n\n/**\n * [Cloudflare R2](https://developers.cloudflare.com/r2/) options.\n * Credentials are required; define `CF_R2_ACCESS_KEY_ID` and `CF_R2_SECRET_ACCESS_KEY` environment variables\n * with an R2 API token (see https://developers.cloudflare.com/r2/api/s3/tokens/).\n *\n * **Public access for auto-updates:** R2 buckets are private by default. The S3-compatible API endpoint\n * always requires authentication, so `electron-updater` cannot download updates directly from it.\n * You must either enable a custom domain or an r2.dev subdomain for the bucket in the Cloudflare\n * dashboard (see https://developers.cloudflare.com/r2/buckets/public-buckets/) and then set\n * `publicUrl` to that base URL so the updater knows where to fetch update metadata and binaries.\n *\n * **ACLs:** R2 does not support S3 ACLs. The `acl` option from `BaseS3Options` is intentionally\n * excluded here. Configure public bucket access in the Cloudflare dashboard instead.\n *\n * Example configuration:\n *\n```json\n{\n \"build\": {\n \"publish\": {\n \"provider\": \"r2\",\n \"bucket\": \"my-releases\",\n \"accountId\": \"abcdef1234567890abcdef1234567890\",\n \"publicUrl\": \"https://pub-abcdef1234567890abcdef1234567890.r2.dev\"\n }\n }\n}\n```\n */\nexport interface R2Options extends BaseS3Options {\n /**\n * The provider. Must be `r2`.\n */\n readonly provider: \"r2\"\n\n /**\n * The R2 bucket name.\n */\n readonly bucket: string\n\n /**\n * Your Cloudflare account ID (32-character hex string). Found on the R2 overview page\n * in the Cloudflare dashboard. Used to construct the S3-compatible upload endpoint:\n * `https://<accountId>.r2.cloudflarestorage.com`\n */\n readonly accountId: string\n\n /**\n * The public base URL from which `electron-updater` will download update metadata and\n * binaries. This must be the URL of your bucket's **custom domain** or **r2.dev subdomain**\n * (e.g. `https://pub-xxx.r2.dev` or `https://cdn.example.com`).\n *\n * Required when `publishAutoUpdate` is not `false`. The R2 S3 API endpoint requires\n * authentication and cannot serve unauthenticated download requests.\n *\n * See https://developers.cloudflare.com/r2/buckets/public-buckets/\n */\n readonly publicUrl?: string | null\n\n /**\n * The jurisdiction of the R2 bucket, if the bucket was created with a jurisdictional\n * restriction. Buckets created in a jurisdiction live on a separate endpoint —\n * `https://<accountId>.<jurisdiction>.r2.cloudflarestorage.com` — so this must match\n * the jurisdiction the bucket was created with. Omit for regular buckets.\n *\n * See https://developers.cloudflare.com/r2/reference/data-location/#jurisdictional-restrictions\n */\n readonly jurisdiction?: \"eu\" | \"fedramp\" | null\n\n /**\n * R2 does not support S3 ACLs. This option is not applicable and will be ignored.\n * Configure bucket-level public access in the Cloudflare dashboard instead.\n */\n readonly acl?: never\n}\n\nexport interface GitlabReleaseInfo {\n name: string\n tag_name: string\n description: string\n created_at: string\n released_at: string\n upcoming_release: boolean\n assets: GitlabReleaseAsset\n}\n\nexport interface GitlabReleaseAsset {\n count: number\n sources: Array<{\n format: string\n url: string\n }>\n links: Array<{\n id: number\n name: string\n url: string\n direct_asset_url: string\n link_type: string\n }>\n}\n\nexport function getS3LikeProviderBaseUrl(configuration: PublishConfiguration) {\n const provider = configuration.provider\n if (provider === \"s3\") {\n return s3Url(configuration as S3Options)\n }\n if (provider === \"spaces\") {\n return spacesUrl(configuration as SpacesOptions)\n }\n if (provider === \"r2\") {\n return r2Url(configuration as R2Options)\n }\n throw new Error(`Not supported provider: ${provider}`)\n}\n\nfunction s3Url(options: S3Options) {\n let url: string\n if (options.accelerate == true) {\n url = `https://${options.bucket}.s3-accelerate.amazonaws.com`\n } else if (options.endpoint != null) {\n url = `${options.endpoint}/${options.bucket}`\n } else if (options.bucket.includes(\".\")) {\n if (options.region == null) {\n throw new Error(`Bucket name \"${options.bucket}\" includes a dot, but S3 region is missing`)\n }\n\n // special case, see http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro\n if (options.region === \"us-east-1\") {\n url = `https://s3.amazonaws.com/${options.bucket}`\n } else {\n url = `https://s3-${options.region}.amazonaws.com/${options.bucket}`\n }\n } else if (options.region === \"cn-north-1\") {\n url = `https://${options.bucket}.s3.${options.region}.amazonaws.com.cn`\n } else {\n url = `https://${options.bucket}.s3.amazonaws.com`\n }\n return appendPath(url, options.path)\n}\n\nfunction appendPath(url: string, p: string | Nullish): string {\n if (p != null && p.length > 0) {\n if (!p.startsWith(\"/\")) {\n url += \"/\"\n }\n url += p\n }\n return url\n}\n\nfunction spacesUrl(options: SpacesOptions) {\n if (options.name == null) {\n throw new Error(`name is missing`)\n }\n if (options.region == null) {\n throw new Error(`region is missing`)\n }\n return appendPath(`https://${options.name}.${options.region}.digitaloceanspaces.com`, options.path)\n}\n\nfunction r2Url(options: R2Options) {\n if (options.bucket == null || options.bucket.trim() === \"\") {\n throw new Error(`bucket is missing`)\n }\n if (options.accountId == null || options.accountId.trim() === \"\") {\n throw new Error(`accountId is missing`)\n }\n // Use the public URL (custom domain / r2.dev subdomain) when provided — the S3 API endpoint\n // always requires authentication and cannot serve unauthenticated download requests.\n if (options.publicUrl != null && options.publicUrl.trim() !== \"\") {\n return appendPath(options.publicUrl.replace(/\\/$/, \"\"), options.path)\n }\n // Jurisdictional buckets (e.g. \"eu\", \"fedramp\") live on a separate endpoint:\n // https://<accountId>.<jurisdiction>.r2.cloudflarestorage.com\n const jurisdiction = options.jurisdiction == null || options.jurisdiction.trim() === \"\" ? \"\" : `${options.jurisdiction.trim()}.`\n return appendPath(`https://${options.accountId}.${jurisdiction}r2.cloudflarestorage.com/${options.bucket}`, options.path)\n}\n"]} |
+12
-4
@@ -41,7 +41,15 @@ export interface ReleaseNoteInfo { | ||
| readonly files: Array<UpdateFileInfo>; | ||
| /** @deprecated */ | ||
| readonly path: string; | ||
| /** @deprecated */ | ||
| readonly sha512: string; | ||
| /** | ||
| * Legacy top-level download descriptor for electron-updater 1.x – 2.15.0. Modern clients read `files`. | ||
| * Only emitted when `electronUpdaterCompatibility` includes legacy clients, so it may be absent. | ||
| * @deprecated | ||
| */ | ||
| readonly path?: string; | ||
| /** | ||
| * Legacy top-level checksum for electron-updater 1.x – 2.15.0. Modern clients read `files[].sha512`. | ||
| * Only emitted when `electronUpdaterCompatibility` includes legacy clients, so it may be absent. | ||
| * @deprecated | ||
| */ | ||
| readonly sha512?: string; | ||
| /** | ||
| * The release name. | ||
@@ -48,0 +56,0 @@ */ |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"updateInfo.d.ts","sourceRoot":"","sources":["../src/updateInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IAExB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CAC7B;AAED,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;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AA;IAErD;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd"} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"updateInfo.js","sourceRoot":"","sources":["../src/updateInfo.ts"],"names":[],"mappings":"","sourcesContent":["export interface ReleaseNoteInfo {\n /**\n * The version.\n */\n readonly version: string\n\n /**\n * The note.\n */\n readonly note: string | null\n}\n\nexport interface BlockMapDataHolder {\n /**\n * The file size. Used to verify downloaded size (save one HTTP request to get length).\n * Also used when block map data is embedded into the file (appimage, windows web installer package).\n */\n size?: number\n\n /**\n * The block map file size. Used when block map data is embedded into the file (appimage, windows web installer package).\n * This information can be obtained from the file itself, but it requires additional HTTP request,\n * so, to reduce request count, block map size is specified in the update metadata too.\n */\n blockMapSize?: number\n\n /**\n * The file checksum.\n */\n readonly sha512: string\n\n readonly isAdminRightsRequired?: boolean\n}\n\nexport interface PackageFileInfo extends BlockMapDataHolder {\n readonly path: string\n}\n\nexport interface UpdateFileInfo extends BlockMapDataHolder {\n url: string\n}\n\nexport interface UpdateInfo {\n /**\n * The version.\n */\n readonly version: string\n\n readonly files: Array<UpdateFileInfo>\n\n /** @deprecated */\n readonly path: string\n\n /** @deprecated */\n readonly sha512: string\n\n /**\n * The release name.\n */\n releaseName?: string | null\n\n /**\n * The release notes. List if `updater.fullChangelog` is set to `true`, `string` otherwise.\n */\n releaseNotes?: string | Array<ReleaseNoteInfo> | null\n\n /**\n * The release date.\n */\n releaseDate: string\n\n /**\n * The [staged rollout](https://www.electron.build/auto-update#staged-rollouts) percentage, 0-100.\n */\n readonly stagingPercentage?: number\n\n /**\n * The minimum version of system required for the app to run. Sample value: macOS `23.1.0`, Windows `10.0.22631`.\n * Same with os.release() value, this is a kernel version.\n */\n readonly minimumSystemVersion?: string\n}\n\nexport interface WindowsUpdateInfo extends UpdateInfo {\n packages?: { [arch: string]: PackageFileInfo } | null\n\n /**\n * @deprecated\n * @private\n */\n sha2?: string\n}\n"]} | ||
| {"version":3,"file":"updateInfo.js","sourceRoot":"","sources":["../src/updateInfo.ts"],"names":[],"mappings":"","sourcesContent":["export interface ReleaseNoteInfo {\n /**\n * The version.\n */\n readonly version: string\n\n /**\n * The note.\n */\n readonly note: string | null\n}\n\nexport interface BlockMapDataHolder {\n /**\n * The file size. Used to verify downloaded size (save one HTTP request to get length).\n * Also used when block map data is embedded into the file (appimage, windows web installer package).\n */\n size?: number\n\n /**\n * The block map file size. Used when block map data is embedded into the file (appimage, windows web installer package).\n * This information can be obtained from the file itself, but it requires additional HTTP request,\n * so, to reduce request count, block map size is specified in the update metadata too.\n */\n blockMapSize?: number\n\n /**\n * The file checksum.\n */\n readonly sha512: string\n\n readonly isAdminRightsRequired?: boolean\n}\n\nexport interface PackageFileInfo extends BlockMapDataHolder {\n readonly path: string\n}\n\nexport interface UpdateFileInfo extends BlockMapDataHolder {\n url: string\n}\n\nexport interface UpdateInfo {\n /**\n * The version.\n */\n readonly version: string\n\n readonly files: Array<UpdateFileInfo>\n\n /**\n * Legacy top-level download descriptor for electron-updater 1.x – 2.15.0. Modern clients read `files`.\n * Only emitted when `electronUpdaterCompatibility` includes legacy clients, so it may be absent.\n * @deprecated\n */\n readonly path?: string\n\n /**\n * Legacy top-level checksum for electron-updater 1.x – 2.15.0. Modern clients read `files[].sha512`.\n * Only emitted when `electronUpdaterCompatibility` includes legacy clients, so it may be absent.\n * @deprecated\n */\n readonly sha512?: string\n\n /**\n * The release name.\n */\n releaseName?: string | null\n\n /**\n * The release notes. List if `updater.fullChangelog` is set to `true`, `string` otherwise.\n */\n releaseNotes?: string | Array<ReleaseNoteInfo> | null\n\n /**\n * The release date.\n */\n releaseDate: string\n\n /**\n * The [staged rollout](https://www.electron.build/auto-update#staged-rollouts) percentage, 0-100.\n */\n readonly stagingPercentage?: number\n\n /**\n * The minimum version of system required for the app to run. Sample value: macOS `23.1.0`, Windows `10.0.22631`.\n * Same with os.release() value, this is a kernel version.\n */\n readonly minimumSystemVersion?: string\n}\n\nexport interface WindowsUpdateInfo extends UpdateInfo {\n packages?: { [arch: string]: PackageFileInfo } | null\n\n /**\n * @deprecated\n * @private\n */\n sha2?: string\n}\n"]} |
+1
-1
| { | ||
| "name": "builder-util-runtime", | ||
| "version": "10.0.0-alpha.4", | ||
| "version": "10.0.0-alpha.5", | ||
| "type": "module", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
223314
7.53%2127
6.4%