Skip to content

Commit 73a7605

Browse files
committed
refactor(objectql): wrap the facet hosts prose in the codemod's module headers
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfeJWRytJdoFWR9Pc8
1 parent b88e001 commit 73a7605

17 files changed

Lines changed: 138 additions & 123 deletions

‎packages/objectql/src/engine-actions.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
*
2121
* The bodies reach the class through {@link ActionsHost}: exactly the
2222
* `ObjectQL` members they read, private ones included. Every stub hands its
23-
* body, by a `.call`, the same host: `actionsHost` in `engine-facet-hosts.ts`, built
24-
* once per engine by the class's static block. Methods go as closures that
25-
* call them on the engine at call time, so a subclass override or an instance
26-
* spy is still the one reached; fields and accessors go as GETTERS, read when
27-
* the body reads them, as they were on the class, and a field a body assigns
28-
* goes with a SETTER that assigns it on the engine.
23+
* body, by a `.call`, the same host: `actionsHost` in `engine-facet-hosts.ts`,
24+
* built once per engine by the class's static block. Methods go as closures
25+
* that call them on the engine at call time, so a subclass override or an
26+
* instance spy is still the one reached; fields and accessors go as GETTERS,
27+
* read when the body reads them, as they were on the class, and a field a body
28+
* assigns goes with a SETTER that assigns it on the engine.
2929
*
3030
* The module imports `engine.ts` for types only, so the two modules form no
3131
* evaluation cycle. `index.ts` re-exports nothing from this module.

‎packages/objectql/src/engine-cascade-planning.ts‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@
2525
*
2626
* The bodies reach the class through {@link CascadePlanningHost}: exactly the
2727
* `ObjectQL` members they read, private ones included. Every stub hands its
28-
* body, by a `.call`, the same host: `cascadePlanningHost` in `engine-facet-hosts.ts`, built
29-
* once per engine by the class's static block. Methods go as closures that
30-
* call them on the engine at call time, so a subclass override or an instance
31-
* spy is still the one reached; fields and accessors go as GETTERS, read when
32-
* the body reads them, as they were on the class, and a field a body assigns
33-
* goes with a SETTER that assigns it on the engine.
28+
* body, by a `.call`, the same host: `cascadePlanningHost` in
29+
* `engine-facet-hosts.ts`, built once per engine by the class's static block.
30+
* Methods go as closures that call them on the engine at call time, so a
31+
* subclass override or an instance spy is still the one reached; fields and
32+
* accessors go as GETTERS, read when the body reads them, as they were on the
33+
* class, and a field a body assigns goes with a SETTER that assigns it on the
34+
* engine.
3435
*
3536
* `ObjectQL` here is `ObjectQLStatics` (imported AS `ObjectQL`): forwarders to the
3637
* statics the bodies read, private ones included, which the class fills in a

‎packages/objectql/src/engine-compatibility-section.ts‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@
1616
* docblock on the class, the contract; a private method's docblock moved here
1717
* with its body. The state stays on `ObjectQL`.
1818
*
19-
* The bodies reach the class through {@link CompatibilitySectionHost}: exactly the
20-
* `ObjectQL` members they read, private ones included. Every stub hands its
21-
* body, by a `.call`, the same host: `compatibilitySectionHost` in `engine-facet-hosts.ts`, built
22-
* once per engine by the class's static block. Methods go as closures that
23-
* call them on the engine at call time, so a subclass override or an instance
24-
* spy is still the one reached; fields and accessors go as GETTERS, read when
25-
* the body reads them, as they were on the class, and a field a body assigns
26-
* goes with a SETTER that assigns it on the engine.
19+
* The bodies reach the class through {@link CompatibilitySectionHost}: exactly
20+
* the `ObjectQL` members they read, private ones included. Every stub hands its
21+
* body, by a `.call`, the same host: `compatibilitySectionHost` in
22+
* `engine-facet-hosts.ts`, built once per engine by the class's static block.
23+
* Methods go as closures that call them on the engine at call time, so a
24+
* subclass override or an instance spy is still the one reached; fields and
25+
* accessors go as GETTERS, read when the body reads them, as they were on the
26+
* class, and a field a body assigns goes with a SETTER that assigns it on the
27+
* engine.
2728
*
2829
* Values that stayed in `engine.ts` are imported from it (lever (a) of
2930
* ruling 6591753301); every use is inside a function body, so the import

‎packages/objectql/src/engine-defaults-and-autonumbers.ts‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@
1717
* docblock on the class, the contract; a private method's docblock moved here
1818
* with its body. The state stays on `ObjectQL`.
1919
*
20-
* The bodies reach the class through {@link DefaultsAndAutonumbersHost}: exactly the
21-
* `ObjectQL` members they read, private ones included. Every stub hands its
22-
* body, by a `.call`, the same host: `defaultsAndAutonumbersHost` in `engine-facet-hosts.ts`, built
23-
* once per engine by the class's static block. Methods go as closures that
24-
* call them on the engine at call time, so a subclass override or an instance
25-
* spy is still the one reached; fields and accessors go as GETTERS, read when
26-
* the body reads them, as they were on the class, and a field a body assigns
27-
* goes with a SETTER that assigns it on the engine.
20+
* The bodies reach the class through {@link DefaultsAndAutonumbersHost}:
21+
* exactly the `ObjectQL` members they read, private ones included. Every stub
22+
* hands its body, by a `.call`, the same host: `defaultsAndAutonumbersHost` in
23+
* `engine-facet-hosts.ts`, built once per engine by the class's static block.
24+
* Methods go as closures that call them on the engine at call time, so a
25+
* subclass override or an instance spy is still the one reached; fields and
26+
* accessors go as GETTERS, read when the body reads them, as they were on the
27+
* class, and a field a body assigns goes with a SETTER that assigns it on the
28+
* engine.
2829
*
2930
* The module imports `engine.ts` for types only, so the two modules form no
3031
* evaluation cycle. `index.ts` re-exports nothing from this module.

‎packages/objectql/src/engine-delete-and-aggregate.ts‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@
1414
* docblock on the class, the contract; a private method's docblock moved here
1515
* with its body. The state stays on `ObjectQL`.
1616
*
17-
* The bodies reach the class through {@link DeleteAndAggregateHost}: exactly the
18-
* `ObjectQL` members they read, private ones included. Every stub hands its
19-
* body, by a `.call`, the same host: `deleteAndAggregateHost` in `engine-facet-hosts.ts`, built
20-
* once per engine by the class's static block. Methods go as closures that
21-
* call them on the engine at call time, so a subclass override or an instance
22-
* spy is still the one reached; fields and accessors go as GETTERS, read when
23-
* the body reads them, as they were on the class, and a field a body assigns
24-
* goes with a SETTER that assigns it on the engine.
17+
* The bodies reach the class through {@link DeleteAndAggregateHost}: exactly
18+
* the `ObjectQL` members they read, private ones included. Every stub hands its
19+
* body, by a `.call`, the same host: `deleteAndAggregateHost` in
20+
* `engine-facet-hosts.ts`, built once per engine by the class's static block.
21+
* Methods go as closures that call them on the engine at call time, so a
22+
* subclass override or an instance spy is still the one reached; fields and
23+
* accessors go as GETTERS, read when the body reads them, as they were on the
24+
* class, and a field a body assigns goes with a SETTER that assigns it on the
25+
* engine.
2526
*
2627
* The module imports `engine.ts` for types only, so the two modules form no
2728
* evaluation cycle. `index.ts` re-exports nothing from this module.

‎packages/objectql/src/engine-find.ts‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
* docblock on the class, the contract; a private method's docblock moved here
1717
* with its body. The state stays on `ObjectQL`.
1818
*
19-
* The bodies reach the class through {@link FindHost}: exactly the
20-
* `ObjectQL` members they read, private ones included. Every stub hands its
21-
* body, by a `.call`, the same host: `findHost` in `engine-facet-hosts.ts`, built
22-
* once per engine by the class's static block. Methods go as closures that
23-
* call them on the engine at call time, so a subclass override or an instance
24-
* spy is still the one reached; fields and accessors go as GETTERS, read when
25-
* the body reads them, as they were on the class, and a field a body assigns
26-
* goes with a SETTER that assigns it on the engine.
19+
* The bodies reach the class through {@link FindHost}: exactly the `ObjectQL`
20+
* members they read, private ones included. Every stub hands its body, by a
21+
* `.call`, the same host: `findHost` in `engine-facet-hosts.ts`, built once per
22+
* engine by the class's static block. Methods go as closures that call them on
23+
* the engine at call time, so a subclass override or an instance spy is still
24+
* the one reached; fields and accessors go as GETTERS, read when the body reads
25+
* them, as they were on the class, and a field a body assigns goes with a
26+
* SETTER that assigns it on the engine.
2727
*
2828
* The module imports `engine.ts` for types only, so the two modules form no
2929
* evaluation cycle. `index.ts` re-exports nothing from this module.

‎packages/objectql/src/engine-hooks-and-functions.ts‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@
2222
*
2323
* The bodies reach the class through {@link HooksAndFunctionsHost}: exactly the
2424
* `ObjectQL` members they read, private ones included. Every stub hands its
25-
* body, by a `.call`, the same host: `hooksAndFunctionsHost` in `engine-facet-hosts.ts`, built
26-
* once per engine by the class's static block. Methods go as closures that
27-
* call them on the engine at call time, so a subclass override or an instance
28-
* spy is still the one reached; fields and accessors go as GETTERS, read when
29-
* the body reads them, as they were on the class, and a field a body assigns
30-
* goes with a SETTER that assigns it on the engine.
25+
* body, by a `.call`, the same host: `hooksAndFunctionsHost` in
26+
* `engine-facet-hosts.ts`, built once per engine by the class's static block.
27+
* Methods go as closures that call them on the engine at call time, so a
28+
* subclass override or an instance spy is still the one reached; fields and
29+
* accessors go as GETTERS, read when the body reads them, as they were on the
30+
* class, and a field a body assigns goes with a SETTER that assigns it on the
31+
* engine.
3132
*
3233
* The module imports `engine.ts` for types only, so the two modules form no
3334
* evaluation cycle. `index.ts` re-exports nothing from this module.

‎packages/objectql/src/engine-insert.ts‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
* docblock on the class, the contract; a private method's docblock moved here
1616
* with its body. The state stays on `ObjectQL`.
1717
*
18-
* The bodies reach the class through {@link InsertHost}: exactly the
19-
* `ObjectQL` members they read, private ones included. Every stub hands its
20-
* body, by a `.call`, the same host: `insertHost` in `engine-facet-hosts.ts`, built
21-
* once per engine by the class's static block. Methods go as closures that
22-
* call them on the engine at call time, so a subclass override or an instance
23-
* spy is still the one reached; fields and accessors go as GETTERS, read when
24-
* the body reads them, as they were on the class, and a field a body assigns
25-
* goes with a SETTER that assigns it on the engine.
18+
* The bodies reach the class through {@link InsertHost}: exactly the `ObjectQL`
19+
* members they read, private ones included. Every stub hands its body, by a
20+
* `.call`, the same host: `insertHost` in `engine-facet-hosts.ts`, built once
21+
* per engine by the class's static block. Methods go as closures that call them
22+
* on the engine at call time, so a subclass override or an instance spy is
23+
* still the one reached; fields and accessors go as GETTERS, read when the body
24+
* reads them, as they were on the class, and a field a body assigns goes with a
25+
* SETTER that assigns it on the engine.
2626
*
2727
* The module imports `engine.ts` for types only, so the two modules form no
2828
* evaluation cycle. `index.ts` re-exports nothing from this module.

‎packages/objectql/src/engine-middleware-and-context.ts‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@
2020
* docblock on the class, the contract; a private method's docblock moved here
2121
* with its body. The state stays on `ObjectQL`.
2222
*
23-
* The bodies reach the class through {@link MiddlewareAndContextHost}: exactly the
24-
* `ObjectQL` members they read, private ones included. Every stub hands its
25-
* body, by a `.call`, the same host: `middlewareAndContextHost` in `engine-facet-hosts.ts`, built
26-
* once per engine by the class's static block. Methods go as closures that
27-
* call them on the engine at call time, so a subclass override or an instance
28-
* spy is still the one reached; fields and accessors go as GETTERS, read when
29-
* the body reads them, as they were on the class, and a field a body assigns
30-
* goes with a SETTER that assigns it on the engine.
23+
* The bodies reach the class through {@link MiddlewareAndContextHost}: exactly
24+
* the `ObjectQL` members they read, private ones included. Every stub hands its
25+
* body, by a `.call`, the same host: `middlewareAndContextHost` in
26+
* `engine-facet-hosts.ts`, built once per engine by the class's static block.
27+
* Methods go as closures that call them on the engine at call time, so a
28+
* subclass override or an instance spy is still the one reached; fields and
29+
* accessors go as GETTERS, read when the body reads them, as they were on the
30+
* class, and a field a body assigns goes with a SETTER that assigns it on the
31+
* engine.
3132
*
3233
* The module imports `engine.ts` for types only, so the two modules form no
3334
* evaluation cycle. `index.ts` re-exports nothing from this module.

‎packages/objectql/src/engine-migration-state.ts‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@
2323
*
2424
* The bodies reach the class through {@link MigrationStateHost}: exactly the
2525
* `ObjectQL` members they read, private ones included. Every stub hands its
26-
* body, by a `.call`, the same host: `migrationStateHost` in `engine-facet-hosts.ts`, built
27-
* once per engine by the class's static block. Methods go as closures that
28-
* call them on the engine at call time, so a subclass override or an instance
29-
* spy is still the one reached; fields and accessors go as GETTERS, read when
30-
* the body reads them, as they were on the class, and a field a body assigns
31-
* goes with a SETTER that assigns it on the engine.
26+
* body, by a `.call`, the same host: `migrationStateHost` in
27+
* `engine-facet-hosts.ts`, built once per engine by the class's static block.
28+
* Methods go as closures that call them on the engine at call time, so a
29+
* subclass override or an instance spy is still the one reached; fields and
30+
* accessors go as GETTERS, read when the body reads them, as they were on the
31+
* class, and a field a body assigns goes with a SETTER that assigns it on the
32+
* engine.
3233
*
3334
* `ObjectQL` here is `ObjectQLStatics` (imported AS `ObjectQL`): forwarders to the
3435
* statics the bodies read, private ones included, which the class fills in a

0 commit comments

Comments
 (0)