@owlmeans/server-planning 0.1.18-rc.3 → 0.1.18-rc.31
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 +92 -19
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/server-planning/SKILL.md +248 -31
- package/build/actions/apply-schema-request.d.ts +8 -0
- package/build/actions/apply-schema-request.d.ts.map +1 -0
- package/build/actions/apply-schema-request.js +33 -0
- package/build/actions/apply-schema-request.js.map +1 -0
- package/build/actions/commit.d.ts +3 -3
- package/build/actions/commit.d.ts.map +1 -1
- package/build/actions/commit.js +5 -4
- package/build/actions/commit.js.map +1 -1
- package/build/actions/define-schemas.d.ts +13 -0
- package/build/actions/define-schemas.d.ts.map +1 -0
- package/build/actions/define-schemas.js +28 -0
- package/build/actions/define-schemas.js.map +1 -0
- package/build/actions/execute.d.ts +11 -10
- package/build/actions/execute.d.ts.map +1 -1
- package/build/actions/execute.js +17 -27
- package/build/actions/execute.js.map +1 -1
- package/build/actions/execution/types.d.ts +34 -0
- package/build/actions/execution/types.d.ts.map +1 -0
- package/build/actions/execution/types.js +2 -0
- package/build/actions/execution/types.js.map +1 -0
- package/build/actions/execution.d.ts +4 -0
- package/build/actions/execution.d.ts.map +1 -0
- package/build/actions/execution.js +88 -0
- package/build/actions/execution.js.map +1 -0
- package/build/actions/get-card.d.ts +6 -0
- package/build/actions/get-card.d.ts.map +1 -0
- package/build/actions/get-card.js +9 -0
- package/build/actions/get-card.js.map +1 -0
- package/build/actions/get-specification.d.ts +6 -0
- package/build/actions/get-specification.d.ts.map +1 -0
- package/build/actions/get-specification.js +9 -0
- package/build/actions/get-specification.js.map +1 -0
- package/build/actions/index.d.ts +12 -3
- package/build/actions/index.d.ts.map +1 -1
- package/build/actions/index.js +11 -3
- package/build/actions/index.js.map +1 -1
- package/build/actions/links.d.ts +3 -3
- package/build/actions/links.d.ts.map +1 -1
- package/build/actions/links.js +6 -5
- package/build/actions/links.js.map +1 -1
- package/build/actions/list-card-specifications.d.ts +6 -0
- package/build/actions/list-card-specifications.d.ts.map +1 -0
- package/build/actions/list-card-specifications.js +11 -0
- package/build/actions/list-card-specifications.js.map +1 -0
- package/build/actions/list-card-transitions.d.ts +6 -0
- package/build/actions/list-card-transitions.d.ts.map +1 -0
- package/build/actions/list-card-transitions.js +11 -0
- package/build/actions/list-card-transitions.js.map +1 -0
- package/build/actions/list-cards.d.ts +6 -0
- package/build/actions/list-cards.d.ts.map +1 -0
- package/build/actions/list-cards.js +10 -0
- package/build/actions/list-cards.js.map +1 -0
- package/build/actions/list-schemas.d.ts +13 -0
- package/build/actions/list-schemas.d.ts.map +1 -0
- package/build/actions/list-schemas.js +20 -0
- package/build/actions/list-schemas.js.map +1 -0
- package/build/actions/list-specification-revisions.d.ts +6 -0
- package/build/actions/list-specification-revisions.d.ts.map +1 -0
- package/build/actions/list-specification-revisions.js +10 -0
- package/build/actions/list-specification-revisions.js.map +1 -0
- package/build/actions/resources.d.ts +5 -0
- package/build/actions/resources.d.ts.map +1 -0
- package/build/actions/resources.js +111 -0
- package/build/actions/resources.js.map +1 -0
- package/build/actions/summarize-cards.d.ts +6 -0
- package/build/actions/summarize-cards.d.ts.map +1 -0
- package/build/actions/summarize-cards.js +11 -0
- package/build/actions/summarize-cards.js.map +1 -0
- package/build/actions/transitions.d.ts +3 -3
- package/build/actions/transitions.d.ts.map +1 -1
- package/build/actions/transitions.js +4 -3
- package/build/actions/transitions.js.map +1 -1
- package/build/actions/types.d.ts +6 -0
- package/build/actions/types.d.ts.map +1 -0
- package/build/actions/types.js +2 -0
- package/build/actions/types.js.map +1 -0
- package/build/actions/watch.d.ts +2 -2
- package/build/actions/watch.d.ts.map +1 -1
- package/build/actions/watch.js +8 -6
- package/build/actions/watch.js.map +1 -1
- package/build/conformance/assert/types.d.ts +19 -0
- package/build/conformance/assert/types.d.ts.map +1 -0
- package/build/conformance/assert/types.js +2 -0
- package/build/conformance/assert/types.js.map +1 -0
- package/build/conformance/assert.d.ts +15 -0
- package/build/conformance/assert.d.ts.map +1 -0
- package/build/conformance/assert.js +52 -0
- package/build/conformance/assert.js.map +1 -0
- package/build/conformance/cases.d.ts +7 -0
- package/build/conformance/cases.d.ts.map +1 -0
- package/build/conformance/cases.js +467 -0
- package/build/conformance/cases.js.map +1 -0
- package/build/conformance/clock.d.ts +6 -0
- package/build/conformance/clock.d.ts.map +1 -0
- package/build/conformance/clock.js +12 -0
- package/build/conformance/clock.js.map +1 -0
- package/build/conformance/consts.d.ts +25 -0
- package/build/conformance/consts.d.ts.map +1 -0
- package/build/conformance/consts.js +144 -0
- package/build/conformance/consts.js.map +1 -0
- package/build/conformance/errors.d.ts +5 -0
- package/build/conformance/errors.d.ts.map +1 -0
- package/build/conformance/errors.js +8 -0
- package/build/conformance/errors.js.map +1 -0
- package/build/conformance/fixtures/types.d.ts +13 -0
- package/build/conformance/fixtures/types.d.ts.map +1 -0
- package/build/conformance/fixtures/types.js +2 -0
- package/build/conformance/fixtures/types.js.map +1 -0
- package/build/conformance/fixtures.d.ts +14 -0
- package/build/conformance/fixtures.d.ts.map +1 -0
- package/build/conformance/fixtures.js +26 -0
- package/build/conformance/fixtures.js.map +1 -0
- package/build/conformance/index.d.ts +15 -0
- package/build/conformance/index.d.ts.map +1 -0
- package/build/conformance/index.js +12 -0
- package/build/conformance/index.js.map +1 -0
- package/build/conformance/resources.d.ts +4 -0
- package/build/conformance/resources.d.ts.map +1 -0
- package/build/conformance/resources.js +228 -0
- package/build/conformance/resources.js.map +1 -0
- package/build/conformance/types.d.ts +18 -0
- package/build/conformance/types.d.ts.map +1 -0
- package/build/conformance/types.js +2 -0
- package/build/conformance/types.js.map +1 -0
- package/build/consts.d.ts +5 -0
- package/build/consts.d.ts.map +1 -1
- package/build/consts.js +5 -0
- package/build/consts.js.map +1 -1
- package/build/definitions.d.ts +17 -0
- package/build/definitions.d.ts.map +1 -0
- package/build/definitions.js +223 -0
- package/build/definitions.js.map +1 -0
- package/build/executor/changes/types.d.ts +36 -0
- package/build/executor/changes/types.d.ts.map +1 -0
- package/build/executor/changes/types.js +2 -0
- package/build/executor/changes/types.js.map +1 -0
- package/build/executor/changes.d.ts +3 -30
- package/build/executor/changes.d.ts.map +1 -1
- package/build/executor/changes.js +42 -51
- package/build/executor/changes.js.map +1 -1
- package/build/executor/code/types.d.ts +17 -0
- package/build/executor/code/types.d.ts.map +1 -0
- package/build/executor/code/types.js +2 -0
- package/build/executor/code/types.js.map +1 -0
- package/build/executor/code.d.ts +3 -14
- package/build/executor/code.d.ts.map +1 -1
- package/build/executor/code.js +50 -54
- package/build/executor/code.js.map +1 -1
- package/build/executor/consts.local.d.ts +5 -0
- package/build/executor/consts.local.d.ts.map +1 -0
- package/build/executor/consts.local.js +6 -0
- package/build/executor/consts.local.js.map +1 -0
- package/build/executor/creator/types.d.ts +33 -0
- package/build/executor/creator/types.d.ts.map +1 -0
- package/build/executor/creator/types.js +2 -0
- package/build/executor/creator/types.js.map +1 -0
- package/build/executor/creator.d.ts +11 -0
- package/build/executor/creator.d.ts.map +1 -0
- package/build/executor/creator.js +32 -0
- package/build/executor/creator.js.map +1 -0
- package/build/executor/resolve/types.d.ts +30 -0
- package/build/executor/resolve/types.d.ts.map +1 -0
- package/build/executor/resolve/types.js +2 -0
- package/build/executor/resolve/types.js.map +1 -0
- package/build/executor/resolve.d.ts +5 -34
- package/build/executor/resolve.d.ts.map +1 -1
- package/build/executor/resolve.js +169 -110
- package/build/executor/resolve.js.map +1 -1
- package/build/executor/types.d.ts +23 -0
- package/build/executor/types.d.ts.map +1 -0
- package/build/executor/types.js +2 -0
- package/build/executor/types.js.map +1 -0
- package/build/executor/validate.d.ts +6 -5
- package/build/executor/validate.d.ts.map +1 -1
- package/build/executor/validate.js +38 -27
- package/build/executor/validate.js.map +1 -1
- package/build/executor.d.ts +11 -7
- package/build/executor.d.ts.map +1 -1
- package/build/executor.js +27 -21
- package/build/executor.js.map +1 -1
- package/build/facade.d.ts +20 -2
- package/build/facade.d.ts.map +1 -1
- package/build/facade.js +144 -22
- package/build/facade.js.map +1 -1
- package/build/helper.d.ts +5 -9
- package/build/helper.d.ts.map +1 -1
- package/build/helper.js +12 -11
- package/build/helper.js.map +1 -1
- package/build/hierarchy/types.d.ts +10 -0
- package/build/hierarchy/types.d.ts.map +1 -0
- package/build/hierarchy/types.js +2 -0
- package/build/hierarchy/types.js.map +1 -0
- package/build/hierarchy.d.ts +5 -0
- package/build/hierarchy.d.ts.map +1 -0
- package/build/hierarchy.js +113 -0
- package/build/hierarchy.js.map +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/invariants/types.d.ts +6 -0
- package/build/invariants/types.d.ts.map +1 -0
- package/build/invariants/types.js +2 -0
- package/build/invariants/types.js.map +1 -0
- package/build/invariants.d.ts +5 -0
- package/build/invariants.d.ts.map +1 -0
- package/build/invariants.js +124 -0
- package/build/invariants.js.map +1 -0
- package/build/projection.d.ts +4 -10
- package/build/projection.d.ts.map +1 -1
- package/build/projection.js +7 -5
- package/build/projection.js.map +1 -1
- package/build/queue/consts.d.ts +5 -0
- package/build/queue/consts.d.ts.map +1 -0
- package/build/queue/consts.js +5 -0
- package/build/queue/consts.js.map +1 -0
- package/build/queue/declare.d.ts +5 -0
- package/build/queue/declare.d.ts.map +1 -0
- package/build/queue/declare.js +5 -0
- package/build/queue/declare.js.map +1 -0
- package/build/queue/index.d.ts +3 -18
- package/build/queue/index.d.ts.map +1 -1
- package/build/queue/index.js +2 -7
- package/build/queue/index.js.map +1 -1
- package/build/queue/types.d.ts +13 -0
- package/build/queue/types.d.ts.map +1 -0
- package/build/queue/types.js +2 -0
- package/build/queue/types.js.map +1 -0
- package/build/registry.d.ts +2 -21
- package/build/registry.d.ts.map +1 -1
- package/build/registry.js +4 -1
- package/build/registry.js.map +1 -1
- package/build/resources.d.ts +5 -0
- package/build/resources.d.ts.map +1 -0
- package/build/resources.js +287 -0
- package/build/resources.js.map +1 -0
- package/build/service.d.ts +3 -16
- package/build/service.d.ts.map +1 -1
- package/build/service.js +12 -0
- package/build/service.js.map +1 -1
- package/build/store/commits.d.ts.map +1 -1
- package/build/store/commits.js +3 -1
- package/build/store/commits.js.map +1 -1
- package/build/store/composite.d.ts +1 -0
- package/build/store/composite.d.ts.map +1 -1
- package/build/store/composite.js +7 -2
- package/build/store/composite.js.map +1 -1
- package/build/store/consts.local.d.ts +2 -0
- package/build/store/consts.local.d.ts.map +1 -0
- package/build/store/consts.local.js +2 -0
- package/build/store/consts.local.js.map +1 -0
- package/build/store/fold/types.d.ts +43 -0
- package/build/store/fold/types.d.ts.map +1 -0
- package/build/store/fold/types.js +2 -0
- package/build/store/fold/types.js.map +1 -0
- package/build/store/fold.d.ts +8 -30
- package/build/store/fold.d.ts.map +1 -1
- package/build/store/fold.js +190 -198
- package/build/store/fold.js.map +1 -1
- package/build/store/index.d.ts +1 -0
- package/build/store/index.d.ts.map +1 -1
- package/build/store/index.js.map +1 -1
- package/build/store/memory.d.ts +12 -0
- package/build/store/memory.d.ts.map +1 -1
- package/build/store/memory.js +0 -0
- package/build/store/memory.js.map +1 -1
- package/build/store/types.d.ts +15 -1
- package/build/store/types.d.ts.map +1 -1
- package/build/store/types.local.d.ts +5 -0
- package/build/store/types.local.d.ts.map +1 -0
- package/build/store/types.local.js +2 -0
- package/build/store/types.local.js.map +1 -0
- package/build/types.d.ts +115 -1
- package/build/types.d.ts.map +1 -1
- package/build/types.local.d.ts +7 -0
- package/build/types.local.d.ts.map +1 -0
- package/build/types.local.js +2 -0
- package/build/types.local.js.map +1 -0
- package/build/utils/access/types.d.ts +30 -0
- package/build/utils/access/types.d.ts.map +1 -0
- package/build/utils/access/types.js +2 -0
- package/build/utils/access/types.js.map +1 -0
- package/build/utils/access.d.ts +4 -0
- package/build/utils/access.d.ts.map +1 -0
- package/build/utils/access.js +28 -0
- package/build/utils/access.js.map +1 -0
- package/build/utils/guard/types.d.ts +23 -0
- package/build/utils/guard/types.d.ts.map +1 -0
- package/build/utils/guard/types.js +2 -0
- package/build/utils/guard/types.js.map +1 -0
- package/build/utils/guard.d.ts +7 -10
- package/build/utils/guard.d.ts.map +1 -1
- package/build/utils/guard.js +36 -32
- package/build/utils/guard.js.map +1 -1
- package/build/utils/handler/types.d.ts +26 -0
- package/build/utils/handler/types.d.ts.map +1 -0
- package/build/utils/handler/types.js +2 -0
- package/build/utils/handler/types.js.map +1 -0
- package/build/utils/handler.d.ts +6 -0
- package/build/utils/handler.d.ts.map +1 -0
- package/build/utils/handler.js +21 -0
- package/build/utils/handler.js.map +1 -0
- package/build/utils/index.d.ts +8 -0
- package/build/utils/index.d.ts.map +1 -1
- package/build/utils/index.js +3 -0
- package/build/utils/index.js.map +1 -1
- package/build/utils/request/types.d.ts +23 -0
- package/build/utils/request/types.d.ts.map +1 -0
- package/build/utils/request/types.js +2 -0
- package/build/utils/request/types.js.map +1 -0
- package/build/utils/request.d.ts +4 -0
- package/build/utils/request.d.ts.map +1 -0
- package/build/utils/request.js +27 -0
- package/build/utils/request.js.map +1 -0
- package/build/utils/scope.d.ts +17 -13
- package/build/utils/scope.d.ts.map +1 -1
- package/build/utils/scope.js +21 -35
- package/build/utils/scope.js.map +1 -1
- package/build/utils/types.d.ts +8 -0
- package/build/utils/types.d.ts.map +1 -0
- package/build/utils/types.js +2 -0
- package/build/utils/types.js.map +1 -0
- package/package.json +28 -20
- package/src/actions/apply-schema-request.ts +36 -0
- package/src/actions/commit.ts +7 -5
- package/src/actions/define-schemas.ts +34 -0
- package/src/actions/execute.ts +32 -34
- package/src/actions/execution/types.ts +34 -0
- package/src/actions/execution.ts +100 -0
- package/src/actions/get-card.ts +14 -0
- package/src/actions/get-specification.ts +14 -0
- package/src/actions/index.ts +13 -3
- package/src/actions/links.ts +8 -6
- package/src/actions/list-card-specifications.ts +15 -0
- package/src/actions/list-card-transitions.ts +15 -0
- package/src/actions/list-cards.ts +14 -0
- package/src/actions/list-schemas.ts +29 -0
- package/src/actions/list-specification-revisions.ts +15 -0
- package/src/actions/resources.ts +79 -0
- package/src/actions/summarize-cards.ts +15 -0
- package/src/actions/transitions.ts +6 -4
- package/src/actions/types.ts +5 -0
- package/src/actions/watch.ts +11 -7
- package/src/conformance/assert/types.ts +16 -0
- package/src/conformance/assert.ts +67 -0
- package/src/conformance/cases.ts +544 -0
- package/src/conformance/clock.ts +11 -0
- package/src/conformance/consts.ts +149 -0
- package/src/conformance/errors.ts +7 -0
- package/src/conformance/fixtures/types.ts +11 -0
- package/src/conformance/fixtures.ts +46 -0
- package/src/conformance/index.ts +14 -0
- package/src/conformance/resources.ts +227 -0
- package/src/conformance/types.ts +20 -0
- package/src/consts.ts +6 -0
- package/src/definitions.ts +262 -0
- package/src/executor/changes/types.ts +38 -0
- package/src/executor/changes.ts +49 -68
- package/src/executor/code/types.ts +23 -0
- package/src/executor/code.ts +62 -69
- package/src/executor/consts.local.ts +8 -0
- package/src/executor/creator/types.ts +33 -0
- package/src/executor/creator.ts +43 -0
- package/src/executor/resolve/types.ts +30 -0
- package/src/executor/resolve.ts +181 -139
- package/src/executor/types.ts +23 -0
- package/src/executor/validate.ts +40 -38
- package/src/executor.ts +33 -27
- package/src/facade.ts +132 -29
- package/src/helper.ts +12 -11
- package/src/hierarchy/types.ts +10 -0
- package/src/hierarchy.ts +93 -0
- package/src/index.ts +1 -0
- package/src/invariants/types.ts +6 -0
- package/src/invariants.ts +104 -0
- package/src/projection.ts +12 -18
- package/src/queue/consts.ts +5 -0
- package/src/queue/declare.ts +7 -0
- package/src/queue/index.ts +3 -25
- package/src/queue/types.ts +14 -0
- package/src/registry.ts +6 -29
- package/src/resources.ts +256 -0
- package/src/service.ts +16 -20
- package/src/store/commits.ts +5 -4
- package/src/store/composite.ts +7 -2
- package/src/store/consts.local.ts +1 -0
- package/src/store/fold/types.ts +44 -0
- package/src/store/fold.ts +214 -212
- package/src/store/index.ts +1 -0
- package/src/store/memory.ts +0 -0
- package/src/store/types.local.ts +3 -0
- package/src/store/types.ts +16 -1
- package/src/types.local.ts +7 -0
- package/src/types.ts +129 -5
- package/src/utils/access/types.ts +30 -0
- package/src/utils/access.ts +33 -0
- package/src/utils/guard/types.ts +21 -0
- package/src/utils/guard.ts +44 -31
- package/src/utils/handler/types.ts +28 -0
- package/src/utils/handler.ts +35 -0
- package/src/utils/index.ts +9 -0
- package/src/utils/request/types.ts +23 -0
- package/src/utils/request.ts +40 -0
- package/src/utils/scope.ts +39 -42
- package/src/utils/types.ts +8 -0
- package/tests/access.spec.ts +160 -0
- package/tests/conformance.spec.ts +47 -0
- package/tests/create-example.spec.ts +202 -0
- package/tests/creator.spec.ts +257 -0
- package/tests/entrypoints.spec.ts +5 -0
- package/tests/narrowing.spec.ts +94 -0
- package/tests/plugins.spec.ts +4 -3
- package/tests/writes.spec.ts +140 -0
- package/build/actions/cards.d.ts +0 -16
- package/build/actions/cards.d.ts.map +0 -1
- package/build/actions/cards.js +0 -32
- package/build/actions/cards.js.map +0 -1
- package/build/actions/schemas.d.ts +0 -6
- package/build/actions/schemas.d.ts.map +0 -1
- package/build/actions/schemas.js +0 -9
- package/build/actions/schemas.js.map +0 -1
- package/build/actions/specs.d.ts +0 -10
- package/build/actions/specs.d.ts.map +0 -1
- package/build/actions/specs.js +0 -14
- package/build/actions/specs.js.map +0 -1
- package/src/actions/cards.ts +0 -52
- package/src/actions/schemas.ts +0 -15
- package/src/actions/specs.ts +0 -23
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The server half of `@owlmeans/planning`: the planning service and its plugin registry, the
|
|
4
4
|
transition executor every write goes through, the in-memory reference store, the commit hub and the
|
|
5
|
-
protocol handlers. A backend appends the service once, binds the handlers to the shared protocol
|
|
5
|
+
protocol handlers, versioned auxiliary resource commands and schema-governed hierarchy. A backend appends the service once, binds the handlers to the shared protocol
|
|
6
6
|
tree, and reads and writes through a scoped facade. A browser or Node client uses
|
|
7
7
|
`@owlmeans/client-planning` against the same tree; a durable store implements the ports and reuses
|
|
8
8
|
the `@owlmeans/server-planning/store` subpath.
|
|
@@ -10,13 +10,16 @@ the `@owlmeans/server-planning/store` subpath.
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
12
|
```sh
|
|
13
|
-
bun add @owlmeans/server-planning@^0.1.18-rc.
|
|
13
|
+
bun add @owlmeans/server-planning@^0.1.18-rc.31 @owlmeans/planning@^0.1.18-rc.26 ajv
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Concepts
|
|
17
17
|
|
|
18
|
-
- **Facade** — `
|
|
19
|
-
with no scope argument on any method.
|
|
18
|
+
- **Facade** — `ctx.service<PlanningHostService>(PLANNING_SERVICE).for(scope)`: every read and
|
|
19
|
+
write of one organization entity, with no scope argument on any method. `context.planning()` is
|
|
20
|
+
the same service, but only on a context that went through `appendPlanningService`; a service
|
|
21
|
+
registered as a plain one (`makePlanningService()`, a generated target's `services/planning.ts`)
|
|
22
|
+
has no `context.planning`.
|
|
20
23
|
- **Executor** — the only write path: normalize → idempotency → resolve → plugins' `before` →
|
|
21
24
|
validate → id → code → changes → seq CAS → append → project → receipt. Nothing is appended by a
|
|
22
25
|
refusal.
|
|
@@ -26,6 +29,8 @@ bun add @owlmeans/server-planning@^0.1.18-rc.3 @owlmeans/planning@^0.1.18-rc.3 a
|
|
|
26
29
|
`after` chain exactly once and publishes a commit event.
|
|
27
30
|
- **Store** — `makeMemoryPlanningStore()` for tests and single-process tools; a durable store in
|
|
28
31
|
anything with more than one process.
|
|
32
|
+
- **Resource facade** — `assignees`, `teams`, `comments` and `mentions` use native versioned ports.
|
|
33
|
+
Organization units serialize dependent writes, schema changes and derived relationships.
|
|
29
34
|
|
|
30
35
|
## Usage
|
|
31
36
|
|
|
@@ -37,6 +42,8 @@ import { makePlanningProtocols } from '@owlmeans/planning'
|
|
|
37
42
|
export const planningProtocols = makePlanningProtocols({
|
|
38
43
|
base: { alias: 'app:planning', path: '/planning' },
|
|
39
44
|
guards: DEFAULT_GUARD,
|
|
45
|
+
resources: true,
|
|
46
|
+
definitions: true,
|
|
40
47
|
})
|
|
41
48
|
```
|
|
42
49
|
|
|
@@ -90,47 +97,113 @@ ensurePlanningService(context).use({
|
|
|
90
97
|
Hand-written handler and the memory store in a test:
|
|
91
98
|
|
|
92
99
|
```ts
|
|
93
|
-
import { appendPlanningService,
|
|
100
|
+
import { appendPlanningService, planningHandlerOf } from '@owlmeans/server-planning'
|
|
94
101
|
import { makeMemoryPlanningStore } from '@owlmeans/server-planning/store'
|
|
95
102
|
|
|
96
103
|
appendPlanningService(testContext, { store: makeMemoryPlanningStore({ sync: false }), plugins: [fixtures] })
|
|
97
|
-
const cards = await planningFor(
|
|
104
|
+
const cards = await planningHandlerOf(ctx).planningFor(req, { channel: 'web' }).cards.list({ parent: projectId })
|
|
98
105
|
```
|
|
99
106
|
|
|
107
|
+
## Native planning resources
|
|
108
|
+
|
|
109
|
+
Register assignee type schemas through `schemas.assigneeTypes` or the facade's definitions.
|
|
110
|
+
The scoped facade exposes versioned `assignees.create/update/retire`, `teams.create/update/remove`,
|
|
111
|
+
`comments.create/update/remove` and derived `mentions` reads/rebuilds. Resource updates and
|
|
112
|
+
removals require `{ version: record.version }`; they do not allocate card transitions.
|
|
113
|
+
|
|
114
|
+
Supply a verified `assigneeId` in the trusted scope for comment authors. Hosts may also supply
|
|
115
|
+
`defaultAssigneeId`; `@owlmeans/planning-auth` resolves verified authentication subjects and groups
|
|
116
|
+
to planning ids and can attribute missing card reporters. Never accept author or organization
|
|
117
|
+
claims from an untrusted resource request. Human authentication requirements come from assignee
|
|
118
|
+
type schemas, while nicknames identify participants only within an organization entity.
|
|
119
|
+
|
|
120
|
+
Use `teams.addMember/removeMember`, `teams.attach/detach`, `teams.members`, `teams.projects` and
|
|
121
|
+
`teams.assignees`. They reuse the relationship store and preserve reusable organization teams.
|
|
122
|
+
Schema reference fields maintain their canonical edges and named inverse views in the same
|
|
123
|
+
organization unit. Explicit relationship writes cannot contradict a field-authoritative edge.
|
|
124
|
+
|
|
125
|
+
`parent`, `parents` and derived `parentType` are the hierarchy. Schema parent/child rules validate
|
|
126
|
+
creates and reparenting; recursive project scope is checked before paging, including comments,
|
|
127
|
+
history, specifications and relationships. Project `mode` is access-policy metadata, separate
|
|
128
|
+
from status. Deleting a card removes its comments and mention cache. Project purge follows
|
|
129
|
+
current ancestry and retains unrelated organization assignees, reusable teams and reparented
|
|
130
|
+
survivors, even when an older log or edge caches the deleted project id.
|
|
131
|
+
|
|
132
|
+
Mount `resources: true` and `definitions: true` in the shared protocol tree, then bind stock
|
|
133
|
+
`servePlanningEntrypoints`. Its access resolver authorizes resource commands and conceals records
|
|
134
|
+
outside scope. Stock replies remove native `entityId` metadata from known record/envelope
|
|
135
|
+
positions, while application fields, schema definitions and transition changes remain opaque.
|
|
136
|
+
|
|
100
137
|
## API
|
|
101
138
|
|
|
102
139
|
- Service: `appendPlanningService`, `ensurePlanningService`, `makePlanningService`,
|
|
103
140
|
`planningServiceApi`, `makePluginRegistry`, `makeStoreFacade`, `executeTransition`,
|
|
104
|
-
`
|
|
105
|
-
|
|
141
|
+
`creatorHelper` (`creatorOf`, `withCreator`, `assertCreatorFixed`), `PlanningServiceOptions`, `PlanningHostService`,
|
|
142
|
+
`PlanningRuntime`, `PluginRegistry`
|
|
143
|
+
- Handlers (one per file under `actions/`): `servePlanningEntrypoints`, `listSchemas`, `listCards`,
|
|
106
144
|
`summarizeCards`, `getCard`, `listCardTransitions`, `listCardSpecifications`, `getSpecification`,
|
|
107
|
-
`listSpecificationRevisions`, `listLinks`, `getTransition`, `executePlanning`, `
|
|
108
|
-
`
|
|
109
|
-
|
|
110
|
-
`
|
|
111
|
-
|
|
112
|
-
-
|
|
113
|
-
|
|
114
|
-
`
|
|
115
|
-
`
|
|
116
|
-
|
|
145
|
+
`listSpecificationRevisions`, `listLinks`, `getTransition`, `executePlanning`, `getCommit`,
|
|
146
|
+
`watchCommits`, `defineSchemas`, `applySchemaRequest`; `executionHelper` (`wireExecution`,
|
|
147
|
+
`executeOptionsOf`, `assertExecutionWrites`, `assertExecutionGranted`); `PlanningHandlerOptions`,
|
|
148
|
+
`PlanningScopeExtractor`, `PlanningAccessResolver`, `PlanningAccess`, `PlanningAccessGrants`,
|
|
149
|
+
`PlanningGrant`
|
|
150
|
+
- Scope: `planningHandlerOf(ctx)` (`planningServiceOf`, `handlerScopeOf`, `handlerFacade`,
|
|
151
|
+
`planningFor`), `makeRequestScope(req)` (`scopeOf`, `accessScopeOf`, `actorOf`),
|
|
152
|
+
`makePlanningAccessModel(access)` (`assertGranted`, `writableIn`, `assertWrites`), `guardHelper`
|
|
153
|
+
(`concealed`, `assertScope`, `notFoundOf`, `clampSeconds`), `projectCriteriaOf`
|
|
154
|
+
- Data-defined schemas: `makeDefinitions`, `makeSchemaViews`, `SchemaViews`, `SchemaViewsOptions`
|
|
155
|
+
- Projection: `makeProjectionProcessor`, `makePlanningQueueHooks`, `ProjectionOptions`
|
|
156
|
+
- Constants: `DEFAULT_ALIAS`, `MEMORY_STORE_ALIAS`, `DEFAULT_COMMIT_MEMORY`, `COMMIT_POLL_LADDER`,
|
|
157
|
+
`DEFAULT_SCHEMA_VIEWS`
|
|
158
|
+
- `@owlmeans/server-planning/store`: `makeMemoryPlanningStore`, `foldHelper` (`foldPending`,
|
|
159
|
+
`failPending`, `revisionsFromLog`, `commitEventOf`), `makeCommitHub`, `makeCompositeStore`,
|
|
160
|
+
`wantsSpecifications`,
|
|
161
|
+
and the types `BindablePlanningStore`, `CommitListener`, `CommitHub`, `CommitHubOptions`,
|
|
162
|
+
`FoldOptions`, `FoldResult`, `MemoryPlanningStore`, `MemoryPlanningStoreOptions`, `StoreRoute`
|
|
163
|
+
- `@owlmeans/server-planning/conformance`: `planningConformance`, `conformanceCasesFor`,
|
|
164
|
+
`planningConformancePlugin`, `conformanceClock`, `ConformanceFailure`, `assertHelper` (`check`,
|
|
165
|
+
`same`, `sameSet`, `rejects`), the library fixtures (`LIBRARY`, `conformanceFixturesOf(facade)` —
|
|
166
|
+
`createBranch`, `createBook`, `transit`)
|
|
167
|
+
and the types `ConformanceCase`, `ConformanceSubject`, `ConformanceCapability`
|
|
168
|
+
- The former plain functions (`planningFor`, `foldPending`, `creatorOf`, `scopeOf`, `concealed`,
|
|
169
|
+
`planningQueueHooks`, `check`, `createBranch`, …) remain as deprecated delegates.
|
|
117
170
|
|
|
118
171
|
## Common pitfalls
|
|
119
172
|
|
|
173
|
+
- A create's draft goes under `card` — `draft` is refused as `planning:malformed:create-without-draft`.
|
|
174
|
+
- `{ wait: true }` is the SECOND argument of `execute`; inside the execution it is ignored and the
|
|
175
|
+
receipt returns before the commit.
|
|
176
|
+
- A type or flow declaration has no `name` or `key`: the display name is `label`, the key is `type`
|
|
177
|
+
(a type) or `id` (a flow). `definitions.define` refuses anything else with `SchemaInvalid`; a code
|
|
178
|
+
plugin's registry does not check, so keep the literals typed.
|
|
179
|
+
|
|
120
180
|
- `after` hooks run where the transition is FOLDED, once per commit — register the same plugins in
|
|
121
181
|
every folding process, and never run hooks from a commit-bus subscription.
|
|
182
|
+
- Organization locks are released before `after` hooks, so a hook may write into the same scope.
|
|
122
183
|
- The memory store is per-process heap: wrong for multiple processes or restarts.
|
|
123
184
|
- `actor` comes from the scope; a wire `actor` or `createdBy` is ignored.
|
|
185
|
+
- A create's `createdBy` defaults to the scope's subject (`profileId`, else `userId`, else the
|
|
186
|
+
scope actor's) on every path — in-process facade and HTTP alike; an in-process draft that names
|
|
187
|
+
one keeps it, a scope naming nobody leaves it unset.
|
|
188
|
+
- After the create `createdBy` never moves: an execution naming it in `changes` or `unset` is
|
|
189
|
+
refused with `planning:immutable:createdBy` — over HTTP, in process and from a `before` plugin.
|
|
124
190
|
- Another entity's record is `WorkcardNotFound`, never a permission error.
|
|
125
191
|
- Give retried writes a `key` — it is checked before validation, so a retry answers the first receipt.
|
|
126
192
|
- `expectSeq` compares against `head`; a stale one is `WorkcardConflict`, re-read and retry.
|
|
127
193
|
- Call `appendPlanningService` before any `ensurePlanningService`, or the appended host replaces
|
|
128
194
|
what was registered on the default one.
|
|
195
|
+
- `opts.access` makes the resolver the only source of the organization; a `grants` object refuses
|
|
196
|
+
every flag it leaves out.
|
|
197
|
+
- A durable store is not done until it passes `@owlmeans/server-planning/conformance`.
|
|
198
|
+
- Resource writes require their current `version`; assignee/team `fields` replace the previous
|
|
199
|
+
object, while card `changes.fields` merge. A field-backed relationship is changed through its
|
|
200
|
+
field, not by writing an independent link.
|
|
129
201
|
|
|
130
202
|
## Related packages
|
|
131
203
|
|
|
132
204
|
- `@owlmeans/planning` — records, flows, fold, query language, protocol tree, models
|
|
133
205
|
- `@owlmeans/client-planning` — the remote facade and state mirror
|
|
206
|
+
- `@owlmeans/planning-postgres` — the durable Postgres store
|
|
134
207
|
- `@owlmeans/server-job`, `@owlmeans/queue` — job feeds and the projection queue
|
|
135
208
|
|
|
136
209
|
<!-- owlmeans:agent-guidance:start -->
|
|
@@ -141,7 +214,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
141
214
|
your project's skill store (`.agents/skills/`):
|
|
142
215
|
|
|
143
216
|
```sh
|
|
144
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
217
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.53
|
|
145
218
|
```
|
|
146
219
|
|
|
147
220
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/server-planning",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-
|
|
4
|
+
"version": "0.1.18-rc.31",
|
|
5
|
+
"generatedAt": "2026-10-10T22:28:00.509Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -8,12 +8,12 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/server-planning
|
|
9
9
|
|
|
10
10
|
**Layer:** Server
|
|
11
|
-
**Install:** `"@owlmeans/server-planning": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/server-planning": "^0.1.18-rc.31"` in `dependencies` (`ajv` is a peer)
|
|
12
12
|
|
|
13
13
|
The general implementation of `@owlmeans/planning`: the planning service (a plugin host), the
|
|
14
14
|
scoped facade, the executor every write goes through, the in-memory reference store, the commit
|
|
15
15
|
hub and the protocol handlers. It holds no database code — a durable store implements the ports and
|
|
16
|
-
reuses the `./store` subpath (`foldPending`, `makeCommitHub`) without pulling fastify in.
|
|
16
|
+
reuses the `./store` subpath (`foldHelper.foldPending`, `makeCommitHub`) without pulling fastify in.
|
|
17
17
|
|
|
18
18
|
## Key exports
|
|
19
19
|
|
|
@@ -24,13 +24,18 @@ reuses the `./store` subpath (`foldPending`, `makeCommitHub`) without pulling fa
|
|
|
24
24
|
| `makePlanningService(opts?, alias?)`, `planningServiceApi(opts, self)` | The service, and its body for a specialised service |
|
|
25
25
|
| `PlanningServiceOptions` | `{ store?, plugins?, schemas?, hooks?, ids?, now? }` |
|
|
26
26
|
| `makePluginRegistry`, `makeStoreFacade`, `executeTransition` | The pieces the service is made of |
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
|
|
|
27
|
+
| `creatorHelper` — `.creatorOf(scope)`, `.withCreator(exec, scope)`, `.assertCreatorFixed(exec)` | The subject a create is stamped with as `createdBy`, the defaulting the executor applies, and its refusal of any later move |
|
|
28
|
+
| `servePlanningEntrypoints(protocols, opts?)` | One binding per protocol of a `makePlanningProtocols` tree (`schema.define` too when declared) |
|
|
29
|
+
| `planningHandlerOf(ctx).planningFor(req, extra?)` | The request-scoped facade for a hand-written handler |
|
|
30
|
+
| `PlanningHandlerOptions` | `{ service?, event?, maxPoll?, scope?(req, ctx), access?(req, ctx) }` |
|
|
31
|
+
| `PlanningAccessResolver`, `PlanningAccess`, `PlanningAccessGrants`, `PlanningGrant` | The optional access decision a hosting app supplies |
|
|
32
|
+
| `listCards` … `executePlanning`, `getCommit`, `watchCommits`, `listSchemas`, `defineSchemas`, `applySchemaRequest` | The handlers, to bind one by hand |
|
|
33
|
+
| `makeRequestScope(req)` — `.scopeOf(extra?)`, `.accessScopeOf(access, extra?)`, `.actorOf()`; `planningHandlerOf(ctx).handlerScopeOf`; `makePlanningAccessModel(access)` — `.assertGranted`, `.assertWrites`, `.writableIn`; `executionHelper` — `.assertExecutionGranted`, `.assertExecutionWrites`; `guardHelper` — `.concealed(run)`, `.clampSeconds` | Scope and security helpers |
|
|
34
|
+
| `makeDefinitions(runtime, facade)`, `makeSchemaViews(opts)`, `projectCriteriaOf(projects, through?)` | Data-defined schemas and the project narrowing |
|
|
35
|
+
| `makeProjectionProcessor(ctx, opts?)`, `makePlanningQueueHooks(ctx, opts?)` | A generic projection job body and its `onJobDead` |
|
|
36
|
+
| `./queue`: `declarePlanningQueue(cfg, opts?)`, `PLANNING_PROJECTION_QUEUE` (`planning-projection`), `PLANNING_PROJECT_JOB` (`planning:project`), `ProjectionRequest` | The projection queue's shared address; each process chooses separately whether to listen |
|
|
37
|
+
| `./store`: `makeMemoryPlanningStore`, `foldHelper` (`.foldPending`, `.failPending`, `.revisionsFromLog`, `.commitEventOf`), `makeCommitHub`, `makeCompositeStore`, `wantsSpecifications` | What stores are built from |
|
|
38
|
+
| `./conformance`: `planningConformance`, `conformanceCasesFor`, `planningConformancePlugin`, `conformanceClock`, `ConformanceFailure` | The store conformance suite, runner-agnostic |
|
|
34
39
|
|
|
35
40
|
## Wiring
|
|
36
41
|
|
|
@@ -58,30 +63,96 @@ context.registerEntrypoints(servePlanningEntrypoints(planningProtocols, {
|
|
|
58
63
|
`ensurePlanningService(ctx).use(plugin)` works from `makeContext`, before `init()`.
|
|
59
64
|
- Call `appendPlanningService` BEFORE any `ensurePlanningService`: `ensure` registers a default
|
|
60
65
|
host when none exists, and a later `append` replaces it together with whatever was `use`d on it.
|
|
61
|
-
-
|
|
62
|
-
with no scope argument on any method.
|
|
66
|
+
- **The facade:** `ctx.service<PlanningHostService>(PLANNING_SERVICE).for({ entityId, profileId?,
|
|
67
|
+
channel?, actor? })` → a `PlanningFacade` with no scope argument on any method. That form works
|
|
68
|
+
however the service was registered. `ctx.planning()` is only a shortcut that `appendPlanningService`
|
|
69
|
+
/ `appendPostgresPlanning` install (typed `WithPlanningService`); a context that registered
|
|
70
|
+
`makePlanningService()` / `makePostgresPlanningService()` as a plain service — a generated target's
|
|
71
|
+
`services/planning.ts` — has no `ctx.planning` at all. In a request handler use
|
|
72
|
+
`planningHandlerOf(ctx).planningFor(req)`: the entity comes from `makeEntityScope(req).requireEntityKey()`, never the token.
|
|
73
|
+
|
|
74
|
+
## Creating and reading a card
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
import { IntrinsicStatus, PLANNING_SERVICE, TransitionAction, WorkcardKind } from '@owlmeans/planning'
|
|
78
|
+
import type { PlanningHostService } from '@owlmeans/server-planning'
|
|
79
|
+
|
|
80
|
+
const planning = ctx.service<PlanningHostService>(PLANNING_SERVICE).for({ entityId, profileId })
|
|
81
|
+
|
|
82
|
+
const shed = await planning.execute({
|
|
83
|
+
action: TransitionAction.Create,
|
|
84
|
+
card: { kind: WorkcardKind.Project, type: 'shed:shed', title: 'Maple Street shed' },
|
|
85
|
+
}, { wait: true })
|
|
86
|
+
const drill = await planning.execute({
|
|
87
|
+
action: TransitionAction.Create,
|
|
88
|
+
card: { kind: WorkcardKind.Card, type: 'shed:tool', parent: shed.card!.id!, title: 'Cordless drill',
|
|
89
|
+
fields: { brand: 'Acme' } },
|
|
90
|
+
}, { wait: true }) // drill.card — the committed record, status 'available'
|
|
91
|
+
|
|
92
|
+
await planning.cards.get(drill.card!.id!)
|
|
93
|
+
await planning.cards.list({ parent: shed.card!.id!, type: 'shed:tool' })
|
|
94
|
+
await planning.execute({ action: TransitionAction.Transit, card: drill.card!.id!, transition: 'lend' }, { wait: true })
|
|
95
|
+
|
|
96
|
+
// A card type and a flow as DATA, scoped to this shed — `definitions` exists only where the store
|
|
97
|
+
// keeps schemas (planning-postgres; the memory store with `schemas: true`), and the shed's cards may
|
|
98
|
+
// use them when its project type says `scopedCardTypes: true` (or lists the type in `cardTypes`).
|
|
99
|
+
await planning.definitions!.define({
|
|
100
|
+
flows: [{
|
|
101
|
+
id: 'shed:repair', version: 1, label: 'Repair',
|
|
102
|
+
statuses: [
|
|
103
|
+
{ key: 'reported', intrinsic: IntrinsicStatus.Planned, initial: true, label: 'Reported' },
|
|
104
|
+
{ key: 'fixed', intrinsic: IntrinsicStatus.Closed, terminal: true, label: 'Fixed' },
|
|
105
|
+
],
|
|
106
|
+
transitions: [{ name: 'fix', from: ['reported'], to: 'fixed', label: 'Mark fixed', explicit: true }],
|
|
107
|
+
}],
|
|
108
|
+
types: [{
|
|
109
|
+
type: 'shed:repair', kind: WorkcardKind.Card, version: 1, label: 'Repair ticket',
|
|
110
|
+
fields: { type: 'object', properties: { tool: { type: 'string' } }, additionalProperties: false },
|
|
111
|
+
flows: ['shed:repair'], specifications: [],
|
|
112
|
+
}],
|
|
113
|
+
}, { project: shed.card!.id! })
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
| Wrong | What happens | Right |
|
|
117
|
+
|---|---|---|
|
|
118
|
+
| `execute({ action, draft: { … } })` | refused: `planning:malformed:create-without-draft` | the draft goes under `card` |
|
|
119
|
+
| `execute({ …, wait: true })` | in process the key is ignored: the receipt returns before the commit, with no `card` — hidden while an inline-folding store (`planning-postgres`) lands at once, exposed the first time another process holds the card's fold | `execute({ … }, { wait: true })` — only the wire body (`ExecuteRequest`) carries `wait` inside |
|
|
120
|
+
| `ctx.planning().for(…)` in a target | `ctx.planning is not a function` | `ctx.service<PlanningHostService>(PLANNING_SERVICE).for(…)` |
|
|
121
|
+
| `{ id, name: 'Repair', … }` on a flow, `{ key, name, … }` on a type | `define` refuses with `SchemaInvalid` (closed schemas); a code plugin's registry does not validate, so the key is silently dropped | a flow's key is `id`, a type's is `type`, the display name is `label` on both |
|
|
122
|
+
| `action: 'create'` | a type error — `TransitionAction` is an enum | `action: TransitionAction.Create` |
|
|
123
|
+
|
|
124
|
+
Every wrong form is a compile error against the typed facade (`PlanningFacade`,
|
|
125
|
+
`TransitionExecution`, `WorkcardTypeSchema`); it reaches run time only through a helper or a context
|
|
126
|
+
typed `any`, so never type one that way. `tests/create-example.spec.ts` runs this example and each
|
|
127
|
+
wrong form as written.
|
|
63
128
|
|
|
64
129
|
## The executor, step by step
|
|
65
130
|
|
|
66
131
|
Nothing is appended before step 11 — every refusal leaves the log untouched.
|
|
67
132
|
|
|
68
|
-
1. **Normalize** — deep copy, trimmed text, `parents ∋ parent` (first)
|
|
133
|
+
1. **Normalize** — deep copy, trimmed text, `parents ∋ parent` (first); a create's draft without
|
|
134
|
+
`createdBy` gets `creatorHelper.creatorOf(scope)` (below).
|
|
69
135
|
2. **Scope** — `entityId` must be present.
|
|
70
136
|
3. **Idempotency** — a `key` already in the entity's log answers ITS receipt, before any
|
|
71
137
|
validation or middleware.
|
|
72
|
-
4. **Resolve** — the card (`WorkcardNotFound`; another entity's card is `PlanningScopeMismatch
|
|
73
|
-
its type and flow, every draft parent
|
|
74
|
-
`
|
|
138
|
+
4. **Resolve** — the card (`WorkcardNotFound`; another entity's card is `PlanningScopeMismatch`;
|
|
139
|
+
one outside the scope's `projects` is `WorkcardNotFound`), its type and flow, every draft parent
|
|
140
|
+
(`ParentNotFound` — loaded through the facade, so an invisible parent is absent) and the parent
|
|
141
|
+
project's `cardTypes`/`projectTypes` (`CardTypeNotAllowed`), the specification slot. Where the
|
|
142
|
+
default store holds data-defined schemas, the card's project is found first and everything
|
|
143
|
+
after reads that project's resolved layer (`Resolved.schemas`): a data-defined type of a
|
|
144
|
+
project with `scopedCardTypes` is admitted, a retired type creates nothing
|
|
145
|
+
(`UnknownWorkcardType('retired:…')`). Without the port `Resolved.schemas` IS the code registry.
|
|
75
146
|
5. **`before` chain** — in plugin order; re-resolved once when it changed the card, type or parent.
|
|
76
147
|
6. **Validate** — shape (`planning:malformed:*`), the flow rule (`IllegalTransition`), immutables
|
|
77
|
-
(`planning:immutable
|
|
148
|
+
(`planning:immutable:*`, `createdBy` among them — `creatorHelper.assertCreatorFixed`), merged `fields` (`FieldsInvalid`), labels (`LabelNotAllowed`), a moved
|
|
78
149
|
parent, the slot (`SpecificationSlotUnknown`, `SpecificationRevisionConflict`, JSON body schema
|
|
79
150
|
→ `FieldsInvalid`), relationships (`RelationshipRefused`: undeclared type, `from` not the card,
|
|
80
151
|
missing target, type constraints, `single`, unlinking an absent edge).
|
|
81
|
-
7. **Card id** — `store.newId?.() ?? options.ids?.() ?? uuid()`. Ids are the store's.
|
|
152
|
+
7. **Card id** — `store.newId?.() ?? options.ids?.() ?? idHelper.uuid()`. Ids are the store's.
|
|
82
153
|
8. **Code** — a supplied code is checked; else the plugins' `mintCode` (first answer wins, checked);
|
|
83
154
|
else the type's `CodePolicy` (a slug policy derives from the title) → `CodeTaken`.
|
|
84
|
-
9. **Changes** — `computeChanges`. An `update` that changes nothing answers the card's latest
|
|
155
|
+
9. **Changes** — `changesHelper.computeChanges`. An `update` that changes nothing answers the card's latest
|
|
85
156
|
receipt and appends nothing.
|
|
86
157
|
10. **Seq** — `transitions.nextSeq(card, expectSeq)`, a CAS against `head` (`WorkcardConflict`).
|
|
87
158
|
11. **Append** — `commit: pending`. A lost race on the key answers the winner's receipt.
|
|
@@ -92,6 +163,17 @@ Nothing is appended before step 11 — every refusal leaves the log untouched.
|
|
|
92
163
|
`actor` is the SCOPE's: `profileId`/`userId`/`service`/`channel` come from the scope only; an
|
|
93
164
|
in-process caller may add `agent`/`runId` on the execution. A handler never passes a wire `actor`.
|
|
94
165
|
|
|
166
|
+
A create's `createdBy` is the scope's subject too — `creatorHelper.creatorOf(scope)`: `profileId`, else `userId`,
|
|
167
|
+
else the same two of `scope.actor`. The executor stamps it on every path, so an in-process facade
|
|
168
|
+
create and the HTTP `execute` produce the same owner. An in-process draft that names `createdBy`
|
|
169
|
+
keeps it (explicit wins — a manager creating on someone's behalf); a scope naming nobody (a service
|
|
170
|
+
or system scope) leaves it unset; the wire drops a draft's `createdBy` before the stamp.
|
|
171
|
+
|
|
172
|
+
`createdBy` never moves after the create (the rule is `planning` → The record model). The executor
|
|
173
|
+
enforces it itself with `creatorHelper.assertCreatorFixed` at step 6, after the `before` chain, so a wire body, an
|
|
174
|
+
in-process caller and a plugin are refused alike, whatever `@owlmeans/planning` build the host
|
|
175
|
+
resolves. The conformance suite checks a store folds a stored row naming it as the pure fold does.
|
|
176
|
+
|
|
95
177
|
## Idempotency and `expectSeq`
|
|
96
178
|
|
|
97
179
|
- Give every retried or replayed write a `key` (`import:<source>:<n>`). The key is unique per entity
|
|
@@ -125,11 +207,15 @@ the store; `bind` replaces the listener, so a store has exactly one.
|
|
|
125
207
|
|
|
126
208
|
## The memory store
|
|
127
209
|
|
|
128
|
-
`makeMemoryPlanningStore({ sync?, ids?, now?, seed?, onCommitted?, alias? })`
|
|
210
|
+
`makeMemoryPlanningStore({ sync?, ids?, now?, seed?, onCommitted?, alias?, schemas? })`
|
|
129
211
|
|
|
130
212
|
- Cards and projects in one map, specifications in their own, relationships in a third; every read
|
|
131
213
|
goes through the `@owlmeans/resource` query engine. A card list includes specifications only when
|
|
132
|
-
the criteria asks for `kind: specification` or a `category
|
|
214
|
+
the criteria asks for `kind: specification` or a `category` (`wantsSpecifications`, the rule every
|
|
215
|
+
store routes by).
|
|
216
|
+
- `schemas: true` adds the data-defined schema port (records per layer, a revision per
|
|
217
|
+
organization, synchronous `watch`); off by default — without it every type and flow resolves
|
|
218
|
+
from code.
|
|
133
219
|
- `sync` (default) folds, publishes and runs `committed` inside `project()`, serialized per card.
|
|
134
220
|
`sync: false` folds nothing until `flush(card?)` — a queued store's shape, for tests that need a
|
|
135
221
|
commit to stay pending.
|
|
@@ -144,8 +230,8 @@ the store; `bind` replaces the listener, so a store has exactly one.
|
|
|
144
230
|
answers the id format the host's references need (ObjectId hex for Mongo).
|
|
145
231
|
- `transitions.list` treats `sinceSeq` as `seq > sinceSeq`; `nextSeq` is the CAS against `head` and
|
|
146
232
|
answers 1 for a card that has no log.
|
|
147
|
-
- The projection body is `foldPending(store, cardId, entityId, { onCommitted, publish, touch, limit })`:
|
|
148
|
-
it applies pending transitions with `applyTransition` only, marks each committed or failed,
|
|
233
|
+
- The projection body is `foldHelper.foldPending(store, cardId, entityId, { onCommitted, publish, touch, limit })`:
|
|
234
|
+
it applies pending transitions with `applyHelper.applyTransition` only, marks each committed or failed,
|
|
149
235
|
publishes, then runs `onCommitted`. The caller owns single flight per card. Strip `record` from
|
|
150
236
|
the event before a cross-process bus.
|
|
151
237
|
- **A failed transition never blocks the card.** The fold marks it `failed`, publishes a failed
|
|
@@ -153,13 +239,26 @@ the store; `bind` replaces the listener, so a store has exactly one.
|
|
|
153
239
|
it was, and the next transition folds normally. Without that, every later transition fails as
|
|
154
240
|
out of order and the card is stuck for good. Only two cases stop short: a failed `create` leaves
|
|
155
241
|
no card to advance, and a store that refuses the advancing write stops the fold with `followUp`,
|
|
156
|
-
leaving the rest pending for a retry. `revisionsFromLog` replays past failed transitions the same
|
|
242
|
+
leaving the rest pending for a retry. `foldHelper.revisionsFromLog` replays past failed transitions the same
|
|
157
243
|
way.
|
|
158
|
-
-
|
|
244
|
+
- A transactional store passes `FoldOptions.unit` — it wraps each transition's writes (a
|
|
245
|
+
savepoint), so a write the database refuses is undone whole and the fold marks that transition
|
|
246
|
+
failed and goes past it. `foldHelper.foldPending` folds PAST a failure it produces; a row that is ALREADY
|
|
247
|
+
failed at the cursor, or a gap in the seqs, is the store's to step over before calling it
|
|
248
|
+
(`planning-postgres` does it in a prelude).
|
|
249
|
+
- `foldHelper.failPending` is what a dead projection job must do, or waiters hang to their timeout.
|
|
250
|
+
- The data-defined schema port (`schemas`) is optional; `makeCompositeStore` passes the default
|
|
251
|
+
store's through. A store that has it must purge a project's layer with the project.
|
|
252
|
+
- **Run the conformance suite.** `@owlmeans/server-planning/conformance` exports
|
|
253
|
+
`planningConformance` — named cases with no test runner inside (each throws
|
|
254
|
+
`ConformanceFailure`) — and `conformanceCasesFor(store)`, which drops the data-defined cases for a
|
|
255
|
+
store without the port. Boot a service with `planningConformancePlugin` and `conformanceClock()`
|
|
256
|
+
and hand each case `{ service, store, facade }`; every case works in its own organization, so one
|
|
257
|
+
boot serves them all.
|
|
159
258
|
- `makeCommitHub({ status, remember?, ladder? })` is the `CommitSource`: feed `publish` from the bus,
|
|
160
259
|
answer `status` from transition rows. `wait` subscribes first, polls once, then climbs the ladder.
|
|
161
|
-
- `revisionsFromLog(transitions, limit?)` answers `specs.revisions`.
|
|
162
|
-
- `makeProjectionProcessor(ctx)` + `
|
|
260
|
+
- `foldHelper.revisionsFromLog(transitions, limit?)` answers `specs.revisions`.
|
|
261
|
+
- `makeProjectionProcessor(ctx)` + `makePlanningQueueHooks(ctx)` are the store-agnostic job body and
|
|
163
262
|
`onJobDead`; a store with an admission CAS wraps its own around them.
|
|
164
263
|
|
|
165
264
|
## A foreign provider
|
|
@@ -180,24 +279,142 @@ mapping external records (`mappers`) belongs to that plugin's own store adapter.
|
|
|
180
279
|
|
|
181
280
|
## Scope and security
|
|
182
281
|
|
|
183
|
-
- `entityId` is `
|
|
184
|
-
can never replace the entity. `actor` and a create's `createdBy` come
|
|
185
|
-
body.
|
|
282
|
+
- Without `opts.access`: `entityId` is `makeEntityScope(req).requireEntityKey()`; `opts.scope(req, ctx)` adds a
|
|
283
|
+
`channel` or `service` and can never replace the entity. `actor` and a create's `createdBy` come
|
|
284
|
+
from the request, never the body (`executionHelper.wireExecution` drops a draft's claim, `creatorHelper.withCreator` stamps the
|
|
285
|
+
subject, `creatorHelper.assertCreatorFixed` refuses a body naming `createdBy` — an update never re-owns a card).
|
|
286
|
+
- The organization of a scope is the one the request ACTS IN. `makeEntityScope(req).requireEntityKey()` answers
|
|
287
|
+
`req.entity.id`, the stable record id (the token's `entitySlug` only where no entity resolver is
|
|
288
|
+
registered). Behind an OIDC relying party (`@owlmeans/server-oidc-rp`) the acting organization is
|
|
289
|
+
session state: the guard attaches `req.entity` with `id` = the organization claim's frozen
|
|
290
|
+
`entityKey`, so the tenant key survives a rename and follows a switch. Take it in the handler and
|
|
291
|
+
pass it down; never read it from the context or from a body.
|
|
186
292
|
- Another entity's card, specification or transition answers `WorkcardNotFound` — the same as an
|
|
187
|
-
absent id — on reads and writes alike (`concealed`).
|
|
188
|
-
- Queries arrive in their wire form and are decoded with `decode*Query` before `criteriaOf`, which
|
|
293
|
+
absent id — on reads and writes alike (`guardHelper.concealed`).
|
|
294
|
+
- Queries arrive in their wire form and are decoded with `wireHelper.decode*Query` before `queryHelper.criteriaOf`, which
|
|
189
295
|
always adds the scope's `entityId`.
|
|
190
296
|
|
|
297
|
+
### The access resolver
|
|
298
|
+
|
|
299
|
+
`opts.access: (req, ctx) => Promise<{ entityId, projects?, writes?, grants? }>` is the hosting app's
|
|
300
|
+
decision per request; a throw is the request's answer (an `AuthForbidden` answers 403).
|
|
301
|
+
|
|
302
|
+
- `entityId` is the resolver's — never the token's, never `opts.scope`'s.
|
|
303
|
+
- `projects` becomes `PlanningScope.projects`, which the server facade enforces on reads and
|
|
304
|
+
writes. A card is visible when at least one project reached through its recursive parent paths
|
|
305
|
+
is allowed; specifications follow their containing cards. Anything else reads as absent
|
|
306
|
+
(`WorkcardNotFound`, `null`, an empty list); a create under an invisible parent is
|
|
307
|
+
`ParentNotFound`. Links, transitions and commits use current endpoint/card ancestry, with a
|
|
308
|
+
cached project fallback only for purged records. Subscriptions and commit waits enforce the
|
|
309
|
+
same visibility.
|
|
310
|
+
- **Narrowed lists, counts and summaries use the allowed recursive descendant IDs before paging.**
|
|
311
|
+
A specification is admitted through the same containing-card hierarchy as a single read.
|
|
312
|
+
Do not replace this with a direct-parent query or a filter applied after pagination.
|
|
313
|
+
`tests/narrowing.spec.ts` and shared hierarchy conformance pin this behavior.
|
|
314
|
+
- A person who may see only SOME projects of their organization (a tool-shed volunteer given one
|
|
315
|
+
shed) is expressed here: the resolver answers the project ids the person's grants list as
|
|
316
|
+
`projects`, and omits the key when a grant covers every project — never a hand-written filter in
|
|
317
|
+
each handler.
|
|
318
|
+
- `writes` is the subset of projects the person may WRITE in (`projects` are the ones they VIEW).
|
|
319
|
+
`execute` on a card, specification or link needs it to be writable — the recursive ancestor
|
|
320
|
+
rule over `writes`: a card admitted directly or through a writable parent path. A create needs
|
|
321
|
+
every named parent writable; reparenting checks every supplied destination parent. A create at the root
|
|
322
|
+
(no parent, not a project) is refused. `schema.define` of a project layer needs the project in
|
|
323
|
+
`writes`. A refusal is `PlanningForbidden` (403, `forbidden:writes:<id>`), checked before the grants
|
|
324
|
+
and before the executor. NOT governed by it: a project create (`grants.createProjects` alone) and
|
|
325
|
+
the organization layer (`grants.defineSchemas`). A card the scope cannot see is still answered
|
|
326
|
+
as absent by the executor. Omitted — every visible project is writable.
|
|
327
|
+
`tests/writes.spec.ts` pins viewer, writer and omitted.
|
|
328
|
+
- `grants` gates the stock handlers' writes: `createProjects` (a project create — `true` for the
|
|
329
|
+
root, a list names the parent projects), `deleteProjects` (the delete of a project card — a list
|
|
330
|
+
names the projects), `defineSchemas` (`schema.define` — `true` for the organization's layer, a
|
|
331
|
+
list names project layers). A `grants` object refuses every flag it leaves out with
|
|
332
|
+
`PlanningForbidden` (403); no `grants` gates nothing. In-process facade writes are not gated.
|
|
333
|
+
|
|
334
|
+
## Mounting in a target
|
|
335
|
+
|
|
336
|
+
The api half of the target mount (the common tree and the kit literals: `planning` → Mounting in a
|
|
337
|
+
target).
|
|
338
|
+
|
|
339
|
+
- Bind `servePlanningEntrypoints(tree, { access })` WITHOUT the commit socket —
|
|
340
|
+
`.filter(entrypoint => entrypoint.protocol !== tree.commit.events)`: nothing authenticates a
|
|
341
|
+
target's socket after it opens, so the client long-polls (`commit.get` with `wait`, `execute`
|
|
342
|
+
with `wait: true`). Never write card, transition or schema routes beside it.
|
|
343
|
+
- The resolver maps container permissions onto the access: `projects` = the containers the person
|
|
344
|
+
may view, `writes` = those they may modify, `grants` = `createProjects` / `deleteProjects` /
|
|
345
|
+
`defineSchemas` from their create and admin rights. A creator sees what they created — stamp
|
|
346
|
+
ownership in a `before` hook and add the card to both lists.
|
|
347
|
+
|
|
348
|
+
## Data-defined types and flows
|
|
349
|
+
|
|
350
|
+
Where the default store has the schema port, `runtime.schemasFor(entityId, project?)` answers the
|
|
351
|
+
resolved layer (`scopedSchemaHelper.resolveScopedBundle` over the code bundle and the organization's and project's
|
|
352
|
+
records), cached per (organization, project) and keyed by the store's `revision()` and the plugin
|
|
353
|
+
registry's version — a write anywhere moves the revision the next lookup reads, so a cached layer is
|
|
354
|
+
never stale; a store's `watch` evicts early. Without the port it answers the code registry itself.
|
|
355
|
+
`makeDefinitions` gives the facade `definitions`: every write checks the project (a project card the
|
|
356
|
+
scope can see), the seal, the closed-form checks (a type's flows resolve in its layer, counting flows
|
|
357
|
+
written beside it), then the store's compare-and-set. `retire` of a flow refuses with `SchemaInUse`
|
|
358
|
+
while a live type of the layer — or of any project layer, for an organization record — still runs
|
|
359
|
+
it. `facade.model(card)` builds over the layer of the card's own project, and `schema.list` answers
|
|
360
|
+
the scoped bundle (`?project=`) where `definitions` exists, the code bundle otherwise.
|
|
361
|
+
|
|
191
362
|
## Testing
|
|
192
363
|
|
|
193
364
|
Category A. Build one real context with `makeBasicContext` + `appendPlanningService({ store:
|
|
194
365
|
makeMemoryPlanningStore({ now }), plugins: [fixtures] })`, and run a handler through
|
|
195
366
|
`handler.bind({ ref: { ctx } })(req, res)` with a request carrying `auth` and `entity`. A monotonic
|
|
196
367
|
`now` keeps log order deterministic; `sync: false` + `flush()` pins pending and hook-count cases.
|
|
368
|
+
`tests/conformance.spec.ts` runs the conformance suite against the memory store with and without
|
|
369
|
+
`schemas: true`; a durable store's own tests run the same cases against a real database.
|
|
370
|
+
|
|
371
|
+
## Auxiliary resources and hierarchy admission
|
|
372
|
+
|
|
373
|
+
`facade.assignees`, `.teams`, `.comments`, `.mentions` use native versioned ports of
|
|
374
|
+
`PlanningStore`. The stock memory, PostgreSQL and Mongo stores implement them. Mutations run
|
|
375
|
+
inside the store's organization `unit`; CAS, nickname/authentication uniqueness, schema layers,
|
|
376
|
+
canonical links and mentions are validated there. Missing ports raise `PlanningUnsupported`. Assignee type changes recheck incoming typed card
|
|
377
|
+
references against the proposed type; a change cannot invalidate a persisted assignment.
|
|
378
|
+
Do not add a second host-specific planning resource CRUD layer.
|
|
379
|
+
|
|
380
|
+
`assignees.list({ retired: false })` means every identity not explicitly retired, including
|
|
381
|
+
records with an absent or null retirement flag. The facade translates it to `{ retired: { $ne: true } }`
|
|
382
|
+
before the native port reads; `retired: true` selects historical identities and an omitted filter
|
|
383
|
+
retains both. Keep this predicate consistent with client mirrors and run its shared conformance
|
|
384
|
+
case against memory, PostgreSQL and Mongo; a bare equality to false hides newly created identities.
|
|
385
|
+
|
|
386
|
+
The request scope supplies trusted `assigneeId` for comment authors and optional
|
|
387
|
+
`defaultAssigneeId` for newly created cards. HTTP handlers stamp actor/organization context;
|
|
388
|
+
`makePlanningAuth(...).scopeFor` resolves OwlMeans identities when that integration is enabled.
|
|
389
|
+
Access resolvers can grant `manageAssignees` and `manageTeams` separately from card writes.
|
|
390
|
+
Comments and project/team attachment require writable containing cards/projects. Auxiliary
|
|
391
|
+
organization lists require authenticated organization scope; do not infer ACLs from project mode.
|
|
392
|
+
|
|
393
|
+
All stock HTTP replies use `guardHelper.reply`, which conceals scope failures and applies the
|
|
394
|
+
typed planning reply projection. Socket commits use the same projection. Organization `entityId`
|
|
395
|
+
stays in native records and verified scopes, and never leaves through records, schema scopes or
|
|
396
|
+
nested receipts. Keep business fields and schema definitions unchanged when projecting replies.
|
|
397
|
+
|
|
398
|
+
Admission and native projection recheck hierarchy, schema fields and endpoint types. Recursive
|
|
399
|
+
visibility follows every project ancestor and filters before paging. Definition record reads
|
|
400
|
+
use the same recursive visibility as cards. Reparenting validates all
|
|
401
|
+
descendants under the prospective schema layer. Ordinary parent deletion refuses existing
|
|
402
|
+
children; project purge removes its descendants, comments, mentions, scoped schemas and links,
|
|
403
|
+
while retaining organization assignees and reusable teams. Field-backed edges are reconciled in
|
|
404
|
+
the persistence unit; named inverse edges are derived read views, never duplicate persisted rows.
|
|
405
|
+
|
|
406
|
+
Run shared conformance with `resources` and `schemas` capabilities against each native provider;
|
|
407
|
+
cover version races, stable mentions, reusable teams, field references, hierarchy and narrowed ACLs.
|
|
408
|
+
|
|
197
409
|
|
|
198
410
|
## Related
|
|
199
411
|
|
|
200
412
|
- `planning` — records, flows, the fold, the query language, the protocol tree, the models
|
|
201
413
|
- `client-planning` — the remote facade and the state mirror that talk to these handlers
|
|
414
|
+
- `planning-postgres` — the durable Postgres store built from these pieces
|
|
202
415
|
- `server-job`, `queue` — the declare/serve/feed pattern and the projection queue
|
|
203
416
|
- `resource` — the criteria engine every memory read goes through
|
|
417
|
+
|
|
418
|
+
Project purge uses current card ancestry as ownership. A surviving reparented card retains its
|
|
419
|
+
complete transition history, documents and edges even when their cached project id names its former
|
|
420
|
+
project. Cached project values may select orphaned records, but must never delete surviving records.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type PlanningDefinitions, type SchemaDefineReply, type SchemaDefineRequest } from '@owlmeans/planning';
|
|
2
|
+
/**
|
|
3
|
+
* Apply one `schema.define` request to a facade's definitions: the declarations in the request's
|
|
4
|
+
* mode (flows before types), then the retirements — answering what was written and the layer as it
|
|
5
|
+
* resolves afterwards.
|
|
6
|
+
*/
|
|
7
|
+
export declare const applySchemaRequest: (definitions: PlanningDefinitions, request: SchemaDefineRequest) => Promise<SchemaDefineReply>;
|
|
8
|
+
//# sourceMappingURL=apply-schema-request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-schema-request.d.ts","sourceRoot":"","sources":["../../src/actions/apply-schema-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,KAAK,mBAAmB,EAA2B,MAAM,oBAAoB,CAAA;AAEzJ;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,gBAChB,mBAAmB,WAAW,mBAAmB,KAC7D,OAAO,CAAC,iBAAiB,CA0B3B,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SchemaWriteMode } from '@owlmeans/planning';
|
|
2
|
+
/**
|
|
3
|
+
* Apply one `schema.define` request to a facade's definitions: the declarations in the request's
|
|
4
|
+
* mode (flows before types), then the retirements — answering what was written and the layer as it
|
|
5
|
+
* resolves afterwards.
|
|
6
|
+
*/
|
|
7
|
+
export const applySchemaRequest = async (definitions, request) => {
|
|
8
|
+
const layer = request.project != null ? { project: request.project } : {};
|
|
9
|
+
const declarations = { types: request.types ?? [], flows: request.flows ?? [], assigneeTypes: request.assigneeTypes ?? [] };
|
|
10
|
+
const records = [];
|
|
11
|
+
switch (request.mode ?? SchemaWriteMode.Define) {
|
|
12
|
+
case SchemaWriteMode.Put:
|
|
13
|
+
for (const schema of declarations.assigneeTypes)
|
|
14
|
+
records.push(await definitions.putAssigneeType(schema));
|
|
15
|
+
for (const flow of declarations.flows) {
|
|
16
|
+
records.push(await definitions.putFlow(flow, layer));
|
|
17
|
+
}
|
|
18
|
+
for (const type of declarations.types) {
|
|
19
|
+
records.push(await definitions.putType(type, layer));
|
|
20
|
+
}
|
|
21
|
+
break;
|
|
22
|
+
case SchemaWriteMode.Seed:
|
|
23
|
+
records.push(...await definitions.seed(declarations, layer));
|
|
24
|
+
break;
|
|
25
|
+
default:
|
|
26
|
+
records.push(...await definitions.define(declarations, layer));
|
|
27
|
+
}
|
|
28
|
+
for (const key of request.retire ?? []) {
|
|
29
|
+
records.push(await definitions.retire(key.kind, key.key, layer));
|
|
30
|
+
}
|
|
31
|
+
return { records, bundle: await definitions.bundle(request.project) };
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=apply-schema-request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-schema-request.js","sourceRoot":"","sources":["../../src/actions/apply-schema-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAuG,MAAM,oBAAoB,CAAA;AAEzJ;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EACrC,WAAgC,EAAE,OAA4B,EAClC,EAAE;IAC9B,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;IACzE,MAAM,YAAY,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,EAAE,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,IAAI,EAAE,EAAE,CAAA;IAC3H,MAAM,OAAO,GAAyB,EAAE,CAAA;IAExC,QAAQ,OAAO,CAAC,IAAI,IAAI,eAAe,CAAC,MAAM,EAAE,CAAC;QAC/C,KAAK,eAAe,CAAC,GAAG;YACtB,KAAK,MAAM,MAAM,IAAI,YAAY,CAAC,aAAa;gBAAE,OAAO,CAAC,IAAI,CAAC,MAAM,WAAW,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAA;YACxG,KAAK,MAAM,IAAI,IAAI,YAAY,CAAC,KAAK,EAAE,CAAC;gBACtC,OAAO,CAAC,IAAI,CAAC,MAAM,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAA;YACtD,CAAC;YACD,KAAK,MAAM,IAAI,IAAI,YAAY,CAAC,KAAK,EAAE,CAAC;gBACtC,OAAO,CAAC,IAAI,CAAC,MAAM,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAA;YACtD,CAAC;YACD,MAAK;QACP,KAAK,eAAe,CAAC,IAAI;YACvB,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAA;YAC5D,MAAK;QACP;YACE,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,WAAW,CAAC,MAAM,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAA;IAClE,CAAC;IACD,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC;QACvC,OAAO,CAAC,IAAI,CAAC,MAAM,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAA;IAClE,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAA;AACvE,CAAC,CAAA"}
|