@aiready/core 0.24.18 → 0.24.19

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 CHANGED
@@ -361,7 +361,10 @@ var init_typescript_parser = __esm({
361
361
  if (sn.type === "FunctionDeclaration" || sn.type === "MethodDefinition") {
362
362
  const body = sn.type === "MethodDefinition" ? sn.value.body : sn.body;
363
363
  if (body && body.type === "BlockStatement") {
364
- const bodyContent = JSON.stringify(body);
364
+ const bodyContent = JSON.stringify(
365
+ body,
366
+ (_, v) => typeof v === "bigint" ? v.toString() : v
367
+ );
365
368
  if (bodyContent.includes('"name":"console"') || bodyContent.includes('"name":"process"') || bodyContent.includes('"name":"fs"') || bodyContent.includes('"name":"fetch"') || bodyContent.includes('"name":"axios"')) {
366
369
  return false;
367
370
  }
@@ -2973,6 +2976,7 @@ function getFileExtension(filePath) {
2973
2976
  return filePath.split(".").pop() || "";
2974
2977
  }
2975
2978
  function isSourceFile(filePath) {
2979
+ if (filePath.endsWith(".d.ts")) return false;
2976
2980
  const ext = getFileExtension(filePath);
2977
2981
  return ["ts", "tsx", "js", "jsx", "py", "java", "go", "rs"].includes(ext);
2978
2982
  }
@@ -4387,7 +4391,11 @@ var DEFAULT_TOOL_WEIGHTS = {
4387
4391
  ["doc-drift" /* DocDrift */]: 8,
4388
4392
  ["dependency-health" /* DependencyHealth */]: 6,
4389
4393
  ["change-amplification" /* ChangeAmplification */]: 8,
4390
- ["contract-enforcement" /* ContractEnforcement */]: 10
4394
+ ["contract-enforcement" /* ContractEnforcement */]: 10,
4395
+ ["cognitive-load" /* CognitiveLoad */]: 8,
4396
+ ["pattern-entropy" /* PatternEntropy */]: 8,
4397
+ ["concept-cohesion" /* ConceptCohesion */]: 10,
4398
+ ["semantic-distance" /* SemanticDistance */]: 10
4391
4399
  };
4392
4400
  var TOOL_NAME_MAP = {
4393
4401
  patterns: "pattern-detect" /* PatternDetect */,
@@ -6071,12 +6079,18 @@ function isLikelyEntryPoint(filePath) {
6071
6079
  "main",
6072
6080
  "bin",
6073
6081
  "index",
6074
- // often used as entry point
6075
6082
  "run",
6076
6083
  "serve",
6077
6084
  "start",
6078
6085
  "boot",
6079
- "init"
6086
+ "init",
6087
+ "parser",
6088
+ "config",
6089
+ "setup",
6090
+ "adapter",
6091
+ "provider",
6092
+ "handler",
6093
+ "vending"
6080
6094
  ];
6081
6095
  const nameWithoutExt = lowerBasename.replace(
6082
6096
  /\.(ts|js|tsx|jsx|mjs|cjs)$/,
@@ -6087,7 +6101,14 @@ function isLikelyEntryPoint(filePath) {
6087
6101
  )) {
6088
6102
  return true;
6089
6103
  }
6090
- const cliDirPatterns = ["/bin/", "/cli/", "/cmd/", "/commands/"];
6104
+ const cliDirPatterns = [
6105
+ "/bin/",
6106
+ "/cli/",
6107
+ "/cmd/",
6108
+ "/commands/",
6109
+ "/apps/",
6110
+ "/functions/"
6111
+ ];
6091
6112
  if (cliDirPatterns.some((p) => filePath.includes(p))) {
6092
6113
  return true;
6093
6114
  }
package/dist/index.mjs CHANGED
@@ -52,10 +52,10 @@ import {
52
52
  getToolWeight,
53
53
  normalizeToolName,
54
54
  parseWeightString
55
- } from "./chunk-GQMKSUA4.mjs";
55
+ } from "./chunk-3NEZ5M7Y.mjs";
56
56
  import {
57
57
  TypeScriptParser
58
- } from "./chunk-OT6FOHL4.mjs";
58
+ } from "./chunk-MOM3IXCA.mjs";
59
59
  import {
60
60
  PythonParser
61
61
  } from "./chunk-QY5YG2AZ.mjs";
@@ -518,6 +518,7 @@ function getFileExtension(filePath) {
518
518
  return filePath.split(".").pop() || "";
519
519
  }
520
520
  function isSourceFile(filePath) {
521
+ if (filePath.endsWith(".d.ts")) return false;
521
522
  const ext = getFileExtension(filePath);
522
523
  return ["ts", "tsx", "js", "jsx", "py", "java", "go", "rs"].includes(ext);
523
524
  }
@@ -922,11 +923,11 @@ var ParserFactory = class _ParserFactory {
922
923
  Object.entries(LANGUAGE_EXTENSIONS).map(([ext, lang]) => [ext, lang])
923
924
  );
924
925
  this.registerLazyParser("typescript" /* TypeScript */, async () => {
925
- const { TypeScriptParser: TypeScriptParser2 } = await import("./typescript-parser-RMNCTHRD.mjs");
926
+ const { TypeScriptParser: TypeScriptParser2 } = await import("./typescript-parser-FOUPHVFI.mjs");
926
927
  return new TypeScriptParser2();
927
928
  });
928
929
  this.registerLazyParser("javascript" /* JavaScript */, async () => {
929
- const { TypeScriptParser: TypeScriptParser2 } = await import("./typescript-parser-RMNCTHRD.mjs");
930
+ const { TypeScriptParser: TypeScriptParser2 } = await import("./typescript-parser-FOUPHVFI.mjs");
930
931
  return new TypeScriptParser2();
931
932
  });
932
933
  this.registerLazyParser("python" /* Python */, async () => {
@@ -3086,12 +3087,18 @@ function isLikelyEntryPoint(filePath) {
3086
3087
  "main",
3087
3088
  "bin",
3088
3089
  "index",
3089
- // often used as entry point
3090
3090
  "run",
3091
3091
  "serve",
3092
3092
  "start",
3093
3093
  "boot",
3094
- "init"
3094
+ "init",
3095
+ "parser",
3096
+ "config",
3097
+ "setup",
3098
+ "adapter",
3099
+ "provider",
3100
+ "handler",
3101
+ "vending"
3095
3102
  ];
3096
3103
  const nameWithoutExt = lowerBasename.replace(
3097
3104
  /\.(ts|js|tsx|jsx|mjs|cjs)$/,
@@ -3102,7 +3109,14 @@ function isLikelyEntryPoint(filePath) {
3102
3109
  )) {
3103
3110
  return true;
3104
3111
  }
3105
- const cliDirPatterns = ["/bin/", "/cli/", "/cmd/", "/commands/"];
3112
+ const cliDirPatterns = [
3113
+ "/bin/",
3114
+ "/cli/",
3115
+ "/cmd/",
3116
+ "/commands/",
3117
+ "/apps/",
3118
+ "/functions/"
3119
+ ];
3106
3120
  if (cliDirPatterns.some((p) => filePath.includes(p))) {
3107
3121
  return true;
3108
3122
  }
@@ -0,0 +1,7 @@
1
+ import {
2
+ TypeScriptParser
3
+ } from "./chunk-MOM3IXCA.mjs";
4
+ import "./chunk-U3IY2CFC.mjs";
5
+ export {
6
+ TypeScriptParser
7
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/core",
3
- "version": "0.24.18",
3
+ "version": "0.24.19",
4
4
  "description": "Shared utilities for AIReady analysis tools",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -65,6 +65,8 @@
65
65
  "clean": "rm -rf dist",
66
66
  "release": "pnpm build && pnpm publish --no-git-checks",
67
67
  "type-check": "tsc --noEmit",
68
- "format-check": "prettier --check . --ignore-path ../../.prettierignore"
68
+ "format-check": "prettier --check . --ignore-path ../../.prettierignore",
69
+ "format": "prettier --write . --ignore-path ../../.prettierignore",
70
+ "lint:fix": "eslint . --fix"
69
71
  }
70
72
  }