TenantAtlas/apps/platform/.pnpm-store/v10/files/87/584df84a003b9efecd64ae29cb689df6091c5b3ba49c5ad1286e6eb009ef90ad51c455ee20231943892be945444feeda87c0454c8a58f364ce5a7ec028ceb4
ahmido 1fec9c6f9d
Some checks failed
Main Confidence / confidence (push) Failing after 45s
feat: compress governance operator outcomes (#253)
## 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
2026-04-19 12:30:36 +00:00

148 lines
3.1 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 formData_exports = {};
__export(formData_exports, {
MultipartFormData: () => MultipartFormData
});
module.exports = __toCommonJS(formData_exports);
var import_utilsBundle = require("../utilsBundle");
class MultipartFormData {
constructor() {
this._chunks = [];
this._boundary = generateUniqueBoundaryString();
}
contentTypeHeader() {
return `multipart/form-data; boundary=${this._boundary}`;
}
addField(name, value) {
this._beginMultiPartHeader(name);
this._finishMultiPartHeader();
this._chunks.push(Buffer.from(value));
this._finishMultiPartField();
}
addFileField(name, value) {
this._beginMultiPartHeader(name);
this._chunks.push(Buffer.from(`; filename="${value.name}"`));
this._chunks.push(Buffer.from(`\r
content-type: ${value.mimeType || import_utilsBundle.mime.getType(value.name) || "application/octet-stream"}`));
this._finishMultiPartHeader();
this._chunks.push(value.buffer);
this._finishMultiPartField();
}
finish() {
this._addBoundary(true);
return Buffer.concat(this._chunks);
}
_beginMultiPartHeader(name) {
this._addBoundary();
this._chunks.push(Buffer.from(`content-disposition: form-data; name="${name}"`));
}
_finishMultiPartHeader() {
this._chunks.push(Buffer.from(`\r
\r
`));
}
_finishMultiPartField() {
this._chunks.push(Buffer.from(`\r
`));
}
_addBoundary(isLastBoundary) {
this._chunks.push(Buffer.from("--" + this._boundary));
if (isLastBoundary)
this._chunks.push(Buffer.from("--"));
this._chunks.push(Buffer.from("\r\n"));
}
}
const alphaNumericEncodingMap = [
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
97,
98,
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120,
121,
122,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
65,
66
];
function generateUniqueBoundaryString() {
const charCodes = [];
for (let i = 0; i < 16; i++)
charCodes.push(alphaNumericEncodingMap[Math.floor(Math.random() * alphaNumericEncodingMap.length)]);
return "----WebKitFormBoundary" + String.fromCharCode(...charCodes);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
MultipartFormData
});