Skip to content

Commit

Permalink
[v 0.3.11]: new release of i18n-action
Browse files Browse the repository at this point in the history
  • Loading branch information
inlang-bot committed Jun 4, 2024
1 parent 17884fc commit ba2cb08
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions dist/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -57380,12 +57380,12 @@ async function collect2(iterable) {
}
var cache = /* @__PURE__ */ new Map();
var cacheDisabler;
function makeHttpClient({ debug: debug10, description, onReq, onRes }) {
function makeHttpClient({ noCache, debug: debug10, description, onReq, onRes }) {
async function request({ url, method = "GET", headers = {}, body: rawBody }) {
let body = rawBody ? await collect2(rawBody) : void 0;
const origUrl = url;
const origMethod = method;
if (cache && origMethod === "GET" && cache.has(origUrl)) {
if (!noCache && cache && origMethod === "GET" && cache.has(origUrl)) {
const { resHeaders: resHeaders2, resBody: resBody2 } = cache.get(origUrl);
return {
url: origUrl,
Expand Down Expand Up @@ -57414,7 +57414,7 @@ function makeHttpClient({ debug: debug10, description, onReq, onRes }) {
const statusCode = res.status;
let resBody;
const uint8Array = res.body && new Uint8Array(await res.arrayBuffer());
if (debug10 && uint8Array) {
if (debug10 && statusCode === 200 && uint8Array) {
const { inflatePackResponse: inflatePackResponse2 } = await Promise.resolve().then(() => (init_packfile(), packfile_exports));
console.info(await inflatePackResponse2(uint8Array).catch((err) => err));
}
Expand All @@ -57432,7 +57432,7 @@ function makeHttpClient({ debug: debug10, description, onReq, onRes }) {
if (!resBody) {
resBody = [uint8Array];
}
if (cache && statusCode === 200 && origMethod === "GET") {
if (!noCache && cache && statusCode === 200 && origMethod === "GET") {
if (!cacheDisabler) {
cacheDisabler = setTimeout(() => {
cache?.clear();
Expand Down Expand Up @@ -58516,7 +58516,7 @@ async function getBranches(ctx) {
url: ctx.gitUrl,
corsProxy: ctx.gitProxyUrl,
prefix: "refs/heads",
http: makeHttpClient({ debug: ctx.debug, description: "getBranches" })
http: makeHttpClient({ debug: ctx.debug, noCache: true, description: "getBranches" })
});
} catch (_error) {
return void 0;
Expand Down Expand Up @@ -62963,8 +62963,7 @@ function subscribable(fn) {
}
function settleable(fn) {
return Object.assign(fn, {
settled: async () => {
}
settled: async () => []
});
}

Expand Down

0 comments on commit ba2cb08

Please sign in to comment.