Skip to content

Releases: asus97178/bazis

bazis v0.118.0

Choose a tag to compare

@github-actions github-actions released this 24 Oct 00:29
35ab3b6

Changed

  • Every configuration secret is remembered by value: logs, startup errors and
    error responses remove it wherever it appears, also in plain text without a
    marker such as apiKey= or Bearer. Before, redaction recognised secrets
    only by their shape, so a revealed secret pasted into a message reached the
    log. Values shorter than 10 characters are still recognised only by shape
    (masking them would hide ordinary words such as postgres); for a
    connection URL with credentials only the password is remembered, so the
    message keeps naming the server. rememberSecretValue(value) in
    bazis/library/redaction does the same for a secret from another source.

Fixed

  • An owned store whose formatVersion (or registered scope) differs from the
    code names it: … is registered with format version 1, the code declares 2. Before, the registry row was refused while it was read, so the message
    said only the registered identity does not match the code.

bazis v0.117.1

Choose a tag to compare

@github-actions github-actions released this 23 Oct 23:21
9222a64

Fixed

  • Tables created by migrate() (migrateOnStart, versioned CREATE TABLE)
    name their keys like ensureCreated: pk_<table> and
    fk_<table>_<properties> instead of PostgreSQL's <table>_pkey and
    <table>_<column>_fkey. Before, such a table could not move to
    ensureCreated: the foreign key name is checked exactly.
  • A PostgresError in a startup failure no longer prints where PostgreSQL
    raised it (file, line, routine, severity); hint, detail and the
    object names stay.
  • An application type-checked with the DOM lib (TypeScript's default when
    lib is not set) no longer fails on core/http/HttpContext/responseLifetime.ts.
  • Tests that timed out on a loaded machine (owned-store catalog boundary and
    snapshot budget, CLI codegen and templates, full codegen scan, Codex partial
    text) get room.

bazis v0.117.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 22:39
faad436

Added

  • An exact decimal column for money and other exact numbers:
    @Column({ type: "decimal", precision: 12, scale: 2 }) creates
    numeric(12, 2) (numeric without precision). The value is a string
    ("19.90"); a bigint or a safe integer is accepted too, a float such as
    0.1 is refused. A value with more digits than the column keeps is refused
    before the write (Price.amount: "1.005" has 3 digits after the point; numeric(12, 2) keeps 2) instead of being rounded by PostgreSQL. A key
    cannot be decimal; owned stores refuse decimal columns.

Changed (breaking)

  • The dynamic-model field type decimal is an exact numeric holding a
    string, not double precision holding a number. An existing dynamic table
    with such a column stops ensureCreated with column type differs;
    convert it once: ALTER TABLE … ALTER COLUMN … TYPE numeric USING …::numeric.
  • Schema checks read a PostgreSQL numeric column as decimal, no longer as
    real: a real property over a numeric column is now a type difference.

bazis v0.116.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 12:34
ac78863

Changed (breaking)

  • Codegen refuses a route parameter whose type does not match the route
    constraint: @Get(":id(int)") byId(id: string) stops with
    BAZIS_HTTP_BINDING_UNRESOLVED: … route parameter "id" is constrained to (int), so it arrives as a number; declare it as number. Before, the router
    passed the number 7 to a parameter typed string. (int) and (number)
    need number, (bool) needs boolean, (uuid) and (alpha) need
    string; the same holds for FromRoute<…>.

Added

  • DbContext.detach(entity) stops tracking one entity, like
    Entry(e).State = Detached in EF Core. After a rolled-back
    transactionScope the context keeps the entity's changes so the work can be
    retried; detach drops them without touching the row. An entity saved in a
    scope that is still open cannot be detached (OrmError), because that
    scope's rollback would restore it.

Fixed

  • HEAD on a GET route answers with the content-length of the GET
    response instead of 0 for string, JSON and byte bodies.

bazis v0.115.1

Choose a tag to compare

@github-actions github-actions released this 23 Oct 10:14
3bfcc59

Fixed

  • An owned store whose table got a column added and dropped outside bazis
    (ALTER TABLE … ADD COLUMN, then DROP COLUMN) no longer reports
    ORM_OWNED_STORE_DRIFT forever. PostgreSQL keeps such a column as a
    dropped attribute that holds no reachable data and cannot be removed
    without rewriting the table; the catalog reader now skips dropped
    attributes and only the live columns and their order are verified. A
    column that is still there remains drift.

bazis v0.115.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 00:31
f882ec7

Added

  • Partial indexes: @Index({ where }) and @Index([...], { where }) index
    only the rows that match the condition. With @SoftDelete a unique index
    no longer keeps the value of a deleted row:
    @Index<User>(["email"], { unique: true, where: (u) => u.deletedAt.isNull() }).
    The condition uses the @Check operators; ensureCreated creates the
    index, adds it to an existing table and compares the stored condition on
    every start (index.predicate when it differs). A date literal in the
    condition and partial indexes in owned stores are refused.

Fixed

  • A @Check with in([...]) or with a chain of three or more conditions
    (a.and(b).and(c)) stopped the second start with catalog.unsupported or
    CHECK constraint expression differs: PostgreSQL stores IN as
    = ANY (ARRAY[...]) and prints the chain without inner parentheses. Both
    are now read back as declared.

bazis v0.114.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 22:53
42c04fe

Changed (breaking)

  • ignoreQueryFilters() turns the filters off for the entities loaded by
    include(...) / thenInclude(...) too: @QueryFilter conditions and the
    @SoftDelete condition are not added to their queries. Before, only the
    main query ignored them, so soft-deleted children stayed hidden and a
    context filter of a child still ran. This is how EF Core treats
    IgnoreQueryFilters(). A query that needs filters on the children keeps
    them by not calling ignoreQueryFilters(), or adds its own where.

bazis v0.113.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 22:01
fe151d9

Changed

  • Mistakes in declarations no longer crash the import of the file that holds
    them. They are reported when the application starts, as one
    [bazis] configuration error line (or on the startup screen) with exit
    code 1. Before, they escaped with a source frame and a Bun banner. This
    covers:

    • @Infra(...) and infraModule(...) manifests (instance names, phase,
      a token shared by two instances);
    • llmRouter(...) profiles (no profiles, an unknown or ambiguous
      defaultProfile, a fallback that is unknown, points to itself or forms a
      cycle);
    • defineConfig(...) environment names and unknown keys in a stand
      section, and an invalid configEnum(...);
    • @GrpcController(...) / @GrpcMethod(...) (an invalid service
      definition, a static or private method, an empty RPC name, a request model
      that is not a class);
    • ormBazis options (ensureCreated with migrateOnStart, an owned store
      with provider or migrations) and owned stores or @Infra tokens that
      conflict across modules.

    Code that expected llmRouter(...) or defineConfig(...) to throw at the
    call now gets the error from createContainer(...), ensureValid() or
    resolve().

Added

  • markConfigurationError(error) and isConfigurationError(error) in
    bazis/core/di: an extension that finds a declaration problem can mark its own
    error so the start reports it as a configuration error.
    deferModuleDeclarationError(moduleRef, error) keeps a problem found while
    a module was declared and throws it when the application builds that module.

bazis v0.112.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 17:42
0a3c902

Changed (breaking)

  • secret("") in a config declaration is a configuration error at start:
    secret("") is not a value: a secret cannot be empty. Write secret() for a required secret, or give a non-empty development value. Before, it looked
    like an empty default but meant a required secret.

Fixed

  • rollbackVersioned() names an applied migration that is missing from the
    passed list: Migration "…" is applied but is not in the migrations passed to rollbackVersioned(); pass the full list. Before, it said has no down() method. Both errors are OrmError instead of a plain Error.
  • A gRPC controller that does not map every RPC (or maps one twice) stops the
    start with one [bazis] configuration error line (GrpcSetupError, a
    KernelError). Before, it was a TypeError with a source frame.
  • transactionScope({ retry }) with one tracked entity says "the 1 entity …
    its changes", not "the 1 entities … their changes".
  • bazis g module (--minimal, --full) says that the module's table is not
    created and how to create it: ensureCreated: true in ormBazis, or a
    migration. Before, the first request answered relation does not exist.
  • Russian CLI: skipped steps read без запуска — … / без проверки — …
    instead of не запускалось, which did not agree with step names such as
    «схема».

bazis v0.111.2

Choose a tag to compare

@github-actions github-actions released this 21 Oct 23:19
f85ad43

Fixed

  • The startup timeout names only the services still starting. Connectors start
    together, and before one hanging connector was reported with every connector
    of its batch: still starting: infra:db, infra:cache, infra:search, infra:probe.