arkaik 0.2.0 → 0.3.0

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 (3) hide show
  1. package/dist/index.js +757 -288
  2. package/dist/io.js +9 -4
  3. package/package.json +1 -1
package/dist/io.js CHANGED
@@ -16583,7 +16583,7 @@ function compactSlice(journalPath, slice, version2) {
16583
16583
 
16584
16584
  // src/lib/kritik-io.ts
16585
16585
  import { existsSync as existsSync4 } from "node:fs";
16586
- import { dirname as dirname3, join as join3 } from "node:path";
16586
+ import { basename, dirname as dirname3, join as join3, resolve as resolve2 } from "node:path";
16587
16587
  import { fileURLToPath } from "node:url";
16588
16588
 
16589
16589
  // ../schema/src/cli/kritik-paths.ts
@@ -16593,7 +16593,12 @@ var QUALITY_DIR = "docs/quality";
16593
16593
  var OVERLAY_FILE = "criteria.custom.json";
16594
16594
  var PACK_FILE = "library.json";
16595
16595
  function readJson(path) {
16596
- return JSON.parse(readFileSync3(path, "utf8"));
16596
+ const text = readFileSync3(path, "utf8");
16597
+ try {
16598
+ return JSON.parse(text);
16599
+ } catch (e) {
16600
+ throw new Error(`${path}: not valid JSON \u2014 ${e.message}`);
16601
+ }
16597
16602
  }
16598
16603
  var overlayPath = (root) => join2(root, QUALITY_DIR, OVERLAY_FILE);
16599
16604
  function loadOverlay(root) {
@@ -16641,7 +16646,7 @@ function appendQualityEvents(root, inputs, options = {}) {
16641
16646
 
16642
16647
  // src/lib/bundle-validate.ts
16643
16648
  import { existsSync as existsSync5, readFileSync as readFileSync4 } from "node:fs";
16644
- import { basename } from "node:path";
16649
+ import { basename as basename2 } from "node:path";
16645
16650
  function validateBundleAt(filePath) {
16646
16651
  const bundle = readBundle(filePath);
16647
16652
  const loose = bundle;
@@ -16663,7 +16668,7 @@ function validateBundleAt(filePath) {
16663
16668
  }
16664
16669
  for (const archivePath of archivePathsFor(sidecarPath)) {
16665
16670
  const { events, findings } = parseJournalLines(readFileSync4(archivePath, "utf8"));
16666
- const file2 = basename(archivePath);
16671
+ const file2 = basename2(archivePath);
16667
16672
  for (const finding of findings) archiveFindings.push({ ...finding, file: file2 });
16668
16673
  archivesLoaded.push(file2);
16669
16674
  folded.push(...events);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arkaik",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Arkaik CLI — link a repository to a hosted product graph, validate and pack bundles, mirror external ref status.",
5
5
  "license": "MIT",
6
6
  "type": "module",