TenantAtlas/apps/platform/.pnpm-store/v10/files/8d/a051f9eae7f29bcea995ebc64d5233987b1f859ebf8e6f25dff3cc714b2b05c84615f49a61c1ab74b5b6f1c9ca88b83241f785ebe0ce98433466cadd43e631
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

70 lines
1.7 KiB
Plaintext

import { entityKind } from "../../../entity.js";
import { getColumnNameAndConfig } from "../../../utils.js";
import { PgColumn, PgColumnBuilder } from "../common.js";
import { parseEWKB } from "./utils.js";
class PgGeometryBuilder extends PgColumnBuilder {
static [entityKind] = "PgGeometryBuilder";
constructor(name) {
super(name, "array", "PgGeometry");
}
/** @internal */
build(table) {
return new PgGeometry(
table,
this.config
);
}
}
class PgGeometry extends PgColumn {
static [entityKind] = "PgGeometry";
getSQLType() {
return "geometry(point)";
}
mapFromDriverValue(value) {
return parseEWKB(value);
}
mapToDriverValue(value) {
return `point(${value[0]} ${value[1]})`;
}
}
class PgGeometryObjectBuilder extends PgColumnBuilder {
static [entityKind] = "PgGeometryObjectBuilder";
constructor(name) {
super(name, "json", "PgGeometryObject");
}
/** @internal */
build(table) {
return new PgGeometryObject(
table,
this.config
);
}
}
class PgGeometryObject extends PgColumn {
static [entityKind] = "PgGeometryObject";
getSQLType() {
return "geometry(point)";
}
mapFromDriverValue(value) {
const parsed = parseEWKB(value);
return { x: parsed[0], y: parsed[1] };
}
mapToDriverValue(value) {
return `point(${value.x} ${value.y})`;
}
}
function geometry(a, b) {
const { name, config } = getColumnNameAndConfig(a, b);
if (!config?.mode || config.mode === "tuple") {
return new PgGeometryBuilder(name);
}
return new PgGeometryObjectBuilder(name);
}
export {
PgGeometry,
PgGeometryBuilder,
PgGeometryObject,
PgGeometryObjectBuilder,
geometry
};
//# sourceMappingURL=geometry.js.map