TenantAtlas/apps/platform/.pnpm-store/v10/files/62/bf66f46a81b02eab064057b026178ba6cdd29db0a710a3f552e9b26c6883f76ddc95354ac88bfc304588602bb351fd3b7800444b9f9c8dc068ba25b7937091
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

76 lines
2.0 KiB
Plaintext

import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { MySqlColumn, MySqlColumnBuilder } from "./common.js";
class MySqlDateTimeBuilder extends MySqlColumnBuilder {
static [entityKind] = "MySqlDateTimeBuilder";
constructor(name, config) {
super(name, "date", "MySqlDateTime");
this.config.fsp = config?.fsp;
}
/** @internal */
build(table) {
return new MySqlDateTime(
table,
this.config
);
}
}
class MySqlDateTime extends MySqlColumn {
static [entityKind] = "MySqlDateTime";
fsp;
constructor(table, config) {
super(table, config);
this.fsp = config.fsp;
}
getSQLType() {
const precision = this.fsp === void 0 ? "" : `(${this.fsp})`;
return `datetime${precision}`;
}
mapToDriverValue(value) {
return value.toISOString().replace("T", " ").replace("Z", "");
}
mapFromDriverValue(value) {
return /* @__PURE__ */ new Date(value.replace(" ", "T") + "Z");
}
}
class MySqlDateTimeStringBuilder extends MySqlColumnBuilder {
static [entityKind] = "MySqlDateTimeStringBuilder";
constructor(name, config) {
super(name, "string", "MySqlDateTimeString");
this.config.fsp = config?.fsp;
}
/** @internal */
build(table) {
return new MySqlDateTimeString(
table,
this.config
);
}
}
class MySqlDateTimeString extends MySqlColumn {
static [entityKind] = "MySqlDateTimeString";
fsp;
constructor(table, config) {
super(table, config);
this.fsp = config.fsp;
}
getSQLType() {
const precision = this.fsp === void 0 ? "" : `(${this.fsp})`;
return `datetime${precision}`;
}
}
function datetime(a, b) {
const { name, config } = getColumnNameAndConfig(a, b);
if (config?.mode === "string") {
return new MySqlDateTimeStringBuilder(name, config);
}
return new MySqlDateTimeBuilder(name, config);
}
export {
MySqlDateTime,
MySqlDateTimeBuilder,
MySqlDateTimeString,
MySqlDateTimeStringBuilder,
datetime
};
//# sourceMappingURL=datetime.js.map