@neat.is/core 0.7.8 → 0.7.9
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-BIY46Q6U.js → chunk-BC53SCT7.js} +36 -2
- package/dist/chunk-BC53SCT7.js.map +1 -0
- package/dist/{chunk-4GCV46AP.js → chunk-FCO5Z3RW.js} +2 -2
- package/dist/{chunk-OVRVDSUO.js → chunk-ILG3SMD5.js} +54 -4
- package/dist/{chunk-OVRVDSUO.js.map → chunk-ILG3SMD5.js.map} +1 -1
- package/dist/{chunk-LN75Z624.js → chunk-N5TPODCX.js} +69 -48
- package/dist/chunk-N5TPODCX.js.map +1 -0
- package/dist/{chunk-Y43UCVZS.js → chunk-UUYCTH2E.js} +24 -8
- package/dist/chunk-UUYCTH2E.js.map +1 -0
- package/dist/cli.cjs +136 -62
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +17 -14
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +140 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -4
- package/dist/neatd.cjs +140 -53
- package/dist/neatd.cjs.map +1 -1
- package/dist/neatd.js +3 -3
- package/dist/{otel-grpc-DPSAGRUU.js → otel-grpc-CO47JRIN.js} +3 -3
- package/dist/server.cjs +124 -53
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +4 -4
- package/package.json +2 -2
- package/dist/chunk-BIY46Q6U.js.map +0 -1
- package/dist/chunk-LN75Z624.js.map +0 -1
- package/dist/chunk-Y43UCVZS.js.map +0 -1
- /package/dist/{chunk-4GCV46AP.js.map → chunk-FCO5Z3RW.js.map} +0 -0
- /package/dist/{otel-grpc-DPSAGRUU.js.map → otel-grpc-CO47JRIN.js.map} +0 -0
package/dist/cli.js
CHANGED
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
resolveHost,
|
|
7
7
|
resolveNeatVersion,
|
|
8
8
|
writeDaemonRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ILG3SMD5.js";
|
|
10
10
|
import {
|
|
11
11
|
buildSearchIndex
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BC53SCT7.js";
|
|
13
13
|
import {
|
|
14
14
|
DEFAULT_PROJECT,
|
|
15
15
|
PolicyViolationsLog,
|
|
@@ -74,10 +74,10 @@ import {
|
|
|
74
74
|
startStalenessLoop,
|
|
75
75
|
upsertConnectorEntry,
|
|
76
76
|
validateConnectorEntry
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-N5TPODCX.js";
|
|
78
78
|
import {
|
|
79
79
|
startOtelGrpcReceiver
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-FCO5Z3RW.js";
|
|
81
81
|
import {
|
|
82
82
|
__dirname,
|
|
83
83
|
__require,
|
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
buildOtelReceiver,
|
|
86
86
|
listenSteppingOtlp,
|
|
87
87
|
readAuthEnv
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-UUYCTH2E.js";
|
|
89
89
|
|
|
90
90
|
// src/cli.ts
|
|
91
91
|
import path13 from "path";
|
|
@@ -854,7 +854,8 @@ var OTEL_ENDPOINT_RESOLVER_CJS = `;(function () {
|
|
|
854
854
|
try {
|
|
855
855
|
const __rec = JSON.parse(__neatFs.readFileSync(__neatPath.join(__neatDir, 'neat-out', 'daemon.json'), 'utf8'))
|
|
856
856
|
if (__rec && __rec.ports && typeof __rec.ports.otlp === 'number') {
|
|
857
|
-
|
|
857
|
+
const __neatProj = (typeof __rec.project === 'string' && __rec.project) || '__PROJECT__'
|
|
858
|
+
process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT = 'http://localhost:' + __rec.ports.otlp + '/projects/' + __neatProj + '/v1/traces'
|
|
858
859
|
break
|
|
859
860
|
}
|
|
860
861
|
} catch (_e) {}
|
|
@@ -863,7 +864,7 @@ var OTEL_ENDPOINT_RESOLVER_CJS = `;(function () {
|
|
|
863
864
|
__neatDir = __parent
|
|
864
865
|
}
|
|
865
866
|
} catch (_e) {}
|
|
866
|
-
process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ||= 'http://localhost:4318/v1/traces'
|
|
867
|
+
process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ||= 'http://localhost:4318/projects/__PROJECT__/v1/traces'
|
|
867
868
|
})()`;
|
|
868
869
|
var OTEL_ESM_NODE_IMPORTS = "import { readFileSync as __neatReadFileSync } from 'node:fs'\nimport { join as __neatJoin, dirname as __neatDirname } from 'node:path'";
|
|
869
870
|
var OTEL_ENDPOINT_RESOLVER_ESM = `;(function () {
|
|
@@ -874,7 +875,8 @@ var OTEL_ENDPOINT_RESOLVER_ESM = `;(function () {
|
|
|
874
875
|
try {
|
|
875
876
|
const __rec = JSON.parse(__neatReadFileSync(__neatJoin(__neatDir, 'neat-out', 'daemon.json'), 'utf8'))
|
|
876
877
|
if (__rec && __rec.ports && typeof __rec.ports.otlp === 'number') {
|
|
877
|
-
|
|
878
|
+
const __neatProj = (typeof __rec.project === 'string' && __rec.project) || '__PROJECT__'
|
|
879
|
+
process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT = 'http://localhost:' + __rec.ports.otlp + '/projects/' + __neatProj + '/v1/traces'
|
|
878
880
|
break
|
|
879
881
|
}
|
|
880
882
|
} catch (_e) {}
|
|
@@ -883,7 +885,7 @@ var OTEL_ENDPOINT_RESOLVER_ESM = `;(function () {
|
|
|
883
885
|
__neatDir = __parent
|
|
884
886
|
}
|
|
885
887
|
} catch (_e) {}
|
|
886
|
-
process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ||= 'http://localhost:4318/v1/traces'
|
|
888
|
+
process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ||= 'http://localhost:4318/projects/__PROJECT__/v1/traces'
|
|
887
889
|
})()`;
|
|
888
890
|
function neatCaptureSource(ts) {
|
|
889
891
|
const spanT = ts ? ": any" : "";
|
|
@@ -1285,14 +1287,15 @@ ${registrations.join("\n")}
|
|
|
1285
1287
|
`;
|
|
1286
1288
|
return template.replace(/__SERVICE_NAME__/g, serviceName).replace(/__PROJECT__/g, projectName).replace(/__INSTRUMENTATION_BLOCK__\n?/g, block);
|
|
1287
1289
|
}
|
|
1288
|
-
function renderEnvNeat(serviceName,
|
|
1290
|
+
function renderEnvNeat(serviceName, projectName) {
|
|
1289
1291
|
return [
|
|
1290
1292
|
"# Generated by `neat init --apply` (ADR-069).",
|
|
1291
1293
|
`OTEL_SERVICE_NAME=${serviceName}`,
|
|
1292
1294
|
"# Advisory only \u2014 the generated otel-init resolves the live endpoint from",
|
|
1293
|
-
"# <project>/neat-out/daemon.json (ports.otlp) at boot (ADR-096).
|
|
1294
|
-
"# canonical default the daemon takes when its first-choice OTLP
|
|
1295
|
-
"
|
|
1295
|
+
"# <project>/neat-out/daemon.json (ports.otlp + project) at boot (ADR-096).",
|
|
1296
|
+
"# This is the canonical default the daemon takes when its first-choice OTLP",
|
|
1297
|
+
"# port is free; the project scope routes the span without service.name guessing (#879).",
|
|
1298
|
+
`OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4318/projects/${projectName}/v1/traces`,
|
|
1296
1299
|
"OTEL_EXPORTER_OTLP_PROTOCOL=http/json",
|
|
1297
1300
|
"# Set NEAT_OTEL_TOKEN to the daemon's OTLP secret to authenticate exported spans (#410).",
|
|
1298
1301
|
"# NEAT_OTEL_TOKEN=",
|
|
@@ -1358,7 +1361,7 @@ var NEXT_INSTRUMENTATION_EDGE_TS = `${NEXT_INSTRUMENTATION_EDGE_HEADER}
|
|
|
1358
1361
|
import { registerOTel } from '@vercel/otel'
|
|
1359
1362
|
|
|
1360
1363
|
process.env.OTEL_SERVICE_NAME ||= '__SERVICE_NAME__'
|
|
1361
|
-
process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ||= 'http://localhost:4318/v1/traces'
|
|
1364
|
+
process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ||= 'http://localhost:4318/projects/__PROJECT__/v1/traces'
|
|
1362
1365
|
${OTEL_OTLP_PROTOCOL_JS}
|
|
1363
1366
|
${OTEL_OTLP_HEADERS_JS}
|
|
1364
1367
|
|