Skip to content

Commit

Permalink
update unrelated snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
mrgrain committed Sep 7, 2023
1 parent a006a70 commit af6c178
Show file tree
Hide file tree
Showing 160 changed files with 53,571 additions and 73,876 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31451,25 +31451,28 @@ function coerceApiParametersToUint8Array(service, action, parameters = {}) {
return parameters;
}
function coerceToUint8Array(obj, path) {
const currentKey = path?.[0];
if (!currentKey) {
return;
}
if (currentKey === "*" && Array.isArray(obj)) {
obj.map((e) => coerceToUint8Array(e, path.slice(1)));
return;
if (path.length === 0) {
return coerceValueToUint8Array(obj);
}
if (path.length === 2 && path[1] === "*" && Array.isArray(obj[currentKey])) {
obj[currentKey] = obj[currentKey].map((e) => new TextEncoder().encode(e));
return;
if (path[0] === "*" && Array.isArray(obj)) {
return obj.map((e) => coerceToUint8Array(e, path.slice(1)));
}
if (path.length === 1) {
if (typeof obj[currentKey] !== "object" && obj[currentKey] != void 0) {
obj[currentKey] = new TextEncoder().encode(obj[currentKey]);
if (obj && typeof obj === "object") {
if (path[0] in obj) {
obj[path[0]] = coerceToUint8Array(obj[path[0]], path.slice(1));
}
return;
return obj;
}
return obj;
}
function coerceValueToUint8Array(x) {
if (x instanceof Uint8Array) {
return x;
}
if (typeof x === "string" || typeof x === "number") {
return new TextEncoder().encode(x.toString());
}
return coerceToUint8Array(obj[currentKey], path.slice(1));
return x;
}
var init_coerce_api_parameters = __esm({
"../sdk-v2-to-v3-adapter/lib/coerce-api-parameters.ts"() {
Expand Down
Loading

0 comments on commit af6c178

Please sign in to comment.