@neat.is/core 0.4.7 → 0.4.8
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/{chunk-7FTK47JQ.js → chunk-J5CEKCTR.js} +103 -73
- package/dist/chunk-J5CEKCTR.js.map +1 -0
- package/dist/{chunk-LS6NS72S.js → chunk-RC3CIDZO.js} +2 -2
- package/dist/cli.cjs +118 -38
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.d.cts +2 -1
- package/dist/cli.d.ts +2 -1
- package/dist/cli.js +20 -5
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +62 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/neatd.cjs +62 -34
- package/dist/neatd.cjs.map +1 -1
- package/dist/neatd.js +2 -2
- package/dist/server.cjs +62 -34
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-7FTK47JQ.js.map +0 -1
- /package/dist/{chunk-LS6NS72S.js.map → chunk-RC3CIDZO.js.map} +0 -0
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
startPersistLoop,
|
|
16
16
|
touchLastSeen,
|
|
17
17
|
writeAtomically
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-J5CEKCTR.js";
|
|
19
19
|
import {
|
|
20
20
|
assertBindAuthority,
|
|
21
21
|
buildOtelReceiver,
|
|
@@ -533,4 +533,4 @@ export {
|
|
|
533
533
|
routeSpanToProject,
|
|
534
534
|
startDaemon
|
|
535
535
|
};
|
|
536
|
-
//# sourceMappingURL=chunk-
|
|
536
|
+
//# sourceMappingURL=chunk-RC3CIDZO.js.map
|
package/dist/cli.cjs
CHANGED
|
@@ -42,6 +42,15 @@ var init_cjs_shims = __esm({
|
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
// src/auth.ts
|
|
45
|
+
function isLoopbackHost(host) {
|
|
46
|
+
if (!host) return false;
|
|
47
|
+
return LOOPBACK_HOSTS.has(host);
|
|
48
|
+
}
|
|
49
|
+
function assertBindAuthority(host, token) {
|
|
50
|
+
if (token && token.length > 0) return;
|
|
51
|
+
if (isLoopbackHost(host)) return;
|
|
52
|
+
throw new BindAuthorityError(host);
|
|
53
|
+
}
|
|
45
54
|
function mountBearerAuth(app, opts) {
|
|
46
55
|
if (!opts.token || opts.token.length === 0) return;
|
|
47
56
|
if (opts.trustProxy) return;
|
|
@@ -73,12 +82,40 @@ function mountBearerAuth(app, opts) {
|
|
|
73
82
|
done();
|
|
74
83
|
});
|
|
75
84
|
}
|
|
76
|
-
|
|
85
|
+
function parseBoolEnv(v) {
|
|
86
|
+
if (!v) return false;
|
|
87
|
+
return v === "true" || v === "1";
|
|
88
|
+
}
|
|
89
|
+
function readAuthEnv(env = process.env) {
|
|
90
|
+
const t = env.NEAT_AUTH_TOKEN;
|
|
91
|
+
const ot = env.NEAT_OTEL_TOKEN;
|
|
92
|
+
return {
|
|
93
|
+
authToken: t && t.length > 0 ? t : void 0,
|
|
94
|
+
otelToken: ot && ot.length > 0 ? ot : t && t.length > 0 ? t : void 0,
|
|
95
|
+
trustProxy: env.NEAT_AUTH_PROXY === "true",
|
|
96
|
+
publicRead: parseBoolEnv(env.NEAT_PUBLIC_READ)
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
var import_node_crypto, LOOPBACK_HOSTS, BindAuthorityError, PUBLIC_READ_METHODS, DEFAULT_UNAUTH_SUFFIXES;
|
|
77
100
|
var init_auth = __esm({
|
|
78
101
|
"src/auth.ts"() {
|
|
79
102
|
"use strict";
|
|
80
103
|
init_cjs_shims();
|
|
81
104
|
import_node_crypto = require("crypto");
|
|
105
|
+
LOOPBACK_HOSTS = /* @__PURE__ */ new Set([
|
|
106
|
+
"127.0.0.1",
|
|
107
|
+
"localhost",
|
|
108
|
+
"::1",
|
|
109
|
+
"::ffff:127.0.0.1"
|
|
110
|
+
]);
|
|
111
|
+
BindAuthorityError = class extends Error {
|
|
112
|
+
constructor(host) {
|
|
113
|
+
super(
|
|
114
|
+
`NEAT refuses to bind on a public interface without \`NEAT_AUTH_TOKEN\` set (host="${host}"). Set the token or bind to loopback only.`
|
|
115
|
+
);
|
|
116
|
+
this.name = "BindAuthorityError";
|
|
117
|
+
}
|
|
118
|
+
};
|
|
82
119
|
PUBLIC_READ_METHODS = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
|
|
83
120
|
DEFAULT_UNAUTH_SUFFIXES = [
|
|
84
121
|
"/health",
|
|
@@ -555,6 +592,7 @@ __export(cli_exports, {
|
|
|
555
592
|
CLAUDE_SKILL_CONFIG: () => CLAUDE_SKILL_CONFIG,
|
|
556
593
|
QUERY_VERBS: () => QUERY_VERBS,
|
|
557
594
|
parseArgs: () => parseArgs,
|
|
595
|
+
printBanner: () => printBanner,
|
|
558
596
|
readPackageVersion: () => readPackageVersion,
|
|
559
597
|
runInit: () => runInit,
|
|
560
598
|
runQueryVerb: () => runQueryVerb,
|
|
@@ -993,6 +1031,24 @@ function isFrontierNode(graph, nodeId) {
|
|
|
993
1031
|
const attrs = graph.getNodeAttributes(nodeId);
|
|
994
1032
|
return attrs.type === import_types.NodeType.FrontierNode;
|
|
995
1033
|
}
|
|
1034
|
+
function resolveOwningService(graph, nodeId) {
|
|
1035
|
+
if (!graph.hasNode(nodeId)) return null;
|
|
1036
|
+
const attrs = graph.getNodeAttributes(nodeId);
|
|
1037
|
+
if (attrs.type === import_types.NodeType.ServiceNode) {
|
|
1038
|
+
return { id: nodeId, svc: attrs };
|
|
1039
|
+
}
|
|
1040
|
+
if (attrs.type === import_types.NodeType.FileNode) {
|
|
1041
|
+
for (const edgeId of graph.inboundEdges(nodeId)) {
|
|
1042
|
+
const e = graph.getEdgeAttributes(edgeId);
|
|
1043
|
+
if (e.type !== import_types.EdgeType.CONTAINS) continue;
|
|
1044
|
+
const owner = graph.getNodeAttributes(e.source);
|
|
1045
|
+
if (owner.type === import_types.NodeType.ServiceNode) {
|
|
1046
|
+
return { id: e.source, svc: owner };
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
return null;
|
|
1051
|
+
}
|
|
996
1052
|
function bestEdgeBySource(graph, edgeIds) {
|
|
997
1053
|
const best = /* @__PURE__ */ new Map();
|
|
998
1054
|
for (const id of edgeIds) {
|
|
@@ -1099,9 +1155,9 @@ function databaseRootCauseShape(graph, origin, walk) {
|
|
|
1099
1155
|
const candidatePairs = compatPairs().filter((p) => p.engine === targetDb.engine);
|
|
1100
1156
|
if (candidatePairs.length === 0) return null;
|
|
1101
1157
|
for (const id of walk.path) {
|
|
1102
|
-
const
|
|
1103
|
-
if (
|
|
1104
|
-
const svc =
|
|
1158
|
+
const owner = resolveOwningService(graph, id);
|
|
1159
|
+
if (!owner) continue;
|
|
1160
|
+
const { id: serviceId3, svc } = owner;
|
|
1105
1161
|
const deps = svc.dependencies ?? {};
|
|
1106
1162
|
for (const pair of candidatePairs) {
|
|
1107
1163
|
const declared = deps[pair.driver];
|
|
@@ -1114,7 +1170,7 @@ function databaseRootCauseShape(graph, origin, walk) {
|
|
|
1114
1170
|
);
|
|
1115
1171
|
if (!result.compatible) {
|
|
1116
1172
|
return {
|
|
1117
|
-
rootCauseNode:
|
|
1173
|
+
rootCauseNode: serviceId3,
|
|
1118
1174
|
rootCauseReason: result.reason ?? "incompatible driver",
|
|
1119
1175
|
...result.minDriverVersion ? {
|
|
1120
1176
|
fixRecommendation: `Upgrade ${svc.name} ${pair.driver} driver to >= ${result.minDriverVersion}`
|
|
@@ -1127,9 +1183,9 @@ function databaseRootCauseShape(graph, origin, walk) {
|
|
|
1127
1183
|
}
|
|
1128
1184
|
function serviceRootCauseShape(graph, _origin, walk) {
|
|
1129
1185
|
for (const id of walk.path) {
|
|
1130
|
-
const
|
|
1131
|
-
if (
|
|
1132
|
-
const svc =
|
|
1186
|
+
const owner = resolveOwningService(graph, id);
|
|
1187
|
+
if (!owner) continue;
|
|
1188
|
+
const { id: serviceId3, svc } = owner;
|
|
1133
1189
|
const deps = svc.dependencies ?? {};
|
|
1134
1190
|
const serviceNodeEngine = svc.nodeEngine;
|
|
1135
1191
|
for (const constraint of nodeEngineConstraints()) {
|
|
@@ -1138,7 +1194,7 @@ function serviceRootCauseShape(graph, _origin, walk) {
|
|
|
1138
1194
|
const result = checkNodeEngineConstraint(constraint, declared, serviceNodeEngine);
|
|
1139
1195
|
if (!result.compatible && result.reason) {
|
|
1140
1196
|
return {
|
|
1141
|
-
rootCauseNode:
|
|
1197
|
+
rootCauseNode: serviceId3,
|
|
1142
1198
|
rootCauseReason: result.reason,
|
|
1143
1199
|
...result.requiredNodeVersion ? {
|
|
1144
1200
|
fixRecommendation: `Bump ${svc.name}'s engines.node to >= ${result.requiredNodeVersion}`
|
|
@@ -1153,7 +1209,7 @@ function serviceRootCauseShape(graph, _origin, walk) {
|
|
|
1153
1209
|
const result = checkPackageConflict(conflict, declared, requiredDeclared);
|
|
1154
1210
|
if (!result.compatible && result.reason) {
|
|
1155
1211
|
return {
|
|
1156
|
-
rootCauseNode:
|
|
1212
|
+
rootCauseNode: serviceId3,
|
|
1157
1213
|
rootCauseReason: result.reason,
|
|
1158
1214
|
fixRecommendation: `Upgrade ${svc.name}'s ${conflict.requires.name} to >= ${conflict.requires.minVersion}`
|
|
1159
1215
|
};
|
|
@@ -1162,9 +1218,15 @@ function serviceRootCauseShape(graph, _origin, walk) {
|
|
|
1162
1218
|
}
|
|
1163
1219
|
return null;
|
|
1164
1220
|
}
|
|
1221
|
+
function fileRootCauseShape(graph, origin, walk) {
|
|
1222
|
+
const owner = resolveOwningService(graph, origin.id);
|
|
1223
|
+
if (!owner) return null;
|
|
1224
|
+
return serviceRootCauseShape(graph, owner.svc, walk);
|
|
1225
|
+
}
|
|
1165
1226
|
var rootCauseShapes = {
|
|
1166
1227
|
[import_types.NodeType.DatabaseNode]: databaseRootCauseShape,
|
|
1167
|
-
[import_types.NodeType.ServiceNode]: serviceRootCauseShape
|
|
1228
|
+
[import_types.NodeType.ServiceNode]: serviceRootCauseShape,
|
|
1229
|
+
[import_types.NodeType.FileNode]: fileRootCauseShape
|
|
1168
1230
|
};
|
|
1169
1231
|
function getRootCause(graph, errorNodeId, errorEvent) {
|
|
1170
1232
|
if (!graph.hasNode(errorNodeId)) return null;
|
|
@@ -3854,9 +3916,17 @@ async function addHttpCallEdges(graph, services) {
|
|
|
3854
3916
|
line: site.line,
|
|
3855
3917
|
snippet: snippet(file.content, site.line)
|
|
3856
3918
|
};
|
|
3919
|
+
const { fileNodeId, nodesAdded: n, edgesAdded: e } = ensureFileNode(
|
|
3920
|
+
graph,
|
|
3921
|
+
service.pkg.name,
|
|
3922
|
+
service.node.id,
|
|
3923
|
+
relFile
|
|
3924
|
+
);
|
|
3925
|
+
nodesAdded += n;
|
|
3926
|
+
edgesAdded += e;
|
|
3857
3927
|
if (!(0, import_types10.passesExtractedFloor)(confidence)) {
|
|
3858
3928
|
noteExtractedDropped({
|
|
3859
|
-
source:
|
|
3929
|
+
source: fileNodeId,
|
|
3860
3930
|
target: targetId,
|
|
3861
3931
|
type: import_types10.EdgeType.CALLS,
|
|
3862
3932
|
confidence,
|
|
@@ -3865,14 +3935,6 @@ async function addHttpCallEdges(graph, services) {
|
|
|
3865
3935
|
});
|
|
3866
3936
|
continue;
|
|
3867
3937
|
}
|
|
3868
|
-
const { fileNodeId, nodesAdded: n, edgesAdded: e } = ensureFileNode(
|
|
3869
|
-
graph,
|
|
3870
|
-
service.pkg.name,
|
|
3871
|
-
service.node.id,
|
|
3872
|
-
relFile
|
|
3873
|
-
);
|
|
3874
|
-
nodesAdded += n;
|
|
3875
|
-
edgesAdded += e;
|
|
3876
3938
|
const edgeId = (0, import_types4.extractedEdgeId)(fileNodeId, targetId, import_types10.EdgeType.CALLS);
|
|
3877
3939
|
if (!graph.hasEdge(edgeId)) {
|
|
3878
3940
|
const edge = {
|
|
@@ -4147,9 +4209,18 @@ async function addExternalEndpointEdges(graph, services) {
|
|
|
4147
4209
|
}
|
|
4148
4210
|
const edgeType = edgeTypeFromEndpoint(ep);
|
|
4149
4211
|
const confidence = (0, import_types15.confidenceForExtracted)(ep.confidenceKind);
|
|
4212
|
+
const relFile = toPosix2(ep.evidence.file);
|
|
4213
|
+
const { fileNodeId, nodesAdded: n, edgesAdded: e } = ensureFileNode(
|
|
4214
|
+
graph,
|
|
4215
|
+
service.pkg.name,
|
|
4216
|
+
service.node.id,
|
|
4217
|
+
relFile
|
|
4218
|
+
);
|
|
4219
|
+
nodesAdded += n;
|
|
4220
|
+
edgesAdded += e;
|
|
4150
4221
|
if (!(0, import_types15.passesExtractedFloor)(confidence)) {
|
|
4151
4222
|
noteExtractedDropped({
|
|
4152
|
-
source:
|
|
4223
|
+
source: fileNodeId,
|
|
4153
4224
|
target: ep.infraId,
|
|
4154
4225
|
type: edgeType,
|
|
4155
4226
|
confidence,
|
|
@@ -4158,15 +4229,6 @@ async function addExternalEndpointEdges(graph, services) {
|
|
|
4158
4229
|
});
|
|
4159
4230
|
continue;
|
|
4160
4231
|
}
|
|
4161
|
-
const relFile = toPosix2(ep.evidence.file);
|
|
4162
|
-
const { fileNodeId, nodesAdded: n, edgesAdded: e } = ensureFileNode(
|
|
4163
|
-
graph,
|
|
4164
|
-
service.pkg.name,
|
|
4165
|
-
service.node.id,
|
|
4166
|
-
relFile
|
|
4167
|
-
);
|
|
4168
|
-
nodesAdded += n;
|
|
4169
|
-
edgesAdded += e;
|
|
4170
4232
|
const edgeId = (0, import_types4.extractedEdgeId)(fileNodeId, ep.infraId, edgeType);
|
|
4171
4233
|
if (seenEdges.has(edgeId)) continue;
|
|
4172
4234
|
seenEdges.add(edgeId);
|
|
@@ -5838,14 +5900,18 @@ function registerRoutes(scope, ctx) {
|
|
|
5838
5900
|
async function buildApi(opts) {
|
|
5839
5901
|
const app = (0, import_fastify.default)({ logger: false });
|
|
5840
5902
|
await app.register(import_cors.default, { origin: true });
|
|
5903
|
+
const env = readAuthEnv();
|
|
5904
|
+
const authToken = opts.authToken ?? env.authToken;
|
|
5905
|
+
const trustProxy = opts.trustProxy ?? env.trustProxy;
|
|
5906
|
+
const publicRead = opts.publicRead ?? env.publicRead;
|
|
5841
5907
|
mountBearerAuth(app, {
|
|
5842
|
-
token:
|
|
5843
|
-
trustProxy
|
|
5844
|
-
publicRead
|
|
5908
|
+
token: authToken,
|
|
5909
|
+
trustProxy,
|
|
5910
|
+
publicRead
|
|
5845
5911
|
});
|
|
5846
5912
|
app.get("/api/config", async () => ({
|
|
5847
|
-
publicRead:
|
|
5848
|
-
authProxy:
|
|
5913
|
+
publicRead: publicRead === true,
|
|
5914
|
+
authProxy: trustProxy === true
|
|
5849
5915
|
}));
|
|
5850
5916
|
const startedAt = opts.startedAt ?? Date.now();
|
|
5851
5917
|
const registry = buildLegacyRegistry(opts);
|
|
@@ -5935,6 +6001,7 @@ async function buildApi(opts) {
|
|
|
5935
6001
|
}
|
|
5936
6002
|
|
|
5937
6003
|
// src/watch.ts
|
|
6004
|
+
init_auth();
|
|
5938
6005
|
init_otel();
|
|
5939
6006
|
init_otel_grpc();
|
|
5940
6007
|
|
|
@@ -6419,7 +6486,9 @@ async function startWatch(graph, opts) {
|
|
|
6419
6486
|
project: projectName,
|
|
6420
6487
|
onPolicyTrigger
|
|
6421
6488
|
});
|
|
6422
|
-
const
|
|
6489
|
+
const auth = readAuthEnv();
|
|
6490
|
+
const host = opts.host ?? (auth.authToken ? "0.0.0.0" : "127.0.0.1");
|
|
6491
|
+
assertBindAuthority(host, auth.authToken);
|
|
6423
6492
|
const port = opts.port ?? 8080;
|
|
6424
6493
|
const otelPort = opts.otelPort ?? 4318;
|
|
6425
6494
|
const cachePath = opts.embeddingsCachePath ?? import_node_path38.default.join(import_node_path38.default.dirname(opts.outPath), "embeddings.json");
|
|
@@ -6735,7 +6804,8 @@ var import_node_path40 = __toESM(require("path"), 1);
|
|
|
6735
6804
|
// src/installers/templates.ts
|
|
6736
6805
|
init_cjs_shims();
|
|
6737
6806
|
var OTEL_INIT_HEADER = "// Generated by `neat init --apply` (ADR-069). OpenTelemetry auto-instrumentation hook.";
|
|
6738
|
-
var OTEL_INIT_STAMP = "// neat-template-version:
|
|
6807
|
+
var OTEL_INIT_STAMP = "// neat-template-version: 3 \u2014 file-first call-site capture (ADR-089) + OTLP bearer auth (#410).";
|
|
6808
|
+
var OTEL_OTLP_HEADERS_JS = "if (process.env.NEAT_OTEL_TOKEN) process.env.OTEL_EXPORTER_OTLP_HEADERS ||= 'Authorization=Bearer ' + process.env.NEAT_OTEL_TOKEN";
|
|
6739
6809
|
function neatCallsiteProcessorSource(ts) {
|
|
6740
6810
|
const stackT = ts ? ": string" : "";
|
|
6741
6811
|
const spanT = ts ? ": any" : "";
|
|
@@ -6802,6 +6872,7 @@ var OTEL_INIT_CJS = `${OTEL_INIT_HEADER}
|
|
|
6802
6872
|
${OTEL_INIT_STAMP}
|
|
6803
6873
|
process.env.OTEL_SERVICE_NAME ||= '__SERVICE_NAME__'
|
|
6804
6874
|
process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ||= 'http://localhost:4318/projects/__PROJECT__/v1/traces'
|
|
6875
|
+
${OTEL_OTLP_HEADERS_JS}
|
|
6805
6876
|
|
|
6806
6877
|
const { NodeSDK } = require('@opentelemetry/sdk-node')
|
|
6807
6878
|
const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node')
|
|
@@ -6819,6 +6890,7 @@ var OTEL_INIT_ESM = `${OTEL_INIT_HEADER}
|
|
|
6819
6890
|
${OTEL_INIT_STAMP}
|
|
6820
6891
|
process.env.OTEL_SERVICE_NAME ||= '__SERVICE_NAME__'
|
|
6821
6892
|
process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ||= 'http://localhost:4318/projects/__PROJECT__/v1/traces'
|
|
6893
|
+
${OTEL_OTLP_HEADERS_JS}
|
|
6822
6894
|
|
|
6823
6895
|
import { NodeSDK } from '@opentelemetry/sdk-node'
|
|
6824
6896
|
import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node'
|
|
@@ -6836,6 +6908,7 @@ var OTEL_INIT_TS = `${OTEL_INIT_HEADER}
|
|
|
6836
6908
|
${OTEL_INIT_STAMP}
|
|
6837
6909
|
process.env.OTEL_SERVICE_NAME ||= '__SERVICE_NAME__'
|
|
6838
6910
|
process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ||= 'http://localhost:4318/projects/__PROJECT__/v1/traces'
|
|
6911
|
+
${OTEL_OTLP_HEADERS_JS}
|
|
6839
6912
|
|
|
6840
6913
|
import { NodeSDK } from '@opentelemetry/sdk-node'
|
|
6841
6914
|
import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node'
|
|
@@ -6860,6 +6933,8 @@ function renderEnvNeat(serviceName, projectName) {
|
|
|
6860
6933
|
"# Generated by `neat init --apply` (ADR-069).",
|
|
6861
6934
|
`OTEL_SERVICE_NAME=${serviceName}`,
|
|
6862
6935
|
`OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4318/projects/${projectName}/v1/traces`,
|
|
6936
|
+
"# Set NEAT_OTEL_TOKEN to the daemon's OTLP secret to authenticate exported spans (#410).",
|
|
6937
|
+
"# NEAT_OTEL_TOKEN=",
|
|
6863
6938
|
""
|
|
6864
6939
|
].join("\n");
|
|
6865
6940
|
}
|
|
@@ -6881,6 +6956,7 @@ export async function register() {
|
|
|
6881
6956
|
var NEXT_INSTRUMENTATION_NODE_TS = `${NEXT_INSTRUMENTATION_HEADER}
|
|
6882
6957
|
process.env.OTEL_SERVICE_NAME ||= '__SERVICE_NAME__'
|
|
6883
6958
|
process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ||= 'http://localhost:4318/projects/__PROJECT__/v1/traces'
|
|
6959
|
+
${OTEL_OTLP_HEADERS_JS}
|
|
6884
6960
|
|
|
6885
6961
|
import { NodeSDK } from '@opentelemetry/sdk-node'
|
|
6886
6962
|
import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node'
|
|
@@ -6892,6 +6968,7 @@ new NodeSDK({ instrumentations }).start()
|
|
|
6892
6968
|
var NEXT_INSTRUMENTATION_NODE_JS = `${NEXT_INSTRUMENTATION_HEADER}
|
|
6893
6969
|
process.env.OTEL_SERVICE_NAME ||= '__SERVICE_NAME__'
|
|
6894
6970
|
process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ||= 'http://localhost:4318/projects/__PROJECT__/v1/traces'
|
|
6971
|
+
${OTEL_OTLP_HEADERS_JS}
|
|
6895
6972
|
|
|
6896
6973
|
const { NodeSDK } = require('@opentelemetry/sdk-node')
|
|
6897
6974
|
const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node')
|
|
@@ -6910,6 +6987,7 @@ var FRAMEWORK_OTEL_INIT_HEADER = "// Generated by `neat init --apply` (ADR-074).
|
|
|
6910
6987
|
var FRAMEWORK_OTEL_INIT_TS_BODY = `${FRAMEWORK_OTEL_INIT_HEADER}
|
|
6911
6988
|
process.env.OTEL_SERVICE_NAME ||= '__SERVICE_NAME__'
|
|
6912
6989
|
process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ||= 'http://localhost:4318/projects/__PROJECT__/v1/traces'
|
|
6990
|
+
${OTEL_OTLP_HEADERS_JS}
|
|
6913
6991
|
|
|
6914
6992
|
import { NodeSDK } from '@opentelemetry/sdk-node'
|
|
6915
6993
|
import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node'
|
|
@@ -6923,6 +7001,7 @@ sdk.start()
|
|
|
6923
7001
|
var FRAMEWORK_OTEL_INIT_JS_BODY = `${FRAMEWORK_OTEL_INIT_HEADER}
|
|
6924
7002
|
process.env.OTEL_SERVICE_NAME ||= '__SERVICE_NAME__'
|
|
6925
7003
|
process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ||= 'http://localhost:4318/projects/__PROJECT__/v1/traces'
|
|
7004
|
+
${OTEL_OTLP_HEADERS_JS}
|
|
6926
7005
|
|
|
6927
7006
|
const { NodeSDK } = require('@opentelemetry/sdk-node')
|
|
6928
7007
|
const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node')
|
|
@@ -9776,7 +9855,7 @@ function printBanner() {
|
|
|
9776
9855
|
console.log("\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D ");
|
|
9777
9856
|
console.log("");
|
|
9778
9857
|
console.log(" Network Expressive Architecting Tool");
|
|
9779
|
-
console.log(
|
|
9858
|
+
console.log(` neat.is \xB7 v${readPackageVersion()} \xB7 Apache 2.0`);
|
|
9780
9859
|
console.log("");
|
|
9781
9860
|
}
|
|
9782
9861
|
function printDiscoveryReport(opts, services) {
|
|
@@ -10421,6 +10500,7 @@ if (/[\\/]cli\.(?:cjs|js)$/.test(entry) || entry.endsWith("/cli") || entry.endsW
|
|
|
10421
10500
|
CLAUDE_SKILL_CONFIG,
|
|
10422
10501
|
QUERY_VERBS,
|
|
10423
10502
|
parseArgs,
|
|
10503
|
+
printBanner,
|
|
10424
10504
|
readPackageVersion,
|
|
10425
10505
|
runInit,
|
|
10426
10506
|
runQueryVerb,
|