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

130 lines
4.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 column_builder_exports = {};
__export(column_builder_exports, {
ColumnBuilder: () => ColumnBuilder
});
module.exports = __toCommonJS(column_builder_exports);
var import_entity = require("./entity.cjs");
class ColumnBuilder {
static [import_entity.entityKind] = "ColumnBuilder";
config;
constructor(name, dataType, columnType) {
this.config = {
name,
keyAsName: name === "",
notNull: false,
default: void 0,
hasDefault: false,
primaryKey: false,
isUnique: false,
uniqueName: void 0,
uniqueType: void 0,
dataType,
columnType,
generated: void 0
};
}
/**
* Changes the data type of the column. Commonly used with `json` columns. Also, useful for branded types.
*
* @example
* ```ts
* const users = pgTable('users', {
* id: integer('id').$type<UserId>().primaryKey(),
* details: json('details').$type<UserDetails>().notNull(),
* });
* ```
*/
$type() {
return this;
}
/**
* Adds a `not null` clause to the column definition.
*
* Affects the `select` model of the table - columns *without* `not null` will be nullable on select.
*/
notNull() {
this.config.notNull = true;
return this;
}
/**
* Adds a `default <value>` clause to the column definition.
*
* Affects the `insert` model of the table - columns *with* `default` are optional on insert.
*
* If you need to set a dynamic default value, use {@link $defaultFn} instead.
*/
default(value) {
this.config.default = value;
this.config.hasDefault = true;
return this;
}
/**
* Adds a dynamic default value to the column.
* The function will be called when the row is inserted, and the returned value will be used as the column value.
*
* **Note:** This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`.
*/
$defaultFn(fn) {
this.config.defaultFn = fn;
this.config.hasDefault = true;
return this;
}
/**
* Alias for {@link $defaultFn}.
*/
$default = this.$defaultFn;
/**
* Adds a dynamic update value to the column.
* The function will be called when the row is updated, and the returned value will be used as the column value if none is provided.
* If no `default` (or `$defaultFn`) value is provided, the function will be called when the row is inserted as well, and the returned value will be used as the column value.
*
* **Note:** This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`.
*/
$onUpdateFn(fn) {
this.config.onUpdateFn = fn;
this.config.hasDefault = true;
return this;
}
/**
* Alias for {@link $onUpdateFn}.
*/
$onUpdate = this.$onUpdateFn;
/**
* Adds a `primary key` clause to the column definition. This implicitly makes the column `not null`.
*
* In SQLite, `integer primary key` implicitly makes the column auto-incrementing.
*/
primaryKey() {
this.config.primaryKey = true;
this.config.notNull = true;
return this;
}
/** @internal Sets the name of the column to the key within the table definition if a name was not given. */
setName(name) {
if (this.config.name !== "") return;
this.config.name = name;
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ColumnBuilder
});
//# sourceMappingURL=column-builder.cjs.map