token-goat 2.9.12 → 2.9.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.
Files changed (45) hide show
  1. package/README.md +20 -1
  2. package/dist/token-goat-chunk-2ESBO4IN.mjs +209 -0
  3. package/dist/token-goat-chunk-3BTK54F3.mjs +1733 -0
  4. package/dist/{token-goat-chunk-6NIGPPN6.mjs → token-goat-chunk-3XQPEJMV.mjs} +1 -1
  5. package/dist/token-goat-chunk-4SDX3QP3.mjs +122 -0
  6. package/dist/token-goat-chunk-7OGKZ7AP.mjs +142 -0
  7. package/dist/token-goat-chunk-AH6QILZM.mjs +26 -0
  8. package/dist/token-goat-chunk-AMYCQJX4.mjs +1548 -0
  9. package/dist/{token-goat-chunk-OTW7LC4Y.mjs → token-goat-chunk-ASVVF4JV.mjs} +13 -10
  10. package/dist/{token-goat-chunk-GCXX67HM.mjs → token-goat-chunk-DAMXYVIW.mjs} +12477 -12156
  11. package/dist/token-goat-chunk-DBNY4RLN.mjs +308 -0
  12. package/dist/token-goat-chunk-EG3663UT.mjs +226 -0
  13. package/dist/token-goat-chunk-EZNVAIR3.mjs +21 -0
  14. package/dist/token-goat-chunk-GMOUBOX4.mjs +386 -0
  15. package/dist/{token-goat-chunk-6F5TLJC7.mjs → token-goat-chunk-HF6H7RNK.mjs} +1 -1
  16. package/dist/{token-goat-chunk-GM6QZWCF.mjs → token-goat-chunk-IT6O3PNN.mjs} +2660 -6877
  17. package/dist/token-goat-chunk-NEI4NC54.mjs +424 -0
  18. package/dist/token-goat-chunk-O5WAMISC.mjs +167 -0
  19. package/dist/{token-goat-chunk-LHLQFGWQ.mjs → token-goat-chunk-OMNQUUIT.mjs} +9 -27
  20. package/dist/{token-goat-chunk-SF2CKCFQ.mjs → token-goat-chunk-PGGDW7DZ.mjs} +30 -13
  21. package/dist/token-goat-chunk-POBYR64E.mjs +1632 -0
  22. package/dist/token-goat-chunk-PRJVGIC5.mjs +58 -0
  23. package/dist/{token-goat-chunk-4CK445AW.mjs → token-goat-chunk-RUDOKYPJ.mjs} +10074 -9765
  24. package/dist/token-goat-chunk-SAQ5PG4L.mjs +2634 -0
  25. package/dist/token-goat-chunk-T2IWWTHB.mjs +3155 -0
  26. package/dist/{token-goat-chunk-TOGYS5A7.mjs → token-goat-chunk-VZYD4OZB.mjs} +1469 -5752
  27. package/dist/token-goat-chunk-XEH6KBWW.mjs +23 -0
  28. package/dist/token-goat-chunk-XQF5J25J.mjs +33 -0
  29. package/dist/token-goat-chunk-XTQAOTSO.mjs +89 -0
  30. package/dist/{token-goat-chunk-THLHC6QJ.mjs → token-goat-chunk-XVZ4MNQC.mjs} +614 -603
  31. package/dist/token-goat-chunk-Y4AFKTHK.mjs +22 -0
  32. package/dist/token-goat-chunk-YHGTGG6K.mjs +396 -0
  33. package/dist/{token-goat-chunk-SBYRP3X4.mjs → token-goat-chunk-YTQHZJXW.mjs} +61 -27
  34. package/dist/token-goat-chunk-Z6UXPYJA.mjs +62 -0
  35. package/dist/token-goat-chunk-ZD4EM4LR.mjs +30 -0
  36. package/dist/token-goat-chunk-ZFM4PWXL.mjs +585 -0
  37. package/dist/{token-goat-chunk-A6QTLAWO.mjs → token-goat-chunk-ZYNNQ36L.mjs} +128 -328
  38. package/dist/token-goat-hook.mjs +12 -6
  39. package/dist/token-goat.core.mjs +22 -7
  40. package/docs/cli.md +12 -8
  41. package/docs/security.md +1 -1
  42. package/package.json +4 -2
  43. package/dist/token-goat-chunk-HKFOH6JH.mjs +0 -28
  44. package/dist/token-goat-chunk-LOCOX2ML.mjs +0 -3564
  45. package/dist/token-goat-chunk-VRWX6QYW.mjs +0 -24
@@ -25,13 +25,11 @@ import {
25
25
  extractSwift,
26
26
  extractThrift,
27
27
  extractWgsl
28
- } from "./token-goat-chunk-6F5TLJC7.mjs";
28
+ } from "./token-goat-chunk-HF6H7RNK.mjs";
29
29
  import {
30
30
  assignBraceBlockSpans,
31
31
  assignFlatEndLines,
32
32
  buildLineIndex,
33
- countContentLines,
34
- escapeRegExp,
35
33
  extractEnv,
36
34
  extractIni,
37
35
  findHtmlHeadingMatches,
@@ -46,7 +44,6 @@ import {
46
44
  offsetToLine,
47
45
  precedingDocComment,
48
46
  propagateEndLinesToSymbols,
49
- pushAll,
50
47
  scanQuotedStringEnd,
51
48
  stripBlockCommentSpan,
52
49
  stripCstyleComments,
@@ -56,7 +53,13 @@ import {
56
53
  stripMultilineStringSpan,
57
54
  stripStringLiterals,
58
55
  stripXmlComments
59
- } from "./token-goat-chunk-LOCOX2ML.mjs";
56
+ } from "./token-goat-chunk-POBYR64E.mjs";
57
+ import {
58
+ countContentLines,
59
+ escapeRegExp,
60
+ pushAll
61
+ } from "./token-goat-chunk-AMYCQJX4.mjs";
62
+ import "./token-goat-chunk-GMOUBOX4.mjs";
60
63
  import {
61
64
  init_define_import_meta_env
62
65
  } from "./token-goat-chunk-A37V4PBF.mjs";
@@ -1820,8 +1823,8 @@ var NAMED_CTOR_RE = /^(?:(?:const|factory|external)\s+)*([A-Za-z_][A-Za-z0-9_]*)
1820
1823
  var UNNAMED_CTOR_RE = /^(?:(?:const|factory|external)\s+)*([A-Za-z_][A-Za-z0-9_]*)\s*\(/;
1821
1824
  var FIELD_START_RE = /^(?:(?:static|covariant|late|external)\s+)*(?:final|var|const)\s/;
1822
1825
  var CLASS_ALIAS_RE = /^(?:(?:abstract|base|interface|final|sealed|mixin)\s+)*class\s+[A-Za-z_][A-Za-z0-9_]*(?:<[^>]*>)?\s*=/;
1823
- var TYPEDEF_RE = /^typedef\s+([A-Za-z_][A-Za-z0-9_]*)(?:\s*<[^>]*>)?\s*=/;
1824
- var TYPEDEF_LEGACY_RE = /^typedef\s+[A-Za-z_][A-Za-z0-9_<>,?]*\s+([A-Za-z_][A-Za-z0-9_]*)(?:\s*<[^>]*>)?\s*\(/;
1826
+ var TYPEDEF_RE = /^typedef\s+([A-Za-z_][A-Za-z0-9_]*)(?:\s*<.+>)?\s*=/;
1827
+ var TYPEDEF_LEGACY_RE = /^typedef\s+[A-Za-z_][A-Za-z0-9_<>,?]*\s+([A-Za-z_][A-Za-z0-9_]*)(?:\s*<.+>)?\s*\(/;
1825
1828
  function extractDart(content, filePath) {
1826
1829
  const symbols = [];
1827
1830
  const imports = [];
@@ -2225,13 +2228,13 @@ function stripGraphqlDescriptions(text) {
2225
2228
  const tripleOpenerPos = line.indexOf('"""');
2226
2229
  if (hashPos !== -1 && (tripleOpenerPos === -1 || hashPos < tripleOpenerPos)) {
2227
2230
  const head = line.slice(0, hashPos);
2228
- const { code: code2, state: nextState2 } = stripMultilineStringSpan(head, null, "kotlin");
2231
+ const { code: code2, state: nextState2 } = stripMultilineStringSpan(head, null, "graphql");
2229
2232
  state = nextState2;
2230
2233
  outLines.push(stripStringLiterals(code2) + line.slice(hashPos));
2231
2234
  continue;
2232
2235
  }
2233
2236
  }
2234
- const { code, state: nextState } = stripMultilineStringSpan(line, state, "kotlin");
2237
+ const { code, state: nextState } = stripMultilineStringSpan(line, state, "graphql");
2235
2238
  state = nextState;
2236
2239
  outLines.push(stripStringLiterals(code));
2237
2240
  }
@@ -3761,7 +3764,7 @@ function metadataName(filePath, content, suffix) {
3761
3764
  function addFlowElements(symbols, seen, content, filePath, flowName) {
3762
3765
  const lineIndex = buildLineIndex(content);
3763
3766
  const tagAlternation = Object.keys(FLOW_TAG_KIND).join("|");
3764
- const re = new RegExp(`<(${tagAlternation})>\\s*([\\s\\S]*?)\\s*</\\1\\s*>`, "g");
3767
+ const re = new RegExp(`<(?:[A-Za-z_][\\w.-]*:)?(${tagAlternation})(?:\\s[^>]*)?>\\s*([\\s\\S]*?)\\s*</(?:[A-Za-z_][\\w.-]*:)?\\1\\s*>`, "g");
3765
3768
  for (const match of content.matchAll(re)) {
3766
3769
  if (symbols.length >= MAX_SYMBOLS11) return;
3767
3770
  const tag = match[1] ?? "";