@decaf-ts/core 0.27.4 → 0.28.1
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 +4 -4
- package/dist/core.cjs +1 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +1 -1
- package/dist/core.js.map +1 -1
- package/lib/cjs/index.cjs +3 -3
- package/lib/cjs/migrations/Migration.cjs +16 -2
- package/lib/cjs/migrations/Migration.cjs.map +1 -1
- package/lib/cjs/migrations/MigrationService.cjs +52 -29
- package/lib/cjs/migrations/MigrationService.cjs.map +1 -1
- package/lib/cjs/tasks/TaskEngine.cjs +25 -13
- package/lib/cjs/tasks/TaskEngine.cjs.map +1 -1
- package/lib/cjs/tasks/builder.cjs +22 -5
- package/lib/cjs/tasks/builder.cjs.map +1 -1
- package/lib/cjs/tasks/models/TaskStepSpecModel.cjs +6 -0
- package/lib/cjs/tasks/models/TaskStepSpecModel.cjs.map +1 -1
- package/lib/esm/index.js +3 -3
- package/lib/esm/migrations/Migration.js +17 -3
- package/lib/esm/migrations/Migration.js.map +1 -1
- package/lib/esm/migrations/MigrationService.js +52 -29
- package/lib/esm/migrations/MigrationService.js.map +1 -1
- package/lib/esm/tasks/TaskEngine.js +25 -13
- package/lib/esm/tasks/TaskEngine.js.map +1 -1
- package/lib/esm/tasks/builder.js +22 -5
- package/lib/esm/tasks/builder.js.map +1 -1
- package/lib/esm/tasks/models/TaskStepSpecModel.js +6 -0
- package/lib/esm/tasks/models/TaskStepSpecModel.js.map +1 -1
- package/lib/types/index.d.cts +3 -3
- package/lib/types/index.d.mts +3 -3
- package/lib/types/migrations/Migration.d.cts +6 -2
- package/lib/types/migrations/Migration.d.mts +6 -2
- package/lib/types/migrations/MigrationService.d.cts +13 -5
- package/lib/types/migrations/MigrationService.d.mts +13 -5
- package/lib/types/migrations/types.d.cts +3 -2
- package/lib/types/migrations/types.d.mts +3 -2
- package/lib/types/tasks/builder.d.cts +7 -0
- package/lib/types/tasks/builder.d.mts +7 -0
- package/lib/types/tasks/models/TaskStepSpecModel.d.cts +1 -0
- package/lib/types/tasks/models/TaskStepSpecModel.d.mts +1 -0
- package/lib/types/workers/WorkThreadEnvironment.d.cts +5 -1
- package/lib/types/workers/WorkThreadEnvironment.d.mts +5 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ Decaf Core provides the foundational building blocks for the Decaf TypeScript ec
|
|
|
39
39
|
|
|
40
40
|
Documentation [here](https://decaf-ts.github.io/injectable-decorators/), Test results [here](https://decaf-ts.github.io/injectable-decorators/workdocs/reports/html/test-report.html) and Coverage [here](https://decaf-ts.github.io/injectable-decorators/workdocs/reports/coverage/lcov-report/index.html)
|
|
41
41
|
|
|
42
|
-
Minimal size: 47.
|
|
42
|
+
Minimal size: 47.5 KB kb gzipped
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
# Core Package — Detailed Description
|
|
@@ -576,8 +576,8 @@ Task attempts are bounded by `maxAttempts` and `backoff` (configured via builder
|
|
|
576
576
|
- `persistenceFlavour`: restricts the execution plan to a single adapter flavour alias.
|
|
577
577
|
- `targetVersion`: semver/string goal for this run (CLI defaults to `package.json.version`).
|
|
578
578
|
- `taskMode`: when `true`, migrations are executed through the TaskService as `CompositeTask`s built per version. When `false`, `executeMigration` runs each migration inline.
|
|
579
|
-
- `includeGenericInTaskMode`:
|
|
580
|
-
- `retrieveLastVersion` / `setCurrentVersion`: asynchronous handlers so each
|
|
579
|
+
- `includeGenericInTaskMode`: set this to `true` to include generic migrations in multi-adapter task runs; it defaults to `false` for those runs and to `true` otherwise. An explicit value is forwarded to every selected adapter execution.
|
|
580
|
+
- `retrieveLastVersion` / `setCurrentVersion`: asynchronous handlers so each migration scope can persist its own migration head. `retrieveLastVersion` is called prior to building the execution plan; `setCurrentVersion` runs after every successfully completed version (per task in task mode, once at the end in normal mode). When no `persistenceFlavour` is configured, handlers still run and receive `undefined` for the adapter argument.
|
|
581
581
|
- `taskService`: required when `taskMode` is enabled; the CLI boots a `TaskService` backed by a dedicated `RamAdapter` (`decaf-cli-task-engine`).
|
|
582
582
|
- `versioning`: override the default npm-semver comparator (`MigrationVersioning`) if you deploy a non-semver scheme.
|
|
583
583
|
- `handlers`: per-flavour overrides (typically wired via the CLI defaults) for `retrieveLastVersion`/`setCurrentVersion` if you need special persistence beyond the default adapter cache.
|
|
@@ -628,7 +628,7 @@ export class AddIsActiveMigration implements Migration<any, NanoAdapter> { ... }
|
|
|
628
628
|
|
|
629
629
|
### Version tracking, task mode, and resume semantics
|
|
630
630
|
|
|
631
|
-
`MigrationService` starts by calling `retrieveLastVersion` (when provided) to determine the persisted `currentVersion`. It builds an execution plan by filtering all decorated migrations whose normalized versions fall strictly greater than `currentVersion` and less than or equal to `targetVersion`.
|
|
631
|
+
`MigrationService` starts by calling `retrieveLastVersion` (when provided) to determine the persisted `currentVersion`. It builds an execution plan by filtering all decorated migrations whose normalized versions fall strictly greater than `currentVersion` and less than or equal to `targetVersion`. If no `persistenceFlavour` is configured, the handler still runs, but it receives `undefined` for the adapter argument so adapterless migration flows can manage their own version tracking.
|
|
632
632
|
|
|
633
633
|
In **normal mode**, `migrateNormally` executes each migration with `executeMigration`. After the last migration succeeds, `setCurrentVersion` is invoked once with the last version so the next boot knows where to resume.
|
|
634
634
|
|