@archme/cli 0.5.1 → 0.5.2

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 (2) hide show
  1. package/dist/cli.js +14 -0
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -13050,6 +13050,18 @@ async function outlineSource(source, file) {
13050
13050
  data: { file, symbols: [] }
13051
13051
  });
13052
13052
  }
13053
+ const bytes = Buffer.byteLength(source, "utf8");
13054
+ if (bytes >= MAX_PARSE_BYTES) {
13055
+ return envelope({
13056
+ tool: "file",
13057
+ tier: 0,
13058
+ confidence: 0.2,
13059
+ data: { file, symbols: [] },
13060
+ warnings: [
13061
+ `${file} is too large to parse (${bytes} bytes >= ${MAX_PARSE_BYTES}); file-tier only`
13062
+ ]
13063
+ });
13064
+ }
13053
13065
  try {
13054
13066
  const symbols = await extractSymbols(lang, source);
13055
13067
  return envelope({
@@ -13092,12 +13104,14 @@ async function runOutline(file) {
13092
13104
  }
13093
13105
  return outlineSource(source, file);
13094
13106
  }
13107
+ var MAX_PARSE_BYTES;
13095
13108
  var init_outline = __esm({
13096
13109
  "src/analyze/commands/outline.ts"() {
13097
13110
  "use strict";
13098
13111
  init_lang_detect();
13099
13112
  init_symbols();
13100
13113
  init_output2();
13114
+ MAX_PARSE_BYTES = 1e6;
13101
13115
  }
13102
13116
  });
13103
13117
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archme/cli",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Map your codebase into a living architecture diagram: run `archme init` in a repo to scan it, `archme daemon start` to keep it current on every commit.",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE",