nerdgram1337 1.7.5 → 1.8.6
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/{chunk-53YCVNDJ.js → chunk-2WFLIMQG.js} +9 -2
- package/dist/chunk-3WBI2WV6.js +18 -0
- package/dist/{chunk-R3RZTEM3.js → chunk-46CLFN4M.js} +22 -4
- package/dist/{chunk-P666JXDB.js → chunk-7NPZMMPE.js} +6 -4
- package/dist/{chunk-GDPSIPXV.js → chunk-7O4HSURR.js} +12 -5
- package/dist/{chunk-KA5X3YY6.js → chunk-7XBDBMFZ.js} +9 -60
- package/dist/{chunk-6ELR2KYA.js → chunk-ARL7TA3D.js} +1744 -1743
- package/dist/chunk-DHVVDJDI.js +470 -0
- package/dist/chunk-DWP7W42J.js +12 -0
- package/dist/{chunk-7GEA3JEU.js → chunk-GD2NZSZO.js} +40 -18
- package/dist/chunk-GI4QATKE.js +87 -0
- package/dist/chunk-GK3V52XM.js +70 -0
- package/dist/chunk-KIK3WXJL.js +959 -0
- package/dist/{chunk-RB3SBRHP.js → chunk-M4HT24R6.js} +21 -9
- package/dist/chunk-M63FV47T.js +14 -0
- package/dist/chunk-TDN24VZZ.js +196 -0
- package/dist/chunk-TFNQIO7Z.js +21 -0
- package/dist/{chunk-5IHMGYXV.js → chunk-TVIG7AQK.js} +1 -1
- package/dist/chunk-WYQ4QDCF.js +85 -0
- package/dist/chunk-XC6UP46Q.js +15 -0
- package/dist/cli.js +135 -6
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readFile,
|
|
3
3
|
writeFile
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DHVVDJDI.js";
|
|
5
5
|
import {
|
|
6
6
|
REPO_ROOT,
|
|
7
7
|
ensureDataRoot,
|
|
@@ -11,7 +11,14 @@ import {
|
|
|
11
11
|
resolveAvailablePath,
|
|
12
12
|
resolveSafePath,
|
|
13
13
|
toRelativePath
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7XBDBMFZ.js";
|
|
15
|
+
import "./chunk-TDN24VZZ.js";
|
|
16
|
+
import "./chunk-GK3V52XM.js";
|
|
17
|
+
import "./chunk-M4HT24R6.js";
|
|
18
|
+
import "./chunk-WCRNLGMN.js";
|
|
19
|
+
import "./chunk-WYQ4QDCF.js";
|
|
20
|
+
import "./chunk-ARL7TA3D.js";
|
|
21
|
+
import "./chunk-M63FV47T.js";
|
|
15
22
|
import "./chunk-BW6ANOTX.js";
|
|
16
23
|
import {
|
|
17
24
|
applyDiagramPatch,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
clearDiagramLintCache,
|
|
3
|
+
diagramLintSummary,
|
|
4
|
+
invalidateDiagramLint,
|
|
5
|
+
lintWorkspaceCached
|
|
6
|
+
} from "./chunk-TDN24VZZ.js";
|
|
7
|
+
import "./chunk-GK3V52XM.js";
|
|
8
|
+
import "./chunk-M4HT24R6.js";
|
|
9
|
+
import "./chunk-WCRNLGMN.js";
|
|
10
|
+
import "./chunk-BW6ANOTX.js";
|
|
11
|
+
import "./chunk-6LCHDAAN.js";
|
|
12
|
+
import "./chunk-MLKGABMK.js";
|
|
13
|
+
export {
|
|
14
|
+
clearDiagramLintCache,
|
|
15
|
+
diagramLintSummary,
|
|
16
|
+
invalidateDiagramLint,
|
|
17
|
+
lintWorkspaceCached
|
|
18
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildTree,
|
|
3
|
-
readFile
|
|
4
|
-
|
|
3
|
+
readFile,
|
|
4
|
+
skippedUnreadable
|
|
5
|
+
} from "./chunk-DHVVDJDI.js";
|
|
5
6
|
import {
|
|
6
7
|
atomicWriteJson,
|
|
7
8
|
getDataRoot,
|
|
@@ -9,7 +10,16 @@ import {
|
|
|
9
10
|
httpFail,
|
|
10
11
|
readJsonFile,
|
|
11
12
|
rewriteMovedPath
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7XBDBMFZ.js";
|
|
14
|
+
import "./chunk-TDN24VZZ.js";
|
|
15
|
+
import {
|
|
16
|
+
warnUnreadable
|
|
17
|
+
} from "./chunk-GK3V52XM.js";
|
|
18
|
+
import "./chunk-M4HT24R6.js";
|
|
19
|
+
import "./chunk-WCRNLGMN.js";
|
|
20
|
+
import "./chunk-WYQ4QDCF.js";
|
|
21
|
+
import "./chunk-ARL7TA3D.js";
|
|
22
|
+
import "./chunk-M63FV47T.js";
|
|
13
23
|
import "./chunk-BW6ANOTX.js";
|
|
14
24
|
import {
|
|
15
25
|
literalLocator,
|
|
@@ -896,7 +906,15 @@ async function searchDiagrams(options) {
|
|
|
896
906
|
}
|
|
897
907
|
const hits = [];
|
|
898
908
|
for (const file of files) {
|
|
899
|
-
|
|
909
|
+
let entry;
|
|
910
|
+
try {
|
|
911
|
+
entry = await entryFor(file, current);
|
|
912
|
+
} catch (err) {
|
|
913
|
+
const skipped = skippedUnreadable(file.path, err);
|
|
914
|
+
if (!skipped) throw err;
|
|
915
|
+
warnUnreadable([skipped]);
|
|
916
|
+
continue;
|
|
917
|
+
}
|
|
900
918
|
const match = matchDiagramSearch(
|
|
901
919
|
{
|
|
902
920
|
path: file.path,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
locateParseError
|
|
3
|
-
} from "./chunk-WCRNLGMN.js";
|
|
4
1
|
import {
|
|
5
2
|
httpFail,
|
|
6
3
|
sanitizeThumbnailSvg
|
|
7
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7XBDBMFZ.js";
|
|
5
|
+
import "./chunk-GK3V52XM.js";
|
|
6
|
+
import {
|
|
7
|
+
locateParseError
|
|
8
|
+
} from "./chunk-WCRNLGMN.js";
|
|
9
|
+
import "./chunk-M63FV47T.js";
|
|
8
10
|
import {
|
|
9
11
|
diagramInitConfig,
|
|
10
12
|
withNodeLabelRoom
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
importInputFromBody
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TVIG7AQK.js";
|
|
4
|
+
import "./chunk-DHVVDJDI.js";
|
|
5
|
+
import "./chunk-7XBDBMFZ.js";
|
|
6
|
+
import "./chunk-TDN24VZZ.js";
|
|
7
|
+
import "./chunk-GK3V52XM.js";
|
|
8
|
+
import "./chunk-M4HT24R6.js";
|
|
9
|
+
import "./chunk-WCRNLGMN.js";
|
|
10
|
+
import "./chunk-WYQ4QDCF.js";
|
|
4
11
|
import {
|
|
5
12
|
canonicalIp,
|
|
6
13
|
validateNetwork
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-ARL7TA3D.js";
|
|
15
|
+
import "./chunk-M63FV47T.js";
|
|
9
16
|
import "./chunk-BW6ANOTX.js";
|
|
10
17
|
import "./chunk-6LCHDAAN.js";
|
|
11
18
|
import {
|
|
@@ -3151,8 +3158,8 @@ var zabbix_default = zabbix;
|
|
|
3151
3158
|
// server/src/translators/bundled.ts
|
|
3152
3159
|
function take(mod, file) {
|
|
3153
3160
|
const value = mod.default;
|
|
3154
|
-
if (!value || typeof value !== "object" || typeof value.convert
|
|
3155
|
-
throw new Error(file + " must default-export a
|
|
3161
|
+
if (!value || typeof value !== "object" || !(typeof value.convert === "function") || typeof value.id !== "string") {
|
|
3162
|
+
throw new Error(file + " must default-export a module.");
|
|
3156
3163
|
}
|
|
3157
3164
|
return value;
|
|
3158
3165
|
}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
errnoFrom,
|
|
3
|
+
isKnownReadErrno,
|
|
4
|
+
unreadableMessage
|
|
5
|
+
} from "./chunk-GK3V52XM.js";
|
|
6
|
+
import {
|
|
7
|
+
dataFileExtension
|
|
8
|
+
} from "./chunk-M63FV47T.js";
|
|
9
|
+
|
|
1
10
|
// server/src/paths.ts
|
|
2
11
|
import fs2 from "node:fs";
|
|
3
12
|
import path2 from "node:path";
|
|
@@ -152,18 +161,6 @@ function getMetaPath() {
|
|
|
152
161
|
import { createHash, randomBytes } from "node:crypto";
|
|
153
162
|
import fs3 from "node:fs/promises";
|
|
154
163
|
import path3 from "node:path";
|
|
155
|
-
|
|
156
|
-
// server/src/dataFiles.ts
|
|
157
|
-
var DATA_FILE_EXTENSIONS = [".network.json", ".csv", ".json", ".cdp", ".lldp"];
|
|
158
|
-
function dataFileExtension(name) {
|
|
159
|
-
const lower = name.toLowerCase();
|
|
160
|
-
return DATA_FILE_EXTENSIONS.find((ext) => lower.endsWith(ext)) ?? "";
|
|
161
|
-
}
|
|
162
|
-
function isDataFileName(name) {
|
|
163
|
-
return dataFileExtension(name) !== "";
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// server/src/storage.ts
|
|
167
164
|
var REVISION_RETENTION = 20;
|
|
168
165
|
var LOCK_STALE_MS = 9e4;
|
|
169
166
|
var MTIME_MATCH_TOLERANCE_MS = 1;
|
|
@@ -313,53 +310,6 @@ import * as cheerio from "cheerio";
|
|
|
313
310
|
import fs5 from "node:fs/promises";
|
|
314
311
|
import path4 from "node:path";
|
|
315
312
|
|
|
316
|
-
// server/src/readError.ts
|
|
317
|
-
var READ_REASONS = {
|
|
318
|
-
EIO: "The file may still be syncing or the folder may be unavailable on this computer",
|
|
319
|
-
EACCES: "This computer does not have permission to read the file",
|
|
320
|
-
EPERM: "This computer does not have permission to read the file",
|
|
321
|
-
ENOENT: "The file was removed or renamed before it could be read",
|
|
322
|
-
EBUSY: "The file is busy and could not be read",
|
|
323
|
-
ETIMEDOUT: "Reading the file timed out. The folder may be slow or unavailable"
|
|
324
|
-
};
|
|
325
|
-
var KNOWN_READ_ERRNOS = new Set(Object.keys(READ_REASONS));
|
|
326
|
-
function isKnownReadErrno(code) {
|
|
327
|
-
return KNOWN_READ_ERRNOS.has(code);
|
|
328
|
-
}
|
|
329
|
-
function fileLabel(filePath) {
|
|
330
|
-
const absolute = filePath.startsWith("/") || /^[A-Za-z]:[\\/]/.test(filePath);
|
|
331
|
-
if (!absolute) return filePath || "diagram";
|
|
332
|
-
const slash = Math.max(filePath.lastIndexOf("/"), filePath.lastIndexOf("\\"));
|
|
333
|
-
const name = slash >= 0 ? filePath.slice(slash + 1) : filePath;
|
|
334
|
-
return name || filePath;
|
|
335
|
-
}
|
|
336
|
-
function unreadableMessage(filePath, code) {
|
|
337
|
-
const reason = READ_REASONS[code] ?? "The file could not be read";
|
|
338
|
-
const suffix = code ? ` (${code})` : "";
|
|
339
|
-
return `Couldn't read \`${fileLabel(filePath)}\`. ${reason}${suffix}.`;
|
|
340
|
-
}
|
|
341
|
-
function detailsErrno(err) {
|
|
342
|
-
if (!err || typeof err !== "object" || !("details" in err)) return "";
|
|
343
|
-
const details = err.details;
|
|
344
|
-
if (!details || typeof details !== "object" || !("errno" in details)) return "";
|
|
345
|
-
const errno = details.errno;
|
|
346
|
-
return typeof errno === "string" ? errno : "";
|
|
347
|
-
}
|
|
348
|
-
function errnoInText(err) {
|
|
349
|
-
const message = err instanceof Error ? err.message : "";
|
|
350
|
-
const match = message.match(/\b(EIO|EACCES|EPERM|ENOENT|EBUSY|ETIMEDOUT)\b/);
|
|
351
|
-
return match?.[1] ?? "";
|
|
352
|
-
}
|
|
353
|
-
function errnoFrom(err) {
|
|
354
|
-
const fromDetails = detailsErrno(err);
|
|
355
|
-
if (/^E[A-Z0-9]+$/.test(fromDetails)) return fromDetails;
|
|
356
|
-
if (err && typeof err === "object" && "code" in err) {
|
|
357
|
-
const code = String(err.code);
|
|
358
|
-
if (/^E[A-Z0-9]+$/.test(code)) return code;
|
|
359
|
-
}
|
|
360
|
-
return errnoInText(err);
|
|
361
|
-
}
|
|
362
|
-
|
|
363
313
|
// server/src/readFailure.ts
|
|
364
314
|
function rethrowKnownReadError(filePath, err) {
|
|
365
315
|
if (err && typeof err === "object" && "status" in err) return;
|
|
@@ -457,7 +407,6 @@ async function dropThumbnail(relativePath) {
|
|
|
457
407
|
}
|
|
458
408
|
|
|
459
409
|
export {
|
|
460
|
-
isDataFileName,
|
|
461
410
|
getInstanceIdentity,
|
|
462
411
|
REPO_ROOT,
|
|
463
412
|
getDataRoot,
|