agl 43.0.4 → 43.0.5

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 (30) hide show
  1. package/changelog.md +7 -0
  2. package/dist_serve/bundle.js +1 -1
  3. package/dist_serve/bundle.js.map +1 -1
  4. package/dist_ts/00_commitinfo_data.js +1 -1
  5. package/dist_ts/classes.flexservice.d.ts +6 -7
  6. package/dist_ts/classes.flexservice.js +12 -45
  7. package/dist_ts/classes.flexsupervisor.d.ts +37 -3
  8. package/dist_ts/classes.flexsupervisor.js +164 -37
  9. package/dist_ts/flexharness.child.js +9 -4
  10. package/dist_ts/functions.flexchildshutdown.d.ts +7 -0
  11. package/dist_ts/functions.flexchildshutdown.js +18 -1
  12. package/dist_ts_migration/index.d.ts +0 -2
  13. package/dist_ts_migration/index.js +1 -3
  14. package/dist_ts_migration/v43_flexpostharnessmigrationmarkers.d.ts +6 -17
  15. package/dist_ts_migration/v43_flexpostharnessmigrationmarkers.js +6 -36
  16. package/package.json +1 -1
  17. package/ts/00_commitinfo_data.ts +1 -1
  18. package/ts/classes.flexservice.ts +10 -66
  19. package/ts/classes.flexsupervisor.ts +214 -37
  20. package/ts/flexharness.child.ts +8 -3
  21. package/ts/functions.flexchildshutdown.ts +22 -0
  22. package/ts_migration/index.ts +0 -2
  23. package/ts_migration/v43_flexpostharnessmigrationmarkers.ts +6 -49
  24. package/ts_web/00_commitinfo_data.ts +1 -1
  25. package/dist_ts_migration/classes.flexpostharnessmigrationrunner.d.ts +0 -19
  26. package/dist_ts_migration/classes.flexpostharnessmigrationrunner.js +0 -34
  27. package/dist_ts_migration/v19_flexprojectmanagement.d.ts +0 -14
  28. package/dist_ts_migration/v19_flexprojectmanagement.js +0 -23
  29. package/ts_migration/classes.flexpostharnessmigrationrunner.ts +0 -54
  30. package/ts_migration/v19_flexprojectmanagement.ts +0 -32
@@ -1,54 +0,0 @@
1
- import * as plugins from './plugins.js';
2
- import {
3
- FlexProjectManagementMigration,
4
- flexProjectManagementMigrationId,
5
- } from './v19_flexprojectmanagement.js';
6
- import type {
7
- IFlexPostHarnessMigrationMarkers,
8
- TFlexPostHarnessMigrationId,
9
- } from './v43_flexpostharnessmigrationmarkers.js';
10
-
11
- export interface IFlexPostHarnessMigrationRunnerOptions<TScope> {
12
- harness: plugins.flexharness.FlexHarness<TScope>;
13
- /** The storage keys each migration already completed for, which it never walks again. */
14
- markers: IFlexPostHarnessMigrationMarkers;
15
- scopeIds: Iterable<string>;
16
- }
17
-
18
- interface IFlexPostHarnessMigration {
19
- readonly id: TFlexPostHarnessMigrationId;
20
- run(scopeIdArg: string, signalArg?: AbortSignal): Promise<void>;
21
- }
22
-
23
- /**
24
- * Runs each post-harness migration for every storage key it has not completed for, and records
25
- * the completion only once the key's walk finished: a failed or aborted walk records nothing.
26
- */
27
- export class FlexPostHarnessMigrationRunner<TScope> {
28
- private readonly markers: IFlexPostHarnessMigrationMarkers;
29
- private readonly scopeIds: string[];
30
- private readonly migrations: IFlexPostHarnessMigration[];
31
-
32
- constructor(optionsArg: IFlexPostHarnessMigrationRunnerOptions<TScope>) {
33
- this.markers = optionsArg.markers;
34
- this.scopeIds = [...new Set(optionsArg.scopeIds)].sort();
35
- this.migrations = [{
36
- id: flexProjectManagementMigrationId,
37
- run: (scopeIdArg, signalArg) => new FlexProjectManagementMigration({
38
- harness: optionsArg.harness,
39
- scopeIds: [scopeIdArg],
40
- }).run(signalArg),
41
- }];
42
- }
43
-
44
- public async run(signalArg?: AbortSignal): Promise<void> {
45
- for (const migration of this.migrations) {
46
- for (const scopeId of this.scopeIds) {
47
- signalArg?.throwIfAborted();
48
- if (await this.markers.completed(scopeId, migration.id)) continue;
49
- await migration.run(scopeId, signalArg);
50
- await this.markers.record(scopeId, migration.id);
51
- }
52
- }
53
- }
54
- }
@@ -1,32 +0,0 @@
1
- import * as plugins from './plugins.js';
2
- import type { TFlexPostHarnessMigrationId } from './v43_flexpostharnessmigrationmarkers.js';
3
-
4
- /** The name its completion is recorded under (`FlexPostHarnessMigrationMarkers`). */
5
- export const flexProjectManagementMigrationId: TFlexPostHarnessMigrationId = 'v19_flexprojectmanagement';
6
-
7
- export interface IFlexProjectManagementMigrationOptions<TScope> {
8
- harness: plugins.flexharness.FlexHarness<TScope>;
9
- scopeIds: Iterable<string>;
10
- }
11
-
12
- export class FlexProjectManagementMigration<TScope> {
13
- private readonly harness: plugins.flexharness.FlexHarness<TScope>;
14
- private readonly scopeIds: string[];
15
-
16
- constructor(optionsArg: IFlexProjectManagementMigrationOptions<TScope>) {
17
- this.harness = optionsArg.harness;
18
- this.scopeIds = [...new Set(optionsArg.scopeIds)].sort();
19
- }
20
-
21
- public async run(signalArg?: AbortSignal): Promise<void> {
22
- for (const scopeId of this.scopeIds) {
23
- signalArg?.throwIfAborted();
24
- // listSessions durably repairs legacy session generations before PM state is loaded.
25
- const sessions = await this.harness.listSessions(scopeId);
26
- for (const session of sessions) {
27
- signalArg?.throwIfAborted();
28
- await this.harness.getProjectState(scopeId, session.sessionId);
29
- }
30
- }
31
- }
32
- }