@owlmeans/server-planning 0.1.18-rc.21 → 0.1.18-rc.23
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 +24 -17
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/server-planning/SKILL.md +28 -28
- 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 +31 -0
- package/build/actions/apply-schema-request.js.map +1 -0
- package/build/actions/cards.d.ts +5 -3
- package/build/actions/cards.d.ts.map +1 -1
- package/build/actions/cards.js +1 -1
- package/build/actions/cards.js.map +1 -1
- 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 +8 -28
- package/build/actions/execute.d.ts.map +1 -1
- package/build/actions/execute.js +17 -101
- 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 +79 -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/schemas.d.ts +5 -3
- package/build/actions/schemas.d.ts.map +1 -1
- package/build/actions/schemas.js.map +1 -1
- package/build/actions/specs.d.ts +4 -2
- package/build/actions/specs.d.ts.map +1 -1
- package/build/actions/specs.js.map +1 -1
- 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 +5 -3
- package/build/actions/types.d.ts.map +1 -1
- package/build/actions/watch.d.ts +2 -2
- package/build/actions/watch.d.ts.map +1 -1
- package/build/actions/watch.js +2 -2
- 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 +8 -13
- package/build/conformance/assert.d.ts.map +1 -1
- package/build/conformance/assert.js +41 -43
- package/build/conformance/assert.js.map +1 -1
- package/build/conformance/cases.d.ts.map +1 -1
- package/build/conformance/cases.js +86 -67
- package/build/conformance/cases.js.map +1 -1
- 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 +3 -1
- package/build/conformance/consts.d.ts.map +1 -1
- package/build/conformance/consts.js +84 -1
- package/build/conformance/consts.js.map +1 -1
- 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 +8 -8
- package/build/conformance/fixtures.d.ts.map +1 -1
- package/build/conformance/fixtures.js +24 -107
- package/build/conformance/fixtures.js.map +1 -1
- package/build/conformance/index.d.ts +3 -0
- package/build/conformance/index.d.ts.map +1 -1
- package/build/conformance/index.js +1 -0
- package/build/conformance/index.js.map +1 -1
- package/build/definitions.d.ts.map +1 -1
- package/build/definitions.js +9 -9
- package/build/definitions.js.map +1 -1
- 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/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 +6 -25
- package/build/executor/creator.d.ts.map +1 -1
- package/build/executor/creator.js +26 -41
- package/build/executor/creator.js.map +1 -1
- 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 +4 -41
- package/build/executor/resolve.d.ts.map +1 -1
- package/build/executor/resolve.js +142 -157
- package/build/executor/resolve.js.map +1 -1
- package/build/executor/types.d.ts +0 -2
- package/build/executor/types.d.ts.map +1 -1
- package/build/executor/validate.d.ts +1 -1
- package/build/executor/validate.d.ts.map +1 -1
- package/build/executor/validate.js +16 -15
- package/build/executor/validate.js.map +1 -1
- package/build/executor.d.ts +4 -3
- package/build/executor.d.ts.map +1 -1
- package/build/executor.js +18 -17
- package/build/executor.js.map +1 -1
- package/build/facade.d.ts.map +1 -1
- package/build/facade.js +16 -16
- package/build/facade.js.map +1 -1
- package/build/helper.d.ts +1 -6
- package/build/helper.d.ts.map +1 -1
- package/build/helper.js +3 -8
- package/build/helper.js.map +1 -1
- package/build/projection.d.ts +2 -0
- package/build/projection.d.ts.map +1 -1
- package/build/projection.js +6 -4
- package/build/projection.js.map +1 -1
- 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 +1 -4
- package/build/queue/index.d.ts.map +1 -1
- package/build/queue/index.js +1 -4
- package/build/queue/index.js.map +1 -1
- package/build/store/composite.d.ts.map +1 -1
- package/build/store/composite.js +2 -2
- package/build/store/composite.js.map +1 -1
- 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 +7 -30
- package/build/store/fold.d.ts.map +1 -1
- package/build/store/fold.js +185 -203
- 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.map +1 -1
- package/build/store/memory.js +0 -0
- package/build/store/memory.js.map +1 -1
- package/build/store/types.local.d.ts +3 -1
- package/build/store/types.local.d.ts.map +1 -1
- package/build/types.d.ts +2 -1
- package/build/types.d.ts.map +1 -1
- 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 +21 -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 +33 -31
- 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 -1
- 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 +10 -43
- package/build/utils/scope.d.ts.map +1 -1
- package/build/utils/scope.js +21 -99
- package/build/utils/scope.js.map +1 -1
- package/package.json +18 -18
- package/src/actions/apply-schema-request.ts +35 -0
- package/src/actions/commit.ts +7 -5
- package/src/actions/define-schemas.ts +34 -0
- package/src/actions/execute.ts +30 -115
- package/src/actions/execution/types.ts +34 -0
- package/src/actions/execution.ts +96 -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/{specs.ts → list-specification-revisions.ts} +4 -11
- package/src/actions/summarize-cards.ts +15 -0
- package/src/actions/transitions.ts +6 -4
- package/src/actions/types.ts +4 -3
- package/src/actions/watch.ts +4 -3
- package/src/conformance/assert/types.ts +16 -0
- package/src/conformance/assert.ts +49 -41
- package/src/conformance/cases.ts +88 -67
- package/src/conformance/clock.ts +11 -0
- package/src/conformance/consts.ts +87 -1
- package/src/conformance/errors.ts +7 -0
- package/src/conformance/fixtures/types.ts +11 -0
- package/src/conformance/fixtures.ts +32 -107
- package/src/conformance/index.ts +3 -0
- package/src/definitions.ts +9 -9
- package/src/executor/changes/types.ts +38 -0
- package/src/executor/changes.ts +48 -63
- package/src/executor/code/types.ts +23 -0
- package/src/executor/code.ts +60 -61
- package/src/executor/creator/types.ts +33 -0
- package/src/executor/creator.ts +33 -41
- package/src/executor/resolve/types.ts +30 -0
- package/src/executor/resolve.ts +153 -167
- package/src/executor/types.ts +0 -3
- package/src/executor/validate.ts +17 -16
- package/src/executor.ts +20 -17
- package/src/facade.ts +16 -16
- package/src/helper.ts +3 -8
- package/src/projection.ts +8 -4
- package/src/queue/declare.ts +7 -0
- package/src/queue/index.ts +1 -8
- package/src/store/composite.ts +2 -2
- package/src/store/fold/types.ts +44 -0
- package/src/store/fold.ts +209 -212
- package/src/store/index.ts +1 -0
- package/src/store/memory.ts +0 -0
- package/src/store/types.local.ts +1 -1
- package/src/types.ts +1 -1
- package/src/utils/access/types.ts +30 -0
- package/src/utils/access.ts +33 -0
- package/src/utils/guard/types.ts +19 -0
- package/src/utils/guard.ts +41 -30
- package/src/utils/handler/types.ts +28 -0
- package/src/utils/handler.ts +35 -0
- package/src/utils/index.ts +9 -1
- package/src/utils/request/types.ts +23 -0
- package/src/utils/request.ts +40 -0
- package/src/utils/scope.ts +25 -108
- package/tests/creator.spec.ts +18 -18
- package/src/actions/cards.ts +0 -48
- package/src/actions/schemas.ts +0 -87
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { handlers } from '@owlmeans/server-api';
|
|
2
|
+
import { guardHelper } from '../utils/guard.js';
|
|
3
|
+
import { planningHandlerOf } from '../utils/handler.js';
|
|
4
|
+
/** A document's history, newest first, replayed from its log. */
|
|
5
|
+
export const listSpecificationRevisions = (protocol, opts) => handlers().request(protocol, async (req, ctx) => guardHelper.concealed(async () => {
|
|
6
|
+
const facade = await planningHandlerOf(ctx).handlerFacade(req, opts);
|
|
7
|
+
const limit = req.query?.limit == null ? undefined : Number(req.query.limit);
|
|
8
|
+
return { items: await facade.specifications.revisions(`${req.params.id}`, Number.isFinite(limit) ? limit : undefined) };
|
|
9
|
+
}));
|
|
10
|
+
//# sourceMappingURL=list-specification-revisions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-specification-revisions.js","sourceRoot":"","sources":["../../src/actions/list-specification-revisions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAG/C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAGvD,iEAAiE;AACjE,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,QAAgD,EAAE,IAA6B,EAAkB,EAAE,CAC5I,QAAQ,EAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;IACzF,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;IACpE,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,EAAE,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IAE5E,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAA;AACzH,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import { handlers } from '@owlmeans/server-api';
|
|
2
|
+
import type { PlanningDefinitions, PlanningProtocols, SchemaDefineReply, SchemaDefineRequest } from '@owlmeans/planning';
|
|
3
|
+
import type { Context, PlanningHandlerOptions } from '../types.js';
|
|
4
|
+
type RequestHandler = ReturnType<ReturnType<typeof handlers<Context>>['request']>;
|
|
4
5
|
/**
|
|
5
6
|
* The schema bundle — what a client loads to answer `can()` with no round trip. Scoped like every
|
|
6
7
|
* other leaf (no organization, no bundle). Where the store holds data-defined schemas it is the
|
|
@@ -25,4 +26,5 @@ export declare const applySchemaRequest: (definitions: PlanningDefinitions, requ
|
|
|
25
26
|
* @throws {PlanningForbidden | SchemaConflict | SchemaSealed | SchemaInvalid | SchemaInUse | WorkcardNotFound}
|
|
26
27
|
*/
|
|
27
28
|
export declare const defineSchemas: (protocol: NonNullable<PlanningProtocols['schema']['define']>, opts?: PlanningHandlerOptions) => RequestHandler;
|
|
29
|
+
export {};
|
|
28
30
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/actions/schemas.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/actions/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE/C,OAAO,KAAK,EACV,mBAAmB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,mBAAmB,EAC/E,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAGlE,KAAK,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;AAKjF;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,aACZ,iBAAiB,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,SAAS,sBAAsB,KAC3E,cAQE,CAAA;AAEL;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,gBAChB,mBAAmB,WAAW,mBAAmB,KAC7D,OAAO,CAAC,iBAAiB,CAyB3B,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,aACd,WAAW,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,SAAS,sBAAsB,KAC1F,cAaE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/actions/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,mBAAmB,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/actions/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAKzE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAI1F,MAAM,IAAI,GAAG,CAAC,KAAc,EAAsB,EAAE,CAClD,KAAK,IAAI,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAA;AAE1F;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,QAA6C,EAAE,IAA6B,EAC5D,EAAE,CAClB,QAAQ,EAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,IAAiC,EAAE;IAC1G,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAA;IACvD,IAAI,MAAM,CAAC,WAAW,IAAI,IAAI,EAAE,CAAC;QAC/B,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,CAAA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/specs.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { handlers } from '@owlmeans/server-api';
|
|
1
2
|
import type { PlanningProtocols } from '@owlmeans/planning';
|
|
2
|
-
import type { PlanningHandlerOptions } from '../types.js';
|
|
3
|
-
|
|
3
|
+
import type { Context, PlanningHandlerOptions } from '../types.js';
|
|
4
|
+
type RequestHandler = ReturnType<ReturnType<typeof handlers<Context>>['request']>;
|
|
4
5
|
/** @throws {WorkcardNotFound} */
|
|
5
6
|
export declare const getSpecification: (protocol: PlanningProtocols['spec']['get'], opts?: PlanningHandlerOptions) => RequestHandler;
|
|
6
7
|
/** A document's history, newest first, replayed from its log. */
|
|
7
8
|
export declare const listSpecificationRevisions: (protocol: PlanningProtocols['spec']['revisions'], opts?: PlanningHandlerOptions) => RequestHandler;
|
|
9
|
+
export {};
|
|
8
10
|
//# sourceMappingURL=specs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specs.d.ts","sourceRoot":"","sources":["../../src/actions/specs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"specs.d.ts","sourceRoot":"","sources":["../../src/actions/specs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAGlE,KAAK,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;AAEjF,iCAAiC;AACjC,eAAO,MAAM,gBAAgB,aAAc,iBAAiB,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,SAAS,sBAAsB,KAAG,cAKxG,CAAA;AAEL,iEAAiE;AACjE,eAAO,MAAM,0BAA0B,aAAc,iBAAiB,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,SAAS,sBAAsB,KAAG,cAMxH,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specs.js","sourceRoot":"","sources":["../../src/actions/specs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAG/C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"specs.js","sourceRoot":"","sources":["../../src/actions/specs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAG/C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAI5D,iCAAiC;AACjC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAA0C,EAAE,IAA6B,EAAkB,EAAE,CAC5H,QAAQ,EAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;IAC7E,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAA;IAElD,OAAO,MAAM,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CAAA;AAC5D,CAAC,CAAC,CAAC,CAAA;AAEL,iEAAiE;AACjE,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,QAAgD,EAAE,IAA6B,EAAkB,EAAE,CAC5I,QAAQ,EAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;IAC7E,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAA;IAClD,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,EAAE,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IAE5E,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAA;AACzH,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type PlanningProtocols } from '@owlmeans/planning';
|
|
2
|
+
import type { PlanningHandlerOptions } from '../types.js';
|
|
3
|
+
import type { RequestHandler } from './types.js';
|
|
4
|
+
/** Intrinsic counts of DIRECT children per parent. */
|
|
5
|
+
export declare const summarizeCards: (protocol: PlanningProtocols['card']['summary'], opts?: PlanningHandlerOptions) => RequestHandler;
|
|
6
|
+
//# sourceMappingURL=summarize-cards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summarize-cards.d.ts","sourceRoot":"","sources":["../../src/actions/summarize-cards.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACvE,OAAO,KAAK,EAAW,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAGlE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD,sDAAsD;AACtD,eAAO,MAAM,cAAc,aAAc,iBAAiB,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,SAAS,sBAAsB,KAAG,cAM1G,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { handlers } from '@owlmeans/server-api';
|
|
2
|
+
import { wireHelper } from '@owlmeans/planning';
|
|
3
|
+
import { guardHelper } from '../utils/guard.js';
|
|
4
|
+
import { planningHandlerOf } from '../utils/handler.js';
|
|
5
|
+
/** Intrinsic counts of DIRECT children per parent. */
|
|
6
|
+
export const summarizeCards = (protocol, opts) => handlers().request(protocol, async (req, ctx) => guardHelper.concealed(async () => {
|
|
7
|
+
const facade = await planningHandlerOf(ctx).handlerFacade(req, opts);
|
|
8
|
+
const { parents, ...query } = wireHelper.decodeSummaryQuery(req.query);
|
|
9
|
+
return await facade.cards.summary(parents, query);
|
|
10
|
+
}));
|
|
11
|
+
//# sourceMappingURL=summarize-cards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summarize-cards.js","sourceRoot":"","sources":["../../src/actions/summarize-cards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAA0B,MAAM,oBAAoB,CAAA;AAEvE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAGvD,sDAAsD;AACtD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAA8C,EAAE,IAA6B,EAAkB,EAAE,CAC9H,QAAQ,EAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;IACzF,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;IACpE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,GAAG,UAAU,CAAC,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IAEtE,OAAO,MAAM,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;AACnD,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { handlers } from '@owlmeans/server-api';
|
|
2
1
|
import type { PlanningProtocols } from '@owlmeans/planning';
|
|
3
|
-
import type {
|
|
2
|
+
import type { PlanningHandlerOptions } from '../types.js';
|
|
3
|
+
import type { RequestHandler } from './types.js';
|
|
4
4
|
/** @throws {WorkcardNotFound} for an absent transition and for another entity's alike */
|
|
5
|
-
export declare const getTransition: (protocol: PlanningProtocols['transition']['get'], opts?: PlanningHandlerOptions) =>
|
|
5
|
+
export declare const getTransition: (protocol: PlanningProtocols['transition']['get'], opts?: PlanningHandlerOptions) => RequestHandler;
|
|
6
6
|
//# sourceMappingURL=transitions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transitions.d.ts","sourceRoot":"","sources":["../../src/actions/transitions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transitions.d.ts","sourceRoot":"","sources":["../../src/actions/transitions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAW,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAGlE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD,yFAAyF;AACzF,eAAO,MAAM,aAAa,aACd,iBAAiB,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,SAAS,sBAAsB,KAC9E,cAKE,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { handlers } from '@owlmeans/server-api';
|
|
2
|
-
import {
|
|
2
|
+
import { guardHelper } from '../utils/guard.js';
|
|
3
|
+
import { planningHandlerOf } from '../utils/handler.js';
|
|
3
4
|
/** @throws {WorkcardNotFound} for an absent transition and for another entity's alike */
|
|
4
|
-
export const getTransition = (protocol, opts) => handlers().request(protocol, async (req, ctx) => concealed(async () => {
|
|
5
|
-
const facade = await handlerFacade(
|
|
5
|
+
export const getTransition = (protocol, opts) => handlers().request(protocol, async (req, ctx) => guardHelper.concealed(async () => {
|
|
6
|
+
const facade = await planningHandlerOf(ctx).handlerFacade(req, opts);
|
|
6
7
|
return await facade.transitions.get(`${req.params.transition}`);
|
|
7
8
|
}));
|
|
8
9
|
//# sourceMappingURL=transitions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transitions.js","sourceRoot":"","sources":["../../src/actions/transitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAG/C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"transitions.js","sourceRoot":"","sources":["../../src/actions/transitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAG/C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAGvD,yFAAyF;AACzF,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,QAAgD,EAAE,IAA6B,EAC/D,EAAE,CAClB,QAAQ,EAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;IACzF,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;IAEpE,OAAO,MAAM,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAA;AACjE,CAAC,CAAC,CAAC,CAAA"}
|
package/build/actions/types.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
|
|
1
|
+
import type { EntrypointProtocolDeclaration } from '@owlmeans/entrypoint';
|
|
2
|
+
import type { BoundEntrypointHandler } from '@owlmeans/server-entrypoint';
|
|
3
|
+
/** A handler bound to one protocol leaf — what `handlers().request()` and `connection()` answer. */
|
|
4
|
+
export interface RequestHandler extends BoundEntrypointHandler<EntrypointProtocolDeclaration> {
|
|
5
|
+
}
|
|
4
6
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/actions/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/actions/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAA;AACzE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAEzE,oGAAoG;AACpG,MAAM,WAAW,cAAe,SAAQ,sBAAsB,CAAC,6BAA6B,CAAC;CAAG"}
|
package/build/actions/watch.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PlanningProtocols } from '@owlmeans/planning';
|
|
2
|
-
import { connection } from '@owlmeans/server-socket';
|
|
3
2
|
import type { PlanningHandlerOptions } from '../types.js';
|
|
3
|
+
import type { RequestHandler } from './types.js';
|
|
4
4
|
/**
|
|
5
5
|
* The notify tool: push the caller's entity's commits down a socket as `planning-commit` frames.
|
|
6
6
|
*
|
|
@@ -8,5 +8,5 @@ import type { PlanningHandlerOptions } from '../types.js';
|
|
|
8
8
|
* `project`/`card`. A frame without `record` — what a cross-process bus delivers — gets the card as
|
|
9
9
|
* it reads now (`null` once deleted), so a subscriber never re-reads per frame.
|
|
10
10
|
*/
|
|
11
|
-
export declare const watchCommits: (protocol: PlanningProtocols['commit']['events'], opts?: PlanningHandlerOptions) =>
|
|
11
|
+
export declare const watchCommits: (protocol: PlanningProtocols['commit']['events'], opts?: PlanningHandlerOptions) => RequestHandler;
|
|
12
12
|
//# sourceMappingURL=watch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../src/actions/watch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAgC,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../src/actions/watch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAgC,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAIzF,OAAO,KAAK,EAAW,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAElE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAOhD;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,aACb,iBAAiB,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,SAAS,sBAAsB,KAC7E,cA+BD,CAAA"}
|
package/build/actions/watch.js
CHANGED
|
@@ -2,7 +2,7 @@ import { logger } from '@owlmeans/log';
|
|
|
2
2
|
import { PLANNING_COMMIT_EVENT } from '@owlmeans/planning';
|
|
3
3
|
import { connection } from '@owlmeans/server-socket';
|
|
4
4
|
import { MessageType } from '@owlmeans/socket';
|
|
5
|
-
import {
|
|
5
|
+
import { planningHandlerOf } from '../utils/handler.js';
|
|
6
6
|
const log = logger('planning:watch');
|
|
7
7
|
const text = (value) => value == null || value === '' ? undefined : `${value}`;
|
|
8
8
|
/**
|
|
@@ -13,7 +13,7 @@ const text = (value) => value == null || value === '' ? undefined : `${value}`;
|
|
|
13
13
|
* it reads now (`null` once deleted), so a subscriber never re-reads per frame.
|
|
14
14
|
*/
|
|
15
15
|
export const watchCommits = (protocol, opts) => connection(protocol, async (conn, ctx, req) => {
|
|
16
|
-
const facade = await handlerFacade(
|
|
16
|
+
const facade = await planningHandlerOf(ctx).handlerFacade(req, opts);
|
|
17
17
|
const query = (req.query ?? {});
|
|
18
18
|
const frame = opts?.event ?? PLANNING_COMMIT_EVENT;
|
|
19
19
|
const filter = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watch.js","sourceRoot":"","sources":["../../src/actions/watch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"watch.js","sourceRoot":"","sources":["../../src/actions/watch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAGvD,MAAM,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAA;AAEpC,MAAM,IAAI,GAAG,CAAC,KAAc,EAAsB,EAAE,CAClD,KAAK,IAAI,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,CAAA;AAExD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,QAA+C,EAAE,IAA6B,EAC9D,EAAE,CAAC,UAAU,CAA2B,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;IAC3F,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;IACpE,MAAM,KA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,GAAG,CAAC,IAAI,KAAK,WAAW,CAAC,MAAM,IAAI,GAAG,CAAC,KAAK,KAAK,OAAO,EAAE,CAAC;YAC7D,IAAI,CAAC;gBACH,WAAW,EAAE,CAAA;YACf,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,GAAG,CAAC,IAAI,CAAC,oCAAoC,EAAE,CAAC,CAAC,CAAA;YACnD,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** The expectations a conformance case states — each throws `ConformanceFailure` when it does not hold. */
|
|
2
|
+
export interface AssertHelper {
|
|
3
|
+
/** @throws {ConformanceFailure} */
|
|
4
|
+
check: (condition: unknown, message: string) => void;
|
|
5
|
+
/** Structural equality over JSON values. @throws {ConformanceFailure} */
|
|
6
|
+
same: (actual: unknown, expected: unknown, message: string) => void;
|
|
7
|
+
/** The same members in any order. @throws {ConformanceFailure} */
|
|
8
|
+
sameSet: (actual: readonly unknown[], expected: readonly unknown[], message: string) => void;
|
|
9
|
+
/**
|
|
10
|
+
* The promise rejects with an error of the class (matched by instance or by its registered type
|
|
11
|
+
* name, so a duplicate module copy counts). Answers the error.
|
|
12
|
+
*
|
|
13
|
+
* @throws {ConformanceFailure}
|
|
14
|
+
*/
|
|
15
|
+
rejects: (run: Promise<unknown> | (() => Promise<unknown>), expected: {
|
|
16
|
+
typeName: string;
|
|
17
|
+
}, message: string) => Promise<Error>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/conformance/assert/types.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAC3G,MAAM,WAAW,YAAY;IAC3B,mCAAmC;IACnC,KAAK,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACpD,yEAAyE;IACzE,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnE,kEAAkE;IAClE,OAAO,EAAE,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,EAAE,QAAQ,EAAE,SAAS,OAAO,EAAE,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5F;;;;;OAKG;IACH,OAAO,EAAE,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,KAAK,CAAC,CAAA;CAC/H"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/conformance/assert/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/** @
|
|
1
|
+
import type { AssertHelper } from './assert/types.js';
|
|
2
|
+
export { ConformanceFailure } from './errors.js';
|
|
3
|
+
export declare const createAssertHelper: () => AssertHelper;
|
|
4
|
+
export declare const assertHelper: AssertHelper;
|
|
5
|
+
/** @deprecated compat:factory-refactor — use `assertHelper.check(…)` */
|
|
6
6
|
export declare const check: (condition: unknown, message: string) => void;
|
|
7
|
-
/**
|
|
7
|
+
/** @deprecated compat:factory-refactor — use `assertHelper.same(…)` */
|
|
8
8
|
export declare const same: (actual: unknown, expected: unknown, message: string) => void;
|
|
9
|
-
/**
|
|
9
|
+
/** @deprecated compat:factory-refactor — use `assertHelper.sameSet(…)` */
|
|
10
10
|
export declare const sameSet: (actual: readonly unknown[], expected: readonly unknown[], message: string) => void;
|
|
11
|
-
/**
|
|
12
|
-
* The promise rejects with an error of the class (matched by instance or by its registered type
|
|
13
|
-
* name, so a duplicate module copy counts). Answers the error.
|
|
14
|
-
*
|
|
15
|
-
* @throws {ConformanceFailure}
|
|
16
|
-
*/
|
|
11
|
+
/** @deprecated compat:factory-refactor — use `assertHelper.rejects(…)` */
|
|
17
12
|
export declare const rejects: (run: Promise<unknown> | (() => Promise<unknown>), expected: {
|
|
18
13
|
typeName: string;
|
|
19
14
|
}, message: string) => Promise<Error>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../src/conformance/assert.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../src/conformance/assert.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAGrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAUhD,eAAO,MAAM,kBAAkB,QAAO,YAmCrC,CAAA;AAED,eAAO,MAAM,YAAY,cAAuB,CAAA;AAEhD,wEAAwE;AACxE,eAAO,MAAM,KAAK,cAAe,OAAO,WAAW,MAAM,KAAG,IAA8C,CAAA;AAE1G,uEAAuE;AACvE,eAAO,MAAM,IAAI,WAAY,OAAO,YAAY,OAAO,WAAW,MAAM,KAAG,IAAoD,CAAA;AAE/H,0EAA0E;AAC1E,eAAO,MAAM,OAAO,WAAY,SAAS,OAAO,EAAE,YAAY,SAAS,OAAO,EAAE,WAAW,MAAM,KAAG,IACnD,CAAA;AAEjD,0EAA0E;AAC1E,eAAO,MAAM,OAAO,QACb,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC,YAAY;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,WAAW,MAAM,KAChG,OAAO,CAAC,KAAK,CAAuD,CAAA"}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
constructor(message) {
|
|
5
|
-
super(`planning conformance: ${message}`);
|
|
6
|
-
this.name = 'ConformanceFailure';
|
|
7
|
-
}
|
|
8
|
-
}
|
|
1
|
+
import { changesHelper } from '@owlmeans/planning';
|
|
2
|
+
import { ConformanceFailure } from './errors.js';
|
|
3
|
+
export { ConformanceFailure } from './errors.js';
|
|
9
4
|
const show = (value) => {
|
|
10
5
|
try {
|
|
11
6
|
return JSON.stringify(value);
|
|
@@ -14,41 +9,44 @@ const show = (value) => {
|
|
|
14
9
|
return `${value}`;
|
|
15
10
|
}
|
|
16
11
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
/** Structural equality over JSON values. @throws {ConformanceFailure} */
|
|
24
|
-
export const same = (actual, expected, message) => {
|
|
25
|
-
if (!sameValue(actual, expected)) {
|
|
26
|
-
throw new ConformanceFailure(`${message}: expected ${show(expected)}, got ${show(actual)}`);
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
/** The same members in any order. @throws {ConformanceFailure} */
|
|
30
|
-
export const sameSet = (actual, expected, message) => {
|
|
31
|
-
const sort = (values) => [...values].map(show).sort();
|
|
32
|
-
same(sort(actual), sort(expected), message);
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* The promise rejects with an error of the class (matched by instance or by its registered type
|
|
36
|
-
* name, so a duplicate module copy counts). Answers the error.
|
|
37
|
-
*
|
|
38
|
-
* @throws {ConformanceFailure}
|
|
39
|
-
*/
|
|
40
|
-
export const rejects = async (run, expected, message) => {
|
|
41
|
-
try {
|
|
42
|
-
await (typeof run === 'function' ? run() : run);
|
|
43
|
-
}
|
|
44
|
-
catch (error) {
|
|
45
|
-
const type = error?.type;
|
|
46
|
-
if (error instanceof expected
|
|
47
|
-
|| (typeof type === 'string' && type === expected.typeName)) {
|
|
48
|
-
return error;
|
|
12
|
+
export const createAssertHelper = () => {
|
|
13
|
+
const check = (condition, message) => {
|
|
14
|
+
if (condition !== true) {
|
|
15
|
+
throw new ConformanceFailure(message);
|
|
49
16
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
17
|
+
};
|
|
18
|
+
const same = (actual, expected, message) => {
|
|
19
|
+
if (!changesHelper.sameValue(actual, expected)) {
|
|
20
|
+
throw new ConformanceFailure(`${message}: expected ${show(expected)}, got ${show(actual)}`);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const sameSet = (actual, expected, message) => {
|
|
24
|
+
const sort = (values) => [...values].map(show).sort();
|
|
25
|
+
same(sort(actual), sort(expected), message);
|
|
26
|
+
};
|
|
27
|
+
const rejects = async (run, expected, message) => {
|
|
28
|
+
try {
|
|
29
|
+
await (typeof run === 'function' ? run() : run);
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
const type = error?.type;
|
|
33
|
+
if (error instanceof expected
|
|
34
|
+
|| (typeof type === 'string' && type === expected.typeName)) {
|
|
35
|
+
return error;
|
|
36
|
+
}
|
|
37
|
+
throw new ConformanceFailure(`${message}: expected ${expected.typeName}, got ${show(error?.message ?? error)}`);
|
|
38
|
+
}
|
|
39
|
+
throw new ConformanceFailure(`${message}: expected ${expected.typeName}, nothing was thrown`);
|
|
40
|
+
};
|
|
41
|
+
return { check, same, sameSet, rejects };
|
|
53
42
|
};
|
|
43
|
+
export const assertHelper = createAssertHelper();
|
|
44
|
+
/** @deprecated compat:factory-refactor — use `assertHelper.check(…)` */
|
|
45
|
+
export const check = (condition, message) => assertHelper.check(condition, message);
|
|
46
|
+
/** @deprecated compat:factory-refactor — use `assertHelper.same(…)` */
|
|
47
|
+
export const same = (actual, expected, message) => assertHelper.same(actual, expected, message);
|
|
48
|
+
/** @deprecated compat:factory-refactor — use `assertHelper.sameSet(…)` */
|
|
49
|
+
export const sameSet = (actual, expected, message) => assertHelper.sameSet(actual, expected, message);
|
|
50
|
+
/** @deprecated compat:factory-refactor — use `assertHelper.rejects(…)` */
|
|
51
|
+
export const rejects = async (run, expected, message) => await assertHelper.rejects(run, expected, message);
|
|
54
52
|
//# sourceMappingURL=assert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert.js","sourceRoot":"","sources":["../../src/conformance/assert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"assert.js","sourceRoot":"","sources":["../../src/conformance/assert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAEhD,MAAM,IAAI,GAAG,CAAC,KAAc,EAAU,EAAE;IACtC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,GAAG,KAAK,EAAE,CAAA;IACnB,CAAC;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAiB,EAAE;IACnD,MAAM,KAAK,GAAG,CAAC,SAAkB,EAAE,OAAe,EAAQ,EAAE;QAC1D,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;YACvB,MAAM,IAAI,kBAAkB,CAAC,OAAO,CAAC,CAAA;QACvC,CAAC;IACH,CAAC,CAAA;IAED,MAAM,IAAI,GAAG,CAAC,MAAe,EAAE,QAAiB,EAAE,OAAe,EAAQ,EAAE;QACzE,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC;YAC/C,MAAM,IAAI,kBAAkB,CAAC,GAAG,OAAO,cAAc,IAAI,CAAC,QAAQ,CAAC,SAAS,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;QAC7F,CAAC;IACH,CAAC,CAAA;IAED,MAAM,OAAO,GAAG,CAAC,MAA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,OAAe,EAAQ,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;AAE1G,uEAAuE;AACvE,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,MAAe,EAAE,QAAiB,EAAE,OAAe,EAAQ,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;AAE/H,0EAA0E;AAC1E,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,MAA0B,EAAE,QAA4B,EAAE,OAAe,EAAQ,EAAE,CACzG,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;AAEjD,0EAA0E;AAC1E,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAC1B,GAAgD,EAAE,QAA8B,EAAE,OAAe,EACjF,EAAE,CAAC,MAAM,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cases.d.ts","sourceRoot":"","sources":["../../src/conformance/cases.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"cases.d.ts","sourceRoot":"","sources":["../../src/conformance/cases.ts"],"names":[],"mappings":"AACA,OAAO,EAAsV,KAAK,aAAa,EAAkJ,MAAM,oBAAoB,CAAA;AAK3hB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAmhBjD,wCAAwC;AACxC,eAAO,MAAM,mBAAmB,EAAE,SAAS,eAAe,EAAyB,CAAA;AAEnF,kGAAkG;AAClG,eAAO,MAAM,mBAAmB,UAAW,aAAa,KAAG,eAAe,EAC2C,CAAA"}
|