@hcmai/sdk 0.3.13 → 0.3.14
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/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5447,7 +5447,7 @@ function parseSettingAssignment(raw) {
|
|
|
5447
5447
|
|
|
5448
5448
|
// src/fde/layout.ts
|
|
5449
5449
|
import { createHash as createHash3 } from "crypto";
|
|
5450
|
-
import { mkdirSync, readFileSync as readFileSync2, writeFileSync } from "fs";
|
|
5450
|
+
import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2, writeFileSync } from "fs";
|
|
5451
5451
|
import * as path6 from "path";
|
|
5452
5452
|
var UNSAFE = /[^A-Za-z0-9._-]/g;
|
|
5453
5453
|
function slug(value) {
|
|
@@ -5777,7 +5777,7 @@ function networkOutcome() {
|
|
|
5777
5777
|
|
|
5778
5778
|
// src/fde/recon/runner.ts
|
|
5779
5779
|
import { randomBytes as randomBytes2 } from "crypto";
|
|
5780
|
-
import { existsSync as
|
|
5780
|
+
import { existsSync as existsSync4, readFileSync as readFileSync3, readdirSync } from "fs";
|
|
5781
5781
|
import * as path8 from "path";
|
|
5782
5782
|
|
|
5783
5783
|
// src/fde/recon/carry-over.ts
|
|
@@ -6754,7 +6754,7 @@ function writeModelsMd(layout, text) {
|
|
|
6754
6754
|
}
|
|
6755
6755
|
|
|
6756
6756
|
// src/fde/recon/pointer-audit.ts
|
|
6757
|
-
import { existsSync as
|
|
6757
|
+
import { existsSync as existsSync3 } from "fs";
|
|
6758
6758
|
import * as path7 from "path";
|
|
6759
6759
|
function isRecord3(v) {
|
|
6760
6760
|
return Boolean(v) && typeof v === "object" && !Array.isArray(v);
|
|
@@ -6768,7 +6768,7 @@ function auditValueDomainPointers(layout, sheets) {
|
|
|
6768
6768
|
const pointer = isRecord3(ref) ? ref.valueDomain : null;
|
|
6769
6769
|
if (typeof pointer !== "string" || pointer === "") continue;
|
|
6770
6770
|
if (!seen.has(pointer)) {
|
|
6771
|
-
seen.set(pointer,
|
|
6771
|
+
seen.set(pointer, existsSync3(path7.join(layout.dir, pointer)));
|
|
6772
6772
|
}
|
|
6773
6773
|
if (!seen.get(pointer)) {
|
|
6774
6774
|
problems.push(
|
|
@@ -7193,7 +7193,7 @@ function writeCrawledAt(layout, freshKeys, carriedKeys, roundId, started) {
|
|
|
7193
7193
|
return sorted;
|
|
7194
7194
|
}
|
|
7195
7195
|
function finishRound(layout, models, roundId, started, products) {
|
|
7196
|
-
const written = [...new Set(products.filter((rel) => rel &&
|
|
7196
|
+
const written = [...new Set(products.filter((rel) => rel && existsSync4(path8.join(layout.dir, rel))))].sort();
|
|
7197
7197
|
layout.writeJson(KIT_CRAWLED_AT_FILE, {
|
|
7198
7198
|
note: CRAWLED_AT_NOTE,
|
|
7199
7199
|
roundNote: ROUND_NOTE,
|
|
@@ -7211,7 +7211,7 @@ function relOf(layout, p) {
|
|
|
7211
7211
|
}
|
|
7212
7212
|
function productRoundId(root, rel) {
|
|
7213
7213
|
const p = path8.join(root, rel);
|
|
7214
|
-
if (!
|
|
7214
|
+
if (!existsSync4(p)) return ["missing", null];
|
|
7215
7215
|
const body = readJsonSoft(p);
|
|
7216
7216
|
if (body === void 0 || !isRecord5(body)) return ["unreadable", null];
|
|
7217
7217
|
const rid = body.roundId;
|
|
@@ -7227,7 +7227,7 @@ function inspectRound(root) {
|
|
|
7227
7227
|
const written = Array.isArray(rawWritten) ? rawWritten : null;
|
|
7228
7228
|
let ledgerMissing = null;
|
|
7229
7229
|
if (written !== null) {
|
|
7230
|
-
const gone = written.filter((rel) => typeof rel === "string" && !
|
|
7230
|
+
const gone = written.filter((rel) => typeof rel === "string" && !existsSync4(path8.join(root, rel))).sort();
|
|
7231
7231
|
ledgerMissing = { checked: written.length, count: gone.length, files: gone };
|
|
7232
7232
|
}
|
|
7233
7233
|
const products = [];
|
|
@@ -7577,7 +7577,7 @@ async function runRecon(probe, layout, opts = {}) {
|
|
|
7577
7577
|
}
|
|
7578
7578
|
|
|
7579
7579
|
// src/fde/gate0/aclass.ts
|
|
7580
|
-
import { existsSync as
|
|
7580
|
+
import { existsSync as existsSync5, readFileSync as readFileSync5, readdirSync as readdirSync2, statSync as statSync2 } from "fs";
|
|
7581
7581
|
import * as path9 from "path";
|
|
7582
7582
|
|
|
7583
7583
|
// src/fde/gate0/mapping-artifact.ts
|
|
@@ -7868,7 +7868,7 @@ function deriveAclass(root, mappingArtifact = null) {
|
|
|
7868
7868
|
}
|
|
7869
7869
|
}
|
|
7870
7870
|
const valueDomain = path9.join(root, VALUE_DOMAIN_DIR);
|
|
7871
|
-
if (
|
|
7871
|
+
if (existsSync5(valueDomain) && statSync2(valueDomain).isDirectory()) {
|
|
7872
7872
|
const tables = readdirSync2(valueDomain).filter((f) => f.endsWith(".json") && !RESERVED_FILENAMES.includes(f)).sort();
|
|
7873
7873
|
for (const name of tables) {
|
|
7874
7874
|
const file = path9.join(valueDomain, name);
|
|
@@ -7937,7 +7937,7 @@ function deriveAclass(root, mappingArtifact = null) {
|
|
|
7937
7937
|
}
|
|
7938
7938
|
|
|
7939
7939
|
// src/fde/gate0/facts.ts
|
|
7940
|
-
import { existsSync as
|
|
7940
|
+
import { existsSync as existsSync6, readFileSync as readFileSync6 } from "fs";
|
|
7941
7941
|
import * as path10 from "path";
|
|
7942
7942
|
var REGISTRY_SCOPE = "registry";
|
|
7943
7943
|
var ENTRY_SCOPE2 = "entry";
|
|
@@ -8022,7 +8022,7 @@ function loadProtocolFacts(entries = PROTOCOL_FACTS, options = {}) {
|
|
|
8022
8022
|
if (probeRoot !== void 0) {
|
|
8023
8023
|
const file = path10.join(probeRoot, shape.groups.file);
|
|
8024
8024
|
const mark = `${PROBE_MARK_PREFIX} ${shape.groups.mark}`;
|
|
8025
|
-
const found =
|
|
8025
|
+
const found = existsSync6(file) && readFileSync6(file, "utf8").includes(mark);
|
|
8026
8026
|
if (!found) {
|
|
8027
8027
|
problems.push({
|
|
8028
8028
|
scope: ENTRY_SCOPE2,
|