@decaf-ts/core 0.27.4 → 0.28.0

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.
Files changed (34) hide show
  1. package/README.md +3 -3
  2. package/dist/core.cjs +1 -1
  3. package/dist/core.cjs.map +1 -1
  4. package/dist/core.js +1 -1
  5. package/dist/core.js.map +1 -1
  6. package/lib/cjs/index.cjs +3 -3
  7. package/lib/cjs/migrations/MigrationService.cjs +5 -5
  8. package/lib/cjs/migrations/MigrationService.cjs.map +1 -1
  9. package/lib/cjs/tasks/TaskEngine.cjs +25 -13
  10. package/lib/cjs/tasks/TaskEngine.cjs.map +1 -1
  11. package/lib/cjs/tasks/builder.cjs +22 -5
  12. package/lib/cjs/tasks/builder.cjs.map +1 -1
  13. package/lib/cjs/tasks/models/TaskStepSpecModel.cjs +6 -0
  14. package/lib/cjs/tasks/models/TaskStepSpecModel.cjs.map +1 -1
  15. package/lib/esm/index.js +3 -3
  16. package/lib/esm/migrations/MigrationService.js +5 -5
  17. package/lib/esm/migrations/MigrationService.js.map +1 -1
  18. package/lib/esm/tasks/TaskEngine.js +25 -13
  19. package/lib/esm/tasks/TaskEngine.js.map +1 -1
  20. package/lib/esm/tasks/builder.js +22 -5
  21. package/lib/esm/tasks/builder.js.map +1 -1
  22. package/lib/esm/tasks/models/TaskStepSpecModel.js +6 -0
  23. package/lib/esm/tasks/models/TaskStepSpecModel.js.map +1 -1
  24. package/lib/types/index.d.cts +3 -3
  25. package/lib/types/index.d.mts +3 -3
  26. package/lib/types/migrations/types.d.cts +2 -2
  27. package/lib/types/migrations/types.d.mts +2 -2
  28. package/lib/types/tasks/builder.d.cts +7 -0
  29. package/lib/types/tasks/builder.d.mts +7 -0
  30. package/lib/types/tasks/models/TaskStepSpecModel.d.cts +1 -0
  31. package/lib/types/tasks/models/TaskStepSpecModel.d.mts +1 -0
  32. package/lib/types/workers/WorkThreadEnvironment.d.cts +5 -1
  33. package/lib/types/workers/WorkThreadEnvironment.d.mts +5 -1
  34. 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.2 KB kb gzipped
42
+ Minimal size: 47.4 KB kb gzipped
43
43
 
44
44
 
45
45
  # Core Package — Detailed Description
@@ -577,7 +577,7 @@ Task attempts are bounded by `maxAttempts` and `backoff` (configured via builder
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
579
  - `includeGenericInTaskMode`: when `false` (the default for multi-adapter runs), only flavour-scoped migrations execute inside tasks so generic migrations stay in relational mode.
580
- - `retrieveLastVersion` / `setCurrentVersion`: asynchronous handlers so each adapter 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).
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