Socket
Socket
Sign inDemoInstall

builder-util-runtime

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

builder-util-runtime - npm Package Compare versions

Comparing version 8.7.3 to 8.7.4

LICENSE

109

out/bintray.js
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "__esModule", { value: true });
exports.BintrayClient = void 0;
function _httpExecutor() {
const data = require("./httpExecutor");
_httpExecutor = function () {
return data;
};
return data;
}
const httpExecutor_1 = require("./httpExecutor");
class BintrayClient {
constructor(options, httpExecutor, cancellationToken, apiKey) {
this.httpExecutor = httpExecutor;
this.cancellationToken = cancellationToken;
this.requestHeaders = null;
if (options.owner == null) {
throw new Error("owner is not specified");
constructor(options, httpExecutor, cancellationToken, apiKey) {
this.httpExecutor = httpExecutor;
this.cancellationToken = cancellationToken;
this.requestHeaders = null;
if (options.owner == null) {
throw new Error("owner is not specified");
}
if (options.package == null) {
throw new Error("package is not specified");
}
this.repo = options.repo || "generic";
this.packageName = options.package;
this.owner = options.owner;
this.user = options.user || options.owner;
this.component = options.component || null;
this.distribution = options.distribution || "stable";
this.auth = apiKey == null ? null : `Basic ${Buffer.from(`${this.user}:${apiKey}`).toString("base64")}`;
this.basePath = `/packages/${this.owner}/${this.repo}/${this.packageName}`;
}
if (options.package == null) {
throw new Error("package is not specified");
setRequestHeaders(value) {
this.requestHeaders = value;
}
this.repo = options.repo || "generic";
this.packageName = options.package;
this.owner = options.owner;
this.user = options.user || options.owner;
this.component = options.component || null;
this.distribution = options.distribution || "stable";
this.auth = apiKey == null ? null : `Basic ${Buffer.from(`${this.user}:${apiKey}`).toString("base64")}`;
this.basePath = `/packages/${this.owner}/${this.repo}/${this.packageName}`;
}
setRequestHeaders(value) {
this.requestHeaders = value;
}
bintrayRequest(path, auth, data = null, cancellationToken, method) {
return (0, _httpExecutor().parseJson)(this.httpExecutor.request((0, _httpExecutor().configureRequestOptions)({
hostname: "api.bintray.com",
path,
headers: this.requestHeaders || undefined
}, auth, method), cancellationToken, data));
}
getVersion(version) {
return this.bintrayRequest(`${this.basePath}/versions/${version}`, this.auth, null, this.cancellationToken);
}
getVersionFiles(version) {
return this.bintrayRequest(`${this.basePath}/versions/${version}/files`, this.auth, null, this.cancellationToken);
}
createVersion(version) {
return this.bintrayRequest(`${this.basePath}/versions`, this.auth, {
name: version
}, this.cancellationToken);
}
deleteVersion(version) {
return this.bintrayRequest(`${this.basePath}/versions/${version}`, this.auth, null, this.cancellationToken, "DELETE");
}
} exports.BintrayClient = BintrayClient;
// __ts-babel@6.0.4
bintrayRequest(path, auth, data = null, cancellationToken, method) {
return httpExecutor_1.parseJson(this.httpExecutor.request(httpExecutor_1.configureRequestOptions({ hostname: "api.bintray.com", path, headers: this.requestHeaders || undefined }, auth, method), cancellationToken, data));
}
getVersion(version) {
return this.bintrayRequest(`${this.basePath}/versions/${version}`, this.auth, null, this.cancellationToken);
}
getVersionFiles(version) {
return this.bintrayRequest(`${this.basePath}/versions/${version}/files`, this.auth, null, this.cancellationToken);
}
createVersion(version) {
return this.bintrayRequest(`${this.basePath}/versions`, this.auth, {
name: version,
}, this.cancellationToken);
}
deleteVersion(version) {
return this.bintrayRequest(`${this.basePath}/versions/${version}`, this.auth, null, this.cancellationToken, "DELETE");
}
}
exports.BintrayClient = BintrayClient;
//# sourceMappingURL=bintray.js.map
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
// __ts-babel@6.0.4
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=blockMapApi.js.map
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "__esModule", { value: true });
exports.CancellationError = exports.CancellationToken = void 0;
function _events() {
const data = require("events");
_events = function () {
return data;
};
return data;
}
class CancellationToken extends _events().EventEmitter {
// babel cannot compile ... correctly for super calls
constructor(parent) {
super();
this.parentCancelHandler = null;
this._parent = null;
this._cancelled = false;
if (parent != null) {
this.parent = parent;
const events_1 = require("events");
class CancellationToken extends events_1.EventEmitter {
// babel cannot compile ... correctly for super calls
constructor(parent) {
super();
this.parentCancelHandler = null;
this._parent = null;
this._cancelled = false;
if (parent != null) {
this.parent = parent;
}
}
}
get cancelled() {
return this._cancelled || this._parent != null && this._parent.cancelled;
}
set parent(value) {
this.removeParentCancelHandler();
this._parent = value;
this.parentCancelHandler = () => this.cancel();
this._parent.onCancel(this.parentCancelHandler);
}
cancel() {
this._cancelled = true;
this.emit("cancel");
}
onCancel(handler) {
if (this.cancelled) {
handler();
} else {
this.once("cancel", handler);
get cancelled() {
return this._cancelled || (this._parent != null && this._parent.cancelled);
}
}
createPromise(callback) {
if (this.cancelled) {
return Promise.reject(new CancellationError());
set parent(value) {
this.removeParentCancelHandler();
this._parent = value;
this.parentCancelHandler = () => this.cancel();
this._parent.onCancel(this.parentCancelHandler);
}
const finallyHandler = () => {
if (cancelHandler != null) {
try {
this.removeListener("cancel", cancelHandler);
cancelHandler = null;
} catch (ignore) {// ignore
cancel() {
this._cancelled = true;
this.emit("cancel");
}
onCancel(handler) {
if (this.cancelled) {
handler();
}
}
};
let cancelHandler = null;
return new Promise((resolve, reject) => {
let addedCancelHandler = null;
cancelHandler = () => {
else {
this.once("cancel", handler);
}
}
createPromise(callback) {
if (this.cancelled) {
return Promise.reject(new CancellationError());
}
const finallyHandler = () => {
if (cancelHandler != null) {
try {
this.removeListener("cancel", cancelHandler);
cancelHandler = null;
}
catch (ignore) {
// ignore
}
}
};
let cancelHandler = null;
return new Promise((resolve, reject) => {
let addedCancelHandler = null;
cancelHandler = () => {
try {
if (addedCancelHandler != null) {
addedCancelHandler();
addedCancelHandler = null;
}
}
finally {
reject(new CancellationError());
}
};
if (this.cancelled) {
cancelHandler();
return;
}
this.onCancel(cancelHandler);
callback(resolve, reject, (callback) => {
addedCancelHandler = callback;
});
})
.then(it => {
finallyHandler();
return it;
})
.catch(e => {
finallyHandler();
throw e;
});
}
removeParentCancelHandler() {
const parent = this._parent;
if (parent != null && this.parentCancelHandler != null) {
parent.removeListener("cancel", this.parentCancelHandler);
this.parentCancelHandler = null;
}
}
dispose() {
try {
if (addedCancelHandler != null) {
addedCancelHandler();
addedCancelHandler = null;
}
} finally {
reject(new CancellationError());
this.removeParentCancelHandler();
}
};
if (this.cancelled) {
cancelHandler();
return;
}
this.onCancel(cancelHandler);
callback(resolve, reject, callback => {
addedCancelHandler = callback;
});
}).then(it => {
finallyHandler();
return it;
}).catch(e => {
finallyHandler();
throw e;
});
}
removeParentCancelHandler() {
const parent = this._parent;
if (parent != null && this.parentCancelHandler != null) {
parent.removeListener("cancel", this.parentCancelHandler);
this.parentCancelHandler = null;
finally {
this.removeAllListeners();
this._parent = null;
}
}
}
dispose() {
try {
this.removeParentCancelHandler();
} finally {
this.removeAllListeners();
this._parent = null;
}
}
}
exports.CancellationToken = CancellationToken;
class CancellationError extends Error {
constructor() {
super("cancelled");
}
} exports.CancellationError = CancellationError;
// __ts-babel@6.0.4
constructor() {
super("cancelled");
}
}
exports.CancellationError = CancellationError;
//# sourceMappingURL=CancellationToken.js.map
/// <reference types="node" />
import { BinaryToTextEncoding } from "crypto";
import { IncomingMessage, OutgoingHttpHeaders, RequestOptions } from "http";

@@ -15,3 +16,3 @@ import { Transform } from "stream";

readonly cancellationToken: CancellationToken;
onProgress?(progress: ProgressInfo): void;
onProgress?: (progress: ProgressInfo) => void;
}

@@ -58,3 +59,3 @@ export declare function createHttpError(response: IncomingMessage, description?: any | null): HttpError;

isValidateOnEnd: boolean;
constructor(expected: string, algorithm?: string, encoding?: "hex" | "base64" | "latin1");
constructor(expected: string, algorithm?: string, encoding?: BinaryToTextEncoding);
_transform(chunk: Buffer, encoding: string, callback: any): void;

@@ -61,0 +62,0 @@ _flush(callback: any): void;

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createHttpError = createHttpError;
exports.parseJson = parseJson;
exports.configureRequestOptionsFromUrl = configureRequestOptionsFromUrl;
exports.configureRequestUrl = configureRequestUrl;
exports.safeGetHeader = safeGetHeader;
exports.configureRequestOptions = configureRequestOptions;
exports.safeStringifyJson = safeStringifyJson;
exports.DigestTransform = exports.HttpExecutor = exports.HttpError = void 0;
function _crypto() {
const data = require("crypto");
_crypto = function () {
return data;
};
return data;
}
var _debug2 = _interopRequireDefault(require("debug"));
var _fs = require("fs");
function _stream() {
const data = require("stream");
_stream = function () {
return data;
};
return data;
}
function _url() {
const data = require("url");
_url = function () {
return data;
};
return data;
}
function _CancellationToken() {
const data = require("./CancellationToken");
_CancellationToken = function () {
return data;
};
return data;
}
function _index() {
const data = require("./index");
_index = function () {
return data;
};
return data;
}
function _ProgressCallbackTransform() {
const data = require("./ProgressCallbackTransform");
_ProgressCallbackTransform = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const debug = (0, _debug2.default)("electron-builder");
Object.defineProperty(exports, "__esModule", { value: true });
exports.safeStringifyJson = exports.configureRequestOptions = exports.safeGetHeader = exports.DigestTransform = exports.configureRequestUrl = exports.configureRequestOptionsFromUrl = exports.HttpExecutor = exports.parseJson = exports.HttpError = exports.createHttpError = void 0;
const crypto_1 = require("crypto");
const debug_1 = require("debug");
const fs_1 = require("fs");
const stream_1 = require("stream");
const url_1 = require("url");
const CancellationToken_1 = require("./CancellationToken");
const index_1 = require("./index");
const ProgressCallbackTransform_1 = require("./ProgressCallbackTransform");
const debug = debug_1.default("electron-builder");
function createHttpError(response, description = null) {
return new HttpError(response.statusCode || -1, `${response.statusCode} ${response.statusMessage}` + (description == null ? "" : "\n" + JSON.stringify(description, null, " ")) + "\nHeaders: " + safeStringifyJson(response.headers), description);
return new HttpError(response.statusCode || -1, `${response.statusCode} ${response.statusMessage}` +
(description == null ? "" : "\n" + JSON.stringify(description, null, " ")) +
"\nHeaders: " +
safeStringifyJson(response.headers), description);
}
const HTTP_STATUS_CODES = new Map([[429, "Too many requests"], [400, "Bad request"], [403, "Forbidden"], [404, "Not found"], [405, "Method not allowed"], [406, "Not acceptable"], [408, "Request timeout"], [413, "Request entity too large"], [500, "Internal server error"], [502, "Bad gateway"], [503, "Service unavailable"], [504, "Gateway timeout"], [505, "HTTP version not supported"]]);
exports.createHttpError = createHttpError;
const HTTP_STATUS_CODES = new Map([
[429, "Too many requests"],
[400, "Bad request"],
[403, "Forbidden"],
[404, "Not found"],
[405, "Method not allowed"],
[406, "Not acceptable"],
[408, "Request timeout"],
[413, "Request entity too large"],
[500, "Internal server error"],
[502, "Bad gateway"],
[503, "Service unavailable"],
[504, "Gateway timeout"],
[505, "HTTP version not supported"],
]);
class HttpError extends Error {
constructor(statusCode, message = `HTTP error: ${HTTP_STATUS_CODES.get(statusCode) || statusCode}`, description = null) {
super(message);
this.statusCode = statusCode;
this.description = description;
this.name = "HttpError";
this.code = `HTTP_ERROR_${statusCode}`;
}
constructor(statusCode, message = `HTTP error: ${HTTP_STATUS_CODES.get(statusCode) || statusCode}`, description = null) {
super(message);
this.statusCode = statusCode;
this.description = description;
this.name = "HttpError";
this.code = `HTTP_ERROR_${statusCode}`;
}
}
exports.HttpError = HttpError;
function parseJson(result) {
return result.then(it => it == null || it.length === 0 ? null : JSON.parse(it));
return result.then(it => (it == null || it.length === 0 ? null : JSON.parse(it)));
}
exports.parseJson = parseJson;
class HttpExecutor {
constructor() {
this.maxRedirects = 10;
}
request(options, cancellationToken = new (_CancellationToken().CancellationToken)(), data) {
configureRequestOptions(options);
const encodedData = data == null ? undefined : Buffer.from(JSON.stringify(data));
if (encodedData != null) {
options.method = "post";
options.headers["Content-Type"] = "application/json";
options.headers["Content-Length"] = encodedData.length;
constructor() {
this.maxRedirects = 10;
}
return this.doApiRequest(options, cancellationToken, it => {
it.end(encodedData);
});
}
doApiRequest(options, cancellationToken, requestProcessor, redirectCount = 0) {
if (debug.enabled) {
debug(`Request: ${safeStringifyJson(options)}`);
request(options, cancellationToken = new CancellationToken_1.CancellationToken(), data) {
configureRequestOptions(options);
const encodedData = data == null ? undefined : Buffer.from(JSON.stringify(data));
if (encodedData != null) {
options.method = "post";
options.headers["Content-Type"] = "application/json";
options.headers["Content-Length"] = encodedData.length;
}
return this.doApiRequest(options, cancellationToken, it => {
;
it.end(encodedData);
});
}
return cancellationToken.createPromise((resolve, reject, onCancel) => {
const request = this.createRequest(options, response => {
try {
this.handleResponse(response, options, cancellationToken, resolve, reject, redirectCount, requestProcessor);
} catch (e) {
reject(e);
doApiRequest(options, cancellationToken, requestProcessor, redirectCount = 0) {
if (debug.enabled) {
debug(`Request: ${safeStringifyJson(options)}`);
}
});
this.addErrorAndTimeoutHandlers(request, reject);
this.addRedirectHandlers(request, options, reject, redirectCount, options => {
this.doApiRequest(options, cancellationToken, requestProcessor, redirectCount).then(resolve).catch(reject);
});
requestProcessor(request, reject);
onCancel(() => request.abort());
});
} // noinspection JSUnusedLocalSymbols
// eslint-disable-next-line
return cancellationToken.createPromise((resolve, reject, onCancel) => {
const request = this.createRequest(options, (response) => {
try {
this.handleResponse(response, options, cancellationToken, resolve, reject, redirectCount, requestProcessor);
}
catch (e) {
reject(e);
}
});
this.addErrorAndTimeoutHandlers(request, reject);
this.addRedirectHandlers(request, options, reject, redirectCount, options => {
this.doApiRequest(options, cancellationToken, requestProcessor, redirectCount).then(resolve).catch(reject);
});
requestProcessor(request, reject);
onCancel(() => request.abort());
});
}
// noinspection JSUnusedLocalSymbols
// eslint-disable-next-line
addRedirectHandlers(request, options, reject, redirectCount, handler) {
// not required for NodeJS
}
addErrorAndTimeoutHandlers(request, reject) {
this.addTimeOutHandler(request, reject);
request.on("error", reject);
request.on("aborted", () => {
reject(new Error("Request has been aborted by the server"));
});
}
handleResponse(response, options, cancellationToken, resolve, reject, redirectCount, requestProcessor) {
if (debug.enabled) {
debug(`Response: ${response.statusCode} ${response.statusMessage}, request options: ${safeStringifyJson(options)}`);
}
// we handle any other >= 400 error on request end (read detailed message in the response body)
if (response.statusCode === 404) {
// error is clear, we don't need to read detailed error description
reject(createHttpError(response, `method: ${options.method || "GET"} url: ${options.protocol || "https:"}//${options.hostname}${options.port ? `:${options.port}` : ""}${options.path}
addRedirectHandlers(request, options, reject, redirectCount, handler) {// not required for NodeJS
}
addErrorAndTimeoutHandlers(request, reject) {
this.addTimeOutHandler(request, reject);
request.on("error", reject);
request.on("aborted", () => {
reject(new Error("Request has been aborted by the server"));
});
}
handleResponse(response, options, cancellationToken, resolve, reject, redirectCount, requestProcessor) {
if (debug.enabled) {
debug(`Response: ${response.statusCode} ${response.statusMessage}, request options: ${safeStringifyJson(options)}`);
} // we handle any other >= 400 error on request end (read detailed message in the response body)
if (response.statusCode === 404) {
// error is clear, we don't need to read detailed error description
reject(createHttpError(response, `method: ${options.method || "GET"} url: ${options.protocol || "https:"}//${options.hostname}${options.port ? `:${options.port}` : ""}${options.path}
Please double check that your authentication token is correct. Due to security reasons actual status maybe not reported, but 404.
`));
return;
} else if (response.statusCode === 204) {
// on DELETE request
resolve();
return;
return;
}
else if (response.statusCode === 204) {
// on DELETE request
resolve();
return;
}
const redirectUrl = safeGetHeader(response, "location");
if (redirectUrl != null) {
if (redirectCount > this.maxRedirects) {
reject(this.createMaxRedirectError());
return;
}
this.doApiRequest(HttpExecutor.prepareRedirectUrlOptions(redirectUrl, options), cancellationToken, requestProcessor, redirectCount).then(resolve).catch(reject);
return;
}
response.setEncoding("utf8");
let data = "";
response.on("error", reject);
response.on("data", (chunk) => (data += chunk));
response.on("end", () => {
try {
if (response.statusCode != null && response.statusCode >= 400) {
const contentType = safeGetHeader(response, "content-type");
const isJson = contentType != null && (Array.isArray(contentType) ? contentType.find(it => it.includes("json")) != null : contentType.includes("json"));
reject(createHttpError(response, isJson ? JSON.parse(data) : data));
}
else {
resolve(data.length === 0 ? null : data);
}
}
catch (e) {
reject(e);
}
});
}
const redirectUrl = safeGetHeader(response, "location");
if (redirectUrl != null) {
if (redirectCount > this.maxRedirects) {
reject(this.createMaxRedirectError());
return;
}
this.doApiRequest(HttpExecutor.prepareRedirectUrlOptions(redirectUrl, options), cancellationToken, requestProcessor, redirectCount).then(resolve).catch(reject);
return;
async downloadToBuffer(url, options) {
return await options.cancellationToken.createPromise((resolve, reject, onCancel) => {
let result = null;
const requestOptions = {
headers: options.headers || undefined,
// because PrivateGitHubProvider requires HttpExecutor.prepareRedirectUrlOptions logic, so, we need to redirect manually
redirect: "manual",
};
configureRequestUrl(url, requestOptions);
configureRequestOptions(requestOptions);
this.doDownload(requestOptions, {
destination: null,
options,
onCancel,
callback: error => {
if (error == null) {
resolve(result);
}
else {
reject(error);
}
},
responseHandler: (response, callback) => {
const contentLength = safeGetHeader(response, "content-length");
let position = -1;
if (contentLength != null) {
const size = parseInt(contentLength, 10);
if (size > 0) {
if (size > 524288000) {
callback(new Error("Maximum allowed size is 500 MB"));
return;
}
result = Buffer.alloc(size);
position = 0;
}
}
response.on("data", (chunk) => {
if (position !== -1) {
chunk.copy(result, position);
position += chunk.length;
}
else if (result == null) {
result = chunk;
}
else {
if (result.length > 524288000) {
callback(new Error("Maximum allowed size is 500 MB"));
return;
}
result = Buffer.concat([result, chunk]);
}
});
response.on("end", () => {
if (result != null && position !== -1 && position !== result.length) {
callback(new Error(`Received data length ${position} is not equal to expected ${result.length}`));
}
else {
callback(null);
}
});
},
}, 0);
});
}
response.setEncoding("utf8");
let data = "";
response.on("error", reject);
response.on("data", chunk => data += chunk);
response.on("end", () => {
try {
if (response.statusCode != null && response.statusCode >= 400) {
const contentType = safeGetHeader(response, "content-type");
const isJson = contentType != null && (Array.isArray(contentType) ? contentType.find(it => it.includes("json")) != null : contentType.includes("json"));
reject(createHttpError(response, isJson ? JSON.parse(data) : data));
} else {
resolve(data.length === 0 ? null : data);
}
} catch (e) {
reject(e);
}
});
}
async downloadToBuffer(url, options) {
return await options.cancellationToken.createPromise((resolve, reject, onCancel) => {
let result = null;
const requestOptions = {
headers: options.headers || undefined,
// because PrivateGitHubProvider requires HttpExecutor.prepareRedirectUrlOptions logic, so, we need to redirect manually
redirect: "manual"
};
configureRequestUrl(url, requestOptions);
configureRequestOptions(requestOptions);
this.doDownload(requestOptions, {
destination: null,
options,
onCancel,
callback: error => {
if (error == null) {
resolve(result);
} else {
reject(error);
}
},
responseHandler: (response, callback) => {
const contentLength = safeGetHeader(response, "content-length");
let position = -1;
if (contentLength != null) {
const size = parseInt(contentLength, 10);
if (size > 0) {
if (size > 52428800) {
callback(new Error("Maximum allowed size is 50 MB"));
doDownload(requestOptions, options, redirectCount) {
const request = this.createRequest(requestOptions, (response) => {
if (response.statusCode >= 400) {
options.callback(new Error(`Cannot download "${requestOptions.protocol || "https:"}//${requestOptions.hostname}${requestOptions.path}", status ${response.statusCode}: ${response.statusMessage}`));
return;
}
result = Buffer.alloc(size);
position = 0;
}
}
response.on("data", chunk => {
if (position !== -1) {
chunk.copy(result, position);
position += chunk.length;
} else if (result == null) {
result = chunk;
} else {
if (result.length > 52428800) {
callback(new Error("Maximum allowed size is 50 MB"));
// It is possible for the response stream to fail, e.g. when a network is lost while
// response stream is in progress. Stop waiting and reject so consumer can catch the error.
response.on("error", options.callback);
// this code not relevant for Electron (redirect event instead handled)
const redirectUrl = safeGetHeader(response, "location");
if (redirectUrl != null) {
if (redirectCount < this.maxRedirects) {
this.doDownload(HttpExecutor.prepareRedirectUrlOptions(redirectUrl, requestOptions), options, redirectCount++);
}
else {
options.callback(this.createMaxRedirectError());
}
return;
}
result = Buffer.concat([result, chunk]);
}
});
response.on("end", () => {
if (result != null && position !== -1 && position !== result.length) {
callback(new Error(`Received data length ${position} is not equal to expected ${result.length}`));
} else {
callback(null);
if (options.responseHandler == null) {
configurePipes(options, response);
}
});
else {
options.responseHandler(response, options.callback);
}
});
this.addErrorAndTimeoutHandlers(request, options.callback);
this.addRedirectHandlers(request, requestOptions, options.callback, redirectCount, requestOptions => {
this.doDownload(requestOptions, options, redirectCount++);
});
request.end();
}
createMaxRedirectError() {
return new Error(`Too many redirects (> ${this.maxRedirects})`);
}
addTimeOutHandler(request, callback) {
request.on("socket", (socket) => {
socket.setTimeout(60 * 1000, () => {
request.abort();
callback(new Error("Request timed out"));
});
});
}
static prepareRedirectUrlOptions(redirectUrl, options) {
const newOptions = configureRequestOptionsFromUrl(redirectUrl, { ...options });
const headers = newOptions.headers;
if (headers != null && headers.authorization != null && headers.authorization.startsWith("token")) {
const parsedNewUrl = new url_1.URL(redirectUrl);
if (parsedNewUrl.hostname.endsWith(".amazonaws.com") || parsedNewUrl.searchParams.has("X-Amz-Credential")) {
delete headers.authorization;
}
}
}, 0);
});
}
doDownload(requestOptions, options, redirectCount) {
const request = this.createRequest(requestOptions, response => {
if (response.statusCode >= 400) {
options.callback(new Error(`Cannot download "${requestOptions.protocol || "https:"}//${requestOptions.hostname}${requestOptions.path}", status ${response.statusCode}: ${response.statusMessage}`));
return;
} // It is possible for the response stream to fail, e.g. when a network is lost while
// response stream is in progress. Stop waiting and reject so consumer can catch the error.
response.on("error", options.callback); // this code not relevant for Electron (redirect event instead handled)
const redirectUrl = safeGetHeader(response, "location");
if (redirectUrl != null) {
if (redirectCount < this.maxRedirects) {
this.doDownload(HttpExecutor.prepareRedirectUrlOptions(redirectUrl, requestOptions), options, redirectCount++);
} else {
options.callback(this.createMaxRedirectError());
}
return;
}
if (options.responseHandler == null) {
configurePipes(options, response);
} else {
options.responseHandler(response, options.callback);
}
});
this.addErrorAndTimeoutHandlers(request, options.callback);
this.addRedirectHandlers(request, requestOptions, options.callback, redirectCount, requestOptions => {
this.doDownload(requestOptions, options, redirectCount++);
});
request.end();
}
createMaxRedirectError() {
return new Error(`Too many redirects (> ${this.maxRedirects})`);
}
addTimeOutHandler(request, callback) {
request.on("socket", socket => {
socket.setTimeout(60 * 1000, () => {
request.abort();
callback(new Error("Request timed out"));
});
});
}
static prepareRedirectUrlOptions(redirectUrl, options) {
const newOptions = configureRequestOptionsFromUrl(redirectUrl, { ...options
});
const headers = newOptions.headers;
if (headers != null && headers.authorization != null && headers.authorization.startsWith("token")) {
const parsedNewUrl = new (_url().URL)(redirectUrl);
if (parsedNewUrl.hostname.endsWith(".amazonaws.com")) {
delete headers.authorization;
}
return newOptions;
}
return newOptions;
}
}
exports.HttpExecutor = HttpExecutor;
function configureRequestOptionsFromUrl(url, options) {
const result = configureRequestOptions(options);
configureRequestUrl(new (_url().URL)(url), result);
return result;
const result = configureRequestOptions(options);
configureRequestUrl(new url_1.URL(url), result);
return result;
}
exports.configureRequestOptionsFromUrl = configureRequestOptionsFromUrl;
function configureRequestUrl(url, options) {
options.protocol = url.protocol;
options.hostname = url.hostname;
if (url.port) {
options.port = url.port;
} else if (options.port) {
delete options.port;
}
options.path = url.pathname + url.search;
options.protocol = url.protocol;
options.hostname = url.hostname;
if (url.port) {
options.port = url.port;
}
else if (options.port) {
delete options.port;
}
options.path = url.pathname + url.search;
}
class DigestTransform extends _stream().Transform {
constructor(expected, algorithm = "sha512", encoding = "base64") {
super();
this.expected = expected;
this.algorithm = algorithm;
this.encoding = encoding;
this._actual = null;
this.isValidateOnEnd = true;
this.digester = (0, _crypto().createHash)(algorithm);
} // noinspection JSUnusedGlobalSymbols
get actual() {
return this._actual;
} // noinspection JSUnusedGlobalSymbols
_transform(chunk, encoding, callback) {
this.digester.update(chunk);
callback(null, chunk);
} // noinspection JSUnusedGlobalSymbols
_flush(callback) {
this._actual = this.digester.digest(this.encoding);
if (this.isValidateOnEnd) {
try {
this.validate();
} catch (e) {
callback(e);
return;
}
exports.configureRequestUrl = configureRequestUrl;
class DigestTransform extends stream_1.Transform {
constructor(expected, algorithm = "sha512", encoding = "base64") {
super();
this.expected = expected;
this.algorithm = algorithm;
this.encoding = encoding;
this._actual = null;
this.isValidateOnEnd = true;
this.digester = crypto_1.createHash(algorithm);
}
callback(null);
}
validate() {
if (this._actual == null) {
throw (0, _index().newError)("Not finished yet", "ERR_STREAM_NOT_FINISHED");
// noinspection JSUnusedGlobalSymbols
get actual() {
return this._actual;
}
if (this._actual !== this.expected) {
throw (0, _index().newError)(`${this.algorithm} checksum mismatch, expected ${this.expected}, got ${this._actual}`, "ERR_CHECKSUM_MISMATCH");
// noinspection JSUnusedGlobalSymbols
_transform(chunk, encoding, callback) {
this.digester.update(chunk);
callback(null, chunk);
}
return null;
}
// noinspection JSUnusedGlobalSymbols
_flush(callback) {
this._actual = this.digester.digest(this.encoding);
if (this.isValidateOnEnd) {
try {
this.validate();
}
catch (e) {
callback(e);
return;
}
}
callback(null);
}
validate() {
if (this._actual == null) {
throw index_1.newError("Not finished yet", "ERR_STREAM_NOT_FINISHED");
}
if (this._actual !== this.expected) {
throw index_1.newError(`${this.algorithm} checksum mismatch, expected ${this.expected}, got ${this._actual}`, "ERR_CHECKSUM_MISMATCH");
}
return null;
}
}
exports.DigestTransform = DigestTransform;
function checkSha2(sha2Header, sha2, callback) {
if (sha2Header != null && sha2 != null && sha2Header !== sha2) {
callback(new Error(`checksum mismatch: expected ${sha2} but got ${sha2Header} (X-Checksum-Sha2 header)`));
return false;
}
return true;
if (sha2Header != null && sha2 != null && sha2Header !== sha2) {
callback(new Error(`checksum mismatch: expected ${sha2} but got ${sha2Header} (X-Checksum-Sha2 header)`));
return false;
}
return true;
}
function safeGetHeader(response, headerKey) {
const value = response.headers[headerKey];
if (value == null) {
return null;
} else if (Array.isArray(value)) {
// electron API
return value.length === 0 ? null : value[value.length - 1];
} else {
return value;
}
const value = response.headers[headerKey];
if (value == null) {
return null;
}
else if (Array.isArray(value)) {
// electron API
return value.length === 0 ? null : value[value.length - 1];
}
else {
return value;
}
}
exports.safeGetHeader = safeGetHeader;
function configurePipes(options, response) {
if (!checkSha2(safeGetHeader(response, "X-Checksum-Sha2"), options.options.sha2, options.callback)) {
return;
}
const streams = [];
if (options.options.onProgress != null) {
const contentLength = safeGetHeader(response, "content-length");
if (contentLength != null) {
streams.push(new (_ProgressCallbackTransform().ProgressCallbackTransform)(parseInt(contentLength, 10), options.options.cancellationToken, options.options.onProgress));
if (!checkSha2(safeGetHeader(response, "X-Checksum-Sha2"), options.options.sha2, options.callback)) {
return;
}
}
const sha512 = options.options.sha512;
if (sha512 != null) {
streams.push(new DigestTransform(sha512, "sha512", sha512.length === 128 && !sha512.includes("+") && !sha512.includes("Z") && !sha512.includes("=") ? "hex" : "base64"));
} else if (options.options.sha2 != null) {
streams.push(new DigestTransform(options.options.sha2, "sha256", "hex"));
}
const fileOut = (0, _fs.createWriteStream)(options.destination);
streams.push(fileOut);
let lastStream = response;
for (const stream of streams) {
stream.on("error", error => {
if (!options.options.cancellationToken.cancelled) {
options.callback(error);
}
const streams = [];
if (options.options.onProgress != null) {
const contentLength = safeGetHeader(response, "content-length");
if (contentLength != null) {
streams.push(new ProgressCallbackTransform_1.ProgressCallbackTransform(parseInt(contentLength, 10), options.options.cancellationToken, options.options.onProgress));
}
}
const sha512 = options.options.sha512;
if (sha512 != null) {
streams.push(new DigestTransform(sha512, "sha512", sha512.length === 128 && !sha512.includes("+") && !sha512.includes("Z") && !sha512.includes("=") ? "hex" : "base64"));
}
else if (options.options.sha2 != null) {
streams.push(new DigestTransform(options.options.sha2, "sha256", "hex"));
}
const fileOut = fs_1.createWriteStream(options.destination);
streams.push(fileOut);
let lastStream = response;
for (const stream of streams) {
stream.on("error", (error) => {
if (!options.options.cancellationToken.cancelled) {
options.callback(error);
}
});
lastStream = lastStream.pipe(stream);
}
fileOut.on("finish", () => {
;
fileOut.close(options.callback);
});
lastStream = lastStream.pipe(stream);
}
fileOut.on("finish", () => {
fileOut.close(options.callback);
});
}
function configureRequestOptions(options, token, method) {
if (method != null) {
options.method = method;
}
options.headers = { ...options.headers
};
const headers = options.headers;
if (token != null) {
headers.authorization = token.startsWith("Basic") ? token : `token ${token}`;
}
if (headers["User-Agent"] == null) {
headers["User-Agent"] = "electron-builder";
}
if (method == null || method === "GET" || headers["Cache-Control"] == null) {
headers["Cache-Control"] = "no-cache";
} // do not specify for node (in any case we use https module)
if (options.protocol == null && process.versions.electron != null) {
options.protocol = "https:";
}
return options;
if (method != null) {
options.method = method;
}
options.headers = { ...options.headers };
const headers = options.headers;
if (token != null) {
;
headers.authorization = token.startsWith("Basic") ? token : `token ${token}`;
}
if (headers["User-Agent"] == null) {
headers["User-Agent"] = "electron-builder";
}
if (method == null || method === "GET" || headers["Cache-Control"] == null) {
headers["Cache-Control"] = "no-cache";
}
// do not specify for node (in any case we use https module)
if (options.protocol == null && process.versions.electron != null) {
options.protocol = "https:";
}
return options;
}
exports.configureRequestOptions = configureRequestOptions;
function safeStringifyJson(data, skippedNames) {
return JSON.stringify(data, (name, value) => {
if (name.endsWith("authorization") || name.endsWith("Password") || name.endsWith("PASSWORD") || name.endsWith("Token") || name.includes("password") || name.includes("token") || skippedNames != null && skippedNames.has(name)) {
return "<stripped sensitive data>";
}
return value;
}, 2);
}
// __ts-babel@6.0.4
return JSON.stringify(data, (name, value) => {
if (name.endsWith("authorization") ||
name.endsWith("Password") ||
name.endsWith("PASSWORD") ||
name.endsWith("Token") ||
name.includes("password") ||
name.includes("token") ||
(skippedNames != null && skippedNames.has(name))) {
return "<stripped sensitive data>";
}
return value;
}, 2);
}
exports.safeStringifyJson = safeStringifyJson;
//# sourceMappingURL=httpExecutor.js.map
export { CancellationToken, CancellationError } from "./CancellationToken";
export { HttpError, createHttpError, HttpExecutor, DownloadOptions, DigestTransform, RequestHeaders, safeGetHeader, configureRequestOptions, configureRequestOptionsFromUrl, safeStringifyJson, parseJson, configureRequestUrl } from "./httpExecutor";
export { BintrayOptions, GenericServerOptions, GithubOptions, PublishConfiguration, S3Options, SpacesOptions, BaseS3Options, getS3LikeProviderBaseUrl, githubUrl, PublishProvider, AllPublishOptions } from "./publishOptions";
export { HttpError, createHttpError, HttpExecutor, DownloadOptions, DigestTransform, RequestHeaders, safeGetHeader, configureRequestOptions, configureRequestOptionsFromUrl, safeStringifyJson, parseJson, configureRequestUrl, } from "./httpExecutor";
export { BintrayOptions, GenericServerOptions, GithubOptions, PublishConfiguration, S3Options, SpacesOptions, BaseS3Options, getS3LikeProviderBaseUrl, githubUrl, PublishProvider, AllPublishOptions, } from "./publishOptions";
export { UpdateInfo, UpdateFileInfo, WindowsUpdateInfo, BlockMapDataHolder, PackageFileInfo, ReleaseNoteInfo } from "./updateInfo";

@@ -5,0 +5,0 @@ export { parseDn } from "./rfc2253Parser";

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.asArray = asArray;
exports.newError = newError;
Object.defineProperty(exports, "CancellationToken", {
enumerable: true,
get: function () {
return _CancellationToken().CancellationToken;
}
});
Object.defineProperty(exports, "CancellationError", {
enumerable: true,
get: function () {
return _CancellationToken().CancellationError;
}
});
Object.defineProperty(exports, "HttpError", {
enumerable: true,
get: function () {
return _httpExecutor().HttpError;
}
});
Object.defineProperty(exports, "createHttpError", {
enumerable: true,
get: function () {
return _httpExecutor().createHttpError;
}
});
Object.defineProperty(exports, "HttpExecutor", {
enumerable: true,
get: function () {
return _httpExecutor().HttpExecutor;
}
});
Object.defineProperty(exports, "DigestTransform", {
enumerable: true,
get: function () {
return _httpExecutor().DigestTransform;
}
});
Object.defineProperty(exports, "safeGetHeader", {
enumerable: true,
get: function () {
return _httpExecutor().safeGetHeader;
}
});
Object.defineProperty(exports, "configureRequestOptions", {
enumerable: true,
get: function () {
return _httpExecutor().configureRequestOptions;
}
});
Object.defineProperty(exports, "configureRequestOptionsFromUrl", {
enumerable: true,
get: function () {
return _httpExecutor().configureRequestOptionsFromUrl;
}
});
Object.defineProperty(exports, "safeStringifyJson", {
enumerable: true,
get: function () {
return _httpExecutor().safeStringifyJson;
}
});
Object.defineProperty(exports, "parseJson", {
enumerable: true,
get: function () {
return _httpExecutor().parseJson;
}
});
Object.defineProperty(exports, "configureRequestUrl", {
enumerable: true,
get: function () {
return _httpExecutor().configureRequestUrl;
}
});
Object.defineProperty(exports, "getS3LikeProviderBaseUrl", {
enumerable: true,
get: function () {
return _publishOptions().getS3LikeProviderBaseUrl;
}
});
Object.defineProperty(exports, "githubUrl", {
enumerable: true,
get: function () {
return _publishOptions().githubUrl;
}
});
Object.defineProperty(exports, "parseDn", {
enumerable: true,
get: function () {
return _rfc2253Parser().parseDn;
}
});
Object.defineProperty(exports, "UUID", {
enumerable: true,
get: function () {
return _uuid().UUID;
}
});
Object.defineProperty(exports, "ProgressCallbackTransform", {
enumerable: true,
get: function () {
return _ProgressCallbackTransform().ProgressCallbackTransform;
}
});
Object.defineProperty(exports, "parseXml", {
enumerable: true,
get: function () {
return _xml().parseXml;
}
});
Object.defineProperty(exports, "XElement", {
enumerable: true,
get: function () {
return _xml().XElement;
}
});
exports.CURRENT_APP_PACKAGE_FILE_NAME = exports.CURRENT_APP_INSTALLER_FILE_NAME = void 0;
function _CancellationToken() {
const data = require("./CancellationToken");
_CancellationToken = function () {
return data;
};
return data;
}
function _httpExecutor() {
const data = require("./httpExecutor");
_httpExecutor = function () {
return data;
};
return data;
}
function _publishOptions() {
const data = require("./publishOptions");
_publishOptions = function () {
return data;
};
return data;
}
function _rfc2253Parser() {
const data = require("./rfc2253Parser");
_rfc2253Parser = function () {
return data;
};
return data;
}
function _uuid() {
const data = require("./uuid");
_uuid = function () {
return data;
};
return data;
}
function _ProgressCallbackTransform() {
const data = require("./ProgressCallbackTransform");
_ProgressCallbackTransform = function () {
return data;
};
return data;
}
function _xml() {
const data = require("./xml");
_xml = function () {
return data;
};
return data;
}
Object.defineProperty(exports, "__esModule", { value: true });
exports.newError = exports.asArray = exports.CURRENT_APP_PACKAGE_FILE_NAME = exports.CURRENT_APP_INSTALLER_FILE_NAME = exports.XElement = exports.parseXml = exports.ProgressCallbackTransform = exports.UUID = exports.parseDn = exports.githubUrl = exports.getS3LikeProviderBaseUrl = exports.configureRequestUrl = exports.parseJson = exports.safeStringifyJson = exports.configureRequestOptionsFromUrl = exports.configureRequestOptions = exports.safeGetHeader = exports.DigestTransform = exports.HttpExecutor = exports.createHttpError = exports.HttpError = exports.CancellationError = exports.CancellationToken = void 0;
var CancellationToken_1 = require("./CancellationToken");
Object.defineProperty(exports, "CancellationToken", { enumerable: true, get: function () { return CancellationToken_1.CancellationToken; } });
Object.defineProperty(exports, "CancellationError", { enumerable: true, get: function () { return CancellationToken_1.CancellationError; } });
var httpExecutor_1 = require("./httpExecutor");
Object.defineProperty(exports, "HttpError", { enumerable: true, get: function () { return httpExecutor_1.HttpError; } });
Object.defineProperty(exports, "createHttpError", { enumerable: true, get: function () { return httpExecutor_1.createHttpError; } });
Object.defineProperty(exports, "HttpExecutor", { enumerable: true, get: function () { return httpExecutor_1.HttpExecutor; } });
Object.defineProperty(exports, "DigestTransform", { enumerable: true, get: function () { return httpExecutor_1.DigestTransform; } });
Object.defineProperty(exports, "safeGetHeader", { enumerable: true, get: function () { return httpExecutor_1.safeGetHeader; } });
Object.defineProperty(exports, "configureRequestOptions", { enumerable: true, get: function () { return httpExecutor_1.configureRequestOptions; } });
Object.defineProperty(exports, "configureRequestOptionsFromUrl", { enumerable: true, get: function () { return httpExecutor_1.configureRequestOptionsFromUrl; } });
Object.defineProperty(exports, "safeStringifyJson", { enumerable: true, get: function () { return httpExecutor_1.safeStringifyJson; } });
Object.defineProperty(exports, "parseJson", { enumerable: true, get: function () { return httpExecutor_1.parseJson; } });
Object.defineProperty(exports, "configureRequestUrl", { enumerable: true, get: function () { return httpExecutor_1.configureRequestUrl; } });
var publishOptions_1 = require("./publishOptions");
Object.defineProperty(exports, "getS3LikeProviderBaseUrl", { enumerable: true, get: function () { return publishOptions_1.getS3LikeProviderBaseUrl; } });
Object.defineProperty(exports, "githubUrl", { enumerable: true, get: function () { return publishOptions_1.githubUrl; } });
var rfc2253Parser_1 = require("./rfc2253Parser");
Object.defineProperty(exports, "parseDn", { enumerable: true, get: function () { return rfc2253Parser_1.parseDn; } });
var uuid_1 = require("./uuid");
Object.defineProperty(exports, "UUID", { enumerable: true, get: function () { return uuid_1.UUID; } });
var ProgressCallbackTransform_1 = require("./ProgressCallbackTransform");
Object.defineProperty(exports, "ProgressCallbackTransform", { enumerable: true, get: function () { return ProgressCallbackTransform_1.ProgressCallbackTransform; } });
var xml_1 = require("./xml");
Object.defineProperty(exports, "parseXml", { enumerable: true, get: function () { return xml_1.parseXml; } });
Object.defineProperty(exports, "XElement", { enumerable: true, get: function () { return xml_1.XElement; } });
// nsis
const CURRENT_APP_INSTALLER_FILE_NAME = "installer.exe"; // nsis-web
exports.CURRENT_APP_INSTALLER_FILE_NAME = CURRENT_APP_INSTALLER_FILE_NAME;
const CURRENT_APP_PACKAGE_FILE_NAME = "package.7z";
exports.CURRENT_APP_PACKAGE_FILE_NAME = CURRENT_APP_PACKAGE_FILE_NAME;
exports.CURRENT_APP_INSTALLER_FILE_NAME = "installer.exe";
// nsis-web
exports.CURRENT_APP_PACKAGE_FILE_NAME = "package.7z";
function asArray(v) {
if (v == null) {
return [];
} else if (Array.isArray(v)) {
return v;
} else {
return [v];
}
if (v == null) {
return [];
}
else if (Array.isArray(v)) {
return v;
}
else {
return [v];
}
}
exports.asArray = asArray;
function newError(message, code) {
const error = new Error(message);
error.code = code;
return error;
}
// __ts-babel@6.0.4
const error = new Error(message);
error.code = code;
return error;
}
exports.newError = newError;
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProgressCallbackTransform = void 0;
function _stream() {
const data = require("stream");
_stream = function () {
return data;
};
return data;
}
class ProgressCallbackTransform extends _stream().Transform {
constructor(total, cancellationToken, onProgress) {
super();
this.total = total;
this.cancellationToken = cancellationToken;
this.onProgress = onProgress;
this.start = Date.now();
this.transferred = 0;
this.delta = 0;
this.nextUpdate = this.start + 1000;
}
_transform(chunk, encoding, callback) {
if (this.cancellationToken.cancelled) {
callback(new Error("cancelled"), null);
return;
const stream_1 = require("stream");
class ProgressCallbackTransform extends stream_1.Transform {
constructor(total, cancellationToken, onProgress) {
super();
this.total = total;
this.cancellationToken = cancellationToken;
this.onProgress = onProgress;
this.start = Date.now();
this.transferred = 0;
this.delta = 0;
this.nextUpdate = this.start + 1000;
}
this.transferred += chunk.length;
this.delta += chunk.length;
const now = Date.now();
if (now >= this.nextUpdate && this.transferred !== this.total
/* will be emitted on _flush */
) {
this.nextUpdate = now + 1000;
_transform(chunk, encoding, callback) {
if (this.cancellationToken.cancelled) {
callback(new Error("cancelled"), null);
return;
}
this.transferred += chunk.length;
this.delta += chunk.length;
const now = Date.now();
if (now >= this.nextUpdate && this.transferred !== this.total /* will be emitted on _flush */) {
this.nextUpdate = now + 1000;
this.onProgress({
total: this.total,
delta: this.delta,
transferred: this.transferred,
percent: (this.transferred / this.total) * 100,
bytesPerSecond: Math.round(this.transferred / ((now - this.start) / 1000)),
});
this.delta = 0;
}
callback(null, chunk);
}
_flush(callback) {
if (this.cancellationToken.cancelled) {
callback(new Error("cancelled"));
return;
}
this.onProgress({
total: this.total,
delta: this.delta,
transferred: this.transferred,
percent: this.transferred / this.total * 100,
bytesPerSecond: Math.round(this.transferred / ((now - this.start) / 1000))
total: this.total,
delta: this.delta,
transferred: this.total,
percent: 100,
bytesPerSecond: Math.round(this.transferred / ((Date.now() - this.start) / 1000)),
});
this.delta = 0;
}
callback(null, chunk);
}
_flush(callback) {
if (this.cancellationToken.cancelled) {
callback(new Error("cancelled"));
return;
callback(null);
}
this.onProgress({
total: this.total,
delta: this.delta,
transferred: this.total,
percent: 100,
bytesPerSecond: Math.round(this.transferred / ((Date.now() - this.start) / 1000))
});
this.delta = 0;
callback(null);
}
} exports.ProgressCallbackTransform = ProgressCallbackTransform;
// __ts-babel@6.0.4
}
exports.ProgressCallbackTransform = ProgressCallbackTransform;
//# sourceMappingURL=ProgressCallbackTransform.js.map
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.githubUrl = githubUrl;
exports.getS3LikeProviderBaseUrl = getS3LikeProviderBaseUrl;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getS3LikeProviderBaseUrl = exports.githubUrl = void 0;
/** @private */
function githubUrl(options, defaultHost = "github.com") {
return `${options.protocol || "https"}://${options.host || defaultHost}`;
return `${options.protocol || "https"}://${options.host || defaultHost}`;
}
exports.githubUrl = githubUrl;
function getS3LikeProviderBaseUrl(configuration) {
const provider = configuration.provider;
if (provider === "s3") {
return s3Url(configuration);
}
if (provider === "spaces") {
return spacesUrl(configuration);
}
throw new Error(`Not supported provider: ${provider}`);
const provider = configuration.provider;
if (provider === "s3") {
return s3Url(configuration);
}
if (provider === "spaces") {
return spacesUrl(configuration);
}
throw new Error(`Not supported provider: ${provider}`);
}
exports.getS3LikeProviderBaseUrl = getS3LikeProviderBaseUrl;
function s3Url(options) {
let url;
if (options.endpoint != null) {
url = `${options.endpoint}/${options.bucket}`;
} else if (options.bucket.includes(".")) {
if (options.region == null) {
throw new Error(`Bucket name "${options.bucket}" includes a dot, but S3 region is missing`);
} // special case, see http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro
if (options.region === "us-east-1") {
url = `https://s3.amazonaws.com/${options.bucket}`;
} else {
url = `https://s3-${options.region}.amazonaws.com/${options.bucket}`;
let url;
if (options.endpoint != null) {
url = `${options.endpoint}/${options.bucket}`;
}
} else if (options.region === "cn-north-1") {
url = `https://${options.bucket}.s3.${options.region}.amazonaws.com.cn`;
} else {
url = `https://${options.bucket}.s3.amazonaws.com`;
}
return appendPath(url, options.path);
else if (options.bucket.includes(".")) {
if (options.region == null) {
throw new Error(`Bucket name "${options.bucket}" includes a dot, but S3 region is missing`);
}
// special case, see http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro
if (options.region === "us-east-1") {
url = `https://s3.amazonaws.com/${options.bucket}`;
}
else {
url = `https://s3-${options.region}.amazonaws.com/${options.bucket}`;
}
}
else if (options.region === "cn-north-1") {
url = `https://${options.bucket}.s3.${options.region}.amazonaws.com.cn`;
}
else {
url = `https://${options.bucket}.s3.amazonaws.com`;
}
return appendPath(url, options.path);
}
function appendPath(url, p) {
if (p != null && p.length > 0) {
if (!p.startsWith("/")) {
url += "/";
if (p != null && p.length > 0) {
if (!p.startsWith("/")) {
url += "/";
}
url += p;
}
url += p;
}
return url;
return url;
}
function spacesUrl(options) {
if (options.name == null) {
throw new Error(`name is missing`);
}
if (options.region == null) {
throw new Error(`region is missing`);
}
return appendPath(`https://${options.name}.${options.region}.digitaloceanspaces.com`, options.path);
}
// __ts-babel@6.0.4
if (options.name == null) {
throw new Error(`name is missing`);
}
if (options.region == null) {
throw new Error(`region is missing`);
}
return appendPath(`https://${options.name}.${options.region}.digitaloceanspaces.com`, options.path);
}
//# sourceMappingURL=publishOptions.js.map
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.parseDn = parseDn;
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseDn = void 0;
function parseDn(seq) {
let quoted = false;
let key = null;
let token = "";
let nextNonSpace = 0;
seq = seq.trim();
const result = new Map();
for (let i = 0; i <= seq.length; i++) {
if (i === seq.length) {
if (key !== null) {
result.set(key, token);
}
break;
}
const ch = seq[i];
if (quoted) {
if (ch === '"') {
quoted = false;
continue;
}
} else {
if (ch === '"') {
quoted = true;
continue;
}
if (ch === "\\") {
i++;
const ord = parseInt(seq.slice(i, i + 2), 16);
if (Number.isNaN(ord)) {
token += seq[i];
} else {
i++;
token += String.fromCharCode(ord);
let quoted = false;
let key = null;
let token = "";
let nextNonSpace = 0;
seq = seq.trim();
const result = new Map();
for (let i = 0; i <= seq.length; i++) {
if (i === seq.length) {
if (key !== null) {
result.set(key, token);
}
break;
}
continue;
}
if (key === null && ch === "=") {
key = token;
token = "";
continue;
}
if (ch === "," || ch === ";" || ch === "+") {
if (key !== null) {
result.set(key, token);
const ch = seq[i];
if (quoted) {
if (ch === '"') {
quoted = false;
continue;
}
}
key = null;
token = "";
continue;
}
}
if (ch === " " && !quoted) {
if (token.length === 0) {
continue;
}
if (i > nextNonSpace) {
let j = i;
while (seq[j] === " ") {
j++;
else {
if (ch === '"') {
quoted = true;
continue;
}
if (ch === "\\") {
i++;
const ord = parseInt(seq.slice(i, i + 2), 16);
if (Number.isNaN(ord)) {
token += seq[i];
}
else {
i++;
token += String.fromCharCode(ord);
}
continue;
}
if (key === null && ch === "=") {
key = token;
token = "";
continue;
}
if (ch === "," || ch === ";" || ch === "+") {
if (key !== null) {
result.set(key, token);
}
key = null;
token = "";
continue;
}
}
nextNonSpace = j;
}
if (nextNonSpace >= seq.length || seq[nextNonSpace] === "," || seq[nextNonSpace] === ";" || key === null && seq[nextNonSpace] === "=" || key !== null && seq[nextNonSpace] === "+") {
i = nextNonSpace - 1;
continue;
}
if (ch === " " && !quoted) {
if (token.length === 0) {
continue;
}
if (i > nextNonSpace) {
let j = i;
while (seq[j] === " ") {
j++;
}
nextNonSpace = j;
}
if (nextNonSpace >= seq.length ||
seq[nextNonSpace] === "," ||
seq[nextNonSpace] === ";" ||
(key === null && seq[nextNonSpace] === "=") ||
(key !== null && seq[nextNonSpace] === "+")) {
i = nextNonSpace - 1;
continue;
}
}
token += ch;
}
token += ch;
}
return result;
}
// __ts-babel@6.0.4
return result;
}
exports.parseDn = parseDn;
//# sourceMappingURL=rfc2253Parser.js.map
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
// __ts-babel@6.0.4
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=updateInfo.js.map
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "__esModule", { value: true });
exports.nil = exports.UUID = void 0;
function _crypto() {
const data = require("crypto");
_crypto = function () {
return data;
};
return data;
const crypto_1 = require("crypto");
const index_1 = require("./index");
const invalidName = "options.name must be either a string or a Buffer";
// Node ID according to rfc4122#section-4.5
const randomHost = crypto_1.randomBytes(16);
randomHost[0] = randomHost[0] | 0x01;
// lookup table hex to byte
const hex2byte = {};
// lookup table byte to hex
const byte2hex = [];
// populate lookup tables
for (let i = 0; i < 256; i++) {
const hex = (i + 0x100).toString(16).substr(1);
hex2byte[hex] = i;
byte2hex[i] = hex;
}
function _index() {
const data = require("./index");
_index = function () {
return data;
};
return data;
}
const invalidName = "options.name must be either a string or a Buffer"; // Node ID according to rfc4122#section-4.5
const randomHost = (0, _crypto().randomBytes)(16);
randomHost[0] = randomHost[0] | 0x01; // lookup table hex to byte
const hex2byte = {}; // lookup table byte to hex
const byte2hex = []; // populate lookup tables
for (let i = 0; i < 256; i++) {
const hex = (i + 0x100).toString(16).substr(1);
hex2byte[hex] = i;
byte2hex[i] = hex;
} // UUID class
// UUID class
class UUID {
constructor(uuid) {
this.ascii = null;
this.binary = null;
const check = UUID.check(uuid);
if (!check) {
throw new Error("not a UUID");
constructor(uuid) {
this.ascii = null;
this.binary = null;
const check = UUID.check(uuid);
if (!check) {
throw new Error("not a UUID");
}
this.version = check.version;
if (check.format === "ascii") {
this.ascii = uuid;
}
else {
this.binary = uuid;
}
}
this.version = check.version;
if (check.format === "ascii") {
this.ascii = uuid;
} else {
this.binary = uuid;
static v5(name, namespace) {
return uuidNamed(name, "sha1", 0x50, namespace);
}
}
static v5(name, namespace) {
return uuidNamed(name, "sha1", 0x50, namespace);
}
toString() {
if (this.ascii == null) {
this.ascii = stringify(this.binary);
toString() {
if (this.ascii == null) {
this.ascii = stringify(this.binary);
}
return this.ascii;
}
return this.ascii;
}
inspect() {
return `UUID v${this.version} ${this.toString()}`;
}
static check(uuid, offset = 0) {
if (typeof uuid === "string") {
uuid = uuid.toLowerCase();
if (!/^[a-f0-9]{8}(-[a-f0-9]{4}){3}-([a-f0-9]{12})$/.test(uuid)) {
return false;
}
if (uuid === "00000000-0000-0000-0000-000000000000") {
return {
version: undefined,
variant: "nil",
format: "ascii"
};
}
return {
version: (hex2byte[uuid[14] + uuid[15]] & 0xf0) >> 4,
variant: getVariant((hex2byte[uuid[19] + uuid[20]] & 0xe0) >> 5),
format: "ascii"
};
inspect() {
return `UUID v${this.version} ${this.toString()}`;
}
if (Buffer.isBuffer(uuid)) {
if (uuid.length < offset + 16) {
return false;
}
let i = 0;
for (; i < 16; i++) {
if (uuid[offset + i] !== 0) {
break;
static check(uuid, offset = 0) {
if (typeof uuid === "string") {
uuid = uuid.toLowerCase();
if (!/^[a-f0-9]{8}(-[a-f0-9]{4}){3}-([a-f0-9]{12})$/.test(uuid)) {
return false;
}
if (uuid === "00000000-0000-0000-0000-000000000000") {
return { version: undefined, variant: "nil", format: "ascii" };
}
return {
version: (hex2byte[uuid[14] + uuid[15]] & 0xf0) >> 4,
variant: getVariant((hex2byte[uuid[19] + uuid[20]] & 0xe0) >> 5),
format: "ascii",
};
}
}
if (i === 16) {
return {
version: undefined,
variant: "nil",
format: "binary"
};
}
return {
version: (uuid[offset + 6] & 0xf0) >> 4,
variant: getVariant((uuid[offset + 8] & 0xe0) >> 5),
format: "binary"
};
if (Buffer.isBuffer(uuid)) {
if (uuid.length < offset + 16) {
return false;
}
let i = 0;
for (; i < 16; i++) {
if (uuid[offset + i] !== 0) {
break;
}
}
if (i === 16) {
return { version: undefined, variant: "nil", format: "binary" };
}
return {
version: (uuid[offset + 6] & 0xf0) >> 4,
variant: getVariant((uuid[offset + 8] & 0xe0) >> 5),
format: "binary",
};
}
throw index_1.newError("Unknown type of uuid", "ERR_UNKNOWN_UUID_TYPE");
}
throw (0, _index().newError)("Unknown type of uuid", "ERR_UNKNOWN_UUID_TYPE");
} // read stringified uuid into a Buffer
static parse(input) {
const buffer = Buffer.allocUnsafe(16);
let j = 0;
for (let i = 0; i < 16; i++) {
buffer[i] = hex2byte[input[j++] + input[j++]];
if (i === 3 || i === 5 || i === 7 || i === 9) {
j += 1;
}
// read stringified uuid into a Buffer
static parse(input) {
const buffer = Buffer.allocUnsafe(16);
let j = 0;
for (let i = 0; i < 16; i++) {
buffer[i] = hex2byte[input[j++] + input[j++]];
if (i === 3 || i === 5 || i === 7 || i === 9) {
j += 1;
}
}
return buffer;
}
return buffer;
}
} // from rfc4122#appendix-C
}
exports.UUID = UUID;
UUID.OID = UUID.parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8"); // according to rfc4122#section-4.1.1
// from rfc4122#appendix-C
UUID.OID = UUID.parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8");
// according to rfc4122#section-4.1.1
function getVariant(bits) {
switch (bits) {
case 0:
case 1:
case 3:
return "ncs";
case 4:
case 5:
return "rfc4122";
case 6:
return "microsoft";
default:
return "future";
}
switch (bits) {
case 0:
case 1:
case 3:
return "ncs";
case 4:
case 5:
return "rfc4122";
case 6:
return "microsoft";
default:
return "future";
}
}
var UuidEncoding;
(function (UuidEncoding) {
UuidEncoding[UuidEncoding["ASCII"] = 0] = "ASCII";
UuidEncoding[UuidEncoding["BINARY"] = 1] = "BINARY";
UuidEncoding[UuidEncoding["OBJECT"] = 2] = "OBJECT";
})(UuidEncoding || (UuidEncoding = {})); // v3 + v5
UuidEncoding[UuidEncoding["ASCII"] = 0] = "ASCII";
UuidEncoding[UuidEncoding["BINARY"] = 1] = "BINARY";
UuidEncoding[UuidEncoding["OBJECT"] = 2] = "OBJECT";
})(UuidEncoding || (UuidEncoding = {}));
// v3 + v5
function uuidNamed(name, hashMethod, version, namespace, encoding = UuidEncoding.ASCII) {
const hash = (0, _crypto().createHash)(hashMethod);
const nameIsNotAString = typeof name !== "string";
if (nameIsNotAString && !Buffer.isBuffer(name)) {
throw (0, _index().newError)(invalidName, "ERR_INVALID_UUID_NAME");
}
hash.update(namespace);
hash.update(name);
const buffer = hash.digest();
let result;
switch (encoding) {
case UuidEncoding.BINARY:
buffer[6] = buffer[6] & 0x0f | version;
buffer[8] = buffer[8] & 0x3f | 0x80;
result = buffer;
break;
case UuidEncoding.OBJECT:
buffer[6] = buffer[6] & 0x0f | version;
buffer[8] = buffer[8] & 0x3f | 0x80;
result = new UUID(buffer);
break;
default:
result = byte2hex[buffer[0]] + byte2hex[buffer[1]] + byte2hex[buffer[2]] + byte2hex[buffer[3]] + "-" + byte2hex[buffer[4]] + byte2hex[buffer[5]] + "-" + byte2hex[buffer[6] & 0x0f | version] + byte2hex[buffer[7]] + "-" + byte2hex[buffer[8] & 0x3f | 0x80] + byte2hex[buffer[9]] + "-" + byte2hex[buffer[10]] + byte2hex[buffer[11]] + byte2hex[buffer[12]] + byte2hex[buffer[13]] + byte2hex[buffer[14]] + byte2hex[buffer[15]];
break;
}
return result;
const hash = crypto_1.createHash(hashMethod);
const nameIsNotAString = typeof name !== "string";
if (nameIsNotAString && !Buffer.isBuffer(name)) {
throw index_1.newError(invalidName, "ERR_INVALID_UUID_NAME");
}
hash.update(namespace);
hash.update(name);
const buffer = hash.digest();
let result;
switch (encoding) {
case UuidEncoding.BINARY:
buffer[6] = (buffer[6] & 0x0f) | version;
buffer[8] = (buffer[8] & 0x3f) | 0x80;
result = buffer;
break;
case UuidEncoding.OBJECT:
buffer[6] = (buffer[6] & 0x0f) | version;
buffer[8] = (buffer[8] & 0x3f) | 0x80;
result = new UUID(buffer);
break;
default:
result =
byte2hex[buffer[0]] +
byte2hex[buffer[1]] +
byte2hex[buffer[2]] +
byte2hex[buffer[3]] +
"-" +
byte2hex[buffer[4]] +
byte2hex[buffer[5]] +
"-" +
byte2hex[(buffer[6] & 0x0f) | version] +
byte2hex[buffer[7]] +
"-" +
byte2hex[(buffer[8] & 0x3f) | 0x80] +
byte2hex[buffer[9]] +
"-" +
byte2hex[buffer[10]] +
byte2hex[buffer[11]] +
byte2hex[buffer[12]] +
byte2hex[buffer[13]] +
byte2hex[buffer[14]] +
byte2hex[buffer[15]];
break;
}
return result;
}
function stringify(buffer) {
return byte2hex[buffer[0]] + byte2hex[buffer[1]] + byte2hex[buffer[2]] + byte2hex[buffer[3]] + "-" + byte2hex[buffer[4]] + byte2hex[buffer[5]] + "-" + byte2hex[buffer[6]] + byte2hex[buffer[7]] + "-" + byte2hex[buffer[8]] + byte2hex[buffer[9]] + "-" + byte2hex[buffer[10]] + byte2hex[buffer[11]] + byte2hex[buffer[12]] + byte2hex[buffer[13]] + byte2hex[buffer[14]] + byte2hex[buffer[15]];
} // according to rfc4122#section-4.1.7
const nil = new UUID("00000000-0000-0000-0000-000000000000"); // UUID.v4 = uuidRandom
return (byte2hex[buffer[0]] +
byte2hex[buffer[1]] +
byte2hex[buffer[2]] +
byte2hex[buffer[3]] +
"-" +
byte2hex[buffer[4]] +
byte2hex[buffer[5]] +
"-" +
byte2hex[buffer[6]] +
byte2hex[buffer[7]] +
"-" +
byte2hex[buffer[8]] +
byte2hex[buffer[9]] +
"-" +
byte2hex[buffer[10]] +
byte2hex[buffer[11]] +
byte2hex[buffer[12]] +
byte2hex[buffer[13]] +
byte2hex[buffer[14]] +
byte2hex[buffer[15]]);
}
// according to rfc4122#section-4.1.7
exports.nil = new UUID("00000000-0000-0000-0000-000000000000");
// UUID.v4 = uuidRandom
// UUID.v4fast = uuidRandomFast

@@ -227,4 +200,2 @@ // UUID.v3 = function(options, callback) {

// }
exports.nil = nil;
// __ts-babel@6.0.4
//# sourceMappingURL=uuid.js.map
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.parseXml = parseXml;
exports.XElement = void 0;
function sax() {
const data = _interopRequireWildcard(require("sax"));
sax = function () {
return data;
};
return data;
}
function _index() {
const data = require("./index");
_index = function () {
return data;
};
return data;
}
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseXml = exports.XElement = void 0;
const sax = require("sax");
const index_1 = require("./index");
class XElement {
constructor(name) {
this.name = name;
this.value = "";
this.attributes = null;
this.isCData = false;
this.elements = null;
if (!name) {
throw (0, _index().newError)("Element name cannot be empty", "ERR_XML_ELEMENT_NAME_EMPTY");
constructor(name) {
this.name = name;
this.value = "";
this.attributes = null;
this.isCData = false;
this.elements = null;
if (!name) {
throw index_1.newError("Element name cannot be empty", "ERR_XML_ELEMENT_NAME_EMPTY");
}
if (!isValidName(name)) {
throw index_1.newError(`Invalid element name: ${name}`, "ERR_XML_ELEMENT_INVALID_NAME");
}
}
if (!isValidName(name)) {
throw (0, _index().newError)(`Invalid element name: ${name}`, "ERR_XML_ELEMENT_INVALID_NAME");
attribute(name) {
const result = this.attributes === null ? null : this.attributes[name];
if (result == null) {
throw index_1.newError(`No attribute "${name}"`, "ERR_XML_MISSED_ATTRIBUTE");
}
return result;
}
}
attribute(name) {
const result = this.attributes === null ? null : this.attributes[name];
if (result == null) {
throw (0, _index().newError)(`No attribute "${name}"`, "ERR_XML_MISSED_ATTRIBUTE");
removeAttribute(name) {
if (this.attributes !== null) {
delete this.attributes[name];
}
}
return result;
}
removeAttribute(name) {
if (this.attributes !== null) {
delete this.attributes[name];
element(name, ignoreCase = false, errorIfMissed = null) {
const result = this.elementOrNull(name, ignoreCase);
if (result === null) {
throw index_1.newError(errorIfMissed || `No element "${name}"`, "ERR_XML_MISSED_ELEMENT");
}
return result;
}
}
element(name, ignoreCase = false, errorIfMissed = null) {
const result = this.elementOrNull(name, ignoreCase);
if (result === null) {
throw (0, _index().newError)(errorIfMissed || `No element "${name}"`, "ERR_XML_MISSED_ELEMENT");
elementOrNull(name, ignoreCase = false) {
if (this.elements === null) {
return null;
}
for (const element of this.elements) {
if (isNameEquals(element, name, ignoreCase)) {
return element;
}
}
return null;
}
return result;
}
elementOrNull(name, ignoreCase = false) {
if (this.elements === null) {
return null;
getElements(name, ignoreCase = false) {
if (this.elements === null) {
return [];
}
return this.elements.filter(it => isNameEquals(it, name, ignoreCase));
}
for (const element of this.elements) {
if (isNameEquals(element, name, ignoreCase)) {
return element;
}
elementValueOrEmpty(name, ignoreCase = false) {
const element = this.elementOrNull(name, ignoreCase);
return element === null ? "" : element.value;
}
return null;
}
getElements(name, ignoreCase = false) {
if (this.elements === null) {
return [];
}
return this.elements.filter(it => isNameEquals(it, name, ignoreCase));
}
elementValueOrEmpty(name, ignoreCase = false) {
const element = this.elementOrNull(name, ignoreCase);
return element === null ? "" : element.value;
}
}
exports.XElement = XElement;
const NAME_REG_EXP = new RegExp(/^[A-Za-z_][:A-Za-z0-9_-]*$/i);
function isValidName(name) {
return NAME_REG_EXP.test(name);
return NAME_REG_EXP.test(name);
}
function isNameEquals(element, name, ignoreCase) {
const elementName = element.name;
return elementName === name || ignoreCase === true && elementName.length === name.length && elementName.toLowerCase() === name.toLowerCase();
const elementName = element.name;
return elementName === name || (ignoreCase === true && elementName.length === name.length && elementName.toLowerCase() === name.toLowerCase());
}
function parseXml(data) {
let rootElement = null;
const parser = sax().parser(true, {});
const elements = [];
parser.onopentag = saxElement => {
const element = new XElement(saxElement.name);
element.attributes = saxElement.attributes;
if (rootElement === null) {
rootElement = element;
} else {
const parent = elements[elements.length - 1];
if (parent.elements == null) {
parent.elements = [];
}
parent.elements.push(element);
}
elements.push(element);
};
parser.onclosetag = () => {
elements.pop();
};
parser.ontext = text => {
if (elements.length > 0) {
elements[elements.length - 1].value = text;
}
};
parser.oncdata = cdata => {
const element = elements[elements.length - 1];
element.value = cdata;
element.isCData = true;
};
parser.onerror = err => {
throw err;
};
parser.write(data);
return rootElement;
}
// __ts-babel@6.0.4
let rootElement = null;
const parser = sax.parser(true, {});
const elements = [];
parser.onopentag = saxElement => {
const element = new XElement(saxElement.name);
element.attributes = saxElement.attributes;
if (rootElement === null) {
rootElement = element;
}
else {
const parent = elements[elements.length - 1];
if (parent.elements == null) {
parent.elements = [];
}
parent.elements.push(element);
}
elements.push(element);
};
parser.onclosetag = () => {
elements.pop();
};
parser.ontext = text => {
if (elements.length > 0) {
elements[elements.length - 1].value = text;
}
};
parser.oncdata = cdata => {
const element = elements[elements.length - 1];
element.value = cdata;
element.isCData = true;
};
parser.onerror = err => {
throw err;
};
parser.write(data);
return rootElement;
}
exports.parseXml = parseXml;
//# sourceMappingURL=xml.js.map
{
"name": "builder-util-runtime",
"version": "8.7.3",
"version": "8.7.4",
"main": "out/index.js",

@@ -14,3 +14,3 @@ "author": "Vladimir Krivosheev",

"engines": {
"node": ">=8.2.5"
"node": ">=12.0.0"
},

@@ -26,2 +26,2 @@ "dependencies": {

"types": "./out/index.d.ts"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc