@venizia/ignis-boot 0.4.8-1 → 0.4.8-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -7
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Build-time tools for an IGNIS application: `ignis-artifacts` writes one static f
|
|
|
8
8
|
bun add -d @venizia/ignis-boot typescript
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
`typescript` 5 or 6 is a required peer: the scanner reads your source with the TypeScript compiler API.
|
|
11
|
+
`typescript` 5 or 6 is a required peer: the scanner reads your source with the TypeScript compiler API. `ignis-artifacts` runs under Bun (it carries a `bun` shebang).
|
|
12
12
|
|
|
13
13
|
## Register your classes
|
|
14
14
|
|
|
@@ -71,17 +71,18 @@ The scanner reads source text and never imports a module. No decorator runs and
|
|
|
71
71
|
## `ignis-artifacts`
|
|
72
72
|
|
|
73
73
|
```
|
|
74
|
-
ignis-artifacts <generate|check> [--root src] [--out src/generated/artifacts.ts] [--ignore a,b] [--export GeneratedArtifacts]
|
|
74
|
+
ignis-artifacts <generate|check> [--root src] [--out src/generated/artifacts.ts] [--ignore a,b] [--export GeneratedArtifacts] [--source-module <specifier>]...
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
| Flag | Default | Meaning |
|
|
78
78
|
|---|---|---|
|
|
79
|
-
| `--root` | `src` | Directory to scan, recursively (`.ts` files, `.d.ts` skipped) |
|
|
79
|
+
| `--root` | `src` | Directory to scan, recursively (`.ts` and `.tsx` files, `.d.ts` skipped) |
|
|
80
80
|
| `--out` | `src/generated/artifacts.ts` | Output file; import paths are relative to it |
|
|
81
81
|
| `--ignore` | none | Comma-separated globs, relative to `--root`, added to the default list |
|
|
82
82
|
| `--export` | `GeneratedArtifacts` | Name of the exported constant |
|
|
83
|
+
| `--source-module` | none | A module specifier, matched exactly, whose stereotype imports also count - a package that re-exports the decorators. Repeat the flag for several. Adds to `@venizia/ignis` and `@venizia/ignis-kernel` |
|
|
83
84
|
|
|
84
|
-
The default ignore list always applies: `**/__tests__/**`, `**/*.test.ts`, `**/*.spec.ts`, `**/generated/**`. A decorated class hidden by one of your own `--ignore` patterns prints one `warning:` line on stderr.
|
|
85
|
+
The default ignore list always applies: `**/__tests__/**`, `**/*.test.{ts,tsx}`, `**/*.spec.{ts,tsx}`, `**/generated/**`. A decorated class hidden by one of your own `--ignore` patterns prints one `warning:` line on stderr.
|
|
85
86
|
|
|
86
87
|
| Command | Effect | Exit code |
|
|
87
88
|
|---|---|---|
|
|
@@ -95,7 +96,7 @@ A class lands in the index when all of these hold. The scanner logs a warning fo
|
|
|
95
96
|
|
|
96
97
|
- It is a named export (`export class` or `export { Name }`), not `export default`.
|
|
97
98
|
- It is not `abstract`.
|
|
98
|
-
- It carries exactly one of `@configuration`, `@component`, `@controller`, `@service`, `@repository` or `@datasource`, imported by name from `@venizia/ignis
|
|
99
|
+
- It carries exactly one of `@configuration`, `@component`, `@controller`, `@service`, `@repository` or `@datasource`, imported by name from `@venizia/ignis`, `@venizia/ignis-kernel` or a module named with `--source-module` (aliases resolved). `@injectable({ type })` counts when `type` is a string literal or `ArtifactTypes.<NAME>`.
|
|
99
100
|
|
|
100
101
|
`@model` classes are recognized and never emitted - a repository registers its model. A decorator re-exported through your own wrapper module is not recognized. Two stereotypes on one class fail the scan.
|
|
101
102
|
|
|
@@ -140,9 +141,12 @@ The resolver reads each field from the environment first (first non-blank key wi
|
|
|
140
141
|
|
|
141
142
|
| Subpath | What it gives | Extra peers |
|
|
142
143
|
|---|---|---|
|
|
143
|
-
| `@venizia/ignis-boot` | Everything from
|
|
144
|
+
| `@venizia/ignis-boot` | Everything from `/generator` and `/build-info` | `typescript` |
|
|
144
145
|
| `@venizia/ignis-boot/generator` | `ArtifactIndexGenerator`, `ArtifactScanner`, `ArtifactIndexEmitter`, `ArtifactStereotypes`, `ArtifactTypes`, `ArtifactIndexFields` | `typescript` |
|
|
145
146
|
| `@venizia/ignis-boot/build-info` | `BuildInfoStamp`, `BuildInfoResolver`, `BuildInfoEnvironmentKeys` | none |
|
|
147
|
+
| `@venizia/ignis-boot/bun` | `IgnisArtifactsPlugin` (a Bun plugin that serves the `ignis:artifacts` module for `Bun.build`), `AutoArtifactGroup`, `AutoArtifactsLoader`, `GroupArtifactsResolver` | `typescript` (Bun only) |
|
|
148
|
+
| `@venizia/ignis-boot/auto` | Default export `AutoArtifacts`: the application's decorated classes, found by the scanner at start. Pass it in `configs.artifacts`. Importing it has a side effect, so the package marks it in `sideEffects` | `typescript` (Bun only) |
|
|
149
|
+
| `@venizia/ignis-boot/vite` | `IgnisArtifactsVitePlugin`: the same `ignis:artifacts` module for Vite, and it replaces `/auto` with an eager import so a browser bundle can be tree-shaken | `typescript` |
|
|
146
150
|
|
|
147
151
|
| Binary | File |
|
|
148
152
|
|---|---|
|
|
@@ -158,7 +162,7 @@ const { isFresh } = ArtifactIndexGenerator.check({ root: 'src', out: 'src/genera
|
|
|
158
162
|
|
|
159
163
|
## Where it sits
|
|
160
164
|
|
|
161
|
-
`dev-configs -> inversion -> {filter, helpers} -> {boot, kernel} -> connectors -> {core-worker, core-server}`. Boot depends on `@venizia/ignis-helpers`
|
|
165
|
+
`dev-configs -> inversion -> {filter, helpers} -> {boot, kernel} -> connectors -> {core-worker, core-server}`. Boot depends on `@venizia/ignis-helpers` and `@venizia/ignis-inversion`; no IGNIS package depends on boot, so the application declares it.
|
|
162
166
|
|
|
163
167
|
The generated index replaces a run-time scan of the file system at startup.
|
|
164
168
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venizia/ignis-boot",
|
|
3
|
-
"version": "0.4.8-
|
|
3
|
+
"version": "0.4.8-2",
|
|
4
4
|
"description": "Build-time artifact index generator for IGNIS applications: scans decorated classes with the TypeScript AST and emits one static registration file per package, so bun build --compile sees plain imports.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"artifact-index",
|
|
@@ -80,12 +80,12 @@
|
|
|
80
80
|
"test": "bun test ./src"
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@venizia/ignis-helpers": "0.4.8-
|
|
84
|
-
"@venizia/ignis-inversion": "0.4.7-
|
|
83
|
+
"@venizia/ignis-helpers": "0.4.8-2",
|
|
84
|
+
"@venizia/ignis-inversion": "0.4.7-2"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@types/bun": "^1.4.3",
|
|
88
|
-
"@venizia/dev-configs": "0.4.8-
|
|
88
|
+
"@venizia/dev-configs": "0.4.8-2",
|
|
89
89
|
"eslint": "^10.13.0",
|
|
90
90
|
"oxlint": "1.89.0",
|
|
91
91
|
"oxlint-tsgolint": "7.0.2004",
|