Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 17 additions & 35 deletions .github/actions/javascript/isDeployChecklistLocked/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1886,16 +1886,6 @@ var require_API = __commonJS({
const newParameters = Object.assign(Object.assign({}, parameters), { api_setCookie: false });
return performPOSTRequest(commandName, newParameters);
},
/**
* @param {Object} parameters
* @param {String} parameters.email
* @returns {ExpensifyAPIDeferred}
*/
Domain_RequestAccess(parameters) {
const commandName = "Domain_RequestAccess";
requireParameters(["email"], parameters, commandName);
return performPOSTRequest(commandName, parameters);
},
/**
* @param {Object} parameters
* @param {String[]} parameters.emailList
Expand Down Expand Up @@ -21659,27 +21649,22 @@ var require_Network = __commonJS({
exports.default = Network;
var jquery_1 = __importDefault(require_jquery());
var Utils = __importStar(require_utils());
function addCommandToUrl(command, url) {
let newUrl = url;
if (command) {
if (newUrl.indexOf("?") === -1) {
newUrl = `${newUrl}?`;
}
newUrl = `${newUrl}&command=${command}`;
}
return newUrl;
}
function Network(endpoint2) {
let isNavigatingAway = false;
const isNewURLFormat = endpoint2[endpoint2.length - 1] === "/";
if (!endpoint2) {
throw new Error("Cannot instantiate Network without an url endpoint");
}
const baseURL = endpoint2.endsWith("/") ? endpoint2 : `${endpoint2}/`;
if (Utils.isWindowAvailable()) {
window.onbeforeunload = () => {
isNavigatingAway = true;
};
}
function getRequestURL(parameters) {
const command = parameters.command;
delete parameters.command;
return command ? `${baseURL}${command}` : baseURL;
}
return {
/**
* @param {String} url to fetch
Expand All @@ -21694,20 +21679,13 @@ var require_Network = __commonJS({
* @returns {$.Deferred}
*/
post(parameters) {
let newURL = endpoint2;
if (isNewURLFormat) {
const command = parameters.command;
delete parameters.command;
newURL = `${endpoint2}${command}`;
}
const settings = {
url: newURL,
url: getRequestURL(parameters),
type: "POST",
data: parameters
};
const formData = new FormData();
let shouldUseFormData = false;
settings.url = addCommandToUrl(parameters.command, settings.url);
for (const [key, value] of Object.entries(parameters)) {
if (value === void 0) {
continue;
Expand Down Expand Up @@ -21741,8 +21719,7 @@ var require_Network = __commonJS({
keepalive: true,
credentials: "same-origin"
};
let url = endpoint2;
url = addCommandToUrl(parameters.command, url);
const url = getRequestURL(parameters);
const formData = new FormData();
for (const [key, value] of Object.entries(parameters)) {
if (value === void 0) {
Expand Down Expand Up @@ -22316,8 +22293,10 @@ var require_str = __commonJS({
* @returns The decoded string.
*/
htmlDecodeWithJQueryOrNative(s) {
if (typeof jquery_1.default !== "undefined") {
return (0, jquery_1.default)("<textarea/>").html(s).text();
if (typeof globalThis.document !== "undefined") {
const textarea = globalThis.document.createElement("textarea");
textarea.innerHTML = s;
return textarea.value;
}
return HtmlEntities.decode(s);
},
Expand Down Expand Up @@ -26471,6 +26450,9 @@ var require_fastMerge = __commonJS({
const nonNullObject = value != null ? typeof value === "object" : false;
return nonNullObject && Object.prototype.toString.call(value) !== "[object RegExp]" && Object.prototype.toString.call(value) !== "[object Date]" && !Array.isArray(value);
}
function isUnsafeKey(key) {
return key === "__proto__";
}
function fastMerge(target, source, shouldRemoveNullObjectValues = true) {
if (Array.isArray(source) || source === null || source === void 0) {
return source;
Expand All @@ -26484,7 +26466,7 @@ var require_fastMerge = __commonJS({
const targetValue = target === null || target === void 0 ? void 0 : target[key];
const isSourceOrTargetNull = targetValue === null || sourceValue === null;
const shouldOmitSourceKey = shouldRemoveNullObjectValues && isSourceOrTargetNull;
if (!shouldOmitSourceKey) {
if (!shouldOmitSourceKey && !isUnsafeKey(key)) {
destination[key] = targetValue;
}
}
Expand All @@ -26496,7 +26478,7 @@ var require_fastMerge = __commonJS({
const targetValue = target === null || target === void 0 ? void 0 : target[key];
const shouldOmitSourceKey = shouldRemoveNullObjectValues && sourceValue === null;
const isSourceKeyUndefined = sourceValue === void 0;
if (!isSourceKeyUndefined && !shouldOmitSourceKey) {
if (!isSourceKeyUndefined && !shouldOmitSourceKey && !isUnsafeKey(key)) {
const isSourceKeyMergable = isMergeableObject(sourceValue);
if (isSourceKeyMergable && targetValue) {
if (!shouldRemoveNullObjectValues || isSourceKeyMergable) {
Expand Down
52 changes: 17 additions & 35 deletions .github/actions/javascript/proposalPoliceComment/index.js
Original file line number Diff line number Diff line change
const newParameters = Object.assign(Object.assign({}, parameters), { api_setCookie: false });
return performPOSTRequest(commandName, newParameters);
},
/**
* @param {Object} parameters
* @param {String} parameters.email
* @returns {ExpensifyAPIDeferred}
*/
Domain_RequestAccess(parameters) {
const commandName = "Domain_RequestAccess";
requireParameters(["email"], parameters, commandName);
return performPOSTRequest(commandName, parameters);
},
/**
* @param {Object} parameters
* @param {String[]} parameters.emailList
Expand Down
exports.default = Network;
var jquery_1 = __importDefault(require_jquery());
var Utils = __importStar(require_utils2());
function addCommandToUrl(command, url) {
let newUrl = url;
if (command) {
if (newUrl.indexOf("?") === -1) {
newUrl = `${newUrl}?`;
}
newUrl = `${newUrl}&command=${command}`;
}
return newUrl;
}
function Network(endpoint2) {
let isNavigatingAway = false;
const isNewURLFormat = endpoint2[endpoint2.length - 1] === "/";
if (!endpoint2) {
throw new Error("Cannot instantiate Network without an url endpoint");
}
const baseURL = endpoint2.endsWith("/") ? endpoint2 : `${endpoint2}/`;
if (Utils.isWindowAvailable()) {
window.onbeforeunload = () => {
isNavigatingAway = true;
};
}
function getRequestURL(parameters) {
const command = parameters.command;
delete parameters.command;
return command ? `${baseURL}${command}` : baseURL;
}
return {
/**
* @param {String} url to fetch
Expand Down
* @returns {$.Deferred}
*/
post(parameters) {
let newURL = endpoint2;
if (isNewURLFormat) {
const command = parameters.command;
delete parameters.command;
newURL = `${endpoint2}${command}`;
}
const settings = {
url: newURL,
url: getRequestURL(parameters),
type: "POST",
data: parameters
};
const formData = new FormData();
let shouldUseFormData = false;
settings.url = addCommandToUrl(parameters.command, settings.url);
for (const [key, value] of Object.entries(parameters)) {
if (value === void 0) {
continue;
Expand Down
keepalive: true,
credentials: "same-origin"
};
let url = endpoint2;
url = addCommandToUrl(parameters.command, url);
const url = getRequestURL(parameters);
const formData = new FormData();
for (const [key, value] of Object.entries(parameters)) {
if (value === void 0) {
Expand Down
* @returns The decoded string.
*/
htmlDecodeWithJQueryOrNative(s) {
if (typeof jquery_1.default !== "undefined") {
return (0, jquery_1.default)("<textarea/>").html(s).text();
if (typeof globalThis.document !== "undefined") {
const textarea = globalThis.document.createElement("textarea");
textarea.innerHTML = s;
return textarea.value;
}
return HtmlEntities.decode(s);
},
Expand Down
const nonNullObject = value != null ? typeof value === "object" : false;
return nonNullObject && Object.prototype.toString.call(value) !== "[object RegExp]" && Object.prototype.toString.call(value) !== "[object Date]" && !Array.isArray(value);
}
function isUnsafeKey(key) {
return key === "__proto__";
}
function fastMerge(target, source, shouldRemoveNullObjectValues = true) {
if (Array.isArray(source) || source === null || source === void 0) {
return source;
Expand Down
const targetValue = target === null || target === void 0 ? void 0 : target[key];
const isSourceOrTargetNull = targetValue === null || sourceValue === null;
const shouldOmitSourceKey = shouldRemoveNullObjectValues && isSourceOrTargetNull;
if (!shouldOmitSourceKey) {
if (!shouldOmitSourceKey && !isUnsafeKey(key)) {
destination[key] = targetValue;
}
}
Expand Down
const targetValue = target === null || target === void 0 ? void 0 : target[key];
const shouldOmitSourceKey = shouldRemoveNullObjectValues && sourceValue === null;
const isSourceKeyUndefined = sourceValue === void 0;
if (!isSourceKeyUndefined && !shouldOmitSourceKey) {
if (!isSourceKeyUndefined && !shouldOmitSourceKey && !isUnsafeKey(key)) {
const isSourceKeyMergable = isMergeableObject(sourceValue);
if (isSourceKeyMergable && targetValue) {
if (!shouldRemoveNullObjectValues || isSourceKeyMergable) {
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
"date-fns-tz": "^3.2.0",
"dom-serializer": "^0.2.2",
"domhandler": "^5.0.3",
"expensify-common": "2.0.224",
"expensify-common": "2.0.233",
"expo": "57.0.8",
"expo-asset": "57.0.7",
"expo-audio": "57.0.3",
Expand Down
Loading