Some checks failed
Main Confidence / confidence (push) Failing after 45s
## Summary - introduce surface-aware compressed governance outcomes and reuse the shared truth/explanation seams for operator-first summaries - apply the compressed outcome hierarchy across baseline, evidence, review, review-pack, canonical review/evidence, and artifact-oriented operation-run surfaces - expand spec 214 fixtures and Pest coverage, and fix tenant-panel route assertions by generating explicit tenant-panel URLs in the affected Filament tests ## Validation - `cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agent` - focused governance compression suite from `specs/214-governance-outcome-compression/quickstart.md` passed (`68` tests, `445` assertions) - `cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Filament/InventoryItemResourceTest.php tests/Feature/Filament/BackupSetUiEnforcementTest.php tests/Feature/Filament/RestoreRunUiEnforcementTest.php` passed (`18` tests, `81` assertions) Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #253
117 lines
4.2 KiB
Plaintext
117 lines
4.2 KiB
Plaintext
"use strict";
|
|
var __defProp = Object.defineProperty;
|
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __export = (target, all) => {
|
|
for (var name in all)
|
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
};
|
|
var __copyProps = (to, from, except, desc) => {
|
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
for (let key of __getOwnPropNames(from))
|
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
}
|
|
return to;
|
|
};
|
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
var bidiDeserializer_exports = {};
|
|
__export(bidiDeserializer_exports, {
|
|
deserializeBidiValue: () => deserializeBidiValue
|
|
});
|
|
module.exports = __toCommonJS(bidiDeserializer_exports);
|
|
var import_javascript = require("../javascript");
|
|
function deserializeBidiValue(result, internalIdMap = /* @__PURE__ */ new Map()) {
|
|
switch (result.type) {
|
|
case "undefined":
|
|
return void 0;
|
|
case "null":
|
|
return null;
|
|
case "number":
|
|
return typeof result.value === "number" ? result.value : (0, import_javascript.parseUnserializableValue)(result.value);
|
|
case "boolean":
|
|
return Boolean(result.value);
|
|
case "string":
|
|
return result.value;
|
|
case "bigint":
|
|
return BigInt(result.value);
|
|
case "array":
|
|
return deserializeBidiList(result, internalIdMap);
|
|
case "arraybuffer":
|
|
return getValue(result, internalIdMap, () => ({}));
|
|
case "date":
|
|
return getValue(result, internalIdMap, () => new Date(result.value));
|
|
case "error":
|
|
return getValue(result, internalIdMap, () => {
|
|
const error = new Error();
|
|
error.stack = "";
|
|
return error;
|
|
});
|
|
case "function":
|
|
return void 0;
|
|
case "generator":
|
|
return getValue(result, internalIdMap, () => ({}));
|
|
case "htmlcollection":
|
|
return { ...deserializeBidiList(result, internalIdMap) };
|
|
case "map":
|
|
return getValue(result, internalIdMap, () => ({}));
|
|
case "node":
|
|
return "ref: <Node>";
|
|
case "nodelist":
|
|
return { ...deserializeBidiList(result, internalIdMap) };
|
|
case "object":
|
|
return deserializeBidiMapping(result, internalIdMap);
|
|
case "promise":
|
|
return getValue(result, internalIdMap, () => ({}));
|
|
case "proxy":
|
|
return getValue(result, internalIdMap, () => ({}));
|
|
case "regexp":
|
|
return getValue(result, internalIdMap, () => new RegExp(result.value.pattern, result.value.flags));
|
|
case "set":
|
|
return getValue(result, internalIdMap, () => ({}));
|
|
case "symbol":
|
|
return void 0;
|
|
case "typedarray":
|
|
return void 0;
|
|
case "weakmap":
|
|
return getValue(result, internalIdMap, () => ({}));
|
|
case "weakset":
|
|
return getValue(result, internalIdMap, () => ({}));
|
|
case "window":
|
|
return "ref: <Window>";
|
|
}
|
|
}
|
|
function getValue(bidiValue, internalIdMap, defaultValue) {
|
|
if ("internalId" in bidiValue && bidiValue.internalId) {
|
|
if (internalIdMap.has(bidiValue.internalId)) {
|
|
return internalIdMap.get(bidiValue.internalId);
|
|
} else {
|
|
const value = defaultValue();
|
|
internalIdMap.set(bidiValue.internalId, value);
|
|
return value;
|
|
}
|
|
} else {
|
|
return defaultValue();
|
|
}
|
|
}
|
|
function deserializeBidiList(bidiValue, internalIdMap) {
|
|
const result = getValue(bidiValue, internalIdMap, () => []);
|
|
for (const val of bidiValue.value || [])
|
|
result.push(deserializeBidiValue(val, internalIdMap));
|
|
return result;
|
|
}
|
|
function deserializeBidiMapping(bidiValue, internalIdMap) {
|
|
const result = getValue(bidiValue, internalIdMap, () => ({}));
|
|
for (const [serializedKey, serializedValue] of bidiValue.value || []) {
|
|
const key = typeof serializedKey === "string" ? serializedKey : deserializeBidiValue(serializedKey, internalIdMap);
|
|
const value = deserializeBidiValue(serializedValue, internalIdMap);
|
|
result[key] = value;
|
|
}
|
|
return result;
|
|
}
|
|
// Annotate the CommonJS export names for ESM import in node:
|
|
0 && (module.exports = {
|
|
deserializeBidiValue
|
|
});
|