You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduces a shared, key-order-insensitive content comparison
(`canonicalEqual` in @finos/calm-shared) and uses it to add a strict,
non-bumping `--fail-if-modified` mode to `calm hub push` for
architecture, pattern and standard documents:
- brand-new mapping -> created at 1.0.0 (unchanged behaviour)
- exists + unchanged -> skipped (no new version, file left as-is)
- exists + modified -> push fails
Default behaviour (auto-bump) is unchanged. The comparison helper is
shared so it can be reused by other push paths without duplication.
Claude-Session: https://claude.ai/code/session_01QiHAHdi4d4mCoy4wku5s2v
- Resources span architectures, patterns, standards, control-requirements, control-configurations, namespaces, and domains (which subcommands exist varies per verb).
62
+
-`hub push architecture|pattern|standard` auto-bumps by default (creates a new version off the latest). The `--fail-if-modified` flag switches to a strict, non-bumping mode: a brand-new mapping is still created at `1.0.0`, an unchanged document is skipped, and a document that differs from the latest published version fails the push. Content comparison uses `canonicalEqual` from `@finos/calm-shared` (key-order-insensitive).
Copy file name to clipboardExpand all lines: cli/src/cli.ts
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -463,6 +463,9 @@ Example:
463
463
.choices(['patch','minor','major'])
464
464
.default('patch');
465
465
466
+
consthubFailIfModifiedOption=newOption('--fail-if-modified','Strict mode: do not auto-bump. Skip if the document is unchanged from the latest published version; fail if it has changed. A brand-new mapping is still created at 1.0.0.')
467
+
.default(false);
468
+
466
469
consthubCmd=newCommand('hub').description('Interact with CALM Hub');
467
470
468
471
// hub push
@@ -476,14 +479,16 @@ Example:
476
479
.option(CALMHUB_URL_OPTION,'URL to CALMHub instance')
0 commit comments