@harness-engineering/core 0.23.8 → 0.25.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.
- package/dist/architecture/matchers.js +4 -2
- package/dist/architecture/matchers.mjs +1 -1
- package/dist/{chunk-CE225WRK.mjs → chunk-4UI65RLE.mjs} +12 -2
- package/dist/index.d.mts +494 -5
- package/dist/index.d.ts +494 -5
- package/dist/index.js +2081 -496
- package/dist/index.mjs +2094 -523
- package/package.json +4 -3
|
@@ -2318,8 +2318,9 @@ var ForbiddenImportCollector = class {
|
|
|
2318
2318
|
// src/architecture/collectors/module-size.ts
|
|
2319
2319
|
var import_promises2 = require("fs/promises");
|
|
2320
2320
|
var import_node_path3 = require("path");
|
|
2321
|
+
var import_graph = require("@harness-engineering/graph");
|
|
2321
2322
|
function isSkippedEntry(name) {
|
|
2322
|
-
return name.startsWith(".") || name
|
|
2323
|
+
return name.startsWith(".") || import_graph.DEFAULT_SKIP_DIRS.has(name);
|
|
2323
2324
|
}
|
|
2324
2325
|
function isTsSourceFile(name) {
|
|
2325
2326
|
if (!name.endsWith(".ts") && !name.endsWith(".tsx")) return false;
|
|
@@ -2459,6 +2460,7 @@ var ModuleSizeCollector = class {
|
|
|
2459
2460
|
// src/architecture/collectors/dep-depth.ts
|
|
2460
2461
|
var import_promises3 = require("fs/promises");
|
|
2461
2462
|
var import_node_path4 = require("path");
|
|
2463
|
+
var import_graph2 = require("@harness-engineering/graph");
|
|
2462
2464
|
function extractImportSources(content, filePath) {
|
|
2463
2465
|
const importRegex = /(?:import|export)\s+.*?from\s+['"](\.[^'"]+)['"]/g;
|
|
2464
2466
|
const dynamicRegex = /import\s*\(\s*['"](\.[^'"]+)['"]\s*\)/g;
|
|
@@ -2477,7 +2479,7 @@ function extractImportSources(content, filePath) {
|
|
|
2477
2479
|
return sources;
|
|
2478
2480
|
}
|
|
2479
2481
|
function isSkippedEntry2(name) {
|
|
2480
|
-
return name.startsWith(".") || name
|
|
2482
|
+
return name.startsWith(".") || import_graph2.DEFAULT_SKIP_DIRS.has(name);
|
|
2481
2483
|
}
|
|
2482
2484
|
function isTsSourceFile2(name) {
|
|
2483
2485
|
if (!name.endsWith(".ts") && !name.endsWith(".tsx")) return false;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __export = (target, all) => {
|
|
3
|
+
for (var name in all)
|
|
4
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
|
+
};
|
|
6
|
+
|
|
1
7
|
// src/architecture/types.ts
|
|
2
8
|
import { z } from "zod";
|
|
3
9
|
var ArchMetricCategorySchema = z.enum([
|
|
@@ -2359,8 +2365,9 @@ var ForbiddenImportCollector = class {
|
|
|
2359
2365
|
// src/architecture/collectors/module-size.ts
|
|
2360
2366
|
import { readFile as readFile3, readdir } from "fs/promises";
|
|
2361
2367
|
import { join as join2 } from "path";
|
|
2368
|
+
import { DEFAULT_SKIP_DIRS } from "@harness-engineering/graph";
|
|
2362
2369
|
function isSkippedEntry(name) {
|
|
2363
|
-
return name.startsWith(".") || name
|
|
2370
|
+
return name.startsWith(".") || DEFAULT_SKIP_DIRS.has(name);
|
|
2364
2371
|
}
|
|
2365
2372
|
function isTsSourceFile(name) {
|
|
2366
2373
|
if (!name.endsWith(".ts") && !name.endsWith(".tsx")) return false;
|
|
@@ -2500,6 +2507,7 @@ var ModuleSizeCollector = class {
|
|
|
2500
2507
|
// src/architecture/collectors/dep-depth.ts
|
|
2501
2508
|
import { readFile as readFile4, readdir as readdir2 } from "fs/promises";
|
|
2502
2509
|
import { join as join3, dirname as dirname3, resolve as resolve2 } from "path";
|
|
2510
|
+
import { DEFAULT_SKIP_DIRS as DEFAULT_SKIP_DIRS2 } from "@harness-engineering/graph";
|
|
2503
2511
|
function extractImportSources(content, filePath) {
|
|
2504
2512
|
const importRegex = /(?:import|export)\s+.*?from\s+['"](\.[^'"]+)['"]/g;
|
|
2505
2513
|
const dynamicRegex = /import\s*\(\s*['"](\.[^'"]+)['"]\s*\)/g;
|
|
@@ -2518,7 +2526,7 @@ function extractImportSources(content, filePath) {
|
|
|
2518
2526
|
return sources;
|
|
2519
2527
|
}
|
|
2520
2528
|
function isSkippedEntry2(name) {
|
|
2521
|
-
return name.startsWith(".") || name
|
|
2529
|
+
return name.startsWith(".") || DEFAULT_SKIP_DIRS2.has(name);
|
|
2522
2530
|
}
|
|
2523
2531
|
function isTsSourceFile2(name) {
|
|
2524
2532
|
if (!name.endsWith(".ts") && !name.endsWith(".tsx")) return false;
|
|
@@ -2848,6 +2856,7 @@ var archMatchers = {
|
|
|
2848
2856
|
};
|
|
2849
2857
|
|
|
2850
2858
|
export {
|
|
2859
|
+
__export,
|
|
2851
2860
|
createError,
|
|
2852
2861
|
createEntropyError,
|
|
2853
2862
|
Ok,
|
|
@@ -2865,6 +2874,7 @@ export {
|
|
|
2865
2874
|
resetParserCache,
|
|
2866
2875
|
getOutline,
|
|
2867
2876
|
formatOutline,
|
|
2877
|
+
getDefaultRegistry,
|
|
2868
2878
|
defineLayer,
|
|
2869
2879
|
resolveFileToLayer,
|
|
2870
2880
|
buildDependencyGraph,
|