veryfront 0.1.1239 → 0.1.1241
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/esm/cli/commands/build/command-help.d.ts.map +1 -1
- package/esm/cli/commands/build/command-help.js +4 -0
- package/esm/cli/commands/build/command.d.ts +3 -1
- package/esm/cli/commands/build/command.d.ts.map +1 -1
- package/esm/cli/commands/build/command.js +13 -5
- package/esm/cli/commands/build/handler.d.ts +17 -0
- package/esm/cli/commands/build/handler.d.ts.map +1 -1
- package/esm/cli/commands/build/handler.js +188 -9
- package/esm/cli/commands/generate/command.d.ts.map +1 -1
- package/esm/cli/commands/generate/command.js +40 -0
- package/esm/cli/commands/push/command.d.ts.map +1 -1
- package/esm/cli/commands/push/command.js +24 -16
- package/esm/cli/shared/ensure-content-processor.d.ts +16 -1
- package/esm/cli/shared/ensure-content-processor.d.ts.map +1 -1
- package/esm/cli/shared/ensure-content-processor.js +39 -5
- package/esm/cli/shared/project-creation.d.ts.map +1 -1
- package/esm/cli/shared/project-creation.js +29 -1
- package/esm/deno.d.ts +14 -5
- package/esm/deno.js +23 -7
- package/esm/extensions/ext-llm-openai/src/openai-chat-stream.d.ts.map +1 -1
- package/esm/extensions/ext-llm-openai/src/openai-chat-stream.js +16 -6
- package/esm/extensions/ext-llm-openai/src/openai-provider.d.ts.map +1 -1
- package/esm/extensions/ext-llm-openai/src/openai-provider.js +11 -2
- package/esm/extensions/ext-llm-openai/src/openai-reasoning-models.d.ts +2 -14
- package/esm/extensions/ext-llm-openai/src/openai-reasoning-models.d.ts.map +1 -1
- package/esm/extensions/ext-llm-openai/src/openai-reasoning-models.js +1 -72
- package/esm/extensions/ext-schema-zod/src/adapter.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/browser-aliases.d.ts +164 -0
- package/esm/src/agent/ag-ui/browser-aliases.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/browser-aliases.js +68 -0
- package/esm/src/agent/ag-ui/chat-ui-chunk-encoder.d.ts +35 -0
- package/esm/src/agent/ag-ui/chat-ui-chunk-encoder.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/{chat-ui-chunk-browser-encoder.js → chat-ui-chunk-encoder.js} +11 -11
- package/esm/src/agent/ag-ui/chunk-encoder-bridge.d.ts +8 -6
- package/esm/src/agent/ag-ui/chunk-encoder-bridge.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/chunk-encoder-bridge.js +5 -4
- package/esm/src/agent/ag-ui/chunk-encoder.d.ts +26 -0
- package/esm/src/agent/ag-ui/chunk-encoder.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/{browser-chunk-encoder.js → chunk-encoder.js} +3 -2
- package/esm/src/agent/ag-ui/{browser-encoder.d.ts → encoder.d.ts} +33 -19
- package/esm/src/agent/ag-ui/encoder.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/{browser-encoder.js → encoder.js} +81 -27
- package/esm/src/agent/ag-ui/finalize-tracker.d.ts +15 -0
- package/esm/src/agent/ag-ui/finalize-tracker.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/{browser-finalize-tracker.js → finalize-tracker.js} +4 -4
- package/esm/src/agent/ag-ui/response-stream.d.ts +36 -0
- package/esm/src/agent/ag-ui/response-stream.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/{browser-response-stream.js → response-stream.js} +6 -3
- package/esm/src/agent/ag-ui/runtime-chat-stream-encoder.d.ts +1 -1
- package/esm/src/agent/ag-ui/runtime-chat-stream-encoder.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/runtime-event-encoder.d.ts +7 -7
- package/esm/src/agent/ag-ui/runtime-event-encoder.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/runtime-event-encoder.js +4 -4
- package/esm/src/agent/ag-ui/runtime-response.d.ts +20 -0
- package/esm/src/agent/ag-ui/runtime-response.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/runtime-response.js +16 -0
- package/esm/src/agent/ag-ui/sse-parser.d.ts +1 -1
- package/esm/src/agent/ag-ui/sse-parser.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/sse-parser.js +3 -3
- package/esm/src/agent/ag-ui/tracked-response.d.ts +11 -0
- package/esm/src/agent/ag-ui/tracked-response.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/{tracked-browser-response.js → tracked-response.js} +6 -4
- package/esm/src/agent/conversation/hosted-lifecycle.d.ts.map +1 -1
- package/esm/src/agent/conversation/hosted-lifecycle.js +2 -1
- package/esm/src/agent/conversation/lifecycle-run-event-adapter.d.ts.map +1 -1
- package/esm/src/agent/conversation/lifecycle-run-event-adapter.js +2 -0
- package/esm/src/agent/conversation/private-run-event.d.ts.map +1 -1
- package/esm/src/agent/conversation/private-run-event.js +174 -3
- package/esm/src/agent/conversation/run-chunk-mirror.d.ts +2 -0
- package/esm/src/agent/conversation/run-chunk-mirror.d.ts.map +1 -1
- package/esm/src/agent/conversation/run-chunk-mirror.js +13 -6
- package/esm/src/agent/conversation/run-events.d.ts +8 -0
- package/esm/src/agent/conversation/run-events.d.ts.map +1 -1
- package/esm/src/agent/conversation/run-events.js +54 -4
- package/esm/src/agent/conversation/run-stream-mirror.d.ts.map +1 -1
- package/esm/src/agent/conversation/run-stream-mirror.js +5 -2
- package/esm/src/agent/hosted/durable-run-event-sink.d.ts +2 -1
- package/esm/src/agent/hosted/durable-run-event-sink.d.ts.map +1 -1
- package/esm/src/agent/hosted/durable-run-event-sink.js +9 -7
- package/esm/src/agent/hosted/prepared-chat-execution.js +2 -2
- package/esm/src/agent/index.d.ts +9 -8
- package/esm/src/agent/index.d.ts.map +1 -1
- package/esm/src/agent/index.js +9 -8
- package/esm/src/agent/memory/memory.d.ts.map +1 -1
- package/esm/src/agent/memory/memory.js +7 -6
- package/esm/src/agent/react/use-chat/types.d.ts +2 -0
- package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.js +3 -2
- package/esm/src/agent/runtime/ag-ui-contract.d.ts +2 -2
- package/esm/src/agent/runtime/ag-ui-contract.d.ts.map +1 -1
- package/esm/src/agent/runtime/ag-ui-contract.js +2 -2
- package/esm/src/agent/runtime/chat-stream-handler.d.ts.map +1 -1
- package/esm/src/agent/runtime/chat-stream-handler.js +34 -4
- package/esm/src/agent/runtime/index.d.ts.map +1 -1
- package/esm/src/agent/runtime/index.js +15 -6
- package/esm/src/agent/streaming/data-stream.d.ts +1 -1
- package/esm/src/agent/streaming/data-stream.d.ts.map +1 -1
- package/esm/src/agent/streaming/fork-runtime-part-mapper.d.ts +1 -1
- package/esm/src/agent/streaming/fork-runtime-part-mapper.d.ts.map +1 -1
- package/esm/src/agent/streaming/lifecycle/live-adapter.d.ts.map +1 -1
- package/esm/src/agent/streaming/lifecycle/live-adapter.js +2 -0
- package/esm/src/agent/streaming/lifecycle/reducer.d.ts.map +1 -1
- package/esm/src/agent/streaming/lifecycle/reducer.js +7 -0
- package/esm/src/agent/streaming/lifecycle/runtime-provider-adapter.js +4 -0
- package/esm/src/build/production-build/templates.d.ts.map +1 -1
- package/esm/src/build/production-build/templates.js +1 -1
- package/esm/src/cache/request-cache-batcher.d.ts +1 -0
- package/esm/src/cache/request-cache-batcher.d.ts.map +1 -1
- package/esm/src/cache/request-cache-batcher.js +21 -7
- package/esm/src/chat/ag-ui.d.ts +1 -1
- package/esm/src/chat/index.d.ts +2 -2
- package/esm/src/chat/index.d.ts.map +1 -1
- package/esm/src/chat/index.js +1 -1
- package/esm/src/config/config-shim.d.ts +1 -1
- package/esm/src/config/config-shim.d.ts.map +1 -1
- package/esm/src/config/config-shim.js +1 -1
- package/esm/src/config/declarative-evaluator-worker-protocol.d.ts.map +1 -1
- package/esm/src/config/env.js +1 -1
- package/esm/src/config/environment-config.js +1 -1
- package/esm/src/config/loader.d.ts.map +1 -1
- package/esm/src/config/loader.js +4 -4
- package/esm/src/config/schemas/config.schema.d.ts +20 -0
- package/esm/src/config/schemas/config.schema.d.ts.map +1 -1
- package/esm/src/config/schemas/config.schema.js +27 -0
- package/esm/src/config/server-external-packages.d.ts +11 -0
- package/esm/src/config/server-external-packages.d.ts.map +1 -0
- package/esm/src/config/server-external-packages.js +53 -0
- package/esm/src/data/data-fetcher.d.ts.map +1 -1
- package/esm/src/data/data-fetcher.js +9 -4
- package/esm/src/data/data-result-validation.d.ts +5 -0
- package/esm/src/data/data-result-validation.d.ts.map +1 -0
- package/esm/src/data/data-result-validation.js +56 -0
- package/esm/src/data/helpers.d.ts +5 -5
- package/esm/src/data/helpers.d.ts.map +1 -1
- package/esm/src/data/helpers.js +22 -68
- package/esm/src/data/index.d.ts +1 -1
- package/esm/src/data/index.d.ts.map +1 -1
- package/esm/src/data/response-metadata.d.ts +23 -0
- package/esm/src/data/response-metadata.d.ts.map +1 -0
- package/esm/src/data/response-metadata.js +311 -0
- package/esm/src/data/schemas/data.schema.d.ts +95 -6
- package/esm/src/data/schemas/data.schema.d.ts.map +1 -1
- package/esm/src/data/schemas/data.schema.js +57 -3
- package/esm/src/data/schemas/index.d.ts +1 -1
- package/esm/src/data/schemas/index.d.ts.map +1 -1
- package/esm/src/data/schemas/index.js +1 -1
- package/esm/src/data/server-data-fetcher.d.ts.map +1 -1
- package/esm/src/data/server-data-fetcher.js +5 -5
- package/esm/src/data/static-data-fetcher.d.ts +2 -2
- package/esm/src/data/static-data-fetcher.d.ts.map +1 -1
- package/esm/src/data/static-data-fetcher.js +6 -3
- package/esm/src/data/types.d.ts +1 -1
- package/esm/src/data/types.d.ts.map +1 -1
- package/esm/src/discovery/discovery-engine.d.ts.map +1 -1
- package/esm/src/discovery/discovery-engine.js +81 -26
- package/esm/src/discovery/handlers/task-handler.d.ts +1 -1
- package/esm/src/discovery/handlers/task-handler.d.ts.map +1 -1
- package/esm/src/discovery/handlers/task-handler.js +6 -3
- package/esm/src/discovery/types.d.ts +6 -4
- package/esm/src/discovery/types.d.ts.map +1 -1
- package/esm/src/errors/error-registry/runtime.d.ts +2 -0
- package/esm/src/errors/error-registry/runtime.d.ts.map +1 -1
- package/esm/src/errors/error-registry/runtime.js +8 -0
- package/esm/src/errors/error-registry.d.ts +1 -0
- package/esm/src/errors/error-registry.d.ts.map +1 -1
- package/esm/src/errors/index.d.ts +1 -1
- package/esm/src/errors/index.d.ts.map +1 -1
- package/esm/src/errors/index.js +1 -1
- package/esm/src/errors/user-friendly/error-wrapper.js +1 -1
- package/esm/src/errors/veryfront-error.d.ts.map +1 -1
- package/esm/src/extensions/index.d.ts +2 -0
- package/esm/src/extensions/index.d.ts.map +1 -1
- package/esm/src/extensions/index.js +1 -0
- package/esm/src/extensions/parser/code-parser.d.ts +9 -0
- package/esm/src/extensions/parser/code-parser.d.ts.map +1 -1
- package/esm/src/extensions/parser/defaults.d.ts +5 -0
- package/esm/src/extensions/parser/defaults.d.ts.map +1 -1
- package/esm/src/extensions/parser/defaults.js +23 -11
- package/esm/src/fs/index.d.ts +50 -1
- package/esm/src/fs/index.d.ts.map +1 -1
- package/esm/src/fs/index.js +50 -1
- package/esm/src/html/html-injection.d.ts +2 -0
- package/esm/src/html/html-injection.d.ts.map +1 -1
- package/esm/src/html/html-injection.js +4 -1
- package/esm/src/html/html-shell-generator.d.ts.map +1 -1
- package/esm/src/html/html-shell-generator.js +11 -3
- package/esm/src/html/hydration-script-builder/hydration-runtime.generated.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/hydration-runtime.generated.js +1 -1
- package/esm/src/html/hydration-script-builder/prod-runtime-selection.d.ts +23 -0
- package/esm/src/html/hydration-script-builder/prod-runtime-selection.d.ts.map +1 -0
- package/esm/src/html/hydration-script-builder/prod-runtime-selection.js +55 -0
- package/esm/src/html/hydration-script-builder/prod-scripts.d.ts +2 -0
- package/esm/src/html/hydration-script-builder/prod-scripts.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/prod-scripts.js +12 -3
- package/esm/src/html/schemas/html.schema.d.ts +2 -0
- package/esm/src/html/schemas/html.schema.d.ts.map +1 -1
- package/esm/src/html/schemas/html.schema.js +2 -0
- package/esm/src/html/styles-builder/css-hash-cache.d.ts +1 -1
- package/esm/src/html/styles-builder/css-hash-cache.d.ts.map +1 -1
- package/esm/src/html/styles-builder/css-hash-cache.js +1 -1
- package/esm/src/index.client.d.ts +2 -2
- package/esm/src/index.client.d.ts.map +1 -1
- package/esm/src/index.client.js +3 -1
- package/esm/src/index.d.ts +1 -1
- package/esm/src/index.d.ts.map +1 -1
- package/esm/src/internal-agents/ag-ui-sse.d.ts +7 -7
- package/esm/src/internal-agents/ag-ui-sse.d.ts.map +1 -1
- package/esm/src/internal-agents/ag-ui-sse.js +17 -9
- package/esm/src/internal-agents/control-plane-auth.js +1 -1
- package/esm/src/internal-agents/run-stream.d.ts.map +1 -1
- package/esm/src/internal-agents/run-stream.js +15 -9
- package/esm/src/modules/import-map/loader.d.ts.map +1 -1
- package/esm/src/modules/import-map/loader.js +2 -2
- package/esm/src/modules/import-map/merger.js +2 -2
- package/esm/src/modules/import-map/preloader.js +2 -2
- package/esm/src/modules/react-loader/component-loader.d.ts.map +1 -1
- package/esm/src/modules/react-loader/component-loader.js +2 -0
- package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/loader.js +3 -2
- package/esm/src/modules/react-loader/ssr-module-loader/ssr-cache-manager.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/ssr-cache-manager.js +7 -1
- package/esm/src/modules/react-loader/ssr-module-loader/types.d.ts +2 -0
- package/esm/src/modules/react-loader/ssr-module-loader/types.d.ts.map +1 -1
- package/esm/src/modules/react-loader/transformed-module-coordinator.d.ts.map +1 -1
- package/esm/src/modules/react-loader/transformed-module-coordinator.js +2 -1
- package/esm/src/modules/react-loader/types.d.ts +2 -0
- package/esm/src/modules/react-loader/types.d.ts.map +1 -1
- package/esm/src/modules/server/module-response-cache.d.ts +1 -0
- package/esm/src/modules/server/module-response-cache.d.ts.map +1 -1
- package/esm/src/modules/server/module-response-cache.js +5 -0
- package/esm/src/modules/server/module-server.d.ts.map +1 -1
- package/esm/src/modules/server/module-server.js +4 -0
- package/esm/src/modules/server/module-transform.d.ts.map +1 -1
- package/esm/src/modules/server/module-transform.js +2 -0
- package/esm/src/observability/metrics/config.js +1 -1
- package/esm/src/observability/request-profiler.js +1 -1
- package/esm/src/observability/telemetry-error.js +2 -2
- package/esm/src/observability/tracing/telemetry-env.js +1 -1
- package/esm/src/platform/adapters/fs/cache/file-cache.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/cache/file-cache.js +5 -0
- package/esm/src/platform/adapters/fs/veryfront/adapter.d.ts +39 -0
- package/esm/src/platform/adapters/fs/veryfront/adapter.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/adapter.js +209 -40
- package/esm/src/platform/adapters/fs/veryfront/file-list-index.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/file-list-index.js +0 -14
- package/esm/src/platform/adapters/fs/veryfront/read-operations-helpers.d.ts +0 -1
- package/esm/src/platform/adapters/fs/veryfront/read-operations-helpers.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/read-operations-helpers.js +0 -3
- package/esm/src/platform/adapters/fs/veryfront/read-operations.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/read-operations.js +1 -4
- package/esm/src/platform/adapters/fs/veryfront/request-context.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/request-context.js +4 -0
- package/esm/src/platform/adapters/fs/veryfront/stat-operations.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/stat-operations.js +9 -1
- package/esm/src/platform/adapters/fs/veryfront/websocket-manager-helpers.js +1 -1
- package/esm/src/platform/adapters/fs/veryfront/websocket-manager.d.ts +2 -1
- package/esm/src/platform/adapters/fs/veryfront/websocket-manager.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/websocket-manager.js +97 -66
- package/esm/src/platform/compat/dns.d.ts +10 -0
- package/esm/src/platform/compat/dns.d.ts.map +1 -1
- package/esm/src/platform/compat/dns.js +50 -0
- package/esm/src/platform/compat/http/pinned-fetch.d.ts +1 -1
- package/esm/src/platform/compat/process/lifecycle.d.ts +10 -0
- package/esm/src/platform/compat/process/lifecycle.d.ts.map +1 -1
- package/esm/src/platform/compat/process/lifecycle.js +23 -0
- package/esm/src/platform/compat/process.d.ts +1 -1
- package/esm/src/platform/compat/process.d.ts.map +1 -1
- package/esm/src/platform/compat/process.js +1 -1
- package/esm/src/platform/compat/proxy-topology.js +1 -1
- package/esm/src/platform/request-context-access.d.ts +24 -0
- package/esm/src/platform/request-context-access.d.ts.map +1 -0
- package/esm/src/platform/request-context-access.js +26 -0
- package/esm/src/provider/shared/openai-reasoning.d.ts +16 -0
- package/esm/src/provider/shared/openai-reasoning.d.ts.map +1 -0
- package/esm/src/provider/shared/openai-reasoning.js +73 -0
- package/esm/src/provider/types.d.ts +2 -0
- package/esm/src/provider/types.d.ts.map +1 -1
- package/esm/src/provider/veryfront-cloud/provider.d.ts.map +1 -1
- package/esm/src/provider/veryfront-cloud/provider.js +45 -18
- package/esm/src/proxy/handler.d.ts +1 -0
- package/esm/src/proxy/handler.d.ts.map +1 -1
- package/esm/src/proxy/handler.js +17 -4
- package/esm/src/proxy/proxy-error-context.d.ts +1 -0
- package/esm/src/proxy/proxy-error-context.d.ts.map +1 -1
- package/esm/src/proxy/proxy-error-context.js +1 -0
- package/esm/src/proxy/request-host.d.ts +3 -0
- package/esm/src/proxy/request-host.d.ts.map +1 -1
- package/esm/src/proxy/request-host.js +28 -8
- package/esm/src/proxy/routing-invalidation-redis.d.ts.map +1 -1
- package/esm/src/proxy/routing-invalidation-redis.js +38 -4
- package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts +27 -3
- package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/attachments-panel.js +29 -7
- package/esm/src/react/components/chat/chat/components/sidebar.d.ts +15 -6
- package/esm/src/react/components/chat/chat/components/sidebar.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/sidebar.js +37 -4
- package/esm/src/react/components/chat/chat/components/sidebar.types.d.ts +12 -1
- package/esm/src/react/components/chat/chat/components/sidebar.types.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts +3 -1
- package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-composer.js +17 -6
- package/esm/src/react/components/chat/chat/composition/chat-composer.types.d.ts +12 -5
- package/esm/src/react/components/chat/chat/composition/chat-composer.types.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-root.d.ts +18 -5
- package/esm/src/react/components/chat/chat/composition/chat-root.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-root.js +65 -1
- package/esm/src/react/components/chat/chat/composition/use-composer-value.d.ts +6 -3
- package/esm/src/react/components/chat/chat/composition/use-composer-value.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/use-composer-value.js +56 -5
- package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts +7 -1
- package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts +14 -4
- package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/conversations-context.js +10 -1
- package/esm/src/react/components/chat/chat/index.d.ts +1 -1
- package/esm/src/react/components/chat/chat/index.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/persistence/conversation-codec.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat.d.ts +1 -1
- package/esm/src/react/components/chat/chat.d.ts.map +1 -1
- package/esm/src/react/server-render-context.d.ts.map +1 -1
- package/esm/src/release-assets/dependency-artifact-builder.d.ts.map +1 -1
- package/esm/src/rendering/app-reserved.d.ts +2 -2
- package/esm/src/rendering/app-reserved.d.ts.map +1 -1
- package/esm/src/rendering/app-reserved.js +4 -3
- package/esm/src/rendering/cache/cache-coordinator.d.ts.map +1 -1
- package/esm/src/rendering/cache/cache-coordinator.js +1 -0
- package/esm/src/rendering/cache/cache-payload.d.ts.map +1 -1
- package/esm/src/rendering/cache/cache-payload.js +44 -0
- package/esm/src/rendering/component-handling.d.ts +4 -1
- package/esm/src/rendering/component-handling.d.ts.map +1 -1
- package/esm/src/rendering/component-handling.js +13 -6
- package/esm/src/rendering/layouts/layout-applicator.d.ts.map +1 -1
- package/esm/src/rendering/layouts/layout-applicator.js +3 -1
- package/esm/src/rendering/layouts/layout-collector.d.ts +1 -0
- package/esm/src/rendering/layouts/layout-collector.d.ts.map +1 -1
- package/esm/src/rendering/layouts/layout-collector.js +201 -4
- package/esm/src/rendering/layouts/utils/applicator.d.ts +1 -1
- package/esm/src/rendering/layouts/utils/applicator.d.ts.map +1 -1
- package/esm/src/rendering/layouts/utils/applicator.js +3 -3
- package/esm/src/rendering/layouts/utils/component-loader.d.ts +2 -2
- package/esm/src/rendering/layouts/utils/component-loader.d.ts.map +1 -1
- package/esm/src/rendering/layouts/utils/component-loader.js +12 -4
- package/esm/src/rendering/orchestrator/file-resolver/index.d.ts +3 -1
- package/esm/src/rendering/orchestrator/file-resolver/index.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/file-resolver/index.js +13 -5
- package/esm/src/rendering/orchestrator/html.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/html.js +26 -10
- package/esm/src/rendering/orchestrator/layout.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/layout.js +2 -2
- package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.js +20 -2
- package/esm/src/rendering/orchestrator/module-loader/index.d.ts +2 -0
- package/esm/src/rendering/orchestrator/module-loader/index.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/index.js +6 -3
- package/esm/src/rendering/orchestrator/module-loader/module-cache-lookup.d.ts +3 -2
- package/esm/src/rendering/orchestrator/module-loader/module-cache-lookup.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/module-cache-lookup.js +6 -6
- package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts +1 -0
- package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/module-persistence.js +2 -2
- package/esm/src/rendering/orchestrator/module-loader/module-transform-cache.d.ts +2 -0
- package/esm/src/rendering/orchestrator/module-loader/module-transform-cache.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/module-transform-cache.js +7 -1
- package/esm/src/rendering/orchestrator/pipeline.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/pipeline.js +58 -10
- package/esm/src/rendering/orchestrator/render-result-assembly.d.ts +3 -0
- package/esm/src/rendering/orchestrator/render-result-assembly.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/render-result-assembly.js +3 -1
- package/esm/src/rendering/page-renderer.d.ts +2 -0
- package/esm/src/rendering/page-renderer.d.ts.map +1 -1
- package/esm/src/rendering/page-renderer.js +4 -1
- package/esm/src/rendering/page-rendering.d.ts +2 -0
- package/esm/src/rendering/page-rendering.d.ts.map +1 -1
- package/esm/src/rendering/page-rendering.js +1 -0
- package/esm/src/rendering/renderer.d.ts.map +1 -1
- package/esm/src/rendering/renderer.js +31 -1
- package/esm/src/rendering/script-page-handling.d.ts +2 -0
- package/esm/src/rendering/script-page-handling.d.ts.map +1 -1
- package/esm/src/rendering/script-page-handling.js +17 -1
- package/esm/src/rendering/shared/context-aware-cache.d.ts.map +1 -1
- package/esm/src/rendering/shared/context-aware-cache.js +3 -0
- package/esm/src/rendering/snippet-renderer.d.ts +10 -0
- package/esm/src/rendering/snippet-renderer.d.ts.map +1 -1
- package/esm/src/rendering/snippet-renderer.js +40 -18
- package/esm/src/rendering/ssr/component-registry.d.ts +1 -1
- package/esm/src/rendering/ssr/component-registry.d.ts.map +1 -1
- package/esm/src/rendering/ssr/component-registry.js +13 -6
- package/esm/src/rendering/ssr-outcome.d.ts +4 -3
- package/esm/src/rendering/ssr-outcome.d.ts.map +1 -1
- package/esm/src/rendering/ssr-outcome.js +25 -8
- package/esm/src/routing/api/handler.d.ts +1 -1
- package/esm/src/routing/api/handler.d.ts.map +1 -1
- package/esm/src/routing/api/handler.js +6 -1
- package/esm/src/runtime/model-call-context.d.ts +37 -2
- package/esm/src/runtime/model-call-context.d.ts.map +1 -1
- package/esm/src/runtime/model-call-context.js +42 -1
- package/esm/src/runtime/runtime-bridge.d.ts.map +1 -1
- package/esm/src/runtime/runtime-bridge.js +108 -8
- package/esm/src/sandbox/shell-tools.d.ts.map +1 -1
- package/esm/src/sandbox/shell-tools.js +16 -6
- package/esm/src/schedule/validation.d.ts +9 -1
- package/esm/src/schedule/validation.d.ts.map +1 -1
- package/esm/src/schedule/validation.js +167 -80
- package/esm/src/schemas/json-value.d.ts.map +1 -1
- package/esm/src/schemas/json-value.js +81 -37
- package/esm/src/security/http/base-handler.js +1 -1
- package/esm/src/security/sandbox/project-worker.d.ts +1 -0
- package/esm/src/security/sandbox/project-worker.d.ts.map +1 -1
- package/esm/src/security/sandbox/project-worker.js +6 -0
- package/esm/src/security/sandbox/worker-read-scope.d.ts +20 -0
- package/esm/src/security/sandbox/worker-read-scope.d.ts.map +1 -0
- package/esm/src/security/sandbox/worker-read-scope.js +127 -0
- package/esm/src/security/sandbox/worker-types.d.ts +12 -0
- package/esm/src/security/sandbox/worker-types.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/dashboard/api.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/dashboard/api.js +70 -3
- package/esm/src/server/handlers/dev/files/esbuild-plugins.d.ts +5 -0
- package/esm/src/server/handlers/dev/files/esbuild-plugins.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/files/esbuild-plugins.js +61 -3
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +227 -29
- package/esm/src/server/handlers/request/api/pages-api-handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/api/pages-api-handler.js +20 -2
- package/esm/src/server/handlers/request/module/page-data-endpoint-handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/module/page-data-endpoint-handler.js +32 -15
- package/esm/src/server/handlers/request/prod-hydration-module.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/prod-hydration-module.handler.js +10 -3
- package/esm/src/server/handlers/request/project-run-execute.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/project-run-execute.handler.js +1 -0
- package/esm/src/server/handlers/request/snippet.handler.d.ts +6 -0
- package/esm/src/server/handlers/request/snippet.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/snippet.handler.js +8 -1
- package/esm/src/server/handlers/request/ssr/error-page-fallback.js +1 -0
- package/esm/src/server/handlers/request/ssr/ssr-response-builder.d.ts.map +1 -1
- package/esm/src/server/handlers/request/ssr/ssr-response-builder.js +10 -6
- package/esm/src/server/handlers/request/ssr/ssr.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/ssr/ssr.handler.js +22 -10
- package/esm/src/server/handlers/request/static.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/static.handler.js +1 -0
- package/esm/src/server/runtime-handler/handler-context-builder.d.ts +2 -0
- package/esm/src/server/runtime-handler/handler-context-builder.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/handler-context-builder.js +1 -0
- package/esm/src/server/runtime-handler/project-runtime-context.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/project-runtime-context.js +6 -2
- package/esm/src/server/runtime-handler/request-tracker.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/request-tracker.js +10 -3
- package/esm/src/server/services/rendering/ssr.service.d.ts +5 -0
- package/esm/src/server/services/rendering/ssr.service.d.ts.map +1 -1
- package/esm/src/server/services/rendering/ssr.service.js +71 -16
- package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.d.ts.map +1 -1
- package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.js +2 -2
- package/esm/src/server/services/rsc/orchestrators/handler.d.ts.map +1 -1
- package/esm/src/server/services/rsc/orchestrators/handler.js +1 -0
- package/esm/src/server/services/rsc/orchestrators/render-handler.d.ts +1 -0
- package/esm/src/server/services/rsc/orchestrators/render-handler.d.ts.map +1 -1
- package/esm/src/server/services/rsc/orchestrators/render-handler.js +2 -0
- package/esm/src/server/services/static/static-file.service.d.ts +4 -1
- package/esm/src/server/services/static/static-file.service.d.ts.map +1 -1
- package/esm/src/server/services/static/static-file.service.js +48 -22
- package/esm/src/server/shared/browser-module-bundler.d.ts.map +1 -1
- package/esm/src/server/shared/browser-module-bundler.js +10 -0
- package/esm/src/server/utils/request-host.d.ts +6 -0
- package/esm/src/server/utils/request-host.d.ts.map +1 -1
- package/esm/src/server/utils/request-host.js +42 -1
- package/esm/src/skill/tools.d.ts.map +1 -1
- package/esm/src/task/definition-snapshot.d.ts +8 -0
- package/esm/src/task/definition-snapshot.d.ts.map +1 -0
- package/esm/src/task/definition-snapshot.js +154 -0
- package/esm/src/task/discovery.d.ts.map +1 -1
- package/esm/src/task/discovery.js +47 -21
- package/esm/src/task/types.d.ts +3 -0
- package/esm/src/task/types.d.ts.map +1 -1
- package/esm/src/task/types.js +7 -16
- package/esm/src/tool/remote-mcp.d.ts.map +1 -1
- package/esm/src/tool/remote-mcp.js +86 -5
- package/esm/src/transforms/esm/bundle-recovery.d.ts.map +1 -1
- package/esm/src/transforms/esm/bundle-recovery.js +1 -0
- package/esm/src/transforms/esm/http-cache-helpers.d.ts +3 -1
- package/esm/src/transforms/esm/http-cache-helpers.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-cache-helpers.js +18 -2
- package/esm/src/transforms/esm/http-cache-wrapper.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-cache-wrapper.js +23 -0
- package/esm/src/transforms/esm/specifier-resolver.d.ts.map +1 -1
- package/esm/src/transforms/esm/specifier-resolver.js +2 -1
- package/esm/src/transforms/esm/types.d.ts +2 -0
- package/esm/src/transforms/esm/types.d.ts.map +1 -1
- package/esm/src/transforms/import-rewriter/commonjs-policy.d.ts +22 -0
- package/esm/src/transforms/import-rewriter/commonjs-policy.d.ts.map +1 -0
- package/esm/src/transforms/import-rewriter/commonjs-policy.js +75 -0
- package/esm/src/transforms/import-rewriter/core.d.ts.map +1 -1
- package/esm/src/transforms/import-rewriter/core.js +29 -1
- package/esm/src/transforms/import-rewriter/ssr-adapter.d.ts +2 -0
- package/esm/src/transforms/import-rewriter/ssr-adapter.d.ts.map +1 -1
- package/esm/src/transforms/import-rewriter/ssr-adapter.js +79 -10
- package/esm/src/transforms/import-rewriter/strategies/bare-strategy.d.ts.map +1 -1
- package/esm/src/transforms/import-rewriter/strategies/bare-strategy.js +14 -4
- package/esm/src/transforms/import-rewriter/types.d.ts +2 -0
- package/esm/src/transforms/import-rewriter/types.d.ts.map +1 -1
- package/esm/src/transforms/import-rewriter/url-builder.d.ts +2 -19
- package/esm/src/transforms/import-rewriter/url-builder.d.ts.map +1 -1
- package/esm/src/transforms/import-rewriter/url-builder.js +2 -67
- package/esm/src/transforms/mdx/esm-module-loader/import-transformer.d.ts +3 -2
- package/esm/src/transforms/mdx/esm-module-loader/import-transformer.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/import-transformer.js +39 -8
- package/esm/src/transforms/mdx/esm-module-loader/jsx/runtime-loader.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/jsx/runtime-loader.js +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.js +1 -0
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/cache-keys.d.ts +3 -3
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/cache-keys.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/cache-keys.js +14 -6
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/distributed-cache.d.ts +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/distributed-cache.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/distributed-cache.js +2 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.d.ts +1 -0
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.js +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/index.d.ts +1 -0
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/index.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/index.js +6 -3
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/module-cache.d.ts +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/module-cache.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/module-cache.js +2 -2
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/persistence.d.ts +1 -0
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/persistence.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/persistence.js +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/source-transform.d.ts +1 -0
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/source-transform.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/source-transform.js +2 -0
- package/esm/src/transforms/mdx/esm-module-loader/module-writer.d.ts +2 -2
- package/esm/src/transforms/mdx/esm-module-loader/module-writer.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-writer.js +15 -7
- package/esm/src/transforms/mdx/esm-module-loader/types.d.ts +4 -0
- package/esm/src/transforms/mdx/esm-module-loader/types.d.ts.map +1 -1
- package/esm/src/transforms/mdx/index.d.ts +1 -0
- package/esm/src/transforms/mdx/index.d.ts.map +1 -1
- package/esm/src/transforms/mdx/index.js +2 -1
- package/esm/src/transforms/pipeline/cache-identity.d.ts +1 -0
- package/esm/src/transforms/pipeline/cache-identity.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/cache-identity.js +15 -0
- package/esm/src/transforms/pipeline/context.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/context.js +2 -0
- package/esm/src/transforms/pipeline/index.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/index.js +1 -0
- package/esm/src/transforms/pipeline/stages/resolve-imports.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/stages/resolve-imports.js +1 -0
- package/esm/src/transforms/pipeline/stages/ssr-http-cache.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/stages/ssr-http-cache.js +1 -0
- package/esm/src/transforms/pipeline/types.d.ts +4 -0
- package/esm/src/transforms/pipeline/types.d.ts.map +1 -1
- package/esm/src/transforms/shared/esm-sh-specifier.d.ts +18 -0
- package/esm/src/transforms/shared/esm-sh-specifier.d.ts.map +1 -0
- package/esm/src/transforms/shared/esm-sh-specifier.js +253 -0
- package/esm/src/transforms/shared/package-specifier.d.ts.map +1 -1
- package/esm/src/transforms/shared/package-specifier.js +9 -2
- package/esm/src/transforms/shared/server-only-packages.d.ts +25 -1
- package/esm/src/transforms/shared/server-only-packages.d.ts.map +1 -1
- package/esm/src/transforms/shared/server-only-packages.js +176 -4
- package/esm/src/types/entities/getEntityInfo.d.ts.map +1 -1
- package/esm/src/types/index.d.ts +5 -0
- package/esm/src/types/index.d.ts.map +1 -1
- package/esm/src/types/server.d.ts +6 -0
- package/esm/src/types/server.d.ts.map +1 -1
- package/esm/src/utils/env-loader.d.ts.map +1 -1
- package/esm/src/utils/env-loader.js +2 -1
- package/esm/src/utils/feature-flags.js +1 -1
- package/esm/src/utils/lru-wrapper.js +2 -2
- package/esm/src/utils/memory/profiler.d.ts +20 -0
- package/esm/src/utils/memory/profiler.d.ts.map +1 -1
- package/esm/src/utils/memory/profiler.js +43 -5
- package/esm/src/utils/perf-timer.js +1 -1
- package/esm/src/utils/redirect-policy.d.ts +18 -0
- package/esm/src/utils/redirect-policy.d.ts.map +1 -0
- package/esm/src/utils/redirect-policy.js +92 -0
- package/esm/src/utils/redis-client.d.ts.map +1 -1
- package/esm/src/utils/redis-client.js +6 -3
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/esm/src/workflow/claude-code/tool.d.ts +27 -27
- package/esm/src/workflow/claude-code/tool.d.ts.map +1 -1
- package/esm/src/workflow/claude-code/wire-protocol.d.ts.map +1 -1
- package/esm/src/workflow/dsl/workflow.d.ts +3 -0
- package/esm/src/workflow/dsl/workflow.d.ts.map +1 -1
- package/esm/src/workflow/dsl/workflow.js +2 -1
- package/esm/src/workflow/executor/workflow-definition-snapshot.d.ts.map +1 -1
- package/esm/src/workflow/executor/workflow-definition-snapshot.js +88 -39
- package/esm/src/workflow/registry.d.ts +4 -1
- package/esm/src/workflow/registry.d.ts.map +1 -1
- package/esm/src/workflow/registry.js +10 -8
- package/esm/src/workflow/types.d.ts +3 -0
- package/esm/src/workflow/types.d.ts.map +1 -1
- package/esm/templates/index.d.ts.map +1 -1
- package/esm/templates/index.js +7 -0
- package/esm/templates/manifest.generated.d.ts.map +1 -1
- package/esm/templates/manifest.generated.js +1 -1
- package/package.json +16 -9
- package/esm/src/agent/ag-ui/browser-chunk-encoder.d.ts +0 -24
- package/esm/src/agent/ag-ui/browser-chunk-encoder.d.ts.map +0 -1
- package/esm/src/agent/ag-ui/browser-encoder.d.ts.map +0 -1
- package/esm/src/agent/ag-ui/browser-finalize-tracker.d.ts +0 -15
- package/esm/src/agent/ag-ui/browser-finalize-tracker.d.ts.map +0 -1
- package/esm/src/agent/ag-ui/browser-response-stream.d.ts +0 -33
- package/esm/src/agent/ag-ui/browser-response-stream.d.ts.map +0 -1
- package/esm/src/agent/ag-ui/chat-ui-chunk-browser-encoder.d.ts +0 -35
- package/esm/src/agent/ag-ui/chat-ui-chunk-browser-encoder.d.ts.map +0 -1
- package/esm/src/agent/ag-ui/runtime-browser-response.d.ts +0 -20
- package/esm/src/agent/ag-ui/runtime-browser-response.d.ts.map +0 -1
- package/esm/src/agent/ag-ui/runtime-browser-response.js +0 -16
- package/esm/src/agent/ag-ui/tracked-browser-response.d.ts +0 -11
- package/esm/src/agent/ag-ui/tracked-browser-response.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-cache.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/fs/cache/file-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,OAAO,KAAK,EAAc,UAAU,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAkC3E;;;GAGG;AACH,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,OAAO,CAAC,CAwBnE;AAED;;GAEG;AACH,wBAAgB,6BAA6B,IAAI,OAAO,CAEvD;AAED;;;;;GAKG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,aAAa,CAA0C;IAC/D,OAAO,CAAC,kBAAkB,CAAK;IAC/B,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,iBAAiB,CAAS;IAClC,OAAO,CAAC,IAAI,CAAK;IACjB,OAAO,CAAC,MAAM,CAAK;gBAEP,OAAO,GAAE,gBAAqB;IAc1C,OAAO,CAAC,UAAU;IAKlB;;;OAGG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IA4BlC;;;OAGG;IACH,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAmChD;;;OAGG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI;IA+Bn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;IACH,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IA8BjD,mEAAmE;IACnE,OAAO,CAAC,aAAa;IAWrB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAezB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAM5B,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAoB1C,8FAA8F;IAC9F,OAAO,CAAC,kBAAkB;IAY1B,qGAAqG;IACrG,OAAO,CAAC,2BAA2B;IAanC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAatC,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAqBpD,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAa/D,4BAA4B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAqB7E,KAAK,IAAI,IAAI;IAOb,KAAK,IAAI,UAAU,GAAG;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE;IAazC,YAAY,IAAI,MAAM;IAetB,OAAO,CAAC,qBAAqB;CAoB9B"}
|
|
@@ -255,6 +255,11 @@ export class FileCache {
|
|
|
255
255
|
deleteAsync(key) {
|
|
256
256
|
return withSpan("platform.fs.cache.deleteAsync", async () => {
|
|
257
257
|
const deletedFromFallback = this.delete(key);
|
|
258
|
+
// setAsync() publishes distributed writes into the request-scoped
|
|
259
|
+
// cache before awaiting the backend. Invalidate that view as part of
|
|
260
|
+
// the same delete, or this request can keep reading a value that the
|
|
261
|
+
// backend no longer contains.
|
|
262
|
+
setInRequestCache(key, null);
|
|
258
263
|
const backend = this.getBackend();
|
|
259
264
|
if (backend) {
|
|
260
265
|
await backend.del(key);
|
|
@@ -20,6 +20,18 @@ export declare class VeryfrontFSAdapter implements FSAdapter {
|
|
|
20
20
|
/** Single-flight background rewarm when the file list cache disappears */
|
|
21
21
|
private fileListWarmupPromise;
|
|
22
22
|
private fileListWarmupKey;
|
|
23
|
+
/**
|
|
24
|
+
* Last listing this adapter fetched or was poked with, kept in memory because
|
|
25
|
+
* a cache write is not guaranteed to retain it: writes are skipped entirely
|
|
26
|
+
* when caching is disabled, oversized listings are dropped by the memory
|
|
27
|
+
* cache, and backend writes can fail. Without this, every module lookup of a
|
|
28
|
+
* render would miss the cache and await its own full listing fetch -- more
|
|
29
|
+
* API traffic than the per-file probing this replaced. It expires with the
|
|
30
|
+
* same TTL as the cache entry it stands in for and is dropped by every
|
|
31
|
+
* invalidation, so it is never fresher or staler than a retained cache write.
|
|
32
|
+
*/
|
|
33
|
+
private retainedFileList;
|
|
34
|
+
private readonly fileListRetentionMs;
|
|
23
35
|
/** Single-flight foreground refresh when a branch preview read misses a newly pushed file. */
|
|
24
36
|
private branchMissRecoveryPromise;
|
|
25
37
|
private branchMissRecoveryGeneration;
|
|
@@ -53,6 +65,27 @@ export declare class VeryfrontFSAdapter implements FSAdapter {
|
|
|
53
65
|
private syncClientContext;
|
|
54
66
|
private getCachedFileListSync;
|
|
55
67
|
private getCachedFileListAsync;
|
|
68
|
+
/** Keep `files` answerable from memory for as long as a cache write would. */
|
|
69
|
+
private retainFileList;
|
|
70
|
+
private clearRetainedFileList;
|
|
71
|
+
/**
|
|
72
|
+
* The retained listing, if it still describes the snapshot the caller is
|
|
73
|
+
* reading. Anything that supersedes the snapshot -- a poke, a refresh, a
|
|
74
|
+
* branch or token change -- either drops it outright or moves the snapshot
|
|
75
|
+
* version past it, so a superseded listing can never answer a read.
|
|
76
|
+
*/
|
|
77
|
+
private readRetainedFileList;
|
|
78
|
+
/**
|
|
79
|
+
* Wait for the in-flight file-list warmup for `cacheKey` and return the
|
|
80
|
+
* fetched listing. SSR module resolution reads this list for every module of
|
|
81
|
+
* a page; when the cached listing has expired, answering "no list" makes each
|
|
82
|
+
* module fall back to its own per-file/per-extension API probing (dozens of
|
|
83
|
+
* sequential fetches per render). Paying for one awaited listing fetch keeps
|
|
84
|
+
* that fan-out at a single API call while staying exactly as fresh: the
|
|
85
|
+
* listing is fetched from the API at request time. Warmup failures resolve to
|
|
86
|
+
* undefined so callers keep the legacy per-file fallback.
|
|
87
|
+
*/
|
|
88
|
+
private awaitFileListWarmup;
|
|
56
89
|
constructor(config: FSAdapterConfig);
|
|
57
90
|
initialize(): Promise<void>;
|
|
58
91
|
private isPersistentCacheInvalidated;
|
|
@@ -64,6 +97,12 @@ export declare class VeryfrontFSAdapter implements FSAdapter {
|
|
|
64
97
|
private refreshBranchSnapshotAfterMiss;
|
|
65
98
|
private withBranchSnapshotRecovery;
|
|
66
99
|
private scheduleFileListWarmup;
|
|
100
|
+
/**
|
|
101
|
+
* Drop every in-memory view of the current source snapshot. Used by pokes
|
|
102
|
+
* that invalidate without carrying replacement files inline, so the next read
|
|
103
|
+
* re-derives everything from the API rather than from a superseded listing.
|
|
104
|
+
*/
|
|
105
|
+
private clearMemoryCaches;
|
|
67
106
|
private markSourceSnapshotChanged;
|
|
68
107
|
private runSourceSnapshotMutation;
|
|
69
108
|
private replaceSourceSnapshot;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/fs/veryfront/adapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,UAAU,EAEV,cAAc,EACd,SAAS,EACT,eAAe,EAEf,sBAAsB,EAGvB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":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;;;;;;OAMG;IACG,iBAAiB,CACrB,OAAO,GAAE;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAO,GACxC,OAAO,CAAC,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAuDrD,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAOpD,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAMrD,0BAA0B,CAC9B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IA0BvD,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IASpC,iBAAiB,IAAI,IAAI;IASzB,OAAO,CAAC,kCAAkC;IAkB1C,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAQ7C,gBAAgB,IAAI,MAAM,GAAG,IAAI;IAIjC,kBAAkB,IAAI,IAAI;IAQ1B,iBAAiB,CAAC,OAAO,EAAE,sBAAsB,GAAG,IAAI;IA6DxD,iBAAiB,IAAI,sBAAsB,GAAG,IAAI;IAWlD,SAAS,IAAI,kBAAkB;YAIjB,iBAAiB;YAKjB,0BAA0B;IAkCxC;;;;;OAKG;YACW,uBAAuB;CAsCtC"}
|
|
@@ -10,7 +10,7 @@ import { buildDirCacheKeyPrefix, buildFileCacheKeyPrefix, buildFileListCacheKey,
|
|
|
10
10
|
import { isPrefixBeingInvalidated } from "./invalidation-state.js";
|
|
11
11
|
import { WebSocketManager } from "./websocket-manager.js";
|
|
12
12
|
import { fetchFileListForContext, hasContentContextChanged, resolveContentContext, summarizeFileList, toClientContext, } from "./adapter-content-context.js";
|
|
13
|
-
import { buildFileCacheOptions, buildRetryConfig, shouldBackgroundPregenerateStyles, } from "./adapter-helpers.js";
|
|
13
|
+
import { buildFileCacheOptions, buildRetryConfig, DEFAULT_CACHE_TTL_MS, shouldBackgroundPregenerateStyles, } from "./adapter-helpers.js";
|
|
14
14
|
import { isNotFoundLikeError } from "./read-operations-helpers.js";
|
|
15
15
|
import { DEFAULT_VERYFRONT_API_SUCCESS_BODY_BYTES } from "../../veryfront-api-transport.js";
|
|
16
16
|
import { requireBoundedFileReadLimit } from "../../bounded-file-read.js";
|
|
@@ -74,6 +74,18 @@ export class VeryfrontFSAdapter {
|
|
|
74
74
|
// entirely when caching is disabled, and can fail on a backend cache.
|
|
75
75
|
fileListWarmupPromise = null;
|
|
76
76
|
fileListWarmupKey = null;
|
|
77
|
+
/**
|
|
78
|
+
* Last listing this adapter fetched or was poked with, kept in memory because
|
|
79
|
+
* a cache write is not guaranteed to retain it: writes are skipped entirely
|
|
80
|
+
* when caching is disabled, oversized listings are dropped by the memory
|
|
81
|
+
* cache, and backend writes can fail. Without this, every module lookup of a
|
|
82
|
+
* render would miss the cache and await its own full listing fetch -- more
|
|
83
|
+
* API traffic than the per-file probing this replaced. It expires with the
|
|
84
|
+
* same TTL as the cache entry it stands in for and is dropped by every
|
|
85
|
+
* invalidation, so it is never fresher or staler than a retained cache write.
|
|
86
|
+
*/
|
|
87
|
+
retainedFileList = null;
|
|
88
|
+
fileListRetentionMs;
|
|
77
89
|
/** Single-flight foreground refresh when a branch preview read misses a newly pushed file. */
|
|
78
90
|
branchMissRecoveryPromise = null;
|
|
79
91
|
branchMissRecoveryGeneration = 0;
|
|
@@ -136,24 +148,81 @@ export class VeryfrontFSAdapter {
|
|
|
136
148
|
return undefined;
|
|
137
149
|
return this.cache.get(cacheKey);
|
|
138
150
|
}
|
|
139
|
-
async getCachedFileListAsync(noContextMessage, lookupLabel, missReason) {
|
|
151
|
+
async getCachedFileListAsync(noContextMessage, lookupLabel, missReason, options = {}) {
|
|
140
152
|
const cacheKey = this.getCurrentFileListCacheKey();
|
|
141
153
|
if (!cacheKey) {
|
|
142
154
|
logger.debug(noContextMessage);
|
|
143
155
|
return undefined;
|
|
144
156
|
}
|
|
145
|
-
|
|
157
|
+
let files = await this.cache.getAsync(cacheKey);
|
|
146
158
|
logger.debug(`${lookupLabel} lookup`, {
|
|
147
159
|
cacheKey,
|
|
148
160
|
hasResult: !!files,
|
|
149
161
|
resultSize: files?.length ?? 0,
|
|
150
162
|
hasContent: files?.filter((file) => !!file.content)?.length ?? 0,
|
|
151
163
|
});
|
|
152
|
-
if (
|
|
164
|
+
if (files === undefined) {
|
|
165
|
+
files = this.readRetainedFileList(cacheKey);
|
|
166
|
+
}
|
|
167
|
+
if (files === undefined) {
|
|
153
168
|
this.scheduleFileListWarmup(missReason, cacheKey);
|
|
169
|
+
if (options.waitForWarmup) {
|
|
170
|
+
files = await this.awaitFileListWarmup(cacheKey) ?? files;
|
|
171
|
+
}
|
|
154
172
|
}
|
|
155
173
|
return { cacheKey, files };
|
|
156
174
|
}
|
|
175
|
+
/** Keep `files` answerable from memory for as long as a cache write would. */
|
|
176
|
+
retainFileList(cacheKey, files) {
|
|
177
|
+
this.retainedFileList = {
|
|
178
|
+
cacheKey,
|
|
179
|
+
files,
|
|
180
|
+
snapshotVersion: this.sourceSnapshotVersion,
|
|
181
|
+
retainedAt: Date.now(),
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
clearRetainedFileList() {
|
|
185
|
+
this.retainedFileList = null;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* The retained listing, if it still describes the snapshot the caller is
|
|
189
|
+
* reading. Anything that supersedes the snapshot -- a poke, a refresh, a
|
|
190
|
+
* branch or token change -- either drops it outright or moves the snapshot
|
|
191
|
+
* version past it, so a superseded listing can never answer a read.
|
|
192
|
+
*/
|
|
193
|
+
readRetainedFileList(cacheKey) {
|
|
194
|
+
const retained = this.retainedFileList;
|
|
195
|
+
if (!retained)
|
|
196
|
+
return undefined;
|
|
197
|
+
if (retained.cacheKey !== cacheKey ||
|
|
198
|
+
retained.snapshotVersion !== this.sourceSnapshotVersion) {
|
|
199
|
+
this.clearRetainedFileList();
|
|
200
|
+
return undefined;
|
|
201
|
+
}
|
|
202
|
+
if (Date.now() - retained.retainedAt > this.fileListRetentionMs) {
|
|
203
|
+
logger.debug("Retained file list expired", { cacheKey });
|
|
204
|
+
this.clearRetainedFileList();
|
|
205
|
+
return undefined;
|
|
206
|
+
}
|
|
207
|
+
return retained.files;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Wait for the in-flight file-list warmup for `cacheKey` and return the
|
|
211
|
+
* fetched listing. SSR module resolution reads this list for every module of
|
|
212
|
+
* a page; when the cached listing has expired, answering "no list" makes each
|
|
213
|
+
* module fall back to its own per-file/per-extension API probing (dozens of
|
|
214
|
+
* sequential fetches per render). Paying for one awaited listing fetch keeps
|
|
215
|
+
* that fan-out at a single API call while staying exactly as fresh: the
|
|
216
|
+
* listing is fetched from the API at request time. Warmup failures resolve to
|
|
217
|
+
* undefined so callers keep the legacy per-file fallback.
|
|
218
|
+
*/
|
|
219
|
+
async awaitFileListWarmup(cacheKey) {
|
|
220
|
+
const warmupPromise = this.fileListWarmupPromise;
|
|
221
|
+
if (!warmupPromise || this.fileListWarmupKey !== cacheKey)
|
|
222
|
+
return undefined;
|
|
223
|
+
const fetched = await warmupPromise;
|
|
224
|
+
return fetched === null ? undefined : fetched;
|
|
225
|
+
}
|
|
157
226
|
constructor(config) {
|
|
158
227
|
this.invalidationCallbacks = config.invalidationCallbacks ?? {};
|
|
159
228
|
this.styleCallbacks = config.styleCallbacks ?? {};
|
|
@@ -182,6 +251,7 @@ export class VeryfrontFSAdapter {
|
|
|
182
251
|
});
|
|
183
252
|
const cacheConfig = buildFileCacheOptions(vf.cache);
|
|
184
253
|
this.cache = new FileCache(cacheConfig);
|
|
254
|
+
this.fileListRetentionMs = cacheConfig.ttl ?? DEFAULT_CACHE_TTL_MS;
|
|
185
255
|
this.normalizer = new PathNormalizer(config.projectDir);
|
|
186
256
|
// Per-releaseId fetcher registration is done in setContentContext when a
|
|
187
257
|
// release context is resolved, ensuring the correct project-scoped token.
|
|
@@ -190,12 +260,14 @@ export class VeryfrontFSAdapter {
|
|
|
190
260
|
getReleaseId: () => this.contentContext?.releaseId ?? null,
|
|
191
261
|
getContentContext: () => this.contentContext,
|
|
192
262
|
getFileList: async () => {
|
|
193
|
-
const cached = await this.getCachedFileListAsync("getFileList: no contentContext", "getFileList", "getFileList miss"
|
|
263
|
+
const cached = await this.getCachedFileListAsync("getFileList: no contentContext", "getFileList", "getFileList miss", {
|
|
264
|
+
waitForWarmup: true,
|
|
265
|
+
});
|
|
194
266
|
return cached?.files;
|
|
195
267
|
},
|
|
196
268
|
hasCachedFileList: async () => {
|
|
197
|
-
const cached = await this.getCachedFileListAsync("hasCachedFileList: no contentContext", "hasCachedFileList", "hasCachedFileList miss");
|
|
198
|
-
return Array.isArray(cached?.files)
|
|
269
|
+
const cached = await this.getCachedFileListAsync("hasCachedFileList: no contentContext", "hasCachedFileList", "hasCachedFileList miss", { waitForWarmup: true });
|
|
270
|
+
return Array.isArray(cached?.files);
|
|
199
271
|
},
|
|
200
272
|
isPersistentCacheInvalidated: (prefix) => this.isPersistentCacheInvalidated(prefix),
|
|
201
273
|
isReleaseBeingInvalidated: (releaseId) => this.isPersistentCacheInvalidated(buildFileCacheKeyPrefix({
|
|
@@ -206,7 +278,7 @@ export class VeryfrontFSAdapter {
|
|
|
206
278
|
};
|
|
207
279
|
this.statOps = new StatOperations(this.client, this.cache, this.normalizer, contentContextGetter);
|
|
208
280
|
this.readOps = new ReadOperations(this.client, this.cache, this.normalizer, contentContextGetter, (path) => this.statOps.getOriginalApiPath(path), async () => {
|
|
209
|
-
const cached = await this.getCachedFileListAsync("getFileListCache: no contentContext", "getFileListCache", "getFileListCache miss");
|
|
281
|
+
const cached = await this.getCachedFileListAsync("getFileListCache: no contentContext", "getFileListCache", "getFileListCache miss", { waitForWarmup: true });
|
|
210
282
|
return cached?.files;
|
|
211
283
|
});
|
|
212
284
|
this.dirOps = new DirectoryOperations(this.client, this.cache, this.normalizer, contentContextGetter);
|
|
@@ -220,13 +292,9 @@ export class VeryfrontFSAdapter {
|
|
|
220
292
|
getContentContext: () => this.contentContext,
|
|
221
293
|
getContentSource: () => this.contentSource,
|
|
222
294
|
getProjectDir: () => this.normalizer.getProjectDir(),
|
|
223
|
-
clearMemoryCaches: () =>
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
this.statOps.clearIndex();
|
|
227
|
-
this.dirOps.clearTree();
|
|
228
|
-
},
|
|
229
|
-
replaceSourceSnapshot: (cacheKey, files) => this.replaceSourceSnapshot(cacheKey, files),
|
|
295
|
+
clearMemoryCaches: () => this.clearMemoryCaches(),
|
|
296
|
+
getSourceSnapshotVersion: () => this.sourceSnapshotVersion,
|
|
297
|
+
replaceSourceSnapshot: (cacheKey, files, expectedSnapshotVersion) => this.replaceSourceSnapshot(cacheKey, files, expectedSnapshotVersion),
|
|
230
298
|
pregenerateStyles: (files) => this.triggerCSSPregeneration(files),
|
|
231
299
|
});
|
|
232
300
|
logger.debug("Created", {
|
|
@@ -303,15 +371,34 @@ export class VeryfrontFSAdapter {
|
|
|
303
371
|
releaseId: contentContext.releaseId,
|
|
304
372
|
});
|
|
305
373
|
const cacheKey = buildFileListCacheKey(contentContext);
|
|
374
|
+
const initializationIdentity = this.getCurrentSourceSnapshotIdentity();
|
|
375
|
+
const initializationSnapshotVersion = this.sourceSnapshotVersion;
|
|
306
376
|
logger.debug("Step 4: fetchFileList START", { projectSlug, cacheKey });
|
|
307
377
|
try {
|
|
308
378
|
const files = await fetchFileListForContext(this.client, contentContext);
|
|
309
379
|
const fileSummary = summarizeFileList(files);
|
|
310
|
-
await this.
|
|
311
|
-
|
|
380
|
+
const initialSnapshotApplied = await this.runSourceSnapshotMutation(async () => {
|
|
381
|
+
const isSnapshotSuperseded = () => this.contentContext !== contentContext ||
|
|
382
|
+
this.getCurrentSourceSnapshotIdentity() !== initializationIdentity ||
|
|
383
|
+
this.sourceSnapshotVersion !== initializationSnapshotVersion;
|
|
384
|
+
if (isSnapshotSuperseded())
|
|
385
|
+
return false;
|
|
386
|
+
await this.cache.setAsync(cacheKey, files);
|
|
387
|
+
if (isSnapshotSuperseded()) {
|
|
388
|
+
await this.cache.deleteAsync(cacheKey);
|
|
389
|
+
return false;
|
|
390
|
+
}
|
|
391
|
+
this.markSourceSnapshotChanged(files, initializationIdentity);
|
|
392
|
+
// Retain after the generation bump so the first read can reuse the
|
|
393
|
+
// initialized snapshot even when the configured cache keeps nothing.
|
|
394
|
+
this.retainFileList(cacheKey, files);
|
|
395
|
+
return true;
|
|
396
|
+
});
|
|
312
397
|
this.fileListReadyResolve?.();
|
|
313
398
|
this.fileListReadyResolve = null;
|
|
314
|
-
logger.debug(
|
|
399
|
+
logger.debug(initialSnapshotApplied
|
|
400
|
+
? "Fetched files during initialization"
|
|
401
|
+
: "Discarded initialization files superseded by a newer source snapshot", {
|
|
315
402
|
cacheKey,
|
|
316
403
|
totalFiles: fileSummary.totalFiles,
|
|
317
404
|
filesWithContent: fileSummary.filesWithContent,
|
|
@@ -321,7 +408,9 @@ export class VeryfrontFSAdapter {
|
|
|
321
408
|
// Trigger CSS pre-generation after the initial file snapshot is ready for
|
|
322
409
|
// published contexts. Branch previews should first try remote metadata
|
|
323
410
|
// recovery on cold starts instead of repopulating the prepared cache here.
|
|
324
|
-
if (
|
|
411
|
+
if (initialSnapshotApplied &&
|
|
412
|
+
fileSummary.sourceFilesWithContent > 0 &&
|
|
413
|
+
this.shouldBackgroundPregenerateStyles()) {
|
|
325
414
|
this.triggerCSSPregeneration(files).catch(() => {
|
|
326
415
|
// Error already logged in triggerCSSPregeneration
|
|
327
416
|
});
|
|
@@ -329,14 +418,15 @@ export class VeryfrontFSAdapter {
|
|
|
329
418
|
this.initialized = true;
|
|
330
419
|
logger.debug("initialize COMPLETE", {
|
|
331
420
|
projectSlug,
|
|
332
|
-
fileCount: files.length,
|
|
421
|
+
fileCount: initialSnapshotApplied ? files.length : 0,
|
|
333
422
|
totalDuration: `${(performance.now() - initStartTime).toFixed(2)}ms`,
|
|
334
423
|
});
|
|
335
|
-
|
|
424
|
+
const initializedContext = this.contentContext;
|
|
425
|
+
if (initializedContext?.sourceType === "branch") {
|
|
336
426
|
logger.debug("Initialized (branch mode)", {
|
|
337
427
|
projectId: this.client.getProjectId(),
|
|
338
|
-
files: files.length,
|
|
339
|
-
branch:
|
|
428
|
+
files: initialSnapshotApplied ? files.length : 0,
|
|
429
|
+
branch: initializedContext.branch,
|
|
340
430
|
proxyMode: this.proxyMode,
|
|
341
431
|
});
|
|
342
432
|
this.wsManager.connect(projectId);
|
|
@@ -344,14 +434,14 @@ export class VeryfrontFSAdapter {
|
|
|
344
434
|
}
|
|
345
435
|
logger.debug("Initialized (published mode)", {
|
|
346
436
|
projectId: this.client.getProjectId(),
|
|
347
|
-
files: files.length,
|
|
348
|
-
sourceType:
|
|
349
|
-
environmentName:
|
|
350
|
-
releaseId:
|
|
437
|
+
files: initialSnapshotApplied ? files.length : 0,
|
|
438
|
+
sourceType: initializedContext?.sourceType,
|
|
439
|
+
environmentName: initializedContext?.environmentName,
|
|
440
|
+
releaseId: initializedContext?.releaseId,
|
|
351
441
|
});
|
|
352
442
|
// Keep a WebSocket connection in environment mode to receive deployment pokes.
|
|
353
443
|
// Release mode is immutable, so no need to keep a live connection.
|
|
354
|
-
if (
|
|
444
|
+
if (initializedContext?.sourceType === "environment") {
|
|
355
445
|
this.wsManager.connect(projectId);
|
|
356
446
|
}
|
|
357
447
|
}
|
|
@@ -490,11 +580,12 @@ export class VeryfrontFSAdapter {
|
|
|
490
580
|
return;
|
|
491
581
|
}
|
|
492
582
|
const warmupContext = this.contentContext;
|
|
583
|
+
const warmupSnapshotVersion = this.sourceSnapshotVersion;
|
|
493
584
|
let warmupPromise = null;
|
|
494
585
|
warmupPromise = (async () => {
|
|
495
586
|
try {
|
|
496
587
|
const existing = await this.cache.getAsync(effectiveCacheKey);
|
|
497
|
-
if (existing
|
|
588
|
+
if (existing !== undefined) {
|
|
498
589
|
logger.debug("Skipping file list warmup because cache is already populated", {
|
|
499
590
|
reason,
|
|
500
591
|
cacheKey: effectiveCacheKey,
|
|
@@ -511,7 +602,37 @@ export class VeryfrontFSAdapter {
|
|
|
511
602
|
releaseId: warmupContext.releaseId,
|
|
512
603
|
});
|
|
513
604
|
const files = await fetchFileListForContext(this.client, warmupContext);
|
|
514
|
-
|
|
605
|
+
// A WebSocket snapshot can land while this fetch is open. Publishing
|
|
606
|
+
// the pre-poke listing would roll both the cache and this caller's
|
|
607
|
+
// answer back to the older draft, so the write is serialized against
|
|
608
|
+
// snapshot mutations and stands down when one won the race.
|
|
609
|
+
const applied = await this.runSourceSnapshotMutation(async () => {
|
|
610
|
+
if (this.contentContext !== warmupContext ||
|
|
611
|
+
this.sourceSnapshotVersion !== warmupSnapshotVersion) {
|
|
612
|
+
return false;
|
|
613
|
+
}
|
|
614
|
+
await this.cache.setAsync(effectiveCacheKey, files);
|
|
615
|
+
// A poke can advance the generation while a distributed cache write
|
|
616
|
+
// is pending. Remove the value that just landed before releasing the
|
|
617
|
+
// mutation lock, so neither this waiter nor a later read sees it.
|
|
618
|
+
if (this.contentContext !== warmupContext ||
|
|
619
|
+
this.sourceSnapshotVersion !== warmupSnapshotVersion) {
|
|
620
|
+
await this.cache.deleteAsync(effectiveCacheKey);
|
|
621
|
+
return false;
|
|
622
|
+
}
|
|
623
|
+
this.retainFileList(effectiveCacheKey, files);
|
|
624
|
+
return true;
|
|
625
|
+
});
|
|
626
|
+
if (!applied) {
|
|
627
|
+
logger.debug("Discarding file list warmup superseded by a newer source snapshot", {
|
|
628
|
+
reason,
|
|
629
|
+
cacheKey: effectiveCacheKey,
|
|
630
|
+
});
|
|
631
|
+
// Answer with the snapshot that superseded this fetch rather than
|
|
632
|
+
// the listing it carries, so the caller stays as fresh as the poke.
|
|
633
|
+
return await this.cache.getAsync(effectiveCacheKey) ?? this.readRetainedFileList(effectiveCacheKey) ??
|
|
634
|
+
null;
|
|
635
|
+
}
|
|
515
636
|
const fileSummary = summarizeFileList(files);
|
|
516
637
|
if (fileSummary.sourceFilesWithContent > 0 && this.shouldBackgroundPregenerateStyles()) {
|
|
517
638
|
this.triggerCSSPregeneration(files).catch(() => {
|
|
@@ -546,6 +667,22 @@ export class VeryfrontFSAdapter {
|
|
|
546
667
|
// That collaborator only needs completion, not the payload.
|
|
547
668
|
this.readOps.setFileListReadyPromise(warmupPromise.then(() => { }));
|
|
548
669
|
}
|
|
670
|
+
/**
|
|
671
|
+
* Drop every in-memory view of the current source snapshot. Used by pokes
|
|
672
|
+
* that invalidate without carrying replacement files inline, so the next read
|
|
673
|
+
* re-derives everything from the API rather than from a superseded listing.
|
|
674
|
+
*/
|
|
675
|
+
clearMemoryCaches() {
|
|
676
|
+
clearCachedReleaseAssetManifests();
|
|
677
|
+
// An accepted poke may clear memory before its debounced replacement
|
|
678
|
+
// listing arrives. Advance the generation immediately so an older warmup
|
|
679
|
+
// cannot repopulate the cache or answer a waiting read in that window.
|
|
680
|
+
this.sourceSnapshotVersion = nextSourceSnapshotGeneration();
|
|
681
|
+
this.clearRetainedFileList();
|
|
682
|
+
this.readOps.clearFileListIndex();
|
|
683
|
+
this.statOps.clearIndex();
|
|
684
|
+
this.dirOps.clearTree();
|
|
685
|
+
}
|
|
549
686
|
markSourceSnapshotChanged(files, identity = this.getCurrentSourceSnapshotIdentity()) {
|
|
550
687
|
this.sourceSnapshotFiles = files;
|
|
551
688
|
this.sourceSnapshotIdentity = identity;
|
|
@@ -559,19 +696,34 @@ export class VeryfrontFSAdapter {
|
|
|
559
696
|
this.sourceSnapshotMutationTail = mutation.then(() => undefined, () => undefined);
|
|
560
697
|
return mutation;
|
|
561
698
|
}
|
|
562
|
-
replaceSourceSnapshot(cacheKey, files) {
|
|
699
|
+
replaceSourceSnapshot(cacheKey, files, expectedSnapshotVersion = this.sourceSnapshotVersion) {
|
|
700
|
+
const expectedContext = this.contentContext;
|
|
563
701
|
return this.runSourceSnapshotMutation(async () => {
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
702
|
+
if (!expectedContext ||
|
|
703
|
+
this.contentContext !== expectedContext ||
|
|
704
|
+
this.sourceSnapshotVersion !== expectedSnapshotVersion ||
|
|
705
|
+
buildFileListCacheKey(expectedContext) !== cacheKey) {
|
|
706
|
+
logger.debug("Discarding superseded source snapshot", {
|
|
567
707
|
cacheKey,
|
|
568
708
|
projectSlug: this.projectSlug,
|
|
569
709
|
});
|
|
570
|
-
return;
|
|
710
|
+
return undefined;
|
|
571
711
|
}
|
|
572
712
|
await this.cache.setAsync(cacheKey, files);
|
|
713
|
+
if (this.contentContext !== expectedContext ||
|
|
714
|
+
this.sourceSnapshotVersion !== expectedSnapshotVersion) {
|
|
715
|
+
// A newer poke invalidated this replacement while its distributed
|
|
716
|
+
// cache write was pending. Remove the value that just landed and leave
|
|
717
|
+
// memory empty so the next read derives the newer snapshot.
|
|
718
|
+
await this.cache.deleteAsync(cacheKey);
|
|
719
|
+
return undefined;
|
|
720
|
+
}
|
|
573
721
|
this.readOps.clearFileListIndex();
|
|
574
722
|
this.markSourceSnapshotChanged(files);
|
|
723
|
+
// Retain after the version bump so the poked listing -- not the one it
|
|
724
|
+
// replaced -- is what later reads see when the cache keeps nothing.
|
|
725
|
+
this.retainFileList(cacheKey, files);
|
|
726
|
+
return this.sourceSnapshotVersion;
|
|
575
727
|
});
|
|
576
728
|
}
|
|
577
729
|
async invalidateDerivedSourceCaches() {
|
|
@@ -608,15 +760,17 @@ export class VeryfrontFSAdapter {
|
|
|
608
760
|
const previousVersion = this.sourceSnapshotVersion;
|
|
609
761
|
const files = await fetchFileListForContext(this.client, refreshContext);
|
|
610
762
|
const result = await this.runSourceSnapshotMutation(async () => {
|
|
611
|
-
|
|
763
|
+
const isSnapshotSuperseded = () => this.contentContext !== refreshContext ||
|
|
612
764
|
this.getCurrentSourceSnapshotIdentity() !== refreshIdentity ||
|
|
613
|
-
this.sourceSnapshotVersion !== previousVersion
|
|
765
|
+
this.sourceSnapshotVersion !== previousVersion;
|
|
766
|
+
if (isSnapshotSuperseded()) {
|
|
614
767
|
return { applied: false, sourceChanged: false };
|
|
615
768
|
}
|
|
616
769
|
const sourceChanged = !sourceSnapshotsEqual(previousFiles, files);
|
|
617
770
|
if (sourceChanged) {
|
|
618
771
|
this.fileListWarmupPromise = null;
|
|
619
772
|
this.fileListWarmupKey = null;
|
|
773
|
+
this.clearRetainedFileList();
|
|
620
774
|
this.readOps.clearFileListIndex();
|
|
621
775
|
this.statOps.clearIndex();
|
|
622
776
|
this.dirOps.clearTree();
|
|
@@ -626,11 +780,21 @@ export class VeryfrontFSAdapter {
|
|
|
626
780
|
this.cache.deleteByPrefixAsync(buildDirCacheKeyPrefix(refreshContext)),
|
|
627
781
|
this.cache.deleteAsync(cacheKey),
|
|
628
782
|
]);
|
|
783
|
+
if (isSnapshotSuperseded()) {
|
|
784
|
+
return { applied: false, sourceChanged: false };
|
|
785
|
+
}
|
|
629
786
|
}
|
|
630
787
|
await this.cache.setAsync(cacheKey, files);
|
|
631
|
-
|
|
788
|
+
if (isSnapshotSuperseded()) {
|
|
789
|
+
await this.cache.deleteAsync(cacheKey);
|
|
790
|
+
return { applied: false, sourceChanged: false };
|
|
791
|
+
}
|
|
632
792
|
if (sourceChanged) {
|
|
633
793
|
await this.invalidateDerivedSourceCaches();
|
|
794
|
+
if (isSnapshotSuperseded()) {
|
|
795
|
+
await this.cache.deleteAsync(cacheKey);
|
|
796
|
+
return { applied: false, sourceChanged: false };
|
|
797
|
+
}
|
|
634
798
|
// Publish freshness only after every cache derived from the previous
|
|
635
799
|
// snapshot has been invalidated. Concurrent followers remain attached
|
|
636
800
|
// to the refresh singleflight until this point.
|
|
@@ -641,6 +805,8 @@ export class VeryfrontFSAdapter {
|
|
|
641
805
|
this.sourceSnapshotIdentity = refreshIdentity;
|
|
642
806
|
this.sourceSnapshotCheckedAt = Date.now();
|
|
643
807
|
}
|
|
808
|
+
this.branchMissRecoveryFailures.clear();
|
|
809
|
+
this.retainFileList(cacheKey, files);
|
|
644
810
|
return { applied: true, sourceChanged };
|
|
645
811
|
});
|
|
646
812
|
if (!result.applied) {
|
|
@@ -770,6 +936,7 @@ export class VeryfrontFSAdapter {
|
|
|
770
936
|
this.exactReadInitializationGeneration++;
|
|
771
937
|
this.fileListWarmupPromise = null;
|
|
772
938
|
this.fileListWarmupKey = null;
|
|
939
|
+
this.clearRetainedFileList();
|
|
773
940
|
this.branchMissRecoveryPromise = null;
|
|
774
941
|
this.branchMissRecoveryGeneration++;
|
|
775
942
|
this.branchMissRecoveryFailures.clear();
|
|
@@ -804,12 +971,12 @@ export class VeryfrontFSAdapter {
|
|
|
804
971
|
// populates it for a release-backed context, so returning early meant the
|
|
805
972
|
// list was empty on every request for the life of the process. Wait for the
|
|
806
973
|
// fetch this read just started, then look again.
|
|
807
|
-
if (options.waitForWarmup && cacheKey &&
|
|
974
|
+
if (options.waitForWarmup && cacheKey && files === undefined && this.fileListWarmupPromise) {
|
|
808
975
|
// Take what the fetch returned rather than re-reading the cache: with
|
|
809
976
|
// caching disabled, or a failed backend write, the cache keeps nothing
|
|
810
977
|
// and correctness would depend on a write that never happened.
|
|
811
978
|
const fetched = await this.fileListWarmupPromise;
|
|
812
|
-
files = fetched
|
|
979
|
+
files = fetched !== null
|
|
813
980
|
? fetched
|
|
814
981
|
: await this.cache.getAsync(cacheKey);
|
|
815
982
|
}
|
|
@@ -883,6 +1050,7 @@ export class VeryfrontFSAdapter {
|
|
|
883
1050
|
}
|
|
884
1051
|
invalidateRequestAuthoritySnapshot() {
|
|
885
1052
|
this.cache.clear();
|
|
1053
|
+
this.clearRetainedFileList();
|
|
886
1054
|
this.readOps.clearFileListIndex();
|
|
887
1055
|
this.statOps.clearIndex();
|
|
888
1056
|
this.dirOps.clearTree();
|
|
@@ -945,6 +1113,7 @@ export class VeryfrontFSAdapter {
|
|
|
945
1113
|
this.dirOps.clearTree();
|
|
946
1114
|
this.fileListWarmupPromise = null;
|
|
947
1115
|
this.fileListWarmupKey = null;
|
|
1116
|
+
this.clearRetainedFileList();
|
|
948
1117
|
this.branchMissRecoveryPromise = null;
|
|
949
1118
|
this.branchMissRecoveryGeneration++;
|
|
950
1119
|
this.branchMissRecoveryFailures.clear();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-list-index.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/fs/veryfront/file-list-index.ts"],"names":[],"mappings":"AAIA,UAAU,kBAAkB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,aAAa,GAAG,SAAS,GAAG,yBAAyB,GAAG,KAAK,CAAC;IACtE,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;
|
|
1
|
+
{"version":3,"file":"file-list-index.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/fs/veryfront/file-list-index.ts"],"names":[],"mappings":"AAIA,UAAU,kBAAkB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,aAAa,GAAG,SAAS,GAAG,yBAAyB,GAAG,KAAK,CAAC;IACtE,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAID,qBAAa,aAAa;IAStB,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IARpC,OAAO,CAAC,KAAK,CAAoC;IACjD,OAAO,CAAC,OAAO,CAA4B;IAC3C,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,YAAY,CAA8B;gBAG/B,gBAAgB,CAAC,GAAE,MAAM,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,GAAG,SAAS,CAAC,aAAA;IAG1F,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAI7C,KAAK,IAAI,IAAI;YAYC,WAAW;IAWnB,MAAM,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAK3D,KAAK,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;IA4C3D,oBAAoB,CACxB,eAAe,EAAE,MAAM,EAAE,GACxB,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IAMnD,cAAc,CAClB,eAAe,EAAE,MAAM,EAAE,GACxB,OAAO,CAAC,mBAAmB,CAAC;YA6BjB,UAAU;CAiGzB"}
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import { logger as baseLogger } from "../../../../utils/index.js";
|
|
2
2
|
const logger = baseLogger.component("read-operations");
|
|
3
|
-
function hashPreview(content) {
|
|
4
|
-
return content
|
|
5
|
-
.slice(0, 100)
|
|
6
|
-
.split("")
|
|
7
|
-
.reduce((h, c) => ((h << 5) - h + c.charCodeAt(0)) | 0, 0);
|
|
8
|
-
}
|
|
9
|
-
function previewText(content, max = 80) {
|
|
10
|
-
return content.length > max ? `${content.slice(0, max)}...` : content;
|
|
11
|
-
}
|
|
12
3
|
const INDEX_STALENESS_LIMIT_MS = 5 * 60 * 1000; // 5 minutes
|
|
13
4
|
export class FileListIndex {
|
|
14
5
|
getFileListCache;
|
|
@@ -80,8 +71,6 @@ export class FileListIndex {
|
|
|
80
71
|
logger.debug("FILE_LIST_CACHE_HIT - serving from file list cache", {
|
|
81
72
|
path: normalizedPath,
|
|
82
73
|
contentLength: content.length,
|
|
83
|
-
contentHash: hashPreview(content),
|
|
84
|
-
contentPreview: previewText(content, 200).replace(/\n/g, "\\n"),
|
|
85
74
|
});
|
|
86
75
|
return {
|
|
87
76
|
status: "hit",
|
|
@@ -165,7 +154,6 @@ export class FileListIndex {
|
|
|
165
154
|
filesWithContent: fileList.filter((f) => f.content).length,
|
|
166
155
|
sampleFilePath: cacheCheckSample?.path,
|
|
167
156
|
sampleContentLength: cacheCheckSample?.content?.length,
|
|
168
|
-
sampleContentPreview: cacheCheckSample?.content?.slice(0, 200)?.replace(/\n/g, "\\n"),
|
|
169
157
|
});
|
|
170
158
|
const indexKey = `${fileList.length}:${fileList[0]?.path ?? ""}:${fileList[fileList.length - 1]?.path ?? ""}`;
|
|
171
159
|
if (this.index && this.pathSet && this.indexKey === indexKey) {
|
|
@@ -196,8 +184,6 @@ export class FileListIndex {
|
|
|
196
184
|
indexedWithContent: index.size,
|
|
197
185
|
sampleFilePath: sampleFile?.path,
|
|
198
186
|
sampleContentLength: sampleContent?.length,
|
|
199
|
-
sampleContentHash: sampleContent ? hashPreview(sampleContent) : undefined,
|
|
200
|
-
sampleContentPreview: sampleContent?.slice(0, 200)?.replace(/\n/g, "\\n"),
|
|
201
187
|
});
|
|
202
188
|
return {
|
|
203
189
|
content: index,
|
|
@@ -31,7 +31,6 @@ interface BuildReadFetchStateOptions {
|
|
|
31
31
|
export declare function assertProjectSourcePath(normalizedPath: string): void;
|
|
32
32
|
export declare function buildReadFetchState(options: BuildReadFetchStateOptions): ReadFetchState;
|
|
33
33
|
export declare function getResolvedCacheKey(cacheKeyPrefix: string, normalizedResolvedPath: string): string;
|
|
34
|
-
export declare function buildContentPreview(content: string, max?: number): string;
|
|
35
34
|
export declare function buildExtensionCandidatePaths(basePath: string): string[];
|
|
36
35
|
export declare function splitKnownFileExtension(apiPath: string): {
|
|
37
36
|
originalExtension: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-operations-helpers.d.ts","sourceRoot":"","sources":["../../../../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B,GAAG,cAAc,CA2BvF;AAED,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,MAAM,EACtB,sBAAsB,EAAE,MAAM,GAC7B,MAAM,CAER;AAED,wBAAgB,
|
|
1
|
+
{"version":3,"file":"read-operations-helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/fs/veryfront/read-operations-helpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iCAAiC,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD,OAAO,EAAE,iCAAiC,EAAE,CAAC;AAE7C,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1D,UAAU,uBAAuB;IAC/B,gBAAgB,EAAE,MAAM,OAAO,CAAC;IAChC,4BAA4B,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IAC3D,yBAAyB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;CAC5D;AAED,UAAU,cAAc;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,oBAAoB,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1C,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAED,UAAU,0BAA0B;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC9C,eAAe,CAAC,EAAE,uBAAuB,CAAC;IAC1C,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/C;AAED,wBAAgB,uBAAuB,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAOpE;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,0BAA0B,GAAG,cAAc,CA2BvF;AAED,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,MAAM,EACtB,sBAAsB,EAAE,MAAM,GAC7B,MAAM,CAER;AAED,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAEvE;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,GACd;IAAE,iBAAiB,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CASxD;AAED,4FAA4F;AAC5F,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEnE;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAS3D;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,CAEvE"}
|
|
@@ -40,9 +40,6 @@ export function buildReadFetchState(options) {
|
|
|
40
40
|
export function getResolvedCacheKey(cacheKeyPrefix, normalizedResolvedPath) {
|
|
41
41
|
return `${cacheKeyPrefix}:${normalizedResolvedPath}`;
|
|
42
42
|
}
|
|
43
|
-
export function buildContentPreview(content, max = 80) {
|
|
44
|
-
return content.length > max ? `${content.slice(0, max)}...` : content;
|
|
45
|
-
}
|
|
46
43
|
export function buildExtensionCandidatePaths(basePath) {
|
|
47
44
|
return READ_OPERATION_EXTENSION_PRIORITY.map((ext) => `${basePath}${ext}`);
|
|
48
45
|
}
|