@owlmeans/planning 0.1.18-rc.8 → 0.1.18
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 +122 -29
- package/agent-meta/manifest.json +131 -4
- package/agent-meta/skills/planning/SKILL.md +78 -171
- package/agent-meta/skills/planning/parts/collaboration.md +67 -0
- package/agent-meta/skills/planning/parts/errors.md +51 -0
- package/agent-meta/skills/planning/parts/fold.md +69 -0
- package/agent-meta/skills/planning/parts/mounting.md +64 -0
- package/agent-meta/skills/planning/parts/types.md +141 -0
- package/build/aliases/types.d.ts +72 -0
- package/build/aliases/types.d.ts.map +1 -0
- package/build/aliases/types.js +2 -0
- package/build/aliases/types.js.map +1 -0
- package/build/aliases.d.ts +4 -0
- package/build/aliases.d.ts.map +1 -0
- package/build/aliases.js +28 -0
- package/build/aliases.js.map +1 -0
- package/build/consts.d.ts +43 -34
- package/build/consts.d.ts.map +1 -1
- package/build/consts.js +49 -25
- package/build/consts.js.map +1 -1
- package/build/entrypoints/types.d.ts +105 -0
- package/build/entrypoints/types.d.ts.map +1 -0
- package/build/entrypoints/types.js +2 -0
- package/build/entrypoints/types.js.map +1 -0
- package/build/entrypoints.d.ts +5 -1
- package/build/entrypoints.d.ts.map +1 -1
- package/build/entrypoints.js +24 -6
- package/build/entrypoints.js.map +1 -1
- package/build/errors.d.ts +41 -0
- package/build/errors.d.ts.map +1 -1
- package/build/errors.js +61 -0
- package/build/errors.js.map +1 -1
- package/build/helpers/app/consts.local.d.ts +5 -0
- package/build/helpers/app/consts.local.d.ts.map +1 -0
- package/build/helpers/app/consts.local.js +5 -0
- package/build/helpers/app/consts.local.js.map +1 -0
- package/build/helpers/app/types.d.ts +53 -0
- package/build/helpers/app/types.d.ts.map +1 -0
- package/build/helpers/app/types.js +2 -0
- package/build/helpers/app/types.js.map +1 -0
- package/build/helpers/app.d.ts +4 -0
- package/build/helpers/app.d.ts.map +1 -0
- package/build/helpers/app.js +139 -0
- package/build/helpers/app.js.map +1 -0
- package/build/helpers/apply/consts.local.d.ts +7 -0
- package/build/helpers/apply/consts.local.d.ts.map +1 -0
- package/build/helpers/apply/consts.local.js +9 -0
- package/build/helpers/apply/consts.local.js.map +1 -0
- package/build/helpers/apply/types.d.ts +32 -0
- package/build/helpers/apply/types.d.ts.map +1 -0
- package/build/helpers/apply/types.js +2 -0
- package/build/helpers/apply/types.js.map +1 -0
- package/build/helpers/apply.d.ts +5 -23
- package/build/helpers/apply.d.ts.map +1 -1
- package/build/helpers/apply.js +127 -144
- package/build/helpers/apply.js.map +1 -1
- package/build/helpers/card/types.d.ts +20 -0
- package/build/helpers/card/types.d.ts.map +1 -0
- package/build/helpers/card/types.js +2 -0
- package/build/helpers/card/types.js.map +1 -0
- package/build/helpers/card.d.ts +11 -7
- package/build/helpers/card.d.ts.map +1 -1
- package/build/helpers/card.js +41 -28
- package/build/helpers/card.js.map +1 -1
- package/build/helpers/changes/consts.local.d.ts +13 -0
- package/build/helpers/changes/consts.local.d.ts.map +1 -0
- package/build/helpers/changes/consts.local.js +13 -0
- package/build/helpers/changes/consts.local.js.map +1 -0
- package/build/helpers/changes/types.d.ts +58 -0
- package/build/helpers/changes/types.d.ts.map +1 -0
- package/build/helpers/changes/types.js +2 -0
- package/build/helpers/changes/types.js.map +1 -0
- package/build/helpers/changes.d.ts +11 -42
- package/build/helpers/changes.d.ts.map +1 -1
- package/build/helpers/changes.js +237 -251
- package/build/helpers/changes.js.map +1 -1
- package/build/helpers/code/types.d.ts +27 -0
- package/build/helpers/code/types.d.ts.map +1 -0
- package/build/helpers/code/types.js +2 -0
- package/build/helpers/code/types.js.map +1 -0
- package/build/helpers/code.d.ts +6 -17
- package/build/helpers/code.d.ts.map +1 -1
- package/build/helpers/code.js +39 -40
- package/build/helpers/code.js.map +1 -1
- package/build/helpers/index.d.ts +16 -0
- package/build/helpers/index.d.ts.map +1 -1
- package/build/helpers/index.js +4 -0
- package/build/helpers/index.js.map +1 -1
- package/build/helpers/query/types.d.ts +23 -0
- package/build/helpers/query/types.d.ts.map +1 -0
- package/build/helpers/query/types.js +2 -0
- package/build/helpers/query/types.js.map +1 -0
- package/build/helpers/query.d.ts +25 -17
- package/build/helpers/query.d.ts.map +1 -1
- package/build/helpers/query.js +108 -280
- package/build/helpers/query.js.map +1 -1
- package/build/helpers/reply/consts.d.ts +2 -0
- package/build/helpers/reply/consts.d.ts.map +1 -0
- package/build/helpers/reply/consts.js +2 -0
- package/build/helpers/reply/consts.js.map +1 -0
- package/build/helpers/reply/types.d.ts +10 -0
- package/build/helpers/reply/types.d.ts.map +1 -0
- package/build/helpers/reply/types.js +2 -0
- package/build/helpers/reply/types.js.map +1 -0
- package/build/helpers/reply.d.ts +5 -0
- package/build/helpers/reply.d.ts.map +1 -0
- package/build/helpers/reply.js +29 -0
- package/build/helpers/reply.js.map +1 -0
- package/build/helpers/scoped/types.d.ts +73 -0
- package/build/helpers/scoped/types.d.ts.map +1 -0
- package/build/helpers/scoped/types.js +2 -0
- package/build/helpers/scoped/types.js.map +1 -0
- package/build/helpers/scoped.d.ts +25 -0
- package/build/helpers/scoped.d.ts.map +1 -0
- package/build/helpers/scoped.js +223 -0
- package/build/helpers/scoped.js.map +1 -0
- package/build/helpers/specification/types.d.ts +24 -0
- package/build/helpers/specification/types.d.ts.map +1 -0
- package/build/helpers/specification/types.js +2 -0
- package/build/helpers/specification/types.js.map +1 -0
- package/build/helpers/specification.d.ts +9 -13
- package/build/helpers/specification.d.ts.map +1 -1
- package/build/helpers/specification.js +47 -44
- package/build/helpers/specification.js.map +1 -1
- package/build/helpers/status/types.d.ts +48 -0
- package/build/helpers/status/types.d.ts.map +1 -0
- package/build/helpers/status/types.js +2 -0
- package/build/helpers/status/types.js.map +1 -0
- package/build/helpers/status.d.ts +16 -29
- package/build/helpers/status.d.ts.map +1 -1
- package/build/helpers/status.js +77 -73
- package/build/helpers/status.js.map +1 -1
- package/build/helpers/types.local.d.ts +17 -0
- package/build/helpers/types.local.d.ts.map +1 -0
- package/build/helpers/types.local.js +2 -0
- package/build/helpers/types.local.js.map +1 -0
- package/build/helpers/validate/types.d.ts +31 -0
- package/build/helpers/validate/types.d.ts.map +1 -0
- package/build/helpers/validate/types.js +2 -0
- package/build/helpers/validate/types.js.map +1 -0
- package/build/helpers/validate.d.ts +8 -19
- package/build/helpers/validate.d.ts.map +1 -1
- package/build/helpers/validate.js +79 -79
- package/build/helpers/validate.js.map +1 -1
- package/build/helpers/wire/types.d.ts +28 -0
- package/build/helpers/wire/types.d.ts.map +1 -0
- package/build/helpers/wire/types.js +2 -0
- package/build/helpers/wire/types.js.map +1 -0
- package/build/helpers/wire.d.ts +4 -0
- package/build/helpers/wire.d.ts.map +1 -0
- package/build/helpers/wire.js +216 -0
- package/build/helpers/wire.js.map +1 -0
- package/build/i18n/be.json +5 -0
- package/build/i18n/de.json +5 -0
- package/build/i18n/en.json +5 -0
- package/build/i18n/es.json +5 -0
- package/build/i18n/fr.json +5 -0
- package/build/i18n/pl.json +5 -0
- package/build/i18n/ru.json +5 -0
- package/build/i18n/uk.json +5 -0
- package/build/i18n.js +3 -3
- package/build/i18n.js.map +1 -1
- package/build/index.d.ts +7 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3 -0
- package/build/index.js.map +1 -1
- package/build/models/index.d.ts +2 -3
- package/build/models/index.d.ts.map +1 -1
- package/build/models/index.js +1 -15
- package/build/models/index.js.map +1 -1
- package/build/models/model.d.ts +5 -0
- package/build/models/model.d.ts.map +1 -0
- package/build/models/model.js +16 -0
- package/build/models/model.js.map +1 -0
- package/build/models/project.d.ts +2 -1
- package/build/models/project.d.ts.map +1 -1
- package/build/models/project.js.map +1 -1
- package/build/models/specification.d.ts +2 -1
- package/build/models/specification.d.ts.map +1 -1
- package/build/models/specification.js.map +1 -1
- package/build/models/types.d.ts +69 -0
- package/build/models/types.d.ts.map +1 -0
- package/build/models/types.js +2 -0
- package/build/models/types.js.map +1 -0
- package/build/models/workcard.d.ts +2 -1
- package/build/models/workcard.d.ts.map +1 -1
- package/build/models/workcard.js +12 -12
- package/build/models/workcard.js.map +1 -1
- package/build/registry.d.ts +3 -2
- package/build/registry.d.ts.map +1 -1
- package/build/registry.js +51 -3
- package/build/registry.js.map +1 -1
- package/build/resources/mentions.d.ts +4 -0
- package/build/resources/mentions.d.ts.map +1 -0
- package/build/resources/mentions.js +15 -0
- package/build/resources/mentions.js.map +1 -0
- package/build/resources/protocol/types.d.ts +30 -0
- package/build/resources/protocol/types.d.ts.map +1 -0
- package/build/resources/protocol/types.js +2 -0
- package/build/resources/protocol/types.js.map +1 -0
- package/build/resources/protocol.d.ts +6 -0
- package/build/resources/protocol.d.ts.map +1 -0
- package/build/resources/protocol.js +31 -0
- package/build/resources/protocol.js.map +1 -0
- package/build/resources/types.d.ts +146 -0
- package/build/resources/types.d.ts.map +1 -0
- package/build/resources/types.js +2 -0
- package/build/resources/types.js.map +1 -0
- package/build/resources/types.local.d.ts +6 -0
- package/build/resources/types.local.d.ts.map +1 -0
- package/build/resources/types.local.js +2 -0
- package/build/resources/types.local.js.map +1 -0
- package/build/schemas.d.ts +21 -2
- package/build/schemas.d.ts.map +1 -1
- package/build/schemas.js +164 -2
- package/build/schemas.js.map +1 -1
- package/build/types.d.ts +330 -151
- package/build/types.d.ts.map +1 -1
- package/build/utils.d.ts +6 -0
- package/build/utils.d.ts.map +1 -0
- package/build/utils.js +6 -0
- package/build/utils.js.map +1 -0
- package/package.json +13 -13
- package/src/aliases/types.ts +41 -0
- package/src/aliases.ts +34 -0
- package/src/consts.ts +50 -25
- package/src/entrypoints/types.ts +77 -0
- package/src/entrypoints.ts +53 -24
- package/src/errors.ts +71 -0
- package/src/helpers/app/consts.local.ts +5 -0
- package/src/helpers/app/types.ts +54 -0
- package/src/helpers/app.ts +158 -0
- package/src/helpers/apply/consts.local.ts +10 -0
- package/src/helpers/apply/types.ts +32 -0
- package/src/helpers/apply.ts +141 -153
- package/src/helpers/card/types.ts +20 -0
- package/src/helpers/card.ts +59 -33
- package/src/helpers/changes/consts.local.ts +17 -0
- package/src/helpers/changes/types.ts +66 -0
- package/src/helpers/changes.ts +270 -280
- package/src/helpers/code/types.ts +31 -0
- package/src/helpers/code.ts +52 -48
- package/src/helpers/index.ts +17 -0
- package/src/helpers/query/types.ts +26 -0
- package/src/helpers/query.ts +144 -314
- package/src/helpers/reply/consts.ts +1 -0
- package/src/helpers/reply/types.ts +13 -0
- package/src/helpers/reply.ts +27 -0
- package/src/helpers/scoped/types.ts +78 -0
- package/src/helpers/scoped.ts +281 -0
- package/src/helpers/specification/types.ts +26 -0
- package/src/helpers/specification.ts +69 -51
- package/src/helpers/status/types.ts +46 -0
- package/src/helpers/status.ts +117 -93
- package/src/helpers/types.local.ts +18 -0
- package/src/helpers/validate/types.ts +31 -0
- package/src/helpers/validate.ts +89 -77
- package/src/helpers/wire/types.ts +31 -0
- package/src/helpers/wire.ts +252 -0
- package/src/i18n/be.json +5 -0
- package/src/i18n/de.json +5 -0
- package/src/i18n/en.json +5 -0
- package/src/i18n/es.json +5 -0
- package/src/i18n/fr.json +5 -0
- package/src/i18n/pl.json +5 -0
- package/src/i18n/ru.json +5 -0
- package/src/i18n/uk.json +5 -0
- package/src/i18n.ts +4 -3
- package/src/index.ts +8 -0
- package/src/models/index.ts +2 -17
- package/src/models/model.ts +18 -0
- package/src/models/project.ts +2 -1
- package/src/models/specification.ts +2 -1
- package/src/models/types.ts +70 -0
- package/src/models/workcard.ts +14 -16
- package/src/registry.ts +55 -4
- package/src/resources/mentions.ts +11 -0
- package/src/resources/protocol/types.ts +21 -0
- package/src/resources/protocol.ts +36 -0
- package/src/resources/types.local.ts +5 -0
- package/src/resources/types.ts +148 -0
- package/src/schemas.ts +179 -4
- package/src/types.ts +334 -130
- package/src/utils.ts +9 -0
- package/tests/app.spec.ts +188 -0
- package/tests/apply.spec.ts +95 -31
- package/tests/code.spec.ts +9 -9
- package/tests/csp.spec.ts +122 -0
- package/tests/entrypoints.spec.ts +18 -2
- package/tests/error-status.spec.ts +6 -1
- package/tests/models.spec.ts +24 -16
- package/tests/query.spec.ts +13 -15
- package/tests/schemas.spec.ts +8 -8
- package/tests/scoped.spec.ts +161 -0
- package/tests/status.spec.ts +31 -22
|
@@ -1,51 +1,20 @@
|
|
|
1
|
-
import type { AnyTypeSchema,
|
|
2
|
-
type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
flow?: string;
|
|
8
|
-
from?: string;
|
|
9
|
-
to?: string;
|
|
10
|
-
}
|
|
11
|
-
/** Structural equality over JSON values. */
|
|
1
|
+
import type { AnyTypeSchema, SpecificationSlot, TransitionExecution, Workcard } from '../types.js';
|
|
2
|
+
import type { ChangeSet, ChangesHelper } from './changes/types.js';
|
|
3
|
+
import type { FlowLookup } from './types.local.js';
|
|
4
|
+
export declare const createChangesHelper: () => ChangesHelper;
|
|
5
|
+
export declare const changesHelper: ChangesHelper;
|
|
6
|
+
/** @deprecated compat:factory-refactor — use `changesHelper.sameValue(…)` */
|
|
12
7
|
export declare const sameValue: (left: unknown, right: unknown) => boolean;
|
|
13
|
-
/**
|
|
8
|
+
/** @deprecated compat:factory-refactor — use `changesHelper.mergeFields(…)` */
|
|
14
9
|
export declare const mergeFields: (base?: Record<string, unknown> | null, patch?: Record<string, unknown> | null) => Record<string, unknown>;
|
|
15
|
-
/**
|
|
10
|
+
/** @deprecated compat:factory-refactor — use `changesHelper.applyUnset(…)` */
|
|
16
11
|
export declare const applyUnset: <T extends object>(record: T, unset?: string[]) => T;
|
|
17
|
-
/**
|
|
18
|
-
* Refuse an execution that writes what only the transition, the flow or the executor may write.
|
|
19
|
-
*
|
|
20
|
-
* `status`/`intrinsic`/`flows`/`closedAt` move only through `transit` (a create's draft may name
|
|
21
|
-
* the initial status); `code` is fixed once minted unless the type's policy says `mutable`;
|
|
22
|
-
* `category` is fixed; `revision`/`bodyChars` are computed.
|
|
23
|
-
*
|
|
24
|
-
* @throws {PlanningError} `planning:immutable:<field>`
|
|
25
|
-
*/
|
|
12
|
+
/** @deprecated compat:factory-refactor — use `changesHelper.assertMutable(…)` */
|
|
26
13
|
export declare const assertMutable: (exec: TransitionExecution, type: AnyTypeSchema) => void;
|
|
27
|
-
/**
|
|
28
|
-
* The `changes`/`unset` a transition records (plan step 9).
|
|
29
|
-
*
|
|
30
|
-
* - `create`: the whole initial record from the draft (overlaid by `exec.changes`) — `parents`
|
|
31
|
-
* normalized, every flow at its initial status (the draft's `status` for the primary one),
|
|
32
|
-
* `status`/`intrinsic` mirrored, `closedAt` when it starts closed; a specification gets its
|
|
33
|
-
* format, `bodyChars` and revision 1 when the slot is revisioned.
|
|
34
|
-
* - `update`: only what differs; `null` or `exec.unset` clears a field that has a value; a moved
|
|
35
|
-
* `parent` replaces the old one in `parents`; a revisioned document whose content changed gets
|
|
36
|
-
* `revision + 1`. An update that changes nothing is empty ({@link isEmptyChange}).
|
|
37
|
-
* - `transit`: `flows[flow] = rule.to`, `status` when the flow is primary, `intrinsic` when it
|
|
38
|
-
* moves, `closedAt` set on entering closed and cleared on leaving it — plus the caller's own
|
|
39
|
-
* changes, diffed as in an update.
|
|
40
|
-
* - `link`, `unlink`, `delete`: nothing.
|
|
41
|
-
*
|
|
42
|
-
* @throws {IllegalTransition} a transit the flow does not offer from the current status
|
|
43
|
-
* @throws {PlanningError} `malformed:*` for an execution missing what its action needs
|
|
44
|
-
*/
|
|
14
|
+
/** @deprecated compat:factory-refactor — use `changesHelper.computeChanges(…)` */
|
|
45
15
|
export declare const computeChanges: (card: Workcard | null | undefined, exec: TransitionExecution, type: AnyTypeSchema, registry: FlowLookup, at: string, opts?: {
|
|
46
16
|
slot?: SpecificationSlot | null;
|
|
47
17
|
}) => ChangeSet;
|
|
48
|
-
/**
|
|
18
|
+
/** @deprecated compat:factory-refactor — use `changesHelper.isEmptyChange(…)` */
|
|
49
19
|
export declare const isEmptyChange: (set: Pick<ChangeSet, 'changes' | 'unset'>) => boolean;
|
|
50
|
-
export {};
|
|
51
20
|
//# sourceMappingURL=changes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../src/helpers/changes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../src/helpers/changes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAiB,iBAAiB,EAAE,mBAAmB,EAAE,QAAQ,EAAkC,MAAM,aAAa,CAAA;AAEjJ,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAIlE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAQlD,eAAO,MAAM,mBAAmB,QAAO,aAqRtC,CAAA;AAED,eAAO,MAAM,aAAa,eAAwB,CAAA;AAElD,6EAA6E;AAC7E,eAAO,MAAM,SAAS,SAAU,OAAO,SAAS,OAAO,KAAG,OAA+C,CAAA;AAEzG,+EAA+E;AAC/E,eAAO,MAAM,WAAW,UACf,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,UAAU,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,KAC5E,MAAM,CAAC,MAAM,EAAE,OAAO,CAA2C,CAAA;AAEpE,8EAA8E;AAC9E,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,UAAU,CAAC,UAAU,MAAM,EAAE,KAAG,CAA+C,CAAA;AAE1H,iFAAiF;AACjF,eAAO,MAAM,aAAa,SAAU,mBAAmB,QAAQ,aAAa,KAAG,IAA+C,CAAA;AAE9H,kFAAkF;AAClF,eAAO,MAAM,cAAc,SACnB,QAAQ,GAAG,IAAI,GAAG,SAAS,QAC3B,mBAAmB,QACnB,aAAa,YACT,UAAU,MAChB,MAAM,SACH;IAAE,IAAI,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;CAAE,KACzC,SAA+E,CAAA;AAElF,iFAAiF;AACjF,eAAO,MAAM,aAAa,QAAS,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,KAAG,OAA2C,CAAA"}
|
package/build/helpers/changes.js
CHANGED
|
@@ -1,277 +1,263 @@
|
|
|
1
1
|
import { IntrinsicStatus, SpecificationFormat, TransitionAction, WorkcardKind } from '../consts.js';
|
|
2
2
|
import { IllegalTransition, PlanningError } from '../errors.js';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const IDENTITY_KEYS = ['id', 'kind', 'type', 'entityId', 'seq', 'head', 'createdAt'];
|
|
8
|
-
/** Move only through `transit` (or a create's draft). */
|
|
9
|
-
const FLOW_KEYS = ['status', 'intrinsic', 'flows', 'closedAt'];
|
|
10
|
-
/** Computed by the executor, never supplied. */
|
|
11
|
-
const DERIVED_KEYS = ['revision', 'bodyChars'];
|
|
12
|
-
/** Cannot be cleared. */
|
|
13
|
-
const REQUIRED_KEYS = ['title', 'parents', 'labels', 'fields', 'category', 'format'];
|
|
14
|
-
/** Changing one of these produces a new revision of a revisioned document. */
|
|
15
|
-
const CONTENT_KEYS = ['body', 'ref', 'format', 'version'];
|
|
3
|
+
import { cardHelper } from './card.js';
|
|
4
|
+
import { CONTENT_KEYS, DERIVED_KEYS, FLOW_KEYS, IDENTITY_KEYS, PROVENANCE_KEYS, REQUIRED_KEYS } from './changes/consts.local.js';
|
|
5
|
+
import { specificationHelper } from './specification.js';
|
|
6
|
+
import { statusHelper } from './status.js';
|
|
16
7
|
const isPlainObject = (value) => value != null && typeof value === 'object' && !Array.isArray(value);
|
|
17
|
-
/** Structural equality over JSON values. */
|
|
18
|
-
export const sameValue = (left, right) => {
|
|
19
|
-
if (left === right) {
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
if (Array.isArray(left) && Array.isArray(right)) {
|
|
23
|
-
return left.length === right.length && left.every((entry, index) => sameValue(entry, right[index]));
|
|
24
|
-
}
|
|
25
|
-
if (isPlainObject(left) && isPlainObject(right)) {
|
|
26
|
-
const keys = Object.keys(left).filter(key => left[key] !== undefined);
|
|
27
|
-
const other = Object.keys(right).filter(key => right[key] !== undefined);
|
|
28
|
-
return keys.length === other.length && keys.every(key => sameValue(left[key], right[key]));
|
|
29
|
-
}
|
|
30
|
-
return false;
|
|
31
|
-
};
|
|
32
8
|
const clean = (record) => Object.fromEntries(Object.entries(record).filter(([, value]) => value !== undefined));
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
export const applyUnset = (record, unset) => {
|
|
38
|
-
const copy = structuredClone(record);
|
|
39
|
-
for (const path of unset ?? []) {
|
|
40
|
-
const [head, ...rest] = path.split('.');
|
|
41
|
-
if (rest.length > 0) {
|
|
42
|
-
const map = copy[head];
|
|
43
|
-
if (isPlainObject(map)) {
|
|
44
|
-
delete map[rest.join('.')];
|
|
45
|
-
}
|
|
9
|
+
export const createChangesHelper = () => {
|
|
10
|
+
const sameValue = (left, right) => {
|
|
11
|
+
if (left === right) {
|
|
12
|
+
return true;
|
|
46
13
|
}
|
|
47
|
-
|
|
48
|
-
|
|
14
|
+
if (Array.isArray(left) && Array.isArray(right)) {
|
|
15
|
+
return left.length === right.length && left.every((entry, index) => sameValue(entry, right[index]));
|
|
49
16
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
* Refuse an execution that writes what only the transition, the flow or the executor may write.
|
|
55
|
-
*
|
|
56
|
-
* `status`/`intrinsic`/`flows`/`closedAt` move only through `transit` (a create's draft may name
|
|
57
|
-
* the initial status); `code` is fixed once minted unless the type's policy says `mutable`;
|
|
58
|
-
* `category` is fixed; `revision`/`bodyChars` are computed.
|
|
59
|
-
*
|
|
60
|
-
* @throws {PlanningError} `planning:immutable:<field>`
|
|
61
|
-
*/
|
|
62
|
-
export const assertMutable = (exec, type) => {
|
|
63
|
-
const create = exec.action === TransitionAction.Create;
|
|
64
|
-
const codeFixed = type.code != null && type.code.mutable !== true;
|
|
65
|
-
const refuse = (key) => {
|
|
66
|
-
throw new PlanningError(`immutable:${FLOW_KEYS.includes(key) ? 'status' : key}`);
|
|
67
|
-
};
|
|
68
|
-
for (const [key, value] of Object.entries(exec.changes ?? {})) {
|
|
69
|
-
if (value === undefined) {
|
|
70
|
-
continue;
|
|
17
|
+
if (isPlainObject(left) && isPlainObject(right)) {
|
|
18
|
+
const keys = Object.keys(left).filter(key => left[key] !== undefined);
|
|
19
|
+
const other = Object.keys(right).filter(key => right[key] !== undefined);
|
|
20
|
+
return keys.length === other.length && keys.every(key => sameValue(left[key], right[key]));
|
|
71
21
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
22
|
+
return false;
|
|
23
|
+
};
|
|
24
|
+
const mergeFields = (base, patch) => Object.fromEntries(Object.entries({ ...(base ?? {}), ...(patch ?? {}) })
|
|
25
|
+
.filter(([, value]) => value !== null && value !== undefined));
|
|
26
|
+
const applyUnset = (record, unset) => {
|
|
27
|
+
const copy = structuredClone(record);
|
|
28
|
+
for (const path of unset ?? []) {
|
|
29
|
+
const [head, ...rest] = path.split('.');
|
|
30
|
+
if (rest.length > 0) {
|
|
31
|
+
const map = copy[head];
|
|
32
|
+
if (isPlainObject(map)) {
|
|
33
|
+
delete map[rest.join('.')];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
delete copy[head];
|
|
38
|
+
}
|
|
77
39
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
40
|
+
return copy;
|
|
41
|
+
};
|
|
42
|
+
const assertMutable = (exec, type) => {
|
|
43
|
+
const create = exec.action === TransitionAction.Create;
|
|
44
|
+
const codeFixed = type.code != null && type.code.mutable !== true;
|
|
45
|
+
const refuse = (key) => {
|
|
46
|
+
throw new PlanningError(`immutable:${FLOW_KEYS.includes(key) ? 'status' : key}`);
|
|
47
|
+
};
|
|
48
|
+
for (const [key, value] of Object.entries(exec.changes ?? {})) {
|
|
49
|
+
if (value === undefined) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (IDENTITY_KEYS.includes(key) || PROVENANCE_KEYS.includes(key) || DERIVED_KEYS.includes(key)) {
|
|
53
|
+
refuse(key);
|
|
54
|
+
}
|
|
55
|
+
if (!create && (FLOW_KEYS.includes(key) || key === 'category' || (key === 'code' && codeFixed))) {
|
|
56
|
+
refuse(key);
|
|
57
|
+
}
|
|
84
58
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if (value === undefined || IDENTITY_KEYS.includes(key) || skip.includes(key)) {
|
|
95
|
-
continue;
|
|
59
|
+
for (const path of exec.unset ?? []) {
|
|
60
|
+
const head = path.split('.')[0];
|
|
61
|
+
if (PROVENANCE_KEYS.includes(head)) {
|
|
62
|
+
refuse(head);
|
|
63
|
+
}
|
|
64
|
+
if (IDENTITY_KEYS.includes(path) || DERIVED_KEYS.includes(path) || REQUIRED_KEYS.includes(path)
|
|
65
|
+
|| FLOW_KEYS.includes(head) || (path === 'code' && codeFixed)) {
|
|
66
|
+
refuse(path);
|
|
67
|
+
}
|
|
96
68
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
69
|
+
};
|
|
70
|
+
const reach = (record, path) => path.split('.')
|
|
71
|
+
.reduce((value, step) => isPlainObject(value) ? value[step] : undefined, record);
|
|
72
|
+
/** Only what differs from the card; `null` becomes an unset of a field that has a value. */
|
|
73
|
+
const diffInto = (card, changes, skip, set) => {
|
|
74
|
+
const out = set.changes;
|
|
75
|
+
const current = card;
|
|
76
|
+
for (const [key, value] of Object.entries(changes ?? {})) {
|
|
77
|
+
if (value === undefined || IDENTITY_KEYS.includes(key) || PROVENANCE_KEYS.includes(key) || skip.includes(key)) {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
if (key === 'fields' || key === 'flows') {
|
|
81
|
+
const own = (current[key] ?? {});
|
|
82
|
+
const patch = {};
|
|
83
|
+
for (const [entry, entryValue] of Object.entries(value ?? {})) {
|
|
84
|
+
if (entryValue === undefined) {
|
|
85
|
+
continue;
|
|
107
86
|
}
|
|
87
|
+
if (entryValue === null) {
|
|
88
|
+
if (own[entry] !== undefined) {
|
|
89
|
+
set.unset.push(`${key}.${entry}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
else if (!sameValue(own[entry], entryValue)) {
|
|
93
|
+
patch[entry] = entryValue;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (Object.keys(patch).length > 0) {
|
|
97
|
+
out[key] = patch;
|
|
108
98
|
}
|
|
109
|
-
|
|
110
|
-
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
if (value === null) {
|
|
102
|
+
if (current[key] != null) {
|
|
103
|
+
set.unset.push(key);
|
|
111
104
|
}
|
|
105
|
+
continue;
|
|
112
106
|
}
|
|
113
|
-
if (
|
|
114
|
-
out[key] =
|
|
107
|
+
if (!sameValue(current[key], value)) {
|
|
108
|
+
out[key] = value;
|
|
115
109
|
}
|
|
116
|
-
continue;
|
|
117
110
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
111
|
+
};
|
|
112
|
+
const unsetInto = (card, unset, set) => {
|
|
113
|
+
for (const path of unset ?? []) {
|
|
114
|
+
if (PROVENANCE_KEYS.includes(path.split('.')[0])) {
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
if (reach(card, path) !== undefined && !set.unset.includes(path)) {
|
|
118
|
+
set.unset.push(path);
|
|
121
119
|
}
|
|
122
|
-
continue;
|
|
123
120
|
}
|
|
124
|
-
|
|
125
|
-
|
|
121
|
+
};
|
|
122
|
+
/** A moved primary parent replaces the old one in `parents`. */
|
|
123
|
+
const reparent = (card, set) => {
|
|
124
|
+
const out = set.changes;
|
|
125
|
+
const moved = out.parent !== undefined || set.unset.includes('parent');
|
|
126
|
+
if (!moved || out.parents !== undefined) {
|
|
127
|
+
return;
|
|
126
128
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
for (const path of unset ?? []) {
|
|
131
|
-
if (reach(card, path) !== undefined && !set.unset.includes(path)) {
|
|
132
|
-
set.unset.push(path);
|
|
129
|
+
const parents = cardHelper.normalizeParents(out.parent, card.parents.filter(parent => parent !== card.parent));
|
|
130
|
+
if (!sameValue(parents, card.parents)) {
|
|
131
|
+
out.parents = parents;
|
|
133
132
|
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
const out = set.changes;
|
|
153
|
-
if (out.body !== undefined) {
|
|
154
|
-
out.bodyChars = bodyCharsOf(out.body);
|
|
155
|
-
}
|
|
156
|
-
else if (set.unset.includes('body') && !set.unset.includes('bodyChars')) {
|
|
157
|
-
set.unset.push('bodyChars');
|
|
158
|
-
}
|
|
159
|
-
const revised = CONTENT_KEYS.some(key => out[key] !== undefined || set.unset.includes(key));
|
|
160
|
-
if (revised) {
|
|
161
|
-
const revision = nextRevision(card, slot);
|
|
162
|
-
if (revision != null) {
|
|
163
|
-
out.revision = revision;
|
|
133
|
+
};
|
|
134
|
+
const reviseInto = (card, slot, set) => {
|
|
135
|
+
if (card.kind !== WorkcardKind.Specification) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
const out = set.changes;
|
|
139
|
+
if (out.body !== undefined) {
|
|
140
|
+
out.bodyChars = specificationHelper.bodyCharsOf(out.body);
|
|
141
|
+
}
|
|
142
|
+
else if (set.unset.includes('body') && !set.unset.includes('bodyChars')) {
|
|
143
|
+
set.unset.push('bodyChars');
|
|
144
|
+
}
|
|
145
|
+
const revised = CONTENT_KEYS.some(key => out[key] !== undefined || set.unset.includes(key));
|
|
146
|
+
if (revised) {
|
|
147
|
+
const revision = specificationHelper.nextRevision(card, slot);
|
|
148
|
+
if (revision != null) {
|
|
149
|
+
out.revision = revision;
|
|
150
|
+
}
|
|
164
151
|
}
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
const createOf = (exec, type, registry, at, slot) => {
|
|
168
|
-
if (typeof exec.card === 'string') {
|
|
169
|
-
throw new PlanningError('malformed:create-without-draft');
|
|
170
|
-
}
|
|
171
|
-
const draft = exec.card;
|
|
172
|
-
const overlay = Object.fromEntries(Object.entries(exec.changes ?? {})
|
|
173
|
-
.filter(([key]) => !FLOW_KEYS.includes(key) && !IDENTITY_KEYS.includes(key) && !DERIVED_KEYS.includes(key)));
|
|
174
|
-
const parent = overlay.parent ?? draft.parent;
|
|
175
|
-
const flows = initialFlowsOf(type, registry, draft.status ?? exec.changes?.status);
|
|
176
|
-
const intrinsic = resolveIntrinsic(type, flows, registry);
|
|
177
|
-
const record = {
|
|
178
|
-
title: draft.title,
|
|
179
|
-
description: draft.description,
|
|
180
|
-
code: draft.code,
|
|
181
|
-
order: draft.order,
|
|
182
|
-
createdBy: draft.createdBy,
|
|
183
|
-
...overlay,
|
|
184
|
-
labels: [...new Set(overlay.labels ?? draft.labels ?? [])],
|
|
185
|
-
parent,
|
|
186
|
-
parents: normalizeParents(parent, overlay.parents ?? draft.parents),
|
|
187
|
-
fields: mergeFields(draft.fields, overlay.fields),
|
|
188
|
-
flows,
|
|
189
|
-
status: flows[primaryFlowOf(type)],
|
|
190
|
-
intrinsic,
|
|
191
|
-
closedAt: intrinsic === IntrinsicStatus.Closed ? at : undefined,
|
|
192
152
|
};
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
153
|
+
const createOf = (exec, type, registry, at, slot) => {
|
|
154
|
+
if (typeof exec.card === 'string') {
|
|
155
|
+
throw new PlanningError('malformed:create-without-draft');
|
|
156
|
+
}
|
|
157
|
+
const draft = exec.card;
|
|
158
|
+
const overlay = Object.fromEntries(Object.entries(exec.changes ?? {})
|
|
159
|
+
.filter(([key]) => !FLOW_KEYS.includes(key) && !IDENTITY_KEYS.includes(key) && !PROVENANCE_KEYS.includes(key)
|
|
160
|
+
&& !DERIVED_KEYS.includes(key)));
|
|
161
|
+
const parent = overlay.parent ?? draft.parent;
|
|
162
|
+
const flows = statusHelper.initialFlowsOf(type, registry, draft.status ?? exec.changes?.status);
|
|
163
|
+
const intrinsic = statusHelper.resolveIntrinsic(type, flows, registry);
|
|
164
|
+
const record = {
|
|
165
|
+
title: draft.title,
|
|
166
|
+
description: draft.description,
|
|
167
|
+
code: draft.code,
|
|
168
|
+
order: draft.order,
|
|
169
|
+
createdBy: draft.createdBy,
|
|
170
|
+
reporter: draft.reporter,
|
|
171
|
+
assignee: draft.assignee,
|
|
172
|
+
mode: draft.mode ?? (draft.kind === WorkcardKind.Project ? 'opened' : undefined),
|
|
173
|
+
...overlay,
|
|
174
|
+
labels: [...new Set(overlay.labels ?? draft.labels ?? [])],
|
|
175
|
+
parent,
|
|
176
|
+
parents: cardHelper.normalizeParents(parent, overlay.parents ?? draft.parents),
|
|
177
|
+
fields: mergeFields(draft.fields, overlay.fields),
|
|
178
|
+
flows,
|
|
179
|
+
status: flows[statusHelper.primaryFlowOf(type)],
|
|
180
|
+
intrinsic,
|
|
181
|
+
closedAt: intrinsic === IntrinsicStatus.Closed ? at : undefined,
|
|
182
|
+
};
|
|
183
|
+
if (draft.kind === WorkcardKind.Specification) {
|
|
184
|
+
const body = overlay.body ?? draft.body;
|
|
185
|
+
Object.assign(record, {
|
|
186
|
+
category: overlay.category ?? draft.category ?? slot?.category,
|
|
187
|
+
format: overlay.format ?? draft.format ?? slot?.format ?? SpecificationFormat.Markdown,
|
|
188
|
+
body,
|
|
189
|
+
ref: overlay.ref ?? draft.ref,
|
|
190
|
+
version: overlay.version ?? draft.version ?? slot?.version,
|
|
191
|
+
bodyChars: specificationHelper.bodyCharsOf(body),
|
|
192
|
+
revision: specificationHelper.nextRevision(null, slot),
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
return { changes: clean(record), unset: [] };
|
|
196
|
+
};
|
|
197
|
+
const computeChanges = (card, exec, type, registry, at, opts) => {
|
|
198
|
+
if (exec.action === TransitionAction.Create) {
|
|
199
|
+
return createOf(exec, type, registry, at, opts?.slot);
|
|
200
|
+
}
|
|
201
|
+
const set = { changes: {}, unset: [] };
|
|
202
|
+
if (exec.action !== TransitionAction.Update && exec.action !== TransitionAction.Transit) {
|
|
203
|
+
return set;
|
|
204
|
+
}
|
|
205
|
+
if (card == null) {
|
|
206
|
+
throw new PlanningError(`malformed:${exec.action}-without-card`);
|
|
207
|
+
}
|
|
208
|
+
if (exec.action === TransitionAction.Update) {
|
|
209
|
+
diffInto(card, exec.changes, [], set);
|
|
210
|
+
unsetInto(card, exec.unset, set);
|
|
211
|
+
reparent(card, set);
|
|
212
|
+
reviseInto(card, opts?.slot, set);
|
|
213
|
+
return set;
|
|
214
|
+
}
|
|
215
|
+
if (exec.transition == null) {
|
|
216
|
+
throw new PlanningError('malformed:transit-without-transition');
|
|
217
|
+
}
|
|
218
|
+
const primary = statusHelper.primaryFlowOf(type);
|
|
219
|
+
const flowId = exec.flow ?? primary;
|
|
220
|
+
const flow = registry.flow(flowId);
|
|
221
|
+
const from = card.flows[flowId] ?? (flowId === primary ? card.status : statusHelper.initialStatusOf(flow));
|
|
222
|
+
const rule = statusHelper.ruleOf(flow, exec.transition, from);
|
|
223
|
+
if (rule == null) {
|
|
224
|
+
throw new IllegalTransition(`${flowId}:${exec.transition}:${from}`);
|
|
225
|
+
}
|
|
226
|
+
diffInto(card, exec.changes, FLOW_KEYS, set);
|
|
227
|
+
unsetInto(card, exec.unset?.filter(path => !FLOW_KEYS.includes(path.split('.')[0])), set);
|
|
239
228
|
reparent(card, set);
|
|
240
229
|
reviseInto(card, opts?.slot, set);
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
const
|
|
259
|
-
|
|
260
|
-
if (flowId === primary) {
|
|
261
|
-
set.changes.status = rule.to;
|
|
262
|
-
}
|
|
263
|
-
const intrinsic = resolveIntrinsic(type, flows, registry);
|
|
264
|
-
if (intrinsic !== card.intrinsic) {
|
|
265
|
-
set.changes.intrinsic = intrinsic;
|
|
266
|
-
}
|
|
267
|
-
if (intrinsic === IntrinsicStatus.Closed && card.intrinsic !== IntrinsicStatus.Closed) {
|
|
268
|
-
set.changes.closedAt = at;
|
|
269
|
-
}
|
|
270
|
-
else if (intrinsic !== IntrinsicStatus.Closed && card.closedAt != null) {
|
|
271
|
-
set.unset.push('closedAt');
|
|
272
|
-
}
|
|
273
|
-
return { ...set, flow: flowId, from, to: rule.to };
|
|
230
|
+
const flows = { ...card.flows, [flowId]: rule.to };
|
|
231
|
+
set.changes.flows = { [flowId]: rule.to };
|
|
232
|
+
if (flowId === primary) {
|
|
233
|
+
set.changes.status = rule.to;
|
|
234
|
+
}
|
|
235
|
+
const intrinsic = statusHelper.resolveIntrinsic(type, flows, registry);
|
|
236
|
+
if (intrinsic !== card.intrinsic) {
|
|
237
|
+
set.changes.intrinsic = intrinsic;
|
|
238
|
+
}
|
|
239
|
+
if (intrinsic === IntrinsicStatus.Closed && card.intrinsic !== IntrinsicStatus.Closed) {
|
|
240
|
+
set.changes.closedAt = at;
|
|
241
|
+
}
|
|
242
|
+
else if (intrinsic !== IntrinsicStatus.Closed && card.closedAt != null) {
|
|
243
|
+
set.unset.push('closedAt');
|
|
244
|
+
}
|
|
245
|
+
return { ...set, flow: flowId, from, to: rule.to };
|
|
246
|
+
};
|
|
247
|
+
const isEmptyChange = (set) => set.unset.length === 0 && Object.entries(set.changes).every(([, value]) => value === undefined || (isPlainObject(value) && Object.keys(value).length === 0));
|
|
248
|
+
return { sameValue, mergeFields, applyUnset, assertMutable, computeChanges, isEmptyChange };
|
|
274
249
|
};
|
|
275
|
-
|
|
276
|
-
|
|
250
|
+
export const changesHelper = createChangesHelper();
|
|
251
|
+
/** @deprecated compat:factory-refactor — use `changesHelper.sameValue(…)` */
|
|
252
|
+
export const sameValue = (left, right) => changesHelper.sameValue(left, right);
|
|
253
|
+
/** @deprecated compat:factory-refactor — use `changesHelper.mergeFields(…)` */
|
|
254
|
+
export const mergeFields = (base, patch) => changesHelper.mergeFields(base, patch);
|
|
255
|
+
/** @deprecated compat:factory-refactor — use `changesHelper.applyUnset(…)` */
|
|
256
|
+
export const applyUnset = (record, unset) => changesHelper.applyUnset(record, unset);
|
|
257
|
+
/** @deprecated compat:factory-refactor — use `changesHelper.assertMutable(…)` */
|
|
258
|
+
export const assertMutable = (exec, type) => changesHelper.assertMutable(exec, type);
|
|
259
|
+
/** @deprecated compat:factory-refactor — use `changesHelper.computeChanges(…)` */
|
|
260
|
+
export const computeChanges = (card, exec, type, registry, at, opts) => changesHelper.computeChanges(card, exec, type, registry, at, opts);
|
|
261
|
+
/** @deprecated compat:factory-refactor — use `changesHelper.isEmptyChange(…)` */
|
|
262
|
+
export const isEmptyChange = (set) => changesHelper.isEmptyChange(set);
|
|
277
263
|
//# sourceMappingURL=changes.js.map
|