init commit

This commit is contained in:
Carlos
2026-02-21 10:33:18 +01:00
parent c863a943ed
commit 9d955bf338
9512 changed files with 2015317 additions and 1305 deletions

View File

@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRetriesLeftFromError = void 0;
const no_react_1 = require("remotion/no-react");
const getRetriesLeftFromError = (error) => {
if (!error) {
throw new Error('Expected stack');
}
const { stack } = error;
if (!stack) {
throw new Error('Expected stack: ' + JSON.stringify(error));
}
const beforeIndex = stack.indexOf(no_react_1.NoReactInternals.DELAY_RENDER_ATTEMPT_TOKEN);
if (beforeIndex === -1) {
throw new Error('Expected to find attempt token in stack');
}
const afterIndex = stack.indexOf(no_react_1.NoReactInternals.DELAY_RENDER_RETRY_TOKEN);
if (afterIndex === -1) {
throw new Error('Expected to find retry token in stack');
}
const inbetween = stack.substring(beforeIndex + no_react_1.NoReactInternals.DELAY_RENDER_ATTEMPT_TOKEN.length, afterIndex);
const parsed = Number(inbetween);
if (Number.isNaN(parsed)) {
throw new Error(`Expected to find a number in the stack ${stack}`);
}
return parsed;
};
exports.getRetriesLeftFromError = getRetriesLeftFromError;