@neat.is/core 0.7.0 → 0.7.1

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/cli.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  resolveHost,
7
7
  resolveNeatVersion,
8
8
  writeDaemonRecord
9
- } from "./chunk-UBQ4ZZT3.js";
9
+ } from "./chunk-MDBE23Y3.js";
10
10
  import {
11
11
  buildSearchIndex
12
12
  } from "./chunk-BIY46Q6U.js";
@@ -72,10 +72,10 @@ import {
72
72
  startStalenessLoop,
73
73
  upsertConnectorEntry,
74
74
  validateConnectorEntry
75
- } from "./chunk-5RIL3U5A.js";
75
+ } from "./chunk-RR4LWQQB.js";
76
76
  import {
77
77
  startOtelGrpcReceiver
78
- } from "./chunk-Q6DPK3RA.js";
78
+ } from "./chunk-6H757ZNM.js";
79
79
  import {
80
80
  __dirname,
81
81
  __require,
@@ -83,7 +83,7 @@ import {
83
83
  buildOtelReceiver,
84
84
  listenSteppingOtlp,
85
85
  readAuthEnv
86
- } from "./chunk-N5L3RBGP.js";
86
+ } from "./chunk-P2ZEKJ35.js";
87
87
 
88
88
  // src/cli.ts
89
89
  import path11 from "path";
@@ -825,7 +825,7 @@ import semver from "semver";
825
825
 
826
826
  // src/installers/templates.ts
827
827
  var OTEL_INIT_HEADER = "// Generated by `neat init --apply` (ADR-069). OpenTelemetry auto-instrumentation hook.";
828
- var OTEL_INIT_STAMP = "// neat-template-version: 7 \u2014 OTel init degrades to no-OBSERVED instead of crashing the host app when @opentelemetry deps are absent (#820); daemon.json endpoint resolution (ADR-096) + layered file-first capture (ADR-090).";
828
+ var OTEL_INIT_STAMP = "// neat-template-version: 8 \u2014 CommonJS TypeScript uses a synchronous bootstrap (#910); OTel init degrades to no-OBSERVED when dependencies are absent (#820); daemon.json endpoint resolution (ADR-096) + layered file-first capture (ADR-090).";
829
829
  var OTEL_OTLP_HEADERS_JS = "if (process.env.NEAT_OTEL_TOKEN) process.env.OTEL_EXPORTER_OTLP_HEADERS ||= 'Authorization=Bearer ' + process.env.NEAT_OTEL_TOKEN";
830
830
  var OTEL_OTLP_PROTOCOL_JS = "process.env.OTEL_EXPORTER_OTLP_PROTOCOL ||= 'http/json'";
831
831
  var OTEL_ENDPOINT_RESOLVER_CJS = `;(function () {
@@ -1189,6 +1189,13 @@ ${neatWireCaptureSource(false)}
1189
1189
  }
1190
1190
  }
1191
1191
  `;
1192
+ var OTEL_INIT_TS_CJS = OTEL_INIT_CJS.replace(
1193
+ `${OTEL_INIT_HEADER}
1194
+ ${OTEL_INIT_STAMP}`,
1195
+ `${OTEL_INIT_HEADER}
1196
+ ${OTEL_INIT_STAMP}
1197
+ // @ts-nocheck \u2014 generated CommonJS runtime shim.`
1198
+ );
1192
1199
  var OTEL_INIT_ESM = `${OTEL_INIT_HEADER}
1193
1200
  ${OTEL_INIT_STAMP}
1194
1201
  ${OTEL_ESM_NODE_IMPORTS}
@@ -1460,6 +1467,13 @@ function detectNonBundledInstrumentations(pkg) {
1460
1467
  registration: "instrumentations.push(new (require('@prisma/instrumentation').PrismaInstrumentation)())"
1461
1468
  });
1462
1469
  }
1470
+ if (getMajor(deps["@nestjs/core"]) >= 11) {
1471
+ out.push({
1472
+ pkg: "@opentelemetry/instrumentation-nestjs-core",
1473
+ version: "^0.67.0",
1474
+ registration: "instrumentations.push(new (require('@opentelemetry/instrumentation-nestjs-core').NestInstrumentation)())"
1475
+ });
1476
+ }
1463
1477
  return out;
1464
1478
  }
1465
1479
  var OTEL_ENV = {
@@ -1772,18 +1786,19 @@ async function resolveEntry(serviceDir, pkg) {
1772
1786
  }
1773
1787
  function dispatchEntry(entryFile, pkg) {
1774
1788
  const ext = path5.extname(entryFile).toLowerCase();
1775
- if (ext === ".ts" || ext === ".tsx") return "ts";
1789
+ if (ext === ".ts" || ext === ".tsx") return pkg.type === "module" ? "ts" : "ts-cjs";
1776
1790
  if (ext === ".mjs") return "esm";
1777
1791
  if (ext === ".cjs") return "cjs";
1778
1792
  return pkg.type === "module" ? "esm" : "cjs";
1779
1793
  }
1780
1794
  function otelInitFilename(flavor) {
1781
- if (flavor === "ts") return "otel-init.ts";
1795
+ if (flavor === "ts" || flavor === "ts-cjs") return "otel-init.ts";
1782
1796
  if (flavor === "esm") return "otel-init.mjs";
1783
1797
  return "otel-init.cjs";
1784
1798
  }
1785
1799
  function otelInitContents(flavor) {
1786
1800
  if (flavor === "ts") return OTEL_INIT_TS;
1801
+ if (flavor === "ts-cjs") return OTEL_INIT_TS_CJS;
1787
1802
  if (flavor === "esm") return OTEL_INIT_ESM;
1788
1803
  return OTEL_INIT_CJS;
1789
1804
  }
@@ -4884,6 +4899,9 @@ function formatDivergenceLine(d) {
4884
4899
  switch (d.type) {
4885
4900
  case "missing-observed":
4886
4901
  case "missing-extracted":
4902
+ if (d.column) {
4903
+ return ` \u2022 [${d.type}] ${d.table ?? d.source} column ${d.column} \u2014 confidence ${d.confidence.toFixed(2)}`;
4904
+ }
4887
4905
  return ` \u2022 [${d.type}] ${d.source} \u2192 ${d.target} (${d.edgeType}) \u2014 confidence ${d.confidence.toFixed(2)}`;
4888
4906
  case "version-mismatch":
4889
4907
  return ` \u2022 [${d.type}] ${d.source} \u2192 ${d.target} \u2014 declared ${d.extractedVersion}, observed engine ${d.observedVersion} (${d.compatibility})`;