dreamboard 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -11299,7 +11299,19 @@ function setLatestCompileAttempt(projectConfig, attempt) {
|
|
|
11299
11299
|
function updateProjectLocalMaintainerRegistry(projectConfig, localMaintainerRegistry) {
|
|
11300
11300
|
return {
|
|
11301
11301
|
...projectConfig,
|
|
11302
|
-
localMaintainerRegistry
|
|
11302
|
+
localMaintainerRegistry: sanitizeProjectLocalMaintainerRegistry(
|
|
11303
|
+
localMaintainerRegistry
|
|
11304
|
+
)
|
|
11305
|
+
};
|
|
11306
|
+
}
|
|
11307
|
+
function sanitizeProjectLocalMaintainerRegistry(localMaintainerRegistry) {
|
|
11308
|
+
if (!localMaintainerRegistry?.packages.dreamboard) {
|
|
11309
|
+
return localMaintainerRegistry;
|
|
11310
|
+
}
|
|
11311
|
+
const { dreamboard: _dreamboard, ...packages } = localMaintainerRegistry.packages;
|
|
11312
|
+
return {
|
|
11313
|
+
...localMaintainerRegistry,
|
|
11314
|
+
packages
|
|
11303
11315
|
};
|
|
11304
11316
|
}
|
|
11305
11317
|
|
|
@@ -20781,6 +20793,39 @@ var TESTING_TYPES_STUB2 = "export function defineScenario(scenario) { return sce
|
|
|
20781
20793
|
var DEFAULT_TIMEOUT_MS = 1e4;
|
|
20782
20794
|
var BASE_SUFFIX = ".base.ts";
|
|
20783
20795
|
var SCENARIO_SUFFIX = ".scenario.ts";
|
|
20796
|
+
function formatScenarioErrorForDisplay(options) {
|
|
20797
|
+
const message = options.error.message || "Scenario failed.";
|
|
20798
|
+
const scenarioFrame = findScenarioStackFrame({
|
|
20799
|
+
stack: options.error.stack,
|
|
20800
|
+
projectRoot: options.projectRoot,
|
|
20801
|
+
scenarioFilePath: options.scenarioFilePath
|
|
20802
|
+
});
|
|
20803
|
+
return scenarioFrame ? `${message}
|
|
20804
|
+
${scenarioFrame}` : message;
|
|
20805
|
+
}
|
|
20806
|
+
function findScenarioStackFrame(options) {
|
|
20807
|
+
if (!options.stack) {
|
|
20808
|
+
return null;
|
|
20809
|
+
}
|
|
20810
|
+
const absolutePath = path20.resolve(options.scenarioFilePath);
|
|
20811
|
+
const relativePath = path20.relative(options.projectRoot, absolutePath);
|
|
20812
|
+
const normalizedRelativePath = relativePath.split(path20.sep).join("/");
|
|
20813
|
+
const escapedAbsolutePath = escapeRegExp(absolutePath);
|
|
20814
|
+
const escapedRelativePath = escapeRegExp(normalizedRelativePath);
|
|
20815
|
+
const absoluteFrame = new RegExp(`${escapedAbsolutePath}:(\\d+):(\\d+)`);
|
|
20816
|
+
const relativeFrame = new RegExp(`${escapedRelativePath}:(\\d+):(\\d+)`);
|
|
20817
|
+
for (const line of options.stack.split("\n")) {
|
|
20818
|
+
const normalizedLine = line.split(path20.sep).join("/");
|
|
20819
|
+
const match = normalizedLine.match(absoluteFrame) ?? normalizedLine.match(relativeFrame);
|
|
20820
|
+
if (match?.[1] && match?.[2]) {
|
|
20821
|
+
return `at ${normalizedRelativePath}:${match[1]}:${match[2]}`;
|
|
20822
|
+
}
|
|
20823
|
+
}
|
|
20824
|
+
return null;
|
|
20825
|
+
}
|
|
20826
|
+
function escapeRegExp(value) {
|
|
20827
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
20828
|
+
}
|
|
20784
20829
|
var testingExpectApiFactoryPromise;
|
|
20785
20830
|
async function loadTestingExpectApiFactory() {
|
|
20786
20831
|
testingExpectApiFactoryPromise ??= import("./src-X7NGTW44.js").then(
|
|
@@ -22840,7 +22885,11 @@ async function runReducerNativeScenarios(options) {
|
|
|
22840
22885
|
results.push({
|
|
22841
22886
|
id: scenario.definition.id,
|
|
22842
22887
|
success: false,
|
|
22843
|
-
error: error instanceof Error ?
|
|
22888
|
+
error: error instanceof Error ? formatScenarioErrorForDisplay({
|
|
22889
|
+
error,
|
|
22890
|
+
projectRoot: options.projectRoot,
|
|
22891
|
+
scenarioFilePath: scenario.filePath
|
|
22892
|
+
}) : `Scenario '${scenario.definition.id}' failed.`
|
|
22844
22893
|
});
|
|
22845
22894
|
}
|
|
22846
22895
|
}
|
|
@@ -26070,4 +26119,4 @@ export {
|
|
|
26070
26119
|
test_default,
|
|
26071
26120
|
runDreamboardCli
|
|
26072
26121
|
};
|
|
26073
|
-
//# sourceMappingURL=chunk-
|
|
26122
|
+
//# sourceMappingURL=chunk-6FPQ3S2J.js.map
|