veryfront 0.1.519 → 0.1.521
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/analyze-chunks/handler.js +2 -2
- package/esm/cli/commands/build/handler.d.ts.map +1 -1
- package/esm/cli/commands/build/handler.js +2 -2
- package/esm/cli/commands/clean/handler.js +2 -2
- package/esm/cli/commands/demo/handler.js +2 -2
- package/esm/cli/commands/deploy/command.d.ts.map +1 -1
- package/esm/cli/commands/deploy/command.js +2 -2
- package/esm/cli/commands/dev/handler.js +2 -2
- package/esm/cli/commands/doctor/handler.js +2 -2
- package/esm/cli/commands/files/command.js +5 -5
- package/esm/cli/commands/generate/handler.js +2 -2
- package/esm/cli/commands/install/handler.js +2 -2
- package/esm/cli/commands/install/install.js +3 -3
- package/esm/cli/commands/install/types.d.ts.map +1 -1
- package/esm/cli/commands/install/types.js +6 -6
- package/esm/cli/commands/install/uninstall.js +2 -2
- package/esm/cli/commands/knowledge/command.js +2 -2
- package/esm/cli/commands/lock/handler.js +2 -2
- package/esm/cli/commands/mcp/handler.js +2 -2
- package/esm/cli/commands/merge/command.d.ts.map +1 -1
- package/esm/cli/commands/merge/command.js +2 -2
- package/esm/cli/commands/open/command.d.ts.map +1 -1
- package/esm/cli/commands/open/command.js +2 -2
- package/esm/cli/commands/pull/command.d.ts.map +1 -1
- package/esm/cli/commands/pull/command.js +2 -2
- package/esm/cli/commands/push/command.d.ts.map +1 -1
- package/esm/cli/commands/push/command.js +2 -2
- package/esm/cli/commands/routes/handler.js +2 -2
- package/esm/cli/commands/schema/handler.js +2 -2
- package/esm/cli/commands/serve/handler.js +2 -2
- package/esm/cli/commands/start/handler.js +2 -2
- package/esm/cli/commands/studio/handler.js +2 -2
- package/esm/cli/commands/styles/command.js +2 -2
- package/esm/cli/commands/styles/handler.js +2 -2
- package/esm/cli/commands/task/handler.js +2 -2
- package/esm/cli/commands/test/handler.js +2 -2
- package/esm/cli/commands/up/command.d.ts.map +1 -1
- package/esm/cli/commands/up/command.js +2 -2
- package/esm/cli/commands/uploads/command.js +5 -5
- package/esm/cli/commands/worker/handler.js +2 -2
- package/esm/cli/commands/workflow/handler.js +2 -2
- package/esm/cli/main.js +6 -4
- package/esm/cli/mcp/jsonrpc.d.ts.map +1 -1
- package/esm/cli/mcp/jsonrpc.js +5 -5
- package/esm/cli/mcp/remote-file-tools.js +13 -13
- package/esm/cli/mcp/tools/bootstrap-tool.js +2 -2
- package/esm/cli/mcp/tools/build-tool.js +2 -2
- package/esm/cli/mcp/tools/catalog-tools.js +6 -6
- package/esm/cli/mcp/tools/context7-tools.js +5 -5
- package/esm/cli/mcp/tools/deploy-tool.js +2 -2
- package/esm/cli/mcp/tools/dev-tools.js +7 -7
- package/esm/cli/mcp/tools/introspection-tools.js +4 -4
- package/esm/cli/mcp/tools/project-tools.js +5 -5
- package/esm/cli/mcp/tools/run-lint-tool.js +2 -2
- package/esm/cli/mcp/tools/run-tests-tool.d.ts.map +1 -1
- package/esm/cli/mcp/tools/run-tests-tool.js +26 -18
- package/esm/cli/mcp/tools/scaffold-tools.d.ts.map +1 -1
- package/esm/cli/mcp/tools/scaffold-tools.js +23 -15
- package/esm/cli/mcp/tools/skill-tools.d.ts.map +1 -1
- package/esm/cli/mcp/tools/skill-tools.js +5 -5
- package/esm/cli/mcp/tools.js +6 -6
- package/esm/cli/shared/config.d.ts.map +1 -1
- package/esm/cli/shared/config.js +4 -4
- package/esm/cli/shared/ensure-content-processor.js +1 -1
- package/esm/cli/shared/types.d.ts.map +1 -1
- package/esm/cli/shared/types.js +2 -2
- package/esm/cli/skills/types.d.ts.map +1 -1
- package/esm/cli/skills/types.js +2 -2
- package/esm/deno.d.ts +10 -17
- package/esm/deno.js +23 -28
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_chars.d.ts +33 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_chars.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_chars.js +48 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_loader_state.d.ts +64 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_loader_state.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_loader_state.js +1371 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_schema.d.ts +44 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_schema.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_schema.js +117 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/binary.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/binary.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/binary.js +103 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/bool.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/bool.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/bool.js +32 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/float.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/float.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/float.js +96 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/int.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/int.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/int.js +159 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/map.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/map.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/map.js +14 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/merge.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/merge.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/merge.js +10 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/nil.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/nil.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/nil.js +22 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/omap.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/omap.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/omap.js +29 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/pairs.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/pairs.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/pairs.js +19 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/regexp.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/regexp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/regexp.js +30 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/seq.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/seq.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/seq.js +10 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/set.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/set.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/set.js +14 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/str.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/str.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/str.js +9 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/timestamp.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/timestamp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/timestamp.js +81 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/undefined.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/undefined.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type/undefined.js +20 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type.d.ts +32 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_type.js +6 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_utils.d.ts +4 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_utils.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/_utils.js +13 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/parse.d.ts +76 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.1.0/parse.js +91 -0
- package/esm/extensions/ext-auth-jwt/src/index.d.ts.map +1 -1
- package/esm/extensions/ext-auth-jwt/src/index.js +25 -4
- package/esm/extensions/{ext-transform-mdx → ext-content-mdx}/src/compiler/markdown-compile.d.ts +1 -1
- package/esm/extensions/ext-content-mdx/src/compiler/markdown-compile.d.ts.map +1 -0
- package/esm/extensions/{ext-transform-mdx → ext-content-mdx}/src/compiler/mdx-compile.d.ts +1 -1
- package/esm/extensions/ext-content-mdx/src/compiler/mdx-compile.d.ts.map +1 -0
- package/esm/extensions/{ext-transform-mdx → ext-content-mdx}/src/compiler/mdx-compile.js +10 -4
- package/esm/extensions/{ext-transform-mdx → ext-content-mdx}/src/index.d.ts +3 -3
- package/esm/extensions/ext-content-mdx/src/index.d.ts.map +1 -0
- package/esm/extensions/{ext-transform-mdx → ext-content-mdx}/src/index.js +4 -4
- package/esm/extensions/ext-content-mdx/src/plugins/plugin-loader.d.ts.map +1 -0
- package/esm/extensions/ext-content-mdx/src/plugins/rehype-node-positions.d.ts.map +1 -0
- package/esm/extensions/ext-content-mdx/src/plugins/remark-headings.d.ts.map +1 -0
- package/esm/extensions/ext-content-mdx/src/plugins/remark-mdx-utils.d.ts.map +1 -0
- package/esm/extensions/ext-css-tailwind/src/index.js +1 -1
- package/esm/extensions/ext-db-sqlite/src/index.d.ts +15 -0
- package/esm/extensions/ext-db-sqlite/src/index.d.ts.map +1 -0
- package/esm/extensions/ext-db-sqlite/src/index.js +36 -0
- package/esm/extensions/ext-document-kreuzberg/src/index.d.ts +9 -0
- package/esm/extensions/ext-document-kreuzberg/src/index.d.ts.map +1 -0
- package/esm/extensions/ext-document-kreuzberg/src/index.js +71 -0
- package/esm/extensions/{ext-node-compatibility → ext-document-kreuzberg}/src/kreuzberg.d.ts.map +1 -1
- package/esm/extensions/{ext-node-compatibility → ext-document-kreuzberg}/src/kreuzberg.js +4 -4
- package/esm/extensions/ext-sandbox-shell-tools/src/index.d.ts +16 -0
- package/esm/extensions/ext-sandbox-shell-tools/src/index.d.ts.map +1 -0
- package/esm/extensions/ext-sandbox-shell-tools/src/index.js +22 -0
- package/esm/extensions/{ext-zod → ext-schema-zod}/src/adapter.d.ts +1 -1
- package/esm/extensions/ext-schema-zod/src/adapter.d.ts.map +1 -0
- package/esm/extensions/{ext-zod → ext-schema-zod}/src/adapter.js +1 -1
- package/esm/extensions/{ext-zod → ext-schema-zod}/src/index.d.ts +2 -2
- package/esm/extensions/ext-schema-zod/src/index.d.ts.map +1 -0
- package/esm/extensions/{ext-zod → ext-schema-zod}/src/index.js +4 -4
- package/esm/extensions/{ext-zod → ext-schema-zod}/src/json-schema.d.ts +2 -2
- package/esm/extensions/ext-schema-zod/src/json-schema.d.ts.map +1 -0
- package/esm/extensions/{ext-zod → ext-schema-zod}/src/json-schema.js +2 -2
- package/esm/extensions/ext-tracing-opentelemetry/src/index.d.ts +49 -0
- package/esm/extensions/ext-tracing-opentelemetry/src/index.d.ts.map +1 -0
- package/esm/extensions/ext-tracing-opentelemetry/src/index.js +223 -0
- package/esm/src/agent/ag-ui/detached-start.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/detached-start.js +3 -3
- package/esm/src/agent/ag-ui/host-support.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/host-support.js +4 -4
- package/esm/src/agent/ag-ui/request-shared.js +1 -1
- package/esm/src/agent/ag-ui/run-control.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/run-control.js +2 -2
- package/esm/src/agent/conversation/bootstrap.d.ts.map +1 -1
- package/esm/src/agent/conversation/bootstrap.js +3 -3
- package/esm/src/agent/conversation/run-events.d.ts.map +1 -1
- package/esm/src/agent/conversation/run-events.js +2 -2
- package/esm/src/agent/default-hosted-invoke-agent-tool.d.ts.map +1 -1
- package/esm/src/agent/default-hosted-invoke-agent-tool.js +3 -3
- package/esm/src/agent/durable.d.ts.map +1 -1
- package/esm/src/agent/durable.js +7 -7
- package/esm/src/agent/external-agent-worker-client.d.ts +65 -90
- package/esm/src/agent/external-agent-worker-client.d.ts.map +1 -1
- package/esm/src/agent/external-agent-worker-client.js +85 -70
- package/esm/src/agent/hosted/ag-ui-chat-request.d.ts.map +1 -1
- package/esm/src/agent/hosted/ag-ui-chat-request.js +3 -3
- package/esm/src/agent/hosted/agent-project-steering.d.ts +7 -8
- package/esm/src/agent/hosted/agent-project-steering.d.ts.map +1 -1
- package/esm/src/agent/hosted/agent-project-steering.js +14 -9
- package/esm/src/agent/hosted/chat-request.d.ts.map +1 -1
- package/esm/src/agent/hosted/chat-request.js +4 -4
- package/esm/src/agent/hosted/child-tool-input.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-tool-input.js +2 -2
- package/esm/src/agent/index.d.ts +4 -2
- package/esm/src/agent/index.d.ts.map +1 -1
- package/esm/src/agent/index.js +4 -2
- package/esm/src/agent/invoke-agent-child-runs.d.ts.map +1 -1
- package/esm/src/agent/invoke-agent-child-runs.js +4 -4
- package/esm/src/agent/runtime/agent-definition-files.d.ts +17 -17
- package/esm/src/agent/runtime/agent-definition-files.d.ts.map +1 -1
- package/esm/src/agent/runtime/agent-definition-files.js +22 -16
- package/esm/src/agent/runtime/agent-definition.d.ts.map +1 -1
- package/esm/src/agent/runtime/agent-definition.js +4 -4
- package/esm/src/agent/runtime/agent-invocation-contract.d.ts.map +1 -1
- package/esm/src/agent/runtime/agent-invocation-contract.js +14 -14
- package/esm/src/agent/runtime/client-profile.d.ts.map +1 -1
- package/esm/src/agent/runtime/client-profile.js +4 -4
- package/esm/src/agent/runtime/load-skill-tool.js +2 -2
- package/esm/src/agent/runtime/project-files-client.d.ts.map +1 -1
- package/esm/src/agent/runtime/project-files-client.js +3 -3
- package/esm/src/agent/runtime/skill-metadata.d.ts.map +1 -1
- package/esm/src/agent/runtime/skill-metadata.js +2 -2
- package/esm/src/agent/schemas/agent.schema.d.ts +33 -33
- package/esm/src/agent/service/auth.d.ts +3 -0
- package/esm/src/agent/service/auth.d.ts.map +1 -1
- package/esm/src/agent/service/auth.js +15 -11
- package/esm/src/agent/service/config.d.ts +15 -126
- package/esm/src/agent/service/config.d.ts.map +1 -1
- package/esm/src/agent/service/config.js +53 -49
- package/esm/src/agent/service/node-runtime-infrastructure.js +1 -1
- package/esm/src/agent/service/node-telemetry.d.ts +5 -12
- package/esm/src/agent/service/node-telemetry.d.ts.map +1 -1
- package/esm/src/agent/service/node-telemetry.js +17 -36
- package/esm/src/agent/service/registration.d.ts +62 -85
- package/esm/src/agent/service/registration.d.ts.map +1 -1
- package/esm/src/agent/service/registration.js +68 -66
- package/esm/src/agent/testing/agent-tester.d.ts +45 -0
- package/esm/src/agent/testing/agent-tester.d.ts.map +1 -0
- package/esm/src/agent/testing/agent-tester.js +127 -0
- package/esm/src/agent/testing/index.d.ts +9 -0
- package/esm/src/agent/testing/index.d.ts.map +1 -0
- package/esm/src/agent/testing/index.js +8 -0
- package/esm/src/agent/testing/live-evals/formatting.d.ts +11 -0
- package/esm/src/agent/testing/live-evals/formatting.d.ts.map +1 -0
- package/esm/src/agent/testing/live-evals/formatting.js +71 -0
- package/esm/src/agent/testing/live-evals/index.d.ts +6 -0
- package/esm/src/agent/testing/live-evals/index.d.ts.map +1 -0
- package/esm/src/agent/testing/live-evals/index.js +5 -0
- package/esm/src/agent/testing/live-evals/performance.d.ts +15 -0
- package/esm/src/agent/testing/live-evals/performance.d.ts.map +1 -0
- package/esm/src/agent/testing/live-evals/performance.js +21 -0
- package/esm/src/agent/testing/live-evals/report.d.ts +46 -0
- package/esm/src/agent/testing/live-evals/report.d.ts.map +1 -0
- package/esm/src/agent/testing/live-evals/report.js +73 -0
- package/esm/src/agent/testing/live-evals/request.d.ts +30 -0
- package/esm/src/agent/testing/live-evals/request.d.ts.map +1 -0
- package/esm/src/agent/testing/live-evals/request.js +46 -0
- package/esm/src/agent/testing/live-evals/result.d.ts +52 -0
- package/esm/src/agent/testing/live-evals/result.d.ts.map +1 -0
- package/esm/src/agent/testing/live-evals/result.js +44 -0
- package/esm/src/agent/veryfront-cloud-agent-service.d.ts.map +1 -1
- package/esm/src/agent/veryfront-cloud-agent-service.js +47 -10
- package/esm/src/build/compiler/mdx-compiler/frontmatter-parser.js +1 -1
- package/esm/src/build/compiler/mdx-compiler/mdx-processor.d.ts.map +1 -1
- package/esm/src/build/compiler/mdx-compiler/mdx-processor.js +8 -16
- package/esm/src/build/compiler/mdx-to-js.d.ts.map +1 -1
- package/esm/src/build/compiler/mdx-to-js.js +10 -8
- package/esm/src/cache/schemas/cache-backend.schema.d.ts.map +1 -1
- package/esm/src/cache/schemas/cache-backend.schema.js +3 -3
- package/esm/src/cache/schemas/cache-key.schema.d.ts.map +1 -1
- package/esm/src/cache/schemas/cache-key.schema.js +2 -2
- package/esm/src/channels/control-plane.d.ts.map +1 -1
- package/esm/src/channels/control-plane.js +11 -11
- package/esm/src/channels/invoke.d.ts.map +1 -1
- package/esm/src/channels/invoke.js +13 -13
- package/esm/src/chat/ag-ui.d.ts.map +1 -1
- package/esm/src/chat/ag-ui.js +6 -6
- package/esm/src/chat/conversation.d.ts.map +1 -1
- package/esm/src/chat/conversation.js +6 -6
- package/esm/src/chat/types.d.ts.map +1 -1
- package/esm/src/chat/types.js +8 -8
- package/esm/src/config/schemas/config.schema.d.ts.map +1 -1
- package/esm/src/config/schemas/config.schema.js +2 -2
- package/esm/src/data/schemas/data.schema.d.ts.map +1 -1
- package/esm/src/data/schemas/data.schema.js +7 -7
- package/esm/src/embedding/upload-loader.d.ts +1 -1
- package/esm/src/embedding/upload-loader.js +8 -8
- package/esm/src/extensions/auth/auth-provider.d.ts +10 -2
- package/esm/src/extensions/auth/auth-provider.d.ts.map +1 -1
- package/esm/src/extensions/builtin-extensions.d.ts +1 -0
- package/esm/src/extensions/builtin-extensions.d.ts.map +1 -1
- package/esm/src/extensions/builtin-extensions.js +32 -8
- package/esm/src/extensions/cache/cache-store.d.ts +1 -1
- package/esm/src/extensions/cache/cache-store.js +1 -1
- package/esm/src/extensions/compat/index.d.ts +2 -2
- package/esm/src/extensions/compat/index.d.ts.map +1 -1
- package/esm/src/extensions/compat/index.js +1 -1
- package/esm/src/extensions/compat/{node-compat.d.ts → native-services.d.ts} +19 -25
- package/esm/src/extensions/compat/native-services.d.ts.map +1 -0
- package/esm/src/extensions/compat/native-services.js +10 -0
- package/esm/src/extensions/{transform → content}/content-processor.d.ts +9 -3
- package/esm/src/extensions/content/content-processor.d.ts.map +1 -0
- package/esm/src/extensions/{transform → content}/content-processor.js +3 -3
- package/esm/src/extensions/{transform → content}/index.d.ts +1 -1
- package/esm/src/extensions/content/index.d.ts.map +1 -0
- package/esm/src/extensions/{transform → content}/index.js +1 -1
- package/esm/src/extensions/contracts.d.ts +2 -0
- package/esm/src/extensions/contracts.d.ts.map +1 -1
- package/esm/src/extensions/contracts.js +4 -0
- package/esm/src/extensions/database/database-client.d.ts +1 -1
- package/esm/src/extensions/database/database-client.js +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/llm/embedding-provider.d.ts +1 -1
- package/esm/src/extensions/llm/embedding-provider.js +1 -1
- package/esm/src/extensions/recommendations.d.ts.map +1 -1
- package/esm/src/extensions/recommendations.js +6 -7
- package/esm/src/extensions/sandbox/index.d.ts +9 -0
- package/esm/src/extensions/sandbox/index.d.ts.map +1 -0
- package/esm/src/extensions/sandbox/index.js +7 -0
- package/esm/src/extensions/sandbox/shell-tools.d.ts +36 -0
- package/esm/src/extensions/sandbox/shell-tools.d.ts.map +1 -0
- package/esm/src/extensions/sandbox/shell-tools.js +1 -0
- package/esm/src/extensions/schema/schema-validator.d.ts +1 -1
- package/esm/src/extensions/schema/schema-validator.js +1 -1
- package/esm/src/extensions/tracing/index.d.ts +3 -1
- package/esm/src/extensions/tracing/index.d.ts.map +1 -1
- package/esm/src/extensions/tracing/index.js +2 -1
- package/esm/src/extensions/tracing/node-telemetry-provider.d.ts +40 -0
- package/esm/src/extensions/tracing/node-telemetry-provider.d.ts.map +1 -0
- package/esm/src/extensions/tracing/node-telemetry-provider.js +8 -0
- package/esm/src/html/schemas/html.schema.d.ts.map +1 -1
- package/esm/src/html/schemas/html.schema.js +7 -7
- package/esm/src/integrations/schema.d.ts +4 -4
- package/esm/src/integrations/schema.d.ts.map +1 -1
- package/esm/src/integrations/schema.js +11 -11
- package/esm/src/internal-agents/run-stream.js +2 -2
- package/esm/src/issues/mcp.js +7 -7
- package/esm/src/issues/schemas/issue.schema.d.ts.map +1 -1
- package/esm/src/issues/schemas/issue.schema.js +12 -12
- package/esm/src/jobs/schemas.d.ts.map +1 -1
- package/esm/src/jobs/schemas.js +29 -29
- package/esm/src/mcp/schemas/mcp.schema.d.ts.map +1 -1
- package/esm/src/mcp/schemas/mcp.schema.js +4 -4
- package/esm/src/oauth/schemas/oauth.schema.d.ts.map +1 -1
- package/esm/src/oauth/schemas/oauth.schema.js +8 -8
- package/esm/src/platform/compat/kv/factory.js +7 -7
- package/esm/src/platform/compat/opaque-deps.d.ts +4 -3
- package/esm/src/platform/compat/opaque-deps.d.ts.map +1 -1
- package/esm/src/platform/compat/opaque-deps.js +9 -8
- package/esm/src/platform/compat/std/front-matter-yaml.d.ts +1 -2
- package/esm/src/platform/compat/std/front-matter-yaml.d.ts.map +1 -1
- package/esm/src/platform/compat/std/front-matter-yaml.js +17 -21
- package/esm/src/react/components/chat/theme.d.ts +40 -7
- package/esm/src/react/components/chat/theme.d.ts.map +1 -1
- package/esm/src/react/components/chat/theme.js +19 -11
- package/esm/src/rendering/layouts/layout-applicator.d.ts.map +1 -1
- package/esm/src/rendering/layouts/layout-applicator.js +9 -14
- package/esm/src/repositories/schemas/repository.schema.d.ts.map +1 -1
- package/esm/src/repositories/schemas/repository.schema.js +4 -4
- package/esm/src/resource/schemas/resource.schema.d.ts.map +1 -1
- package/esm/src/resource/schemas/resource.schema.js +3 -3
- package/esm/src/sandbox/agent-service-tools.d.ts +1 -0
- package/esm/src/sandbox/agent-service-tools.d.ts.map +1 -1
- package/esm/src/sandbox/shell-tools.d.ts +3 -36
- package/esm/src/sandbox/shell-tools.d.ts.map +1 -1
- package/esm/src/sandbox/shell-tools.js +2 -2
- package/esm/src/schemas/define.d.ts +2 -2
- package/esm/src/schemas/define.d.ts.map +1 -1
- package/esm/src/schemas/define.js +4 -10
- package/esm/src/schemas/index.d.ts +2 -1
- package/esm/src/schemas/index.d.ts.map +1 -1
- package/esm/src/schemas/index.js +2 -1
- package/esm/src/schemas/lazy.d.ts +3 -0
- package/esm/src/schemas/lazy.d.ts.map +1 -0
- package/esm/src/schemas/lazy.js +54 -0
- package/esm/src/server/bootstrap.d.ts.map +1 -1
- package/esm/src/server/bootstrap.js +2 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +67 -18
- package/esm/src/server/schemas/action.schema.d.ts.map +1 -1
- package/esm/src/server/schemas/action.schema.js +2 -2
- package/esm/src/tool/host-tools.js +1 -1
- package/esm/src/tool/schema/zod-json-schema.d.ts +1 -1
- package/esm/src/tool/schema/zod-json-schema.js +2 -2
- package/esm/src/transforms/md/compiler/md-compiler.d.ts +1 -1
- package/esm/src/transforms/md/compiler/md-compiler.d.ts.map +1 -1
- package/esm/src/transforms/mdx/compiler/import-rewriter.d.ts +1 -1
- package/esm/src/transforms/mdx/compiler/import-rewriter.d.ts.map +1 -1
- package/esm/src/transforms/mdx/compiler/index.d.ts +2 -2
- package/esm/src/transforms/mdx/compiler/index.d.ts.map +1 -1
- package/esm/src/transforms/mdx/compiler/mdx-compiler.d.ts +1 -1
- package/esm/src/transforms/mdx/compiler/mdx-compiler.d.ts.map +1 -1
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/esm/src/workflow/blob/veryfront-cloud-storage.js +5 -5
- package/esm/src/workflow/schemas/workflow.schema.d.ts +14 -14
- package/esm/src/workflow/schemas/workflow.schema.d.ts.map +1 -1
- package/esm/src/workflow/schemas/workflow.schema.js +18 -18
- package/package.json +21 -10
- package/src/cli/commands/analyze-chunks/handler.ts +2 -2
- package/src/cli/commands/build/handler.ts +2 -2
- package/src/cli/commands/clean/handler.ts +2 -2
- package/src/cli/commands/demo/handler.ts +2 -2
- package/src/cli/commands/deploy/command.ts +2 -2
- package/src/cli/commands/dev/handler.ts +2 -2
- package/src/cli/commands/doctor/handler.ts +2 -2
- package/src/cli/commands/files/command.ts +5 -5
- package/src/cli/commands/generate/handler.ts +2 -2
- package/src/cli/commands/install/handler.ts +2 -2
- package/src/cli/commands/install/install.ts +3 -3
- package/src/cli/commands/install/types.ts +6 -6
- package/src/cli/commands/install/uninstall.ts +2 -2
- package/src/cli/commands/knowledge/command.ts +2 -2
- package/src/cli/commands/lock/handler.ts +2 -2
- package/src/cli/commands/mcp/handler.ts +2 -2
- package/src/cli/commands/merge/command.ts +2 -2
- package/src/cli/commands/open/command.ts +2 -2
- package/src/cli/commands/pull/command.ts +2 -2
- package/src/cli/commands/push/command.ts +2 -2
- package/src/cli/commands/routes/handler.ts +2 -2
- package/src/cli/commands/schema/handler.ts +2 -2
- package/src/cli/commands/serve/handler.ts +2 -2
- package/src/cli/commands/start/handler.ts +2 -2
- package/src/cli/commands/studio/handler.ts +2 -2
- package/src/cli/commands/styles/command.ts +2 -2
- package/src/cli/commands/styles/handler.ts +2 -2
- package/src/cli/commands/task/handler.ts +2 -2
- package/src/cli/commands/test/handler.ts +2 -2
- package/src/cli/commands/up/command.ts +2 -2
- package/src/cli/commands/uploads/command.ts +5 -5
- package/src/cli/commands/worker/handler.ts +2 -2
- package/src/cli/commands/workflow/handler.ts +2 -2
- package/src/cli/main.ts +6 -4
- package/src/cli/mcp/jsonrpc.ts +5 -5
- package/src/cli/mcp/remote-file-tools.ts +13 -13
- package/src/cli/mcp/tools/bootstrap-tool.ts +2 -2
- package/src/cli/mcp/tools/build-tool.ts +2 -2
- package/src/cli/mcp/tools/catalog-tools.ts +6 -6
- package/src/cli/mcp/tools/context7-tools.ts +5 -5
- package/src/cli/mcp/tools/deploy-tool.ts +2 -2
- package/src/cli/mcp/tools/dev-tools.ts +7 -7
- package/src/cli/mcp/tools/introspection-tools.ts +4 -4
- package/src/cli/mcp/tools/project-tools.ts +5 -5
- package/src/cli/mcp/tools/run-lint-tool.ts +2 -2
- package/src/cli/mcp/tools/run-tests-tool.ts +29 -17
- package/src/cli/mcp/tools/scaffold-tools.ts +23 -15
- package/src/cli/mcp/tools/skill-tools.ts +5 -5
- package/src/cli/mcp/tools.ts +6 -6
- package/src/cli/shared/config.ts +4 -4
- package/src/cli/shared/ensure-content-processor.ts +2 -2
- package/src/cli/shared/types.ts +2 -2
- package/src/cli/skills/types.ts +2 -2
- package/src/deno.js +23 -28
- package/src/deps/esm.sh/@types/react-dom@19.2.3/client.d.ts +1 -1
- package/src/deps/esm.sh/@types/{react@19.2.14 → react@19.2.3}/global.d.ts +0 -1
- package/src/deps/esm.sh/@types/{react@19.2.14 → react@19.2.3}/index.d.ts +24 -93
- package/src/deps/esm.sh/react-dom@19.2.4/client.d.ts +1 -1
- package/src/deps/jsr.io/@std/yaml/1.1.0/_chars.ts +55 -0
- package/src/deps/jsr.io/@std/yaml/1.1.0/_loader_state.ts +1845 -0
- package/src/deps/jsr.io/@std/yaml/1.1.0/_schema.ts +183 -0
- package/src/deps/jsr.io/@std/yaml/1.1.0/_type/binary.ts +127 -0
- package/src/deps/jsr.io/@std/yaml/1.1.0/_type/bool.ts +37 -0
- package/src/deps/jsr.io/@std/yaml/1.1.0/_type/float.ts +112 -0
- package/src/deps/jsr.io/@std/yaml/1.1.0/_type/int.ts +174 -0
- package/src/deps/jsr.io/@std/yaml/1.1.0/_type/map.ts +17 -0
- package/src/deps/jsr.io/@std/yaml/1.1.0/_type/merge.ts +13 -0
- package/src/deps/jsr.io/@std/yaml/1.1.0/_type/nil.ts +27 -0
- package/src/deps/jsr.io/@std/yaml/1.1.0/_type/omap.ts +30 -0
- package/src/deps/jsr.io/@std/yaml/1.1.0/_type/pairs.ts +22 -0
- package/src/deps/jsr.io/@std/yaml/1.1.0/_type/regexp.ts +33 -0
- package/src/deps/jsr.io/@std/yaml/1.1.0/_type/seq.ts +13 -0
- package/src/deps/jsr.io/@std/yaml/1.1.0/_type/set.ts +17 -0
- package/src/deps/jsr.io/@std/yaml/1.1.0/_type/str.ts +12 -0
- package/src/deps/jsr.io/@std/yaml/1.1.0/_type/timestamp.ts +101 -0
- package/src/deps/jsr.io/@std/yaml/1.1.0/_type/undefined.ts +23 -0
- package/src/deps/jsr.io/@std/yaml/1.1.0/_type.ts +49 -0
- package/src/deps/jsr.io/@std/yaml/1.1.0/_utils.ts +16 -0
- package/src/deps/jsr.io/@std/yaml/1.1.0/parse.ts +125 -0
- package/src/extensions/ext-auth-jwt/src/index.ts +31 -3
- package/src/extensions/{ext-transform-mdx → ext-content-mdx}/src/compiler/markdown-compile.ts +1 -4
- package/src/extensions/{ext-transform-mdx → ext-content-mdx}/src/compiler/mdx-compile.ts +13 -7
- package/src/extensions/{ext-transform-mdx → ext-content-mdx}/src/index.ts +5 -5
- package/src/extensions/ext-css-tailwind/src/index.ts +1 -1
- package/src/extensions/ext-db-sqlite/src/index.ts +45 -0
- package/src/extensions/ext-document-kreuzberg/src/index.ts +95 -0
- package/src/extensions/{ext-node-compatibility → ext-document-kreuzberg}/src/kreuzberg.ts +4 -4
- package/src/extensions/ext-sandbox-shell-tools/src/index.ts +38 -0
- package/src/extensions/{ext-zod → ext-schema-zod}/src/adapter.ts +1 -1
- package/src/extensions/{ext-zod → ext-schema-zod}/src/index.ts +4 -4
- package/src/extensions/{ext-zod → ext-schema-zod}/src/json-schema.ts +2 -2
- package/src/extensions/ext-tracing-opentelemetry/src/index.ts +290 -0
- package/src/src/agent/ag-ui/detached-start.ts +3 -3
- package/src/src/agent/ag-ui/host-support.ts +4 -4
- package/src/src/agent/ag-ui/request-shared.ts +1 -1
- package/src/src/agent/ag-ui/run-control.ts +2 -2
- package/src/src/agent/conversation/bootstrap.ts +3 -3
- package/src/src/agent/conversation/run-events.ts +2 -2
- package/src/src/agent/default-hosted-invoke-agent-tool.ts +7 -3
- package/src/src/agent/durable.ts +13 -8
- package/src/src/agent/external-agent-worker-client.ts +193 -88
- package/src/src/agent/hosted/ag-ui-chat-request.ts +5 -3
- package/src/src/agent/hosted/agent-project-steering.ts +24 -12
- package/src/src/agent/hosted/chat-request.ts +6 -4
- package/src/src/agent/hosted/child-tool-input.ts +2 -2
- package/src/src/agent/index.ts +4 -2
- package/src/src/agent/invoke-agent-child-runs.ts +10 -5
- package/src/src/agent/runtime/agent-definition-files.ts +53 -26
- package/src/src/agent/runtime/agent-definition.ts +8 -5
- package/src/src/agent/runtime/agent-invocation-contract.ts +14 -14
- package/src/src/agent/runtime/client-profile.ts +4 -4
- package/src/src/agent/runtime/load-skill-tool.ts +2 -2
- package/src/src/agent/runtime/project-files-client.ts +3 -3
- package/src/src/agent/runtime/skill-metadata.ts +2 -2
- package/src/src/agent/service/auth.ts +23 -14
- package/src/src/agent/service/config.ts +77 -50
- package/src/src/agent/service/node-runtime-infrastructure.ts +1 -1
- package/src/src/agent/service/node-telemetry.ts +34 -57
- package/src/src/agent/service/registration.ts +157 -82
- package/src/src/agent/testing/agent-tester.ts +202 -0
- package/src/src/agent/testing/index.ts +44 -0
- package/src/src/agent/testing/live-evals/formatting.ts +106 -0
- package/src/src/agent/testing/live-evals/index.ts +30 -0
- package/src/src/agent/testing/live-evals/performance.ts +52 -0
- package/src/src/agent/testing/live-evals/report.ts +155 -0
- package/src/src/agent/testing/live-evals/request.ts +60 -0
- package/src/src/agent/testing/live-evals/result.ts +96 -0
- package/src/src/agent/veryfront-cloud-agent-service.ts +62 -13
- package/src/src/build/compiler/mdx-compiler/frontmatter-parser.ts +1 -1
- package/src/src/build/compiler/mdx-compiler/mdx-processor.ts +9 -20
- package/src/src/build/compiler/mdx-to-js.ts +11 -8
- package/src/src/cache/schemas/cache-backend.schema.ts +3 -3
- package/src/src/cache/schemas/cache-key.schema.ts +2 -2
- package/src/src/channels/control-plane.ts +13 -11
- package/src/src/channels/invoke.ts +13 -13
- package/src/src/chat/ag-ui.ts +6 -6
- package/src/src/chat/conversation.ts +6 -6
- package/src/src/chat/types.ts +8 -8
- package/src/src/config/schemas/config.schema.ts +2 -2
- package/src/src/data/schemas/data.schema.ts +7 -7
- package/src/src/embedding/upload-loader.ts +9 -9
- package/src/src/extensions/auth/auth-provider.ts +14 -2
- package/src/src/extensions/builtin-extensions.ts +33 -8
- package/src/src/extensions/cache/cache-store.ts +1 -1
- package/src/src/extensions/compat/index.ts +5 -4
- package/src/src/extensions/compat/{node-compat.ts → native-services.ts} +18 -24
- package/src/src/extensions/{transform → content}/content-processor.ts +9 -3
- package/src/src/extensions/{transform → content}/index.ts +1 -1
- package/src/src/extensions/contracts.ts +6 -0
- package/src/src/extensions/database/database-client.ts +1 -1
- package/src/src/extensions/index.ts +11 -0
- package/src/src/extensions/llm/embedding-provider.ts +1 -1
- package/src/src/extensions/recommendations.ts +6 -7
- package/src/src/extensions/sandbox/index.ts +18 -0
- package/src/src/extensions/sandbox/shell-tools.ts +42 -0
- package/src/src/extensions/schema/schema-validator.ts +1 -1
- package/src/src/extensions/tracing/index.ts +9 -1
- package/src/src/extensions/tracing/node-telemetry-provider.ts +45 -0
- package/src/src/html/schemas/html.schema.ts +7 -7
- package/src/src/integrations/schema.ts +11 -11
- package/src/src/internal-agents/run-stream.ts +2 -2
- package/src/src/issues/mcp.ts +7 -7
- package/src/src/issues/schemas/issue.schema.ts +12 -12
- package/src/src/jobs/schemas.ts +39 -30
- package/src/src/mcp/schemas/mcp.schema.ts +4 -4
- package/src/src/oauth/schemas/oauth.schema.ts +8 -8
- package/src/src/platform/compat/kv/factory.ts +8 -8
- package/src/src/platform/compat/opaque-deps.ts +10 -9
- package/src/src/platform/compat/std/front-matter-yaml.ts +18 -29
- package/src/src/react/components/chat/theme.ts +45 -10
- package/src/src/rendering/layouts/layout-applicator.ts +10 -18
- package/src/src/repositories/schemas/repository.schema.ts +4 -4
- package/src/src/resource/schemas/resource.schema.ts +3 -3
- package/src/src/sandbox/agent-service-tools.ts +1 -0
- package/src/src/sandbox/shell-tools.ts +17 -42
- package/src/src/schemas/define.ts +4 -10
- package/src/src/schemas/index.ts +2 -1
- package/src/src/schemas/lazy.ts +65 -0
- package/src/src/server/bootstrap.ts +5 -1
- package/src/src/server/handlers/dev/framework-candidates.generated.ts +67 -18
- package/src/src/server/schemas/action.schema.ts +2 -2
- package/src/src/tool/host-tools.ts +1 -1
- package/src/src/tool/schema/zod-json-schema.ts +2 -2
- package/src/src/transforms/md/compiler/md-compiler.ts +1 -1
- package/src/src/transforms/mdx/compiler/import-rewriter.ts +1 -1
- package/src/src/transforms/mdx/compiler/index.ts +2 -2
- package/src/src/transforms/mdx/compiler/mdx-compiler.ts +1 -1
- package/src/src/utils/version-constant.ts +1 -1
- package/src/src/workflow/blob/veryfront-cloud-storage.ts +5 -5
- package/src/src/workflow/schemas/workflow.schema.ts +18 -18
- package/esm/extensions/ext-node-compatibility/src/index.d.ts +0 -11
- package/esm/extensions/ext-node-compatibility/src/index.d.ts.map +0 -1
- package/esm/extensions/ext-node-compatibility/src/index.js +0 -106
- package/esm/extensions/ext-transform-mdx/src/compiler/markdown-compile.d.ts.map +0 -1
- package/esm/extensions/ext-transform-mdx/src/compiler/mdx-compile.d.ts.map +0 -1
- package/esm/extensions/ext-transform-mdx/src/index.d.ts.map +0 -1
- package/esm/extensions/ext-transform-mdx/src/plugins/plugin-loader.d.ts.map +0 -1
- package/esm/extensions/ext-transform-mdx/src/plugins/rehype-node-positions.d.ts.map +0 -1
- package/esm/extensions/ext-transform-mdx/src/plugins/remark-headings.d.ts.map +0 -1
- package/esm/extensions/ext-transform-mdx/src/plugins/remark-mdx-utils.d.ts.map +0 -1
- package/esm/extensions/ext-zod/src/adapter.d.ts.map +0 -1
- package/esm/extensions/ext-zod/src/index.d.ts.map +0 -1
- package/esm/extensions/ext-zod/src/json-schema.d.ts.map +0 -1
- package/esm/src/extensions/compat/node-compat.d.ts.map +0 -1
- package/esm/src/extensions/compat/node-compat.js +0 -8
- package/esm/src/extensions/transform/content-processor.d.ts.map +0 -1
- package/esm/src/extensions/transform/index.d.ts.map +0 -1
- package/esm/src/transforms/plugins/plugin-loader.d.ts +0 -19
- package/esm/src/transforms/plugins/plugin-loader.d.ts.map +0 -1
- package/esm/src/transforms/plugins/plugin-loader.js +0 -24
- package/src/extensions/ext-node-compatibility/src/index.ts +0 -140
- package/src/src/transforms/plugins/plugin-loader.ts +0 -29
- /package/esm/extensions/{ext-transform-mdx → ext-content-mdx}/src/compiler/markdown-compile.js +0 -0
- /package/esm/extensions/{ext-transform-mdx → ext-content-mdx}/src/plugins/plugin-loader.d.ts +0 -0
- /package/esm/extensions/{ext-transform-mdx → ext-content-mdx}/src/plugins/plugin-loader.js +0 -0
- /package/esm/extensions/{ext-transform-mdx → ext-content-mdx}/src/plugins/rehype-node-positions.d.ts +0 -0
- /package/esm/extensions/{ext-transform-mdx → ext-content-mdx}/src/plugins/rehype-node-positions.js +0 -0
- /package/esm/extensions/{ext-transform-mdx → ext-content-mdx}/src/plugins/remark-headings.d.ts +0 -0
- /package/esm/extensions/{ext-transform-mdx → ext-content-mdx}/src/plugins/remark-headings.js +0 -0
- /package/esm/extensions/{ext-transform-mdx → ext-content-mdx}/src/plugins/remark-mdx-utils.d.ts +0 -0
- /package/esm/extensions/{ext-transform-mdx → ext-content-mdx}/src/plugins/remark-mdx-utils.js +0 -0
- /package/esm/extensions/{ext-node-compatibility → ext-document-kreuzberg}/src/kreuzberg.d.ts +0 -0
- /package/src/extensions/{ext-transform-mdx → ext-content-mdx}/src/plugins/plugin-loader.ts +0 -0
- /package/src/extensions/{ext-transform-mdx → ext-content-mdx}/src/plugins/rehype-node-positions.ts +0 -0
- /package/src/extensions/{ext-transform-mdx → ext-content-mdx}/src/plugins/remark-headings.ts +0 -0
- /package/src/extensions/{ext-transform-mdx → ext-content-mdx}/src/plugins/remark-mdx-utils.ts +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Ported from js-yaml v3.13.1:
|
|
2
|
+
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
3
|
+
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
4
|
+
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
5
|
+
|
|
6
|
+
import type { Type } from "../_type.js";
|
|
7
|
+
import { isPlainObject } from "../_utils.js";
|
|
8
|
+
|
|
9
|
+
function resolveYamlOmap(data: Record<string, unknown>[]): boolean {
|
|
10
|
+
const objectKeys = new Set();
|
|
11
|
+
for (const object of data) {
|
|
12
|
+
if (!isPlainObject(object)) return false;
|
|
13
|
+
const keys = Object.keys(object);
|
|
14
|
+
if (keys.length !== 1) return false;
|
|
15
|
+
for (const key of keys) {
|
|
16
|
+
if (objectKeys.has(key)) return false;
|
|
17
|
+
objectKeys.add(key);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const omap: Type<"sequence", Record<PropertyKey, unknown>[]> = {
|
|
24
|
+
tag: "tag:yaml.org,2002:omap",
|
|
25
|
+
kind: "sequence",
|
|
26
|
+
resolve: resolveYamlOmap,
|
|
27
|
+
construct(data) {
|
|
28
|
+
return data;
|
|
29
|
+
},
|
|
30
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Ported from js-yaml v3.13.1:
|
|
2
|
+
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
3
|
+
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
4
|
+
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
5
|
+
|
|
6
|
+
import type { Type } from "../_type.js";
|
|
7
|
+
import { isPlainObject } from "../_utils.js";
|
|
8
|
+
|
|
9
|
+
function resolveYamlPairs(data: unknown[][]): boolean {
|
|
10
|
+
if (data === null) return true;
|
|
11
|
+
return data.every((it) => isPlainObject(it) && Object.keys(it).length === 1);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const pairs: Type<"sequence"> = {
|
|
15
|
+
tag: "tag:yaml.org,2002:pairs",
|
|
16
|
+
construct(data: Record<string, unknown>[] | null): [string, unknown][] {
|
|
17
|
+
// Converts an array of objects into an array of key-value pairs.
|
|
18
|
+
return data?.flatMap(Object.entries) ?? [];
|
|
19
|
+
},
|
|
20
|
+
kind: "sequence",
|
|
21
|
+
resolve: resolveYamlPairs,
|
|
22
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Ported and adapted from js-yaml-js-types v1.0.0:
|
|
2
|
+
// https://github.com/nodeca/js-yaml-js-types/tree/ac537e7bbdd3c2cbbd9882ca3919c520c2dc022b
|
|
3
|
+
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
4
|
+
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
5
|
+
|
|
6
|
+
import type { Type } from "../_type.js";
|
|
7
|
+
|
|
8
|
+
const REGEXP = /^\/(?<regexp>[\s\S]+)\/(?<modifiers>[gismuy]*)$/;
|
|
9
|
+
|
|
10
|
+
export const regexp: Type<"scalar", RegExp> = {
|
|
11
|
+
tag: "tag:yaml.org,2002:js/regexp",
|
|
12
|
+
kind: "scalar",
|
|
13
|
+
resolve(data: string | null): boolean {
|
|
14
|
+
if (data === null || !data.length) return false;
|
|
15
|
+
|
|
16
|
+
if (data.charAt(0) === "/") {
|
|
17
|
+
// Ensure regex is properly terminated
|
|
18
|
+
const groups = data.match(REGEXP)?.groups;
|
|
19
|
+
if (!groups) return false;
|
|
20
|
+
// Check no duplicate modifiers
|
|
21
|
+
const modifiers = groups.modifiers ?? "";
|
|
22
|
+
if (new Set(modifiers).size < modifiers.length) return false;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return true;
|
|
26
|
+
},
|
|
27
|
+
construct(data: string): RegExp {
|
|
28
|
+
const { regexp = data, modifiers = "" } = data.match(REGEXP)?.groups ?? {};
|
|
29
|
+
return new RegExp(regexp, modifiers);
|
|
30
|
+
},
|
|
31
|
+
predicate: (object: unknown): object is RegExp => object instanceof RegExp,
|
|
32
|
+
represent: (object: RegExp): string => object.toString(),
|
|
33
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Ported from js-yaml v3.13.1:
|
|
2
|
+
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
3
|
+
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
4
|
+
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
5
|
+
|
|
6
|
+
import type { Type } from "../_type.js";
|
|
7
|
+
|
|
8
|
+
export const seq: Type<"sequence", unknown[]> = {
|
|
9
|
+
tag: "tag:yaml.org,2002:seq",
|
|
10
|
+
kind: "sequence",
|
|
11
|
+
resolve: (): boolean => true,
|
|
12
|
+
construct: (data: unknown[] | null): unknown[] => data !== null ? data : [],
|
|
13
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Ported from js-yaml v3.13.1:
|
|
2
|
+
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
3
|
+
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
4
|
+
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
5
|
+
|
|
6
|
+
import type { Type } from "../_type.js";
|
|
7
|
+
|
|
8
|
+
export const set: Type<"mapping", Record<PropertyKey, unknown>> = {
|
|
9
|
+
tag: "tag:yaml.org,2002:set",
|
|
10
|
+
kind: "mapping",
|
|
11
|
+
construct: (data: Record<string, unknown>): Record<string, unknown> =>
|
|
12
|
+
data !== null ? data : {},
|
|
13
|
+
resolve: (data: Record<string, unknown>): boolean => {
|
|
14
|
+
if (data === null) return true;
|
|
15
|
+
return Object.values(data).every((it) => it === null);
|
|
16
|
+
},
|
|
17
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Ported from js-yaml v3.13.1:
|
|
2
|
+
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
3
|
+
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
4
|
+
|
|
5
|
+
import type { Type } from "../_type.js";
|
|
6
|
+
|
|
7
|
+
export const str: Type<"scalar", string> = {
|
|
8
|
+
tag: "tag:yaml.org,2002:str",
|
|
9
|
+
kind: "scalar",
|
|
10
|
+
resolve: (): boolean => true,
|
|
11
|
+
construct: (data: string | null): string => data !== null ? data : "",
|
|
12
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// Ported from js-yaml v3.13.1:
|
|
2
|
+
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
3
|
+
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
4
|
+
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
5
|
+
|
|
6
|
+
import type { Type } from "../_type.js";
|
|
7
|
+
|
|
8
|
+
const YAML_DATE_REGEXP = new RegExp(
|
|
9
|
+
"^([0-9][0-9][0-9][0-9])" + // [1] year
|
|
10
|
+
"-([0-9][0-9])" + // [2] month
|
|
11
|
+
"-([0-9][0-9])$", // [3] day
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
const YAML_TIMESTAMP_REGEXP = new RegExp(
|
|
15
|
+
"^([0-9][0-9][0-9][0-9])" + // [1] year
|
|
16
|
+
"-([0-9][0-9]?)" + // [2] month
|
|
17
|
+
"-([0-9][0-9]?)" + // [3] day
|
|
18
|
+
"(?:[Tt]|[ \\t]+)" + // ...
|
|
19
|
+
"([0-9][0-9]?)" + // [4] hour
|
|
20
|
+
":([0-9][0-9])" + // [5] minute
|
|
21
|
+
":([0-9][0-9])" + // [6] second
|
|
22
|
+
"(?:\\.([0-9]*))?" + // [7] fraction
|
|
23
|
+
"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)" + // [8] tz [9] tz_sign [10] tz_hour
|
|
24
|
+
"(?::([0-9][0-9]))?))?$", // [11] tz_minute
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
function resolveYamlTimestamp(data: string): boolean {
|
|
28
|
+
if (data === null) return false;
|
|
29
|
+
if (YAML_DATE_REGEXP.exec(data) !== null) return true;
|
|
30
|
+
if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function constructYamlTimestamp(data: string): Date {
|
|
35
|
+
let match = YAML_DATE_REGEXP.exec(data);
|
|
36
|
+
if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);
|
|
37
|
+
|
|
38
|
+
if (match === null) {
|
|
39
|
+
throw new Error("Cannot construct YAML timestamp: date resolve error");
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// match: [1] year [2] month [3] day
|
|
43
|
+
|
|
44
|
+
const year = +match[1]!;
|
|
45
|
+
const month = +match[2]! - 1; // JS month starts with 0
|
|
46
|
+
const day = +match[3]!;
|
|
47
|
+
|
|
48
|
+
if (!match[4]) {
|
|
49
|
+
// no hour
|
|
50
|
+
return new Date(Date.UTC(year, month, day));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// match: [4] hour [5] minute [6] second [7] fraction
|
|
54
|
+
|
|
55
|
+
const hour = +match[4];
|
|
56
|
+
const minute = +match[5]!;
|
|
57
|
+
const second = +match[6]!;
|
|
58
|
+
|
|
59
|
+
let fraction = 0;
|
|
60
|
+
if (match[7]) {
|
|
61
|
+
let partFraction = match[7].slice(0, 3);
|
|
62
|
+
while (partFraction.length < 3) {
|
|
63
|
+
// milli-seconds
|
|
64
|
+
partFraction += "0";
|
|
65
|
+
}
|
|
66
|
+
fraction = +partFraction;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute
|
|
70
|
+
|
|
71
|
+
let delta = null;
|
|
72
|
+
if (match[9] && match[10]) {
|
|
73
|
+
const tzHour = +match[10];
|
|
74
|
+
const tzMinute = +(match[11] || 0);
|
|
75
|
+
delta = (tzHour * 60 + tzMinute) * 60000; // delta in milli-seconds
|
|
76
|
+
if (match[9] === "-") delta = -delta;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const date = new Date(
|
|
80
|
+
Date.UTC(year, month, day, hour, minute, second, fraction),
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
if (delta) date.setTime(date.getTime() - delta);
|
|
84
|
+
|
|
85
|
+
return date;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function representYamlTimestamp(date: Date): string {
|
|
89
|
+
return date.toISOString();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export const timestamp: Type<"scalar", Date> = {
|
|
93
|
+
tag: "tag:yaml.org,2002:timestamp",
|
|
94
|
+
construct: constructYamlTimestamp,
|
|
95
|
+
predicate(object): object is Date {
|
|
96
|
+
return object instanceof Date;
|
|
97
|
+
},
|
|
98
|
+
kind: "scalar",
|
|
99
|
+
represent: representYamlTimestamp,
|
|
100
|
+
resolve: resolveYamlTimestamp,
|
|
101
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Ported and adapted from js-yaml-js-types v1.0.0:
|
|
2
|
+
// https://github.com/nodeca/js-yaml-js-types/tree/ac537e7bbdd3c2cbbd9882ca3919c520c2dc022b
|
|
3
|
+
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
4
|
+
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
5
|
+
|
|
6
|
+
import type { Type } from "../_type.js";
|
|
7
|
+
|
|
8
|
+
export const undefinedType: Type<"scalar", undefined> = {
|
|
9
|
+
tag: "tag:yaml.org,2002:js/undefined",
|
|
10
|
+
kind: "scalar",
|
|
11
|
+
resolve() {
|
|
12
|
+
return true;
|
|
13
|
+
},
|
|
14
|
+
construct() {
|
|
15
|
+
return undefined;
|
|
16
|
+
},
|
|
17
|
+
predicate(object) {
|
|
18
|
+
return typeof object === "undefined";
|
|
19
|
+
},
|
|
20
|
+
represent() {
|
|
21
|
+
return "";
|
|
22
|
+
},
|
|
23
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Ported from js-yaml v3.13.1:
|
|
2
|
+
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
3
|
+
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
4
|
+
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
5
|
+
// This module is browser compatible.
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The kind of YAML node.
|
|
9
|
+
*/
|
|
10
|
+
export type KindType = "sequence" | "scalar" | "mapping";
|
|
11
|
+
/**
|
|
12
|
+
* The style variation for `styles` option of {@linkcode stringify}
|
|
13
|
+
*/
|
|
14
|
+
export type StyleVariant =
|
|
15
|
+
| "lowercase"
|
|
16
|
+
| "uppercase"
|
|
17
|
+
| "camelcase"
|
|
18
|
+
| "decimal"
|
|
19
|
+
| "binary"
|
|
20
|
+
| "octal"
|
|
21
|
+
| "hexadecimal";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Function to convert data to a string for YAML serialization.
|
|
25
|
+
*/
|
|
26
|
+
export type RepresentFn<D> = (data: D, style?: StyleVariant) => string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* A type definition for a YAML node.
|
|
30
|
+
*/
|
|
31
|
+
// deno-lint-ignore no-explicit-any
|
|
32
|
+
export interface Type<K extends KindType, D = any> {
|
|
33
|
+
/** Tag to identify the type */
|
|
34
|
+
tag: string;
|
|
35
|
+
/** Kind of type */
|
|
36
|
+
kind: K;
|
|
37
|
+
/** Cast the type. Used to stringify */
|
|
38
|
+
predicate?: (data: unknown) => data is D;
|
|
39
|
+
/** Function to represent data. Used to stringify */
|
|
40
|
+
represent?: RepresentFn<D> | Record<string, RepresentFn<D>>;
|
|
41
|
+
/** Default style for the type. Used to stringify */
|
|
42
|
+
defaultStyle?: StyleVariant;
|
|
43
|
+
/** Function to test whether data can be resolved by this type. Used to parse */
|
|
44
|
+
// deno-lint-ignore no-explicit-any
|
|
45
|
+
resolve: (data: any) => boolean;
|
|
46
|
+
/** Function to construct data from string. Used to parse */
|
|
47
|
+
// deno-lint-ignore no-explicit-any
|
|
48
|
+
construct: (data: any) => D;
|
|
49
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Ported from js-yaml v3.13.1:
|
|
2
|
+
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
3
|
+
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
4
|
+
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
5
|
+
|
|
6
|
+
export function isObject(value: unknown): value is Record<string, unknown> {
|
|
7
|
+
return value !== null && typeof value === "object";
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function isNegativeZero(i: number): boolean {
|
|
11
|
+
return i === 0 && Number.NEGATIVE_INFINITY === 1 / i;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function isPlainObject(object: unknown): object is object {
|
|
15
|
+
return Object.prototype.toString.call(object) === "[object Object]";
|
|
16
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
// Ported from js-yaml v3.13.1:
|
|
2
|
+
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
3
|
+
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
4
|
+
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
5
|
+
// This module is browser compatible.
|
|
6
|
+
|
|
7
|
+
import { isEOL } from "./_chars.js";
|
|
8
|
+
import { LoaderState } from "./_loader_state.js";
|
|
9
|
+
import { SCHEMA_MAP, type SchemaType } from "./_schema.js";
|
|
10
|
+
|
|
11
|
+
export type { SchemaType };
|
|
12
|
+
|
|
13
|
+
/** Options for {@linkcode parse}. */
|
|
14
|
+
export interface ParseOptions {
|
|
15
|
+
/**
|
|
16
|
+
* Name of the schema to use.
|
|
17
|
+
*
|
|
18
|
+
* @default {"default"}
|
|
19
|
+
*/
|
|
20
|
+
schema?: SchemaType;
|
|
21
|
+
/**
|
|
22
|
+
* If `true`, duplicate keys will overwrite previous values. Otherwise,
|
|
23
|
+
* duplicate keys will throw a {@linkcode SyntaxError}.
|
|
24
|
+
*
|
|
25
|
+
* @default {false}
|
|
26
|
+
*/
|
|
27
|
+
allowDuplicateKeys?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* If defined, a function to call on warning messages taking an
|
|
30
|
+
* {@linkcode Error} as its only argument.
|
|
31
|
+
*/
|
|
32
|
+
onWarning?(error: Error): void;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function sanitizeInput(input: string) {
|
|
36
|
+
input = String(input);
|
|
37
|
+
|
|
38
|
+
if (input.length > 0) {
|
|
39
|
+
// Add trailing `\n` if not exists
|
|
40
|
+
if (!isEOL(input.charCodeAt(input.length - 1))) input += "\n";
|
|
41
|
+
|
|
42
|
+
// Strip BOM
|
|
43
|
+
if (input.charCodeAt(0) === 0xfeff) input = input.slice(1);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return input;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Parse and return a YAML string as a parsed YAML document object.
|
|
51
|
+
*
|
|
52
|
+
* Note: This does not support functions. Untrusted data is safe to parse.
|
|
53
|
+
*
|
|
54
|
+
* @example Usage
|
|
55
|
+
* ```ts
|
|
56
|
+
* import { parse } from "@std/yaml/parse";
|
|
57
|
+
* import { assertEquals } from "@std/assert";
|
|
58
|
+
*
|
|
59
|
+
* const data = parse(`
|
|
60
|
+
* id: 1
|
|
61
|
+
* name: Alice
|
|
62
|
+
* `);
|
|
63
|
+
*
|
|
64
|
+
* assertEquals(data, { id: 1, name: "Alice" });
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @throws {SyntaxError} Throws error on invalid YAML.
|
|
68
|
+
* @param content YAML string to parse.
|
|
69
|
+
* @param options Parsing options.
|
|
70
|
+
* @returns Parsed document.
|
|
71
|
+
*/
|
|
72
|
+
export function parse(
|
|
73
|
+
content: string,
|
|
74
|
+
options: ParseOptions = {},
|
|
75
|
+
): unknown {
|
|
76
|
+
content = sanitizeInput(content);
|
|
77
|
+
const state = new LoaderState(content, {
|
|
78
|
+
...options,
|
|
79
|
+
schema: SCHEMA_MAP.get(options.schema!)!,
|
|
80
|
+
});
|
|
81
|
+
const documentGenerator = state.readDocuments();
|
|
82
|
+
const document = documentGenerator.next().value;
|
|
83
|
+
if (!documentGenerator.next().done) {
|
|
84
|
+
throw new SyntaxError(
|
|
85
|
+
"Found more than 1 document in the stream: expected a single document",
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
return document ?? null;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Same as {@linkcode parse}, but understands multi-document YAML sources, and
|
|
93
|
+
* returns multiple parsed YAML document objects.
|
|
94
|
+
*
|
|
95
|
+
* @example Usage
|
|
96
|
+
* ```ts
|
|
97
|
+
* import { parseAll } from "@std/yaml/parse";
|
|
98
|
+
* import { assertEquals } from "@std/assert";
|
|
99
|
+
*
|
|
100
|
+
* const data = parseAll(`
|
|
101
|
+
* ---
|
|
102
|
+
* id: 1
|
|
103
|
+
* name: Alice
|
|
104
|
+
* ---
|
|
105
|
+
* id: 2
|
|
106
|
+
* name: Bob
|
|
107
|
+
* ---
|
|
108
|
+
* id: 3
|
|
109
|
+
* name: Eve
|
|
110
|
+
* `);
|
|
111
|
+
* assertEquals(data, [ { id: 1, name: "Alice" }, { id: 2, name: "Bob" }, { id: 3, name: "Eve" }]);
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
* @param content YAML string to parse.
|
|
115
|
+
* @param options Parsing options.
|
|
116
|
+
* @returns Array of parsed documents.
|
|
117
|
+
*/
|
|
118
|
+
export function parseAll(content: string, options: ParseOptions = {}): unknown {
|
|
119
|
+
content = sanitizeInput(content);
|
|
120
|
+
const state = new LoaderState(content, {
|
|
121
|
+
...options,
|
|
122
|
+
schema: SCHEMA_MAP.get(options.schema!)!,
|
|
123
|
+
});
|
|
124
|
+
return [...state.readDocuments()];
|
|
125
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ext-auth-jwt
|
|
2
|
+
* ext-auth-jwt: AuthProvider implementation backed by `jose`.
|
|
3
3
|
*
|
|
4
4
|
* Provides the `AuthProvider` contract: sign / verify (HS256 by default),
|
|
5
|
-
*
|
|
5
|
+
* remote-JWKS verification, public-key verification, and header decoding.
|
|
6
6
|
*
|
|
7
7
|
* @module extensions/ext-auth-jwt
|
|
8
8
|
*/
|
|
@@ -12,6 +12,7 @@ import * as dntShim from "../../../_dnt.shims.js";
|
|
|
12
12
|
import {
|
|
13
13
|
createRemoteJWKSet,
|
|
14
14
|
decodeProtectedHeader,
|
|
15
|
+
importSPKI,
|
|
15
16
|
type JWTPayload,
|
|
16
17
|
jwtVerify,
|
|
17
18
|
type KeyLike,
|
|
@@ -83,6 +84,7 @@ function createAuthProvider(config: ExtJwtConfig): AuthProvider {
|
|
|
83
84
|
// internal key cache with cooldown/rotation semantics, so reusing the
|
|
84
85
|
// same resolver is required for the cache to be effective.
|
|
85
86
|
const jwksResolvers = new Map<string, JwksResolver>();
|
|
87
|
+
const publicKeys = new Map<string, Promise<KeyLike>>();
|
|
86
88
|
|
|
87
89
|
function getJwksResolver(jwksUrl: string): JwksResolver {
|
|
88
90
|
const existing = jwksResolvers.get(jwksUrl);
|
|
@@ -92,6 +94,16 @@ function createAuthProvider(config: ExtJwtConfig): AuthProvider {
|
|
|
92
94
|
return created;
|
|
93
95
|
}
|
|
94
96
|
|
|
97
|
+
function getPublicKey(publicKeyPem: string, algorithm: string): Promise<KeyLike> {
|
|
98
|
+
const cacheKey = `${algorithm}:${publicKeyPem}`;
|
|
99
|
+
const existing = publicKeys.get(cacheKey);
|
|
100
|
+
if (existing) return existing;
|
|
101
|
+
|
|
102
|
+
const created = importSPKI(publicKeyPem, algorithm);
|
|
103
|
+
publicKeys.set(cacheKey, created);
|
|
104
|
+
return created;
|
|
105
|
+
}
|
|
106
|
+
|
|
95
107
|
return {
|
|
96
108
|
async sign(payload: TokenPayload, options?: SignOptions): Promise<string> {
|
|
97
109
|
const secret = getSecret(config.secret);
|
|
@@ -136,6 +148,22 @@ function createAuthProvider(config: ExtJwtConfig): AuthProvider {
|
|
|
136
148
|
return payload as TokenPayload;
|
|
137
149
|
},
|
|
138
150
|
|
|
151
|
+
async verifyWithPublicKey(
|
|
152
|
+
token: string,
|
|
153
|
+
publicKeyPem: string,
|
|
154
|
+
options?: VerifyOptions,
|
|
155
|
+
): Promise<TokenPayload> {
|
|
156
|
+
const algorithms = options?.algorithms ?? ["RS256"];
|
|
157
|
+
const algorithm = algorithms[0] ?? "RS256";
|
|
158
|
+
const publicKey = await getPublicKey(publicKeyPem, algorithm);
|
|
159
|
+
const { algorithms: _algorithms, ...rest } = options ?? {};
|
|
160
|
+
const { payload } = await jwtVerify(token, publicKey, {
|
|
161
|
+
...rest,
|
|
162
|
+
algorithms,
|
|
163
|
+
});
|
|
164
|
+
return payload as TokenPayload;
|
|
165
|
+
},
|
|
166
|
+
|
|
139
167
|
decode(token: string): TokenHeader | undefined {
|
|
140
168
|
try {
|
|
141
169
|
return decodeProtectedHeader(token) as TokenHeader;
|
|
@@ -161,7 +189,7 @@ const extJwt: ExtensionFactory = (config?: unknown) => {
|
|
|
161
189
|
version: "0.1.0",
|
|
162
190
|
capabilities: [
|
|
163
191
|
{ type: "contract", name: "AuthProvider" },
|
|
164
|
-
{ type: "
|
|
192
|
+
{ type: "net:outbound", hosts: ["*"] },
|
|
165
193
|
],
|
|
166
194
|
provides: {
|
|
167
195
|
AuthProvider: provider,
|
package/src/extensions/{ext-transform-mdx → ext-content-mdx}/src/compiler/markdown-compile.ts
RENAMED
|
@@ -12,10 +12,7 @@ import { visit } from "unist-util-visit";
|
|
|
12
12
|
import { toString } from "mdast-util-to-string";
|
|
13
13
|
import Slugger from "github-slugger";
|
|
14
14
|
import type { Heading, Root as MdastRoot } from "@types/mdast";
|
|
15
|
-
import type {
|
|
16
|
-
ContentCompileOptions,
|
|
17
|
-
ContentProcessingResult,
|
|
18
|
-
} from "../../../../src/extensions/transform/index.js";
|
|
15
|
+
import type { ContentCompileOptions, ContentProcessingResult } from "../../../../src/extensions/content/index.js";
|
|
19
16
|
import { extractFrontmatter } from "../../../../src/transforms/mdx/compiler/frontmatter-extractor.js";
|
|
20
17
|
import { isMarkdownPreview } from "../../../../src/transforms/md/utils.js";
|
|
21
18
|
import { rehypeNodePositions } from "../plugins/rehype-node-positions.js";
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { compile } from "@mdx-js/mdx";
|
|
2
2
|
import type { Pluggable } from "unified";
|
|
3
|
-
import type {
|
|
4
|
-
ContentCompileOptions,
|
|
5
|
-
ContentProcessingResult,
|
|
6
|
-
} from "../../../../src/extensions/transform/index.js";
|
|
3
|
+
import type { ContentCompileOptions, ContentProcessingResult } from "../../../../src/extensions/content/index.js";
|
|
7
4
|
import { extractFrontmatter } from "../../../../src/transforms/mdx/compiler/frontmatter-extractor.js";
|
|
8
5
|
import { rewriteBodyImports, rewriteCompiledImports } from "../../../../src/transforms/mdx/compiler/import-rewriter.js";
|
|
9
6
|
import { getRehypePlugins, getRemarkPlugins } from "../plugins/plugin-loader.js";
|
|
@@ -20,10 +17,19 @@ export async function compileMdx(options: ContentCompileOptions): Promise<Conten
|
|
|
20
17
|
target = "server",
|
|
21
18
|
baseUrl,
|
|
22
19
|
studioEmbed,
|
|
20
|
+
outputFormat = "program",
|
|
21
|
+
remarkPlugins: additionalRemarkPlugins = [],
|
|
22
|
+
rehypePlugins: additionalRehypePlugins = [],
|
|
23
23
|
} = options;
|
|
24
24
|
|
|
25
|
-
const remarkPlugins =
|
|
26
|
-
|
|
25
|
+
const remarkPlugins = [
|
|
26
|
+
...getRemarkPlugins(),
|
|
27
|
+
...additionalRemarkPlugins,
|
|
28
|
+
] as unknown as PluggableList;
|
|
29
|
+
const rehypePlugins = [
|
|
30
|
+
...getRehypePlugins(),
|
|
31
|
+
...additionalRehypePlugins,
|
|
32
|
+
] as unknown as PluggableList;
|
|
27
33
|
|
|
28
34
|
if (studioEmbed && filePath) {
|
|
29
35
|
rehypePlugins.push([rehypeNodePositions, { filePath }] as unknown as Pluggable);
|
|
@@ -41,7 +47,7 @@ export async function compileMdx(options: ContentCompileOptions): Promise<Conten
|
|
|
41
47
|
: extractedBody;
|
|
42
48
|
|
|
43
49
|
const compiled = await compile(body, {
|
|
44
|
-
outputFormat
|
|
50
|
+
outputFormat,
|
|
45
51
|
// Always false: @mdx-js/mdx development mode emits extra JSX
|
|
46
52
|
// transforms that break the existing rendering pipeline.
|
|
47
53
|
development: false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ext-mdx: ContentProcessor implementation backed by MDX + remark/rehype.
|
|
2
|
+
* ext-content-mdx: ContentProcessor implementation backed by MDX + remark/rehype.
|
|
3
3
|
*
|
|
4
4
|
* Provides the `ContentProcessor` contract:
|
|
5
5
|
* - `compileMdx(options)` runs @mdx-js/mdx through Veryfront's remark +
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* core throws an actionable install message (see
|
|
15
15
|
* `src/extensions/recommendations.ts`).
|
|
16
16
|
*
|
|
17
|
-
* @module extensions/ext-
|
|
17
|
+
* @module extensions/ext-content-mdx
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import type { ExtensionFactory } from "../../../src/extensions/index.js";
|
|
@@ -23,7 +23,7 @@ import type {
|
|
|
23
23
|
ContentPlugin,
|
|
24
24
|
ContentProcessingResult,
|
|
25
25
|
ContentProcessor,
|
|
26
|
-
} from "../../../src/extensions/
|
|
26
|
+
} from "../../../src/extensions/content/index.js";
|
|
27
27
|
import { compileMdx } from "./compiler/mdx-compile.js";
|
|
28
28
|
import { compileMarkdown } from "./compiler/markdown-compile.js";
|
|
29
29
|
import { getRehypePlugins, getRemarkPlugins } from "./plugins/plugin-loader.js";
|
|
@@ -46,12 +46,12 @@ class MdxContentProcessor implements ContentProcessor {
|
|
|
46
46
|
const extMdx: ExtensionFactory = () => {
|
|
47
47
|
const impl = new MdxContentProcessor();
|
|
48
48
|
return {
|
|
49
|
-
name: "ext-
|
|
49
|
+
name: "ext-content-mdx",
|
|
50
50
|
version: "0.1.0",
|
|
51
51
|
capabilities: [{ type: "contract", name: "ContentProcessor" }],
|
|
52
52
|
setup(ctx) {
|
|
53
53
|
ctx.provide("ContentProcessor", impl);
|
|
54
|
-
ctx.logger.info("[ext-mdx] ContentProcessor registered");
|
|
54
|
+
ctx.logger.info("[ext-content-mdx] ContentProcessor registered");
|
|
55
55
|
},
|
|
56
56
|
teardown() {
|
|
57
57
|
// No resources to release.
|
|
@@ -61,7 +61,7 @@ const extTailwind: ExtensionFactory = () => {
|
|
|
61
61
|
version: "0.1.0",
|
|
62
62
|
capabilities: [
|
|
63
63
|
{ type: "contract", name: "CSSProcessor" },
|
|
64
|
-
{ type: "net", hosts: ["esm.sh"] },
|
|
64
|
+
{ type: "net:outbound", hosts: ["esm.sh"] },
|
|
65
65
|
],
|
|
66
66
|
setup(ctx) {
|
|
67
67
|
installTailwindPluginShims();
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ext-db-sqlite: SQLite-backed storage for Veryfront.
|
|
3
|
+
*
|
|
4
|
+
* Provides the `SqliteStore` contract via better-sqlite3.
|
|
5
|
+
*
|
|
6
|
+
* @module extensions/ext-db-sqlite
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { ExtensionFactory } from "../../../src/extensions/index.js";
|
|
10
|
+
import type { SqliteDatabase, SqliteStore } from "../../../src/extensions/compat/index.js";
|
|
11
|
+
|
|
12
|
+
async function loadSqliteDatabase(path?: string): Promise<SqliteDatabase> {
|
|
13
|
+
const mod = await import("better-sqlite3");
|
|
14
|
+
// deno-lint-ignore no-explicit-any
|
|
15
|
+
const DatabaseCtor = (mod as any).default ?? mod;
|
|
16
|
+
// deno-lint-ignore no-explicit-any
|
|
17
|
+
return new DatabaseCtor(path ?? ":memory:") as any as SqliteDatabase;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export class BetterSqliteStore implements SqliteStore {
|
|
21
|
+
openSqliteDatabase(path?: string): Promise<SqliteDatabase> {
|
|
22
|
+
return loadSqliteDatabase(path);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const extDbSqlite: ExtensionFactory = () => {
|
|
27
|
+
const store = new BetterSqliteStore();
|
|
28
|
+
|
|
29
|
+
return {
|
|
30
|
+
name: "ext-db-sqlite",
|
|
31
|
+
version: "0.1.0",
|
|
32
|
+
capabilities: [
|
|
33
|
+
{ type: "contract", name: "SqliteStore" },
|
|
34
|
+
{ type: "fs:read" },
|
|
35
|
+
{ type: "fs:write" },
|
|
36
|
+
],
|
|
37
|
+
|
|
38
|
+
setup(ctx) {
|
|
39
|
+
ctx.provide("SqliteStore", store);
|
|
40
|
+
ctx.logger.info("[ext-db-sqlite] SQLite store registered");
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default extDbSqlite;
|