@codometer/languages 0.0.14 → 0.0.15

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.0.15 (2026-10-13)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated codometer-configuration to 0.0.15
6
+ - Updated codometer-core to 0.0.15
7
+
1
8
  ## 0.0.14 (2026-10-12)
2
9
 
3
10
  ### 🧱 Updated Dependencies
package/README.md CHANGED
@@ -760,13 +760,13 @@ graph LR
760
760
  ### Project
761
761
 
762
762
  ![Lines of Code](https://img.shields.io/badge/Lines_of_Code-10315-22c55e?style=flat-square)
763
- ![Repository Size](https://img.shields.io/badge/Repository_Size-315.09_kB-6b7280?style=flat-square)
763
+ ![Repository Size](https://img.shields.io/badge/Repository_Size-315.22_kB-6b7280?style=flat-square)
764
764
  ![Folders](https://img.shields.io/badge/Folders-16-4a4a4a?style=flat-square)
765
765
  ![Source Files](https://img.shields.io/badge/Source_Files-105-3178c6?style=flat-square)
766
766
 
767
767
  ### Measured Targets
768
768
 
769
- ![Compiled JavaScript Size](https://img.shields.io/badge/Compiled_JavaScript_Size-13.45_kB_gzip-6b7280?style=flat-square)
769
+ ![Compiled JavaScript Size](https://img.shields.io/badge/Compiled_JavaScript_Size-13.44_kB_gzip-6b7280?style=flat-square)
770
770
 
771
771
  ### TypeScript
772
772
 
@@ -948,16 +948,16 @@ graph LR
948
948
  ### Markdown
949
949
 
950
950
  ![Markdown Files](https://img.shields.io/badge/Markdown_Files-2-083fa1?style=flat-square)
951
- ![Markdown Lines](https://img.shields.io/badge/Markdown_Lines-295-1f6feb?style=flat-square)
951
+ ![Markdown Lines](https://img.shields.io/badge/Markdown_Lines-302-1f6feb?style=flat-square)
952
952
  ![H1](https://img.shields.io/badge/H1-1-7c3aed?style=flat-square)
953
- ![H2](https://img.shields.io/badge/H2-17-8b5cf6?style=flat-square)
954
- ![H3](https://img.shields.io/badge/H3-23-a78bfa?style=flat-square)
953
+ ![H2](https://img.shields.io/badge/H2-18-8b5cf6?style=flat-square)
954
+ ![H3](https://img.shields.io/badge/H3-24-a78bfa?style=flat-square)
955
955
  ![H4](https://img.shields.io/badge/H4-0-c4b5fd?style=flat-square)
956
956
  ![H5](https://img.shields.io/badge/H5-0-ddd6fe?style=flat-square)
957
957
  ![H6](https://img.shields.io/badge/H6-0-ede9fe?style=flat-square)
958
- ![Paragraphs](https://img.shields.io/badge/Paragraphs-66-64748b?style=flat-square)
959
- ![Lists](https://img.shields.io/badge/Lists-17-16a34a?style=flat-square)
960
- ![List Items](https://img.shields.io/badge/List_Items-46-22c55e?style=flat-square)
958
+ ![Paragraphs](https://img.shields.io/badge/Paragraphs-68-64748b?style=flat-square)
959
+ ![Lists](https://img.shields.io/badge/Lists-18-16a34a?style=flat-square)
960
+ ![List Items](https://img.shields.io/badge/List_Items-48-22c55e?style=flat-square)
961
961
  ![Task List Items](https://img.shields.io/badge/Task_List_Items-0-4ade80?style=flat-square)
962
962
  ![Tables](https://img.shields.io/badge/Tables-2-0284c7?style=flat-square)
963
963
  ![Table Rows](https://img.shields.io/badge/Table_Rows-10-0ea5e9?style=flat-square)
package/dist/src/index.js CHANGED
@@ -44,12 +44,12 @@ var _e = /^(\p{Extended_Pictographic}️?(?:‍\p{Extended_Pictographic}️?)*)\
44
44
  "TypeOrmModule"
45
45
  ]);
46
46
  //#endregion
47
- //#region \0@oxc-project+runtime@0.151.0/helpers/esm/decorateMetadata.js
47
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateMetadata.js
48
48
  function __decorateMetadata(e, t) {
49
49
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
50
50
  }
51
51
  //#endregion
52
- //#region \0@oxc-project+runtime@0.151.0/helpers/esm/decorate.js
52
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
53
53
  function __decorate(e, t, n, r) {
54
54
  var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
55
55
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
@@ -86,11 +86,7 @@ var m, h = class LoggerService extends e {
86
86
  });
87
87
  }
88
88
  static logToStandardError() {
89
- if (m.rootLogger !== void 0) {
90
- process.emitWarning("LoggerService.logToStandardError() was called after the first log line, so log lines still go to standard output and anything piping that stream will read them as data. Call it as the first statement of the application's bootstrap.");
91
- return;
92
- }
93
- m.writesToStandardError = !0;
89
+ m.rootLogger === void 0 ? m.writesToStandardError = !0 : process.emitWarning("LoggerService.logToStandardError() was called after the first log line, so log lines still go to standard output and anything piping that stream will read them as data. Call it as the first statement of the application's bootstrap.");
94
90
  }
95
91
  assertConventionalMessage(e) {
96
92
  if (m.isProduction || this.shouldSkipConventionalMessageValidation(e.context)) return;
@@ -241,11 +237,7 @@ var xe = "comment", Se = /#[^\n]*/g, Ce = /\/\/[^\n]*/g, we = /^\s*#+\s?/u, _ =
241
237
  let t = [];
242
238
  for (let n of e) {
243
239
  let e = t.at(-1), r = e?.tokens.at(-1);
244
- if (e !== void 0 && r !== void 0 && n.ownLine && r.ownLine && n.line === r.line + 1) {
245
- e.tokens.push(n);
246
- continue;
247
- }
248
- t.push({ tokens: [n] });
240
+ e !== void 0 && r !== void 0 && n.ownLine && r.ownLine && n.line === r.line + 1 ? e.tokens.push(n) : t.push({ tokens: [n] });
249
241
  }
250
242
  return t;
251
243
  }
@@ -488,11 +480,8 @@ var ke = /* @__PURE__ */ new Set([
488
480
  ]), Ae = /* @__PURE__ */ new Set([".jsx", ".tsx"]), S = class TypescriptCommentsService {
489
481
  constructor() {}
490
482
  collectComments(e, t, n) {
491
- if (e.getChildCount(t) === 0) {
492
- for (let t of [...f.getLeadingCommentRanges(n.content, e.getFullStart()) ?? [], ...f.getTrailingCommentRanges(n.content, e.getEnd()) ?? []]) n.ranges.set(t.pos, t);
493
- return;
494
- }
495
- for (let r of e.getChildren(t)) this.collectComments(r, t, n);
483
+ if (e.getChildCount(t) === 0) for (let t of [...f.getLeadingCommentRanges(n.content, e.getFullStart()) ?? [], ...f.getTrailingCommentRanges(n.content, e.getEnd()) ?? []]) n.ranges.set(t.pos, t);
484
+ else for (let r of e.getChildren(t)) this.collectComments(r, t, n);
496
485
  }
497
486
  getScriptKind(e) {
498
487
  let t = u.extname(e);
@@ -735,19 +724,7 @@ var je = {
735
724
  this.logger = e, this.logger.setContext(Me.name);
736
725
  }
737
726
  countNode(e, t) {
738
- if (e.type === "comment") {
739
- t.comments++;
740
- return;
741
- }
742
- if (e.type === "decl") {
743
- t.declarations++, e.prop.startsWith("--") && t.customProperties++;
744
- return;
745
- }
746
- if (e.type === "atrule") {
747
- t.atRules++, e.name === "media" && t.mediaQueries++;
748
- return;
749
- }
750
- t.rules++, t.selectors += e.selectors.length;
727
+ e.type === "comment" ? t.comments++ : e.type === "decl" ? (t.declarations++, e.prop.startsWith("--") && t.customProperties++) : e.type === "atrule" ? (t.atRules++, e.name === "media" && t.mediaQueries++) : (t.rules++, t.selectors += e.selectors.length);
751
728
  }
752
729
  analyze({ cssFiles: e, workingDirectory: t }) {
753
730
  let n = { ...je };
@@ -795,15 +772,7 @@ var Ne = /^([A-Za-z_]\w*)\s+(?:"[^"]*"\s*)*\{/, Pe = /^[A-Za-z_]\w*\s*=/, Fe = /
795
772
  this.logger = e, this.logger.setContext(k.name);
796
773
  }
797
774
  countBlock(e, t) {
798
- if (t.blocks++, e === "resource" || e === "data") {
799
- t.resources++;
800
- return;
801
- }
802
- if (e === "variable") {
803
- t.variables++;
804
- return;
805
- }
806
- e === "output" && t.outputs++;
775
+ t.blocks++, e === "resource" || e === "data" ? t.resources++ : e === "variable" ? t.variables++ : e === "output" && t.outputs++;
807
776
  }
808
777
  countLine(e, t) {
809
778
  let n = e.trim();
@@ -813,11 +782,7 @@ var Ne = /^([A-Za-z_]\w*)\s+(?:"[^"]*"\s*)*\{/, Pe = /^[A-Za-z_]\w*\s*=/, Fe = /
813
782
  }
814
783
  t.interpolations += (n.match(Fe) ?? []).length;
815
784
  let r = Ne.exec(n)?.[1];
816
- if (r !== void 0) {
817
- this.countBlock(r, t);
818
- return;
819
- }
820
- Pe.test(n) && t.attributes++;
785
+ r === void 0 ? Pe.test(n) && t.attributes++ : this.countBlock(r, t);
821
786
  }
822
787
  analyze({ hclFiles: e, workingDirectory: t }) {
823
788
  let n = { ...Ie };
@@ -892,34 +857,14 @@ var Le = {
892
857
  for (let r of e) this.countNode(r, t, n + 1);
893
858
  }
894
859
  countNode(e, t, n) {
895
- if (this.isArrayNode(e)) {
896
- this.countArrayNode(e, t, n);
897
- return;
898
- }
899
- if (this.isRecordNode(e)) {
900
- this.countRecordNode(e, t, n);
901
- return;
902
- }
903
- this.countPrimitiveNode(e, t, n);
860
+ this.isArrayNode(e) ? this.countArrayNode(e, t, n) : this.isRecordNode(e) ? this.countRecordNode(e, t, n) : this.countPrimitiveNode(e, t, n);
904
861
  }
905
862
  countPrimitiveNode(e, t, n) {
906
- if (t.totalNodes++, t.maxDepth = Math.max(t.maxDepth, n), e === null) {
907
- t.nulls++;
908
- return;
909
- }
910
- this.countPrimitiveValue(e, t);
863
+ t.totalNodes++, t.maxDepth = Math.max(t.maxDepth, n), e === null ? t.nulls++ : this.countPrimitiveValue(e, t);
911
864
  }
912
865
  countPrimitiveValue(e, t) {
913
866
  let n = typeof e;
914
- if (n === "boolean") {
915
- t.booleans++;
916
- return;
917
- }
918
- if (n === "number") {
919
- t.numbers++;
920
- return;
921
- }
922
- n === "string" && t.strings++;
867
+ n === "boolean" ? t.booleans++ : n === "number" ? t.numbers++ : n === "string" && t.strings++;
923
868
  }
924
869
  countRecordNode(e, t, n) {
925
870
  t.objects++, t.totalNodes++, t.maxDepth = Math.max(t.maxDepth, n);
@@ -1234,15 +1179,7 @@ var Ue = p.object({
1234
1179
  this.jsonService = e, this.markdownService = t, this.pythonService = n, this.logger = r, this.logger.setContext(Ke.name);
1235
1180
  }
1236
1181
  collectCell(e, t) {
1237
- if (t.cells++, t.outputs += e.outputs?.length ?? 0, e.cell_type === "code") {
1238
- t.codeCells++, t.codeSources.push(this.readSource(e.source)), typeof e.execution_count == "number" && t.executedCells++;
1239
- return;
1240
- }
1241
- if (e.cell_type === "markdown") {
1242
- t.markdownCells++, t.markdownSources.push(this.readSource(e.source));
1243
- return;
1244
- }
1245
- t.rawCells++;
1182
+ t.cells++, t.outputs += e.outputs?.length ?? 0, e.cell_type === "code" ? (t.codeCells++, t.codeSources.push(this.readSource(e.source)), typeof e.execution_count == "number" && t.executedCells++) : e.cell_type === "markdown" ? (t.markdownCells++, t.markdownSources.push(this.readSource(e.source))) : t.rawCells++;
1246
1183
  }
1247
1184
  collectParts(e) {
1248
1185
  let t = {
@@ -1359,15 +1296,7 @@ var qe = /^(?:function\s+)?[\w-]+\s*\(\s*\)|^function\s+[\w-]+/, Je = /^(?:expor
1359
1296
  }
1360
1297
  countLine(e, t) {
1361
1298
  let n = e.trim();
1362
- if (n.startsWith("#!")) {
1363
- t.shebangs++;
1364
- return;
1365
- }
1366
- if (n.startsWith("#")) {
1367
- t.comments++, t.commentLines++;
1368
- return;
1369
- }
1370
- n !== "" && this.countStatements(n, t);
1299
+ n.startsWith("#!") ? t.shebangs++ : n.startsWith("#") ? (t.comments++, t.commentLines++) : n !== "" && this.countStatements(n, t);
1371
1300
  }
1372
1301
  countStatements(e, t) {
1373
1302
  qe.test(e) && t.functions++, Je.test(e) ? t.exports++ : Ye.test(e) && t.variables++, Xe.test(e) && t.conditionals++, Ze.test(e) && t.loops++, t.pipelines += (e.match(Qe) ?? []).length;
@@ -1461,19 +1390,7 @@ var tt = /^\[\[[^\]]+\]\]/, nt = /^\[[^\]]+\]/, rt = /"""|'''/g, it = {
1461
1390
  }
1462
1391
  countLine(e, t) {
1463
1392
  let n = e.trim();
1464
- if (n.startsWith("#")) {
1465
- t.comments++;
1466
- return;
1467
- }
1468
- if (tt.test(n)) {
1469
- t.arrayTables++;
1470
- return;
1471
- }
1472
- if (nt.test(n)) {
1473
- t.tables++;
1474
- return;
1475
- }
1476
- this.countKey(n, t);
1393
+ n.startsWith("#") ? t.comments++ : tt.test(n) ? t.arrayTables++ : nt.test(n) ? t.tables++ : this.countKey(n, t);
1477
1394
  }
1478
1395
  isInsideMultilineString(e, t) {
1479
1396
  return (e.match(rt) ?? []).length % 2 == 0 ? t : !t;
@@ -1661,13 +1578,7 @@ var Y = class TypescriptService {
1661
1578
  let e = n[1]?.toLowerCase() ?? "";
1662
1579
  t.docTags[e] = (t.docTags[e] ?? 0) + 1;
1663
1580
  }
1664
- return;
1665
- }
1666
- if (e.startsWith("/*")) {
1667
- t.blockComments++;
1668
- return;
1669
- }
1670
- t.lineComments++;
1581
+ } else e.startsWith("/*") ? t.blockComments++ : t.lineComments++;
1671
1582
  }
1672
1583
  countSymbols(e, t) {
1673
1584
  let n = ot[e.kind];
@@ -1765,9 +1676,7 @@ var Y = class TypescriptService {
1765
1676
  insideClass: !0
1766
1677
  };
1767
1678
  f.forEachChild(e, (e) => this.walkNode(e, n));
1768
- return;
1769
- }
1770
- this.dispatchNode(e, t.stats, t.insideClass), f.forEachChild(e, (e) => this.walkNode(e, t));
1679
+ } else this.dispatchNode(e, t.stats, t.insideClass), f.forEachChild(e, (e) => this.walkNode(e, t));
1771
1680
  }
1772
1681
  analyze(e) {
1773
1682
  let t = this.createEmptyResult(e);
@@ -1814,9 +1723,7 @@ var ft = {
1814
1723
  if (oe(e)) {
1815
1724
  t.mappings++;
1816
1725
  for (let r of e.items) se(r) && (t.keys++, this.countNode(r.key, t, n + 1), this.countNode(r.value, t, n + 1));
1817
- return;
1818
- }
1819
- if (le(e)) {
1726
+ } else if (le(e)) {
1820
1727
  t.sequences++;
1821
1728
  for (let r of e.items) this.countNode(r, t, n + 1);
1822
1729
  }
@@ -1828,17 +1735,7 @@ var ft = {
1828
1735
  t.documents++, this.countComments(e, t), this.countNode(e.contents, t, 1);
1829
1736
  }
1830
1737
  countNode(e, t, n) {
1831
- if (oe(e) || le(e) || ce(e) || ae(e)) {
1832
- if (t.maxDepth = Math.max(t.maxDepth, n), this.countComments(e, t), typeof e.anchor == "string" && t.anchors++, ae(e)) {
1833
- t.aliases++;
1834
- return;
1835
- }
1836
- if (ce(e)) {
1837
- t.scalars++;
1838
- return;
1839
- }
1840
- this.countCollection(e, t, n);
1841
- }
1738
+ (oe(e) || le(e) || ce(e) || ae(e)) && (t.maxDepth = Math.max(t.maxDepth, n), this.countComments(e, t), typeof e.anchor == "string" && t.anchors++, ae(e) ? t.aliases++ : ce(e) ? t.scalars++ : this.countCollection(e, t, n));
1842
1739
  }
1843
1740
  analyze({ workingDirectory: e, yamlFiles: t }) {
1844
1741
  let n = { ...ft };
package/package.json CHANGED
@@ -4,8 +4,8 @@
4
4
  "url": "https://github.com/organizzolini/codebase/issues"
5
5
  },
6
6
  "dependencies": {
7
- "@codometer/configuration": "0.0.14",
8
- "@codometer/core": "0.0.14",
7
+ "@codometer/configuration": "0.0.15",
8
+ "@codometer/core": "0.0.15",
9
9
  "@nestjs/common": "^11.1.21 || ^12.0.1",
10
10
  "mdast": "^3.0.0",
11
11
  "pino": "^10.3.1",
@@ -71,5 +71,5 @@
71
71
  "strict": true
72
72
  },
73
73
  "types": "./dist/src/index.d.ts",
74
- "version": "0.0.14"
74
+ "version": "0.0.15"
75
75
  }