• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

valkyrjaio / sindri-ts / 30612251087
100%

Build:
DEFAULT BRANCH: 26.x
Ran 31 Jul 2026 07:16AM UTC
Jobs 1
Files 52
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 Jul 2026 07:15AM UTC coverage: 100.0%. Remained the same
30612251087

push

github

web-flow
[Config] feat: Add a command to generate a cached config (#87)

# Description

Adds `sindri generate-config <path-to-Config.ts>`, which writes a
`CachedConfig` beside an application
config. The command is opt-in and separate from `sindri generate`; data
generation does not run it.

## Why

A TypeScript application loads its whole component provider tree at
boot, even when it runs entirely on the
generated data cache. The cause is that an application config names a
component provider, and naming a class
in TypeScript forces a static `import` of that class and everything it
names. PHP and Java do not pay this,
because `use` is a compile-time alias and the JVM resolves a
constant-pool entry only when it needs the class.

A cached config removes the reference. It implements the config contract
directly, so it never imports a
framework config base, and it declares an empty provider list. Measured
on the starter application, a cached
HTTP boot that serves `GET /version`:

| | modules loaded | component providers loaded |
|---|---|---|
| the application config | 182 | 9 |
| the generated cached config | **142** | **0** |

## How it works

`ConfigSourceReader` reads the application config and returns each field
as **source text**, never as an
evaluated value. `process.env['APP_KEY']`, `process.cwd()`, and
`CliCommandName.LIST` therefore survive
exactly as the author wrote them, including expressions no static reader
could resolve.

Two shapes are read, because an application config may either extend a
framework config and pass positional
`super()` arguments, or implement the contract directly and declare
properties:

```ts
class Config extends HttpConfig { constructor() { super('App', process.cwd(), ...); } }
class Config implements HttpConfigContract { readonly namespace = 'App'; }
```

The reader also reads the base class's constructor defaults. A config
passes only the arguments it changes,
and a generated config inherits nothing, so an omitted field would... (continued)

937 of 937 branches covered (100.0%)

Branch coverage included in aggregate %.

184 of 184 new or added lines in 7 files covered. (100.0%)

1518 of 1518 relevant lines covered (100.0%)

18.21 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30612251087.1 31 Jul 2026 07:16AM UTC 52
100.0
GitHub Action Run
Source Files on build 30612251087
  • Tree
  • List 52
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #30612251087
  • 75ace099 on github
  • Prev Build on 26.x (#30611796011)
  • Next Build on 26.x (#30612913196)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc