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
90 lines
2.9 KiB
Plaintext
90 lines
2.9 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 pipeTransport_exports = {};
|
|
__export(pipeTransport_exports, {
|
|
PipeTransport: () => PipeTransport
|
|
});
|
|
module.exports = __toCommonJS(pipeTransport_exports);
|
|
var import_utils = require("../utils");
|
|
var import_debugLogger = require("./utils/debugLogger");
|
|
class PipeTransport {
|
|
constructor(pipeWrite, pipeRead) {
|
|
this._pendingBuffers = [];
|
|
this._waitForNextTask = (0, import_utils.makeWaitForNextTask)();
|
|
this._closed = false;
|
|
this._pipeRead = pipeRead;
|
|
this._pipeWrite = pipeWrite;
|
|
pipeRead.on("data", (buffer) => this._dispatch(buffer));
|
|
pipeRead.on("close", () => {
|
|
this._closed = true;
|
|
if (this._onclose)
|
|
this._onclose.call(null);
|
|
});
|
|
pipeRead.on("error", (e) => import_debugLogger.debugLogger.log("error", e));
|
|
pipeWrite.on("error", (e) => import_debugLogger.debugLogger.log("error", e));
|
|
this.onmessage = void 0;
|
|
}
|
|
get onclose() {
|
|
return this._onclose;
|
|
}
|
|
set onclose(onclose) {
|
|
this._onclose = onclose;
|
|
if (onclose && !this._pipeRead.readable)
|
|
onclose();
|
|
}
|
|
send(message) {
|
|
if (this._closed)
|
|
throw new Error("Pipe has been closed");
|
|
this._pipeWrite.write(JSON.stringify(message));
|
|
this._pipeWrite.write("\0");
|
|
}
|
|
close() {
|
|
throw new Error("unimplemented");
|
|
}
|
|
_dispatch(buffer) {
|
|
let end = buffer.indexOf("\0");
|
|
if (end === -1) {
|
|
this._pendingBuffers.push(buffer);
|
|
return;
|
|
}
|
|
this._pendingBuffers.push(buffer.slice(0, end));
|
|
const message = Buffer.concat(this._pendingBuffers).toString();
|
|
this._waitForNextTask(() => {
|
|
if (this.onmessage)
|
|
this.onmessage.call(null, JSON.parse(message));
|
|
});
|
|
let start = end + 1;
|
|
end = buffer.indexOf("\0", start);
|
|
while (end !== -1) {
|
|
const message2 = buffer.toString(void 0, start, end);
|
|
this._waitForNextTask(() => {
|
|
if (this.onmessage)
|
|
this.onmessage.call(null, JSON.parse(message2));
|
|
});
|
|
start = end + 1;
|
|
end = buffer.indexOf("\0", start);
|
|
}
|
|
this._pendingBuffers = [buffer.slice(start)];
|
|
}
|
|
}
|
|
// Annotate the CommonJS export names for ESM import in node:
|
|
0 && (module.exports = {
|
|
PipeTransport
|
|
});
|