@kb-labs/rest-api-app 2.39.0 → 2.41.0

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/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { loadRestApiConfig, combineManifestsToRegistry } from '@kb-labs/rest-api-core';
2
2
  import Fastify from 'fastify';
3
- import { loadEnvFromRoot, createServiceBootstrap, platform } from '@kb-labs/core-runtime';
3
+ import { loadEnvFromRoot, createServiceBootstrap, platform, getPlatformRoot } from '@kb-labs/core-runtime';
4
4
  import { EventEmitter } from 'events';
5
5
  import { performance, monitorEventLoopDelay } from 'perf_hooks';
6
6
  import { OperationMetricsTracker, registerOpenAPI, createCorrelatedLogger, createServiceObservabilityDescribe, createServiceObservabilityHealth } from '@kb-labs/shared-http';
@@ -6407,9 +6407,10 @@ async function bootstrap(cwd = process.cwd()) {
6407
6407
  bootstrapLogger.info("Initializing entity registry");
6408
6408
  const isDevelopment = process.env.NODE_ENV !== "production";
6409
6409
  const snapshotTTL = isDevelopment ? 10 * 60 * 1e3 : 60 * 60 * 1e3;
6410
+ const registryRoot = getPlatformRoot() ?? repoRoot;
6410
6411
  const registryInitStart = performance.now();
6411
6412
  const registry = await createRegistry({
6412
- root: repoRoot,
6413
+ root: registryRoot,
6413
6414
  cache: {
6414
6415
  ttlMs: snapshotTTL,
6415
6416
  adapter: platform.cache