@stalfh233/omc-cli 0.4.50 → 0.4.51

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.
Files changed (2) hide show
  1. package/dist/write.js +2 -2
  2. package/package.json +1 -1
package/dist/write.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { existsSync, readdirSync, readFileSync } from "node:fs";
4
- import { join } from "node:path";
4
+ import { basename, join } from "node:path";
5
5
  /** Parse a JSON string for the dry-lint; unparseable input returns undefined so the shape validators report it. */
6
6
  function parseJsonOrUndefined(text) {
7
7
  try {
@@ -151,7 +151,7 @@ async function governedWrite(ctx, tool, args, execute, dryRunPayload) {
151
151
  rollbackable: rollbackBefore !== undefined && !rollbackCaptureError,
152
152
  ...(rollbackCaptureError ? { note: `before-capture failed: ${rollbackCaptureError}` } : {}),
153
153
  artifactFile: artifactRef.detailFile,
154
- artifactId: artifactRef.detailFile.split("/").pop()?.replace(/\.json$/, "") ?? "",
154
+ artifactId: basename(artifactRef.detailFile).replace(/\.artifact$/, "") || basename(artifactRef.detailFile),
155
155
  artifactSha: artifactRef.detailSha256,
156
156
  });
157
157
  rollbackRef = { seq: entry.seq, hint: `omc rollback plan ${entry.seq}(--env ${entry.environment})` };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stalfh233/omc-cli",
3
- "version": "0.4.50",
3
+ "version": "0.4.51",
4
4
  "description": "CloudPivot 8.6 configuration capability CLI — governed, fail-closed, coverage-manifest bounded.",
5
5
  "type": "module",
6
6
  "bin": {