@neat.is/core 0.6.2 → 0.6.3-dev.20260726
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-OY7FGJAX.js → chunk-7QXN726V.js} +2 -2
- package/dist/{chunk-AOWANF2K.js → chunk-L64CATKE.js} +4271 -4008
- package/dist/chunk-L64CATKE.js.map +1 -0
- package/dist/{chunk-MSZ4NALT.js → chunk-PWIT35Z4.js} +21 -12
- package/dist/chunk-PWIT35Z4.js.map +1 -0
- package/dist/{chunk-2MAGU6RB.js → chunk-ZLAZ7PLC.js} +7 -2
- package/dist/chunk-ZLAZ7PLC.js.map +1 -0
- package/dist/cli.cjs +4122 -3855
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +4 -4
- package/dist/index.cjs +3945 -3669
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4 -4
- package/dist/neatd.cjs +3975 -3699
- package/dist/neatd.cjs.map +1 -1
- package/dist/neatd.js +3 -3
- package/dist/{otel-grpc-AHNPM5LX.js → otel-grpc-WXKM7YBW.js} +3 -3
- package/dist/server.cjs +4540 -4273
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +3 -3
- package/package.json +2 -2
- package/dist/chunk-2MAGU6RB.js.map +0 -1
- package/dist/chunk-AOWANF2K.js.map +0 -1
- package/dist/chunk-MSZ4NALT.js.map +0 -1
- /package/dist/{chunk-OY7FGJAX.js.map → chunk-7QXN726V.js.map} +0 -0
- /package/dist/{otel-grpc-AHNPM5LX.js.map → otel-grpc-WXKM7YBW.js.map} +0 -0
|
@@ -31,13 +31,13 @@ import {
|
|
|
31
31
|
touchLastSeen,
|
|
32
32
|
upsertObservedEdge,
|
|
33
33
|
writeAtomically
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-L64CATKE.js";
|
|
35
35
|
import {
|
|
36
36
|
assertBindAuthority,
|
|
37
37
|
buildOtelReceiver,
|
|
38
38
|
listenSteppingOtlp,
|
|
39
39
|
readAuthEnv
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-ZLAZ7PLC.js";
|
|
41
41
|
|
|
42
42
|
// src/daemon.ts
|
|
43
43
|
import {
|
|
@@ -2132,7 +2132,7 @@ function routeSpanToProject(serviceName, projects) {
|
|
|
2132
2132
|
if (!serviceName) return DEFAULT_PROJECT;
|
|
2133
2133
|
for (const entry of projects) {
|
|
2134
2134
|
if (entry.status === "paused") continue;
|
|
2135
|
-
if (entry.name === serviceName) return entry.name;
|
|
2135
|
+
if (entry.name.toLowerCase() === serviceName.toLowerCase()) return entry.name;
|
|
2136
2136
|
}
|
|
2137
2137
|
const candidates = [];
|
|
2138
2138
|
for (const entry of projects) {
|
|
@@ -2150,18 +2150,22 @@ function routeSpanToProject(serviceName, projects) {
|
|
|
2150
2150
|
return DEFAULT_PROJECT;
|
|
2151
2151
|
}
|
|
2152
2152
|
function isTokenPrefix(prefix, full) {
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2153
|
+
const p = prefix.toLowerCase();
|
|
2154
|
+
const f = full.toLowerCase();
|
|
2155
|
+
if (p.length >= f.length) return false;
|
|
2156
|
+
if (!f.startsWith(p)) return false;
|
|
2157
|
+
const sep = f.charAt(p.length);
|
|
2156
2158
|
return sep === "-" || sep === "_";
|
|
2157
2159
|
}
|
|
2158
2160
|
function isTokenContained(needle, haystack) {
|
|
2159
|
-
|
|
2160
|
-
const
|
|
2161
|
-
|
|
2161
|
+
const n = needle.toLowerCase();
|
|
2162
|
+
const h = haystack.toLowerCase();
|
|
2163
|
+
if (!h.includes(n)) return false;
|
|
2164
|
+
const tokens = h.split(/[-_]/);
|
|
2165
|
+
return tokens.includes(n);
|
|
2162
2166
|
}
|
|
2163
2167
|
function serviceNameMatchesProject(serviceName, project) {
|
|
2164
|
-
if (serviceName === project) return true;
|
|
2168
|
+
if (serviceName.toLowerCase() === project.toLowerCase()) return true;
|
|
2165
2169
|
if (isTokenPrefix(project, serviceName)) return true;
|
|
2166
2170
|
if (isTokenContained(project, serviceName)) return true;
|
|
2167
2171
|
return false;
|
|
@@ -2618,7 +2622,12 @@ async function startDaemon(opts = {}) {
|
|
|
2618
2622
|
const slot = await resolveSlotByName(project, span.service, span.traceId);
|
|
2619
2623
|
if (!slot) return;
|
|
2620
2624
|
await makeErrorSpanWriter(slot.paths.errorsPath, slot.graph, slot.entry.path)(span);
|
|
2621
|
-
}
|
|
2625
|
+
},
|
|
2626
|
+
// #881 — 404 a project-scoped POST for a project this daemon doesn't
|
|
2627
|
+
// host, rather than accepting it and dropping the batch. `slots` covers
|
|
2628
|
+
// active/recovering projects, `bootstrapStatus` the ones still
|
|
2629
|
+
// extracting; a foreign or wrong-cased project name matches neither.
|
|
2630
|
+
isProjectRegistered: (project) => slots.has(project) || bootstrapStatus.has(project)
|
|
2622
2631
|
});
|
|
2623
2632
|
otlpAddress = await listenSteppingOtlp(otlpApp, otlpPort, host);
|
|
2624
2633
|
console.log(`neatd: OTLP listening on ${otlpAddress}/v1/traces`);
|
|
@@ -2798,4 +2807,4 @@ export {
|
|
|
2798
2807
|
resolveHost,
|
|
2799
2808
|
startDaemon
|
|
2800
2809
|
};
|
|
2801
|
-
//# sourceMappingURL=chunk-
|
|
2810
|
+
//# sourceMappingURL=chunk-PWIT35Z4.js.map
|